From d796c9dd933ab96ec83b9a634feedd5d32e1ba3f Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 8 Nov 2011 12:31:36 -0600 Subject: Test conversion to TQt3 from Qt3 8c6fc1f8e35fd264dd01c582ca5e7549b32ab731 --- doc/html/3rdparty.html | 106 + doc/html/aboutqt.html | 81 + doc/html/abstract-connections.png | Bin 0 -> 19849 bytes doc/html/abstractwidgets.html | 56 + doc/html/accelerators.html | 126 + doc/html/aclock-example.html | 279 + doc/html/activeqt-dotnet.html | 459 + doc/html/activeqt-examples.html | 49 + doc/html/activeqt-tools-dumpdoc.html | 74 + doc/html/activeqt-tools-idc.html | 75 + doc/html/activeqt-tools-testcon.html | 70 + doc/html/activeqt-tools.html | 49 + doc/html/activeqt.html | 86 + doc/html/addressbook-example.html | 666 ++ doc/html/advanced.html | 73 + doc/html/annotated.html | 464 + doc/html/appearance.html | 83 + doc/html/appicon.html | 201 + doc/html/application.html | 62 + doc/html/archivesearch-example.html | 183 + doc/html/assistant-1.html | 48 + doc/html/assistant-2.html | 52 + doc/html/assistant-3.html | 49 + doc/html/assistant-4.html | 115 + doc/html/assistant-5.html | 52 + doc/html/assistant-6.html | 129 + doc/html/assistant.dcf | 9 + doc/html/assistant.html | 47 + doc/html/assistant.png | Bin 0 -> 53805 bytes doc/html/basic.html | 67 + doc/html/bearings.png | Bin 0 -> 1244 bytes doc/html/biff-example.html | 198 + doc/html/bigtable-example.html | 115 + doc/html/book-dialog.png | Bin 0 -> 3529 bytes doc/html/book-main.png | Bin 0 -> 4405 bytes doc/html/brush-styles.png | Bin 0 -> 4657 bytes doc/html/bughowto.html | 63 + doc/html/buttongroup-w.png | Bin 0 -> 688 bytes doc/html/buttongroups-example.html | 240 + doc/html/canvas-chart-example.html | 814 ++ doc/html/canvas-example.html | 941 ++ doc/html/canvas.html | 82 + doc/html/chart-canvastext-h.html | 73 + doc/html/chart-canvasview-cpp.html | 97 + doc/html/chart-canvasview-h.html | 78 + doc/html/chart-chart-pro.html | 62 + doc/html/chart-chartform-cpp.html | 573 + doc/html/chart-chartform-h.html | 132 + doc/html/chart-chartform_canvas-cpp.html | 268 + doc/html/chart-chartform_files-cpp.html | 155 + doc/html/chart-element-cpp.html | 169 + doc/html/chart-element-h.html | 126 + doc/html/chart-forms.png | Bin 0 -> 10472 bytes doc/html/chart-main-cpp.html | 63 + doc/html/chart-main.png | Bin 0 -> 9442 bytes doc/html/chart-main2.png | Bin 0 -> 7127 bytes doc/html/chart-options.png | Bin 0 -> 4060 bytes doc/html/chart-optionsform-cpp.html | 177 + doc/html/chart-optionsform-h.html | 102 + doc/html/chart-setdata.png | Bin 0 -> 6919 bytes doc/html/chart-setdataform-cpp.html | 250 + doc/html/chart-setdataform-h.html | 89 + doc/html/checklists-example.html | 283 + doc/html/classchart.html | 354 + doc/html/classes.html | 975 ++ doc/html/clientserver-example.html | 352 + doc/html/collection.html | 250 + doc/html/commercialeditions.html | 161 + doc/html/commonproblems.html | 217 + doc/html/concrete-connections.png | Bin 0 -> 8669 bytes doc/html/coordsys.html | 215 + doc/html/coordsys.png | Bin 0 -> 822 bytes doc/html/credits.html | 321 + doc/html/cursor-example.html | 199 + doc/html/cursors.png | Bin 0 -> 5365 bytes doc/html/customlayout-example.html | 851 ++ doc/html/customlayout.html | 246 + doc/html/customstyles.html | 213 + doc/html/database.html | 66 + doc/html/databaseconnections.png | Bin 0 -> 15129 bytes doc/html/datastreamformat.html | 245 + doc/html/datetimewidgets.png | Bin 0 -> 2208 bytes doc/html/dclock-example.html | 221 + doc/html/debug.html | 171 + doc/html/demo-example.html | 49 + doc/html/dependencies.png | Bin 0 -> 27414 bytes doc/html/designer-manual-1.html | 78 + doc/html/designer-manual-10.html | 75 + doc/html/designer-manual-11.html | 210 + doc/html/designer-manual-12.html | 159 + doc/html/designer-manual-13.html | 447 + doc/html/designer-manual-14.html | 144 + doc/html/designer-manual-15.html | 88 + doc/html/designer-manual-16.html | 522 + doc/html/designer-manual-2.html | 294 + doc/html/designer-manual-3.html | 852 ++ doc/html/designer-manual-4.html | 528 + doc/html/designer-manual-5.html | 111 + doc/html/designer-manual-6.html | 312 + doc/html/designer-manual-7.html | 400 + doc/html/designer-manual-8.html | 402 + doc/html/designer-manual-9.html | 222 + doc/html/designer-manual.html | 57 + doc/html/designer.dcf | 19 + doc/html/designer1.jpg | Bin 0 -> 21898 bytes doc/html/designer2.jpg | Bin 0 -> 28098 bytes doc/html/designer3.jpg | Bin 0 -> 27300 bytes doc/html/desktop-example.html | 401 + doc/html/dialog1addwidg.png | Bin 0 -> 4442 bytes doc/html/dialog1layout1.png | Bin 0 -> 7006 bytes doc/html/dialog1layout2.png | Bin 0 -> 7241 bytes doc/html/dialog1selewidg.png | Bin 0 -> 4424 bytes doc/html/dialog1selewidg1.png | Bin 0 -> 4500 bytes doc/html/dialog1tab.png | Bin 0 -> 7701 bytes doc/html/dialog2laywidg.png | Bin 0 -> 2036 bytes doc/html/dialog2sample.png | Bin 0 -> 1881 bytes doc/html/dialog2setwidg.png | Bin 0 -> 2312 bytes doc/html/dialog3buttons.png | Bin 0 -> 8882 bytes doc/html/dialog3clipgrp.png | Bin 0 -> 4787 bytes doc/html/dialog3grpbox.png | Bin 0 -> 3274 bytes doc/html/dialog3layclip.png | Bin 0 -> 5544 bytes doc/html/dialog3layout.png | Bin 0 -> 5188 bytes doc/html/dialog3sample.png | Bin 0 -> 4938 bytes doc/html/dialogs.html | 57 + doc/html/dirview-example.html | 751 ++ doc/html/distributingqt.html | 124 + doc/html/distributor-example.html | 450 + doc/html/dnd.html | 367 + doc/html/docwindow.png | Bin 0 -> 9727 bytes doc/html/doneandnext.png | Bin 0 -> 445 bytes doc/html/draganddrop.html | 63 + doc/html/dragdrop-example.html | 47 + doc/html/drawdemo-example.html | 364 + doc/html/drawlines-example.html | 186 + doc/html/edit-dbtable-dialog.png | Bin 0 -> 5162 bytes doc/html/editcopy.png | Bin 0 -> 587 bytes doc/html/editcut.png | Bin 0 -> 480 bytes doc/html/editfind.png | Bin 0 -> 776 bytes doc/html/editions.html | 133 + doc/html/editpaste.png | Bin 0 -> 664 bytes doc/html/editredo.png | Bin 0 -> 362 bytes doc/html/editundo.png | Bin 0 -> 353 bytes doc/html/emb-accel.html | 121 + doc/html/emb-charinput.html | 111 + doc/html/emb-classes.html | 339 + doc/html/emb-envvars.html | 104 + doc/html/emb-features.html | 256 + doc/html/emb-fonts.html | 169 + doc/html/emb-framebuffer-howto.html | 234 + doc/html/emb-install.html | 157 + doc/html/emb-performance.html | 132 + doc/html/emb-pointer.html | 80 + doc/html/emb-porting.html | 64 + doc/html/emb-qvfb.html | 110 + doc/html/emb-running.html | 138 + doc/html/emb-vnc.html | 68 + doc/html/embedporting.html | 89 + doc/html/environment.html | 62 + doc/html/events.html | 72 + doc/html/eventsandfilters.html | 151 + doc/html/examples.html | 144 + doc/html/extension-dialog-example.html | 168 + doc/html/faq.html | 502 + doc/html/filechooser.png | Bin 0 -> 215 bytes doc/html/fileiconview-example.html | 1394 +++ doc/html/fileopen.png | Bin 0 -> 523 bytes doc/html/fileprint.png | Bin 0 -> 767 bytes doc/html/filesave.png | Bin 0 -> 510 bytes doc/html/finddialog.png | Bin 0 -> 3165 bytes doc/html/focus.html | 167 + doc/html/forever-example.html | 196 + doc/html/frames.png | Bin 0 -> 10662 bytes doc/html/ftpclient-example.html | 353 + doc/html/functions.html | 3703 +++++++ doc/html/general.png | Bin 0 -> 11239 bytes doc/html/geomanagement.html | 66 + doc/html/geometry.html | 122 + doc/html/geometry.png | Bin 0 -> 8996 bytes doc/html/gpl.html | 393 + doc/html/graph.g1n | 10 + doc/html/grapher-nsplugin-example.html | 704 ++ doc/html/graphics.html | 103 + doc/html/gridlayout.png | Bin 0 -> 1483 bytes doc/html/groupbox-w.png | Bin 0 -> 650 bytes doc/html/groups.html | 143 + doc/html/guibooks.html | 100 + doc/html/headerfilesynonyms | 170 + doc/html/headers.html | 309 + doc/html/hello-example.html | 236 + doc/html/helpsystem-example.html | 494 + doc/html/helpsystem.html | 65 + doc/html/helpviewer-example.html | 481 + doc/html/hierarchy.html | 605 ++ doc/html/how-to-learn-qt.html | 91 + doc/html/httpd-example.html | 195 + doc/html/i18n-example.html | 341 + doc/html/i18n.html | 570 + doc/html/iconset.png | Bin 0 -> 2149 bytes doc/html/iconview-example.html | 127 + doc/html/iconview-simple_dd-main-cpp.html | 230 + doc/html/iconview-simple_dd-main-h.html | 103 + doc/html/iconview.html | 51 + doc/html/images.html | 93 + doc/html/index | 8446 +++++++++++++++ doc/html/index.html | 186 + doc/html/inputdialogs.png | Bin 0 -> 4509 bytes doc/html/install-mac.html | 139 + doc/html/install-win.html | 45 + doc/html/install-x11.html | 136 + doc/html/installation.html | 50 + doc/html/integration.html | 168 + doc/html/io.html | 83 + doc/html/keyfeatures30.html | 357 + doc/html/layout-example.html | 211 + doc/html/layout.html | 246 + doc/html/layout1.png | Bin 0 -> 106 bytes doc/html/layout2.png | Bin 0 -> 245 bytes doc/html/license.html | 153 + doc/html/licenses.html | 327 + doc/html/life-example.html | 298 + doc/html/lineedits-example.html | 394 + doc/html/linguist-manual-1.html | 56 + doc/html/linguist-manual-2.html | 81 + doc/html/linguist-manual-3.html | 197 + doc/html/linguist-manual-4.html | 564 + doc/html/linguist-manual.html | 45 + doc/html/linguist.dcf | 7 + doc/html/linguist.png | Bin 0 -> 22819 bytes doc/html/listbox-example.html | 325 + doc/html/listboxcombo-example.html | 309 + doc/html/listviews-example.html | 513 + doc/html/logo32.png | Bin 0 -> 1491 bytes doc/html/mac-differences.html | 289 + doc/html/mail-example.html | 243 + doc/html/mainclasses.html | 281 + doc/html/mainwindow-w.png | Bin 0 -> 2903 bytes doc/html/makeqpf.html | 56 + doc/html/mdi-example.html | 600 + doc/html/menu-example.html | 472 + doc/html/menubar.png | Bin 0 -> 511 bytes doc/html/metaobjects.html | 93 + doc/html/misc.html | 75 + doc/html/moc.html | 452 + doc/html/modules.html | 69 + doc/html/motif-customwidget-example.html | 148 + doc/html/motif-dialog-example.html | 237 + doc/html/motif-examples.html | 52 + doc/html/motif-extension.html | 127 + doc/html/motif-todo.png | Bin 0 -> 4465 bytes doc/html/motif-walkthrough-1.html | 98 + doc/html/motif-walkthrough-10.html | 106 + doc/html/motif-walkthrough-2.html | 101 + doc/html/motif-walkthrough-3.html | 178 + doc/html/motif-walkthrough-4.html | 102 + doc/html/motif-walkthrough-5.html | 109 + doc/html/motif-walkthrough-6.html | 129 + doc/html/motif-walkthrough-7.html | 214 + doc/html/motif-walkthrough-8.html | 212 + doc/html/motif-walkthrough-9.html | 104 + doc/html/motif-walkthrough.html | 150 + doc/html/movies-example.html | 344 + doc/html/multimedia.html | 52 + doc/html/mw-addmainwidg.png | Bin 0 -> 6587 bytes doc/html/mw-coloriconv.png | Bin 0 -> 7710 bytes doc/html/mw-colortable.png | Bin 0 -> 7928 bytes doc/html/mw-colortool1.png | Bin 0 -> 13147 bytes doc/html/mw-colortool2.png | Bin 0 -> 14473 bytes doc/html/mw-conn1.png | Bin 0 -> 34262 bytes doc/html/mw-conn2.png | Bin 0 -> 37317 bytes doc/html/mw-conn3.png | Bin 0 -> 36033 bytes doc/html/mw-conn4.png | Bin 0 -> 44644 bytes doc/html/mw-dragaction.png | Bin 0 -> 1623 bytes doc/html/mw-dragviewitem.png | Bin 0 -> 1770 bytes doc/html/mw-editforw.png | Bin 0 -> 9885 bytes doc/html/mw-editfunc.png | Bin 0 -> 21778 bytes doc/html/mw-editincimp.png | Bin 0 -> 11707 bytes doc/html/mw-editvar.png | Bin 0 -> 18055 bytes doc/html/mw-laycoloriconv.png | Bin 0 -> 6926 bytes doc/html/mw-laycolortable.png | Bin 0 -> 7971 bytes doc/html/mw-laymainwidg.png | Bin 0 -> 6507 bytes doc/html/mw-menuwiz.png | Bin 0 -> 43206 bytes doc/html/mw-newfile.png | Bin 0 -> 19374 bytes doc/html/mw-newmenuitem.png | Bin 0 -> 1536 bytes doc/html/mw-objexplor.png | Bin 0 -> 23232 bytes doc/html/mw-previewform.png | Bin 0 -> 8260 bytes doc/html/mw-projset.png | Bin 0 -> 11740 bytes doc/html/mw-propedit.png | Bin 0 -> 24291 bytes doc/html/mw-separator.png | Bin 0 -> 2489 bytes doc/html/mw-settoolwiz.png | Bin 0 -> 45008 bytes doc/html/mw-startdesign.png | Bin 0 -> 23966 bytes doc/html/mw-toolbarpits.png | Bin 0 -> 220 bytes doc/html/netscape-plugin.html | 129 + doc/html/network-examples.html | 53 + doc/html/network.html | 466 + doc/html/networkprotocol-example.html | 364 + doc/html/next.png | Bin 0 -> 418 bytes doc/html/nextunfinished.png | Bin 0 -> 456 bytes doc/html/nsplugin-examples.html | 51 + doc/html/object.html | 78 + doc/html/objectmodel.html | 52 + doc/html/objecttrees.html | 68 + doc/html/opengl-box-example.html | 50 + doc/html/opengl-examples.html | 54 + doc/html/opengl-gear-example.html | 47 + doc/html/opengl-overlay-example.html | 52 + doc/html/opengl-overlay-x11-example.html | 105 + doc/html/opengl-pixmap-example.html | 48 + doc/html/opengl-sharedbox-example.html | 49 + doc/html/opengl-texture-example.html | 47 + doc/html/opengl-x11-overlays.html | 115 + doc/html/opengl.html | 105 + doc/html/opensourceedition.html | 100 + doc/html/organizers.html | 60 + doc/html/outliner-example.html | 279 + doc/html/overviews-list.html | 124 + doc/html/palette.png | Bin 0 -> 4091 bytes doc/html/pdf1.png | Bin 0 -> 8610 bytes doc/html/pen-cap-styles.png | Bin 0 -> 2055 bytes doc/html/pen-join-styles.png | Bin 0 -> 2369 bytes doc/html/pen-styles.png | Bin 0 -> 4020 bytes doc/html/penstyles.png | Bin 0 -> 238 bytes doc/html/phrasebookdialog.png | Bin 0 -> 4857 bytes doc/html/phrasebookopen.png | Bin 0 -> 883 bytes doc/html/picture-example.html | 182 + doc/html/pictures.html | 95 + doc/html/plugins-howto.html | 262 + doc/html/plugins.html | 59 + doc/html/popup-example.html | 247 + doc/html/porting.html | 803 ++ doc/html/porting2.html | 965 ++ doc/html/prev.png | Bin 0 -> 412 bytes doc/html/prevunfinished.png | Bin 0 -> 449 bytes doc/html/primes.html | 169 + doc/html/process-example.html | 148 + doc/html/progress-example.html | 390 + doc/html/progressbar-example.html | 289 + doc/html/properties.html | 221 + doc/html/propertydocs | 5312 +++++++++ doc/html/propertyindex | 425 + doc/html/qaccel-h.html | 155 + doc/html/qaccel-members.html | 110 + doc/html/qaccel.html | 337 + doc/html/qaccessible-h.html | 340 + doc/html/qaccessible-members.html | 49 + doc/html/qaccessible.html | 291 + doc/html/qaccessibleinterface-members.html | 65 + doc/html/qaccessibleinterface.html | 233 + doc/html/qaccessibleobject-members.html | 110 + doc/html/qaccessibleobject.html | 86 + doc/html/qaction-application-example.html | 438 + doc/html/qaction-examples.html | 49 + doc/html/qaction-h.html | 263 + doc/html/qaction-members.html | 120 + doc/html/qaction.html | 520 + doc/html/qactiongroup-members.html | 128 + doc/html/qactiongroup.html | 219 + doc/html/qactiongroup_menu.png | Bin 0 -> 1227 bytes doc/html/qactiongroup_menu_subwidget.png | Bin 0 -> 1781 bytes doc/html/qactiongroup_toolbar.png | Bin 0 -> 2004 bytes .../qactiongroup_toolbar_exclusive_subwidget.png | Bin 0 -> 2170 bytes ...qactiongroup_toolbar_nonexclusive_subwidget.png | Bin 0 -> 2622 bytes doc/html/qapplication-h.html | 576 + doc/html/qapplication-members.html | 196 + doc/html/qapplication.html | 2046 ++++ doc/html/qarray.html | 47 + doc/html/qasciicache-h.html | 170 + doc/html/qasciicache-members.html | 64 + doc/html/qasciicache.html | 252 + doc/html/qasciicacheiterator-members.html | 62 + doc/html/qasciicacheiterator.html | 211 + doc/html/qasciidict-h.html | 168 + doc/html/qasciidict-members.html | 67 + doc/html/qasciidict.html | 325 + doc/html/qasciidictiterator-members.html | 57 + doc/html/qasciidictiterator.html | 179 + doc/html/qassistantclient-h.html | 124 + doc/html/qassistantclient-members.html | 98 + doc/html/qassistantclient.html | 179 + doc/html/qasyncimageio-h.html | 156 + doc/html/qasyncio-h.html | 165 + doc/html/qasyncio-members.html | 49 + doc/html/qasyncio.html | 83 + doc/html/qaxaggregated-members.html | 50 + doc/html/qaxaggregated.html | 155 + doc/html/qaxbase-h.html | 209 + doc/html/qaxbase-members.html | 71 + doc/html/qaxbase.html | 658 ++ doc/html/qaxbindable-h.html | 133 + doc/html/qaxbindable-members.html | 53 + doc/html/qaxbindable.html | 169 + doc/html/qaxcontainer-example-qutlook.html | 243 + doc/html/qaxcontainer-example-webbrowser.html | 128 + doc/html/qaxcontainer-examples.html | 51 + doc/html/qaxcontainer.html | 188 + doc/html/qaxfactory-h.html | 327 + doc/html/qaxfactory-members.html | 70 + doc/html/qaxfactory.html | 424 + doc/html/qaxobject-h.html | 104 + doc/html/qaxobject-members.html | 113 + doc/html/qaxobject.html | 205 + doc/html/qaxscript-h.html | 261 + doc/html/qaxscript-members.html | 100 + doc/html/qaxscript.html | 199 + doc/html/qaxscriptengine-members.html | 119 + doc/html/qaxscriptengine.html | 146 + doc/html/qaxscriptmanager-members.html | 99 + doc/html/qaxscriptmanager.html | 230 + doc/html/qaxserver-demo-hierarchy.html | 82 + doc/html/qaxserver-demo-menus.html | 50 + doc/html/qaxserver-demo-multiple.html | 79 + doc/html/qaxserver-demo-opengl.html | 68 + doc/html/qaxserver-demo-simple.html | 80 + doc/html/qaxserver-demo-tetrax.html | 62 + doc/html/qaxserver-demo-wrapper.html | 92 + doc/html/qaxserver-example-hierarchy.html | 262 + doc/html/qaxserver-example-menus.html | 59 + doc/html/qaxserver-example-multiple.html | 201 + doc/html/qaxserver-example-opengl.html | 206 + doc/html/qaxserver-example-simple.html | 182 + doc/html/qaxserver-example-tetrax.html | 124 + doc/html/qaxserver-example-wrapper.html | 207 + doc/html/qaxserver-examples.html | 58 + doc/html/qaxserver.html | 1073 ++ doc/html/qaxwidget-h.html | 121 + doc/html/qaxwidget-members.html | 363 + doc/html/qaxwidget.html | 250 + doc/html/qbig5codec-h.html | 134 + doc/html/qbig5codec-members.html | 71 + doc/html/qbig5codec.html | 101 + doc/html/qbig5hkscscodec-members.html | 71 + doc/html/qbig5hkscscodec.html | 104 + doc/html/qbitarray-h.html | 214 + doc/html/qbitarray-members.html | 82 + doc/html/qbitarray.html | 350 + doc/html/qbitmap-h.html | 118 + doc/html/qbitmap-members.html | 107 + doc/html/qbitmap.html | 186 + doc/html/qbitval-members.html | 49 + doc/html/qbitval.html | 90 + doc/html/qboxlayout-members.html | 144 + doc/html/qboxlayout.html | 367 + doc/html/qbrush-h.html | 139 + doc/html/qbrush-members.html | 57 + doc/html/qbrush.html | 239 + doc/html/qbttngrp-m.png | Bin 0 -> 542 bytes doc/html/qbttngrp-w.png | Bin 0 -> 491 bytes doc/html/qbuffer-h.html | 148 + doc/html/qbuffer-members.html | 87 + doc/html/qbuffer.html | 148 + doc/html/qbutton-h.html | 279 + doc/html/qbutton-members.html | 370 + doc/html/qbutton.html | 477 + doc/html/qbuttongroup-h.html | 166 + doc/html/qbuttongroup-h.png | Bin 0 -> 1682 bytes doc/html/qbuttongroup-members.html | 392 + doc/html/qbuttongroup-v.png | Bin 0 -> 1644 bytes doc/html/qbuttongroup.html | 264 + doc/html/qbytearray-members.html | 74 + doc/html/qbytearray.html | 119 + doc/html/qcache-h.html | 166 + doc/html/qcache-members.html | 64 + doc/html/qcache.html | 279 + doc/html/qcacheiterator-members.html | 62 + doc/html/qcacheiterator.html | 211 + doc/html/qcanvas-h.html | 861 ++ doc/html/qcanvas-members.html | 124 + doc/html/qcanvas.html | 588 + doc/html/qcanvas.png | Bin 0 -> 53919 bytes doc/html/qcanvasellipse-members.html | 104 + doc/html/qcanvasellipse.html | 169 + doc/html/qcanvasellipse.png | Bin 0 -> 2657 bytes doc/html/qcanvasitem-members.html | 87 + doc/html/qcanvasitem.html | 480 + doc/html/qcanvasitemlist-members.html | 80 + doc/html/qcanvasitemlist.html | 72 + doc/html/qcanvasline-members.html | 101 + doc/html/qcanvasline.html | 109 + doc/html/qcanvaspixmap-members.html | 111 + doc/html/qcanvaspixmap.html | 128 + doc/html/qcanvaspixmaparray-members.html | 55 + doc/html/qcanvaspixmaparray.html | 192 + doc/html/qcanvaspolygon-members.html | 100 + doc/html/qcanvaspolygon.html | 126 + doc/html/qcanvaspolygonalitem-members.html | 98 + doc/html/qcanvaspolygonalitem.html | 235 + doc/html/qcanvasrectangle-members.html | 104 + doc/html/qcanvasrectangle.html | 147 + doc/html/qcanvasspline-members.html | 103 + doc/html/qcanvasspline.html | 121 + doc/html/qcanvassprite-members.html | 100 + doc/html/qcanvassprite.html | 303 + doc/html/qcanvastext-members.html | 95 + doc/html/qcanvastext.html | 169 + doc/html/qcanvasview-members.html | 429 + doc/html/qcanvasview.html | 190 + doc/html/qcdestyle-h.html | 131 + doc/html/qcdestyle-members.html | 113 + doc/html/qcdestyle.html | 83 + doc/html/qchar-members.html | 74 + doc/html/qchar.html | 599 + doc/html/qcharref-members.html | 46 + doc/html/qcharref.html | 64 + doc/html/qcheckbox-h.html | 141 + doc/html/qcheckbox-members.html | 374 + doc/html/qcheckbox.html | 302 + doc/html/qchecklistitem-members.html | 120 + doc/html/qchecklistitem.html | 256 + doc/html/qchecktableitem-members.html | 75 + doc/html/qchecktableitem.html | 113 + doc/html/qchildevent-members.html | 52 + doc/html/qchildevent.html | 98 + doc/html/qchkbox-m.png | Bin 0 -> 313 bytes doc/html/qchkbox-w.png | Bin 0 -> 328 bytes doc/html/qclipboard-h.html | 179 + doc/html/qclipboard-members.html | 104 + doc/html/qclipboard.html | 447 + doc/html/qcloseevent-members.html | 52 + doc/html/qcloseevent.html | 134 + doc/html/qcollection.html | 47 + doc/html/qcolor-h.html | 274 + doc/html/qcolor-members.html | 75 + doc/html/qcolor.html | 618 ++ doc/html/qcolordialog-h.html | 138 + doc/html/qcolordialog-members.html | 356 + doc/html/qcolordialog.html | 118 + doc/html/qcolordlg-w.png | Bin 0 -> 21310 bytes doc/html/qcolordrag-members.html | 106 + doc/html/qcolordrag.html | 98 + doc/html/qcolorgroup-members.html | 71 + doc/html/qcolorgroup.html | 346 + doc/html/qcombo1-m.png | Bin 0 -> 229 bytes doc/html/qcombo1-w.png | Bin 0 -> 271 bytes doc/html/qcombo2-m.png | Bin 0 -> 268 bytes doc/html/qcombo3-m.png | Bin 0 -> 250 bytes doc/html/qcombobox-h.html | 251 + doc/html/qcombobox-members.html | 378 + doc/html/qcombobox.html | 602 + doc/html/qcombotableitem-members.html | 81 + doc/html/qcombotableitem.html | 179 + doc/html/qcommonstyle-h.html | 182 + doc/html/qcommonstyle-members.html | 110 + doc/html/qcommonstyle.html | 70 + doc/html/qconststring-members.html | 49 + doc/html/qconststring.html | 91 + doc/html/qcontextmenuevent-members.html | 62 + doc/html/qcontextmenuevent.html | 223 + doc/html/qcopchannel-members.html | 95 + doc/html/qcopchannel.html | 178 + doc/html/qcopchannel_qws-h.html | 133 + doc/html/qcstring-h.html | 437 + doc/html/qcstring-members.html | 102 + doc/html/qcstring.html | 1105 ++ doc/html/qcursor-h.html | 198 + doc/html/qcursor-members.html | 59 + doc/html/qcursor.html | 287 + doc/html/qcustomevent-members.html | 51 + doc/html/qcustomevent.html | 136 + doc/html/qcustommenuitem-members.html | 53 + doc/html/qcustommenuitem.html | 137 + doc/html/qd-actioneditor.png | Bin 0 -> 10233 bytes doc/html/qd-colortool-name.png | Bin 0 -> 2541 bytes doc/html/qd-databrowserwzd.png | Bin 0 -> 19944 bytes doc/html/qd-databrowserwzdpage2.png | Bin 0 -> 32502 bytes doc/html/qd-databrowserwzdpage3.png | Bin 0 -> 22592 bytes doc/html/qd-databrowserwzdpage4.png | Bin 0 -> 32069 bytes doc/html/qd-databrowserwzdpage5.png | Bin 0 -> 22517 bytes doc/html/qd-databrowserwzdpage6.png | Bin 0 -> 18330 bytes doc/html/qd-datatablewzd.png | Bin 0 -> 19897 bytes doc/html/qd-datatablewzdpage2.png | Bin 0 -> 32526 bytes doc/html/qd-datatablewzdpage3.png | Bin 0 -> 18091 bytes doc/html/qd-datatablewzdpage4.png | Bin 0 -> 32049 bytes doc/html/qd-datatablewzdpage5.png | Bin 0 -> 18307 bytes doc/html/qd-dataviewwzd.png | Bin 0 -> 19887 bytes doc/html/qd-dataviewwzdpage2.png | Bin 0 -> 32462 bytes doc/html/qd-dataviewwzdpage3.png | Bin 0 -> 22276 bytes doc/html/qd-dataviewwzdpage4.png | Bin 0 -> 17980 bytes doc/html/qd-helptoolbuttons3.png | Bin 0 -> 251 bytes doc/html/qd-mainwinwzd.png | Bin 0 -> 18166 bytes doc/html/qd-mainwinwzdpage2.png | Bin 0 -> 29041 bytes doc/html/qd-preface.png | Bin 0 -> 153599 bytes doc/html/qd-preferences-dlg.png | Bin 0 -> 9264 bytes doc/html/qdatabrowser-h.html | 221 + doc/html/qdatabrowser-members.html | 394 + doc/html/qdatabrowser.html | 715 ++ doc/html/qdatapump-members.html | 89 + doc/html/qdatapump.html | 74 + doc/html/qdatasink-members.html | 52 + doc/html/qdatasink.html | 93 + doc/html/qdatasource-members.html | 54 + doc/html/qdatasource.html | 120 + doc/html/qdatastream-h.html | 238 + doc/html/qdatastream-members.html | 65 + doc/html/qdatastream.html | 570 + doc/html/qdatatable-h.html | 288 + doc/html/qdatatable-members.html | 604 ++ doc/html/qdatatable.html | 809 ++ doc/html/qdataview-h.html | 134 + doc/html/qdataview-members.html | 346 + doc/html/qdataview.html | 151 + doc/html/qdate-members.html | 78 + doc/html/qdate.html | 459 + doc/html/qdateedit-members.html | 358 + doc/html/qdateedit.html | 296 + doc/html/qdatetime-h.html | 298 + doc/html/qdatetime-members.html | 70 + doc/html/qdatetime.html | 393 + doc/html/qdatetimeedit-h.html | 338 + doc/html/qdatetimeedit-members.html | 345 + doc/html/qdatetimeedit.html | 169 + doc/html/qdatetimeeditbase-members.html | 336 + doc/html/qdatetimeeditbase.html | 57 + doc/html/qdeepcopy-h.html | 125 + doc/html/qdeepcopy-members.html | 49 + doc/html/qdeepcopy.html | 168 + doc/html/qdesktopwidget-h.html | 146 + doc/html/qdesktopwidget-members.html | 346 + doc/html/qdesktopwidget.html | 202 + doc/html/qdesktopwidget.png | Bin 0 -> 8670 bytes doc/html/qdial-h.html | 198 + doc/html/qdial-m.png | Bin 0 -> 450 bytes doc/html/qdial-members.html | 376 + doc/html/qdial-w.png | Bin 0 -> 482 bytes doc/html/qdial.html | 352 + doc/html/qdialog-h.html | 186 + doc/html/qdialog-members.html | 352 + doc/html/qdialog.html | 355 + doc/html/qdict-h.html | 168 + doc/html/qdict-members.html | 67 + doc/html/qdict.html | 399 + doc/html/qdictiterator-members.html | 56 + doc/html/qdictiterator.html | 172 + doc/html/qdir-example.html | 409 + doc/html/qdir-h.html | 295 + doc/html/qdir-members.html | 96 + doc/html/qdir.html | 818 ++ doc/html/qdirectpainter-members.html | 141 + doc/html/qdirectpainter.html | 201 + doc/html/qdirectpainter_qws-h.html | 125 + doc/html/qdns-h.html | 215 + doc/html/qdns-members.html | 103 + doc/html/qdns.html | 334 + doc/html/qdockarea-h.html | 236 + doc/html/qdockarea-members.html | 349 + doc/html/qdockarea.html | 278 + doc/html/qdockwindow-h.html | 282 + doc/html/qdockwindow-members.html | 393 + doc/html/qdockwindow.html | 509 + doc/html/qdockwindow.png | Bin 0 -> 1212 bytes doc/html/qdom-h.html | 722 ++ doc/html/qdomattr-members.html | 112 + doc/html/qdomattr.html | 165 + doc/html/qdomcdatasection-members.html | 116 + doc/html/qdomcdatasection.html | 116 + doc/html/qdomcharacterdata-members.html | 115 + doc/html/qdomcharacterdata.html | 160 + doc/html/qdomcomment-members.html | 115 + doc/html/qdomcomment.html | 114 + doc/html/qdomdocument-members.html | 127 + doc/html/qdomdocument.html | 504 + doc/html/qdomdocumentfragment-members.html | 107 + doc/html/qdomdocumentfragment.html | 117 + doc/html/qdomdocumenttype-members.html | 113 + doc/html/qdomdocumenttype.html | 150 + doc/html/qdomelement-members.html | 125 + doc/html/qdomelement.html | 350 + doc/html/qdomentity-members.html | 110 + doc/html/qdomentity.html | 138 + doc/html/qdomentityreference-members.html | 107 + doc/html/qdomentityreference.html | 125 + doc/html/qdomimplementation-members.html | 55 + doc/html/qdomimplementation.html | 149 + doc/html/qdomnamednodemap-members.html | 61 + doc/html/qdomnamednodemap.html | 200 + doc/html/qdomnode-members.html | 107 + doc/html/qdomnode.html | 741 ++ doc/html/qdomnodelist-members.html | 54 + doc/html/qdomnodelist.html | 127 + doc/html/qdomnotation-members.html | 109 + doc/html/qdomnotation.html | 126 + doc/html/qdomprocessinginstruction-members.html | 110 + doc/html/qdomprocessinginstruction.html | 134 + doc/html/qdomtext-members.html | 116 + doc/html/qdomtext.html | 122 + doc/html/qdoublevalidator-members.html | 99 + doc/html/qdoublevalidator.html | 151 + doc/html/qdragenterevent-members.html | 65 + doc/html/qdragenterevent.html | 73 + doc/html/qdragleaveevent-members.html | 49 + doc/html/qdragleaveevent.html | 72 + doc/html/qdragmoveevent-members.html | 65 + doc/html/qdragmoveevent.html | 105 + doc/html/qdragobject-h.html | 323 + doc/html/qdragobject-members.html | 103 + doc/html/qdragobject.html | 220 + doc/html/qdrawutil-h.html | 173 + doc/html/qdropevent-members.html | 64 + doc/html/qdropevent.html | 225 + doc/html/qdropsite-h.html | 104 + doc/html/qdropsite-members.html | 48 + doc/html/qdropsite.html | 75 + doc/html/qeditorfactory-h.html | 120 + doc/html/qeditorfactory-members.html | 93 + doc/html/qeditorfactory.html | 104 + doc/html/qembed.html | 100 + doc/html/qerrormessage-h.html | 134 + doc/html/qerrormessage-members.html | 354 + doc/html/qerrormessage.html | 105 + doc/html/qerrormessage.png | Bin 0 -> 2364 bytes doc/html/qeucjpcodec-h.html | 156 + doc/html/qeucjpcodec-members.html | 73 + doc/html/qeucjpcodec.html | 116 + doc/html/qeuckrcodec-h.html | 145 + doc/html/qeuckrcodec-members.html | 71 + doc/html/qeuckrcodec.html | 95 + doc/html/qevent-h.html | 662 ++ doc/html/qevent-members.html | 50 + doc/html/qevent.html | 193 + doc/html/qeventloop-h.html | 167 + doc/html/qeventloop-members.html | 106 + doc/html/qeventloop.html | 280 + doc/html/qfd-example.html | 295 + doc/html/qfile-h.html | 176 + doc/html/qfile-members.html | 96 + doc/html/qfile.html | 503 + doc/html/qfiledialog-h.html | 392 + doc/html/qfiledialog-members.html | 397 + doc/html/qfiledialog.html | 907 ++ doc/html/qfiledlg-m.png | Bin 0 -> 5450 bytes doc/html/qfiledlg-w.png | Bin 0 -> 5439 bytes doc/html/qfileiconprovider-members.html | 90 + doc/html/qfileiconprovider.html | 83 + doc/html/qfileinfo-h.html | 202 + doc/html/qfileinfo-members.html | 80 + doc/html/qfileinfo.html | 503 + doc/html/qfilepreview-members.html | 48 + doc/html/qfilepreview.html | 82 + doc/html/qfocusdata-h.html | 115 + doc/html/qfocusdata-members.html | 53 + doc/html/qfocusdata.html | 123 + doc/html/qfocusevent-members.html | 54 + doc/html/qfocusevent.html | 133 + doc/html/qfont-examples.html | 48 + doc/html/qfont-h.html | 417 + doc/html/qfont-members.html | 105 + doc/html/qfont.html | 922 ++ doc/html/qfontdatabase-h.html | 272 + doc/html/qfontdatabase-members.html | 63 + doc/html/qfontdatabase.html | 322 + doc/html/qfontdialog-h.html | 157 + doc/html/qfontdialog-members.html | 351 + doc/html/qfontdialog.html | 143 + doc/html/qfontdlg-w.png | Bin 0 -> 3982 bytes doc/html/qfontinfo-h.html | 136 + doc/html/qfontinfo-members.html | 59 + doc/html/qfontinfo.html | 191 + doc/html/qfontmanager-members.html | 51 + doc/html/qfontmanager.html | 100 + doc/html/qfontmanager_qws-h.html | 296 + doc/html/qfontmetrics-h.html | 162 + doc/html/qfontmetrics-members.html | 68 + doc/html/qfontmetrics.html | 419 + doc/html/qframe-h.html | 216 + doc/html/qframe-members.html | 356 + doc/html/qframe.html | 370 + doc/html/qftp-h.html | 247 + doc/html/qftp-members.html | 150 + doc/html/qftp.html | 693 ++ doc/html/qgb18030codec-h.html | 160 + doc/html/qgb18030codec-members.html | 71 + doc/html/qgb18030codec.html | 119 + doc/html/qgb2312codec-members.html | 71 + doc/html/qgb2312codec.html | 62 + doc/html/qgbkcodec-members.html | 71 + doc/html/qgbkcodec.html | 67 + doc/html/qgfx_qws-h.html | 493 + doc/html/qgfxdriverfactory-members.html | 48 + doc/html/qgfxdriverfactory.html | 78 + doc/html/qgfxdriverfactory_qws-h.html | 101 + doc/html/qgfxdriverplugin-members.html | 50 + doc/html/qgfxdriverplugin.html | 97 + doc/html/qgfxdriverplugin_qws-h.html | 115 + doc/html/qgl-h.html | 586 + doc/html/qgl-members.html | 46 + doc/html/qgl.html | 98 + doc/html/qglayoutiterator-members.html | 50 + doc/html/qglayoutiterator.html | 98 + doc/html/qglcolormap-h.html | 144 + doc/html/qglcolormap-members.html | 58 + doc/html/qglcolormap.html | 179 + doc/html/qglcontext-members.html | 71 + doc/html/qglcontext.html | 344 + doc/html/qglformat-members.html | 75 + doc/html/qglformat.html | 474 + doc/html/qglobal-h.html | 1178 ++ doc/html/qglwidget-members.html | 368 + doc/html/qglwidget.html | 583 + doc/html/qgrid-h.html | 122 + doc/html/qgrid-m.png | Bin 0 -> 308 bytes doc/html/qgrid-members.html | 357 + doc/html/qgrid.html | 89 + doc/html/qgridlayout-members.html | 152 + doc/html/qgridlayout.html | 424 + doc/html/qgridview-h.html | 184 + doc/html/qgridview-members.html | 443 + doc/html/qgridview.html | 261 + doc/html/qgroupbox-h.html | 210 + doc/html/qgroupbox-members.html | 378 + doc/html/qgroupbox.html | 330 + doc/html/qgroupboxes.png | Bin 0 -> 2058 bytes doc/html/qgrpbox-w.png | Bin 0 -> 252 bytes doc/html/qguardedptr-h.html | 189 + doc/html/qguardedptr-members.html | 55 + doc/html/qguardedptr.html | 194 + doc/html/qhbox-h.html | 121 + doc/html/qhbox-m.png | Bin 0 -> 308 bytes doc/html/qhbox-members.html | 358 + doc/html/qhbox.html | 105 + doc/html/qhboxlayout-members.html | 144 + doc/html/qhboxlayout.html | 115 + doc/html/qhboxlayout.png | Bin 0 -> 1004 bytes doc/html/qhbuttongroup-h.html | 113 + doc/html/qhbuttongroup-members.html | 393 + doc/html/qhbuttongroup.html | 89 + doc/html/qheader-h.html | 264 + doc/html/qheader-m.png | Bin 0 -> 346 bytes doc/html/qheader-members.html | 389 + doc/html/qheader-w.png | Bin 0 -> 380 bytes doc/html/qheader.html | 607 ++ doc/html/qhebrewcodec-members.html | 71 + doc/html/qhebrewcodec.html | 114 + doc/html/qhgroupbox-h.html | 112 + doc/html/qhgroupbox-members.html | 378 + doc/html/qhgroupbox.html | 87 + doc/html/qhideevent-members.html | 49 + doc/html/qhideevent.html | 74 + doc/html/qhostaddress-h.html | 146 + doc/html/qhostaddress-members.html | 59 + doc/html/qhostaddress.html | 200 + doc/html/qhttp-h.html | 322 + doc/html/qhttp-members.html | 146 + doc/html/qhttp.html | 593 + doc/html/qhttpheader-members.html | 64 + doc/html/qhttpheader.html | 221 + doc/html/qhttprequestheader-members.html | 66 + doc/html/qhttprequestheader.html | 157 + doc/html/qhttpresponseheader-members.html | 64 + doc/html/qhttpresponseheader.html | 106 + doc/html/qicondrag-members.html | 105 + doc/html/qicondrag.html | 124 + doc/html/qicondragevent-members.html | 52 + doc/html/qicondragevent.html | 99 + doc/html/qicondragitem-members.html | 50 + doc/html/qicondragitem.html | 91 + doc/html/qiconfactory-members.html | 53 + doc/html/qiconfactory.html | 112 + doc/html/qiconset-h.html | 177 + doc/html/qiconset-members.html | 59 + doc/html/qiconset.html | 328 + doc/html/qiconview-h.html | 559 + doc/html/qiconview-m.png | Bin 0 -> 2666 bytes doc/html/qiconview-members.html | 503 + doc/html/qiconview-w.png | Bin 0 -> 2702 bytes doc/html/qiconview.html | 1009 ++ doc/html/qiconviewitem-members.html | 98 + doc/html/qiconviewitem.html | 626 ++ doc/html/qimage-h.html | 470 + doc/html/qimage-members.html | 116 + doc/html/qimage.html | 1117 ++ doc/html/qimageconsumer-members.html | 52 + doc/html/qimageconsumer.html | 142 + doc/html/qimagedecoder-members.html | 55 + doc/html/qimagedecoder.html | 154 + doc/html/qimagedrag-members.html | 106 + doc/html/qimagedrag.html | 120 + doc/html/qimageformat-members.html | 47 + doc/html/qimageformat.html | 87 + doc/html/qimageformatplugin-h.html | 112 + doc/html/qimageformatplugin-members.html | 50 + doc/html/qimageformatplugin.html | 94 + doc/html/qimageformattype-members.html | 50 + doc/html/qimageformattype.html | 108 + doc/html/qimageio-members.html | 72 + doc/html/qimageio.html | 372 + doc/html/qimevent-members.html | 55 + doc/html/qimevent.html | 173 + doc/html/qinputdialog-h.html | 152 + doc/html/qinputdialog-members.html | 354 + doc/html/qinputdialog.html | 196 + doc/html/qintcache-h.html | 169 + doc/html/qintcache-members.html | 64 + doc/html/qintcache.html | 242 + doc/html/qintcacheiterator-members.html | 62 + doc/html/qintcacheiterator.html | 211 + doc/html/qintdict-h.html | 164 + doc/html/qintdict-members.html | 67 + doc/html/qintdict.html | 313 + doc/html/qintdictiterator-members.html | 57 + doc/html/qintdictiterator.html | 176 + doc/html/qintvalidator-members.html | 97 + doc/html/qintvalidator.html | 176 + doc/html/qiodevice-h.html | 209 + doc/html/qiodevice-members.html | 85 + doc/html/qiodevice.html | 553 + doc/html/qiodevicesource-members.html | 56 + doc/html/qiodevicesource.html | 108 + doc/html/qjiscodec-h.html | 156 + doc/html/qjiscodec-members.html | 71 + doc/html/qjiscodec.html | 132 + doc/html/qkbddriverfactory-members.html | 48 + doc/html/qkbddriverfactory.html | 79 + doc/html/qkbddriverfactory_qws-h.html | 101 + doc/html/qkbddriverplugin-members.html | 50 + doc/html/qkbddriverplugin.html | 96 + doc/html/qkbddriverplugin_qws-h.html | 115 + doc/html/qkeyboard_qws-h.html | 104 + doc/html/qkeyevent-members.html | 59 + doc/html/qkeyevent.html | 185 + doc/html/qkeysequence-h.html | 154 + doc/html/qkeysequence-members.html | 57 + doc/html/qkeysequence.html | 206 + doc/html/qlabel-h.html | 219 + doc/html/qlabel-m.png | Bin 0 -> 318 bytes doc/html/qlabel-members.html | 379 + doc/html/qlabel-w.png | Bin 0 -> 318 bytes doc/html/qlabel.html | 420 + doc/html/qlayout-h.html | 518 + doc/html/qlayout-members.html | 129 + doc/html/qlayout.html | 414 + doc/html/qlayoutitem-members.html | 64 + doc/html/qlayoutitem.html | 230 + doc/html/qlayoutiterator-members.html | 53 + doc/html/qlayoutiterator.html | 158 + doc/html/qlcdnum-m.png | Bin 0 -> 254 bytes doc/html/qlcdnum-w.png | Bin 0 -> 254 bytes doc/html/qlcdnumber-h.html | 191 + doc/html/qlcdnumber-members.html | 374 + doc/html/qlcdnumber.html | 332 + doc/html/qlibrary-h.html | 131 + doc/html/qlibrary-members.html | 55 + doc/html/qlibrary.html | 290 + doc/html/qlined-m.png | Bin 0 -> 192 bytes doc/html/qlined-w.png | Bin 0 -> 188 bytes doc/html/qlineedit-h.html | 276 + doc/html/qlineedit-members.html | 420 + doc/html/qlineedit.html | 773 ++ doc/html/qlist.html | 47 + doc/html/qlistbox-h.html | 480 + doc/html/qlistbox-m.png | Bin 0 -> 891 bytes doc/html/qlistbox-members.html | 509 + doc/html/qlistbox-w.png | Bin 0 -> 883 bytes doc/html/qlistbox.html | 1163 ++ doc/html/qlistboxitem-members.html | 65 + doc/html/qlistboxitem.html | 217 + doc/html/qlistboxpixmap-members.html | 65 + doc/html/qlistboxpixmap.html | 136 + doc/html/qlistboxtext-members.html | 65 + doc/html/qlistboxtext.html | 109 + doc/html/qlistiterator.html | 48 + doc/html/qlistview-h.html | 650 ++ doc/html/qlistview-m.png | Bin 0 -> 2882 bytes doc/html/qlistview-members.html | 512 + doc/html/qlistview-w.png | Bin 0 -> 2927 bytes doc/html/qlistview.html | 1231 +++ doc/html/qlistviewitem-members.html | 111 + doc/html/qlistviewitem.html | 809 ++ doc/html/qlistviewitemiterator-members.html | 55 + doc/html/qlistviewitemiterator.html | 226 + doc/html/qlistviewitems.png | Bin 0 -> 8523 bytes doc/html/qlocale-h.html | 539 + doc/html/qlocale-members.html | 67 + doc/html/qlocale.html | 852 ++ doc/html/qlocalfs-h.html | 120 + doc/html/qlocalfs-members.html | 118 + doc/html/qlocalfs.html | 82 + doc/html/qmacmime-members.html | 59 + doc/html/qmacmime.html | 181 + doc/html/qmacstyle-members.html | 115 + doc/html/qmacstyle.html | 160 + doc/html/qmacstyle_mac-h.html | 194 + doc/html/qmag-example.html | 446 + doc/html/qmainwindow-h.html | 306 + doc/html/qmainwindow-m.png | Bin 0 -> 1221 bytes doc/html/qmainwindow-members.html | 388 + doc/html/qmainwindow-qdockareas.png | Bin 0 -> 5353 bytes doc/html/qmainwindow-w.png | Bin 0 -> 1190 bytes doc/html/qmainwindow.html | 956 ++ doc/html/qmake-manual-1.html | 46 + doc/html/qmake-manual-2.html | 55 + doc/html/qmake-manual-3.html | 94 + doc/html/qmake-manual-4.html | 174 + doc/html/qmake-manual-5.html | 115 + doc/html/qmake-manual-6.html | 242 + doc/html/qmake-manual-7.html | 206 + doc/html/qmake-manual-8.html | 732 ++ doc/html/qmake-manual.html | 49 + doc/html/qmake.dcf | 11 + doc/html/qmap-h.html | 921 ++ doc/html/qmap-members.html | 68 + doc/html/qmap.html | 574 + doc/html/qmapconstiterator-members.html | 54 + doc/html/qmapconstiterator.html | 173 + doc/html/qmapiterator-members.html | 54 + doc/html/qmapiterator.html | 196 + doc/html/qmemarray-h.html | 166 + doc/html/qmemarray-members.html | 75 + doc/html/qmemarray.html | 561 + doc/html/qmenubar-h.html | 250 + doc/html/qmenubar-m.png | Bin 0 -> 303 bytes doc/html/qmenubar-members.html | 398 + doc/html/qmenubar-w.png | Bin 0 -> 251 bytes doc/html/qmenubar.html | 593 + doc/html/qmenudata-h.html | 331 + doc/html/qmenudata-members.html | 83 + doc/html/qmenudata.html | 706 ++ doc/html/qmessagebox-crit.png | Bin 0 -> 348 bytes doc/html/qmessagebox-h.html | 268 + doc/html/qmessagebox-info.png | Bin 0 -> 356 bytes doc/html/qmessagebox-members.html | 369 + doc/html/qmessagebox-quest.png | Bin 0 -> 363 bytes doc/html/qmessagebox-warn.png | Bin 0 -> 332 bytes doc/html/qmessagebox.html | 751 ++ doc/html/qmetaobject-h.html | 331 + doc/html/qmetaobject-members.html | 60 + doc/html/qmetaobject.html | 187 + doc/html/qmetaproperty-members.html | 60 + doc/html/qmetaproperty.html | 173 + doc/html/qmime-h.html | 245 + doc/html/qmimesource-members.html | 52 + doc/html/qmimesource.html | 109 + doc/html/qmimesourcefactory-members.html | 63 + doc/html/qmimesourcefactory.html | 277 + doc/html/qmlined-m.png | Bin 0 -> 1117 bytes doc/html/qmlined-w.png | Bin 0 -> 1090 bytes doc/html/qmotif-h.html | 112 + doc/html/qmotif-members.html | 108 + doc/html/qmotif.html | 115 + doc/html/qmotifdialog-h.html | 153 + doc/html/qmotifdialog-members.html | 356 + doc/html/qmotifdialog.html | 205 + doc/html/qmotifplusstyle-h.html | 169 + doc/html/qmotifplusstyle-members.html | 112 + doc/html/qmotifplusstyle.html | 71 + doc/html/qmotifstyle-h.html | 181 + doc/html/qmotifstyle-members.html | 112 + doc/html/qmotifstyle.html | 93 + doc/html/qmotifwidget-h.html | 115 + doc/html/qmotifwidget-members.html | 339 + doc/html/qmotifwidget.html | 115 + doc/html/qmouse_qws-h.html | 146 + doc/html/qmousedriverfactory-members.html | 48 + doc/html/qmousedriverfactory.html | 79 + doc/html/qmousedriverfactory_qws-h.html | 101 + doc/html/qmousedriverplugin-members.html | 50 + doc/html/qmousedriverplugin.html | 97 + doc/html/qmousedriverplugin_qws-h.html | 115 + doc/html/qmouseevent-members.html | 61 + doc/html/qmouseevent.html | 233 + doc/html/qmoveevent-members.html | 51 + doc/html/qmoveevent.html | 82 + doc/html/qmovie-h.html | 165 + doc/html/qmovie-members.html | 74 + doc/html/qmovie.html | 388 + doc/html/qmovie.png | Bin 0 -> 2401 bytes doc/html/qmsgbox-m.png | Bin 0 -> 1337 bytes doc/html/qmsgbox-w.png | Bin 0 -> 1282 bytes doc/html/qmultilineedit-h.html | 186 + doc/html/qmultilineedit-members.html | 578 + doc/html/qmultilineedit.html | 343 + doc/html/qmutex-h.html | 159 + doc/html/qmutex-members.html | 52 + doc/html/qmutex.html | 195 + doc/html/qmutexlocker-members.html | 49 + doc/html/qmutexlocker.html | 220 + doc/html/qnamespace-h.html | 965 ++ doc/html/qnetwork-h.html | 42 + doc/html/qnetworkoperation-members.html | 102 + doc/html/qnetworkoperation.html | 169 + doc/html/qnetworkprotocol-h.html | 289 + doc/html/qnetworkprotocol-members.html | 119 + doc/html/qnetworkprotocol.html | 532 + doc/html/qnp-h.html | 231 + doc/html/qnpinstance-members.html | 112 + doc/html/qnpinstance.html | 321 + doc/html/qnplugin-members.html | 58 + doc/html/qnplugin.html | 181 + doc/html/qnpstream-members.html | 58 + doc/html/qnpstream.html | 130 + doc/html/qnpwidget-members.html | 341 + doc/html/qnpwidget.html | 127 + doc/html/qobject-h.html | 307 + doc/html/qobject-members.html | 90 + doc/html/qobject.html | 958 ++ doc/html/qobjectcleanuphandler-h.html | 113 + doc/html/qobjectcleanuphandler-members.html | 94 + doc/html/qobjectcleanuphandler.html | 139 + doc/html/qobjectlist-h.html | 137 + doc/html/qobjectlist-members.html | 90 + doc/html/qobjectlist.html | 96 + doc/html/qobjectlistiterator-members.html | 62 + doc/html/qobjectlistiterator.html | 79 + doc/html/qpaintdevice-h.html | 466 + doc/html/qpaintdevice-members.html | 73 + doc/html/qpaintdevice.html | 464 + doc/html/qpaintdevicemetrics-h.html | 128 + doc/html/qpaintdevicemetrics-members.html | 55 + doc/html/qpaintdevicemetrics.html | 150 + doc/html/qpainter-h.html | 766 ++ doc/html/qpainter-members.html | 127 + doc/html/qpainter.html | 1626 +++ doc/html/qpaintevent-members.html | 52 + doc/html/qpaintevent.html | 119 + doc/html/qpair-h.html | 153 + doc/html/qpair-members.html | 47 + doc/html/qpair.html | 126 + doc/html/qpalette-h.html | 234 + doc/html/qpalette-members.html | 66 + doc/html/qpalette.html | 308 + doc/html/qpen-h.html | 147 + doc/html/qpen-members.html | 61 + doc/html/qpen.html | 287 + doc/html/qpicture-h.html | 172 + doc/html/qpicture-members.html | 86 + doc/html/qpicture.html | 270 + doc/html/qpixmap-h.html | 399 + doc/html/qpixmap-members.html | 108 + doc/html/qpixmap.html | 825 ++ doc/html/qpixmapcache-h.html | 108 + doc/html/qpixmapcache-members.html | 52 + doc/html/qpixmapcache.html | 191 + doc/html/qplatinumstyle-h.html | 162 + doc/html/qplatinumstyle-members.html | 112 + doc/html/qplatinumstyle.html | 84 + doc/html/qpngimagepacker-members.html | 49 + doc/html/qpngimagepacker.html | 88 + doc/html/qpngio-h.html | 152 + doc/html/qpoint-h.html | 264 + doc/html/qpoint-members.html | 59 + doc/html/qpoint.html | 378 + doc/html/qpointarray-h.html | 163 + doc/html/qpointarray-members.html | 83 + doc/html/qpointarray.html | 285 + doc/html/qpopmenu-fancy.png | Bin 0 -> 765 bytes doc/html/qpopmenu-m.png | Bin 0 -> 383 bytes doc/html/qpopmenu-w.png | Bin 0 -> 447 bytes doc/html/qpopupmenu-h.html | 245 + doc/html/qpopupmenu-members.html | 405 + doc/html/qpopupmenu.html | 830 ++ doc/html/qprintdlg-m.png | Bin 0 -> 5058 bytes doc/html/qprinter-h.html | 329 + doc/html/qprinter-members.html | 121 + doc/html/qprinter.html | 758 ++ doc/html/qprocess-examples.html | 48 + doc/html/qprocess-h.html | 223 + doc/html/qprocess-members.html | 119 + doc/html/qprocess.html | 633 ++ doc/html/qprogbar-m.png | Bin 0 -> 198 bytes doc/html/qprogbar-w.png | Bin 0 -> 200 bytes doc/html/qprogdlg-m.png | Bin 0 -> 890 bytes doc/html/qprogdlg-w.png | Bin 0 -> 898 bytes doc/html/qprogressbar-h.html | 194 + doc/html/qprogressbar-members.html | 369 + doc/html/qprogressbar.html | 224 + doc/html/qprogressdialog-h.html | 186 + doc/html/qprogressdialog-members.html | 375 + doc/html/qprogressdialog.html | 409 + doc/html/qptrcollection-h.html | 124 + doc/html/qptrcollection-members.html | 54 + doc/html/qptrcollection.html | 177 + doc/html/qptrdict-h.html | 163 + doc/html/qptrdict-members.html | 67 + doc/html/qptrdict.html | 316 + doc/html/qptrdictiterator-members.html | 57 + doc/html/qptrdictiterator.html | 181 + doc/html/qptrlist-h.html | 240 + doc/html/qptrlist-members.html | 90 + doc/html/qptrlist.html | 741 ++ doc/html/qptrlistiterator-members.html | 63 + doc/html/qptrlistiterator.html | 234 + doc/html/qptrqueue-h.html | 139 + doc/html/qptrqueue-members.html | 62 + doc/html/qptrqueue.html | 216 + doc/html/qptrstack-h.html | 139 + doc/html/qptrstack-members.html | 62 + doc/html/qptrstack.html | 201 + doc/html/qptrvector-h.html | 163 + doc/html/qptrvector-members.html | 76 + doc/html/qptrvector.html | 393 + doc/html/qpushbt-m.png | Bin 0 -> 221 bytes doc/html/qpushbt-w.png | Bin 0 -> 250 bytes doc/html/qpushbutton-h.html | 194 + doc/html/qpushbutton-members.html | 382 + doc/html/qpushbutton.html | 470 + doc/html/qqueue.html | 47 + doc/html/qradiobt-m.png | Bin 0 -> 391 bytes doc/html/qradiobt-w.png | Bin 0 -> 340 bytes doc/html/qradiobutton-h.html | 136 + doc/html/qradiobutton-members.html | 371 + doc/html/qradiobutton.html | 278 + doc/html/qrangecontrol-h.html | 239 + doc/html/qrangecontrol-members.html | 70 + doc/html/qrangecontrol.html | 336 + doc/html/qrect-h.html | 321 + doc/html/qrect-members.html | 105 + doc/html/qrect.html | 645 ++ doc/html/qregexp-h.html | 165 + doc/html/qregexp-members.html | 72 + doc/html/qregexp.html | 1037 ++ doc/html/qregexpvalidator-members.html | 94 + doc/html/qregexpvalidator.html | 161 + doc/html/qregion-h.html | 222 + doc/html/qregion-members.html | 72 + doc/html/qregion.html | 364 + doc/html/qresizeevent-members.html | 51 + doc/html/qresizeevent.html | 82 + doc/html/qrtlcodec-h.html | 112 + doc/html/qs-addwidg.png | Bin 0 -> 6529 bytes doc/html/qs-editconn1.png | Bin 0 -> 20594 bytes doc/html/qs-editconn2.png | Bin 0 -> 31271 bytes doc/html/qs-editfunc.png | Bin 0 -> 20499 bytes doc/html/qs-editlistbox1.png | Bin 0 -> 13690 bytes doc/html/qs-laygrid.png | Bin 0 -> 8531 bytes doc/html/qs-layhoriz.png | Bin 0 -> 8673 bytes doc/html/qs-layvert.png | Bin 0 -> 8305 bytes doc/html/qs-newdlg.png | Bin 0 -> 2009 bytes doc/html/qs-projset.png | Bin 0 -> 11923 bytes doc/html/qs-pushbutt.png | Bin 0 -> 7364 bytes doc/html/qs-spacers.png | Bin 0 -> 7454 bytes doc/html/qs-taborder.png | Bin 0 -> 8270 bytes doc/html/qs-txtlbl.png | Bin 0 -> 5734 bytes doc/html/qscrbar-m.png | Bin 0 -> 245 bytes doc/html/qscrbar-w.png | Bin 0 -> 230 bytes doc/html/qscreen-members.html | 88 + doc/html/qscreen.html | 440 + doc/html/qscrollbar-h.html | 242 + doc/html/qscrollbar-members.html | 377 + doc/html/qscrollbar.html | 382 + doc/html/qscrollview-cl.png | Bin 0 -> 9722 bytes doc/html/qscrollview-h.html | 314 + doc/html/qscrollview-m.png | Bin 0 -> 420 bytes doc/html/qscrollview-members.html | 424 + doc/html/qscrollview-vp.png | Bin 0 -> 6975 bytes doc/html/qscrollview-vp2.png | Bin 0 -> 8551 bytes doc/html/qscrollview-w.png | Bin 0 -> 411 bytes doc/html/qscrollview.html | 930 ++ doc/html/qsemaphore-h.html | 126 + doc/html/qsemaphore-members.html | 55 + doc/html/qsemaphore.html | 149 + doc/html/qserversocket-h.html | 139 + doc/html/qserversocket-members.html | 97 + doc/html/qserversocket.html | 173 + doc/html/qsessionmanager-h.html | 144 + doc/html/qsessionmanager-members.html | 104 + doc/html/qsessionmanager.html | 346 + doc/html/qsettings-h.html | 204 + doc/html/qsettings-members.html | 64 + doc/html/qsettings.html | 626 ++ doc/html/qsgistyle-h.html | 178 + doc/html/qsgistyle-members.html | 113 + doc/html/qsgistyle.html | 77 + doc/html/qshowevent-members.html | 49 + doc/html/qshowevent.html | 72 + doc/html/qsignal-h.html | 139 + doc/html/qsignal-members.html | 97 + doc/html/qsignal.html | 182 + doc/html/qsignalmapper-h.html | 123 + doc/html/qsignalmapper-members.html | 94 + doc/html/qsignalmapper.html | 124 + doc/html/qsimplerichtext-h.html | 149 + doc/html/qsimplerichtext-members.html | 58 + doc/html/qsimplerichtext.html | 223 + doc/html/qsize-h.html | 282 + doc/html/qsize-members.html | 64 + doc/html/qsize.html | 378 + doc/html/qsizegrip-h.html | 119 + doc/html/qsizegrip-m.png | Bin 0 -> 141 bytes doc/html/qsizegrip-members.html | 338 + doc/html/qsizegrip-w.png | Bin 0 -> 141 bytes doc/html/qsizegrip.html | 112 + doc/html/qsizepolicy-h.html | 173 + doc/html/qsizepolicy-members.html | 65 + doc/html/qsizepolicy.html | 291 + doc/html/qsjiscodec-h.html | 156 + doc/html/qsjiscodec-members.html | 73 + doc/html/qsjiscodec.html | 113 + doc/html/qslider-h.html | 244 + doc/html/qslider-m.png | Bin 0 -> 193 bytes doc/html/qslider-members.html | 378 + doc/html/qslider-w.png | Bin 0 -> 224 bytes doc/html/qslider.html | 368 + doc/html/qsmetric.png | Bin 0 -> 10415 bytes doc/html/qsocket-h.html | 201 + doc/html/qsocket-members.html | 151 + doc/html/qsocket.html | 500 + doc/html/qsocketdevice-h.html | 215 + doc/html/qsocketdevice-members.html | 110 + doc/html/qsocketdevice.html | 419 + doc/html/qsocketnotifier-h.html | 138 + doc/html/qsocketnotifier-members.html | 95 + doc/html/qsocketnotifier.html | 183 + doc/html/qsortedlist-h.html | 108 + doc/html/qsortedlist-members.html | 90 + doc/html/qsortedlist.html | 95 + doc/html/qsound-h.html | 170 + doc/html/qsound-members.html | 99 + doc/html/qsound.html | 180 + doc/html/qspaceritem-members.html | 64 + doc/html/qspaceritem.html | 119 + doc/html/qspinbox-h.html | 217 + doc/html/qspinbox-m.png | Bin 0 -> 244 bytes doc/html/qspinbox-members.html | 388 + doc/html/qspinbox-w.png | Bin 0 -> 236 bytes doc/html/qspinbox.html | 561 + doc/html/qsplashscreen-h.html | 125 + doc/html/qsplashscreen-members.html | 345 + doc/html/qsplashscreen.html | 193 + doc/html/qsplitter-h.html | 214 + doc/html/qsplitter-m.png | Bin 0 -> 168 bytes doc/html/qsplitter-members.html | 378 + doc/html/qsplitter-w.png | Bin 0 -> 164 bytes doc/html/qsplitter.html | 337 + doc/html/qsql-h.html | 144 + doc/html/qsql-members.html | 47 + doc/html/qsql.html | 121 + doc/html/qsqlcursor-h.html | 204 + doc/html/qsqlcursor-members.html | 121 + doc/html/qsqlcursor.html | 761 ++ doc/html/qsqldatabase-h.html | 199 + doc/html/qsqldatabase-members.html | 124 + doc/html/qsqldatabase.html | 668 ++ doc/html/qsqldriver-h.html | 169 + doc/html/qsqldriver-members.html | 109 + doc/html/qsqldriver.html | 295 + doc/html/qsqldriverplugin-h.html | 117 + doc/html/qsqldriverplugin-members.html | 50 + doc/html/qsqldriverplugin.html | 100 + doc/html/qsqleditorfactory-h.html | 121 + doc/html/qsqleditorfactory-members.html | 93 + doc/html/qsqleditorfactory.html | 111 + doc/html/qsqlerror-h.html | 137 + doc/html/qsqlerror-members.html | 59 + doc/html/qsqlerror.html | 157 + doc/html/qsqlfield-h.html | 198 + doc/html/qsqlfield-members.html | 60 + doc/html/qsqlfield.html | 216 + doc/html/qsqlfieldinfo-members.html | 64 + doc/html/qsqlfieldinfo.html | 227 + doc/html/qsqlform-h.html | 152 + doc/html/qsqlform-members.html | 104 + doc/html/qsqlform.html | 237 + doc/html/qsqlindex-h.html | 143 + doc/html/qsqlindex-members.html | 75 + doc/html/qsqlindex.html | 155 + doc/html/qsqlpropertymap-h.html | 122 + doc/html/qsqlpropertymap-members.html | 54 + doc/html/qsqlpropertymap.html | 199 + doc/html/qsqlquery-h.html | 177 + doc/html/qsqlquery-members.html | 77 + doc/html/qsqlquery.html | 595 + doc/html/qsqlrecord-h.html | 185 + doc/html/qsqlrecord-members.html | 68 + doc/html/qsqlrecord.html | 294 + doc/html/qsqlrecordinfo-members.html | 50 + doc/html/qsqlrecordinfo.html | 101 + doc/html/qsqlresult-h.html | 159 + doc/html/qsqlresult-members.html | 72 + doc/html/qsqlresult.html | 260 + doc/html/qsqlselectcursor-h.html | 148 + doc/html/qsqlselectcursor-members.html | 121 + doc/html/qsqlselectcursor.html | 93 + doc/html/qstack.html | 47 + doc/html/qstatusbar-h.html | 141 + doc/html/qstatusbar-m.png | Bin 0 -> 237 bytes doc/html/qstatusbar-members.html | 347 + doc/html/qstatusbar-w.png | Bin 0 -> 237 bytes doc/html/qstatusbar.html | 217 + doc/html/qstoreddrag-members.html | 104 + doc/html/qstoreddrag.html | 93 + doc/html/qstrilist-members.html | 90 + doc/html/qstrilist.html | 85 + doc/html/qstring-h.html | 1160 ++ doc/html/qstring-members.html | 121 + doc/html/qstring.html | 2440 +++++ doc/html/qstringlist-h.html | 151 + doc/html/qstringlist-members.html | 87 + doc/html/qstringlist.html | 309 + doc/html/qstrlist-h.html | 154 + doc/html/qstrlist-members.html | 90 + doc/html/qstrlist.html | 120 + doc/html/qstrlistiterator-members.html | 61 + doc/html/qstrlistiterator.html | 60 + doc/html/qstyle-h.html | 801 ++ doc/html/qstyle-members.html | 111 + doc/html/qstyle.html | 1220 +++ doc/html/qstylefactory-h.html | 107 + doc/html/qstylefactory-members.html | 48 + doc/html/qstylefactory.html | 80 + doc/html/qstyleoption-members.html | 64 + doc/html/qstyleoption.html | 297 + doc/html/qstyleplugin-h.html | 117 + doc/html/qstyleplugin-members.html | 50 + doc/html/qstyleplugin.html | 97 + doc/html/qstylesheet-h.html | 298 + doc/html/qstylesheet-members.html | 99 + doc/html/qstylesheet.html | 383 + doc/html/qstylesheetitem-members.html | 94 + doc/html/qstylesheetitem.html | 491 + doc/html/qsyntaxhighlighter-h.html | 126 + doc/html/qsyntaxhighlighter-members.html | 53 + doc/html/qsyntaxhighlighter.html | 158 + doc/html/qt-colors.png | Bin 0 -> 3849 bytes doc/html/qt-members.html | 46 + doc/html/qt-template-lib.html | 320 + doc/html/qt.dcf | 10857 +++++++++++++++++++ doc/html/qt.html | 1026 ++ doc/html/qt33-class-chart.png | Bin 0 -> 45036 bytes doc/html/qtab-members.html | 58 + doc/html/qtab.html | 140 + doc/html/qtabbar-h.html | 231 + doc/html/qtabbar-m.png | Bin 0 -> 387 bytes doc/html/qtabbar-members.html | 362 + doc/html/qtabbar-w.png | Bin 0 -> 405 bytes doc/html/qtabbar.html | 345 + doc/html/qtabdialog-h.html | 191 + doc/html/qtabdialog-members.html | 380 + doc/html/qtabdialog.html | 506 + doc/html/qtabdlg-m.png | Bin 0 -> 1709 bytes doc/html/qtabdlg-w.png | Bin 0 -> 1710 bytes doc/html/qtable-h.html | 608 ++ doc/html/qtable-members.html | 548 + doc/html/qtable.html | 1477 +++ doc/html/qtable.png | Bin 0 -> 6707 bytes doc/html/qtableitem-members.html | 74 + doc/html/qtableitem.html | 497 + doc/html/qtableitems.png | Bin 0 -> 3336 bytes doc/html/qtableselection-members.html | 61 + doc/html/qtableselection.html | 188 + doc/html/qtabletevent-members.html | 63 + doc/html/qtabletevent.html | 251 + doc/html/qtabwidget-h.html | 207 + doc/html/qtabwidget-m.png | Bin 0 -> 721 bytes doc/html/qtabwidget-members.html | 369 + doc/html/qtabwidget-w.png | Bin 0 -> 667 bytes doc/html/qtabwidget.html | 440 + doc/html/qtextbrowser-h.html | 152 + doc/html/qtextbrowser-m.png | Bin 0 -> 20200 bytes doc/html/qtextbrowser-members.html | 556 + doc/html/qtextbrowser-w.png | Bin 0 -> 20278 bytes doc/html/qtextbrowser.html | 265 + doc/html/qtextcodec-h.html | 179 + doc/html/qtextcodec-members.html | 73 + doc/html/qtextcodec.html | 611 ++ doc/html/qtextcodecplugin-h.html | 115 + doc/html/qtextcodecplugin-members.html | 52 + doc/html/qtextcodecplugin.html | 114 + doc/html/qtextdecoder-members.html | 48 + doc/html/qtextdecoder.html | 78 + doc/html/qtextdrag-members.html | 107 + doc/html/qtextdrag.html | 129 + doc/html/qtextedit-h.html | 658 ++ doc/html/qtextedit-members.html | 544 + doc/html/qtextedit.html | 1626 +++ doc/html/qtextencoder-members.html | 48 + doc/html/qtextencoder.html | 79 + doc/html/qtextistream-members.html | 69 + doc/html/qtextistream.html | 91 + doc/html/qtextostream-members.html | 69 + doc/html/qtextostream.html | 90 + doc/html/qtextstream-h.html | 383 + doc/html/qtextstream-members.html | 70 + doc/html/qtextstream.html | 667 ++ doc/html/qtextview-h.html | 119 + doc/html/qtextview-members.html | 543 + doc/html/qtextview.html | 81 + doc/html/qthread-h.html | 175 + doc/html/qthread-members.html | 60 + doc/html/qthread.html | 252 + doc/html/qthreadstorage-h.html | 140 + doc/html/qthreadstorage-members.html | 51 + doc/html/qthreadstorage.html | 189 + doc/html/qtime-members.html | 70 + doc/html/qtime.html | 393 + doc/html/qtimeedit-members.html | 356 + doc/html/qtimeedit.html | 256 + doc/html/qtimer-h.html | 136 + doc/html/qtimer-members.html | 97 + doc/html/qtimer.html | 199 + doc/html/qtimerevent-members.html | 50 + doc/html/qtimerevent.html | 83 + doc/html/qtl-qvaluelist-example.html | 108 + doc/html/qtl.html | 57 + doc/html/qtmac-as-native.html | 138 + doc/html/qtoolbar-h.html | 162 + doc/html/qtoolbar-members.html | 399 + doc/html/qtoolbar.html | 197 + doc/html/qtoolbox-h.html | 171 + doc/html/qtoolbox-members.html | 377 + doc/html/qtoolbox.html | 248 + doc/html/qtoolbutton-h.html | 237 + doc/html/qtoolbutton-members.html | 392 + doc/html/qtoolbutton.html | 392 + doc/html/qtooltip-h.html | 194 + doc/html/qtooltip-members.html | 65 + doc/html/qtooltip.html | 376 + doc/html/qtooltipgroup-members.html | 96 + doc/html/qtooltipgroup.html | 152 + doc/html/qtranslator-h.html | 212 + doc/html/qtranslator-members.html | 102 + doc/html/qtranslator.html | 326 + doc/html/qtranslatormessage-members.html | 62 + doc/html/qtranslatormessage.html | 226 + doc/html/qtsciicodec-h.html | 139 + doc/html/qtsciicodec-members.html | 71 + doc/html/qtsciicodec.html | 94 + doc/html/quridrag-members.html | 116 + doc/html/quridrag.html | 187 + doc/html/qurl-h.html | 175 + doc/html/qurl-members.html | 88 + doc/html/qurl.html | 478 + doc/html/qurlinfo-h.html | 189 + doc/html/qurlinfo-members.html | 78 + doc/html/qurlinfo.html | 367 + doc/html/qurloperator-h.html | 174 + doc/html/qurloperator-members.html | 155 + doc/html/qurloperator.html | 513 + doc/html/quuid-h.html | 239 + doc/html/quuid-members.html | 58 + doc/html/quuid.html | 236 + doc/html/qvalidator-h.html | 214 + doc/html/qvalidator-members.html | 92 + doc/html/qvalidator.html | 153 + doc/html/qvaluelist-h.html | 714 ++ doc/html/qvaluelist-members.html | 82 + doc/html/qvaluelist.html | 785 ++ 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/qvaluestack.html | 158 + doc/html/qvaluevector-h.html | 620 ++ doc/html/qvaluevector-members.html | 73 + doc/html/qvaluevector.html | 666 ++ doc/html/qvariant-h.html | 441 + doc/html/qvariant-members.html | 135 + doc/html/qvariant.html | 1149 ++ doc/html/qvbox-h.html | 110 + doc/html/qvbox-m.png | Bin 0 -> 279 bytes doc/html/qvbox-members.html | 358 + doc/html/qvbox.html | 73 + doc/html/qvboxlayout-members.html | 144 + doc/html/qvboxlayout.html | 106 + doc/html/qvboxlayout.png | Bin 0 -> 1035 bytes doc/html/qvbuttongroup-h.html | 114 + doc/html/qvbuttongroup-members.html | 393 + doc/html/qvbuttongroup.html | 87 + doc/html/qvector.html | 47 + doc/html/qvgroupbox-h.html | 113 + doc/html/qvgroupbox-members.html | 378 + doc/html/qvgroupbox.html | 86 + doc/html/qwaitcondition-h.html | 124 + doc/html/qwaitcondition-members.html | 51 + doc/html/qwaitcondition.html | 197 + doc/html/qwerty-example.html | 509 + doc/html/qwhatsthis-h.html | 126 + doc/html/qwhatsthis-members.html | 59 + doc/html/qwhatsthis.html | 239 + doc/html/qwheelevent-members.html | 61 + doc/html/qwheelevent.html | 203 + doc/html/qwidget-h.html | 1071 ++ doc/html/qwidget-members.html | 338 + doc/html/qwidget.html | 3256 ++++++ doc/html/qwidgetfactory-h.html | 231 + doc/html/qwidgetfactory-members.html | 54 + doc/html/qwidgetfactory.html | 168 + doc/html/qwidgetitem-members.html | 63 + doc/html/qwidgetitem.html | 116 + doc/html/qwidgetplugin-h.html | 165 + doc/html/qwidgetplugin-members.html | 56 + doc/html/qwidgetplugin.html | 146 + doc/html/qwidgetstack-h.html | 157 + doc/html/qwidgetstack-members.html | 365 + doc/html/qwidgetstack.html | 193 + doc/html/qwindowdefs-h.html | 242 + doc/html/qwindowsmime-members.html | 60 + doc/html/qwindowsmime.html | 196 + doc/html/qwindowsstyle-h.html | 180 + doc/html/qwindowsstyle-members.html | 110 + doc/html/qwindowsstyle.html | 67 + doc/html/qwindowsystem_qws-h.html | 621 ++ doc/html/qwizard-h.html | 187 + doc/html/qwizard-members.html | 383 + doc/html/qwizard.html | 337 + doc/html/qwizard.png | Bin 0 -> 2689 bytes doc/html/qwmatrix-h.html | 174 + doc/html/qwmatrix-members.html | 72 + doc/html/qwmatrix.html | 449 + doc/html/qworkspace-h.html | 214 + doc/html/qworkspace-members.html | 349 + doc/html/qworkspace.html | 223 + doc/html/qws.html | 55 + doc/html/qwsdecoration-members.html | 55 + doc/html/qwsdecoration.html | 160 + doc/html/qwsdecoration_qws-h.html | 118 + doc/html/qwsinputmethod-members.html | 53 + doc/html/qwsinputmethod.html | 133 + doc/html/qwskeyboardhandler-members.html | 91 + doc/html/qwskeyboardhandler.html | 106 + doc/html/qwsmousehandler-members.html | 53 + doc/html/qwsmousehandler.html | 113 + doc/html/qwsserver-members.html | 77 + doc/html/qwsserver.html | 344 + doc/html/qwswindow-members.html | 62 + doc/html/qwswindow.html | 171 + doc/html/qxml-h.html | 576 + doc/html/qxmlattributes-members.html | 58 + doc/html/qxmlattributes.html | 200 + doc/html/qxmlcontenthandler-members.html | 58 + doc/html/qxmlcontenthandler.html | 266 + doc/html/qxmldeclhandler-members.html | 50 + doc/html/qxmldeclhandler.html | 124 + doc/html/qxmldefaulthandler-members.html | 76 + doc/html/qxmldefaulthandler.html | 84 + doc/html/qxmldtdhandler-members.html | 49 + doc/html/qxmldtdhandler.html | 108 + doc/html/qxmlentityresolver-members.html | 48 + doc/html/qxmlentityresolver.html | 99 + doc/html/qxmlerrorhandler-members.html | 50 + doc/html/qxmlerrorhandler.html | 114 + doc/html/qxmlinputsource-members.html | 54 + doc/html/qxmlinputsource.html | 193 + doc/html/qxmllexicalhandler-members.html | 54 + doc/html/qxmllexicalhandler.html | 177 + doc/html/qxmllocator-members.html | 50 + doc/html/qxmllocator.html | 94 + doc/html/qxmlnamespacesupport-members.html | 57 + doc/html/qxmlnamespacesupport.html | 201 + doc/html/qxmlparseexception-members.html | 52 + doc/html/qxmlparseexception.html | 102 + doc/html/qxmlreader-members.html | 65 + doc/html/qxmlreader.html | 247 + doc/html/qxmlsimplereader-members.html | 68 + doc/html/qxmlsimplereader.html | 179 + doc/html/qxtwidget-h.html | 110 + doc/html/qxtwidget-members.html | 339 + doc/html/qxtwidget.html | 147 + doc/html/rangecontrols-example.html | 184 + doc/html/rd-add.png | Bin 0 -> 13619 bytes doc/html/rd-chooseanimage.png | Bin 0 -> 11185 bytes doc/html/rd-chooseapixmap.png | Bin 0 -> 14035 bytes doc/html/rd-configmf.png | Bin 0 -> 9068 bytes doc/html/rd-configtb.png | Bin 0 -> 33290 bytes doc/html/rd-cwidgdef.png | Bin 0 -> 27208 bytes doc/html/rd-cwidgprop.png | Bin 0 -> 23485 bytes doc/html/rd-cwidgsig.png | Bin 0 -> 21435 bytes doc/html/rd-cwidgslot.png | Bin 0 -> 23014 bytes doc/html/rd-dbconn.png | Bin 0 -> 18108 bytes doc/html/rd-ediconview.png | Bin 0 -> 14132 bytes doc/html/rd-editincdec.png | Bin 0 -> 8464 bytes doc/html/rd-edittext1.png | Bin 0 -> 13377 bytes doc/html/rd-edittext2.png | Bin 0 -> 8294 bytes doc/html/rd-edlistbox.png | Bin 0 -> 12852 bytes doc/html/rd-edlistview.png | Bin 0 -> 18650 bytes doc/html/rd-edlistview2.png | Bin 0 -> 17858 bytes doc/html/rd-edpalette.png | Bin 0 -> 25849 bytes doc/html/rd-edtablecol.png | Bin 0 -> 15038 bytes doc/html/rd-edtablerow.png | Bin 0 -> 14749 bytes doc/html/rd-find.png | Bin 0 -> 8991 bytes doc/html/rd-formset.png | Bin 0 -> 21029 bytes doc/html/rd-goto.png | Bin 0 -> 4893 bytes doc/html/rd-image.png | Bin 0 -> 18978 bytes doc/html/rd-open.png | Bin 0 -> 13699 bytes doc/html/rd-pagetitle.png | Bin 0 -> 6672 bytes doc/html/rd-prefedit1.png | Bin 0 -> 31714 bytes doc/html/rd-projset.png | Bin 0 -> 12888 bytes doc/html/rd-projset2.png | Bin 0 -> 13710 bytes doc/html/rd-replace.png | Bin 0 -> 10602 bytes doc/html/rd-saveas.png | Bin 0 -> 12718 bytes doc/html/rd-saveform.png | Bin 0 -> 6932 bytes doc/html/rd-saveformas.png | Bin 0 -> 16450 bytes doc/html/rd-saveprojset.png | Bin 0 -> 8086 bytes doc/html/rd-selcolor.png | Bin 0 -> 23820 bytes doc/html/rd-selfont.png | Bin 0 -> 22171 bytes doc/html/rd-startdesigntab2.png | Bin 0 -> 20295 bytes doc/html/rd-template.png | Bin 0 -> 13766 bytes doc/html/rd-text.png | Bin 0 -> 5492 bytes doc/html/rd-title.png | Bin 0 -> 6275 bytes doc/html/rd-tunepalette.png | Bin 0 -> 17035 bytes doc/html/regexptester-example.html | 299 + doc/html/removed20.html | 379 + doc/html/richtext-example.html | 264 + doc/html/rintersect.png | Bin 0 -> 221 bytes doc/html/rmo-editmenu.png | Bin 0 -> 12165 bytes doc/html/rmo-filemenu.png | Bin 0 -> 6126 bytes doc/html/rmo-helpmenu.png | Bin 0 -> 866 bytes doc/html/rmo-layoutmenu.png | Bin 0 -> 9012 bytes doc/html/rmo-previewmenu.png | Bin 0 -> 1184 bytes doc/html/rmo-projectmenu.png | Bin 0 -> 947 bytes doc/html/rmo-searchmenu.png | Bin 0 -> 3291 bytes doc/html/rmo-toolsmenu.png | Bin 0 -> 8259 bytes doc/html/rmo-windowmenu.png | Bin 0 -> 1413 bytes doc/html/rot-example.html | 172 + doc/html/rsubtract.png | Bin 0 -> 224 bytes doc/html/rtb-edit.png | Bin 0 -> 3082 bytes doc/html/rtb-file.png | Bin 0 -> 1732 bytes doc/html/rtb-layout.png | Bin 0 -> 1638 bytes doc/html/rtb-search.png | Bin 0 -> 945 bytes doc/html/rtb-tbbuttons.png | Bin 0 -> 9399 bytes doc/html/rtb-tbcontain.png | Bin 0 -> 9734 bytes doc/html/rtb-tbcustom.png | Bin 0 -> 6754 bytes doc/html/rtb-tbdatabase.png | Bin 0 -> 7854 bytes doc/html/rtb-tbdisplay.png | Bin 0 -> 10792 bytes doc/html/rtb-tbinput.png | Bin 0 -> 13837 bytes doc/html/rtb-tbviews.png | Bin 0 -> 8420 bytes doc/html/rtb-toolbox.png | Bin 0 -> 13936 bytes doc/html/rtb-tools.png | Bin 0 -> 1990 bytes doc/html/runion.png | Bin 0 -> 221 bytes doc/html/rxor.png | Bin 0 -> 222 bytes doc/html/scaling.png | Bin 0 -> 4443 bytes doc/html/scribble-example.html | 365 + doc/html/scrollview-example.html | 493 + doc/html/search.png | Bin 0 -> 6284 bytes doc/html/session.html | 152 + doc/html/session.png | Bin 0 -> 2267 bytes doc/html/shared.html | 75 + doc/html/shclass.html | 236 + doc/html/showimg-example.html | 883 ++ doc/html/sidebar.png | Bin 0 -> 5041 bytes doc/html/signalsandslots.html | 356 + doc/html/simple-application-example.html | 425 + doc/html/simple-application.html | 575 + doc/html/simple-font-demo-example.html | 273 + doc/html/simple_dd-example.html | 305 + doc/html/small-table-example-example.html | 108 + doc/html/smooth.png | Bin 0 -> 448 bytes doc/html/sound-example.html | 192 + doc/html/splitter-example.html | 151 + doc/html/splitter-views-w.png | Bin 0 -> 6469 bytes doc/html/sql-driver.html | 635 ++ doc/html/sql-examples.html | 48 + doc/html/sql-overview-basicbrowsing-main-cpp.html | 78 + doc/html/sql-overview-basicbrowsing2-main-cpp.html | 86 + doc/html/sql-overview-basicdatamanip-main-cpp.html | 83 + doc/html/sql-overview-connect1-main-cpp.html | 74 + .../sql-overview-create_connections-main-cpp.html | 69 + doc/html/sql-overview-custom1-main-cpp.html | 152 + doc/html/sql-overview-custom1-main-h.html | 95 + doc/html/sql-overview-delete-main-cpp.html | 72 + doc/html/sql-overview-extract-main-cpp.html | 84 + doc/html/sql-overview-form1-main-cpp.html | 112 + doc/html/sql-overview-form2-main-h.html | 76 + doc/html/sql-overview-insert-main-cpp.html | 80 + doc/html/sql-overview-navigating-main-cpp.html | 76 + doc/html/sql-overview-order1-main-cpp.html | 75 + doc/html/sql-overview-order2-main-cpp.html | 77 + doc/html/sql-overview-retrieve1-main-cpp.html | 73 + doc/html/sql-overview-retrieve2-main-cpp.html | 73 + doc/html/sql-overview-subclass1-main-cpp.html | 81 + doc/html/sql-overview-subclass2-main-cpp.html | 85 + doc/html/sql-overview-subclass2-main-h.html | 66 + doc/html/sql-overview-subclass3-main-cpp.html | 100 + doc/html/sql-overview-subclass3-main-h.html | 68 + doc/html/sql-overview-subclass4-main-cpp.html | 124 + doc/html/sql-overview-subclass4-main-h.html | 68 + doc/html/sql-overview-subclass5-main-cpp.html | 137 + doc/html/sql-overview-subclass5-main-h.html | 68 + doc/html/sql-overview-table1-main-cpp.html | 74 + doc/html/sql-overview-table2-main-cpp.html | 84 + doc/html/sql-overview-table3-main-cpp.html | 133 + doc/html/sql-overview-table3-main-h.html | 83 + doc/html/sql-overview-table4-main-cpp.html | 152 + doc/html/sql-overview-table4-main-h.html | 96 + doc/html/sql-overview-update-main-cpp.html | 75 + doc/html/sql.html | 1673 +++ doc/html/sqltable-example.html | 121 + doc/html/statistics-example.html | 304 + doc/html/step-by-step-examples.html | 56 + doc/html/t1.png | Bin 0 -> 547 bytes doc/html/t10-cannon-cpp.html | 122 + doc/html/t10-cannon-h.html | 85 + doc/html/t10-lcdrange-cpp.html | 89 + doc/html/t10-lcdrange-h.html | 77 + doc/html/t10-main-cpp.html | 117 + doc/html/t10.png | Bin 0 -> 1666 bytes doc/html/t11-cannon-cpp.html | 198 + doc/html/t11-cannon-h.html | 99 + doc/html/t11-lcdrange-cpp.html | 89 + doc/html/t11-lcdrange-h.html | 77 + doc/html/t11-main-cpp.html | 127 + doc/html/t11.png | Bin 0 -> 1768 bytes doc/html/t12-cannon-cpp.html | 241 + doc/html/t12-cannon-h.html | 106 + doc/html/t12-lcdrange-cpp.html | 125 + doc/html/t12-lcdrange-h.html | 85 + doc/html/t12-main-cpp.html | 127 + doc/html/t12.png | Bin 0 -> 1913 bytes doc/html/t13-cannon-cpp.html | 273 + doc/html/t13-cannon-h.html | 113 + doc/html/t13-gamebrd-cpp.html | 171 + doc/html/t13-gamebrd-h.html | 82 + doc/html/t13-lcdrange-cpp.html | 130 + doc/html/t13-lcdrange-h.html | 84 + doc/html/t13-main-cpp.html | 64 + doc/html/t13.png | Bin 0 -> 2462 bytes doc/html/t14-cannon-cpp.html | 334 + doc/html/t14-cannon-h.html | 121 + doc/html/t14-gamebrd-cpp.html | 185 + doc/html/t14-gamebrd-h.html | 82 + doc/html/t14-lcdrange-cpp.html | 130 + doc/html/t14-lcdrange-h.html | 84 + doc/html/t14-main-cpp.html | 64 + doc/html/t14.png | Bin 0 -> 2502 bytes doc/html/t2.png | Bin 0 -> 528 bytes doc/html/t3.png | Bin 0 -> 631 bytes doc/html/t4.png | Bin 0 -> 618 bytes doc/html/t5.png | Bin 0 -> 706 bytes doc/html/t6.png | Bin 0 -> 982 bytes doc/html/t7-lcdrange-cpp.html | 75 + doc/html/t7-lcdrange-h.html | 76 + doc/html/t7-main-cpp.html | 97 + doc/html/t7.png | Bin 0 -> 983 bytes doc/html/t8-cannon-cpp.html | 87 + doc/html/t8-cannon-h.html | 78 + doc/html/t8-lcdrange-cpp.html | 89 + doc/html/t8-lcdrange-h.html | 77 + doc/html/t8-main-cpp.html | 107 + doc/html/t8.png | Bin 0 -> 1226 bytes doc/html/t9-cannon-cpp.html | 92 + doc/html/t9-cannon-h.html | 78 + doc/html/t9-lcdrange-cpp.html | 89 + doc/html/t9-lcdrange-h.html | 77 + doc/html/t9-main-cpp.html | 104 + doc/html/t9.png | Bin 0 -> 1182 bytes doc/html/t9_1.png | Bin 0 -> 142 bytes doc/html/t9_2.png | Bin 0 -> 165 bytes doc/html/tabdialog-example.html | 234 + doc/html/table-bigtable-main-cpp.html | 106 + doc/html/table-examples.html | 50 + doc/html/table-small-table-demo-main-cpp.html | 100 + doc/html/table-statistics-statistics-cpp.html | 214 + doc/html/table.html | 64 + doc/html/tablet-example.html | 47 + doc/html/tagreader-example.html | 159 + doc/html/tagreader-with-features-example.html | 229 + doc/html/templates.html | 169 + doc/html/tetrix-example.html | 75 + doc/html/text.html | 65 + doc/html/textedit-example.html | 50 + doc/html/themes-example.html | 2376 ++++ doc/html/thread.html | 52 + doc/html/threads.html | 340 + doc/html/tictac-example.html | 577 + doc/html/time.html | 54 + doc/html/timers.html | 152 + doc/html/titleindex | 1521 +++ doc/html/toggleaction-example.html | 82 + doc/html/toolbar.png | Bin 0 -> 5397 bytes doc/html/toolbar1.png | Bin 0 -> 4184 bytes doc/html/tools-list.html | 65 + doc/html/tools.html | 93 + doc/html/tooltip-example.html | 247 + doc/html/toplevel-example.html | 239 + doc/html/trademarks.html | 48 + doc/html/trivial-nsplugin-example.html | 125 + doc/html/troll.html | 149 + doc/html/tt1_en.png | Bin 0 -> 872 bytes doc/html/tt1_la.png | Bin 0 -> 894 bytes doc/html/tt2_en.png | Bin 0 -> 1615 bytes doc/html/tt2_fr.png | Bin 0 -> 1854 bytes doc/html/tt2_nl.png | Bin 0 -> 1881 bytes doc/html/tt3_10_en.png | Bin 0 -> 2286 bytes doc/html/tt3_10_pt_bad.png | Bin 0 -> 2411 bytes doc/html/tt3_10_pt_good.png | Bin 0 -> 2485 bytes doc/html/tt3_11_about_pt.png | Bin 0 -> 2720 bytes doc/html/tt3_11_en.png | Bin 0 -> 2368 bytes doc/html/tt3_11_pt.png | Bin 0 -> 2537 bytes doc/html/tutorial.html | 75 + doc/html/tutorial1-01.html | 168 + doc/html/tutorial1-02.html | 128 + doc/html/tutorial1-03.html | 122 + doc/html/tutorial1-04.html | 182 + doc/html/tutorial1-05.html | 168 + doc/html/tutorial1-06.html | 188 + doc/html/tutorial1-07.html | 213 + doc/html/tutorial1-08.html | 297 + doc/html/tutorial1-09.html | 155 + doc/html/tutorial1-10.html | 236 + doc/html/tutorial1-11.html | 250 + doc/html/tutorial1-12.html | 328 + doc/html/tutorial1-13.html | 396 + doc/html/tutorial1-14.html | 271 + doc/html/tutorial2-01.html | 55 + doc/html/tutorial2-02.html | 67 + doc/html/tutorial2-03.html | 298 + doc/html/tutorial2-04.html | 79 + doc/html/tutorial2-05.html | 587 + doc/html/tutorial2-06.html | 370 + doc/html/tutorial2-07.html | 112 + doc/html/tutorial2-08.html | 349 + doc/html/tutorial2-09.html | 249 + doc/html/tutorial2-10.html | 81 + doc/html/tutorial2-11.html | 72 + doc/html/tutorial2.html | 65 + doc/html/uic.html | 133 + doc/html/unicode.html | 130 + doc/html/unsmooth.png | Bin 0 -> 365 bytes doc/html/validateaccelerators.png | Bin 0 -> 387 bytes doc/html/validatephrases.png | Bin 0 -> 293 bytes doc/html/validatepunctuation.png | Bin 0 -> 373 bytes doc/html/web.png | Bin 0 -> 11826 bytes doc/html/whatsthis | 416 + doc/html/whatsthis.png | Bin 0 -> 3265 bytes doc/html/widgets-example.html | 50 + doc/html/win-objexplor1.png | Bin 0 -> 26183 bytes doc/html/win-objexplor2.png | Bin 0 -> 24859 bytes doc/html/win-projoverview.png | Bin 0 -> 6744 bytes doc/html/win-propedit1.png | Bin 0 -> 31319 bytes doc/html/win-propedit2.png | Bin 0 -> 11884 bytes doc/html/winsystem.html | 120 + doc/html/wizard-example.html | 352 + doc/html/wizard-wizard-cpp.html | 269 + doc/html/wizard-wizard-h.html | 87 + doc/html/workspace.html | 49 + doc/html/xform-example.html | 559 + doc/html/xform.png | Bin 0 -> 50488 bytes doc/html/xml-examples.html | 50 + doc/html/xml-sax-features-walkthrough.html | 379 + doc/html/xml-sax-walkthrough.html | 220 + doc/html/xml-tools.html | 77 + doc/html/xml.html | 573 + doc/html/y2k.html | 82 + 1931 files changed, 367244 insertions(+) create mode 100644 doc/html/3rdparty.html create mode 100644 doc/html/aboutqt.html create mode 100644 doc/html/abstract-connections.png create mode 100644 doc/html/abstractwidgets.html create mode 100644 doc/html/accelerators.html create mode 100644 doc/html/aclock-example.html create mode 100644 doc/html/activeqt-dotnet.html create mode 100644 doc/html/activeqt-examples.html create mode 100644 doc/html/activeqt-tools-dumpdoc.html create mode 100644 doc/html/activeqt-tools-idc.html create mode 100644 doc/html/activeqt-tools-testcon.html create mode 100644 doc/html/activeqt-tools.html create mode 100644 doc/html/activeqt.html create mode 100644 doc/html/addressbook-example.html create mode 100644 doc/html/advanced.html create mode 100644 doc/html/annotated.html create mode 100644 doc/html/appearance.html create mode 100644 doc/html/appicon.html create mode 100644 doc/html/application.html create mode 100644 doc/html/archivesearch-example.html create mode 100644 doc/html/assistant-1.html create mode 100644 doc/html/assistant-2.html create mode 100644 doc/html/assistant-3.html create mode 100644 doc/html/assistant-4.html create mode 100644 doc/html/assistant-5.html create mode 100644 doc/html/assistant-6.html create mode 100644 doc/html/assistant.dcf create mode 100644 doc/html/assistant.html create mode 100644 doc/html/assistant.png create mode 100644 doc/html/basic.html create mode 100644 doc/html/bearings.png create mode 100644 doc/html/biff-example.html create mode 100644 doc/html/bigtable-example.html create mode 100644 doc/html/book-dialog.png create mode 100644 doc/html/book-main.png create mode 100644 doc/html/brush-styles.png create mode 100644 doc/html/bughowto.html create mode 100644 doc/html/buttongroup-w.png create mode 100644 doc/html/buttongroups-example.html create mode 100644 doc/html/canvas-chart-example.html create mode 100644 doc/html/canvas-example.html create mode 100644 doc/html/canvas.html create mode 100644 doc/html/chart-canvastext-h.html create mode 100644 doc/html/chart-canvasview-cpp.html create mode 100644 doc/html/chart-canvasview-h.html create mode 100644 doc/html/chart-chart-pro.html create mode 100644 doc/html/chart-chartform-cpp.html create mode 100644 doc/html/chart-chartform-h.html create mode 100644 doc/html/chart-chartform_canvas-cpp.html create mode 100644 doc/html/chart-chartform_files-cpp.html create mode 100644 doc/html/chart-element-cpp.html create mode 100644 doc/html/chart-element-h.html create mode 100644 doc/html/chart-forms.png create mode 100644 doc/html/chart-main-cpp.html create mode 100644 doc/html/chart-main.png create mode 100644 doc/html/chart-main2.png create mode 100644 doc/html/chart-options.png create mode 100644 doc/html/chart-optionsform-cpp.html create mode 100644 doc/html/chart-optionsform-h.html create mode 100644 doc/html/chart-setdata.png create mode 100644 doc/html/chart-setdataform-cpp.html create mode 100644 doc/html/chart-setdataform-h.html create mode 100644 doc/html/checklists-example.html create mode 100644 doc/html/classchart.html create mode 100644 doc/html/classes.html create mode 100644 doc/html/clientserver-example.html create mode 100644 doc/html/collection.html create mode 100644 doc/html/commercialeditions.html create mode 100644 doc/html/commonproblems.html create mode 100644 doc/html/concrete-connections.png create mode 100644 doc/html/coordsys.html create mode 100644 doc/html/coordsys.png create mode 100644 doc/html/credits.html create mode 100644 doc/html/cursor-example.html create mode 100644 doc/html/cursors.png create mode 100644 doc/html/customlayout-example.html create mode 100644 doc/html/customlayout.html create mode 100644 doc/html/customstyles.html create mode 100644 doc/html/database.html create mode 100644 doc/html/databaseconnections.png create mode 100644 doc/html/datastreamformat.html create mode 100644 doc/html/datetimewidgets.png create mode 100644 doc/html/dclock-example.html create mode 100644 doc/html/debug.html create mode 100644 doc/html/demo-example.html create mode 100644 doc/html/dependencies.png create mode 100644 doc/html/designer-manual-1.html create mode 100644 doc/html/designer-manual-10.html create mode 100644 doc/html/designer-manual-11.html create mode 100644 doc/html/designer-manual-12.html create mode 100644 doc/html/designer-manual-13.html create mode 100644 doc/html/designer-manual-14.html create mode 100644 doc/html/designer-manual-15.html create mode 100644 doc/html/designer-manual-16.html create mode 100644 doc/html/designer-manual-2.html create mode 100644 doc/html/designer-manual-3.html create mode 100644 doc/html/designer-manual-4.html create mode 100644 doc/html/designer-manual-5.html create mode 100644 doc/html/designer-manual-6.html create mode 100644 doc/html/designer-manual-7.html create mode 100644 doc/html/designer-manual-8.html create mode 100644 doc/html/designer-manual-9.html create mode 100644 doc/html/designer-manual.html create mode 100644 doc/html/designer.dcf create mode 100644 doc/html/designer1.jpg create mode 100644 doc/html/designer2.jpg create mode 100644 doc/html/designer3.jpg create mode 100644 doc/html/desktop-example.html create mode 100644 doc/html/dialog1addwidg.png create mode 100644 doc/html/dialog1layout1.png create mode 100644 doc/html/dialog1layout2.png create mode 100644 doc/html/dialog1selewidg.png create mode 100644 doc/html/dialog1selewidg1.png create mode 100644 doc/html/dialog1tab.png create mode 100644 doc/html/dialog2laywidg.png create mode 100644 doc/html/dialog2sample.png create mode 100644 doc/html/dialog2setwidg.png create mode 100644 doc/html/dialog3buttons.png create mode 100644 doc/html/dialog3clipgrp.png create mode 100644 doc/html/dialog3grpbox.png create mode 100644 doc/html/dialog3layclip.png create mode 100644 doc/html/dialog3layout.png create mode 100644 doc/html/dialog3sample.png create mode 100644 doc/html/dialogs.html create mode 100644 doc/html/dirview-example.html create mode 100644 doc/html/distributingqt.html create mode 100644 doc/html/distributor-example.html create mode 100644 doc/html/dnd.html create mode 100644 doc/html/docwindow.png create mode 100644 doc/html/doneandnext.png create mode 100644 doc/html/draganddrop.html create mode 100644 doc/html/dragdrop-example.html create mode 100644 doc/html/drawdemo-example.html create mode 100644 doc/html/drawlines-example.html create mode 100644 doc/html/edit-dbtable-dialog.png create mode 100644 doc/html/editcopy.png create mode 100644 doc/html/editcut.png create mode 100644 doc/html/editfind.png create mode 100644 doc/html/editions.html create mode 100644 doc/html/editpaste.png create mode 100644 doc/html/editredo.png create mode 100644 doc/html/editundo.png create mode 100644 doc/html/emb-accel.html create mode 100644 doc/html/emb-charinput.html create mode 100644 doc/html/emb-classes.html create mode 100644 doc/html/emb-envvars.html create mode 100644 doc/html/emb-features.html create mode 100644 doc/html/emb-fonts.html create mode 100644 doc/html/emb-framebuffer-howto.html create mode 100644 doc/html/emb-install.html create mode 100644 doc/html/emb-performance.html create mode 100644 doc/html/emb-pointer.html create mode 100644 doc/html/emb-porting.html create mode 100644 doc/html/emb-qvfb.html create mode 100644 doc/html/emb-running.html create mode 100644 doc/html/emb-vnc.html create mode 100644 doc/html/embedporting.html create mode 100644 doc/html/environment.html create mode 100644 doc/html/events.html create mode 100644 doc/html/eventsandfilters.html create mode 100644 doc/html/examples.html create mode 100644 doc/html/extension-dialog-example.html create mode 100644 doc/html/faq.html create mode 100644 doc/html/filechooser.png create mode 100644 doc/html/fileiconview-example.html create mode 100644 doc/html/fileopen.png create mode 100644 doc/html/fileprint.png create mode 100644 doc/html/filesave.png create mode 100644 doc/html/finddialog.png create mode 100644 doc/html/focus.html create mode 100644 doc/html/forever-example.html create mode 100644 doc/html/frames.png create mode 100644 doc/html/ftpclient-example.html create mode 100644 doc/html/functions.html create mode 100644 doc/html/general.png create mode 100644 doc/html/geomanagement.html create mode 100644 doc/html/geometry.html create mode 100644 doc/html/geometry.png create mode 100644 doc/html/gpl.html create mode 100644 doc/html/graph.g1n create mode 100644 doc/html/grapher-nsplugin-example.html create mode 100644 doc/html/graphics.html create mode 100644 doc/html/gridlayout.png create mode 100644 doc/html/groupbox-w.png create mode 100644 doc/html/groups.html create mode 100644 doc/html/guibooks.html create mode 100644 doc/html/headerfilesynonyms create mode 100644 doc/html/headers.html create mode 100644 doc/html/hello-example.html create mode 100644 doc/html/helpsystem-example.html create mode 100644 doc/html/helpsystem.html create mode 100644 doc/html/helpviewer-example.html create mode 100644 doc/html/hierarchy.html create mode 100644 doc/html/how-to-learn-qt.html create mode 100644 doc/html/httpd-example.html create mode 100644 doc/html/i18n-example.html create mode 100644 doc/html/i18n.html create mode 100644 doc/html/iconset.png create mode 100644 doc/html/iconview-example.html create mode 100644 doc/html/iconview-simple_dd-main-cpp.html create mode 100644 doc/html/iconview-simple_dd-main-h.html create mode 100644 doc/html/iconview.html create mode 100644 doc/html/images.html create mode 100644 doc/html/index create mode 100644 doc/html/index.html create mode 100644 doc/html/inputdialogs.png create mode 100644 doc/html/install-mac.html create mode 100644 doc/html/install-win.html create mode 100644 doc/html/install-x11.html create mode 100644 doc/html/installation.html create mode 100644 doc/html/integration.html create mode 100644 doc/html/io.html create mode 100644 doc/html/keyfeatures30.html create mode 100644 doc/html/layout-example.html create mode 100644 doc/html/layout.html create mode 100644 doc/html/layout1.png create mode 100644 doc/html/layout2.png create mode 100644 doc/html/license.html create mode 100644 doc/html/licenses.html create mode 100644 doc/html/life-example.html create mode 100644 doc/html/lineedits-example.html create mode 100644 doc/html/linguist-manual-1.html create mode 100644 doc/html/linguist-manual-2.html create mode 100644 doc/html/linguist-manual-3.html create mode 100644 doc/html/linguist-manual-4.html create mode 100644 doc/html/linguist-manual.html create mode 100644 doc/html/linguist.dcf create mode 100644 doc/html/linguist.png create mode 100644 doc/html/listbox-example.html create mode 100644 doc/html/listboxcombo-example.html create mode 100644 doc/html/listviews-example.html create mode 100644 doc/html/logo32.png create mode 100644 doc/html/mac-differences.html create mode 100644 doc/html/mail-example.html create mode 100644 doc/html/mainclasses.html create mode 100644 doc/html/mainwindow-w.png create mode 100644 doc/html/makeqpf.html create mode 100644 doc/html/mdi-example.html create mode 100644 doc/html/menu-example.html create mode 100644 doc/html/menubar.png create mode 100644 doc/html/metaobjects.html create mode 100644 doc/html/misc.html create mode 100644 doc/html/moc.html create mode 100644 doc/html/modules.html create mode 100644 doc/html/motif-customwidget-example.html create mode 100644 doc/html/motif-dialog-example.html create mode 100644 doc/html/motif-examples.html create mode 100644 doc/html/motif-extension.html create mode 100644 doc/html/motif-todo.png create mode 100644 doc/html/motif-walkthrough-1.html create mode 100644 doc/html/motif-walkthrough-10.html create mode 100644 doc/html/motif-walkthrough-2.html create mode 100644 doc/html/motif-walkthrough-3.html create mode 100644 doc/html/motif-walkthrough-4.html create mode 100644 doc/html/motif-walkthrough-5.html create mode 100644 doc/html/motif-walkthrough-6.html create mode 100644 doc/html/motif-walkthrough-7.html create mode 100644 doc/html/motif-walkthrough-8.html create mode 100644 doc/html/motif-walkthrough-9.html create mode 100644 doc/html/motif-walkthrough.html create mode 100644 doc/html/movies-example.html create mode 100644 doc/html/multimedia.html create mode 100644 doc/html/mw-addmainwidg.png create mode 100644 doc/html/mw-coloriconv.png create mode 100644 doc/html/mw-colortable.png create mode 100644 doc/html/mw-colortool1.png create mode 100644 doc/html/mw-colortool2.png create mode 100644 doc/html/mw-conn1.png create mode 100644 doc/html/mw-conn2.png create mode 100644 doc/html/mw-conn3.png create mode 100644 doc/html/mw-conn4.png create mode 100644 doc/html/mw-dragaction.png create mode 100644 doc/html/mw-dragviewitem.png create mode 100644 doc/html/mw-editforw.png create mode 100644 doc/html/mw-editfunc.png create mode 100644 doc/html/mw-editincimp.png create mode 100644 doc/html/mw-editvar.png create mode 100644 doc/html/mw-laycoloriconv.png create mode 100644 doc/html/mw-laycolortable.png create mode 100644 doc/html/mw-laymainwidg.png create mode 100644 doc/html/mw-menuwiz.png create mode 100644 doc/html/mw-newfile.png create mode 100644 doc/html/mw-newmenuitem.png create mode 100644 doc/html/mw-objexplor.png create mode 100644 doc/html/mw-previewform.png create mode 100644 doc/html/mw-projset.png create mode 100644 doc/html/mw-propedit.png create mode 100644 doc/html/mw-separator.png create mode 100644 doc/html/mw-settoolwiz.png create mode 100644 doc/html/mw-startdesign.png create mode 100644 doc/html/mw-toolbarpits.png create mode 100644 doc/html/netscape-plugin.html create mode 100644 doc/html/network-examples.html create mode 100644 doc/html/network.html create mode 100644 doc/html/networkprotocol-example.html create mode 100644 doc/html/next.png create mode 100644 doc/html/nextunfinished.png create mode 100644 doc/html/nsplugin-examples.html create mode 100644 doc/html/object.html create mode 100644 doc/html/objectmodel.html create mode 100644 doc/html/objecttrees.html create mode 100644 doc/html/opengl-box-example.html create mode 100644 doc/html/opengl-examples.html create mode 100644 doc/html/opengl-gear-example.html create mode 100644 doc/html/opengl-overlay-example.html create mode 100644 doc/html/opengl-overlay-x11-example.html create mode 100644 doc/html/opengl-pixmap-example.html create mode 100644 doc/html/opengl-sharedbox-example.html create mode 100644 doc/html/opengl-texture-example.html create mode 100644 doc/html/opengl-x11-overlays.html create mode 100644 doc/html/opengl.html create mode 100644 doc/html/opensourceedition.html create mode 100644 doc/html/organizers.html create mode 100644 doc/html/outliner-example.html create mode 100644 doc/html/overviews-list.html create mode 100644 doc/html/palette.png create mode 100644 doc/html/pdf1.png create mode 100644 doc/html/pen-cap-styles.png create mode 100644 doc/html/pen-join-styles.png create mode 100644 doc/html/pen-styles.png create mode 100644 doc/html/penstyles.png create mode 100644 doc/html/phrasebookdialog.png create mode 100644 doc/html/phrasebookopen.png create mode 100644 doc/html/picture-example.html create mode 100644 doc/html/pictures.html create mode 100644 doc/html/plugins-howto.html create mode 100644 doc/html/plugins.html create mode 100644 doc/html/popup-example.html create mode 100644 doc/html/porting.html create mode 100644 doc/html/porting2.html create mode 100644 doc/html/prev.png create mode 100644 doc/html/prevunfinished.png create mode 100644 doc/html/primes.html create mode 100644 doc/html/process-example.html create mode 100644 doc/html/progress-example.html create mode 100644 doc/html/progressbar-example.html create mode 100644 doc/html/properties.html create mode 100644 doc/html/propertydocs create mode 100644 doc/html/propertyindex create mode 100644 doc/html/qaccel-h.html create mode 100644 doc/html/qaccel-members.html create mode 100644 doc/html/qaccel.html create mode 100644 doc/html/qaccessible-h.html create mode 100644 doc/html/qaccessible-members.html create mode 100644 doc/html/qaccessible.html create mode 100644 doc/html/qaccessibleinterface-members.html create mode 100644 doc/html/qaccessibleinterface.html create mode 100644 doc/html/qaccessibleobject-members.html create mode 100644 doc/html/qaccessibleobject.html create mode 100644 doc/html/qaction-application-example.html create mode 100644 doc/html/qaction-examples.html create mode 100644 doc/html/qaction-h.html create mode 100644 doc/html/qaction-members.html create mode 100644 doc/html/qaction.html create mode 100644 doc/html/qactiongroup-members.html create mode 100644 doc/html/qactiongroup.html create mode 100644 doc/html/qactiongroup_menu.png create mode 100644 doc/html/qactiongroup_menu_subwidget.png create mode 100644 doc/html/qactiongroup_toolbar.png create mode 100644 doc/html/qactiongroup_toolbar_exclusive_subwidget.png create mode 100644 doc/html/qactiongroup_toolbar_nonexclusive_subwidget.png create mode 100644 doc/html/qapplication-h.html create mode 100644 doc/html/qapplication-members.html create mode 100644 doc/html/qapplication.html create mode 100644 doc/html/qarray.html create mode 100644 doc/html/qasciicache-h.html create mode 100644 doc/html/qasciicache-members.html create mode 100644 doc/html/qasciicache.html create mode 100644 doc/html/qasciicacheiterator-members.html create mode 100644 doc/html/qasciicacheiterator.html create mode 100644 doc/html/qasciidict-h.html create mode 100644 doc/html/qasciidict-members.html create mode 100644 doc/html/qasciidict.html create mode 100644 doc/html/qasciidictiterator-members.html create mode 100644 doc/html/qasciidictiterator.html create mode 100644 doc/html/qassistantclient-h.html create mode 100644 doc/html/qassistantclient-members.html create mode 100644 doc/html/qassistantclient.html create mode 100644 doc/html/qasyncimageio-h.html create mode 100644 doc/html/qasyncio-h.html create mode 100644 doc/html/qasyncio-members.html create mode 100644 doc/html/qasyncio.html create mode 100644 doc/html/qaxaggregated-members.html create mode 100644 doc/html/qaxaggregated.html create mode 100644 doc/html/qaxbase-h.html create mode 100644 doc/html/qaxbase-members.html create mode 100644 doc/html/qaxbase.html create mode 100644 doc/html/qaxbindable-h.html create mode 100644 doc/html/qaxbindable-members.html create mode 100644 doc/html/qaxbindable.html create mode 100644 doc/html/qaxcontainer-example-qutlook.html create mode 100644 doc/html/qaxcontainer-example-webbrowser.html create mode 100644 doc/html/qaxcontainer-examples.html create mode 100644 doc/html/qaxcontainer.html create mode 100644 doc/html/qaxfactory-h.html create mode 100644 doc/html/qaxfactory-members.html create mode 100644 doc/html/qaxfactory.html create mode 100644 doc/html/qaxobject-h.html create mode 100644 doc/html/qaxobject-members.html create mode 100644 doc/html/qaxobject.html create mode 100644 doc/html/qaxscript-h.html create mode 100644 doc/html/qaxscript-members.html create mode 100644 doc/html/qaxscript.html create mode 100644 doc/html/qaxscriptengine-members.html create mode 100644 doc/html/qaxscriptengine.html create mode 100644 doc/html/qaxscriptmanager-members.html create mode 100644 doc/html/qaxscriptmanager.html create mode 100644 doc/html/qaxserver-demo-hierarchy.html create mode 100644 doc/html/qaxserver-demo-menus.html create mode 100644 doc/html/qaxserver-demo-multiple.html create mode 100644 doc/html/qaxserver-demo-opengl.html create mode 100644 doc/html/qaxserver-demo-simple.html create mode 100644 doc/html/qaxserver-demo-tetrax.html create mode 100644 doc/html/qaxserver-demo-wrapper.html create mode 100644 doc/html/qaxserver-example-hierarchy.html create mode 100644 doc/html/qaxserver-example-menus.html create mode 100644 doc/html/qaxserver-example-multiple.html create mode 100644 doc/html/qaxserver-example-opengl.html create mode 100644 doc/html/qaxserver-example-simple.html create mode 100644 doc/html/qaxserver-example-tetrax.html create mode 100644 doc/html/qaxserver-example-wrapper.html create mode 100644 doc/html/qaxserver-examples.html create mode 100644 doc/html/qaxserver.html create mode 100644 doc/html/qaxwidget-h.html create mode 100644 doc/html/qaxwidget-members.html create mode 100644 doc/html/qaxwidget.html create mode 100644 doc/html/qbig5codec-h.html create mode 100644 doc/html/qbig5codec-members.html create mode 100644 doc/html/qbig5codec.html create mode 100644 doc/html/qbig5hkscscodec-members.html create mode 100644 doc/html/qbig5hkscscodec.html create mode 100644 doc/html/qbitarray-h.html create mode 100644 doc/html/qbitarray-members.html create mode 100644 doc/html/qbitarray.html create mode 100644 doc/html/qbitmap-h.html create mode 100644 doc/html/qbitmap-members.html create mode 100644 doc/html/qbitmap.html create mode 100644 doc/html/qbitval-members.html create mode 100644 doc/html/qbitval.html create mode 100644 doc/html/qboxlayout-members.html create mode 100644 doc/html/qboxlayout.html create mode 100644 doc/html/qbrush-h.html create mode 100644 doc/html/qbrush-members.html create mode 100644 doc/html/qbrush.html create mode 100644 doc/html/qbttngrp-m.png create mode 100644 doc/html/qbttngrp-w.png create mode 100644 doc/html/qbuffer-h.html create mode 100644 doc/html/qbuffer-members.html create mode 100644 doc/html/qbuffer.html create mode 100644 doc/html/qbutton-h.html create mode 100644 doc/html/qbutton-members.html create mode 100644 doc/html/qbutton.html create mode 100644 doc/html/qbuttongroup-h.html create mode 100644 doc/html/qbuttongroup-h.png create mode 100644 doc/html/qbuttongroup-members.html create mode 100644 doc/html/qbuttongroup-v.png create mode 100644 doc/html/qbuttongroup.html create mode 100644 doc/html/qbytearray-members.html create mode 100644 doc/html/qbytearray.html create mode 100644 doc/html/qcache-h.html create mode 100644 doc/html/qcache-members.html create mode 100644 doc/html/qcache.html create mode 100644 doc/html/qcacheiterator-members.html create mode 100644 doc/html/qcacheiterator.html create mode 100644 doc/html/qcanvas-h.html create mode 100644 doc/html/qcanvas-members.html create mode 100644 doc/html/qcanvas.html create mode 100644 doc/html/qcanvas.png create mode 100644 doc/html/qcanvasellipse-members.html create mode 100644 doc/html/qcanvasellipse.html create mode 100644 doc/html/qcanvasellipse.png create mode 100644 doc/html/qcanvasitem-members.html create mode 100644 doc/html/qcanvasitem.html create mode 100644 doc/html/qcanvasitemlist-members.html create mode 100644 doc/html/qcanvasitemlist.html create mode 100644 doc/html/qcanvasline-members.html create mode 100644 doc/html/qcanvasline.html create mode 100644 doc/html/qcanvaspixmap-members.html create mode 100644 doc/html/qcanvaspixmap.html create mode 100644 doc/html/qcanvaspixmaparray-members.html create mode 100644 doc/html/qcanvaspixmaparray.html create mode 100644 doc/html/qcanvaspolygon-members.html create mode 100644 doc/html/qcanvaspolygon.html create mode 100644 doc/html/qcanvaspolygonalitem-members.html create mode 100644 doc/html/qcanvaspolygonalitem.html create mode 100644 doc/html/qcanvasrectangle-members.html create mode 100644 doc/html/qcanvasrectangle.html create mode 100644 doc/html/qcanvasspline-members.html create mode 100644 doc/html/qcanvasspline.html create mode 100644 doc/html/qcanvassprite-members.html create mode 100644 doc/html/qcanvassprite.html create mode 100644 doc/html/qcanvastext-members.html create mode 100644 doc/html/qcanvastext.html create mode 100644 doc/html/qcanvasview-members.html create mode 100644 doc/html/qcanvasview.html create mode 100644 doc/html/qcdestyle-h.html create mode 100644 doc/html/qcdestyle-members.html create mode 100644 doc/html/qcdestyle.html create mode 100644 doc/html/qchar-members.html create mode 100644 doc/html/qchar.html create mode 100644 doc/html/qcharref-members.html create mode 100644 doc/html/qcharref.html create mode 100644 doc/html/qcheckbox-h.html create mode 100644 doc/html/qcheckbox-members.html create mode 100644 doc/html/qcheckbox.html create mode 100644 doc/html/qchecklistitem-members.html create mode 100644 doc/html/qchecklistitem.html create mode 100644 doc/html/qchecktableitem-members.html create mode 100644 doc/html/qchecktableitem.html create mode 100644 doc/html/qchildevent-members.html create mode 100644 doc/html/qchildevent.html create mode 100644 doc/html/qchkbox-m.png create mode 100644 doc/html/qchkbox-w.png create mode 100644 doc/html/qclipboard-h.html create mode 100644 doc/html/qclipboard-members.html create mode 100644 doc/html/qclipboard.html create mode 100644 doc/html/qcloseevent-members.html create mode 100644 doc/html/qcloseevent.html create mode 100644 doc/html/qcollection.html create mode 100644 doc/html/qcolor-h.html create mode 100644 doc/html/qcolor-members.html create mode 100644 doc/html/qcolor.html create mode 100644 doc/html/qcolordialog-h.html create mode 100644 doc/html/qcolordialog-members.html create mode 100644 doc/html/qcolordialog.html create mode 100644 doc/html/qcolordlg-w.png create mode 100644 doc/html/qcolordrag-members.html create mode 100644 doc/html/qcolordrag.html create mode 100644 doc/html/qcolorgroup-members.html create mode 100644 doc/html/qcolorgroup.html create mode 100644 doc/html/qcombo1-m.png create mode 100644 doc/html/qcombo1-w.png create mode 100644 doc/html/qcombo2-m.png create mode 100644 doc/html/qcombo3-m.png create mode 100644 doc/html/qcombobox-h.html create mode 100644 doc/html/qcombobox-members.html create mode 100644 doc/html/qcombobox.html create mode 100644 doc/html/qcombotableitem-members.html create mode 100644 doc/html/qcombotableitem.html create mode 100644 doc/html/qcommonstyle-h.html create mode 100644 doc/html/qcommonstyle-members.html create mode 100644 doc/html/qcommonstyle.html create mode 100644 doc/html/qconststring-members.html create mode 100644 doc/html/qconststring.html create mode 100644 doc/html/qcontextmenuevent-members.html create mode 100644 doc/html/qcontextmenuevent.html create mode 100644 doc/html/qcopchannel-members.html create mode 100644 doc/html/qcopchannel.html create mode 100644 doc/html/qcopchannel_qws-h.html create mode 100644 doc/html/qcstring-h.html create mode 100644 doc/html/qcstring-members.html create mode 100644 doc/html/qcstring.html create mode 100644 doc/html/qcursor-h.html create mode 100644 doc/html/qcursor-members.html create mode 100644 doc/html/qcursor.html create mode 100644 doc/html/qcustomevent-members.html create mode 100644 doc/html/qcustomevent.html create mode 100644 doc/html/qcustommenuitem-members.html create mode 100644 doc/html/qcustommenuitem.html create mode 100644 doc/html/qd-actioneditor.png create mode 100644 doc/html/qd-colortool-name.png create mode 100644 doc/html/qd-databrowserwzd.png create mode 100644 doc/html/qd-databrowserwzdpage2.png create mode 100644 doc/html/qd-databrowserwzdpage3.png create mode 100644 doc/html/qd-databrowserwzdpage4.png create mode 100644 doc/html/qd-databrowserwzdpage5.png create mode 100644 doc/html/qd-databrowserwzdpage6.png create mode 100644 doc/html/qd-datatablewzd.png create mode 100644 doc/html/qd-datatablewzdpage2.png create mode 100644 doc/html/qd-datatablewzdpage3.png create mode 100644 doc/html/qd-datatablewzdpage4.png create mode 100644 doc/html/qd-datatablewzdpage5.png create mode 100644 doc/html/qd-dataviewwzd.png create mode 100644 doc/html/qd-dataviewwzdpage2.png create mode 100644 doc/html/qd-dataviewwzdpage3.png create mode 100644 doc/html/qd-dataviewwzdpage4.png create mode 100644 doc/html/qd-helptoolbuttons3.png create mode 100644 doc/html/qd-mainwinwzd.png create mode 100644 doc/html/qd-mainwinwzdpage2.png create mode 100644 doc/html/qd-preface.png create mode 100644 doc/html/qd-preferences-dlg.png create mode 100644 doc/html/qdatabrowser-h.html create mode 100644 doc/html/qdatabrowser-members.html create mode 100644 doc/html/qdatabrowser.html create mode 100644 doc/html/qdatapump-members.html create mode 100644 doc/html/qdatapump.html create mode 100644 doc/html/qdatasink-members.html create mode 100644 doc/html/qdatasink.html create mode 100644 doc/html/qdatasource-members.html create mode 100644 doc/html/qdatasource.html create mode 100644 doc/html/qdatastream-h.html create mode 100644 doc/html/qdatastream-members.html create mode 100644 doc/html/qdatastream.html create mode 100644 doc/html/qdatatable-h.html create mode 100644 doc/html/qdatatable-members.html create mode 100644 doc/html/qdatatable.html create mode 100644 doc/html/qdataview-h.html create mode 100644 doc/html/qdataview-members.html create mode 100644 doc/html/qdataview.html create mode 100644 doc/html/qdate-members.html create mode 100644 doc/html/qdate.html create mode 100644 doc/html/qdateedit-members.html create mode 100644 doc/html/qdateedit.html create mode 100644 doc/html/qdatetime-h.html create mode 100644 doc/html/qdatetime-members.html create mode 100644 doc/html/qdatetime.html create mode 100644 doc/html/qdatetimeedit-h.html create mode 100644 doc/html/qdatetimeedit-members.html create mode 100644 doc/html/qdatetimeedit.html create mode 100644 doc/html/qdatetimeeditbase-members.html create mode 100644 doc/html/qdatetimeeditbase.html create mode 100644 doc/html/qdeepcopy-h.html create mode 100644 doc/html/qdeepcopy-members.html create mode 100644 doc/html/qdeepcopy.html create mode 100644 doc/html/qdesktopwidget-h.html create mode 100644 doc/html/qdesktopwidget-members.html create mode 100644 doc/html/qdesktopwidget.html create mode 100644 doc/html/qdesktopwidget.png create mode 100644 doc/html/qdial-h.html create mode 100644 doc/html/qdial-m.png create mode 100644 doc/html/qdial-members.html create mode 100644 doc/html/qdial-w.png create mode 100644 doc/html/qdial.html create mode 100644 doc/html/qdialog-h.html create mode 100644 doc/html/qdialog-members.html create mode 100644 doc/html/qdialog.html create mode 100644 doc/html/qdict-h.html create mode 100644 doc/html/qdict-members.html create mode 100644 doc/html/qdict.html create mode 100644 doc/html/qdictiterator-members.html create mode 100644 doc/html/qdictiterator.html create mode 100644 doc/html/qdir-example.html create mode 100644 doc/html/qdir-h.html create mode 100644 doc/html/qdir-members.html create mode 100644 doc/html/qdir.html create mode 100644 doc/html/qdirectpainter-members.html create mode 100644 doc/html/qdirectpainter.html create mode 100644 doc/html/qdirectpainter_qws-h.html create mode 100644 doc/html/qdns-h.html create mode 100644 doc/html/qdns-members.html create mode 100644 doc/html/qdns.html create mode 100644 doc/html/qdockarea-h.html create mode 100644 doc/html/qdockarea-members.html create mode 100644 doc/html/qdockarea.html create mode 100644 doc/html/qdockwindow-h.html create mode 100644 doc/html/qdockwindow-members.html create mode 100644 doc/html/qdockwindow.html create mode 100644 doc/html/qdockwindow.png create mode 100644 doc/html/qdom-h.html create mode 100644 doc/html/qdomattr-members.html create mode 100644 doc/html/qdomattr.html create mode 100644 doc/html/qdomcdatasection-members.html create mode 100644 doc/html/qdomcdatasection.html create mode 100644 doc/html/qdomcharacterdata-members.html create mode 100644 doc/html/qdomcharacterdata.html create mode 100644 doc/html/qdomcomment-members.html create mode 100644 doc/html/qdomcomment.html create mode 100644 doc/html/qdomdocument-members.html create mode 100644 doc/html/qdomdocument.html create mode 100644 doc/html/qdomdocumentfragment-members.html create mode 100644 doc/html/qdomdocumentfragment.html create mode 100644 doc/html/qdomdocumenttype-members.html create mode 100644 doc/html/qdomdocumenttype.html create mode 100644 doc/html/qdomelement-members.html create mode 100644 doc/html/qdomelement.html create mode 100644 doc/html/qdomentity-members.html create mode 100644 doc/html/qdomentity.html create mode 100644 doc/html/qdomentityreference-members.html create mode 100644 doc/html/qdomentityreference.html create mode 100644 doc/html/qdomimplementation-members.html create mode 100644 doc/html/qdomimplementation.html create mode 100644 doc/html/qdomnamednodemap-members.html create mode 100644 doc/html/qdomnamednodemap.html create mode 100644 doc/html/qdomnode-members.html create mode 100644 doc/html/qdomnode.html create mode 100644 doc/html/qdomnodelist-members.html create mode 100644 doc/html/qdomnodelist.html create mode 100644 doc/html/qdomnotation-members.html create mode 100644 doc/html/qdomnotation.html create mode 100644 doc/html/qdomprocessinginstruction-members.html create mode 100644 doc/html/qdomprocessinginstruction.html create mode 100644 doc/html/qdomtext-members.html create mode 100644 doc/html/qdomtext.html create mode 100644 doc/html/qdoublevalidator-members.html create mode 100644 doc/html/qdoublevalidator.html create mode 100644 doc/html/qdragenterevent-members.html create mode 100644 doc/html/qdragenterevent.html create mode 100644 doc/html/qdragleaveevent-members.html create mode 100644 doc/html/qdragleaveevent.html create mode 100644 doc/html/qdragmoveevent-members.html create mode 100644 doc/html/qdragmoveevent.html create mode 100644 doc/html/qdragobject-h.html create mode 100644 doc/html/qdragobject-members.html create mode 100644 doc/html/qdragobject.html create mode 100644 doc/html/qdrawutil-h.html create mode 100644 doc/html/qdropevent-members.html create mode 100644 doc/html/qdropevent.html create mode 100644 doc/html/qdropsite-h.html create mode 100644 doc/html/qdropsite-members.html create mode 100644 doc/html/qdropsite.html create mode 100644 doc/html/qeditorfactory-h.html create mode 100644 doc/html/qeditorfactory-members.html create mode 100644 doc/html/qeditorfactory.html create mode 100644 doc/html/qembed.html create mode 100644 doc/html/qerrormessage-h.html create mode 100644 doc/html/qerrormessage-members.html create mode 100644 doc/html/qerrormessage.html create mode 100644 doc/html/qerrormessage.png create mode 100644 doc/html/qeucjpcodec-h.html create mode 100644 doc/html/qeucjpcodec-members.html create mode 100644 doc/html/qeucjpcodec.html create mode 100644 doc/html/qeuckrcodec-h.html create mode 100644 doc/html/qeuckrcodec-members.html create mode 100644 doc/html/qeuckrcodec.html create mode 100644 doc/html/qevent-h.html create mode 100644 doc/html/qevent-members.html create mode 100644 doc/html/qevent.html create mode 100644 doc/html/qeventloop-h.html create mode 100644 doc/html/qeventloop-members.html create mode 100644 doc/html/qeventloop.html create mode 100644 doc/html/qfd-example.html create mode 100644 doc/html/qfile-h.html create mode 100644 doc/html/qfile-members.html create mode 100644 doc/html/qfile.html create mode 100644 doc/html/qfiledialog-h.html create mode 100644 doc/html/qfiledialog-members.html create mode 100644 doc/html/qfiledialog.html create mode 100644 doc/html/qfiledlg-m.png create mode 100644 doc/html/qfiledlg-w.png create mode 100644 doc/html/qfileiconprovider-members.html create mode 100644 doc/html/qfileiconprovider.html create mode 100644 doc/html/qfileinfo-h.html create mode 100644 doc/html/qfileinfo-members.html create mode 100644 doc/html/qfileinfo.html create mode 100644 doc/html/qfilepreview-members.html create mode 100644 doc/html/qfilepreview.html create mode 100644 doc/html/qfocusdata-h.html create mode 100644 doc/html/qfocusdata-members.html create mode 100644 doc/html/qfocusdata.html create mode 100644 doc/html/qfocusevent-members.html create mode 100644 doc/html/qfocusevent.html create mode 100644 doc/html/qfont-examples.html create mode 100644 doc/html/qfont-h.html create mode 100644 doc/html/qfont-members.html create mode 100644 doc/html/qfont.html create mode 100644 doc/html/qfontdatabase-h.html create mode 100644 doc/html/qfontdatabase-members.html create mode 100644 doc/html/qfontdatabase.html create mode 100644 doc/html/qfontdialog-h.html create mode 100644 doc/html/qfontdialog-members.html create mode 100644 doc/html/qfontdialog.html create mode 100644 doc/html/qfontdlg-w.png create mode 100644 doc/html/qfontinfo-h.html create mode 100644 doc/html/qfontinfo-members.html create mode 100644 doc/html/qfontinfo.html create mode 100644 doc/html/qfontmanager-members.html create mode 100644 doc/html/qfontmanager.html create mode 100644 doc/html/qfontmanager_qws-h.html create mode 100644 doc/html/qfontmetrics-h.html create mode 100644 doc/html/qfontmetrics-members.html create mode 100644 doc/html/qfontmetrics.html create mode 100644 doc/html/qframe-h.html create mode 100644 doc/html/qframe-members.html create mode 100644 doc/html/qframe.html create mode 100644 doc/html/qftp-h.html create mode 100644 doc/html/qftp-members.html create mode 100644 doc/html/qftp.html create mode 100644 doc/html/qgb18030codec-h.html create mode 100644 doc/html/qgb18030codec-members.html create mode 100644 doc/html/qgb18030codec.html create mode 100644 doc/html/qgb2312codec-members.html create mode 100644 doc/html/qgb2312codec.html create mode 100644 doc/html/qgbkcodec-members.html create mode 100644 doc/html/qgbkcodec.html create mode 100644 doc/html/qgfx_qws-h.html create mode 100644 doc/html/qgfxdriverfactory-members.html create mode 100644 doc/html/qgfxdriverfactory.html create mode 100644 doc/html/qgfxdriverfactory_qws-h.html create mode 100644 doc/html/qgfxdriverplugin-members.html create mode 100644 doc/html/qgfxdriverplugin.html create mode 100644 doc/html/qgfxdriverplugin_qws-h.html create mode 100644 doc/html/qgl-h.html create mode 100644 doc/html/qgl-members.html create mode 100644 doc/html/qgl.html create mode 100644 doc/html/qglayoutiterator-members.html create mode 100644 doc/html/qglayoutiterator.html create mode 100644 doc/html/qglcolormap-h.html create mode 100644 doc/html/qglcolormap-members.html create mode 100644 doc/html/qglcolormap.html create mode 100644 doc/html/qglcontext-members.html create mode 100644 doc/html/qglcontext.html create mode 100644 doc/html/qglformat-members.html create mode 100644 doc/html/qglformat.html create mode 100644 doc/html/qglobal-h.html create mode 100644 doc/html/qglwidget-members.html create mode 100644 doc/html/qglwidget.html create mode 100644 doc/html/qgrid-h.html create mode 100644 doc/html/qgrid-m.png create mode 100644 doc/html/qgrid-members.html create mode 100644 doc/html/qgrid.html create mode 100644 doc/html/qgridlayout-members.html create mode 100644 doc/html/qgridlayout.html create mode 100644 doc/html/qgridview-h.html create mode 100644 doc/html/qgridview-members.html create mode 100644 doc/html/qgridview.html create mode 100644 doc/html/qgroupbox-h.html create mode 100644 doc/html/qgroupbox-members.html create mode 100644 doc/html/qgroupbox.html create mode 100644 doc/html/qgroupboxes.png create mode 100644 doc/html/qgrpbox-w.png create mode 100644 doc/html/qguardedptr-h.html create mode 100644 doc/html/qguardedptr-members.html create mode 100644 doc/html/qguardedptr.html create mode 100644 doc/html/qhbox-h.html create mode 100644 doc/html/qhbox-m.png create mode 100644 doc/html/qhbox-members.html create mode 100644 doc/html/qhbox.html create mode 100644 doc/html/qhboxlayout-members.html create mode 100644 doc/html/qhboxlayout.html create mode 100644 doc/html/qhboxlayout.png create mode 100644 doc/html/qhbuttongroup-h.html create mode 100644 doc/html/qhbuttongroup-members.html create mode 100644 doc/html/qhbuttongroup.html create mode 100644 doc/html/qheader-h.html create mode 100644 doc/html/qheader-m.png create mode 100644 doc/html/qheader-members.html create mode 100644 doc/html/qheader-w.png create mode 100644 doc/html/qheader.html create mode 100644 doc/html/qhebrewcodec-members.html create mode 100644 doc/html/qhebrewcodec.html create mode 100644 doc/html/qhgroupbox-h.html create mode 100644 doc/html/qhgroupbox-members.html create mode 100644 doc/html/qhgroupbox.html create mode 100644 doc/html/qhideevent-members.html create mode 100644 doc/html/qhideevent.html create mode 100644 doc/html/qhostaddress-h.html create mode 100644 doc/html/qhostaddress-members.html create mode 100644 doc/html/qhostaddress.html create mode 100644 doc/html/qhttp-h.html create mode 100644 doc/html/qhttp-members.html create mode 100644 doc/html/qhttp.html create mode 100644 doc/html/qhttpheader-members.html create mode 100644 doc/html/qhttpheader.html create mode 100644 doc/html/qhttprequestheader-members.html create mode 100644 doc/html/qhttprequestheader.html create mode 100644 doc/html/qhttpresponseheader-members.html create mode 100644 doc/html/qhttpresponseheader.html create mode 100644 doc/html/qicondrag-members.html create mode 100644 doc/html/qicondrag.html create mode 100644 doc/html/qicondragevent-members.html create mode 100644 doc/html/qicondragevent.html create mode 100644 doc/html/qicondragitem-members.html create mode 100644 doc/html/qicondragitem.html create mode 100644 doc/html/qiconfactory-members.html create mode 100644 doc/html/qiconfactory.html create mode 100644 doc/html/qiconset-h.html create mode 100644 doc/html/qiconset-members.html create mode 100644 doc/html/qiconset.html create mode 100644 doc/html/qiconview-h.html create mode 100644 doc/html/qiconview-m.png create mode 100644 doc/html/qiconview-members.html create mode 100644 doc/html/qiconview-w.png create mode 100644 doc/html/qiconview.html create mode 100644 doc/html/qiconviewitem-members.html create mode 100644 doc/html/qiconviewitem.html create mode 100644 doc/html/qimage-h.html create mode 100644 doc/html/qimage-members.html create mode 100644 doc/html/qimage.html create mode 100644 doc/html/qimageconsumer-members.html create mode 100644 doc/html/qimageconsumer.html create mode 100644 doc/html/qimagedecoder-members.html create mode 100644 doc/html/qimagedecoder.html create mode 100644 doc/html/qimagedrag-members.html create mode 100644 doc/html/qimagedrag.html create mode 100644 doc/html/qimageformat-members.html create mode 100644 doc/html/qimageformat.html create mode 100644 doc/html/qimageformatplugin-h.html create mode 100644 doc/html/qimageformatplugin-members.html create mode 100644 doc/html/qimageformatplugin.html create mode 100644 doc/html/qimageformattype-members.html create mode 100644 doc/html/qimageformattype.html create mode 100644 doc/html/qimageio-members.html create mode 100644 doc/html/qimageio.html create mode 100644 doc/html/qimevent-members.html create mode 100644 doc/html/qimevent.html create mode 100644 doc/html/qinputdialog-h.html create mode 100644 doc/html/qinputdialog-members.html create mode 100644 doc/html/qinputdialog.html create mode 100644 doc/html/qintcache-h.html create mode 100644 doc/html/qintcache-members.html create mode 100644 doc/html/qintcache.html create mode 100644 doc/html/qintcacheiterator-members.html create mode 100644 doc/html/qintcacheiterator.html create mode 100644 doc/html/qintdict-h.html create mode 100644 doc/html/qintdict-members.html create mode 100644 doc/html/qintdict.html create mode 100644 doc/html/qintdictiterator-members.html create mode 100644 doc/html/qintdictiterator.html create mode 100644 doc/html/qintvalidator-members.html create mode 100644 doc/html/qintvalidator.html create mode 100644 doc/html/qiodevice-h.html create mode 100644 doc/html/qiodevice-members.html create mode 100644 doc/html/qiodevice.html create mode 100644 doc/html/qiodevicesource-members.html create mode 100644 doc/html/qiodevicesource.html create mode 100644 doc/html/qjiscodec-h.html create mode 100644 doc/html/qjiscodec-members.html create mode 100644 doc/html/qjiscodec.html create mode 100644 doc/html/qkbddriverfactory-members.html create mode 100644 doc/html/qkbddriverfactory.html create mode 100644 doc/html/qkbddriverfactory_qws-h.html create mode 100644 doc/html/qkbddriverplugin-members.html create mode 100644 doc/html/qkbddriverplugin.html create mode 100644 doc/html/qkbddriverplugin_qws-h.html create mode 100644 doc/html/qkeyboard_qws-h.html create mode 100644 doc/html/qkeyevent-members.html create mode 100644 doc/html/qkeyevent.html create mode 100644 doc/html/qkeysequence-h.html create mode 100644 doc/html/qkeysequence-members.html create mode 100644 doc/html/qkeysequence.html create mode 100644 doc/html/qlabel-h.html create mode 100644 doc/html/qlabel-m.png create mode 100644 doc/html/qlabel-members.html create mode 100644 doc/html/qlabel-w.png create mode 100644 doc/html/qlabel.html create mode 100644 doc/html/qlayout-h.html create mode 100644 doc/html/qlayout-members.html create mode 100644 doc/html/qlayout.html create mode 100644 doc/html/qlayoutitem-members.html create mode 100644 doc/html/qlayoutitem.html create mode 100644 doc/html/qlayoutiterator-members.html create mode 100644 doc/html/qlayoutiterator.html create mode 100644 doc/html/qlcdnum-m.png create mode 100644 doc/html/qlcdnum-w.png create mode 100644 doc/html/qlcdnumber-h.html create mode 100644 doc/html/qlcdnumber-members.html create mode 100644 doc/html/qlcdnumber.html create mode 100644 doc/html/qlibrary-h.html create mode 100644 doc/html/qlibrary-members.html create mode 100644 doc/html/qlibrary.html create mode 100644 doc/html/qlined-m.png create mode 100644 doc/html/qlined-w.png create mode 100644 doc/html/qlineedit-h.html create mode 100644 doc/html/qlineedit-members.html create mode 100644 doc/html/qlineedit.html create mode 100644 doc/html/qlist.html create mode 100644 doc/html/qlistbox-h.html create mode 100644 doc/html/qlistbox-m.png create mode 100644 doc/html/qlistbox-members.html create mode 100644 doc/html/qlistbox-w.png create mode 100644 doc/html/qlistbox.html create mode 100644 doc/html/qlistboxitem-members.html create mode 100644 doc/html/qlistboxitem.html create mode 100644 doc/html/qlistboxpixmap-members.html create mode 100644 doc/html/qlistboxpixmap.html create mode 100644 doc/html/qlistboxtext-members.html create mode 100644 doc/html/qlistboxtext.html create mode 100644 doc/html/qlistiterator.html create mode 100644 doc/html/qlistview-h.html create mode 100644 doc/html/qlistview-m.png create mode 100644 doc/html/qlistview-members.html create mode 100644 doc/html/qlistview-w.png create mode 100644 doc/html/qlistview.html create mode 100644 doc/html/qlistviewitem-members.html create mode 100644 doc/html/qlistviewitem.html create mode 100644 doc/html/qlistviewitemiterator-members.html create mode 100644 doc/html/qlistviewitemiterator.html create mode 100644 doc/html/qlistviewitems.png create mode 100644 doc/html/qlocale-h.html create mode 100644 doc/html/qlocale-members.html create mode 100644 doc/html/qlocale.html create mode 100644 doc/html/qlocalfs-h.html create mode 100644 doc/html/qlocalfs-members.html create mode 100644 doc/html/qlocalfs.html create mode 100644 doc/html/qmacmime-members.html create mode 100644 doc/html/qmacmime.html create mode 100644 doc/html/qmacstyle-members.html create mode 100644 doc/html/qmacstyle.html create mode 100644 doc/html/qmacstyle_mac-h.html create mode 100644 doc/html/qmag-example.html create mode 100644 doc/html/qmainwindow-h.html create mode 100644 doc/html/qmainwindow-m.png create mode 100644 doc/html/qmainwindow-members.html create mode 100644 doc/html/qmainwindow-qdockareas.png create mode 100644 doc/html/qmainwindow-w.png create mode 100644 doc/html/qmainwindow.html create mode 100644 doc/html/qmake-manual-1.html create mode 100644 doc/html/qmake-manual-2.html create mode 100644 doc/html/qmake-manual-3.html create mode 100644 doc/html/qmake-manual-4.html create mode 100644 doc/html/qmake-manual-5.html create mode 100644 doc/html/qmake-manual-6.html create mode 100644 doc/html/qmake-manual-7.html create mode 100644 doc/html/qmake-manual-8.html create mode 100644 doc/html/qmake-manual.html create mode 100644 doc/html/qmake.dcf create mode 100644 doc/html/qmap-h.html create mode 100644 doc/html/qmap-members.html create mode 100644 doc/html/qmap.html create mode 100644 doc/html/qmapconstiterator-members.html create mode 100644 doc/html/qmapconstiterator.html create mode 100644 doc/html/qmapiterator-members.html create mode 100644 doc/html/qmapiterator.html create mode 100644 doc/html/qmemarray-h.html create mode 100644 doc/html/qmemarray-members.html create mode 100644 doc/html/qmemarray.html create mode 100644 doc/html/qmenubar-h.html create mode 100644 doc/html/qmenubar-m.png create mode 100644 doc/html/qmenubar-members.html create mode 100644 doc/html/qmenubar-w.png create mode 100644 doc/html/qmenubar.html create mode 100644 doc/html/qmenudata-h.html create mode 100644 doc/html/qmenudata-members.html create mode 100644 doc/html/qmenudata.html create mode 100644 doc/html/qmessagebox-crit.png create mode 100644 doc/html/qmessagebox-h.html create mode 100644 doc/html/qmessagebox-info.png create mode 100644 doc/html/qmessagebox-members.html create mode 100644 doc/html/qmessagebox-quest.png create mode 100644 doc/html/qmessagebox-warn.png create mode 100644 doc/html/qmessagebox.html create mode 100644 doc/html/qmetaobject-h.html create mode 100644 doc/html/qmetaobject-members.html create mode 100644 doc/html/qmetaobject.html create mode 100644 doc/html/qmetaproperty-members.html create mode 100644 doc/html/qmetaproperty.html create mode 100644 doc/html/qmime-h.html create mode 100644 doc/html/qmimesource-members.html create mode 100644 doc/html/qmimesource.html create mode 100644 doc/html/qmimesourcefactory-members.html create mode 100644 doc/html/qmimesourcefactory.html create mode 100644 doc/html/qmlined-m.png create mode 100644 doc/html/qmlined-w.png create mode 100644 doc/html/qmotif-h.html create mode 100644 doc/html/qmotif-members.html create mode 100644 doc/html/qmotif.html create mode 100644 doc/html/qmotifdialog-h.html create mode 100644 doc/html/qmotifdialog-members.html create mode 100644 doc/html/qmotifdialog.html create mode 100644 doc/html/qmotifplusstyle-h.html create mode 100644 doc/html/qmotifplusstyle-members.html create mode 100644 doc/html/qmotifplusstyle.html create mode 100644 doc/html/qmotifstyle-h.html create mode 100644 doc/html/qmotifstyle-members.html create mode 100644 doc/html/qmotifstyle.html create mode 100644 doc/html/qmotifwidget-h.html create mode 100644 doc/html/qmotifwidget-members.html create mode 100644 doc/html/qmotifwidget.html create mode 100644 doc/html/qmouse_qws-h.html create mode 100644 doc/html/qmousedriverfactory-members.html create mode 100644 doc/html/qmousedriverfactory.html create mode 100644 doc/html/qmousedriverfactory_qws-h.html create mode 100644 doc/html/qmousedriverplugin-members.html create mode 100644 doc/html/qmousedriverplugin.html create mode 100644 doc/html/qmousedriverplugin_qws-h.html create mode 100644 doc/html/qmouseevent-members.html create mode 100644 doc/html/qmouseevent.html create mode 100644 doc/html/qmoveevent-members.html create mode 100644 doc/html/qmoveevent.html create mode 100644 doc/html/qmovie-h.html create mode 100644 doc/html/qmovie-members.html create mode 100644 doc/html/qmovie.html create mode 100644 doc/html/qmovie.png create mode 100644 doc/html/qmsgbox-m.png create mode 100644 doc/html/qmsgbox-w.png create mode 100644 doc/html/qmultilineedit-h.html create mode 100644 doc/html/qmultilineedit-members.html create mode 100644 doc/html/qmultilineedit.html create mode 100644 doc/html/qmutex-h.html create mode 100644 doc/html/qmutex-members.html create mode 100644 doc/html/qmutex.html create mode 100644 doc/html/qmutexlocker-members.html create mode 100644 doc/html/qmutexlocker.html create mode 100644 doc/html/qnamespace-h.html create mode 100644 doc/html/qnetwork-h.html create mode 100644 doc/html/qnetworkoperation-members.html create mode 100644 doc/html/qnetworkoperation.html create mode 100644 doc/html/qnetworkprotocol-h.html create mode 100644 doc/html/qnetworkprotocol-members.html create mode 100644 doc/html/qnetworkprotocol.html create mode 100644 doc/html/qnp-h.html create mode 100644 doc/html/qnpinstance-members.html create mode 100644 doc/html/qnpinstance.html create mode 100644 doc/html/qnplugin-members.html create mode 100644 doc/html/qnplugin.html create mode 100644 doc/html/qnpstream-members.html create mode 100644 doc/html/qnpstream.html create mode 100644 doc/html/qnpwidget-members.html create mode 100644 doc/html/qnpwidget.html create mode 100644 doc/html/qobject-h.html create mode 100644 doc/html/qobject-members.html create mode 100644 doc/html/qobject.html create mode 100644 doc/html/qobjectcleanuphandler-h.html create mode 100644 doc/html/qobjectcleanuphandler-members.html create mode 100644 doc/html/qobjectcleanuphandler.html create mode 100644 doc/html/qobjectlist-h.html create mode 100644 doc/html/qobjectlist-members.html create mode 100644 doc/html/qobjectlist.html create mode 100644 doc/html/qobjectlistiterator-members.html create mode 100644 doc/html/qobjectlistiterator.html create mode 100644 doc/html/qpaintdevice-h.html create mode 100644 doc/html/qpaintdevice-members.html create mode 100644 doc/html/qpaintdevice.html create mode 100644 doc/html/qpaintdevicemetrics-h.html create mode 100644 doc/html/qpaintdevicemetrics-members.html create mode 100644 doc/html/qpaintdevicemetrics.html create mode 100644 doc/html/qpainter-h.html create mode 100644 doc/html/qpainter-members.html create mode 100644 doc/html/qpainter.html create mode 100644 doc/html/qpaintevent-members.html create mode 100644 doc/html/qpaintevent.html create mode 100644 doc/html/qpair-h.html create mode 100644 doc/html/qpair-members.html create mode 100644 doc/html/qpair.html create mode 100644 doc/html/qpalette-h.html create mode 100644 doc/html/qpalette-members.html create mode 100644 doc/html/qpalette.html create mode 100644 doc/html/qpen-h.html create mode 100644 doc/html/qpen-members.html create mode 100644 doc/html/qpen.html create mode 100644 doc/html/qpicture-h.html create mode 100644 doc/html/qpicture-members.html create mode 100644 doc/html/qpicture.html create mode 100644 doc/html/qpixmap-h.html create mode 100644 doc/html/qpixmap-members.html create mode 100644 doc/html/qpixmap.html create mode 100644 doc/html/qpixmapcache-h.html create mode 100644 doc/html/qpixmapcache-members.html create mode 100644 doc/html/qpixmapcache.html create mode 100644 doc/html/qplatinumstyle-h.html create mode 100644 doc/html/qplatinumstyle-members.html create mode 100644 doc/html/qplatinumstyle.html create mode 100644 doc/html/qpngimagepacker-members.html create mode 100644 doc/html/qpngimagepacker.html create mode 100644 doc/html/qpngio-h.html create mode 100644 doc/html/qpoint-h.html create mode 100644 doc/html/qpoint-members.html create mode 100644 doc/html/qpoint.html create mode 100644 doc/html/qpointarray-h.html create mode 100644 doc/html/qpointarray-members.html create mode 100644 doc/html/qpointarray.html create mode 100644 doc/html/qpopmenu-fancy.png create mode 100644 doc/html/qpopmenu-m.png create mode 100644 doc/html/qpopmenu-w.png create mode 100644 doc/html/qpopupmenu-h.html create mode 100644 doc/html/qpopupmenu-members.html create mode 100644 doc/html/qpopupmenu.html create mode 100644 doc/html/qprintdlg-m.png create mode 100644 doc/html/qprinter-h.html create mode 100644 doc/html/qprinter-members.html create mode 100644 doc/html/qprinter.html create mode 100644 doc/html/qprocess-examples.html create mode 100644 doc/html/qprocess-h.html create mode 100644 doc/html/qprocess-members.html create mode 100644 doc/html/qprocess.html create mode 100644 doc/html/qprogbar-m.png create mode 100644 doc/html/qprogbar-w.png create mode 100644 doc/html/qprogdlg-m.png create mode 100644 doc/html/qprogdlg-w.png create mode 100644 doc/html/qprogressbar-h.html create mode 100644 doc/html/qprogressbar-members.html create mode 100644 doc/html/qprogressbar.html create mode 100644 doc/html/qprogressdialog-h.html create mode 100644 doc/html/qprogressdialog-members.html create mode 100644 doc/html/qprogressdialog.html create mode 100644 doc/html/qptrcollection-h.html create mode 100644 doc/html/qptrcollection-members.html create mode 100644 doc/html/qptrcollection.html create mode 100644 doc/html/qptrdict-h.html create mode 100644 doc/html/qptrdict-members.html create mode 100644 doc/html/qptrdict.html create mode 100644 doc/html/qptrdictiterator-members.html create mode 100644 doc/html/qptrdictiterator.html create mode 100644 doc/html/qptrlist-h.html create mode 100644 doc/html/qptrlist-members.html create mode 100644 doc/html/qptrlist.html create mode 100644 doc/html/qptrlistiterator-members.html create mode 100644 doc/html/qptrlistiterator.html create mode 100644 doc/html/qptrqueue-h.html create mode 100644 doc/html/qptrqueue-members.html create mode 100644 doc/html/qptrqueue.html create mode 100644 doc/html/qptrstack-h.html create mode 100644 doc/html/qptrstack-members.html create mode 100644 doc/html/qptrstack.html create mode 100644 doc/html/qptrvector-h.html create mode 100644 doc/html/qptrvector-members.html create mode 100644 doc/html/qptrvector.html create mode 100644 doc/html/qpushbt-m.png create mode 100644 doc/html/qpushbt-w.png create mode 100644 doc/html/qpushbutton-h.html create mode 100644 doc/html/qpushbutton-members.html create mode 100644 doc/html/qpushbutton.html create mode 100644 doc/html/qqueue.html create mode 100644 doc/html/qradiobt-m.png create mode 100644 doc/html/qradiobt-w.png create mode 100644 doc/html/qradiobutton-h.html create mode 100644 doc/html/qradiobutton-members.html create mode 100644 doc/html/qradiobutton.html create mode 100644 doc/html/qrangecontrol-h.html create mode 100644 doc/html/qrangecontrol-members.html create mode 100644 doc/html/qrangecontrol.html create mode 100644 doc/html/qrect-h.html create mode 100644 doc/html/qrect-members.html create mode 100644 doc/html/qrect.html create mode 100644 doc/html/qregexp-h.html create mode 100644 doc/html/qregexp-members.html create mode 100644 doc/html/qregexp.html create mode 100644 doc/html/qregexpvalidator-members.html create mode 100644 doc/html/qregexpvalidator.html create mode 100644 doc/html/qregion-h.html create mode 100644 doc/html/qregion-members.html create mode 100644 doc/html/qregion.html create mode 100644 doc/html/qresizeevent-members.html create mode 100644 doc/html/qresizeevent.html create mode 100644 doc/html/qrtlcodec-h.html create mode 100644 doc/html/qs-addwidg.png create mode 100644 doc/html/qs-editconn1.png create mode 100644 doc/html/qs-editconn2.png create mode 100644 doc/html/qs-editfunc.png create mode 100644 doc/html/qs-editlistbox1.png create mode 100644 doc/html/qs-laygrid.png create mode 100644 doc/html/qs-layhoriz.png create mode 100644 doc/html/qs-layvert.png create mode 100644 doc/html/qs-newdlg.png create mode 100644 doc/html/qs-projset.png create mode 100644 doc/html/qs-pushbutt.png create mode 100644 doc/html/qs-spacers.png create mode 100644 doc/html/qs-taborder.png create mode 100644 doc/html/qs-txtlbl.png create mode 100644 doc/html/qscrbar-m.png create mode 100644 doc/html/qscrbar-w.png create mode 100644 doc/html/qscreen-members.html create mode 100644 doc/html/qscreen.html create mode 100644 doc/html/qscrollbar-h.html create mode 100644 doc/html/qscrollbar-members.html create mode 100644 doc/html/qscrollbar.html create mode 100644 doc/html/qscrollview-cl.png create mode 100644 doc/html/qscrollview-h.html create mode 100644 doc/html/qscrollview-m.png create mode 100644 doc/html/qscrollview-members.html create mode 100644 doc/html/qscrollview-vp.png create mode 100644 doc/html/qscrollview-vp2.png create mode 100644 doc/html/qscrollview-w.png create mode 100644 doc/html/qscrollview.html create mode 100644 doc/html/qsemaphore-h.html create mode 100644 doc/html/qsemaphore-members.html create mode 100644 doc/html/qsemaphore.html create mode 100644 doc/html/qserversocket-h.html create mode 100644 doc/html/qserversocket-members.html create mode 100644 doc/html/qserversocket.html create mode 100644 doc/html/qsessionmanager-h.html create mode 100644 doc/html/qsessionmanager-members.html create mode 100644 doc/html/qsessionmanager.html create mode 100644 doc/html/qsettings-h.html create mode 100644 doc/html/qsettings-members.html create mode 100644 doc/html/qsettings.html create mode 100644 doc/html/qsgistyle-h.html create mode 100644 doc/html/qsgistyle-members.html create mode 100644 doc/html/qsgistyle.html create mode 100644 doc/html/qshowevent-members.html create mode 100644 doc/html/qshowevent.html create mode 100644 doc/html/qsignal-h.html create mode 100644 doc/html/qsignal-members.html create mode 100644 doc/html/qsignal.html create mode 100644 doc/html/qsignalmapper-h.html create mode 100644 doc/html/qsignalmapper-members.html create mode 100644 doc/html/qsignalmapper.html create mode 100644 doc/html/qsimplerichtext-h.html create mode 100644 doc/html/qsimplerichtext-members.html create mode 100644 doc/html/qsimplerichtext.html create mode 100644 doc/html/qsize-h.html create mode 100644 doc/html/qsize-members.html create mode 100644 doc/html/qsize.html create mode 100644 doc/html/qsizegrip-h.html create mode 100644 doc/html/qsizegrip-m.png create mode 100644 doc/html/qsizegrip-members.html create mode 100644 doc/html/qsizegrip-w.png create mode 100644 doc/html/qsizegrip.html create mode 100644 doc/html/qsizepolicy-h.html create mode 100644 doc/html/qsizepolicy-members.html create mode 100644 doc/html/qsizepolicy.html create mode 100644 doc/html/qsjiscodec-h.html create mode 100644 doc/html/qsjiscodec-members.html create mode 100644 doc/html/qsjiscodec.html create mode 100644 doc/html/qslider-h.html create mode 100644 doc/html/qslider-m.png create mode 100644 doc/html/qslider-members.html create mode 100644 doc/html/qslider-w.png create mode 100644 doc/html/qslider.html create mode 100644 doc/html/qsmetric.png create mode 100644 doc/html/qsocket-h.html create mode 100644 doc/html/qsocket-members.html create mode 100644 doc/html/qsocket.html create mode 100644 doc/html/qsocketdevice-h.html create mode 100644 doc/html/qsocketdevice-members.html create mode 100644 doc/html/qsocketdevice.html create mode 100644 doc/html/qsocketnotifier-h.html create mode 100644 doc/html/qsocketnotifier-members.html create mode 100644 doc/html/qsocketnotifier.html create mode 100644 doc/html/qsortedlist-h.html create mode 100644 doc/html/qsortedlist-members.html create mode 100644 doc/html/qsortedlist.html create mode 100644 doc/html/qsound-h.html create mode 100644 doc/html/qsound-members.html create mode 100644 doc/html/qsound.html create mode 100644 doc/html/qspaceritem-members.html create mode 100644 doc/html/qspaceritem.html create mode 100644 doc/html/qspinbox-h.html create mode 100644 doc/html/qspinbox-m.png create mode 100644 doc/html/qspinbox-members.html create mode 100644 doc/html/qspinbox-w.png create mode 100644 doc/html/qspinbox.html create mode 100644 doc/html/qsplashscreen-h.html create mode 100644 doc/html/qsplashscreen-members.html create mode 100644 doc/html/qsplashscreen.html create mode 100644 doc/html/qsplitter-h.html create mode 100644 doc/html/qsplitter-m.png create mode 100644 doc/html/qsplitter-members.html create mode 100644 doc/html/qsplitter-w.png create mode 100644 doc/html/qsplitter.html create mode 100644 doc/html/qsql-h.html create mode 100644 doc/html/qsql-members.html create mode 100644 doc/html/qsql.html create mode 100644 doc/html/qsqlcursor-h.html create mode 100644 doc/html/qsqlcursor-members.html create mode 100644 doc/html/qsqlcursor.html create mode 100644 doc/html/qsqldatabase-h.html create mode 100644 doc/html/qsqldatabase-members.html create mode 100644 doc/html/qsqldatabase.html create mode 100644 doc/html/qsqldriver-h.html create mode 100644 doc/html/qsqldriver-members.html create mode 100644 doc/html/qsqldriver.html create mode 100644 doc/html/qsqldriverplugin-h.html create mode 100644 doc/html/qsqldriverplugin-members.html create mode 100644 doc/html/qsqldriverplugin.html create mode 100644 doc/html/qsqleditorfactory-h.html create mode 100644 doc/html/qsqleditorfactory-members.html create mode 100644 doc/html/qsqleditorfactory.html create mode 100644 doc/html/qsqlerror-h.html create mode 100644 doc/html/qsqlerror-members.html create mode 100644 doc/html/qsqlerror.html create mode 100644 doc/html/qsqlfield-h.html create mode 100644 doc/html/qsqlfield-members.html create mode 100644 doc/html/qsqlfield.html create mode 100644 doc/html/qsqlfieldinfo-members.html create mode 100644 doc/html/qsqlfieldinfo.html create mode 100644 doc/html/qsqlform-h.html create mode 100644 doc/html/qsqlform-members.html create mode 100644 doc/html/qsqlform.html create mode 100644 doc/html/qsqlindex-h.html create mode 100644 doc/html/qsqlindex-members.html create mode 100644 doc/html/qsqlindex.html create mode 100644 doc/html/qsqlpropertymap-h.html create mode 100644 doc/html/qsqlpropertymap-members.html create mode 100644 doc/html/qsqlpropertymap.html create mode 100644 doc/html/qsqlquery-h.html create mode 100644 doc/html/qsqlquery-members.html create mode 100644 doc/html/qsqlquery.html create mode 100644 doc/html/qsqlrecord-h.html create mode 100644 doc/html/qsqlrecord-members.html create mode 100644 doc/html/qsqlrecord.html create mode 100644 doc/html/qsqlrecordinfo-members.html create mode 100644 doc/html/qsqlrecordinfo.html create mode 100644 doc/html/qsqlresult-h.html create mode 100644 doc/html/qsqlresult-members.html create mode 100644 doc/html/qsqlresult.html create mode 100644 doc/html/qsqlselectcursor-h.html create mode 100644 doc/html/qsqlselectcursor-members.html create mode 100644 doc/html/qsqlselectcursor.html create mode 100644 doc/html/qstack.html create mode 100644 doc/html/qstatusbar-h.html create mode 100644 doc/html/qstatusbar-m.png create mode 100644 doc/html/qstatusbar-members.html create mode 100644 doc/html/qstatusbar-w.png create mode 100644 doc/html/qstatusbar.html create mode 100644 doc/html/qstoreddrag-members.html create mode 100644 doc/html/qstoreddrag.html create mode 100644 doc/html/qstrilist-members.html create mode 100644 doc/html/qstrilist.html create mode 100644 doc/html/qstring-h.html create mode 100644 doc/html/qstring-members.html create mode 100644 doc/html/qstring.html create mode 100644 doc/html/qstringlist-h.html create mode 100644 doc/html/qstringlist-members.html create mode 100644 doc/html/qstringlist.html create mode 100644 doc/html/qstrlist-h.html create mode 100644 doc/html/qstrlist-members.html create mode 100644 doc/html/qstrlist.html create mode 100644 doc/html/qstrlistiterator-members.html create mode 100644 doc/html/qstrlistiterator.html create mode 100644 doc/html/qstyle-h.html create mode 100644 doc/html/qstyle-members.html create mode 100644 doc/html/qstyle.html create mode 100644 doc/html/qstylefactory-h.html create mode 100644 doc/html/qstylefactory-members.html create mode 100644 doc/html/qstylefactory.html create mode 100644 doc/html/qstyleoption-members.html create mode 100644 doc/html/qstyleoption.html create mode 100644 doc/html/qstyleplugin-h.html create mode 100644 doc/html/qstyleplugin-members.html create mode 100644 doc/html/qstyleplugin.html create mode 100644 doc/html/qstylesheet-h.html create mode 100644 doc/html/qstylesheet-members.html create mode 100644 doc/html/qstylesheet.html create mode 100644 doc/html/qstylesheetitem-members.html create mode 100644 doc/html/qstylesheetitem.html create mode 100644 doc/html/qsyntaxhighlighter-h.html create mode 100644 doc/html/qsyntaxhighlighter-members.html create mode 100644 doc/html/qsyntaxhighlighter.html create mode 100644 doc/html/qt-colors.png create mode 100644 doc/html/qt-members.html create mode 100644 doc/html/qt-template-lib.html create mode 100644 doc/html/qt.dcf create mode 100644 doc/html/qt.html create mode 100644 doc/html/qt33-class-chart.png create mode 100644 doc/html/qtab-members.html create mode 100644 doc/html/qtab.html create mode 100644 doc/html/qtabbar-h.html create mode 100644 doc/html/qtabbar-m.png create mode 100644 doc/html/qtabbar-members.html create mode 100644 doc/html/qtabbar-w.png create mode 100644 doc/html/qtabbar.html create mode 100644 doc/html/qtabdialog-h.html create mode 100644 doc/html/qtabdialog-members.html create mode 100644 doc/html/qtabdialog.html create mode 100644 doc/html/qtabdlg-m.png create mode 100644 doc/html/qtabdlg-w.png create mode 100644 doc/html/qtable-h.html create mode 100644 doc/html/qtable-members.html create mode 100644 doc/html/qtable.html create mode 100644 doc/html/qtable.png create mode 100644 doc/html/qtableitem-members.html create mode 100644 doc/html/qtableitem.html create mode 100644 doc/html/qtableitems.png create mode 100644 doc/html/qtableselection-members.html create mode 100644 doc/html/qtableselection.html create mode 100644 doc/html/qtabletevent-members.html create mode 100644 doc/html/qtabletevent.html create mode 100644 doc/html/qtabwidget-h.html create mode 100644 doc/html/qtabwidget-m.png create mode 100644 doc/html/qtabwidget-members.html create mode 100644 doc/html/qtabwidget-w.png create mode 100644 doc/html/qtabwidget.html create mode 100644 doc/html/qtextbrowser-h.html create mode 100644 doc/html/qtextbrowser-m.png create mode 100644 doc/html/qtextbrowser-members.html create mode 100644 doc/html/qtextbrowser-w.png create mode 100644 doc/html/qtextbrowser.html create mode 100644 doc/html/qtextcodec-h.html create mode 100644 doc/html/qtextcodec-members.html create mode 100644 doc/html/qtextcodec.html create mode 100644 doc/html/qtextcodecplugin-h.html create mode 100644 doc/html/qtextcodecplugin-members.html create mode 100644 doc/html/qtextcodecplugin.html create mode 100644 doc/html/qtextdecoder-members.html create mode 100644 doc/html/qtextdecoder.html create mode 100644 doc/html/qtextdrag-members.html create mode 100644 doc/html/qtextdrag.html create mode 100644 doc/html/qtextedit-h.html create mode 100644 doc/html/qtextedit-members.html create mode 100644 doc/html/qtextedit.html create mode 100644 doc/html/qtextencoder-members.html create mode 100644 doc/html/qtextencoder.html create mode 100644 doc/html/qtextistream-members.html create mode 100644 doc/html/qtextistream.html create mode 100644 doc/html/qtextostream-members.html create mode 100644 doc/html/qtextostream.html create mode 100644 doc/html/qtextstream-h.html create mode 100644 doc/html/qtextstream-members.html create mode 100644 doc/html/qtextstream.html create mode 100644 doc/html/qtextview-h.html create mode 100644 doc/html/qtextview-members.html create mode 100644 doc/html/qtextview.html create mode 100644 doc/html/qthread-h.html create mode 100644 doc/html/qthread-members.html create mode 100644 doc/html/qthread.html create mode 100644 doc/html/qthreadstorage-h.html create mode 100644 doc/html/qthreadstorage-members.html create mode 100644 doc/html/qthreadstorage.html create mode 100644 doc/html/qtime-members.html create mode 100644 doc/html/qtime.html create mode 100644 doc/html/qtimeedit-members.html create mode 100644 doc/html/qtimeedit.html create mode 100644 doc/html/qtimer-h.html create mode 100644 doc/html/qtimer-members.html create mode 100644 doc/html/qtimer.html create mode 100644 doc/html/qtimerevent-members.html create mode 100644 doc/html/qtimerevent.html create mode 100644 doc/html/qtl-qvaluelist-example.html create mode 100644 doc/html/qtl.html create mode 100644 doc/html/qtmac-as-native.html create mode 100644 doc/html/qtoolbar-h.html create mode 100644 doc/html/qtoolbar-members.html create mode 100644 doc/html/qtoolbar.html create mode 100644 doc/html/qtoolbox-h.html create mode 100644 doc/html/qtoolbox-members.html create mode 100644 doc/html/qtoolbox.html create mode 100644 doc/html/qtoolbutton-h.html create mode 100644 doc/html/qtoolbutton-members.html create mode 100644 doc/html/qtoolbutton.html create mode 100644 doc/html/qtooltip-h.html create mode 100644 doc/html/qtooltip-members.html create mode 100644 doc/html/qtooltip.html create mode 100644 doc/html/qtooltipgroup-members.html create mode 100644 doc/html/qtooltipgroup.html create mode 100644 doc/html/qtranslator-h.html create mode 100644 doc/html/qtranslator-members.html create mode 100644 doc/html/qtranslator.html create mode 100644 doc/html/qtranslatormessage-members.html create mode 100644 doc/html/qtranslatormessage.html create mode 100644 doc/html/qtsciicodec-h.html create mode 100644 doc/html/qtsciicodec-members.html create mode 100644 doc/html/qtsciicodec.html create mode 100644 doc/html/quridrag-members.html create mode 100644 doc/html/quridrag.html create mode 100644 doc/html/qurl-h.html create mode 100644 doc/html/qurl-members.html create mode 100644 doc/html/qurl.html create mode 100644 doc/html/qurlinfo-h.html create mode 100644 doc/html/qurlinfo-members.html create mode 100644 doc/html/qurlinfo.html create mode 100644 doc/html/qurloperator-h.html create mode 100644 doc/html/qurloperator-members.html create mode 100644 doc/html/qurloperator.html create mode 100644 doc/html/quuid-h.html create mode 100644 doc/html/quuid-members.html create mode 100644 doc/html/quuid.html create mode 100644 doc/html/qvalidator-h.html create mode 100644 doc/html/qvalidator-members.html create mode 100644 doc/html/qvalidator.html create mode 100644 doc/html/qvaluelist-h.html create mode 100644 doc/html/qvaluelist-members.html create mode 100644 doc/html/qvaluelist.html create mode 100644 doc/html/qvaluelistconstiterator-members.html create mode 100644 doc/html/qvaluelistconstiterator.html create mode 100644 doc/html/qvaluelistiterator-members.html create mode 100644 doc/html/qvaluelistiterator.html create mode 100644 doc/html/qvaluestack-h.html create mode 100644 doc/html/qvaluestack-members.html create mode 100644 doc/html/qvaluestack.html create mode 100644 doc/html/qvaluevector-h.html create mode 100644 doc/html/qvaluevector-members.html create mode 100644 doc/html/qvaluevector.html create mode 100644 doc/html/qvariant-h.html create mode 100644 doc/html/qvariant-members.html create mode 100644 doc/html/qvariant.html create mode 100644 doc/html/qvbox-h.html create mode 100644 doc/html/qvbox-m.png create mode 100644 doc/html/qvbox-members.html create mode 100644 doc/html/qvbox.html create mode 100644 doc/html/qvboxlayout-members.html create mode 100644 doc/html/qvboxlayout.html create mode 100644 doc/html/qvboxlayout.png create mode 100644 doc/html/qvbuttongroup-h.html create mode 100644 doc/html/qvbuttongroup-members.html create mode 100644 doc/html/qvbuttongroup.html create mode 100644 doc/html/qvector.html create mode 100644 doc/html/qvgroupbox-h.html create mode 100644 doc/html/qvgroupbox-members.html create mode 100644 doc/html/qvgroupbox.html create mode 100644 doc/html/qwaitcondition-h.html create mode 100644 doc/html/qwaitcondition-members.html create mode 100644 doc/html/qwaitcondition.html create mode 100644 doc/html/qwerty-example.html create mode 100644 doc/html/qwhatsthis-h.html create mode 100644 doc/html/qwhatsthis-members.html create mode 100644 doc/html/qwhatsthis.html create mode 100644 doc/html/qwheelevent-members.html create mode 100644 doc/html/qwheelevent.html create mode 100644 doc/html/qwidget-h.html create mode 100644 doc/html/qwidget-members.html create mode 100644 doc/html/qwidget.html create mode 100644 doc/html/qwidgetfactory-h.html create mode 100644 doc/html/qwidgetfactory-members.html create mode 100644 doc/html/qwidgetfactory.html create mode 100644 doc/html/qwidgetitem-members.html create mode 100644 doc/html/qwidgetitem.html create mode 100644 doc/html/qwidgetplugin-h.html create mode 100644 doc/html/qwidgetplugin-members.html create mode 100644 doc/html/qwidgetplugin.html create mode 100644 doc/html/qwidgetstack-h.html create mode 100644 doc/html/qwidgetstack-members.html create mode 100644 doc/html/qwidgetstack.html create mode 100644 doc/html/qwindowdefs-h.html create mode 100644 doc/html/qwindowsmime-members.html create mode 100644 doc/html/qwindowsmime.html create mode 100644 doc/html/qwindowsstyle-h.html create mode 100644 doc/html/qwindowsstyle-members.html create mode 100644 doc/html/qwindowsstyle.html create mode 100644 doc/html/qwindowsystem_qws-h.html create mode 100644 doc/html/qwizard-h.html create mode 100644 doc/html/qwizard-members.html create mode 100644 doc/html/qwizard.html create mode 100644 doc/html/qwizard.png create mode 100644 doc/html/qwmatrix-h.html create mode 100644 doc/html/qwmatrix-members.html create mode 100644 doc/html/qwmatrix.html create mode 100644 doc/html/qworkspace-h.html create mode 100644 doc/html/qworkspace-members.html create mode 100644 doc/html/qworkspace.html create mode 100644 doc/html/qws.html create mode 100644 doc/html/qwsdecoration-members.html create mode 100644 doc/html/qwsdecoration.html create mode 100644 doc/html/qwsdecoration_qws-h.html create mode 100644 doc/html/qwsinputmethod-members.html create mode 100644 doc/html/qwsinputmethod.html create mode 100644 doc/html/qwskeyboardhandler-members.html create mode 100644 doc/html/qwskeyboardhandler.html create mode 100644 doc/html/qwsmousehandler-members.html create mode 100644 doc/html/qwsmousehandler.html create mode 100644 doc/html/qwsserver-members.html create mode 100644 doc/html/qwsserver.html create mode 100644 doc/html/qwswindow-members.html create mode 100644 doc/html/qwswindow.html create mode 100644 doc/html/qxml-h.html create mode 100644 doc/html/qxmlattributes-members.html create mode 100644 doc/html/qxmlattributes.html create mode 100644 doc/html/qxmlcontenthandler-members.html create mode 100644 doc/html/qxmlcontenthandler.html create mode 100644 doc/html/qxmldeclhandler-members.html create mode 100644 doc/html/qxmldeclhandler.html create mode 100644 doc/html/qxmldefaulthandler-members.html create mode 100644 doc/html/qxmldefaulthandler.html create mode 100644 doc/html/qxmldtdhandler-members.html create mode 100644 doc/html/qxmldtdhandler.html create mode 100644 doc/html/qxmlentityresolver-members.html create mode 100644 doc/html/qxmlentityresolver.html create mode 100644 doc/html/qxmlerrorhandler-members.html create mode 100644 doc/html/qxmlerrorhandler.html create mode 100644 doc/html/qxmlinputsource-members.html create mode 100644 doc/html/qxmlinputsource.html create mode 100644 doc/html/qxmllexicalhandler-members.html create mode 100644 doc/html/qxmllexicalhandler.html create mode 100644 doc/html/qxmllocator-members.html create mode 100644 doc/html/qxmllocator.html create mode 100644 doc/html/qxmlnamespacesupport-members.html create mode 100644 doc/html/qxmlnamespacesupport.html create mode 100644 doc/html/qxmlparseexception-members.html create mode 100644 doc/html/qxmlparseexception.html create mode 100644 doc/html/qxmlreader-members.html create mode 100644 doc/html/qxmlreader.html create mode 100644 doc/html/qxmlsimplereader-members.html create mode 100644 doc/html/qxmlsimplereader.html create mode 100644 doc/html/qxtwidget-h.html create mode 100644 doc/html/qxtwidget-members.html create mode 100644 doc/html/qxtwidget.html create mode 100644 doc/html/rangecontrols-example.html create mode 100644 doc/html/rd-add.png create mode 100644 doc/html/rd-chooseanimage.png create mode 100644 doc/html/rd-chooseapixmap.png create mode 100644 doc/html/rd-configmf.png create mode 100644 doc/html/rd-configtb.png create mode 100644 doc/html/rd-cwidgdef.png create mode 100644 doc/html/rd-cwidgprop.png create mode 100644 doc/html/rd-cwidgsig.png create mode 100644 doc/html/rd-cwidgslot.png create mode 100644 doc/html/rd-dbconn.png create mode 100644 doc/html/rd-ediconview.png create mode 100644 doc/html/rd-editincdec.png create mode 100644 doc/html/rd-edittext1.png create mode 100644 doc/html/rd-edittext2.png create mode 100644 doc/html/rd-edlistbox.png create mode 100644 doc/html/rd-edlistview.png create mode 100644 doc/html/rd-edlistview2.png create mode 100644 doc/html/rd-edpalette.png create mode 100644 doc/html/rd-edtablecol.png create mode 100644 doc/html/rd-edtablerow.png create mode 100644 doc/html/rd-find.png create mode 100644 doc/html/rd-formset.png create mode 100644 doc/html/rd-goto.png create mode 100644 doc/html/rd-image.png create mode 100644 doc/html/rd-open.png create mode 100644 doc/html/rd-pagetitle.png create mode 100644 doc/html/rd-prefedit1.png create mode 100644 doc/html/rd-projset.png create mode 100644 doc/html/rd-projset2.png create mode 100644 doc/html/rd-replace.png create mode 100644 doc/html/rd-saveas.png create mode 100644 doc/html/rd-saveform.png create mode 100644 doc/html/rd-saveformas.png create mode 100644 doc/html/rd-saveprojset.png create mode 100644 doc/html/rd-selcolor.png create mode 100644 doc/html/rd-selfont.png create mode 100644 doc/html/rd-startdesigntab2.png create mode 100644 doc/html/rd-template.png create mode 100644 doc/html/rd-text.png create mode 100644 doc/html/rd-title.png create mode 100644 doc/html/rd-tunepalette.png create mode 100644 doc/html/regexptester-example.html create mode 100644 doc/html/removed20.html create mode 100644 doc/html/richtext-example.html create mode 100644 doc/html/rintersect.png create mode 100644 doc/html/rmo-editmenu.png create mode 100644 doc/html/rmo-filemenu.png create mode 100644 doc/html/rmo-helpmenu.png create mode 100644 doc/html/rmo-layoutmenu.png create mode 100644 doc/html/rmo-previewmenu.png create mode 100644 doc/html/rmo-projectmenu.png create mode 100644 doc/html/rmo-searchmenu.png create mode 100644 doc/html/rmo-toolsmenu.png create mode 100644 doc/html/rmo-windowmenu.png create mode 100644 doc/html/rot-example.html create mode 100644 doc/html/rsubtract.png create mode 100644 doc/html/rtb-edit.png create mode 100644 doc/html/rtb-file.png create mode 100644 doc/html/rtb-layout.png create mode 100644 doc/html/rtb-search.png create mode 100644 doc/html/rtb-tbbuttons.png create mode 100644 doc/html/rtb-tbcontain.png create mode 100644 doc/html/rtb-tbcustom.png create mode 100644 doc/html/rtb-tbdatabase.png create mode 100644 doc/html/rtb-tbdisplay.png create mode 100644 doc/html/rtb-tbinput.png create mode 100644 doc/html/rtb-tbviews.png create mode 100644 doc/html/rtb-toolbox.png create mode 100644 doc/html/rtb-tools.png create mode 100644 doc/html/runion.png create mode 100644 doc/html/rxor.png create mode 100644 doc/html/scaling.png create mode 100644 doc/html/scribble-example.html create mode 100644 doc/html/scrollview-example.html create mode 100644 doc/html/search.png create mode 100644 doc/html/session.html create mode 100644 doc/html/session.png create mode 100644 doc/html/shared.html create mode 100644 doc/html/shclass.html create mode 100644 doc/html/showimg-example.html create mode 100644 doc/html/sidebar.png create mode 100644 doc/html/signalsandslots.html create mode 100644 doc/html/simple-application-example.html create mode 100644 doc/html/simple-application.html create mode 100644 doc/html/simple-font-demo-example.html create mode 100644 doc/html/simple_dd-example.html create mode 100644 doc/html/small-table-example-example.html create mode 100644 doc/html/smooth.png create mode 100644 doc/html/sound-example.html create mode 100644 doc/html/splitter-example.html create mode 100644 doc/html/splitter-views-w.png create mode 100644 doc/html/sql-driver.html create mode 100644 doc/html/sql-examples.html create mode 100644 doc/html/sql-overview-basicbrowsing-main-cpp.html create mode 100644 doc/html/sql-overview-basicbrowsing2-main-cpp.html create mode 100644 doc/html/sql-overview-basicdatamanip-main-cpp.html create mode 100644 doc/html/sql-overview-connect1-main-cpp.html create mode 100644 doc/html/sql-overview-create_connections-main-cpp.html create mode 100644 doc/html/sql-overview-custom1-main-cpp.html create mode 100644 doc/html/sql-overview-custom1-main-h.html create mode 100644 doc/html/sql-overview-delete-main-cpp.html create mode 100644 doc/html/sql-overview-extract-main-cpp.html create mode 100644 doc/html/sql-overview-form1-main-cpp.html create mode 100644 doc/html/sql-overview-form2-main-h.html create mode 100644 doc/html/sql-overview-insert-main-cpp.html create mode 100644 doc/html/sql-overview-navigating-main-cpp.html create mode 100644 doc/html/sql-overview-order1-main-cpp.html create mode 100644 doc/html/sql-overview-order2-main-cpp.html create mode 100644 doc/html/sql-overview-retrieve1-main-cpp.html create mode 100644 doc/html/sql-overview-retrieve2-main-cpp.html create mode 100644 doc/html/sql-overview-subclass1-main-cpp.html create mode 100644 doc/html/sql-overview-subclass2-main-cpp.html create mode 100644 doc/html/sql-overview-subclass2-main-h.html create mode 100644 doc/html/sql-overview-subclass3-main-cpp.html create mode 100644 doc/html/sql-overview-subclass3-main-h.html create mode 100644 doc/html/sql-overview-subclass4-main-cpp.html create mode 100644 doc/html/sql-overview-subclass4-main-h.html create mode 100644 doc/html/sql-overview-subclass5-main-cpp.html create mode 100644 doc/html/sql-overview-subclass5-main-h.html create mode 100644 doc/html/sql-overview-table1-main-cpp.html create mode 100644 doc/html/sql-overview-table2-main-cpp.html create mode 100644 doc/html/sql-overview-table3-main-cpp.html create mode 100644 doc/html/sql-overview-table3-main-h.html create mode 100644 doc/html/sql-overview-table4-main-cpp.html create mode 100644 doc/html/sql-overview-table4-main-h.html create mode 100644 doc/html/sql-overview-update-main-cpp.html create mode 100644 doc/html/sql.html create mode 100644 doc/html/sqltable-example.html create mode 100644 doc/html/statistics-example.html create mode 100644 doc/html/step-by-step-examples.html create mode 100644 doc/html/t1.png create mode 100644 doc/html/t10-cannon-cpp.html create mode 100644 doc/html/t10-cannon-h.html create mode 100644 doc/html/t10-lcdrange-cpp.html create mode 100644 doc/html/t10-lcdrange-h.html create mode 100644 doc/html/t10-main-cpp.html create mode 100644 doc/html/t10.png create mode 100644 doc/html/t11-cannon-cpp.html create mode 100644 doc/html/t11-cannon-h.html create mode 100644 doc/html/t11-lcdrange-cpp.html create mode 100644 doc/html/t11-lcdrange-h.html create mode 100644 doc/html/t11-main-cpp.html create mode 100644 doc/html/t11.png create mode 100644 doc/html/t12-cannon-cpp.html create mode 100644 doc/html/t12-cannon-h.html create mode 100644 doc/html/t12-lcdrange-cpp.html create mode 100644 doc/html/t12-lcdrange-h.html create mode 100644 doc/html/t12-main-cpp.html create mode 100644 doc/html/t12.png create mode 100644 doc/html/t13-cannon-cpp.html create mode 100644 doc/html/t13-cannon-h.html create mode 100644 doc/html/t13-gamebrd-cpp.html create mode 100644 doc/html/t13-gamebrd-h.html create mode 100644 doc/html/t13-lcdrange-cpp.html create mode 100644 doc/html/t13-lcdrange-h.html create mode 100644 doc/html/t13-main-cpp.html create mode 100644 doc/html/t13.png create mode 100644 doc/html/t14-cannon-cpp.html create mode 100644 doc/html/t14-cannon-h.html create mode 100644 doc/html/t14-gamebrd-cpp.html create mode 100644 doc/html/t14-gamebrd-h.html create mode 100644 doc/html/t14-lcdrange-cpp.html create mode 100644 doc/html/t14-lcdrange-h.html create mode 100644 doc/html/t14-main-cpp.html create mode 100644 doc/html/t14.png create mode 100644 doc/html/t2.png create mode 100644 doc/html/t3.png create mode 100644 doc/html/t4.png create mode 100644 doc/html/t5.png create mode 100644 doc/html/t6.png create mode 100644 doc/html/t7-lcdrange-cpp.html create mode 100644 doc/html/t7-lcdrange-h.html create mode 100644 doc/html/t7-main-cpp.html create mode 100644 doc/html/t7.png create mode 100644 doc/html/t8-cannon-cpp.html create mode 100644 doc/html/t8-cannon-h.html create mode 100644 doc/html/t8-lcdrange-cpp.html create mode 100644 doc/html/t8-lcdrange-h.html create mode 100644 doc/html/t8-main-cpp.html create mode 100644 doc/html/t8.png create mode 100644 doc/html/t9-cannon-cpp.html create mode 100644 doc/html/t9-cannon-h.html create mode 100644 doc/html/t9-lcdrange-cpp.html create mode 100644 doc/html/t9-lcdrange-h.html create mode 100644 doc/html/t9-main-cpp.html create mode 100644 doc/html/t9.png create mode 100644 doc/html/t9_1.png create mode 100644 doc/html/t9_2.png create mode 100644 doc/html/tabdialog-example.html create mode 100644 doc/html/table-bigtable-main-cpp.html create mode 100644 doc/html/table-examples.html create mode 100644 doc/html/table-small-table-demo-main-cpp.html create mode 100644 doc/html/table-statistics-statistics-cpp.html create mode 100644 doc/html/table.html create mode 100644 doc/html/tablet-example.html create mode 100644 doc/html/tagreader-example.html create mode 100644 doc/html/tagreader-with-features-example.html create mode 100644 doc/html/templates.html create mode 100644 doc/html/tetrix-example.html create mode 100644 doc/html/text.html create mode 100644 doc/html/textedit-example.html create mode 100644 doc/html/themes-example.html create mode 100644 doc/html/thread.html create mode 100644 doc/html/threads.html create mode 100644 doc/html/tictac-example.html create mode 100644 doc/html/time.html create mode 100644 doc/html/timers.html create mode 100644 doc/html/titleindex create mode 100644 doc/html/toggleaction-example.html create mode 100644 doc/html/toolbar.png create mode 100644 doc/html/toolbar1.png create mode 100644 doc/html/tools-list.html create mode 100644 doc/html/tools.html create mode 100644 doc/html/tooltip-example.html create mode 100644 doc/html/toplevel-example.html create mode 100644 doc/html/trademarks.html create mode 100644 doc/html/trivial-nsplugin-example.html create mode 100644 doc/html/troll.html create mode 100644 doc/html/tt1_en.png create mode 100644 doc/html/tt1_la.png create mode 100644 doc/html/tt2_en.png create mode 100644 doc/html/tt2_fr.png create mode 100644 doc/html/tt2_nl.png create mode 100644 doc/html/tt3_10_en.png create mode 100644 doc/html/tt3_10_pt_bad.png create mode 100644 doc/html/tt3_10_pt_good.png create mode 100644 doc/html/tt3_11_about_pt.png create mode 100644 doc/html/tt3_11_en.png create mode 100644 doc/html/tt3_11_pt.png create mode 100644 doc/html/tutorial.html create mode 100644 doc/html/tutorial1-01.html create mode 100644 doc/html/tutorial1-02.html create mode 100644 doc/html/tutorial1-03.html create mode 100644 doc/html/tutorial1-04.html create mode 100644 doc/html/tutorial1-05.html create mode 100644 doc/html/tutorial1-06.html create mode 100644 doc/html/tutorial1-07.html create mode 100644 doc/html/tutorial1-08.html create mode 100644 doc/html/tutorial1-09.html create mode 100644 doc/html/tutorial1-10.html create mode 100644 doc/html/tutorial1-11.html create mode 100644 doc/html/tutorial1-12.html create mode 100644 doc/html/tutorial1-13.html create mode 100644 doc/html/tutorial1-14.html create mode 100644 doc/html/tutorial2-01.html create mode 100644 doc/html/tutorial2-02.html create mode 100644 doc/html/tutorial2-03.html create mode 100644 doc/html/tutorial2-04.html create mode 100644 doc/html/tutorial2-05.html create mode 100644 doc/html/tutorial2-06.html create mode 100644 doc/html/tutorial2-07.html create mode 100644 doc/html/tutorial2-08.html create mode 100644 doc/html/tutorial2-09.html create mode 100644 doc/html/tutorial2-10.html create mode 100644 doc/html/tutorial2-11.html create mode 100644 doc/html/tutorial2.html create mode 100644 doc/html/uic.html create mode 100644 doc/html/unicode.html create mode 100644 doc/html/unsmooth.png create mode 100644 doc/html/validateaccelerators.png create mode 100644 doc/html/validatephrases.png create mode 100644 doc/html/validatepunctuation.png create mode 100644 doc/html/web.png create mode 100644 doc/html/whatsthis create mode 100644 doc/html/whatsthis.png create mode 100644 doc/html/widgets-example.html create mode 100644 doc/html/win-objexplor1.png create mode 100644 doc/html/win-objexplor2.png create mode 100644 doc/html/win-projoverview.png create mode 100644 doc/html/win-propedit1.png create mode 100644 doc/html/win-propedit2.png create mode 100644 doc/html/winsystem.html create mode 100644 doc/html/wizard-example.html create mode 100644 doc/html/wizard-wizard-cpp.html create mode 100644 doc/html/wizard-wizard-h.html create mode 100644 doc/html/workspace.html create mode 100644 doc/html/xform-example.html create mode 100644 doc/html/xform.png create mode 100644 doc/html/xml-examples.html create mode 100644 doc/html/xml-sax-features-walkthrough.html create mode 100644 doc/html/xml-sax-walkthrough.html create mode 100644 doc/html/xml-tools.html create mode 100644 doc/html/xml.html create mode 100644 doc/html/y2k.html (limited to 'doc/html') diff --git a/doc/html/3rdparty.html b/doc/html/3rdparty.html new file mode 100644 index 00000000..c24db563 --- /dev/null +++ b/doc/html/3rdparty.html @@ -0,0 +1,106 @@ + + + + + +3rd Party Licenses used in TQt + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

3rd Party Licenses used in TQt

+ + +

+

Run configure -help to see any options that may be available for +controlling the use of these libraries. +

+

+ + +

Freetype 2 (freetype) +

+

The FreeType project is a team of volunteers who develop free, portable and high-quality software solutions for digital typography. We specifically target embedded systems and focus on bringing small, efficient and ubitquitous products. -- quoted from 3rdparty/freetype/docs/freetype2.html. +

See 3rdparty/freetype/docs/FIL.txt and 3rdparty/freetype/docs/GPL.txt for license details. +

See also the files in 3rdparty/opentype which are used by +Freetype. +

The Independent JPEG Group's JPEG software (libjpeg) +

+

This package contains C software to implement JPEG image compression and decompression. JPEG (pronounced "jay-peg") is a standardized compression method for full-color and gray-scale images. JPEG is intended for compressing "real-world" scenes; line drawings, cartoons and other non-realistic images are not its strong suit. JPEG is lossy, meaning that the output image is not exactly identical to the input image. -- quoted from 3rdparty/libjpeg/README. +

See 3rdparty/libjpeg/README for license details. +

Multiple-image Network Graphics (MNG) Reference Library (libmng) +

+

The libmng library supports decoding, displaying, encoding, and various other manipulations of the Multiple-image Network Graphics (MNG) format image files. It uses the zlib compression library, and optionally the JPEG library by the Independent JPEG Group (IJG) and/or lcms (little cms), a color-management library by Marti Maria Saguer. +-- quoted from 3rdparty/libmng/doc/libmng.txt. +

See 3rdparty/libmng/LICENSE for license details. +

PNG reference library (libpng) +

+

Libpng was written as a companion to the PNG specification, as a way of reducing the amount of time and effort it takes to support the PNG file format in application programs. -- quoted from 3rdparty/libpng/libpng.txt. +

See 3rdparty/libpng/LICENSE for license details. +

Data compression library (zlib) +

+

zlib is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 -- quoted from 3rdparty/zlib/README. +

See 3rdparty/zlib/README for license details. +

Font files for TQt/Embedded +

+

The Helvetica BDF font files supplied with TQt/Embedded are distributed under the following highly permissive license. We recommend that all TQt/Embedded installations that use these font files also acknowledge this contribution, and quote this license statement in an appendix to the documentation. -- located in lib/fonts +

Copyright 1984-1989, 1994 Adobe Systems Incorporated. +

Copyright 1988, 1994 Digital Etquipment Corporation. +

Adobe is a trademark of Adobe Systems Incorporated which may be +registered in certain jurisdictions. +Permission to use these trademarks is hereby granted only in +association with the images described in this file. +

Permission to use, copy, modify, distribute and sell this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notices appear in all +copies and that both those copyright notices and this permission +notice appear in supporting documentation, and that the names of +Adobe Systems and Digital Etquipment Corporation not be used in +advertising or publicity pertaining to distribution of the software +without specific, written prior permission. Adobe Systems and +Digital Etquipment Corporation make no representations about the +suitability of this software for any purpose. It is provided "as +is" without express or implied warranty. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/aboutqt.html b/doc/html/aboutqt.html new file mode 100644 index 00000000..be2173f9 --- /dev/null +++ b/doc/html/aboutqt.html @@ -0,0 +1,81 @@ + + + + + +About TQt + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

About TQt

+ + + +

TQt is a multiplatform C++ GUI toolkit created and maintained byTrolltech. It provides application developers with +all the functionality needed to build applications with +state-of-the-art graphical user interfaces. TQt is fully +object-oriented, easily extensible, and allows true component +programming. Read the Whitepaper for a comprehensive technical overview. +

Since its commercial introduction in early 1996, TQt has formed the +basis of many thousands of successful applications worldwide. TQt is +also the basis of the popular KDE +Linux desktop environment, a standard component of all major Linux +distributions. See our Customer Success Stories for some examples of commercial TQt +development. +

TQt is supported on the following platforms: +

+

TQt is released in different editions: +

+

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/abstract-connections.png b/doc/html/abstract-connections.png new file mode 100644 index 00000000..18d2f4e3 Binary files /dev/null and b/doc/html/abstract-connections.png differ diff --git a/doc/html/abstractwidgets.html b/doc/html/abstractwidgets.html new file mode 100644 index 00000000..1b426c92 --- /dev/null +++ b/doc/html/abstractwidgets.html @@ -0,0 +1,56 @@ + + + + + +Abstract Widget Classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Abstract Widget Classes

+ + +

These classes are abstract widgets; they are generally not usable in +themselves, but provide functionality that can be used by inheriting +these classes. +

+

+
TQButtonThe abstract base class of button widgets, providing functionality common to buttons +
TQCanvas2D area that can contain TQCanvasItem objects +
TQDialogThe base class of dialog windows +
TQFrameThe base class of widgets that can have a frame +
TQGridViewAbstract base for fixed-size grids +
TQScrollViewScrolling area with on-demand scroll bars +
TQWidgetThe base class of all user interface objects +
TQWizardFramework for wizard dialogs +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/accelerators.html b/doc/html/accelerators.html new file mode 100644 index 00000000..7bdff46a --- /dev/null +++ b/doc/html/accelerators.html @@ -0,0 +1,126 @@ + + + + + +Standard Accelerator Keys + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Standard Accelerator Keys

+ + +

+

Applications invariably need to define accelerator keys for actions. +TQt fully supports accelerators, for example with TQAccel::shortcutKey(). +

Here are Microsoft's recommendations for accelerator keys, with +comments about the Open Group's recommendations where they exist +and differ. For most commands, the Open Group either has no advice or +agrees with Microsoft. +

The emboldened letter plus Alt is Microsoft's recommended choice, and +we recommend supporting it. For an Apply button, for example, we +recommend TQButton::setText( tr("&Apply") ); +

If you have conflicting commands (e.g. About and Apply buttons in the +same dialog), you must decide for yourself. +

+

There are also a lot of other keys and actions (that use other +modifier keys than Alt). See the Microsoft and The Open Group +documentation for details. +

The Microsoft book has ISBN 0735605661. The corresponding Open Group +book is very hard to find, rather expensive and we cannot recommend +it. However, if you really want it, OGPubs@opengroup.org might be able +to help. Ask them for ISBN 1859121047. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/aclock-example.html b/doc/html/aclock-example.html new file mode 100644 index 00000000..c7c95a23 --- /dev/null +++ b/doc/html/aclock-example.html @@ -0,0 +1,279 @@ + + + + + +Analog Clock + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Analog Clock

+ + +

+This example displays an analog clock widget. +


+

Header file: +

/****************************************************************************
+** $Id: qt/aclock.h   3.3.8   edited Jan 11 14:36 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef ACLOCK_H
+#define ACLOCK_H
+
+#include <qwidget.h>
+#include <qdatetime.h>
+
+class TQTimer;
+class AnalogClock : public TQWidget              // analog clock widget
+{
+    Q_OBJECT
+public:
+    AnalogClock( TQWidget *parent=0, const char *name=0 );
+    void setAutoMask(bool b);
+
+protected:
+    void updateMask();
+    void paintEvent( TQPaintEvent *);
+    void mousePressEvent( TQMouseEvent *);
+    void mouseMoveEvent( TQMouseEvent *);
+    void drawClock( TQPainter* );
+
+private slots:
+    void timeout();
+
+public slots:
+    void setTime( const TQTime & t );
+
+private:
+    TQPoint clickPos;
+    TQTime time;
+    TQTimer *internalTimer;
+};
+
+
+#endif // ACLOCK_H
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/aclock.cpp   3.3.8   edited Jan 11 14:36 $
+**
+** Copyright (C) 1992-2007 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 "aclock.h"
+#include <qtimer.h>
+#include <qpainter.h>
+#include <qbitmap.h>
+
+//
+// Constructs an analog clock widget that uses an internal TQTimer.
+//
+
+AnalogClock::AnalogClock( TQWidget *parent, const char *name )
+    : TQWidget( parent, name )
+{
+    time = TQTime::currentTime();                // get current time
+    internalTimer = new TQTimer( this ); // create internal timer
+    connect( internalTimer, SIGNAL(timeout()), SLOT(timeout()) );
+    internalTimer->start( 5000 );               // emit signal every 5 seconds
+}
+
+void AnalogClock::mousePressEvent( TQMouseEvent *e )
+{
+    if(isTopLevel())
+        clickPos = e->pos() + TQPoint(geometry().topLeft() - frameGeometry().topLeft());
+}
+
+void AnalogClock::mouseMoveEvent( TQMouseEvent *e )
+{
+    if(isTopLevel())
+        move( e->globalPos() - clickPos );
+}
+
+//
+// The TQTimer::timeout() signal is received by this slot.
+//
+
+//
+// When we set an explicit time we don't want the timeout() slot to be
+// called anymore as this relies on currentTime()
+//
+void AnalogClock::setTime( const TQTime & t )
+{
+    time = t;
+    disconnect( internalTimer, SIGNAL(timeout()), this, SLOT(timeout()) );
+    if (autoMask())
+        updateMask();
+    else
+        update();
+}
+
+
+void AnalogClock::timeout()
+{
+    TQTime old_time = time;
+    time = TQTime::currentTime();
+    if ( old_time.minute() != time.minute()
+        || old_time.hour() != time.hour() ) {   // minute or hour has changed
+        if (autoMask())
+            updateMask();
+        else
+            update();
+    }
+}
+
+
+void AnalogClock::paintEvent( TQPaintEvent * )
+{
+    if ( autoMask() )
+        return;
+    TQPainter paint( this );
+    paint.setBrush( colorGroup().foreground() );
+    drawClock( &paint );
+}
+
+// If the clock is transparent, we use updateMask()
+// instead of paintEvent()
+
+void AnalogClock::updateMask()  // paint clock mask
+{
+    TQBitmap bm( size() );
+    bm.fill( color0 );                  //transparent
+
+    TQPainter paint;
+    paint.begin( &bm, this );
+    paint.setBrush( color1 );           // use non-transparent color
+    paint.setPen( color1 );
+
+    drawClock( &paint );
+
+    paint.end();
+    setMask( bm );
+}
+
+//
+// The clock is painted using a 1000x1000 square coordinate system, in
+// the a centered square, as big as possible.  The painter's pen and
+// brush colors are used.
+//
+void AnalogClock::drawClock( TQPainter *paint )
+{
+    paint->save();
+
+    paint->setWindow( -500,-500, 1000,1000 );
+
+    TQRect v = paint->viewport();
+    int d = TQMIN( v.width(), v.height() );
+    paint->setViewport( v.left() + (v.width()-d)/2,
+                        v.top() + (v.height()-d)/2, d, d );
+
+    TQPointArray pts;
+
+    paint->save();
+    paint->rotate( 30*(time.hour()%12-3) + time.minute()/2 );
+    pts.setPoints( 4, -20,0,  0,-20, 300,0, 0,20 );
+    paint->drawConvexPolygon( pts );
+    paint->restore();
+
+    paint->save();
+    paint->rotate( (time.minute()-15)*6 );
+    pts.setPoints( 4, -10,0, 0,-10, 400,0, 0,10 );
+    paint->drawConvexPolygon( pts );
+    paint->restore();
+
+    for ( int i=0; i<12; i++ ) {
+        paint->drawLine( 440,0, 460,0 );
+        paint->rotate( 30 );
+    }
+
+    paint->restore();
+}
+
+
+void AnalogClock::setAutoMask(bool b)
+{
+    if (b)
+        setBackgroundMode( PaletteForeground );
+    else
+        setBackgroundMode( PaletteBackground );
+    TQWidget::setAutoMask(b);
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:36 $
+**
+** Copyright (C) 1992-2007 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 "aclock.h"
+#include <qapplication.h>
+
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+    AnalogClock *clock = new AnalogClock;
+    if ( argc == 2 && strcmp( argv[1], "-transparent" ) == 0 )
+        clock->setAutoMask( TRUE );
+    clock->resize( 100, 100 );
+    a.setMainWidget( clock );
+    clock->setCaption("TQt Example - Analog Clock");
+    clock->show();
+    int result = a.exec();
+    delete clock;
+    return result;
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/activeqt-dotnet.html b/doc/html/activeqt-dotnet.html new file mode 100644 index 00000000..a65d0d3c --- /dev/null +++ b/doc/html/activeqt-dotnet.html @@ -0,0 +1,459 @@ + + + + + +Walkthrough: Using TQt objects in Microsoft .NET + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Walkthrough: Using TQt objects in Microsoft .NET

+ + + + + + + + +

Introduction +

+

In the following walkthrough we will show how TQt objects can be used +in a .NET environment, and how .NET objects can be used in a TQt +environment. +

TQt vs .NET +

+

TQt is a C++ library and is compiled into traditional, native +binaries that make full use of the performance provided by the +runtime environment. +

One of the key concepts of .NET is the idea of "intermediate language +code" - the source code is compiled into a bytecode format, and at +runtime, that bytecode is executed in a virtual machine - the Common Language Runtime (CLR). +

Another key concept is that of managed code. This is essentially +intermediate language code written in such a way that the CLR can take +care of the memory management, i.e. the CLR will do automatic garbage +collection, so the application code does not need to explicitly free +the memory for unused objects. +

The MS compilers for C# and VB.NET will only produce managed +code. Such programs cannot directly call normal, native functions +or classes. (1) +

The MS C++ compiler for .NET on the other hand, can produce both +normal and managed code. To write a C++ class that can be compiled +into managed code, the developer must flag the class as managed using +the __gc keyword, and restrict the code to only use the subset of +C++ known as "Managed Extensions for C++", or MC++ for short. The +advantage is that MC++ code can freely call and use normal C++ +functions and classes. And it also works the other way around: normal +C++ code can call managed functions and use managed classes (e.g. the +entire .NET framework class library), including managed functions and +classes implemented in C# or VB.NET. This feature of mixing managed +and normal C++ code immensely eases the interoperability with .NET, +and is by Microsoft referred to as the "It Just Works" (IJW) feature. +

This document demonstrates two different ways of integrating normal +C++ code (that uses TQt) with managed .NET code. First, the manual way +is presented, which includes using a thin MC++ wrapper class around +the normal TQt/C++ class. Then, the automated way is presented, which +utilizes the ActiveTQt framework as a generic bridge. The advantage of +the first method is that it gives the application developer full +control, while the second method retquires less coding and relieves the +developer of dealing with the conversion between managed and normal +data objects. +

The impatient reader, who right away wants to see a TQPushButton and a +custom TQt widget (TQAxWidget2) run in a .NET GUI application is referred to the example +directory of ActiveTQt. It contains the result of this walkthrough +using both C# and VB.NET, created with Visual Studio.NET (not 2003). +Load examples/dotnet/walkthrough/csharp.csproj, +examples/dotnet/walkthrough/vb.vbproj +(2) +or examples/dotnet/wrapper/wrapper.sln into the IDE and run +the solution. +

Walkthrough: .NET interop with MC++ and IJW +

+

Normal C++ classes and functions can be used from managed .NET code by +providing thin wrapper classes written in MC++. The wrapper class will +take care of forwarding the calls to the normal C++ functions or +methods, and converting parameter data as necessary. Since the wrapper +class is a managed class, it can be used without further ado in any +managed .NET application, whether written in C#, VB.NET, MC++ or other +managed programming language. +

+ +

    // native TQt/C++ class
+    class Worker : public TQObject
+    {
+        Q_OBJECT
+        Q_PROPERTY(TQString statusString READ statusString WRITE setStatusString)
+    public:
+        Worker();
+
+        TQString statusString() const;
+
+    public slots:
+        void setStatusString(const TQString &string);
+
+    signals:
+        void statusStringChanged(const TQString &string);
+
+    private:
+        TQString status;
+    };
+
+

The TQt class has nothing unusual for TQt users, and as even the TQt +specialities like Q_PROPERTY, slots and signals are +implemented with straight C++ they don't cause any trouble when +compiling this class with any C++ compiler. +

+ +

    class Worker;
+
+    // .NET class
+    public __gc class netWorker
+    {
+    public:
+        netWorker();
+        ~netWorker();
+
+        __property String *get_StatusString();
+        __property void set_StatusString(String *string);
+
+        __event void statusStringChanged(String *args);
+
+    private:
+        Worker *workerObject;
+    };
+
+

The .NET wrapper class uses keywords that are part of MC++ to indicate +that the class is managed/garbage collected (__gc), and that StatusString should be accessible as a property in languages that +support this concept (__property). We also declare an event +function statusStringChanged(String*) (__event), the +equivalent of the respective signal in the TQt class. +

Before we can start implementing the wrapper class we need a way to +convert TQt's datatypes (and potentionally your own) into .NET +datatypes, e.g. TQString objects need to be converted into objects +of type String*. +

When operating on managed objects in normal C++ code, a little extra +care must be taken because of the CLR's garbage collection. A normal +pointer variable should not (3) be used to refer to a managed +object. The reason is that the garbage collection can kick in at any +time and move the object to another place on the heap, leaving you +with an invalid pointer. +

However, two methods are provided that solves this problem easily. The +first is to use a pinned pointer, i.e. declare the pointer variable +with the __pin keyword. This guarantees that the object pointed to +will not be moved by the garbage collector. It is recommended that +this method not be used to keep a references to managed objects for a +long time, since it will decrease the efficiency of the garbage +collector. The second way is to use the gcroot smartpointer +template type. This lets you create safe pointers to managed +objects. E.g. a variable of type gcroot<String> will always point +to the String object, even if it has been moved by the garbage +collector, and it can be used just like a normal pointer. +

+ +

    #include <qstring.h>
+
+    #using <mscorlib.dll>
+    #include <vcclr.h>
+
+    using namespace System;
+
+    String *TQStringToString(const TQString &qstring)
+    {
+        return new String(qstring.ucs2());
+    }
+
+

    TQString StringToTQString(String *string)
+    {
+        wchar_t __pin *chars = PtrToStringChars(string);
+        return TQString::fromUcs2(chars);
+    }
+
+

The convertor functions can then be used in the wrapper class +implementation to call the functions in the native C++ class. +

+ +

    #include "networker.h"
+    #include "worker.h"
+    #include "tools.h"
+
+    netWorker::netWorker()
+    {
+        workerObject = new Worker();
+    }
+
+

    netWorker::~netWorker()
+    {
+        delete workerObject;
+    }
+
+

The constructor and destructor simply create and destroy the TQt +object wrapped using the C++ operators new and delete. +

    String *netWorker::get_StatusString()
+    {
+        return TQStringToString(workerObject->statusString());
+    }
+
+

The netWorker class delegates calls from the .NET code to the native +code. Although the transition between those two worlds implies a small +performance hit for each function call, and for the type conversion, +this should be negligible since we are anyway going to run within the +CLR. +

    void netWorker::set_StatusString(String *string)
+    {
+        workerObject->setStatusString(StringToTQString(string));
+        __raise statusStringChanged(string);
+    }
+
+

The property setter calls the native TQt class before firing the +event using the __raise keyword. +

This wrapper class can now be used in .NET code, e.g. using C++, C#, +Visual Basic or any other programming language available for .NET. +

+ +

    using System;
+
+    namespace WrapperApp
+    {
+            class App
+            {
+                    void Run()
+                    {
+                            netWorker worker = new netWorker();
+
+                            worker.statusStringChanged += new netWorker.__Delegate_statusStringChanged(onStatusStringChanged);
+
+                            System.Console.Out.WriteLine(worker.StatusString);
+
+                            System.Console.Out.WriteLine("Working cycle begins...");
+                            worker.StatusString = "Working";
+                            worker.StatusString = "Lunch Break";
+                            worker.StatusString = "Working";
+                            worker.StatusString = "Idle";
+                            System.Console.Out.WriteLine("Working cycle ends...");
+                    }
+
+                    private void onStatusStringChanged(string str)
+                    {
+                            System.Console.Out.WriteLine(str);
+                    }
+
+                    [STAThread]
+                    static void Main(string[] args)
+                    {
+                            App app = new App();
+                            app.Run();
+                    }
+            }
+    }
+
+

Walkthrough: .NET/COM Interop with ActiveTQt +

+

Fortunately .NET provides a generic wrapper for COM objects, the +Runtime Callable Wrapper (RCW). This RCW is a proxy for the +COM object and is generated by the CLR when a .NET Framework client +activates a COM object. This provides a generic way to reuse COM +objects in a .NET Framework project. +

Making a TQObject class into a COM object is easily achieved with +ActiveTQt and demonstrated in the examples. The walkthrough will use the TQt classes implemented +in those examples, so the first thing to do is to make sure that those +examples have been built correctly, e.g. by opening the demonstration pages in Internet +Explorer to verify that the controls are functional. +

Starting a Project +

+

Start Visual Studio.NET, and create a new C# project for writing a +Windows application. This will present you with an empty form in +Visual Studio's dialog editor. You should see the toolbox, which +presents you with a number of available controls and objects in +different categories. If you right-click on the toolbox it allows +you to add new tabs. We will add the tab "TQt". +

Importing TQt Widgets +

+

The category only has a pointer tool by default, and we have to add +the TQt objects we want to use in our form. Right-click on the empty +space, and select "Customize". This opens a dialog that has two +tabs, "COM Components" and ".NET Framework Components". We used +ActiveTQt to wrap TQWidgets into COM objects, so we select the "COM +Components" page, and look for the classes we want to use, e.g. +"TQPushButton" and "TQAxWidget2". +

When we select those widgets and close the dialog the two widgets +will now be available from the toolbox as grey squares with their +name next to it (4) . +

Using TQt Widgets +

+

We can now add an instance of TQAxWidget2 and a TQPushButton to +the form. Visual Studio will automatically generate the RCW for the +object servers. The TQAxWidget2 instance takes most of the upper +part of the form, with the TQPushButton in the lower right corner. +

In the property editor of Visual Studio we can modify the properties +of our controls - TQPushButton exposes the TQWidget API and has many +properties, while TQAxWidget2 has only the Visual Studio standard +properties in addition to its own property "lineWidth" in the +"Miscellaneous" category. The objects are named "axTQPushButton1" and +"axTQAxWidget21", and since especially the last name is a bit +confusing we rename the objects to "resetButton" and "circleWidget". +

We can also change the TQt properties, e.g. set the "text" property +of the resetButton to "Reset", and the "lineWidth" property of the +circleWidget to 5. We can also put those objects into the layout +system that Visual Studio's dialog editor provides, e.g. by setting +the anchors of the circleWidget to "Left, Top, Right, Bottom", and +the anchors of the resetButton to "Bottom, Right". +

Now we can compile and start the project, which will open a user +interface with our two TQt widgets. If we can resize the dialog, +the widgets will resize appropriately. +

Handling TQt Signals +

+

We will now implement event handlers for the widgets. Select the +circleWidget and select the "Events" page in the property +editor. The widget exposes events because the TQAxWidget2 class has +the "StockEvents" attribute set in its class definition. We implement +the event handler circleClicked for the ClickEvent to increase +the line width by one for every click: +

+ +

                    private void circleClicked(object sender, System.EventArgs e)
+                    {
+                            this.circleWidget.lineWidth++;
+                    }
+
+

In general we can implement a default event handler by double +clicking on the widget in the form, but the default events for +our widgets are right now not defined. +

We will also implement an event handler for the clicked signal +emitted by TQPushButton. Add the event handler resetLineWidth to +the clicked event, and implement the generated function: +

                    private void resetLineWidth(object sender, System.EventArgs e)
+                    {
+                            this.circleWidget.lineWidth = 1;
+                            this.resetButton.setFocus();
+                    }
+
+

We reset the property to 1, and also call the setFocus() slot +to simulate the user style on Windows, where a button grabs focus +when you click it (so that you can click it again with the spacebar). +

If we now compile and run the project we can click on the circle +widget to increase its line width, and press the reset button to +set the line width back to 1. +

Summary +

+

Using ActiveTQt as a universal interoperability bridge between the +.NET world and the native world of TQt is very easy, and makes it +often unnecessary to implement a lot of handwritten wrapper classes. +Instead, the TQAxFactory implementation in the otherwise completely +cross-platform TQt project provides the glue that .NET needs to to +generate the RCW. +

If this is not sufficient we can implement our own wrapper classes +thanks to the C++ extensions provided by Microsoft. +

Limitations +

+

All the limitations when using ActiveTQt are implied when using this +technique to interoperate with .NET, e.g. the datatypes we can use +in the APIs can only be those supported by ActiveTQt and COM. However, +since this includes subclasses of TQObject and TQWidget we can wrap +any of our datatypes into a TQObject subclass to make its API +available to .NET. This has the positive side effect that the same +API is automatically available in TQSA, the cross platform +scripting solution for TQt applications, and to COM clients in general. +

When using the "IJW" method, in priciple the only limitation is the +time retquired to write the wrapper classes and data type conversion +functions. +

Performance Considerations +

+

Every call from CLR bytecode to native code implies a small +performance hit, and necessary type conversions introduce an +additional delay with every layer that exists between the two +frameworks. Consequently every approach to mix .NET and native +code should try to minimize the communication necessary between +the different worlds. +

As ActiveTQt introduces three layers at once - the RCW, COM and finally +ActiveTQt itself - the performance penalty when using the generic +TQt/ActiveTQt/COM/RCW/.NET bridge is larger than when using a +hand-crafted IJW-wrapper class. The execution speed however is still +sufficient for connecting to and modifying interactive elements in a +user interface, and as soon as the benefit of using TQt and C++ to +implement and compile performance critical algorithms into native code +kicks in, ActiveTQt becomes a valid choice for making even non-visual +parts of your application accessible to .NET. +

+


+
  1. +The .NET framework provides Platform Invocation +Services - P/Invoke - that enable managed code to call native C (not +C++) functions located in DLLs directly. The resulting application +then becomes partially unmanaged. Back...
  2. + +You will notice that in the generated code the following line is +commented out:
    +    ' VB is case insensitive, but our C++ controls are not.
    +    ' Me.resetButton.enabled = True
    +    
    + +This line is regenerated without comment whenever you change the +dialog, in which case you have to comment it out again to be able +to run the project. This is a bug in the original version of +Visual Studio.NET, and is fixed in the 2003 edition. + Back...
  3. +Indeed, the compiler will in +many cases disallow it. Back...
  4. +Icons could be added by modifying the +way the controls register themselves. Back...
+

See also The TQAxServer Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/activeqt-examples.html b/doc/html/activeqt-examples.html new file mode 100644 index 00000000..16f8fc18 --- /dev/null +++ b/doc/html/activeqt-examples.html @@ -0,0 +1,49 @@ + + + + + +ActiveTQt Examples + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

ActiveTQt Examples

+ + +The following pages list example programs for using ActiveX controls +in a TQt application, and for writing ActiveX controls using TQt. +

+ + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/activeqt-tools-dumpdoc.html b/doc/html/activeqt-tools-dumpdoc.html new file mode 100644 index 00000000..c6a95a48 --- /dev/null +++ b/doc/html/activeqt-tools-dumpdoc.html @@ -0,0 +1,74 @@ + + + + + +The DumpDoc Tool + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

The DumpDoc Tool

+ + + +The dumpcoc tool generates TQt-style documentation for any +COM object and writes it into the file specified. +

Call dumpdoc with the following command line parameters: +

+ + + + + +
Option +Result +
-o file +Writes output to file +
object +Generate documentation for object +
-v +Print version information +
-h +Print help +
+

object must be an object installed on the local machine (ie. +remote objects are not supported), and can include subobjects +accessible through properties, ie. +Outlook.Application/Session/CurrentUser +

The generated file will be an HTML file using TQt documentation +style. +

To build the tool you must first build the +TQAxContainer library. +Then run your make tool in tools/dumpdoc. +

See also ActiveTQt Tools. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/activeqt-tools-idc.html b/doc/html/activeqt-tools-idc.html new file mode 100644 index 00000000..aeec4bee --- /dev/null +++ b/doc/html/activeqt-tools-idc.html @@ -0,0 +1,75 @@ + + + + + +The IDC Tool + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

The IDC Tool

+ + + +The IDC tool is part of the ActiveTQt build system and makes +it possible to turn any TQt binary into a full COM object server +with only a few lines of code. +

IDC understands the following command line parameters: +

+ + + + + + +
Option +Result +
dll -idl idl -version x.y +Writes the IDL of the server dll to the file idl. The +type library wll have version x.y. +
dll -tlb tlb +Replaces the type library in dll with tlb +
-v +Print version information +
-regserver dll +Register the COM server dll +
-unregserver +Unregister the COM server dll +
+

It is usually never necessary to invoke IDC manually, as the +qmake build system takes care of adding the retquired post +processing steps to the build process. See the +ActiveTQt build system +documentation for details. +

See also ActiveTQt Tools. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/activeqt-tools-testcon.html b/doc/html/activeqt-tools-testcon.html new file mode 100644 index 00000000..ca30181a --- /dev/null +++ b/doc/html/activeqt-tools-testcon.html @@ -0,0 +1,70 @@ + + + + + +An ActiveX Test Container + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

An ActiveX Test Container

+ + + +This application implements a generic test container for ActiveX +controls. You can insert ActiveX controls installed on your +system, and execute methods and modify properties. The container +will log information about events and property changes as well +as debug output in the log window. +

The GUI has been implemented utilizing the TQt Designer integration +of the TQAxContainer module. Parts of the code use internals of the TQt +meta object and ActiveTQt framework and are not recommended to be used in +application code. +

Use the application to view the slots, signals and porperties +available through the TQAxWidget class when instantiated with a +certain ActiveX, and to test ActiveX controls you implement or +want to use in your TQt application. +

The application can load and execute script files in JavaScript, +VBScript, Perl and Python to program the controls loaded. Example +script files using the TQAxWidget2 class are available in the scripts +subdirectory. +

Note that the qmake project of this example includes a resource file +testcon.rc with a version resource. This is retquired by some +ActiveX controls (ie. Shockwave ActiveX Controls), which might crash +or misbehave otherwise if such version information is missing. +

To build the tool you must first build the +TQAxContainer library. +Then run your make tool in tools/testcon and +run the resulting testcon.exe. +

See also ActiveTQt Tools. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/activeqt-tools.html b/doc/html/activeqt-tools.html new file mode 100644 index 00000000..8309f2c5 --- /dev/null +++ b/doc/html/activeqt-tools.html @@ -0,0 +1,49 @@ + + + + + +ActiveTQt Tools + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

ActiveTQt Tools

+ + +The following page list tool programs for ActiveTQt. + +

+
The DumpDoc Tool +
The IDC Tool +
An ActiveX Test Container +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/activeqt.html b/doc/html/activeqt.html new file mode 100644 index 00000000..c33b35c2 --- /dev/null +++ b/doc/html/activeqt.html @@ -0,0 +1,86 @@ + + + + + +The ActiveTQt framework + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

The ActiveTQt framework

+ + +

+

These modules are part of the TQt + Enterprise Edition and are not part of the Free or +Non-Commercial Editions. +

TQt's ActiveX support allows TQt/Windows developers to: +

    +
  1. Access and use ActiveX controls provided by any ActiveX server +in their TQt applications. +
  2. Make their TQt applications available as ActiveX servers, with +any number of TQt widgets as ActiveX controls. +
+

ActiveTQt Modules +

+

The framework consists of two modules. +

TQAxContainer +

+

The TQAxContainer module is a static +library implementing TQObject and TQWidget subclasses, TQAxObject and +TQAxWidget, that act as a containers for COM objects and ActiveX +controls. If built against a shared TQt library TQAxWidget integrates +as a widget plugin into TQt Designer. +

The module also provides classes TQAxScript, TQAxScriptManager and +TQAxScriptEngine that allow using Windows Script Host technologies to +script COM objects embedded in the TQt applications. +

Examples include a +web browser application embedding Microsoft Internet Explorer, and an +address book example synchronizing the contents with Microsoft +Outlook. +

TQAxServer +

+

The TQAxServer module is a +static library that implements functionality for in-process and +executable COM servers. This module provides the TQAxAggregated, +TQAxBindable and TQAxFactory classes. +

Examples include in- and +out-of-process servers providing different TQWidget subclasses as +ActiveX controls, as well as a walkthrough how to use those objects in a .NET environment. +

Additional Information +

+

+ + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/addressbook-example.html b/doc/html/addressbook-example.html new file mode 100644 index 00000000..d9c38d12 --- /dev/null +++ b/doc/html/addressbook-example.html @@ -0,0 +1,666 @@ + + + + + +Simple Addressbook + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Simple Addressbook

+ + +

+This examples shows how to write a very simple, but complete application +using an addressbook as the example. +


+

Header file of the mainwindow: +

/****************************************************************************
+** $Id: qt/mainwindow.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef AB_MAINWINDOW_H
+#define AB_MAINWINDOW_H
+
+#include <qmainwindow.h>
+#include <qstring.h>
+
+class TQToolBar;
+class TQPopupMenu;
+class ABCentralWidget;
+
+class ABMainWindow: public TQMainWindow
+{
+    Q_OBJECT
+
+public:
+    ABMainWindow();
+    ~ABMainWindow();
+
+protected slots:
+    void fileNew();
+    void fileOpen();
+    void fileSave();
+    void fileSaveAs();
+    void filePrint();
+    void closeWindow();
+
+protected:
+    void setupMenuBar();
+    void setupFileTools();
+    void setupStatusBar();
+    void setupCentralWidget();
+
+    TQToolBar *fileTools;
+    TQString filename;
+    ABCentralWidget *view;
+
+};
+
+
+#endif
+
+ +


+

Implementation of the mainwindow: +

/****************************************************************************
+** $Id: qt/mainwindow.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "mainwindow.h"
+#include "centralwidget.h"
+
+#include <qtoolbar.h>
+#include <qtoolbutton.h>
+#include <qpopupmenu.h>
+#include <qmenubar.h>
+#include <qstatusbar.h>
+#include <qapplication.h>
+#include <qfiledialog.h>
+
+ABMainWindow::ABMainWindow()
+    : TQMainWindow( 0, "example addressbook application" ),
+      filename( TQString::null )
+{
+    setupMenuBar();
+    setupFileTools();
+    setupStatusBar();
+    setupCentralWidget();
+}
+
+
+ABMainWindow::~ABMainWindow()
+{
+}
+
+void ABMainWindow::setupMenuBar()
+{
+    TQPopupMenu *file = new TQPopupMenu( this );
+    menuBar()->insertItem( "&File", file );
+
+    file->insertItem( "New", this, SLOT( fileNew() ), CTRL + Key_N );
+    file->insertItem( TQPixmap( "fileopen.xpm" ), "Open", this, SLOT( fileOpen() ), CTRL + Key_O );
+    file->insertSeparator();
+    file->insertItem( TQPixmap( "filesave.xpm" ), "Save", this, SLOT( fileSave() ), CTRL + Key_S );
+    file->insertItem( "Save As...", this, SLOT( fileSaveAs() ) );
+    file->insertSeparator();
+    file->insertItem( TQPixmap( "fileprint.xpm" ), "Print...", this, SLOT( filePrint() ), CTRL + Key_P );
+    file->insertSeparator();
+    file->insertItem( "Close", this, SLOT( closeWindow() ), CTRL + Key_W );
+    file->insertItem( "Quit", qApp, SLOT( tquit() ), CTRL + Key_Q );
+}
+
+void ABMainWindow::setupFileTools()
+{
+    //fileTools = new TQToolBar( this, "file operations" );
+}
+
+void ABMainWindow::setupStatusBar()
+{
+    //statusBar()->message( "Ready", 2000 );
+}
+
+void ABMainWindow::setupCentralWidget()
+{
+    view = new ABCentralWidget( this );
+    setCentralWidget( view );
+}
+
+void ABMainWindow::closeWindow()
+{
+    close();
+}
+
+void ABMainWindow::fileNew()
+{
+}
+
+void ABMainWindow::fileOpen()
+{
+    TQString fn = TQFileDialog::getOpenFileName( TQString::null, TQString::null, this );
+    if ( !fn.isEmpty() ) {
+        filename = fn;
+        view->load( filename );
+    }
+}
+
+void ABMainWindow::fileSave()
+{
+    if ( filename.isEmpty() ) {
+        fileSaveAs();
+        return;
+    }
+
+    view->save( filename );
+}
+
+void ABMainWindow::fileSaveAs()
+{
+    TQString fn = TQFileDialog::getSaveFileName( TQString::null, TQString::null, this );
+    if ( !fn.isEmpty() ) {
+        filename = fn;
+        fileSave();
+    }
+}
+
+void ABMainWindow::filePrint()
+{
+}
+
+ +


+

Header file of the centralwidget: +

/****************************************************************************
+** $Id: qt/centralwidget.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef AB_CENTRALWIDGET_H
+#define AB_CENTRALWIDGET_H
+
+#include <qwidget.h>
+#include <qstring.h>
+
+class TQTabWidget;
+class TQListView;
+class TQGridLayout;
+class TQLineEdit;
+class TQPushButton;
+class TQListViewItem;
+class TQCheckBox;
+
+class ABCentralWidget : public TQWidget
+{
+    Q_OBJECT
+
+public:
+    ABCentralWidget( TQWidget *parent, const char *name = 0 );
+
+    void save( const TQString &filename );
+    void load( const TQString &filename );
+
+protected slots:
+    void addEntry();
+    void changeEntry();
+    void itemSelected( TQListViewItem* );
+    void selectionChanged();
+    void toggleFirstName();
+    void toggleLastName();
+    void toggleAddress();
+    void toggleEMail();
+    void findEntries();
+
+protected:
+    void setupTabWidget();
+    void setupListView();
+
+    TQGridLayout *mainGrid;
+    TQTabWidget *tabWidget;
+    TQListView *listView;
+    TQPushButton *add, *change, *find;
+    TQLineEdit *iFirstName, *iLastName, *iAddress, *iEMail,
+        *sFirstName, *sLastName, *sAddress, *sEMail;
+    TQCheckBox *cFirstName, *cLastName, *cAddress, *cEMail;
+
+};
+
+#endif
+
+ +


+

Implementation of the centralwidget: +

/****************************************************************************
+** $Id: qt/centralwidget.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "centralwidget.h"
+
+#include <qtabwidget.h>
+#include <qlistview.h>
+#include <qlayout.h>
+#include <qwidget.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qlineedit.h>
+#include <qlabel.h>
+#include <qcheckbox.h>
+#include <qfile.h>
+#include <qtextstream.h>
+
+ABCentralWidget::ABCentralWidget( TQWidget *parent, const char *name )
+    : TQWidget( parent, name )
+{
+    mainGrid = new TQGridLayout( this, 2, 1, 5, 5 );
+
+    setupTabWidget();
+    setupListView();
+
+    mainGrid->setRowStretch( 0, 0 );
+    mainGrid->setRowStretch( 1, 1 );
+}
+
+void ABCentralWidget::save( const TQString &filename )
+{
+    if ( !listView->firstChild() )
+        return;
+
+    TQFile f( filename );
+    if ( !f.open( IO_WriteOnly ) )
+        return;
+
+    TQTextStream t( &f );
+    t.setEncoding(TQTextStream::UnicodeUTF8);
+
+    TQListViewItemIterator it( listView );
+
+    for ( ; it.current(); ++it )
+        for ( unsigned int i = 0; i < 4; i++ )
+            t << it.current()->text( i ) << "\n";
+
+    f.close();
+}
+
+void ABCentralWidget::load( const TQString &filename )
+{
+    listView->clear();
+
+    TQFile f( filename );
+    if ( !f.open( IO_ReadOnly ) )
+        return;
+
+    TQTextStream t( &f );
+    t.setEncoding(TQTextStream::UnicodeUTF8);
+
+    while ( !t.atEnd() ) {
+        TQListViewItem *item = new TQListViewItem( listView );
+        for ( unsigned int i = 0; i < 4; i++ )
+            item->setText( i, t.readLine() );
+    }
+
+    f.close();
+}
+
+void ABCentralWidget::setupTabWidget()
+{
+    tabWidget = new TQTabWidget( this );
+
+    TQWidget *input = new TQWidget( tabWidget );
+    TQGridLayout *grid1 = new TQGridLayout( input, 2, 5, 5, 5 );
+
+    TQLabel *liFirstName = new TQLabel( "First &Name", input );
+    liFirstName->resize( liFirstName->sizeHint() );
+    grid1->addWidget( liFirstName, 0, 0 );
+
+    TQLabel *liLastName = new TQLabel( "&Last Name", input );
+    liLastName->resize( liLastName->sizeHint() );
+    grid1->addWidget( liLastName, 0, 1 );
+
+    TQLabel *liAddress = new TQLabel( "Add&ress", input );
+    liAddress->resize( liAddress->sizeHint() );
+    grid1->addWidget( liAddress, 0, 2 );
+
+    TQLabel *liEMail = new TQLabel( "&E-Mail", input );
+    liEMail->resize( liEMail->sizeHint() );
+    grid1->addWidget( liEMail, 0, 3 );
+
+    add = new TQPushButton( "A&dd", input );
+    add->resize( add->sizeHint() );
+    grid1->addWidget( add, 0, 4 );
+    connect( add, SIGNAL( clicked() ), this, SLOT( addEntry() ) );
+
+    iFirstName = new TQLineEdit( input );
+    iFirstName->resize( iFirstName->sizeHint() );
+    grid1->addWidget( iFirstName, 1, 0 );
+    liFirstName->setBuddy( iFirstName );
+
+    iLastName = new TQLineEdit( input );
+    iLastName->resize( iLastName->sizeHint() );
+    grid1->addWidget( iLastName, 1, 1 );
+    liLastName->setBuddy( iLastName );
+
+    iAddress = new TQLineEdit( input );
+    iAddress->resize( iAddress->sizeHint() );
+    grid1->addWidget( iAddress, 1, 2 );
+    liAddress->setBuddy( iAddress );
+
+    iEMail = new TQLineEdit( input );
+    iEMail->resize( iEMail->sizeHint() );
+    grid1->addWidget( iEMail, 1, 3 );
+    liEMail->setBuddy( iEMail );
+
+    change = new TQPushButton( "&Change", input );
+    change->resize( change->sizeHint() );
+    grid1->addWidget( change, 1, 4 );
+    connect( change, SIGNAL( clicked() ), this, SLOT( changeEntry() ) );
+
+    tabWidget->addTab( input, "&Add/Change Entry" );
+
+    // --------------------------------------
+
+    TQWidget *search = new TQWidget( this );
+    TQGridLayout *grid2 = new TQGridLayout( search, 2, 5, 5, 5 );
+
+    cFirstName = new TQCheckBox( "First &Name", search );
+    cFirstName->resize( cFirstName->sizeHint() );
+    grid2->addWidget( cFirstName, 0, 0 );
+    connect( cFirstName, SIGNAL( clicked() ), this, SLOT( toggleFirstName() ) );
+
+    cLastName = new TQCheckBox( "&Last Name", search );
+    cLastName->resize( cLastName->sizeHint() );
+    grid2->addWidget( cLastName, 0, 1 );
+    connect( cLastName, SIGNAL( clicked() ), this, SLOT( toggleLastName() ) );
+
+    cAddress = new TQCheckBox( "Add&ress", search );
+    cAddress->resize( cAddress->sizeHint() );
+    grid2->addWidget( cAddress, 0, 2 );
+    connect( cAddress, SIGNAL( clicked() ), this, SLOT( toggleAddress() ) );
+
+    cEMail = new TQCheckBox( "&E-Mail", search );
+    cEMail->resize( cEMail->sizeHint() );
+    grid2->addWidget( cEMail, 0, 3 );
+    connect( cEMail, SIGNAL( clicked() ), this, SLOT( toggleEMail() ) );
+
+    sFirstName = new TQLineEdit( search );
+    sFirstName->resize( sFirstName->sizeHint() );
+    grid2->addWidget( sFirstName, 1, 0 );
+
+    sLastName = new TQLineEdit( search );
+    sLastName->resize( sLastName->sizeHint() );
+    grid2->addWidget( sLastName, 1, 1 );
+
+    sAddress = new TQLineEdit( search );
+    sAddress->resize( sAddress->sizeHint() );
+    grid2->addWidget( sAddress, 1, 2 );
+
+    sEMail = new TQLineEdit( search );
+    sEMail->resize( sEMail->sizeHint() );
+    grid2->addWidget( sEMail, 1, 3 );
+
+    find = new TQPushButton( "F&ind", search );
+    find->resize( find->sizeHint() );
+    grid2->addWidget( find, 1, 4 );
+    connect( find, SIGNAL( clicked() ), this, SLOT( findEntries() ) );
+
+    cFirstName->setChecked( TRUE );
+    sFirstName->setEnabled( TRUE );
+    sLastName->setEnabled( FALSE );
+    sAddress->setEnabled( FALSE );
+    sEMail->setEnabled( FALSE );
+
+    tabWidget->addTab( search, "&Search" );
+
+    mainGrid->addWidget( tabWidget, 0, 0 );
+}
+
+void ABCentralWidget::setupListView()
+{
+    listView = new TQListView( this );
+    listView->addColumn( "First Name" );
+    listView->addColumn( "Last Name" );
+    listView->addColumn( "Address" );
+    listView->addColumn( "E-Mail" );
+
+    listView->setSelectionMode( TQListView::Single );
+
+    connect( listView, SIGNAL( clicked( TQListViewItem* ) ), this, SLOT( itemSelected( TQListViewItem* ) ) );
+
+    mainGrid->addWidget( listView, 1, 0 );
+    listView->setAllColumnsShowFocus( TRUE );
+}
+
+void ABCentralWidget::addEntry()
+{
+    if ( !iFirstName->text().isEmpty() || !iLastName->text().isEmpty() ||
+         !iAddress->text().isEmpty() || !iEMail->text().isEmpty() ) {
+        TQListViewItem *item = new TQListViewItem( listView );
+        item->setText( 0, iFirstName->text() );
+        item->setText( 1, iLastName->text() );
+        item->setText( 2, iAddress->text() );
+        item->setText( 3, iEMail->text() );
+    }
+
+    iFirstName->setText( "" );
+    iLastName->setText( "" );
+    iAddress->setText( "" );
+    iEMail->setText( "" );
+}
+
+void ABCentralWidget::changeEntry()
+{
+    TQListViewItem *item = listView->currentItem();
+
+    if ( item &&
+         ( !iFirstName->text().isEmpty() || !iLastName->text().isEmpty() ||
+           !iAddress->text().isEmpty() || !iEMail->text().isEmpty() ) ) {
+        item->setText( 0, iFirstName->text() );
+        item->setText( 1, iLastName->text() );
+        item->setText( 2, iAddress->text() );
+        item->setText( 3, iEMail->text() );
+    }
+}
+
+void ABCentralWidget::selectionChanged()
+{
+    iFirstName->setText( "" );
+    iLastName->setText( "" );
+    iAddress->setText( "" );
+    iEMail->setText( "" );
+}
+
+void ABCentralWidget::itemSelected( TQListViewItem *item )
+{
+    if ( !item )
+        return;
+    item->setSelected( TRUE );
+    item->repaint();
+
+    iFirstName->setText( item->text( 0 ) );
+    iLastName->setText( item->text( 1 ) );
+    iAddress->setText( item->text( 2 ) );
+    iEMail->setText( item->text( 3 ) );
+}
+
+void ABCentralWidget::toggleFirstName()
+{
+    sFirstName->setText( "" );
+
+    if ( cFirstName->isChecked() ) {
+        sFirstName->setEnabled( TRUE );
+        sFirstName->setFocus();
+    }
+    else
+        sFirstName->setEnabled( FALSE );
+}
+
+void ABCentralWidget::toggleLastName()
+{
+    sLastName->setText( "" );
+
+    if ( cLastName->isChecked() ) {
+        sLastName->setEnabled( TRUE );
+        sLastName->setFocus();
+    }
+    else
+        sLastName->setEnabled( FALSE );
+}
+
+void ABCentralWidget::toggleAddress()
+{
+    sAddress->setText( "" );
+
+    if ( cAddress->isChecked() ) {
+        sAddress->setEnabled( TRUE );
+        sAddress->setFocus();
+    }
+    else
+        sAddress->setEnabled( FALSE );
+}
+
+void ABCentralWidget::toggleEMail()
+{
+    sEMail->setText( "" );
+
+    if ( cEMail->isChecked() ) {
+        sEMail->setEnabled( TRUE );
+        sEMail->setFocus();
+    }
+    else
+        sEMail->setEnabled( FALSE );
+}
+
+void ABCentralWidget::findEntries()
+{
+    if ( !cFirstName->isChecked() &&
+         !cLastName->isChecked() &&
+         !cAddress->isChecked() &&
+         !cEMail->isChecked() ) {
+        listView->clearSelection();
+        return;
+    }
+
+    TQListViewItemIterator it( listView );
+
+    for ( ; it.current(); ++it ) {
+        bool select = TRUE;
+
+        if ( cFirstName->isChecked() ) {
+            if ( select && it.current()->text( 0 ).contains( sFirstName->text() ) )
+                select = TRUE;
+            else
+                select = FALSE;
+        }
+        if ( cLastName->isChecked() ) {
+            if ( select && it.current()->text( 1 ).contains( sLastName->text() ) )
+                select = TRUE;
+            else
+                select = FALSE;
+        }
+        if ( cAddress->isChecked() ) {
+            if ( select && it.current()->text( 2 ).contains( sAddress->text() ) )
+                select = TRUE;
+            else
+                select = FALSE;
+        }
+        if ( cEMail->isChecked() ) {
+            if ( select && it.current()->text( 3 ).contains( sEMail->text() ) )
+                select = TRUE;
+            else
+                select = FALSE;
+        }
+
+        if ( select )
+            it.current()->setSelected( TRUE );
+        else
+            it.current()->setSelected( FALSE );
+        it.current()->repaint();
+    }
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+
+#include "mainwindow.h"
+
+int main( int argc, char ** argv )
+{
+    TQApplication a( argc, argv );
+
+    ABMainWindow *mw = new ABMainWindow();
+    mw->setCaption( "TQt Example - Addressbook" );
+    a.setMainWidget( mw );
+    mw->show();
+
+    a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( tquit() ) );
+    int result = a.exec();
+    delete mw;
+    return result;
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/advanced.html b/doc/html/advanced.html new file mode 100644 index 00000000..c326bb3d --- /dev/null +++ b/doc/html/advanced.html @@ -0,0 +1,73 @@ + + + + + +Advanced Widgets + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Advanced Widgets

+ + +

These classes provide more complex user interface controls (widgets). +

+

+
TQCheckListItemCheckable list view items +
TQCheckTableItemCheckboxes in TQTables +
TQComboTableItemMeans of using comboboxes in TQTables +
TQDateEditDate editor +
TQDateTimeEditCombines a TQDateEdit and TQTimeEdit widget into a single widget for editing datetimes +
TQDesktopWidgetAccess to screen information on multi-head systems +
TQHeaderHeader row or column, e.g. for tables and listviews +
TQIconFactoryUsed to create pixmaps for a TQIconSet +
TQIconViewArea with movable labelled icons +
TQIconViewItemSingle item in a TQIconView +
TQListBoxList of selectable, read-only items +
TQListBoxPixmapList box items with a pixmap and optional text +
TQListBoxTextList box items that display text +
TQListViewImplements a list/tree view +
TQListViewItemImplements a list view item +
TQListViewItemIteratorIterator for collections of TQListViewItems +
TQMultiLineEditSimple editor for inputting text +
TQProgressBarHorizontal progress bar +
TQTabThe structures in a TQTabBar +
TQTabBarTab bar, e.g. for use in tabbed dialogs +
TQTableFlexible editable table widget +
TQTableItemThe cell content for TQTable cells +
TQTableSelectionAccess to a selected area in a TQTable +
TQTabWidgetStack of tabbed widgets +
TQTextBrowserRich text browser with hypertext navigation +
TQTimeEditTime editor +
TQToolBoxColumn of tabbed widget items +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/annotated.html b/doc/html/annotated.html new file mode 100644 index 00000000..fd43852c --- /dev/null +++ b/doc/html/annotated.html @@ -0,0 +1,464 @@ + + + + + +Annotated Class Index + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Annotated Class Index

+ + + +

TQt's classes with brief descriptions: +

+
TQAccelHandles keyboard accelerator and shortcut keys +
TQAccessibleEnums and static functions relating to accessibility +
TQAccessibleInterfaceDefines an interface that exposes information about accessible objects +
TQAccessibleObjectImplements parts of the TQAccessibleInterface for TQObjects +
TQActionAbstract user interface action that can appear both in menus and tool bars +
TQActionGroupGroups actions together +
TQApplicationManages the GUI application's control flow and main settings +
TQAsciiCacheTemplate class that provides a cache based on char* keys +
TQAsciiCacheIteratorIterator for TQAsciiCache collections +
TQAsciiDictTemplate class that provides a dictionary based on char* keys +
TQAsciiDictIteratorIterator for TQAsciiDict collections +
TQAssistantClientMeans of using TQt Assistant as an application's help tool +
TQAxAggregatedAbstract base class for implementations of additional COM interfaces +
TQAxBaseAbstract class that provides an API to initalize and access a COM object +
TQAxBindableInterface between a TQWidget and an ActiveX client +
TQAxFactoryDefines a factory for the creation of COM components +
TQAxObjectTQObject that wraps a COM object +
TQAxScriptWrapper around script code +
TQAxScriptEngineWrapper around a script engine +
TQAxScriptManagerBridge between application objects and script code +
TQAxWidgetTQWidget that wraps an ActiveX control +
TQBig5CodecConversion to and from the Big5 encoding +
TQBig5hkscsCodecConversion to and from the Big5-HKSCS encoding +
TQBitArrayArray of bits +
TQBitValInternal class, used with TQBitArray +
TQBitmapMonochrome (1-bit depth) pixmaps +
TQBoxLayoutLines up child widgets horizontally or vertically +
TQBrushDefines the fill pattern of shapes drawn by a TQPainter +
TQBufferI/O device that operates on a TQByteArray +
TQButtonThe abstract base class of button widgets, providing functionality common to buttons +
TQButtonGroupOrganizes TQButton widgets in a group +
TQByteArrayArray of bytes +
TQCDEStyleCDE look and feel +
TQCStringAbstraction of the classic C zero-terminated char array (char *) +
TQCacheTemplate class that provides a cache based on TQString keys +
TQCacheIteratorIterator for TQCache collections +
TQCanvas2D area that can contain TQCanvasItem objects +
TQCanvasEllipseEllipse or ellipse segment on a TQCanvas +
TQCanvasItemAbstract graphic object on a TQCanvas +
TQCanvasItemListList of TQCanvasItems +
TQCanvasLineLine on a TQCanvas +
TQCanvasPixmapPixmaps for TQCanvasSprites +
TQCanvasPixmapArrayArray of TQCanvasPixmaps +
TQCanvasPolygonPolygon on a TQCanvas +
TQCanvasPolygonalItemPolygonal canvas item on a TQCanvas +
TQCanvasRectangleRectangle on a TQCanvas +
TQCanvasSplineMulti-bezier splines on a TQCanvas +
TQCanvasSpriteAnimated canvas item on a TQCanvas +
TQCanvasTextText object on a TQCanvas +
TQCanvasViewOn-screen view of a TQCanvas +
TQCharLightweight Unicode character +
TQCharRefHelper class for TQString +
TQCheckBoxCheckbox with a text label +
TQCheckListItemCheckable list view items +
TQCheckTableItemCheckboxes in TQTables +
TQChildEventEvent parameters for child object events +
TQClipboardAccess to the window system clipboard +
TQCloseEventParameters that describe a close event +
TQColorColors based on RGB or HSV values +
TQColorDialogDialog widget for specifying colors +
TQColorDragDrag and drop object for transferring colors +
TQColorGroupGroup of widget colors +
TQComboBoxCombined button and popup list +
TQComboTableItemMeans of using comboboxes in TQTables +
TQCommonStyleEncapsulates the common Look and Feel of a GUI +
TQConstStringString objects using constant Unicode data +
TQContextMenuEventParameters that describe a context menu event +
TQCopChannelCommunication capabilities between several clients +
TQCursorMouse cursor with an arbitrary shape +
TQCustomEventSupport for custom events +
TQCustomMenuItemAbstract base class for custom menu items in popup menus +
TQDataBrowserData manipulation and navigation for data entry forms +
TQDataStreamSerialization of binary data to a TQIODevice +
TQDataTableFlexible SQL table widget that supports browsing and editing +
TQDataViewRead-only SQL forms +
TQDateDate functions +
TQDateEditDate editor +
TQDateTimeDate and time functions +
TQDateTimeEditCombines a TQDateEdit and TQTimeEdit widget into a single widget for editing datetimes +
TQDateTimeEditBaseAbstraction for date and edit editors +
TQDeepCopyTemplate class which ensures that implicitly shared and explicitly shared classes reference unique data +
TQDesktopWidgetAccess to screen information on multi-head systems +
TQDialRounded range control (like a speedometer or potentiometer) +
TQDialogThe base class of dialog windows +
TQDictTemplate class that provides a dictionary based on TQString keys +
TQDictIteratorIterator for TQDict collections +
TQDirAccess to directory structures and their contents in a platform-independent way +
TQDirectPainterDirect access to the video hardware +
TQDnsAsynchronous DNS lookups +
TQDockAreaManages and lays out TQDockWindows +
TQDockWindowWidget which can be docked inside a TQDockArea or floated as a top level window on the desktop +
TQDomAttrRepresents one attribute of a TQDomElement +
TQDomCDATASectionRepresents an XML CDATA section +
TQDomCharacterDataRepresents a generic string in the DOM +
TQDomCommentRepresents an XML comment +
TQDomDocumentRepresents an XML document +
TQDomDocumentFragmentTree of TQDomNodes which is not usually a complete TQDomDocument +
TQDomDocumentTypeThe representation of the DTD in the document tree +
TQDomElementRepresents one element in the DOM tree +
TQDomEntityRepresents an XML entity +
TQDomEntityReferenceRepresents an XML entity reference +
TQDomImplementationInformation about the features of the DOM implementation +
TQDomNamedNodeMapCollection of nodes that can be accessed by name +
TQDomNodeThe base class for all the nodes in a DOM tree +
TQDomNodeListList of TQDomNode objects +
TQDomNotationRepresents an XML notation +
TQDomProcessingInstructionRepresents an XML processing instruction +
TQDomTextRepresents text data in the parsed XML document +
TQDoubleValidatorRange checking of floating-point numbers +
TQDragEnterEventEvent which is sent to the widget when a drag and drop first drags onto the widget +
TQDragLeaveEventEvent which is sent to the widget when a drag and drop leaves the widget +
TQDragMoveEventEvent which is sent while a drag and drop is in progress +
TQDragObjectEncapsulates MIME-based data transfer +
TQDropEventEvent which is sent when a drag and drop is completed +
TQEditorFactoryUsed to create editor widgets for TQVariant data types +
TQErrorMessageError message display dialog +
TQEucJpCodecConversion to and from EUC-JP character sets +
TQEucKrCodecConversion to and from EUC-KR character sets +
TQEventThe base class of all event classes. Event objects contain event parameters +
TQEventLoopManages the event queue +
TQFileI/O device that operates on files +
TQFileDialogDialogs that allow users to select files or directories +
TQFileIconProviderIcons for TQFileDialog to use +
TQFileInfoSystem-independent file information +
TQFilePreviewFile previewing in TQFileDialog +
TQFocusDataMaintains the list of widgets in the focus chain +
TQFocusEventEvent parameters for widget focus events +
TQFontFont used for drawing text +
TQFontDatabaseInformation about the fonts available in the underlying window system +
TQFontDialogDialog widget for selecting a font +
TQFontInfoGeneral information about fonts +
TQFontManagerImplements font management in TQt/Embedded +
TQFontMetricsFont metrics information +
TQFrameThe base class of widgets that can have a frame +
TQFtpImplementation of the FTP protocol +
TQGLNamespace for miscellaneous identifiers in the TQt OpenGL module +
TQGLColormapUsed for installing custom colormaps into TQGLWidgets +
TQGLContextEncapsulates an OpenGL rendering context +
TQGLFormatThe display format of an OpenGL rendering context +
TQGLWidgetWidget for rendering OpenGL graphics +
TQGLayoutIteratorAbstract base class of internal layout iterators +
TQGb18030CodecConversion to and from the Chinese GB18030/GBK/GB2312 encoding +
TQGb2312CodecConversion to and from the Chinese GB2312 encoding +
TQGbkCodecConversion to and from the Chinese GBK encoding +
TQGfxDriverFactoryCreates TQScreen objects for TQt/Embedded +
TQGfxDriverPluginAbstract base for TQt/Embedded graphics driver plugins +
TQGridSimple geometry management of its children +
TQGridLayoutLays out widgets in a grid +
TQGridViewAbstract base for fixed-size grids +
TQGroupBoxGroup box frame with a title +
TQGuardedPtrTemplate class that provides guarded pointers to TQObjects +
TQHBoxHorizontal geometry management for its child widgets +
TQHBoxLayoutLines up widgets horizontally +
TQHButtonGroupOrganizes TQButton widgets in a group with one horizontal row +
TQHGroupBoxOrganizes widgets in a group with one horizontal row +
TQHeaderHeader row or column, e.g. for tables and listviews +
TQHebrewCodecConversion to and from visually ordered Hebrew +
TQHideEventEvent which is sent after a widget is hidden +
TQHostAddressIP address +
TQHttpImplementation of the HTTP protocol +
TQHttpHeaderHeader information for HTTP +
TQHttpRequestHeaderRequest header information for HTTP +
TQHttpResponseHeaderResponse header information for HTTP +
TQIMEventParameters for input method events +
TQIODeviceThe base class of I/O devices +
TQIconDragSupports drag and drop operations within a TQIconView +
TQIconDragEventSignals that a main icon drag has begun +
TQIconDragItemEncapsulates a drag item +
TQIconFactoryUsed to create pixmaps for a TQIconSet +
TQIconSetSet of icons with different styles and sizes +
TQIconViewArea with movable labelled icons +
TQIconViewItemSingle item in a TQIconView +
TQImageHardware-independent pixmap representation with direct access to the pixel data +
TQImageConsumerAbstraction used by TQImageDecoder +
TQImageDecoderIncremental image decoder for all supported image formats +
TQImageDragDrag and drop object for transferring images +
TQImageFormatIncremental image decoder for a specific image format +
TQImageFormatPluginAbstract base for custom image format plugins +
TQImageFormatTypeFactory that makes TQImageFormat objects +
TQImageIOParameters for loading and saving images +
TQInputDialogSimple convenience dialog to get a single value from the user +
TQIntCacheTemplate class that provides a cache based on long keys +
TQIntCacheIteratorIterator for TQIntCache collections +
TQIntDictTemplate class that provides a dictionary based on long keys +
TQIntDictIteratorIterator for TQIntDict collections +
TQIntValidatorValidator which ensures that a string contains a valid integer within a specified range +
TQJisCodecConversion to and from JIS character sets +
TQKbdDriverFactoryCreates TQWSKeyboardHandler objects for TQt/Embedded +
TQKbdDriverPluginAbstract base for TQt/Embedded keyboard driver plugins +
TQKeyEventDescribes a key event +
TQKeySequenceEncapsulates a key sequence as used by accelerators +
TQLCDNumberDisplays a number with LCD-like digits +
TQLabelText or image display +
TQLayoutThe base class of geometry managers +
TQLayoutItemAbstract item that a TQLayout manipulates +
TQLayoutIteratorIterators over TQLayoutItem +
TQLibraryWrapper for handling shared libraries +
TQLineEditOne-line text editor +
TQListBoxList of selectable, read-only items +
TQListBoxItemThe base class of all list box items +
TQListBoxPixmapList box items with a pixmap and optional text +
TQListBoxTextList box items that display text +
TQListViewImplements a list/tree view +
TQListViewItemImplements a list view item +
TQListViewItemIteratorIterator for collections of TQListViewItems +
TQLocalFsImplementation of a TQNetworkProtocol that works on the local file system +
TQLocaleConverts between numbers and their string representations in various languages +
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 +
TQMemArrayTemplate class that provides arrays of simple types +
TQMenuBarHorizontal menu bar +
TQMenuDataBase class for TQMenuBar and TQPopupMenu +
TQMessageBoxModal dialog with a short message, an icon, and some buttons +
TQMetaObjectMeta information about TQt objects +
TQMetaPropertyStores meta data about a property +
TQMimeSourceAbstraction of objects which provide formatted data of a certain MIME type +
TQMimeSourceFactoryExtensible provider of mime-typed data +
TQMotifThe basis of the Motif Extension +
TQMotifDialogThe TQDialog API for Motif-based dialogs +
TQMotifPlusStyleMore sophisticated Motif-ish look and feel +
TQMotifStyleMotif look and feel +
TQMotifWidgetThe TQWidget API for Xt/Motif widgets +
TQMouseDriverFactoryCreates TQWSMouseHandler objects for TQt/Embedded +
TQMouseDriverPluginAbstract base for TQt/Embedded mouse driver plugins +
TQMouseEventParameters that describe a mouse event +
TQMoveEventEvent parameters for move events +
TQMovieIncremental loading of animations or images, signalling as it progresses +
TQMutexAccess serialization between threads +
TQMutexLockerSimplifies locking and unlocking TQMutexes +
TQNPInstanceTQObject that is a web browser plugin +
TQNPStreamStream of data provided to a TQNPInstance by the browser +
TQNPWidgetTQWidget that is a web browser plugin window +
TQNPluginThe main factory for plugin objects +
TQNetworkOperationCommon operations for network protocols +
TQNetworkProtocolCommon API for network protocols +
TQObjectThe base class of all TQt objects +
TQObjectCleanupHandlerWatches the lifetime of multiple TQObjects +
TQObjectListTQPtrList of TQObjects +
TQObjectListIteratorIterator for TQObjectLists +
TQPNGImagePackerCreates well-compressed PNG animations +
TQPaintDeviceThe base class of objects that can be painted +
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 +
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 +
TQPixmapOff-screen, pixel-based paint device +
TQPixmapCacheApplication-global cache for pixmaps +
TQPlatinumStyleMac/Platinum look and feel +
TQPointDefines a point in the plane +
TQPointArrayArray of points +
TQPopupMenuPopup menu widget +
TQPrinterPaint device that paints on a printer +
TQProcessUsed to start external programs and to communicate with them +
TQProgressBarHorizontal progress bar +
TQProgressDialogFeedback on the progress of a slow operation +
TQPtrCollectionThe base class of most pointer-based TQt collections +
TQPtrDictTemplate class that provides a dictionary based on void* keys +
TQPtrDictIteratorIterator for TQPtrDict collections +
TQPtrListTemplate class that provides a list +
TQPtrListIteratorIterator for TQPtrList collections +
TQPtrQueueTemplate class that provides a queue +
TQPtrStackTemplate class that provides a stack +
TQPtrVectorTemplate collection class that provides a vector (array) +
TQPushButtonCommand button +
TQRadioButtonRadio button with a text or pixmap label +
TQRangeControlInteger value within a range +
TQRectDefines a rectangle in the plane +
TQRegExpPattern matching using regular expressions +
TQRegExpValidatorUsed to check a string against a regular expression +
TQRegionClip region for a painter +
TQResizeEventEvent parameters for resize events +
TQSGIStyleSGI/Irix look and feel +
TQScreenAnd its descendants manage the framebuffer and palette +
TQScrollBarVertical or horizontal scroll bar +
TQScrollViewScrolling area with on-demand scroll bars +
TQSemaphoreRobust integer semaphore +
TQServerSocketTCP-based server +
TQSessionManagerAccess to the session manager +
TQSettingsPersistent platform-independent application settings +
TQShowEventEvent which is sent when a widget is shown +
TQSignalCan be used to send signals for classes that don't inherit TQObject +
TQSignalMapperBundles signals from identifiable senders +
TQSimpleRichTextSmall displayable piece of rich text +
TQSizeDefines the size of a two-dimensional object +
TQSizeGripCorner-grip for resizing a top-level window +
TQSizePolicyLayout attribute describing horizontal and vertical resizing policy +
TQSjisCodecConversion to and from Shift-JIS +
TQSliderVertical or horizontal slider +
TQSocketBuffered TCP connection +
TQSocketDevicePlatform-independent low-level socket API +
TQSocketNotifierSupport for socket callbacks +
TQSoundAccess to the platform audio facilities +
TQSpacerItemBlank space in a layout +
TQSpinBoxSpin box widget (spin button) +
TQSplashScreenSplash screen that can be shown during application startup +
TQSplitterImplements a splitter widget +
TQSqlNamespace for TQt SQL identifiers that need to be global-like +
TQSqlCursorBrowsing and editing of SQL tables and views +
TQSqlDatabaseUsed to create SQL database connections and to provide transaction handling +
TQSqlDriverAbstract base class for accessing SQL databases +
TQSqlDriverPluginAbstract base for custom TQSqlDriver plugins +
TQSqlEditorFactoryUsed to create the editors used by TQDataTable and TQSqlForm +
TQSqlErrorSQL database error information +
TQSqlFieldManipulates the fields in SQL database tables and views +
TQSqlFieldInfoStores meta data associated with a SQL field +
TQSqlFormCreates and manages data entry forms tied to SQL databases +
TQSqlIndexFunctions to manipulate and describe TQSqlCursor and TQSqlDatabase indexes +
TQSqlPropertyMapUsed to map widgets to SQL fields +
TQSqlQueryMeans of executing and manipulating SQL statements +
TQSqlRecordEncapsulates a database record, i.e. a set of database fields +
TQSqlRecordInfoEncapsulates a set of database field meta data +
TQSqlResultAbstract interface for accessing data from SQL databases +
TQSqlSelectCursorBrowsing of general SQL SELECT statements +
TQStatusBarHorizontal bar suitable for presenting status information +
TQStoredDragSimple stored-value drag object for arbitrary MIME data +
TQStrIListDoubly-linked list of char* with case-insensitive comparison +
TQStrListDoubly-linked list of char* +
TQStrListIteratorIterator for the TQStrList and TQStrIList classes +
TQStringAbstraction of Unicode text and the classic C '\0'-terminated char array +
TQStringListList of strings +
TQStyleThe look and feel of a GUI +
TQStyleFactoryCreates TQStyle objects +
TQStyleOptionOptional parameters for TQStyle functions +
TQStylePluginAbstract base for custom TQStyle plugins +
TQStyleSheetCollection of styles for rich text rendering and a generator of tags +
TQStyleSheetItemEncapsulation of a set of text styles +
TQSyntaxHighlighterBase class for implementing TQTextEdit syntax highlighters +
TQTabThe structures in a TQTabBar +
TQTabBarTab bar, e.g. for use in tabbed dialogs +
TQTabDialogStack of tabbed widgets +
TQTabWidgetStack of tabbed widgets +
TQTableFlexible editable table widget +
TQTableItemThe cell content for TQTable cells +
TQTableSelectionAccess to a selected area in a TQTable +
TQTabletEventParameters that describe a Tablet event +
TQTextBrowserRich text browser with hypertext navigation +
TQTextCodecConversion between text encodings +
TQTextCodecPluginAbstract base for custom TQTextCodec plugins +
TQTextDecoderState-based decoder +
TQTextDragDrag and drop object for transferring plain and Unicode text +
TQTextEditPowerful single-page rich text editor +
TQTextEncoderState-based encoder +
TQTextIStreamConvenience class for input streams +
TQTextOStreamConvenience class for output streams +
TQTextStreamBasic functions for reading and writing text using a TQIODevice +
TQThreadPlatform-independent threads +
TQThreadStoragePer-thread data storage +
TQTimeClock time functions +
TQTimeEditTime editor +
TQTimerTimer signals and single-shot timers +
TQTimerEventParameters that describe a timer event +
TQToolBarMovable panel containing widgets such as tool buttons +
TQToolBoxColumn of tabbed widget items +
TQToolButtonQuick-access button to commands or options, usually used inside a TQToolBar +
TQToolTipTool tips (balloon help) for any widget or rectangular part of a widget +
TQToolTipGroupCollects tool tips into related groups +
TQTranslatorInternationalization support for text output +
TQTranslatorMessageTranslator message and its properties +
TQTsciiCodecConversion to and from the Tamil TSCII encoding +
TQUriDragDrag object for a list of URI references +
TQUrlURL parser and simplifies working with URLs +
TQUrlInfoStores information about URLs +
TQUrlOperatorCommon operations on URLs +
TQUuidDefines a Universally Unique Identifier (UUID) +
TQVBoxVertical geometry management of its child widgets +
TQVBoxLayoutLines up widgets vertically +
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 +
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 +
TQWSInputMethodInternational input methods for TQt/Embedded +
TQWSKeyboardHandlerImplements the keyboard driver for TQt/Embedded +
TQWSMouseHandlerMouse driver for TQt/Embedded +
TQWSServerServer-specific functionality in TQt/Embedded +
TQWSWindowServer-specific functionality in TQt/Embedded +
TQWaitConditionAllows waiting/waking for conditions between threads +
TQWhatsThisSimple description of any widget, i.e. answering the question "What's this?" +
TQWheelEventParameters that describe a wheel event +
TQWidgetThe base class of all user interface objects +
TQWidgetFactoryFor the dynamic creation of widgets from TQt Designer .ui files +
TQWidgetItemLayout item that represents a widget +
TQWidgetPluginAbstract base for custom TQWidget plugins +
TQWidgetStackStack of widgets of which only the top widget is user-visible +
TQWindowsMimeMaps open-standard MIME to Window Clipboard formats +
TQWindowsStyleMicrosoft Windows-like look and feel +
TQWizardFramework for wizard dialogs +
TQWorkspaceWorkspace window that can contain decorated windows, e.g. for MDI +
TQXmlAttributesXML attributes +
TQXmlContentHandlerInterface to report the logical content of XML data +
TQXmlDTDHandlerInterface to report DTD content of XML data +
TQXmlDeclHandlerInterface to report declaration content of XML data +
TQXmlDefaultHandlerDefault implementation of all the XML handler classes +
TQXmlEntityResolverInterface to resolve external entities contained in XML data +
TQXmlErrorHandlerInterface to report errors in XML data +
TQXmlInputSourceThe input data for the TQXmlReader subclasses +
TQXmlLexicalHandlerInterface to report the lexical content of XML data +
TQXmlLocatorThe XML handler classes with information about the parsing position within a file +
TQXmlNamespaceSupportHelper class for XML readers which want to include namespace support +
TQXmlParseExceptionUsed to report errors with the TQXmlErrorHandler interface +
TQXmlReaderInterface for XML readers (i.e. parsers) +
TQXmlSimpleReaderImplementation of a simple XML reader (parser) +
TQtNamespace for miscellaneous identifiers that need to be global-like +
+ + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/appearance.html b/doc/html/appearance.html new file mode 100644 index 00000000..a99f402c --- /dev/null +++ b/doc/html/appearance.html @@ -0,0 +1,83 @@ + + + + + +Widget Appearance and Style + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Widget Appearance and Style

+ + +

These classes are used to customize an application's appearance and +style. +

+

+
TQBoxLayoutLines up child widgets horizontally or vertically +
TQButtonGroupOrganizes TQButton widgets in a group +
TQCDEStyleCDE look and feel +
TQColorColors based on RGB or HSV values +
TQColorGroupGroup of widget colors +
TQCommonStyleEncapsulates the common Look and Feel of a GUI +
TQCursorMouse cursor with an arbitrary shape +
TQFontFont used for drawing text +
TQGLayoutIteratorAbstract base class of internal layout iterators +
TQGridSimple geometry management of its children +
TQGridLayoutLays out widgets in a grid +
TQGroupBoxGroup box frame with a title +
TQHBoxHorizontal geometry management for its child widgets +
TQHBoxLayoutLines up widgets horizontally +
TQHButtonGroupOrganizes TQButton widgets in a group with one horizontal row +
TQHGroupBoxOrganizes widgets in a group with one horizontal row +
TQLayoutThe base class of geometry managers +
TQLayoutItemAbstract item that a TQLayout manipulates +
TQLayoutIteratorIterators over TQLayoutItem +
TQMacStyleImplements an Appearance Manager style +
TQMotifPlusStyleMore sophisticated Motif-ish look and feel +
TQMotifStyleMotif look and feel +
TQPaletteColor groups for each widget state +
TQPlatinumStyleMac/Platinum look and feel +
TQSGIStyleSGI/Irix look and feel +
TQSizeGripCorner-grip for resizing a top-level window +
TQSizePolicyLayout attribute describing horizontal and vertical resizing policy +
TQSpacerItemBlank space in a layout +
TQStyleThe look and feel of a GUI +
TQStyleOptionOptional parameters for TQStyle functions +
TQVBoxVertical geometry management of its child widgets +
TQVBoxLayoutLines up widgets vertically +
TQVButtonGroupOrganizes TQButton widgets in a vertical column +
TQVGroupBoxOrganizes a group of widgets in a vertical column +
TQWidgetItemLayout item that represents a widget +
TQWindowsStyleMicrosoft Windows-like look and feel +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/appicon.html b/doc/html/appicon.html new file mode 100644 index 00000000..420b5ebf --- /dev/null +++ b/doc/html/appicon.html @@ -0,0 +1,201 @@ + + + + + +Setting the Application Icon + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Setting the Application Icon

+ + + +

The application icon, typically displayed in the top-left corner of an +application's top-level windows, is set by calling the +TQWidget::setIcon() method on top-level widgets. +

In order to change the icon of the executable application file +itself, as it is presented on the desktop (i.e. prior to application +execution), it is necessary to employ another, platform-dependent +technique. +

+

+ + +

Setting the Application Icon on Windows +

+

First, create an ICO format bitmap file that contains the icon image. This +can be done with e.g. Microsoft Visual C++: Select "File|New...", then +select the "File" tab in the dialog that appears, and choose "Icon". (Note +that you do not need to load your application into Visual C++; here we are +only using the icon editor). +

Store the ICO file in your application's source code directory, for +example, with the name, "myappico.ico". Then, create a text file +called e.g. "myapp.rc" in which you put a single line of text: +

+IDI_ICON1               ICON    DISCARDABLE     "myappico.ico"
+
+ +

Finally, assuming you are using qmake +to generate your makefiles, add this line to your "myapp.pro" file: +

+RC_FILE = myapp.rc
+
+ +

Regenerate your makefile and your application. The .exe file will now be +represented with your icon e.g. in Explorer. +

If you do not use qmake, the necessary +steps are: first, run the "rc" program on the .rc file, then link your +application with the resulting .res file. +

Setting the Application Icon on Mac OS X +

+

The application icon, typically displayed in the application dock +area, is set by calling TQWidget::setIcon() on a top-level widget. It +is possible that the program could appear in the application dock area +before the function call, in which case a default icon will appear +during the bouncing animation. +

To ensure that the correct icon appears, both when the application is +being launched, and in the Finder, it is necessary to employ a +platform-dependent technique. +

Although many programs can create icon files (.icns), the recommended +approach is to use the Icon Composer program supplied by Apple (in the +Developer/Application folder). Icon Composer allows you to import several +different sized icons (for use in different contexts) as well as the masks +that go with them. Save the set of icons to a file in your project +directory. +

If you are using qmake to generate +your make files, you only need to add a single line to your .pro +project file. For example, if the name of your icon file is +myapp.icns, and your project file is myapp.pro, add this line +to myapp.pro: +

+RC_FILE = myapp.icns
+
+ +This will ensure that qmake puts your +icons in the proper place and creates an Info.plist entry for the +icon. +

If you do not use qmake, you must do +the following manually: +

    +
  1. Create an Info.plist file for your application (using the +PropertyListEditor, found in Developer/Applications). +
  2. Associate your .icns record with the CFBundleIconFile record in the +Info.plist file (again, using the PropertyListEditor). +
  3. Copy both the icns and your Info.plist into your application bundle +Resource directory. +
+

Setting the Application Icon on common Linux desktops +

+

In this section we briefly describe the issues involved in providing +icons for applications for two common Linux desktop environments: +KDE and GNOME. The core technology used to describe application icons +is the same for both desktops, and may also apply to others, but there +are details which are specific to each. The main source of information +on the standards used by these Linux desktops is freedesktop.org. For information +on other Linux desktops please refer to the documentation for the +desktops you are interested in. +

Often, users do not use executable files directly, but instead launch +applications by clicking icons on the desktop. These icons are +representations of `desktop entry files' that contain a description of +the application that includes information about its icon. Both desktop +environments are able to retrieve the information in these files, and +they use it to generate shortcuts to applications on the desktop, in +the start menu, and on the panel. +

More information about desktop entry files can be found in the +Desktop Entry Specification. +

Although desktop entry files can usefully encapsulate the application's details, +we still need to store the icons in the conventional location for each desktop +environment. A number of locations for icons are given in the +Icon Theme Specification. +

Although the path used to locate icons depends on the desktop in use, +and on its configuration, the directory structure beneath each of +these should follow the same pattern: subdirectories are arranged by +theme, icon size, and application type. Generally, application icons +are added to the hicolor theme, so a square application icon 32 pixels +in size would be stored in the hicolor/32x32/apps directory beneath +the icon path. +

KDE +

+

Application icons can be installed for use by all users, or on a per-user basis. +A user currently logged into their KDE desktop can discover these locations +by using kde-config, for example, +by typing the following in a terminal window: +

+kde-config --path icon
+
+ +

Typically, the list of colon-separated paths printed to stdout includes the +user-specific icon path and the system-wide path. Beneath these +directories, it should be possible to locate and install icons according +to the conventions described in the +Icon Theme Specification. +

If you are developing exclusively for KDE, you may wish to take +advantage of the KDE build system to configure your application. This ensures +that your icons are installed in the appropriate locations for KDE. +

The KDE developer website is http://developer.kde.org/. +

GNOME +

+

Application icons are stored within a standard system-wide directory containing +architecture-independent files. This location can be determined by +using gnome-config, for example by typing the following in a terminal +window: +

+gnome-config --datadir
+
+ +

The path printed on stdout refers to a location that should contain a directory +called pixmaps; the directory structure within the pixmaps +directory is described in the Icon Theme +Specification. +

If you are developing exclusively for GNOME, you may wish to use +the standard set of GNU Build Tools, +also described in the relevant section of +the GTK+/Gnome +Application Development book. This ensures that your icons are +installed in the appropriate locations for GNOME. +

The GNOME developer website is http://developer.gnome.org/. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/application.html b/doc/html/application.html new file mode 100644 index 00000000..493ec6a5 --- /dev/null +++ b/doc/html/application.html @@ -0,0 +1,62 @@ + + + + + +Main Window and Related Classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Main Window and Related Classes

+ + +

These classes provide everything you need for a typical modern main +application window, like the main window itself, menu and tool bars, +a statusbar, etc. +

+

+
TQActionAbstract user interface action that can appear both in menus and tool bars +
TQActionGroupGroups actions together +
TQApplicationManages the GUI application's control flow and main settings +
TQDockAreaManages and lays out TQDockWindows +
TQDockWindowWidget which can be docked inside a TQDockArea or floated as a top level window on the desktop +
TQEventLoopManages the event queue +
TQMainWindowMain application window, with a menu bar, dock windows (e.g. for toolbars), and a status bar +
TQMenuBarHorizontal menu bar +
TQPopupMenuPopup menu widget +
TQSessionManagerAccess to the session manager +
TQSizeGripCorner-grip for resizing a top-level window +
TQStatusBarHorizontal bar suitable for presenting status information +
TQToolBarMovable panel containing widgets such as tool buttons +
TQWorkspaceWorkspace window that can contain decorated windows, e.g. for MDI +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/archivesearch-example.html b/doc/html/archivesearch-example.html new file mode 100644 index 00000000..86e653d6 --- /dev/null +++ b/doc/html/archivesearch-example.html @@ -0,0 +1,183 @@ + + + + + +A qt-interest mail archive search + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A qt-interest mail archive search

+ + +

+

This example does a search on the qt-interest mailinglist archives. It uses +TQHttp to issue the search command and to fetch the results. The GUI parts +were done using TQt Designer. +


+

The implementation of the HTTP requests (archivedialog.ui.h): +

/****************************************************************************
+** $Id: qt/archivedialog.ui.h   3.3.8   edited Jan 29 15:54 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename functions or slots use
+** TQt Designer which will update this file, preserving your code. Create an
+** init() function in place of a constructor, and a destroy() function in
+** place of a destructor.
+*****************************************************************************/
+
+void ArchiveDialog::init()
+{
+    connect(&articleSearcher, SIGNAL(done(bool)), this, SLOT(searchDone(bool)));
+    connect(&articleFetcher, SIGNAL(done(bool)), this, SLOT(fetchDone(bool)));
+    connect(myListView, SIGNAL(selectionChanged(TQListViewItem*)), this, SLOT(fetch(TQListViewItem*)));
+    connect(myLineEdit, SIGNAL(returnPressed()), this, SLOT(search()));
+    connect(myListView, SIGNAL(returnPressed(TQListViewItem*)), this, SLOT(fetch(TQListViewItem*)));
+    connect(myPushButton, SIGNAL(clicked()), this, SLOT(close()));
+}
+
+void ArchiveDialog::fetch( TQListViewItem *it )
+{
+    TQUrl u(it->text(1));
+    articleFetcher.setHost(u.host());
+    articleFetcher.get(it->text(1));
+}
+
+void ArchiveDialog::fetchDone( bool error )
+{
+    if (error) {
+        TQMessageBox::critical(this, "Error fetching",
+                              "An error occurred when fetching this document: "
+                              + articleFetcher.errorString(),
+                              TQMessageBox::Ok, TQMessageBox::NoButton);
+    } else {
+        myTextBrowser->setText(articleFetcher.readAll());
+    }
+}
+
+void ArchiveDialog::search()
+{
+    if (articleSearcher.state() == TQHttp::HostLookup
+        || articleSearcher.state() == TQHttp::Connecting
+        || articleSearcher.state() == TQHttp::Sending
+        || articleSearcher.state() == TQHttp::Reading) {
+        articleSearcher.abort();
+    }
+
+    if (myLineEdit->text() == "") {
+        TQMessageBox::critical(this, "Empty query",
+                              "Please type a search string.",
+                              TQMessageBox::Ok, TQMessageBox::NoButton);
+    } else {
+        TQApplication::setOverrideCursor(TQCursor(TQt::WaitCursor));
+
+        articleSearcher.setHost("lists.trolltech.com");
+
+        TQHttpRequestHeader header("POST", "/qt-interest/search.php");
+        header.setValue("Host", "lists.trolltech.com");
+        header.setContentType("application/x-www-form-urlencoded");
+
+        TQString encodedTopic = myLineEdit->text();
+        TQUrl::encode(encodedTopic);
+        TQString searchString = "qt-interest=on&search=" + encodedTopic;
+
+        articleSearcher.request(header, searchString.utf8());
+    }
+
+}
+
+void ArchiveDialog::searchDone( bool error )
+{
+    if (error) {
+        TQMessageBox::critical(this, "Error searching",
+                              "An error occurred when searching: "
+                              + articleSearcher.errorString(),
+                              TQMessageBox::Ok, TQMessageBox::NoButton);
+    } else {
+        TQString result(articleSearcher.readAll());
+
+        TQRegExp rx("<a href=\"(http://lists\\.trolltech\\.com/qt-interest/.*)\">(.*)</a>");
+        rx.setMinimal(TRUE);
+        int pos = 0;
+        while (pos >= 0) {
+            pos = rx.search(result, pos);
+            if (pos > -1) {
+                pos += rx.matchedLength();
+                new TQListViewItem(myListView, rx.cap(2), rx.cap(1));
+            }
+        }
+    }
+
+    TQApplication::restoreOverrideCursor();
+}
+
+ +


+

Main (main.cpp): +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "archivedialog.h"
+#include <qapplication.h>
+
+int main(int argc, char **argv)
+{
+    TQApplication a( argc, argv );
+    ArchiveDialog ad;
+    ad.show();
+
+    TQObject::connect( &a, SIGNAL(lastWindowClosed()),
+                      &a, SLOT(tquit()) );
+
+    return a.exec();
+}
+
+ +

See also Network Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/assistant-1.html b/doc/html/assistant-1.html new file mode 100644 index 00000000..33dc9500 --- /dev/null +++ b/doc/html/assistant-1.html @@ -0,0 +1,48 @@ + + + + + +Introduction + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Home] [Next: Introduction to the TQt Reference Documentation]

+

Introduction

+

This document introduces TQt Assistant, a tool for presenting on-line documentation. It also introduces the TQt Reference Documentation which is accessible using TQt Assistant, or with a web browser. The document is divided into the following sections:

+ +

[Home] [Next: Introduction to the TQt Reference Documentation]

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/assistant-2.html b/doc/html/assistant-2.html new file mode 100644 index 00000000..adadd788 --- /dev/null +++ b/doc/html/assistant-2.html @@ -0,0 +1,52 @@ + + + + + +Introduction to the TQt Reference Documentation + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Prev: Introduction] [Home] [Next: The 1 Minute Guide to Using TQt Assistant]

+

Introduction to the TQt Reference Documentation

+

The documentation for the TQt library is written in-line in the .cpp files by the developers themselves. The documentation team revises the documentation to ensure that it is accurate and usable, and to provide quality control. The documentation team also writes the larger texts, such as the class descriptions that introduce a class along with the concepts the class uses, as well as introducing the functions and properties that the class provides.

+

The documentation focuses on the API rather than the internals, since we make great efforts to keep our API consistent and compatible with each new version, but we may change the internals considerably to improve performance and enhance functionality.

+

The TQt Reference Documentation consists of almost 1,500 HTML pages (over 2,500 printed pages). The overwhelming majority of pages document TQt classes. Since developers differ in the way they think and work we provide a variety of approaches to navigating the documentation set:

+

No matter where you find yourself in the TQt documentation, you will find extensive cross-referencing. Even snippets of example code contain clickable links, so that for example, if you come across a class declaration in a code example, the class name will be a clickable link to the class's documentation.

+

In addition to the class documentation some of TQt's modules have extensive descriptions, and there are many overview documents which describe various aspects of the TQt library; all these are linked from the reference documentation home page. There are also two tutorials and numerous example programs in the examples subdirectory of the TQt distribution.

+ +

[Prev: Introduction] [Home] [Next: The 1 Minute Guide to Using TQt Assistant]

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/assistant-3.html b/doc/html/assistant-3.html new file mode 100644 index 00000000..90f3f642 --- /dev/null +++ b/doc/html/assistant-3.html @@ -0,0 +1,49 @@ + + + + + +The 1 Minute Guide to Using TQt Assistant + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Prev: Introduction to the TQt Reference Documentation] [Home] [Next: TQt Assistant in More Detail]

+

The 1 Minute Guide to Using TQt Assistant

+

Under Windows, TQt Assistant is available as a menu option on the TQt menu. On Unix, run assistant from an xterm.

+

When you start up TQt Assistant, you will be presented with a standard main-window style application, with a menu bar and toolbar. Below these, on the left hand side is a navigation window called the Sidebar, and on the right, taking up most of the space, is the documentation window. By default, the TQt Reference Documentation's home page is shown in the documentation window.

+

TQt Assistant works in a similar way to a web browser. If you click underlined text (which signifies a cross-reference), the documentation window will present the relevant page. You can bookmark pages of particular interest and you can click the Previous and Next toolbar buttons to navigate within the pages you've visited.

+

Although TQt Assistant can be used just like a web browser to navigate through the TQt documentation set, TQt Assistant offers a powerful means of navigation that web browsers don't provide. TQt Assistant uses an intelligent algorithm to index all the pages in the documentation sets that it presents so that you can search for particular words and phrases.

+

To perform an index search, click the Index tab on the Sidebar (or click Ctrl+I). In the 'Look For' line edit enter a word, e.g. 'homedirpath'. As you type, words are found and highlighted in a list beneath the line edit. If the highlighted text matches what you're looking for, double click it, (or press Enter) and the documentation window will display the relevant page. You rarely have to type in the whole word before TQt Assistant finds a match. Note that for some words there may be more than one possible page that is relevant.

+

TQt Assistant also provides full text searching for finding specific words in the documentation. Documents with the highest occurrences of the word that you are looking for appear first, and every occurrence of the word within the documentation is highlighted.

+

TQt Assistant can be customized by creating profiles, a collection of documentation. Profiles can be created for your own use, or for an application you will distribute. With profiles, you can select which documentation you want the end user of your application to be able to view.

+ +

[Prev: Introduction to the TQt Reference Documentation] [Home] [Next: TQt Assistant in More Detail]

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/assistant-4.html b/doc/html/assistant-4.html new file mode 100644 index 00000000..29c6a619 --- /dev/null +++ b/doc/html/assistant-4.html @@ -0,0 +1,115 @@ + + + + + +TQt Assistant in More Detail + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Prev: The 1 Minute Guide to Using TQt Assistant] [Home] [Next: Full Text Searching]

+

TQt Assistant in More Detail

+

+

+

TQt Assistant

+

The Sidebar

+

+

+

The sidebar provides four ways of navigating documentation:

+
  1. The Contents tab presents a tree view of the documentation sets that are available. If you click an item, its documentation will appear in the documentation window. If you double click an item or click a '+' sign to the left of an item, the item's sub-items will appear. Click a sub-item to make its page appear in the documentation window. Click a '-' sign to the left of an item to hide its sub-items.

    +
  2. The Index tab is used to look up key words or phrases. See The 1 Minute Guide to Using TQt Assistant for how to use this tab.

    +
  3. The Bookmarks tab lists any bookmarks you've made. Double click a bookmark to make its page appear in the documentation window. The Bookmarks tab has a New Bookmark button and a Delete Bookmark button at the bottom. Click New Bookmark to bookmark the page that is showing in the documentation window. Click a bookmark in the list, then click Delete Bookmark to delete the highlighted bookmark.

    +
  4. The Search tab provides full text search of all the documents. See Full Text Searching for more information about this feature.

    +

If you want the documentation window to use as much space as possible, you can easily hide or show the Sidebar. If the Sidebar is showing, press Ctrl+T, Ctrl+I, Ctrl+B or Ctrl+S to hide it. If the Sidebar is hidden, press Ctrl+T to show it on the Contents tab, or press Ctrl+I to show it on the Index tab (with the focus in the 'Look For' line edit box), or press Ctrl+B to show it on the Bookmarks tab, or press Ctrl+S to show it on the (full text) Search tab.

+

The Sidebar is a dock window, so you can drag it to the top, left, right or bottom of TQt Assistant's window, or you can drag it outside TQt Assistant to float it.

+

The Documentation Window

+

+

+

The documentation window offers a feature for viewing documentation by enabling you to create tabs for each documentation page that you view. Click the Add Tab button and a new tab will appear with the page name as the tab's caption. This makes it convenient to switch between pages when you are working with different documentation. You can delete a tab by clicking the Close Tab button located on the right side of the documentation window.

+

The Toolbar

+

+

+

The toolbar provides fast access to the most common actions.

+

The remaining toolbar buttons are bookmarks and will vary depending on your configuration.

+

The Menus

+

The File Menu

+

The Edit Menu

+

The View Menu

+

The Go Menu

+

This menu also has additional items; these are pre-defined bookmarks that vary depending on your configuration.

+

The Bookmarks Menu

+

This menu may have additional items, i.e. any bookmarks that you have already made. If you want to delete a bookmark go to the Bookmarks tab on the Sidebar.

+

The Dialogs

+

The Print Dialog

+

This dialog is platform-specific. It gives access to various printer options and can be used to print the current page.

+

The Find Text Dialog

+

This dialog is used to find text in the current page. Enter the text you want to find in the Find line edit. If you check the 'Whole words only' checkbox, the search will only consider whole words, i.e. if you search for 'spin' with this checkbox checked it will not match 'spinbox', but will match 'spin'. If you check the 'Case sensitive' check box then, for example, 'spin' will match 'spin' but not 'Spin'. You can search Forward or Backward from your current position in the page by clicking one of the Direction radio buttons. Click the Find button to search (or search again), and click the Close button to finish.

+

The Settings Dialog

+

The Settings dialog is used to set your preferences for TQt Assistant. The dialog has four tabs: General Settings, Web Settings, PDF Settings, and Profiles. TQt Assistant will remember your settings between sessions, including window sizes and positions, and which pages you have open. Each of the tabs is discussed as follows:

+ + + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/how-to-learn-qt.html b/doc/html/how-to-learn-qt.html new file mode 100644 index 00000000..2dcbe46e --- /dev/null +++ b/doc/html/how-to-learn-qt.html @@ -0,0 +1,91 @@ + + + + + +How to Learn TQt + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

How to Learn TQt

+ + + +

We assume that you already know C++! +

The best way to learn TQt is to read the official TQt book, +C++ GUI Programming with TQt 3 (ISBN 0-13-124072-2). + +This book provides comprehensive coverage of TQt programming all the +way from "Hello TQt" to advanced features like multithreading, 2D and +3D graphics, networking, and XML. +

http://www.trolltech.com/training/{TQt and TQtopia training} is also +available. This takes the form of open enrollment courses for the +public and on-site training for you and your colleagues. +

If you can't get hold of the official book, or if you can't wait for +it to arrive then here is our suggested learning programme. +

Read the TQt Whitepaper first. This provides an overview of TQt's +facilities and has snippets of code which demonstrate the TQt approach +to programming. It gives you the 'big picture'. +

If you want to program purely in C++, designing your interfaces in +code without the aid of any design tools, read the tutorials. Tutorial #1 is designed to get you into TQt +programming, with the emphasis on working code rather than being a +tour of features. Tutorial #2 presents a +more realistic example, demonstrating how to code menus, toolbars, +file loading and saving, dialogs, etc. +

If you want to design your user interfaces using a design tool, then +read at least the first few chapters of the TQt Designer manual. After this, it is still worthwhile trying +the pure C++ Tutorials (Tutorial #1 and +Tutorial #2) mentioned above. +

By now you'll have produced some small working applications and have a +broad feel for TQt programming. You could start work on your own +projects straight away, but we recommend reading a couple of key +overviews to deepen your understanding of TQt: the TQt Object Model and Signals and Slots. +

At this point we recommend looking at the overviews and reading those that are relevant to your +projects. You may also find it useful to browse the source code of the +examples that have things in common with +your projects. You can also read TQt's source code since this is +supplied. +

If you run the demo application (in $QTDIR/examples/demo) +you'll see many of TQt's widgets in action. +

TQt comes with extensive documentation, with hypertext cross-references +throughout, so you can easily click your way to whatever interests +you. The part of the documentation that you'll probably use the most +is the API Reference. Each link provides a +different way of navigating the API Reference; try them all to see +which work best for you. You might also like to try TQt Assistant: this tool is supplied with TQt and +provides access to the entire TQt API, and it provides a full text +search facility. There are also a growing number of TQt +books. +

You should now be ready to ground-break: good luck, and have fun! +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/httpd-example.html b/doc/html/httpd-example.html new file mode 100644 index 00000000..fbd007f3 --- /dev/null +++ b/doc/html/httpd-example.html @@ -0,0 +1,195 @@ + + + + + +A simple HTTP daemon + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A simple HTTP daemon

+ + +

+

This example shows how to use the TQServerSocket class. It is a very +simple implementation of a HTTP daemon that listens on port 8080 and +sends back a simple HTML page back for every GET request it gets. After +sending the page, it closes the connection. +


+

Implementation (httpd.cpp): +

/****************************************************************************
+** $Id: qt/httpd.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <stdlib.h>
+#include <qsocket.h>
+#include <qregexp.h>
+#include <qserversocket.h>
+#include <qapplication.h>
+#include <qmainwindow.h>
+#include <qtextstream.h>
+#include <qvbox.h>
+#include <qlabel.h>
+#include <qtextview.h>
+#include <qpushbutton.h>
+
+// HttpDaemon is the the class that implements the simple HTTP server.
+class HttpDaemon : public TQServerSocket
+{
+    Q_OBJECT
+public:
+    HttpDaemon( TQObject* parent=0 ) :
+        TQServerSocket(8080,1,parent)
+    {
+        if ( !ok() ) {
+            qWarning("Failed to bind to port 8080");
+            exit( 1 );
+        }
+    }
+
+    void newConnection( int socket )
+    {
+        // When a new client connects, the server constructs a TQSocket and all
+        // communication with the client is done over this TQSocket. TQSocket
+        // works asynchronouslyl, this means that all the communication is done
+        // in the two slots readClient() and discardClient().
+        TQSocket* s = new TQSocket( this );
+        connect( s, SIGNAL(readyRead()), this, SLOT(readClient()) );
+        connect( s, SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) );
+        s->setSocket( socket );
+        emit newConnect();
+    }
+
+signals:
+    void newConnect();
+    void endConnect();
+    void wroteToClient();
+
+private slots:
+    void readClient()
+    {
+        // This slot is called when the client sent data to the server. The
+        // server looks if it was a get request and sends a very simple HTML
+        // document back.
+        TQSocket* socket = (TQSocket*)sender();
+        if ( socket->canReadLine() ) {
+            TQStringList tokens = TQStringList::split( TQRegExp("[ \r\n][ \r\n]*"), socket->readLine() );
+            if ( tokens[0] == "GET" ) {
+                TQTextStream os( socket );
+                os.setEncoding( TQTextStream::UnicodeUTF8 );
+                os << "HTTP/1.0 200 Ok\r\n"
+                    "Content-Type: text/html; charset=\"utf-8\"\r\n"
+                    "\r\n"
+                    "<h1>Nothing to see here</h1>\n";
+                socket->close();
+                emit wroteToClient();
+            }
+        }
+    }
+    void discardClient()
+    {
+        TQSocket* socket = (TQSocket*)sender();
+        delete socket;
+        emit endConnect();
+    }
+};
+
+
+// HttpInfo provides a simple graphical user interface to the server and shows
+// the actions of the server.
+class HttpInfo : public TQVBox
+{
+    Q_OBJECT
+public:
+    HttpInfo()
+    {
+        HttpDaemon *httpd = new HttpDaemon( this );
+
+        TQString itext = TQString(
+                "This is a small httpd example.\n"
+                "You can connect with your\n"
+                "web browser to port %1"
+            ).arg( httpd->port() );
+        TQLabel *lb = new TQLabel( itext, this );
+        lb->setAlignment( AlignHCenter );
+        infoText = new TQTextView( this );
+        TQPushButton *tquit = new TQPushButton( "tquit" , this );
+
+        connect( httpd, SIGNAL(newConnect()), SLOT(newConnect()) );
+        connect( httpd, SIGNAL(endConnect()), SLOT(endConnect()) );
+        connect( httpd, SIGNAL(wroteToClient()), SLOT(wroteToClient()) );
+        connect( tquit, SIGNAL(pressed()), qApp, SLOT(tquit()) );
+    }
+
+    ~HttpInfo()
+    {
+    }
+
+private slots:
+    void newConnect()
+    {
+        infoText->append( "New connection" );
+    }
+    void endConnect()
+    {
+        infoText->append( "Connection closed\n\n" );
+    }
+    void wroteToClient()
+    {
+        infoText->append( "Wrote to client" );
+    }
+
+private:
+    TQTextView *infoText;
+};
+
+
+int main( int argc, char** argv )
+{
+    TQApplication app( argc, argv );
+    HttpInfo info;
+    app.setMainWidget( &info );
+    info.show();
+    return app.exec();
+}
+
+#include "httpd.moc"
+
+ +

See also Network Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/i18n-example.html b/doc/html/i18n-example.html new file mode 100644 index 00000000..eacdd9d8 --- /dev/null +++ b/doc/html/i18n-example.html @@ -0,0 +1,341 @@ + + + + + +Internationalization + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Internationalization

+ + +

+This example shows how to internationalize applications. Start it with +

# i18n de

to get a german version and with +

# i18n en

to get the english version. +

Refer also to the internationalization documentation. +


+

Header file: +

/****************************************************************************
+** $Id: qt/mywidget.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef MYWIDGET_H
+#define MYWIDGET_H
+
+#include <qmainwindow.h>
+#include <qstring.h>
+
+class MyWidget : public TQMainWindow
+{
+    Q_OBJECT
+
+public:
+    MyWidget( TQWidget* parent=0, const char* name = 0 );
+
+signals:
+    void closed();
+
+protected:
+    void closeEvent(TQCloseEvent*);
+
+private:
+    static void initChoices(TQWidget* parent);
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/mywidget.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qbuttongroup.h>
+#include <qradiobutton.h>
+#include <qlabel.h>
+#include <qlistbox.h>
+#include <qcombobox.h>
+#include <qlabel.h>
+#include <qhbox.h>
+#include <qvbox.h>
+#include <qaccel.h>
+#include <qpopupmenu.h>
+#include <qmenubar.h>
+#include <qstatusbar.h>
+#include <qapplication.h>
+
+#include "mywidget.h"
+
+MyWidget::MyWidget( TQWidget* parent, const char* name )
+        : TQMainWindow( parent, name )
+{
+    TQVBox* central = new TQVBox(this);
+    central->setMargin( 5 );
+    central->setSpacing( 5 );
+    setCentralWidget(central);
+
+    TQPopupMenu* file = new TQPopupMenu(this);
+    file->insertItem( tr("E&xit"), qApp, SLOT(tquit()),
+            TQAccel::stringToKey(tr("Ctrl+Q")) );
+    menuBar()->insertItem( tr("&File"), file );
+
+    setCaption( tr( "Internationalization Example" ) );
+
+    TQString l;
+    statusBar()->message( tr("Language: English") );
+
+    ( void )new TQLabel( tr( "The Main Window" ), central );
+
+    TQButtonGroup* gbox = new TQButtonGroup( 1, TQGroupBox::Horizontal,
+                                      tr( "View" ), central );
+    (void)new TQRadioButton( tr( "Perspective" ), gbox );
+    (void)new TQRadioButton( tr( "Isometric" ), gbox );
+    (void)new TQRadioButton( tr( "Oblique" ), gbox );
+
+    initChoices(central);
+}
+
+static const char* choices[] = {
+    QT_TRANSLATE_NOOP( "MyWidget", "First" ),
+    QT_TRANSLATE_NOOP( "MyWidget", "Second" ),
+    QT_TRANSLATE_NOOP( "MyWidget", "Third" ),
+    0
+};
+
+void MyWidget::initChoices(TQWidget* parent)
+{
+    TQListBox* lb = new TQListBox( parent );
+    for ( int i = 0; choices[i]; i++ )
+        lb->insertItem( tr( choices[i] ) );
+}
+
+void MyWidget::closeEvent(TQCloseEvent* e)
+{
+    TQWidget::closeEvent(e);
+    emit closed();
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qtranslator.h>
+#include <qfileinfo.h>
+#include <qmessagebox.h>
+#include <qcheckbox.h>
+#include <qvbox.h>
+#include <qlayout.h>
+#include <qbuttongroup.h>
+#include <qpushbutton.h>
+#include <qsignalmapper.h>
+#include <qtextcodec.h>
+#include <stdlib.h>
+
+#if defined(Q_OS_UNIX)
+#include <unistd.h>
+#endif
+
+#include "mywidget.h"
+
+//#define USE_I18N_FONT
+
+class TQVDialog : public TQDialog {
+public:
+    TQVDialog(TQWidget *parent=0, const char *name=0, bool modal=FALSE,
+             WFlags f=0) : TQDialog(parent,name,modal,f)
+    {
+        TQVBoxLayout* vb = new TQVBoxLayout(this,8);
+        vb->setAutoAdd(TRUE);
+        hb = 0;
+        sm = new TQSignalMapper(this);
+        connect(sm,SIGNAL(mapped(int)),this,SLOT(done(int)));
+    }
+    void addButtons( const TQString& cancel=TQString::null,
+                    const TQString& ok=TQString::null,
+                    const TQString& mid1=TQString::null,
+                    const TQString& mid2=TQString::null,
+                    const TQString& mid3=TQString::null)
+    {
+        addButton(ok.isNull() ? TQObject::tr("OK") : ok, 1);
+        if ( !mid1.isNull() ) addButton(mid1,2);
+        if ( !mid2.isNull() ) addButton(mid2,3);
+        if ( !mid3.isNull() ) addButton(mid3,4);
+        addButton(cancel.isNull() ? TQObject::tr("Cancel") : cancel, 0);
+    }
+
+    void addButton( const TQString& text, int result )
+    {
+        if ( !hb )
+            hb = new TQHBox(this);
+        TQPushButton *c = new TQPushButton(text, hb);
+        sm->setMapping(c,result);
+        connect(c,SIGNAL(clicked()),sm,SLOT(map()));
+    }
+
+private:
+    TQSignalMapper *sm;
+    TQHBox *hb;
+};
+
+MyWidget* showLang(TQString lang)
+{
+
+    static TQTranslator *translator = 0;
+
+    qApp->setPalette(TQPalette(TQColor(220-rand()%64,220-rand()%64,220-rand()%64)));
+
+    lang = "mywidget_" + lang + ".qm";
+    TQFileInfo fi( lang );
+
+    if ( !fi.exists() ) {
+        TQMessageBox::warning( 0, "File error",
+                              TQString("Cannot find translation for language: "+lang+
+                                      "\n(try eg. 'de', 'ko' or 'no')") );
+        return 0;
+    }
+    if ( translator ) {
+        qApp->removeTranslator( translator );
+        delete translator;
+    }
+    translator = new TQTranslator( 0 );
+    translator->load( lang, "." );
+    qApp->installTranslator( translator );
+    MyWidget *m = new MyWidget;
+    m->setCaption("TQt Example - i18n - " + m->caption() );
+    return m;
+}
+
+int main( int argc, char** argv )
+{
+    TQApplication app( argc, argv );
+
+    const char* qm[]=
+        { "ar", "cs", "de", "el", "en", "eo", "fr", "it", "jp", "ko", "no", "ru", "zh", 0 };
+
+#if defined(Q_OS_UNIX)
+    srand( getpid() << 2 );
+#endif
+
+    TQString lang;
+    if ( argc == 2 )
+        lang = argv[1];
+
+    if ( argc != 2 || lang == "all" ) {
+        TQVDialog dlg(0,0,TRUE);
+        TQCheckBox* qmb[sizeof(qm)/sizeof(qm[0])];
+        int r;
+        if ( lang == "all" ) {
+            r = 2;
+        } else {
+            TQButtonGroup *bg = new TQButtonGroup(4,TQt::Vertical,"Choose Locales",&dlg);
+            TQString loc = TQTextCodec::locale();
+            for ( int i=0; qm[i]; i++ ) {
+                qmb[i] = new TQCheckBox((const char*)qm[i],bg);
+                qmb[i]->setChecked( loc == qm[i] );
+            }
+            dlg.addButtons("Cancel","OK","All");
+            r = dlg.exec();
+        }
+        if ( r ) {
+            TQRect screen = qApp->desktop()->availableGeometry();
+            bool tight = screen.width() < 1024;
+            int x=screen.left()+5;
+            int y=screen.top()+25;
+            for ( int i=0; qm[i]; i++ ) {
+                if ( r == 2 || qmb[i]->isChecked() ) {
+                    MyWidget* w = showLang((const char*)qm[i]);
+
+                    if( w == 0 ) exit( 0 );
+                    TQObject::connect(w, SIGNAL(closed()), qApp, SLOT(tquit()));
+                    w->setGeometry(x,y,197,356);
+                    w->show();
+                    if ( tight ) {
+                        x += 8;
+                        y += 8;
+                    } else {
+                        x += 205;
+                        if ( x > 1000 ) {
+                            x = 5;
+                            y += 384;
+                        }
+                    }
+                }
+            }
+        } else {
+            exit( 0 );
+        }
+    } else {
+        TQString lang = argv[1];
+        TQWidget* m = showLang(lang);
+        app.setMainWidget( m );
+        m->setCaption("TQt Example - i18n");
+        m->show();
+    }
+
+#ifdef USE_I18N_FONT
+    memorymanager->savePrerenderedFont(font.handle(),FALSE);
+#endif
+
+    // While we run "all", kill them all
+    return app.exec();
+
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/i18n.html b/doc/html/i18n.html new file mode 100644 index 00000000..51772b7f --- /dev/null +++ b/doc/html/i18n.html @@ -0,0 +1,570 @@ + + + + + +Internationalization with TQt + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Internationalization with TQt

+ + +

+

The internationalization of an application is the process of making +the application usable by people in countries other than one's own. +

+

+ + +

In some cases internationalization is simple, for example, making a US +application accessible to Australian or British users may retquire +little more than a few spelling corrections. But to make a US +application usable by Japanese users, or a Korean application usable +by German users, will retquire that the software operate not only in +different languages, but use different input techniques, character +encodings and presentation conventions. +

TQt tries to make internationalization as painless as possible for +developers. All input widgets and text drawing methods in TQt offer +built-in support for all supported languages. The built-in font engine +is capable of correctly and attractively rendering text that contains +characters from a variety of different writing systems at the same +time. +

TQt supports most languages in use today, in particular: +

+

On Windows NT/2000/XP and Unix/X11 with Xft (client side font support) +the following languages are also supported: +

+

Many of these writing systems exhibit special features: +

+

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

Support for these writing systems is transparent to the programmer +and completely encapsulated in TQt's text engine. This means that you +don't need to have any knowledge about the writing system used in a +particular language, except for the following small points: +

+

The following sections give some information on the status +of the internationalization (i18n) support in TQt. +

See also the TQt Linguist manual. +

Step by Step +

+

Writing multi-platform international software with TQt is a gentle, +incremental process. Your software can become internationalized in +the following stages: +

Use TQString for all User-visible Text +

+

Since TQString uses the Unicode encoding internally, every +language in the world can be processed transparently using +familiar text processing operations. Also, since all TQt +functions that present text to the user take a TQString as a +parameter, there is no char* to TQString conversion overhead. +

Strings that are in "programmer space" (such as TQObject names +and file format texts) need not use TQString; the traditional +char* or the TQCString class will suffice. +

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

Use tr() for all Literal Text +

+

Wherever your program uses "quoted text" for text that will +be presented to the user, ensure that it is processed by the TQApplication::translate() function. Essentially all that is necessary +to achieve this is to use TQObject::tr(). For example, assuming the +LoginWidget is a subclass of TQWidget: +

+    LoginWidget::LoginWidget()
+    {
+        TQLabel *label = new TQLabel( tr("Password:"), this );
+        ...
+    }
+
+ +

This accounts for 99% of the user-visible strings you're likely to +write. +

If the quoted text is not in a member function of a +TQObject subclass, use either the tr() function of an +appropriate class, or the TQApplication::translate() function +directly: +

+    void some_global_function( LoginWidget *logwid )
+    {
+        TQLabel *label = new TQLabel(
+                LoginWidget::tr("Password:"), logwid );
+    }
+
+    void same_global_function( LoginWidget *logwid )
+    {
+        TQLabel *label = new TQLabel(
+                qApp->translate("LoginWidget", "Password:"),
+                logwid );
+    }
+
+ +

If you need to have translatable text completely +outside a function, there are two macros to help: QT_TR_NOOP() +and QT_TRANSLATE_NOOP(). They merely mark the text for +extraction by the lupdate utility described below. +The macros expand to just the text (without the context). +

Example of QT_TR_NOOP(): +

+    TQString FriendlyConversation::greeting( int greet_type )
+    {
+        static const char* greeting_strings[] = {
+            QT_TR_NOOP( "Hello" ),
+            QT_TR_NOOP( "Goodbye" )
+        };
+        return tr( greeting_strings[greet_type] );
+    }
+
+ +

Example of QT_TRANSLATE_NOOP(): +

+    static const char* greeting_strings[] = {
+        QT_TRANSLATE_NOOP( "FriendlyConversation", "Hello" ),
+        QT_TRANSLATE_NOOP( "FriendlyConversation", "Goodbye" )
+    };
+
+    TQString FriendlyConversation::greeting( int greet_type )
+    {
+        return tr( greeting_strings[greet_type] );
+    }
+
+    TQString global_greeting( int greet_type )
+    {
+        return qApp->translate( "FriendlyConversation",
+                                greeting_strings[greet_type] );
+    }
+
+ +

If you disable the const char* to TQString automatic conversion +by compiling your software with the macro QT_NO_CAST_ASCII +defined, you'll be very likely to catch any strings you are +missing. See TQString::fromLatin1() for more information. +Disabling the conversion can make programming a bit cumbersome. +

If your source language uses characters outside Latin-1, you +might find TQObject::trUtf8() more convenient than +TQObject::tr(), as tr() depends on the +TQApplication::defaultCodec(), which makes it more fragile than +TQObject::trUtf8(). +

Use TQKeySequence() for Accelerator Values +

+

Accelerator values such as Ctrl+Q or Alt+F need to be +translated too. If you hardcode CTRL+Key_Q for "Quit" in +your application, translators won't be able to override +it. The correct idiom is +

+    TQPopupMenu *file = new TQPopupMenu( this );
+    file->insertItem( tr("&Quit"), this, SLOT(tquit()),
+                      TQKeySequence(tr("Ctrl+Q", "File|Quit")) );
+
+ +

Use TQString::arg() for Dynamic Text +

+

The TQString::arg() functions offer a simple means for substituting +arguments: +

+    void FileCopier::showProgress( int done, int total,
+                                   const TQString& current_file )
+    {
+        label.setText( tr("%1 of %2 files copied.\nCopying: %3")
+                        .arg(done)
+                        .arg(total)
+                        .arg(current_file) );
+    }
+
+ +

In some languages the order of arguments may need to change, and this +can easily be achieved by changing the order of the % arguments. For +example: +

+    TQString s1 = "%1 of %2 files copied. Copying: %3";
+    TQString s2 = "Kopierer nu %3. Av totalt %2 filer er %1 kopiert.";
+
+    qDebug( s1.arg(5).arg(10).arg("somefile.txt").ascii() );
+    qDebug( s2.arg(5).arg(10).arg("somefile.txt").ascii() );
+
+ +

produces the correct output in English and Norwegian: +

+5 of 10 files copied. Copying: somefile.txt
+Kopierer nu somefile.txt. Av totalt 10 filer er 5 kopiert.
+
+ +

Produce Translations +

+

Once you are using tr() throughout an application, you can start +producing translations of the user-visible text in your program. +

TQt Linguist's manual provides +further information about TQt's translation tools, TQt Linguist, lupdate and lrelease. +

Translation of a TQt application is a three-step process: +

    +

  1. Run lupdate to extract translatable text from the C++ source +code of the TQt application, resulting in a message file for +translators (a .ts file). The utility recognizes the tr() construct +and the QT_*_NOOP macros described above and produces .ts files +(usually one per language). +

  2. Provide translations for the source texts in the .ts file, using +TQt Linguist. Since .ts files are in XML format, you can also +edit them by hand. +

  3. Run lrelease to obtain a light-weight message file (a .qm +file) from the .ts file, suitable only for end use. Think of the .ts files as "source files", and .qm files as "object files". The +translator edits the .ts files, but the users of your application +only need the .qm files. Both kinds of files are platform and +locale independent. +

+

Typically, you will repeat these steps for every release of your +application. The lupdate utility does its best to reuse the +translations from previous releases. +

Before you run lupdate, you should prepare a project file. Here's +an example project file (.pro file): +

+    HEADERS         = funnydialog.h \
+                      wackywidget.h
+    SOURCES         = funnydialog.cpp \
+                      main.cpp \
+                      wackywidget.cpp
+    FORMS           = fancybox.ui
+    TRANSLATIONS    = superapp_dk.ts \
+                      superapp_fi.ts \
+                      superapp_no.ts \
+                      superapp_se.ts
+
+ +

When you run lupdate or lrelease, you must give the name of the +project file as a command-line argument. +

In this example, four exotic languages are supported: Danish, Finnish, +Norwegian and Swedish. If you use qmake, you usually don't need an extra project +file for lupdate; your qmake project file will work fine once +you add the TRANSLATIONS entry. +

In your application, you must TQTranslator::load() the translation +files appropriate for the user's language, and install them using TQApplication::installTranslator(). +

If you have been using the old TQt tools (findtr, msg2qm and mergetr), you can use qm2ts to convert your old .qm files. +

linguist, lupdate and lrelease are installed in the bin +subdirectory of the base directory TQt is installed into. Click Help|Manual +in TQt Linguist to access the user's manual; it contains a tutorial +to get you started. +

While these utilities offer a convenient way to create .qm files, +any system that writes .qm files is sufficient. You could make an +application that adds translations to a TQTranslator with +TQTranslator::insert() and then writes a .qm file with +TQTranslator::save(). This way the translations can come from any +source you choose. +

+TQt itself contains over 400 strings that will also need to be +translated into the languages that you are targeting. You will find +translation files for French and German in $QTDIR/translations as +well as a template for translating to other languages. (This directory +also contains some additional unsupported translations which may be +useful.) +

Typically, your application's main() function will look like this: +

+    int main( int argc, char **argv )
+    {
+        TQApplication app( argc, argv );
+
+        // translation file for TQt
+        TQTranslator qt( 0 );
+        qt.load( TQString( "qt_" ) + TQTextCodec::locale(), "." );
+        app.installTranslator( &qt );
+
+        // translation file for application strings
+        TQTranslator myapp( 0 );
+        myapp.load( TQString( "myapp_" ) + TQTextCodec::locale(), "." );
+        app.installTranslator( &myapp );
+
+        ...
+
+        return app.exec();
+    }
+
+ +

Support for Encodings +

+

The TQTextCodec class and the facilities in TQTextStream make it easy to +support many input and output encodings for your users' data. When an +application starts, the locale of the machine will determine the 8-bit +encoding used when dealing with 8-bit data: such as for font +selection, text display, 8-bit text I/O and character input. +

The application may occasionally retquire encodings other than the +default local 8-bit encoding. For example, an application in a +Cyrillic KOI8-R locale (the de-facto standard locale in Russia) might +need to output Cyrillic in the ISO 8859-5 encoding. Code for this +would be: +

+    TQString string = ...; // some Unicode text
+
+    TQTextCodec* codec = TQTextCodec::codecForName( "ISO 8859-5" );
+    TQCString encoded_string = codec->fromUnicode( string );
+
+    ...; // use encoded_string in 8-bit operations
+
+ +

For converting Unicode to local 8-bit encodings, a shortcut is +available: the local8Bit() method +of TQString returns such 8-bit data. Another useful shortcut is the +utf8() method, which returns text in the +8-bit UTF-8 encoding: this perfectly preserves Unicode information +while looking like plain US-ASCII if the text is wholly US-ASCII. +

For converting the other way, there are the TQString::fromUtf8() and +TQString::fromLocal8Bit() convenience functions, or the general code, +demonstrated by this conversion from ISO 8859-5 Cyrillic to Unicode +conversion: +

+    TQCString encoded_string = ...; // Some ISO 8859-5 encoded text.
+
+    TQTextCodec* codec = TQTextCodec::codecForName("ISO 8859-5");
+    TQString string = codec->toUnicode(encoded_string);
+
+    ...; // Use string in all of TQt's TQString operations.
+
+ +

Ideally Unicode I/O should be used as this maximizes the portability +of documents between users around the world, but in reality it is +useful to support all the appropriate encodings that your users will +need to process existing documents. In general, Unicode (UTF-16 or +UTF-8) is best for information transferred between arbitrary people, +while within a language or national group, a local standard is often +more appropriate. The most important encoding to support is the one +returned by TQTextCodec::codecForLocale(), as this is the one the user +is most likely to need for communicating with other people and +applications (this is the codec used by local8Bit()). +

TQt supports most of the more frequently used encodings natively. For a +complete list of supported encodings see the TQTextCodec +documentation. +

In some cases and for less frequently used encodings it may be +necessary to write your own TQTextCodec subclass. Depending on the +urgency, it may be useful to contact Trolltech technical support or +ask on the qt-interest mailing list to see if someone else is +already working on supporting the encoding. A useful interim measure +can be to use the TQTextCodec::loadCharmapFile() function to build a +data-driven codec, although this approach has a memory and speed +penalty, especially with dynamically loaded libraries. For details of +writing your own TQTextCodec, see the main TQTextCodec class +documentation. +

+

Localize +

+

Localization is the process of adapting to local conventions, for +example presenting dates and times using the locally preferred +formats. Such localizations can be accomplished using appropriate tr() +strings. +

+    void Clock::setTime(const TQTime& t)
+    {
+        if ( tr("AMPM") == "AMPM" ) {
+            // 12-hour clock
+        } else {
+            // 24-hour clock
+        }
+    }
+
+ +

In the example, for the US we would leave the translation of "AMPM" as +it is and thereby use the 12-hour clock branch; but in Europe we would +translate it as something else (anything else, e.g. "EU") and this +will make the code use the 24-hour clock branch. +

Localizing images is not recommended. Choose clear icons that are +appropriate for all localities, rather than relying on local puns or +stretched metaphors. +

Dynamic Translation +

+

Some applications, such as TQt Linguist, must be able to support changes +to the user's language settings while they are still running. To make +widgets aware of changes to the system language, implement a public +slot called languageChange() in each widget that needs to be notified. +In this slot, you should update the text displayed by widgets using the +TQObject::tr(){tr()} function in the usual way; for example: +

+void MyWidget::languageChange()
+{
+    titleLabel->setText(tr("Document Title"));
+    ...
+    okPushButton->setText(tr("&OK"));
+}
+
+ +

The default event handler for TQWidget subclasses responds to the +LanguageChange event, and will call this slot +when necessary; other application components can also connect signals +to this slot to force widgets to update themselves. +

System Support +

+

Some of the operating systems and windowing systems that TQt runs on +only have limited support for Unicode. The level of support available +in the underlying system has some influence on the support that TQt can +provide on those platforms, although in general TQt applications need +not be too concerned with platform-specific limitations. +

Unix/X11 +

+

+

Windows +

+

+

Note about Locales on X11 +

+

Many Unix distributions contain only partial support for some locales. +For example, if you have a /usr/share/locale/ja_JP.EUC directory, +this does not necessarily mean you can display Japanese text; you also +need JIS encoded fonts (or Unicode fonts), and the /usr/share/locale/ja_JP.EUC directory needs to be complete. For best +results, use complete locales from your system vendor. +

Relevant TQt Classes +

+

These classes are relevant to internationalizing TQt applications. + +

+
TQBig5CodecConversion to and from the Big5 encoding +
TQEucJpCodecConversion to and from EUC-JP character sets +
TQEucKrCodecConversion to and from EUC-KR character sets +
TQGb18030CodecConversion to and from the Chinese GB18030/GBK/GB2312 encoding +
TQGb2312CodecConversion to and from the Chinese GB2312 encoding +
TQGbkCodecConversion to and from the Chinese GBK encoding +
TQHebrewCodecConversion to and from visually ordered Hebrew +
TQJisCodecConversion to and from JIS character sets +
TQSjisCodecConversion to and from Shift-JIS +
TQTextCodecConversion between text encodings +
TQTextDecoderState-based decoder +
TQTextEncoderState-based encoder +
TQTranslatorInternationalization support for text output +
TQTranslatorMessageTranslator message and its properties +
TQTsciiCodecConversion to and from the Tamil TSCII encoding +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/iconset.png b/doc/html/iconset.png new file mode 100644 index 00000000..5c7c7595 Binary files /dev/null and b/doc/html/iconset.png differ diff --git a/doc/html/iconview-example.html b/doc/html/iconview-example.html new file mode 100644 index 00000000..dd83f5f1 --- /dev/null +++ b/doc/html/iconview-example.html @@ -0,0 +1,127 @@ + + + + + +Iconview + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Iconview

+ + +

+This example implements a flexible icon view which can store +lots of icon items. It supports Drag&Drop, different selection modes, +view modes, rubberband selection, etc. +

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qiconview.h>
+#include <qapplication.h>
+#include <qdragobject.h>
+#include <qpixmap.h>
+#include <qiconset.h>
+
+#include <qmime.h>
+#include <stdio.h>
+
+class ListenDND : public TQObject
+{
+    Q_OBJECT
+
+public:
+    ListenDND( TQWidget *w )
+        : view( w )
+    {}
+
+public slots:
+    void dropped( TQDropEvent *mime ) {
+        qDebug( "Dropped Mimesource %p into the view %p", mime, view );
+        qDebug( "  Formats:" );
+        int i = 0;
+        const char *str = mime->format( i );
+        qDebug( "    %s", str );
+        while ( str ) {
+            qDebug( "    %s", str );
+            str = mime->format( ++i );
+        }
+    };
+    void moved() {
+        qDebug( "All selected items were moved to another widget" );
+    }
+
+protected:
+    TQWidget *view;
+
+};
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    TQIconView qiconview;
+    qiconview.setSelectionMode( TQIconView::Extended );
+
+    for ( unsigned int i = 0; i < 3000; i++ ) {
+        TQIconViewItem *item = new TQIconViewItem( &qiconview, TQString( "Item %1" ).arg( i + 1 ) );
+        item->setRenameEnabled( TRUE );
+    }
+
+    qiconview.setCaption( "TQt Example - Iconview" );
+
+    ListenDND listen_dnd( &qiconview );
+    TQObject::connect( &qiconview, SIGNAL( dropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ),
+                      &listen_dnd, SLOT( dropped( TQDropEvent * ) ) );
+    TQObject::connect( &qiconview, SIGNAL( moved() ), &listen_dnd, SLOT( moved() ) );
+
+    a.setMainWidget( &qiconview );
+    qiconview.show();
+    qiconview.resize( qiconview.sizeHint() );
+
+    return a.exec();
+}
+
+#include "main.moc"
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/iconview-simple_dd-main-cpp.html b/doc/html/iconview-simple_dd-main-cpp.html new file mode 100644 index 00000000..518dc35c --- /dev/null +++ b/doc/html/iconview-simple_dd-main-cpp.html @@ -0,0 +1,230 @@ + + + + + +iconview/simple_dd/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

iconview/simple_dd/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "main.h"
+
+const char* red_icon[]={
+"16 16 2 1",
+"r c red",
+". c None",
+"................",
+"................",
+"..rrrrrrrrrrrr..",
+"..rrrrrrrrrrrr..",
+"..rrrrrrrrrrrr..",
+"..rrr......rrr..",
+"..rrr......rrr..",
+"..rrr......rrr..",
+"..rrr......rrr..",
+"..rrr......rrr..",
+"..rrr......rrr..",
+"..rrrrrrrrrrrr..",
+"..rrrrrrrrrrrr..",
+"..rrrrrrrrrrrr..",
+"................",
+"................"};
+
+const char* blue_icon[]={
+"16 16 2 1",
+"b c blue",
+". c None",
+"................",
+"................",
+"..bbbbbbbbbbbb..",
+"..bbbbbbbbbbbb..",
+"..bbbbbbbbbbbb..",
+"..bbb......bbb..",
+"..bbb......bbb..",
+"..bbb......bbb..",
+"..bbb......bbb..",
+"..bbb......bbb..",
+"..bbb......bbb..",
+"..bbbbbbbbbbbb..",
+"..bbbbbbbbbbbb..",
+"..bbbbbbbbbbbb..",
+"................",
+"................"};
+
+const char* green_icon[]={
+"16 16 2 1",
+"g c green",
+". c None",
+"................",
+"................",
+"..gggggggggggg..",
+"..gggggggggggg..",
+"..gggggggggggg..",
+"..ggg......ggg..",
+"..ggg......ggg..",
+"..ggg......ggg..",
+"..ggg......ggg..",
+"..ggg......ggg..",
+"..ggg......ggg..",
+"..gggggggggggg..",
+"..gggggggggggg..",
+"..gggggggggggg..",
+"................",
+"................"};
+
+
+// ListBox -- low level drag and drop
+
+DDListBox::DDListBox( TQWidget * parent, const char * name, WFlags f ) :
+    TQListBox( parent, name, f )
+{
+    setAcceptDrops( TRUE );
+    dragging = FALSE;
+}
+
+
+void DDListBox::dragEnterEvent( TQDragEnterEvent *evt )
+{
+    if ( TQTextDrag::canDecode( evt ) )
+        evt->accept();
+}
+
+
+void DDListBox::dropEvent( TQDropEvent *evt )
+{
+    TQString text;
+
+    if ( TQTextDrag::decode( evt, text ) )
+        insertItem( text );
+}
+
+
+void DDListBox::mousePressEvent( TQMouseEvent *evt )
+{
+    TQListBox::mousePressEvent( evt );
+    dragging = TRUE;
+}
+
+
+void DDListBox::mouseMoveEvent( TQMouseEvent * )
+{
+    if ( dragging ) {
+        TQDragObject *d = new TQTextDrag( currentText(), this );
+        d->dragCopy(); // do NOT delete d.
+        dragging = FALSE;
+    }
+}
+
+
+// IconViewIcon -- high level drag and drop
+
+
+bool DDIconViewItem::acceptDrop( const TQMimeSource *mime ) const
+{
+    if ( mime->provides( "text/plain" ) )
+        return TRUE;
+    return FALSE;
+}
+
+
+void DDIconViewItem::dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& )
+{
+    TQString label;
+
+    if ( TQTextDrag::decode( evt, label ) )
+        setText( label );
+}
+
+
+// IconView -- high level drag and drop
+
+TQDragObject *DDIconView::dragObject()
+{
+  return new TQTextDrag( currentItem()->text(), this );
+}
+
+void DDIconView::slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem>& )
+{
+    TQString label;
+
+    if ( TQTextDrag::decode( evt, label ) ) {
+        DDIconViewItem *item = new DDIconViewItem( this, label );
+        item->setRenameEnabled( TRUE );
+    }
+}
+
+
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    // Create and show the widgets
+    TQSplitter *split = new TQSplitter();
+    DDIconView *iv   = new DDIconView( split );
+    (void)             new DDListBox( split );
+    app.setMainWidget( split );
+    split->resize( 600, 400 );
+    split->show();
+
+    // Set up the connection so that we can drop items into the icon view
+    TQObject::connect(
+        iv, SIGNAL(dropped(TQDropEvent*, const TQValueList<TQIconDragItem>&)),
+        iv, SLOT(slotNewItem(TQDropEvent*, const TQValueList<TQIconDragItem>&)));
+
+    // Populate the TQIconView with icons
+    DDIconViewItem *item;
+    item = new DDIconViewItem( iv, "Red",   TQPixmap( red_icon ) );
+    item->setRenameEnabled( TRUE );
+    item = new DDIconViewItem( iv, "Green", TQPixmap( green_icon ) );
+    item->setRenameEnabled( TRUE );
+    item = new DDIconViewItem( iv, "Blue",  TQPixmap( blue_icon ) );
+    item->setRenameEnabled( TRUE );
+
+    return app.exec();
+}
+
+
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/iconview-simple_dd-main-h.html b/doc/html/iconview-simple_dd-main-h.html new file mode 100644 index 00000000..cd50dfeb --- /dev/null +++ b/doc/html/iconview-simple_dd-main-h.html @@ -0,0 +1,103 @@ + + + + + +iconview/simple_dd/main.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

iconview/simple_dd/main.h Example File

+ + +
/****************************************************************************
+** $Id: qt/main.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qcursor.h>
+#include <qsplitter.h>
+#include <qlistbox.h>
+#include <qiconview.h>
+#include <qpixmap.h>
+
+class TQDragEnterEvent;
+class TQDragDropEvent;
+
+
+class DDListBox : public TQListBox
+{
+    Q_OBJECT
+public:
+    DDListBox( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+    // Low-level drag and drop
+    void dragEnterEvent( TQDragEnterEvent *evt );
+    void dropEvent( TQDropEvent *evt );
+    void mousePressEvent( TQMouseEvent *evt );
+    void mouseMoveEvent( TQMouseEvent * );
+private:
+    int dragging;
+};
+
+
+class DDIconViewItem : public TQIconViewItem
+{
+public:
+    DDIconViewItem( TQIconView *parent, const TQString& text, const TQPixmap& icon ) :
+        TQIconViewItem( parent, text, icon ) {}
+    DDIconViewItem( TQIconView *parent, const TQString &text ) :
+        TQIconViewItem( parent, text ) {}
+    // High-level drag and drop
+    bool acceptDrop( const TQMimeSource *mime ) const;
+    void dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& );
+};
+
+
+class DDIconView : public TQIconView
+{
+    Q_OBJECT
+public:
+    DDIconView( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) :
+        TQIconView( parent, name, f ) {}
+    // High-level drag and drop
+    TQDragObject *dragObject();
+public slots:
+    void slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem>& list );
+};
+
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/iconview.html b/doc/html/iconview.html new file mode 100644 index 00000000..77c2f00f --- /dev/null +++ b/doc/html/iconview.html @@ -0,0 +1,51 @@ + + + + + +IconView Module + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

IconView Module

+ + + +

The icon view module provides a powerful visualization widget called +TQIconView. API and feature-wise it is similar to TQListView and +TQListBox. It contains optionally labelled pixmap items that the user +can select, drag around, rename, delete, etc. +

Screenshot of TQIconVIew
+

Please see the class documentation for +details. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/images.html b/doc/html/images.html new file mode 100644 index 00000000..8ff5ac79 --- /dev/null +++ b/doc/html/images.html @@ -0,0 +1,93 @@ + + + + + +Image Processing Classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Image Processing Classes

+ + +

These classes are used for manipulating images. +

+

+
TQBitmapMonochrome (1-bit depth) pixmaps +
TQBrushDefines the fill pattern of shapes drawn by a TQPainter +
TQCanvas2D area that can contain TQCanvasItem objects +
TQCanvasEllipseEllipse or ellipse segment on a TQCanvas +
TQCanvasItemAbstract graphic object on a TQCanvas +
TQCanvasItemListList of TQCanvasItems +
TQCanvasLineLine on a TQCanvas +
TQCanvasPixmapPixmaps for TQCanvasSprites +
TQCanvasPixmapArrayArray of TQCanvasPixmaps +
TQCanvasPolygonPolygon on a TQCanvas +
TQCanvasPolygonalItemPolygonal canvas item on a TQCanvas +
TQCanvasRectangleRectangle on a TQCanvas +
TQCanvasSplineMulti-bezier splines on a TQCanvas +
TQCanvasSpriteAnimated canvas item on a TQCanvas +
TQCanvasTextText object on a TQCanvas +
TQCanvasViewOn-screen view of a TQCanvas +
TQColorColors based on RGB or HSV values +
TQColorGroupGroup of widget colors +
TQGLNamespace for miscellaneous identifiers in the TQt OpenGL module +
TQGLColormapUsed for installing custom colormaps into TQGLWidgets +
TQGLContextEncapsulates an OpenGL rendering context +
TQGLFormatThe display format of an OpenGL rendering context +
TQGLWidgetWidget for rendering OpenGL graphics +
TQIconSetSet of icons with different styles and sizes +
TQImageHardware-independent pixmap representation with direct access to the pixel data +
TQImageConsumerAbstraction used by TQImageDecoder +
TQImageDecoderIncremental image decoder for all supported image formats +
TQImageFormatIncremental image decoder for a specific image format +
TQImageFormatTypeFactory that makes TQImageFormat objects +
TQImageIOParameters for loading and saving images +
TQMovieIncremental loading of animations or images, signalling as it progresses +
TQPaintDeviceThe base class of objects that can be painted +
TQPaintDeviceMetricsInformation about a paint device +
TQPainterDoes low-level painting e.g. on widgets +
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 +
TQPixmapOff-screen, pixel-based paint device +
TQPixmapCacheApplication-global cache for pixmaps +
TQPNGImagePackerCreates well-compressed PNG animations +
TQPointDefines a point in the plane +
TQPointArrayArray of points +
TQPrinterPaint device that paints on a printer +
TQRectDefines a rectangle in the plane +
TQRegionClip region for a painter +
TQSizeDefines the size of a two-dimensional object +
TQWMatrix2D transformations of a coordinate system +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/index b/doc/html/index new file mode 100644 index 00000000..4f57133a --- /dev/null +++ b/doc/html/index @@ -0,0 +1,8446 @@ +"3rd Party Licenses used in Qt" 3rdparty.html +"A Complete Application Window" simple-application-example.html +"A Complete Application Window with Actions" qaction-application-example.html +"A Complete Canvas Application" canvas-chart-example.html +"A Directory Browser" dirview-example.html +"A Motif Dialog" motif-dialog-example.html +"A Qt example as a scriptable ActiveX control (executable)" qaxserver-example-tetrax.html +"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 Web Browser" qaxcontainer-example-webbrowser.html +"A qt-interest mail archive search" archivesearch-example.html +"A simple ActiveQt control (executable)" qaxserver-example-simple.html +"A simple HTTP daemon" httpd-example.html +"A simple NNTP implementation" networkprotocol-example.html +"A simple demonstration of QFont member functions" simple-font-demo-example.html +"A simple mail client" mail-example.html +"A small client-server example" clientserver-example.html +"A standard ActiveX and the \"simple\" ActiveQt widget." qaxserver-demo-simple.html +"A tiny SAX2 parser" tagreader-example.html +"About Modules" modules.html +"About Qt" aboutqt.html +"About Unicode" unicode.html +"About the Visual Studio Integration Plugin" integration.html +"ActiveQt Examples" activeqt-examples.html +"Adding an accelerated graphics driver to Qt/Embedded" emb-accel.html +"Advanced use of tool tips" tooltip-example.html +"All Overviews and HOWTOs" overviews-list.html +"An ActiveX Test Container" activeqt-tools-testcon.html +"An Extension Dialog Example" extension-dialog-example.html +"An FTP client" ftpclient-example.html +"An MDI Application" mdi-example.html +"Analog Clock" aclock-example.html +"Annotated Class Index" annotated.html +"Biff (UNIX only)" biff-example.html +"Books about GUI" guibooks.html +"Brief Technical FAQ" commonproblems.html +"Buttons and Groupboxes" buttongroups-example.html +"Canvas Control" tutorial2-06.html +"Canvas Example" canvas-example.html +"Canvas Module" canvas.html +"Character input in Qt/Embedded" emb-charinput.html +"Class Inheritance Hierarchy" hierarchy.html +"Company Information" troll.html +"Connect the Points" drawlines-example.html +"Continuing Development" motif-walkthrough-10.html +"Conway's Game of Life" life-example.html +"Cursors" cursor-example.html +"Customized Layoutmanager" customlayout-example.html +"Data Elements" tutorial2-03.html +"Debugging Techniques" debug.html +"Demonstration of SAX2 features" tagreader-with-features-example.html +"Deploying Qt Applications" distributingqt.html +"Digital Clock" dclock-example.html +"Drag and Drop" dnd.html +"Drag and Drop" dragdrop-example.html +"Drag and Drop (Simple)" simple_dd-example.html +"Draw Demo" drawdemo-example.html +"Enabling the Linux Framebuffer" emb-framebuffer-howto.html +"Events and Event Filters" eventsandfilters.html +"File Handling" tutorial2-07.html +"Font Displayer" qfd-example.html +"Fonts in Qt/Embedded" emb-fonts.html +"Format of the QDataStream Operators" datastreamformat.html +"Functions removed in Qt 2.0" removed20.html +"GNU General Public License" gpl.html +"Getting Started" motif-walkthrough-1.html +"Grapher Plugin" grapher-nsplugin-example.html +"Grouped Classes" groups.html +"Header File Index" headers.html +"Hello, World" hello-example.html +"Helpsystem" helpsystem-example.html +"How to Learn Qt" how-to-learn-qt.html +"How to Report A Bug" bughowto.html +"How to create a large, sparse QTable" bigtable-example.html +"How to use X11 overlays with the Qt OpenGL extension" opengl-x11-overlays.html +"IconView Module" iconview.html +"Iconview" iconview-example.html +"In Sync with Outlook" qaxcontainer-example-qutlook.html +"Installation" installation.html +"Installing Qt/Embedded" emb-install.html +"Installing Qt/Mac" install-mac.html +"Installing Qt/Windows" install-win.html +"Installing Qt/X11" install-x11.html +"Internationalization" i18n-example.html +"Introduction" tutorial2-01.html +"Issues to be aware of when porting Qt/Embedded" embedporting.html +"Key Features in Qt 3.0" keyfeatures30.html +"Keyboard Focus Overview" focus.html +"KeyboardFilter" keyboardfilter.html +"Layout Classes" layout.html +"Layout Managers" layout-example.html +"Licenses for Code Used in Qt" licenses.html +"Line Edits" lineedits-example.html +"Listbox Example" listbox-example.html +"Listboxes and Comboboxes" listboxcombo-example.html +"Listviews" listviews-example.html +"Listviews with Checkable Items" checklists-example.html +"Mainly Easy" tutorial2-04.html +"Member Function Index" functions.html +"Menubar merging" qaxserver-demo-menus.html +"Menubar merging" qaxserver-example-menus.html +"Meta Object System" metaobjects.html +"Movies or the Story of the Animated GIF file" movies-example.html +"Network Module" network.html +"Object Trees and Object Ownership" objecttrees.html +"OpenGL Box Example" opengl-box-example.html +"OpenGL Gear Example" opengl-gear-example.html +"OpenGL Overlay Example" opengl-overlay-example.html +"OpenGL Overlay X11 Example" opengl-overlay-x11-example.html +"OpenGL Pixmap Example" opengl-pixmap-example.html +"OpenGL Shared Box Example" opengl-sharedbox-example.html +"OpenGL Texture Example" opengl-texture-example.html +"OpenGL in an HTML page" qaxserver-demo-opengl.html +"Outliner to show use of DOM" outliner-example.html +"Painting on the Desktop" desktop-example.html +"Picture" picture-example.html +"Pictures of Most Qt Widgets" pictures.html +"Play Tetrix!" qaxserver-demo-tetrax.html +"Popup Widgets" popup-example.html +"Porting to Qt 2.x" porting2.html +"Porting to Qt 3.x" porting.html +"Porting your applications to Qt/Embedded" emb-porting.html +"Preparing to Migrate the User Interface" motif-walkthrough-2.html +"Presenting the GUI" tutorial2-05.html +"Progress Bar" progressbar-example.html +"Progress Bar and Dialog Example" progress-example.html +"Properties" properties.html +"QAccel" qaccel.html +"QAccel::activated" qaccel.html#activated +"QAccel::activatedAmbiguously" qaccel.html#activatedAmbiguously +"QAccel::clear" qaccel.html#clear +"QAccel::connectItem" qaccel.html#connectItem +"QAccel::count" qaccel.html#count +"QAccel::disconnectItem" qaccel.html#disconnectItem +"QAccel::findKey" qaccel.html#findKey +"QAccel::insertItem" qaccel.html#insertItem +"QAccel::isEnabled" qaccel.html#isEnabled +"QAccel::isItemEnabled" qaccel.html#isItemEnabled +"QAccel::key" qaccel.html#key +"QAccel::removeItem" qaccel.html#removeItem +"QAccel::setEnabled" qaccel.html#setEnabled +"QAccel::setItemEnabled" qaccel.html#setItemEnabled +"QAccel::setWhatsThis" qaccel.html#setWhatsThis +"QAccel::shortcutKey" qaccel.html#shortcutKey +"QAccel::whatsThis" qaccel.html#whatsThis +"QAccel::~QAccel" qaccel.html#~QAccel +"QAccessible" qaccessible.html +"QAccessible::Event" qaccessible.html#Event +"QAccessible::NavDirection" qaccessible.html#NavDirection +"QAccessible::Role" qaccessible.html#Role +"QAccessible::State" qaccessible.html#State +"QAccessible::Text" qaccessible.html#Text +"QAccessible::isActive" qaccessible.html#isActive +"QAccessible::queryAccessibleInterface" qaccessible.html#queryAccessibleInterface +"QAccessible::updateAccessibility" qaccessible.html#updateAccessibility +"QAccessibleInterface" qaccessibleinterface.html +"QAccessibleInterface::childCount" qaccessibleinterface.html#childCount +"QAccessibleInterface::clearSelection" qaccessibleinterface.html#clearSelection +"QAccessibleInterface::controlAt" qaccessibleinterface.html#controlAt +"QAccessibleInterface::doDefaultAction" qaccessibleinterface.html#doDefaultAction +"QAccessibleInterface::isValid" qaccessibleinterface.html#isValid +"QAccessibleInterface::navigate" qaccessibleinterface.html#navigate +"QAccessibleInterface::queryChild" qaccessibleinterface.html#queryChild +"QAccessibleInterface::queryParent" qaccessibleinterface.html#queryParent +"QAccessibleInterface::rect" qaccessibleinterface.html#rect +"QAccessibleInterface::role" qaccessibleinterface.html#role +"QAccessibleInterface::selection" qaccessibleinterface.html#selection +"QAccessibleInterface::setFocus" qaccessibleinterface.html#setFocus +"QAccessibleInterface::setSelected" qaccessibleinterface.html#setSelected +"QAccessibleInterface::setText" qaccessibleinterface.html#setText +"QAccessibleInterface::state" qaccessibleinterface.html#state +"QAccessibleInterface::text" qaccessibleinterface.html#text +"QAccessibleObject" qaccessibleobject.html +"QAccessibleObject::object" qaccessibleobject.html#object +"QAccessibleObject::~QAccessibleObject" qaccessibleobject.html#~QAccessibleObject +"QAction" qaction.html +"QAction::accel" qaction.html#accel +"QAction::accel" qaction.html#accel-prop +"QAction::activate" qaction.html#activate +"QAction::activated" qaction.html#activated +"QAction::addTo" qaction.html#addTo +"QAction::addedTo" qaction.html#addedTo +"QAction::clearStatusText" qaction.html#clearStatusText +"QAction::enabled" qaction.html#enabled-prop +"QAction::iconSet" qaction.html#iconSet +"QAction::iconSet" qaction.html#iconSet-prop +"QAction::isEnabled" qaction.html#isEnabled +"QAction::isOn" qaction.html#isOn +"QAction::isToggleAction" qaction.html#isToggleAction +"QAction::isVisible" qaction.html#isVisible +"QAction::menuStatusText" qaction.html#menuStatusText +"QAction::menuText" qaction.html#menuText +"QAction::menuText" qaction.html#menuText-prop +"QAction::on" qaction.html#on-prop +"QAction::removeFrom" qaction.html#removeFrom +"QAction::setAccel" qaction.html#setAccel +"QAction::setDisabled" qaction.html#setDisabled +"QAction::setEnabled" qaction.html#setEnabled +"QAction::setIconSet" qaction.html#setIconSet +"QAction::setMenuText" qaction.html#setMenuText +"QAction::setOn" qaction.html#setOn +"QAction::setStatusTip" qaction.html#setStatusTip +"QAction::setText" qaction.html#setText +"QAction::setToggleAction" qaction.html#setToggleAction +"QAction::setToolTip" qaction.html#setToolTip +"QAction::setVisible" qaction.html#setVisible +"QAction::setWhatsThis" qaction.html#setWhatsThis +"QAction::showStatusText" qaction.html#showStatusText +"QAction::statusTip" qaction.html#statusTip +"QAction::statusTip" qaction.html#statusTip-prop +"QAction::text" qaction.html#text +"QAction::text" qaction.html#text-prop +"QAction::toggle" qaction.html#toggle +"QAction::toggleAction" qaction.html#toggleAction-prop +"QAction::toggled" qaction.html#toggled +"QAction::toolTip" qaction.html#toolTip +"QAction::toolTip" qaction.html#toolTip-prop +"QAction::visible" qaction.html#visible-prop +"QAction::whatsThis" qaction.html#whatsThis +"QAction::whatsThis" qaction.html#whatsThis-prop +"QAction::~QAction" qaction.html#~QAction +"QActionGroup" qactiongroup.html +"QActionGroup::add" qactiongroup.html#add +"QActionGroup::addSeparator" qactiongroup.html#addSeparator +"QActionGroup::addTo" qactiongroup.html#addTo +"QActionGroup::exclusive" qactiongroup.html#exclusive-prop +"QActionGroup::isExclusive" qactiongroup.html#isExclusive +"QActionGroup::selected" qactiongroup.html#selected +"QActionGroup::setExclusive" qactiongroup.html#setExclusive +"QActionGroup::setUsesDropDown" qactiongroup.html#setUsesDropDown +"QActionGroup::usesDropDown" qactiongroup.html#usesDropDown +"QActionGroup::usesDropDown" qactiongroup.html#usesDropDown-prop +"QActionGroup::~QActionGroup" qactiongroup.html#~QActionGroup +"QApplication" qapplication.html +"QApplication::ColorSpec" qapplication.html#ColorSpec +"QApplication::Encoding" qapplication.html#Encoding +"QApplication::Type" qapplication.html#Type +"QApplication::aboutQt" qapplication.html#aboutQt +"QApplication::aboutToQuit" qapplication.html#aboutToQuit +"QApplication::activeModalWidget" qapplication.html#activeModalWidget +"QApplication::activePopupWidget" qapplication.html#activePopupWidget +"QApplication::activeWindow" qapplication.html#activeWindow +"QApplication::addLibraryPath" qapplication.html#addLibraryPath +"QApplication::allWidgets" qapplication.html#allWidgets +"QApplication::applicationDirPath" qapplication.html#applicationDirPath +"QApplication::applicationFilePath" qapplication.html#applicationFilePath +"QApplication::argc" qapplication.html#argc +"QApplication::argv" qapplication.html#argv +"QApplication::beep" qapplication.html#beep +"QApplication::clipboard" qapplication.html#clipboard +"QApplication::closeAllWindows" qapplication.html#closeAllWindows +"QApplication::closingDown" qapplication.html#closingDown +"QApplication::colorSpec" qapplication.html#colorSpec +"QApplication::commitData" qapplication.html#commitData +"QApplication::cursorFlashTime" qapplication.html#cursorFlashTime +"QApplication::desktop" qapplication.html#desktop +"QApplication::desktopSettingsAware" qapplication.html#desktopSettingsAware +"QApplication::doubleClickInterval" qapplication.html#doubleClickInterval +"QApplication::eventLoop" qapplication.html#eventLoop +"QApplication::exec" qapplication.html#exec +"QApplication::exit" qapplication.html#exit +"QApplication::flush" qapplication.html#flush +"QApplication::flushX" qapplication.html#flushX +"QApplication::focusWidget" qapplication.html#focusWidget +"QApplication::font" qapplication.html#font +"QApplication::fontMetrics" qapplication.html#fontMetrics +"QApplication::globalStrut" qapplication.html#globalStrut +"QApplication::guiThreadAwake" qapplication.html#guiThreadAwake +"QApplication::hasGlobalMouseTracking" qapplication.html#hasGlobalMouseTracking +"QApplication::hasPendingEvents" qapplication.html#hasPendingEvents +"QApplication::horizontalAlignment" qapplication.html#horizontalAlignment +"QApplication::initialize" qapplication.html#initialize +"QApplication::installTranslator" qapplication.html#installTranslator +"QApplication::isEffectEnabled" qapplication.html#isEffectEnabled +"QApplication::isSessionRestored" qapplication.html#isSessionRestored +"QApplication::lastWindowClosed" qapplication.html#lastWindowClosed +"QApplication::libraryPaths" qapplication.html#libraryPaths +"QApplication::lock" qapplication.html#lock +"QApplication::locked" qapplication.html#locked +"QApplication::macEventFilter" qapplication.html#macEventFilter +"QApplication::mainWidget" qapplication.html#mainWidget +"QApplication::notify" qapplication.html#notify +"QApplication::overrideCursor" qapplication.html#overrideCursor +"QApplication::palette" qapplication.html#palette +"QApplication::polish" qapplication.html#polish +"QApplication::postEvent" qapplication.html#postEvent +"QApplication::processEvents" qapplication.html#processEvents +"QApplication::tquit" qapplication.html#tquit +"QApplication::qwsDecoration" qapplication.html#qwsDecoration +"QApplication::qwsEventFilter" qapplication.html#qwsEventFilter +"QApplication::qwsSetCustomColors" qapplication.html#qwsSetCustomColors +"QApplication::qwsSetDecoration" qapplication.html#qwsSetDecoration +"QApplication::removeLibraryPath" qapplication.html#removeLibraryPath +"QApplication::removePostedEvent" qapplication.html#removePostedEvent +"QApplication::removePostedEvents" qapplication.html#removePostedEvents +"QApplication::removeTranslator" qapplication.html#removeTranslator +"QApplication::restoreOverrideCursor" qapplication.html#restoreOverrideCursor +"QApplication::reverseLayout" qapplication.html#reverseLayout +"QApplication::saveState" qapplication.html#saveState +"QApplication::sendEvent" qapplication.html#sendEvent +"QApplication::sendPostedEvents" qapplication.html#sendPostedEvents +"QApplication::sessionId" qapplication.html#sessionId +"QApplication::sessionKey" qapplication.html#sessionKey +"QApplication::setColorSpec" qapplication.html#setColorSpec +"QApplication::setCursorFlashTime" qapplication.html#setCursorFlashTime +"QApplication::setDesktopSettingsAware" qapplication.html#setDesktopSettingsAware +"QApplication::setDoubleClickInterval" qapplication.html#setDoubleClickInterval +"QApplication::setEffectEnabled" qapplication.html#setEffectEnabled +"QApplication::setFont" qapplication.html#setFont +"QApplication::setGlobalMouseTracking" qapplication.html#setGlobalMouseTracking +"QApplication::setGlobalStrut" qapplication.html#setGlobalStrut +"QApplication::setLibraryPaths" qapplication.html#setLibraryPaths +"QApplication::setMainWidget" qapplication.html#setMainWidget +"QApplication::setOverrideCursor" qapplication.html#setOverrideCursor +"QApplication::setPalette" qapplication.html#setPalette +"QApplication::setReverseLayout" qapplication.html#setReverseLayout +"QApplication::setStartDragDistance" qapplication.html#setStartDragDistance +"QApplication::setStartDragTime" qapplication.html#setStartDragTime +"QApplication::setStyle" qapplication.html#setStyle +"QApplication::setWheelScrollLines" qapplication.html#setWheelScrollLines +"QApplication::startDragDistance" qapplication.html#startDragDistance +"QApplication::startDragTime" qapplication.html#startDragTime +"QApplication::startingUp" qapplication.html#startingUp +"QApplication::style" qapplication.html#style +"QApplication::syncX" qapplication.html#syncX +"QApplication::topLevelWidgets" qapplication.html#topLevelWidgets +"QApplication::translate" qapplication.html#translate +"QApplication::tryLock" qapplication.html#tryLock +"QApplication::type" qapplication.html#type +"QApplication::unlock" qapplication.html#unlock +"QApplication::wakeUpGuiThread" qapplication.html#wakeUpGuiThread +"QApplication::wheelScrollLines" qapplication.html#wheelScrollLines +"QApplication::widgetAt" qapplication.html#widgetAt +"QApplication::winEventFilter" qapplication.html#winEventFilter +"QApplication::winFocus" qapplication.html#winFocus +"QApplication::x11EventFilter" qapplication.html#x11EventFilter +"QApplication::x11ProcessEvent" qapplication.html#x11ProcessEvent +"QApplication::~QApplication" qapplication.html#~QApplication +"QArray Class Reference (obsolete)" qarray.html +"QAsciiCache" qasciicache.html +"QAsciiCache::clear" qasciicache.html#clear +"QAsciiCache::count" qasciicache.html#count +"QAsciiCache::find" qasciicache.html#find +"QAsciiCache::insert" qasciicache.html#insert +"QAsciiCache::isEmpty" qasciicache.html#isEmpty +"QAsciiCache::maxCost" qasciicache.html#maxCost +"QAsciiCache::operator[]" qasciicache.html#operator[] +"QAsciiCache::remove" qasciicache.html#remove +"QAsciiCache::setMaxCost" qasciicache.html#setMaxCost +"QAsciiCache::size" qasciicache.html#size +"QAsciiCache::statistics" qasciicache.html#statistics +"QAsciiCache::take" qasciicache.html#take +"QAsciiCache::totalCost" qasciicache.html#totalCost +"QAsciiCache::~QAsciiCache" qasciicache.html#~QAsciiCache +"QAsciiCacheIterator" qasciicacheiterator.html +"QAsciiCacheIterator::atFirst" qasciicacheiterator.html#atFirst +"QAsciiCacheIterator::atLast" qasciicacheiterator.html#atLast +"QAsciiCacheIterator::count" qasciicacheiterator.html#count +"QAsciiCacheIterator::current" qasciicacheiterator.html#current +"QAsciiCacheIterator::currentKey" qasciicacheiterator.html#currentKey +"QAsciiCacheIterator::isEmpty" qasciicacheiterator.html#isEmpty +"QAsciiCacheIterator::operator type *" qasciicacheiterator.html#operator-type-* +"QAsciiCacheIterator::operator()" qasciicacheiterator.html#operator() +"QAsciiCacheIterator::operator++" qasciicacheiterator.html#operator++ +"QAsciiCacheIterator::operator+=" qasciicacheiterator.html#operator+-eq +"QAsciiCacheIterator::operator--" qasciicacheiterator.html#operator-- +"QAsciiCacheIterator::operator-=" qasciicacheiterator.html#operator--eq +"QAsciiCacheIterator::operator=" qasciicacheiterator.html#operator-eq +"QAsciiCacheIterator::toFirst" qasciicacheiterator.html#toFirst +"QAsciiCacheIterator::toLast" qasciicacheiterator.html#toLast +"QAsciiDict" qasciidict.html +"QAsciiDict::clear" qasciidict.html#clear +"QAsciiDict::count" qasciidict.html#count +"QAsciiDict::find" qasciidict.html#find +"QAsciiDict::insert" qasciidict.html#insert +"QAsciiDict::isEmpty" qasciidict.html#isEmpty +"QAsciiDict::operator=" qasciidict.html#operator-eq +"QAsciiDict::operator[]" qasciidict.html#operator[] +"QAsciiDict::read" qasciidict.html#read +"QAsciiDict::remove" qasciidict.html#remove +"QAsciiDict::replace" qasciidict.html#replace +"QAsciiDict::resize" qasciidict.html#resize +"QAsciiDict::size" qasciidict.html#size +"QAsciiDict::statistics" qasciidict.html#statistics +"QAsciiDict::take" qasciidict.html#take +"QAsciiDict::write" qasciidict.html#write +"QAsciiDict::~QAsciiDict" qasciidict.html#~QAsciiDict +"QAsciiDictIterator" qasciidictiterator.html +"QAsciiDictIterator::count" qasciidictiterator.html#count +"QAsciiDictIterator::current" qasciidictiterator.html#current +"QAsciiDictIterator::currentKey" qasciidictiterator.html#currentKey +"QAsciiDictIterator::isEmpty" qasciidictiterator.html#isEmpty +"QAsciiDictIterator::operator type *" qasciidictiterator.html#operator-type-* +"QAsciiDictIterator::operator()" qasciidictiterator.html#operator() +"QAsciiDictIterator::operator++" qasciidictiterator.html#operator++ +"QAsciiDictIterator::operator+=" qasciidictiterator.html#operator+-eq +"QAsciiDictIterator::toFirst" qasciidictiterator.html#toFirst +"QAsciiDictIterator::~QAsciiDictIterator" qasciidictiterator.html#~QAsciiDictIterator +"QAssistantClient" qassistantclient.html +"QAssistantClient::assistantClosed" qassistantclient.html#assistantClosed +"QAssistantClient::assistantOpened" qassistantclient.html#assistantOpened +"QAssistantClient::closeAssistant" qassistantclient.html#closeAssistant +"QAssistantClient::error" qassistantclient.html#error +"QAssistantClient::isOpen" qassistantclient.html#isOpen +"QAssistantClient::open" qassistantclient.html#open-prop +"QAssistantClient::openAssistant" qassistantclient.html#openAssistant +"QAssistantClient::setArguments" qassistantclient.html#setArguments +"QAssistantClient::showPage" qassistantclient.html#showPage +"QAssistantClient::~QAssistantClient" qassistantclient.html#~QAssistantClient +"QAsyncIO::connect" qasyncio.html#connect +"QAsyncIO::ready" qasyncio.html#ready +"QAsyncIO::~QAsyncIO" qasyncio.html#~QAsyncIO +"QAuServer::bucket" qauserver.html#bucket +"QAuServer::decLoop" qauserver.html#decLoop +"QAuServer::init" qauserver.html#init +"QAuServer::setBucket" qauserver.html#setBucket +"QAxAggregated" qaxaggregated.html +"QAxAggregated::controllingUnknown" qaxaggregated.html#controllingUnknown +"QAxAggregated::object" qaxaggregated.html#object +"QAxAggregated::queryInterface" qaxaggregated.html#queryInterface +"QAxAggregated::widget" qaxaggregated.html#widget +"QAxBase" qaxbase.html +"QAxBase::PropertyBag" qaxbase.html#PropertyBag +"QAxBase::asVariant" qaxbase.html#asVariant +"QAxBase::clear" qaxbase.html#clear +"QAxBase::control" qaxbase.html#control +"QAxBase::control" qaxbase.html#control-prop +"QAxBase::disableClassInfo" qaxbase.html#disableClassInfo +"QAxBase::disableEventSink" qaxbase.html#disableEventSink +"QAxBase::disableMetaObject" qaxbase.html#disableMetaObject +"QAxBase::dynamicCall" qaxbase.html#dynamicCall +"QAxBase::exception" qaxbase.html#exception +"QAxBase::generateDocumentation" qaxbase.html#generateDocumentation +"QAxBase::initialize" qaxbase.html#initialize +"QAxBase::initializeActive" qaxbase.html#initializeActive +"QAxBase::initializeLicensed" qaxbase.html#initializeLicensed +"QAxBase::initializeRemote" qaxbase.html#initializeRemote +"QAxBase::isNull" qaxbase.html#isNull +"QAxBase::propertyBag" qaxbase.html#propertyBag +"QAxBase::propertyChanged" qaxbase.html#propertyChanged +"QAxBase::propertyWritable" qaxbase.html#propertyWritable +"QAxBase::queryInterface" qaxbase.html#queryInterface +"QAxBase::querySubObject" qaxbase.html#querySubObject +"QAxBase::setControl" qaxbase.html#setControl +"QAxBase::setPropertyBag" qaxbase.html#setPropertyBag +"QAxBase::setPropertyWritable" qaxbase.html#setPropertyWritable +"QAxBase::signal" qaxbase.html#signal +"QAxBase::~QAxBase" qaxbase.html#~QAxBase +"QAxBindable" qaxbindable.html +"QAxBindable::clientSite" qaxbindable.html#clientSite +"QAxBindable::createAggregate" qaxbindable.html#createAggregate +"QAxBindable::propertyChanged" qaxbindable.html#propertyChanged +"QAxBindable::reportError" qaxbindable.html#reportError +"QAxBindable::requestPropertyChange" qaxbindable.html#requestPropertyChange +"QAxBindable::~QAxBindable" qaxbindable.html#~QAxBindable +"QAxFactory" qaxfactory.html +"QAxFactory::ServerType" qaxfactory.html#ServerType +"QAxFactory::appID" qaxfactory.html#appID +"QAxFactory::classID" qaxfactory.html#classID +"QAxFactory::create" qaxfactory.html#create +"QAxFactory::createObject" qaxfactory.html#createObject +"QAxFactory::createObjectWrapper" qaxfactory.html#createObjectWrapper +"QAxFactory::eventsID" qaxfactory.html#eventsID +"QAxFactory::exposeToSuperClass" qaxfactory.html#exposeToSuperClass +"QAxFactory::featureList" qaxfactory.html#featureList +"QAxFactory::hasStockEvents" qaxfactory.html#hasStockEvents +"QAxFactory::interfaceID" qaxfactory.html#interfaceID +"QAxFactory::isServer" qaxfactory.html#isServer +"QAxFactory::isService" qaxfactory.html#isService +"QAxFactory::metaObject" qaxfactory.html#metaObject +"QAxFactory::registerClass" qaxfactory.html#registerClass +"QAxFactory::serverDirPath" qaxfactory.html#serverDirPath +"QAxFactory::serverFilePath" qaxfactory.html#serverFilePath +"QAxFactory::startServer" qaxfactory.html#startServer +"QAxFactory::stayTopLevel" qaxfactory.html#stayTopLevel +"QAxFactory::stopServer" qaxfactory.html#stopServer +"QAxFactory::typeLibID" qaxfactory.html#typeLibID +"QAxFactory::unregisterClass" qaxfactory.html#unregisterClass +"QAxFactory::validateLicenseKey" qaxfactory.html#validateLicenseKey +"QAxFactory::~QAxFactory" qaxfactory.html#~QAxFactory +"QAxObject" qaxobject.html +"QAxObject::~QAxObject" qaxobject.html#~QAxObject +"QAxScript" qaxscript.html +"QAxScript::FunctionFlags" qaxscript.html#FunctionFlags +"QAxScript::call" qaxscript.html#call +"QAxScript::entered" qaxscript.html#entered +"QAxScript::error" qaxscript.html#error +"QAxScript::finished" qaxscript.html#finished +"QAxScript::functions" qaxscript.html#functions +"QAxScript::load" qaxscript.html#load +"QAxScript::scriptCode" qaxscript.html#scriptCode +"QAxScript::scriptEngine" qaxscript.html#scriptEngine +"QAxScript::scriptName" qaxscript.html#scriptName +"QAxScript::stateChanged" qaxscript.html#stateChanged +"QAxScript::~QAxScript" qaxscript.html#~QAxScript +"QAxScriptEngine" qaxscriptengine.html +"QAxScriptEngine::State" qaxscriptengine.html#State +"QAxScriptEngine::addItem" qaxscriptengine.html#addItem +"QAxScriptEngine::hasIntrospection" qaxscriptengine.html#hasIntrospection +"QAxScriptEngine::isValid" qaxscriptengine.html#isValid +"QAxScriptEngine::queryInterface" qaxscriptengine.html#queryInterface +"QAxScriptEngine::scriptLanguage" qaxscriptengine.html#scriptLanguage +"QAxScriptEngine::setState" qaxscriptengine.html#setState +"QAxScriptEngine::state" qaxscriptengine.html#state +"QAxScriptEngine::~QAxScriptEngine" qaxscriptengine.html#~QAxScriptEngine +"QAxScriptManager" qaxscriptmanager.html +"QAxScriptManager::addObject" qaxscriptmanager.html#addObject +"QAxScriptManager::call" qaxscriptmanager.html#call +"QAxScriptManager::error" qaxscriptmanager.html#error +"QAxScriptManager::functions" qaxscriptmanager.html#functions +"QAxScriptManager::load" qaxscriptmanager.html#load +"QAxScriptManager::registerEngine" qaxscriptmanager.html#registerEngine +"QAxScriptManager::script" qaxscriptmanager.html#script +"QAxScriptManager::scriptFileFilter" qaxscriptmanager.html#scriptFileFilter +"QAxScriptManager::scriptNames" qaxscriptmanager.html#scriptNames +"QAxScriptManager::~QAxScriptManager" qaxscriptmanager.html#~QAxScriptManager +"QAxWidget" qaxwidget.html +"QAxWidget::createHostWindow" qaxwidget.html#createHostWindow +"QAxWidget::translateKeyEvent" qaxwidget.html#translateKeyEvent +"QAxWidget::~QAxWidget" qaxwidget.html#~QAxWidget +"QBig5Codec" qbig5codec.html +"QBig5hkscsCodec" qbig5hkscscodec.html +"QBitArray" qbitarray.html +"QBitArray::at" qbitarray.html#at +"QBitArray::clearBit" qbitarray.html#clearBit +"QBitArray::copy" qbitarray.html#copy +"QBitArray::detach" qbitarray.html#detach +"QBitArray::fill" qbitarray.html#fill +"QBitArray::operator&=" qbitarray.html#operator-and-eq +"QBitArray::operator=" qbitarray.html#operator-eq +"QBitArray::operator[]" qbitarray.html#operator[] +"QBitArray::operator^=" qbitarray.html#operator^-eq +"QBitArray::operator|=" qbitarray.html#operator|-eq +"QBitArray::operator~" qbitarray.html#operator~ +"QBitArray::pad0" qbitarray.html#pad0 +"QBitArray::resize" qbitarray.html#resize +"QBitArray::setBit" qbitarray.html#setBit +"QBitArray::size" qbitarray.html#size +"QBitArray::testBit" qbitarray.html#testBit +"QBitArray::toggleBit" qbitarray.html#toggleBit +"QBitVal" qbitval.html +"QBitVal::operator int" qbitval.html#operator-int +"QBitVal::operator=" qbitval.html#operator-eq +"QBitmap" qbitmap.html +"QBitmap::operator=" qbitmap.html#operator-eq +"QBitmap::xForm" qbitmap.html#xForm +"QBoxLayout" qboxlayout.html +"QBoxLayout::Direction" qboxlayout.html#Direction +"QBoxLayout::addItem" qboxlayout.html#addItem +"QBoxLayout::addLayout" qboxlayout.html#addLayout +"QBoxLayout::addSpacing" qboxlayout.html#addSpacing +"QBoxLayout::addStretch" qboxlayout.html#addStretch +"QBoxLayout::addStrut" qboxlayout.html#addStrut +"QBoxLayout::addWidget" qboxlayout.html#addWidget +"QBoxLayout::direction" qboxlayout.html#direction +"QBoxLayout::expanding" qboxlayout.html#expanding +"QBoxLayout::findWidget" qboxlayout.html#findWidget +"QBoxLayout::hasHeightForWidth" qboxlayout.html#hasHeightForWidth +"QBoxLayout::heightForWidth" qboxlayout.html#heightForWidth +"QBoxLayout::insertItem" qboxlayout.html#insertItem +"QBoxLayout::insertLayout" qboxlayout.html#insertLayout +"QBoxLayout::insertSpacing" qboxlayout.html#insertSpacing +"QBoxLayout::insertStretch" qboxlayout.html#insertStretch +"QBoxLayout::insertWidget" qboxlayout.html#insertWidget +"QBoxLayout::invalidate" qboxlayout.html#invalidate +"QBoxLayout::maximumSize" qboxlayout.html#maximumSize +"QBoxLayout::minimumSize" qboxlayout.html#minimumSize +"QBoxLayout::setDirection" qboxlayout.html#setDirection +"QBoxLayout::setGeometry" qboxlayout.html#setGeometry +"QBoxLayout::setStretchFactor" qboxlayout.html#setStretchFactor +"QBoxLayout::sizeHint" qboxlayout.html#sizeHint +"QBoxLayout::~QBoxLayout" qboxlayout.html#~QBoxLayout +"QBrush" qbrush.html +"QBrush::color" qbrush.html#color +"QBrush::copy" qbrush.html#copy +"QBrush::detach" qbrush.html#detach +"QBrush::operator!=" qbrush.html#operator!-eq +"QBrush::operator=" qbrush.html#operator-eq +"QBrush::operator==" qbrush.html#operator-eq-eq +"QBrush::pixmap" qbrush.html#pixmap +"QBrush::setColor" qbrush.html#setColor +"QBrush::setPixmap" qbrush.html#setPixmap +"QBrush::setStyle" qbrush.html#setStyle +"QBrush::style" qbrush.html#style +"QBrush::~QBrush" qbrush.html#~QBrush +"QBuffer" qbuffer.html +"QBuffer::buffer" qbuffer.html#buffer +"QBuffer::setBuffer" qbuffer.html#setBuffer +"QBuffer::writeBlock" qbuffer.html#writeBlock +"QBuffer::~QBuffer" qbuffer.html#~QBuffer +"QButton" qbutton.html +"QButton::ToggleState" qbutton.html#ToggleState +"QButton::ToggleType" qbutton.html#ToggleType +"QButton::accel" qbutton.html#accel +"QButton::accel" qbutton.html#accel-prop +"QButton::animateClick" qbutton.html#animateClick +"QButton::animateTimeout" qbutton.html#animateTimeout +"QButton::autoRepeat" qbutton.html#autoRepeat +"QButton::autoRepeat" qbutton.html#autoRepeat-prop +"QButton::autoRepeatTimeout" qbutton.html#autoRepeatTimeout +"QButton::clicked" qbutton.html#clicked +"QButton::down" qbutton.html#down-prop +"QButton::drawButton" qbutton.html#drawButton +"QButton::drawButtonLabel" qbutton.html#drawButtonLabel +"QButton::exclusiveToggle" qbutton.html#exclusiveToggle-prop +"QButton::group" qbutton.html#group +"QButton::hitButton" qbutton.html#hitButton +"QButton::isDown" qbutton.html#isDown +"QButton::isExclusiveToggle" qbutton.html#isExclusiveToggle +"QButton::isOn" qbutton.html#isOn +"QButton::isToggleButton" qbutton.html#isToggleButton +"QButton::on" qbutton.html#on-prop +"QButton::paintEvent" qbutton.html#paintEvent +"QButton::pixmap" qbutton.html#pixmap +"QButton::pixmap" qbutton.html#pixmap-prop +"QButton::pressed" qbutton.html#pressed +"QButton::released" qbutton.html#released +"QButton::setAccel" qbutton.html#setAccel +"QButton::setAutoRepeat" qbutton.html#setAutoRepeat +"QButton::setDown" qbutton.html#setDown +"QButton::setOn" qbutton.html#setOn +"QButton::setPixmap" qbutton.html#setPixmap +"QButton::setState" qbutton.html#setState +"QButton::setText" qbutton.html#setText +"QButton::setToggleButton" qbutton.html#setToggleButton +"QButton::setToggleType" qbutton.html#setToggleType +"QButton::state" qbutton.html#state +"QButton::stateChanged" qbutton.html#stateChanged +"QButton::text" qbutton.html#text +"QButton::text" qbutton.html#text-prop +"QButton::toggle" qbutton.html#toggle +"QButton::toggleButton" qbutton.html#toggleButton-prop +"QButton::toggleState" qbutton.html#toggleState-prop +"QButton::toggleType" qbutton.html#toggleType +"QButton::toggleType" qbutton.html#toggleType-prop +"QButton::toggled" qbutton.html#toggled +"QButton::~QButton" qbutton.html#~QButton +"QButtonGroup" qbuttongroup.html +"QButtonGroup::clicked" qbuttongroup.html#clicked +"QButtonGroup::count" qbuttongroup.html#count +"QButtonGroup::exclusive" qbuttongroup.html#exclusive-prop +"QButtonGroup::find" qbuttongroup.html#find +"QButtonGroup::id" qbuttongroup.html#id +"QButtonGroup::init" qbuttongroup.html#init +"QButtonGroup::insert" qbuttongroup.html#insert +"QButtonGroup::isExclusive" qbuttongroup.html#isExclusive +"QButtonGroup::isRadioButtonExclusive" qbuttongroup.html#isRadioButtonExclusive +"QButtonGroup::moveFocus" qbuttongroup.html#moveFocus +"QButtonGroup::pressed" qbuttongroup.html#pressed +"QButtonGroup::radioButtonExclusive" qbuttongroup.html#radioButtonExclusive-prop +"QButtonGroup::released" qbuttongroup.html#released +"QButtonGroup::remove" qbuttongroup.html#remove +"QButtonGroup::selected" qbuttongroup.html#selected +"QButtonGroup::selectedId" qbuttongroup.html#selectedId +"QButtonGroup::selectedId" qbuttongroup.html#selectedId-prop +"QButtonGroup::setButton" qbuttongroup.html#setButton +"QButtonGroup::setExclusive" qbuttongroup.html#setExclusive +"QButtonGroup::setRadioButtonExclusive" qbuttongroup.html#setRadioButtonExclusive +"QByteArray" qbytearray.html +"QCDEStyle" qcdestyle.html +"QCDEStyle::~QCDEStyle" qcdestyle.html#~QCDEStyle +"QCString" qcstring.html +"QCString::append" qcstring.html#append +"QCString::contains" qcstring.html#contains +"QCString::copy" qcstring.html#copy +"QCString::fill" qcstring.html#fill +"QCString::find" qcstring.html#find +"QCString::findRev" qcstring.html#findRev +"QCString::insert" qcstring.html#insert +"QCString::isEmpty" qcstring.html#isEmpty +"QCString::isNull" qcstring.html#isNull +"QCString::left" qcstring.html#left +"QCString::leftJustify" qcstring.html#leftJustify +"QCString::length" qcstring.html#length +"QCString::lower" qcstring.html#lower +"QCString::mid" qcstring.html#mid +"QCString::operator const char *" qcstring.html#operator-const-char-* +"QCString::operator+=" qcstring.html#operator+-eq +"QCString::operator=" qcstring.html#operator-eq +"QCString::prepend" qcstring.html#prepend +"QCString::remove" qcstring.html#remove +"QCString::replace" qcstring.html#replace +"QCString::resize" qcstring.html#resize +"QCString::right" qcstring.html#right +"QCString::rightJustify" qcstring.html#rightJustify +"QCString::setExpand" qcstring.html#setExpand +"QCString::setNum" qcstring.html#setNum +"QCString::setStr" qcstring.html#setStr +"QCString::simplifyWhiteSpace" qcstring.html#simplifyWhiteSpace +"QCString::sprintf" qcstring.html#sprintf +"QCString::stripWhiteSpace" qcstring.html#stripWhiteSpace +"QCString::toDouble" qcstring.html#toDouble +"QCString::toFloat" qcstring.html#toFloat +"QCString::toInt" qcstring.html#toInt +"QCString::toLong" qcstring.html#toLong +"QCString::toShort" qcstring.html#toShort +"QCString::toUInt" qcstring.html#toUInt +"QCString::toULong" qcstring.html#toULong +"QCString::toUShort" qcstring.html#toUShort +"QCString::truncate" qcstring.html#truncate +"QCString::upper" qcstring.html#upper +"QCache" qcache.html +"QCache::clear" qcache.html#clear +"QCache::count" qcache.html#count +"QCache::find" qcache.html#find +"QCache::insert" qcache.html#insert +"QCache::isEmpty" qcache.html#isEmpty +"QCache::maxCost" qcache.html#maxCost +"QCache::operator[]" qcache.html#operator[] +"QCache::remove" qcache.html#remove +"QCache::setMaxCost" qcache.html#setMaxCost +"QCache::size" qcache.html#size +"QCache::statistics" qcache.html#statistics +"QCache::take" qcache.html#take +"QCache::totalCost" qcache.html#totalCost +"QCache::~QCache" qcache.html#~QCache +"QCacheIterator" qcacheiterator.html +"QCacheIterator::atFirst" qcacheiterator.html#atFirst +"QCacheIterator::atLast" qcacheiterator.html#atLast +"QCacheIterator::count" qcacheiterator.html#count +"QCacheIterator::current" qcacheiterator.html#current +"QCacheIterator::currentKey" qcacheiterator.html#currentKey +"QCacheIterator::isEmpty" qcacheiterator.html#isEmpty +"QCacheIterator::operator type *" qcacheiterator.html#operator-type-* +"QCacheIterator::operator()" qcacheiterator.html#operator() +"QCacheIterator::operator++" qcacheiterator.html#operator++ +"QCacheIterator::operator+=" qcacheiterator.html#operator+-eq +"QCacheIterator::operator--" qcacheiterator.html#operator-- +"QCacheIterator::operator-=" qcacheiterator.html#operator--eq +"QCacheIterator::operator=" qcacheiterator.html#operator-eq +"QCacheIterator::toFirst" qcacheiterator.html#toFirst +"QCacheIterator::toLast" qcacheiterator.html#toLast +"QCanvas" qcanvas.html +"QCanvas::advance" qcanvas.html#advance +"QCanvas::allItems" qcanvas.html#allItems +"QCanvas::backgroundColor" qcanvas.html#backgroundColor +"QCanvas::backgroundPixmap" qcanvas.html#backgroundPixmap +"QCanvas::chunkSize" qcanvas.html#chunkSize +"QCanvas::collisions" qcanvas.html#collisions +"QCanvas::drawArea" qcanvas.html#drawArea +"QCanvas::drawBackground" qcanvas.html#drawBackground +"QCanvas::drawForeground" qcanvas.html#drawForeground +"QCanvas::height" qcanvas.html#height +"QCanvas::onCanvas" qcanvas.html#onCanvas +"QCanvas::rect" qcanvas.html#rect +"QCanvas::resize" qcanvas.html#resize +"QCanvas::resized" qcanvas.html#resized +"QCanvas::retune" qcanvas.html#retune +"QCanvas::setAdvancePeriod" qcanvas.html#setAdvancePeriod +"QCanvas::setAllChanged" qcanvas.html#setAllChanged +"QCanvas::setBackgroundColor" qcanvas.html#setBackgroundColor +"QCanvas::setBackgroundPixmap" qcanvas.html#setBackgroundPixmap +"QCanvas::setChanged" qcanvas.html#setChanged +"QCanvas::setDoubleBuffering" qcanvas.html#setDoubleBuffering +"QCanvas::setTile" qcanvas.html#setTile +"QCanvas::setTiles" qcanvas.html#setTiles +"QCanvas::setUnchanged" qcanvas.html#setUnchanged +"QCanvas::setUpdatePeriod" qcanvas.html#setUpdatePeriod +"QCanvas::size" qcanvas.html#size +"QCanvas::tile" qcanvas.html#tile +"QCanvas::tileHeight" qcanvas.html#tileHeight +"QCanvas::tileWidth" qcanvas.html#tileWidth +"QCanvas::tilesHorizontally" qcanvas.html#tilesHorizontally +"QCanvas::tilesVertically" qcanvas.html#tilesVertically +"QCanvas::update" qcanvas.html#update +"QCanvas::validChunk" qcanvas.html#validChunk +"QCanvas::width" qcanvas.html#width +"QCanvas::~QCanvas" qcanvas.html#~QCanvas +"QCanvasEllipse" qcanvasellipse.html +"QCanvasEllipse::angleLength" qcanvasellipse.html#angleLength +"QCanvasEllipse::angleStart" qcanvasellipse.html#angleStart +"QCanvasEllipse::drawShape" qcanvasellipse.html#drawShape +"QCanvasEllipse::height" qcanvasellipse.html#height +"QCanvasEllipse::rtti" qcanvasellipse.html#rtti +"QCanvasEllipse::setAngles" qcanvasellipse.html#setAngles +"QCanvasEllipse::setSize" qcanvasellipse.html#setSize +"QCanvasEllipse::width" qcanvasellipse.html#width +"QCanvasEllipse::~QCanvasEllipse" qcanvasellipse.html#~QCanvasEllipse +"QCanvasItem" qcanvasitem.html +"QCanvasItem::RttiValues" qcanvasitem.html#RttiValues +"QCanvasItem::advance" qcanvasitem.html#advance +"QCanvasItem::animated" qcanvasitem.html#animated +"QCanvasItem::boundingRect" qcanvasitem.html#boundingRect +"QCanvasItem::boundingRectAdvanced" qcanvasitem.html#boundingRectAdvanced +"QCanvasItem::canvas" qcanvasitem.html#canvas +"QCanvasItem::collidesWith" qcanvasitem.html#collidesWith +"QCanvasItem::collisions" qcanvasitem.html#collisions +"QCanvasItem::draw" qcanvasitem.html#draw +"QCanvasItem::hide" qcanvasitem.html#hide +"QCanvasItem::isActive" qcanvasitem.html#isActive +"QCanvasItem::isEnabled" qcanvasitem.html#isEnabled +"QCanvasItem::isSelected" qcanvasitem.html#isSelected +"QCanvasItem::isVisible" qcanvasitem.html#isVisible +"QCanvasItem::move" qcanvasitem.html#move +"QCanvasItem::moveBy" qcanvasitem.html#moveBy +"QCanvasItem::rtti" qcanvasitem.html#rtti +"QCanvasItem::setActive" qcanvasitem.html#setActive +"QCanvasItem::setAnimated" qcanvasitem.html#setAnimated +"QCanvasItem::setCanvas" qcanvasitem.html#setCanvas +"QCanvasItem::setEnabled" qcanvasitem.html#setEnabled +"QCanvasItem::setSelected" qcanvasitem.html#setSelected +"QCanvasItem::setVelocity" qcanvasitem.html#setVelocity +"QCanvasItem::setVisible" qcanvasitem.html#setVisible +"QCanvasItem::setX" qcanvasitem.html#setX +"QCanvasItem::setXVelocity" qcanvasitem.html#setXVelocity +"QCanvasItem::setY" qcanvasitem.html#setY +"QCanvasItem::setYVelocity" qcanvasitem.html#setYVelocity +"QCanvasItem::setZ" qcanvasitem.html#setZ +"QCanvasItem::show" qcanvasitem.html#show +"QCanvasItem::update" qcanvasitem.html#update +"QCanvasItem::x" qcanvasitem.html#x +"QCanvasItem::xVelocity" qcanvasitem.html#xVelocity +"QCanvasItem::y" qcanvasitem.html#y +"QCanvasItem::yVelocity" qcanvasitem.html#yVelocity +"QCanvasItem::z" qcanvasitem.html#z +"QCanvasItem::~QCanvasItem" qcanvasitem.html#~QCanvasItem +"QCanvasItemList" qcanvasitemlist.html +"QCanvasItemList::operator+" qcanvasitemlist.html#operator+ +"QCanvasLine" qcanvasline.html +"QCanvasLine::endPoint" qcanvasline.html#endPoint +"QCanvasLine::rtti" qcanvasline.html#rtti +"QCanvasLine::setPoints" qcanvasline.html#setPoints +"QCanvasLine::startPoint" qcanvasline.html#startPoint +"QCanvasLine::~QCanvasLine" qcanvasline.html#~QCanvasLine +"QCanvasPixmap" qcanvaspixmap.html +"QCanvasPixmap::offsetX" qcanvaspixmap.html#offsetX +"QCanvasPixmap::offsetY" qcanvaspixmap.html#offsetY +"QCanvasPixmap::setOffset" qcanvaspixmap.html#setOffset +"QCanvasPixmap::~QCanvasPixmap" qcanvaspixmap.html#~QCanvasPixmap +"QCanvasPixmapArray" qcanvaspixmaparray.html +"QCanvasPixmapArray::count" qcanvaspixmaparray.html#count +"QCanvasPixmapArray::image" qcanvaspixmaparray.html#image +"QCanvasPixmapArray::isValid" qcanvaspixmaparray.html#isValid +"QCanvasPixmapArray::readCollisionMasks" qcanvaspixmaparray.html#readCollisionMasks +"QCanvasPixmapArray::readPixmaps" qcanvaspixmaparray.html#readPixmaps +"QCanvasPixmapArray::setImage" qcanvaspixmaparray.html#setImage +"QCanvasPixmapArray::~QCanvasPixmapArray" qcanvaspixmaparray.html#~QCanvasPixmapArray +"QCanvasPolygon" qcanvaspolygon.html +"QCanvasPolygon::areaPoints" qcanvaspolygon.html#areaPoints +"QCanvasPolygon::drawShape" qcanvaspolygon.html#drawShape +"QCanvasPolygon::points" qcanvaspolygon.html#points +"QCanvasPolygon::rtti" qcanvaspolygon.html#rtti +"QCanvasPolygon::setPoints" qcanvaspolygon.html#setPoints +"QCanvasPolygon::~QCanvasPolygon" qcanvaspolygon.html#~QCanvasPolygon +"QCanvasPolygonalItem" qcanvaspolygonalitem.html +"QCanvasPolygonalItem::areaPoints" qcanvaspolygonalitem.html#areaPoints +"QCanvasPolygonalItem::areaPointsAdvanced" qcanvaspolygonalitem.html#areaPointsAdvanced +"QCanvasPolygonalItem::boundingRect" qcanvaspolygonalitem.html#boundingRect +"QCanvasPolygonalItem::brush" qcanvaspolygonalitem.html#brush +"QCanvasPolygonalItem::draw" qcanvaspolygonalitem.html#draw +"QCanvasPolygonalItem::drawShape" qcanvaspolygonalitem.html#drawShape +"QCanvasPolygonalItem::invalidate" qcanvaspolygonalitem.html#invalidate +"QCanvasPolygonalItem::isValid" qcanvaspolygonalitem.html#isValid +"QCanvasPolygonalItem::pen" qcanvaspolygonalitem.html#pen +"QCanvasPolygonalItem::rtti" qcanvaspolygonalitem.html#rtti +"QCanvasPolygonalItem::setBrush" qcanvaspolygonalitem.html#setBrush +"QCanvasPolygonalItem::setPen" qcanvaspolygonalitem.html#setPen +"QCanvasPolygonalItem::setWinding" qcanvaspolygonalitem.html#setWinding +"QCanvasPolygonalItem::winding" qcanvaspolygonalitem.html#winding +"QCanvasPolygonalItem::~QCanvasPolygonalItem" qcanvaspolygonalitem.html#~QCanvasPolygonalItem +"QCanvasRectangle" qcanvasrectangle.html +"QCanvasRectangle::chunks" qcanvasrectangle.html#chunks +"QCanvasRectangle::drawShape" qcanvasrectangle.html#drawShape +"QCanvasRectangle::height" qcanvasrectangle.html#height +"QCanvasRectangle::rect" qcanvasrectangle.html#rect +"QCanvasRectangle::rtti" qcanvasrectangle.html#rtti +"QCanvasRectangle::setSize" qcanvasrectangle.html#setSize +"QCanvasRectangle::size" qcanvasrectangle.html#size +"QCanvasRectangle::width" qcanvasrectangle.html#width +"QCanvasRectangle::~QCanvasRectangle" qcanvasrectangle.html#~QCanvasRectangle +"QCanvasSpline" qcanvasspline.html +"QCanvasSpline::closed" qcanvasspline.html#closed +"QCanvasSpline::controlPoints" qcanvasspline.html#controlPoints +"QCanvasSpline::rtti" qcanvasspline.html#rtti +"QCanvasSpline::setControlPoints" qcanvasspline.html#setControlPoints +"QCanvasSpline::~QCanvasSpline" qcanvasspline.html#~QCanvasSpline +"QCanvasSprite" qcanvassprite.html +"QCanvasSprite::FrameAnimationType" qcanvassprite.html#FrameAnimationType +"QCanvasSprite::advance" qcanvassprite.html#advance +"QCanvasSprite::bottomEdge" qcanvassprite.html#bottomEdge +"QCanvasSprite::boundingRect" qcanvassprite.html#boundingRect +"QCanvasSprite::collidesWith" qcanvassprite.html#collidesWith +"QCanvasSprite::draw" qcanvassprite.html#draw +"QCanvasSprite::frame" qcanvassprite.html#frame +"QCanvasSprite::frameCount" qcanvassprite.html#frameCount +"QCanvasSprite::height" qcanvassprite.html#height +"QCanvasSprite::image" qcanvassprite.html#image +"QCanvasSprite::imageAdvanced" qcanvassprite.html#imageAdvanced +"QCanvasSprite::leftEdge" qcanvassprite.html#leftEdge +"QCanvasSprite::move" qcanvassprite.html#move +"QCanvasSprite::rightEdge" qcanvassprite.html#rightEdge +"QCanvasSprite::rtti" qcanvassprite.html#rtti +"QCanvasSprite::setFrame" qcanvassprite.html#setFrame +"QCanvasSprite::setFrameAnimation" qcanvassprite.html#setFrameAnimation +"QCanvasSprite::setSequence" qcanvassprite.html#setSequence +"QCanvasSprite::topEdge" qcanvassprite.html#topEdge +"QCanvasSprite::width" qcanvassprite.html#width +"QCanvasSprite::~QCanvasSprite" qcanvassprite.html#~QCanvasSprite +"QCanvasText" qcanvastext.html +"QCanvasText::addToChunks" qcanvastext.html#addToChunks +"QCanvasText::boundingRect" qcanvastext.html#boundingRect +"QCanvasText::color" qcanvastext.html#color +"QCanvasText::draw" qcanvastext.html#draw +"QCanvasText::font" qcanvastext.html#font +"QCanvasText::removeFromChunks" qcanvastext.html#removeFromChunks +"QCanvasText::rtti" qcanvastext.html#rtti +"QCanvasText::setColor" qcanvastext.html#setColor +"QCanvasText::setFont" qcanvastext.html#setFont +"QCanvasText::setText" qcanvastext.html#setText +"QCanvasText::setTextFlags" qcanvastext.html#setTextFlags +"QCanvasText::text" qcanvastext.html#text +"QCanvasText::textFlags" qcanvastext.html#textFlags +"QCanvasText::~QCanvasText" qcanvastext.html#~QCanvasText +"QCanvasView" qcanvasview.html +"QCanvasView::canvas" qcanvasview.html#canvas +"QCanvasView::drawContents" qcanvasview.html#drawContents +"QCanvasView::inverseWorldMatrix" qcanvasview.html#inverseWorldMatrix +"QCanvasView::setCanvas" qcanvasview.html#setCanvas +"QCanvasView::setWorldMatrix" qcanvasview.html#setWorldMatrix +"QCanvasView::sizeHint" qcanvasview.html#sizeHint +"QCanvasView::worldMatrix" qcanvasview.html#worldMatrix +"QCanvasView::~QCanvasView" qcanvasview.html#~QCanvasView +"QChar" qchar.html +"QChar::Category" qchar.html#Category +"QChar::CombiningClass" qchar.html#CombiningClass +"QChar::Decomposition" qchar.html#Decomposition +"QChar::Direction" qchar.html#Direction +"QChar::Joining" qchar.html#Joining +"QChar::category" qchar.html#category +"QChar::cell" qchar.html#cell +"QChar::combiningClass" qchar.html#combiningClass +"QChar::decomposition" qchar.html#decomposition +"QChar::decompositionTag" qchar.html#decompositionTag +"QChar::digitValue" qchar.html#digitValue +"QChar::direction" qchar.html#direction +"QChar::isDigit" qchar.html#isDigit +"QChar::isLetter" qchar.html#isLetter +"QChar::isLetterOrNumber" qchar.html#isLetterOrNumber +"QChar::isMark" qchar.html#isMark +"QChar::isNull" qchar.html#isNull +"QChar::isNumber" qchar.html#isNumber +"QChar::isPrint" qchar.html#isPrint +"QChar::isPunct" qchar.html#isPunct +"QChar::isSpace" qchar.html#isSpace +"QChar::isSymbol" qchar.html#isSymbol +"QChar::joining" qchar.html#joining +"QChar::latin1" qchar.html#latin1 +"QChar::lower" qchar.html#lower +"QChar::mirrored" qchar.html#mirrored +"QChar::mirroredChar" qchar.html#mirroredChar +"QChar::operator char" qchar.html#operator-char +"QChar::row" qchar.html#row +"QChar::unicode" qchar.html#unicode +"QChar::upper" qchar.html#upper +"QCharRef" qcharref.html +"QCheckBox" qcheckbox.html +"QCheckBox::autoMask" qcheckbox.html#autoMask-prop +"QCheckBox::checked" qcheckbox.html#checked-prop +"QCheckBox::isChecked" qcheckbox.html#isChecked +"QCheckBox::isTristate" qcheckbox.html#isTristate +"QCheckBox::setChecked" qcheckbox.html#setChecked +"QCheckBox::setNoChange" qcheckbox.html#setNoChange +"QCheckBox::setTristate" qcheckbox.html#setTristate +"QCheckBox::tristate" qcheckbox.html#tristate-prop +"QCheckListItem" qchecklistitem.html +"QCheckListItem::ToggleState" qchecklistitem.html#ToggleState +"QCheckListItem::Type" qchecklistitem.html#Type +"QCheckListItem::activate" qchecklistitem.html#activate +"QCheckListItem::isOn" qchecklistitem.html#isOn +"QCheckListItem::isTristate" qchecklistitem.html#isTristate +"QCheckListItem::paintCell" qchecklistitem.html#paintCell +"QCheckListItem::paintFocus" qchecklistitem.html#paintFocus +"QCheckListItem::rtti" qchecklistitem.html#rtti +"QCheckListItem::setOn" qchecklistitem.html#setOn +"QCheckListItem::setState" qchecklistitem.html#setState +"QCheckListItem::setTristate" qchecklistitem.html#setTristate +"QCheckListItem::state" qchecklistitem.html#state +"QCheckListItem::stateChange" qchecklistitem.html#stateChange +"QCheckListItem::text" qchecklistitem.html#text +"QCheckListItem::turnOffChild" qchecklistitem.html#turnOffChild +"QCheckListItem::type" qchecklistitem.html#type +"QCheckListItem::~QCheckListItem" qchecklistitem.html#~QCheckListItem +"QCheckTableItem" qchecktableitem.html +"QCheckTableItem::isChecked" qchecktableitem.html#isChecked +"QCheckTableItem::rtti" qchecktableitem.html#rtti +"QCheckTableItem::setChecked" qchecktableitem.html#setChecked +"QChildEvent" qchildevent.html +"QChildEvent::child" qchildevent.html#child +"QChildEvent::inserted" qchildevent.html#inserted +"QChildEvent::removed" qchildevent.html#removed +"QClipboard" qclipboard.html +"QClipboard::Mode" qclipboard.html#Mode +"QClipboard::clear" qclipboard.html#clear +"QClipboard::data" qclipboard.html#data +"QClipboard::dataChanged" qclipboard.html#dataChanged +"QClipboard::image" qclipboard.html#image +"QClipboard::ownsClipboard" qclipboard.html#ownsClipboard +"QClipboard::ownsSelection" qclipboard.html#ownsSelection +"QClipboard::pixmap" qclipboard.html#pixmap +"QClipboard::selectionChanged" qclipboard.html#selectionChanged +"QClipboard::setData" qclipboard.html#setData +"QClipboard::setImage" qclipboard.html#setImage +"QClipboard::setPixmap" qclipboard.html#setPixmap +"QClipboard::setText" qclipboard.html#setText +"QClipboard::supportsSelection" qclipboard.html#supportsSelection +"QClipboard::text" qclipboard.html#text +"QCloseEvent" qcloseevent.html +"QCloseEvent::accept" qcloseevent.html#accept +"QCloseEvent::ignore" qcloseevent.html#ignore +"QCloseEvent::isAccepted" qcloseevent.html#isAccepted +"QCollection Class Reference (obsolete)" qcollection.html +"QColor" qcolor.html +"QColor::Spec" qcolor.html#Spec +"QColor::alloc" qcolor.html#alloc +"QColor::blue" qcolor.html#blue +"QColor::cleanup" qcolor.html#cleanup +"QColor::colorNames" qcolor.html#colorNames +"QColor::currentAllocContext" qcolor.html#currentAllocContext +"QColor::dark" qcolor.html#dark +"QColor::destroyAllocContext" qcolor.html#destroyAllocContext +"QColor::enterAllocContext" qcolor.html#enterAllocContext +"QColor::getHsv" qcolor.html#getHsv +"QColor::getRgb" qcolor.html#getRgb +"QColor::green" qcolor.html#green +"QColor::initGlobalColors" qcolor.html#initGlobalColors +"QColor::initialize" qcolor.html#initialize +"QColor::isValid" qcolor.html#isValid +"QColor::leaveAllocContext" qcolor.html#leaveAllocContext +"QColor::light" qcolor.html#light +"QColor::maxColors" qcolor.html#maxColors +"QColor::name" qcolor.html#name +"QColor::numBitPlanes" qcolor.html#numBitPlanes +"QColor::operator!=" qcolor.html#operator!-eq +"QColor::operator=" qcolor.html#operator-eq +"QColor::operator==" qcolor.html#operator-eq-eq +"QColor::pixel" qcolor.html#pixel +"QColor::red" qcolor.html#red +"QColor::rgb" qcolor.html#rgb +"QColor::setHsv" qcolor.html#setHsv +"QColor::setNamedColor" qcolor.html#setNamedColor +"QColor::setRgb" qcolor.html#setRgb +"QColorDialog" qcolordialog.html +"QColorDialog::color" qcolordialog.html#color +"QColorDialog::customColor" qcolordialog.html#customColor +"QColorDialog::customCount" qcolordialog.html#customCount +"QColorDialog::getColor" qcolordialog.html#getColor +"QColorDialog::getRgba" qcolordialog.html#getRgba +"QColorDialog::selectColor" qcolordialog.html#selectColor +"QColorDialog::selectedAlpha" qcolordialog.html#selectedAlpha +"QColorDialog::setColor" qcolordialog.html#setColor +"QColorDialog::setCustomColor" qcolordialog.html#setCustomColor +"QColorDialog::setSelectedAlpha" qcolordialog.html#setSelectedAlpha +"QColorDialog::setStandardColor" qcolordialog.html#setStandardColor +"QColorDialog::~QColorDialog" qcolordialog.html#~QColorDialog +"QColorDrag" qcolordrag.html +"QColorDrag::canDecode" qcolordrag.html#canDecode +"QColorDrag::decode" qcolordrag.html#decode +"QColorDrag::setColor" qcolordrag.html#setColor +"QColorGroup" qcolorgroup.html +"QColorGroup::ColorRole" qcolorgroup.html#ColorRole +"QColorGroup::background" qcolorgroup.html#background +"QColorGroup::base" qcolorgroup.html#base +"QColorGroup::brightText" qcolorgroup.html#brightText +"QColorGroup::brush" qcolorgroup.html#brush +"QColorGroup::button" qcolorgroup.html#button +"QColorGroup::buttonText" qcolorgroup.html#buttonText +"QColorGroup::color" qcolorgroup.html#color +"QColorGroup::dark" qcolorgroup.html#dark +"QColorGroup::foreground" qcolorgroup.html#foreground +"QColorGroup::highlight" qcolorgroup.html#highlight +"QColorGroup::highlightedText" qcolorgroup.html#highlightedText +"QColorGroup::light" qcolorgroup.html#light +"QColorGroup::link" qcolorgroup.html#link +"QColorGroup::linkVisited" qcolorgroup.html#linkVisited +"QColorGroup::mid" qcolorgroup.html#mid +"QColorGroup::midlight" qcolorgroup.html#midlight +"QColorGroup::operator!=" qcolorgroup.html#operator!-eq +"QColorGroup::operator=" qcolorgroup.html#operator-eq +"QColorGroup::operator==" qcolorgroup.html#operator-eq-eq +"QColorGroup::setBrush" qcolorgroup.html#setBrush +"QColorGroup::setColor" qcolorgroup.html#setColor +"QColorGroup::shadow" qcolorgroup.html#shadow +"QColorGroup::text" qcolorgroup.html#text +"QColorGroup::~QColorGroup" qcolorgroup.html#~QColorGroup +"QComboBox" qcombobox.html +"QComboBox::Policy" qcombobox.html#Policy +"QComboBox::activated" qcombobox.html#activated +"QComboBox::autoCompletion" qcombobox.html#autoCompletion +"QComboBox::autoCompletion" qcombobox.html#autoCompletion-prop +"QComboBox::autoMask" qcombobox.html#autoMask-prop +"QComboBox::changeItem" qcombobox.html#changeItem +"QComboBox::clear" qcombobox.html#clear +"QComboBox::clearEdit" qcombobox.html#clearEdit +"QComboBox::clearValidator" qcombobox.html#clearValidator +"QComboBox::completionIndex" qcombobox.html#completionIndex +"QComboBox::count" qcombobox.html#count +"QComboBox::count" qcombobox.html#count-prop +"QComboBox::currentItem" qcombobox.html#currentItem +"QComboBox::currentItem" qcombobox.html#currentItem-prop +"QComboBox::currentText" qcombobox.html#currentText +"QComboBox::currentText" qcombobox.html#currentText-prop +"QComboBox::duplicatesEnabled" qcombobox.html#duplicatesEnabled +"QComboBox::duplicatesEnabled" qcombobox.html#duplicatesEnabled-prop +"QComboBox::editable" qcombobox.html#editable +"QComboBox::editable" qcombobox.html#editable-prop +"QComboBox::highlighted" qcombobox.html#highlighted +"QComboBox::insertItem" qcombobox.html#insertItem +"QComboBox::insertStrList" qcombobox.html#insertStrList +"QComboBox::insertStringList" qcombobox.html#insertStringList +"QComboBox::insertionPolicy" qcombobox.html#insertionPolicy +"QComboBox::insertionPolicy" qcombobox.html#insertionPolicy-prop +"QComboBox::lineEdit" qcombobox.html#lineEdit +"QComboBox::listBox" qcombobox.html#listBox +"QComboBox::maxCount" qcombobox.html#maxCount +"QComboBox::maxCount" qcombobox.html#maxCount-prop +"QComboBox::pixmap" qcombobox.html#pixmap +"QComboBox::popup" qcombobox.html#popup +"QComboBox::removeItem" qcombobox.html#removeItem +"QComboBox::returnPressed" qcombobox.html#returnPressed +"QComboBox::setAutoCompletion" qcombobox.html#setAutoCompletion +"QComboBox::setCurrentItem" qcombobox.html#setCurrentItem +"QComboBox::setCurrentText" qcombobox.html#setCurrentText +"QComboBox::setDuplicatesEnabled" qcombobox.html#setDuplicatesEnabled +"QComboBox::setEditText" qcombobox.html#setEditText +"QComboBox::setEditable" qcombobox.html#setEditable +"QComboBox::setFont" qcombobox.html#setFont +"QComboBox::setInsertionPolicy" qcombobox.html#setInsertionPolicy +"QComboBox::setLineEdit" qcombobox.html#setLineEdit +"QComboBox::setListBox" qcombobox.html#setListBox +"QComboBox::setMaxCount" qcombobox.html#setMaxCount +"QComboBox::setPalette" qcombobox.html#setPalette +"QComboBox::setSizeLimit" qcombobox.html#setSizeLimit +"QComboBox::setValidator" qcombobox.html#setValidator +"QComboBox::sizeLimit" qcombobox.html#sizeLimit +"QComboBox::sizeLimit" qcombobox.html#sizeLimit-prop +"QComboBox::text" qcombobox.html#text +"QComboBox::textChanged" qcombobox.html#textChanged +"QComboBox::validator" qcombobox.html#validator +"QComboBox::~QComboBox" qcombobox.html#~QComboBox +"QComboTableItem" qcombotableitem.html +"QComboTableItem::count" qcombotableitem.html#count +"QComboTableItem::currentItem" qcombotableitem.html#currentItem +"QComboTableItem::currentText" qcombotableitem.html#currentText +"QComboTableItem::isEditable" qcombotableitem.html#isEditable +"QComboTableItem::rtti" qcombotableitem.html#rtti +"QComboTableItem::setCurrentItem" qcombotableitem.html#setCurrentItem +"QComboTableItem::setEditable" qcombotableitem.html#setEditable +"QComboTableItem::setStringList" qcombotableitem.html#setStringList +"QComboTableItem::text" qcombotableitem.html#text +"QComboTableItem::~QComboTableItem" qcombotableitem.html#~QComboTableItem +"QCommonStyle" qcommonstyle.html +"QComponentFactory::createInstance" qcomponentfactory.html#createInstance +"QComponentFactory::registerComponent" qcomponentfactory.html#registerComponent +"QComponentFactory::registerServer" qcomponentfactory.html#registerServer +"QComponentFactory::unregisterComponent" qcomponentfactory.html#unregisterComponent +"QComponentFactory::unregisterServer" qcomponentfactory.html#unregisterServer +"QConnection::isConnected" qconnection.html#isConnected +"QConnection::member" qconnection.html#member +"QConnection::memberName" qconnection.html#memberName +"QConnection::numArgs" qconnection.html#numArgs +"QConnection::object" qconnection.html#object +"QConnection::~QConnection" qconnection.html#~QConnection +"QConstString" qconststring.html +"QConstString::string" qconststring.html#string +"QConstString::~QConstString" qconststring.html#~QConstString +"QContextMenuEvent" qcontextmenuevent.html +"QContextMenuEvent::Reason" qcontextmenuevent.html#Reason +"QContextMenuEvent::accept" qcontextmenuevent.html#accept +"QContextMenuEvent::consume" qcontextmenuevent.html#consume +"QContextMenuEvent::globalPos" qcontextmenuevent.html#globalPos +"QContextMenuEvent::globalX" qcontextmenuevent.html#globalX +"QContextMenuEvent::globalY" qcontextmenuevent.html#globalY +"QContextMenuEvent::ignore" qcontextmenuevent.html#ignore +"QContextMenuEvent::isAccepted" qcontextmenuevent.html#isAccepted +"QContextMenuEvent::isConsumed" qcontextmenuevent.html#isConsumed +"QContextMenuEvent::pos" qcontextmenuevent.html#pos +"QContextMenuEvent::reason" qcontextmenuevent.html#reason +"QContextMenuEvent::state" qcontextmenuevent.html#state +"QContextMenuEvent::x" qcontextmenuevent.html#x +"QContextMenuEvent::y" qcontextmenuevent.html#y +"QCopChannel" qcopchannel.html +"QCopChannel::channel" qcopchannel.html#channel +"QCopChannel::isRegistered" qcopchannel.html#isRegistered +"QCopChannel::receive" qcopchannel.html#receive +"QCopChannel::received" qcopchannel.html#received +"QCopChannel::send" qcopchannel.html#send +"QCopChannel::~QCopChannel" qcopchannel.html#~QCopChannel +"QCursor" qcursor.html +"QCursor::bitmap" qcursor.html#bitmap +"QCursor::cleanup" qcursor.html#cleanup +"QCursor::handle" qcursor.html#handle +"QCursor::hotSpot" qcursor.html#hotSpot +"QCursor::initialize" qcursor.html#initialize +"QCursor::mask" qcursor.html#mask +"QCursor::operator=" qcursor.html#operator-eq +"QCursor::pos" qcursor.html#pos +"QCursor::setPos" qcursor.html#setPos +"QCursor::setShape" qcursor.html#setShape +"QCursor::shape" qcursor.html#shape +"QCursor::~QCursor" qcursor.html#~QCursor +"QCustomEvent" qcustomevent.html +"QCustomEvent::data" qcustomevent.html#data +"QCustomEvent::setData" qcustomevent.html#setData +"QCustomMenuItem" qcustommenuitem.html +"QCustomMenuItem::fullSpan" qcustommenuitem.html#fullSpan +"QCustomMenuItem::isSeparator" qcustommenuitem.html#isSeparator +"QCustomMenuItem::paint" qcustommenuitem.html#paint +"QCustomMenuItem::setFont" qcustommenuitem.html#setFont +"QCustomMenuItem::sizeHint" qcustommenuitem.html#sizeHint +"QCustomMenuItem::~QCustomMenuItem" qcustommenuitem.html#~QCustomMenuItem +"QDataBrowser" qdatabrowser.html +"QDataBrowser::Boundary" qdatabrowser.html#Boundary +"QDataBrowser::autoEdit" qdatabrowser.html#autoEdit +"QDataBrowser::autoEdit" qdatabrowser.html#autoEdit-prop +"QDataBrowser::beforeDelete" qdatabrowser.html#beforeDelete +"QDataBrowser::beforeInsert" qdatabrowser.html#beforeInsert +"QDataBrowser::beforeUpdate" qdatabrowser.html#beforeUpdate +"QDataBrowser::boundary" qdatabrowser.html#boundary +"QDataBrowser::boundaryChecking" qdatabrowser.html#boundaryChecking +"QDataBrowser::boundaryChecking" qdatabrowser.html#boundaryChecking-prop +"QDataBrowser::clearValues" qdatabrowser.html#clearValues +"QDataBrowser::confirmCancel" qdatabrowser.html#confirmCancel +"QDataBrowser::confirmCancels" qdatabrowser.html#confirmCancels +"QDataBrowser::confirmCancels" qdatabrowser.html#confirmCancels-prop +"QDataBrowser::confirmDelete" qdatabrowser.html#confirmDelete +"QDataBrowser::confirmDelete" qdatabrowser.html#confirmDelete-prop +"QDataBrowser::confirmEdit" qdatabrowser.html#confirmEdit +"QDataBrowser::confirmEdits" qdatabrowser.html#confirmEdits +"QDataBrowser::confirmEdits" qdatabrowser.html#confirmEdits-prop +"QDataBrowser::confirmInsert" qdatabrowser.html#confirmInsert +"QDataBrowser::confirmInsert" qdatabrowser.html#confirmInsert-prop +"QDataBrowser::confirmUpdate" qdatabrowser.html#confirmUpdate +"QDataBrowser::confirmUpdate" qdatabrowser.html#confirmUpdate-prop +"QDataBrowser::currentChanged" qdatabrowser.html#currentChanged +"QDataBrowser::currentEdited" qdatabrowser.html#currentEdited +"QDataBrowser::cursorChanged" qdatabrowser.html#cursorChanged +"QDataBrowser::del" qdatabrowser.html#del +"QDataBrowser::deleteCurrent" qdatabrowser.html#deleteCurrent +"QDataBrowser::filter" qdatabrowser.html#filter +"QDataBrowser::filter" qdatabrowser.html#filter-prop +"QDataBrowser::first" qdatabrowser.html#first +"QDataBrowser::firstRecordAvailable" qdatabrowser.html#firstRecordAvailable +"QDataBrowser::form" qdatabrowser.html#form +"QDataBrowser::handleError" qdatabrowser.html#handleError +"QDataBrowser::insert" qdatabrowser.html#insert +"QDataBrowser::insertCurrent" qdatabrowser.html#insertCurrent +"QDataBrowser::isReadOnly" qdatabrowser.html#isReadOnly +"QDataBrowser::last" qdatabrowser.html#last +"QDataBrowser::lastRecordAvailable" qdatabrowser.html#lastRecordAvailable +"QDataBrowser::next" qdatabrowser.html#next +"QDataBrowser::nextRecordAvailable" qdatabrowser.html#nextRecordAvailable +"QDataBrowser::prev" qdatabrowser.html#prev +"QDataBrowser::prevRecordAvailable" qdatabrowser.html#prevRecordAvailable +"QDataBrowser::primeDelete" qdatabrowser.html#primeDelete +"QDataBrowser::primeInsert" qdatabrowser.html#primeInsert +"QDataBrowser::primeUpdate" qdatabrowser.html#primeUpdate +"QDataBrowser::readFields" qdatabrowser.html#readFields +"QDataBrowser::readOnly" qdatabrowser.html#readOnly-prop +"QDataBrowser::refresh" qdatabrowser.html#refresh +"QDataBrowser::seek" qdatabrowser.html#seek +"QDataBrowser::setAutoEdit" qdatabrowser.html#setAutoEdit +"QDataBrowser::setBoundaryChecking" qdatabrowser.html#setBoundaryChecking +"QDataBrowser::setConfirmCancels" qdatabrowser.html#setConfirmCancels +"QDataBrowser::setConfirmDelete" qdatabrowser.html#setConfirmDelete +"QDataBrowser::setConfirmEdits" qdatabrowser.html#setConfirmEdits +"QDataBrowser::setConfirmInsert" qdatabrowser.html#setConfirmInsert +"QDataBrowser::setConfirmUpdate" qdatabrowser.html#setConfirmUpdate +"QDataBrowser::setFilter" qdatabrowser.html#setFilter +"QDataBrowser::setForm" qdatabrowser.html#setForm +"QDataBrowser::setReadOnly" qdatabrowser.html#setReadOnly +"QDataBrowser::setSort" qdatabrowser.html#setSort +"QDataBrowser::setSqlCursor" qdatabrowser.html#setSqlCursor +"QDataBrowser::sort" qdatabrowser.html#sort +"QDataBrowser::sort" qdatabrowser.html#sort-prop +"QDataBrowser::sqlCursor" qdatabrowser.html#sqlCursor +"QDataBrowser::update" qdatabrowser.html#update +"QDataBrowser::updateBoundary" qdatabrowser.html#updateBoundary +"QDataBrowser::updateCurrent" qdatabrowser.html#updateCurrent +"QDataBrowser::writeFields" qdatabrowser.html#writeFields +"QDataBrowser::~QDataBrowser" qdatabrowser.html#~QDataBrowser +"QDataSink::eof" qdatasink.html#eof +"QDataSink::maybeReady" qdatasink.html#maybeReady +"QDataSink::readyToReceive" qdatasink.html#readyToReceive +"QDataSink::receive" qdatasink.html#receive +"QDataSource::enableRewind" qdatasource.html#enableRewind +"QDataSource::maybeReady" qdatasource.html#maybeReady +"QDataSource::readyToSend" qdatasource.html#readyToSend +"QDataSource::rewind" qdatasource.html#rewind +"QDataSource::rewindable" qdatasource.html#rewindable +"QDataSource::sendTo" qdatasource.html#sendTo +"QDataStream" qdatastream.html +"QDataStream::ByteOrder" qdatastream.html#ByteOrder +"QDataStream::atEnd" qdatastream.html#atEnd +"QDataStream::byteOrder" qdatastream.html#byteOrder +"QDataStream::device" qdatastream.html#device +"QDataStream::isPrintableData" qdatastream.html#isPrintableData +"QDataStream::operator<<" qdatastream.html#operator-lt-lt +"QDataStream::operator>>" qdatastream.html#operator-gt-gt +"QDataStream::readBytes" qdatastream.html#readBytes +"QDataStream::readRawBytes" qdatastream.html#readRawBytes +"QDataStream::setByteOrder" qdatastream.html#setByteOrder +"QDataStream::setDevice" qdatastream.html#setDevice +"QDataStream::setPrintableData" qdatastream.html#setPrintableData +"QDataStream::setVersion" qdatastream.html#setVersion +"QDataStream::unsetDevice" qdatastream.html#unsetDevice +"QDataStream::version" qdatastream.html#version +"QDataStream::writeBytes" qdatastream.html#writeBytes +"QDataStream::writeRawBytes" qdatastream.html#writeRawBytes +"QDataStream::~QDataStream" qdatastream.html#~QDataStream +"QDataTable" qdatatable.html +"QDataTable::Refresh" qdatatable.html#Refresh +"QDataTable::addColumn" qdatatable.html#addColumn +"QDataTable::adjustColumn" qdatatable.html#adjustColumn +"QDataTable::autoDelete" qdatatable.html#autoDelete +"QDataTable::autoEdit" qdatatable.html#autoEdit +"QDataTable::autoEdit" qdatatable.html#autoEdit-prop +"QDataTable::beforeDelete" qdatatable.html#beforeDelete +"QDataTable::beforeInsert" qdatatable.html#beforeInsert +"QDataTable::beforeUpdate" qdatatable.html#beforeUpdate +"QDataTable::beginInsert" qdatatable.html#beginInsert +"QDataTable::beginUpdate" qdatatable.html#beginUpdate +"QDataTable::confirmCancel" qdatatable.html#confirmCancel +"QDataTable::confirmCancels" qdatatable.html#confirmCancels +"QDataTable::confirmCancels" qdatatable.html#confirmCancels-prop +"QDataTable::confirmDelete" qdatatable.html#confirmDelete +"QDataTable::confirmDelete" qdatatable.html#confirmDelete-prop +"QDataTable::confirmEdit" qdatatable.html#confirmEdit +"QDataTable::confirmEdits" qdatatable.html#confirmEdits +"QDataTable::confirmEdits" qdatatable.html#confirmEdits-prop +"QDataTable::confirmInsert" qdatatable.html#confirmInsert +"QDataTable::confirmInsert" qdatatable.html#confirmInsert-prop +"QDataTable::confirmUpdate" qdatatable.html#confirmUpdate +"QDataTable::confirmUpdate" qdatatable.html#confirmUpdate-prop +"QDataTable::currentChanged" qdatatable.html#currentChanged +"QDataTable::currentRecord" qdatatable.html#currentRecord +"QDataTable::cursorChanged" qdatatable.html#cursorChanged +"QDataTable::dateFormat" qdatatable.html#dateFormat +"QDataTable::dateFormat" qdatatable.html#dateFormat-prop +"QDataTable::deleteCurrent" qdatatable.html#deleteCurrent +"QDataTable::falseText" qdatatable.html#falseText +"QDataTable::falseText" qdatatable.html#falseText-prop +"QDataTable::fieldAlignment" qdatatable.html#fieldAlignment +"QDataTable::filter" qdatatable.html#filter +"QDataTable::filter" qdatatable.html#filter-prop +"QDataTable::find" qdatatable.html#find +"QDataTable::handleError" qdatatable.html#handleError +"QDataTable::indexOf" qdatatable.html#indexOf +"QDataTable::insertCurrent" qdatatable.html#insertCurrent +"QDataTable::installEditorFactory" qdatatable.html#installEditorFactory +"QDataTable::installPropertyMap" qdatatable.html#installPropertyMap +"QDataTable::nullText" qdatatable.html#nullText +"QDataTable::nullText" qdatatable.html#nullText-prop +"QDataTable::numCols" qdatatable.html#numCols +"QDataTable::numCols" qdatatable.html#numCols-prop +"QDataTable::numRows" qdatatable.html#numRows +"QDataTable::numRows" qdatatable.html#numRows-prop +"QDataTable::paintField" qdatatable.html#paintField +"QDataTable::primeDelete" qdatatable.html#primeDelete +"QDataTable::primeInsert" qdatatable.html#primeInsert +"QDataTable::primeUpdate" qdatatable.html#primeUpdate +"QDataTable::refresh" qdatatable.html#refresh +"QDataTable::removeColumn" qdatatable.html#removeColumn +"QDataTable::reset" qdatatable.html#reset +"QDataTable::setAutoDelete" qdatatable.html#setAutoDelete +"QDataTable::setAutoEdit" qdatatable.html#setAutoEdit +"QDataTable::setColumn" qdatatable.html#setColumn +"QDataTable::setColumnWidth" qdatatable.html#setColumnWidth +"QDataTable::setConfirmCancels" qdatatable.html#setConfirmCancels +"QDataTable::setConfirmDelete" qdatatable.html#setConfirmDelete +"QDataTable::setConfirmEdits" qdatatable.html#setConfirmEdits +"QDataTable::setConfirmInsert" qdatatable.html#setConfirmInsert +"QDataTable::setConfirmUpdate" qdatatable.html#setConfirmUpdate +"QDataTable::setDateFormat" qdatatable.html#setDateFormat +"QDataTable::setFalseText" qdatatable.html#setFalseText +"QDataTable::setFilter" qdatatable.html#setFilter +"QDataTable::setNullText" qdatatable.html#setNullText +"QDataTable::setSize" qdatatable.html#setSize +"QDataTable::setSort" qdatatable.html#setSort +"QDataTable::setSqlCursor" qdatatable.html#setSqlCursor +"QDataTable::setTrueText" qdatatable.html#setTrueText +"QDataTable::sort" qdatatable.html#sort +"QDataTable::sort" qdatatable.html#sort-prop +"QDataTable::sortAscending" qdatatable.html#sortAscending +"QDataTable::sortColumn" qdatatable.html#sortColumn +"QDataTable::sortDescending" qdatatable.html#sortDescending +"QDataTable::sqlCursor" qdatatable.html#sqlCursor +"QDataTable::text" qdatatable.html#text +"QDataTable::trueText" qdatatable.html#trueText +"QDataTable::trueText" qdatatable.html#trueText-prop +"QDataTable::updateCurrent" qdatatable.html#updateCurrent +"QDataTable::value" qdatatable.html#value +"QDataTable::~QDataTable" qdatatable.html#~QDataTable +"QDataView" qdataview.html +"QDataView::clearValues" qdataview.html#clearValues +"QDataView::form" qdataview.html#form +"QDataView::readFields" qdataview.html#readFields +"QDataView::record" qdataview.html#record +"QDataView::refresh" qdataview.html#refresh +"QDataView::setForm" qdataview.html#setForm +"QDataView::setRecord" qdataview.html#setRecord +"QDataView::writeFields" qdataview.html#writeFields +"QDataView::~QDataView" qdataview.html#~QDataView +"QDate" qdate.html +"QDate::addDays" qdate.html#addDays +"QDate::addMonths" qdate.html#addMonths +"QDate::addYears" qdate.html#addYears +"QDate::currentDate" qdate.html#currentDate +"QDate::day" qdate.html#day +"QDate::dayOfWeek" qdate.html#dayOfWeek +"QDate::dayOfYear" qdate.html#dayOfYear +"QDate::daysInMonth" qdate.html#daysInMonth +"QDate::daysInYear" qdate.html#daysInYear +"QDate::daysTo" qdate.html#daysTo +"QDate::fromString" qdate.html#fromString +"QDate::isNull" qdate.html#isNull +"QDate::isValid" qdate.html#isValid +"QDate::leapYear" qdate.html#leapYear +"QDate::longDayName" qdate.html#longDayName +"QDate::longMonthName" qdate.html#longMonthName +"QDate::month" qdate.html#month +"QDate::operator!=" qdate.html#operator!-eq +"QDate::operator<" qdate.html#operator-lt +"QDate::operator<=" qdate.html#operator-lt-eq +"QDate::operator==" qdate.html#operator-eq-eq +"QDate::operator>" qdate.html#operator-gt +"QDate::operator>=" qdate.html#operator-gt-eq +"QDate::setYMD" qdate.html#setYMD +"QDate::shortDayName" qdate.html#shortDayName +"QDate::shortMonthName" qdate.html#shortMonthName +"QDate::toString" qdate.html#toString +"QDate::weekNumber" qdate.html#weekNumber +"QDate::year" qdate.html#year +"QDateEdit" qdateedit.html +"QDateEdit::Order" qdateedit.html#Order +"QDateEdit::autoAdvance" qdateedit.html#autoAdvance +"QDateEdit::autoAdvance" qdateedit.html#autoAdvance-prop +"QDateEdit::date" qdateedit.html#date +"QDateEdit::date" qdateedit.html#date-prop +"QDateEdit::fix" qdateedit.html#fix +"QDateEdit::maxValue" qdateedit.html#maxValue +"QDateEdit::maxValue" qdateedit.html#maxValue-prop +"QDateEdit::minValue" qdateedit.html#minValue +"QDateEdit::minValue" qdateedit.html#minValue-prop +"QDateEdit::order" qdateedit.html#order +"QDateEdit::order" qdateedit.html#order-prop +"QDateEdit::sectionFormattedText" qdateedit.html#sectionFormattedText +"QDateEdit::sectionLength" qdateedit.html#sectionLength +"QDateEdit::sectionText" qdateedit.html#sectionText +"QDateEdit::separator" qdateedit.html#separator +"QDateEdit::setAutoAdvance" qdateedit.html#setAutoAdvance +"QDateEdit::setDate" qdateedit.html#setDate +"QDateEdit::setDay" qdateedit.html#setDay +"QDateEdit::setMaxValue" qdateedit.html#setMaxValue +"QDateEdit::setMinValue" qdateedit.html#setMinValue +"QDateEdit::setMonth" qdateedit.html#setMonth +"QDateEdit::setOrder" qdateedit.html#setOrder +"QDateEdit::setRange" qdateedit.html#setRange +"QDateEdit::setSeparator" qdateedit.html#setSeparator +"QDateEdit::setYear" qdateedit.html#setYear +"QDateEdit::updateButtons" qdateedit.html#updateButtons +"QDateEdit::valueChanged" qdateedit.html#valueChanged +"QDateEdit::~QDateEdit" qdateedit.html#~QDateEdit +"QDateTime" qdatetime.html +"QDateTime::addDays" qdatetime.html#addDays +"QDateTime::addMonths" qdatetime.html#addMonths +"QDateTime::addSecs" qdatetime.html#addSecs +"QDateTime::addYears" qdatetime.html#addYears +"QDateTime::currentDateTime" qdatetime.html#currentDateTime +"QDateTime::date" qdatetime.html#date +"QDateTime::daysTo" qdatetime.html#daysTo +"QDateTime::fromString" qdatetime.html#fromString +"QDateTime::isNull" qdatetime.html#isNull +"QDateTime::isValid" qdatetime.html#isValid +"QDateTime::operator!=" qdatetime.html#operator!-eq +"QDateTime::operator<" qdatetime.html#operator-lt +"QDateTime::operator<=" qdatetime.html#operator-lt-eq +"QDateTime::operator==" qdatetime.html#operator-eq-eq +"QDateTime::operator>" qdatetime.html#operator-gt +"QDateTime::operator>=" qdatetime.html#operator-gt-eq +"QDateTime::secsTo" qdatetime.html#secsTo +"QDateTime::setDate" qdatetime.html#setDate +"QDateTime::setTime" qdatetime.html#setTime +"QDateTime::setTime_t" qdatetime.html#setTime_t +"QDateTime::time" qdatetime.html#time +"QDateTime::toString" qdatetime.html#toString +"QDateTime::toTime_t" qdatetime.html#toTime_t +"QDateTimeEdit" qdatetimeedit.html +"QDateTimeEdit::autoAdvance" qdatetimeedit.html#autoAdvance +"QDateTimeEdit::dateEdit" qdatetimeedit.html#dateEdit +"QDateTimeEdit::dateTime" qdatetimeedit.html#dateTime +"QDateTimeEdit::dateTime" qdatetimeedit.html#dateTime-prop +"QDateTimeEdit::setAutoAdvance" qdatetimeedit.html#setAutoAdvance +"QDateTimeEdit::setDateTime" qdatetimeedit.html#setDateTime +"QDateTimeEdit::timeEdit" qdatetimeedit.html#timeEdit +"QDateTimeEdit::valueChanged" qdatetimeedit.html#valueChanged +"QDateTimeEdit::~QDateTimeEdit" qdatetimeedit.html#~QDateTimeEdit +"QDateTimeEditBase" qdatetimeeditbase.html +"QDeepCopy" qdeepcopy.html +"QDeepCopy::operator T" qdeepcopy.html#operator-T +"QDeepCopy::operator=" qdeepcopy.html#operator-eq +"QDesktopWidget" qdesktopwidget.html +"QDesktopWidget::availableGeometry" qdesktopwidget.html#availableGeometry +"QDesktopWidget::isVirtualDesktop" qdesktopwidget.html#isVirtualDesktop +"QDesktopWidget::numScreens" qdesktopwidget.html#numScreens +"QDesktopWidget::primaryScreen" qdesktopwidget.html#primaryScreen +"QDesktopWidget::resized" qdesktopwidget.html#resized +"QDesktopWidget::screen" qdesktopwidget.html#screen +"QDesktopWidget::screenGeometry" qdesktopwidget.html#screenGeometry +"QDesktopWidget::screenNumber" qdesktopwidget.html#screenNumber +"QDesktopWidget::~QDesktopWidget" qdesktopwidget.html#~QDesktopWidget +"QDial" qdial.html +"QDial::addLine" qdial.html#addLine +"QDial::addPage" qdial.html#addPage +"QDial::dialMoved" qdial.html#dialMoved +"QDial::dialPressed" qdial.html#dialPressed +"QDial::dialReleased" qdial.html#dialReleased +"QDial::lineStep" qdial.html#lineStep +"QDial::lineStep" qdial.html#lineStep-prop +"QDial::maxValue" qdial.html#maxValue +"QDial::maxValue" qdial.html#maxValue-prop +"QDial::minValue" qdial.html#minValue +"QDial::minValue" qdial.html#minValue-prop +"QDial::notchSize" qdial.html#notchSize +"QDial::notchSize" qdial.html#notchSize-prop +"QDial::notchTarget" qdial.html#notchTarget +"QDial::notchTarget" qdial.html#notchTarget-prop +"QDial::notchesVisible" qdial.html#notchesVisible +"QDial::notchesVisible" qdial.html#notchesVisible-prop +"QDial::pageStep" qdial.html#pageStep +"QDial::pageStep" qdial.html#pageStep-prop +"QDial::rangeChange" qdial.html#rangeChange +"QDial::repaintScreen" qdial.html#repaintScreen +"QDial::setLineStep" qdial.html#setLineStep +"QDial::setMaxValue" qdial.html#setMaxValue +"QDial::setMinValue" qdial.html#setMinValue +"QDial::setNotchTarget" qdial.html#setNotchTarget +"QDial::setNotchesVisible" qdial.html#setNotchesVisible +"QDial::setPageStep" qdial.html#setPageStep +"QDial::setTracking" qdial.html#setTracking +"QDial::setValue" qdial.html#setValue +"QDial::setWrapping" qdial.html#setWrapping +"QDial::subtractLine" qdial.html#subtractLine +"QDial::subtractPage" qdial.html#subtractPage +"QDial::tracking" qdial.html#tracking +"QDial::tracking" qdial.html#tracking-prop +"QDial::value" qdial.html#value +"QDial::value" qdial.html#value-prop +"QDial::valueChange" qdial.html#valueChange +"QDial::valueChanged" qdial.html#valueChanged +"QDial::wrapping" qdial.html#wrapping +"QDial::wrapping" qdial.html#wrapping-prop +"QDial::~QDial" qdial.html#~QDial +"QDialog" qdialog.html +"QDialog::DialogCode" qdialog.html#DialogCode +"QDialog::accept" qdialog.html#accept +"QDialog::done" qdialog.html#done +"QDialog::exec" qdialog.html#exec +"QDialog::extension" qdialog.html#extension +"QDialog::isModal" qdialog.html#isModal +"QDialog::isSizeGripEnabled" qdialog.html#isSizeGripEnabled +"QDialog::modal" qdialog.html#modal-prop +"QDialog::orientation" qdialog.html#orientation +"QDialog::reject" qdialog.html#reject +"QDialog::result" qdialog.html#result +"QDialog::setExtension" qdialog.html#setExtension +"QDialog::setModal" qdialog.html#setModal +"QDialog::setOrientation" qdialog.html#setOrientation +"QDialog::setResult" qdialog.html#setResult +"QDialog::setSizeGripEnabled" qdialog.html#setSizeGripEnabled +"QDialog::show" qdialog.html#show +"QDialog::showExtension" qdialog.html#showExtension +"QDialog::sizeGripEnabled" qdialog.html#sizeGripEnabled-prop +"QDialog::~QDialog" qdialog.html#~QDialog +"QDict" qdict.html +"QDict::clear" qdict.html#clear +"QDict::count" qdict.html#count +"QDict::find" qdict.html#find +"QDict::insert" qdict.html#insert +"QDict::isEmpty" qdict.html#isEmpty +"QDict::operator=" qdict.html#operator-eq +"QDict::operator[]" qdict.html#operator[] +"QDict::read" qdict.html#read +"QDict::remove" qdict.html#remove +"QDict::replace" qdict.html#replace +"QDict::resize" qdict.html#resize +"QDict::size" qdict.html#size +"QDict::statistics" qdict.html#statistics +"QDict::take" qdict.html#take +"QDict::write" qdict.html#write +"QDict::~QDict" qdict.html#~QDict +"QDictIterator" qdictiterator.html +"QDictIterator::count" qdictiterator.html#count +"QDictIterator::current" qdictiterator.html#current +"QDictIterator::currentKey" qdictiterator.html#currentKey +"QDictIterator::isEmpty" qdictiterator.html#isEmpty +"QDictIterator::operator type *" qdictiterator.html#operator-type-* +"QDictIterator::operator()" qdictiterator.html#operator() +"QDictIterator::operator++" qdictiterator.html#operator++ +"QDictIterator::toFirst" qdictiterator.html#toFirst +"QDictIterator::~QDictIterator" qdictiterator.html#~QDictIterator +"QDir" qdir-example.html +"QDir" qdir.html +"QDir::FilterSpec" qdir.html#FilterSpec +"QDir::SortSpec" qdir.html#SortSpec +"QDir::absFilePath" qdir.html#absFilePath +"QDir::absPath" qdir.html#absPath +"QDir::canonicalPath" qdir.html#canonicalPath +"QDir::cd" qdir.html#cd +"QDir::cdUp" qdir.html#cdUp +"QDir::cleanDirPath" qdir.html#cleanDirPath +"QDir::convertSeparators" qdir.html#convertSeparators +"QDir::convertToAbs" qdir.html#convertToAbs +"QDir::count" qdir.html#count +"QDir::current" qdir.html#current +"QDir::currentDirPath" qdir.html#currentDirPath +"QDir::dirName" qdir.html#dirName +"QDir::drives" qdir.html#drives +"QDir::entryInfoList" qdir.html#entryInfoList +"QDir::entryList" qdir.html#entryList +"QDir::exists" qdir.html#exists +"QDir::filePath" qdir.html#filePath +"QDir::filter" qdir.html#filter +"QDir::home" qdir.html#home +"QDir::homeDirPath" qdir.html#homeDirPath +"QDir::isReadable" qdir.html#isReadable +"QDir::isRelative" qdir.html#isRelative +"QDir::isRelativePath" qdir.html#isRelativePath +"QDir::isRoot" qdir.html#isRoot +"QDir::match" qdir.html#match +"QDir::matchAllDirs" qdir.html#matchAllDirs +"QDir::mkdir" qdir.html#mkdir +"QDir::nameFilter" qdir.html#nameFilter +"QDir::operator!=" qdir.html#operator!-eq +"QDir::operator=" qdir.html#operator-eq +"QDir::operator==" qdir.html#operator-eq-eq +"QDir::operator[]" qdir.html#operator[] +"QDir::path" qdir.html#path +"QDir::refresh" qdir.html#refresh +"QDir::remove" qdir.html#remove +"QDir::rename" qdir.html#rename +"QDir::rmdir" qdir.html#rmdir +"QDir::root" qdir.html#root +"QDir::rootDirPath" qdir.html#rootDirPath +"QDir::separator" qdir.html#separator +"QDir::setCurrent" qdir.html#setCurrent +"QDir::setFilter" qdir.html#setFilter +"QDir::setMatchAllDirs" qdir.html#setMatchAllDirs +"QDir::setNameFilter" qdir.html#setNameFilter +"QDir::setPath" qdir.html#setPath +"QDir::setSorting" qdir.html#setSorting +"QDir::sorting" qdir.html#sorting +"QDir::~QDir" qdir.html#~QDir +"QDirectPainter" qdirectpainter.html +"QDirectPainter::depth" qdirectpainter.html#depth +"QDirectPainter::frameBuffer" qdirectpainter.html#frameBuffer +"QDirectPainter::height" qdirectpainter.html#height +"QDirectPainter::lineStep" qdirectpainter.html#lineStep +"QDirectPainter::numRects" qdirectpainter.html#numRects +"QDirectPainter::offset" qdirectpainter.html#offset +"QDirectPainter::rect" qdirectpainter.html#rect +"QDirectPainter::region" qdirectpainter.html#region +"QDirectPainter::setAreaChanged" qdirectpainter.html#setAreaChanged +"QDirectPainter::size" qdirectpainter.html#size +"QDirectPainter::transformOrientation" qdirectpainter.html#transformOrientation +"QDirectPainter::width" qdirectpainter.html#width +"QDirectPainter::xOffset" qdirectpainter.html#xOffset +"QDirectPainter::yOffset" qdirectpainter.html#yOffset +"QDirectPainter::~QDirectPainter" qdirectpainter.html#~QDirectPainter +"QDiskFont::fontDef" qdiskfont.html#fontDef +"QDiskFont::load" qdiskfont.html#load +"QDns" qdns.html +"QDns::RecordType" qdns.html#RecordType +"QDns::addresses" qdns.html#addresses +"QDns::canonicalName" qdns.html#canonicalName +"QDns::hostNames" qdns.html#hostNames +"QDns::isWorking" qdns.html#isWorking +"QDns::label" qdns.html#label +"QDns::mailServers" qdns.html#mailServers +"QDns::qualifiedNames" qdns.html#qualifiedNames +"QDns::recordType" qdns.html#recordType +"QDns::resultsReady" qdns.html#resultsReady +"QDns::servers" qdns.html#servers +"QDns::setLabel" qdns.html#setLabel +"QDns::setRecordType" qdns.html#setRecordType +"QDns::setStartQueryTimer" qdns.html#setStartQueryTimer +"QDns::texts" qdns.html#texts +"QDns::~QDns" qdns.html#~QDns +"QDockArea" qdockarea.html +"QDockArea::HandlePosition" qdockarea.html#HandlePosition +"QDockArea::count" qdockarea.html#count +"QDockArea::count" qdockarea.html#count-prop +"QDockArea::dockWindowList" qdockarea.html#dockWindowList +"QDockArea::empty" qdockarea.html#empty-prop +"QDockArea::handlePosition" qdockarea.html#handlePosition +"QDockArea::handlePosition" qdockarea.html#handlePosition-prop +"QDockArea::hasDockWindow" qdockarea.html#hasDockWindow +"QDockArea::isDockWindowAccepted" qdockarea.html#isDockWindowAccepted +"QDockArea::isEmpty" qdockarea.html#isEmpty +"QDockArea::lineUp" qdockarea.html#lineUp +"QDockArea::moveDockWindow" qdockarea.html#moveDockWindow +"QDockArea::orientation" qdockarea.html#orientation +"QDockArea::orientation" qdockarea.html#orientation-prop +"QDockArea::removeDockWindow" qdockarea.html#removeDockWindow +"QDockArea::setAcceptDockWindow" qdockarea.html#setAcceptDockWindow +"QDockArea::~QDockArea" qdockarea.html#~QDockArea +"QDockWindow" qdockwindow.html +"QDockWindow::CloseMode" qdockwindow.html#CloseMode +"QDockWindow::Place" qdockwindow.html#Place +"QDockWindow::area" qdockwindow.html#area +"QDockWindow::boxLayout" qdockwindow.html#boxLayout +"QDockWindow::closeMode" qdockwindow.html#closeMode +"QDockWindow::closeMode" qdockwindow.html#closeMode-prop +"QDockWindow::dock" qdockwindow.html#dock +"QDockWindow::fixedExtent" qdockwindow.html#fixedExtent +"QDockWindow::horizontallyStretchable" qdockwindow.html#horizontallyStretchable-prop +"QDockWindow::isCloseEnabled" qdockwindow.html#isCloseEnabled +"QDockWindow::isHorizontallyStretchable" qdockwindow.html#isHorizontallyStretchable +"QDockWindow::isMovingEnabled" qdockwindow.html#isMovingEnabled +"QDockWindow::isResizeEnabled" qdockwindow.html#isResizeEnabled +"QDockWindow::isStretchable" qdockwindow.html#isStretchable +"QDockWindow::isVerticallyStretchable" qdockwindow.html#isVerticallyStretchable +"QDockWindow::movingEnabled" qdockwindow.html#movingEnabled-prop +"QDockWindow::newLine" qdockwindow.html#newLine +"QDockWindow::newLine" qdockwindow.html#newLine-prop +"QDockWindow::offset" qdockwindow.html#offset +"QDockWindow::offset" qdockwindow.html#offset-prop +"QDockWindow::opaqueMoving" qdockwindow.html#opaqueMoving +"QDockWindow::opaqueMoving" qdockwindow.html#opaqueMoving-prop +"QDockWindow::orientation" qdockwindow.html#orientation +"QDockWindow::orientationChanged" qdockwindow.html#orientationChanged +"QDockWindow::place" qdockwindow.html#place +"QDockWindow::placeChanged" qdockwindow.html#placeChanged +"QDockWindow::resizeEnabled" qdockwindow.html#resizeEnabled-prop +"QDockWindow::setCloseMode" qdockwindow.html#setCloseMode +"QDockWindow::setFixedExtentHeight" qdockwindow.html#setFixedExtentHeight +"QDockWindow::setFixedExtentWidth" qdockwindow.html#setFixedExtentWidth +"QDockWindow::setHorizontallyStretchable" qdockwindow.html#setHorizontallyStretchable +"QDockWindow::setMovingEnabled" qdockwindow.html#setMovingEnabled +"QDockWindow::setNewLine" qdockwindow.html#setNewLine +"QDockWindow::setOffset" qdockwindow.html#setOffset +"QDockWindow::setOpaqueMoving" qdockwindow.html#setOpaqueMoving +"QDockWindow::setOrientation" qdockwindow.html#setOrientation +"QDockWindow::setResizeEnabled" qdockwindow.html#setResizeEnabled +"QDockWindow::setVerticallyStretchable" qdockwindow.html#setVerticallyStretchable +"QDockWindow::setWidget" qdockwindow.html#setWidget +"QDockWindow::stretchable" qdockwindow.html#stretchable-prop +"QDockWindow::undock" qdockwindow.html#undock +"QDockWindow::verticallyStretchable" qdockwindow.html#verticallyStretchable-prop +"QDockWindow::visibilityChanged" qdockwindow.html#visibilityChanged +"QDockWindow::widget" qdockwindow.html#widget +"QDomAttr" qdomattr.html +"QDomAttr::isAttr" qdomattr.html#isAttr +"QDomAttr::name" qdomattr.html#name +"QDomAttr::nodeType" qdomattr.html#nodeType +"QDomAttr::operator=" qdomattr.html#operator-eq +"QDomAttr::ownerElement" qdomattr.html#ownerElement +"QDomAttr::setValue" qdomattr.html#setValue +"QDomAttr::specified" qdomattr.html#specified +"QDomAttr::value" qdomattr.html#value +"QDomAttr::~QDomAttr" qdomattr.html#~QDomAttr +"QDomCDATASection" qdomcdatasection.html +"QDomCDATASection::isCDATASection" qdomcdatasection.html#isCDATASection +"QDomCDATASection::nodeType" qdomcdatasection.html#nodeType +"QDomCDATASection::operator=" qdomcdatasection.html#operator-eq +"QDomCDATASection::~QDomCDATASection" qdomcdatasection.html#~QDomCDATASection +"QDomCharacterData" qdomcharacterdata.html +"QDomCharacterData::appendData" qdomcharacterdata.html#appendData +"QDomCharacterData::data" qdomcharacterdata.html#data +"QDomCharacterData::deleteData" qdomcharacterdata.html#deleteData +"QDomCharacterData::insertData" qdomcharacterdata.html#insertData +"QDomCharacterData::isCharacterData" qdomcharacterdata.html#isCharacterData +"QDomCharacterData::length" qdomcharacterdata.html#length +"QDomCharacterData::nodeType" qdomcharacterdata.html#nodeType +"QDomCharacterData::operator=" qdomcharacterdata.html#operator-eq +"QDomCharacterData::replaceData" qdomcharacterdata.html#replaceData +"QDomCharacterData::setData" qdomcharacterdata.html#setData +"QDomCharacterData::substringData" qdomcharacterdata.html#substringData +"QDomCharacterData::~QDomCharacterData" qdomcharacterdata.html#~QDomCharacterData +"QDomComment" qdomcomment.html +"QDomComment::isComment" qdomcomment.html#isComment +"QDomComment::nodeType" qdomcomment.html#nodeType +"QDomComment::operator=" qdomcomment.html#operator-eq +"QDomComment::~QDomComment" qdomcomment.html#~QDomComment +"QDomDocument" qdomdocument.html +"QDomDocument::createAttribute" qdomdocument.html#createAttribute +"QDomDocument::createAttributeNS" qdomdocument.html#createAttributeNS +"QDomDocument::createCDATASection" qdomdocument.html#createCDATASection +"QDomDocument::createComment" qdomdocument.html#createComment +"QDomDocument::createDocumentFragment" qdomdocument.html#createDocumentFragment +"QDomDocument::createElement" qdomdocument.html#createElement +"QDomDocument::createElementNS" qdomdocument.html#createElementNS +"QDomDocument::createEntityReference" qdomdocument.html#createEntityReference +"QDomDocument::createProcessingInstruction" qdomdocument.html#createProcessingInstruction +"QDomDocument::createTextNode" qdomdocument.html#createTextNode +"QDomDocument::doctype" qdomdocument.html#doctype +"QDomDocument::documentElement" qdomdocument.html#documentElement +"QDomDocument::elementById" qdomdocument.html#elementById +"QDomDocument::elementsByTagName" qdomdocument.html#elementsByTagName +"QDomDocument::elementsByTagNameNS" qdomdocument.html#elementsByTagNameNS +"QDomDocument::implementation" qdomdocument.html#implementation +"QDomDocument::importNode" qdomdocument.html#importNode +"QDomDocument::isDocument" qdomdocument.html#isDocument +"QDomDocument::nodeType" qdomdocument.html#nodeType +"QDomDocument::operator=" qdomdocument.html#operator-eq +"QDomDocument::setContent" qdomdocument.html#setContent +"QDomDocument::toCString" qdomdocument.html#toCString +"QDomDocument::toString" qdomdocument.html#toString +"QDomDocument::~QDomDocument" qdomdocument.html#~QDomDocument +"QDomDocumentFragment" qdomdocumentfragment.html +"QDomDocumentFragment::isDocumentFragment" qdomdocumentfragment.html#isDocumentFragment +"QDomDocumentFragment::nodeType" qdomdocumentfragment.html#nodeType +"QDomDocumentFragment::operator=" qdomdocumentfragment.html#operator-eq +"QDomDocumentFragment::~QDomDocumentFragment" qdomdocumentfragment.html#~QDomDocumentFragment +"QDomDocumentType" qdomdocumenttype.html +"QDomDocumentType::entities" qdomdocumenttype.html#entities +"QDomDocumentType::internalSubset" qdomdocumenttype.html#internalSubset +"QDomDocumentType::isDocumentType" qdomdocumenttype.html#isDocumentType +"QDomDocumentType::name" qdomdocumenttype.html#name +"QDomDocumentType::nodeType" qdomdocumenttype.html#nodeType +"QDomDocumentType::notations" qdomdocumenttype.html#notations +"QDomDocumentType::operator=" qdomdocumenttype.html#operator-eq +"QDomDocumentType::publicId" qdomdocumenttype.html#publicId +"QDomDocumentType::systemId" qdomdocumenttype.html#systemId +"QDomDocumentType::~QDomDocumentType" qdomdocumenttype.html#~QDomDocumentType +"QDomElement" qdomelement.html +"QDomElement::attribute" qdomelement.html#attribute +"QDomElement::attributeNS" qdomelement.html#attributeNS +"QDomElement::attributeNode" qdomelement.html#attributeNode +"QDomElement::attributeNodeNS" qdomelement.html#attributeNodeNS +"QDomElement::attributes" qdomelement.html#attributes +"QDomElement::elementsByTagName" qdomelement.html#elementsByTagName +"QDomElement::elementsByTagNameNS" qdomelement.html#elementsByTagNameNS +"QDomElement::hasAttribute" qdomelement.html#hasAttribute +"QDomElement::hasAttributeNS" qdomelement.html#hasAttributeNS +"QDomElement::isElement" qdomelement.html#isElement +"QDomElement::nodeType" qdomelement.html#nodeType +"QDomElement::operator=" qdomelement.html#operator-eq +"QDomElement::removeAttribute" qdomelement.html#removeAttribute +"QDomElement::removeAttributeNS" qdomelement.html#removeAttributeNS +"QDomElement::removeAttributeNode" qdomelement.html#removeAttributeNode +"QDomElement::setAttribute" qdomelement.html#setAttribute +"QDomElement::setAttributeNS" qdomelement.html#setAttributeNS +"QDomElement::setAttributeNode" qdomelement.html#setAttributeNode +"QDomElement::setAttributeNodeNS" qdomelement.html#setAttributeNodeNS +"QDomElement::setTagName" qdomelement.html#setTagName +"QDomElement::tagName" qdomelement.html#tagName +"QDomElement::text" qdomelement.html#text +"QDomElement::~QDomElement" qdomelement.html#~QDomElement +"QDomEntity" qdomentity.html +"QDomEntity::isEntity" qdomentity.html#isEntity +"QDomEntity::nodeType" qdomentity.html#nodeType +"QDomEntity::notationName" qdomentity.html#notationName +"QDomEntity::operator=" qdomentity.html#operator-eq +"QDomEntity::publicId" qdomentity.html#publicId +"QDomEntity::systemId" qdomentity.html#systemId +"QDomEntity::~QDomEntity" qdomentity.html#~QDomEntity +"QDomEntityReference" qdomentityreference.html +"QDomEntityReference::isEntityReference" qdomentityreference.html#isEntityReference +"QDomEntityReference::nodeType" qdomentityreference.html#nodeType +"QDomEntityReference::operator=" qdomentityreference.html#operator-eq +"QDomEntityReference::~QDomEntityReference" qdomentityreference.html#~QDomEntityReference +"QDomImplementation" qdomimplementation.html +"QDomImplementation::createDocument" qdomimplementation.html#createDocument +"QDomImplementation::createDocumentType" qdomimplementation.html#createDocumentType +"QDomImplementation::hasFeature" qdomimplementation.html#hasFeature +"QDomImplementation::isNull" qdomimplementation.html#isNull +"QDomImplementation::operator!=" qdomimplementation.html#operator!-eq +"QDomImplementation::operator=" qdomimplementation.html#operator-eq +"QDomImplementation::operator==" qdomimplementation.html#operator-eq-eq +"QDomImplementation::~QDomImplementation" qdomimplementation.html#~QDomImplementation +"QDomNamedNodeMap" qdomnamednodemap.html +"QDomNamedNodeMap::contains" qdomnamednodemap.html#contains +"QDomNamedNodeMap::count" qdomnamednodemap.html#count +"QDomNamedNodeMap::item" qdomnamednodemap.html#item +"QDomNamedNodeMap::length" qdomnamednodemap.html#length +"QDomNamedNodeMap::namedItem" qdomnamednodemap.html#namedItem +"QDomNamedNodeMap::namedItemNS" qdomnamednodemap.html#namedItemNS +"QDomNamedNodeMap::operator!=" qdomnamednodemap.html#operator!-eq +"QDomNamedNodeMap::operator=" qdomnamednodemap.html#operator-eq +"QDomNamedNodeMap::operator==" qdomnamednodemap.html#operator-eq-eq +"QDomNamedNodeMap::removeNamedItem" qdomnamednodemap.html#removeNamedItem +"QDomNamedNodeMap::removeNamedItemNS" qdomnamednodemap.html#removeNamedItemNS +"QDomNamedNodeMap::setNamedItem" qdomnamednodemap.html#setNamedItem +"QDomNamedNodeMap::setNamedItemNS" qdomnamednodemap.html#setNamedItemNS +"QDomNamedNodeMap::~QDomNamedNodeMap" qdomnamednodemap.html#~QDomNamedNodeMap +"QDomNode" qdomnode.html +"QDomNode::NodeType" qdomnode.html#NodeType +"QDomNode::appendChild" qdomnode.html#appendChild +"QDomNode::attributes" qdomnode.html#attributes +"QDomNode::childNodes" qdomnode.html#childNodes +"QDomNode::clear" qdomnode.html#clear +"QDomNode::cloneNode" qdomnode.html#cloneNode +"QDomNode::firstChild" qdomnode.html#firstChild +"QDomNode::hasAttributes" qdomnode.html#hasAttributes +"QDomNode::hasChildNodes" qdomnode.html#hasChildNodes +"QDomNode::insertAfter" qdomnode.html#insertAfter +"QDomNode::insertBefore" qdomnode.html#insertBefore +"QDomNode::isAttr" qdomnode.html#isAttr +"QDomNode::isCDATASection" qdomnode.html#isCDATASection +"QDomNode::isCharacterData" qdomnode.html#isCharacterData +"QDomNode::isComment" qdomnode.html#isComment +"QDomNode::isDocument" qdomnode.html#isDocument +"QDomNode::isDocumentFragment" qdomnode.html#isDocumentFragment +"QDomNode::isDocumentType" qdomnode.html#isDocumentType +"QDomNode::isElement" qdomnode.html#isElement +"QDomNode::isEntity" qdomnode.html#isEntity +"QDomNode::isEntityReference" qdomnode.html#isEntityReference +"QDomNode::isNotation" qdomnode.html#isNotation +"QDomNode::isNull" qdomnode.html#isNull +"QDomNode::isProcessingInstruction" qdomnode.html#isProcessingInstruction +"QDomNode::isSupported" qdomnode.html#isSupported +"QDomNode::isText" qdomnode.html#isText +"QDomNode::lastChild" qdomnode.html#lastChild +"QDomNode::localName" qdomnode.html#localName +"QDomNode::namedItem" qdomnode.html#namedItem +"QDomNode::namespaceURI" qdomnode.html#namespaceURI +"QDomNode::nextSibling" qdomnode.html#nextSibling +"QDomNode::nodeName" qdomnode.html#nodeName +"QDomNode::nodeType" qdomnode.html#nodeType +"QDomNode::nodeValue" qdomnode.html#nodeValue +"QDomNode::normalize" qdomnode.html#normalize +"QDomNode::operator!=" qdomnode.html#operator!-eq +"QDomNode::operator=" qdomnode.html#operator-eq +"QDomNode::operator==" qdomnode.html#operator-eq-eq +"QDomNode::ownerDocument" qdomnode.html#ownerDocument +"QDomNode::parentNode" qdomnode.html#parentNode +"QDomNode::prefix" qdomnode.html#prefix +"QDomNode::previousSibling" qdomnode.html#previousSibling +"QDomNode::removeChild" qdomnode.html#removeChild +"QDomNode::replaceChild" qdomnode.html#replaceChild +"QDomNode::save" qdomnode.html#save +"QDomNode::setNodeValue" qdomnode.html#setNodeValue +"QDomNode::setPrefix" qdomnode.html#setPrefix +"QDomNode::toAttr" qdomnode.html#toAttr +"QDomNode::toCDATASection" qdomnode.html#toCDATASection +"QDomNode::toCharacterData" qdomnode.html#toCharacterData +"QDomNode::toComment" qdomnode.html#toComment +"QDomNode::toDocument" qdomnode.html#toDocument +"QDomNode::toDocumentFragment" qdomnode.html#toDocumentFragment +"QDomNode::toDocumentType" qdomnode.html#toDocumentType +"QDomNode::toElement" qdomnode.html#toElement +"QDomNode::toEntity" qdomnode.html#toEntity +"QDomNode::toEntityReference" qdomnode.html#toEntityReference +"QDomNode::toNotation" qdomnode.html#toNotation +"QDomNode::toProcessingInstruction" qdomnode.html#toProcessingInstruction +"QDomNode::toText" qdomnode.html#toText +"QDomNode::~QDomNode" qdomnode.html#~QDomNode +"QDomNodeList" qdomnodelist.html +"QDomNodeList::count" qdomnodelist.html#count +"QDomNodeList::item" qdomnodelist.html#item +"QDomNodeList::length" qdomnodelist.html#length +"QDomNodeList::operator!=" qdomnodelist.html#operator!-eq +"QDomNodeList::operator=" qdomnodelist.html#operator-eq +"QDomNodeList::operator==" qdomnodelist.html#operator-eq-eq +"QDomNodeList::~QDomNodeList" qdomnodelist.html#~QDomNodeList +"QDomNotation" qdomnotation.html +"QDomNotation::isNotation" qdomnotation.html#isNotation +"QDomNotation::nodeType" qdomnotation.html#nodeType +"QDomNotation::operator=" qdomnotation.html#operator-eq +"QDomNotation::publicId" qdomnotation.html#publicId +"QDomNotation::systemId" qdomnotation.html#systemId +"QDomNotation::~QDomNotation" qdomnotation.html#~QDomNotation +"QDomProcessingInstruction" qdomprocessinginstruction.html +"QDomProcessingInstruction::data" qdomprocessinginstruction.html#data +"QDomProcessingInstruction::isProcessingInstruction" qdomprocessinginstruction.html#isProcessingInstruction +"QDomProcessingInstruction::nodeType" qdomprocessinginstruction.html#nodeType +"QDomProcessingInstruction::operator=" qdomprocessinginstruction.html#operator-eq +"QDomProcessingInstruction::setData" qdomprocessinginstruction.html#setData +"QDomProcessingInstruction::target" qdomprocessinginstruction.html#target +"QDomProcessingInstruction::~QDomProcessingInstruction" qdomprocessinginstruction.html#~QDomProcessingInstruction +"QDomText" qdomtext.html +"QDomText::isText" qdomtext.html#isText +"QDomText::nodeType" qdomtext.html#nodeType +"QDomText::operator=" qdomtext.html#operator-eq +"QDomText::splitText" qdomtext.html#splitText +"QDomText::~QDomText" qdomtext.html#~QDomText +"QDoubleValidator" qdoublevalidator.html +"QDoubleValidator::bottom" qdoublevalidator.html#bottom +"QDoubleValidator::bottom" qdoublevalidator.html#bottom-prop +"QDoubleValidator::decimals" qdoublevalidator.html#decimals +"QDoubleValidator::decimals" qdoublevalidator.html#decimals-prop +"QDoubleValidator::setBottom" qdoublevalidator.html#setBottom +"QDoubleValidator::setDecimals" qdoublevalidator.html#setDecimals +"QDoubleValidator::setRange" qdoublevalidator.html#setRange +"QDoubleValidator::setTop" qdoublevalidator.html#setTop +"QDoubleValidator::top" qdoublevalidator.html#top +"QDoubleValidator::top" qdoublevalidator.html#top-prop +"QDoubleValidator::validate" qdoublevalidator.html#validate +"QDoubleValidator::~QDoubleValidator" qdoublevalidator.html#~QDoubleValidator +"QDragEnterEvent" qdragenterevent.html +"QDragLeaveEvent" qdragleaveevent.html +"QDragMoveEvent" qdragmoveevent.html +"QDragMoveEvent::accept" qdragmoveevent.html#accept +"QDragMoveEvent::answerRect" qdragmoveevent.html#answerRect +"QDragMoveEvent::ignore" qdragmoveevent.html#ignore +"QDragObject" qdragobject.html +"QDragObject::DragMode" qdragobject.html#DragMode +"QDragObject::drag" qdragobject.html#drag +"QDragObject::dragCopy" qdragobject.html#dragCopy +"QDragObject::dragLink" qdragobject.html#dragLink +"QDragObject::dragMove" qdragobject.html#dragMove +"QDragObject::pixmap" qdragobject.html#pixmap +"QDragObject::pixmapHotSpot" qdragobject.html#pixmapHotSpot +"QDragObject::setPixmap" qdragobject.html#setPixmap +"QDragObject::source" qdragobject.html#source +"QDragObject::target" qdragobject.html#target +"QDragObject::~QDragObject" qdragobject.html#~QDragObject +"QDropEvent" qdropevent.html +"QDropEvent::Action" qdropevent.html#Action +"QDropEvent::accept" qdropevent.html#accept +"QDropEvent::acceptAction" qdropevent.html#acceptAction +"QDropEvent::action" qdropevent.html#action +"QDropEvent::encodedData" qdropevent.html#encodedData +"QDropEvent::format" qdropevent.html#format +"QDropEvent::ignore" qdropevent.html#ignore +"QDropEvent::isAccepted" qdropevent.html#isAccepted +"QDropEvent::isActionAccepted" qdropevent.html#isActionAccepted +"QDropEvent::pos" qdropevent.html#pos +"QDropEvent::provides" qdropevent.html#provides +"QDropEvent::setAction" qdropevent.html#setAction +"QDropEvent::setPoint" qdropevent.html#setPoint +"QDropEvent::source" qdropevent.html#source +"QDropSite::~QDropSite" qdropsite.html#~QDropSite +"QEditorFactory" qeditorfactory.html +"QEditorFactory::createEditor" qeditorfactory.html#createEditor +"QEditorFactory::defaultFactory" qeditorfactory.html#defaultFactory +"QEditorFactory::installDefaultFactory" qeditorfactory.html#installDefaultFactory +"QEditorFactory::~QEditorFactory" qeditorfactory.html#~QEditorFactory +"QEmbed - File and Image Embedder" qembed.html +"QErrorMessage" qerrormessage.html +"QErrorMessage::message" qerrormessage.html#message +"QErrorMessage::qtHandler" qerrormessage.html#qtHandler +"QErrorMessage::~QErrorMessage" qerrormessage.html#~QErrorMessage +"QEucJpCodec" qeucjpcodec.html +"QEucJpCodec::mibEnum" qeucjpcodec.html#mibEnum +"QEucJpCodec::mimeName" qeucjpcodec.html#mimeName +"QEucJpCodec::~QEucJpCodec" qeucjpcodec.html#~QEucJpCodec +"QEucKrCodec" qeuckrcodec.html +"QEucKrCodec::mimeName" qeuckrcodec.html#mimeName +"QEvent" qevent.html +"QEvent::Type" qevent.html#Type +"QEvent::spontaneous" qevent.html#spontaneous +"QEvent::type" qevent.html#type +"QEvent::~QEvent" qevent.html#~QEvent +"QEventLoop" qeventloop.html +"QEventLoop::ProcessEvents" qeventloop.html#ProcessEvents +"QEventLoop::ProcessEventsFlags" qeventloop.html#ProcessEventsFlags +"QEventLoop::aboutToBlock" qeventloop.html#aboutToBlock +"QEventLoop::activateSocketNotifiers" qeventloop.html#activateSocketNotifiers +"QEventLoop::activateTimers" qeventloop.html#activateTimers +"QEventLoop::awake" qeventloop.html#awake +"QEventLoop::enterLoop" qeventloop.html#enterLoop +"QEventLoop::exec" qeventloop.html#exec +"QEventLoop::exit" qeventloop.html#exit +"QEventLoop::exitLoop" qeventloop.html#exitLoop +"QEventLoop::hasPendingEvents" qeventloop.html#hasPendingEvents +"QEventLoop::loopLevel" qeventloop.html#loopLevel +"QEventLoop::processEvents" qeventloop.html#processEvents +"QEventLoop::registerSocketNotifier" qeventloop.html#registerSocketNotifier +"QEventLoop::setSocketNotifierPending" qeventloop.html#setSocketNotifierPending +"QEventLoop::timeToWait" qeventloop.html#timeToWait +"QEventLoop::unregisterSocketNotifier" qeventloop.html#unregisterSocketNotifier +"QEventLoop::wakeUp" qeventloop.html#wakeUp +"QEventLoop::~QEventLoop" qeventloop.html#~QEventLoop +"QFile" qfile.html +"QFile::DecoderFn" qfile.html#DecoderFn +"QFile::EncoderFn" qfile.html#EncoderFn +"QFile::at" qfile.html#at +"QFile::atEnd" qfile.html#atEnd +"QFile::close" qfile.html#close +"QFile::decodeName" qfile.html#decodeName +"QFile::encodeName" qfile.html#encodeName +"QFile::errorString" qfile.html#errorString +"QFile::exists" qfile.html#exists +"QFile::flush" qfile.html#flush +"QFile::getch" qfile.html#getch +"QFile::handle" qfile.html#handle +"QFile::name" qfile.html#name +"QFile::open" qfile.html#open +"QFile::putch" qfile.html#putch +"QFile::readLine" qfile.html#readLine +"QFile::remove" qfile.html#remove +"QFile::setDecodingFunction" qfile.html#setDecodingFunction +"QFile::setEncodingFunction" qfile.html#setEncodingFunction +"QFile::setErrorString" qfile.html#setErrorString +"QFile::setName" qfile.html#setName +"QFile::size" qfile.html#size +"QFile::ungetch" qfile.html#ungetch +"QFile::writeBlock" qfile.html#writeBlock +"QFile::~QFile" qfile.html#~QFile +"QFileDialog" qfiledialog.html +"QFileDialog::Mode" qfiledialog.html#Mode +"QFileDialog::PreviewMode" qfiledialog.html#PreviewMode +"QFileDialog::ViewMode" qfiledialog.html#ViewMode +"QFileDialog::addFilter" qfiledialog.html#addFilter +"QFileDialog::addLeftWidget" qfiledialog.html#addLeftWidget +"QFileDialog::addRightWidget" qfiledialog.html#addRightWidget +"QFileDialog::addToolButton" qfiledialog.html#addToolButton +"QFileDialog::addWidgets" qfiledialog.html#addWidgets +"QFileDialog::contentsPreview" qfiledialog.html#contentsPreview-prop +"QFileDialog::dir" qfiledialog.html#dir +"QFileDialog::dirEntered" qfiledialog.html#dirEntered +"QFileDialog::dirPath" qfiledialog.html#dirPath +"QFileDialog::dirPath" qfiledialog.html#dirPath-prop +"QFileDialog::fileHighlighted" qfiledialog.html#fileHighlighted +"QFileDialog::fileNameEditDone" qfiledialog.html#fileNameEditDone +"QFileDialog::fileSelected" qfiledialog.html#fileSelected +"QFileDialog::filesSelected" qfiledialog.html#filesSelected +"QFileDialog::filterSelected" qfiledialog.html#filterSelected +"QFileDialog::fixupNameEdit" qfiledialog.html#fixupNameEdit +"QFileDialog::getExistingDirectory" qfiledialog.html#getExistingDirectory +"QFileDialog::getOpenFileName" qfiledialog.html#getOpenFileName +"QFileDialog::getOpenFileNames" qfiledialog.html#getOpenFileNames +"QFileDialog::getSaveFileName" qfiledialog.html#getSaveFileName +"QFileDialog::iconProvider" qfiledialog.html#iconProvider +"QFileDialog::infoPreview" qfiledialog.html#infoPreview-prop +"QFileDialog::isContentsPreviewEnabled" qfiledialog.html#isContentsPreviewEnabled +"QFileDialog::isInfoPreviewEnabled" qfiledialog.html#isInfoPreviewEnabled +"QFileDialog::mode" qfiledialog.html#mode +"QFileDialog::mode" qfiledialog.html#mode-prop +"QFileDialog::modeButtonsDestroyed" qfiledialog.html#modeButtonsDestroyed +"QFileDialog::previewMode" qfiledialog.html#previewMode +"QFileDialog::previewMode" qfiledialog.html#previewMode-prop +"QFileDialog::rereadDir" qfiledialog.html#rereadDir +"QFileDialog::resortDir" qfiledialog.html#resortDir +"QFileDialog::selectAll" qfiledialog.html#selectAll +"QFileDialog::selectDirectoryOrFile" qfiledialog.html#selectDirectoryOrFile +"QFileDialog::selectedFile" qfiledialog.html#selectedFile +"QFileDialog::selectedFile" qfiledialog.html#selectedFile-prop +"QFileDialog::selectedFiles" qfiledialog.html#selectedFiles +"QFileDialog::selectedFiles" qfiledialog.html#selectedFiles-prop +"QFileDialog::selectedFilter" qfiledialog.html#selectedFilter +"QFileDialog::selectedFilter" qfiledialog.html#selectedFilter-prop +"QFileDialog::setContentsPreview" qfiledialog.html#setContentsPreview +"QFileDialog::setContentsPreviewEnabled" qfiledialog.html#setContentsPreviewEnabled +"QFileDialog::setDir" qfiledialog.html#setDir +"QFileDialog::setFilter" qfiledialog.html#setFilter +"QFileDialog::setFilters" qfiledialog.html#setFilters +"QFileDialog::setIconProvider" qfiledialog.html#setIconProvider +"QFileDialog::setInfoPreview" qfiledialog.html#setInfoPreview +"QFileDialog::setInfoPreviewEnabled" qfiledialog.html#setInfoPreviewEnabled +"QFileDialog::setMode" qfiledialog.html#setMode +"QFileDialog::setPreviewMode" qfiledialog.html#setPreviewMode +"QFileDialog::setSelectedFilter" qfiledialog.html#setSelectedFilter +"QFileDialog::setSelection" qfiledialog.html#setSelection +"QFileDialog::setShowHiddenFiles" qfiledialog.html#setShowHiddenFiles +"QFileDialog::setUrl" qfiledialog.html#setUrl +"QFileDialog::setViewMode" qfiledialog.html#setViewMode +"QFileDialog::showHiddenFiles" qfiledialog.html#showHiddenFiles +"QFileDialog::showHiddenFiles" qfiledialog.html#showHiddenFiles-prop +"QFileDialog::stopCopy" qfiledialog.html#stopCopy +"QFileDialog::updateFileNameEdit" qfiledialog.html#updateFileNameEdit +"QFileDialog::updateGeometries" qfiledialog.html#updateGeometries +"QFileDialog::url" qfiledialog.html#url +"QFileDialog::viewMode" qfiledialog.html#viewMode +"QFileDialog::viewMode" qfiledialog.html#viewMode-prop +"QFileDialog::~QFileDialog" qfiledialog.html#~QFileDialog +"QFileIconProvider" qfileiconprovider.html +"QFileIconProvider::pixmap" qfileiconprovider.html#pixmap +"QFileInfo" qfileinfo.html +"QFileInfo::PermissionSpec" qfileinfo.html#PermissionSpec +"QFileInfo::absFilePath" qfileinfo.html#absFilePath +"QFileInfo::baseName" qfileinfo.html#baseName +"QFileInfo::caching" qfileinfo.html#caching +"QFileInfo::convertToAbs" qfileinfo.html#convertToAbs +"QFileInfo::created" qfileinfo.html#created +"QFileInfo::dir" qfileinfo.html#dir +"QFileInfo::dirPath" qfileinfo.html#dirPath +"QFileInfo::exists" qfileinfo.html#exists +"QFileInfo::extension" qfileinfo.html#extension +"QFileInfo::fileName" qfileinfo.html#fileName +"QFileInfo::filePath" qfileinfo.html#filePath +"QFileInfo::group" qfileinfo.html#group +"QFileInfo::groupId" qfileinfo.html#groupId +"QFileInfo::isDir" qfileinfo.html#isDir +"QFileInfo::isExecutable" qfileinfo.html#isExecutable +"QFileInfo::isFile" qfileinfo.html#isFile +"QFileInfo::isHidden" qfileinfo.html#isHidden +"QFileInfo::isReadable" qfileinfo.html#isReadable +"QFileInfo::isRelative" qfileinfo.html#isRelative +"QFileInfo::isSymLink" qfileinfo.html#isSymLink +"QFileInfo::isWritable" qfileinfo.html#isWritable +"QFileInfo::lastModified" qfileinfo.html#lastModified +"QFileInfo::lastRead" qfileinfo.html#lastRead +"QFileInfo::operator=" qfileinfo.html#operator-eq +"QFileInfo::owner" qfileinfo.html#owner +"QFileInfo::ownerId" qfileinfo.html#ownerId +"QFileInfo::permission" qfileinfo.html#permission +"QFileInfo::readLink" qfileinfo.html#readLink +"QFileInfo::refresh" qfileinfo.html#refresh +"QFileInfo::setCaching" qfileinfo.html#setCaching +"QFileInfo::setFile" qfileinfo.html#setFile +"QFileInfo::size" qfileinfo.html#size +"QFileInfo::~QFileInfo" qfileinfo.html#~QFileInfo +"QFilePreview" qfilepreview.html +"QFilePreview::previewUrl" qfilepreview.html#previewUrl +"QFocusData" qfocusdata.html +"QFocusData::count" qfocusdata.html#count +"QFocusData::first" qfocusdata.html#first +"QFocusData::focusWidget" qfocusdata.html#focusWidget +"QFocusData::home" qfocusdata.html#home +"QFocusData::last" qfocusdata.html#last +"QFocusData::next" qfocusdata.html#next +"QFocusData::prev" qfocusdata.html#prev +"QFocusEvent" qfocusevent.html +"QFocusEvent::Reason" qfocusevent.html#Reason +"QFocusEvent::gotFocus" qfocusevent.html#gotFocus +"QFocusEvent::lostFocus" qfocusevent.html#lostFocus +"QFocusEvent::reason" qfocusevent.html#reason +"QFocusEvent::resetReason" qfocusevent.html#resetReason +"QFocusEvent::setReason" qfocusevent.html#setReason +"QFont" qfont.html +"QFont::Script" qfont.html#Script +"QFont::Stretch" qfont.html#Stretch +"QFont::StyleHint" qfont.html#StyleHint +"QFont::StyleStrategy" qfont.html#StyleStrategy +"QFont::Weight" qfont.html#Weight +"QFont::bold" qfont.html#bold +"QFont::deciPointSize" qfont.html#deciPointSize +"QFont::defaultFamily" qfont.html#defaultFamily +"QFont::dirty" qfont.html#dirty +"QFont::exactMatch" qfont.html#exactMatch +"QFont::family" qfont.html#family +"QFont::fixedPitch" qfont.html#fixedPitch +"QFont::fromString" qfont.html#fromString +"QFont::handle" qfont.html#handle +"QFont::insertSubstitution" qfont.html#insertSubstitution +"QFont::insertSubstitutions" qfont.html#insertSubstitutions +"QFont::isCopyOf" qfont.html#isCopyOf +"QFont::italic" qfont.html#italic +"QFont::key" qfont.html#key +"QFont::lastResortFamily" qfont.html#lastResortFamily +"QFont::lastResortFont" qfont.html#lastResortFont +"QFont::operator!=" qfont.html#operator!-eq +"QFont::operator=" qfont.html#operator-eq +"QFont::operator==" qfont.html#operator-eq-eq +"QFont::overline" qfont.html#overline +"QFont::pixelSize" qfont.html#pixelSize +"QFont::pointSize" qfont.html#pointSize +"QFont::pointSizeFloat" qfont.html#pointSizeFloat +"QFont::qwsRenderToDisk" qfont.html#qwsRenderToDisk +"QFont::rawMode" qfont.html#rawMode +"QFont::rawName" qfont.html#rawName +"QFont::removeSubstitution" qfont.html#removeSubstitution +"QFont::resolve" qfont.html#resolve +"QFont::setBold" qfont.html#setBold +"QFont::setFamily" qfont.html#setFamily +"QFont::setFixedPitch" qfont.html#setFixedPitch +"QFont::setItalic" qfont.html#setItalic +"QFont::setOverline" qfont.html#setOverline +"QFont::setPixelSize" qfont.html#setPixelSize +"QFont::setPointSize" qfont.html#setPointSize +"QFont::setPointSizeFloat" qfont.html#setPointSizeFloat +"QFont::setRawMode" qfont.html#setRawMode +"QFont::setRawName" qfont.html#setRawName +"QFont::setStretch" qfont.html#setStretch +"QFont::setStrikeOut" qfont.html#setStrikeOut +"QFont::setStyleHint" qfont.html#setStyleHint +"QFont::setStyleStrategy" qfont.html#setStyleStrategy +"QFont::setUnderline" qfont.html#setUnderline +"QFont::setWeight" qfont.html#setWeight +"QFont::stretch" qfont.html#stretch +"QFont::strikeOut" qfont.html#strikeOut +"QFont::styleHint" qfont.html#styleHint +"QFont::styleStrategy" qfont.html#styleStrategy +"QFont::substitute" qfont.html#substitute +"QFont::substitutes" qfont.html#substitutes +"QFont::substitutions" qfont.html#substitutions +"QFont::toString" qfont.html#toString +"QFont::underline" qfont.html#underline +"QFont::weight" qfont.html#weight +"QFont::~QFont" qfont.html#~QFont +"QFontDatabase" qfontdatabase.html +"QFontDatabase::bold" qfontdatabase.html#bold +"QFontDatabase::families" qfontdatabase.html#families +"QFontDatabase::font" qfontdatabase.html#font +"QFontDatabase::isBitmapScalable" qfontdatabase.html#isBitmapScalable +"QFontDatabase::isFixedPitch" qfontdatabase.html#isFixedPitch +"QFontDatabase::isScalable" qfontdatabase.html#isScalable +"QFontDatabase::isSmoothlyScalable" qfontdatabase.html#isSmoothlyScalable +"QFontDatabase::italic" qfontdatabase.html#italic +"QFontDatabase::pointSizes" qfontdatabase.html#pointSizes +"QFontDatabase::scriptName" qfontdatabase.html#scriptName +"QFontDatabase::scriptSample" qfontdatabase.html#scriptSample +"QFontDatabase::smoothSizes" qfontdatabase.html#smoothSizes +"QFontDatabase::standardSizes" qfontdatabase.html#standardSizes +"QFontDatabase::styleString" qfontdatabase.html#styleString +"QFontDatabase::styles" qfontdatabase.html#styles +"QFontDatabase::weight" qfontdatabase.html#weight +"QFontDialog" qfontdialog.html +"QFontDialog::getFont" qfontdialog.html#getFont +"QFontInfo" qfontinfo.html +"QFontInfo::bold" qfontinfo.html#bold +"QFontInfo::exactMatch" qfontinfo.html#exactMatch +"QFontInfo::family" qfontinfo.html#family +"QFontInfo::fixedPitch" qfontinfo.html#fixedPitch +"QFontInfo::italic" qfontinfo.html#italic +"QFontInfo::operator=" qfontinfo.html#operator-eq +"QFontInfo::pixelSize" qfontinfo.html#pixelSize +"QFontInfo::pointSize" qfontinfo.html#pointSize +"QFontInfo::rawMode" qfontinfo.html#rawMode +"QFontInfo::styleHint" qfontinfo.html#styleHint +"QFontInfo::weight" qfontinfo.html#weight +"QFontInfo::~QFontInfo" qfontinfo.html#~QFontInfo +"QFontManager" qfontmanager.html +"QFontManager::cleanup" qfontmanager.html#cleanup +"QFontManager::get" qfontmanager.html#get +"QFontManager::initialize" qfontmanager.html#initialize +"QFontManager::~QFontManager" qfontmanager.html#~QFontManager +"QFontMetrics" qfontmetrics.html +"QFontMetrics::ascent" qfontmetrics.html#ascent +"QFontMetrics::boundingRect" qfontmetrics.html#boundingRect +"QFontMetrics::charWidth" qfontmetrics.html#charWidth +"QFontMetrics::descent" qfontmetrics.html#descent +"QFontMetrics::height" qfontmetrics.html#height +"QFontMetrics::inFont" qfontmetrics.html#inFont +"QFontMetrics::leading" qfontmetrics.html#leading +"QFontMetrics::leftBearing" qfontmetrics.html#leftBearing +"QFontMetrics::lineSpacing" qfontmetrics.html#lineSpacing +"QFontMetrics::lineWidth" qfontmetrics.html#lineWidth +"QFontMetrics::maxWidth" qfontmetrics.html#maxWidth +"QFontMetrics::minLeftBearing" qfontmetrics.html#minLeftBearing +"QFontMetrics::minRightBearing" qfontmetrics.html#minRightBearing +"QFontMetrics::operator=" qfontmetrics.html#operator-eq +"QFontMetrics::overlinePos" qfontmetrics.html#overlinePos +"QFontMetrics::rightBearing" qfontmetrics.html#rightBearing +"QFontMetrics::size" qfontmetrics.html#size +"QFontMetrics::strikeOutPos" qfontmetrics.html#strikeOutPos +"QFontMetrics::underlinePos" qfontmetrics.html#underlinePos +"QFontMetrics::width" qfontmetrics.html#width +"QFontMetrics::~QFontMetrics" qfontmetrics.html#~QFontMetrics +"QFrame" qframe.html +"QFrame::Shadow" qframe.html#Shadow +"QFrame::Shape" qframe.html#Shape +"QFrame::contentsRect" qframe.html#contentsRect +"QFrame::contentsRect" qframe.html#contentsRect-prop +"QFrame::drawContents" qframe.html#drawContents +"QFrame::drawFrame" qframe.html#drawFrame +"QFrame::frameChanged" qframe.html#frameChanged +"QFrame::frameRect" qframe.html#frameRect +"QFrame::frameRect" qframe.html#frameRect-prop +"QFrame::frameShadow" qframe.html#frameShadow +"QFrame::frameShadow" qframe.html#frameShadow-prop +"QFrame::frameShape" qframe.html#frameShape +"QFrame::frameShape" qframe.html#frameShape-prop +"QFrame::frameStyle" qframe.html#frameStyle +"QFrame::frameWidth" qframe.html#frameWidth +"QFrame::frameWidth" qframe.html#frameWidth-prop +"QFrame::lineWidth" qframe.html#lineWidth +"QFrame::lineWidth" qframe.html#lineWidth-prop +"QFrame::margin" qframe.html#margin +"QFrame::margin" qframe.html#margin-prop +"QFrame::midLineWidth" qframe.html#midLineWidth +"QFrame::midLineWidth" qframe.html#midLineWidth-prop +"QFrame::paintEvent" qframe.html#paintEvent +"QFrame::resizeEvent" qframe.html#resizeEvent +"QFrame::setFrameRect" qframe.html#setFrameRect +"QFrame::setFrameShadow" qframe.html#setFrameShadow +"QFrame::setFrameShape" qframe.html#setFrameShape +"QFrame::setFrameStyle" qframe.html#setFrameStyle +"QFrame::setLineWidth" qframe.html#setLineWidth +"QFrame::setMargin" qframe.html#setMargin +"QFrame::setMidLineWidth" qframe.html#setMidLineWidth +"QFtp" qftp.html +"QFtp::Command" qftp.html#Command +"QFtp::Error" qftp.html#Error +"QFtp::State" qftp.html#State +"QFtp::abort" qftp.html#abort +"QFtp::bytesAvailable" qftp.html#bytesAvailable +"QFtp::cd" qftp.html#cd +"QFtp::clearPendingCommands" qftp.html#clearPendingCommands +"QFtp::close" qftp.html#close +"QFtp::commandFinished" qftp.html#commandFinished +"QFtp::commandStarted" qftp.html#commandStarted +"QFtp::connectToHost" qftp.html#connectToHost +"QFtp::currentCommand" qftp.html#currentCommand +"QFtp::currentDevice" qftp.html#currentDevice +"QFtp::currentId" qftp.html#currentId +"QFtp::dataTransferProgress" qftp.html#dataTransferProgress +"QFtp::done" qftp.html#done +"QFtp::error" qftp.html#error +"QFtp::errorString" qftp.html#errorString +"QFtp::get" qftp.html#get +"QFtp::hasPendingCommands" qftp.html#hasPendingCommands +"QFtp::list" qftp.html#list +"QFtp::listInfo" qftp.html#listInfo +"QFtp::login" qftp.html#login +"QFtp::mkdir" qftp.html#mkdir +"QFtp::put" qftp.html#put +"QFtp::rawCommand" qftp.html#rawCommand +"QFtp::rawCommandReply" qftp.html#rawCommandReply +"QFtp::readAll" qftp.html#readAll +"QFtp::readBlock" qftp.html#readBlock +"QFtp::readyRead" qftp.html#readyRead +"QFtp::remove" qftp.html#remove +"QFtp::rename" qftp.html#rename +"QFtp::rmdir" qftp.html#rmdir +"QFtp::state" qftp.html#state +"QFtp::stateChanged" qftp.html#stateChanged +"QFtp::~QFtp" qftp.html#~QFtp +"QGArray::assign" qgarray.html#assign +"QGArray::at" qgarray.html#at +"QGArray::bsearch" qgarray.html#bsearch +"QGArray::contains" qgarray.html#contains +"QGArray::data" qgarray.html#data +"QGArray::deleteData" qgarray.html#deleteData +"QGArray::detach" qgarray.html#detach +"QGArray::duplicate" qgarray.html#duplicate +"QGArray::fill" qgarray.html#fill +"QGArray::find" qgarray.html#find +"QGArray::isEqual" qgarray.html#isEqual +"QGArray::msg_index" qgarray.html#msg_index +"QGArray::newData" qgarray.html#newData +"QGArray::nrefs" qgarray.html#nrefs +"QGArray::operator=" qgarray.html#operator-eq +"QGArray::resetRawData" qgarray.html#resetRawData +"QGArray::resize" qgarray.html#resize +"QGArray::setExpand" qgarray.html#setExpand +"QGArray::setRawData" qgarray.html#setRawData +"QGArray::setSharedBlock" qgarray.html#setSharedBlock +"QGArray::sharedBlock" qgarray.html#sharedBlock +"QGArray::size" qgarray.html#size +"QGArray::sort" qgarray.html#sort +"QGArray::store" qgarray.html#store +"QGArray::~QGArray" qgarray.html#~QGArray +"QGCache::clear" qgcache.html#clear +"QGCache::count" qgcache.html#count +"QGCache::find_other" qgcache.html#find_other +"QGCache::find_string" qgcache.html#find_string +"QGCache::insert_string" qgcache.html#insert_string +"QGCache::makeRoomFor" qgcache.html#makeRoomFor +"QGCache::maxCost" qgcache.html#maxCost +"QGCache::operator=" qgcache.html#operator-eq +"QGCache::remove_string" qgcache.html#remove_string +"QGCache::setMaxCost" qgcache.html#setMaxCost +"QGCache::size" qgcache.html#size +"QGCache::statistics" qgcache.html#statistics +"QGCache::take_other" qgcache.html#take_other +"QGCache::take_string" qgcache.html#take_string +"QGCache::totalCost" qgcache.html#totalCost +"QGCache::~QGCache" qgcache.html#~QGCache +"QGCacheIterator::atFirst" qgcacheiterator.html#atFirst +"QGCacheIterator::atLast" qgcacheiterator.html#atLast +"QGCacheIterator::count" qgcacheiterator.html#count +"QGCacheIterator::get" qgcacheiterator.html#get +"QGCacheIterator::getKeyAscii" qgcacheiterator.html#getKeyAscii +"QGCacheIterator::getKeyInt" qgcacheiterator.html#getKeyInt +"QGCacheIterator::getKeyString" qgcacheiterator.html#getKeyString +"QGCacheIterator::operator()" qgcacheiterator.html#operator() +"QGCacheIterator::operator++" qgcacheiterator.html#operator++ +"QGCacheIterator::operator+=" qgcacheiterator.html#operator+-eq +"QGCacheIterator::operator--" qgcacheiterator.html#operator-- +"QGCacheIterator::operator-=" qgcacheiterator.html#operator--eq +"QGCacheIterator::operator=" qgcacheiterator.html#operator-eq +"QGCacheIterator::toFirst" qgcacheiterator.html#toFirst +"QGCacheIterator::toLast" qgcacheiterator.html#toLast +"QGCacheIterator::~QGCacheIterator" qgcacheiterator.html#~QGCacheIterator +"QGDict::clear" qgdict.html#clear +"QGDict::count" qgdict.html#count +"QGDict::hashKeyAscii" qgdict.html#hashKeyAscii +"QGDict::hashKeyString" qgdict.html#hashKeyString +"QGDict::look_string" qgdict.html#look_string +"QGDict::operator=" qgdict.html#operator-eq +"QGDict::read" qgdict.html#read +"QGDict::remove_string" qgdict.html#remove_string +"QGDict::resize" qgdict.html#resize +"QGDict::size" qgdict.html#size +"QGDict::statistics" qgdict.html#statistics +"QGDict::unlink_common" qgdict.html#unlink_common +"QGDict::write" qgdict.html#write +"QGDict::~QGDict" qgdict.html#~QGDict +"QGDictIterator::operator()" qgdictiterator.html#operator() +"QGDictIterator::operator++" qgdictiterator.html#operator++ +"QGDictIterator::operator+=" qgdictiterator.html#operator+-eq +"QGDictIterator::operator=" qgdictiterator.html#operator-eq +"QGDictIterator::toFirst" qgdictiterator.html#toFirst +"QGDictIterator::~QGDictIterator" qgdictiterator.html#~QGDictIterator +"QGL" qgl.html +"QGL::FormatOption" qgl.html#FormatOption +"QGLColormap" qglcolormap.html +"QGLColormap::detach" qglcolormap.html#detach +"QGLColormap::entryColor" qglcolormap.html#entryColor +"QGLColormap::entryRgb" qglcolormap.html#entryRgb +"QGLColormap::find" qglcolormap.html#find +"QGLColormap::findNearest" qglcolormap.html#findNearest +"QGLColormap::isEmpty" qglcolormap.html#isEmpty +"QGLColormap::operator=" qglcolormap.html#operator-eq +"QGLColormap::setEntries" qglcolormap.html#setEntries +"QGLColormap::setEntry" qglcolormap.html#setEntry +"QGLColormap::size" qglcolormap.html#size +"QGLColormap::~QGLColormap" qglcolormap.html#~QGLColormap +"QGLContext" qglcontext.html +"QGLContext::chooseContext" qglcontext.html#chooseContext +"QGLContext::chooseMacVisual" qglcontext.html#chooseMacVisual +"QGLContext::choosePixelFormat" qglcontext.html#choosePixelFormat +"QGLContext::chooseVisual" qglcontext.html#chooseVisual +"QGLContext::create" qglcontext.html#create +"QGLContext::currentContext" qglcontext.html#currentContext +"QGLContext::device" qglcontext.html#device +"QGLContext::deviceIsPixmap" qglcontext.html#deviceIsPixmap +"QGLContext::doneCurrent" qglcontext.html#doneCurrent +"QGLContext::format" qglcontext.html#format +"QGLContext::generateFontDisplayLists" qglcontext.html#generateFontDisplayLists +"QGLContext::initialized" qglcontext.html#initialized +"QGLContext::isSharing" qglcontext.html#isSharing +"QGLContext::isValid" qglcontext.html#isValid +"QGLContext::makeCurrent" qglcontext.html#makeCurrent +"QGLContext::overlayTransparentColor" qglcontext.html#overlayTransparentColor +"QGLContext::requestedFormat" qglcontext.html#requestedFormat +"QGLContext::reset" qglcontext.html#reset +"QGLContext::setFormat" qglcontext.html#setFormat +"QGLContext::setInitialized" qglcontext.html#setInitialized +"QGLContext::setWindowCreated" qglcontext.html#setWindowCreated +"QGLContext::swapBuffers" qglcontext.html#swapBuffers +"QGLContext::windowCreated" qglcontext.html#windowCreated +"QGLContext::~QGLContext" qglcontext.html#~QGLContext +"QGLFormat" qglformat.html +"QGLFormat::accum" qglformat.html#accum +"QGLFormat::alpha" qglformat.html#alpha +"QGLFormat::defaultFormat" qglformat.html#defaultFormat +"QGLFormat::defaultOverlayFormat" qglformat.html#defaultOverlayFormat +"QGLFormat::depth" qglformat.html#depth +"QGLFormat::directRendering" qglformat.html#directRendering +"QGLFormat::doubleBuffer" qglformat.html#doubleBuffer +"QGLFormat::hasOpenGL" qglformat.html#hasOpenGL +"QGLFormat::hasOpenGLOverlays" qglformat.html#hasOpenGLOverlays +"QGLFormat::hasOverlay" qglformat.html#hasOverlay +"QGLFormat::plane" qglformat.html#plane +"QGLFormat::rgba" qglformat.html#rgba +"QGLFormat::setAccum" qglformat.html#setAccum +"QGLFormat::setAlpha" qglformat.html#setAlpha +"QGLFormat::setDefaultFormat" qglformat.html#setDefaultFormat +"QGLFormat::setDefaultOverlayFormat" qglformat.html#setDefaultOverlayFormat +"QGLFormat::setDepth" qglformat.html#setDepth +"QGLFormat::setDirectRendering" qglformat.html#setDirectRendering +"QGLFormat::setDoubleBuffer" qglformat.html#setDoubleBuffer +"QGLFormat::setOption" qglformat.html#setOption +"QGLFormat::setOverlay" qglformat.html#setOverlay +"QGLFormat::setPlane" qglformat.html#setPlane +"QGLFormat::setRgba" qglformat.html#setRgba +"QGLFormat::setStencil" qglformat.html#setStencil +"QGLFormat::setStereo" qglformat.html#setStereo +"QGLFormat::stencil" qglformat.html#stencil +"QGLFormat::stereo" qglformat.html#stereo +"QGLFormat::testOption" qglformat.html#testOption +"QGLWidget" qglwidget.html +"QGLWidget::autoBufferSwap" qglwidget.html#autoBufferSwap +"QGLWidget::colormap" qglwidget.html#colormap +"QGLWidget::context" qglwidget.html#context +"QGLWidget::convertToGLFormat" qglwidget.html#convertToGLFormat +"QGLWidget::doneCurrent" qglwidget.html#doneCurrent +"QGLWidget::doubleBuffer" qglwidget.html#doubleBuffer +"QGLWidget::format" qglwidget.html#format +"QGLWidget::glDraw" qglwidget.html#glDraw +"QGLWidget::glInit" qglwidget.html#glInit +"QGLWidget::grabFrameBuffer" qglwidget.html#grabFrameBuffer +"QGLWidget::initializeGL" qglwidget.html#initializeGL +"QGLWidget::initializeOverlayGL" qglwidget.html#initializeOverlayGL +"QGLWidget::isSharing" qglwidget.html#isSharing +"QGLWidget::isValid" qglwidget.html#isValid +"QGLWidget::makeCurrent" qglwidget.html#makeCurrent +"QGLWidget::makeOverlayCurrent" qglwidget.html#makeOverlayCurrent +"QGLWidget::overlayContext" qglwidget.html#overlayContext +"QGLWidget::paintEvent" qglwidget.html#paintEvent +"QGLWidget::paintGL" qglwidget.html#paintGL +"QGLWidget::paintOverlayGL" qglwidget.html#paintOverlayGL +"QGLWidget::qglClearColor" qglwidget.html#qglClearColor +"QGLWidget::qglColor" qglwidget.html#qglColor +"QGLWidget::renderPixmap" qglwidget.html#renderPixmap +"QGLWidget::renderText" qglwidget.html#renderText +"QGLWidget::resizeEvent" qglwidget.html#resizeEvent +"QGLWidget::resizeGL" qglwidget.html#resizeGL +"QGLWidget::resizeOverlayGL" qglwidget.html#resizeOverlayGL +"QGLWidget::setAutoBufferSwap" qglwidget.html#setAutoBufferSwap +"QGLWidget::setColormap" qglwidget.html#setColormap +"QGLWidget::swapBuffers" qglwidget.html#swapBuffers +"QGLWidget::updateGL" qglwidget.html#updateGL +"QGLWidget::updateOverlayGL" qglwidget.html#updateOverlayGL +"QGLWidget::~QGLWidget" qglwidget.html#~QGLWidget +"QGLayoutIterator" qglayoutiterator.html +"QGLayoutIterator::current" qglayoutiterator.html#current +"QGLayoutIterator::next" qglayoutiterator.html#next +"QGLayoutIterator::takeCurrent" qglayoutiterator.html#takeCurrent +"QGLayoutIterator::~QGLayoutIterator" qglayoutiterator.html#~QGLayoutIterator +"QGList::append" qglist.html#append +"QGList::at" qglist.html#at +"QGList::cfirst" qglist.html#cfirst +"QGList::clast" qglist.html#clast +"QGList::clear" qglist.html#clear +"QGList::compareItems" qglist.html#compareItems +"QGList::contains" qglist.html#contains +"QGList::containsRef" qglist.html#containsRef +"QGList::count" qglist.html#count +"QGList::currentNode" qglist.html#currentNode +"QGList::find" qglist.html#find +"QGList::findRef" qglist.html#findRef +"QGList::first" qglist.html#first +"QGList::get" qglist.html#get +"QGList::inSort" qglist.html#inSort +"QGList::insertAt" qglist.html#insertAt +"QGList::last" qglist.html#last +"QGList::locate" qglist.html#locate +"QGList::next" qglist.html#next +"QGList::operator=" qglist.html#operator-eq +"QGList::operator==" qglist.html#operator-eq-eq +"QGList::prepend" qglist.html#prepend +"QGList::prev" qglist.html#prev +"QGList::read" qglist.html#read +"QGList::relinkNode" qglist.html#relinkNode +"QGList::remove" qglist.html#remove +"QGList::removeAt" qglist.html#removeAt +"QGList::removeFirst" qglist.html#removeFirst +"QGList::removeLast" qglist.html#removeLast +"QGList::removeNode" qglist.html#removeNode +"QGList::removeRef" qglist.html#removeRef +"QGList::replaceAt" qglist.html#replaceAt +"QGList::sort" qglist.html#sort +"QGList::take" qglist.html#take +"QGList::takeAt" qglist.html#takeAt +"QGList::takeFirst" qglist.html#takeFirst +"QGList::takeLast" qglist.html#takeLast +"QGList::takeNode" qglist.html#takeNode +"QGList::toVector" qglist.html#toVector +"QGList::unlink" qglist.html#unlink +"QGList::write" qglist.html#write +"QGList::~QGList" qglist.html#~QGList +"QGVector::compareItems" qgvector.html#compareItems +"QGVector::read" qgvector.html#read +"QGVector::write" qgvector.html#write +"QGb18030Codec" qgb18030codec.html +"QGb2312Codec" qgb2312codec.html +"QGbkCodec" qgbkcodec.html +"QGfxDriverFactory" qgfxdriverfactory.html +"QGfxDriverFactory::create" qgfxdriverfactory.html#create +"QGfxDriverFactory::keys" qgfxdriverfactory.html#keys +"QGfxDriverPlugin" qgfxdriverplugin.html +"QGfxDriverPlugin::create" qgfxdriverplugin.html#create +"QGfxDriverPlugin::keys" qgfxdriverplugin.html#keys +"QGfxDriverPlugin::~QGfxDriverPlugin" qgfxdriverplugin.html#~QGfxDriverPlugin +"QGfxRaster::vline" qgfxraster.html#vline +"QGrid" qgrid.html +"QGrid::setSpacing" qgrid.html#setSpacing +"QGridLayout" qgridlayout.html +"QGridLayout::Corner" qgridlayout.html#Corner +"QGridLayout::add" qgridlayout.html#add +"QGridLayout::addItem" qgridlayout.html#addItem +"QGridLayout::addLayout" qgridlayout.html#addLayout +"QGridLayout::addMultiCell" qgridlayout.html#addMultiCell +"QGridLayout::addMultiCellLayout" qgridlayout.html#addMultiCellLayout +"QGridLayout::addMultiCellWidget" qgridlayout.html#addMultiCellWidget +"QGridLayout::addWidget" qgridlayout.html#addWidget +"QGridLayout::cellGeometry" qgridlayout.html#cellGeometry +"QGridLayout::colSpacing" qgridlayout.html#colSpacing +"QGridLayout::colStretch" qgridlayout.html#colStretch +"QGridLayout::expand" qgridlayout.html#expand +"QGridLayout::expanding" qgridlayout.html#expanding +"QGridLayout::findWidget" qgridlayout.html#findWidget +"QGridLayout::hasHeightForWidth" qgridlayout.html#hasHeightForWidth +"QGridLayout::heightForWidth" qgridlayout.html#heightForWidth +"QGridLayout::init" qgridlayout.html#init +"QGridLayout::invalidate" qgridlayout.html#invalidate +"QGridLayout::maximumSize" qgridlayout.html#maximumSize +"QGridLayout::minimumSize" qgridlayout.html#minimumSize +"QGridLayout::numCols" qgridlayout.html#numCols +"QGridLayout::numRows" qgridlayout.html#numRows +"QGridLayout::origin" qgridlayout.html#origin +"QGridLayout::rowSpacing" qgridlayout.html#rowSpacing +"QGridLayout::rowStretch" qgridlayout.html#rowStretch +"QGridLayout::setColSpacing" qgridlayout.html#setColSpacing +"QGridLayout::setColStretch" qgridlayout.html#setColStretch +"QGridLayout::setGeometry" qgridlayout.html#setGeometry +"QGridLayout::setOrigin" qgridlayout.html#setOrigin +"QGridLayout::setRowSpacing" qgridlayout.html#setRowSpacing +"QGridLayout::setRowStretch" qgridlayout.html#setRowStretch +"QGridLayout::sizeHint" qgridlayout.html#sizeHint +"QGridLayout::~QGridLayout" qgridlayout.html#~QGridLayout +"QGridView" qgridview.html +"QGridView::cellGeometry" qgridview.html#cellGeometry +"QGridView::cellHeight" qgridview.html#cellHeight +"QGridView::cellHeight" qgridview.html#cellHeight-prop +"QGridView::cellRect" qgridview.html#cellRect +"QGridView::cellWidth" qgridview.html#cellWidth +"QGridView::cellWidth" qgridview.html#cellWidth-prop +"QGridView::columnAt" qgridview.html#columnAt +"QGridView::dimensionChange" qgridview.html#dimensionChange +"QGridView::ensureCellVisible" qgridview.html#ensureCellVisible +"QGridView::gridSize" qgridview.html#gridSize +"QGridView::numCols" qgridview.html#numCols +"QGridView::numCols" qgridview.html#numCols-prop +"QGridView::numRows" qgridview.html#numRows +"QGridView::numRows" qgridview.html#numRows-prop +"QGridView::paintCell" qgridview.html#paintCell +"QGridView::paintEmptyArea" qgridview.html#paintEmptyArea +"QGridView::repaintCell" qgridview.html#repaintCell +"QGridView::rowAt" qgridview.html#rowAt +"QGridView::setCellHeight" qgridview.html#setCellHeight +"QGridView::setCellWidth" qgridview.html#setCellWidth +"QGridView::setNumCols" qgridview.html#setNumCols +"QGridView::setNumRows" qgridview.html#setNumRows +"QGridView::updateCell" qgridview.html#updateCell +"QGridView::~QGridView" qgridview.html#~QGridView +"QGroupBox" qgroupbox.html +"QGroupBox::addSpace" qgroupbox.html#addSpace +"QGroupBox::alignment" qgroupbox.html#alignment +"QGroupBox::alignment" qgroupbox.html#alignment-prop +"QGroupBox::checkable" qgroupbox.html#checkable-prop +"QGroupBox::checked" qgroupbox.html#checked-prop +"QGroupBox::columns" qgroupbox.html#columns +"QGroupBox::columns" qgroupbox.html#columns-prop +"QGroupBox::flat" qgroupbox.html#flat-prop +"QGroupBox::insideMargin" qgroupbox.html#insideMargin +"QGroupBox::insideSpacing" qgroupbox.html#insideSpacing +"QGroupBox::isCheckable" qgroupbox.html#isCheckable +"QGroupBox::isChecked" qgroupbox.html#isChecked +"QGroupBox::isFlat" qgroupbox.html#isFlat +"QGroupBox::orientation" qgroupbox.html#orientation +"QGroupBox::orientation" qgroupbox.html#orientation-prop +"QGroupBox::setAlignment" qgroupbox.html#setAlignment +"QGroupBox::setCheckable" qgroupbox.html#setCheckable +"QGroupBox::setChecked" qgroupbox.html#setChecked +"QGroupBox::setColumnLayout" qgroupbox.html#setColumnLayout +"QGroupBox::setColumns" qgroupbox.html#setColumns +"QGroupBox::setFlat" qgroupbox.html#setFlat +"QGroupBox::setInsideMargin" qgroupbox.html#setInsideMargin +"QGroupBox::setInsideSpacing" qgroupbox.html#setInsideSpacing +"QGroupBox::setOrientation" qgroupbox.html#setOrientation +"QGroupBox::setTitle" qgroupbox.html#setTitle +"QGroupBox::title" qgroupbox.html#title +"QGroupBox::title" qgroupbox.html#title-prop +"QGroupBox::toggled" qgroupbox.html#toggled +"QGroupBox::~QGroupBox" qgroupbox.html#~QGroupBox +"QGuardedPtr" qguardedptr.html +"QGuardedPtr::isNull" qguardedptr.html#isNull +"QGuardedPtr::operator T *" qguardedptr.html#operator-T-* +"QGuardedPtr::operator!=" qguardedptr.html#operator!-eq +"QGuardedPtr::operator*" qguardedptr.html#operator* +"QGuardedPtr::operator->" qguardedptr.html#operator--gt +"QGuardedPtr::operator=" qguardedptr.html#operator-eq +"QGuardedPtr::operator==" qguardedptr.html#operator-eq-eq +"QGuardedPtr::~QGuardedPtr" qguardedptr.html#~QGuardedPtr +"QHBox" qhbox.html +"QHBox::setSpacing" qhbox.html#setSpacing +"QHBox::setStretchFactor" qhbox.html#setStretchFactor +"QHBoxLayout" qhboxlayout.html +"QHBoxLayout::~QHBoxLayout" qhboxlayout.html#~QHBoxLayout +"QHButtonGroup" qhbuttongroup.html +"QHButtonGroup::~QHButtonGroup" qhbuttongroup.html#~QHButtonGroup +"QHGroupBox" qhgroupbox.html +"QHGroupBox::~QHGroupBox" qhgroupbox.html#~QHGroupBox +"QHeader" qheader.html +"QHeader::addLabel" qheader.html#addLabel +"QHeader::adjustHeaderSize" qheader.html#adjustHeaderSize +"QHeader::clicked" qheader.html#clicked +"QHeader::count" qheader.html#count +"QHeader::count" qheader.html#count-prop +"QHeader::handleAt" qheader.html#handleAt +"QHeader::handleColumnMove" qheader.html#handleColumnMove +"QHeader::headerWidth" qheader.html#headerWidth +"QHeader::iconSet" qheader.html#iconSet +"QHeader::indexChange" qheader.html#indexChange +"QHeader::isClickEnabled" qheader.html#isClickEnabled +"QHeader::isMovingEnabled" qheader.html#isMovingEnabled +"QHeader::isResizeEnabled" qheader.html#isResizeEnabled +"QHeader::isStretchEnabled" qheader.html#isStretchEnabled +"QHeader::label" qheader.html#label +"QHeader::mapToIndex" qheader.html#mapToIndex +"QHeader::mapToSection" qheader.html#mapToSection +"QHeader::moveSection" qheader.html#moveSection +"QHeader::moving" qheader.html#moving-prop +"QHeader::offset" qheader.html#offset +"QHeader::offset" qheader.html#offset-prop +"QHeader::orientation" qheader.html#orientation +"QHeader::orientation" qheader.html#orientation-prop +"QHeader::paintSection" qheader.html#paintSection +"QHeader::paintSectionLabel" qheader.html#paintSectionLabel +"QHeader::pressed" qheader.html#pressed +"QHeader::released" qheader.html#released +"QHeader::removeLabel" qheader.html#removeLabel +"QHeader::resizeSection" qheader.html#resizeSection +"QHeader::sRect" qheader.html#sRect +"QHeader::sectionAt" qheader.html#sectionAt +"QHeader::sectionHandleDoubleClicked" qheader.html#sectionHandleDoubleClicked +"QHeader::sectionPos" qheader.html#sectionPos +"QHeader::sectionRect" qheader.html#sectionRect +"QHeader::sectionSize" qheader.html#sectionSize +"QHeader::setClickEnabled" qheader.html#setClickEnabled +"QHeader::setLabel" qheader.html#setLabel +"QHeader::setMovingEnabled" qheader.html#setMovingEnabled +"QHeader::setOffset" qheader.html#setOffset +"QHeader::setOrientation" qheader.html#setOrientation +"QHeader::setResizeEnabled" qheader.html#setResizeEnabled +"QHeader::setSortIndicator" qheader.html#setSortIndicator +"QHeader::setStretchEnabled" qheader.html#setStretchEnabled +"QHeader::setTracking" qheader.html#setTracking +"QHeader::sizeChange" qheader.html#sizeChange +"QHeader::sortIndicatorOrder" qheader.html#sortIndicatorOrder +"QHeader::sortIndicatorSection" qheader.html#sortIndicatorSection +"QHeader::stretching" qheader.html#stretching-prop +"QHeader::tracking" qheader.html#tracking +"QHeader::tracking" qheader.html#tracking-prop +"QHeader::~QHeader" qheader.html#~QHeader +"QHebrewCodec" qhebrewcodec.html +"QHebrewCodec::fromUnicode" qhebrewcodec.html#fromUnicode +"QHebrewCodec::mimeName" qhebrewcodec.html#mimeName +"QHideEvent" qhideevent.html +"QHostAddress" qhostaddress.html +"QHostAddress::isIPv4Address" qhostaddress.html#isIPv4Address +"QHostAddress::isIPv6Address" qhostaddress.html#isIPv6Address +"QHostAddress::isNull" qhostaddress.html#isNull +"QHostAddress::operator=" qhostaddress.html#operator-eq +"QHostAddress::operator==" qhostaddress.html#operator-eq-eq +"QHostAddress::setAddress" qhostaddress.html#setAddress +"QHostAddress::toIPv4Address" qhostaddress.html#toIPv4Address +"QHostAddress::toIPv6Address" qhostaddress.html#toIPv6Address +"QHostAddress::toString" qhostaddress.html#toString +"QHostAddress::~QHostAddress" qhostaddress.html#~QHostAddress +"QHttp" qhttp.html +"QHttp::Error" qhttp.html#Error +"QHttp::State" qhttp.html#State +"QHttp::abort" qhttp.html#abort +"QHttp::bytesAvailable" qhttp.html#bytesAvailable +"QHttp::clearPendingRequests" qhttp.html#clearPendingRequests +"QHttp::closeConnection" qhttp.html#closeConnection +"QHttp::currentDestinationDevice" qhttp.html#currentDestinationDevice +"QHttp::currentId" qhttp.html#currentId +"QHttp::currentRequest" qhttp.html#currentRequest +"QHttp::currentSourceDevice" qhttp.html#currentSourceDevice +"QHttp::dataReadProgress" qhttp.html#dataReadProgress +"QHttp::dataSendProgress" qhttp.html#dataSendProgress +"QHttp::done" qhttp.html#done +"QHttp::error" qhttp.html#error +"QHttp::errorString" qhttp.html#errorString +"QHttp::get" qhttp.html#get +"QHttp::hasPendingRequests" qhttp.html#hasPendingRequests +"QHttp::head" qhttp.html#head +"QHttp::post" qhttp.html#post +"QHttp::readAll" qhttp.html#readAll +"QHttp::readBlock" qhttp.html#readBlock +"QHttp::readyRead" qhttp.html#readyRead +"QHttp::request" qhttp.html#request +"QHttp::requestFinished" qhttp.html#requestFinished +"QHttp::requestStarted" qhttp.html#requestStarted +"QHttp::responseHeaderReceived" qhttp.html#responseHeaderReceived +"QHttp::setHost" qhttp.html#setHost +"QHttp::state" qhttp.html#state +"QHttp::stateChanged" qhttp.html#stateChanged +"QHttp::~QHttp" qhttp.html#~QHttp +"QHttpHeader" qhttpheader.html +"QHttpHeader::contentLength" qhttpheader.html#contentLength +"QHttpHeader::contentType" qhttpheader.html#contentType +"QHttpHeader::hasContentLength" qhttpheader.html#hasContentLength +"QHttpHeader::hasContentType" qhttpheader.html#hasContentType +"QHttpHeader::hasKey" qhttpheader.html#hasKey +"QHttpHeader::isValid" qhttpheader.html#isValid +"QHttpHeader::keys" qhttpheader.html#keys +"QHttpHeader::majorVersion" qhttpheader.html#majorVersion +"QHttpHeader::minorVersion" qhttpheader.html#minorVersion +"QHttpHeader::operator=" qhttpheader.html#operator-eq +"QHttpHeader::removeValue" qhttpheader.html#removeValue +"QHttpHeader::setContentLength" qhttpheader.html#setContentLength +"QHttpHeader::setContentType" qhttpheader.html#setContentType +"QHttpHeader::setValue" qhttpheader.html#setValue +"QHttpHeader::toString" qhttpheader.html#toString +"QHttpHeader::value" qhttpheader.html#value +"QHttpHeader::~QHttpHeader" qhttpheader.html#~QHttpHeader +"QHttpRequestHeader" qhttprequestheader.html +"QHttpRequestHeader::majorVersion" qhttprequestheader.html#majorVersion +"QHttpRequestHeader::method" qhttprequestheader.html#method +"QHttpRequestHeader::minorVersion" qhttprequestheader.html#minorVersion +"QHttpRequestHeader::path" qhttprequestheader.html#path +"QHttpRequestHeader::setRequest" qhttprequestheader.html#setRequest +"QHttpResponseHeader" qhttpresponseheader.html +"QHttpResponseHeader::majorVersion" qhttpresponseheader.html#majorVersion +"QHttpResponseHeader::minorVersion" qhttpresponseheader.html#minorVersion +"QHttpResponseHeader::reasonPhrase" qhttpresponseheader.html#reasonPhrase +"QHttpResponseHeader::setStatusLine" qhttpresponseheader.html#setStatusLine +"QHttpResponseHeader::statusCode" qhttpresponseheader.html#statusCode +"QIMEvent" qimevent.html +"QIMEvent::accept" qimevent.html#accept +"QIMEvent::cursorPos" qimevent.html#cursorPos +"QIMEvent::ignore" qimevent.html#ignore +"QIMEvent::isAccepted" qimevent.html#isAccepted +"QIMEvent::selectionLength" qimevent.html#selectionLength +"QIMEvent::text" qimevent.html#text +"QIODevice" qiodevice.html +"QIODevice::Offset" qiodevice.html#Offset +"QIODevice::at" qiodevice.html#at +"QIODevice::atEnd" qiodevice.html#atEnd +"QIODevice::close" qiodevice.html#close +"QIODevice::flags" qiodevice.html#flags +"QIODevice::flush" qiodevice.html#flush +"QIODevice::getch" qiodevice.html#getch +"QIODevice::isAsynchronous" qiodevice.html#isAsynchronous +"QIODevice::isBuffered" qiodevice.html#isBuffered +"QIODevice::isCombinedAccess" qiodevice.html#isCombinedAccess +"QIODevice::isDirectAccess" qiodevice.html#isDirectAccess +"QIODevice::isInactive" qiodevice.html#isInactive +"QIODevice::isOpen" qiodevice.html#isOpen +"QIODevice::isRaw" qiodevice.html#isRaw +"QIODevice::isReadWrite" qiodevice.html#isReadWrite +"QIODevice::isReadable" qiodevice.html#isReadable +"QIODevice::isSequentialAccess" qiodevice.html#isSequentialAccess +"QIODevice::isSynchronous" qiodevice.html#isSynchronous +"QIODevice::isTranslated" qiodevice.html#isTranslated +"QIODevice::isWritable" qiodevice.html#isWritable +"QIODevice::mode" qiodevice.html#mode +"QIODevice::open" qiodevice.html#open +"QIODevice::putch" qiodevice.html#putch +"QIODevice::readAll" qiodevice.html#readAll +"QIODevice::readBlock" qiodevice.html#readBlock +"QIODevice::readLine" qiodevice.html#readLine +"QIODevice::reset" qiodevice.html#reset +"QIODevice::resetStatus" qiodevice.html#resetStatus +"QIODevice::setFlags" qiodevice.html#setFlags +"QIODevice::setMode" qiodevice.html#setMode +"QIODevice::setState" qiodevice.html#setState +"QIODevice::setStatus" qiodevice.html#setStatus +"QIODevice::setType" qiodevice.html#setType +"QIODevice::size" qiodevice.html#size +"QIODevice::state" qiodevice.html#state +"QIODevice::status" qiodevice.html#status +"QIODevice::ungetch" qiodevice.html#ungetch +"QIODevice::writeBlock" qiodevice.html#writeBlock +"QIODevice::~QIODevice" qiodevice.html#~QIODevice +"QIODeviceSource::enableRewind" qiodevicesource.html#enableRewind +"QIODeviceSource::readyToSend" qiodevicesource.html#readyToSend +"QIODeviceSource::rewind" qiodevicesource.html#rewind +"QIODeviceSource::rewindable" qiodevicesource.html#rewindable +"QIODeviceSource::sendTo" qiodevicesource.html#sendTo +"QIODeviceSource::~QIODeviceSource" qiodevicesource.html#~QIODeviceSource +"QIconDrag" qicondrag.html +"QIconDrag::append" qicondrag.html#append +"QIconDrag::canDecode" qicondrag.html#canDecode +"QIconDrag::encodedData" qicondrag.html#encodedData +"QIconDrag::~QIconDrag" qicondrag.html#~QIconDrag +"QIconDragEvent" qicondragevent.html +"QIconDragEvent::accept" qicondragevent.html#accept +"QIconDragEvent::ignore" qicondragevent.html#ignore +"QIconDragEvent::isAccepted" qicondragevent.html#isAccepted +"QIconDragItem" qicondragitem.html +"QIconDragItem::data" qicondragitem.html#data +"QIconDragItem::setData" qicondragitem.html#setData +"QIconDragItem::~QIconDragItem" qicondragitem.html#~QIconDragItem +"QIconFactory" qiconfactory.html +"QIconFactory::autoDelete" qiconfactory.html#autoDelete +"QIconFactory::createPixmap" qiconfactory.html#createPixmap +"QIconFactory::defaultFactory" qiconfactory.html#defaultFactory +"QIconFactory::installDefaultFactory" qiconfactory.html#installDefaultFactory +"QIconFactory::setAutoDelete" qiconfactory.html#setAutoDelete +"QIconFactory::~QIconFactory" qiconfactory.html#~QIconFactory +"QIconSet" qiconset.html +"QIconSet::Mode" qiconset.html#Mode +"QIconSet::Size" qiconset.html#Size +"QIconSet::State" qiconset.html#State +"QIconSet::clearGenerated" qiconset.html#clearGenerated +"QIconSet::createDisabled" qiconset.html#createDisabled +"QIconSet::createScaled" qiconset.html#createScaled +"QIconSet::detach" qiconset.html#detach +"QIconSet::iconSize" qiconset.html#iconSize +"QIconSet::installIconFactory" qiconset.html#installIconFactory +"QIconSet::isGenerated" qiconset.html#isGenerated +"QIconSet::isNull" qiconset.html#isNull +"QIconSet::operator=" qiconset.html#operator-eq +"QIconSet::pixmap" qiconset.html#pixmap +"QIconSet::reset" qiconset.html#reset +"QIconSet::setIconSize" qiconset.html#setIconSize +"QIconSet::setPixmap" qiconset.html#setPixmap +"QIconSet::~QIconSet" qiconset.html#~QIconSet +"QIconView" qiconview.html +"QIconView::Arrangement" qiconview.html#Arrangement +"QIconView::ItemTextPos" qiconview.html#ItemTextPos +"QIconView::ResizeMode" qiconview.html#ResizeMode +"QIconView::SelectionMode" qiconview.html#SelectionMode +"QIconView::adjustItems" qiconview.html#adjustItems +"QIconView::arrangeItemsInGrid" qiconview.html#arrangeItemsInGrid +"QIconView::arrangement" qiconview.html#arrangement +"QIconView::arrangement" qiconview.html#arrangement-prop +"QIconView::autoArrange" qiconview.html#autoArrange +"QIconView::autoArrange" qiconview.html#autoArrange-prop +"QIconView::clear" qiconview.html#clear +"QIconView::clearSelection" qiconview.html#clearSelection +"QIconView::clicked" qiconview.html#clicked +"QIconView::contextMenuRequested" qiconview.html#contextMenuRequested +"QIconView::count" qiconview.html#count +"QIconView::count" qiconview.html#count-prop +"QIconView::currentChanged" qiconview.html#currentChanged +"QIconView::currentItem" qiconview.html#currentItem +"QIconView::doAutoScroll" qiconview.html#doAutoScroll +"QIconView::doubleClicked" qiconview.html#doubleClicked +"QIconView::dragObject" qiconview.html#dragObject +"QIconView::drawBackground" qiconview.html#drawBackground +"QIconView::drawDragShapes" qiconview.html#drawDragShapes +"QIconView::drawRubber" qiconview.html#drawRubber +"QIconView::dropped" qiconview.html#dropped +"QIconView::emitSelectionChanged" qiconview.html#emitSelectionChanged +"QIconView::ensureItemVisible" qiconview.html#ensureItemVisible +"QIconView::findFirstVisibleItem" qiconview.html#findFirstVisibleItem +"QIconView::findItem" qiconview.html#findItem +"QIconView::findLastVisibleItem" qiconview.html#findLastVisibleItem +"QIconView::firstItem" qiconview.html#firstItem +"QIconView::gridX" qiconview.html#gridX +"QIconView::gridX" qiconview.html#gridX-prop +"QIconView::gridY" qiconview.html#gridY +"QIconView::gridY" qiconview.html#gridY-prop +"QIconView::index" qiconview.html#index +"QIconView::initDragEnter" qiconview.html#initDragEnter +"QIconView::insertInGrid" qiconview.html#insertInGrid +"QIconView::insertItem" qiconview.html#insertItem +"QIconView::invertSelection" qiconview.html#invertSelection +"QIconView::isRenaming" qiconview.html#isRenaming +"QIconView::itemRenamed" qiconview.html#itemRenamed +"QIconView::itemTextBackground" qiconview.html#itemTextBackground +"QIconView::itemTextBackground" qiconview.html#itemTextBackground-prop +"QIconView::itemTextPos" qiconview.html#itemTextPos +"QIconView::itemTextPos" qiconview.html#itemTextPos-prop +"QIconView::itemsMovable" qiconview.html#itemsMovable +"QIconView::itemsMovable" qiconview.html#itemsMovable-prop +"QIconView::lastItem" qiconview.html#lastItem +"QIconView::makeRowLayout" qiconview.html#makeRowLayout +"QIconView::maxItemTextLength" qiconview.html#maxItemTextLength +"QIconView::maxItemTextLength" qiconview.html#maxItemTextLength-prop +"QIconView::maxItemWidth" qiconview.html#maxItemWidth +"QIconView::maxItemWidth" qiconview.html#maxItemWidth-prop +"QIconView::mouseButtonClicked" qiconview.html#mouseButtonClicked +"QIconView::mouseButtonPressed" qiconview.html#mouseButtonPressed +"QIconView::moved" qiconview.html#moved +"QIconView::onItem" qiconview.html#onItem +"QIconView::onViewport" qiconview.html#onViewport +"QIconView::pressed" qiconview.html#pressed +"QIconView::repaintItem" qiconview.html#repaintItem +"QIconView::repaintSelectedItems" qiconview.html#repaintSelectedItems +"QIconView::resizeMode" qiconview.html#resizeMode +"QIconView::resizeMode" qiconview.html#resizeMode-prop +"QIconView::returnPressed" qiconview.html#returnPressed +"QIconView::rightButtonClicked" qiconview.html#rightButtonClicked +"QIconView::rightButtonPressed" qiconview.html#rightButtonPressed +"QIconView::selectAll" qiconview.html#selectAll +"QIconView::selectionChanged" qiconview.html#selectionChanged +"QIconView::selectionMode" qiconview.html#selectionMode +"QIconView::selectionMode" qiconview.html#selectionMode-prop +"QIconView::setArrangement" qiconview.html#setArrangement +"QIconView::setAutoArrange" qiconview.html#setAutoArrange +"QIconView::setCurrentItem" qiconview.html#setCurrentItem +"QIconView::setGridX" qiconview.html#setGridX +"QIconView::setGridY" qiconview.html#setGridY +"QIconView::setItemTextBackground" qiconview.html#setItemTextBackground +"QIconView::setItemTextPos" qiconview.html#setItemTextPos +"QIconView::setItemsMovable" qiconview.html#setItemsMovable +"QIconView::setMaxItemTextLength" qiconview.html#setMaxItemTextLength +"QIconView::setMaxItemWidth" qiconview.html#setMaxItemWidth +"QIconView::setResizeMode" qiconview.html#setResizeMode +"QIconView::setSelected" qiconview.html#setSelected +"QIconView::setSelectionMode" qiconview.html#setSelectionMode +"QIconView::setShowToolTips" qiconview.html#setShowToolTips +"QIconView::setSorting" qiconview.html#setSorting +"QIconView::setSpacing" qiconview.html#setSpacing +"QIconView::setWordWrapIconText" qiconview.html#setWordWrapIconText +"QIconView::showToolTips" qiconview.html#showToolTips +"QIconView::showToolTips" qiconview.html#showToolTips-prop +"QIconView::slotUpdate" qiconview.html#slotUpdate +"QIconView::sort" qiconview.html#sort +"QIconView::sortDirection" qiconview.html#sortDirection +"QIconView::sortDirection" qiconview.html#sortDirection-prop +"QIconView::sorting" qiconview.html#sorting +"QIconView::sorting" qiconview.html#sorting-prop +"QIconView::spacing" qiconview.html#spacing +"QIconView::spacing" qiconview.html#spacing-prop +"QIconView::startDrag" qiconview.html#startDrag +"QIconView::takeItem" qiconview.html#takeItem +"QIconView::wordWrapIconText" qiconview.html#wordWrapIconText +"QIconView::wordWrapIconText" qiconview.html#wordWrapIconText-prop +"QIconView::~QIconView" qiconview.html#~QIconView +"QIconViewItem" qiconviewitem.html +"QIconViewItem::acceptDrop" qiconviewitem.html#acceptDrop +"QIconViewItem::calcRect" qiconviewitem.html#calcRect +"QIconViewItem::cancelRenameItem" qiconviewitem.html#cancelRenameItem +"QIconViewItem::compare" qiconviewitem.html#compare +"QIconViewItem::contains" qiconviewitem.html#contains +"QIconViewItem::dragEnabled" qiconviewitem.html#dragEnabled +"QIconViewItem::dragEntered" qiconviewitem.html#dragEntered +"QIconViewItem::dragLeft" qiconviewitem.html#dragLeft +"QIconViewItem::dropEnabled" qiconviewitem.html#dropEnabled +"QIconViewItem::dropped" qiconviewitem.html#dropped +"QIconViewItem::height" qiconviewitem.html#height +"QIconViewItem::iconView" qiconviewitem.html#iconView +"QIconViewItem::index" qiconviewitem.html#index +"QIconViewItem::init" qiconviewitem.html#init +"QIconViewItem::intersects" qiconviewitem.html#intersects +"QIconViewItem::isSelectable" qiconviewitem.html#isSelectable +"QIconViewItem::isSelected" qiconviewitem.html#isSelected +"QIconViewItem::key" qiconviewitem.html#key +"QIconViewItem::move" qiconviewitem.html#move +"QIconViewItem::moveBy" qiconviewitem.html#moveBy +"QIconViewItem::nextItem" qiconviewitem.html#nextItem +"QIconViewItem::paintFocus" qiconviewitem.html#paintFocus +"QIconViewItem::paintItem" qiconviewitem.html#paintItem +"QIconViewItem::picture" qiconviewitem.html#picture +"QIconViewItem::pixmap" qiconviewitem.html#pixmap +"QIconViewItem::pixmapRect" qiconviewitem.html#pixmapRect +"QIconViewItem::pos" qiconviewitem.html#pos +"QIconViewItem::prevItem" qiconviewitem.html#prevItem +"QIconViewItem::rect" qiconviewitem.html#rect +"QIconViewItem::removeRenameBox" qiconviewitem.html#removeRenameBox +"QIconViewItem::rename" qiconviewitem.html#rename +"QIconViewItem::renameEnabled" qiconviewitem.html#renameEnabled +"QIconViewItem::renameItem" qiconviewitem.html#renameItem +"QIconViewItem::repaint" qiconviewitem.html#repaint +"QIconViewItem::rtti" qiconviewitem.html#rtti +"QIconViewItem::setDragEnabled" qiconviewitem.html#setDragEnabled +"QIconViewItem::setDropEnabled" qiconviewitem.html#setDropEnabled +"QIconViewItem::setItemRect" qiconviewitem.html#setItemRect +"QIconViewItem::setKey" qiconviewitem.html#setKey +"QIconViewItem::setPicture" qiconviewitem.html#setPicture +"QIconViewItem::setPixmap" qiconviewitem.html#setPixmap +"QIconViewItem::setPixmapRect" qiconviewitem.html#setPixmapRect +"QIconViewItem::setRenameEnabled" qiconviewitem.html#setRenameEnabled +"QIconViewItem::setSelectable" qiconviewitem.html#setSelectable +"QIconViewItem::setSelected" qiconviewitem.html#setSelected +"QIconViewItem::setText" qiconviewitem.html#setText +"QIconViewItem::setTextRect" qiconviewitem.html#setTextRect +"QIconViewItem::size" qiconviewitem.html#size +"QIconViewItem::text" qiconviewitem.html#text +"QIconViewItem::textRect" qiconviewitem.html#textRect +"QIconViewItem::width" qiconviewitem.html#width +"QIconViewItem::x" qiconviewitem.html#x +"QIconViewItem::y" qiconviewitem.html#y +"QIconViewItem::~QIconViewItem" qiconviewitem.html#~QIconViewItem +"QImage" qimage.html +"QImage::Endian" qimage.html#Endian +"QImage::ScaleMode" qimage.html#ScaleMode +"QImage::allGray" qimage.html#allGray +"QImage::bitOrder" qimage.html#bitOrder +"QImage::bits" qimage.html#bits +"QImage::bytesPerLine" qimage.html#bytesPerLine +"QImage::color" qimage.html#color +"QImage::colorTable" qimage.html#colorTable +"QImage::convertBitOrder" qimage.html#convertBitOrder +"QImage::convertDepth" qimage.html#convertDepth +"QImage::convertDepthWithPalette" qimage.html#convertDepthWithPalette +"QImage::copy" qimage.html#copy +"QImage::create" qimage.html#create +"QImage::createAlphaMask" qimage.html#createAlphaMask +"QImage::createHeuristicMask" qimage.html#createHeuristicMask +"QImage::depth" qimage.html#depth +"QImage::detach" qimage.html#detach +"QImage::dotsPerMeterX" qimage.html#dotsPerMeterX +"QImage::dotsPerMeterY" qimage.html#dotsPerMeterY +"QImage::fill" qimage.html#fill +"QImage::fromMimeSource" qimage.html#fromMimeSource +"QImage::hasAlphaBuffer" qimage.html#hasAlphaBuffer +"QImage::height" qimage.html#height +"QImage::imageFormat" qimage.html#imageFormat +"QImage::inputFormatList" qimage.html#inputFormatList +"QImage::inputFormats" qimage.html#inputFormats +"QImage::invertPixels" qimage.html#invertPixels +"QImage::isGrayscale" qimage.html#isGrayscale +"QImage::isNull" qimage.html#isNull +"QImage::jumpTable" qimage.html#jumpTable +"QImage::load" qimage.html#load +"QImage::loadFromData" qimage.html#loadFromData +"QImage::mirror" qimage.html#mirror +"QImage::numBytes" qimage.html#numBytes +"QImage::numColors" qimage.html#numColors +"QImage::offset" qimage.html#offset +"QImage::operator!=" qimage.html#operator!-eq +"QImage::operator=" qimage.html#operator-eq +"QImage::operator==" qimage.html#operator-eq-eq +"QImage::outputFormatList" qimage.html#outputFormatList +"QImage::outputFormats" qimage.html#outputFormats +"QImage::pixel" qimage.html#pixel +"QImage::pixelIndex" qimage.html#pixelIndex +"QImage::rect" qimage.html#rect +"QImage::reset" qimage.html#reset +"QImage::save" qimage.html#save +"QImage::scale" qimage.html#scale +"QImage::scaleHeight" qimage.html#scaleHeight +"QImage::scaleWidth" qimage.html#scaleWidth +"QImage::scanLine" qimage.html#scanLine +"QImage::setAlphaBuffer" qimage.html#setAlphaBuffer +"QImage::setColor" qimage.html#setColor +"QImage::setDotsPerMeterX" qimage.html#setDotsPerMeterX +"QImage::setDotsPerMeterY" qimage.html#setDotsPerMeterY +"QImage::setNumColors" qimage.html#setNumColors +"QImage::setOffset" qimage.html#setOffset +"QImage::setPixel" qimage.html#setPixel +"QImage::setText" qimage.html#setText +"QImage::size" qimage.html#size +"QImage::smoothScale" qimage.html#smoothScale +"QImage::swapRGB" qimage.html#swapRGB +"QImage::systemBitOrder" qimage.html#systemBitOrder +"QImage::systemByteOrder" qimage.html#systemByteOrder +"QImage::text" qimage.html#text +"QImage::textKeys" qimage.html#textKeys +"QImage::textLanguages" qimage.html#textLanguages +"QImage::textList" qimage.html#textList +"QImage::valid" qimage.html#valid +"QImage::width" qimage.html#width +"QImage::xForm" qimage.html#xForm +"QImage::~QImage" qimage.html#~QImage +"QImageConsumer" qimageconsumer.html +"QImageConsumer::changed" qimageconsumer.html#changed +"QImageConsumer::end" qimageconsumer.html#end +"QImageConsumer::frameDone" qimageconsumer.html#frameDone +"QImageConsumer::setFramePeriod" qimageconsumer.html#setFramePeriod +"QImageConsumer::setLooping" qimageconsumer.html#setLooping +"QImageConsumer::setSize" qimageconsumer.html#setSize +"QImageDecoder" qimagedecoder.html +"QImageDecoder::decode" qimagedecoder.html#decode +"QImageDecoder::format" qimagedecoder.html#format +"QImageDecoder::formatName" qimagedecoder.html#formatName +"QImageDecoder::image" qimagedecoder.html#image +"QImageDecoder::inputFormats" qimagedecoder.html#inputFormats +"QImageDecoder::registerDecoderFactory" qimagedecoder.html#registerDecoderFactory +"QImageDecoder::unregisterDecoderFactory" qimagedecoder.html#unregisterDecoderFactory +"QImageDecoder::~QImageDecoder" qimagedecoder.html#~QImageDecoder +"QImageDrag" qimagedrag.html +"QImageDrag::canDecode" qimagedrag.html#canDecode +"QImageDrag::decode" qimagedrag.html#decode +"QImageDrag::setImage" qimagedrag.html#setImage +"QImageDrag::~QImageDrag" qimagedrag.html#~QImageDrag +"QImageFormat" qimageformat.html +"QImageFormat::decode" qimageformat.html#decode +"QImageFormatPlugin" qimageformatplugin.html +"QImageFormatPlugin::installIOHandler" qimageformatplugin.html#installIOHandler +"QImageFormatPlugin::keys" qimageformatplugin.html#keys +"QImageFormatPlugin::~QImageFormatPlugin" qimageformatplugin.html#~QImageFormatPlugin +"QImageFormatType" qimageformattype.html +"QImageFormatType::decoderFor" qimageformattype.html#decoderFor +"QImageFormatType::formatName" qimageformattype.html#formatName +"QImageFormatType::~QImageFormatType" qimageformattype.html#~QImageFormatType +"QImageIO" qimageio.html +"QImageIO::defineIOHandler" qimageio.html#defineIOHandler +"QImageIO::description" qimageio.html#description +"QImageIO::fileName" qimageio.html#fileName +"QImageIO::format" qimageio.html#format +"QImageIO::gamma" qimageio.html#gamma +"QImageIO::image" qimageio.html#image +"QImageIO::imageFormat" qimageio.html#imageFormat +"QImageIO::init" qimageio.html#init +"QImageIO::inputFormats" qimageio.html#inputFormats +"QImageIO::ioDevice" qimageio.html#ioDevice +"QImageIO::outputFormats" qimageio.html#outputFormats +"QImageIO::parameters" qimageio.html#parameters +"QImageIO::quality" qimageio.html#quality +"QImageIO::read" qimageio.html#read +"QImageIO::setDescription" qimageio.html#setDescription +"QImageIO::setFileName" qimageio.html#setFileName +"QImageIO::setFormat" qimageio.html#setFormat +"QImageIO::setGamma" qimageio.html#setGamma +"QImageIO::setIODevice" qimageio.html#setIODevice +"QImageIO::setImage" qimageio.html#setImage +"QImageIO::setParameters" qimageio.html#setParameters +"QImageIO::setQuality" qimageio.html#setQuality +"QImageIO::setStatus" qimageio.html#setStatus +"QImageIO::status" qimageio.html#status +"QImageIO::write" qimageio.html#write +"QImageIO::~QImageIO" qimageio.html#~QImageIO +"QInputDialog" qinputdialog.html +"QInputDialog::Type" qinputdialog.html#Type +"QInputDialog::comboBox" qinputdialog.html#comboBox +"QInputDialog::editableComboBox" qinputdialog.html#editableComboBox +"QInputDialog::getDouble" qinputdialog.html#getDouble +"QInputDialog::getInteger" qinputdialog.html#getInteger +"QInputDialog::getItem" qinputdialog.html#getItem +"QInputDialog::getText" qinputdialog.html#getText +"QInputDialog::lineEdit" qinputdialog.html#lineEdit +"QInputDialog::setType" qinputdialog.html#setType +"QInputDialog::spinBox" qinputdialog.html#spinBox +"QInputDialog::type" qinputdialog.html#type +"QInputDialog::~QInputDialog" qinputdialog.html#~QInputDialog +"QIntCache" qintcache.html +"QIntCache::clear" qintcache.html#clear +"QIntCache::count" qintcache.html#count +"QIntCache::find" qintcache.html#find +"QIntCache::insert" qintcache.html#insert +"QIntCache::isEmpty" qintcache.html#isEmpty +"QIntCache::maxCost" qintcache.html#maxCost +"QIntCache::operator[]" qintcache.html#operator[] +"QIntCache::remove" qintcache.html#remove +"QIntCache::setMaxCost" qintcache.html#setMaxCost +"QIntCache::size" qintcache.html#size +"QIntCache::statistics" qintcache.html#statistics +"QIntCache::take" qintcache.html#take +"QIntCache::totalCost" qintcache.html#totalCost +"QIntCache::~QIntCache" qintcache.html#~QIntCache +"QIntCacheIterator" qintcacheiterator.html +"QIntCacheIterator::atFirst" qintcacheiterator.html#atFirst +"QIntCacheIterator::atLast" qintcacheiterator.html#atLast +"QIntCacheIterator::count" qintcacheiterator.html#count +"QIntCacheIterator::current" qintcacheiterator.html#current +"QIntCacheIterator::currentKey" qintcacheiterator.html#currentKey +"QIntCacheIterator::isEmpty" qintcacheiterator.html#isEmpty +"QIntCacheIterator::operator type *" qintcacheiterator.html#operator-type-* +"QIntCacheIterator::operator()" qintcacheiterator.html#operator() +"QIntCacheIterator::operator++" qintcacheiterator.html#operator++ +"QIntCacheIterator::operator+=" qintcacheiterator.html#operator+-eq +"QIntCacheIterator::operator--" qintcacheiterator.html#operator-- +"QIntCacheIterator::operator-=" qintcacheiterator.html#operator--eq +"QIntCacheIterator::operator=" qintcacheiterator.html#operator-eq +"QIntCacheIterator::toFirst" qintcacheiterator.html#toFirst +"QIntCacheIterator::toLast" qintcacheiterator.html#toLast +"QIntDict" qintdict.html +"QIntDict::clear" qintdict.html#clear +"QIntDict::count" qintdict.html#count +"QIntDict::find" qintdict.html#find +"QIntDict::insert" qintdict.html#insert +"QIntDict::isEmpty" qintdict.html#isEmpty +"QIntDict::operator=" qintdict.html#operator-eq +"QIntDict::operator[]" qintdict.html#operator[] +"QIntDict::read" qintdict.html#read +"QIntDict::remove" qintdict.html#remove +"QIntDict::replace" qintdict.html#replace +"QIntDict::resize" qintdict.html#resize +"QIntDict::size" qintdict.html#size +"QIntDict::statistics" qintdict.html#statistics +"QIntDict::take" qintdict.html#take +"QIntDict::write" qintdict.html#write +"QIntDict::~QIntDict" qintdict.html#~QIntDict +"QIntDictIterator" qintdictiterator.html +"QIntDictIterator::count" qintdictiterator.html#count +"QIntDictIterator::current" qintdictiterator.html#current +"QIntDictIterator::currentKey" qintdictiterator.html#currentKey +"QIntDictIterator::isEmpty" qintdictiterator.html#isEmpty +"QIntDictIterator::operator type *" qintdictiterator.html#operator-type-* +"QIntDictIterator::operator()" qintdictiterator.html#operator() +"QIntDictIterator::operator++" qintdictiterator.html#operator++ +"QIntDictIterator::operator+=" qintdictiterator.html#operator+-eq +"QIntDictIterator::toFirst" qintdictiterator.html#toFirst +"QIntDictIterator::~QIntDictIterator" qintdictiterator.html#~QIntDictIterator +"QIntValidator" qintvalidator.html +"QIntValidator::bottom" qintvalidator.html#bottom +"QIntValidator::bottom" qintvalidator.html#bottom-prop +"QIntValidator::setBottom" qintvalidator.html#setBottom +"QIntValidator::setRange" qintvalidator.html#setRange +"QIntValidator::setTop" qintvalidator.html#setTop +"QIntValidator::top" qintvalidator.html#top +"QIntValidator::top" qintvalidator.html#top-prop +"QIntValidator::validate" qintvalidator.html#validate +"QIntValidator::~QIntValidator" qintvalidator.html#~QIntValidator +"QJisCodec" qjiscodec.html +"QJisCodec::mimeName" qjiscodec.html#mimeName +"QKbdDriverFactory" qkbddriverfactory.html +"QKbdDriverFactory::create" qkbddriverfactory.html#create +"QKbdDriverFactory::keys" qkbddriverfactory.html#keys +"QKbdDriverPlugin" qkbddriverplugin.html +"QKbdDriverPlugin::create" qkbddriverplugin.html#create +"QKbdDriverPlugin::keys" qkbddriverplugin.html#keys +"QKbdDriverPlugin::~QKbdDriverPlugin" qkbddriverplugin.html#~QKbdDriverPlugin +"QKeyEvent" qkeyevent.html +"QKeyEvent::accept" qkeyevent.html#accept +"QKeyEvent::ascii" qkeyevent.html#ascii +"QKeyEvent::count" qkeyevent.html#count +"QKeyEvent::ignore" qkeyevent.html#ignore +"QKeyEvent::isAccepted" qkeyevent.html#isAccepted +"QKeyEvent::isAutoRepeat" qkeyevent.html#isAutoRepeat +"QKeyEvent::key" qkeyevent.html#key +"QKeyEvent::state" qkeyevent.html#state +"QKeyEvent::stateAfter" qkeyevent.html#stateAfter +"QKeyEvent::text" qkeyevent.html#text +"QKeySequence" qkeysequence.html +"QKeySequence::assign" qkeysequence.html#assign +"QKeySequence::count" qkeysequence.html#count +"QKeySequence::decodeString" qkeysequence.html#decodeString +"QKeySequence::encodeString" qkeysequence.html#encodeString +"QKeySequence::isEmpty" qkeysequence.html#isEmpty +"QKeySequence::matches" qkeysequence.html#matches +"QKeySequence::operator QString" qkeysequence.html#operator-QString +"QKeySequence::operator!=" qkeysequence.html#operator!-eq +"QKeySequence::operator=" qkeysequence.html#operator-eq +"QKeySequence::operator==" qkeysequence.html#operator-eq-eq +"QKeySequence::operator[]" qkeysequence.html#operator[] +"QKeySequence::~QKeySequence" qkeysequence.html#~QKeySequence +"QLCDNumber" qlcdnumber.html +"QLCDNumber::Mode" qlcdnumber.html#Mode +"QLCDNumber::SegmentStyle" qlcdnumber.html#SegmentStyle +"QLCDNumber::checkOverflow" qlcdnumber.html#checkOverflow +"QLCDNumber::display" qlcdnumber.html#display +"QLCDNumber::drawContents" qlcdnumber.html#drawContents +"QLCDNumber::intValue" qlcdnumber.html#intValue +"QLCDNumber::intValue" qlcdnumber.html#intValue-prop +"QLCDNumber::mode" qlcdnumber.html#mode +"QLCDNumber::mode" qlcdnumber.html#mode-prop +"QLCDNumber::numDigits" qlcdnumber.html#numDigits +"QLCDNumber::numDigits" qlcdnumber.html#numDigits-prop +"QLCDNumber::overflow" qlcdnumber.html#overflow +"QLCDNumber::segmentStyle" qlcdnumber.html#segmentStyle +"QLCDNumber::segmentStyle" qlcdnumber.html#segmentStyle-prop +"QLCDNumber::setBinMode" qlcdnumber.html#setBinMode +"QLCDNumber::setDecMode" qlcdnumber.html#setDecMode +"QLCDNumber::setHexMode" qlcdnumber.html#setHexMode +"QLCDNumber::setMode" qlcdnumber.html#setMode +"QLCDNumber::setNumDigits" qlcdnumber.html#setNumDigits +"QLCDNumber::setOctMode" qlcdnumber.html#setOctMode +"QLCDNumber::setSegmentStyle" qlcdnumber.html#setSegmentStyle +"QLCDNumber::setSmallDecimalPoint" qlcdnumber.html#setSmallDecimalPoint +"QLCDNumber::smallDecimalPoint" qlcdnumber.html#smallDecimalPoint +"QLCDNumber::smallDecimalPoint" qlcdnumber.html#smallDecimalPoint-prop +"QLCDNumber::value" qlcdnumber.html#value +"QLCDNumber::value" qlcdnumber.html#value-prop +"QLCDNumber::~QLCDNumber" qlcdnumber.html#~QLCDNumber +"QLNode::getData" qlnode.html#getData +"QLabel" qlabel.html +"QLabel::alignment" qlabel.html#alignment +"QLabel::alignment" qlabel.html#alignment-prop +"QLabel::backgroundMode" qlabel.html#backgroundMode-prop +"QLabel::buddy" qlabel.html#buddy +"QLabel::clear" qlabel.html#clear +"QLabel::drawContents" qlabel.html#drawContents +"QLabel::hasScaledContents" qlabel.html#hasScaledContents +"QLabel::indent" qlabel.html#indent +"QLabel::indent" qlabel.html#indent-prop +"QLabel::movie" qlabel.html#movie +"QLabel::picture" qlabel.html#picture +"QLabel::pixmap" qlabel.html#pixmap +"QLabel::pixmap" qlabel.html#pixmap-prop +"QLabel::scaledContents" qlabel.html#scaledContents-prop +"QLabel::setAlignment" qlabel.html#setAlignment +"QLabel::setBuddy" qlabel.html#setBuddy +"QLabel::setFont" qlabel.html#setFont +"QLabel::setIndent" qlabel.html#setIndent +"QLabel::setMovie" qlabel.html#setMovie +"QLabel::setNum" qlabel.html#setNum +"QLabel::setPicture" qlabel.html#setPicture +"QLabel::setPixmap" qlabel.html#setPixmap +"QLabel::setScaledContents" qlabel.html#setScaledContents +"QLabel::setText" qlabel.html#setText +"QLabel::setTextFormat" qlabel.html#setTextFormat +"QLabel::sizeForWidth" qlabel.html#sizeForWidth +"QLabel::text" qlabel.html#text +"QLabel::text" qlabel.html#text-prop +"QLabel::textFormat" qlabel.html#textFormat +"QLabel::textFormat" qlabel.html#textFormat-prop +"QLabel::updateLabel" qlabel.html#updateLabel +"QLabel::~QLabel" qlabel.html#~QLabel +"QLayout" qlayout.html +"QLayout::ResizeMode" qlayout.html#ResizeMode +"QLayout::activate" qlayout.html#activate +"QLayout::add" qlayout.html#add +"QLayout::addChildLayout" qlayout.html#addChildLayout +"QLayout::addItem" qlayout.html#addItem +"QLayout::alignmentRect" qlayout.html#alignmentRect +"QLayout::autoAdd" qlayout.html#autoAdd +"QLayout::deleteAllItems" qlayout.html#deleteAllItems +"QLayout::expanding" qlayout.html#expanding +"QLayout::invalidate" qlayout.html#invalidate +"QLayout::isEmpty" qlayout.html#isEmpty +"QLayout::isEnabled" qlayout.html#isEnabled +"QLayout::isTopLevel" qlayout.html#isTopLevel +"QLayout::iterator" qlayout.html#iterator +"QLayout::mainWidget" qlayout.html#mainWidget +"QLayout::margin" qlayout.html#margin +"QLayout::margin" qlayout.html#margin-prop +"QLayout::maximumSize" qlayout.html#maximumSize +"QLayout::menuBar" qlayout.html#menuBar +"QLayout::minimumSize" qlayout.html#minimumSize +"QLayout::remove" qlayout.html#remove +"QLayout::removeItem" qlayout.html#removeItem +"QLayout::resizeMode" qlayout.html#resizeMode +"QLayout::resizeMode" qlayout.html#resizeMode-prop +"QLayout::setAutoAdd" qlayout.html#setAutoAdd +"QLayout::setEnabled" qlayout.html#setEnabled +"QLayout::setGeometry" qlayout.html#setGeometry +"QLayout::setMargin" qlayout.html#setMargin +"QLayout::setMenuBar" qlayout.html#setMenuBar +"QLayout::setResizeMode" qlayout.html#setResizeMode +"QLayout::setSpacing" qlayout.html#setSpacing +"QLayout::setSupportsMargin" qlayout.html#setSupportsMargin +"QLayout::setWidgetLayout" qlayout.html#setWidgetLayout +"QLayout::spacing" qlayout.html#spacing +"QLayout::spacing" qlayout.html#spacing-prop +"QLayout::supportsMargin" qlayout.html#supportsMargin +"QLayoutItem" qlayoutitem.html +"QLayoutItem::alignment" qlayoutitem.html#alignment +"QLayoutItem::expanding" qlayoutitem.html#expanding +"QLayoutItem::geometry" qlayoutitem.html#geometry +"QLayoutItem::hasHeightForWidth" qlayoutitem.html#hasHeightForWidth +"QLayoutItem::heightForWidth" qlayoutitem.html#heightForWidth +"QLayoutItem::invalidate" qlayoutitem.html#invalidate +"QLayoutItem::isEmpty" qlayoutitem.html#isEmpty +"QLayoutItem::iterator" qlayoutitem.html#iterator +"QLayoutItem::layout" qlayoutitem.html#layout +"QLayoutItem::maximumSize" qlayoutitem.html#maximumSize +"QLayoutItem::minimumSize" qlayoutitem.html#minimumSize +"QLayoutItem::setAlignment" qlayoutitem.html#setAlignment +"QLayoutItem::setGeometry" qlayoutitem.html#setGeometry +"QLayoutItem::sizeHint" qlayoutitem.html#sizeHint +"QLayoutItem::spacerItem" qlayoutitem.html#spacerItem +"QLayoutItem::widget" qlayoutitem.html#widget +"QLayoutItem::~QLayoutItem" qlayoutitem.html#~QLayoutItem +"QLayoutIterator" qlayoutiterator.html +"QLayoutIterator::current" qlayoutiterator.html#current +"QLayoutIterator::deleteCurrent" qlayoutiterator.html#deleteCurrent +"QLayoutIterator::operator++" qlayoutiterator.html#operator++ +"QLayoutIterator::operator=" qlayoutiterator.html#operator-eq +"QLayoutIterator::takeCurrent" qlayoutiterator.html#takeCurrent +"QLayoutIterator::~QLayoutIterator" qlayoutiterator.html#~QLayoutIterator +"QLibrary" qlibrary.html +"QLibrary::autoUnload" qlibrary.html#autoUnload +"QLibrary::isLoaded" qlibrary.html#isLoaded +"QLibrary::library" qlibrary.html#library +"QLibrary::load" qlibrary.html#load +"QLibrary::resolve" qlibrary.html#resolve +"QLibrary::setAutoUnload" qlibrary.html#setAutoUnload +"QLibrary::unload" qlibrary.html#unload +"QLibrary::~QLibrary" qlibrary.html#~QLibrary +"QLineEdit" qlineedit.html +"QLineEdit::EchoMode" qlineedit.html#EchoMode +"QLineEdit::acceptableInput" qlineedit.html#acceptableInput-prop +"QLineEdit::alignment" qlineedit.html#alignment +"QLineEdit::alignment" qlineedit.html#alignment-prop +"QLineEdit::backspace" qlineedit.html#backspace +"QLineEdit::clear" qlineedit.html#clear +"QLineEdit::clearModified" qlineedit.html#clearModified +"QLineEdit::clearValidator" qlineedit.html#clearValidator +"QLineEdit::copy" qlineedit.html#copy +"QLineEdit::createPopupMenu" qlineedit.html#createPopupMenu +"QLineEdit::cursorBackward" qlineedit.html#cursorBackward +"QLineEdit::cursorForward" qlineedit.html#cursorForward +"QLineEdit::cursorPosition" qlineedit.html#cursorPosition +"QLineEdit::cursorPosition" qlineedit.html#cursorPosition-prop +"QLineEdit::cursorWordBackward" qlineedit.html#cursorWordBackward +"QLineEdit::cursorWordForward" qlineedit.html#cursorWordForward +"QLineEdit::cut" qlineedit.html#cut +"QLineEdit::del" qlineedit.html#del +"QLineEdit::deselect" qlineedit.html#deselect +"QLineEdit::displayText" qlineedit.html#displayText +"QLineEdit::displayText" qlineedit.html#displayText-prop +"QLineEdit::dragEnabled" qlineedit.html#dragEnabled +"QLineEdit::dragEnabled" qlineedit.html#dragEnabled-prop +"QLineEdit::echoMode" qlineedit.html#echoMode +"QLineEdit::echoMode" qlineedit.html#echoMode-prop +"QLineEdit::end" qlineedit.html#end +"QLineEdit::frame" qlineedit.html#frame +"QLineEdit::frame" qlineedit.html#frame-prop +"QLineEdit::hasAcceptableInput" qlineedit.html#hasAcceptableInput +"QLineEdit::hasSelectedText" qlineedit.html#hasSelectedText +"QLineEdit::hasSelectedText" qlineedit.html#hasSelectedText-prop +"QLineEdit::home" qlineedit.html#home +"QLineEdit::inputMask" qlineedit.html#inputMask +"QLineEdit::inputMask" qlineedit.html#inputMask-prop +"QLineEdit::insert" qlineedit.html#insert +"QLineEdit::isModified" qlineedit.html#isModified +"QLineEdit::isReadOnly" qlineedit.html#isReadOnly +"QLineEdit::isRedoAvailable" qlineedit.html#isRedoAvailable +"QLineEdit::isUndoAvailable" qlineedit.html#isUndoAvailable +"QLineEdit::keyPressEvent" qlineedit.html#keyPressEvent +"QLineEdit::lostFocus" qlineedit.html#lostFocus +"QLineEdit::maxLength" qlineedit.html#maxLength +"QLineEdit::maxLength" qlineedit.html#maxLength-prop +"QLineEdit::minimumSizeHint" qlineedit.html#minimumSizeHint +"QLineEdit::modified" qlineedit.html#modified-prop +"QLineEdit::paste" qlineedit.html#paste +"QLineEdit::readOnly" qlineedit.html#readOnly-prop +"QLineEdit::redo" qlineedit.html#redo +"QLineEdit::redoAvailable" qlineedit.html#redoAvailable-prop +"QLineEdit::returnPressed" qlineedit.html#returnPressed +"QLineEdit::selectAll" qlineedit.html#selectAll +"QLineEdit::selectedText" qlineedit.html#selectedText +"QLineEdit::selectedText" qlineedit.html#selectedText-prop +"QLineEdit::selectionChanged" qlineedit.html#selectionChanged +"QLineEdit::selectionStart" qlineedit.html#selectionStart +"QLineEdit::setAlignment" qlineedit.html#setAlignment +"QLineEdit::setCursorPosition" qlineedit.html#setCursorPosition +"QLineEdit::setDragEnabled" qlineedit.html#setDragEnabled +"QLineEdit::setEchoMode" qlineedit.html#setEchoMode +"QLineEdit::setFrame" qlineedit.html#setFrame +"QLineEdit::setInputMask" qlineedit.html#setInputMask +"QLineEdit::setMaxLength" qlineedit.html#setMaxLength +"QLineEdit::setReadOnly" qlineedit.html#setReadOnly +"QLineEdit::setSelection" qlineedit.html#setSelection +"QLineEdit::setText" qlineedit.html#setText +"QLineEdit::setValidator" qlineedit.html#setValidator +"QLineEdit::sizeHint" qlineedit.html#sizeHint +"QLineEdit::text" qlineedit.html#text +"QLineEdit::text" qlineedit.html#text-prop +"QLineEdit::textChanged" qlineedit.html#textChanged +"QLineEdit::undo" qlineedit.html#undo +"QLineEdit::undoAvailable" qlineedit.html#undoAvailable-prop +"QLineEdit::validator" qlineedit.html#validator +"QLineEdit::~QLineEdit" qlineedit.html#~QLineEdit +"QLinuxFbScreen::cache" qlinuxfbscreen.html#cache +"QLinuxFbScreen::connect" qlinuxfbscreen.html#connect +"QLinuxFbScreen::deleteEntry" qlinuxfbscreen.html#deleteEntry +"QLinuxFbScreen::disconnect" qlinuxfbscreen.html#disconnect +"QLinuxFbScreen::initDevice" qlinuxfbscreen.html#initDevice +"QLinuxFbScreen::restore" qlinuxfbscreen.html#restore +"QLinuxFbScreen::save" qlinuxfbscreen.html#save +"QLinuxFbScreen::set" qlinuxfbscreen.html#set +"QLinuxFbScreen::setMode" qlinuxfbscreen.html#setMode +"QLinuxFbScreen::shutdownDevice" qlinuxfbscreen.html#shutdownDevice +"QLinuxFbScreen::uncache" qlinuxfbscreen.html#uncache +"QLinuxFbScreen::~QLinuxFbScreen" qlinuxfbscreen.html#~QLinuxFbScreen +"QList Class Reference (obsolete)" qlist.html +"QListBox" qlistbox.html +"QListBox::LayoutMode" qlistbox.html#LayoutMode +"QListBox::SelectionMode" qlistbox.html#SelectionMode +"QListBox::changeItem" qlistbox.html#changeItem +"QListBox::clear" qlistbox.html#clear +"QListBox::clearSelection" qlistbox.html#clearSelection +"QListBox::clicked" qlistbox.html#clicked +"QListBox::columnAt" qlistbox.html#columnAt +"QListBox::columnMode" qlistbox.html#columnMode +"QListBox::columnMode" qlistbox.html#columnMode-prop +"QListBox::contextMenuRequested" qlistbox.html#contextMenuRequested +"QListBox::count" qlistbox.html#count +"QListBox::count" qlistbox.html#count-prop +"QListBox::currentChanged" qlistbox.html#currentChanged +"QListBox::currentColumn" qlistbox.html#currentColumn +"QListBox::currentItem" qlistbox.html#currentItem +"QListBox::currentItem" qlistbox.html#currentItem-prop +"QListBox::currentRow" qlistbox.html#currentRow +"QListBox::currentText" qlistbox.html#currentText +"QListBox::currentText" qlistbox.html#currentText-prop +"QListBox::doLayout" qlistbox.html#doLayout +"QListBox::doubleClicked" qlistbox.html#doubleClicked +"QListBox::ensureCurrentVisible" qlistbox.html#ensureCurrentVisible +"QListBox::findItem" qlistbox.html#findItem +"QListBox::firstItem" qlistbox.html#firstItem +"QListBox::highlighted" qlistbox.html#highlighted +"QListBox::index" qlistbox.html#index +"QListBox::insertItem" qlistbox.html#insertItem +"QListBox::insertStrList" qlistbox.html#insertStrList +"QListBox::insertStringList" qlistbox.html#insertStringList +"QListBox::invertSelection" qlistbox.html#invertSelection +"QListBox::isRubberSelecting" qlistbox.html#isRubberSelecting +"QListBox::isSelected" qlistbox.html#isSelected +"QListBox::item" qlistbox.html#item +"QListBox::itemAt" qlistbox.html#itemAt +"QListBox::itemHeight" qlistbox.html#itemHeight +"QListBox::itemRect" qlistbox.html#itemRect +"QListBox::itemVisible" qlistbox.html#itemVisible +"QListBox::maxItemWidth" qlistbox.html#maxItemWidth +"QListBox::mouseButtonClicked" qlistbox.html#mouseButtonClicked +"QListBox::mouseButtonPressed" qlistbox.html#mouseButtonPressed +"QListBox::numColumns" qlistbox.html#numColumns +"QListBox::numColumns" qlistbox.html#numColumns-prop +"QListBox::numItemsVisible" qlistbox.html#numItemsVisible +"QListBox::numItemsVisible" qlistbox.html#numItemsVisible-prop +"QListBox::numRows" qlistbox.html#numRows +"QListBox::numRows" qlistbox.html#numRows-prop +"QListBox::onItem" qlistbox.html#onItem +"QListBox::onViewport" qlistbox.html#onViewport +"QListBox::paintCell" qlistbox.html#paintCell +"QListBox::pixmap" qlistbox.html#pixmap +"QListBox::pressed" qlistbox.html#pressed +"QListBox::refreshSlot" qlistbox.html#refreshSlot +"QListBox::removeItem" qlistbox.html#removeItem +"QListBox::returnPressed" qlistbox.html#returnPressed +"QListBox::rightButtonClicked" qlistbox.html#rightButtonClicked +"QListBox::rightButtonPressed" qlistbox.html#rightButtonPressed +"QListBox::rowAt" qlistbox.html#rowAt +"QListBox::rowMode" qlistbox.html#rowMode +"QListBox::rowMode" qlistbox.html#rowMode-prop +"QListBox::selectAll" qlistbox.html#selectAll +"QListBox::selected" qlistbox.html#selected +"QListBox::selectedItem" qlistbox.html#selectedItem +"QListBox::selectionChanged" qlistbox.html#selectionChanged +"QListBox::selectionMode" qlistbox.html#selectionMode +"QListBox::selectionMode" qlistbox.html#selectionMode-prop +"QListBox::setBottomItem" qlistbox.html#setBottomItem +"QListBox::setColumnMode" qlistbox.html#setColumnMode +"QListBox::setCurrentItem" qlistbox.html#setCurrentItem +"QListBox::setRowMode" qlistbox.html#setRowMode +"QListBox::setSelected" qlistbox.html#setSelected +"QListBox::setSelectionMode" qlistbox.html#setSelectionMode +"QListBox::setTopItem" qlistbox.html#setTopItem +"QListBox::setVariableHeight" qlistbox.html#setVariableHeight +"QListBox::setVariableWidth" qlistbox.html#setVariableWidth +"QListBox::sort" qlistbox.html#sort +"QListBox::takeItem" qlistbox.html#takeItem +"QListBox::text" qlistbox.html#text +"QListBox::toggleCurrentItem" qlistbox.html#toggleCurrentItem +"QListBox::topItem" qlistbox.html#topItem +"QListBox::topItem" qlistbox.html#topItem-prop +"QListBox::triggerUpdate" qlistbox.html#triggerUpdate +"QListBox::tryGeometry" qlistbox.html#tryGeometry +"QListBox::updateItem" qlistbox.html#updateItem +"QListBox::variableHeight" qlistbox.html#variableHeight +"QListBox::variableHeight" qlistbox.html#variableHeight-prop +"QListBox::variableWidth" qlistbox.html#variableWidth +"QListBox::variableWidth" qlistbox.html#variableWidth-prop +"QListBox::~QListBox" qlistbox.html#~QListBox +"QListBoxItem" qlistboxitem.html +"QListBoxItem::height" qlistboxitem.html#height +"QListBoxItem::isCurrent" qlistboxitem.html#isCurrent +"QListBoxItem::isSelectable" qlistboxitem.html#isSelectable +"QListBoxItem::isSelected" qlistboxitem.html#isSelected +"QListBoxItem::listBox" qlistboxitem.html#listBox +"QListBoxItem::next" qlistboxitem.html#next +"QListBoxItem::paint" qlistboxitem.html#paint +"QListBoxItem::pixmap" qlistboxitem.html#pixmap +"QListBoxItem::prev" qlistboxitem.html#prev +"QListBoxItem::rtti" qlistboxitem.html#rtti +"QListBoxItem::setCustomHighlighting" qlistboxitem.html#setCustomHighlighting +"QListBoxItem::setSelectable" qlistboxitem.html#setSelectable +"QListBoxItem::setText" qlistboxitem.html#setText +"QListBoxItem::text" qlistboxitem.html#text +"QListBoxItem::width" qlistboxitem.html#width +"QListBoxItem::~QListBoxItem" qlistboxitem.html#~QListBoxItem +"QListBoxPixmap" qlistboxpixmap.html +"QListBoxPixmap::height" qlistboxpixmap.html#height +"QListBoxPixmap::paint" qlistboxpixmap.html#paint +"QListBoxPixmap::pixmap" qlistboxpixmap.html#pixmap +"QListBoxPixmap::width" qlistboxpixmap.html#width +"QListBoxPixmap::~QListBoxPixmap" qlistboxpixmap.html#~QListBoxPixmap +"QListBoxText" qlistboxtext.html +"QListBoxText::height" qlistboxtext.html#height +"QListBoxText::paint" qlistboxtext.html#paint +"QListBoxText::width" qlistboxtext.html#width +"QListBoxText::~QListBoxText" qlistboxtext.html#~QListBoxText +"QListIterator Class Reference (obsolete)" qlistiterator.html +"QListView" qlistview.html +"QListView::RenameAction" qlistview.html#RenameAction +"QListView::ResizeMode" qlistview.html#ResizeMode +"QListView::SelectionMode" qlistview.html#SelectionMode +"QListView::WidthMode" qlistview.html#WidthMode +"QListView::addColumn" qlistview.html#addColumn +"QListView::adjustColumn" qlistview.html#adjustColumn +"QListView::allColumnsShowFocus" qlistview.html#allColumnsShowFocus +"QListView::allColumnsShowFocus" qlistview.html#allColumnsShowFocus-prop +"QListView::changeSortColumn" qlistview.html#changeSortColumn +"QListView::childCount" qlistview.html#childCount +"QListView::childCount" qlistview.html#childCount-prop +"QListView::clear" qlistview.html#clear +"QListView::clearSelection" qlistview.html#clearSelection +"QListView::clicked" qlistview.html#clicked +"QListView::collapsed" qlistview.html#collapsed +"QListView::columnAlignment" qlistview.html#columnAlignment +"QListView::columnText" qlistview.html#columnText +"QListView::columnWidth" qlistview.html#columnWidth +"QListView::columnWidthMode" qlistview.html#columnWidthMode +"QListView::columns" qlistview.html#columns +"QListView::columns" qlistview.html#columns-prop +"QListView::contentsMouseDoubleClickEvent" qlistview.html#contentsMouseDoubleClickEvent +"QListView::contentsMouseMoveEvent" qlistview.html#contentsMouseMoveEvent +"QListView::contentsMousePressEvent" qlistview.html#contentsMousePressEvent +"QListView::contentsMouseReleaseEvent" qlistview.html#contentsMouseReleaseEvent +"QListView::contextMenuRequested" qlistview.html#contextMenuRequested +"QListView::currentChanged" qlistview.html#currentChanged +"QListView::currentItem" qlistview.html#currentItem +"QListView::defaultRenameAction" qlistview.html#defaultRenameAction +"QListView::defaultRenameAction" qlistview.html#defaultRenameAction-prop +"QListView::doAutoScroll" qlistview.html#doAutoScroll +"QListView::doubleClicked" qlistview.html#doubleClicked +"QListView::dragObject" qlistview.html#dragObject +"QListView::drawContentsOffset" qlistview.html#drawContentsOffset +"QListView::dropped" qlistview.html#dropped +"QListView::ensureItemVisible" qlistview.html#ensureItemVisible +"QListView::eventFilter" qlistview.html#eventFilter +"QListView::expanded" qlistview.html#expanded +"QListView::findItem" qlistview.html#findItem +"QListView::firstChild" qlistview.html#firstChild +"QListView::handleSizeChange" qlistview.html#handleSizeChange +"QListView::header" qlistview.html#header +"QListView::hideColumn" qlistview.html#hideColumn +"QListView::insertItem" qlistview.html#insertItem +"QListView::invertSelection" qlistview.html#invertSelection +"QListView::isOpen" qlistview.html#isOpen +"QListView::isRenaming" qlistview.html#isRenaming +"QListView::isSelected" qlistview.html#isSelected +"QListView::itemAt" qlistview.html#itemAt +"QListView::itemMargin" qlistview.html#itemMargin +"QListView::itemMargin" qlistview.html#itemMargin-prop +"QListView::itemPos" qlistview.html#itemPos +"QListView::itemRect" qlistview.html#itemRect +"QListView::itemRenamed" qlistview.html#itemRenamed +"QListView::lastItem" qlistview.html#lastItem +"QListView::mouseButtonClicked" qlistview.html#mouseButtonClicked +"QListView::mouseButtonPressed" qlistview.html#mouseButtonPressed +"QListView::onItem" qlistview.html#onItem +"QListView::onViewport" qlistview.html#onViewport +"QListView::paintEmptyArea" qlistview.html#paintEmptyArea +"QListView::pressed" qlistview.html#pressed +"QListView::reconfigureItems" qlistview.html#reconfigureItems +"QListView::removeColumn" qlistview.html#removeColumn +"QListView::repaintItem" qlistview.html#repaintItem +"QListView::resizeEvent" qlistview.html#resizeEvent +"QListView::resizeMode" qlistview.html#resizeMode +"QListView::resizeMode" qlistview.html#resizeMode-prop +"QListView::returnPressed" qlistview.html#returnPressed +"QListView::rightButtonClicked" qlistview.html#rightButtonClicked +"QListView::rightButtonPressed" qlistview.html#rightButtonPressed +"QListView::rootIsDecorated" qlistview.html#rootIsDecorated +"QListView::rootIsDecorated" qlistview.html#rootIsDecorated-prop +"QListView::selectAll" qlistview.html#selectAll +"QListView::selectedItem" qlistview.html#selectedItem +"QListView::selectionChanged" qlistview.html#selectionChanged +"QListView::selectionMode" qlistview.html#selectionMode +"QListView::selectionMode" qlistview.html#selectionMode-prop +"QListView::setAllColumnsShowFocus" qlistview.html#setAllColumnsShowFocus +"QListView::setColumnAlignment" qlistview.html#setColumnAlignment +"QListView::setColumnText" qlistview.html#setColumnText +"QListView::setColumnWidth" qlistview.html#setColumnWidth +"QListView::setColumnWidthMode" qlistview.html#setColumnWidthMode +"QListView::setCurrentItem" qlistview.html#setCurrentItem +"QListView::setDefaultRenameAction" qlistview.html#setDefaultRenameAction +"QListView::setItemMargin" qlistview.html#setItemMargin +"QListView::setOpen" qlistview.html#setOpen +"QListView::setResizeMode" qlistview.html#setResizeMode +"QListView::setRootIsDecorated" qlistview.html#setRootIsDecorated +"QListView::setSelected" qlistview.html#setSelected +"QListView::setSelectionAnchor" qlistview.html#setSelectionAnchor +"QListView::setSelectionMode" qlistview.html#setSelectionMode +"QListView::setShowSortIndicator" qlistview.html#setShowSortIndicator +"QListView::setShowToolTips" qlistview.html#setShowToolTips +"QListView::setSortColumn" qlistview.html#setSortColumn +"QListView::setSortOrder" qlistview.html#setSortOrder +"QListView::setSorting" qlistview.html#setSorting +"QListView::setTreeStepSize" qlistview.html#setTreeStepSize +"QListView::showSortIndicator" qlistview.html#showSortIndicator +"QListView::showSortIndicator" qlistview.html#showSortIndicator-prop +"QListView::showToolTips" qlistview.html#showToolTips +"QListView::showToolTips" qlistview.html#showToolTips-prop +"QListView::sort" qlistview.html#sort +"QListView::sortColumn" qlistview.html#sortColumn +"QListView::sortOrder" qlistview.html#sortOrder +"QListView::spacePressed" qlistview.html#spacePressed +"QListView::startDrag" qlistview.html#startDrag +"QListView::takeItem" qlistview.html#takeItem +"QListView::treeStepSize" qlistview.html#treeStepSize +"QListView::treeStepSize" qlistview.html#treeStepSize-prop +"QListView::triggerUpdate" qlistview.html#triggerUpdate +"QListView::updateContents" qlistview.html#updateContents +"QListView::widthChanged" qlistview.html#widthChanged +"QListView::~QListView" qlistview.html#~QListView +"QListViewItem" qlistviewitem.html +"QListViewItem::acceptDrop" qlistviewitem.html#acceptDrop +"QListViewItem::activate" qlistviewitem.html#activate +"QListViewItem::activatedPos" qlistviewitem.html#activatedPos +"QListViewItem::cancelRename" qlistviewitem.html#cancelRename +"QListViewItem::childCount" qlistviewitem.html#childCount +"QListViewItem::compare" qlistviewitem.html#compare +"QListViewItem::depth" qlistviewitem.html#depth +"QListViewItem::dragEnabled" qlistviewitem.html#dragEnabled +"QListViewItem::dragEntered" qlistviewitem.html#dragEntered +"QListViewItem::dragLeft" qlistviewitem.html#dragLeft +"QListViewItem::dropEnabled" qlistviewitem.html#dropEnabled +"QListViewItem::dropped" qlistviewitem.html#dropped +"QListViewItem::enforceSortOrder" qlistviewitem.html#enforceSortOrder +"QListViewItem::firstChild" qlistviewitem.html#firstChild +"QListViewItem::height" qlistviewitem.html#height +"QListViewItem::insertItem" qlistviewitem.html#insertItem +"QListViewItem::invalidateHeight" qlistviewitem.html#invalidateHeight +"QListViewItem::isEnabled" qlistviewitem.html#isEnabled +"QListViewItem::isExpandable" qlistviewitem.html#isExpandable +"QListViewItem::isOpen" qlistviewitem.html#isOpen +"QListViewItem::isSelectable" qlistviewitem.html#isSelectable +"QListViewItem::isSelected" qlistviewitem.html#isSelected +"QListViewItem::isVisible" qlistviewitem.html#isVisible +"QListViewItem::itemAbove" qlistviewitem.html#itemAbove +"QListViewItem::itemBelow" qlistviewitem.html#itemBelow +"QListViewItem::itemPos" qlistviewitem.html#itemPos +"QListViewItem::key" qlistviewitem.html#key +"QListViewItem::listView" qlistviewitem.html#listView +"QListViewItem::moveItem" qlistviewitem.html#moveItem +"QListViewItem::multiLinesEnabled" qlistviewitem.html#multiLinesEnabled +"QListViewItem::nextSibling" qlistviewitem.html#nextSibling +"QListViewItem::okRename" qlistviewitem.html#okRename +"QListViewItem::paintBranches" qlistviewitem.html#paintBranches +"QListViewItem::paintCell" qlistviewitem.html#paintCell +"QListViewItem::paintFocus" qlistviewitem.html#paintFocus +"QListViewItem::parent" qlistviewitem.html#parent +"QListViewItem::pixmap" qlistviewitem.html#pixmap +"QListViewItem::removeRenameBox" qlistviewitem.html#removeRenameBox +"QListViewItem::renameEnabled" qlistviewitem.html#renameEnabled +"QListViewItem::repaint" qlistviewitem.html#repaint +"QListViewItem::rtti" qlistviewitem.html#rtti +"QListViewItem::setDragEnabled" qlistviewitem.html#setDragEnabled +"QListViewItem::setDropEnabled" qlistviewitem.html#setDropEnabled +"QListViewItem::setEnabled" qlistviewitem.html#setEnabled +"QListViewItem::setExpandable" qlistviewitem.html#setExpandable +"QListViewItem::setHeight" qlistviewitem.html#setHeight +"QListViewItem::setMultiLinesEnabled" qlistviewitem.html#setMultiLinesEnabled +"QListViewItem::setOpen" qlistviewitem.html#setOpen +"QListViewItem::setPixmap" qlistviewitem.html#setPixmap +"QListViewItem::setRenameEnabled" qlistviewitem.html#setRenameEnabled +"QListViewItem::setSelectable" qlistviewitem.html#setSelectable +"QListViewItem::setSelected" qlistviewitem.html#setSelected +"QListViewItem::setText" qlistviewitem.html#setText +"QListViewItem::setVisible" qlistviewitem.html#setVisible +"QListViewItem::setup" qlistviewitem.html#setup +"QListViewItem::sort" qlistviewitem.html#sort +"QListViewItem::sortChildItems" qlistviewitem.html#sortChildItems +"QListViewItem::startRename" qlistviewitem.html#startRename +"QListViewItem::takeItem" qlistviewitem.html#takeItem +"QListViewItem::text" qlistviewitem.html#text +"QListViewItem::totalHeight" qlistviewitem.html#totalHeight +"QListViewItem::width" qlistviewitem.html#width +"QListViewItem::widthChanged" qlistviewitem.html#widthChanged +"QListViewItem::~QListViewItem" qlistviewitem.html#~QListViewItem +"QListViewItemIterator" qlistviewitemiterator.html +"QListViewItemIterator::IteratorFlag" qlistviewitemiterator.html#IteratorFlag +"QListViewItemIterator::current" qlistviewitemiterator.html#current +"QListViewItemIterator::operator*" qlistviewitemiterator.html#operator* +"QListViewItemIterator::operator++" qlistviewitemiterator.html#operator++ +"QListViewItemIterator::operator+=" qlistviewitemiterator.html#operator+-eq +"QListViewItemIterator::operator--" qlistviewitemiterator.html#operator-- +"QListViewItemIterator::operator-=" qlistviewitemiterator.html#operator--eq +"QListViewItemIterator::operator=" qlistviewitemiterator.html#operator-eq +"QListViewItemIterator::~QListViewItemIterator" qlistviewitemiterator.html#~QListViewItemIterator +"QLocalFs" qlocalfs.html +"QLocale" qlocale.html +"QLocale::Country" qlocale.html#Country +"QLocale::Language" qlocale.html#Language +"QLocale::c" qlocale.html#c +"QLocale::country" qlocale.html#country +"QLocale::countryToString" qlocale.html#countryToString +"QLocale::language" qlocale.html#language +"QLocale::languageToString" qlocale.html#languageToString +"QLocale::name" qlocale.html#name +"QLocale::operator=" qlocale.html#operator-eq +"QLocale::setDefault" qlocale.html#setDefault +"QLocale::system" qlocale.html#system +"QLocale::toDouble" qlocale.html#toDouble +"QLocale::toFloat" qlocale.html#toFloat +"QLocale::toInt" qlocale.html#toInt +"QLocale::toLong" qlocale.html#toLong +"QLocale::toLongLong" qlocale.html#toLongLong +"QLocale::toShort" qlocale.html#toShort +"QLocale::toString" qlocale.html#toString +"QLocale::toUInt" qlocale.html#toUInt +"QLocale::toULong" qlocale.html#toULong +"QLocale::toULongLong" qlocale.html#toULongLong +"QLocale::toUShort" qlocale.html#toUShort +"QLock::Type" qlock.html#Type +"QLock::isValid" qlock.html#isValid +"QLock::lock" qlock.html#lock +"QLock::locked" qlock.html#locked +"QLock::unlock" qlock.html#unlock +"QLock::~QLock" qlock.html#~QLock +"QMacMime" qmacmime.html +"QMacMime::all" qmacmime.html#all +"QMacMime::canConvert" qmacmime.html#canConvert +"QMacMime::convertFromMime" qmacmime.html#convertFromMime +"QMacMime::convertToMime" qmacmime.html#convertToMime +"QMacMime::convertor" qmacmime.html#convertor +"QMacMime::convertorName" qmacmime.html#convertorName +"QMacMime::countFlavors" qmacmime.html#countFlavors +"QMacMime::flavor" qmacmime.html#flavor +"QMacMime::flavorFor" qmacmime.html#flavorFor +"QMacMime::flavorToMime" qmacmime.html#flavorToMime +"QMacMime::mimeFor" qmacmime.html#mimeFor +"QMacMime::~QMacMime" qmacmime.html#~QMacMime +"QMacStyle" qmacstyle.html +"QMacStyle::FocusRectPolicy" qmacstyle.html#FocusRectPolicy +"QMacStyle::WidgetSizePolicy" qmacstyle.html#WidgetSizePolicy +"QMacStyle::focusRectPolicy" qmacstyle.html#focusRectPolicy +"QMacStyle::setFocusRectPolicy" qmacstyle.html#setFocusRectPolicy +"QMacStyle::setWidgetSizePolicy" qmacstyle.html#setWidgetSizePolicy +"QMacStyle::widgetSizePolicy" qmacstyle.html#widgetSizePolicy +"QMacStyle::~QMacStyle" qmacstyle.html#~QMacStyle +"QMag" qmag-example.html +"QMainWindow" qmainwindow.html +"QMainWindow::DockWindows" qmainwindow.html#DockWindows +"QMainWindow::addDockWindow" qmainwindow.html#addDockWindow +"QMainWindow::appropriate" qmainwindow.html#appropriate +"QMainWindow::bottomDock" qmainwindow.html#bottomDock +"QMainWindow::centralWidget" qmainwindow.html#centralWidget +"QMainWindow::childEvent" qmainwindow.html#childEvent +"QMainWindow::createDockWindowMenu" qmainwindow.html#createDockWindowMenu +"QMainWindow::customize" qmainwindow.html#customize +"QMainWindow::dockWindowPositionChanged" qmainwindow.html#dockWindowPositionChanged +"QMainWindow::dockWindows" qmainwindow.html#dockWindows +"QMainWindow::dockWindowsMovable" qmainwindow.html#dockWindowsMovable +"QMainWindow::dockWindowsMovable" qmainwindow.html#dockWindowsMovable-prop +"QMainWindow::getLocation" qmainwindow.html#getLocation +"QMainWindow::hasDockWindow" qmainwindow.html#hasDockWindow +"QMainWindow::isCustomizable" qmainwindow.html#isCustomizable +"QMainWindow::isDockEnabled" qmainwindow.html#isDockEnabled +"QMainWindow::isDockMenuEnabled" qmainwindow.html#isDockMenuEnabled +"QMainWindow::leftDock" qmainwindow.html#leftDock +"QMainWindow::lineUpDockWindows" qmainwindow.html#lineUpDockWindows +"QMainWindow::menuAboutToShow" qmainwindow.html#menuAboutToShow +"QMainWindow::menuBar" qmainwindow.html#menuBar +"QMainWindow::moveDockWindow" qmainwindow.html#moveDockWindow +"QMainWindow::opaqueMoving" qmainwindow.html#opaqueMoving +"QMainWindow::opaqueMoving" qmainwindow.html#opaqueMoving-prop +"QMainWindow::pixmapSizeChanged" qmainwindow.html#pixmapSizeChanged +"QMainWindow::removeDockWindow" qmainwindow.html#removeDockWindow +"QMainWindow::rightDock" qmainwindow.html#rightDock +"QMainWindow::setAppropriate" qmainwindow.html#setAppropriate +"QMainWindow::setCentralWidget" qmainwindow.html#setCentralWidget +"QMainWindow::setDockEnabled" qmainwindow.html#setDockEnabled +"QMainWindow::setDockMenuEnabled" qmainwindow.html#setDockMenuEnabled +"QMainWindow::setDockWindowsMovable" qmainwindow.html#setDockWindowsMovable +"QMainWindow::setMenuBar" qmainwindow.html#setMenuBar +"QMainWindow::setOpaqueMoving" qmainwindow.html#setOpaqueMoving +"QMainWindow::setStatusBar" qmainwindow.html#setStatusBar +"QMainWindow::setToolTipGroup" qmainwindow.html#setToolTipGroup +"QMainWindow::setUpLayout" qmainwindow.html#setUpLayout +"QMainWindow::setUsesBigPixmaps" qmainwindow.html#setUsesBigPixmaps +"QMainWindow::setUsesTextLabel" qmainwindow.html#setUsesTextLabel +"QMainWindow::showDockMenu" qmainwindow.html#showDockMenu +"QMainWindow::statusBar" qmainwindow.html#statusBar +"QMainWindow::toolBars" qmainwindow.html#toolBars +"QMainWindow::toolTipGroup" qmainwindow.html#toolTipGroup +"QMainWindow::topDock" qmainwindow.html#topDock +"QMainWindow::usesBigPixmaps" qmainwindow.html#usesBigPixmaps +"QMainWindow::usesBigPixmaps" qmainwindow.html#usesBigPixmaps-prop +"QMainWindow::usesTextLabel" qmainwindow.html#usesTextLabel +"QMainWindow::usesTextLabel" qmainwindow.html#usesTextLabel-prop +"QMainWindow::usesTextLabelChanged" qmainwindow.html#usesTextLabelChanged +"QMainWindow::whatsThis" qmainwindow.html#whatsThis +"QMainWindow::~QMainWindow" qmainwindow.html#~QMainWindow +"QMap" qmap.html +"QMap::ConstIterator" qmap.html#ConstIterator +"QMap::Iterator" qmap.html#Iterator +"QMap::ValueType" qmap.html#ValueType +"QMap::begin" qmap.html#begin +"QMap::clear" qmap.html#clear +"QMap::constBegin" qmap.html#constBegin +"QMap::constEnd" qmap.html#constEnd +"QMap::const_iterator" qmap.html#const_iterator +"QMap::const_pointer" qmap.html#const_pointer +"QMap::const_reference" qmap.html#const_reference +"QMap::contains" qmap.html#contains +"QMap::count" qmap.html#count +"QMap::detach" qmap.html#detach +"QMap::empty" qmap.html#empty +"QMap::end" qmap.html#end +"QMap::erase" qmap.html#erase +"QMap::find" qmap.html#find +"QMap::insert" qmap.html#insert +"QMap::isEmpty" qmap.html#isEmpty +"QMap::iterator" qmap.html#iterator +"QMap::key_type" qmap.html#key_type +"QMap::keys" qmap.html#keys +"QMap::mapped_type" qmap.html#mapped_type +"QMap::operator=" qmap.html#operator-eq +"QMap::operator[]" qmap.html#operator[] +"QMap::pointer" qmap.html#pointer +"QMap::reference" qmap.html#reference +"QMap::remove" qmap.html#remove +"QMap::replace" qmap.html#replace +"QMap::size" qmap.html#size +"QMap::size_type" qmap.html#size_type +"QMap::value_type" qmap.html#value_type +"QMap::values" qmap.html#values +"QMap::~QMap" qmap.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 +"QMemArray" qmemarray.html +"QMemArray::ConstIterator" qmemarray.html#ConstIterator +"QMemArray::Iterator" qmemarray.html#Iterator +"QMemArray::assign" qmemarray.html#assign +"QMemArray::at" qmemarray.html#at +"QMemArray::begin" qmemarray.html#begin +"QMemArray::bsearch" qmemarray.html#bsearch +"QMemArray::contains" qmemarray.html#contains +"QMemArray::copy" qmemarray.html#copy +"QMemArray::count" qmemarray.html#count +"QMemArray::data" qmemarray.html#data +"QMemArray::detach" qmemarray.html#detach +"QMemArray::duplicate" qmemarray.html#duplicate +"QMemArray::end" qmemarray.html#end +"QMemArray::fill" qmemarray.html#fill +"QMemArray::find" qmemarray.html#find +"QMemArray::isEmpty" qmemarray.html#isEmpty +"QMemArray::isNull" qmemarray.html#isNull +"QMemArray::nrefs" qmemarray.html#nrefs +"QMemArray::operator const type *" qmemarray.html#operator-const-type-* +"QMemArray::operator!=" qmemarray.html#operator!-eq +"QMemArray::operator=" qmemarray.html#operator-eq +"QMemArray::operator==" qmemarray.html#operator-eq-eq +"QMemArray::operator[]" qmemarray.html#operator[] +"QMemArray::resetRawData" qmemarray.html#resetRawData +"QMemArray::resize" qmemarray.html#resize +"QMemArray::setRawData" qmemarray.html#setRawData +"QMemArray::size" qmemarray.html#size +"QMemArray::sort" qmemarray.html#sort +"QMemArray::truncate" qmemarray.html#truncate +"QMemArray::~QMemArray" qmemarray.html#~QMemArray +"QMenuBar" qmenubar.html +"QMenuBar::Separator" qmenubar.html#Separator +"QMenuBar::activated" qmenubar.html#activated +"QMenuBar::defaultUp" qmenubar.html#defaultUp-prop +"QMenuBar::drawContents" qmenubar.html#drawContents +"QMenuBar::heightForWidth" qmenubar.html#heightForWidth +"QMenuBar::hide" qmenubar.html#hide +"QMenuBar::highlighted" qmenubar.html#highlighted +"QMenuBar::isDefaultUp" qmenubar.html#isDefaultUp +"QMenuBar::menuContentsChanged" qmenubar.html#menuContentsChanged +"QMenuBar::menuStateChanged" qmenubar.html#menuStateChanged +"QMenuBar::setDefaultUp" qmenubar.html#setDefaultUp +"QMenuBar::setupAccelerators" qmenubar.html#setupAccelerators +"QMenuBar::show" qmenubar.html#show +"QMenuBar::~QMenuBar" qmenubar.html#~QMenuBar +"QMenuData" qmenudata.html +"QMenuData::accel" qmenudata.html#accel +"QMenuData::activateItemAt" qmenudata.html#activateItemAt +"QMenuData::changeItem" qmenudata.html#changeItem +"QMenuData::changeItemIconSet" qmenudata.html#changeItemIconSet +"QMenuData::clear" qmenudata.html#clear +"QMenuData::connectItem" qmenudata.html#connectItem +"QMenuData::count" qmenudata.html#count +"QMenuData::disconnectItem" qmenudata.html#disconnectItem +"QMenuData::findItem" qmenudata.html#findItem +"QMenuData::iconSet" qmenudata.html#iconSet +"QMenuData::idAt" qmenudata.html#idAt +"QMenuData::indexOf" qmenudata.html#indexOf +"QMenuData::insertItem" qmenudata.html#insertItem +"QMenuData::insertSeparator" qmenudata.html#insertSeparator +"QMenuData::isItemActive" qmenudata.html#isItemActive +"QMenuData::isItemChecked" qmenudata.html#isItemChecked +"QMenuData::isItemEnabled" qmenudata.html#isItemEnabled +"QMenuData::isItemVisible" qmenudata.html#isItemVisible +"QMenuData::itemParameter" qmenudata.html#itemParameter +"QMenuData::menuContentsChanged" qmenudata.html#menuContentsChanged +"QMenuData::menuDelPopup" qmenudata.html#menuDelPopup +"QMenuData::menuInsPopup" qmenudata.html#menuInsPopup +"QMenuData::menuStateChanged" qmenudata.html#menuStateChanged +"QMenuData::pixmap" qmenudata.html#pixmap +"QMenuData::removeItem" qmenudata.html#removeItem +"QMenuData::removeItemAt" qmenudata.html#removeItemAt +"QMenuData::setAccel" qmenudata.html#setAccel +"QMenuData::setId" qmenudata.html#setId +"QMenuData::setItemChecked" qmenudata.html#setItemChecked +"QMenuData::setItemEnabled" qmenudata.html#setItemEnabled +"QMenuData::setItemParameter" qmenudata.html#setItemParameter +"QMenuData::setItemVisible" qmenudata.html#setItemVisible +"QMenuData::setWhatsThis" qmenudata.html#setWhatsThis +"QMenuData::text" qmenudata.html#text +"QMenuData::updateItem" qmenudata.html#updateItem +"QMenuData::whatsThis" qmenudata.html#whatsThis +"QMenuData::~QMenuData" qmenudata.html#~QMenuData +"QMessageBox" qmessagebox.html +"QMessageBox::Icon" qmessagebox.html#Icon +"QMessageBox::about" qmessagebox.html#about +"QMessageBox::aboutQt" qmessagebox.html#aboutQt +"QMessageBox::adjustSize" qmessagebox.html#adjustSize +"QMessageBox::buttonText" qmessagebox.html#buttonText +"QMessageBox::critical" qmessagebox.html#critical +"QMessageBox::icon" qmessagebox.html#icon +"QMessageBox::icon" qmessagebox.html#icon-prop +"QMessageBox::iconPixmap" qmessagebox.html#iconPixmap +"QMessageBox::iconPixmap" qmessagebox.html#iconPixmap-prop +"QMessageBox::information" qmessagebox.html#information +"QMessageBox::question" qmessagebox.html#question +"QMessageBox::setButtonText" qmessagebox.html#setButtonText +"QMessageBox::setIcon" qmessagebox.html#setIcon +"QMessageBox::setIconPixmap" qmessagebox.html#setIconPixmap +"QMessageBox::setText" qmessagebox.html#setText +"QMessageBox::setTextFormat" qmessagebox.html#setTextFormat +"QMessageBox::standardIcon" qmessagebox.html#standardIcon +"QMessageBox::text" qmessagebox.html#text +"QMessageBox::text" qmessagebox.html#text-prop +"QMessageBox::textFormat" qmessagebox.html#textFormat +"QMessageBox::textFormat" qmessagebox.html#textFormat-prop +"QMessageBox::warning" qmessagebox.html#warning +"QMessageBox::~QMessageBox" qmessagebox.html#~QMessageBox +"QMetaObject" qmetaobject.html +"QMetaObject::classInfo" qmetaobject.html#classInfo +"QMetaObject::className" qmetaobject.html#className +"QMetaObject::findProperty" qmetaobject.html#findProperty +"QMetaObject::inherits" qmetaobject.html#inherits +"QMetaObject::numClassInfo" qmetaobject.html#numClassInfo +"QMetaObject::numProperties" qmetaobject.html#numProperties +"QMetaObject::numSignals" qmetaobject.html#numSignals +"QMetaObject::numSlots" qmetaobject.html#numSlots +"QMetaObject::property" qmetaobject.html#property +"QMetaObject::propertyNames" qmetaobject.html#propertyNames +"QMetaObject::signalNames" qmetaobject.html#signalNames +"QMetaObject::slotNames" qmetaobject.html#slotNames +"QMetaObject::superClass" qmetaobject.html#superClass +"QMetaObject::superClassName" qmetaobject.html#superClassName +"QMetaProperty" qmetaproperty.html +"QMetaProperty::designable" qmetaproperty.html#designable +"QMetaProperty::enumKeys" qmetaproperty.html#enumKeys +"QMetaProperty::isEnumType" qmetaproperty.html#isEnumType +"QMetaProperty::isSetType" qmetaproperty.html#isSetType +"QMetaProperty::keyToValue" qmetaproperty.html#keyToValue +"QMetaProperty::keysToValue" qmetaproperty.html#keysToValue +"QMetaProperty::name" qmetaproperty.html#name +"QMetaProperty::reset" qmetaproperty.html#reset +"QMetaProperty::scriptable" qmetaproperty.html#scriptable +"QMetaProperty::stored" qmetaproperty.html#stored +"QMetaProperty::type" qmetaproperty.html#type +"QMetaProperty::valueToKey" qmetaproperty.html#valueToKey +"QMetaProperty::valueToKeys" qmetaproperty.html#valueToKeys +"QMetaProperty::writable" qmetaproperty.html#writable +"QMimeSource" qmimesource.html +"QMimeSource::encodedData" qmimesource.html#encodedData +"QMimeSource::format" qmimesource.html#format +"QMimeSource::provides" qmimesource.html#provides +"QMimeSource::serialNumber" qmimesource.html#serialNumber +"QMimeSource::~QMimeSource" qmimesource.html#~QMimeSource +"QMimeSourceFactory" qmimesourcefactory.html +"QMimeSourceFactory::addFactory" qmimesourcefactory.html#addFactory +"QMimeSourceFactory::addFilePath" qmimesourcefactory.html#addFilePath +"QMimeSourceFactory::data" qmimesourcefactory.html#data +"QMimeSourceFactory::defaultFactory" qmimesourcefactory.html#defaultFactory +"QMimeSourceFactory::filePath" qmimesourcefactory.html#filePath +"QMimeSourceFactory::makeAbsolute" qmimesourcefactory.html#makeAbsolute +"QMimeSourceFactory::removeFactory" qmimesourcefactory.html#removeFactory +"QMimeSourceFactory::setData" qmimesourcefactory.html#setData +"QMimeSourceFactory::setDefaultFactory" qmimesourcefactory.html#setDefaultFactory +"QMimeSourceFactory::setExtensionType" qmimesourcefactory.html#setExtensionType +"QMimeSourceFactory::setFilePath" qmimesourcefactory.html#setFilePath +"QMimeSourceFactory::setImage" qmimesourcefactory.html#setImage +"QMimeSourceFactory::setPixmap" qmimesourcefactory.html#setPixmap +"QMimeSourceFactory::setText" qmimesourcefactory.html#setText +"QMimeSourceFactory::takeDefaultFactory" qmimesourcefactory.html#takeDefaultFactory +"QMimeSourceFactory::~QMimeSourceFactory" qmimesourcefactory.html#~QMimeSourceFactory +"QMotif" qmotif.html +"QMotif::applicationContext" qmotif.html#applicationContext +"QMotif::x11Display" qmotif.html#x11Display +"QMotif::~QMotif" qmotif.html#~QMotif +"QMotifDialog" qmotifdialog.html +"QMotifDialog::acceptCallback" qmotifdialog.html#acceptCallback +"QMotifDialog::dialog" qmotifdialog.html#dialog +"QMotifDialog::rejectCallback" qmotifdialog.html#rejectCallback +"QMotifDialog::shell" qmotifdialog.html#shell +"QMotifDialog::~QMotifDialog" qmotifdialog.html#~QMotifDialog +"QMotifPlusStyle" qmotifplusstyle.html +"QMotifStyle" qmotifstyle.html +"QMotifStyle::setUseHighlightColors" qmotifstyle.html#setUseHighlightColors +"QMotifStyle::useHighlightColors" qmotifstyle.html#useHighlightColors +"QMotifWidget" qmotifwidget.html +"QMotifWidget::motifWidget" qmotifwidget.html#motifWidget +"QMotifWidget::~QMotifWidget" qmotifwidget.html#~QMotifWidget +"QMouseDriverFactory" qmousedriverfactory.html +"QMouseDriverFactory::create" qmousedriverfactory.html#create +"QMouseDriverFactory::keys" qmousedriverfactory.html#keys +"QMouseDriverPlugin" qmousedriverplugin.html +"QMouseDriverPlugin::create" qmousedriverplugin.html#create +"QMouseDriverPlugin::keys" qmousedriverplugin.html#keys +"QMouseDriverPlugin::~QMouseDriverPlugin" qmousedriverplugin.html#~QMouseDriverPlugin +"QMouseEvent" qmouseevent.html +"QMouseEvent::accept" qmouseevent.html#accept +"QMouseEvent::button" qmouseevent.html#button +"QMouseEvent::globalPos" qmouseevent.html#globalPos +"QMouseEvent::globalX" qmouseevent.html#globalX +"QMouseEvent::globalY" qmouseevent.html#globalY +"QMouseEvent::ignore" qmouseevent.html#ignore +"QMouseEvent::isAccepted" qmouseevent.html#isAccepted +"QMouseEvent::pos" qmouseevent.html#pos +"QMouseEvent::state" qmouseevent.html#state +"QMouseEvent::stateAfter" qmouseevent.html#stateAfter +"QMouseEvent::x" qmouseevent.html#x +"QMouseEvent::y" qmouseevent.html#y +"QMoveEvent" qmoveevent.html +"QMoveEvent::oldPos" qmoveevent.html#oldPos +"QMoveEvent::pos" qmoveevent.html#pos +"QMovie" qmovie.html +"QMovie::Status" qmovie.html#Status +"QMovie::backgroundColor" qmovie.html#backgroundColor +"QMovie::connectResize" qmovie.html#connectResize +"QMovie::connectStatus" qmovie.html#connectStatus +"QMovie::connectUpdate" qmovie.html#connectUpdate +"QMovie::disconnectResize" qmovie.html#disconnectResize +"QMovie::disconnectStatus" qmovie.html#disconnectStatus +"QMovie::disconnectUpdate" qmovie.html#disconnectUpdate +"QMovie::finished" qmovie.html#finished +"QMovie::frameImage" qmovie.html#frameImage +"QMovie::frameNumber" qmovie.html#frameNumber +"QMovie::framePixmap" qmovie.html#framePixmap +"QMovie::getValidRect" qmovie.html#getValidRect +"QMovie::isNull" qmovie.html#isNull +"QMovie::operator=" qmovie.html#operator-eq +"QMovie::pause" qmovie.html#pause +"QMovie::paused" qmovie.html#paused +"QMovie::pushData" qmovie.html#pushData +"QMovie::pushSpace" qmovie.html#pushSpace +"QMovie::restart" qmovie.html#restart +"QMovie::running" qmovie.html#running +"QMovie::setBackgroundColor" qmovie.html#setBackgroundColor +"QMovie::setSpeed" qmovie.html#setSpeed +"QMovie::speed" qmovie.html#speed +"QMovie::step" qmovie.html#step +"QMovie::steps" qmovie.html#steps +"QMovie::unpause" qmovie.html#unpause +"QMovie::~QMovie" qmovie.html#~QMovie +"QMultiLineEdit::alignment" qmultilineedit.html#alignment +"QMultiLineEdit::alignment" qmultilineedit.html#alignment-prop +"QMultiLineEdit::atBeginning" qmultilineedit.html#atBeginning +"QMultiLineEdit::atBeginning" qmultilineedit.html#atBeginning-prop +"QMultiLineEdit::atEnd" qmultilineedit.html#atEnd +"QMultiLineEdit::atEnd" qmultilineedit.html#atEnd-prop +"QMultiLineEdit::backspace" qmultilineedit.html#backspace +"QMultiLineEdit::cursorDown" qmultilineedit.html#cursorDown +"QMultiLineEdit::cursorLeft" qmultilineedit.html#cursorLeft +"QMultiLineEdit::cursorPoint" qmultilineedit.html#cursorPoint +"QMultiLineEdit::cursorRight" qmultilineedit.html#cursorRight +"QMultiLineEdit::cursorUp" qmultilineedit.html#cursorUp +"QMultiLineEdit::cursorWordBackward" qmultilineedit.html#cursorWordBackward +"QMultiLineEdit::cursorWordForward" qmultilineedit.html#cursorWordForward +"QMultiLineEdit::edited" qmultilineedit.html#edited +"QMultiLineEdit::edited" qmultilineedit.html#edited-prop +"QMultiLineEdit::end" qmultilineedit.html#end +"QMultiLineEdit::getMarkedRegion" qmultilineedit.html#getMarkedRegion +"QMultiLineEdit::hasMarkedText" qmultilineedit.html#hasMarkedText +"QMultiLineEdit::home" qmultilineedit.html#home +"QMultiLineEdit::insertAndMark" qmultilineedit.html#insertAndMark +"QMultiLineEdit::insertAt" qmultilineedit.html#insertAt +"QMultiLineEdit::insertLine" qmultilineedit.html#insertLine +"QMultiLineEdit::killLine" qmultilineedit.html#killLine +"QMultiLineEdit::lineLength" qmultilineedit.html#lineLength +"QMultiLineEdit::markedText" qmultilineedit.html#markedText +"QMultiLineEdit::newLine" qmultilineedit.html#newLine +"QMultiLineEdit::numLines" qmultilineedit.html#numLines +"QMultiLineEdit::numLines" qmultilineedit.html#numLines-prop +"QMultiLineEdit::pageDown" qmultilineedit.html#pageDown +"QMultiLineEdit::pageUp" qmultilineedit.html#pageUp +"QMultiLineEdit::removeLine" qmultilineedit.html#removeLine +"QMultiLineEdit::setAlignment" qmultilineedit.html#setAlignment +"QMultiLineEdit::setCursorPosition" qmultilineedit.html#setCursorPosition +"QMultiLineEdit::setEdited" qmultilineedit.html#setEdited +"QMultiLineEdit::textLine" qmultilineedit.html#textLine +"QMutex" qmutex.html +"QMutex::lock" qmutex.html#lock +"QMutex::locked" qmutex.html#locked +"QMutex::tryLock" qmutex.html#tryLock +"QMutex::unlock" qmutex.html#unlock +"QMutex::~QMutex" qmutex.html#~QMutex +"QMutexLocker" qmutexlocker.html +"QMutexLocker::mutex" qmutexlocker.html#mutex +"QMutexLocker::~QMutexLocker" qmutexlocker.html#~QMutexLocker +"QMutexPool::get" qmutexpool.html#get +"QMutexPool::~QMutexPool" qmutexpool.html#~QMutexPool +"QNPInstance" qnpinstance.html +"QNPInstance::InstanceMode" qnpinstance.html#InstanceMode +"QNPInstance::Reason" qnpinstance.html#Reason +"QNPInstance::StreamMode" qnpinstance.html#StreamMode +"QNPInstance::arg" qnpinstance.html#arg +"QNPInstance::argc" qnpinstance.html#argc +"QNPInstance::argn" qnpinstance.html#argn +"QNPInstance::argv" qnpinstance.html#argv +"QNPInstance::getJavaPeer" qnpinstance.html#getJavaPeer +"QNPInstance::getURL" qnpinstance.html#getURL +"QNPInstance::getURLNotify" qnpinstance.html#getURLNotify +"QNPInstance::mode" qnpinstance.html#mode +"QNPInstance::newStream" qnpinstance.html#newStream +"QNPInstance::newStreamCreated" qnpinstance.html#newStreamCreated +"QNPInstance::newWindow" qnpinstance.html#newWindow +"QNPInstance::notifyURL" qnpinstance.html#notifyURL +"QNPInstance::postURL" qnpinstance.html#postURL +"QNPInstance::print" qnpinstance.html#print +"QNPInstance::printFullPage" qnpinstance.html#printFullPage +"QNPInstance::status" qnpinstance.html#status +"QNPInstance::streamAsFile" qnpinstance.html#streamAsFile +"QNPInstance::streamDestroyed" qnpinstance.html#streamDestroyed +"QNPInstance::userAgent" qnpinstance.html#userAgent +"QNPInstance::widget" qnpinstance.html#widget +"QNPInstance::write" qnpinstance.html#write +"QNPInstance::writeReady" qnpinstance.html#writeReady +"QNPInstance::~QNPInstance" qnpinstance.html#~QNPInstance +"QNPStream" qnpstream.html +"QNPStream::complete" qnpstream.html#complete +"QNPStream::end" qnpstream.html#end +"QNPStream::instance" qnpstream.html#instance +"QNPStream::lastModified" qnpstream.html#lastModified +"QNPStream::okay" qnpstream.html#okay +"QNPStream::requestRead" qnpstream.html#requestRead +"QNPStream::seekable" qnpstream.html#seekable +"QNPStream::type" qnpstream.html#type +"QNPStream::url" qnpstream.html#url +"QNPStream::write" qnpstream.html#write +"QNPStream::~QNPStream" qnpstream.html#~QNPStream +"QNPWidget" qnpwidget.html +"QNPWidget::enterInstance" qnpwidget.html#enterInstance +"QNPWidget::instance" qnpwidget.html#instance +"QNPWidget::leaveInstance" qnpwidget.html#leaveInstance +"QNPWidget::~QNPWidget" qnpwidget.html#~QNPWidget +"QNPlugin" qnplugin.html +"QNPlugin::actual" qnplugin.html#actual +"QNPlugin::create" qnplugin.html#create +"QNPlugin::getJavaClass" qnplugin.html#getJavaClass +"QNPlugin::getJavaEnv" qnplugin.html#getJavaEnv +"QNPlugin::getMIMEDescription" qnplugin.html#getMIMEDescription +"QNPlugin::getPluginDescriptionString" qnplugin.html#getPluginDescriptionString +"QNPlugin::getPluginNameString" qnplugin.html#getPluginNameString +"QNPlugin::getVersionInfo" qnplugin.html#getVersionInfo +"QNPlugin::newInstance" qnplugin.html#newInstance +"QNPlugin::unuseJavaClass" qnplugin.html#unuseJavaClass +"QNPlugin::~QNPlugin" qnplugin.html#~QNPlugin +"QNetworkOperation" qnetworkoperation.html +"QNetworkOperation::arg" qnetworkoperation.html#arg +"QNetworkOperation::errorCode" qnetworkoperation.html#errorCode +"QNetworkOperation::free" qnetworkoperation.html#free +"QNetworkOperation::operation" qnetworkoperation.html#operation +"QNetworkOperation::protocolDetail" qnetworkoperation.html#protocolDetail +"QNetworkOperation::rawArg" qnetworkoperation.html#rawArg +"QNetworkOperation::setArg" qnetworkoperation.html#setArg +"QNetworkOperation::setErrorCode" qnetworkoperation.html#setErrorCode +"QNetworkOperation::setProtocolDetail" qnetworkoperation.html#setProtocolDetail +"QNetworkOperation::setRawArg" qnetworkoperation.html#setRawArg +"QNetworkOperation::setState" qnetworkoperation.html#setState +"QNetworkOperation::state" qnetworkoperation.html#state +"QNetworkOperation::~QNetworkOperation" qnetworkoperation.html#~QNetworkOperation +"QNetworkProtocol" qnetworkprotocol.html +"QNetworkProtocol::ConnectionState" qnetworkprotocol.html#ConnectionState +"QNetworkProtocol::Error" qnetworkprotocol.html#Error +"QNetworkProtocol::Operation" qnetworkprotocol.html#Operation +"QNetworkProtocol::State" qnetworkprotocol.html#State +"QNetworkProtocol::addOperation" qnetworkprotocol.html#addOperation +"QNetworkProtocol::autoDelete" qnetworkprotocol.html#autoDelete +"QNetworkProtocol::checkConnection" qnetworkprotocol.html#checkConnection +"QNetworkProtocol::clearOperationQueue" qnetworkprotocol.html#clearOperationQueue +"QNetworkProtocol::connectionStateChanged" qnetworkprotocol.html#connectionStateChanged +"QNetworkProtocol::createdDirectory" qnetworkprotocol.html#createdDirectory +"QNetworkProtocol::data" qnetworkprotocol.html#data +"QNetworkProtocol::dataTransferProgress" qnetworkprotocol.html#dataTransferProgress +"QNetworkProtocol::finished" qnetworkprotocol.html#finished +"QNetworkProtocol::getNetworkProtocol" qnetworkprotocol.html#getNetworkProtocol +"QNetworkProtocol::hasOnlyLocalFileSystem" qnetworkprotocol.html#hasOnlyLocalFileSystem +"QNetworkProtocol::itemChanged" qnetworkprotocol.html#itemChanged +"QNetworkProtocol::newChild" qnetworkprotocol.html#newChild +"QNetworkProtocol::newChildren" qnetworkprotocol.html#newChildren +"QNetworkProtocol::operationGet" qnetworkprotocol.html#operationGet +"QNetworkProtocol::operationInProgress" qnetworkprotocol.html#operationInProgress +"QNetworkProtocol::operationListChildren" qnetworkprotocol.html#operationListChildren +"QNetworkProtocol::operationMkDir" qnetworkprotocol.html#operationMkDir +"QNetworkProtocol::operationPut" qnetworkprotocol.html#operationPut +"QNetworkProtocol::operationRemove" qnetworkprotocol.html#operationRemove +"QNetworkProtocol::operationRename" qnetworkprotocol.html#operationRename +"QNetworkProtocol::registerNetworkProtocol" qnetworkprotocol.html#registerNetworkProtocol +"QNetworkProtocol::removed" qnetworkprotocol.html#removed +"QNetworkProtocol::setAutoDelete" qnetworkprotocol.html#setAutoDelete +"QNetworkProtocol::setUrl" qnetworkprotocol.html#setUrl +"QNetworkProtocol::start" qnetworkprotocol.html#start +"QNetworkProtocol::stop" qnetworkprotocol.html#stop +"QNetworkProtocol::supportedOperations" qnetworkprotocol.html#supportedOperations +"QNetworkProtocol::url" qnetworkprotocol.html#url +"QNetworkProtocol::~QNetworkProtocol" qnetworkprotocol.html#~QNetworkProtocol +"QObject" qobject.html +"QObject::activate_signal" qobject.html#activate_signal +"QObject::blockSignals" qobject.html#blockSignals +"QObject::checkConnectArgs" qobject.html#checkConnectArgs +"QObject::child" qobject.html#child +"QObject::childEvent" qobject.html#childEvent +"QObject::children" qobject.html#children +"QObject::className" qobject.html#className +"QObject::cleanupEventFilter" qobject.html#cleanupEventFilter +"QObject::connect" qobject.html#connect +"QObject::connectNotify" qobject.html#connectNotify +"QObject::customEvent" qobject.html#customEvent +"QObject::deleteLater" qobject.html#deleteLater +"QObject::destroyed" qobject.html#destroyed +"QObject::disconnect" qobject.html#disconnect +"QObject::disconnectNotify" qobject.html#disconnectNotify +"QObject::dumpObjectInfo" qobject.html#dumpObjectInfo +"QObject::dumpObjectTree" qobject.html#dumpObjectTree +"QObject::event" qobject.html#event +"QObject::eventFilter" qobject.html#eventFilter +"QObject::highPriority" qobject.html#highPriority +"QObject::inherits" qobject.html#inherits +"QObject::insertChild" qobject.html#insertChild +"QObject::installEventFilter" qobject.html#installEventFilter +"QObject::isA" qobject.html#isA +"QObject::isWidgetType" qobject.html#isWidgetType +"QObject::killTimer" qobject.html#killTimer +"QObject::killTimers" qobject.html#killTimers +"QObject::metaObject" qobject.html#metaObject +"QObject::name" qobject.html#name +"QObject::name" qobject.html#name-prop +"QObject::normalizeSignalSlot" qobject.html#normalizeSignalSlot +"QObject::objectTrees" qobject.html#objectTrees +"QObject::parent" qobject.html#parent +"QObject::property" qobject.html#property +"QObject::queryList" qobject.html#queryList +"QObject::removeChild" qobject.html#removeChild +"QObject::removeEventFilter" qobject.html#removeEventFilter +"QObject::sender" qobject.html#sender +"QObject::setName" qobject.html#setName +"QObject::setProperty" qobject.html#setProperty +"QObject::signalsBlocked" qobject.html#signalsBlocked +"QObject::startTimer" qobject.html#startTimer +"QObject::timerEvent" qobject.html#timerEvent +"QObject::tr" qobject.html#tr +"QObject::trUtf8" qobject.html#trUtf8 +"QObject::~QObject" qobject.html#~QObject +"QObjectCleanupHandler" qobjectcleanuphandler.html +"QObjectCleanupHandler::add" qobjectcleanuphandler.html#add +"QObjectCleanupHandler::clear" qobjectcleanuphandler.html#clear +"QObjectCleanupHandler::isEmpty" qobjectcleanuphandler.html#isEmpty +"QObjectCleanupHandler::remove" qobjectcleanuphandler.html#remove +"QObjectCleanupHandler::~QObjectCleanupHandler" qobjectcleanuphandler.html#~QObjectCleanupHandler +"QObjectList" qobjectlist.html +"QObjectList::operator=" qobjectlist.html#operator-eq +"QObjectList::~QObjectList" qobjectlist.html#~QObjectList +"QObjectListIterator" qobjectlistiterator.html +"QObjectListIterator::operator=" qobjectlistiterator.html#operator-eq +"QPNGImagePacker" qpngimagepacker.html +"QPNGImagePacker::packImage" qpngimagepacker.html#packImage +"QPNGImagePacker::setPixelAlignment" qpngimagepacker.html#setPixelAlignment +"QPaintDevice" qpaintdevice.html +"QPaintDevice::cmd" qpaintdevice.html#cmd +"QPaintDevice::handle" qpaintdevice.html#handle +"QPaintDevice::isExtDev" qpaintdevice.html#isExtDev +"QPaintDevice::paintingActive" qpaintdevice.html#paintingActive +"QPaintDevice::x11AppCells" qpaintdevice.html#x11AppCells +"QPaintDevice::x11AppColormap" qpaintdevice.html#x11AppColormap +"QPaintDevice::x11AppDefaultColormap" qpaintdevice.html#x11AppDefaultColormap +"QPaintDevice::x11AppDefaultVisual" qpaintdevice.html#x11AppDefaultVisual +"QPaintDevice::x11AppDepth" qpaintdevice.html#x11AppDepth +"QPaintDevice::x11AppDisplay" qpaintdevice.html#x11AppDisplay +"QPaintDevice::x11AppDpiX" qpaintdevice.html#x11AppDpiX +"QPaintDevice::x11AppDpiY" qpaintdevice.html#x11AppDpiY +"QPaintDevice::x11AppRootWindow" qpaintdevice.html#x11AppRootWindow +"QPaintDevice::x11AppScreen" qpaintdevice.html#x11AppScreen +"QPaintDevice::x11AppVisual" qpaintdevice.html#x11AppVisual +"QPaintDevice::x11Cells" qpaintdevice.html#x11Cells +"QPaintDevice::x11Colormap" qpaintdevice.html#x11Colormap +"QPaintDevice::x11DefaultColormap" qpaintdevice.html#x11DefaultColormap +"QPaintDevice::x11DefaultVisual" qpaintdevice.html#x11DefaultVisual +"QPaintDevice::x11Depth" qpaintdevice.html#x11Depth +"QPaintDevice::x11Display" qpaintdevice.html#x11Display +"QPaintDevice::x11Screen" qpaintdevice.html#x11Screen +"QPaintDevice::x11SetAppDpiX" qpaintdevice.html#x11SetAppDpiX +"QPaintDevice::x11SetAppDpiY" qpaintdevice.html#x11SetAppDpiY +"QPaintDevice::x11Visual" qpaintdevice.html#x11Visual +"QPaintDevice::~QPaintDevice" qpaintdevice.html#~QPaintDevice +"QPaintDeviceMetrics" qpaintdevicemetrics.html +"QPaintDeviceMetrics::depth" qpaintdevicemetrics.html#depth +"QPaintDeviceMetrics::height" qpaintdevicemetrics.html#height +"QPaintDeviceMetrics::heightMM" qpaintdevicemetrics.html#heightMM +"QPaintDeviceMetrics::logicalDpiX" qpaintdevicemetrics.html#logicalDpiX +"QPaintDeviceMetrics::logicalDpiY" qpaintdevicemetrics.html#logicalDpiY +"QPaintDeviceMetrics::numColors" qpaintdevicemetrics.html#numColors +"QPaintDeviceMetrics::width" qpaintdevicemetrics.html#width +"QPaintDeviceMetrics::widthMM" qpaintdevicemetrics.html#widthMM +"QPaintEvent" qpaintevent.html +"QPaintEvent::erased" qpaintevent.html#erased +"QPaintEvent::rect" qpaintevent.html#rect +"QPaintEvent::region" qpaintevent.html#region +"QPainter" qpainter.html +"QPainter::CoordinateMode" qpainter.html#CoordinateMode +"QPainter::TextDirection" qpainter.html#TextDirection +"QPainter::backgroundColor" qpainter.html#backgroundColor +"QPainter::backgroundMode" qpainter.html#backgroundMode +"QPainter::begin" qpainter.html#begin +"QPainter::boundingRect" qpainter.html#boundingRect +"QPainter::brush" qpainter.html#brush +"QPainter::brushOrigin" qpainter.html#brushOrigin +"QPainter::clipRegion" qpainter.html#clipRegion +"QPainter::device" qpainter.html#device +"QPainter::drawArc" qpainter.html#drawArc +"QPainter::drawChord" qpainter.html#drawChord +"QPainter::drawConvexPolygon" qpainter.html#drawConvexPolygon +"QPainter::drawCubicBezier" qpainter.html#drawCubicBezier +"QPainter::drawEllipse" qpainter.html#drawEllipse +"QPainter::drawImage" qpainter.html#drawImage +"QPainter::drawLine" qpainter.html#drawLine +"QPainter::drawLineSegments" qpainter.html#drawLineSegments +"QPainter::drawPicture" qpainter.html#drawPicture +"QPainter::drawPie" qpainter.html#drawPie +"QPainter::drawPixmap" qpainter.html#drawPixmap +"QPainter::drawPoint" qpainter.html#drawPoint +"QPainter::drawPoints" qpainter.html#drawPoints +"QPainter::drawPolygon" qpainter.html#drawPolygon +"QPainter::drawPolyline" qpainter.html#drawPolyline +"QPainter::drawRect" qpainter.html#drawRect +"QPainter::drawRoundRect" qpainter.html#drawRoundRect +"QPainter::drawText" qpainter.html#drawText +"QPainter::drawTiledPixmap" qpainter.html#drawTiledPixmap +"QPainter::drawWinFocusRect" qpainter.html#drawWinFocusRect +"QPainter::end" qpainter.html#end +"QPainter::eraseRect" qpainter.html#eraseRect +"QPainter::fillRect" qpainter.html#fillRect +"QPainter::flush" qpainter.html#flush +"QPainter::font" qpainter.html#font +"QPainter::fontInfo" qpainter.html#fontInfo +"QPainter::fontMetrics" qpainter.html#fontMetrics +"QPainter::handle" qpainter.html#handle +"QPainter::hasClipping" qpainter.html#hasClipping +"QPainter::hasViewXForm" qpainter.html#hasViewXForm +"QPainter::hasWorldXForm" qpainter.html#hasWorldXForm +"QPainter::isActive" qpainter.html#isActive +"QPainter::lineTo" qpainter.html#lineTo +"QPainter::moveTo" qpainter.html#moveTo +"QPainter::pen" qpainter.html#pen +"QPainter::rasterOp" qpainter.html#rasterOp +"QPainter::redirect" qpainter.html#redirect +"QPainter::resetXForm" qpainter.html#resetXForm +"QPainter::restore" qpainter.html#restore +"QPainter::rotate" qpainter.html#rotate +"QPainter::save" qpainter.html#save +"QPainter::scale" qpainter.html#scale +"QPainter::setBackgroundColor" qpainter.html#setBackgroundColor +"QPainter::setBackgroundMode" qpainter.html#setBackgroundMode +"QPainter::setBrush" qpainter.html#setBrush +"QPainter::setBrushOrigin" qpainter.html#setBrushOrigin +"QPainter::setClipRect" qpainter.html#setClipRect +"QPainter::setClipRegion" qpainter.html#setClipRegion +"QPainter::setClipping" qpainter.html#setClipping +"QPainter::setFont" qpainter.html#setFont +"QPainter::setPen" qpainter.html#setPen +"QPainter::setRasterOp" qpainter.html#setRasterOp +"QPainter::setTabArray" qpainter.html#setTabArray +"QPainter::setTabStops" qpainter.html#setTabStops +"QPainter::setViewXForm" qpainter.html#setViewXForm +"QPainter::setViewport" qpainter.html#setViewport +"QPainter::setWindow" qpainter.html#setWindow +"QPainter::setWorldMatrix" qpainter.html#setWorldMatrix +"QPainter::setWorldXForm" qpainter.html#setWorldXForm +"QPainter::shear" qpainter.html#shear +"QPainter::tabArray" qpainter.html#tabArray +"QPainter::tabStops" qpainter.html#tabStops +"QPainter::translate" qpainter.html#translate +"QPainter::viewport" qpainter.html#viewport +"QPainter::window" qpainter.html#window +"QPainter::worldMatrix" qpainter.html#worldMatrix +"QPainter::xForm" qpainter.html#xForm +"QPainter::xFormDev" qpainter.html#xFormDev +"QPainter::~QPainter" qpainter.html#~QPainter +"QPair" qpair.html +"QPair::first_type" qpair.html#first_type +"QPair::second_type" qpair.html#second_type +"QPalette" qpalette.html +"QPalette::ColorGroup" qpalette.html#ColorGroup +"QPalette::active" qpalette.html#active +"QPalette::brush" qpalette.html#brush +"QPalette::color" qpalette.html#color +"QPalette::copy" qpalette.html#copy +"QPalette::detach" qpalette.html#detach +"QPalette::disabled" qpalette.html#disabled +"QPalette::inactive" qpalette.html#inactive +"QPalette::isCopyOf" qpalette.html#isCopyOf +"QPalette::operator!=" qpalette.html#operator!-eq +"QPalette::operator=" qpalette.html#operator-eq +"QPalette::operator==" qpalette.html#operator-eq-eq +"QPalette::serialNumber" qpalette.html#serialNumber +"QPalette::setActive" qpalette.html#setActive +"QPalette::setBrush" qpalette.html#setBrush +"QPalette::setColor" qpalette.html#setColor +"QPalette::setDisabled" qpalette.html#setDisabled +"QPalette::setInactive" qpalette.html#setInactive +"QPalette::~QPalette" qpalette.html#~QPalette +"QPen" qpen.html +"QPen::capStyle" qpen.html#capStyle +"QPen::color" qpen.html#color +"QPen::copy" qpen.html#copy +"QPen::detach" qpen.html#detach +"QPen::joinStyle" qpen.html#joinStyle +"QPen::operator!=" qpen.html#operator!-eq +"QPen::operator=" qpen.html#operator-eq +"QPen::operator==" qpen.html#operator-eq-eq +"QPen::setCapStyle" qpen.html#setCapStyle +"QPen::setColor" qpen.html#setColor +"QPen::setJoinStyle" qpen.html#setJoinStyle +"QPen::setStyle" qpen.html#setStyle +"QPen::setWidth" qpen.html#setWidth +"QPen::style" qpen.html#style +"QPen::width" qpen.html#width +"QPen::~QPen" qpen.html#~QPen +"QPicture" qpicture.html +"QPicture::boundingRect" qpicture.html#boundingRect +"QPicture::copy" qpicture.html#copy +"QPicture::data" qpicture.html#data +"QPicture::detach" qpicture.html#detach +"QPicture::isNull" qpicture.html#isNull +"QPicture::load" qpicture.html#load +"QPicture::metric" qpicture.html#metric +"QPicture::operator=" qpicture.html#operator-eq +"QPicture::play" qpicture.html#play +"QPicture::save" qpicture.html#save +"QPicture::setBoundingRect" qpicture.html#setBoundingRect +"QPicture::setData" qpicture.html#setData +"QPicture::size" qpicture.html#size +"QPicture::~QPicture" qpicture.html#~QPicture +"QPixmap" qpixmap.html +"QPixmap::ColorMode" qpixmap.html#ColorMode +"QPixmap::Optimization" qpixmap.html#Optimization +"QPixmap::convertFromImage" qpixmap.html#convertFromImage +"QPixmap::convertToImage" qpixmap.html#convertToImage +"QPixmap::copy" qpixmap.html#copy +"QPixmap::createHeuristicMask" qpixmap.html#createHeuristicMask +"QPixmap::defaultDepth" qpixmap.html#defaultDepth +"QPixmap::defaultOptimization" qpixmap.html#defaultOptimization +"QPixmap::depth" qpixmap.html#depth +"QPixmap::detach" qpixmap.html#detach +"QPixmap::fill" qpixmap.html#fill +"QPixmap::fromMimeSource" qpixmap.html#fromMimeSource +"QPixmap::grabWidget" qpixmap.html#grabWidget +"QPixmap::grabWindow" qpixmap.html#grabWindow +"QPixmap::hasAlpha" qpixmap.html#hasAlpha +"QPixmap::hasAlphaChannel" qpixmap.html#hasAlphaChannel +"QPixmap::height" qpixmap.html#height +"QPixmap::imageFormat" qpixmap.html#imageFormat +"QPixmap::isNull" qpixmap.html#isNull +"QPixmap::isQBitmap" qpixmap.html#isQBitmap +"QPixmap::load" qpixmap.html#load +"QPixmap::loadFromData" qpixmap.html#loadFromData +"QPixmap::mask" qpixmap.html#mask +"QPixmap::metric" qpixmap.html#metric +"QPixmap::operator=" qpixmap.html#operator-eq +"QPixmap::optimization" qpixmap.html#optimization +"QPixmap::rect" qpixmap.html#rect +"QPixmap::resize" qpixmap.html#resize +"QPixmap::save" qpixmap.html#save +"QPixmap::selfMask" qpixmap.html#selfMask +"QPixmap::serialNumber" qpixmap.html#serialNumber +"QPixmap::setDefaultOptimization" qpixmap.html#setDefaultOptimization +"QPixmap::setMask" qpixmap.html#setMask +"QPixmap::setOptimization" qpixmap.html#setOptimization +"QPixmap::size" qpixmap.html#size +"QPixmap::trueMatrix" qpixmap.html#trueMatrix +"QPixmap::width" qpixmap.html#width +"QPixmap::xForm" qpixmap.html#xForm +"QPixmap::~QPixmap" qpixmap.html#~QPixmap +"QPixmapCache" qpixmapcache.html +"QPixmapCache::cacheLimit" qpixmapcache.html#cacheLimit +"QPixmapCache::clear" qpixmapcache.html#clear +"QPixmapCache::find" qpixmapcache.html#find +"QPixmapCache::insert" qpixmapcache.html#insert +"QPixmapCache::remove" qpixmapcache.html#remove +"QPixmapCache::setCacheLimit" qpixmapcache.html#setCacheLimit +"QPlatinumStyle" qplatinumstyle.html +"QPlatinumStyle::drawRiffles" qplatinumstyle.html#drawRiffles +"QPlatinumStyle::mixedColor" qplatinumstyle.html#mixedColor +"QPluginManager::queryInterface" qpluginmanager.html#queryInterface +"QPoint" qpoint.html +"QPoint::isNull" qpoint.html#isNull +"QPoint::manhattanLength" qpoint.html#manhattanLength +"QPoint::operator*=" qpoint.html#operator*-eq +"QPoint::operator+=" qpoint.html#operator+-eq +"QPoint::operator-=" qpoint.html#operator--eq +"QPoint::operator/=" qpoint.html#operator/-eq +"QPoint::rx" qpoint.html#rx +"QPoint::ry" qpoint.html#ry +"QPoint::setX" qpoint.html#setX +"QPoint::setY" qpoint.html#setY +"QPoint::x" qpoint.html#x +"QPoint::y" qpoint.html#y +"QPointArray" qpointarray.html +"QPointArray::boundingRect" qpointarray.html#boundingRect +"QPointArray::copy" qpointarray.html#copy +"QPointArray::cubicBezier" qpointarray.html#cubicBezier +"QPointArray::makeArc" qpointarray.html#makeArc +"QPointArray::makeEllipse" qpointarray.html#makeEllipse +"QPointArray::operator=" qpointarray.html#operator-eq +"QPointArray::point" qpointarray.html#point +"QPointArray::putPoints" qpointarray.html#putPoints +"QPointArray::setPoint" qpointarray.html#setPoint +"QPointArray::setPoints" qpointarray.html#setPoints +"QPointArray::translate" qpointarray.html#translate +"QPointArray::~QPointArray" qpointarray.html#~QPointArray +"QPolygonScanner::scan" qpolygonscanner.html#scan +"QPopupMenu" qpopupmenu.html +"QPopupMenu::aboutToHide" qpopupmenu.html#aboutToHide +"QPopupMenu::aboutToShow" qpopupmenu.html#aboutToShow +"QPopupMenu::activated" qpopupmenu.html#activated +"QPopupMenu::checkable" qpopupmenu.html#checkable-prop +"QPopupMenu::columns" qpopupmenu.html#columns +"QPopupMenu::drawContents" qpopupmenu.html#drawContents +"QPopupMenu::drawItem" qpopupmenu.html#drawItem +"QPopupMenu::exec" qpopupmenu.html#exec +"QPopupMenu::highlighted" qpopupmenu.html#highlighted +"QPopupMenu::idAt" qpopupmenu.html#idAt +"QPopupMenu::insertTearOffHandle" qpopupmenu.html#insertTearOffHandle +"QPopupMenu::isCheckable" qpopupmenu.html#isCheckable +"QPopupMenu::itemHeight" qpopupmenu.html#itemHeight +"QPopupMenu::popup" qpopupmenu.html#popup +"QPopupMenu::setActiveItem" qpopupmenu.html#setActiveItem +"QPopupMenu::setCheckable" qpopupmenu.html#setCheckable +"QPopupMenu::updateItem" qpopupmenu.html#updateItem +"QPopupMenu::~QPopupMenu" qpopupmenu.html#~QPopupMenu +"QPrintDialog::addButton" qprintdialog.html#addButton +"QPrintDialog::getPrinterSetup" qprintdialog.html#getPrinterSetup +"QPrintDialog::printer" qprintdialog.html#printer +"QPrintDialog::setGlobalPrintDialog" qprintdialog.html#setGlobalPrintDialog +"QPrintDialog::setPrinter" qprintdialog.html#setPrinter +"QPrintDialog::~QPrintDialog" qprintdialog.html#~QPrintDialog +"QPrinter" qprinter.html +"QPrinter::ColorMode" qprinter.html#ColorMode +"QPrinter::Orientation" qprinter.html#Orientation +"QPrinter::PageOrder" qprinter.html#PageOrder +"QPrinter::PageSize" qprinter.html#PageSize +"QPrinter::PaperSource" qprinter.html#PaperSource +"QPrinter::PrintRange" qprinter.html#PrintRange +"QPrinter::PrinterMode" qprinter.html#PrinterMode +"QPrinter::PrinterOption" qprinter.html#PrinterOption +"QPrinter::abort" qprinter.html#abort +"QPrinter::aborted" qprinter.html#aborted +"QPrinter::colorMode" qprinter.html#colorMode +"QPrinter::creator" qprinter.html#creator +"QPrinter::docName" qprinter.html#docName +"QPrinter::fromPage" qprinter.html#fromPage +"QPrinter::fullPage" qprinter.html#fullPage +"QPrinter::isOptionEnabled" qprinter.html#isOptionEnabled +"QPrinter::margins" qprinter.html#margins +"QPrinter::maxPage" qprinter.html#maxPage +"QPrinter::minPage" qprinter.html#minPage +"QPrinter::newPage" qprinter.html#newPage +"QPrinter::numCopies" qprinter.html#numCopies +"QPrinter::orientation" qprinter.html#orientation +"QPrinter::outputFileName" qprinter.html#outputFileName +"QPrinter::outputToFile" qprinter.html#outputToFile +"QPrinter::pageOrder" qprinter.html#pageOrder +"QPrinter::pageSize" qprinter.html#pageSize +"QPrinter::paperSource" qprinter.html#paperSource +"QPrinter::printProgram" qprinter.html#printProgram +"QPrinter::printRange" qprinter.html#printRange +"QPrinter::printerName" qprinter.html#printerName +"QPrinter::printerSelectionOption" qprinter.html#printerSelectionOption +"QPrinter::resolution" qprinter.html#resolution +"QPrinter::setColorMode" qprinter.html#setColorMode +"QPrinter::setCreator" qprinter.html#setCreator +"QPrinter::setDocName" qprinter.html#setDocName +"QPrinter::setFromTo" qprinter.html#setFromTo +"QPrinter::setFullPage" qprinter.html#setFullPage +"QPrinter::setMargins" qprinter.html#setMargins +"QPrinter::setMinMax" qprinter.html#setMinMax +"QPrinter::setNumCopies" qprinter.html#setNumCopies +"QPrinter::setOptionEnabled" qprinter.html#setOptionEnabled +"QPrinter::setOrientation" qprinter.html#setOrientation +"QPrinter::setOutputFileName" qprinter.html#setOutputFileName +"QPrinter::setOutputToFile" qprinter.html#setOutputToFile +"QPrinter::setPageOrder" qprinter.html#setPageOrder +"QPrinter::setPageSize" qprinter.html#setPageSize +"QPrinter::setPaperSource" qprinter.html#setPaperSource +"QPrinter::setPrintProgram" qprinter.html#setPrintProgram +"QPrinter::setPrintRange" qprinter.html#setPrintRange +"QPrinter::setPrinterName" qprinter.html#setPrinterName +"QPrinter::setPrinterSelectionOption" qprinter.html#setPrinterSelectionOption +"QPrinter::setResolution" qprinter.html#setResolution +"QPrinter::setWinPageSize" qprinter.html#setWinPageSize +"QPrinter::setup" qprinter.html#setup +"QPrinter::toPage" qprinter.html#toPage +"QPrinter::winPageSize" qprinter.html#winPageSize +"QPrinter::~QPrinter" qprinter.html#~QPrinter +"QProcess" qprocess.html +"QProcess::Communication" qprocess.html#Communication +"QProcess::addArgument" qprocess.html#addArgument +"QProcess::arguments" qprocess.html#arguments +"QProcess::canReadLineStderr" qprocess.html#canReadLineStderr +"QProcess::canReadLineStdout" qprocess.html#canReadLineStdout +"QProcess::clearArguments" qprocess.html#clearArguments +"QProcess::closeStdin" qprocess.html#closeStdin +"QProcess::communication" qprocess.html#communication +"QProcess::exitStatus" qprocess.html#exitStatus +"QProcess::isRunning" qprocess.html#isRunning +"QProcess::kill" qprocess.html#kill +"QProcess::launch" qprocess.html#launch +"QProcess::launchFinished" qprocess.html#launchFinished +"QProcess::normalExit" qprocess.html#normalExit +"QProcess::processExited" qprocess.html#processExited +"QProcess::processIdentifier" qprocess.html#processIdentifier +"QProcess::readLineStderr" qprocess.html#readLineStderr +"QProcess::readLineStdout" qprocess.html#readLineStdout +"QProcess::readStderr" qprocess.html#readStderr +"QProcess::readStdout" qprocess.html#readStdout +"QProcess::readyReadStderr" qprocess.html#readyReadStderr +"QProcess::readyReadStdout" qprocess.html#readyReadStdout +"QProcess::setArguments" qprocess.html#setArguments +"QProcess::setCommunication" qprocess.html#setCommunication +"QProcess::setWorkingDirectory" qprocess.html#setWorkingDirectory +"QProcess::start" qprocess.html#start +"QProcess::tryTerminate" qprocess.html#tryTerminate +"QProcess::workingDirectory" qprocess.html#workingDirectory +"QProcess::writeToStdin" qprocess.html#writeToStdin +"QProcess::wroteToStdin" qprocess.html#wroteToStdin +"QProcess::~QProcess" qprocess.html#~QProcess +"QProgressBar" qprogressbar.html +"QProgressBar::centerIndicator" qprogressbar.html#centerIndicator +"QProgressBar::centerIndicator" qprogressbar.html#centerIndicator-prop +"QProgressBar::indicatorFollowsStyle" qprogressbar.html#indicatorFollowsStyle +"QProgressBar::indicatorFollowsStyle" qprogressbar.html#indicatorFollowsStyle-prop +"QProgressBar::percentageVisible" qprogressbar.html#percentageVisible +"QProgressBar::percentageVisible" qprogressbar.html#percentageVisible-prop +"QProgressBar::progress" qprogressbar.html#progress +"QProgressBar::progress" qprogressbar.html#progress-prop +"QProgressBar::progressString" qprogressbar.html#progressString +"QProgressBar::progressString" qprogressbar.html#progressString-prop +"QProgressBar::reset" qprogressbar.html#reset +"QProgressBar::setCenterIndicator" qprogressbar.html#setCenterIndicator +"QProgressBar::setIndicator" qprogressbar.html#setIndicator +"QProgressBar::setIndicatorFollowsStyle" qprogressbar.html#setIndicatorFollowsStyle +"QProgressBar::setPercentageVisible" qprogressbar.html#setPercentageVisible +"QProgressBar::setProgress" qprogressbar.html#setProgress +"QProgressBar::setTotalSteps" qprogressbar.html#setTotalSteps +"QProgressBar::totalSteps" qprogressbar.html#totalSteps +"QProgressBar::totalSteps" qprogressbar.html#totalSteps-prop +"QProgressDialog" qprogressdialog.html +"QProgressDialog::autoClose" qprogressdialog.html#autoClose +"QProgressDialog::autoClose" qprogressdialog.html#autoClose-prop +"QProgressDialog::autoReset" qprogressdialog.html#autoReset +"QProgressDialog::autoReset" qprogressdialog.html#autoReset-prop +"QProgressDialog::bar" qprogressdialog.html#bar +"QProgressDialog::cancel" qprogressdialog.html#cancel +"QProgressDialog::canceled" qprogressdialog.html#canceled +"QProgressDialog::forceShow" qprogressdialog.html#forceShow +"QProgressDialog::label" qprogressdialog.html#label +"QProgressDialog::labelText" qprogressdialog.html#labelText +"QProgressDialog::labelText" qprogressdialog.html#labelText-prop +"QProgressDialog::minimumDuration" qprogressdialog.html#minimumDuration +"QProgressDialog::minimumDuration" qprogressdialog.html#minimumDuration-prop +"QProgressDialog::progress" qprogressdialog.html#progress +"QProgressDialog::progress" qprogressdialog.html#progress-prop +"QProgressDialog::reset" qprogressdialog.html#reset +"QProgressDialog::setAutoClose" qprogressdialog.html#setAutoClose +"QProgressDialog::setAutoReset" qprogressdialog.html#setAutoReset +"QProgressDialog::setBar" qprogressdialog.html#setBar +"QProgressDialog::setCancelButton" qprogressdialog.html#setCancelButton +"QProgressDialog::setCancelButtonText" qprogressdialog.html#setCancelButtonText +"QProgressDialog::setLabel" qprogressdialog.html#setLabel +"QProgressDialog::setLabelText" qprogressdialog.html#setLabelText +"QProgressDialog::setMinimumDuration" qprogressdialog.html#setMinimumDuration +"QProgressDialog::setProgress" qprogressdialog.html#setProgress +"QProgressDialog::setTotalSteps" qprogressdialog.html#setTotalSteps +"QProgressDialog::sizeHint" qprogressdialog.html#sizeHint +"QProgressDialog::totalSteps" qprogressdialog.html#totalSteps +"QProgressDialog::totalSteps" qprogressdialog.html#totalSteps-prop +"QProgressDialog::wasCanceled" qprogressdialog.html#wasCanceled +"QProgressDialog::wasCanceled" qprogressdialog.html#wasCanceled-prop +"QProgressDialog::~QProgressDialog" qprogressdialog.html#~QProgressDialog +"QPtrCollection" qptrcollection.html +"QPtrCollection::Item" qptrcollection.html#Item +"QPtrCollection::autoDelete" qptrcollection.html#autoDelete +"QPtrCollection::clear" qptrcollection.html#clear +"QPtrCollection::count" qptrcollection.html#count +"QPtrCollection::deleteItem" qptrcollection.html#deleteItem +"QPtrCollection::newItem" qptrcollection.html#newItem +"QPtrCollection::setAutoDelete" qptrcollection.html#setAutoDelete +"QPtrCollection::~QPtrCollection" qptrcollection.html#~QPtrCollection +"QPtrDict" qptrdict.html +"QPtrDict::clear" qptrdict.html#clear +"QPtrDict::count" qptrdict.html#count +"QPtrDict::find" qptrdict.html#find +"QPtrDict::insert" qptrdict.html#insert +"QPtrDict::isEmpty" qptrdict.html#isEmpty +"QPtrDict::operator=" qptrdict.html#operator-eq +"QPtrDict::operator[]" qptrdict.html#operator[] +"QPtrDict::read" qptrdict.html#read +"QPtrDict::remove" qptrdict.html#remove +"QPtrDict::replace" qptrdict.html#replace +"QPtrDict::resize" qptrdict.html#resize +"QPtrDict::size" qptrdict.html#size +"QPtrDict::statistics" qptrdict.html#statistics +"QPtrDict::take" qptrdict.html#take +"QPtrDict::write" qptrdict.html#write +"QPtrDict::~QPtrDict" qptrdict.html#~QPtrDict +"QPtrDictIterator" qptrdictiterator.html +"QPtrDictIterator::count" qptrdictiterator.html#count +"QPtrDictIterator::current" qptrdictiterator.html#current +"QPtrDictIterator::currentKey" qptrdictiterator.html#currentKey +"QPtrDictIterator::isEmpty" qptrdictiterator.html#isEmpty +"QPtrDictIterator::operator type *" qptrdictiterator.html#operator-type-* +"QPtrDictIterator::operator()" qptrdictiterator.html#operator() +"QPtrDictIterator::operator++" qptrdictiterator.html#operator++ +"QPtrDictIterator::operator+=" qptrdictiterator.html#operator+-eq +"QPtrDictIterator::toFirst" qptrdictiterator.html#toFirst +"QPtrDictIterator::~QPtrDictIterator" qptrdictiterator.html#~QPtrDictIterator +"QPtrList" qptrlist.html +"QPtrList::append" qptrlist.html#append +"QPtrList::at" qptrlist.html#at +"QPtrList::clear" qptrlist.html#clear +"QPtrList::compareItems" qptrlist.html#compareItems +"QPtrList::contains" qptrlist.html#contains +"QPtrList::containsRef" qptrlist.html#containsRef +"QPtrList::count" qptrlist.html#count +"QPtrList::current" qptrlist.html#current +"QPtrList::currentNode" qptrlist.html#currentNode +"QPtrList::find" qptrlist.html#find +"QPtrList::findNext" qptrlist.html#findNext +"QPtrList::findNextRef" qptrlist.html#findNextRef +"QPtrList::findRef" qptrlist.html#findRef +"QPtrList::first" qptrlist.html#first +"QPtrList::getFirst" qptrlist.html#getFirst +"QPtrList::getLast" qptrlist.html#getLast +"QPtrList::inSort" qptrlist.html#inSort +"QPtrList::insert" qptrlist.html#insert +"QPtrList::isEmpty" qptrlist.html#isEmpty +"QPtrList::last" qptrlist.html#last +"QPtrList::next" qptrlist.html#next +"QPtrList::operator!=" qptrlist.html#operator!-eq +"QPtrList::operator=" qptrlist.html#operator-eq +"QPtrList::operator==" qptrlist.html#operator-eq-eq +"QPtrList::prepend" qptrlist.html#prepend +"QPtrList::prev" qptrlist.html#prev +"QPtrList::read" qptrlist.html#read +"QPtrList::remove" qptrlist.html#remove +"QPtrList::removeFirst" qptrlist.html#removeFirst +"QPtrList::removeLast" qptrlist.html#removeLast +"QPtrList::removeNode" qptrlist.html#removeNode +"QPtrList::removeRef" qptrlist.html#removeRef +"QPtrList::replace" qptrlist.html#replace +"QPtrList::sort" qptrlist.html#sort +"QPtrList::take" qptrlist.html#take +"QPtrList::takeNode" qptrlist.html#takeNode +"QPtrList::toVector" qptrlist.html#toVector +"QPtrList::write" qptrlist.html#write +"QPtrList::~QPtrList" qptrlist.html#~QPtrList +"QPtrListIterator" qptrlistiterator.html +"QPtrListIterator::atFirst" qptrlistiterator.html#atFirst +"QPtrListIterator::atLast" qptrlistiterator.html#atLast +"QPtrListIterator::count" qptrlistiterator.html#count +"QPtrListIterator::current" qptrlistiterator.html#current +"QPtrListIterator::isEmpty" qptrlistiterator.html#isEmpty +"QPtrListIterator::operator type *" qptrlistiterator.html#operator-type-* +"QPtrListIterator::operator()" qptrlistiterator.html#operator() +"QPtrListIterator::operator*" qptrlistiterator.html#operator* +"QPtrListIterator::operator++" qptrlistiterator.html#operator++ +"QPtrListIterator::operator+=" qptrlistiterator.html#operator+-eq +"QPtrListIterator::operator--" qptrlistiterator.html#operator-- +"QPtrListIterator::operator-=" qptrlistiterator.html#operator--eq +"QPtrListIterator::operator=" qptrlistiterator.html#operator-eq +"QPtrListIterator::toFirst" qptrlistiterator.html#toFirst +"QPtrListIterator::toLast" qptrlistiterator.html#toLast +"QPtrListIterator::~QPtrListIterator" qptrlistiterator.html#~QPtrListIterator +"QPtrQueue" qptrqueue.html +"QPtrQueue::autoDelete" qptrqueue.html#autoDelete +"QPtrQueue::clear" qptrqueue.html#clear +"QPtrQueue::count" qptrqueue.html#count +"QPtrQueue::current" qptrqueue.html#current +"QPtrQueue::dequeue" qptrqueue.html#dequeue +"QPtrQueue::enqueue" qptrqueue.html#enqueue +"QPtrQueue::head" qptrqueue.html#head +"QPtrQueue::isEmpty" qptrqueue.html#isEmpty +"QPtrQueue::operator type *" qptrqueue.html#operator-type-* +"QPtrQueue::operator=" qptrqueue.html#operator-eq +"QPtrQueue::read" qptrqueue.html#read +"QPtrQueue::remove" qptrqueue.html#remove +"QPtrQueue::setAutoDelete" qptrqueue.html#setAutoDelete +"QPtrQueue::write" qptrqueue.html#write +"QPtrQueue::~QPtrQueue" qptrqueue.html#~QPtrQueue +"QPtrStack" qptrstack.html +"QPtrStack::autoDelete" qptrstack.html#autoDelete +"QPtrStack::clear" qptrstack.html#clear +"QPtrStack::count" qptrstack.html#count +"QPtrStack::current" qptrstack.html#current +"QPtrStack::isEmpty" qptrstack.html#isEmpty +"QPtrStack::operator type *" qptrstack.html#operator-type-* +"QPtrStack::operator=" qptrstack.html#operator-eq +"QPtrStack::pop" qptrstack.html#pop +"QPtrStack::push" qptrstack.html#push +"QPtrStack::read" qptrstack.html#read +"QPtrStack::remove" qptrstack.html#remove +"QPtrStack::setAutoDelete" qptrstack.html#setAutoDelete +"QPtrStack::top" qptrstack.html#top +"QPtrStack::write" qptrstack.html#write +"QPtrStack::~QPtrStack" qptrstack.html#~QPtrStack +"QPtrVector" qptrvector.html +"QPtrVector::at" qptrvector.html#at +"QPtrVector::bsearch" qptrvector.html#bsearch +"QPtrVector::clear" qptrvector.html#clear +"QPtrVector::compareItems" qptrvector.html#compareItems +"QPtrVector::contains" qptrvector.html#contains +"QPtrVector::containsRef" qptrvector.html#containsRef +"QPtrVector::count" qptrvector.html#count +"QPtrVector::data" qptrvector.html#data +"QPtrVector::fill" qptrvector.html#fill +"QPtrVector::find" qptrvector.html#find +"QPtrVector::findRef" qptrvector.html#findRef +"QPtrVector::insert" qptrvector.html#insert +"QPtrVector::isEmpty" qptrvector.html#isEmpty +"QPtrVector::isNull" qptrvector.html#isNull +"QPtrVector::operator=" qptrvector.html#operator-eq +"QPtrVector::operator==" qptrvector.html#operator-eq-eq +"QPtrVector::operator[]" qptrvector.html#operator[] +"QPtrVector::read" qptrvector.html#read +"QPtrVector::remove" qptrvector.html#remove +"QPtrVector::resize" qptrvector.html#resize +"QPtrVector::size" qptrvector.html#size +"QPtrVector::sort" qptrvector.html#sort +"QPtrVector::take" qptrvector.html#take +"QPtrVector::write" qptrvector.html#write +"QPtrVector::~QPtrVector" qptrvector.html#~QPtrVector +"QPushButton" qpushbutton.html +"QPushButton::autoDefault" qpushbutton.html#autoDefault +"QPushButton::autoDefault" qpushbutton.html#autoDefault-prop +"QPushButton::autoMask" qpushbutton.html#autoMask-prop +"QPushButton::default" qpushbutton.html#default-prop +"QPushButton::flat" qpushbutton.html#flat-prop +"QPushButton::iconSet" qpushbutton.html#iconSet +"QPushButton::iconSet" qpushbutton.html#iconSet-prop +"QPushButton::isDefault" qpushbutton.html#isDefault +"QPushButton::isFlat" qpushbutton.html#isFlat +"QPushButton::on" qpushbutton.html#on-prop +"QPushButton::popup" qpushbutton.html#popup +"QPushButton::setAutoDefault" qpushbutton.html#setAutoDefault +"QPushButton::setDefault" qpushbutton.html#setDefault +"QPushButton::setFlat" qpushbutton.html#setFlat +"QPushButton::setIconSet" qpushbutton.html#setIconSet +"QPushButton::setOn" qpushbutton.html#setOn +"QPushButton::setPopup" qpushbutton.html#setPopup +"QPushButton::setToggleButton" qpushbutton.html#setToggleButton +"QPushButton::toggleButton" qpushbutton.html#toggleButton-prop +"QPushButton::~QPushButton" qpushbutton.html#~QPushButton +"QQueue Class Reference (obsolete)" qqueue.html +"QRadioButton" qradiobutton.html +"QRadioButton::autoMask" qradiobutton.html#autoMask-prop +"QRadioButton::checked" qradiobutton.html#checked-prop +"QRadioButton::isChecked" qradiobutton.html#isChecked +"QRadioButton::setChecked" qradiobutton.html#setChecked +"QRangeControl" qrangecontrol.html +"QRangeControl::addLine" qrangecontrol.html#addLine +"QRangeControl::addPage" qrangecontrol.html#addPage +"QRangeControl::bound" qrangecontrol.html#bound +"QRangeControl::directSetValue" qrangecontrol.html#directSetValue +"QRangeControl::lineStep" qrangecontrol.html#lineStep +"QRangeControl::maxValue" qrangecontrol.html#maxValue +"QRangeControl::minValue" qrangecontrol.html#minValue +"QRangeControl::pageStep" qrangecontrol.html#pageStep +"QRangeControl::positionFromValue" qrangecontrol.html#positionFromValue +"QRangeControl::prevValue" qrangecontrol.html#prevValue +"QRangeControl::rangeChange" qrangecontrol.html#rangeChange +"QRangeControl::setMaxValue" qrangecontrol.html#setMaxValue +"QRangeControl::setMinValue" qrangecontrol.html#setMinValue +"QRangeControl::setRange" qrangecontrol.html#setRange +"QRangeControl::setSteps" qrangecontrol.html#setSteps +"QRangeControl::setValue" qrangecontrol.html#setValue +"QRangeControl::stepChange" qrangecontrol.html#stepChange +"QRangeControl::subtractLine" qrangecontrol.html#subtractLine +"QRangeControl::subtractPage" qrangecontrol.html#subtractPage +"QRangeControl::value" qrangecontrol.html#value +"QRangeControl::valueChange" qrangecontrol.html#valueChange +"QRangeControl::valueFromPosition" qrangecontrol.html#valueFromPosition +"QRangeControl::~QRangeControl" qrangecontrol.html#~QRangeControl +"QRect" qrect.html +"QRect::addCoords" qrect.html#addCoords +"QRect::bottom" qrect.html#bottom +"QRect::bottomLeft" qrect.html#bottomLeft +"QRect::bottomRight" qrect.html#bottomRight +"QRect::center" qrect.html#center +"QRect::contains" qrect.html#contains +"QRect::coords" qrect.html#coords +"QRect::height" qrect.html#height +"QRect::intersect" qrect.html#intersect +"QRect::intersects" qrect.html#intersects +"QRect::isEmpty" qrect.html#isEmpty +"QRect::isNull" qrect.html#isNull +"QRect::isValid" qrect.html#isValid +"QRect::left" qrect.html#left +"QRect::moveBottom" qrect.html#moveBottom +"QRect::moveBottomLeft" qrect.html#moveBottomLeft +"QRect::moveBottomRight" qrect.html#moveBottomRight +"QRect::moveBy" qrect.html#moveBy +"QRect::moveCenter" qrect.html#moveCenter +"QRect::moveLeft" qrect.html#moveLeft +"QRect::moveRight" qrect.html#moveRight +"QRect::moveTop" qrect.html#moveTop +"QRect::moveTopLeft" qrect.html#moveTopLeft +"QRect::moveTopRight" qrect.html#moveTopRight +"QRect::normalize" qrect.html#normalize +"QRect::operator&" qrect.html#operator-and +"QRect::operator&=" qrect.html#operator-and-eq +"QRect::operator|" qrect.html#operator| +"QRect::operator|=" qrect.html#operator|-eq +"QRect::rBottom" qrect.html#rBottom +"QRect::rLeft" qrect.html#rLeft +"QRect::rRight" qrect.html#rRight +"QRect::rTop" qrect.html#rTop +"QRect::rect" qrect.html#rect +"QRect::right" qrect.html#right +"QRect::setBottom" qrect.html#setBottom +"QRect::setBottomLeft" qrect.html#setBottomLeft +"QRect::setBottomRight" qrect.html#setBottomRight +"QRect::setCoords" qrect.html#setCoords +"QRect::setHeight" qrect.html#setHeight +"QRect::setLeft" qrect.html#setLeft +"QRect::setRect" qrect.html#setRect +"QRect::setRight" qrect.html#setRight +"QRect::setSize" qrect.html#setSize +"QRect::setTop" qrect.html#setTop +"QRect::setTopLeft" qrect.html#setTopLeft +"QRect::setTopRight" qrect.html#setTopRight +"QRect::setWidth" qrect.html#setWidth +"QRect::setX" qrect.html#setX +"QRect::setY" qrect.html#setY +"QRect::size" qrect.html#size +"QRect::top" qrect.html#top +"QRect::topLeft" qrect.html#topLeft +"QRect::topRight" qrect.html#topRight +"QRect::unite" qrect.html#unite +"QRect::width" qrect.html#width +"QRect::x" qrect.html#x +"QRect::y" qrect.html#y +"QRegExp" qregexp.html +"QRegExp::CaretMode" qregexp.html#CaretMode +"QRegExp::cap" qregexp.html#cap +"QRegExp::capturedTexts" qregexp.html#capturedTexts +"QRegExp::caseSensitive" qregexp.html#caseSensitive +"QRegExp::errorString" qregexp.html#errorString +"QRegExp::escape" qregexp.html#escape +"QRegExp::exactMatch" qregexp.html#exactMatch +"QRegExp::isEmpty" qregexp.html#isEmpty +"QRegExp::isValid" qregexp.html#isValid +"QRegExp::matchedLength" qregexp.html#matchedLength +"QRegExp::minimal" qregexp.html#minimal +"QRegExp::numCaptures" qregexp.html#numCaptures +"QRegExp::operator!=" qregexp.html#operator!-eq +"QRegExp::operator=" qregexp.html#operator-eq +"QRegExp::operator==" qregexp.html#operator-eq-eq +"QRegExp::pattern" qregexp.html#pattern +"QRegExp::pos" qregexp.html#pos +"QRegExp::search" qregexp.html#search +"QRegExp::searchRev" qregexp.html#searchRev +"QRegExp::setCaseSensitive" qregexp.html#setCaseSensitive +"QRegExp::setMinimal" qregexp.html#setMinimal +"QRegExp::setPattern" qregexp.html#setPattern +"QRegExp::setWildcard" qregexp.html#setWildcard +"QRegExp::wildcard" qregexp.html#wildcard +"QRegExp::~QRegExp" qregexp.html#~QRegExp +"QRegExpValidator" qregexpvalidator.html +"QRegExpValidator::regExp" qregexpvalidator.html#regExp +"QRegExpValidator::setRegExp" qregexpvalidator.html#setRegExp +"QRegExpValidator::validate" qregexpvalidator.html#validate +"QRegExpValidator::~QRegExpValidator" qregexpvalidator.html#~QRegExpValidator +"QRegion" qregion.html +"QRegion::RegionType" qregion.html#RegionType +"QRegion::boundingRect" qregion.html#boundingRect +"QRegion::contains" qregion.html#contains +"QRegion::copy" qregion.html#copy +"QRegion::detach" qregion.html#detach +"QRegion::eor" qregion.html#eor +"QRegion::handle" qregion.html#handle +"QRegion::intersect" qregion.html#intersect +"QRegion::isEmpty" qregion.html#isEmpty +"QRegion::isNull" qregion.html#isNull +"QRegion::operator!=" qregion.html#operator!-eq +"QRegion::operator&" qregion.html#operator-and +"QRegion::operator&=" qregion.html#operator-and-eq +"QRegion::operator+" qregion.html#operator+ +"QRegion::operator+=" qregion.html#operator+-eq +"QRegion::operator-" qregion.html#operator- +"QRegion::operator-=" qregion.html#operator--eq +"QRegion::operator=" qregion.html#operator-eq +"QRegion::operator==" qregion.html#operator-eq-eq +"QRegion::operator^" qregion.html#operator^ +"QRegion::operator^=" qregion.html#operator^-eq +"QRegion::operator|" qregion.html#operator| +"QRegion::operator|=" qregion.html#operator|-eq +"QRegion::rects" qregion.html#rects +"QRegion::subtract" qregion.html#subtract +"QRegion::translate" qregion.html#translate +"QRegion::unite" qregion.html#unite +"QRegion::~QRegion" qregion.html#~QRegion +"QRenderedFont::ascent" qrenderedfont.html#ascent +"QRenderedFont::descent" qrenderedfont.html#descent +"QRenderedFont::leftBearing" qrenderedfont.html#leftBearing +"QRenderedFont::maxWidth" qrenderedfont.html#maxWidth +"QRenderedFont::minLeftBearing" qrenderedfont.html#minLeftBearing +"QRenderedFont::minRightBearing" qrenderedfont.html#minRightBearing +"QRenderedFont::rightBearing" qrenderedfont.html#rightBearing +"QRenderedFont::width" qrenderedfont.html#width +"QRenderedFont::~QRenderedFont" qrenderedfont.html#~QRenderedFont +"QResizeEvent" qresizeevent.html +"QResizeEvent::oldSize" qresizeevent.html#oldSize +"QResizeEvent::size" qresizeevent.html#size +"QSGIStyle" qsgistyle.html +"QSGIStyle::~QSGIStyle" qsgistyle.html#~QSGIStyle +"QScreen" qscreen.html +"QScreen::alloc" qscreen.html#alloc +"QScreen::base" qscreen.html#base +"QScreen::blank" qscreen.html#blank +"QScreen::cache" qscreen.html#cache +"QScreen::clut" qscreen.html#clut +"QScreen::connect" qscreen.html#connect +"QScreen::createGfx" qscreen.html#createGfx +"QScreen::depth" qscreen.html#depth +"QScreen::deviceHeight" qscreen.html#deviceHeight +"QScreen::deviceWidth" qscreen.html#deviceWidth +"QScreen::disconnect" qscreen.html#disconnect +"QScreen::height" qscreen.html#height +"QScreen::initCursor" qscreen.html#initCursor +"QScreen::initDevice" qscreen.html#initDevice +"QScreen::isInterlaced" qscreen.html#isInterlaced +"QScreen::isTransformed" qscreen.html#isTransformed +"QScreen::lastOp" qscreen.html#lastOp +"QScreen::linestep" qscreen.html#linestep +"QScreen::mapFromDevice" qscreen.html#mapFromDevice +"QScreen::mapToDevice" qscreen.html#mapToDevice +"QScreen::numCols" qscreen.html#numCols +"QScreen::onCard" qscreen.html#onCard +"QScreen::opType" qscreen.html#opType +"QScreen::pixelType" qscreen.html#pixelType +"QScreen::pixmapDepth" qscreen.html#pixmapDepth +"QScreen::pixmapLinestepAlignment" qscreen.html#pixmapLinestepAlignment +"QScreen::pixmapOffsetAlignment" qscreen.html#pixmapOffsetAlignment +"QScreen::restore" qscreen.html#restore +"QScreen::save" qscreen.html#save +"QScreen::screenGfx" qscreen.html#screenGfx +"QScreen::screenSize" qscreen.html#screenSize +"QScreen::set" qscreen.html#set +"QScreen::setDirty" qscreen.html#setDirty +"QScreen::setMode" qscreen.html#setMode +"QScreen::shutdownDevice" qscreen.html#shutdownDevice +"QScreen::supportsDepth" qscreen.html#supportsDepth +"QScreen::totalSize" qscreen.html#totalSize +"QScreen::transformOrientation" qscreen.html#transformOrientation +"QScreen::uncache" qscreen.html#uncache +"QScreen::width" qscreen.html#width +"QScreen::~QScreen" qscreen.html#~QScreen +"QScrollBar" qscrollbar.html +"QScrollBar::doAutoRepeat" qscrollbar.html#doAutoRepeat +"QScrollBar::draggingSlider" qscrollbar.html#draggingSlider +"QScrollBar::draggingSlider" qscrollbar.html#draggingSlider-prop +"QScrollBar::hideEvent" qscrollbar.html#hideEvent +"QScrollBar::lineStep" qscrollbar.html#lineStep +"QScrollBar::lineStep" qscrollbar.html#lineStep-prop +"QScrollBar::maxValue" qscrollbar.html#maxValue +"QScrollBar::maxValue" qscrollbar.html#maxValue-prop +"QScrollBar::minValue" qscrollbar.html#minValue +"QScrollBar::minValue" qscrollbar.html#minValue-prop +"QScrollBar::nextLine" qscrollbar.html#nextLine +"QScrollBar::nextPage" qscrollbar.html#nextPage +"QScrollBar::orientation" qscrollbar.html#orientation +"QScrollBar::orientation" qscrollbar.html#orientation-prop +"QScrollBar::pageStep" qscrollbar.html#pageStep +"QScrollBar::pageStep" qscrollbar.html#pageStep-prop +"QScrollBar::prevLine" qscrollbar.html#prevLine +"QScrollBar::prevPage" qscrollbar.html#prevPage +"QScrollBar::setLineStep" qscrollbar.html#setLineStep +"QScrollBar::setMaxValue" qscrollbar.html#setMaxValue +"QScrollBar::setMinValue" qscrollbar.html#setMinValue +"QScrollBar::setOrientation" qscrollbar.html#setOrientation +"QScrollBar::setPageStep" qscrollbar.html#setPageStep +"QScrollBar::setPalette" qscrollbar.html#setPalette +"QScrollBar::setTracking" qscrollbar.html#setTracking +"QScrollBar::setValue" qscrollbar.html#setValue +"QScrollBar::sliderMoved" qscrollbar.html#sliderMoved +"QScrollBar::sliderPressed" qscrollbar.html#sliderPressed +"QScrollBar::sliderRect" qscrollbar.html#sliderRect +"QScrollBar::sliderReleased" qscrollbar.html#sliderReleased +"QScrollBar::sliderStart" qscrollbar.html#sliderStart +"QScrollBar::startAutoRepeat" qscrollbar.html#startAutoRepeat +"QScrollBar::stopAutoRepeat" qscrollbar.html#stopAutoRepeat +"QScrollBar::tracking" qscrollbar.html#tracking +"QScrollBar::tracking" qscrollbar.html#tracking-prop +"QScrollBar::value" qscrollbar.html#value +"QScrollBar::value" qscrollbar.html#value-prop +"QScrollBar::valueChanged" qscrollbar.html#valueChanged +"QScrollBar::~QScrollBar" qscrollbar.html#~QScrollBar +"QScrollView" qscrollview.html +"QScrollView::ResizePolicy" qscrollview.html#ResizePolicy +"QScrollView::ScrollBarMode" qscrollview.html#ScrollBarMode +"QScrollView::addChild" qscrollview.html#addChild +"QScrollView::bottomMargin" qscrollview.html#bottomMargin +"QScrollView::center" qscrollview.html#center +"QScrollView::childX" qscrollview.html#childX +"QScrollView::childY" qscrollview.html#childY +"QScrollView::clipper" qscrollview.html#clipper +"QScrollView::contentsContextMenuEvent" qscrollview.html#contentsContextMenuEvent +"QScrollView::contentsDragEnterEvent" qscrollview.html#contentsDragEnterEvent +"QScrollView::contentsDragLeaveEvent" qscrollview.html#contentsDragLeaveEvent +"QScrollView::contentsDragMoveEvent" qscrollview.html#contentsDragMoveEvent +"QScrollView::contentsDropEvent" qscrollview.html#contentsDropEvent +"QScrollView::contentsHeight" qscrollview.html#contentsHeight +"QScrollView::contentsHeight" qscrollview.html#contentsHeight-prop +"QScrollView::contentsMouseDoubleClickEvent" qscrollview.html#contentsMouseDoubleClickEvent +"QScrollView::contentsMouseMoveEvent" qscrollview.html#contentsMouseMoveEvent +"QScrollView::contentsMousePressEvent" qscrollview.html#contentsMousePressEvent +"QScrollView::contentsMouseReleaseEvent" qscrollview.html#contentsMouseReleaseEvent +"QScrollView::contentsMoving" qscrollview.html#contentsMoving +"QScrollView::contentsToViewport" qscrollview.html#contentsToViewport +"QScrollView::contentsWheelEvent" qscrollview.html#contentsWheelEvent +"QScrollView::contentsWidth" qscrollview.html#contentsWidth +"QScrollView::contentsWidth" qscrollview.html#contentsWidth-prop +"QScrollView::contentsX" qscrollview.html#contentsX +"QScrollView::contentsX" qscrollview.html#contentsX-prop +"QScrollView::contentsY" qscrollview.html#contentsY +"QScrollView::contentsY" qscrollview.html#contentsY-prop +"QScrollView::cornerWidget" qscrollview.html#cornerWidget +"QScrollView::dragAutoScroll" qscrollview.html#dragAutoScroll +"QScrollView::dragAutoScroll" qscrollview.html#dragAutoScroll-prop +"QScrollView::drawContents" qscrollview.html#drawContents +"QScrollView::drawContentsOffset" qscrollview.html#drawContentsOffset +"QScrollView::enableClipper" qscrollview.html#enableClipper +"QScrollView::ensureVisible" qscrollview.html#ensureVisible +"QScrollView::eventFilter" qscrollview.html#eventFilter +"QScrollView::hScrollBarMode" qscrollview.html#hScrollBarMode +"QScrollView::hScrollBarMode" qscrollview.html#hScrollBarMode-prop +"QScrollView::hasStaticBackground" qscrollview.html#hasStaticBackground +"QScrollView::horizontalScrollBar" qscrollview.html#horizontalScrollBar +"QScrollView::horizontalSliderPressed" qscrollview.html#horizontalSliderPressed +"QScrollView::horizontalSliderReleased" qscrollview.html#horizontalSliderReleased +"QScrollView::isHorizontalSliderPressed" qscrollview.html#isHorizontalSliderPressed +"QScrollView::isVerticalSliderPressed" qscrollview.html#isVerticalSliderPressed +"QScrollView::leftMargin" qscrollview.html#leftMargin +"QScrollView::moveChild" qscrollview.html#moveChild +"QScrollView::moveContents" qscrollview.html#moveContents +"QScrollView::removeChild" qscrollview.html#removeChild +"QScrollView::repaintContents" qscrollview.html#repaintContents +"QScrollView::resizeContents" qscrollview.html#resizeContents +"QScrollView::resizePolicy" qscrollview.html#resizePolicy +"QScrollView::resizePolicy" qscrollview.html#resizePolicy-prop +"QScrollView::rightMargin" qscrollview.html#rightMargin +"QScrollView::scrollBy" qscrollview.html#scrollBy +"QScrollView::setContentsPos" qscrollview.html#setContentsPos +"QScrollView::setCornerWidget" qscrollview.html#setCornerWidget +"QScrollView::setDragAutoScroll" qscrollview.html#setDragAutoScroll +"QScrollView::setHBarGeometry" qscrollview.html#setHBarGeometry +"QScrollView::setHScrollBarMode" qscrollview.html#setHScrollBarMode +"QScrollView::setMargins" qscrollview.html#setMargins +"QScrollView::setResizePolicy" qscrollview.html#setResizePolicy +"QScrollView::setStaticBackground" qscrollview.html#setStaticBackground +"QScrollView::setVBarGeometry" qscrollview.html#setVBarGeometry +"QScrollView::setVScrollBarMode" qscrollview.html#setVScrollBarMode +"QScrollView::topMargin" qscrollview.html#topMargin +"QScrollView::updateContents" qscrollview.html#updateContents +"QScrollView::updateScrollBars" qscrollview.html#updateScrollBars +"QScrollView::vScrollBarMode" qscrollview.html#vScrollBarMode +"QScrollView::vScrollBarMode" qscrollview.html#vScrollBarMode-prop +"QScrollView::verticalScrollBar" qscrollview.html#verticalScrollBar +"QScrollView::verticalSliderPressed" qscrollview.html#verticalSliderPressed +"QScrollView::verticalSliderReleased" qscrollview.html#verticalSliderReleased +"QScrollView::viewport" qscrollview.html#viewport +"QScrollView::viewportPaintEvent" qscrollview.html#viewportPaintEvent +"QScrollView::viewportResizeEvent" qscrollview.html#viewportResizeEvent +"QScrollView::viewportSize" qscrollview.html#viewportSize +"QScrollView::viewportToContents" qscrollview.html#viewportToContents +"QScrollView::visibleHeight" qscrollview.html#visibleHeight +"QScrollView::visibleHeight" qscrollview.html#visibleHeight-prop +"QScrollView::visibleWidth" qscrollview.html#visibleWidth +"QScrollView::visibleWidth" qscrollview.html#visibleWidth-prop +"QScrollView::~QScrollView" qscrollview.html#~QScrollView +"QSemaphore" qsemaphore.html +"QSemaphore::available" qsemaphore.html#available +"QSemaphore::operator++" qsemaphore.html#operator++ +"QSemaphore::operator+=" qsemaphore.html#operator+-eq +"QSemaphore::operator--" qsemaphore.html#operator-- +"QSemaphore::operator-=" qsemaphore.html#operator--eq +"QSemaphore::total" qsemaphore.html#total +"QSemaphore::tryAccess" qsemaphore.html#tryAccess +"QSemaphore::~QSemaphore" qsemaphore.html#~QSemaphore +"QServerSocket" qserversocket.html +"QServerSocket::address" qserversocket.html#address +"QServerSocket::newConnection" qserversocket.html#newConnection +"QServerSocket::ok" qserversocket.html#ok +"QServerSocket::port" qserversocket.html#port +"QServerSocket::setSocket" qserversocket.html#setSocket +"QServerSocket::socket" qserversocket.html#socket +"QServerSocket::socketDevice" qserversocket.html#socketDevice +"QServerSocket::~QServerSocket" qserversocket.html#~QServerSocket +"QSessionManager" qsessionmanager.html +"QSessionManager::RestartHint" qsessionmanager.html#RestartHint +"QSessionManager::allowsErrorInteraction" qsessionmanager.html#allowsErrorInteraction +"QSessionManager::allowsInteraction" qsessionmanager.html#allowsInteraction +"QSessionManager::cancel" qsessionmanager.html#cancel +"QSessionManager::discardCommand" qsessionmanager.html#discardCommand +"QSessionManager::handle" qsessionmanager.html#handle +"QSessionManager::isPhase2" qsessionmanager.html#isPhase2 +"QSessionManager::release" qsessionmanager.html#release +"QSessionManager::requestPhase2" qsessionmanager.html#requestPhase2 +"QSessionManager::restartCommand" qsessionmanager.html#restartCommand +"QSessionManager::restartHint" qsessionmanager.html#restartHint +"QSessionManager::sessionId" qsessionmanager.html#sessionId +"QSessionManager::sessionKey" qsessionmanager.html#sessionKey +"QSessionManager::setDiscardCommand" qsessionmanager.html#setDiscardCommand +"QSessionManager::setManagerProperty" qsessionmanager.html#setManagerProperty +"QSessionManager::setRestartCommand" qsessionmanager.html#setRestartCommand +"QSessionManager::setRestartHint" qsessionmanager.html#setRestartHint +"QSettings" qsettings.html +"QSettings::Format" qsettings.html#Format +"QSettings::Scope" qsettings.html#Scope +"QSettings::System" qsettings.html#System +"QSettings::beginGroup" qsettings.html#beginGroup +"QSettings::endGroup" qsettings.html#endGroup +"QSettings::entryList" qsettings.html#entryList +"QSettings::group" qsettings.html#group +"QSettings::insertSearchPath" qsettings.html#insertSearchPath +"QSettings::readBoolEntry" qsettings.html#readBoolEntry +"QSettings::readDoubleEntry" qsettings.html#readDoubleEntry +"QSettings::readEntry" qsettings.html#readEntry +"QSettings::readListEntry" qsettings.html#readListEntry +"QSettings::readNumEntry" qsettings.html#readNumEntry +"QSettings::removeEntry" qsettings.html#removeEntry +"QSettings::removeSearchPath" qsettings.html#removeSearchPath +"QSettings::resetGroup" qsettings.html#resetGroup +"QSettings::setPath" qsettings.html#setPath +"QSettings::subkeyList" qsettings.html#subkeyList +"QSettings::writeEntry" qsettings.html#writeEntry +"QSettings::~QSettings" qsettings.html#~QSettings +"QShowEvent" qshowevent.html +"QSignal" qsignal.html +"QSignal::activate" qsignal.html#activate +"QSignal::connect" qsignal.html#connect +"QSignal::disconnect" qsignal.html#disconnect +"QSignal::setValue" qsignal.html#setValue +"QSignal::value" qsignal.html#value +"QSignal::~QSignal" qsignal.html#~QSignal +"QSignalMapper" qsignalmapper.html +"QSignalMapper::map" qsignalmapper.html#map +"QSignalMapper::mapped" qsignalmapper.html#mapped +"QSignalMapper::removeMappings" qsignalmapper.html#removeMappings +"QSignalMapper::setMapping" qsignalmapper.html#setMapping +"QSignalMapper::~QSignalMapper" qsignalmapper.html#~QSignalMapper +"QSimpleRichText" qsimplerichtext.html +"QSimpleRichText::adjustSize" qsimplerichtext.html#adjustSize +"QSimpleRichText::anchorAt" qsimplerichtext.html#anchorAt +"QSimpleRichText::context" qsimplerichtext.html#context +"QSimpleRichText::draw" qsimplerichtext.html#draw +"QSimpleRichText::height" qsimplerichtext.html#height +"QSimpleRichText::inText" qsimplerichtext.html#inText +"QSimpleRichText::setDefaultFont" qsimplerichtext.html#setDefaultFont +"QSimpleRichText::setWidth" qsimplerichtext.html#setWidth +"QSimpleRichText::width" qsimplerichtext.html#width +"QSimpleRichText::widthUsed" qsimplerichtext.html#widthUsed +"QSimpleRichText::~QSimpleRichText" qsimplerichtext.html#~QSimpleRichText +"QSize" qsize.html +"QSize::ScaleMode" qsize.html#ScaleMode +"QSize::boundedTo" qsize.html#boundedTo +"QSize::expandedTo" qsize.html#expandedTo +"QSize::height" qsize.html#height +"QSize::isEmpty" qsize.html#isEmpty +"QSize::isNull" qsize.html#isNull +"QSize::isValid" qsize.html#isValid +"QSize::operator*=" qsize.html#operator*-eq +"QSize::operator+=" qsize.html#operator+-eq +"QSize::operator-=" qsize.html#operator--eq +"QSize::operator/=" qsize.html#operator/-eq +"QSize::rheight" qsize.html#rheight +"QSize::rwidth" qsize.html#rwidth +"QSize::scale" qsize.html#scale +"QSize::setHeight" qsize.html#setHeight +"QSize::setWidth" qsize.html#setWidth +"QSize::transpose" qsize.html#transpose +"QSize::width" qsize.html#width +"QSizeGrip" qsizegrip.html +"QSizeGrip::mouseMoveEvent" qsizegrip.html#mouseMoveEvent +"QSizeGrip::mousePressEvent" qsizegrip.html#mousePressEvent +"QSizeGrip::paintEvent" qsizegrip.html#paintEvent +"QSizeGrip::sizeHint" qsizegrip.html#sizeHint +"QSizeGrip::~QSizeGrip" qsizegrip.html#~QSizeGrip +"QSizePolicy" qsizepolicy.html +"QSizePolicy::ExpandData" qsizepolicy.html#ExpandData +"QSizePolicy::SizeType" qsizepolicy.html#SizeType +"QSizePolicy::expanding" qsizepolicy.html#expanding +"QSizePolicy::hasHeightForWidth" qsizepolicy.html#hasHeightForWidth +"QSizePolicy::horData" qsizepolicy.html#horData +"QSizePolicy::horStretch" qsizepolicy.html#horStretch +"QSizePolicy::mayGrowHorizontally" qsizepolicy.html#mayGrowHorizontally +"QSizePolicy::mayGrowVertically" qsizepolicy.html#mayGrowVertically +"QSizePolicy::mayShrinkHorizontally" qsizepolicy.html#mayShrinkHorizontally +"QSizePolicy::mayShrinkVertically" qsizepolicy.html#mayShrinkVertically +"QSizePolicy::operator!=" qsizepolicy.html#operator!-eq +"QSizePolicy::operator==" qsizepolicy.html#operator-eq-eq +"QSizePolicy::setHeightForWidth" qsizepolicy.html#setHeightForWidth +"QSizePolicy::setHorData" qsizepolicy.html#setHorData +"QSizePolicy::setHorStretch" qsizepolicy.html#setHorStretch +"QSizePolicy::setVerData" qsizepolicy.html#setVerData +"QSizePolicy::setVerStretch" qsizepolicy.html#setVerStretch +"QSizePolicy::transpose" qsizepolicy.html#transpose +"QSizePolicy::verData" qsizepolicy.html#verData +"QSizePolicy::verStretch" qsizepolicy.html#verStretch +"QSjisCodec" qsjiscodec.html +"QSjisCodec::mimeName" qsjiscodec.html#mimeName +"QSjisCodec::~QSjisCodec" qsjiscodec.html#~QSjisCodec +"QSlider" qslider.html +"QSlider::TickSetting" qslider.html#TickSetting +"QSlider::addStep" qslider.html#addStep +"QSlider::lineStep" qslider.html#lineStep +"QSlider::lineStep" qslider.html#lineStep-prop +"QSlider::maxValue" qslider.html#maxValue +"QSlider::maxValue" qslider.html#maxValue-prop +"QSlider::minValue" qslider.html#minValue +"QSlider::minValue" qslider.html#minValue-prop +"QSlider::moveSlider" qslider.html#moveSlider +"QSlider::orientation" qslider.html#orientation +"QSlider::orientation" qslider.html#orientation-prop +"QSlider::pageStep" qslider.html#pageStep +"QSlider::pageStep" qslider.html#pageStep-prop +"QSlider::rangeChange" qslider.html#rangeChange +"QSlider::setLineStep" qslider.html#setLineStep +"QSlider::setMaxValue" qslider.html#setMaxValue +"QSlider::setMinValue" qslider.html#setMinValue +"QSlider::setOrientation" qslider.html#setOrientation +"QSlider::setPageStep" qslider.html#setPageStep +"QSlider::setPalette" qslider.html#setPalette +"QSlider::setTickInterval" qslider.html#setTickInterval +"QSlider::setTickmarks" qslider.html#setTickmarks +"QSlider::setTracking" qslider.html#setTracking +"QSlider::setValue" qslider.html#setValue +"QSlider::sliderMoved" qslider.html#sliderMoved +"QSlider::sliderPressed" qslider.html#sliderPressed +"QSlider::sliderRect" qslider.html#sliderRect +"QSlider::sliderReleased" qslider.html#sliderReleased +"QSlider::sliderStart" qslider.html#sliderStart +"QSlider::subtractStep" qslider.html#subtractStep +"QSlider::tickInterval" qslider.html#tickInterval +"QSlider::tickInterval" qslider.html#tickInterval-prop +"QSlider::tickmarks" qslider.html#tickmarks +"QSlider::tickmarks" qslider.html#tickmarks-prop +"QSlider::tracking" qslider.html#tracking +"QSlider::tracking" qslider.html#tracking-prop +"QSlider::value" qslider.html#value +"QSlider::value" qslider.html#value-prop +"QSlider::valueChange" qslider.html#valueChange +"QSlider::valueChanged" qslider.html#valueChanged +"QSlider::~QSlider" qslider.html#~QSlider +"QSocket" qsocket.html +"QSocket::Error" qsocket.html#Error +"QSocket::State" qsocket.html#State +"QSocket::address" qsocket.html#address +"QSocket::at" qsocket.html#at +"QSocket::atEnd" qsocket.html#atEnd +"QSocket::bytesAvailable" qsocket.html#bytesAvailable +"QSocket::bytesToWrite" qsocket.html#bytesToWrite +"QSocket::bytesWritten" qsocket.html#bytesWritten +"QSocket::canReadLine" qsocket.html#canReadLine +"QSocket::clearPendingData" qsocket.html#clearPendingData +"QSocket::close" qsocket.html#close +"QSocket::connectToHost" qsocket.html#connectToHost +"QSocket::connected" qsocket.html#connected +"QSocket::connectionClosed" qsocket.html#connectionClosed +"QSocket::consumeWriteBuf" qsocket.html#consumeWriteBuf +"QSocket::delayedCloseFinished" qsocket.html#delayedCloseFinished +"QSocket::error" qsocket.html#error +"QSocket::flush" qsocket.html#flush +"QSocket::getch" qsocket.html#getch +"QSocket::hostFound" qsocket.html#hostFound +"QSocket::open" qsocket.html#open +"QSocket::peerAddress" qsocket.html#peerAddress +"QSocket::peerName" qsocket.html#peerName +"QSocket::peerPort" qsocket.html#peerPort +"QSocket::port" qsocket.html#port +"QSocket::putch" qsocket.html#putch +"QSocket::readBlock" qsocket.html#readBlock +"QSocket::readBufferSize" qsocket.html#readBufferSize +"QSocket::readLine" qsocket.html#readLine +"QSocket::readyRead" qsocket.html#readyRead +"QSocket::setReadBufferSize" qsocket.html#setReadBufferSize +"QSocket::setSocket" qsocket.html#setSocket +"QSocket::setSocketDevice" qsocket.html#setSocketDevice +"QSocket::setSocketIntern" qsocket.html#setSocketIntern +"QSocket::size" qsocket.html#size +"QSocket::socket" qsocket.html#socket +"QSocket::socketDevice" qsocket.html#socketDevice +"QSocket::state" qsocket.html#state +"QSocket::tryConnecting" qsocket.html#tryConnecting +"QSocket::ungetch" qsocket.html#ungetch +"QSocket::waitForMore" qsocket.html#waitForMore +"QSocket::writeBlock" qsocket.html#writeBlock +"QSocket::~QSocket" qsocket.html#~QSocket +"QSocketDevice" qsocketdevice.html +"QSocketDevice::Error" qsocketdevice.html#Error +"QSocketDevice::Protocol" qsocketdevice.html#Protocol +"QSocketDevice::Type" qsocketdevice.html#Type +"QSocketDevice::accept" qsocketdevice.html#accept +"QSocketDevice::address" qsocketdevice.html#address +"QSocketDevice::addressReusable" qsocketdevice.html#addressReusable +"QSocketDevice::bind" qsocketdevice.html#bind +"QSocketDevice::blocking" qsocketdevice.html#blocking +"QSocketDevice::bytesAvailable" qsocketdevice.html#bytesAvailable +"QSocketDevice::connect" qsocketdevice.html#connect +"QSocketDevice::createNewSocket" qsocketdevice.html#createNewSocket +"QSocketDevice::error" qsocketdevice.html#error +"QSocketDevice::fetchConnectionParameters" qsocketdevice.html#fetchConnectionParameters +"QSocketDevice::isValid" qsocketdevice.html#isValid +"QSocketDevice::listen" qsocketdevice.html#listen +"QSocketDevice::option" qsocketdevice.html#option +"QSocketDevice::peerAddress" qsocketdevice.html#peerAddress +"QSocketDevice::peerPort" qsocketdevice.html#peerPort +"QSocketDevice::port" qsocketdevice.html#port +"QSocketDevice::protocol" qsocketdevice.html#protocol +"QSocketDevice::readBlock" qsocketdevice.html#readBlock +"QSocketDevice::receiveBufferSize" qsocketdevice.html#receiveBufferSize +"QSocketDevice::sendBufferSize" qsocketdevice.html#sendBufferSize +"QSocketDevice::setAddressReusable" qsocketdevice.html#setAddressReusable +"QSocketDevice::setBlocking" qsocketdevice.html#setBlocking +"QSocketDevice::setError" qsocketdevice.html#setError +"QSocketDevice::setOption" qsocketdevice.html#setOption +"QSocketDevice::setReceiveBufferSize" qsocketdevice.html#setReceiveBufferSize +"QSocketDevice::setSendBufferSize" qsocketdevice.html#setSendBufferSize +"QSocketDevice::setSocket" qsocketdevice.html#setSocket +"QSocketDevice::socket" qsocketdevice.html#socket +"QSocketDevice::type" qsocketdevice.html#type +"QSocketDevice::waitForMore" qsocketdevice.html#waitForMore +"QSocketDevice::writeBlock" qsocketdevice.html#writeBlock +"QSocketDevice::~QSocketDevice" qsocketdevice.html#~QSocketDevice +"QSocketNotifier" qsocketnotifier.html +"QSocketNotifier::Type" qsocketnotifier.html#Type +"QSocketNotifier::activated" qsocketnotifier.html#activated +"QSocketNotifier::isEnabled" qsocketnotifier.html#isEnabled +"QSocketNotifier::setEnabled" qsocketnotifier.html#setEnabled +"QSocketNotifier::socket" qsocketnotifier.html#socket +"QSocketNotifier::type" qsocketnotifier.html#type +"QSocketNotifier::~QSocketNotifier" qsocketnotifier.html#~QSocketNotifier +"QSortedList::operator=" qsortedlist.html#operator-eq +"QSortedList::~QSortedList" qsortedlist.html#~QSortedList +"QSound" qsound.html +"QSound::available" qsound.html#available +"QSound::fileName" qsound.html#fileName +"QSound::isAvailable" qsound.html#isAvailable +"QSound::isFinished" qsound.html#isFinished +"QSound::loops" qsound.html#loops +"QSound::loopsRemaining" qsound.html#loopsRemaining +"QSound::play" qsound.html#play +"QSound::setLoops" qsound.html#setLoops +"QSound::stop" qsound.html#stop +"QSound::~QSound" qsound.html#~QSound +"QSpacerItem" qspaceritem.html +"QSpacerItem::changeSize" qspaceritem.html#changeSize +"QSpacerItem::expanding" qspaceritem.html#expanding +"QSpacerItem::isEmpty" qspaceritem.html#isEmpty +"QSpacerItem::maximumSize" qspaceritem.html#maximumSize +"QSpacerItem::minimumSize" qspaceritem.html#minimumSize +"QSpacerItem::setGeometry" qspaceritem.html#setGeometry +"QSpacerItem::sizeHint" qspaceritem.html#sizeHint +"QSpinBox" qspinbox.html +"QSpinBox::ButtonSymbols" qspinbox.html#ButtonSymbols +"QSpinBox::buttonSymbols" qspinbox.html#buttonSymbols +"QSpinBox::buttonSymbols" qspinbox.html#buttonSymbols-prop +"QSpinBox::cleanText" qspinbox.html#cleanText +"QSpinBox::cleanText" qspinbox.html#cleanText-prop +"QSpinBox::currentValueText" qspinbox.html#currentValueText +"QSpinBox::downRect" qspinbox.html#downRect +"QSpinBox::editor" qspinbox.html#editor +"QSpinBox::eventFilter" qspinbox.html#eventFilter +"QSpinBox::interpretText" qspinbox.html#interpretText +"QSpinBox::lineStep" qspinbox.html#lineStep +"QSpinBox::lineStep" qspinbox.html#lineStep-prop +"QSpinBox::mapTextToValue" qspinbox.html#mapTextToValue +"QSpinBox::mapValueToText" qspinbox.html#mapValueToText +"QSpinBox::maxValue" qspinbox.html#maxValue +"QSpinBox::maxValue" qspinbox.html#maxValue-prop +"QSpinBox::minValue" qspinbox.html#minValue +"QSpinBox::minValue" qspinbox.html#minValue-prop +"QSpinBox::prefix" qspinbox.html#prefix +"QSpinBox::prefix" qspinbox.html#prefix-prop +"QSpinBox::rangeChange" qspinbox.html#rangeChange +"QSpinBox::selectAll" qspinbox.html#selectAll +"QSpinBox::setButtonSymbols" qspinbox.html#setButtonSymbols +"QSpinBox::setLineStep" qspinbox.html#setLineStep +"QSpinBox::setMaxValue" qspinbox.html#setMaxValue +"QSpinBox::setMinValue" qspinbox.html#setMinValue +"QSpinBox::setPrefix" qspinbox.html#setPrefix +"QSpinBox::setSpecialValueText" qspinbox.html#setSpecialValueText +"QSpinBox::setSuffix" qspinbox.html#setSuffix +"QSpinBox::setValidator" qspinbox.html#setValidator +"QSpinBox::setValue" qspinbox.html#setValue +"QSpinBox::setWrapping" qspinbox.html#setWrapping +"QSpinBox::specialValueText" qspinbox.html#specialValueText +"QSpinBox::specialValueText" qspinbox.html#specialValueText-prop +"QSpinBox::stepDown" qspinbox.html#stepDown +"QSpinBox::stepUp" qspinbox.html#stepUp +"QSpinBox::suffix" qspinbox.html#suffix +"QSpinBox::suffix" qspinbox.html#suffix-prop +"QSpinBox::text" qspinbox.html#text +"QSpinBox::text" qspinbox.html#text-prop +"QSpinBox::textChanged" qspinbox.html#textChanged +"QSpinBox::upRect" qspinbox.html#upRect +"QSpinBox::updateDisplay" qspinbox.html#updateDisplay +"QSpinBox::validator" qspinbox.html#validator +"QSpinBox::value" qspinbox.html#value +"QSpinBox::value" qspinbox.html#value-prop +"QSpinBox::valueChange" qspinbox.html#valueChange +"QSpinBox::valueChanged" qspinbox.html#valueChanged +"QSpinBox::wrapping" qspinbox.html#wrapping +"QSpinBox::wrapping" qspinbox.html#wrapping-prop +"QSpinBox::~QSpinBox" qspinbox.html#~QSpinBox +"QSpinWidget::arrange" qspinwidget.html#arrange +"QSpinWidget::buttonSymbols" qspinwidget.html#buttonSymbols +"QSpinWidget::downRect" qspinwidget.html#downRect +"QSpinWidget::editWidget" qspinwidget.html#editWidget +"QSpinWidget::enableChanged" qspinwidget.html#enableChanged +"QSpinWidget::isDownEnabled" qspinwidget.html#isDownEnabled +"QSpinWidget::isUpEnabled" qspinwidget.html#isUpEnabled +"QSpinWidget::mouseMoveEvent" qspinwidget.html#mouseMoveEvent +"QSpinWidget::mouseReleaseEvent" qspinwidget.html#mouseReleaseEvent +"QSpinWidget::paintEvent" qspinwidget.html#paintEvent +"QSpinWidget::setButtonSymbols" qspinwidget.html#setButtonSymbols +"QSpinWidget::setDownEnabled" qspinwidget.html#setDownEnabled +"QSpinWidget::setEditWidget" qspinwidget.html#setEditWidget +"QSpinWidget::setUpEnabled" qspinwidget.html#setUpEnabled +"QSpinWidget::stepDown" qspinwidget.html#stepDown +"QSpinWidget::stepUp" qspinwidget.html#stepUp +"QSpinWidget::styleChange" qspinwidget.html#styleChange +"QSpinWidget::upRect" qspinwidget.html#upRect +"QSpinWidget::updateDisplay" qspinwidget.html#updateDisplay +"QSpinWidget::wheelEvent" qspinwidget.html#wheelEvent +"QSpinWidget::~QSpinWidget" qspinwidget.html#~QSpinWidget +"QSplashScreen" qsplashscreen.html +"QSplashScreen::clear" qsplashscreen.html#clear +"QSplashScreen::drawContents" qsplashscreen.html#drawContents +"QSplashScreen::finish" qsplashscreen.html#finish +"QSplashScreen::message" qsplashscreen.html#message +"QSplashScreen::messageChanged" qsplashscreen.html#messageChanged +"QSplashScreen::pixmap" qsplashscreen.html#pixmap +"QSplashScreen::repaint" qsplashscreen.html#repaint +"QSplashScreen::setPixmap" qsplashscreen.html#setPixmap +"QSplashScreen::~QSplashScreen" qsplashscreen.html#~QSplashScreen +"QSplitter" qsplitter.html +"QSplitter::ResizeMode" qsplitter.html#ResizeMode +"QSplitter::adjustPos" qsplitter.html#adjustPos +"QSplitter::childEvent" qsplitter.html#childEvent +"QSplitter::childrenCollapsible" qsplitter.html#childrenCollapsible +"QSplitter::childrenCollapsible" qsplitter.html#childrenCollapsible-prop +"QSplitter::getRange" qsplitter.html#getRange +"QSplitter::handleWidth" qsplitter.html#handleWidth +"QSplitter::handleWidth" qsplitter.html#handleWidth-prop +"QSplitter::idAfter" qsplitter.html#idAfter +"QSplitter::moveSplitter" qsplitter.html#moveSplitter +"QSplitter::moveToFirst" qsplitter.html#moveToFirst +"QSplitter::moveToLast" qsplitter.html#moveToLast +"QSplitter::opaqueResize" qsplitter.html#opaqueResize +"QSplitter::opaqueResize" qsplitter.html#opaqueResize-prop +"QSplitter::orientation" qsplitter.html#orientation +"QSplitter::orientation" qsplitter.html#orientation-prop +"QSplitter::processChildEvents" qsplitter.html#processChildEvents +"QSplitter::refresh" qsplitter.html#refresh +"QSplitter::setChildrenCollapsible" qsplitter.html#setChildrenCollapsible +"QSplitter::setCollapsible" qsplitter.html#setCollapsible +"QSplitter::setHandleWidth" qsplitter.html#setHandleWidth +"QSplitter::setOpaqueResize" qsplitter.html#setOpaqueResize +"QSplitter::setOrientation" qsplitter.html#setOrientation +"QSplitter::setResizeMode" qsplitter.html#setResizeMode +"QSplitter::setRubberband" qsplitter.html#setRubberband +"QSplitter::setSizes" qsplitter.html#setSizes +"QSplitter::sizes" qsplitter.html#sizes +"QSplitter::~QSplitter" qsplitter.html#~QSplitter +"QSql" qsql.html +"QSql::Confirm" qsql.html#Confirm +"QSql::Location" qsql.html#Location +"QSql::Op" qsql.html#Op +"QSql::ParameterType" qsql.html#ParameterType +"QSql::TableType" qsql.html#TableType +"QSqlCursor" qsqlcursor.html +"QSqlCursor::Mode" qsqlcursor.html#Mode +"QSqlCursor::append" qsqlcursor.html#append +"QSqlCursor::calculateField" qsqlcursor.html#calculateField +"QSqlCursor::canDelete" qsqlcursor.html#canDelete +"QSqlCursor::canInsert" qsqlcursor.html#canInsert +"QSqlCursor::canUpdate" qsqlcursor.html#canUpdate +"QSqlCursor::clear" qsqlcursor.html#clear +"QSqlCursor::del" qsqlcursor.html#del +"QSqlCursor::editBuffer" qsqlcursor.html#editBuffer +"QSqlCursor::filter" qsqlcursor.html#filter +"QSqlCursor::index" qsqlcursor.html#index +"QSqlCursor::insert" qsqlcursor.html#insert +"QSqlCursor::isCalculated" qsqlcursor.html#isCalculated +"QSqlCursor::isNull" qsqlcursor.html#isNull +"QSqlCursor::isReadOnly" qsqlcursor.html#isReadOnly +"QSqlCursor::isTrimmed" qsqlcursor.html#isTrimmed +"QSqlCursor::mode" qsqlcursor.html#mode +"QSqlCursor::name" qsqlcursor.html#name +"QSqlCursor::operator=" qsqlcursor.html#operator-eq +"QSqlCursor::primaryIndex" qsqlcursor.html#primaryIndex +"QSqlCursor::primeDelete" qsqlcursor.html#primeDelete +"QSqlCursor::primeInsert" qsqlcursor.html#primeInsert +"QSqlCursor::primeUpdate" qsqlcursor.html#primeUpdate +"QSqlCursor::remove" qsqlcursor.html#remove +"QSqlCursor::select" qsqlcursor.html#select +"QSqlCursor::setCalculated" qsqlcursor.html#setCalculated +"QSqlCursor::setFilter" qsqlcursor.html#setFilter +"QSqlCursor::setGenerated" qsqlcursor.html#setGenerated +"QSqlCursor::setMode" qsqlcursor.html#setMode +"QSqlCursor::setName" qsqlcursor.html#setName +"QSqlCursor::setPrimaryIndex" qsqlcursor.html#setPrimaryIndex +"QSqlCursor::setSort" qsqlcursor.html#setSort +"QSqlCursor::setTrimmed" qsqlcursor.html#setTrimmed +"QSqlCursor::sort" qsqlcursor.html#sort +"QSqlCursor::toString" qsqlcursor.html#toString +"QSqlCursor::update" qsqlcursor.html#update +"QSqlCursor::~QSqlCursor" qsqlcursor.html#~QSqlCursor +"QSqlDatabase" qsqldatabase.html +"QSqlDatabase::addDatabase" qsqldatabase.html#addDatabase +"QSqlDatabase::close" qsqldatabase.html#close +"QSqlDatabase::commit" qsqldatabase.html#commit +"QSqlDatabase::connectOptions" qsqldatabase.html#connectOptions +"QSqlDatabase::connectOptions" qsqldatabase.html#connectOptions-prop +"QSqlDatabase::contains" qsqldatabase.html#contains +"QSqlDatabase::database" qsqldatabase.html#database +"QSqlDatabase::databaseName" qsqldatabase.html#databaseName +"QSqlDatabase::databaseName" qsqldatabase.html#databaseName-prop +"QSqlDatabase::driver" qsqldatabase.html#driver +"QSqlDatabase::driverName" qsqldatabase.html#driverName +"QSqlDatabase::drivers" qsqldatabase.html#drivers +"QSqlDatabase::exec" qsqldatabase.html#exec +"QSqlDatabase::hostName" qsqldatabase.html#hostName +"QSqlDatabase::hostName" qsqldatabase.html#hostName-prop +"QSqlDatabase::isDriverAvailable" qsqldatabase.html#isDriverAvailable +"QSqlDatabase::isOpen" qsqldatabase.html#isOpen +"QSqlDatabase::isOpenError" qsqldatabase.html#isOpenError +"QSqlDatabase::lastError" qsqldatabase.html#lastError +"QSqlDatabase::open" qsqldatabase.html#open +"QSqlDatabase::password" qsqldatabase.html#password +"QSqlDatabase::password" qsqldatabase.html#password-prop +"QSqlDatabase::port" qsqldatabase.html#port +"QSqlDatabase::port" qsqldatabase.html#port-prop +"QSqlDatabase::primaryIndex" qsqldatabase.html#primaryIndex +"QSqlDatabase::record" qsqldatabase.html#record +"QSqlDatabase::recordInfo" qsqldatabase.html#recordInfo +"QSqlDatabase::registerSqlDriver" qsqldatabase.html#registerSqlDriver +"QSqlDatabase::removeDatabase" qsqldatabase.html#removeDatabase +"QSqlDatabase::rollback" qsqldatabase.html#rollback +"QSqlDatabase::setConnectOptions" qsqldatabase.html#setConnectOptions +"QSqlDatabase::setDatabaseName" qsqldatabase.html#setDatabaseName +"QSqlDatabase::setHostName" qsqldatabase.html#setHostName +"QSqlDatabase::setPassword" qsqldatabase.html#setPassword +"QSqlDatabase::setPort" qsqldatabase.html#setPort +"QSqlDatabase::setUserName" qsqldatabase.html#setUserName +"QSqlDatabase::tables" qsqldatabase.html#tables +"QSqlDatabase::transaction" qsqldatabase.html#transaction +"QSqlDatabase::userName" qsqldatabase.html#userName +"QSqlDatabase::userName" qsqldatabase.html#userName-prop +"QSqlDatabase::~QSqlDatabase" qsqldatabase.html#~QSqlDatabase +"QSqlDriver" qsqldriver.html +"QSqlDriver::DriverFeature" qsqldriver.html#DriverFeature +"QSqlDriver::beginTransaction" qsqldriver.html#beginTransaction +"QSqlDriver::close" qsqldriver.html#close +"QSqlDriver::commitTransaction" qsqldriver.html#commitTransaction +"QSqlDriver::createQuery" qsqldriver.html#createQuery +"QSqlDriver::formatValue" qsqldriver.html#formatValue +"QSqlDriver::hasFeature" qsqldriver.html#hasFeature +"QSqlDriver::isOpen" qsqldriver.html#isOpen +"QSqlDriver::isOpenError" qsqldriver.html#isOpenError +"QSqlDriver::lastError" qsqldriver.html#lastError +"QSqlDriver::nullText" qsqldriver.html#nullText +"QSqlDriver::open" qsqldriver.html#open +"QSqlDriver::primaryIndex" qsqldriver.html#primaryIndex +"QSqlDriver::record" qsqldriver.html#record +"QSqlDriver::recordInfo" qsqldriver.html#recordInfo +"QSqlDriver::rollbackTransaction" qsqldriver.html#rollbackTransaction +"QSqlDriver::setLastError" qsqldriver.html#setLastError +"QSqlDriver::setOpen" qsqldriver.html#setOpen +"QSqlDriver::setOpenError" qsqldriver.html#setOpenError +"QSqlDriver::tables" qsqldriver.html#tables +"QSqlDriver::~QSqlDriver" qsqldriver.html#~QSqlDriver +"QSqlDriverPlugin" qsqldriverplugin.html +"QSqlDriverPlugin::create" qsqldriverplugin.html#create +"QSqlDriverPlugin::keys" qsqldriverplugin.html#keys +"QSqlDriverPlugin::~QSqlDriverPlugin" qsqldriverplugin.html#~QSqlDriverPlugin +"QSqlEditorFactory" qsqleditorfactory.html +"QSqlEditorFactory::createEditor" qsqleditorfactory.html#createEditor +"QSqlEditorFactory::defaultFactory" qsqleditorfactory.html#defaultFactory +"QSqlEditorFactory::installDefaultFactory" qsqleditorfactory.html#installDefaultFactory +"QSqlEditorFactory::~QSqlEditorFactory" qsqleditorfactory.html#~QSqlEditorFactory +"QSqlError" qsqlerror.html +"QSqlError::Type" qsqlerror.html#Type +"QSqlError::databaseText" qsqlerror.html#databaseText +"QSqlError::driverText" qsqlerror.html#driverText +"QSqlError::number" qsqlerror.html#number +"QSqlError::operator=" qsqlerror.html#operator-eq +"QSqlError::setDatabaseText" qsqlerror.html#setDatabaseText +"QSqlError::setDriverText" qsqlerror.html#setDriverText +"QSqlError::setNumber" qsqlerror.html#setNumber +"QSqlError::setType" qsqlerror.html#setType +"QSqlError::text" qsqlerror.html#text +"QSqlError::type" qsqlerror.html#type +"QSqlError::~QSqlError" qsqlerror.html#~QSqlError +"QSqlField" qsqlfield.html +"QSqlField::clear" qsqlfield.html#clear +"QSqlField::isNull" qsqlfield.html#isNull +"QSqlField::isReadOnly" qsqlfield.html#isReadOnly +"QSqlField::name" qsqlfield.html#name +"QSqlField::operator=" qsqlfield.html#operator-eq +"QSqlField::operator==" qsqlfield.html#operator-eq-eq +"QSqlField::setName" qsqlfield.html#setName +"QSqlField::setNull" qsqlfield.html#setNull +"QSqlField::setReadOnly" qsqlfield.html#setReadOnly +"QSqlField::setValue" qsqlfield.html#setValue +"QSqlField::type" qsqlfield.html#type +"QSqlField::value" qsqlfield.html#value +"QSqlField::~QSqlField" qsqlfield.html#~QSqlField +"QSqlFieldInfo" qsqlfieldinfo.html +"QSqlFieldInfo::defaultValue" qsqlfieldinfo.html#defaultValue +"QSqlFieldInfo::isCalculated" qsqlfieldinfo.html#isCalculated +"QSqlFieldInfo::isGenerated" qsqlfieldinfo.html#isGenerated +"QSqlFieldInfo::isRetquired" qsqlfieldinfo.html#isRetquired +"QSqlFieldInfo::isTrim" qsqlfieldinfo.html#isTrim +"QSqlFieldInfo::length" qsqlfieldinfo.html#length +"QSqlFieldInfo::name" qsqlfieldinfo.html#name +"QSqlFieldInfo::operator=" qsqlfieldinfo.html#operator-eq +"QSqlFieldInfo::operator==" qsqlfieldinfo.html#operator-eq-eq +"QSqlFieldInfo::precision" qsqlfieldinfo.html#precision +"QSqlFieldInfo::setCalculated" qsqlfieldinfo.html#setCalculated +"QSqlFieldInfo::setGenerated" qsqlfieldinfo.html#setGenerated +"QSqlFieldInfo::setTrim" qsqlfieldinfo.html#setTrim +"QSqlFieldInfo::toField" qsqlfieldinfo.html#toField +"QSqlFieldInfo::type" qsqlfieldinfo.html#type +"QSqlFieldInfo::typeID" qsqlfieldinfo.html#typeID +"QSqlFieldInfo::~QSqlFieldInfo" qsqlfieldinfo.html#~QSqlFieldInfo +"QSqlForm" qsqlform.html +"QSqlForm::clear" qsqlform.html#clear +"QSqlForm::clearValues" qsqlform.html#clearValues +"QSqlForm::count" qsqlform.html#count +"QSqlForm::fieldToWidget" qsqlform.html#fieldToWidget +"QSqlForm::insert" qsqlform.html#insert +"QSqlForm::installPropertyMap" qsqlform.html#installPropertyMap +"QSqlForm::readField" qsqlform.html#readField +"QSqlForm::readFields" qsqlform.html#readFields +"QSqlForm::remove" qsqlform.html#remove +"QSqlForm::setRecord" qsqlform.html#setRecord +"QSqlForm::widget" qsqlform.html#widget +"QSqlForm::widgetToField" qsqlform.html#widgetToField +"QSqlForm::writeField" qsqlform.html#writeField +"QSqlForm::writeFields" qsqlform.html#writeFields +"QSqlForm::~QSqlForm" qsqlform.html#~QSqlForm +"QSqlIndex" qsqlindex.html +"QSqlIndex::append" qsqlindex.html#append +"QSqlIndex::cursorName" qsqlindex.html#cursorName +"QSqlIndex::fromStringList" qsqlindex.html#fromStringList +"QSqlIndex::isDescending" qsqlindex.html#isDescending +"QSqlIndex::name" qsqlindex.html#name +"QSqlIndex::operator=" qsqlindex.html#operator-eq +"QSqlIndex::setCursorName" qsqlindex.html#setCursorName +"QSqlIndex::setDescending" qsqlindex.html#setDescending +"QSqlIndex::setName" qsqlindex.html#setName +"QSqlIndex::~QSqlIndex" qsqlindex.html#~QSqlIndex +"QSqlPropertyMap" qsqlpropertymap.html +"QSqlPropertyMap::defaultMap" qsqlpropertymap.html#defaultMap +"QSqlPropertyMap::insert" qsqlpropertymap.html#insert +"QSqlPropertyMap::installDefaultMap" qsqlpropertymap.html#installDefaultMap +"QSqlPropertyMap::property" qsqlpropertymap.html#property +"QSqlPropertyMap::remove" qsqlpropertymap.html#remove +"QSqlPropertyMap::setProperty" qsqlpropertymap.html#setProperty +"QSqlPropertyMap::~QSqlPropertyMap" qsqlpropertymap.html#~QSqlPropertyMap +"QSqlQuery" qsqlquery.html +"QSqlQuery::addBindValue" qsqlquery.html#addBindValue +"QSqlQuery::afterSeek" qsqlquery.html#afterSeek +"QSqlQuery::at" qsqlquery.html#at +"QSqlQuery::beforeSeek" qsqlquery.html#beforeSeek +"QSqlQuery::bindValue" qsqlquery.html#bindValue +"QSqlQuery::boundValue" qsqlquery.html#boundValue +"QSqlQuery::boundValues" qsqlquery.html#boundValues +"QSqlQuery::driver" qsqlquery.html#driver +"QSqlQuery::exec" qsqlquery.html#exec +"QSqlQuery::executedQuery" qsqlquery.html#executedQuery +"QSqlQuery::first" qsqlquery.html#first +"QSqlQuery::isActive" qsqlquery.html#isActive +"QSqlQuery::isForwardOnly" qsqlquery.html#isForwardOnly +"QSqlQuery::isNull" qsqlquery.html#isNull +"QSqlQuery::isSelect" qsqlquery.html#isSelect +"QSqlQuery::isValid" qsqlquery.html#isValid +"QSqlQuery::last" qsqlquery.html#last +"QSqlQuery::lastError" qsqlquery.html#lastError +"QSqlQuery::lastQuery" qsqlquery.html#lastQuery +"QSqlQuery::next" qsqlquery.html#next +"QSqlQuery::numRowsAffected" qsqlquery.html#numRowsAffected +"QSqlQuery::operator=" qsqlquery.html#operator-eq +"QSqlQuery::prepare" qsqlquery.html#prepare +"QSqlQuery::prev" qsqlquery.html#prev +"QSqlQuery::result" qsqlquery.html#result +"QSqlQuery::seek" qsqlquery.html#seek +"QSqlQuery::setForwardOnly" qsqlquery.html#setForwardOnly +"QSqlQuery::size" qsqlquery.html#size +"QSqlQuery::value" qsqlquery.html#value +"QSqlQuery::~QSqlQuery" qsqlquery.html#~QSqlQuery +"QSqlRecord" qsqlrecord.html +"QSqlRecord::append" qsqlrecord.html#append +"QSqlRecord::clear" qsqlrecord.html#clear +"QSqlRecord::clearValues" qsqlrecord.html#clearValues +"QSqlRecord::contains" qsqlrecord.html#contains +"QSqlRecord::count" qsqlrecord.html#count +"QSqlRecord::field" qsqlrecord.html#field +"QSqlRecord::fieldName" qsqlrecord.html#fieldName +"QSqlRecord::insert" qsqlrecord.html#insert +"QSqlRecord::isEmpty" qsqlrecord.html#isEmpty +"QSqlRecord::isGenerated" qsqlrecord.html#isGenerated +"QSqlRecord::isNull" qsqlrecord.html#isNull +"QSqlRecord::operator=" qsqlrecord.html#operator-eq +"QSqlRecord::position" qsqlrecord.html#position +"QSqlRecord::remove" qsqlrecord.html#remove +"QSqlRecord::setGenerated" qsqlrecord.html#setGenerated +"QSqlRecord::setNull" qsqlrecord.html#setNull +"QSqlRecord::setValue" qsqlrecord.html#setValue +"QSqlRecord::toString" qsqlrecord.html#toString +"QSqlRecord::toStringList" qsqlrecord.html#toStringList +"QSqlRecord::value" qsqlrecord.html#value +"QSqlRecord::~QSqlRecord" qsqlrecord.html#~QSqlRecord +"QSqlRecordInfo" qsqlrecordinfo.html +"QSqlRecordInfo::contains" qsqlrecordinfo.html#contains +"QSqlRecordInfo::find" qsqlrecordinfo.html#find +"QSqlRecordInfo::toRecord" qsqlrecordinfo.html#toRecord +"QSqlResult" qsqlresult.html +"QSqlResult::at" qsqlresult.html#at +"QSqlResult::data" qsqlresult.html#data +"QSqlResult::driver" qsqlresult.html#driver +"QSqlResult::fetch" qsqlresult.html#fetch +"QSqlResult::fetchFirst" qsqlresult.html#fetchFirst +"QSqlResult::fetchLast" qsqlresult.html#fetchLast +"QSqlResult::fetchNext" qsqlresult.html#fetchNext +"QSqlResult::fetchPrev" qsqlresult.html#fetchPrev +"QSqlResult::isActive" qsqlresult.html#isActive +"QSqlResult::isForwardOnly" qsqlresult.html#isForwardOnly +"QSqlResult::isNull" qsqlresult.html#isNull +"QSqlResult::isSelect" qsqlresult.html#isSelect +"QSqlResult::isValid" qsqlresult.html#isValid +"QSqlResult::lastError" qsqlresult.html#lastError +"QSqlResult::lastQuery" qsqlresult.html#lastQuery +"QSqlResult::numRowsAffected" qsqlresult.html#numRowsAffected +"QSqlResult::reset" qsqlresult.html#reset +"QSqlResult::setActive" qsqlresult.html#setActive +"QSqlResult::setAt" qsqlresult.html#setAt +"QSqlResult::setForwardOnly" qsqlresult.html#setForwardOnly +"QSqlResult::setLastError" qsqlresult.html#setLastError +"QSqlResult::setQuery" qsqlresult.html#setQuery +"QSqlResult::setSelect" qsqlresult.html#setSelect +"QSqlResult::size" qsqlresult.html#size +"QSqlResult::~QSqlResult" qsqlresult.html#~QSqlResult +"QSqlSelectCursor" qsqlselectcursor.html +"QSqlSelectCursor::~QSqlSelectCursor" qsqlselectcursor.html#~QSqlSelectCursor +"QStack Class Reference (obsolete)" qstack.html +"QStatusBar" qstatusbar.html +"QStatusBar::addWidget" qstatusbar.html#addWidget +"QStatusBar::clear" qstatusbar.html#clear +"QStatusBar::hideOrShow" qstatusbar.html#hideOrShow +"QStatusBar::isSizeGripEnabled" qstatusbar.html#isSizeGripEnabled +"QStatusBar::message" qstatusbar.html#message +"QStatusBar::messageChanged" qstatusbar.html#messageChanged +"QStatusBar::paintEvent" qstatusbar.html#paintEvent +"QStatusBar::reformat" qstatusbar.html#reformat +"QStatusBar::removeWidget" qstatusbar.html#removeWidget +"QStatusBar::setSizeGripEnabled" qstatusbar.html#setSizeGripEnabled +"QStatusBar::sizeGripEnabled" qstatusbar.html#sizeGripEnabled-prop +"QStatusBar::~QStatusBar" qstatusbar.html#~QStatusBar +"QStoredDrag" qstoreddrag.html +"QStoredDrag::encodedData" qstoreddrag.html#encodedData +"QStoredDrag::setEncodedData" qstoreddrag.html#setEncodedData +"QStoredDrag::~QStoredDrag" qstoreddrag.html#~QStoredDrag +"QStrIList" qstrilist.html +"QStrIList::~QStrIList" qstrilist.html#~QStrIList +"QStrList" qstrlist.html +"QStrList::operator=" qstrlist.html#operator-eq +"QStrList::~QStrList" qstrlist.html#~QStrList +"QStrListIterator" qstrlistiterator.html +"QString" qstring.html +"QString::SectionFlags" qstring.html#SectionFlags +"QString::append" qstring.html#append +"QString::arg" qstring.html#arg +"QString::ascii" qstring.html#ascii +"QString::at" qstring.html#at +"QString::capacity" qstring.html#capacity +"QString::compare" qstring.html#compare +"QString::compose" qstring.html#compose +"QString::constref" qstring.html#constref +"QString::contains" qstring.html#contains +"QString::detach" qstring.html#detach +"QString::endsWith" qstring.html#endsWith +"QString::fill" qstring.html#fill +"QString::find" qstring.html#find +"QString::findRev" qstring.html#findRev +"QString::fromAscii" qstring.html#fromAscii +"QString::fromLatin1" qstring.html#fromLatin1 +"QString::fromLocal8Bit" qstring.html#fromLocal8Bit +"QString::fromUcs2" qstring.html#fromUcs2 +"QString::fromUtf8" qstring.html#fromUtf8 +"QString::insert" qstring.html#insert +"QString::isEmpty" qstring.html#isEmpty +"QString::isNull" qstring.html#isNull +"QString::latin1" qstring.html#latin1 +"QString::latin1ToUnicode" qstring.html#latin1ToUnicode +"QString::left" qstring.html#left +"QString::leftJustify" qstring.html#leftJustify +"QString::length" qstring.html#length +"QString::local8Bit" qstring.html#local8Bit +"QString::localeAwareCompare" qstring.html#localeAwareCompare +"QString::lower" qstring.html#lower +"QString::mid" qstring.html#mid +"QString::number" qstring.html#number +"QString::operator const char *" qstring.html#operator-const-char-* +"QString::operator std::string" qstring.html#operator-std::string +"QString::operator!" qstring.html#operator! +"QString::operator+=" qstring.html#operator+-eq +"QString::operator=" qstring.html#operator-eq +"QString::operator[]" qstring.html#operator[] +"QString::prepend" qstring.html#prepend +"QString::real_detach" qstring.html#real_detach +"QString::ref" qstring.html#ref +"QString::remove" qstring.html#remove +"QString::replace" qstring.html#replace +"QString::reserve" qstring.html#reserve +"QString::right" qstring.html#right +"QString::rightJustify" qstring.html#rightJustify +"QString::section" qstring.html#section +"QString::setAscii" qstring.html#setAscii +"QString::setLatin1" qstring.html#setLatin1 +"QString::setLength" qstring.html#setLength +"QString::setNum" qstring.html#setNum +"QString::setUnicode" qstring.html#setUnicode +"QString::setUnicodeCodes" qstring.html#setUnicodeCodes +"QString::simplifyWhiteSpace" qstring.html#simplifyWhiteSpace +"QString::sprintf" qstring.html#sprintf +"QString::squeeze" qstring.html#squeeze +"QString::startsWith" qstring.html#startsWith +"QString::stripWhiteSpace" qstring.html#stripWhiteSpace +"QString::toDouble" qstring.html#toDouble +"QString::toFloat" qstring.html#toFloat +"QString::toInt" qstring.html#toInt +"QString::toLong" qstring.html#toLong +"QString::toLongLong" qstring.html#toLongLong +"QString::toShort" qstring.html#toShort +"QString::toUInt" qstring.html#toUInt +"QString::toULong" qstring.html#toULong +"QString::toULongLong" qstring.html#toULongLong +"QString::toUShort" qstring.html#toUShort +"QString::truncate" qstring.html#truncate +"QString::ucs2" qstring.html#ucs2 +"QString::unicode" qstring.html#unicode +"QString::unicodeToLatin1" qstring.html#unicodeToLatin1 +"QString::upper" qstring.html#upper +"QString::utf8" qstring.html#utf8 +"QString::~QString" qstring.html#~QString +"QStringList" qstringlist.html +"QStringList::fromStrList" qstringlist.html#fromStrList +"QStringList::grep" qstringlist.html#grep +"QStringList::gres" qstringlist.html#gres +"QStringList::join" qstringlist.html#join +"QStringList::sort" qstringlist.html#sort +"QStringList::split" qstringlist.html#split +"QStyle" qstyle.html +"QStyle::ComplexControl" qstyle.html#ComplexControl +"QStyle::ContentsType" qstyle.html#ContentsType +"QStyle::ControlElement" qstyle.html#ControlElement +"QStyle::PixelMetric" qstyle.html#PixelMetric +"QStyle::PrimitiveElement" qstyle.html#PrimitiveElement +"QStyle::StyleFlags" qstyle.html#StyleFlags +"QStyle::StyleHint" qstyle.html#StyleHint +"QStyle::StylePixmap" qstyle.html#StylePixmap +"QStyle::SubControl" qstyle.html#SubControl +"QStyle::SubRect" qstyle.html#SubRect +"QStyle::drawComplexControl" qstyle.html#drawComplexControl +"QStyle::drawComplexControlMask" qstyle.html#drawComplexControlMask +"QStyle::drawControl" qstyle.html#drawControl +"QStyle::drawControlMask" qstyle.html#drawControlMask +"QStyle::drawItem" qstyle.html#drawItem +"QStyle::drawPrimitive" qstyle.html#drawPrimitive +"QStyle::itemRect" qstyle.html#itemRect +"QStyle::pixelMetric" qstyle.html#pixelMetric +"QStyle::polish" qstyle.html#polish +"QStyle::polishPopupMenu" qstyle.html#polishPopupMenu +"QStyle::querySubControl" qstyle.html#querySubControl +"QStyle::querySubControlMetrics" qstyle.html#querySubControlMetrics +"QStyle::sizeFromContents" qstyle.html#sizeFromContents +"QStyle::styleHint" qstyle.html#styleHint +"QStyle::stylePixmap" qstyle.html#stylePixmap +"QStyle::subRect" qstyle.html#subRect +"QStyle::unPolish" qstyle.html#unPolish +"QStyle::visualRect" qstyle.html#visualRect +"QStyle::~QStyle" qstyle.html#~QStyle +"QStyleFactory" qstylefactory.html +"QStyleFactory::create" qstylefactory.html#create +"QStyleFactory::keys" qstylefactory.html#keys +"QStyleOption" qstyleoption.html +"QStyleOption::StyleOptionDefault" qstyleoption.html#StyleOptionDefault +"QStyleOption::arrowType" qstyleoption.html#arrowType +"QStyleOption::checkListItem" qstyleoption.html#checkListItem +"QStyleOption::color" qstyleoption.html#color +"QStyleOption::day" qstyleoption.html#day +"QStyleOption::frameShadow" qstyleoption.html#frameShadow +"QStyleOption::frameShape" qstyleoption.html#frameShape +"QStyleOption::headerSection" qstyleoption.html#headerSection +"QStyleOption::isDefault" qstyleoption.html#isDefault +"QStyleOption::lineWidth" qstyleoption.html#lineWidth +"QStyleOption::listViewItem" qstyleoption.html#listViewItem +"QStyleOption::maxIconWidth" qstyleoption.html#maxIconWidth +"QStyleOption::menuItem" qstyleoption.html#menuItem +"QStyleOption::midLineWidth" qstyleoption.html#midLineWidth +"QStyleOption::rect" qstyleoption.html#rect +"QStyleOption::tab" qstyleoption.html#tab +"QStyleOption::tabWidth" qstyleoption.html#tabWidth +"QStyleOption::widget" qstyleoption.html#widget +"QStylePlugin" qstyleplugin.html +"QStylePlugin::create" qstyleplugin.html#create +"QStylePlugin::keys" qstyleplugin.html#keys +"QStylePlugin::~QStylePlugin" qstyleplugin.html#~QStylePlugin +"QStyleSheet" qstylesheet.html +"QStyleSheet::convertFromPlainText" qstylesheet.html#convertFromPlainText +"QStyleSheet::defaultSheet" qstylesheet.html#defaultSheet +"QStyleSheet::error" qstylesheet.html#error +"QStyleSheet::escape" qstylesheet.html#escape +"QStyleSheet::item" qstylesheet.html#item +"QStyleSheet::mightBeRichText" qstylesheet.html#mightBeRichText +"QStyleSheet::scaleFont" qstylesheet.html#scaleFont +"QStyleSheet::setDefaultSheet" qstylesheet.html#setDefaultSheet +"QStyleSheet::tag" qstylesheet.html#tag +"QStyleSheet::~QStyleSheet" qstylesheet.html#~QStyleSheet +"QStyleSheetItem" qstylesheetitem.html +"QStyleSheetItem::DisplayMode" qstylesheetitem.html#DisplayMode +"QStyleSheetItem::ListStyle" qstylesheetitem.html#ListStyle +"QStyleSheetItem::Margin" qstylesheetitem.html#Margin +"QStyleSheetItem::VerticalAlignment" qstylesheetitem.html#VerticalAlignment +"QStyleSheetItem::WhiteSpaceMode" qstylesheetitem.html#WhiteSpaceMode +"QStyleSheetItem::alignment" qstylesheetitem.html#alignment +"QStyleSheetItem::allowedInContext" qstylesheetitem.html#allowedInContext +"QStyleSheetItem::color" qstylesheetitem.html#color +"QStyleSheetItem::contexts" qstylesheetitem.html#contexts +"QStyleSheetItem::definesFontItalic" qstylesheetitem.html#definesFontItalic +"QStyleSheetItem::definesFontStrikeOut" qstylesheetitem.html#definesFontStrikeOut +"QStyleSheetItem::definesFontUnderline" qstylesheetitem.html#definesFontUnderline +"QStyleSheetItem::displayMode" qstylesheetitem.html#displayMode +"QStyleSheetItem::fontFamily" qstylesheetitem.html#fontFamily +"QStyleSheetItem::fontItalic" qstylesheetitem.html#fontItalic +"QStyleSheetItem::fontSize" qstylesheetitem.html#fontSize +"QStyleSheetItem::fontStrikeOut" qstylesheetitem.html#fontStrikeOut +"QStyleSheetItem::fontUnderline" qstylesheetitem.html#fontUnderline +"QStyleSheetItem::fontWeight" qstylesheetitem.html#fontWeight +"QStyleSheetItem::isAnchor" qstylesheetitem.html#isAnchor +"QStyleSheetItem::listStyle" qstylesheetitem.html#listStyle +"QStyleSheetItem::logicalFontSize" qstylesheetitem.html#logicalFontSize +"QStyleSheetItem::logicalFontSizeStep" qstylesheetitem.html#logicalFontSizeStep +"QStyleSheetItem::margin" qstylesheetitem.html#margin +"QStyleSheetItem::name" qstylesheetitem.html#name +"QStyleSheetItem::operator=" qstylesheetitem.html#operator-eq +"QStyleSheetItem::selfNesting" qstylesheetitem.html#selfNesting +"QStyleSheetItem::setAlignment" qstylesheetitem.html#setAlignment +"QStyleSheetItem::setAnchor" qstylesheetitem.html#setAnchor +"QStyleSheetItem::setColor" qstylesheetitem.html#setColor +"QStyleSheetItem::setContexts" qstylesheetitem.html#setContexts +"QStyleSheetItem::setDisplayMode" qstylesheetitem.html#setDisplayMode +"QStyleSheetItem::setFontFamily" qstylesheetitem.html#setFontFamily +"QStyleSheetItem::setFontItalic" qstylesheetitem.html#setFontItalic +"QStyleSheetItem::setFontSize" qstylesheetitem.html#setFontSize +"QStyleSheetItem::setFontStrikeOut" qstylesheetitem.html#setFontStrikeOut +"QStyleSheetItem::setFontUnderline" qstylesheetitem.html#setFontUnderline +"QStyleSheetItem::setFontWeight" qstylesheetitem.html#setFontWeight +"QStyleSheetItem::setListStyle" qstylesheetitem.html#setListStyle +"QStyleSheetItem::setLogicalFontSize" qstylesheetitem.html#setLogicalFontSize +"QStyleSheetItem::setLogicalFontSizeStep" qstylesheetitem.html#setLogicalFontSizeStep +"QStyleSheetItem::setMargin" qstylesheetitem.html#setMargin +"QStyleSheetItem::setSelfNesting" qstylesheetitem.html#setSelfNesting +"QStyleSheetItem::setVerticalAlignment" qstylesheetitem.html#setVerticalAlignment +"QStyleSheetItem::setWhiteSpaceMode" qstylesheetitem.html#setWhiteSpaceMode +"QStyleSheetItem::styleSheet" qstylesheetitem.html#styleSheet +"QStyleSheetItem::verticalAlignment" qstylesheetitem.html#verticalAlignment +"QStyleSheetItem::whiteSpaceMode" qstylesheetitem.html#whiteSpaceMode +"QStyleSheetItem::~QStyleSheetItem" qstylesheetitem.html#~QStyleSheetItem +"QSvgDevice::boundingRect" qsvgdevice.html#boundingRect +"QSvgDevice::load" qsvgdevice.html#load +"QSvgDevice::metric" qsvgdevice.html#metric +"QSvgDevice::play" qsvgdevice.html#play +"QSvgDevice::save" qsvgdevice.html#save +"QSvgDevice::setBoundingRect" qsvgdevice.html#setBoundingRect +"QSvgDevice::toString" qsvgdevice.html#toString +"QSvgDevice::~QSvgDevice" qsvgdevice.html#~QSvgDevice +"QSyntaxHighlighter" qsyntaxhighlighter.html +"QSyntaxHighlighter::currentParagraph" qsyntaxhighlighter.html#currentParagraph +"QSyntaxHighlighter::highlightParagraph" qsyntaxhighlighter.html#highlightParagraph +"QSyntaxHighlighter::rehighlight" qsyntaxhighlighter.html#rehighlight +"QSyntaxHighlighter::setFormat" qsyntaxhighlighter.html#setFormat +"QSyntaxHighlighter::textEdit" qsyntaxhighlighter.html#textEdit +"QSyntaxHighlighter::~QSyntaxHighlighter" qsyntaxhighlighter.html#~QSyntaxHighlighter +"QTSManip::exec" qtsmanip.html#exec +"QTab" qtab.html +"QTab::iconSet" qtab.html#iconSet +"QTab::identifier" qtab.html#identifier +"QTab::isEnabled" qtab.html#isEnabled +"QTab::rect" qtab.html#rect +"QTab::setEnabled" qtab.html#setEnabled +"QTab::setIconSet" qtab.html#setIconSet +"QTab::setIdentifier" qtab.html#setIdentifier +"QTab::setRect" qtab.html#setRect +"QTab::setText" qtab.html#setText +"QTab::text" qtab.html#text +"QTab::~QTab" qtab.html#~QTab +"QTabBar" qtabbar.html +"QTabBar::Shape" qtabbar.html#Shape +"QTabBar::addTab" qtabbar.html#addTab +"QTabBar::count" qtabbar.html#count +"QTabBar::count" qtabbar.html#count-prop +"QTabBar::currentTab" qtabbar.html#currentTab +"QTabBar::currentTab" qtabbar.html#currentTab-prop +"QTabBar::indexOf" qtabbar.html#indexOf +"QTabBar::insertTab" qtabbar.html#insertTab +"QTabBar::isTabEnabled" qtabbar.html#isTabEnabled +"QTabBar::keyboardFocusTab" qtabbar.html#keyboardFocusTab +"QTabBar::keyboardFocusTab" qtabbar.html#keyboardFocusTab-prop +"QTabBar::layoutChanged" qtabbar.html#layoutChanged +"QTabBar::layoutTabs" qtabbar.html#layoutTabs +"QTabBar::paint" qtabbar.html#paint +"QTabBar::paintEvent" qtabbar.html#paintEvent +"QTabBar::paintLabel" qtabbar.html#paintLabel +"QTabBar::removeTab" qtabbar.html#removeTab +"QTabBar::removeToolTip" qtabbar.html#removeToolTip +"QTabBar::selectTab" qtabbar.html#selectTab +"QTabBar::selected" qtabbar.html#selected +"QTabBar::setCurrentTab" qtabbar.html#setCurrentTab +"QTabBar::setShape" qtabbar.html#setShape +"QTabBar::setTabEnabled" qtabbar.html#setTabEnabled +"QTabBar::setToolTip" qtabbar.html#setToolTip +"QTabBar::shape" qtabbar.html#shape +"QTabBar::shape" qtabbar.html#shape-prop +"QTabBar::tab" qtabbar.html#tab +"QTabBar::tabAt" qtabbar.html#tabAt +"QTabBar::tabList" qtabbar.html#tabList +"QTabBar::toolTip" qtabbar.html#toolTip +"QTabBar::~QTabBar" qtabbar.html#~QTabBar +"QTabDialog" qtabdialog.html +"QTabDialog::aboutToShow" qtabdialog.html#aboutToShow +"QTabDialog::addTab" qtabdialog.html#addTab +"QTabDialog::applyButtonPressed" qtabdialog.html#applyButtonPressed +"QTabDialog::cancelButtonPressed" qtabdialog.html#cancelButtonPressed +"QTabDialog::changeTab" qtabdialog.html#changeTab +"QTabDialog::currentChanged" qtabdialog.html#currentChanged +"QTabDialog::currentPage" qtabdialog.html#currentPage +"QTabDialog::defaultButtonPressed" qtabdialog.html#defaultButtonPressed +"QTabDialog::hasApplyButton" qtabdialog.html#hasApplyButton +"QTabDialog::hasCancelButton" qtabdialog.html#hasCancelButton +"QTabDialog::hasDefaultButton" qtabdialog.html#hasDefaultButton +"QTabDialog::hasHelpButton" qtabdialog.html#hasHelpButton +"QTabDialog::hasOkButton" qtabdialog.html#hasOkButton +"QTabDialog::helpButtonPressed" qtabdialog.html#helpButtonPressed +"QTabDialog::insertTab" qtabdialog.html#insertTab +"QTabDialog::isTabEnabled" qtabdialog.html#isTabEnabled +"QTabDialog::removePage" qtabdialog.html#removePage +"QTabDialog::setApplyButton" qtabdialog.html#setApplyButton +"QTabDialog::setCancelButton" qtabdialog.html#setCancelButton +"QTabDialog::setDefaultButton" qtabdialog.html#setDefaultButton +"QTabDialog::setFont" qtabdialog.html#setFont +"QTabDialog::setHelpButton" qtabdialog.html#setHelpButton +"QTabDialog::setOkButton" qtabdialog.html#setOkButton +"QTabDialog::setSizes" qtabdialog.html#setSizes +"QTabDialog::setTabBar" qtabdialog.html#setTabBar +"QTabDialog::setTabEnabled" qtabdialog.html#setTabEnabled +"QTabDialog::setUpLayout" qtabdialog.html#setUpLayout +"QTabDialog::showPage" qtabdialog.html#showPage +"QTabDialog::showTab" qtabdialog.html#showTab +"QTabDialog::tabBar" qtabdialog.html#tabBar +"QTabDialog::tabLabel" qtabdialog.html#tabLabel +"QTabDialog::~QTabDialog" qtabdialog.html#~QTabDialog +"QTabWidget" qtabwidget.html +"QTabWidget::TabPosition" qtabwidget.html#TabPosition +"QTabWidget::TabShape" qtabwidget.html#TabShape +"QTabWidget::addTab" qtabwidget.html#addTab +"QTabWidget::autoMask" qtabwidget.html#autoMask-prop +"QTabWidget::changeTab" qtabwidget.html#changeTab +"QTabWidget::cornerWidget" qtabwidget.html#cornerWidget +"QTabWidget::count" qtabwidget.html#count +"QTabWidget::count" qtabwidget.html#count-prop +"QTabWidget::currentChanged" qtabwidget.html#currentChanged +"QTabWidget::currentPage" qtabwidget.html#currentPage +"QTabWidget::currentPage" qtabwidget.html#currentPage-prop +"QTabWidget::currentPageIndex" qtabwidget.html#currentPageIndex +"QTabWidget::indexOf" qtabwidget.html#indexOf +"QTabWidget::insertTab" qtabwidget.html#insertTab +"QTabWidget::isTabEnabled" qtabwidget.html#isTabEnabled +"QTabWidget::label" qtabwidget.html#label +"QTabWidget::margin" qtabwidget.html#margin +"QTabWidget::margin" qtabwidget.html#margin-prop +"QTabWidget::page" qtabwidget.html#page +"QTabWidget::removePage" qtabwidget.html#removePage +"QTabWidget::removeTabToolTip" qtabwidget.html#removeTabToolTip +"QTabWidget::setCornerWidget" qtabwidget.html#setCornerWidget +"QTabWidget::setCurrentPage" qtabwidget.html#setCurrentPage +"QTabWidget::setMargin" qtabwidget.html#setMargin +"QTabWidget::setTabBar" qtabwidget.html#setTabBar +"QTabWidget::setTabEnabled" qtabwidget.html#setTabEnabled +"QTabWidget::setTabIconSet" qtabwidget.html#setTabIconSet +"QTabWidget::setTabLabel" qtabwidget.html#setTabLabel +"QTabWidget::setTabPosition" qtabwidget.html#setTabPosition +"QTabWidget::setTabShape" qtabwidget.html#setTabShape +"QTabWidget::setTabToolTip" qtabwidget.html#setTabToolTip +"QTabWidget::showPage" qtabwidget.html#showPage +"QTabWidget::showTab" qtabwidget.html#showTab +"QTabWidget::tabBar" qtabwidget.html#tabBar +"QTabWidget::tabIconSet" qtabwidget.html#tabIconSet +"QTabWidget::tabLabel" qtabwidget.html#tabLabel +"QTabWidget::tabPosition" qtabwidget.html#tabPosition +"QTabWidget::tabPosition" qtabwidget.html#tabPosition-prop +"QTabWidget::tabShape" qtabwidget.html#tabShape +"QTabWidget::tabShape" qtabwidget.html#tabShape-prop +"QTabWidget::tabToolTip" qtabwidget.html#tabToolTip +"QTable" qtable.html +"QTable::EditMode" qtable.html#EditMode +"QTable::FocusStyle" qtable.html#FocusStyle +"QTable::SelectionMode" qtable.html#SelectionMode +"QTable::activateNextCell" qtable.html#activateNextCell +"QTable::addSelection" qtable.html#addSelection +"QTable::adjustColumn" qtable.html#adjustColumn +"QTable::adjustRow" qtable.html#adjustRow +"QTable::beginEdit" qtable.html#beginEdit +"QTable::cellGeometry" qtable.html#cellGeometry +"QTable::cellRect" qtable.html#cellRect +"QTable::cellWidget" qtable.html#cellWidget +"QTable::clearCell" qtable.html#clearCell +"QTable::clearCellWidget" qtable.html#clearCellWidget +"QTable::clearSelection" qtable.html#clearSelection +"QTable::clicked" qtable.html#clicked +"QTable::columnAt" qtable.html#columnAt +"QTable::columnClicked" qtable.html#columnClicked +"QTable::columnIndexChanged" qtable.html#columnIndexChanged +"QTable::columnMovingEnabled" qtable.html#columnMovingEnabled +"QTable::columnMovingEnabled" qtable.html#columnMovingEnabled-prop +"QTable::columnPos" qtable.html#columnPos +"QTable::columnWidth" qtable.html#columnWidth +"QTable::columnWidthChanged" qtable.html#columnWidthChanged +"QTable::contentsDragEnterEvent" qtable.html#contentsDragEnterEvent +"QTable::contentsDragLeaveEvent" qtable.html#contentsDragLeaveEvent +"QTable::contentsDragMoveEvent" qtable.html#contentsDragMoveEvent +"QTable::contentsDropEvent" qtable.html#contentsDropEvent +"QTable::contextMenuRequested" qtable.html#contextMenuRequested +"QTable::createEditor" qtable.html#createEditor +"QTable::currEditCol" qtable.html#currEditCol +"QTable::currEditRow" qtable.html#currEditRow +"QTable::currentChanged" qtable.html#currentChanged +"QTable::currentColumn" qtable.html#currentColumn +"QTable::currentRow" qtable.html#currentRow +"QTable::currentSelection" qtable.html#currentSelection +"QTable::doubleClicked" qtable.html#doubleClicked +"QTable::dragEnabled" qtable.html#dragEnabled +"QTable::dragObject" qtable.html#dragObject +"QTable::drawContents" qtable.html#drawContents +"QTable::dropped" qtable.html#dropped +"QTable::editCell" qtable.html#editCell +"QTable::editMode" qtable.html#editMode +"QTable::endEdit" qtable.html#endEdit +"QTable::ensureCellVisible" qtable.html#ensureCellVisible +"QTable::focusStyle" qtable.html#focusStyle +"QTable::focusStyle" qtable.html#focusStyle-prop +"QTable::hideColumn" qtable.html#hideColumn +"QTable::hideRow" qtable.html#hideRow +"QTable::horizontalHeader" qtable.html#horizontalHeader +"QTable::indexOf" qtable.html#indexOf +"QTable::insertColumns" qtable.html#insertColumns +"QTable::insertRows" qtable.html#insertRows +"QTable::insertWidget" qtable.html#insertWidget +"QTable::isColumnHidden" qtable.html#isColumnHidden +"QTable::isColumnReadOnly" qtable.html#isColumnReadOnly +"QTable::isColumnSelected" qtable.html#isColumnSelected +"QTable::isColumnStretchable" qtable.html#isColumnStretchable +"QTable::isEditing" qtable.html#isEditing +"QTable::isReadOnly" qtable.html#isReadOnly +"QTable::isRowHidden" qtable.html#isRowHidden +"QTable::isRowReadOnly" qtable.html#isRowReadOnly +"QTable::isRowSelected" qtable.html#isRowSelected +"QTable::isRowStretchable" qtable.html#isRowStretchable +"QTable::isSelected" qtable.html#isSelected +"QTable::item" qtable.html#item +"QTable::numCols" qtable.html#numCols +"QTable::numCols" qtable.html#numCols-prop +"QTable::numRows" qtable.html#numRows +"QTable::numRows" qtable.html#numRows-prop +"QTable::numSelections" qtable.html#numSelections +"QTable::numSelections" qtable.html#numSelections-prop +"QTable::paintCell" qtable.html#paintCell +"QTable::paintEmptyArea" qtable.html#paintEmptyArea +"QTable::paintFocus" qtable.html#paintFocus +"QTable::pixmap" qtable.html#pixmap +"QTable::pressed" qtable.html#pressed +"QTable::readOnly" qtable.html#readOnly-prop +"QTable::removeColumn" qtable.html#removeColumn +"QTable::removeColumns" qtable.html#removeColumns +"QTable::removeRow" qtable.html#removeRow +"QTable::removeRows" qtable.html#removeRows +"QTable::removeSelection" qtable.html#removeSelection +"QTable::repaintSelections" qtable.html#repaintSelections +"QTable::resizeData" qtable.html#resizeData +"QTable::rowAt" qtable.html#rowAt +"QTable::rowHeight" qtable.html#rowHeight +"QTable::rowHeightChanged" qtable.html#rowHeightChanged +"QTable::rowIndexChanged" qtable.html#rowIndexChanged +"QTable::rowMovingEnabled" qtable.html#rowMovingEnabled +"QTable::rowMovingEnabled" qtable.html#rowMovingEnabled-prop +"QTable::rowPos" qtable.html#rowPos +"QTable::selectCells" qtable.html#selectCells +"QTable::selectColumn" qtable.html#selectColumn +"QTable::selectRow" qtable.html#selectRow +"QTable::selection" qtable.html#selection +"QTable::selectionChanged" qtable.html#selectionChanged +"QTable::selectionMode" qtable.html#selectionMode +"QTable::selectionMode" qtable.html#selectionMode-prop +"QTable::setCellContentFromEditor" qtable.html#setCellContentFromEditor +"QTable::setCellWidget" qtable.html#setCellWidget +"QTable::setColumnLabels" qtable.html#setColumnLabels +"QTable::setColumnMovingEnabled" qtable.html#setColumnMovingEnabled +"QTable::setColumnReadOnly" qtable.html#setColumnReadOnly +"QTable::setColumnStretchable" qtable.html#setColumnStretchable +"QTable::setColumnWidth" qtable.html#setColumnWidth +"QTable::setCurrentCell" qtable.html#setCurrentCell +"QTable::setDragEnabled" qtable.html#setDragEnabled +"QTable::setEditMode" qtable.html#setEditMode +"QTable::setFocusStyle" qtable.html#setFocusStyle +"QTable::setItem" qtable.html#setItem +"QTable::setLeftMargin" qtable.html#setLeftMargin +"QTable::setNumCols" qtable.html#setNumCols +"QTable::setNumRows" qtable.html#setNumRows +"QTable::setPixmap" qtable.html#setPixmap +"QTable::setReadOnly" qtable.html#setReadOnly +"QTable::setRowHeight" qtable.html#setRowHeight +"QTable::setRowLabels" qtable.html#setRowLabels +"QTable::setRowMovingEnabled" qtable.html#setRowMovingEnabled +"QTable::setRowReadOnly" qtable.html#setRowReadOnly +"QTable::setRowStretchable" qtable.html#setRowStretchable +"QTable::setSelectionMode" qtable.html#setSelectionMode +"QTable::setShowGrid" qtable.html#setShowGrid +"QTable::setSorting" qtable.html#setSorting +"QTable::setText" qtable.html#setText +"QTable::setTopMargin" qtable.html#setTopMargin +"QTable::showColumn" qtable.html#showColumn +"QTable::showGrid" qtable.html#showGrid +"QTable::showGrid" qtable.html#showGrid-prop +"QTable::showRow" qtable.html#showRow +"QTable::sortColumn" qtable.html#sortColumn +"QTable::sorting" qtable.html#sorting +"QTable::sorting" qtable.html#sorting-prop +"QTable::startDrag" qtable.html#startDrag +"QTable::swapCells" qtable.html#swapCells +"QTable::swapColumns" qtable.html#swapColumns +"QTable::swapRows" qtable.html#swapRows +"QTable::tableSize" qtable.html#tableSize +"QTable::takeItem" qtable.html#takeItem +"QTable::text" qtable.html#text +"QTable::updateCell" qtable.html#updateCell +"QTable::updateGeometries" qtable.html#updateGeometries +"QTable::updateHeaderStates" qtable.html#updateHeaderStates +"QTable::valueChanged" qtable.html#valueChanged +"QTable::verticalHeader" qtable.html#verticalHeader +"QTable::~QTable" qtable.html#~QTable +"QTableItem" qtableitem.html +"QTableItem::EditType" qtableitem.html#EditType +"QTableItem::alignment" qtableitem.html#alignment +"QTableItem::col" qtableitem.html#col +"QTableItem::colSpan" qtableitem.html#colSpan +"QTableItem::createEditor" qtableitem.html#createEditor +"QTableItem::editType" qtableitem.html#editType +"QTableItem::isEnabled" qtableitem.html#isEnabled +"QTableItem::isReplaceable" qtableitem.html#isReplaceable +"QTableItem::key" qtableitem.html#key +"QTableItem::paint" qtableitem.html#paint +"QTableItem::pixmap" qtableitem.html#pixmap +"QTableItem::row" qtableitem.html#row +"QTableItem::rowSpan" qtableitem.html#rowSpan +"QTableItem::rtti" qtableitem.html#rtti +"QTableItem::setCol" qtableitem.html#setCol +"QTableItem::setContentFromEditor" qtableitem.html#setContentFromEditor +"QTableItem::setEnabled" qtableitem.html#setEnabled +"QTableItem::setPixmap" qtableitem.html#setPixmap +"QTableItem::setReplaceable" qtableitem.html#setReplaceable +"QTableItem::setRow" qtableitem.html#setRow +"QTableItem::setSpan" qtableitem.html#setSpan +"QTableItem::setText" qtableitem.html#setText +"QTableItem::setWordWrap" qtableitem.html#setWordWrap +"QTableItem::sizeHint" qtableitem.html#sizeHint +"QTableItem::table" qtableitem.html#table +"QTableItem::text" qtableitem.html#text +"QTableItem::wordWrap" qtableitem.html#wordWrap +"QTableItem::~QTableItem" qtableitem.html#~QTableItem +"QTableSelection" qtableselection.html +"QTableSelection::anchorCol" qtableselection.html#anchorCol +"QTableSelection::anchorRow" qtableselection.html#anchorRow +"QTableSelection::bottomRow" qtableselection.html#bottomRow +"QTableSelection::expandTo" qtableselection.html#expandTo +"QTableSelection::init" qtableselection.html#init +"QTableSelection::isActive" qtableselection.html#isActive +"QTableSelection::isEmpty" qtableselection.html#isEmpty +"QTableSelection::leftCol" qtableselection.html#leftCol +"QTableSelection::numCols" qtableselection.html#numCols +"QTableSelection::numRows" qtableselection.html#numRows +"QTableSelection::operator!=" qtableselection.html#operator!-eq +"QTableSelection::operator==" qtableselection.html#operator-eq-eq +"QTableSelection::rightCol" qtableselection.html#rightCol +"QTableSelection::topRow" qtableselection.html#topRow +"QTabletEvent" qtabletevent.html +"QTabletEvent::TabletDevice" qtabletevent.html#TabletDevice +"QTabletEvent::accept" qtabletevent.html#accept +"QTabletEvent::device" qtabletevent.html#device +"QTabletEvent::globalPos" qtabletevent.html#globalPos +"QTabletEvent::globalX" qtabletevent.html#globalX +"QTabletEvent::globalY" qtabletevent.html#globalY +"QTabletEvent::ignore" qtabletevent.html#ignore +"QTabletEvent::isAccepted" qtabletevent.html#isAccepted +"QTabletEvent::pos" qtabletevent.html#pos +"QTabletEvent::pressure" qtabletevent.html#pressure +"QTabletEvent::uniqueId" qtabletevent.html#uniqueId +"QTabletEvent::x" qtabletevent.html#x +"QTabletEvent::xTilt" qtabletevent.html#xTilt +"QTabletEvent::y" qtabletevent.html#y +"QTabletEvent::yTilt" qtabletevent.html#yTilt +"QTextBrowser" qtextbrowser.html +"QTextBrowser::anchorClicked" qtextbrowser.html#anchorClicked +"QTextBrowser::backward" qtextbrowser.html#backward +"QTextBrowser::backwardAvailable" qtextbrowser.html#backwardAvailable +"QTextBrowser::forward" qtextbrowser.html#forward +"QTextBrowser::forwardAvailable" qtextbrowser.html#forwardAvailable +"QTextBrowser::highlighted" qtextbrowser.html#highlighted +"QTextBrowser::home" qtextbrowser.html#home +"QTextBrowser::keyPressEvent" qtextbrowser.html#keyPressEvent +"QTextBrowser::linkClicked" qtextbrowser.html#linkClicked +"QTextBrowser::modified" qtextbrowser.html#modified-prop +"QTextBrowser::overwriteMode" qtextbrowser.html#overwriteMode-prop +"QTextBrowser::readOnly" qtextbrowser.html#readOnly-prop +"QTextBrowser::reload" qtextbrowser.html#reload +"QTextBrowser::setSource" qtextbrowser.html#setSource +"QTextBrowser::setText" qtextbrowser.html#setText +"QTextBrowser::source" qtextbrowser.html#source +"QTextBrowser::source" qtextbrowser.html#source-prop +"QTextBrowser::sourceChanged" qtextbrowser.html#sourceChanged +"QTextBrowser::undoDepth" qtextbrowser.html#undoDepth-prop +"QTextBrowser::undoRedoEnabled" qtextbrowser.html#undoRedoEnabled-prop +"QTextCodec" qtextcodec.html +"QTextCodec::canEncode" qtextcodec.html#canEncode +"QTextCodec::codecForCStrings" qtextcodec.html#codecForCStrings +"QTextCodec::codecForContent" qtextcodec.html#codecForContent +"QTextCodec::codecForIndex" qtextcodec.html#codecForIndex +"QTextCodec::codecForLocale" qtextcodec.html#codecForLocale +"QTextCodec::codecForMib" qtextcodec.html#codecForMib +"QTextCodec::codecForName" qtextcodec.html#codecForName +"QTextCodec::codecForTr" qtextcodec.html#codecForTr +"QTextCodec::deleteAllCodecs" qtextcodec.html#deleteAllCodecs +"QTextCodec::fromUnicode" qtextcodec.html#fromUnicode +"QTextCodec::heuristicContentMatch" qtextcodec.html#heuristicContentMatch +"QTextCodec::heuristicNameMatch" qtextcodec.html#heuristicNameMatch +"QTextCodec::loadCharmap" qtextcodec.html#loadCharmap +"QTextCodec::loadCharmapFile" qtextcodec.html#loadCharmapFile +"QTextCodec::locale" qtextcodec.html#locale +"QTextCodec::makeDecoder" qtextcodec.html#makeDecoder +"QTextCodec::makeEncoder" qtextcodec.html#makeEncoder +"QTextCodec::mibEnum" qtextcodec.html#mibEnum +"QTextCodec::mimeName" qtextcodec.html#mimeName +"QTextCodec::name" qtextcodec.html#name +"QTextCodec::setCodecForCStrings" qtextcodec.html#setCodecForCStrings +"QTextCodec::setCodecForLocale" qtextcodec.html#setCodecForLocale +"QTextCodec::setCodecForTr" qtextcodec.html#setCodecForTr +"QTextCodec::simpleHeuristicNameMatch" qtextcodec.html#simpleHeuristicNameMatch +"QTextCodec::toUnicode" qtextcodec.html#toUnicode +"QTextCodec::~QTextCodec" qtextcodec.html#~QTextCodec +"QTextCodecPlugin" qtextcodecplugin.html +"QTextCodecPlugin::createForMib" qtextcodecplugin.html#createForMib +"QTextCodecPlugin::createForName" qtextcodecplugin.html#createForName +"QTextCodecPlugin::mibEnums" qtextcodecplugin.html#mibEnums +"QTextCodecPlugin::names" qtextcodecplugin.html#names +"QTextCodecPlugin::~QTextCodecPlugin" qtextcodecplugin.html#~QTextCodecPlugin +"QTextDecoder" qtextdecoder.html +"QTextDecoder::toUnicode" qtextdecoder.html#toUnicode +"QTextDecoder::~QTextDecoder" qtextdecoder.html#~QTextDecoder +"QTextDrag" qtextdrag.html +"QTextDrag::canDecode" qtextdrag.html#canDecode +"QTextDrag::decode" qtextdrag.html#decode +"QTextDrag::setSubtype" qtextdrag.html#setSubtype +"QTextDrag::setText" qtextdrag.html#setText +"QTextDrag::~QTextDrag" qtextdrag.html#~QTextDrag +"QTextEdit" qtextedit.html +"QTextEdit::AutoFormatting" qtextedit.html#AutoFormatting +"QTextEdit::CursorAction" qtextedit.html#CursorAction +"QTextEdit::KeyboardAction" qtextedit.html#KeyboardAction +"QTextEdit::VerticalAlignment" qtextedit.html#VerticalAlignment +"QTextEdit::WordWrap" qtextedit.html#WordWrap +"QTextEdit::WrapPolicy" qtextedit.html#WrapPolicy +"QTextEdit::alignment" qtextedit.html#alignment +"QTextEdit::anchorAt" qtextedit.html#anchorAt +"QTextEdit::append" qtextedit.html#append +"QTextEdit::autoFormatting" qtextedit.html#autoFormatting +"QTextEdit::autoFormatting" qtextedit.html#autoFormatting-prop +"QTextEdit::bold" qtextedit.html#bold +"QTextEdit::charAt" qtextedit.html#charAt +"QTextEdit::clear" qtextedit.html#clear +"QTextEdit::clearParagraphBackground" qtextedit.html#clearParagraphBackground +"QTextEdit::clicked" qtextedit.html#clicked +"QTextEdit::color" qtextedit.html#color +"QTextEdit::context" qtextedit.html#context +"QTextEdit::copy" qtextedit.html#copy +"QTextEdit::copyAvailable" qtextedit.html#copyAvailable +"QTextEdit::createPopupMenu" qtextedit.html#createPopupMenu +"QTextEdit::currentAlignmentChanged" qtextedit.html#currentAlignmentChanged +"QTextEdit::currentColorChanged" qtextedit.html#currentColorChanged +"QTextEdit::currentFont" qtextedit.html#currentFont +"QTextEdit::currentFontChanged" qtextedit.html#currentFontChanged +"QTextEdit::currentVerticalAlignmentChanged" qtextedit.html#currentVerticalAlignmentChanged +"QTextEdit::cursorPositionChanged" qtextedit.html#cursorPositionChanged +"QTextEdit::cut" qtextedit.html#cut +"QTextEdit::del" qtextedit.html#del +"QTextEdit::doKeyboardAction" qtextedit.html#doKeyboardAction +"QTextEdit::documentTitle" qtextedit.html#documentTitle +"QTextEdit::documentTitle" qtextedit.html#documentTitle-prop +"QTextEdit::doubleClicked" qtextedit.html#doubleClicked +"QTextEdit::ensureCursorVisible" qtextedit.html#ensureCursorVisible +"QTextEdit::family" qtextedit.html#family +"QTextEdit::find" qtextedit.html#find +"QTextEdit::focusNextPrevChild" qtextedit.html#focusNextPrevChild +"QTextEdit::getCursorPosition" qtextedit.html#getCursorPosition +"QTextEdit::getSelection" qtextedit.html#getSelection +"QTextEdit::hasSelectedText" qtextedit.html#hasSelectedText +"QTextEdit::hasSelectedText" qtextedit.html#hasSelectedText-prop +"QTextEdit::heightForWidth" qtextedit.html#heightForWidth +"QTextEdit::insert" qtextedit.html#insert +"QTextEdit::insertAt" qtextedit.html#insertAt +"QTextEdit::insertParagraph" qtextedit.html#insertParagraph +"QTextEdit::isModified" qtextedit.html#isModified +"QTextEdit::isOverwriteMode" qtextedit.html#isOverwriteMode +"QTextEdit::isReadOnly" qtextedit.html#isReadOnly +"QTextEdit::isRedoAvailable" qtextedit.html#isRedoAvailable +"QTextEdit::isUndoAvailable" qtextedit.html#isUndoAvailable +"QTextEdit::isUndoRedoEnabled" qtextedit.html#isUndoRedoEnabled +"QTextEdit::italic" qtextedit.html#italic +"QTextEdit::keyPressEvent" qtextedit.html#keyPressEvent +"QTextEdit::length" qtextedit.html#length +"QTextEdit::length" qtextedit.html#length-prop +"QTextEdit::lineOfChar" qtextedit.html#lineOfChar +"QTextEdit::lines" qtextedit.html#lines +"QTextEdit::linesOfParagraph" qtextedit.html#linesOfParagraph +"QTextEdit::linkUnderline" qtextedit.html#linkUnderline +"QTextEdit::linkUnderline" qtextedit.html#linkUnderline-prop +"QTextEdit::maxLogLines" qtextedit.html#maxLogLines +"QTextEdit::mimeSourceFactory" qtextedit.html#mimeSourceFactory +"QTextEdit::modificationChanged" qtextedit.html#modificationChanged +"QTextEdit::modified" qtextedit.html#modified-prop +"QTextEdit::moveCursor" qtextedit.html#moveCursor +"QTextEdit::optimCheckLimit" qtextedit.html#optimCheckLimit +"QTextEdit::overwriteMode" qtextedit.html#overwriteMode-prop +"QTextEdit::paper" qtextedit.html#paper +"QTextEdit::paper" qtextedit.html#paper-prop +"QTextEdit::paragraphAt" qtextedit.html#paragraphAt +"QTextEdit::paragraphBackgroundColor" qtextedit.html#paragraphBackgroundColor +"QTextEdit::paragraphLength" qtextedit.html#paragraphLength +"QTextEdit::paragraphRect" qtextedit.html#paragraphRect +"QTextEdit::paragraphs" qtextedit.html#paragraphs +"QTextEdit::paste" qtextedit.html#paste +"QTextEdit::pasteSpecial" qtextedit.html#pasteSpecial +"QTextEdit::pasteSubType" qtextedit.html#pasteSubType +"QTextEdit::placeCursor" qtextedit.html#placeCursor +"QTextEdit::pointSize" qtextedit.html#pointSize +"QTextEdit::readOnly" qtextedit.html#readOnly-prop +"QTextEdit::redo" qtextedit.html#redo +"QTextEdit::redoAvailable" qtextedit.html#redoAvailable +"QTextEdit::removeParagraph" qtextedit.html#removeParagraph +"QTextEdit::removeSelectedText" qtextedit.html#removeSelectedText +"QTextEdit::removeSelection" qtextedit.html#removeSelection +"QTextEdit::repaintChanged" qtextedit.html#repaintChanged +"QTextEdit::returnPressed" qtextedit.html#returnPressed +"QTextEdit::scrollToAnchor" qtextedit.html#scrollToAnchor +"QTextEdit::scrollToBottom" qtextedit.html#scrollToBottom +"QTextEdit::selectAll" qtextedit.html#selectAll +"QTextEdit::selectedText" qtextedit.html#selectedText +"QTextEdit::selectedText" qtextedit.html#selectedText-prop +"QTextEdit::selectionChanged" qtextedit.html#selectionChanged +"QTextEdit::setAlignment" qtextedit.html#setAlignment +"QTextEdit::setAutoFormatting" qtextedit.html#setAutoFormatting +"QTextEdit::setBold" qtextedit.html#setBold +"QTextEdit::setColor" qtextedit.html#setColor +"QTextEdit::setCurrentFont" qtextedit.html#setCurrentFont +"QTextEdit::setCursorPosition" qtextedit.html#setCursorPosition +"QTextEdit::setFamily" qtextedit.html#setFamily +"QTextEdit::setItalic" qtextedit.html#setItalic +"QTextEdit::setLinkUnderline" qtextedit.html#setLinkUnderline +"QTextEdit::setMaxLogLines" qtextedit.html#setMaxLogLines +"QTextEdit::setMimeSourceFactory" qtextedit.html#setMimeSourceFactory +"QTextEdit::setModified" qtextedit.html#setModified +"QTextEdit::setOverwriteMode" qtextedit.html#setOverwriteMode +"QTextEdit::setPaper" qtextedit.html#setPaper +"QTextEdit::setParagraphBackgroundColor" qtextedit.html#setParagraphBackgroundColor +"QTextEdit::setPointSize" qtextedit.html#setPointSize +"QTextEdit::setReadOnly" qtextedit.html#setReadOnly +"QTextEdit::setSelection" qtextedit.html#setSelection +"QTextEdit::setSelectionAttributes" qtextedit.html#setSelectionAttributes +"QTextEdit::setStyleSheet" qtextedit.html#setStyleSheet +"QTextEdit::setTabChangesFocus" qtextedit.html#setTabChangesFocus +"QTextEdit::setTabStopWidth" qtextedit.html#setTabStopWidth +"QTextEdit::setText" qtextedit.html#setText +"QTextEdit::setTextFormat" qtextedit.html#setTextFormat +"QTextEdit::setUnderline" qtextedit.html#setUnderline +"QTextEdit::setUndoDepth" qtextedit.html#setUndoDepth +"QTextEdit::setUndoRedoEnabled" qtextedit.html#setUndoRedoEnabled +"QTextEdit::setVerticalAlignment" qtextedit.html#setVerticalAlignment +"QTextEdit::setWordWrap" qtextedit.html#setWordWrap +"QTextEdit::setWrapColumnOrWidth" qtextedit.html#setWrapColumnOrWidth +"QTextEdit::setWrapPolicy" qtextedit.html#setWrapPolicy +"QTextEdit::styleSheet" qtextedit.html#styleSheet +"QTextEdit::sync" qtextedit.html#sync +"QTextEdit::syntaxHighlighter" qtextedit.html#syntaxHighlighter +"QTextEdit::tabChangesFocus" qtextedit.html#tabChangesFocus +"QTextEdit::tabChangesFocus" qtextedit.html#tabChangesFocus-prop +"QTextEdit::tabStopWidth" qtextedit.html#tabStopWidth +"QTextEdit::tabStopWidth" qtextedit.html#tabStopWidth-prop +"QTextEdit::text" qtextedit.html#text +"QTextEdit::text" qtextedit.html#text-prop +"QTextEdit::textChanged" qtextedit.html#textChanged +"QTextEdit::textCursor" qtextedit.html#textCursor +"QTextEdit::textFormat" qtextedit.html#textFormat +"QTextEdit::textFormat" qtextedit.html#textFormat-prop +"QTextEdit::underline" qtextedit.html#underline +"QTextEdit::undo" qtextedit.html#undo +"QTextEdit::undoAvailable" qtextedit.html#undoAvailable +"QTextEdit::undoDepth" qtextedit.html#undoDepth +"QTextEdit::undoDepth" qtextedit.html#undoDepth-prop +"QTextEdit::undoRedoEnabled" qtextedit.html#undoRedoEnabled-prop +"QTextEdit::wordWrap" qtextedit.html#wordWrap +"QTextEdit::wordWrap" qtextedit.html#wordWrap-prop +"QTextEdit::wrapColumnOrWidth" qtextedit.html#wrapColumnOrWidth +"QTextEdit::wrapColumnOrWidth" qtextedit.html#wrapColumnOrWidth-prop +"QTextEdit::wrapPolicy" qtextedit.html#wrapPolicy +"QTextEdit::wrapPolicy" qtextedit.html#wrapPolicy-prop +"QTextEdit::zoomIn" qtextedit.html#zoomIn +"QTextEdit::zoomOut" qtextedit.html#zoomOut +"QTextEdit::zoomTo" qtextedit.html#zoomTo +"QTextEncoder" qtextencoder.html +"QTextEncoder::fromUnicode" qtextencoder.html#fromUnicode +"QTextEncoder::~QTextEncoder" qtextencoder.html#~QTextEncoder +"QTextIStream" qtextistream.html +"QTextOStream" qtextostream.html +"QTextStream" qtextstream.html +"QTextStream::Encoding" qtextstream.html#Encoding +"QTextStream::atEnd" qtextstream.html#atEnd +"QTextStream::codec" qtextstream.html#codec +"QTextStream::device" qtextstream.html#device +"QTextStream::fill" qtextstream.html#fill +"QTextStream::flags" qtextstream.html#flags +"QTextStream::operator<<" qtextstream.html#operator-lt-lt +"QTextStream::operator>>" qtextstream.html#operator-gt-gt +"QTextStream::precision" qtextstream.html#precision +"QTextStream::read" qtextstream.html#read +"QTextStream::readLine" qtextstream.html#readLine +"QTextStream::readRawBytes" qtextstream.html#readRawBytes +"QTextStream::reset" qtextstream.html#reset +"QTextStream::setCodec" qtextstream.html#setCodec +"QTextStream::setDevice" qtextstream.html#setDevice +"QTextStream::setEncoding" qtextstream.html#setEncoding +"QTextStream::setf" qtextstream.html#setf +"QTextStream::skipWhiteSpace" qtextstream.html#skipWhiteSpace +"QTextStream::ts_getbuf" qtextstream.html#ts_getbuf +"QTextStream::ts_getline" qtextstream.html#ts_getline +"QTextStream::ts_putc" qtextstream.html#ts_putc +"QTextStream::unsetDevice" qtextstream.html#unsetDevice +"QTextStream::unsetf" qtextstream.html#unsetf +"QTextStream::width" qtextstream.html#width +"QTextStream::writeRawBytes" qtextstream.html#writeRawBytes +"QTextStream::~QTextStream" qtextstream.html#~QTextStream +"QTextView::modified" qtextview.html#modified-prop +"QTextView::overwriteMode" qtextview.html#overwriteMode-prop +"QTextView::readOnly" qtextview.html#readOnly-prop +"QTextView::undoDepth" qtextview.html#undoDepth-prop +"QTextView::undoRedoEnabled" qtextview.html#undoRedoEnabled-prop +"QThread" qthread.html +"QThread::Priority" qthread.html#Priority +"QThread::currentThread" qthread.html#currentThread +"QThread::exit" qthread.html#exit +"QThread::finished" qthread.html#finished +"QThread::msleep" qthread.html#msleep +"QThread::run" qthread.html#run +"QThread::running" qthread.html#running +"QThread::sleep" qthread.html#sleep +"QThread::start" qthread.html#start +"QThread::terminate" qthread.html#terminate +"QThread::usleep" qthread.html#usleep +"QThread::wait" qthread.html#wait +"QThread::~QThread" qthread.html#~QThread +"QThreadStorage" qthreadstorage.html +"QThreadStorage::hasLocalData" qthreadstorage.html#hasLocalData +"QThreadStorage::localData" qthreadstorage.html#localData +"QThreadStorage::setLocalData" qthreadstorage.html#setLocalData +"QThreadStorage::~QThreadStorage" qthreadstorage.html#~QThreadStorage +"QTime" qtime.html +"QTime::addMSecs" qtime.html#addMSecs +"QTime::addSecs" qtime.html#addSecs +"QTime::currentTime" qtime.html#currentTime +"QTime::elapsed" qtime.html#elapsed +"QTime::fromString" qtime.html#fromString +"QTime::hour" qtime.html#hour +"QTime::isNull" qtime.html#isNull +"QTime::isValid" qtime.html#isValid +"QTime::minute" qtime.html#minute +"QTime::msec" qtime.html#msec +"QTime::msecsTo" qtime.html#msecsTo +"QTime::operator!=" qtime.html#operator!-eq +"QTime::operator<" qtime.html#operator-lt +"QTime::operator<=" qtime.html#operator-lt-eq +"QTime::operator==" qtime.html#operator-eq-eq +"QTime::operator>" qtime.html#operator-gt +"QTime::operator>=" qtime.html#operator-gt-eq +"QTime::restart" qtime.html#restart +"QTime::second" qtime.html#second +"QTime::secsTo" qtime.html#secsTo +"QTime::setHMS" qtime.html#setHMS +"QTime::start" qtime.html#start +"QTime::toString" qtime.html#toString +"QTimeEdit" qtimeedit.html +"QTimeEdit::Display" qtimeedit.html#Display +"QTimeEdit::autoAdvance" qtimeedit.html#autoAdvance +"QTimeEdit::autoAdvance" qtimeedit.html#autoAdvance-prop +"QTimeEdit::display" qtimeedit.html#display +"QTimeEdit::display" qtimeedit.html#display-prop +"QTimeEdit::maxValue" qtimeedit.html#maxValue +"QTimeEdit::maxValue" qtimeedit.html#maxValue-prop +"QTimeEdit::minValue" qtimeedit.html#minValue +"QTimeEdit::minValue" qtimeedit.html#minValue-prop +"QTimeEdit::sectionFormattedText" qtimeedit.html#sectionFormattedText +"QTimeEdit::separator" qtimeedit.html#separator +"QTimeEdit::setAutoAdvance" qtimeedit.html#setAutoAdvance +"QTimeEdit::setDisplay" qtimeedit.html#setDisplay +"QTimeEdit::setHour" qtimeedit.html#setHour +"QTimeEdit::setMaxValue" qtimeedit.html#setMaxValue +"QTimeEdit::setMinValue" qtimeedit.html#setMinValue +"QTimeEdit::setMinute" qtimeedit.html#setMinute +"QTimeEdit::setRange" qtimeedit.html#setRange +"QTimeEdit::setSecond" qtimeedit.html#setSecond +"QTimeEdit::setSeparator" qtimeedit.html#setSeparator +"QTimeEdit::setTime" qtimeedit.html#setTime +"QTimeEdit::time" qtimeedit.html#time +"QTimeEdit::time" qtimeedit.html#time-prop +"QTimeEdit::valueChanged" qtimeedit.html#valueChanged +"QTimeEdit::~QTimeEdit" qtimeedit.html#~QTimeEdit +"QTimer" qtimer.html +"QTimer::changeInterval" qtimer.html#changeInterval +"QTimer::isActive" qtimer.html#isActive +"QTimer::singleShot" qtimer.html#singleShot +"QTimer::start" qtimer.html#start +"QTimer::stop" qtimer.html#stop +"QTimer::timeout" qtimer.html#timeout +"QTimer::timerId" qtimer.html#timerId +"QTimer::~QTimer" qtimer.html#~QTimer +"QTimerEvent" qtimerevent.html +"QTimerEvent::timerId" qtimerevent.html#timerId +"QToolBar" qtoolbar.html +"QToolBar::addSeparator" qtoolbar.html#addSeparator +"QToolBar::clear" qtoolbar.html#clear +"QToolBar::label" qtoolbar.html#label +"QToolBar::label" qtoolbar.html#label-prop +"QToolBar::mainWindow" qtoolbar.html#mainWindow +"QToolBar::setLabel" qtoolbar.html#setLabel +"QToolBar::setStretchableWidget" qtoolbar.html#setStretchableWidget +"QToolBox" qtoolbox.html +"QToolBox::addItem" qtoolbox.html#addItem +"QToolBox::count" qtoolbox.html#count +"QToolBox::count" qtoolbox.html#count-prop +"QToolBox::currentChanged" qtoolbox.html#currentChanged +"QToolBox::currentIndex" qtoolbox.html#currentIndex +"QToolBox::currentIndex" qtoolbox.html#currentIndex-prop +"QToolBox::currentItem" qtoolbox.html#currentItem +"QToolBox::indexOf" qtoolbox.html#indexOf +"QToolBox::insertItem" qtoolbox.html#insertItem +"QToolBox::isItemEnabled" qtoolbox.html#isItemEnabled +"QToolBox::item" qtoolbox.html#item +"QToolBox::itemIconSet" qtoolbox.html#itemIconSet +"QToolBox::itemInserted" qtoolbox.html#itemInserted +"QToolBox::itemLabel" qtoolbox.html#itemLabel +"QToolBox::itemRemoved" qtoolbox.html#itemRemoved +"QToolBox::itemToolTip" qtoolbox.html#itemToolTip +"QToolBox::removeItem" qtoolbox.html#removeItem +"QToolBox::setCurrentIndex" qtoolbox.html#setCurrentIndex +"QToolBox::setCurrentItem" qtoolbox.html#setCurrentItem +"QToolBox::setItemEnabled" qtoolbox.html#setItemEnabled +"QToolBox::setItemIconSet" qtoolbox.html#setItemIconSet +"QToolBox::setItemLabel" qtoolbox.html#setItemLabel +"QToolBox::setItemToolTip" qtoolbox.html#setItemToolTip +"QToolButton" qtoolbutton.html +"QToolButton::TextPosition" qtoolbutton.html#TextPosition +"QToolButton::autoRaise" qtoolbutton.html#autoRaise +"QToolButton::autoRaise" qtoolbutton.html#autoRaise-prop +"QToolButton::backgroundMode" qtoolbutton.html#backgroundMode-prop +"QToolButton::iconSet" qtoolbutton.html#iconSet +"QToolButton::iconSet" qtoolbutton.html#iconSet-prop +"QToolButton::on" qtoolbutton.html#on-prop +"QToolButton::openPopup" qtoolbutton.html#openPopup +"QToolButton::pixmap" qtoolbutton.html#pixmap-prop +"QToolButton::popup" qtoolbutton.html#popup +"QToolButton::popupDelay" qtoolbutton.html#popupDelay +"QToolButton::popupDelay" qtoolbutton.html#popupDelay-prop +"QToolButton::setAutoRaise" qtoolbutton.html#setAutoRaise +"QToolButton::setIconSet" qtoolbutton.html#setIconSet +"QToolButton::setOn" qtoolbutton.html#setOn +"QToolButton::setPopup" qtoolbutton.html#setPopup +"QToolButton::setPopupDelay" qtoolbutton.html#setPopupDelay +"QToolButton::setTextLabel" qtoolbutton.html#setTextLabel +"QToolButton::setTextPosition" qtoolbutton.html#setTextPosition +"QToolButton::setToggleButton" qtoolbutton.html#setToggleButton +"QToolButton::setUsesBigPixmap" qtoolbutton.html#setUsesBigPixmap +"QToolButton::setUsesTextLabel" qtoolbutton.html#setUsesTextLabel +"QToolButton::textLabel" qtoolbutton.html#textLabel +"QToolButton::textLabel" qtoolbutton.html#textLabel-prop +"QToolButton::textPosition" qtoolbutton.html#textPosition +"QToolButton::textPosition" qtoolbutton.html#textPosition-prop +"QToolButton::toggle" qtoolbutton.html#toggle +"QToolButton::toggleButton" qtoolbutton.html#toggleButton-prop +"QToolButton::uses3D" qtoolbutton.html#uses3D +"QToolButton::usesBigPixmap" qtoolbutton.html#usesBigPixmap +"QToolButton::usesBigPixmap" qtoolbutton.html#usesBigPixmap-prop +"QToolButton::usesTextLabel" qtoolbutton.html#usesTextLabel +"QToolButton::usesTextLabel" qtoolbutton.html#usesTextLabel-prop +"QToolButton::~QToolButton" qtoolbutton.html#~QToolButton +"QToolTip" qtooltip.html +"QToolTip::add" qtooltip.html#add +"QToolTip::clear" qtooltip.html#clear +"QToolTip::font" qtooltip.html#font +"QToolTip::group" qtooltip.html#group +"QToolTip::hide" qtooltip.html#hide +"QToolTip::isGloballyEnabled" qtooltip.html#isGloballyEnabled +"QToolTip::maybeTip" qtooltip.html#maybeTip +"QToolTip::palette" qtooltip.html#palette +"QToolTip::parentWidget" qtooltip.html#parentWidget +"QToolTip::remove" qtooltip.html#remove +"QToolTip::setFont" qtooltip.html#setFont +"QToolTip::setGloballyEnabled" qtooltip.html#setGloballyEnabled +"QToolTip::setPalette" qtooltip.html#setPalette +"QToolTip::setWakeUpDelay" qtooltip.html#setWakeUpDelay +"QToolTip::textFor" qtooltip.html#textFor +"QToolTip::tip" qtooltip.html#tip +"QToolTipGroup" qtooltipgroup.html +"QToolTipGroup::delay" qtooltipgroup.html#delay +"QToolTipGroup::delay" qtooltipgroup.html#delay-prop +"QToolTipGroup::enabled" qtooltipgroup.html#enabled +"QToolTipGroup::enabled" qtooltipgroup.html#enabled-prop +"QToolTipGroup::removeTip" qtooltipgroup.html#removeTip +"QToolTipGroup::setDelay" qtooltipgroup.html#setDelay +"QToolTipGroup::setEnabled" qtooltipgroup.html#setEnabled +"QToolTipGroup::showTip" qtooltipgroup.html#showTip +"QToolTipGroup::~QToolTipGroup" qtooltipgroup.html#~QToolTipGroup +"QTransformedScreen::transformOrientation" qtransformedscreen.html#transformOrientation +"QTranslator" qtranslator.html +"QTranslator::SaveMode" qtranslator.html#SaveMode +"QTranslator::clear" qtranslator.html#clear +"QTranslator::contains" qtranslator.html#contains +"QTranslator::findMessage" qtranslator.html#findMessage +"QTranslator::insert" qtranslator.html#insert +"QTranslator::isEmpty" qtranslator.html#isEmpty +"QTranslator::load" qtranslator.html#load +"QTranslator::messages" qtranslator.html#messages +"QTranslator::remove" qtranslator.html#remove +"QTranslator::save" qtranslator.html#save +"QTranslator::squeeze" qtranslator.html#squeeze +"QTranslator::unsqueeze" qtranslator.html#unsqueeze +"QTranslator::~QTranslator" qtranslator.html#~QTranslator +"QTranslatorMessage" qtranslatormessage.html +"QTranslatorMessage::Prefix" qtranslatormessage.html#Prefix +"QTranslatorMessage::comment" qtranslatormessage.html#comment +"QTranslatorMessage::commonPrefix" qtranslatormessage.html#commonPrefix +"QTranslatorMessage::context" qtranslatormessage.html#context +"QTranslatorMessage::hash" qtranslatormessage.html#hash +"QTranslatorMessage::operator!=" qtranslatormessage.html#operator!-eq +"QTranslatorMessage::operator<" qtranslatormessage.html#operator-lt +"QTranslatorMessage::operator<=" qtranslatormessage.html#operator-lt-eq +"QTranslatorMessage::operator=" qtranslatormessage.html#operator-eq +"QTranslatorMessage::operator==" qtranslatormessage.html#operator-eq-eq +"QTranslatorMessage::operator>" qtranslatormessage.html#operator-gt +"QTranslatorMessage::operator>=" qtranslatormessage.html#operator-gt-eq +"QTranslatorMessage::setTranslation" qtranslatormessage.html#setTranslation +"QTranslatorMessage::sourceText" qtranslatormessage.html#sourceText +"QTranslatorMessage::translation" qtranslatormessage.html#translation +"QTranslatorMessage::write" qtranslatormessage.html#write +"QTsciiCodec" qtsciicodec.html +"QUriDrag" quridrag.html +"QUriDrag::canDecode" quridrag.html#canDecode +"QUriDrag::decode" quridrag.html#decode +"QUriDrag::decodeLocalFiles" quridrag.html#decodeLocalFiles +"QUriDrag::decodeToUnicodeUris" quridrag.html#decodeToUnicodeUris +"QUriDrag::localFileToUri" quridrag.html#localFileToUri +"QUriDrag::setFileNames" quridrag.html#setFileNames +"QUriDrag::setUnicodeUris" quridrag.html#setUnicodeUris +"QUriDrag::setUris" quridrag.html#setUris +"QUriDrag::unicodeUriToUri" quridrag.html#unicodeUriToUri +"QUriDrag::uriToLocalFile" quridrag.html#uriToLocalFile +"QUriDrag::uriToUnicodeUri" quridrag.html#uriToUnicodeUri +"QUriDrag::~QUriDrag" quridrag.html#~QUriDrag +"QUrl" qurl.html +"QUrl::addPath" qurl.html#addPath +"QUrl::cdUp" qurl.html#cdUp +"QUrl::decode" qurl.html#decode +"QUrl::dirPath" qurl.html#dirPath +"QUrl::encode" qurl.html#encode +"QUrl::encodedPathAndQuery" qurl.html#encodedPathAndQuery +"QUrl::fileName" qurl.html#fileName +"QUrl::hasHost" qurl.html#hasHost +"QUrl::hasPassword" qurl.html#hasPassword +"QUrl::hasPath" qurl.html#hasPath +"QUrl::hasPort" qurl.html#hasPort +"QUrl::hasRef" qurl.html#hasRef +"QUrl::hasUser" qurl.html#hasUser +"QUrl::host" qurl.html#host +"QUrl::isLocalFile" qurl.html#isLocalFile +"QUrl::isRelativeUrl" qurl.html#isRelativeUrl +"QUrl::isValid" qurl.html#isValid +"QUrl::operator QString" qurl.html#operator-QString +"QUrl::operator=" qurl.html#operator-eq +"QUrl::operator==" qurl.html#operator-eq-eq +"QUrl::parse" qurl.html#parse +"QUrl::password" qurl.html#password +"QUrl::path" qurl.html#path +"QUrl::port" qurl.html#port +"QUrl::protocol" qurl.html#protocol +"QUrl::query" qurl.html#query +"QUrl::ref" qurl.html#ref +"QUrl::reset" qurl.html#reset +"QUrl::setEncodedPathAndQuery" qurl.html#setEncodedPathAndQuery +"QUrl::setFileName" qurl.html#setFileName +"QUrl::setHost" qurl.html#setHost +"QUrl::setPassword" qurl.html#setPassword +"QUrl::setPath" qurl.html#setPath +"QUrl::setPort" qurl.html#setPort +"QUrl::setProtocol" qurl.html#setProtocol +"QUrl::setQuery" qurl.html#setQuery +"QUrl::setRef" qurl.html#setRef +"QUrl::setUser" qurl.html#setUser +"QUrl::toString" qurl.html#toString +"QUrl::user" qurl.html#user +"QUrl::~QUrl" qurl.html#~QUrl +"QUrlInfo" qurlinfo.html +"QUrlInfo::PermissionSpec" qurlinfo.html#PermissionSpec +"QUrlInfo::equal" qurlinfo.html#equal +"QUrlInfo::greaterThan" qurlinfo.html#greaterThan +"QUrlInfo::group" qurlinfo.html#group +"QUrlInfo::isDir" qurlinfo.html#isDir +"QUrlInfo::isExecutable" qurlinfo.html#isExecutable +"QUrlInfo::isFile" qurlinfo.html#isFile +"QUrlInfo::isReadable" qurlinfo.html#isReadable +"QUrlInfo::isSymLink" qurlinfo.html#isSymLink +"QUrlInfo::isValid" qurlinfo.html#isValid +"QUrlInfo::isWritable" qurlinfo.html#isWritable +"QUrlInfo::lastModified" qurlinfo.html#lastModified +"QUrlInfo::lastRead" qurlinfo.html#lastRead +"QUrlInfo::lessThan" qurlinfo.html#lessThan +"QUrlInfo::name" qurlinfo.html#name +"QUrlInfo::operator=" qurlinfo.html#operator-eq +"QUrlInfo::operator==" qurlinfo.html#operator-eq-eq +"QUrlInfo::owner" qurlinfo.html#owner +"QUrlInfo::permissions" qurlinfo.html#permissions +"QUrlInfo::setDir" qurlinfo.html#setDir +"QUrlInfo::setFile" qurlinfo.html#setFile +"QUrlInfo::setGroup" qurlinfo.html#setGroup +"QUrlInfo::setLastModified" qurlinfo.html#setLastModified +"QUrlInfo::setName" qurlinfo.html#setName +"QUrlInfo::setOwner" qurlinfo.html#setOwner +"QUrlInfo::setPermissions" qurlinfo.html#setPermissions +"QUrlInfo::setReadable" qurlinfo.html#setReadable +"QUrlInfo::setSize" qurlinfo.html#setSize +"QUrlInfo::setSymLink" qurlinfo.html#setSymLink +"QUrlInfo::setWritable" qurlinfo.html#setWritable +"QUrlInfo::size" qurlinfo.html#size +"QUrlInfo::~QUrlInfo" qurlinfo.html#~QUrlInfo +"QUrlOperator" qurloperator.html +"QUrlOperator::addEntry" qurloperator.html#addEntry +"QUrlOperator::clearEntries" qurloperator.html#clearEntries +"QUrlOperator::connectionStateChanged" qurloperator.html#connectionStateChanged +"QUrlOperator::copy" qurloperator.html#copy +"QUrlOperator::createdDirectory" qurloperator.html#createdDirectory +"QUrlOperator::data" qurloperator.html#data +"QUrlOperator::dataTransferProgress" qurloperator.html#dataTransferProgress +"QUrlOperator::deleteNetworkProtocol" qurloperator.html#deleteNetworkProtocol +"QUrlOperator::finished" qurloperator.html#finished +"QUrlOperator::get" qurloperator.html#get +"QUrlOperator::getNetworkProtocol" qurloperator.html#getNetworkProtocol +"QUrlOperator::info" qurloperator.html#info +"QUrlOperator::isDir" qurloperator.html#isDir +"QUrlOperator::itemChanged" qurloperator.html#itemChanged +"QUrlOperator::listChildren" qurloperator.html#listChildren +"QUrlOperator::mkdir" qurloperator.html#mkdir +"QUrlOperator::nameFilter" qurloperator.html#nameFilter +"QUrlOperator::newChildren" qurloperator.html#newChildren +"QUrlOperator::put" qurloperator.html#put +"QUrlOperator::remove" qurloperator.html#remove +"QUrlOperator::removed" qurloperator.html#removed +"QUrlOperator::rename" qurloperator.html#rename +"QUrlOperator::setNameFilter" qurloperator.html#setNameFilter +"QUrlOperator::start" qurloperator.html#start +"QUrlOperator::startOperation" qurloperator.html#startOperation +"QUrlOperator::startedNextCopy" qurloperator.html#startedNextCopy +"QUrlOperator::stop" qurloperator.html#stop +"QUrlOperator::~QUrlOperator" qurloperator.html#~QUrlOperator +"QUuid" quuid.html +"QUuid::Variant" quuid.html#Variant +"QUuid::Version" quuid.html#Version +"QUuid::createUuid" quuid.html#createUuid +"QUuid::isNull" quuid.html#isNull +"QUuid::operator QString" quuid.html#operator-QString +"QUuid::operator!=" quuid.html#operator!-eq +"QUuid::operator<" quuid.html#operator-lt +"QUuid::operator=" quuid.html#operator-eq +"QUuid::operator==" quuid.html#operator-eq-eq +"QUuid::operator>" quuid.html#operator-gt +"QUuid::toString" quuid.html#toString +"QUuid::variant" quuid.html#variant +"QUuid::version" quuid.html#version +"QVBox" qvbox.html +"QVBoxLayout" qvboxlayout.html +"QVBoxLayout::~QVBoxLayout" qvboxlayout.html#~QVBoxLayout +"QVButtonGroup" qvbuttongroup.html +"QVButtonGroup::~QVButtonGroup" qvbuttongroup.html#~QVButtonGroup +"QVGroupBox" qvgroupbox.html +"QVGroupBox::~QVGroupBox" qvgroupbox.html#~QVGroupBox +"QValidator" qvalidator.html +"QValidator::State" qvalidator.html#State +"QValidator::fixup" qvalidator.html#fixup +"QValidator::validate" qvalidator.html#validate +"QValidator::~QValidator" qvalidator.html#~QValidator +"QValueList" qvaluelist.html +"QValueList::ConstIterator" qvaluelist.html#ConstIterator +"QValueList::Iterator" qvaluelist.html#Iterator +"QValueList::append" qvaluelist.html#append +"QValueList::at" qvaluelist.html#at +"QValueList::back" qvaluelist.html#back +"QValueList::begin" qvaluelist.html#begin +"QValueList::clear" qvaluelist.html#clear +"QValueList::constBegin" qvaluelist.html#constBegin +"QValueList::constEnd" qvaluelist.html#constEnd +"QValueList::const_iterator" qvaluelist.html#const_iterator +"QValueList::const_pointer" qvaluelist.html#const_pointer +"QValueList::const_reference" qvaluelist.html#const_reference +"QValueList::contains" qvaluelist.html#contains +"QValueList::count" qvaluelist.html#count +"QValueList::empty" qvaluelist.html#empty +"QValueList::end" qvaluelist.html#end +"QValueList::erase" qvaluelist.html#erase +"QValueList::find" qvaluelist.html#find +"QValueList::findIndex" qvaluelist.html#findIndex +"QValueList::first" qvaluelist.html#first +"QValueList::fromLast" qvaluelist.html#fromLast +"QValueList::front" qvaluelist.html#front +"QValueList::insert" qvaluelist.html#insert +"QValueList::isEmpty" qvaluelist.html#isEmpty +"QValueList::iterator" qvaluelist.html#iterator +"QValueList::last" qvaluelist.html#last +"QValueList::operator!=" qvaluelist.html#operator!-eq +"QValueList::operator+" qvaluelist.html#operator+ +"QValueList::operator+=" qvaluelist.html#operator+-eq +"QValueList::operator<<" qvaluelist.html#operator-lt-lt +"QValueList::operator=" qvaluelist.html#operator-eq +"QValueList::operator==" qvaluelist.html#operator-eq-eq +"QValueList::operator[]" qvaluelist.html#operator[] +"QValueList::pointer" qvaluelist.html#pointer +"QValueList::pop_back" qvaluelist.html#pop_back +"QValueList::pop_front" qvaluelist.html#pop_front +"QValueList::prepend" qvaluelist.html#prepend +"QValueList::push_back" qvaluelist.html#push_back +"QValueList::push_front" qvaluelist.html#push_front +"QValueList::reference" qvaluelist.html#reference +"QValueList::remove" qvaluelist.html#remove +"QValueList::size" qvaluelist.html#size +"QValueList::size_type" qvaluelist.html#size_type +"QValueList::value_type" qvaluelist.html#value_type +"QValueList::~QValueList" qvaluelist.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" qvaluestack.html +"QValueStack::pop" qvaluestack.html#pop +"QValueStack::push" qvaluestack.html#push +"QValueStack::top" qvaluestack.html#top +"QValueStack::~QValueStack" qvaluestack.html#~QValueStack +"QValueVector" qvaluevector.html +"QValueVector::ConstIterator" qvaluevector.html#ConstIterator +"QValueVector::Iterator" qvaluevector.html#Iterator +"QValueVector::ValueType" qvaluevector.html#ValueType +"QValueVector::append" qvaluevector.html#append +"QValueVector::at" qvaluevector.html#at +"QValueVector::back" qvaluevector.html#back +"QValueVector::begin" qvaluevector.html#begin +"QValueVector::capacity" qvaluevector.html#capacity +"QValueVector::clear" qvaluevector.html#clear +"QValueVector::constBegin" qvaluevector.html#constBegin +"QValueVector::constEnd" qvaluevector.html#constEnd +"QValueVector::const_iterator" qvaluevector.html#const_iterator +"QValueVector::const_pointer" qvaluevector.html#const_pointer +"QValueVector::const_reference" qvaluevector.html#const_reference +"QValueVector::count" qvaluevector.html#count +"QValueVector::difference_type" qvaluevector.html#difference_type +"QValueVector::empty" qvaluevector.html#empty +"QValueVector::end" qvaluevector.html#end +"QValueVector::erase" qvaluevector.html#erase +"QValueVector::first" qvaluevector.html#first +"QValueVector::front" qvaluevector.html#front +"QValueVector::insert" qvaluevector.html#insert +"QValueVector::isEmpty" qvaluevector.html#isEmpty +"QValueVector::iterator" qvaluevector.html#iterator +"QValueVector::last" qvaluevector.html#last +"QValueVector::operator=" qvaluevector.html#operator-eq +"QValueVector::operator==" qvaluevector.html#operator-eq-eq +"QValueVector::operator[]" qvaluevector.html#operator[] +"QValueVector::pointer" qvaluevector.html#pointer +"QValueVector::pop_back" qvaluevector.html#pop_back +"QValueVector::push_back" qvaluevector.html#push_back +"QValueVector::reference" qvaluevector.html#reference +"QValueVector::reserve" qvaluevector.html#reserve +"QValueVector::resize" qvaluevector.html#resize +"QValueVector::size" qvaluevector.html#size +"QValueVector::size_type" qvaluevector.html#size_type +"QValueVector::value_type" qvaluevector.html#value_type +"QValueVector::~QValueVector" qvaluevector.html#~QValueVector +"QVariant" qvariant.html +"QVariant::Type" qvariant.html#Type +"QVariant::asBitArray" qvariant.html#asBitArray +"QVariant::asBitmap" qvariant.html#asBitmap +"QVariant::asBool" qvariant.html#asBool +"QVariant::asBrush" qvariant.html#asBrush +"QVariant::asByteArray" qvariant.html#asByteArray +"QVariant::asCString" qvariant.html#asCString +"QVariant::asColor" qvariant.html#asColor +"QVariant::asColorGroup" qvariant.html#asColorGroup +"QVariant::asCursor" qvariant.html#asCursor +"QVariant::asDate" qvariant.html#asDate +"QVariant::asDateTime" qvariant.html#asDateTime +"QVariant::asDouble" qvariant.html#asDouble +"QVariant::asFont" qvariant.html#asFont +"QVariant::asIconSet" qvariant.html#asIconSet +"QVariant::asImage" qvariant.html#asImage +"QVariant::asInt" qvariant.html#asInt +"QVariant::asKeySequence" qvariant.html#asKeySequence +"QVariant::asList" qvariant.html#asList +"QVariant::asLongLong" qvariant.html#asLongLong +"QVariant::asMap" qvariant.html#asMap +"QVariant::asPalette" qvariant.html#asPalette +"QVariant::asPen" qvariant.html#asPen +"QVariant::asPixmap" qvariant.html#asPixmap +"QVariant::asPoint" qvariant.html#asPoint +"QVariant::asPointArray" qvariant.html#asPointArray +"QVariant::asRect" qvariant.html#asRect +"QVariant::asRegion" qvariant.html#asRegion +"QVariant::asSize" qvariant.html#asSize +"QVariant::asSizePolicy" qvariant.html#asSizePolicy +"QVariant::asString" qvariant.html#asString +"QVariant::asStringList" qvariant.html#asStringList +"QVariant::asTime" qvariant.html#asTime +"QVariant::asUInt" qvariant.html#asUInt +"QVariant::asULongLong" qvariant.html#asULongLong +"QVariant::canCast" qvariant.html#canCast +"QVariant::cast" qvariant.html#cast +"QVariant::clear" qvariant.html#clear +"QVariant::isNull" qvariant.html#isNull +"QVariant::isValid" qvariant.html#isValid +"QVariant::nameToType" qvariant.html#nameToType +"QVariant::operator!=" qvariant.html#operator!-eq +"QVariant::operator=" qvariant.html#operator-eq +"QVariant::operator==" qvariant.html#operator-eq-eq +"QVariant::toBitArray" qvariant.html#toBitArray +"QVariant::toBitmap" qvariant.html#toBitmap +"QVariant::toBool" qvariant.html#toBool +"QVariant::toBrush" qvariant.html#toBrush +"QVariant::toByteArray" qvariant.html#toByteArray +"QVariant::toCString" qvariant.html#toCString +"QVariant::toColor" qvariant.html#toColor +"QVariant::toColorGroup" qvariant.html#toColorGroup +"QVariant::toCursor" qvariant.html#toCursor +"QVariant::toDate" qvariant.html#toDate +"QVariant::toDateTime" qvariant.html#toDateTime +"QVariant::toDouble" qvariant.html#toDouble +"QVariant::toFont" qvariant.html#toFont +"QVariant::toIconSet" qvariant.html#toIconSet +"QVariant::toImage" qvariant.html#toImage +"QVariant::toInt" qvariant.html#toInt +"QVariant::toKeySequence" qvariant.html#toKeySequence +"QVariant::toList" qvariant.html#toList +"QVariant::toLongLong" qvariant.html#toLongLong +"QVariant::toMap" qvariant.html#toMap +"QVariant::toPalette" qvariant.html#toPalette +"QVariant::toPen" qvariant.html#toPen +"QVariant::toPixmap" qvariant.html#toPixmap +"QVariant::toPoint" qvariant.html#toPoint +"QVariant::toPointArray" qvariant.html#toPointArray +"QVariant::toRect" qvariant.html#toRect +"QVariant::toRegion" qvariant.html#toRegion +"QVariant::toSize" qvariant.html#toSize +"QVariant::toSizePolicy" qvariant.html#toSizePolicy +"QVariant::toString" qvariant.html#toString +"QVariant::toStringList" qvariant.html#toStringList +"QVariant::toTime" qvariant.html#toTime +"QVariant::toUInt" qvariant.html#toUInt +"QVariant::toULongLong" qvariant.html#toULongLong +"QVariant::type" qvariant.html#type +"QVariant::typeName" qvariant.html#typeName +"QVariant::typeToName" qvariant.html#typeToName +"QVariant::~QVariant" qvariant.html#~QVariant +"QVector Class Reference (obsolete)" qvector.html +"QWMatrix" qwmatrix.html +"QWMatrix::TransformationMode" qwmatrix.html#TransformationMode +"QWMatrix::det" qwmatrix.html#det +"QWMatrix::dx" qwmatrix.html#dx +"QWMatrix::dy" qwmatrix.html#dy +"QWMatrix::invert" qwmatrix.html#invert +"QWMatrix::isIdentity" qwmatrix.html#isIdentity +"QWMatrix::isInvertible" qwmatrix.html#isInvertible +"QWMatrix::m11" qwmatrix.html#m11 +"QWMatrix::m12" qwmatrix.html#m12 +"QWMatrix::m21" qwmatrix.html#m21 +"QWMatrix::m22" qwmatrix.html#m22 +"QWMatrix::map" qwmatrix.html#map +"QWMatrix::mapRect" qwmatrix.html#mapRect +"QWMatrix::mapToPolygon" qwmatrix.html#mapToPolygon +"QWMatrix::mapToRegion" qwmatrix.html#mapToRegion +"QWMatrix::operator!=" qwmatrix.html#operator!-eq +"QWMatrix::operator*=" qwmatrix.html#operator*-eq +"QWMatrix::operator==" qwmatrix.html#operator-eq-eq +"QWMatrix::reset" qwmatrix.html#reset +"QWMatrix::rotate" qwmatrix.html#rotate +"QWMatrix::scale" qwmatrix.html#scale +"QWMatrix::setMatrix" qwmatrix.html#setMatrix +"QWMatrix::setTransformationMode" qwmatrix.html#setTransformationMode +"QWMatrix::shear" qwmatrix.html#shear +"QWMatrix::transformationMode" qwmatrix.html#transformationMode +"QWMatrix::translate" qwmatrix.html#translate +"QWSDecoration" qwsdecoration.html +"QWSDecoration::Region" qwsdecoration.html#Region +"QWSDecoration::close" qwsdecoration.html#close +"QWSDecoration::maximize" qwsdecoration.html#maximize +"QWSDecoration::menu" qwsdecoration.html#menu +"QWSDecoration::minimize" qwsdecoration.html#minimize +"QWSDecoration::paint" qwsdecoration.html#paint +"QWSDecoration::paintButton" qwsdecoration.html#paintButton +"QWSDecoration::region" qwsdecoration.html#region +"QWSDecoration::~QWSDecoration" qwsdecoration.html#~QWSDecoration +"QWSInputMethod" qwsinputmethod.html +"QWSInputMethod::filter" qwsinputmethod.html#filter +"QWSInputMethod::reset" qwsinputmethod.html#reset +"QWSInputMethod::sendIMEvent" qwsinputmethod.html#sendIMEvent +"QWSInputMethod::setFont" qwsinputmethod.html#setFont +"QWSInputMethod::setMicroFocus" qwsinputmethod.html#setMicroFocus +"QWSInputMethod::~QWSInputMethod" qwsinputmethod.html#~QWSInputMethod +"QWSKeyboardHandler" qwskeyboardhandler.html +"QWSKeyboardHandler::processKeyEvent" qwskeyboardhandler.html#processKeyEvent +"QWSKeyboardHandler::~QWSKeyboardHandler" qwskeyboardhandler.html#~QWSKeyboardHandler +"QWSMouseHandler" qwsmousehandler.html +"QWSMouseHandler::calibrate" qwsmousehandler.html#calibrate +"QWSMouseHandler::clearCalibration" qwsmousehandler.html#clearCalibration +"QWSMouseHandler::limitToScreen" qwsmousehandler.html#limitToScreen +"QWSMouseHandler::mouseChanged" qwsmousehandler.html#mouseChanged +"QWSMouseHandler::pos" qwsmousehandler.html#pos +"QWSMouseHandler::~QWSMouseHandler" qwsmousehandler.html#~QWSMouseHandler +"QWSServer" qwsserver.html +"QWSServer::GUIMode" qwsserver.html#GUIMode +"QWSServer::ServerFlags" qwsserver.html#ServerFlags +"QWSServer::WindowEvent" qwsserver.html#WindowEvent +"QWSServer::clientWindows" qwsserver.html#clientWindows +"QWSServer::closeKeyboard" qwsserver.html#closeKeyboard +"QWSServer::closeMouse" qwsserver.html#closeMouse +"QWSServer::enablePainting" qwsserver.html#enablePainting +"QWSServer::isCursorVisible" qwsserver.html#isCursorVisible +"QWSServer::keyMap" qwsserver.html#keyMap +"QWSServer::keyboardHandler" qwsserver.html#keyboardHandler +"QWSServer::manager" qwsserver.html#manager +"QWSServer::mouseHandler" qwsserver.html#mouseHandler +"QWSServer::newChannel" qwsserver.html#newChannel +"QWSServer::openKeyboard" qwsserver.html#openKeyboard +"QWSServer::openMouse" qwsserver.html#openMouse +"QWSServer::refresh" qwsserver.html#refresh +"QWSServer::removedChannel" qwsserver.html#removedChannel +"QWSServer::screenSaverActivate" qwsserver.html#screenSaverActivate +"QWSServer::screenSaverActive" qwsserver.html#screenSaverActive +"QWSServer::sendIMEvent" qwsserver.html#sendIMEvent +"QWSServer::sendKeyEvent" qwsserver.html#sendKeyEvent +"QWSServer::setCursorVisible" qwsserver.html#setCursorVisible +"QWSServer::setDefaultKeyboard" qwsserver.html#setDefaultKeyboard +"QWSServer::setDefaultMouse" qwsserver.html#setDefaultMouse +"QWSServer::setDesktopBackground" qwsserver.html#setDesktopBackground +"QWSServer::setKeyboardFilter" qwsserver.html#setKeyboardFilter +"QWSServer::setKeyboardHandler" qwsserver.html#setKeyboardHandler +"QWSServer::setMaxWindowRect" qwsserver.html#setMaxWindowRect +"QWSServer::setScreenSaverInterval" qwsserver.html#setScreenSaverInterval +"QWSServer::setScreenSaverIntervals" qwsserver.html#setScreenSaverIntervals +"QWSServer::setWindowRegion" qwsserver.html#setWindowRegion +"QWSServer::windowAt" qwsserver.html#windowAt +"QWSServer::windowEvent" qwsserver.html#windowEvent +"QWSServer::~QWSServer" qwsserver.html#~QWSServer +"QWSWindow" qwswindow.html +"QWSWindow::allocation" qwswindow.html#allocation +"QWSWindow::caption" qwswindow.html#caption +"QWSWindow::client" qwswindow.html#client +"QWSWindow::hide" qwswindow.html#hide +"QWSWindow::isFullyObscured" qwswindow.html#isFullyObscured +"QWSWindow::isPartiallyObscured" qwswindow.html#isPartiallyObscured +"QWSWindow::isVisible" qwswindow.html#isVisible +"QWSWindow::lower" qwswindow.html#lower +"QWSWindow::name" qwswindow.html#name +"QWSWindow::raise" qwswindow.html#raise +"QWSWindow::requested" qwswindow.html#requested +"QWSWindow::setActiveWindow" qwswindow.html#setActiveWindow +"QWSWindow::show" qwswindow.html#show +"QWSWindow::winId" qwswindow.html#winId +"QWSWindow::~QWSWindow" qwswindow.html#~QWSWindow +"QWaitCondition" qwaitcondition.html +"QWaitCondition::wait" qwaitcondition.html#wait +"QWaitCondition::wakeAll" qwaitcondition.html#wakeAll +"QWaitCondition::wakeOne" qwaitcondition.html#wakeOne +"QWaitCondition::~QWaitCondition" qwaitcondition.html#~QWaitCondition +"QWhatsThis" qwhatsthis.html +"QWhatsThis::add" qwhatsthis.html#add +"QWhatsThis::clicked" qwhatsthis.html#clicked +"QWhatsThis::display" qwhatsthis.html#display +"QWhatsThis::enterWhatsThisMode" qwhatsthis.html#enterWhatsThisMode +"QWhatsThis::inWhatsThisMode" qwhatsthis.html#inWhatsThisMode +"QWhatsThis::leaveWhatsThisMode" qwhatsthis.html#leaveWhatsThisMode +"QWhatsThis::remove" qwhatsthis.html#remove +"QWhatsThis::setFont" qwhatsthis.html#setFont +"QWhatsThis::text" qwhatsthis.html#text +"QWhatsThis::textFor" qwhatsthis.html#textFor +"QWhatsThis::whatsThisButton" qwhatsthis.html#whatsThisButton +"QWhatsThis::~QWhatsThis" qwhatsthis.html#~QWhatsThis +"QWheelEvent" qwheelevent.html +"QWheelEvent::accept" qwheelevent.html#accept +"QWheelEvent::delta" qwheelevent.html#delta +"QWheelEvent::globalPos" qwheelevent.html#globalPos +"QWheelEvent::globalX" qwheelevent.html#globalX +"QWheelEvent::globalY" qwheelevent.html#globalY +"QWheelEvent::ignore" qwheelevent.html#ignore +"QWheelEvent::isAccepted" qwheelevent.html#isAccepted +"QWheelEvent::orientation" qwheelevent.html#orientation +"QWheelEvent::pos" qwheelevent.html#pos +"QWheelEvent::state" qwheelevent.html#state +"QWheelEvent::x" qwheelevent.html#x +"QWheelEvent::y" qwheelevent.html#y +"QWidget" qwidget.html +"QWidget::BackgroundOrigin" qwidget.html#BackgroundOrigin +"QWidget::FocusPolicy" qwidget.html#FocusPolicy +"QWidget::acceptDrops" qwidget.html#acceptDrops +"QWidget::acceptDrops" qwidget.html#acceptDrops-prop +"QWidget::adjustSize" qwidget.html#adjustSize +"QWidget::autoMask" qwidget.html#autoMask +"QWidget::autoMask" qwidget.html#autoMask-prop +"QWidget::backgroundBrush" qwidget.html#backgroundBrush +"QWidget::backgroundBrush" qwidget.html#backgroundBrush-prop +"QWidget::backgroundMode" qwidget.html#backgroundMode +"QWidget::backgroundMode" qwidget.html#backgroundMode-prop +"QWidget::backgroundOrigin" qwidget.html#backgroundOrigin +"QWidget::backgroundOrigin" qwidget.html#backgroundOrigin-prop +"QWidget::baseSize" qwidget.html#baseSize +"QWidget::baseSize" qwidget.html#baseSize-prop +"QWidget::caption" qwidget.html#caption +"QWidget::caption" qwidget.html#caption-prop +"QWidget::childAt" qwidget.html#childAt +"QWidget::childrenRect" qwidget.html#childrenRect +"QWidget::childrenRect" qwidget.html#childrenRect-prop +"QWidget::childrenRegion" qwidget.html#childrenRegion +"QWidget::childrenRegion" qwidget.html#childrenRegion-prop +"QWidget::clearFocus" qwidget.html#clearFocus +"QWidget::clearMask" qwidget.html#clearMask +"QWidget::clearWFlags" qwidget.html#clearWFlags +"QWidget::clipRegion" qwidget.html#clipRegion +"QWidget::close" qwidget.html#close +"QWidget::closeEvent" qwidget.html#closeEvent +"QWidget::colorGroup" qwidget.html#colorGroup +"QWidget::colorGroup" qwidget.html#colorGroup-prop +"QWidget::constPolish" qwidget.html#constPolish +"QWidget::contextMenuEvent" qwidget.html#contextMenuEvent +"QWidget::create" qwidget.html#create +"QWidget::cursor" qwidget.html#cursor +"QWidget::cursor" qwidget.html#cursor-prop +"QWidget::customWhatsThis" qwidget.html#customWhatsThis +"QWidget::customWhatsThis" qwidget.html#customWhatsThis-prop +"QWidget::destroy" qwidget.html#destroy +"QWidget::dragEnterEvent" qwidget.html#dragEnterEvent +"QWidget::dragLeaveEvent" qwidget.html#dragLeaveEvent +"QWidget::dragMoveEvent" qwidget.html#dragMoveEvent +"QWidget::drawText" qwidget.html#drawText +"QWidget::dropEvent" qwidget.html#dropEvent +"QWidget::enabled" qwidget.html#enabled-prop +"QWidget::enabledChange" qwidget.html#enabledChange +"QWidget::enterEvent" qwidget.html#enterEvent +"QWidget::erase" qwidget.html#erase +"QWidget::eraseColor" qwidget.html#eraseColor +"QWidget::erasePixmap" qwidget.html#erasePixmap +"QWidget::event" qwidget.html#event +"QWidget::find" qwidget.html#find +"QWidget::focus" qwidget.html#focus-prop +"QWidget::focusData" qwidget.html#focusData +"QWidget::focusEnabled" qwidget.html#focusEnabled-prop +"QWidget::focusInEvent" qwidget.html#focusInEvent +"QWidget::focusNextPrevChild" qwidget.html#focusNextPrevChild +"QWidget::focusOutEvent" qwidget.html#focusOutEvent +"QWidget::focusPolicy" qwidget.html#focusPolicy +"QWidget::focusPolicy" qwidget.html#focusPolicy-prop +"QWidget::focusProxy" qwidget.html#focusProxy +"QWidget::focusWidget" qwidget.html#focusWidget +"QWidget::font" qwidget.html#font +"QWidget::font" qwidget.html#font-prop +"QWidget::fontChange" qwidget.html#fontChange +"QWidget::fontInfo" qwidget.html#fontInfo +"QWidget::fontMetrics" qwidget.html#fontMetrics +"QWidget::foregroundColor" qwidget.html#foregroundColor +"QWidget::frameGeometry" qwidget.html#frameGeometry +"QWidget::frameGeometry" qwidget.html#frameGeometry-prop +"QWidget::frameSize" qwidget.html#frameSize +"QWidget::frameSize" qwidget.html#frameSize-prop +"QWidget::fullScreen" qwidget.html#fullScreen-prop +"QWidget::geometry" qwidget.html#geometry +"QWidget::geometry" qwidget.html#geometry-prop +"QWidget::getWFlags" qwidget.html#getWFlags +"QWidget::grabKeyboard" qwidget.html#grabKeyboard +"QWidget::grabMouse" qwidget.html#grabMouse +"QWidget::hasFocus" qwidget.html#hasFocus +"QWidget::hasMouse" qwidget.html#hasMouse +"QWidget::hasMouseTracking" qwidget.html#hasMouseTracking +"QWidget::height" qwidget.html#height +"QWidget::height" qwidget.html#height-prop +"QWidget::heightForWidth" qwidget.html#heightForWidth +"QWidget::hidden" qwidget.html#hidden-prop +"QWidget::hide" qwidget.html#hide +"QWidget::hideEvent" qwidget.html#hideEvent +"QWidget::icon" qwidget.html#icon +"QWidget::icon" qwidget.html#icon-prop +"QWidget::iconText" qwidget.html#iconText +"QWidget::iconText" qwidget.html#iconText-prop +"QWidget::imComposeEvent" qwidget.html#imComposeEvent +"QWidget::imEndEvent" qwidget.html#imEndEvent +"QWidget::imStartEvent" qwidget.html#imStartEvent +"QWidget::inputMethodEnabled" qwidget.html#inputMethodEnabled-prop +"QWidget::isActiveWindow" qwidget.html#isActiveWindow +"QWidget::isActiveWindow" qwidget.html#isActiveWindow-prop +"QWidget::isDesktop" qwidget.html#isDesktop +"QWidget::isDesktop" qwidget.html#isDesktop-prop +"QWidget::isDialog" qwidget.html#isDialog +"QWidget::isDialog" qwidget.html#isDialog-prop +"QWidget::isEnabled" qwidget.html#isEnabled +"QWidget::isEnabledTo" qwidget.html#isEnabledTo +"QWidget::isFocusEnabled" qwidget.html#isFocusEnabled +"QWidget::isFullScreen" qwidget.html#isFullScreen +"QWidget::isHidden" qwidget.html#isHidden +"QWidget::isInputMethodEnabled" qwidget.html#isInputMethodEnabled +"QWidget::isMaximized" qwidget.html#isMaximized +"QWidget::isMinimized" qwidget.html#isMinimized +"QWidget::isModal" qwidget.html#isModal +"QWidget::isModal" qwidget.html#isModal-prop +"QWidget::isPopup" qwidget.html#isPopup +"QWidget::isPopup" qwidget.html#isPopup-prop +"QWidget::isShown" qwidget.html#isShown +"QWidget::isTopLevel" qwidget.html#isTopLevel +"QWidget::isTopLevel" qwidget.html#isTopLevel-prop +"QWidget::isUpdatesEnabled" qwidget.html#isUpdatesEnabled +"QWidget::isVisible" qwidget.html#isVisible +"QWidget::isVisibleTo" qwidget.html#isVisibleTo +"QWidget::keyPressEvent" qwidget.html#keyPressEvent +"QWidget::keyReleaseEvent" qwidget.html#keyReleaseEvent +"QWidget::keyboardGrabber" qwidget.html#keyboardGrabber +"QWidget::layout" qwidget.html#layout +"QWidget::leaveEvent" qwidget.html#leaveEvent +"QWidget::lower" qwidget.html#lower +"QWidget::macEvent" qwidget.html#macEvent +"QWidget::mapFrom" qwidget.html#mapFrom +"QWidget::mapFromGlobal" qwidget.html#mapFromGlobal +"QWidget::mapFromParent" qwidget.html#mapFromParent +"QWidget::mapTo" qwidget.html#mapTo +"QWidget::mapToGlobal" qwidget.html#mapToGlobal +"QWidget::mapToParent" qwidget.html#mapToParent +"QWidget::maximized" qwidget.html#maximized-prop +"QWidget::maximumHeight" qwidget.html#maximumHeight +"QWidget::maximumHeight" qwidget.html#maximumHeight-prop +"QWidget::maximumSize" qwidget.html#maximumSize +"QWidget::maximumSize" qwidget.html#maximumSize-prop +"QWidget::maximumWidth" qwidget.html#maximumWidth +"QWidget::maximumWidth" qwidget.html#maximumWidth-prop +"QWidget::metric" qwidget.html#metric +"QWidget::microFocusHint" qwidget.html#microFocusHint +"QWidget::microFocusHint" qwidget.html#microFocusHint-prop +"QWidget::minimized" qwidget.html#minimized-prop +"QWidget::minimumHeight" qwidget.html#minimumHeight +"QWidget::minimumHeight" qwidget.html#minimumHeight-prop +"QWidget::minimumSize" qwidget.html#minimumSize +"QWidget::minimumSize" qwidget.html#minimumSize-prop +"QWidget::minimumSizeHint" qwidget.html#minimumSizeHint +"QWidget::minimumSizeHint" qwidget.html#minimumSizeHint-prop +"QWidget::minimumWidth" qwidget.html#minimumWidth +"QWidget::minimumWidth" qwidget.html#minimumWidth-prop +"QWidget::mouseDoubleClickEvent" qwidget.html#mouseDoubleClickEvent +"QWidget::mouseGrabber" qwidget.html#mouseGrabber +"QWidget::mouseMoveEvent" qwidget.html#mouseMoveEvent +"QWidget::mousePressEvent" qwidget.html#mousePressEvent +"QWidget::mouseReleaseEvent" qwidget.html#mouseReleaseEvent +"QWidget::mouseTracking" qwidget.html#mouseTracking-prop +"QWidget::move" qwidget.html#move +"QWidget::moveEvent" qwidget.html#moveEvent +"QWidget::ownCursor" qwidget.html#ownCursor +"QWidget::ownCursor" qwidget.html#ownCursor-prop +"QWidget::ownFont" qwidget.html#ownFont +"QWidget::ownFont" qwidget.html#ownFont-prop +"QWidget::ownPalette" qwidget.html#ownPalette +"QWidget::ownPalette" qwidget.html#ownPalette-prop +"QWidget::paintEvent" qwidget.html#paintEvent +"QWidget::palette" qwidget.html#palette +"QWidget::palette" qwidget.html#palette-prop +"QWidget::paletteBackgroundColor" qwidget.html#paletteBackgroundColor +"QWidget::paletteBackgroundColor" qwidget.html#paletteBackgroundColor-prop +"QWidget::paletteBackgroundPixmap" qwidget.html#paletteBackgroundPixmap +"QWidget::paletteBackgroundPixmap" qwidget.html#paletteBackgroundPixmap-prop +"QWidget::paletteChange" qwidget.html#paletteChange +"QWidget::paletteForegroundColor" qwidget.html#paletteForegroundColor +"QWidget::paletteForegroundColor" qwidget.html#paletteForegroundColor-prop +"QWidget::parentWidget" qwidget.html#parentWidget +"QWidget::polish" qwidget.html#polish +"QWidget::pos" qwidget.html#pos +"QWidget::pos" qwidget.html#pos-prop +"QWidget::qwsEvent" qwidget.html#qwsEvent +"QWidget::raise" qwidget.html#raise +"QWidget::rect" qwidget.html#rect +"QWidget::rect" qwidget.html#rect-prop +"QWidget::releaseKeyboard" qwidget.html#releaseKeyboard +"QWidget::releaseMouse" qwidget.html#releaseMouse +"QWidget::repaint" qwidget.html#repaint +"QWidget::reparent" qwidget.html#reparent +"QWidget::resetInputContext" qwidget.html#resetInputContext +"QWidget::resize" qwidget.html#resize +"QWidget::resizeEvent" qwidget.html#resizeEvent +"QWidget::scroll" qwidget.html#scroll +"QWidget::setAcceptDrops" qwidget.html#setAcceptDrops +"QWidget::setActiveWindow" qwidget.html#setActiveWindow +"QWidget::setAutoMask" qwidget.html#setAutoMask +"QWidget::setBackgroundEmpty" qwidget.html#setBackgroundEmpty +"QWidget::setBackgroundMode" qwidget.html#setBackgroundMode +"QWidget::setBackgroundOrigin" qwidget.html#setBackgroundOrigin +"QWidget::setBaseSize" qwidget.html#setBaseSize +"QWidget::setCaption" qwidget.html#setCaption +"QWidget::setCursor" qwidget.html#setCursor +"QWidget::setDisabled" qwidget.html#setDisabled +"QWidget::setEnabled" qwidget.html#setEnabled +"QWidget::setEraseColor" qwidget.html#setEraseColor +"QWidget::setErasePixmap" qwidget.html#setErasePixmap +"QWidget::setFixedHeight" qwidget.html#setFixedHeight +"QWidget::setFixedSize" qwidget.html#setFixedSize +"QWidget::setFixedWidth" qwidget.html#setFixedWidth +"QWidget::setFocus" qwidget.html#setFocus +"QWidget::setFocusPolicy" qwidget.html#setFocusPolicy +"QWidget::setFocusProxy" qwidget.html#setFocusProxy +"QWidget::setFont" qwidget.html#setFont +"QWidget::setGeometry" qwidget.html#setGeometry +"QWidget::setHidden" qwidget.html#setHidden +"QWidget::setIcon" qwidget.html#setIcon +"QWidget::setIconText" qwidget.html#setIconText +"QWidget::setInputMethodEnabled" qwidget.html#setInputMethodEnabled +"QWidget::setKeyCompression" qwidget.html#setKeyCompression +"QWidget::setMask" qwidget.html#setMask +"QWidget::setMaximumHeight" qwidget.html#setMaximumHeight +"QWidget::setMaximumSize" qwidget.html#setMaximumSize +"QWidget::setMaximumWidth" qwidget.html#setMaximumWidth +"QWidget::setMicroFocusHint" qwidget.html#setMicroFocusHint +"QWidget::setMinimumHeight" qwidget.html#setMinimumHeight +"QWidget::setMinimumSize" qwidget.html#setMinimumSize +"QWidget::setMinimumWidth" qwidget.html#setMinimumWidth +"QWidget::setMouseTracking" qwidget.html#setMouseTracking +"QWidget::setPalette" qwidget.html#setPalette +"QWidget::setPaletteBackgroundColor" qwidget.html#setPaletteBackgroundColor +"QWidget::setPaletteBackgroundPixmap" qwidget.html#setPaletteBackgroundPixmap +"QWidget::setPaletteForegroundColor" qwidget.html#setPaletteForegroundColor +"QWidget::setShown" qwidget.html#setShown +"QWidget::setSizeIncrement" qwidget.html#setSizeIncrement +"QWidget::setSizePolicy" qwidget.html#setSizePolicy +"QWidget::setStyle" qwidget.html#setStyle +"QWidget::setTabOrder" qwidget.html#setTabOrder +"QWidget::setUpdatesEnabled" qwidget.html#setUpdatesEnabled +"QWidget::setWFlags" qwidget.html#setWFlags +"QWidget::setWindowOpacity" qwidget.html#setWindowOpacity +"QWidget::setWindowState" qwidget.html#setWindowState +"QWidget::show" qwidget.html#show +"QWidget::showEvent" qwidget.html#showEvent +"QWidget::showFullScreen" qwidget.html#showFullScreen +"QWidget::showMaximized" qwidget.html#showMaximized +"QWidget::showMinimized" qwidget.html#showMinimized +"QWidget::showNormal" qwidget.html#showNormal +"QWidget::shown" qwidget.html#shown-prop +"QWidget::size" qwidget.html#size +"QWidget::size" qwidget.html#size-prop +"QWidget::sizeHint" qwidget.html#sizeHint +"QWidget::sizeHint" qwidget.html#sizeHint-prop +"QWidget::sizeIncrement" qwidget.html#sizeIncrement +"QWidget::sizeIncrement" qwidget.html#sizeIncrement-prop +"QWidget::sizePolicy" qwidget.html#sizePolicy +"QWidget::sizePolicy" qwidget.html#sizePolicy-prop +"QWidget::stackUnder" qwidget.html#stackUnder +"QWidget::style" qwidget.html#style +"QWidget::styleChange" qwidget.html#styleChange +"QWidget::tabletEvent" qwidget.html#tabletEvent +"QWidget::testWFlags" qwidget.html#testWFlags +"QWidget::topLevelWidget" qwidget.html#topLevelWidget +"QWidget::underMouse" qwidget.html#underMouse-prop +"QWidget::unsetCursor" qwidget.html#unsetCursor +"QWidget::unsetFont" qwidget.html#unsetFont +"QWidget::unsetPalette" qwidget.html#unsetPalette +"QWidget::update" qwidget.html#update +"QWidget::updateGeometry" qwidget.html#updateGeometry +"QWidget::updateMask" qwidget.html#updateMask +"QWidget::updatesEnabled" qwidget.html#updatesEnabled-prop +"QWidget::visible" qwidget.html#visible-prop +"QWidget::wheelEvent" qwidget.html#wheelEvent +"QWidget::width" qwidget.html#width +"QWidget::width" qwidget.html#width-prop +"QWidget::winEvent" qwidget.html#winEvent +"QWidget::winId" qwidget.html#winId +"QWidget::windowActivationChange" qwidget.html#windowActivationChange +"QWidget::windowOpacity" qwidget.html#windowOpacity +"QWidget::windowOpacity" qwidget.html#windowOpacity-prop +"QWidget::windowState" qwidget.html#windowState +"QWidget::x" qwidget.html#x +"QWidget::x" qwidget.html#x-prop +"QWidget::x11Event" qwidget.html#x11Event +"QWidget::y" qwidget.html#y +"QWidget::y" qwidget.html#y-prop +"QWidget::~QWidget" qwidget.html#~QWidget +"QWidgetFactory" qwidgetfactory.html +"QWidgetFactory::addWidgetFactory" qwidgetfactory.html#addWidgetFactory +"QWidgetFactory::create" qwidgetfactory.html#create +"QWidgetFactory::createWidget" qwidgetfactory.html#createWidget +"QWidgetFactory::loadImages" qwidgetfactory.html#loadImages +"QWidgetFactory::supportsWidget" qwidgetfactory.html#supportsWidget +"QWidgetFactory::widgets" qwidgetfactory.html#widgets +"QWidgetFactory::~QWidgetFactory" qwidgetfactory.html#~QWidgetFactory +"QWidgetItem" qwidgetitem.html +"QWidgetItem::expanding" qwidgetitem.html#expanding +"QWidgetItem::isEmpty" qwidgetitem.html#isEmpty +"QWidgetItem::maximumSize" qwidgetitem.html#maximumSize +"QWidgetItem::minimumSize" qwidgetitem.html#minimumSize +"QWidgetItem::setGeometry" qwidgetitem.html#setGeometry +"QWidgetItem::sizeHint" qwidgetitem.html#sizeHint +"QWidgetItem::widget" qwidgetitem.html#widget +"QWidgetPlugin" qwidgetplugin.html +"QWidgetPlugin::create" qwidgetplugin.html#create +"QWidgetPlugin::group" qwidgetplugin.html#group +"QWidgetPlugin::iconSet" qwidgetplugin.html#iconSet +"QWidgetPlugin::includeFile" qwidgetplugin.html#includeFile +"QWidgetPlugin::isContainer" qwidgetplugin.html#isContainer +"QWidgetPlugin::keys" qwidgetplugin.html#keys +"QWidgetPlugin::toolTip" qwidgetplugin.html#toolTip +"QWidgetPlugin::whatsThis" qwidgetplugin.html#whatsThis +"QWidgetPlugin::~QWidgetPlugin" qwidgetplugin.html#~QWidgetPlugin +"QWidgetStack" qwidgetstack.html +"QWidgetStack::aboutToShow" qwidgetstack.html#aboutToShow +"QWidgetStack::addWidget" qwidgetstack.html#addWidget +"QWidgetStack::id" qwidgetstack.html#id +"QWidgetStack::raiseWidget" qwidgetstack.html#raiseWidget +"QWidgetStack::removeWidget" qwidgetstack.html#removeWidget +"QWidgetStack::setChildGeometries" qwidgetstack.html#setChildGeometries +"QWidgetStack::visibleWidget" qwidgetstack.html#visibleWidget +"QWidgetStack::widget" qwidgetstack.html#widget +"QWidgetStack::~QWidgetStack" qwidgetstack.html#~QWidgetStack +"QWindowsMime" qwindowsmime.html +"QWindowsMime::all" qwindowsmime.html#all +"QWindowsMime::canConvert" qwindowsmime.html#canConvert +"QWindowsMime::cf" qwindowsmime.html#cf +"QWindowsMime::cfFor" qwindowsmime.html#cfFor +"QWindowsMime::cfToMime" qwindowsmime.html#cfToMime +"QWindowsMime::convertFromMime" qwindowsmime.html#convertFromMime +"QWindowsMime::convertToMime" qwindowsmime.html#convertToMime +"QWindowsMime::convertor" qwindowsmime.html#convertor +"QWindowsMime::convertorName" qwindowsmime.html#convertorName +"QWindowsMime::countCf" qwindowsmime.html#countCf +"QWindowsMime::initialize" qwindowsmime.html#initialize +"QWindowsMime::mimeFor" qwindowsmime.html#mimeFor +"QWindowsMime::~QWindowsMime" qwindowsmime.html#~QWindowsMime +"QWindowsStyle" qwindowsstyle.html +"QWizard" qwizard.html +"QWizard::addPage" qwizard.html#addPage +"QWizard::appropriate" qwizard.html#appropriate +"QWizard::back" qwizard.html#back +"QWizard::backButton" qwizard.html#backButton +"QWizard::cancelButton" qwizard.html#cancelButton +"QWizard::currentPage" qwizard.html#currentPage +"QWizard::finishButton" qwizard.html#finishButton +"QWizard::help" qwizard.html#help +"QWizard::helpButton" qwizard.html#helpButton +"QWizard::helpClicked" qwizard.html#helpClicked +"QWizard::indexOf" qwizard.html#indexOf +"QWizard::insertPage" qwizard.html#insertPage +"QWizard::layOutButtonRow" qwizard.html#layOutButtonRow +"QWizard::layOutTitleRow" qwizard.html#layOutTitleRow +"QWizard::next" qwizard.html#next +"QWizard::nextButton" qwizard.html#nextButton +"QWizard::page" qwizard.html#page +"QWizard::pageCount" qwizard.html#pageCount +"QWizard::removePage" qwizard.html#removePage +"QWizard::selected" qwizard.html#selected +"QWizard::setAppropriate" qwizard.html#setAppropriate +"QWizard::setBackEnabled" qwizard.html#setBackEnabled +"QWizard::setFinishEnabled" qwizard.html#setFinishEnabled +"QWizard::setHelpEnabled" qwizard.html#setHelpEnabled +"QWizard::setNextEnabled" qwizard.html#setNextEnabled +"QWizard::setTitle" qwizard.html#setTitle +"QWizard::setTitleFont" qwizard.html#setTitleFont +"QWizard::showPage" qwizard.html#showPage +"QWizard::title" qwizard.html#title +"QWizard::titleFont" qwizard.html#titleFont +"QWizard::titleFont" qwizard.html#titleFont-prop +"QWizard::~QWizard" qwizard.html#~QWizard +"QWorkspace" qworkspace.html +"QWorkspace::WindowOrder" qworkspace.html#WindowOrder +"QWorkspace::activateNextWindow" qworkspace.html#activateNextWindow +"QWorkspace::activatePrevWindow" qworkspace.html#activatePrevWindow +"QWorkspace::activeWindow" qworkspace.html#activeWindow +"QWorkspace::cascade" qworkspace.html#cascade +"QWorkspace::closeActiveWindow" qworkspace.html#closeActiveWindow +"QWorkspace::closeAllWindows" qworkspace.html#closeAllWindows +"QWorkspace::scrollBarsEnabled" qworkspace.html#scrollBarsEnabled +"QWorkspace::scrollBarsEnabled" qworkspace.html#scrollBarsEnabled-prop +"QWorkspace::setScrollBarsEnabled" qworkspace.html#setScrollBarsEnabled +"QWorkspace::tile" qworkspace.html#tile +"QWorkspace::windowActivated" qworkspace.html#windowActivated +"QWorkspace::windowList" qworkspace.html#windowList +"QWorkspace::~QWorkspace" qworkspace.html#~QWorkspace +"QXmlAttributes" qxmlattributes.html +"QXmlAttributes::append" qxmlattributes.html#append +"QXmlAttributes::clear" qxmlattributes.html#clear +"QXmlAttributes::count" qxmlattributes.html#count +"QXmlAttributes::index" qxmlattributes.html#index +"QXmlAttributes::length" qxmlattributes.html#length +"QXmlAttributes::localName" qxmlattributes.html#localName +"QXmlAttributes::qName" qxmlattributes.html#qName +"QXmlAttributes::type" qxmlattributes.html#type +"QXmlAttributes::uri" qxmlattributes.html#uri +"QXmlAttributes::value" qxmlattributes.html#value +"QXmlAttributes::~QXmlAttributes" qxmlattributes.html#~QXmlAttributes +"QXmlContentHandler" qxmlcontenthandler.html +"QXmlContentHandler::characters" qxmlcontenthandler.html#characters +"QXmlContentHandler::endDocument" qxmlcontenthandler.html#endDocument +"QXmlContentHandler::endElement" qxmlcontenthandler.html#endElement +"QXmlContentHandler::endPrefixMapping" qxmlcontenthandler.html#endPrefixMapping +"QXmlContentHandler::errorString" qxmlcontenthandler.html#errorString +"QXmlContentHandler::ignorableWhitespace" qxmlcontenthandler.html#ignorableWhitespace +"QXmlContentHandler::processingInstruction" qxmlcontenthandler.html#processingInstruction +"QXmlContentHandler::setDocumentLocator" qxmlcontenthandler.html#setDocumentLocator +"QXmlContentHandler::skippedEntity" qxmlcontenthandler.html#skippedEntity +"QXmlContentHandler::startDocument" qxmlcontenthandler.html#startDocument +"QXmlContentHandler::startElement" qxmlcontenthandler.html#startElement +"QXmlContentHandler::startPrefixMapping" qxmlcontenthandler.html#startPrefixMapping +"QXmlDTDHandler" qxmldtdhandler.html +"QXmlDTDHandler::errorString" qxmldtdhandler.html#errorString +"QXmlDTDHandler::notationDecl" qxmldtdhandler.html#notationDecl +"QXmlDTDHandler::unparsedEntityDecl" qxmldtdhandler.html#unparsedEntityDecl +"QXmlDeclHandler" qxmldeclhandler.html +"QXmlDeclHandler::attributeDecl" qxmldeclhandler.html#attributeDecl +"QXmlDeclHandler::errorString" qxmldeclhandler.html#errorString +"QXmlDeclHandler::externalEntityDecl" qxmldeclhandler.html#externalEntityDecl +"QXmlDeclHandler::internalEntityDecl" qxmldeclhandler.html#internalEntityDecl +"QXmlDefaultHandler" qxmldefaulthandler.html +"QXmlDefaultHandler::~QXmlDefaultHandler" qxmldefaulthandler.html#~QXmlDefaultHandler +"QXmlEntityResolver" qxmlentityresolver.html +"QXmlEntityResolver::errorString" qxmlentityresolver.html#errorString +"QXmlEntityResolver::resolveEntity" qxmlentityresolver.html#resolveEntity +"QXmlErrorHandler" qxmlerrorhandler.html +"QXmlErrorHandler::error" qxmlerrorhandler.html#error +"QXmlErrorHandler::errorString" qxmlerrorhandler.html#errorString +"QXmlErrorHandler::fatalError" qxmlerrorhandler.html#fatalError +"QXmlErrorHandler::warning" qxmlerrorhandler.html#warning +"QXmlInputSource" qxmlinputsource.html +"QXmlInputSource::data" qxmlinputsource.html#data +"QXmlInputSource::fetchData" qxmlinputsource.html#fetchData +"QXmlInputSource::fromRawData" qxmlinputsource.html#fromRawData +"QXmlInputSource::next" qxmlinputsource.html#next +"QXmlInputSource::reset" qxmlinputsource.html#reset +"QXmlInputSource::setData" qxmlinputsource.html#setData +"QXmlInputSource::~QXmlInputSource" qxmlinputsource.html#~QXmlInputSource +"QXmlLexicalHandler" qxmllexicalhandler.html +"QXmlLexicalHandler::comment" qxmllexicalhandler.html#comment +"QXmlLexicalHandler::endCDATA" qxmllexicalhandler.html#endCDATA +"QXmlLexicalHandler::endDTD" qxmllexicalhandler.html#endDTD +"QXmlLexicalHandler::endEntity" qxmllexicalhandler.html#endEntity +"QXmlLexicalHandler::errorString" qxmllexicalhandler.html#errorString +"QXmlLexicalHandler::startCDATA" qxmllexicalhandler.html#startCDATA +"QXmlLexicalHandler::startDTD" qxmllexicalhandler.html#startDTD +"QXmlLexicalHandler::startEntity" qxmllexicalhandler.html#startEntity +"QXmlLocator" qxmllocator.html +"QXmlLocator::columnNumber" qxmllocator.html#columnNumber +"QXmlLocator::lineNumber" qxmllocator.html#lineNumber +"QXmlLocator::~QXmlLocator" qxmllocator.html#~QXmlLocator +"QXmlNamespaceSupport" qxmlnamespacesupport.html +"QXmlNamespaceSupport::popContext" qxmlnamespacesupport.html#popContext +"QXmlNamespaceSupport::prefix" qxmlnamespacesupport.html#prefix +"QXmlNamespaceSupport::prefixes" qxmlnamespacesupport.html#prefixes +"QXmlNamespaceSupport::processName" qxmlnamespacesupport.html#processName +"QXmlNamespaceSupport::pushContext" qxmlnamespacesupport.html#pushContext +"QXmlNamespaceSupport::reset" qxmlnamespacesupport.html#reset +"QXmlNamespaceSupport::setPrefix" qxmlnamespacesupport.html#setPrefix +"QXmlNamespaceSupport::splitName" qxmlnamespacesupport.html#splitName +"QXmlNamespaceSupport::uri" qxmlnamespacesupport.html#uri +"QXmlNamespaceSupport::~QXmlNamespaceSupport" qxmlnamespacesupport.html#~QXmlNamespaceSupport +"QXmlParseException" qxmlparseexception.html +"QXmlParseException::columnNumber" qxmlparseexception.html#columnNumber +"QXmlParseException::lineNumber" qxmlparseexception.html#lineNumber +"QXmlParseException::message" qxmlparseexception.html#message +"QXmlParseException::publicId" qxmlparseexception.html#publicId +"QXmlParseException::systemId" qxmlparseexception.html#systemId +"QXmlReader" qxmlreader.html +"QXmlReader::DTDHandler" qxmlreader.html#DTDHandler +"QXmlReader::contentHandler" qxmlreader.html#contentHandler +"QXmlReader::declHandler" qxmlreader.html#declHandler +"QXmlReader::entityResolver" qxmlreader.html#entityResolver +"QXmlReader::errorHandler" qxmlreader.html#errorHandler +"QXmlReader::feature" qxmlreader.html#feature +"QXmlReader::hasFeature" qxmlreader.html#hasFeature +"QXmlReader::hasProperty" qxmlreader.html#hasProperty +"QXmlReader::lexicalHandler" qxmlreader.html#lexicalHandler +"QXmlReader::parse" qxmlreader.html#parse +"QXmlReader::property" qxmlreader.html#property +"QXmlReader::setContentHandler" qxmlreader.html#setContentHandler +"QXmlReader::setDTDHandler" qxmlreader.html#setDTDHandler +"QXmlReader::setDeclHandler" qxmlreader.html#setDeclHandler +"QXmlReader::setEntityResolver" qxmlreader.html#setEntityResolver +"QXmlReader::setErrorHandler" qxmlreader.html#setErrorHandler +"QXmlReader::setFeature" qxmlreader.html#setFeature +"QXmlReader::setLexicalHandler" qxmlreader.html#setLexicalHandler +"QXmlReader::setProperty" qxmlreader.html#setProperty +"QXmlSimpleReader" qxmlsimplereader.html +"QXmlSimpleReader::parse" qxmlsimplereader.html#parse +"QXmlSimpleReader::parseContinue" qxmlsimplereader.html#parseContinue +"QXmlSimpleReader::setFeature" qxmlsimplereader.html#setFeature +"QXmlSimpleReader::~QXmlSimpleReader" qxmlsimplereader.html#~QXmlSimpleReader +"QXtWidget::isActiveWindow" qxtwidget.html#isActiveWindow +"QXtWidget::setActiveWindow" qxtwidget.html#setActiveWindow +"QXtWidget::x11Event" qxtwidget.html#x11Event +"QXtWidget::xtWidget" qxtwidget.html#xtWidget +"QXtWidget::~QXtWidget" qxtwidget.html#~QXtWidget +"Q_ASSERT" qapplication.html#Q_ASSERT +"Q_CHECK_PTR" qapplication.html#Q_CHECK_PTR +"Qt" qt.html +"Qt Commercial Editions" commercialeditions.html +"Qt Demo" demo-example.html +"Qt Distribution Example" distributor-example.html +"Qt Editions" editions.html +"Qt Motif Extension" motif-extension.html +"Qt Motif Extension - A Migration Walkthrough" motif-walkthrough.html +"Qt Netscape Plugin Extension" netscape-plugin.html +"Qt Object Model" object.html +"Qt Open Source Edition" opensourceedition.html +"Qt Open Source Edition License Agreement" license.html +"Qt OpenGL 3D Graphics" opengl.html +"Qt Plugins HOWTO" plugins-howto.html +"Qt Reference Documentation (Open Source Edition)" index.html +"Qt Template Library" qt-template-lib.html +"Qt Tutorial #1 - The 14 Steps" tutorial.html +"Qt Tutorial - Chapter 10: Smooth as Silk" tutorial1-10.html +"Qt Tutorial - Chapter 11: Giving It a Shot" tutorial1-11.html +"Qt Tutorial - Chapter 12: Hanging in the Air the Way Bricks Don't" tutorial1-12.html +"Qt Tutorial - Chapter 13: Game Over" tutorial1-13.html +"Qt Tutorial - Chapter 14: Facing the Wall" tutorial1-14.html +"Qt Tutorial - Chapter 1: Hello, World!" tutorial1-01.html +"Qt Tutorial - Chapter 2: Calling it Quits" tutorial1-02.html +"Qt Tutorial - Chapter 3: Family Values" tutorial1-03.html +"Qt Tutorial - Chapter 4: Let There Be Widgets" tutorial1-04.html +"Qt Tutorial - Chapter 5: Building Blocks" tutorial1-05.html +"Qt Tutorial - Chapter 6: Building Blocks Galore!" tutorial1-06.html +"Qt Tutorial - Chapter 7: One Thing Leads to Another" tutorial1-07.html +"Qt Tutorial - Chapter 8: Preparing for Battle" tutorial1-08.html +"Qt Tutorial - Chapter 9: With Cannon You Can" tutorial1-09.html +"Qt Widget Hierarchy" qaxserver-demo-hierarchy.html +"Qt Widget Hierarchy (in-process)" qaxserver-example-hierarchy.html +"Qt' OpenGL widgets as an ActiveX (executable)" qaxserver-example-opengl.html +"Qt's Classes" classes.html +"Qt's Main Classes" mainclasses.html +"Qt's Tools" tools-list.html +"Qt/Embedded Performance Tuning" emb-performance.html +"Qt/Embedded Pointer Handling" emb-pointer.html +"Qt/Embedded Virtual Framebuffer" emb-qvfb.html +"Qt/Embedded as a VNC Server" emb-vnc.html +"Qt/Embedded environment variables" emb-envvars.html +"Qt/Mac Issues" mac-differences.html +"Qt/Mac is Mac OS X Native" qtmac-as-native.html +"Qt::AlignmentFlags" qt.html#AlignmentFlags +"Qt::AnchorAttribute" qt.html#AnchorAttribute +"Qt::ArrowType" qt.html#ArrowType +"Qt::BGMode" qt.html#BGMode +"Qt::BackgroundMode" qt.html#BackgroundMode +"Qt::BrushStyle" qt.html#BrushStyle +"Qt::ButtonState" qt.html#ButtonState +"Qt::Corner" qt.html#Corner +"Qt::CursorShape" qt.html#CursorShape +"Qt::DateFormat" qt.html#DateFormat +"Qt::Dock" qt.html#Dock +"Qt::ImageConversionFlags" qt.html#ImageConversionFlags +"Qt::Key" qt.html#Key +"Qt::MacintoshVersion" qt.html#MacintoshVersion +"Qt::Modifier" qt.html#Modifier +"Qt::Orientation" qt.html#Orientation +"Qt::PaintUnit" qt.html#PaintUnit +"Qt::PenCapStyle" qt.html#PenCapStyle +"Qt::PenJoinStyle" qt.html#PenJoinStyle +"Qt::PenStyle" qt.html#PenStyle +"Qt::RasterOp" qt.html#RasterOp +"Qt::SequenceMatch" qt.html#SequenceMatch +"Qt::SortOrder" qt.html#SortOrder +"Qt::StringComparisonMode" qt.html#StringComparisonMode +"Qt::TextFlags" qt.html#TextFlags +"Qt::TextFormat" qt.html#TextFormat +"Qt::TimeSpec" qt.html#TimeSpec +"Qt::UIEffect" qt.html#UIEffect +"Qt::WidgetFlags" qt.html#WidgetFlags +"Qt::WidgetState" qt.html#WidgetState +"Qt::WindowState" qt.html#WindowState +"Qt::WindowsVersion" qt.html#WindowsVersion +"Range controls" rangecontrols-example.html +"Refactoring Existing Code" motif-walkthrough-7.html +"Replacing the Print Dialog" motif-walkthrough-9.html +"Replacing the View Widget" motif-walkthrough-8.html +"Richtext" richtext-example.html +"Rot13" rot-example.html +"Running Qt/Embedded applications" emb-running.html +"SQL Module" sql.html +"SQL Module - Drivers" sql-driver.html +"SQL Table" sqltable-example.html +"Scrollview" scrollview-example.html +"Session Management" session.html +"Setting Options" tutorial2-09.html +"Setting the Application Icon" appicon.html +"Shared Classes" shclass.html +"Show Image" showimg-example.html +"Signals and Slots" signalsandslots.html +"Simple Addressbook" addressbook-example.html +"Simple Filemanager" fileiconview-example.html +"Simple HTML Help Browser" helpviewer-example.html +"Simple Painting Application" scribble-example.html +"Simple editor that can load encodings" qwerty-example.html +"Small Table Example" small-table-example-example.html +"Sound Example" sound-example.html +"Splitter" splitter-example.html +"Standard Accelerator Keys" accelerators.html +"Standard Qt widgets as ActiveX controls (in-process)" qaxserver-example-wrapper.html +"Standard Qt widgets in an HTML page" qaxserver-demo-wrapper.html +"Starting processes with IO redirection" process-example.html +"Style overview" customstyles.html +"Tabdialog" tabdialog-example.html +"Table Example" statistics-example.html +"Table Module" table.html +"Table of Prime Numbers 2-9999" primes.html +"Tablet Example" tablet-example.html +"Taking Data" tutorial2-08.html +"Tetrix" tetrix-example.html +"Text Edit Example" textedit-example.html +"Thanks!" credits.html +"The 'Big Picture'" tutorial2-02.html +"The ActiveQt framework" activeqt.html +"The Coordinate System" coordsys.html +"The DumpDoc Tool" activeqt-tools-dumpdoc.html +"The Feature Definition File" emb-features.html +"The IDC Tool" activeqt-tools-idc.html +"The Project File" tutorial2-10.html +"The QAxContainer Module" qaxcontainer.html +"The QAxServer Module" qaxserver.html +"The Qt FAQ" faq.html +"The Qt/Embedded-specific classes" emb-classes.html +"Themes (Styles)" themes-example.html +"Thread Support in Qt" threads.html +"Tic Tac Toe" tictac-example.html +"Timers" timers.html +"Toplevel Widgets" toplevel-example.html +"Trademarks" trademarks.html +"Transformed Graphics Demo" xform-example.html +"Trivial Example" trivial-nsplugin-example.html +"Tutorial #2" tutorial2.html +"Two simple Qt widgets" qaxserver-demo-multiple.html +"Two simple Qt widgets (in-process)" qaxserver-example-multiple.html +"User Interface Compiler (uic)" uic.html +"Using Custom QDialogs" motif-walkthrough-4.html +"Using Existing Dialogs with QMotifDialog" motif-walkthrough-5.html +"Using Qt Main Window Classes" motif-walkthrough-6.html +"Using Qt Standard Dialogs" motif-walkthrough-3.html +"Using menus" menu-example.html +"Using the Meta Object Compiler" moc.html +"Using the Motif Event Loop" motif-customwidget-example.html +"Walkthrough: A Simple Application" simple-application.html +"Walkthrough: How to use the Qt SAX2 classes" xml-sax-walkthrough.html +"Walkthrough: Using Qt objects in Microsoft .NET" activeqt-dotnet.html +"Walkthrough: Using SAX2 features with the Qt XML classes" xml-sax-features-walkthrough.html +"Why doesn't Qt use templates for signals and slots?" templates.html +"Widgets Example" widgets-example.html +"Window Geometry" geometry.html +"Window System-specific Notes" winsystem.html +"Wizard" wizard-example.html +"Workspace Module" workspace.html +"Wrapping Up" tutorial2-11.html +"Writing your own layout manager" customlayout.html +"XML Module" xml.html +"Year 2000 Compliance Statement" y2k.html +"abstractwidgets" abstractwidgets.html +"activeqt-tools" activeqt-tools.html +"advanced" advanced.html +"appearance" appearance.html +"application" application.html +"basic" basic.html +"bitBlt" qimage.html#bitBlt +"bitBlt" qpaintdevice.html#bitBlt +"collection" collection.html +"copyBlt" qpixmap.html#copyBlt +"database" database.html +"dialogs" dialogs.html +"draganddrop" draganddrop.html +"environment" environment.html +"events" events.html +"examples" examples.html +"geomanagement" geomanagement.html +"graphics" graphics.html +"helpsystem" helpsystem.html +"i18n" i18n.html +"images" images.html +"io" io.html +"makeqpf" makeqpf.html +"misc" misc.html +"motif-examples" motif-examples.html +"multimedia" multimedia.html +"network-examples" network-examples.html +"nsplugin-examples" nsplugin-examples.html +"objectmodel" objectmodel.html +"opengl-examples" opengl-examples.html +"operator!=" qchar.html#operator!-eq +"operator!=" qcstring.html#operator!-eq +"operator!=" qpoint.html#operator!-eq +"operator!=" qrect.html#operator!-eq +"operator!=" qsize.html#operator!-eq +"operator!=" qstring.html#operator!-eq +"operator&" qbitarray.html#operator-and +"operator*" qpoint.html#operator* +"operator*" qsize.html#operator* +"operator*" qwmatrix.html#operator* +"operator+" qcstring.html#operator+ +"operator+" qpoint.html#operator+ +"operator+" qsize.html#operator+ +"operator+" qstring.html#operator+ +"operator-" qpoint.html#operator- +"operator-" qsize.html#operator- +"operator/" qpoint.html#operator/ +"operator/" qsize.html#operator/ +"operator<" qchar.html#operator-lt +"operator<" qcstring.html#operator-lt +"operator<" qstring.html#operator-lt +"operator<<" qbitarray.html#operator-lt-lt +"operator<<" qbrush.html#operator-lt-lt +"operator<<" qcolor.html#operator-lt-lt +"operator<<" qcolorgroup.html#operator-lt-lt +"operator<<" qcstring.html#operator-lt-lt +"operator<<" qcursor.html#operator-lt-lt +"operator<<" qdate.html#operator-lt-lt +"operator<<" qdatetime.html#operator-lt-lt +"operator<<" qdockarea.html#operator-lt-lt +"operator<<" qdomnode.html#operator-lt-lt +"operator<<" qfont.html#operator-lt-lt +"operator<<" qimage.html#operator-lt-lt +"operator<<" qkeysequence.html#operator-lt-lt +"operator<<" qmainwindow.html#operator-lt-lt +"operator<<" qmap.html#operator-lt-lt +"operator<<" qmemarray.html#operator-lt-lt +"operator<<" qpalette.html#operator-lt-lt +"operator<<" qpen.html#operator-lt-lt +"operator<<" qpicture.html#operator-lt-lt +"operator<<" qpixmap.html#operator-lt-lt +"operator<<" qpoint.html#operator-lt-lt +"operator<<" qpointarray.html#operator-lt-lt +"operator<<" qrect.html#operator-lt-lt +"operator<<" qregion.html#operator-lt-lt +"operator<<" qsize.html#operator-lt-lt +"operator<<" qsplitter.html#operator-lt-lt +"operator<<" qstring.html#operator-lt-lt +"operator<<" qtime.html#operator-lt-lt +"operator<<" quuid.html#operator-lt-lt +"operator<<" qvaluelist.html#operator-lt-lt +"operator<<" qwmatrix.html#operator-lt-lt +"operator<=" qchar.html#operator-lt-eq +"operator<=" qcstring.html#operator-lt-eq +"operator<=" qstring.html#operator-lt-eq +"operator==" qchar.html#operator-eq-eq +"operator==" qcstring.html#operator-eq-eq +"operator==" qpoint.html#operator-eq-eq +"operator==" qrect.html#operator-eq-eq +"operator==" qsize.html#operator-eq-eq +"operator==" qstring.html#operator-eq-eq +"operator>" qchar.html#operator-gt +"operator>" qcstring.html#operator-gt +"operator>" qstring.html#operator-gt +"operator>=" qchar.html#operator-gt-eq +"operator>=" qcstring.html#operator-gt-eq +"operator>=" qstring.html#operator-gt-eq +"operator>>" qbitarray.html#operator-gt-gt +"operator>>" qbrush.html#operator-gt-gt +"operator>>" qcolor.html#operator-gt-gt +"operator>>" qcstring.html#operator-gt-gt +"operator>>" qcursor.html#operator-gt-gt +"operator>>" qdate.html#operator-gt-gt +"operator>>" qdatetime.html#operator-gt-gt +"operator>>" qdockarea.html#operator-gt-gt +"operator>>" qfont.html#operator-gt-gt +"operator>>" qimage.html#operator-gt-gt +"operator>>" qkeysequence.html#operator-gt-gt +"operator>>" qmainwindow.html#operator-gt-gt +"operator>>" qmap.html#operator-gt-gt +"operator>>" qmemarray.html#operator-gt-gt +"operator>>" qpalette.html#operator-gt-gt +"operator>>" qpen.html#operator-gt-gt +"operator>>" qpicture.html#operator-gt-gt +"operator>>" qpixmap.html#operator-gt-gt +"operator>>" qpoint.html#operator-gt-gt +"operator>>" qpointarray.html#operator-gt-gt +"operator>>" qrect.html#operator-gt-gt +"operator>>" qregion.html#operator-gt-gt +"operator>>" qsize.html#operator-gt-gt +"operator>>" qsplitter.html#operator-gt-gt +"operator>>" qstring.html#operator-gt-gt +"operator>>" qtime.html#operator-gt-gt +"operator>>" quuid.html#operator-gt-gt +"operator>>" qvaluelist.html#operator-gt-gt +"operator>>" qwmatrix.html#operator-gt-gt +"operator^" qbitarray.html#operator^ +"operator|" qbitarray.html#operator| +"organizers" organizers.html +"plugins" plugins.html +"qAddPostRoutine" qapplication.html#qAddPostRoutine +"qAlpha" qcolor.html#qAlpha +"qBlue" qcolor.html#qBlue +"qChecksum" qmemarray.html#qChecksum +"qCompress" qbytearray.html#qCompress +"qDebug" qapplication.html#qDebug +"qDrawPlainRect" qpainter.html#qDrawPlainRect +"qDrawShadeLine" qpainter.html#qDrawShadeLine +"qDrawShadePanel" qpainter.html#qDrawShadePanel +"qDrawShadeRect" qpainter.html#qDrawShadeRect +"qDrawWinButton" qpainter.html#qDrawWinButton +"qDrawWinPanel" qpainter.html#qDrawWinPanel +"qFatal" qapplication.html#qFatal +"qGray" qcolor.html#qGray +"qGreen" qcolor.html#qGreen +"qInitNetworkProtocols" qurloperator.html#qInitNetworkProtocols +"qInstallMsgHandler" qapplication.html#qInstallMsgHandler +"qMakePair" qpair.html#qMakePair +"qRed" qcolor.html#qRed +"qRgb" qcolor.html#qRgb +"qRgba" qcolor.html#qRgba +"qSysInfo" qapplication.html#qSysInfo +"qSystemWarning" qapplication.html#qSystemWarning +"qUncompress" qbytearray.html#qUncompress +"qVersion" qapplication.html#qVersion +"qWarning" qapplication.html#qWarning +"qaction-examples" qaction-examples.html +"qaxcontainer-examples" qaxcontainer-examples.html +"qaxserver-examples" qaxserver-examples.html +"qfont-examples" qfont-examples.html +"qmemmove" qcstring.html#qmemmove +"qprocess-examples" qprocess-examples.html +"qstrcmp" qcstring.html#qstrcmp +"qstrcpy" qcstring.html#qstrcpy +"qstrdup" qcstring.html#qstrdup +"qstricmp" qcstring.html#qstricmp +"qstrlen" qcstring.html#qstrlen +"qstrncmp" qcstring.html#qstrncmp +"qstrncpy" qcstring.html#qstrncpy +"qstrnicmp" qcstring.html#qstrnicmp +"qt_find_obj_child" qobject.html#qt_find_obj_child +"qtl" qtl.html +"qws" qws.html +"shared" shared.html +"sql-examples" sql-examples.html +"step-by-step-examples" step-by-step-examples.html +"table-examples" table-examples.html +"text" text.html +"thread" thread.html +"time" time.html +"tools" tools.html +"xml-examples" xml-examples.html +"xml-tools" xml-tools.html +"" classchart.html diff --git a/doc/html/index.html b/doc/html/index.html new file mode 100644 index 00000000..fd7c62ff --- /dev/null +++ b/doc/html/index.html @@ -0,0 +1,186 @@ + + + + + +TQt Reference Documentation (Open Source Edition) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Reference Documentation (Open Source Edition)

+ + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Notice: This edition is +for the development of Free and Open +Source software only; see Commercial Editions.
+TQt Community + +Getting Started + +General +
+ + + + + +
+API Reference + +Modules + +Overviews +
+ + + + + +
+Porting & Platforms + +Tools + +Licenses & Credits +
+ + + + + +
+ + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/inputdialogs.png b/doc/html/inputdialogs.png new file mode 100644 index 00000000..8923655e Binary files /dev/null and b/doc/html/inputdialogs.png differ diff --git a/doc/html/install-mac.html b/doc/html/install-mac.html new file mode 100644 index 00000000..c8eed6fb --- /dev/null +++ b/doc/html/install-mac.html @@ -0,0 +1,139 @@ + + + + + +Installing TQt/Mac + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Installing TQt/Mac

+ + +

You may need to be logged in as root, depending on the permissions of +the directories where you choose to install TQt. +

    +
  1. Unpack the archive if you have not done so already: +

    +    cd /Developer
    +    gnutar xzf qt-mac-version.tar.gz
    +
    + +

    This creates the directory /Developer/qt-version containing the +files from the main archive. +

    Rename qt-version to qt (or make a symlink): +

    +    mv qt-version qt
    +
    + +

    The rest of this file assumes that TQt is unpacked in /Developer/qt. +

  2. Set some environment variables in the file .profile (or .login, +depending on your shell) in your home directory. Create the +file if it is not there already. +

      +
    • QTDIR -- the directory in which you're building TQt +
    • PATH -- to locate the moc program and other TQt tools +
    • MANPATH -- to access the TQt man pages +
    • LD_LIBRARY_PATH -- for the shared TQt library +
    +

    This is done like this: +

    In .profile (if your shell is bash, ksh, zsh or sh), add the +following lines: +

    +    QTDIR=/Developer/qt
    +    PATH=$QTDIR/bin:$PATH
    +    MANPATH=$QTDIR/man:$MANPATH
    +    DYLD_LIBRARY_PATH=$QTDIR/lib:$DYLD_LIBRARY_PATH
    +
    +    export QTDIR PATH MANPATH DYLD_LIBRARY_PATH
    +
    + +

    In .login (in case your shell is csh or tcsh), add the following lines: +

    +    setenv QTDIR /Developer/qt
    +    setenv PATH $QTDIR/bin:$PATH
    +    setenv MANPATH $QTDIR/man:$MANPATH
    +    setenv DYLD_LIBRARY_PATH $QTDIR/lib:$DYLD_LIBRARY_PATH
    +
    + +

    After you have done this, you will need to login again, or +re-source the profile before continuing. +

  3. If you have the commercial edition of TQt, install your license +file as $HOME/.qt-license. +

  4. Compile the TQt library, and build the example programs, +the tutorial and the tools (e.g. TQt + Designer) as follows. +

    Type: +

    +    cd $QTDIR
    +    ./configure
    +
    + +

    This will configure the TQt library for your machine. Note that +GIF support is turned off by default. Run ./configure -help +to get a list of configuration options. +

    To create the library and compile all examples and the tutorial: +

    +    make
    +
    + +If you have problems, see +http://www.trolltech.com/platforms/. +

  5. Once you have built TQt, it is ready to use. If TQt has not been +configured with the -static option, then in order to be able to +launch TQt applications from the Finder you must place the relevant +libraries in a directory where they can be found. We recommend +making these symbolic links (if you have configured TQt with -thread +please change the libqt below with libtqt-mt): +

    +    ln -sf $QTDIR/lib/libqt.3.dylib /usr/lib
    +    ln -sf $QTDIR/lib/libtqui.1.dylib /usr/lib
    +
    + +

    You may need to have 'administrator' access to do this, (in which +case, precede each command with sudo', e.g. sudo ln -s ...). If +you use sudo you'll be prompted for the administrator password. +

    If you do not have administrator access, or you would prefer to do +a user install (rather than system install) of the libraries you +can do (if you have configured TQt with -thread please change the libqt +below with libtqt-mt): +

    +    ln -sf $QTDIR/lib/libqt.3.dylib $HOME/lib
    +    ln -sf $QTDIR/lib/libtqui.1.dylib $HOME/lib
    +
    + +
+

That's all! TQt is now installed. TQt's documentation can be read with +TQt Assistant or by any web browser; the contents page is +$QTDIR/doc/html/index.html. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/install-win.html b/doc/html/install-win.html new file mode 100644 index 00000000..116c47b1 --- /dev/null +++ b/doc/html/install-win.html @@ -0,0 +1,45 @@ + + + + + +Installing TQt/Windows + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Installing TQt/Windows

+ + +

The TQt/Windows distribution is distributed as a self-extracting archive +with a built-in installer. Just follow the installation wizard. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/install-x11.html b/doc/html/install-x11.html new file mode 100644 index 00000000..d5db00e8 --- /dev/null +++ b/doc/html/install-x11.html @@ -0,0 +1,136 @@ + + + + + +Installing TQt/X11 + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Installing TQt/X11

+ + +

You may need to be root, depending on the permissions of the directories +where you choose to install TQt. +

    +
  1. Unpack the archive if you have not done so already: +

    +    cd /usr/local
    +    gunzip qt-x11-version.tar.gz    # uncompress the archive
    +    tar xf qt-x11-version.tar       # unpack it
    +
    + +

    This creates the directory /usr/local/qt-version containing the +files from the main archive. +

    Rename qt-version to qt (or make a symlink): +

    +    mv qt-version qt
    +
    + +

    The rest of this file assumes that TQt is installed in /usr/local/qt. +

  2. Set some environment variables in the file .profile (or .login, +depending on your shell) in your home directory. Create the +file if it is not there already. +

      +
    • QTDIR -- the directory in which you're building TQt +
    • PATH -- to locate the moc program and other TQt tools +
    • MANPATH -- to access the TQt man pages +
    • LD_LIBRARY_PATH -- for the shared TQt library +
    +

    This is done like this: +

    In .profile (if your shell is bash, ksh, zsh or sh), add the +following lines: +

    +    QTDIR=/usr/local/qt
    +    PATH=$QTDIR/bin:$PATH
    +    MANPATH=$QTDIR/man:$MANPATH
    +    LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
    +
    +    export QTDIR PATH MANPATH LD_LIBRARY_PATH
    +
    + +

    In .login (in case your shell is csh or tcsh), add the following lines: +

    +    setenv QTDIR /usr/local/qt
    +    setenv PATH $QTDIR/bin:$PATH
    +    setenv MANPATH $QTDIR/man:$MANPATH
    +    setenv LD_LIBRARY_PATH $QTDIR/lib:$LD_LIBRARY_PATH
    +
    + +

    After you have done this, you will need to login again, or +re-source the profile before continuing, so that at least $QTDIR +is set. The installation will give an error message and not +proceed otherwise. +

    On AIX set LIBPATH and on HP-UX set SHLIB_PATH instead of LD_LIBRARY_PATH. +

    Note that the SGI MIPSpro o32 and Sun WorkShop 5.0 targets are no +longer supported as of TQt 3.3. +

  3. Install your license file as $HOME/.qt-license. +For the free edition and evaluation version, you do not need a license +file. +

  4. Compile the TQt library, and build the example programs, +the tutorial and the tools (e.g. TQt + Designer) as follows. +

    Type: +

    +    ./configure
    +
    + +

    This will configure the TQt library for your machine. Note that +GIF support is turned off by default. Run ./configure -help +to get a list of configuration options. Read PLATFORMS for a +list of supported platforms. +

    To create the library and compile all examples and the tutorial: +

    +    make
    +
    + +If you have problems, see +http://www.trolltech.com/platforms/. +

  5. In very few cases you may need to run /sbin/ldconfig or something +similar at this point if you are using shared libraries. +

    If you have problems running the example programs, e.g. messages like +

    +    can't load library 'libqt.so.2'
    +
    + +you probably need to put a reference to the qt library in a +configuration file and run /sbin/ldconfig as root on your system. +And don't forget to set LD_LIBRARY_PATH as explained in 2) above. +

  6. The online HTML documentation is installed in /usr/local/qt/doc/html/ +The main page is /usr/local/qt/doc/html/index.html. +The man pages are installed in /usr/local/qt/doc/man/. +The documentation is also accessible using TQt + Assistant. +
+

You're done. TQt is now installed. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/installation.html b/doc/html/installation.html new file mode 100644 index 00000000..697bece9 --- /dev/null +++ b/doc/html/installation.html @@ -0,0 +1,50 @@ + + + + + +Installation + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Installation

+ + +

The installation procedure is different for the different TQt platforms: +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/integration.html b/doc/html/integration.html new file mode 100644 index 00000000..fc526750 --- /dev/null +++ b/doc/html/integration.html @@ -0,0 +1,168 @@ + + + + + +About the Visual Studio Integration Plugin + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

About the Visual Studio Integration Plugin

+ + + +

The Visual Studio Integration Plugin is currently available only to users of +Visual Studio 6, it offers simple ways of doing common tasks when writing a +TQt application. +

+

+ + +

How to install the Visual Studio Integration Plugin +

+

When you install TQt, the integration plugin should be installed for you, +and ready for use. However, sometimes this does not happen properly, so +you need to manually carry out the following steps. +

+

Now the integration plugin should be properly installed. If this doesn't +work, then contact Trolltech technical support giving details of +what went wrong. +

How to uninstall the Visual Studio Integration Plugin +

+

When you want to uninstall the integration plugin, just carry out the +following steps. +

+

What can the Visual Studio Integration Plugin do? +

+

The integration plugin adds the following options to Visual Studio: +

+

Using the 'New TQt Project' button +

+

The 'New TQt Project' button allows you to create a simple TQt project +ready for development. Simply fill in the form and if you select +'Dialog' or 'Main Window' without MDI support then it will +automatically start up TQt Designer. When you have finished with +the form in TQt Designer just save it and it will appear in a +ready made TQt project. +

If you select 'Main Window' with 'MDI Support' then it will simply +give you a code skeleton in a project ready for you to populate with +your own code. +

Using the 'New TQt Dialog' button +

+

The 'New TQt Dialog' button works in two ways: You can use it to create a new +dialog for your project; or you can use it to insert an existing +dialog into your project. +

If you want to create a new dialog then all you need to do is specify where +the dialog file should be saved and give it a name. This will start up +TQt Designer to allow you to design your new dialog, and will add it to +the existing project. +

If you want to add an existing dialog to your project, then just select the +relevant .ui file. This will then add it to your existing project and add +the relevant steps to create the generated code. +

Using the 'TQt Designer' button +

+

The 'TQt Designer' button simply starts up TQt Designer, it has no ties to +your existing project so whatever you do with it will not affect your +existing projects. It can also be started up by using the Ctrl+Shift+D key +combination in Visual Studio. +

Using the 'Open TQt Project' button +

+

The 'Open TQt Project' button allows you to convert an existing qmake project file into a .dsp file which you can insert into +your existing workspace. When you click the 'Open TQt Project' +button, just select an existing qmake project file (a .pro +file) and then click OK. You will get a message box at the end +which asks you to insert the newly created .dsp file into your +existing workspace. +

Using the 'Write TQt Project' button +

+

The 'Write TQt Project' button creates a qmake project (.pro) +file for your current project so that you can easily copy the files +onto another platform and be able to use qmake to create a Makefile +on that other platform. All you need to do is make the project you +want to create a .pro file for, and click on the button. Just +name your qmake project file and click Save. +

Using the 'Use TQt In Current Project' button +

+

The 'Use TQt In Current Project' button simply adds in the necessary +information for the current project so that it links against TQt and +sets any other settings needed to use TQt in that project. +

Using the 'Add MOC' button +

+

The 'Add MOC' button will add in the custom build step for the selected file +so that it creates any needed MOC files and it will add these generated +files to the project. All you need to do to use it is click on a file that +has Q_OBJECT and click the button. +

You only need to use this button if you added a file that has Q_OBJECT in it by hand, you don't need to use this if you used any +of the previously mentioned buttons. It can also be invoked by using +the Ctrl+Shift+M key combination in Visual Studio. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/io.html b/doc/html/io.html new file mode 100644 index 00000000..8426b923 --- /dev/null +++ b/doc/html/io.html @@ -0,0 +1,83 @@ + + + + + +Input/Output and Networking + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Input/Output and Networking

+ + +

These classes are used to handle input and output to and from external +devices, processes, files etc. as well as manipulating files and directories. +

+

+
TQBufferI/O device that operates on a TQByteArray +
TQClipboardAccess to the window system clipboard +
TQDataStreamSerialization of binary data to a TQIODevice +
TQDirAccess to directory structures and their contents in a platform-independent way +
TQDnsAsynchronous DNS lookups +
TQFileI/O device that operates on files +
TQFileInfoSystem-independent file information +
TQFtpImplementation of the FTP protocol +
TQHostAddressIP address +
TQHttpImplementation of the HTTP protocol +
TQHttpHeaderHeader information for HTTP +
TQHttpRequestHeaderRequest header information for HTTP +
TQHttpResponseHeaderResponse header information for HTTP +
TQImageIOParameters for loading and saving images +
TQIODeviceThe base class of I/O devices +
TQLocalFsImplementation of a TQNetworkProtocol that works on the local file system +
TQMacMimeMaps open-standard MIME to Mac flavors +
TQMimeSourceAbstraction of objects which provide formatted data of a certain MIME type +
TQMimeSourceFactoryExtensible provider of mime-typed data +
TQNetworkOperationCommon operations for network protocols +
TQNetworkProtocolCommon API for network protocols +
TQProcessUsed to start external programs and to communicate with them +
TQServerSocketTCP-based server +
TQSettingsPersistent platform-independent application settings +
TQSignalCan be used to send signals for classes that don't inherit TQObject +
TQSignalMapperBundles signals from identifiable senders +
TQSocketBuffered TCP connection +
TQSocketDevicePlatform-independent low-level socket API +
TQSocketNotifierSupport for socket callbacks +
TQTextIStreamConvenience class for input streams +
TQTextOStreamConvenience class for output streams +
TQTextStreamBasic functions for reading and writing text using a TQIODevice +
TQUrlURL parser and simplifies working with URLs +
TQUrlInfoStores information about URLs +
TQUrlOperatorCommon operations on URLs +
TQWindowsMimeMaps open-standard MIME to Window Clipboard formats +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/keyfeatures30.html b/doc/html/keyfeatures30.html new file mode 100644 index 00000000..84118941 --- /dev/null +++ b/doc/html/keyfeatures30.html @@ -0,0 +1,357 @@ + + + + + +Key Features in TQt 3.0 + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Key Features in TQt 3.0

+ + + +

TQt 3.0 adds a lot of new features and improvements over the TQt 2.x +series. Some internals have undergone major redesign and new classes +and methods have been added. +

We have tried to keep the API of TQt 3.0 as compatible as possible with +the TQt 2.x series. For most applications only minor changes will be +needed to compile and run them successfully using TQt 3.0. +

One of the major new features that has been added in the 3.0 release +is a module allowing you to easily work with databases. The API is +platform independent and database neutral. This module is seamlessly +integrated into TQt Designer, greatly simplifying the process of +building database applications and using data aware widgets. +

+Other major new features include a plugin architecture. You can use +your own and third party plugins your own applications. +The Unicode support of TQt 2.x has been greatly enhanced, it now +includes full support for scripts written from right to left (e.g. +Arabic and Hebrew) and also provides improved support for Asian +languages. +

Many new classes have been added to the TQt Library. Amongst them are +classes that provide a docking architecture +(TQDockArea/TQDockWindow), a powerful rich text editor +(TQTextEdit), a class to store and access application settings +(TQSettings) and a class to create and communicate with processes +(TQProcess). +

Apart from the changes in the library itself a lot has been done to +make the development of TQt applications with TQt 3.0 even easier than +before. Two new applications have been added: TQt Linguist is a tool to +help you translate your application into different languages; TQt +Assistant is an easy to use help browser for the TQt documentation that +supports bookmarks and can search by keyword. +

Another change concerns the TQt build system, which has been reworked +to make it a lot easier to port TQt to new platforms. You can use this +platform independent build system for your own applications. +

The TQt Library +

+

A large number of new features has been added to TQt 3.0. The following +list gives an overview of the most important new and changed aspects +of the TQt library. A full list of every new method follows the +overview. +

Database support +

+

One of the major new features in TQt 3.0 is the SQL +module that provides multiplatform access to SQL databases, +making database application programming with TQt seamless and portable. +The API, built with standard SQL, is database-neutral and software +development is independent of the underlying database. +

A collection of tightly focused C++ classes are provided to give the +programmer direct access to SQL databases. Developers can send raw SQL +to the database server or have the TQt SQL classes generate SQL queries +automatically. Drivers for Oracle, PostgreSQL, MySQL and ODBC are +available and writing new drivers is straightforward. +

Tying the results of SQL queries to GUI components is fully supported +by TQt's SQL widgets. These classes include a tabular data widget +(for spreadsheet-like data presentation with in-place editing), a +form-based data browser (which provides data navigation and edit +functions) and a form-based data viewer (which provides read-only +forms). This framework can be extended by using custom field editors, +allowing for example, a data table to use custom widgets for in-place +editing. The SQL module fully supports TQt's signal/slots mechanism, +making it easy for developers to include their own data validation and +auditing code. +

TQt Designer fully supports TQt's SQL module. All SQL widgets can be +laid out within TQt Designer, and relationships can be established +between controls visually. Many interactions can be defined purely in +terms of TQt's signals/slots mechanism directly in TQt Designer. +

+

Plugins +

+

The TQLibrary class provides a platform independent wrapper for runtime +loading of shared libraries. TQPluginManager makes it trivial to implement +plugin support in applications. The TQt library is able to load +additional styles, database drivers and text codecs from plugins. +

TQt Designer supports custom widgets in plugins, and will use the +widgets both when designing and previewing forms. +

See the plugins documentation. +

Rich text engine and editor +

+

The rich text engine originally introduced in TQt 2.0 has been further +optimized and extended to support editing. It allows editing formatted +text with different fonts, colors, paragraph styles, tables and +images. The editor supports different word wrap modes, command-based +undo/redo, multiple selections, drag and drop, and many other +features. The new TQTextEdit engine is highly optimized for proccesing +and displaying large documents tquickly and efficiently. +

Unicode +

+

Apart from the rich text engine, another new feature of TQt 3.0 that +relates to text handling is the greatly improved Unicode support. TQt +3.0 includes an implementation of the bidirectional algorithm (BiDi) +as defined in the Unicode standard and a shaping engine for Arabic, +which gives full native language support to Arabic and Hebrew speaking +people. At the same time the support for Asian languages has been +greatly enhanced. +

The support is almost transparent for the developer using TQt to +develop their applications. This means that developers who developed +applications using TQt 2.x will automatically gain the full support for +these languages when switching to TQt 3.0. Developers can rely on their +application to work for people using writing systems different from +Latin1, without having to worry about the complexities involved with +these scripts, as TQt takes care of this automatically. +

Docked and Floating Windows +

+

TQt 3.0 introduces the concept of Dock Windows and Dock Areas. Dock +windows are widgets, that can be attached to, and detached from, dock +areas. The commonest kind of dock window is a tool bar. Any number of +dock windows may be placed in a dock area. A main window can have dock +areas, for example, TQMainWindow provides four dock areas (top, left, +bottom, right) by default. The user can freely move dock windows and +place them at a convenient place in a dock area, or drag them out of +the application and have them float freely as top level windows in +their own right. Dock windows can also be minimized or hidden. +

For developers, dock windows behave just like ordinary widgets. TQToolbar +for example is now a specialized subclass of a dock window. The API +of TQMainWindow and TQToolBar is source compatible with TQt 2.x, so +existing code which uses these classes will continue to work. +

Regular Expressions +

+

TQt has always provided regular expression support, but that support +was pretty much limited to what was retquired in common GUI control +elements such as file dialogs. TQt 3.0 introduces a new regular +expression engine, TQRegExp, that supports most of Perl's regex +features and is Unicode based. The most useful additions are support +for parentheses (capturing and non-capturing) and backreferences. +

Storing application settings +

+

Most programs will need to store some settings between runs, for +example, user selected fonts, colors and other preferences, or a list +of recently used files. The new TQSettings class provides a platform +independent way to achieve this goal. The API makes it easy to store +and retrieve most of the basic data types used in TQt (such as basic +C++ types, strings, lists, colors, etc). The class uses the registry +on the Windows platform and traditional resource files on Unix. +

Creating and controlling other processes +

+

TQProcess is a class that allows you to start other programs from +within a TQt application in a platform independent manner. It gives you +full control over the started program, for example you can redirect +the input and output of console applications. +

Accessibility +

+

Accessibility means making software usable and accessible to a wide +range of users, including those with disabilities. In TQt 3.0, most +widgets provide accessibility information for assistive tools that can +be used by a wide range of disabled users. TQt standard widgets like +buttons or range controls are fully supported. Support for complex +widgets, like e.g. TQListView, is in development. Existing applications +that make use of standard widgets will become accessible just by using +TQt 3.0. +

TQt uses the Active Accessibility infrastructure on Windows, and needs +the MSAA SDK, which is part of most platform SDKs. With improving +standardization of accessibility on other platforms, TQt will support +assistive technologies on other systems, too. +

XML Improvements +

+

The XML framework introduced in TQt 2.2 has been vastly improved. TQt +2.2 already supported level 1 of the Document Object Model (DOM), a +W3C standard for accessing and modifying XML documents. TQt 3.0 has +added support for DOM Level 2 and XML namespaces. +

The XML parser has been extended to allow incremental parsing of XML +documents. This allows you to start parsing the document directly +after the first parts of the data have arrived, and to continue +whenever new data is available. This is especially useful if the XML +document is read from a slow source, e.g. over the network, as it +allows the application to start working on the data at a very early +stage. +

SVG support +

+

SVG is a W3C standard for "Scalable Vector Graphics". TQt 3.0's XML +support means that TQPicture can optionally generate and import static +SVG documents. All the SVG features that have an equivalent in +TQPainter are supported. +

Multihead support +

+

Many professional applications, such as DTP and CAD software, are able +to display data on two or more monitors. In TQt 3.0 the TQDesktopWidget +class provides the application with runtime information about the +number and geometry of the desktops on the different monitors and such +allows applications to efficiently use a multi-monitor setup. +

The virtual desktop of Mac OS X, Windows 98, and 2000 is supported, as well +as the traditional multi-screen and the newer Xinerama multihead setups on +X11. +

X11 specific enhancements +

+

TQt 3.0 now complies with the NET WM Specification, recently adopted +by KDE 2.0. This allows easy integration and proper execution with +desktop environments that support the NET WM specification. +

The font handling on X11 has undergone major changes. TQFont no longer +has a one-to-one relation with window system fonts. TQFont is now a +logical font that can load multiple window system fonts to simplify +Unicode text display. This completely removes the burden of +changing/setting fonts for a specific locale/language from the +programmer. For end-users, any font can be used in any locale. For +example, a user in Norway will be able to see Korean text without +having to set their locale to Korean. +

TQt 3.0 also supports the new render extension recently added to +XFree86. This adds support for anti aliased text and pixmaps with +alpha channel (semi transparency) on the systems that support the +rendering extension (at the moment XFree 4.0.3 and later). +

Printing +

+

Printing support has been enhanced on all platforms. The TQPrinter +class now supports setting a virtual resolution for the painting +process. This makes WYSIWYG printing trivial, and also allows you to +take full advantage of the high resolution of a printer when painting +on it. +

The postscript driver built into TQt and used on Unix has been greatly +enhanced. It supports the embedding of true/open type and type1 fonts +into the document, and can correctly handle and display Unicode. +Support for fonts built into the printer has been enhanced and TQt now +knows about the most common printer fonts used for Asian languages. +

TQHttp +

+

This class provides a simple interface for HTTP downloads and uploads. +

Compatibility with the Standard Template Library (STL) +

+

Support for the C++ Standard Template Library has been added to the +TQt Template Library (TQTL). The TQTL +classes now contain appropriate copy constructors and typedefs so that +they can be freely mixed with other STL containers and algorithms. In +addition, new member functions have been added to TQTL template classes +which correspond to STL-style naming conventions (e.g., push_back()). +

TQt Designer +

+

TQt Designer was a pure dialog +editor in TQt 2.2 but has now been extended to provide the full +functionality of a GUI design tool. +

This includes the ability to lay out main windows with menus and +toolbars. Actions can be edited within TQt Designer and then plugged +into toolbars and menu bars via drag and drop. Splitters can now be +used in a way similar to layouts to group widgets horizontally or +vertically. +

In TQt 2.2, many of the dialogs created by TQt Designer had to be +subclassed to implement functionality beyond the predefined signal and +slot connections. Whilst the subclassing approach is still fully supported, +TQt Designer now offers an alternative: a plugin for editing +slots. The editor offers features such as syntax highlighting, +completion, parentheses matching and incremental search. +

The functionality of TQt Designer can now be extended via plugins. +Using TQt Designer's interface or by implementing one of the provided +interfaces in a plugin, a two way communication between plugin and TQt +Designer can be established. This functionality is used to implement +plugins for custom widgets, so that they can be used as real widgets +inside the designer. +

Basic support for project management has been added. This allows you +to read and edit *.pro files, add and remove files to/from the project +and do some global operations on the project. You can now open the +project file and have one-click access to all the *.ui forms in the +project. +

In addition to generating code via uic, TQt Designer now supports the +dynamic creation of widgets directly from XML user interface +description files (*.ui files) at runtime. This eliminates the need of +recompiling your application when the GUI changes, and could be used +to enable your customers to do their own customizations. Technically, +the feature is provided by a new class, TQWidgetFactory in the +TQResource library. +

TQt Linguist +

+

TQt Linguist is a GUI utility to +support translating the user-visible text in applications written with +TQt. It comes with two command-line tools: lupdate and lrelease. +

Translation of a TQt application is a three-step process: +

+

TQt Linguist is a tool suitable for use by translators. Each +user-visible (source) text is characterized by the text itself, a +context (usually the name of the C++ class containing the text), and +an optional comment to help the translator. The C++ class name will +usually be the name of the relevant dialog, and the comment will often +contain instructions that describe how to navigate to the relevant +dialog. +

You can create phrase books for TQt Linguist to provide common +translations to help ensure consistency and to speed up the +translation process. Whenever a translator navigates to a new text to +translate, TQt Linguist uses an intelligent algorithm to provide a list +of possible translations: the list is composed of relevant text from +any open phrase books and also from identical or similar text that has +already been translated. +

Once a translation is complete it can be marked as "done"; such +translations are included in the *.qm file. Text that has not been +"done" is included in the *.qm file in its original form. Although TQt +Linguist is a GUI application with dock windows and mouse control, +toolbars, etc., it has a full set of keyboard shortcuts to make +translation as fast and efficient as possible. +

When the TQt application that you're developing evolves (e.g. from +version 1.0 to version 1.1), the utility lupdate merges the source +texts from the new version with the previous translation source file, +reusing existing translations. In some typical cases, lupdate may +suggest translations. These translations are marked as unfinished, so +you can easily find and check them. +

TQt Assistant +

+

Thanks to the positive feedback we received about the help system +built into TQt Designer, we decided +to offer this part as a separate application called TQt Assistant. TQt Assistant can be used to +browse the TQt class documentation as well as the manuals for TQt +Designer and TQt Linguist. It offers index searching, a contents +overview, bookmarks history and incremental search. TQt Assistant is +used by both TQt Designer and TQt Linguist for browsing their help +documentation. +

qmake +

+

To ease portability we now provide the qmake utility to replace tmake. TQMake is a C++ version of +tmake which offers additional functionallity that is difficult to +reproduce in tmake. Trolltech uses qmake in its build system for TQt +and related products and we have released it as free software. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/layout-example.html b/doc/html/layout-example.html new file mode 100644 index 00000000..93a92b66 --- /dev/null +++ b/doc/html/layout-example.html @@ -0,0 +1,211 @@ + + + + + +Layout Managers + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Layout Managers

+ + +

+This example shows simple and intermediate use of TQt's layout +classes, TQGridLayout, TQBoxLayout etc. +


+

Implementation: +

/****************************************************************************
+** $Id: qt/layout.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qlabel.h>
+#include <qcolor.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qlineedit.h>
+#include <qmultilineedit.h>
+#include <qmenubar.h>
+#include <qpopupmenu.h>
+
+class ExampleWidget : public TQWidget
+{
+public:
+    ExampleWidget( TQWidget *parent = 0, const char *name = 0 );
+    ~ExampleWidget();
+};
+
+ExampleWidget::ExampleWidget( TQWidget *parent, const char *name )
+    : TQWidget( parent, name )
+{
+    // Make the top-level layout; a vertical box to contain all widgets
+    // and sub-layouts.
+    TQBoxLayout *topLayout = new TQVBoxLayout( this, 5 );
+
+    // Create a menubar...
+    TQMenuBar *menubar = new TQMenuBar( this );
+    menubar->setSeparator( TQMenuBar::InWindowsStyle );
+    TQPopupMenu* popup;
+    popup = new TQPopupMenu( this );
+    popup->insertItem( "&Quit", qApp, SLOT(tquit()) );
+    menubar->insertItem( "&File", popup );
+
+    // ...and tell the layout about it.
+    topLayout->setMenuBar( menubar );
+
+    // Make an hbox that will hold a row of buttons.
+    TQBoxLayout *buttons = new TQHBoxLayout( topLayout );
+    int i;
+    for ( i = 1; i <= 4; i++ ) {
+        TQPushButton* but = new TQPushButton( this );
+        TQString s;
+        s.sprintf( "Button %d", i );
+        but->setText( s );
+
+        // Set horizontal stretch factor to 10 to let the buttons
+        // stretch horizontally. The buttons will not stretch
+        // vertically, since bigWidget below will take up vertical
+        // stretch.
+        buttons->addWidget( but, 10 );
+        // (Actually, the result would have been the same with a
+        // stretch factor of 0; if no items in a layout have non-zero
+        // stretch, the space is divided equally between members.)
+    }
+
+    // Make another hbox that will hold a left-justified row of buttons.
+    TQBoxLayout *buttons2 = new TQHBoxLayout( topLayout );
+
+    TQPushButton* but = new TQPushButton( "Button five", this );
+    buttons2->addWidget( but );
+
+    but = new TQPushButton( "Button 6", this );
+    buttons2->addWidget( but );
+
+    // Fill up the rest of the hbox with stretchable space, so that
+    // the buttons get their minimum width and are pushed to the left.
+    buttons2->addStretch( 10 );
+
+    // Make  a big widget that will grab all space in the middle.
+    TQMultiLineEdit *bigWidget = new TQMultiLineEdit( this );
+    bigWidget->setText( "This widget will get all the remaining space" );
+    bigWidget->setFrameStyle( TQFrame::Panel | TQFrame::Plain );
+
+    // Set vertical stretch factor to 10 to let the bigWidget stretch
+    // vertically. It will stretch horizontally because there are no
+    // widgets beside it to take up horizontal stretch.
+    //    topLayout->addWidget( bigWidget, 10 );
+    topLayout->addWidget( bigWidget );
+
+    // Make a grid that will hold a vertical table of TQLabel/TQLineEdit
+    // pairs next to a large TQMultiLineEdit.
+
+    // Don't use hard-coded row/column numbers in TQGridLayout, you'll
+    // regret it when you have to change the layout.
+    const int numRows = 3;
+    const int labelCol = 0;
+    const int linedCol = 1;
+    const int multiCol = 2;
+
+    // Let the grid-layout have a spacing of 10 pixels between
+    // widgets, overriding the default from topLayout.
+    TQGridLayout *grid = new TQGridLayout( topLayout, 0, 0, 10 );
+    int row;
+
+    for ( row = 0; row < numRows; row++ ) {
+        TQLineEdit *ed = new TQLineEdit( this );
+        // The line edit goes in the second column
+        grid->addWidget( ed, row, linedCol );
+
+        // Make a label that is a buddy of the line edit
+        TQString s;
+        s.sprintf( "Line &%d", row+1 );
+        TQLabel *label = new TQLabel( ed, s, this );
+        // The label goes in the first column.
+        grid->addWidget( label, row, labelCol );
+    }
+
+    // The multiline edit will cover the entire vertical range of the
+    // grid (rows 0 to numRows) and stay in column 2.
+
+    TQMultiLineEdit *med = new TQMultiLineEdit( this );
+    grid->addMultiCellWidget( med, 0, -1, multiCol, multiCol );
+
+    // The labels will take the space they need. Let the remaining
+    // horizontal space be shared so that the multiline edit gets
+    // twice as much as the line edit.
+    grid->setColStretch( linedCol, 10 );
+    grid->setColStretch( multiCol, 20 );
+
+    // Add a widget at the bottom.
+    TQLabel* sb = new TQLabel( this );
+    sb->setText( "Let's pretend this is a status bar" );
+    sb->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+    // This widget will use all horizontal space, and have a fixed height.
+
+    // we should have made a subclass and implemented sizePolicy there...
+    sb->setFixedHeight( sb->sizeHint().height() );
+
+    sb->setAlignment( AlignVCenter | AlignLeft );
+    topLayout->addWidget( sb );
+
+    topLayout->activate();
+}
+
+ExampleWidget::~ExampleWidget()
+{
+    // All child widgets are deleted by TQt.
+    // The top-level layout and all its sub-layouts are deleted by TQt.
+}
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    ExampleWidget f;
+    a.setMainWidget(&f);
+    f.setCaption("TQt Example - Layouts");
+    f.show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/layout.html b/doc/html/layout.html new file mode 100644 index 00000000..12de2a5c --- /dev/null +++ b/doc/html/layout.html @@ -0,0 +1,246 @@ + + + + + +Layout Classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Layout Classes

+ + + +

The TQt layout system provides a simple and powerful way of specifying +the layout of child widgets. +

By specifying the logical layout once, you get the following benefits: +

+

TQt's layout classes were designed for hand-written C++ code, so +they're easy to understand and use. +

The disadvantage of hand-written layout code is that it isn't very +convenient when you're experimenting with the design of a form and you +have to go through the compile, link and run cycle for each change. +Our solution is TQt Designer, a GUI +visual design tool which makes it fast and easy to experiment with +layouts and which generates the C++ layout code for you. +

Layout Widgets +

+

The easiest way to give your widgets a good layout is to use the +layout widgets: TQHBox, TQVBox and TQGrid. A layout widget +automatically lays out its child widgets in the order they are +constructed. To create more complex layouts, you can nest layout +widgets inside each other. (Note that TQWidget does not have a +layout by default, you must add one if you want to lay out widgets +inside a TQWidget.) +

+

Two-column grid with five child widgets
+

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

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

You can adjust the layout to some extent by calling +TQWidget::setMinimumSize() or TQWidget::setFixedSize() on the child widgets. +

Adding Widgets to a Layout +

+

When you add widgets to a layout the layout process works as follows: +

    +
  1. All the widgets will initially be allocated an amount of space in +accordance with their TQWidget::sizePolicy(). +
  2. If any of the widgets have stretch factors set, with a value +greater than zero, then they are allocated space in proportion to +their stretch factor. +
  3. If any of the widgets have stretch factors set to zero they will +only get more space if no other widgets want the space. Of these, +space is allocated to widgets with an Expanding size policy first. +
  4. Any widgets that are allocated less space than their minimum size +(or minimum size hint if no minimum size is specified) are allocated +this minimum size they retquire. (Widgets don't have to have a minimum +size or minimum size hint in which case the strech factor is their +determining factor.) +
  5. Any widgets that are allocated more space than their maximum size +are allocated the maximum size space they retquire. (Widgets don't have +to have a maximum size in which case the strech factor is their +determining factor.) +
+

+

Stretch Factors + +

+

Widgets are normally created without any stretch factor set. When they +are laid out in a layout the widgets are given a share of space in +accordance with their TQWidget::sizePolicy() or their minimum size hint +whichever is the greater. Stretch factors are used to change how much +space widgets are given in proportion to one another. +

If we have three widgets laid out using a TQHBox with no stretch +factors set we will get a layout like this: +

3 widgets in a row
+

If we apply stretch factors to each widget, they will be laid out in +proportion (but never less than their minimum size hint), e.g. +

3 stretch factored widgets in a row
+

TQLayout subclassing +

+

If you need more control over the layout, use a TQLayout subclass. The layout classes included in TQt are TQGridLayout and TQBoxLayout. (TQHBoxLayout and TQVBoxLayout are trivial subclasses of TQBoxLayout, +that are simpler to use and make the code easier to read.) +

When you use a layout, you must insert each child both into its parent +widget (done in the constructor) and into its layout (typically done +with a function called addWidget()). This way, you can give layout +parameters for each widget, specifying properties like alignment, +stretch, and placement. +

The following code makes a grid like the one above, with a couple of +improvements: +

+    TQWidget *main = new TQWidget;
+
+    // make a 1x1 grid; it will auto-expand
+    TQGridLayout *grid = new TQGridLayout( main, 1, 1 );
+
+    // add the first four widgets with (row, column) addressing
+    grid->addWidget( new TQLabel( "One", main ),   0, 0 );
+    grid->addWidget( new TQLabel( "Two", main ),   0, 1 );
+    grid->addWidget( new TQLabel( "Three", main ), 1, 0 );
+    grid->addWidget( new TQLabel( "Four", main ),  1, 1 );
+
+    // add the last widget on row 2, spanning from column 0 to
+    // column 1, and center aligned 
+    grid->addMultiCellWidget( new TQLabel( "Five", main ), 2, 2, 0, 1,
+                              TQt::AlignCenter );
+
+    // let the ratio between the widths of columns 0 and 1 be 2:3
+    grid->setColStretch( 0, 2 );
+    grid->setColStretch( 1, 3 );
+
+ +

You can insert layouts inside a layout by giving the parent layout as +a parameter in the constructor. +

+    TQWidget *main = new TQWidget;
+    TQLineEdit *field = new TQLineEdit( main );
+    TQPushButton *ok = new TQPushButton( "OK", main );
+    TQPushButton *cancel = new TQPushButton( "Cancel", main );
+    TQLabel *label = new TQLabel( "Write once, compile everywhere.", main );
+
+    // a layout on a widget
+    TQVBoxLayout *vbox = new TQVBoxLayout( main );
+    vbox->addWidget( label );
+    vbox->addWidget( field );
+
+    // a layout inside a layout
+    TQHBoxLayout *buttons = new TQHBoxLayout( vbox );
+    buttons->addWidget( ok );
+    buttons->addWidget( cancel );
+
+ +If you are not satisfied with the default placement, you can create +the layout without a parent and then insert it with addLayout(). +The inner layout then becomes a child of the layout it is inserted +into. +

Custom Layouts +

+

If the built-in layout classes are not sufficient, you can define your +own. You must make a subclass of TQLayout that handles resizing and +size calculations, as well as a subclass of TQGLayoutIterator to +iterate over your layout class. +

See the Custom Layout page for an +in-depth description. +

Custom Widgets In Layouts +

+

When you make your own widget class, you should also communicate its +layout properties. If the widget has a TQLayout, this is already taken +care of. If the widget does not have any child widgets, or uses manual +layout, you should reimplement the following TQWidget member functions: +

+

Call TQWidget::updateGeometry() whenever the size hint, minimum size +hint or size policy changes. This will cause a layout recalculation. +Multiple calls to updateGeometry() will only cause one recalculation. +

If the preferred height of your widget depends on its actual width +(e.g. a label with automatic word-breaking), set the hasHeightForWidth() flag in +sizePolicy(), and reimplement TQWidget::heightForWidth(). +

Even if you implement heightForWidth(), it is still necessary to +provide a good sizeHint(). The sizeHint() provides the preferred width +of the widget, and it is used by TQLayout subclasses that do not +support heightForWidth() (both TQGridLayout and TQBoxLayout support it). +

For further guidance when implementing these functions, see their +implementations in existing TQt classes that have similar layout +retquirements to your new widget. +

Manual Layout +

+

If you are making a one-of-a-kind special layout, you can also make a +custom widget as described above. Reimplement TQWidget::resizeEvent() +to calculate the retquired distribution of sizes and call setGeometry() on each child. +

The widget will get an event with type +LayoutHint when the layout needs to be recalculated. Reimplement +TQWidget::event() to be notified of LayoutHint events. +

Layout Issues +

+

The use of rich text in a label widget can introduce some problems to +the layout of its parent widget. Problems occur due to the way rich text +is handled by TQt's layout managers when the label is word wrapped. +In certain cases the parent layout is put into TQLayout::FreeResize mode, +meaning that it will not adapt the layout of its contents to fit inside +small sized windows, or even prevent the user from making the +window too small to be usable. This can be overcome by subclassing +the problematic widgets, and implementing suitable sizeHint() and +minimumSizeHint() functions. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/layout1.png b/doc/html/layout1.png new file mode 100644 index 00000000..ac7960a1 Binary files /dev/null and b/doc/html/layout1.png differ diff --git a/doc/html/layout2.png b/doc/html/layout2.png new file mode 100644 index 00000000..304e536d Binary files /dev/null and b/doc/html/layout2.png differ diff --git a/doc/html/license.html b/doc/html/license.html new file mode 100644 index 00000000..74950aba --- /dev/null +++ b/doc/html/license.html @@ -0,0 +1,153 @@ + + + + + +TQt Open Source Edition License Agreement + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Open Source Edition License Agreement

+ + +

The TQt Open Source Edition is distributed under the Q Public License (TQPL). +It allows free use of TQt Open Source Edition for running software developed by +others, and free use of TQt Open Source Edition for development of free and open source +software. There is more information +about the TQPL at the Trolltech web site. +

Note that the TQt/Embedded Open Source Edition is not distributed +under the TQPL, but under the GNU General Public +License (GPL). +

For development non-free/proprietary software, the TQt Professional +Edition is available. It has a normal commercial library license, with +none of the special restrictions of the TQPL or the GPL. +


+

+

+THE Q PUBLIC LICENSE +version 1.0 +

+ +Copyright (C) 1999-2007 Trolltech ASA, Norway.
+Everyone is permitted to copy and distribute this license document. +
+
+

The intent of this license is to establish freedom to share and change the +software regulated by this license under the open source model. +

This license applies to any software containing a notice placed by the +copyright holder saying that it may be distributed under the terms of +the Q Public License version 1.0. Such software is herein referred to as +the Software. This license covers modification and distribution of the +Software, use of third-party application programs based on the Software, +and development of free software which uses the Software. +

+Granted Rights +

+

1. You are granted the non-exclusive rights set forth in this license +provided you agree to and comply with any and all conditions in this +license. Whole or partial distribution of the Software, or software +items that link with the Software, in any form signifies acceptance of +this license. +

2. You may copy and distribute the Software in unmodified form provided +that the entire package, including - but not restricted to - copyright, +trademark notices and disclaimers, as released by the initial developer +of the Software, is distributed. +

3. You may make modifications to the Software and distribute your +modifications, in a form that is separate from the Software, such as +patches. The following restrictions apply to modifications: +

+a. Modifications must not alter or remove any copyright notices in +the Software. +

b. When modifications to the Software are released under this +license, a non-exclusive royalty-free right is granted to the +initial developer of the Software to distribute your modification +in future versions of the Software provided such versions remain +available under these terms in addition to any other license(s) of +the initial developer. +

+

4. You may distribute machine-executable forms of the Software or +machine-executable forms of modified versions of the Software, provided +that you meet these restrictions: +

+a. You must include this license document in the distribution. +

b. You must ensure that all recipients of the machine-executable forms +are also able to receive the complete machine-readable source code +to the distributed Software, including all modifications, without +any charge beyond the costs of data transfer, and place prominent +notices in the distribution explaining this. +

c. You must ensure that all modifications included in the +machine-executable forms are available under the terms of this +license. +

+

5. You may use the original or modified versions of the Software to +compile, link and run application programs legally developed by you +or by others. +

6. You may develop application programs, reusable components and other +software items that link with the original or modified versions of the +Software. These items, when distributed, are subject to the following +retquirements: +

+a. You must ensure that all recipients of machine-executable forms of +these items are also able to receive and use the complete +machine-readable source code to the items without any charge +beyond the costs of data transfer. +

b. You must explicitly license all recipients of your items to use +and re-distribute original and modified versions of the items in +both machine-executable and source code forms. The recipients must +be able to do so without any charges whatsoever, and they must be +able to re-distribute to anyone they choose. +

c. If the items are not available to the general public, and the +initial developer of the Software requests a copy of the items, +then you must supply one. +

+

+Limitations of Liability +

+

In no event shall the initial developers or copyright holders be liable +for any damages whatsoever, including - but not restricted to - lost +revenue or profits or other direct, indirect, special, incidental or +consequential damages, even if they have been advised of the possibility +of such damages, except to the extent invariable law, if any, provides +otherwise. +

+No Warranty +

+

The Software and this license document are provided AS IS with NO WARRANTY +OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE. +

+Choice of Law +

+

This license is governed by the Laws of Norway. Disputes shall be settled +by Oslo City Court. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/licenses.html b/doc/html/licenses.html new file mode 100644 index 00000000..c5b008fb --- /dev/null +++ b/doc/html/licenses.html @@ -0,0 +1,327 @@ + + + + + +Licenses for Code Used in TQt + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Licenses for Code Used in TQt

+ + +TQt contains a little code that is not under the TQPL, the GPL, or the TQt Commercial +License Agreement, but rather under specific highly permissive +licenses from the original authors. This page lists the licenses used +for that code, names the authors, and links to the points where it is +used. +

Trolltech gratefully acknowledges these and others contribution to +TQt. We recommend that all programs that use TQt also acknowledge these +contributions, and quote all these license statements in an appendix +to the documentation. +


+

Copyright (C) 1989, 1991 by Jef Poskanzer. +

Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that copyright notice and this permission +notice appear in supporting documentation. This software is +provided "as is" without express or implied warranty. +

+
+

Copyright (C) 1999 Serika Kurusugawa. All rights reserved. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS". +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE.

+
+

Copyright (C) 1999-2000 Mizi Research Inc. All rights reserved. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met:

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE.

+
+

Copyright (C) 2000 Ming-Che Chuang +Copyright (C) 2001, 2002 James Su, Turbolinux Inc. +Copyright (C) 2002 WU Yi, HancomLinux Inc. +Copyright (C) 2001, 2002 Anthony Fok, ThizLinux Laboratory Ltd. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE.

+
+

Copyright (C) 2000 Ming-Che Chuang +Copyright (C) 2002 James Su, Turbolinux Inc. +Copyright (C) 2002 Anthony Fok, ThizLinux Laboratory Ltd. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE.

+
+

Copyright (C) 2000 Hans Petter Bieker. All rights reserved. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE.

+
+

Copyright (C) 2000 TurboLinux, Inc. Written by Justin Yu and Sean Chen. +Copyright (C) 2001, 2002 Turbolinux, Inc. Written by James Su. +Copyright (C) 2001, 2002 ThizLinux Laboratory Ltd. Written by Anthony Fok. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE.

+
+

Copyright (c) 1989 The Regents of the University of California. +All rights reserved. +

Redistribution and use in source and binary forms are permitted +provided that the above copyright notice and this paragraph are +duplicated in all such forms and that any documentation, +advertising materials, and other materials related to such +distribution and use acknowledge that the software was developed +by the University of California, Berkeley. The name of the +University may not be used to endorse or promote products derived +from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +

+
+

Copyright (c) 1991 by AT&T. +

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

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

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

+
+

Copyright (c) 2002 Jorge Acereda and Peter O'Gorman +

Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: +

The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. +

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+
+

Copyright 1995, Trinity College Computing Center. +Written by David Chappell. +

Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that copyright notice and this permission +notice appear in supporting documentation. This software is +provided "as is" without express or implied warranty. +

TrueType font support. These functions allow PPR to generate +PostScript fonts from Microsoft compatible TrueType font files. +

The functions in this file do most of the work to convert a +TrueType font to a type 3 PostScript font. +

Most of the material in this file is derived from a program called +"ttf2ps" which L. S. Ng posted to the usenet news group +"comp.sources.postscript". The author did not provide a copyright +notice or indicate any restrictions on use. +

Last revised 11 July 1995. +

+
+

Copyright 1996 Daniel Dardailler. +

Permission to use, copy, modify, distribute, and sell this software +for any purpose is hereby granted without fee, provided that the above +copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation, +and that the name of Daniel Dardailler not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. Daniel Dardailler makes no representations +about the suitability of this software for any purpose. It is +provided "as is" without express or implied warranty. +

Modifications Copyright 1999 Matt Koss, under the same license as +above. +

+
+

TQt supports GIF reading if it is configured that way during +installation (see qgif.h). If it is, we are retquired to state that +"The Graphics Interchange Format(c) is the Copyright property of +CompuServe Incorporated. GIF(sm) is a Service Mark property of +CompuServe Incorporated." +

Warning: If you are in a country that recognizes software patents +and in which Unisys holds a patent on LZW compression and/or +decompression and you want to use GIF, Unisys may retquire you to +license that technology. Such countries include Canada, Japan, +the USA, France, Germany, Italy and the UK. +

GIF support may be removed completely in a future version of TQt. +We recommend using the MNG or PNG format.

+ +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/life-example.html b/doc/html/life-example.html new file mode 100644 index 00000000..f07f6127 --- /dev/null +++ b/doc/html/life-example.html @@ -0,0 +1,298 @@ + + + + + +Conway's Game of Life + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Conway's Game of Life

+ + +

+


+

Header file: +

/****************************************************************************
+** $Id: qt/life.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef LIFE_H
+#define LIFE_H
+
+#include <qframe.h>
+
+
+class LifeWidget : public TQFrame
+{
+    Q_OBJECT
+public:
+    LifeWidget( int s = 10, TQWidget *parent = 0, const char *name = 0 );
+
+    void        setPoint( int i, int j );
+
+    int         maxCol() { return maxi; }
+    int         maxRow() { return maxj; }
+
+public slots:
+    void        nextGeneration();
+    void        clear();
+
+protected:
+    virtual void paintEvent( TQPaintEvent * );
+    virtual void mouseMoveEvent( TQMouseEvent * );
+    virtual void mousePressEvent( TQMouseEvent * );
+    virtual void resizeEvent( TQResizeEvent * );
+    void         mouseHandle( const TQPoint &pos );
+
+private:
+    enum { MAXSIZE = 50, MINSIZE = 10, BORDER = 5 };
+
+    bool        cells[2][MAXSIZE + 2][MAXSIZE + 2];
+    int         current;
+    int         maxi, maxj;
+
+    int pos2index( int x )
+    {
+        return ( x - BORDER ) / SCALE + 1;
+    }
+    int index2pos( int i )
+    {
+        return  ( i - 1 ) * SCALE + BORDER;
+    }
+
+    int SCALE;
+};
+
+
+#endif // LIFE_H
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/life.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "life.h"
+
+#include <qpainter.h>
+#include <qdrawutil.h>
+#include <qcheckbox.h>
+#include <qevent.h>
+#include <qapplication.h>
+
+// The main game of life widget
+
+LifeWidget::LifeWidget( int s, TQWidget *parent, const char *name )
+    : TQFrame( parent, name )
+{
+    SCALE = s;
+
+    maxi = maxj = 50;
+    setMinimumSize( MINSIZE * SCALE + 2 * BORDER,
+                   MINSIZE * SCALE + 2 * BORDER );
+    setMaximumSize( MAXSIZE * SCALE + 2 * BORDER,
+                   MAXSIZE * SCALE + 2 * BORDER );
+    setSizeIncrement( SCALE, SCALE);
+
+    clear();
+    resize( maxi * SCALE + 2 * BORDER , maxj * SCALE + 2 * BORDER );
+
+}
+
+
+void LifeWidget::clear()
+{
+    current = 0;
+    for ( int t = 0; t < 2; t++ )
+        for ( int i = 0; i < MAXSIZE + 2; i++ )
+            for ( int j = 0; j < MAXSIZE + 2; j++ )
+                cells[t][i][j] = FALSE;
+
+    repaint();
+}
+
+
+// We assume that the size will never be beyond the maximum size set
+// this is not in general TRUE, but in practice it's good enough for
+// this program
+
+void LifeWidget::resizeEvent( TQResizeEvent * e )
+{
+    maxi = (e->size().width()  - 2 * BORDER) / SCALE;
+    maxj = (e->size().height() - 2 * BORDER) / SCALE;
+}
+
+
+void LifeWidget::setPoint( int i, int j )
+{
+    if ( i < 1 || i > maxi || j < 1 || j > maxi )
+        return;
+    cells[current][i][j] = TRUE;
+    repaint( index2pos(i), index2pos(j), SCALE, SCALE, FALSE );
+}
+
+
+void LifeWidget::mouseHandle( const TQPoint &pos )
+{
+    int i = pos2index( pos.x() );
+    int j = pos2index( pos.y() );
+    setPoint( i, j );
+}
+
+
+void LifeWidget::mouseMoveEvent( TQMouseEvent *e )
+{
+    mouseHandle( e->pos() );
+}
+
+
+void LifeWidget::mousePressEvent( TQMouseEvent *e )
+{
+    if ( e->button() == TQMouseEvent::LeftButton )
+        mouseHandle( e->pos() );
+}
+
+
+void LifeWidget::nextGeneration()
+{
+    for ( int i = 1; i <= MAXSIZE; i++ ) {
+        for ( int j = 1; j <= MAXSIZE; j++ ) {
+            int t = cells[current][i - 1][j - 1]
+            + cells[current][i - 1][j]
+            + cells[current][i - 1][j + 1]
+            + cells[current][i][j - 1]
+            + cells[current][i][j + 1]
+            + cells[current][i + 1][j - 1]
+            + cells[current][i + 1][j]
+            + cells[current][i + 1][j + 1];
+
+            cells[!current][i][j] = ( t == 3 ||
+                                      t == 2 && cells[current][i][j] );
+        }
+    }
+    current = !current;
+    repaint( FALSE );           // repaint without erase
+}
+
+
+void LifeWidget::paintEvent( TQPaintEvent * e )
+{
+    int starti = pos2index( e->rect().left() );
+    int stopi  = pos2index( e->rect().right() );
+    int startj = pos2index( e->rect().top() );
+    int stopj  = pos2index( e->rect().bottom() );
+
+    if (stopi > maxi)
+        stopi = maxi;
+    if (stopj > maxj)
+        stopj = maxj;
+
+    TQPainter paint( this );
+    for ( int i = starti; i <= stopi; i++ ) {
+        for ( int j = startj; j <= stopj; j++ ) {
+            if ( cells[current][i][j] )
+                qDrawShadePanel( &paint, index2pos( i ), index2pos( j ),
+                                 SCALE - 1, SCALE - 1, colorGroup() );
+            else if ( cells[!current][i][j] )
+                erase(index2pos( i ), index2pos( j ), SCALE - 1, SCALE - 1);
+        }
+    }
+    drawFrame( &paint );
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "lifedlg.h"
+#include <qapplication.h>
+#include <stdlib.h>
+
+void usage()
+{
+    qWarning( "Usage: life [-scale scale]" );
+}
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    int scale = 10;
+
+    for ( int i = 1; i < argc; i++ ){
+        TQString arg = argv[i];
+        if ( arg == "-scale" )
+            scale = atoi( argv[++i] );
+        else {
+            usage();
+            exit(1);
+        }
+    }
+
+    if ( scale < 2 )
+        scale = 2;
+
+    LifeDialog *life = new LifeDialog( scale );
+    a.setMainWidget( life );
+    life->setCaption("TQt Example - Life");
+    life->show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/lineedits-example.html b/doc/html/lineedits-example.html new file mode 100644 index 00000000..d467ed79 --- /dev/null +++ b/doc/html/lineedits-example.html @@ -0,0 +1,394 @@ + + + + + +Line Edits + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Line Edits

+ + +

+This example shows how to work with single lineedit widgets, and +how to use different echo modes and validators. +


+

Header file: +

/****************************************************************************
+** $Id: qt/lineedits.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef LINEDITS_H
+#define LINEDITS_H
+
+#include <qgroupbox.h>
+
+class TQLineEdit;
+class TQComboBox;
+
+class LineEdits : public TQGroupBox
+{
+    Q_OBJECT
+
+public:
+    LineEdits( TQWidget *parent = 0, const char *name = 0 );
+
+protected:
+    TQLineEdit *lined1, *lined2, *lined3, *lined4, *lined5;
+    TQComboBox *combo1, *combo2, *combo3, *combo4, *combo5;
+
+protected slots:
+    void slotEchoChanged( int );
+    void slotValidatorChanged( int );
+    void slotAlignmentChanged( int );
+    void slotInputMaskChanged( int );
+    void slotReadOnlyChanged( int );
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/lineedits.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "lineedits.h"
+
+#include <qlineedit.h>
+#include <qcombobox.h>
+#include <qframe.h>
+#include <qvalidator.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qhbox.h>
+
+/*
+ * Constructor
+ *
+ * Creates child widgets of the LineEdits widget
+ */
+
+LineEdits::LineEdits( TQWidget *parent, const char *name )
+    : TQGroupBox( 0, Horizontal, "Line edits", parent, name )
+{
+    setMargin( 10 );
+
+    TQVBoxLayout* box = new TQVBoxLayout( layout() );
+
+    TQHBoxLayout *row1 = new TQHBoxLayout( box );
+    row1->setMargin( 5 );
+
+    // Create a Label
+    TQLabel* label = new TQLabel( "Echo Mode: ", this);
+    row1->addWidget( label );
+
+    // Create a Combobox with three items...
+    combo1 = new TQComboBox( FALSE, this );
+    row1->addWidget( combo1 );
+    combo1->insertItem( "Normal" );
+    combo1->insertItem( "Password" );
+    combo1->insertItem( "No Echo" );
+    // ...and connect the activated() SIGNAL with the slotEchoChanged() SLOT to be able
+    // to react when an item is selected
+    connect( combo1, SIGNAL( activated( int ) ), this, SLOT( slotEchoChanged( int ) ) );
+
+    // insert the first LineEdit
+    lined1 = new TQLineEdit( this );
+    box->addWidget( lined1 );
+
+    // another widget which is used for layouting
+    TQHBoxLayout *row2 = new TQHBoxLayout( box );
+    row2->setMargin( 5 );
+
+    // and the second label
+    label = new TQLabel( "Validator: ", this );
+    row2->addWidget( label );
+
+    // A second Combobox with again three items...
+    combo2 = new TQComboBox( FALSE, this );
+    row2->addWidget( combo2 );
+    combo2->insertItem( "No Validator" );
+    combo2->insertItem( "Integer Validator" );
+    combo2->insertItem( "Double Validator" );
+    // ...and again the activated() SIGNAL gets connected with a SLOT
+    connect( combo2, SIGNAL( activated( int ) ), this, SLOT( slotValidatorChanged( int ) ) );
+
+    // and the second LineEdit
+    lined2 = new TQLineEdit( this );
+    box->addWidget( lined2 );
+
+    // yet another widget which is used for layouting
+    TQHBoxLayout *row3 = new TQHBoxLayout( box );
+    row3->setMargin( 5 );
+
+    // we need a label for this too
+    label = new TQLabel( "Alignment: ", this );
+    row3->addWidget( label );
+
+    // A combo box for setting alignment
+    combo3 = new TQComboBox( FALSE, this );
+    row3->addWidget( combo3 );
+    combo3->insertItem( "Left" );
+    combo3->insertItem( "Centered" );
+    combo3->insertItem( "Right" );
+    // ...and again the activated() SIGNAL gets connected with a SLOT
+    connect( combo3, SIGNAL( activated( int ) ), this, SLOT( slotAlignmentChanged( int ) ) );
+
+    // and the third lineedit
+    lined3 = new TQLineEdit( this );
+    box->addWidget( lined3 );
+
+    // exactly the same for the fourth
+    TQHBoxLayout *row4 = new TQHBoxLayout( box );
+    row4->setMargin( 5 );
+
+    // we need a label for this too
+    label = new TQLabel( "Input mask: ", this );
+    row4->addWidget( label );
+
+    // A combo box for choosing an input mask
+    combo4 = new TQComboBox( FALSE, this );
+    row4->addWidget( combo4 );
+    combo4->insertItem( "No mask" );
+    combo4->insertItem( "Phone number" );
+    combo4->insertItem( "ISO date" );
+    combo4->insertItem( "License key" );
+
+    // ...this time we use the activated( const TQString & ) signal
+    connect( combo4, SIGNAL( activated( int ) ),
+             this, SLOT( slotInputMaskChanged( int ) ) );
+
+    // and the fourth lineedit
+    lined4 = new TQLineEdit( this );
+    box->addWidget( lined4 );
+
+    // last widget used for layouting
+    TQHBox *row5 = new TQHBox( this );
+    box->addWidget( row5 );
+    row5->setMargin( 5 );
+
+    // last label
+    (void)new TQLabel( "Read-Only: ", row5 );
+
+    // A combo box for setting alignment
+    combo5 = new TQComboBox( FALSE, row5 );
+    combo5->insertItem( "False" );
+    combo5->insertItem( "True" );
+    // ...and again the activated() SIGNAL gets connected with a SLOT
+    connect( combo5, SIGNAL( activated( int ) ), this, SLOT( slotReadOnlyChanged( int ) ) );
+
+    // and the last lineedit
+    lined5 = new TQLineEdit( this );
+    box->addWidget( lined5 );
+
+    // give the first LineEdit the focus at the beginning
+    lined1->setFocus();
+}
+
+/*
+ * SLOT slotEchoChanged( int i )
+ *
+ * i contains the number of the item which the user has been chosen in the
+ * first Combobox. According to this value, we set the Echo-Mode for the
+ * first LineEdit.
+ */
+
+void LineEdits::slotEchoChanged( int i )
+{
+    switch ( i ) {
+    case 0:
+        lined1->setEchoMode( TQLineEdit::Normal );
+        break;
+    case 1:
+        lined1->setEchoMode( TQLineEdit::Password );
+        break;
+    case 2:
+        lined1->setEchoMode( TQLineEdit::NoEcho );
+        break;
+    }
+
+    lined1->setFocus();
+}
+
+/*
+ * SLOT slotValidatorChanged( int i )
+ *
+ * i contains the number of the item which the user has been chosen in the
+ * second Combobox. According to this value, we set a validator for the
+ * second LineEdit. A validator checks in a LineEdit each character which
+ * the user enters and accepts it if it is valid, else the character gets
+ * ignored and not inserted into the lineedit.
+ */
+
+void LineEdits::slotValidatorChanged( int i )
+{
+    switch ( i ) {
+    case 0:
+        lined2->setValidator( 0 );
+        break;
+    case 1:
+        lined2->setValidator( new TQIntValidator( lined2 ) );
+        break;
+    case 2:
+        lined2->setValidator( new TQDoubleValidator( -999.0, 999.0, 2,
+                                                    lined2 ) );
+        break;
+    }
+
+    lined2->setText( "" );
+    lined2->setFocus();
+}
+
+
+/*
+ * SLOT slotAlignmentChanged( int i )
+ *
+ * i contains the number of the item which the user has been chosen in
+ * the third Combobox.  According to this value, we set an alignment
+ * third LineEdit.
+ */
+
+void LineEdits::slotAlignmentChanged( int i )
+{
+    switch ( i ) {
+    case 0:
+        lined3->setAlignment( TQLineEdit::AlignLeft );
+        break;
+    case 1:
+        lined3->setAlignment( TQLineEdit::AlignCenter );
+        break;
+    case 2:
+        lined3->setAlignment( TQLineEdit::AlignRight );
+        break;
+    }
+
+    lined3->setFocus();
+}
+
+/*
+ * SLOT slotInputMaskChanged( const TQString &mask )
+ *
+ * i contains the number of the item which the user has been chosen in
+ * the third Combobox.  According to this value, we set an input mask on
+ * third LineEdit.
+ */
+
+void LineEdits::slotInputMaskChanged( int i )
+{
+    switch( i ) {
+    case 0:
+        lined4->setInputMask( TQString::null );
+        break;
+    case 1:
+        lined4->setInputMask( "+99 99 99 99 99;_" );
+        break;
+    case 2:
+        lined4->setInputMask( "0000-00-00" );
+        lined4->setText( "00000000" );
+        lined4->setCursorPosition( 0 );
+        break;
+    case 3:
+        lined4->setInputMask( ">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#" );
+        break;
+    }
+    lined4->setFocus();
+}
+
+/*
+ * SLOT slotReadOnlyChanged( int i )
+ *
+ * i contains the number of the item which the user has been chosen in
+ * the fourth Combobox.  According to this value, we toggle read-only.
+ */
+
+void LineEdits::slotReadOnlyChanged( int i )
+{
+    switch ( i ) {
+    case 0:
+        lined5->setReadOnly( FALSE );
+        break;
+    case 1:
+        lined5->setReadOnly( TRUE );
+        break;
+    }
+
+    lined5->setFocus();
+}
+
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "lineedits.h"
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    LineEdits lineedits;
+    lineedits.setCaption( "TQt Example - Lineedits" );
+    a.setMainWidget( &lineedits );
+    lineedits.show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/linguist-manual-1.html b/doc/html/linguist-manual-1.html new file mode 100644 index 00000000..6980fb07 --- /dev/null +++ b/doc/html/linguist-manual-1.html @@ -0,0 +1,56 @@ + + + + + +Introduction + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Home] [Next: Release Manager]

+

Introduction

+

TQt provides excellent support for translating applications into local languages. This Guide explains how to use TQt's translation tools for each of the roles involved in translating an application. The Guide begins with a brief overview of the issues that must be considered, followed by chapters devoted to each role and the supporting tools provided.

+

Chapter 2: Release Manager is aimed at the person with overall responsibility for the release of the application. They will typically coordinate the work of the software engineers and the translator. The chapter describes the use of two tools. The lupdate tool is used to synchronize source code and translations. The lrelease tool is used to create runtime translation files for use by the released application.

+

Chapter 3: Translators is for translators. It describes the use of the TQt Linguist tool. No computer knowledge beyond the ability to start a program and use a text editor or word processor is retquired.

+

Chapter 4: Programmers is for TQt programmers. It explains how to create TQt applications that are able to use translated text. It also provides guidance on how to help the translator identify the context in which phrases appear. This chapter's three short tutorials cover everything the programmer needs to do.

+

Overview of the Translation Process

+

Most of the text that must be translated in an application program consists of either single words or short phrases. These typically appear as window titles, menu items, pop-up help text (balloon help), and labels to buttons, check boxes and radio buttons.

+

The phrases are entered into the source code by the programmer in their native language using a simple but special syntax to identify that the phrases retquire translation. The TQt tools provide context information for each of the phrases to help the translator, and the programmer is able to add additional context information to phrases when necessary. The release manager generates a set of translation files that are produced from the source files and passes these to the translator. The translator opens the translation files using TQt Linguist, enters their translations and saves the results back into the translation files, which they pass back to the release manager. The release manager then generates fast compact versions of these translation files ready for use by the application. The tools are designed to be used in repeated cycles as applications change and evolve, preserving existing translations and making it easy to identify which new translations are retquired. TQt Linguist also provides a phrase book facility to help ensure consistent translations across multiple applications and projects.

+

Translators and programmers must address a number of issues because of the subtleties and complexities of human language:

+

The TQt translation tools provide clear and simple solutions to these issues.

+


+

Please send comments and suggestions regarding this tutorial to the TQt doc team. Bugs in the tools should be sent to qt-bugs.

+ +

[Home] [Next: Release Manager]

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/linguist-manual-2.html b/doc/html/linguist-manual-2.html new file mode 100644 index 00000000..a08b3b17 --- /dev/null +++ b/doc/html/linguist-manual-2.html @@ -0,0 +1,81 @@ + + + + + +Release Manager + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Prev: Introduction] [Home] [Next: Translators]

+

Release Manager

+

Two tools are provided for the release manager, lupdate and lrelease. These tools depend on qmake project files. You don't have to use qmake, though.

+

A third tool, qm2ts, can be used for converting TQt 2.x message files to .ts files.

+

TQt Project Files

+

lupdate and lrelease depend on information in the application's .pro TQt project file. There must be an entry in the TRANSLATIONS section of the project file for each language that is additional to the native language. A typical entry looks like this:

+
    TRANSLATIONS    = tt2_fr.ts \
+                      tt2_nl.ts
+
+

Using a locale within the translation file name is useful for determining which language to load at runtime. This is explained in Chapter 4: Programmers.

+

An example of a complete .pro file with four translation source files:

+
+    HEADERS         = main-dlg.h \
+                      options-dlg.h
+    SOURCES         = main-dlg.cpp \
+                      options-dlg.cpp \
+                      main.cpp 
+    FORMS           = search-dlg.ui
+    TRANSLATIONS    = superapp_dk.ts \
+                      superapp_fi.ts \
+                      superapp_no.ts \
+                      superapp_se.ts
+
+

TQTextCodec::setCodecForTr() makes it possible to choose a 8-bit encoding for literal strings that appear within tr() calls. This is useful for applications whose source language is, for example, Chinese or Japanese. If no encoding is set, tr() uses Latin-1.

+

If you do use the TQTextCodec::codecForTr() mechanism in your application, TQt Linguist needs you to set the DEFAULTCODEC entry in the .pro file as well. For example:

+
+    DEFAULTCODEC    = ISO-8859-5
+
+

lupdate

+

Usage: lupdate myproject.pro

+

This is a simple command line tool. lupdate reads a TQt .pro project file, finds the translatable strings in the specified source, header and TQt Designer interface files, and produces or updates the .ts translation files listed in the project file. The translation files are given to the translator who uses TQt Linguist to read the files and insert the translations.

+

Companies that have their own translators in-house may find it useful to run lupdate regularly, perhaps monthly, as the application develops. This will lead to a fairly low volume of translation work spread evenly over the life of the project and will allow the translators to support a number of projects simultaneously.

+

Companies that hire in translators as retquired may prefer to run lupdate only a few times in the application's life cycle, the first time might be just before the first test phase. This will provide the translator with a substantial single block of work and any bugs that the translator detects may easily be included with those found during the initial test phase. The second and any subsequent lupdate runs would probably take place during the final beta phase.

+

The .ts file format is a simple human-readable XML format that can be used with version control systems if retquired.

+

lrelease

+

Usage: lrelease myproject.pro

+

This is another simple command line tool. It reads a TQt .pro project file and produces the .qm files used by the application, one for each .ts translation source file listed in the project file. The .qm file format is a compact binary format that provides extremely fast lookups for translations.

+

This tool is run whenever a release of the application is to be made, from initial test version through to final release version. If the .qm files are not created, e.g. because an alpha release is retquired before any translation has been undertaken, the application will run perfectly well using the text the programmers placed in the source files. Once the .qm files are available the application will detect them and use them automatically.

+

Note that lrelease will only incorporate translations that are marked as "done". If a translation is missing, or has failed validation, the original text will be used instead.

+

Missing Translations

+

Both lupdate and lrelease may be used with .ts translation source files which are incomplete. Missing translations will be replaced with the native language phrases at runtime.

+ +

[Prev: Introduction] [Home] [Next: Translators]

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/linguist-manual-3.html b/doc/html/linguist-manual-3.html new file mode 100644 index 00000000..3dee0a92 --- /dev/null +++ b/doc/html/linguist-manual-3.html @@ -0,0 +1,197 @@ + + + + + +Translators + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Prev: Release Manager] [Home] [Next: Programmers]

+

Translators

+

+

+

Linguist Main Window

+

The One Minute Guide to Using TQt Linguist

+

TQt Linguist is a tool for adding translations to TQt applications. It introduces the concept of a translation "context" which means a group of phrases that appear together on the screen e.g. in the same menu or dialog.

+

To start, run TQt Linguist, either from the taskbar menu, or by double clicking the desktop icon, or type linguist (followed by Enter) at the command line. Once TQt Linguist has started choose File|Open from the menu bar and select a .ts translation source file to work on.

+

TQt Linguist's main window is divided into four main areas. The left hand side contains the Context list, the top right is the Source text area, the middle right is the translation area and the bottom right is the phrases and guesses area. We'll describe them in detail later.

+

Click on one of the contexts in the context list (left hand side) and then click on one of the phrases that appears in the Source text area (top right). The phrase will be copied into the translation area (middle right). Click under the word 'Translation' and type in the translation. Click Ctrl+Enter (Done & Next) to confirm that you have completed the translation and to move on to the next phrase that retquires translation.

+

The cycle of entering a translation then pressing Ctrl+Enter can be repeated until all the translations are done or until you finish the session. Linguist will attempt to fill the "phrases and guesses" area with possible translations from any open phrase books and any previous translations. Each has a keyboard shortcut, e.g. Ctrl+1, Ctrl+2, etc., which you can use to copy the guess into the Translation area. (Mouse users can double click a phrase or guess to move it into the Translation area.) At the end of the session choose File|Save from the menu bar and then File|Exit to tquit.

+

TQt Linguist's Main Window

+

Context List

+

This appears at the left hand side of the main window by default. The first column, 'Done', identifies whether or not the translations for the context have been done. A tick indicates that all the translations have been done and are valid. A question mark indicates that one or more translations have not been done or have failed validation. The second column, 'Context' is the name of the context in which the translation phrases appear. The third column, 'Items' shows two numbers, the first is the number of translations that have been done, and the second is the number of phrases that are in the context; if the numbers are equal then all the translations have been done. Note that a greyed out tick indicates an obsolete translation, i.e. a phrase that was translated in a previous version of the application but which does not occur in the new version.

+

The contexts are ordered alphabetically. The phrases within each context are in the order in which they appear in the source program and this may not be the order in which they are shown on screen.

+

The Context List is a dockable window so it can be dragged to another position in the main window, or dragged out of the main window to be a window in its own right. If you move the Context List, TQt Linguist will remember its position and restore it whenever you start the program.

+

Source Text Area

+

This appears at the top right of the main window by default. The first column, 'Done', signifies the status of the translation. A tick indicates that the phrase has been translated and passed validation. A question mark indicates that the translation has not been done. An exclamation mark indicates that the translation has failed validation. The second column 'Source text' shows the text that must be translated. The third column shows the translation.

+

TQt Linguist provides three kinds of validation: accelerator, punctuation and phrase. If the source text contains an accelerator i.e. an ampersand, '&' and the translated text does not contain an ampersand the translation will fail the accelerator validation. Similarly, if the source text ends with a particular punctuation mark, e.g. '?', '!' or '.' and the translation ends with a different punctuation mark the translation will fail the punctuation validation. If the source text has a translation in one of the open phrase books that differs from the translation used the translation will fail phrase validation. (See Validation.)

+

The Source Text Area is a dockable window.

+

Translation Area

+

This area appears at the middle right of the main window by default. It is comprised of three vertical sections. The first section is labelled 'Source text' below which the source text appears. The second section contains contextual information on a light blue background that the programmer has added to assist the translator. If no contextual information has been given this section does not appear. The third section is labelled 'Translation' and this is where you enter the translation of the source text.

+

Phrases and Guesses Area

+

This area appears at the bottom right of the main window by default. When you move to a new phrase if the phrase is in one of the phrase books that has been loaded the phrase will appear in this area with its translation. If the phrase is the same or similar to another phrase that has already been translated the phrase and translation will be shown in this area. To copy a translation from the phrases and guesses area press F6 to move to the phrases and guesses area, use the up and down arrow keys to move to the phrase you want to use and press Enter to copy it. If you decide that you don't want to copy a phrase after all, press Esc. In both cases the focus will return to the Translation area. Alternatively, double click the translation you want to use and it will be copied into the translation area.

+

The Phrases and Guesses Area is a dockable window.

+

Common Tasks

+

Leaving a Translation for Later

+

If you wish to leave a translation press Ctrl+L (Next Unfinished) to move to the next unfinished translation. An unfinished translation is one that either has not been translated at all or one which fails validation. To move to the next phrase press Shift+Ctrl+L. You can also navigate using the Translation menu. If you want to go to a different context entirely, click the context you want to work on in the Context list, then click the source text in the Source Text area.

+

Phrases That Retquire Multiple Translations Depending on Context

+

The same phrase may occur in two or more contexts without conflict. Once a phrase has been translated in one context, TQt Linguist notes that the translation has been made and when the translator reaches a later occurrence of the same phrase TQt Linguist will provide the previous translation as a possible translation candidate in the phrases and guesses area. If the previous translation is acceptable just click the Done & Next button (press Ctrl+Enter) to move on to the next unfinished phrase.

+

If a phrase occurs more than once in a particular context it will only be shown once in TQt Linguist's context list and the translation will be applied to every occurrence within the context. If the same phrase needs to be translated differently within the same context the programmer must provide a distinguishing comment for each of the phrases concerned. If such comments are used the duplicate phrases will appear in the context list. The programmers comments will appear in the translation area on a light blue background.

+

Changing Keyboard Accelerators

+

A keyboard accelerator is a key combination that when pressed will cause an application to perform an action. Keyboard accelerators normally come in two forms: Alt key and Ctrl key accelerators.

+

Alt key accelerators are used for menus and buttons. The underlining signifies that pressing the Alt key with the underlined letter is the same as clicking the menu item with the mouse. For example, most applications have a File menu with the "F" in the word "file" underlined. In these applications the file menu can be invoked either by clicking the word "File" on the menu bar or by pressing Alt+F. The accelerator key which is underlined is signified by preceeding it with an ampersand, e.g. &File. If a source phrase appears with an ampersand in it then the translation should also contain an ampersand, preferably in front of the same letter. The meaning of Alt key accelerators can be determined from the phrase in which the ampersand is embedded. The translator may need to change the letter used with the Alt key, e.g. if the translated phrase does not contain the original accelerator letter. Conflicts with other keys, i.e. having two Alt key accelerators using the same letter in the same context, must be avoided. Note that some Alt key accelerators, usually those on the menu bar, may apply in other contexts.

+

Ctrl key accelerators can exist independently of any visual control. They are often used to invoke actions in menus that would otherwise take several keystrokes or mouse clicks. They may also be used to perform actions that do not appear in any menu or on any button. For example, most applications that have a File menu have a submenu item called New. In many applications this will appear as "New... Ctrl+N". This menu option could be invoked by clicking File then clicking New with the mouse. Or you could press Alt+F then press N since these letters are underlined. But the same thing can be achieved simply by pressing Ctrl+N. Accelerators that use the Ctrl key are shown literally in the source text, e.g. Ctrl+Enter. Ctrl key accelerators have no phrase so the translator Translators must rely on the programmer to add a "comment" which appears in the top right hand pane. This comment should explain what action the Ctrl key accelerator performs. Ideally Ctrl key accelerators are translated simply by copying them by chossing the Begin from Source entry in the Translations menu. However in some cases the letter will not make sense in the target language and must be changed. Whatever letter (or digit) is chosen, the translation should always be in the form "Ctrl+" followed by the letter or digit in upper case. As with Alt key accelerators, if the translator changes the key it must not conflict with any other Ctrl key accelerator.

+

Later versions of TQt Linguist are expected to help the translator avoid accelerator conflicts.

+

Dealing with Phrases that Contain Variables

+

Some phrases contain variables. Variables are placeholders for items of text that are filled in at runtime. They are signified in the source text with a percent sign followed by a digit, e.g. After processing file %1, file %2 is next in line. In this example, %1 will be replaced at runtime with the name of the first file to be processed and %2 with the name of the next file to be processed. In the translated version the variables must still appear. For example a German translation might reverse the phrases, e.g. Datei %2 wird bearbeitet, wenn. Datei %1 fertig ist. Note that both variables are still used but their order has changed. The order in which variables appear does not matter; %1 will always be replaced by the same text at runtime no matter where it appears in the source text or translation and similarly %2, etc.

+

Reusing Translations

+

If the translated text is similar to the source text, choose the Begin from Source entry in the Translations menu (press Ctrl+B) which will copy the source text into the translation area.

+

TQt Linguist automatically lists phrases from the open phrase books and similar or identical phrases that have already been translated in the Phrases and guesses area.

+

Creating and Using Phrase Books

+

+

+

Phrase Book Dialog

+

A TQt Linguist phrase book is a set of source phrases, target (translated) phrases, and optional definitions. Phrase Books are created independently of any application, although typically one phrase book will be created per application or family of applications.

+

If the translator reaches an untranslated phrase that is the same as a source phrase in the phrase book, TQt Linguist will show the phrase book entry in the Relevant phrases panel at the bottom right of the main window. Phrases which have translations that conflict with those given in the phrase book are marked with a question mark in the source text pane. Phrase Books are used to provide a common set of translations to help ensure consistency. They can also be used to avoid duplication of effort since the translations for a family of applications can be produced once in the phrase book and the phrase book used for the majority of translations in each application.

+

Before a phrase book can be edited it must be created or if it already exists, opened. Create a new phrase book by selecting Phrase|New Phrase Book from the menu bar. You must enter a filename and may change the location of the file if you wish. A newly created phrase book is automatically opened. Open an existing phrase book by choosing Phrase|Open Phrase Book from the menu bar.

+

To add a new phrase click the New Phrase button (or press Alt+N) and type in a new source phrase. Press Tab and type in the translation. Optionally press Tab and enter a definition -- this is useful to distinguish different translations of the same source phrase. This process may be repeated as often as necessary.

+

You can delete a phrase by selecting it in the phrases list and clicking Remove Phrase.

+

Click the Save button (press Alt+S) and then click the Close button (press Esc) once you've finished adding (and removing) phrases.

+

When a phrase or set of phrases appears in the phrase book double clicking the retquired target phrase will copy it to the translation pane at the text cursor position. If you want to replace the text in the translation pane with the target phrase, click the translation pane, choose Edit|Select All (press Alt+A) and then double click the target phrase.

+

Validation

+

TQt Linguist provides three kinds of validation on translated phrases.

+
  1. Accelerator validation detects translated phrases that do not have an ampersand when the source phrase does and vice versa.

    +
  2. Punctuation validation detects differences in the terminating punctuation between source and translated phrases when this may be significant, e.g. warns if the source phrase ends with an ellipsis, exclamation mark or question mark, and the translated phrase doesn't and vice versa.

    +
  3. Phrases validation detects source phrases that are also in the phrase book but whose translation differs from that given in the phrase book.

    +

Validation may be switched on or off from the menu bar's Validation item or using the toolbar buttons. Phrases that fail validation are marked with a question mark in the source text pane. If you switch validation off and then switch it on later, TQt Linguist will recheck all phrases and mark any that fail validation.

+

If any phrase in a context is invalid then the context itself will be marked with a question mark; if all the phrases in a context are done and are valid the context will be marked with a tick.

+

Note that only phrases which are marked as done (with a tick) will appear in the application. Invalid phrases and phrases which are translated but not marked as done are kept in the translation source file but are not used by the application.

+

TQt Linguist Reference

+

File Types

+

TQt Linguist makes use of three kinds of file:

+

The Menu Bar

+

+

+

Menu Bar

+

The Toolbar

+

+

+

Toolbar

+

The Find Dialog

+

+

+

The Find Dialog

+

Choose Edit|Find from the menu bar or press Ctrl+F to pop up the Find dialog. Press F3 to repeat the last search. By default the source phrases, translations and comments will all be searched and the search will be case-insensitive. These settings can be changed by checking or unchecking the checkboxes to reflect your preferences.

+

The Phrase Dialog

+

This dialog is explained in the Creating and Using Phrase Books section.

+ +

[Prev: Release Manager] [Home] [Next: Programmers]

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/linguist-manual-4.html b/doc/html/linguist-manual-4.html new file mode 100644 index 00000000..84814282 --- /dev/null +++ b/doc/html/linguist-manual-4.html @@ -0,0 +1,564 @@ + + + + + +Programmers + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Prev: Translators] [Home]

+

Programmers

+

Support for multiple languages is extremely simple in TQt applications, and adds little overhead to the programmer's workload.

+

TQt minimizes the performance cost of using translations by translating the phrases for each window as they are created. In most applications the main window is created just once. Dialogs are often created once and then shown and hidden as retquired. Once the initial translation has taken place there is no further runtime overhead for the translated windows. Only those windows that are created, destroyed and subsequently created will have a translation performance cost.

+

Creating applications that can switch language at runtime is possible with TQt, but retquires a certain amount of programmer intervention and will of course incur some runtime performance cost.

+

Making the Application Translation Aware

+

Programmers should make their application look for and load the appropriate translation file and mark user-visible text and Ctrl keyboard accelerators as targets for translation.

+

Each piece of text that retquires translating retquires context to help the translator identify where in the program the text occurs. In the case of multiple identical texts that retquire different translations, the translator also retquires some information to disambiguate the source texts. Marking text for translation will automatically cause the class name to be used as basic context information. In some cases the programmer may be retquired to add additional information to help the translator.

+

Creating Translation Files

+

Translation files consist of all the user-visible text and Ctrl key accelerators in an application and translations of that text. Translation files are created as follows:

+
  1. Run lupdate initially to generate the first set of .ts translation source files with all the user-visible text but no translations.

    +
  2. The .ts files are given to the translator who adds translations using TQt Linguist. TQt Linguist takes care of any changed or deleted source text.

    +
  3. Run lupdate to incorporate any new text added to the application. lupdate synchronizes the user-visible text from the application with the translations; it does not destroy any data.

    +
  4. Steps 2 and 3 are repeated as often as necessary.

    +
  5. When a release of the application is needed lrelease is run to read the .ts files and produce the .qm files used by the application at runtime.

    +

For lupdate to work successfully, it must know which translation files to produce. The files are simply listed in the application's .pro TQt project file, for example:

+
    TRANSLATIONS    = tt2_fr.ts \
+                      tt2_nl.ts
+
+

See the "lupdate" and "lrelease" sections.

+

Loading Translations

+
    int main( int argc, char **argv )
+    {
+        TQApplication app( argc, argv );
+
+

This is how a simple main() function of a TQt application begins.

+
    int main( int argc, char **argv )
+    {
+        TQApplication app( argc, argv );
+
+        TQTranslator translator( 0 );
+        translator.load( "tt1_la", "." );
+        app.installTranslator( &translator );
+
+

For a translation-aware application a translator object is created, a translation is loaded and the translator object installed into the application.

+
    int main( int argc, char **argv )
+    {
+        TQApplication app( argc, argv );
+
+        TQTranslator translator( 0 );
+        translator.load( TQString("tt2_") + TQTextCodec::locale(), "." );
+        app.installTranslator( &translator );
+
+

In production applications a more flexible approach, for example, loading translations according to locale, might be more appropriate. If the .ts files are all named according to a convention such as appname_locale, e.g. tt2_fr, tt2_de etc, then the code above will load the current locale's translation at runtime.

+

If there is no translation file for the current locale the application will fall back to using the original source text.

+

Making the Application Translate User-Visible Strings

+

User-visible strings are marked as translation targets by wrapping them in a tr() call, for example:

+
+    button = new TQPushButton( "&Quit", this );
+
+

would become

+
+    button = new TQPushButton( tr("&Quit"), this);
+
+

All TQObject subclasses that use the Q_OBJECT macro implement the tr() function.

+

Although the tr() call is normally made directly since it is usually called as a member function of a TQObject subclass, in other cases an explicit class name can be supplied, for example:

+
+    TQPushButton::tr("&Quit")
+
+

or

+
+    TQObject::tr("&Quit")
+
+

Distinguishing Identical Strings That Retquire Different Translations

+

The lupdate program automatically provides a context for every source text. This context is the class name of the class that contains the tr() call. This is sufficient in the vast majority of cases. Sometimes however, the translator will need further information to uniquely identify a source text; for example, a dialog that contained two separate frames, each of which contained an "Enabled" option would need each identified because in some languages the translation would differ between the two. This is easily achieved using the two argument form of the tr() call, e.g.

+
+    rbc = new TQRadioButton( tr("Enabled", "Color frame"), this );
+
+

and

+
+    rbh = new TQRadioButton( tr("Enabled", "Hue frame"), this );
+
+

Ctrl key accelerators are also translatable:

+
        file->insertItem( tr("E&xit"), qApp, SLOT(tquit()),
+                          tr("Ctrl+Q", "Quit") );
+
+

It is strongly recommended that the two argument form of tr() is used for Ctrl key accelerators. The second argument is the only clue the translator has as to the function performed by the accelerator.

+

Helping The Translator With Navigation Information

+

In large complex applications it may be difficult for the translator to see where a particular source text comes from. This problem can be solved by adding a comment using the keyword TRANSLATOR which describes the navigation steps to reach the text in question; e.g.

+
+    /*  TRANSLATOR FindDialog
+
+        Choose Edit|Find from the menu bar or press Ctrl+F to pop up the
+        Find dialog.
+    */
+
+

These comments are particularly useful for widget classes.

+

Coping With C++ Namespaces

+

C++ namespaces and the using namespace statement can confuse lupdate. It will interpret MyClass::tr() as meaning just that, not as MyNamespace::MyClass::tr(), even if MyClass is defined in the MyNamespace namespace. Runtime translation of these strings will fail because of that.

+

You can work around this limitation by putting a TRANSLATOR comment at the beginning of the source files that use MyClass::tr():

+
+    /* TRANSLATOR MyNamespace::MyClass */
+
+

After the comment, all references to MyClass::tr() will be understood as meaning MyNamespace::MyClass::tr().

+

Translating Text that is Outside of a TQObject subclass

+
Using TQApplication::translate()
+

If the quoted text is not in a member function of a TQObject subclass, use either the tr() function of an appropriate class, or the TQApplication::translate() function directly:

+
+    void some_global_function( LoginWidget *logwid )
+    {
+        TQLabel *label = new TQLabel(
+                LoginWidget::tr("Password:"), logwid );
+    }
+
+    void same_global_function( LoginWidget *logwid )
+    {
+        TQLabel *label = new TQLabel(
+                qApp->translate("LoginWidget", "Password:"),
+                logwid );
+    }
+
+
Using QT_TR_NOOP() and QT_TRANSLATE_NOOP()
+

If you need to have translatable text completely outside a function, there are two macros to help: QT_TR_NOOP() and QT_TRANSLATE_NOOP(). These macros merely mark the text for extraction by lupdate. The macros expand to just the text (without the context).

+

Example of QT_TR_NOOP():

+
+    TQString FriendlyConversation::greeting( int greet_type )
+    {
+        static const char* greeting_strings[] = {
+            QT_TR_NOOP( "Hello" ),
+            QT_TR_NOOP( "Goodbye" )
+        };
+        return tr( greeting_strings[greet_type] );
+    }
+
+

Example of QT_TRANSLATE_NOOP():

+
+    static const char* greeting_strings[] = {
+        QT_TRANSLATE_NOOP( "FriendlyConversation", "Hello" ),
+        QT_TRANSLATE_NOOP( "FriendlyConversation", "Goodbye" )
+    };
+
+    TQString FriendlyConversation::greeting( int greet_type )
+    {
+        return tr( greeting_strings[greet_type] );
+    }
+
+    TQString global_greeting( int greet_type )
+    {
+        return qApp->translate( "FriendlyConversation",
+                                greeting_strings[greet_type] );
+    }
+
+

Tutorials

+

Three tutorials are presented. The first demonstrates the creation of a TQTranslator object. It also shows the simplest use of the tr() function to mark user-visible source text for translation. The second tutorial explains how to make the application load the translation file applicable to the current locale. It also shows the use of the two-argument form of tr() which provides additional information to the translator. The third tutorial explains how identical source texts can be distinguished even when they occur in the same context. This tutorial also discusses how the translation tools help minimize the translator's work when an application is upgraded.

+

Tutorial 1: Loading and Using Translations

+

+

+

Tutorial 1 Screenshot, English version

+
TEMPLATE        = app
+CONFIG          += qt warn_on
+SOURCES         = main.cpp
+TRANSLATIONS    = tt1_la.ts
+
+

tt1.pro

+
/****************************************************************
+**
+** Translation tutorial 1
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qtranslator.h>
+
+
+int main( int argc, char **argv )
+{
+    TQApplication app( argc, argv );
+
+    TQTranslator translator( 0 );
+    translator.load( "tt1_la", "." );
+    app.installTranslator( &translator );
+
+    TQPushButton hello( TQPushButton::tr("Hello world!"), 0 );
+
+    app.setMainWidget( &hello );
+    hello.show();
+    return app.exec();
+}
+
+

main.cpp

+

This example is a reworking of the "hello-world" example from Tutorial #1, with a Latin translation. The Tutorial 1 Screenshot, English version, above, shows the English version.

+
Line by Line Walk-through
+
    #include <qtranslator.h>
+
+

This line includes the definition of the TQTranslator class. Objects of this class provide translations for user-visible text.

+
        TQTranslator translator( 0 );
+
+

Creates a TQTranslator object without a parent.

+
        translator.load( "tt1_la", "." );
+
+

Tries to load a file called tt1_la.qm (the .qm file extension is implicit) that contains Latin translations for the source texts used in the program. No error will occur if the file is not found.

+
        app.installTranslator( &translator );
+
+

Adds the translations from tt1_la.qm to the pool of translations used by the program.

+
        TQPushButton hello( TQPushButton::tr("Hello world!"), 0 );
+
+

Creates a push button that displays "Hello world!". If tt1_la.qm was found and contains a translation for "Hello world!", the translation appears; if not, the source text appears.

+

All classes that inherit TQObject have a tr() function. Inside a member function of a TQObject class, we simply write tr("Hello world!") instead of TQPushButton::tr("Hello world!") or TQObject::tr("Hello world!").

+
Running the Application in English
+

Since we haven't made the translation file tt1_la.qm, the source text is shown when we run the application:

+

+

+

Tutorial 1 Screenshot, English version

+
Creating a Latin Message File
+

The first step is to create a project file, tt1.pro, that lists all the source files for the project. The project file can be a qmake project file, or even an ordinary makefile. Any file that contains

+
    SOURCES         = main.cpp
+    TRANSLATIONS    = tt1_la.ts
+
+

will work. TRANSLATIONS specifies the message files we want to maintain. In this example, we just maintain one set of translations, namely Latin.

+

Note that the file extension is .ts, not .qm. The .ts translation source format is designed for use during the application's development. Programmers or release managers run the lupdate program to generate and update .ts files with the source text that is extracted from the source code. Translators read and update the .ts files using TQt Linguist adding and editing their translations.

+

The .ts format is human-readable XML that can be emailed directly and is easy to put under version control. If you edit this file manually, be aware that the default encoding for XML is UTF-8, not Latin-1 (ISO 8859-1). One way to type in a Latin-1 character such as 'ø' (Norwegian o with slash) is to use an XML entity: "&#xf8;". This will work for any Unicode character.

+

Once the translations are complete the lrelease program is used to convert the .ts files into the .qm TQt message file format. The .qm format is a compact binary format designed to deliver very fast lookup performance. Both lupdate and lrelease read all the project's source and header files (as specified in the HEADERS and SOURCES lines of the project file) and extract the strings that appear in tr() function calls.

+

lupdate is used to create and update the message files (tt1_la.ts in this case) to keep them in sync with the source code. It is safe to run lupdate at any time, as lupdate does not remove any information. For example, you can put it in the makefile, so the .ts files are updated whenever the source changes.

+

Try running lupdate right now, like this:

+
+    lupdate -verbose tt1.pro
+
+

(The -verbose option instructs lupdate to display messages that explain what it is doing.) You should now have a file tt1_la.ts in the current directory, containing this:

+
+    <!DOCTYPE TS><TS>
+    <context>
+        <name>TQPushButton</name>
+        <message>
+            <source>Hello world!</source>
+            <translation type="unfinished"></translation>
+        </message>
+    </context>
+    </TS>
+
+

You don't need to understand the file format since it is read and updated using tools (lupdate, TQt Linguist, lrelease).

+
Translating to Latin with TQt Linguist
+

We will use TQt Linguist to provide the translation, although you can use any XML or plain text editor to enter a translation into a .ts file.

+

To start TQt Linguist, type

+
+    linguist tt1_la.ts
+
+

You should now see the text "TQPushButton" in the top left pane. Double-click it, then click on "Hello world!" and enter "Orbis, te saluto!" in the Translation pane (the middle right of the window). Don't forget the exclamation mark!

+

Click the Done checkbox and choose File|Save from the menu bar. The .ts file will no longer contain

+
+    <translation type='unfinished'></translation>
+
+

but instead will have

+
+    <translation>Orbis, te saluto!</translation>
+
+
Running the Application in Latin
+

To see the application running in Latin, we have to generate a .qm file from the .ts file. Generating a .qm file can be achieved either from within TQt Linguist (for a single .ts file), or by using the command line program lrelease which will produce one .qm file for each of the .ts files listed in the project file. Generate tt1_la.qm from tt1_la.ts by choosing File|Release from TQt Linguist's menu bar and pressing Save in the file save dialog that pops up. Now run the tt1 example program again. This time the button will be labelled "Orbis, te saluto!".

+

+

+

Tutorial 1 Screenshot, Latin version

+

Tutorial 2: Using Two or More Languages

+

+

+

Tutorial 2 Screenshot, English version

+
TEMPLATE        = app
+CONFIG          += qt warn_on
+HEADERS         = arrowpad.h \
+                  mainwindow.h
+SOURCES         = arrowpad.cpp \
+                  main.cpp \
+                  mainwindow.cpp
+TRANSLATIONS    = tt2_fr.ts \
+                  tt2_nl.ts
+
+

tt2.pro

+

This example is a slightly more involved and introduces a key TQt Linguist concept: "contexts".

+

We will use two translations, French and Dutch, although there is no effective limit on the number of possible translations that can be used with an application. The relevant lines of tt2.pro are

+
    HEADERS         = arrowpad.h \
+                      mainwindow.h
+    SOURCES         = arrowpad.cpp \
+                      main.cpp \
+                      mainwindow.cpp
+    TRANSLATIONS    = tt2_fr.ts \
+                      tt2_nl.ts
+
+

Run lupdate; it should produce two identical message files tt2_fr.ts and tt2_nl.ts. These files will contain all the source texts marked for translation with tr() calls and their contexts.

+
Line by Line Walk-through
+

In arrowpad.h we define the ArrowPad subclass which is a subclass of TQWidget. In the Tutorial 2 Screenshot, English version, above, the central widget with the four buttons is an ArrowPad.

+
    class ArrowPad : public TQGrid
+
+

When lupdate is run it not only extracts the source texts but it also groups them into contexts. A context is the name of the class in which the source text appears. Thus, in this example, "ArrowPad" is a context: it is the context of the texts in the ArrowPad class. The Q_OBJECT macro defines tr(x) in ArrowPad like this

+
+    qApp->translate( "ArrowPad", x )
+
+

Knowing which class each source text appears in enables TQt Linguist to group texts that are logically related together, e.g. all the text in a dialog will have the context of the dialog's class name and will be shown together. This provides useful information for the translator since the context in which text appears may influence how it should be translated. For some translations keyboard accelerators may need to be changed and having all the source texts in a particular context (class) grouped together makes it easier for the translator to perform any accelerator changes without introducing conflicts.

+

In arrowpad.cpp we implement the ArrowPad class.

+
        (void) new TQPushButton( tr("&Up"), this );
+
+

We call ArrowPad::tr() for each button's label since the labels are user-visible text.

+

+

+

Tutorial 2 Screenshot, English version

+
    class MainWindow : public TQMainWindow
+    {
+        Q_OBJECT
+
+

In the Tutorial 2 Screenshot, English version, above, the whole window is a MainWindow. This is defined in the mainwindow.h header file. Here too, we use Q_OBJECT, so that MainWindow will become a context in TQt Linguist.

+

In the implementation of MainWindow, mainwindow.cpp, we create an instance of our ArrowPad class

+
        ArrowPad *ap = new ArrowPad( this, "arrow pad" );
+
+

We also call MainWindow::tr() twice, once for the menu item and once for the accelerator.

+
        file->insertItem( tr("E&xit"), qApp, SLOT(tquit()),
+                          tr("Ctrl+Q", "Quit") );
+
+

Note the use of tr() to support different keys in other languages. "Ctrl+Q" is a good choice for Quit in English, but a Dutch translator might want to use "Ctrl+A" (for Afsluiten) and a German translator "Strg+E" (for Beenden). When using tr() for Ctrl key accelerators, the two argument form should be used with the second argument describing the function that the accelerator performs.

+

Our main() function is defined in main.cpp as usual.

+
        TQTranslator translator( 0 );
+        translator.load( TQString("tt2_") + TQTextCodec::locale(), "." );
+        app.installTranslator( &translator );
+
+

We choose which translation to use according to the current locale. TQTextCodec::locale() can be influenced by setting the LANG environment variable, for example. Notice that the use of a naming convention that incorporates the locale for .qm message files, (and .ts files), makes it easy to implement choosing the translation file according to locale.

+

If there is no .qm message file for the locale chosen the original source text will be used and no error raised.

+
Translating to French and Dutch
+

We'll begin by translating the example application into French. Start TQt Linguist with tt2_fr.ts. You should get the seven source texts ("&Up", "&Left", etc.) grouped in two contexts ("ArrowPad" and "MainWindow").

+

Now, enter the following translations:

+

It's tquickest to press Alt+D (which clicks the Done & Next button) after typing each translation, since this marks the translation as done and moves on to the next source text.

+

Save the file and do the same for Dutch working with tt2_nl.ts:

+

We have to convert the tt1_fr.ts and tt1_nl.ts translation source files into .qm files. We could use TQt Linguist as we've done before; however using the command line tool lrelease ensures that all the .qm files for the application are created without us having to remember to load and File|Release each one individually from TQt Linguist.

+

In practice we would include calls to lupdate and lrelease in the application's makefile to ensure that the latest translations are used.

+

Type

+
+    lrelease tt2.pro
+
+

This should create both tt2_fr.qm and tt2_nl.qm. Set the LANG environment variable to fr. In Unix, one of the two following commands should work

+
+    export LANG=fr
+    setenv LANG fr
+
+

In Windows, either modify autoexec.bat or run

+
+    set LANG=fr
+
+

When you run the program, you should now see the French version:

+

+

+

Tutorial 2 Screenshot, French version

+

Try the same with Dutch, by setting LANG=nl. Now the Dutch version should appear:

+

+

+

Tutorial 2 Screenshot, Dutch version

+
Exercises
+

Mark one of the translations in TQt Linguist as not done, i.e. by unchecking the "done" checkbox; run lupdate, then lrelease, then the example. What effect did this change have?

+

Set LANG=fr_CA (French Canada) and run the example program again. Explain why the result is the same as with LANG=fr.

+

Change one of the accelerators in the Dutch translation to eliminate the conflict between &Bestand and &Boven.

+

Tutorial 3: Disambiguating Identical Strings

+

+

+

Tutorial 3 Screenshot, "Troll Print 1.0", English version

+
TEMPLATE        = app
+CONFIG          += qt warn_on
+HEADERS         = mainwindow.h \
+                  printpanel.h
+SOURCES         = main.cpp \
+                  mainwindow.cpp \
+                  printpanel.cpp
+TRANSLATIONS    = tt3_pt.ts
+
+

tt3.pro

+

We've included a translation file, tt3_pt.ts, which contains some Portuguese translations for this example.

+

We will consider two releases of the same application: Troll Print 1.0 and 1.1. We will learn to reuse the translations created for one release in a subsequent release. (In this tutorial, you need to edit some source files. It's probably best to copy all the files to a new temporary directory and work from there.)

+

Troll Print is a toy example application that lets the user choose printer settings. It comes in two versions: English and Portuguese.

+

Version 1.0 consists of these files:

+
Line by Line Walk-through
+

The PrintPanel is defined in printpanel.h.

+
    class PrintPanel : public TQVBox
+    {
+        Q_OBJECT
+
+

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

+

The implementation file is printpanel.cpp.

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

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

+
        TQHButtonGroup *twoSided = new TQHButtonGroup( this );
+        twoSided->setTitle( tr("2-sided") );
+        but = new TQRadioButton( tr("Enabled"), twoSided );
+        but = new TQRadioButton( tr("Disabled"), twoSided );
+        but->toggle();
+        TQHButtonGroup *colors = new TQHButtonGroup( this );
+        colors->setTitle( tr("Colors") );
+        but = new TQRadioButton( tr("Enabled"), colors );
+        but = new TQRadioButton( tr("Disabled"), colors );
+        but->toggle();
+
+

Notice the two occurrences of tr("Enabled") and of tr("Disabled") in PrintPanel. Since both "Enabled"s and "Disabled"s appear in the same context TQt Linguist will only display one occurrence of each and will use the same translations for the duplicates that it doesn't display. Whilst this is a useful timesaver, in some languages, such as Portuguese, the second occurrence retquires a separate translation. We will see how TQt Linguist can be made to display all the occurrences for separate translation shortly.

+

The header file for MainWindow, mainwindow.h, contains no surprises. In the implementation, mainwindow.cpp, we have some user-visible source texts that must be marked for translation.

+
        setCaption( tr("Troll Print 1.0") );
+
+

We must translate the window's caption.

+
        file->insertItem( tr("E&xit"), qApp, SLOT(tquit()),
+                          tr("Ctrl+Q", "Quit") );
+        TQPopupMenu *help = new TQPopupMenu( this );
+        help->insertItem( tr("&About"), this, SLOT(about()), Key_F1 );
+        help->insertItem( tr("About &TQt"), this, SLOT(aboutTQt()) );
+
+        menuBar()->insertItem( tr("&File"), file );
+        menuBar()->insertSeparator();
+        menuBar()->insertItem( tr("&Help"), help );
+
+

We also need to translate the menu items. Note that the two argument form of tr() is used for the keyboard accelerator, "Ctrl+Q", since the second argument is the only clue the translator has to indicate what function that accelerator will perform.

+
        TQTranslator translator( 0 );
+        translator.load( TQString("tt3_") + TQTextCodec::locale(), "." );
+        app.installTranslator( &translator );
+
+

The main() function in main.cpp is the same as the one in Tutorial 2. In particular it chooses a translation file based on the current locale.

+
Running Troll Print 1.0 in English and in Portuguese
+

We will use the translations in the tt3_pt.ts file that is provided.

+

Set the LANG environment variable to pt, and then run tt3. You should still see the English version, as shown in the Tutorial 3 Screenshot, "Troll Print 1.0", English version, above. Now run lrelease, e.g. lrelease tt3.pro, and then run the example again. Now you should see the Portuguese edition (Troll Imprimir 1.0):

+

+

+

Tutorial 3 Screenshot, "Troll Imprimir 1.0", (Bad) Portuguese version

+

Whilst the translation has appeared correctly, it is in fact wrong. In good Portuguese, the second occurrence of "Enabled" should be "Ativadas", not "Ativado" and the ending for the second translation of "Disabled" must change similarly too.

+

If you open tt3_pt.ts using TQt Linguist, you will see that there is just one occurrence of "Enabled" and of "Disabled" in the translation source file, even though there are two of each in the source code. This is because TQt Linguist tries to minimize the translator's work by using the same translation for duplicate source texts. In cases such as this where an identical translation is wrong, the programmer must disambiguate the duplicate occurrences. This is easily achieved by using the two argument form of tr().

+

We can easily determine which file must be changed because the translator's "context" is in fact the class name for the class where the texts that must be changed appears. In this case the file is printpanel.cpp, where the there are four lines to change. Add the second argument "two-sided" in the appropriate tr() calls to the first pair of radio buttons:

+
+    but = new TQRadioButton( tr("Enabled", "two-sided"), twoSided );
+    but = new TQRadioButton( tr("Disabled", "two-sided"), twoSided );
+
+

and add the second argument "colors" in the appropriate tr() calls for the second pair of radio buttons:

+
+    but = new TQRadioButton( tr("Enabled", "colors"), colors );
+    but = new TQRadioButton( tr("Disabled", "colors"), colors );
+
+

Now run lupdate and open tt3_pt.ts with TQt Linguist. You should now see two changes.

+

First, the translation source file now contains three "Enabled", "Disabled" pairs. The first pair is marked "(obs.)" signifying that they are obsolete. This is because these texts appeared in tr() calls that have been replaced by new calls with two arguments. The second pair has "two-sided" as their comment, and the third pair has "colors" as their comment. The comments are shown in the Source text and comments area in TQt Linguist.

+

Second, the translation text "Ativado" and "Desativado" have been automatically used as translations for the new "Enabled" and "Disabled" texts, again to minimize the translator's work. Of course in this case these are not correct for the second occurrence of each word, but they provide a good starting point.

+

Change the second "Ativado" into "Ativadas" and the second "Desativado" into "Desativadas", then save and tquit. Run lrelease to obtain an up-to-date binary tt3_pt.qm file, and run Troll Print (or rather Troll Imprimir).

+

+

+

Tutorial 3 Screenshot, "Troll Imprimir 1.0", (Good) Portuguese version

+

The second argument to tr() calls, called "comments" in TQt Linguist, distinguish between identical source texts that occur in the same context (class). They are also useful in other cases to give clues to the translator, and in the case of Ctrl key accelerators are the only means of conveying the function performed by the accelerator to the translator.

+

An additional way of helping the translator is to provide information on how to navigate to the particular part of the application that contains the source texts they must translate. This helps them see the context in which the translation appears and also helps them to find and test the translations. This can be achieved by using a TRANSLATOR comment in the source code:

+
+    /* TRANSLATOR MainWindow
+
+       In this application the whole application is a MainWindow.
+       Choose Help|About from the menu bar to see some text
+       belonging to MainWindow.
+    */
+
+

Try adding these comments to some source files, particularly to dialog classes, describing the navigation necessary to reach the dialogs. You could also add them to the example files, e.g. mainwindow.cpp and printpanel.cpp are appropriate files. Run lupdate and then start TQt Linguist and load in tt3_pt.ts. You should see the comments in the Source text and comments area as you browse through the list of source texts.

+

Sometimes, particularly with large programs, it can be difficult for the translator to find their translations and check that they're correct. Comments that provide good navigation information can save them time:

+
+    /* TRANSLATOR ZClientErrorDialog
+
+        Choose Client|Edit to reach the Client Edit dialog, then choose
+        Client Specification from the drop down list at the top and pick
+        client Bartel Leendert van der Waerden. Now check the Profile
+        checkbox and then click the Start Processing button. You should
+        now see a pop up window with the text "Error: Name too long!".
+        This window is a ZClientErrorDialog.
+    */
+
+
Troll Print 1.1
+

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

+

(Of course the version number and copyright year would be consts or #defines in a real application.)

+

Once finished, run lupdate, then open tt3_pt.ts in TQt Linguist. The following items are of special interest:

+

Notice that lupdate works hard behind the scenes to make revisions easier, and it's pretty smart with numbers.

+

Go over the translations in MainWindow and mark these as "done". Translate "<b>TROLL PRINT</b>" as "<b>TROLL IMPRIMIR</b>". When you're translating "Two-sided", press the Guess Again button to translate "Two-sided", but change the "2" into "Dois".

+

Save and tquit, then run lrelease. The Portuguese version should look like this:

+

+

+

Tutorial 3 Screenshot, "Troll Imprimir 1.1", Portuguese version

+

Choose Ajuda|Sobre, (Help|About), to see the about box

+

+

+

Tutorial 3 Screenshot, About box, Portuguese version

+

If you choose Ajuda|Sobre TQt, (Help|About TQt), you'll get an English dialog. Oops! TQt itself needs to be translated. See the document Internationalization with TQt for details.

+

Now set LANG=en to get the original English version:

+

+

+

Tutorial 3 Screenshot, "Troll Print 1.1", English version

+

Summary

+

These tutorials cover all that you need to know to prepare your TQt applications for translation.

+

At the beginning of a project add the translation source files to be used to the project file and add calls to lupdate and lrelease to the make file.

+

During the project all the programmer must do is wrap any user-visible text in tr() calls. They should also use the two argument form for Ctrl key accelerators, or when asked by the translator for the cases where the same text translates into two different forms in the same context. The programmer should also include TRANSLATION comments to help the translator navigate the application.

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/linguist-manual.html b/doc/html/linguist-manual.html new file mode 100644 index 00000000..9d7968dd --- /dev/null +++ b/doc/html/linguist-manual.html @@ -0,0 +1,45 @@ + + + + + +Guide to the TQt Translation Tools + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Guide to the TQt Translation Tools

+ +

Introduction

+

Release Manager

+

Translators

+

Programmers

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/linguist.dcf b/doc/html/linguist.dcf new file mode 100644 index 00000000..e03e310b --- /dev/null +++ b/doc/html/linguist.dcf @@ -0,0 +1,7 @@ + + +
+
+
+
+ diff --git a/doc/html/linguist.png b/doc/html/linguist.png new file mode 100644 index 00000000..519c185a Binary files /dev/null and b/doc/html/linguist.png differ diff --git a/doc/html/listbox-example.html b/doc/html/listbox-example.html new file mode 100644 index 00000000..6a40e392 --- /dev/null +++ b/doc/html/listbox-example.html @@ -0,0 +1,325 @@ + + + + + +Listbox Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Listbox Example

+ + +

+This example shows how to use the different modes (single columns, multiple columns, +fixed number of rows, etc.) of TQListBox. +


+

Header file: +

/****************************************************************************
+** $Id: qt/listbox.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef LISTBOX_H
+#define LISTBOX_H
+
+
+class TQSpinBox;
+class TQListBox;
+class TQButtonGroup;
+
+#include <qwidget.h>
+
+
+class ListBoxDemo: public TQWidget
+{
+    Q_OBJECT
+public:
+    ListBoxDemo();
+    ~ListBoxDemo();
+
+private slots:
+    void setNumRows();
+    void setNumCols();
+    void setRowsByHeight();
+    void setColsByWidth();
+    void setVariableWidth( bool );
+    void setVariableHeight( bool );
+    void setMultiSelection( bool );
+    void sortAscending();
+    void sortDescending();
+
+private:
+    TQListBox * l;
+    TQSpinBox * columns;
+    TQSpinBox * rows;
+    TQButtonGroup * bg;
+};
+
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/listbox.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "listbox.h"
+
+#include <qlabel.h>
+#include <qradiobutton.h>
+#include <qcheckbox.h>
+#include <qspinbox.h>
+#include <qlistbox.h>
+#include <qbuttongroup.h>
+#include <qlayout.h>
+#include <qpushbutton.h>
+
+
+ListBoxDemo::ListBoxDemo()
+    : TQWidget( 0, 0 )
+{
+    TQGridLayout * g = new TQGridLayout( this, 2, 2, 6 );
+
+    g->addWidget( new TQLabel( "<b>Configuration:</b>", this ), 0, 0 );
+    g->addWidget( new TQLabel( "<b>Result:</b>", this ), 0, 1 );
+
+    l = new TQListBox( this );
+    g->addWidget( l, 1, 1 );
+    l->setFocusPolicy( TQWidget::StrongFocus );
+
+    TQVBoxLayout * v = new TQVBoxLayout;
+    g->addLayout( v, 1, 0 );
+
+    TQRadioButton * b;
+    bg = new TQButtonGroup( 0 );
+
+    b = new TQRadioButton( "Fixed number of columns,\n"
+                          "as many rows as needed.",
+                          this );
+    bg->insert( b );
+    v->addWidget( b );
+    b->setChecked( TRUE );
+    connect( b, SIGNAL(clicked()), this, SLOT(setNumCols()) );
+    TQHBoxLayout * h = new TQHBoxLayout;
+    v->addLayout( h );
+    h->addSpacing( 30 );
+    h->addSpacing( 100 );
+    h->addWidget( new TQLabel( "Columns:", this ) );
+    columns = new TQSpinBox( this );
+    h->addWidget( columns );
+
+    v->addSpacing( 12 );
+
+    b = new TQRadioButton( "As many columns as fit on-screen,\n"
+                          "as many rows as needed.",
+                          this );
+    bg->insert( b );
+    v->addWidget( b );
+    connect( b, SIGNAL(clicked()), this, SLOT(setColsByWidth()) );
+
+    v->addSpacing( 12 );
+
+    b = new TQRadioButton( "Fixed number of rows,\n"
+                          "as many columns as needed.",
+                          this );
+    bg->insert( b );
+    v->addWidget( b );
+    connect( b, SIGNAL(clicked()), this, SLOT(setNumRows()) );
+    h = new TQHBoxLayout;
+    v->addLayout( h );
+    h->addSpacing( 30 );
+    h->addSpacing( 100 );
+    h->addWidget( new TQLabel( "Rows:", this ) );
+    rows = new TQSpinBox( this );
+    rows->setEnabled( FALSE );
+    h->addWidget( rows );
+
+    v->addSpacing( 12 );
+
+    b = new TQRadioButton( "As many rows as fit on-screen,\n"
+                          "as many columns as needed.",
+                          this );
+    bg->insert( b );
+    v->addWidget( b );
+    connect( b, SIGNAL(clicked()), this, SLOT(setRowsByHeight()) );
+
+    v->addSpacing( 12 );
+
+    TQCheckBox * cb = new TQCheckBox( "Variable-height rows", this );
+    cb->setChecked( TRUE );
+    connect( cb, SIGNAL(toggled(bool)), this, SLOT(setVariableHeight(bool)) );
+    v->addWidget( cb );
+    v->addSpacing( 6 );
+
+    cb = new TQCheckBox( "Variable-width columns", this );
+    connect( cb, SIGNAL(toggled(bool)), this, SLOT(setVariableWidth(bool)) );
+    v->addWidget( cb );
+
+    cb = new TQCheckBox( "Extended-Selection", this );
+    connect( cb, SIGNAL(toggled(bool)), this, SLOT(setMultiSelection(bool)) );
+    v->addWidget( cb );
+
+    TQPushButton *pb = new TQPushButton( "Sort ascending", this );
+    connect( pb, SIGNAL( clicked() ), this, SLOT( sortAscending() ) );
+    v->addWidget( pb );
+
+    pb = new TQPushButton( "Sort descending", this );
+    connect( pb, SIGNAL( clicked() ), this, SLOT( sortDescending() ) );
+    v->addWidget( pb );
+
+    v->addStretch( 100 );
+
+    int i = 0;
+    while( ++i <= 2560 )
+        l->insertItem( TQString::fromLatin1( "Item " ) + TQString::number( i ),
+                       i );
+    columns->setRange( 1, 256 );
+    columns->setValue( 1 );
+    rows->setRange( 1, 256 );
+    rows->setValue( 256 );
+
+    connect( columns, SIGNAL(valueChanged(int)), this, SLOT(setNumCols()) );
+    connect( rows, SIGNAL(valueChanged(int)), this, SLOT(setNumRows()) );
+}
+
+
+ListBoxDemo::~ListBoxDemo()
+{
+    delete bg;
+}
+
+
+void ListBoxDemo::setNumRows()
+{
+    columns->setEnabled( FALSE );
+    rows->setEnabled( TRUE );
+    l->setRowMode( rows->value() );
+}
+
+
+void ListBoxDemo::setNumCols()
+{
+    columns->setEnabled( TRUE );
+    rows->setEnabled( FALSE );
+    l->setColumnMode( columns->value() );
+}
+
+
+void ListBoxDemo::setRowsByHeight()
+{
+    columns->setEnabled( FALSE );
+    rows->setEnabled( FALSE );
+    l->setRowMode( TQListBox::FitToHeight );
+}
+
+
+void ListBoxDemo::setColsByWidth()
+{
+    columns->setEnabled( FALSE );
+    rows->setEnabled( FALSE );
+    l->setColumnMode( TQListBox::FitToWidth );
+}
+
+
+void ListBoxDemo::setVariableWidth( bool b )
+{
+    l->setVariableWidth( b );
+}
+
+
+void ListBoxDemo::setVariableHeight( bool b )
+{
+    l->setVariableHeight( b );
+}
+
+void ListBoxDemo::setMultiSelection( bool b )
+{
+    l->clearSelection();
+    l->setSelectionMode( b ? TQListBox::Extended : TQListBox::Single );
+}
+
+void ListBoxDemo::sortAscending()
+{
+    l->sort( TRUE );
+}
+
+void ListBoxDemo::sortDescending()
+{
+    l->sort( FALSE );
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "listbox.h"
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    ListBoxDemo t;
+    t.setCaption( "TQt Example - Listbox" );
+    a.setMainWidget( &t );
+    t.show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/listboxcombo-example.html b/doc/html/listboxcombo-example.html new file mode 100644 index 00000000..9ea38d2a --- /dev/null +++ b/doc/html/listboxcombo-example.html @@ -0,0 +1,309 @@ + + + + + +Listboxes and Comboboxes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Listboxes and Comboboxes

+ + +

+This example program demonstrates how to use listboxes (with single selection +and multi selection) and comboboxes (editable and non-editable). +


+

Header file: +

/****************************************************************************
+** $Id: qt/listboxcombo.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef LISTBOX_COMBO_H
+#define LISTBOX_COMBO_H
+
+#include <qvbox.h>
+
+class TQListBox;
+class TQLabel;
+
+class ListBoxCombo : public TQVBox
+{
+    Q_OBJECT
+
+public:
+    ListBoxCombo( TQWidget *parent = 0, const char *name = 0 );
+
+protected:
+    TQListBox *lb1, *lb2;
+    TQLabel *label1, *label2;
+
+protected slots:
+    void slotLeft2Right();
+    void slotCombo1Activated( const TQString &s );
+    void slotCombo2Activated( const TQString &s );
+
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/listboxcombo.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "listboxcombo.h"
+
+#include <qcombobox.h>
+#include <qlistbox.h>
+#include <qhbox.h>
+#include <qpushbutton.h>
+#include <qstring.h>
+#include <qpixmap.h>
+#include <qlabel.h>
+#include <qimage.h>
+#include <qpainter.h>
+#include <qstyle.h>
+
+
+class MyListBoxItem : public TQListBoxItem
+{
+public:
+    MyListBoxItem()
+        : TQListBoxItem()
+    {
+        setCustomHighlighting( TRUE );
+    }
+
+protected:
+    virtual void paint( TQPainter * );
+    virtual int width( const TQListBox* ) const { return 100; }
+    virtual int height( const TQListBox* ) const { return 16; }
+
+};
+
+void MyListBoxItem::paint( TQPainter *painter )
+{
+    // evil trick: find out whether we are painted onto our listbox
+    bool in_list_box = listBox() && listBox()->viewport() == painter->device();
+
+    TQRect r ( 0, 0, width( listBox() ), height( listBox() ) );
+    if ( in_list_box && isSelected() )
+        painter->eraseRect( r );
+    painter->fillRect( 5, 5, width( listBox() ) - 10, height( listBox() ) - 10, TQt::red );
+    if ( in_list_box && isCurrent() )
+        listBox()->style().drawPrimitive( TQStyle::PE_FocusRect, painter, r, listBox()->colorGroup() );
+}
+
+/*
+ * Constructor
+ *
+ * Creates child widgets of the ListBoxCombo widget
+ */
+
+ListBoxCombo::ListBoxCombo( TQWidget *parent, const char *name )
+    : TQVBox( parent, name )
+{
+    setMargin( 5 );
+    setSpacing( 5 );
+
+    unsigned int i;
+    TQString str;
+
+    TQHBox *row1 = new TQHBox( this );
+    row1->setSpacing( 5 );
+
+    // Create a multi-selection ListBox...
+    lb1 = new TQListBox( row1 );
+    lb1->setSelectionMode( TQListBox::Multi );
+
+    // ...insert a pixmap item...
+    lb1->insertItem( TQPixmap( "qtlogo.png" ) );
+    // ...and 100 text items
+    for ( i = 0; i < 100; i++ ) {
+        str = TQString( "Listbox Item %1" ).arg( i );
+        if ( !( i % 4 ) )
+            lb1->insertItem( TQPixmap( "fileopen.xpm" ), str );
+        else
+            lb1->insertItem( str );
+    }
+
+    // Create a pushbutton...
+    TQPushButton *arrow1 = new TQPushButton( " -> ", row1 );
+    // ...and connect the clicked SIGNAL with the SLOT slotLeft2Right
+    connect( arrow1, SIGNAL( clicked() ), this, SLOT( slotLeft2Right() ) );
+
+    // create an empty single-selection ListBox
+    lb2 = new TQListBox( row1 );
+
+    TQHBox *row2 = new TQHBox( this );
+    row2->setSpacing( 5 );
+
+    TQVBox *box1 = new TQVBox( row2 );
+    box1->setSpacing( 5 );
+
+    // Create a non-editable Combobox and a label below...
+    TQComboBox *cb1 = new TQComboBox( FALSE, box1 );
+    label1 = new TQLabel( "Current Item: Combobox Item 0", box1 );
+    label1->setMaximumHeight( label1->sizeHint().height() * 2 );
+    label1->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+
+    //...and insert 50 items into the Combobox
+    for ( i = 0; i < 50; i++ ) {
+        str = TQString( "Combobox Item %1" ).arg( i );
+        if ( i % 9 )
+            cb1->insertItem( str );
+        else
+            cb1->listBox()->insertItem( new MyListBoxItem );
+    }
+
+    TQVBox *box2 = new TQVBox( row2 );
+    box2->setSpacing( 5 );
+
+    // Create an editable Combobox and a label below...
+    TQComboBox *cb2 = new TQComboBox( TRUE, box2 );
+    label2 = new TQLabel( "Current Item: Combobox Item 0", box2 );
+    label2->setMaximumHeight( label2->sizeHint().height() * 2 );
+    label2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+
+    // ... and insert 50 items into the Combobox
+    for ( i = 0; i < 50; i++ ) {
+        str = TQString( "Combobox Item %1" ).arg( i );
+        if ( !( i % 4 ) )
+            cb2->insertItem( TQPixmap( "fileopen.xpm" ), str );
+        else
+            cb2->insertItem( str );
+    }
+
+    // Connect the activated SIGNALs of the Comboboxes with SLOTs
+    connect( cb1, SIGNAL( activated( const TQString & ) ), this, SLOT( slotCombo1Activated( const TQString & ) ) );
+    connect( cb2, SIGNAL( activated( const TQString & ) ), this, SLOT( slotCombo2Activated( const TQString & ) ) );
+}
+
+/*
+ * SLOT slotLeft2Right
+ *
+ * Copies all selected items of the first ListBox into the
+ * second ListBox
+ */
+
+void ListBoxCombo::slotLeft2Right()
+{
+    // Go through all items of the first ListBox
+    for ( unsigned int i = 0; i < lb1->count(); i++ ) {
+        TQListBoxItem *item = lb1->item( i );
+        // if the item is selected...
+        if ( item->isSelected() ) {
+            // ...and it is a text item...
+            if ( item->pixmap() && !item->text().isEmpty() )
+                lb2->insertItem( *item->pixmap(), item->text() );
+            else if ( !item->pixmap() )
+                lb2->insertItem( item->text() );
+            else if ( item->text().isEmpty() )
+                lb2->insertItem( *item->pixmap() );
+        }
+    }
+}
+
+/*
+ * SLOT slotCombo1Activated( const TQString &s )
+ *
+ * Sets the text of the item which the user just selected
+ * in the first Combobox (and is now the value of s) to
+ * the first Label.
+ */
+
+void ListBoxCombo::slotCombo1Activated( const TQString &s )
+{
+    label1->setText( TQString( "Current Item: %1" ).arg( s ) );
+}
+
+/*
+ * SLOT slotCombo2Activated( const TQString &s )
+ *
+ * Sets the text of the item which the user just selected
+ * in the second Combobox (and is now the value of s) to
+ * the second Label.
+ */
+
+void ListBoxCombo::slotCombo2Activated( const TQString &s )
+{
+    label2->setText( TQString( "Current Item: %1" ).arg( s ) );
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "listboxcombo.h"
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    ListBoxCombo listboxcombo;
+    listboxcombo.resize( 400, 270 );
+    listboxcombo.setCaption( "TQt Example - Listboxes and Comboboxes" );
+    a.setMainWidget( &listboxcombo );
+    listboxcombo.show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/listviews-example.html b/doc/html/listviews-example.html new file mode 100644 index 00000000..9b74fd36 --- /dev/null +++ b/doc/html/listviews-example.html @@ -0,0 +1,513 @@ + + + + + +Listviews + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Listviews

+ + +

+This examples shows how to work with listviews (hierarchical and multi-column). +It also shows how to subclass listview items for special reasons. It looks +and works like the main window of a mail client. +


+

Header file: +

/****************************************************************************
+** $Id: qt/listviews.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef LISTVIEWS_H
+#define LISTVIEWS_H
+
+#include <qsplitter.h>
+#include <qstring.h>
+#include <qobject.h>
+#include <qdatetime.h>
+#include <qptrlist.h>
+#include <qlistview.h>
+
+class TQListView;
+class TQLabel;
+class TQPainter;
+class TQColorGroup;
+class TQObjectList;
+class TQPopupMenu;
+
+// -----------------------------------------------------------------
+
+class MessageHeader
+{
+public:
+    MessageHeader( const TQString &_sender, const TQString &_subject, const TQDateTime &_datetime )
+        : msender( _sender ), msubject( _subject ), mdatetime( _datetime )
+    {}
+
+    MessageHeader( const MessageHeader &mh );
+    MessageHeader &operator=( const MessageHeader &mh );
+
+    TQString sender() { return msender; }
+    TQString subject() { return msubject; }
+    TQDateTime datetime() { return mdatetime; }
+
+protected:
+    TQString msender, msubject;
+    TQDateTime mdatetime;
+
+};
+
+// -----------------------------------------------------------------
+
+class Message
+{
+public:
+    enum State { Read = 0,
+                 Unread};
+
+    Message( const MessageHeader &mh, const TQString &_body )
+        : mheader( mh ), mbody( _body ), mstate( Unread )
+    {}
+
+    Message( const Message &m )
+        : mheader( m.mheader ), mbody( m.mbody ), mstate( m.mstate )
+    {}
+
+    MessageHeader header() { return mheader; }
+    TQString body() { return mbody; }
+
+    void setState( const State &s ) { mstate = s; }
+    State state() { return mstate; }
+
+protected:
+    MessageHeader mheader;
+    TQString mbody;
+    State mstate;
+
+};
+
+// -----------------------------------------------------------------
+
+class Folder : public TQObject
+{
+    Q_OBJECT
+
+public:
+    Folder( Folder *parent, const TQString &name );
+    ~Folder()
+    {}
+
+    void addMessage( Message *m )
+    { lstMessages.append( m ); }
+
+    TQString folderName() { return fName; }
+
+    Message *firstMessage() { return lstMessages.first(); }
+    Message *nextMessage() { return lstMessages.next(); }
+
+protected:
+    TQString fName;
+    TQPtrList<Message> lstMessages;
+
+};
+
+// -----------------------------------------------------------------
+
+class FolderListItem : public TQListViewItem
+{
+public:
+    FolderListItem( TQListView *parent, Folder *f );
+    FolderListItem( FolderListItem *parent, Folder *f );
+
+    void insertSubFolders( const TQObjectList *lst );
+
+    Folder *folder() { return myFolder; }
+
+protected:
+    Folder *myFolder;
+
+};
+
+// -----------------------------------------------------------------
+
+class MessageListItem : public TQListViewItem
+{
+public:
+    MessageListItem( TQListView *parent, Message *m );
+
+    virtual void paintCell( TQPainter *p, const TQColorGroup &cg,
+                            int column, int width, int alignment );
+
+    Message *message() { return myMessage; }
+
+protected:
+    Message *myMessage;
+
+};
+
+// -----------------------------------------------------------------
+
+class ListViews : public TQSplitter
+{
+    Q_OBJECT
+
+public:
+    ListViews( TQWidget *parent = 0, const char *name = 0 );
+    ~ListViews()
+    {}
+
+protected:
+    void initFolders();
+    void initFolder( Folder *folder, unsigned int &count );
+    void setupFolders();
+
+    TQListView *messages, *folders;
+    TQLabel *message;
+    TQPopupMenu* menu;
+
+    TQPtrList<Folder> lstFolders;
+
+protected slots:
+    void slotFolderChanged( TQListViewItem* );
+    void slotMessageChanged();
+    void slotRMB( TQListViewItem*, const TQPoint &, int );
+
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/listviews.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "listviews.h"
+
+#include <qlabel.h>
+#include <qpainter.h>
+#include <qpalette.h>
+#include <qobjectlist.h>
+#include <qpopupmenu.h>
+#include <qheader.h>
+#include <qregexp.h>
+
+// -----------------------------------------------------------------
+
+MessageHeader::MessageHeader( const MessageHeader &mh )
+{
+    msender = mh.msender;
+    msubject = mh.msubject;
+    mdatetime = mh.mdatetime;
+}
+
+MessageHeader &MessageHeader::operator=( const MessageHeader &mh )
+{
+    msender = mh.msender;
+    msubject = mh.msubject;
+    mdatetime = mh.mdatetime;
+
+    return *this;
+}
+
+// -----------------------------------------------------------------
+
+Folder::Folder( Folder *parent, const TQString &name )
+    : TQObject( parent, name ), fName( name )
+{
+    lstMessages.setAutoDelete( TRUE );
+}
+
+// -----------------------------------------------------------------
+
+FolderListItem::FolderListItem( TQListView *parent, Folder *f )
+    : TQListViewItem( parent )
+{
+    myFolder = f;
+    setText( 0, f->folderName() );
+
+    if ( myFolder->children() )
+        insertSubFolders( myFolder->children() );
+}
+
+FolderListItem::FolderListItem( FolderListItem *parent, Folder *f )
+    : TQListViewItem( parent )
+{
+    myFolder = f;
+
+    setText( 0, f->folderName() );
+
+    if ( myFolder->children() )
+        insertSubFolders( myFolder->children() );
+}
+
+void FolderListItem::insertSubFolders( const TQObjectList *lst )
+{
+    Folder *f;
+    for ( f = ( Folder* )( ( TQObjectList* )lst )->first(); f; f = ( Folder* )( ( TQObjectList* )lst )->next() )
+        (void)new FolderListItem( this, f );
+}
+
+// -----------------------------------------------------------------
+
+MessageListItem::MessageListItem( TQListView *parent, Message *m )
+    : TQListViewItem( parent )
+{
+    myMessage = m;
+    setText( 0, myMessage->header().sender() );
+    setText( 1, myMessage->header().subject() );
+    setText( 2, myMessage->header().datetime().toString() );
+}
+
+void MessageListItem::paintCell( TQPainter *p, const TQColorGroup &cg,
+                                 int column, int width, int alignment )
+{
+    TQColorGroup _cg( cg );
+    TQColor c = _cg.text();
+
+    if ( myMessage->state() == Message::Unread )
+        _cg.setColor( TQColorGroup::Text, TQt::red );
+
+    TQListViewItem::paintCell( p, _cg, column, width, alignment );
+
+    _cg.setColor( TQColorGroup::Text, c );
+}
+
+// -----------------------------------------------------------------
+
+ListViews::ListViews( TQWidget *parent, const char *name )
+    : TQSplitter( TQt::Horizontal, parent, name )
+{
+    lstFolders.setAutoDelete( TRUE );
+
+    folders = new TQListView( this );
+    folders->header()->setClickEnabled( FALSE );
+    folders->addColumn( "Folder" );
+
+    initFolders();
+    setupFolders();
+
+    folders->setRootIsDecorated( TRUE );
+    setResizeMode( folders, TQSplitter::KeepSize );
+
+    TQSplitter *vsplitter = new TQSplitter( TQt::Vertical, this );
+
+    messages = new TQListView( vsplitter );
+    messages->addColumn( "Sender" );
+    messages->addColumn( "Subject" );
+    messages->addColumn( "Date" );
+    messages->setColumnAlignment( 1, TQt::AlignRight );
+    messages->setAllColumnsShowFocus( TRUE );
+    messages->setShowSortIndicator( TRUE );
+    menu = new TQPopupMenu( messages );
+    for( int i = 1; i <= 10; i++ )
+        menu->insertItem( TQString( "Context Item %1" ).arg( i ) );
+    connect(messages, SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ),
+            this, SLOT( slotRMB( TQListViewItem *, const TQPoint &, int ) ) );
+    vsplitter->setResizeMode( messages, TQSplitter::KeepSize );
+
+    message = new TQLabel( vsplitter );
+    message->setAlignment( TQt::AlignTop );
+    message->setBackgroundMode( PaletteBase );
+
+    connect( folders, SIGNAL( selectionChanged( TQListViewItem* ) ),
+             this, SLOT( slotFolderChanged( TQListViewItem* ) ) );
+    connect( messages, SIGNAL( selectionChanged() ),
+             this, SLOT( slotMessageChanged() ) );
+    connect( messages, SIGNAL( currentChanged( TQListViewItem * ) ),
+             this, SLOT( slotMessageChanged() ) );
+
+    messages->setSelectionMode( TQListView::Extended );
+    // some preparations
+    folders->firstChild()->setOpen( TRUE );
+    folders->firstChild()->firstChild()->setOpen( TRUE );
+    folders->setCurrentItem( folders->firstChild()->firstChild()->firstChild() );
+    folders->setSelected( folders->firstChild()->firstChild()->firstChild(), TRUE );
+
+    messages->setSelected( messages->firstChild(), TRUE );
+    messages->setCurrentItem( messages->firstChild() );
+    message->setMargin( 5 );
+
+    TQValueList<int> lst;
+    lst.append( 170 );
+    setSizes( lst );
+}
+
+void ListViews::initFolders()
+{
+    unsigned int mcount = 1;
+
+    for ( unsigned int i = 1; i < 20; i++ ) {
+        TQString str;
+        str = TQString( "Folder %1" ).arg( i );
+        Folder *f = new Folder( 0, str );
+        for ( unsigned int j = 1; j < 5; j++ ) {
+            TQString str2;
+            str2 = TQString( "Sub Folder %1" ).arg( j );
+            Folder *f2 = new Folder( f, str2 );
+            for ( unsigned int k = 1; k < 3; k++ ) {
+                TQString str3;
+                str3 = TQString( "Sub Sub Folder %1" ).arg( k );
+                Folder *f3 = new Folder( f2, str3 );
+                initFolder( f3, mcount );
+            }
+        }
+        lstFolders.append( f );
+    }
+}
+
+void ListViews::initFolder( Folder *folder, unsigned int &count )
+{
+    for ( unsigned int i = 0; i < 15; i++, count++ ) {
+        TQString str;
+        str = TQString( "Message %1  " ).arg( count );
+        TQDateTime dt = TQDateTime::currentDateTime();
+        dt = dt.addSecs( 60 * count );
+        MessageHeader mh( "Trolltech <info@trolltech.com>  ", str, dt );
+
+        TQString body;
+        body = TQString( "This is the message number %1 of this application, \n"
+                        "which shows how to use TQListViews, TQListViewItems, \n"
+                        "TQSplitters and so on. The code should show how easy\n"
+                        "this can be done in TQt." ).arg( count );
+        Message *msg = new Message( mh, body );
+        folder->addMessage( msg );
+    }
+}
+
+void ListViews::setupFolders()
+{
+    folders->clear();
+
+    for ( Folder* f = lstFolders.first(); f; f = lstFolders.next() )
+        (void)new FolderListItem( folders, f );
+}
+
+void ListViews::slotRMB( TQListViewItem* Item, const TQPoint & point, int )
+{
+    if( Item )
+        menu->popup( point );
+}
+
+
+void ListViews::slotFolderChanged( TQListViewItem *i )
+{
+    if ( !i )
+        return;
+    messages->clear();
+    message->setText( "" );
+
+    FolderListItem *item = ( FolderListItem* )i;
+
+    for ( Message* msg = item->folder()->firstMessage(); msg;
+          msg = item->folder()->nextMessage() )
+        (void)new MessageListItem( messages, msg );
+}
+
+void ListViews::slotMessageChanged()
+{
+    TQListViewItem *i = messages->currentItem();
+    if ( !i )
+        return;
+
+    if ( !i->isSelected() ) {
+        message->setText( "" );
+        return;
+    }
+
+    MessageListItem *item = ( MessageListItem* )i;
+    Message *msg = item->message();
+
+    TQString text;
+    TQString tmp = msg->header().sender();
+    tmp = tmp.replace( "<", "&lt;" );
+    tmp = tmp.replace( ">", "&gt;" );
+    text = TQString( "<b><i>From:</i></b> <a href=\"mailto:info@trolltech.com\">%1</a><br>"
+                    "<b><i>Subject:</i></b> <big><big><b>%2</b></big></big><br>"
+                    "<b><i>Date:</i></b> %3<br><br>"
+                    "%4" ).
+           arg( tmp ).arg( msg->header().subject() ).
+           arg( msg->header().datetime().toString() ).arg( msg->body() );
+
+    message->setText( text );
+
+    msg->setState( Message::Read );
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "listviews.h"
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    ListViews listViews;
+    listViews.resize( 640, 480 );
+    listViews.setCaption( "TQt Example - Listview" );
+    a.setMainWidget( &listViews );
+    listViews.show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/logo32.png b/doc/html/logo32.png new file mode 100644 index 00000000..b29a896f Binary files /dev/null and b/doc/html/logo32.png differ diff --git a/doc/html/mac-differences.html b/doc/html/mac-differences.html new file mode 100644 index 00000000..967462ed --- /dev/null +++ b/doc/html/mac-differences.html @@ -0,0 +1,289 @@ + + + + + +TQt/Mac Issues + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt/Mac Issues

+ + + +

This file will outline known issues and possible workarounds for +limitations on Mac OS X with TQt. This list will not always be complete, so +please contact Trolltech support with issues you find to be missing. +

See also the document TQt/Mac is Mac OS X +Native. +

+

+ + +

GUI Applications +

+

GUI Applications must be run out of a bundle (something like widgets.app/) +or using the open(1) command. Mac OS X needs this to dispatch events correctly, +as well as gaining access to the menubar. If using GDB you must run with the +full path to the executable. +

TQCursor +

+

Due to Mac OS X having only 16x16 custom cursors TQCursor is limited by this +as well. For now the only workaround to this problem is to use a small +cursor (16x16). +

Anti-aliased text +

+

TQt/Mac (starting with 3.0.5) has introduced some support for smooth text as +suggested by Apple's Aqua Style Guildelines. This support is limited to Mac +OS X >10.1.4, when this version is not detected it will fallback to the old +text rendering library. +

Library Support +

+

Bundle-based Libraries +

+

If you want to incorporate dynamic libraries as part of your Mac OS X +application bundle (the application directory), then you place these into a +directory called Frameworks, a subdirectory of the application bundle. +

The application finds these dynamic libraries if the libraries have an +install name of "@executable_path/../Frameworks/libname.dylib. +

If you use qmake and Makefiles, use the QMAKE_LFFLAGS_SONAME setting: +

+QMAKE_LFLAGS_SONAME  = -Wl,-install_name,@executable_path/../Frameworks/
+
+ +

In case of Project Builder, you set the Library targets to have their +install path (in the Build Settings of the target) set to +"@executable_path/.../Frameworks". You also need to add a custom build +setting called "SKIP_INSTALL" and set this to YES. In the Application +target you need to add a Copy Files build phase that will copy the library +product into the applications wrapper's Framework sub-folder. +

Note that DYLD_LIBRARY_PATH environment variables will override these +settings, same with any other default paths such as a lookup of dynamic +libraries inside /usr/lib and similar default locations. +

We still strongly recommend to build static applications where the library +code is incorporated into the Mac OS X binary. However, in case you ship +applications that retquire plugin support,then you need to use dynamic +libraries as part of your application. +

Combining Libraries +

+

If you want to build a new dynamic library combining the TQt 3.1 dynamic +libraries, you need to introduce the ld -r flag so that relocation information +is stored in the the output file, so that this file could be the subject of +another ld run. This is done by setting the -r flag in the .pro file, and the +LFLAGS settings. +

Initialization Order +

+

dyld(1) will call global static initializers in the order in which +they are linked into your application. If a library links against TQt +and references globals in TQt (from global initializers in your own +library) you should be sure to link against TQt before your library, +otherwise the result will be undefined (as TQt's global initializers +have not been called yet). +

Plugin Support +

+

Note that it is not possible to build TQt plugins using Project Builder +or Xcode. Use qmake to configure and +build plugins. +

Compiler Settings +

+

Compile-time Flags +

+

If you want to wrap any specific Mac OS X code in a define, use the Q_OS_MACX +flag, as in: +

+#if defined(Q_OS_MACX)
+// the code used
+#endif
+
+ +

Note that when you build under Mac OS X 10.2, then the MACOSX_102 flag is +automatically included in the make builds. +

Building and Configuring TQt/Mac +

+

Problems building a static configuration +

+

If a static build fails with the following error messages during the +designer make phase: +

+TQWidget::sizeHint() const referenced from libtqui expected to be defined in @executable_path/../Frameworks/libtqt-mt.3.dylib
+non-virtual thunk [nv:-40] to TQWidget::metric(int) const referenced from libtqui
+ expected to be defined in @executable_path/../Frameworks/libtqt-mt.3.dylib
+
+ +

then ensure that your library path does not have libtqui libraries or +symbolic links. If you remove these, then the build will continue. +

Macintosh Native API Access +

+

Accessing the Bundle Path +

+

The Macintosh application is actually a directory (ending with .app). This +directory has various other sub-directories and sources. In case you want +to place for example the plugin directory inside this bundle, then you need +to find out where the bundle resides on the disk. The following code will +do this: +

+        CFURLRef pluginRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+        CFStringRef macPath = CFURLCopyFileSystemPath(pluginRef, 
+                                               kCFURLPOSIXPathStyle);
+        const char *pathPtr = CFStringGetCStringPtr(macPath, 
+                                               CFStringGetSystemEncoding());
+        qDebug("Path = %s", pathPtr);
+        CFRelease(pluginRef);
+        CFRelease(macPath);
+
+ +

Do not forget to enclosure this in an #if defined(Q_OS_MACX) macro statement. +

Translating the Application Menu and native dialogs +

+

You need to do a little extra to get the Application Menu and native dialogs +localized. This is a retquirement of Mac OS X and not of TQt. +

First, you must add a localized resource folder inside the Bundle see: +

http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/index.html +

And look for the heading: Adding Localized Resources +

The main thing you need to do is create a file called locversion.plist. +Here is an example one for Norwegian: +

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
+"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+        <key>LprojCompatibleVersion</key>
+        <string>123</string>
+        <key>LprojLocale</key>
+        <string>no</string>
+        <key>LprojRevisionLevel</key>
+        <string>1</string>
+        <key>LprojVersion</key>
+        <string>123</string>
+</dict>
+</plist>
+
+ +

Then when you run the application with your preferred language set to Norwegian +you should see menu items like "Avslutt" instead of "Quit" +

User Interface +

+

Right-Mouse Clicks +

+

If you want to provide right-mouse click support for Mac OS X, use the +TQContextMenuEvent class. This will map to a context menu event, in other +words a menu that will display a popup selection. This is the most common +use of right-mouse clicks, and maps to a control-click with the Mac OS X +one-button mouse support. +

Menubar +

+

TQt/Mac will automatically detect your menubars for you and turn them +into Mac native menubars. Fitting this into your existing TQt application +will normally be automatic, however, if you have special needs the TQt/Mac +implementation currently selects a menubar by starting at the active window +(ie TQApplication::activeWindow()), and applying: +

1) If the window has a TQMenuBar then it is used. +2) If the window is a modal then its menubar is used. If no menubar is +specified then a default menubar is used (as documented below) +3) If the window has no parent then the default menubar is used (as documented below). +

The above 3 steps are applied all the way up the parent window chain until +one of the above are satisifed. If all else fails a default menubar will be +created, the default menubar on TQt/Mac is an empty menubar, however you can +create a different default menubar by creating a parentless TQMenuBar, the +first one created will thus be designated the default menubar, and will be +used whenever a default menubar is needed. +

Limitations +

+

MenuItems +

+

    +

  • TQCustomMenuItems are not supported in Mac native menubars, they are supported +in popupmenus that are not in the Mac native menubar. +

  • Items with accelerators that have more than one keystroke +(TQKeySequence) will not be honored, and the first key will be used. +

+

Unsupported Native Widgets +

+

TQt/Mac 3.x has no support for sheets or drawers. Support for these types of windows is provided in TQt/Mac 4.x. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/mail-example.html b/doc/html/mail-example.html new file mode 100644 index 00000000..2dc1971f --- /dev/null +++ b/doc/html/mail-example.html @@ -0,0 +1,243 @@ + + + + + +A simple mail client + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A simple mail client

+ + +

+

This example shows how to use the TQSocket class. The client can only be +used to send mails. The interesting part is the implementation of the +SMTP protocol. +


+

Header file (smtp.h): +

/****************************************************************************
+** $Id: qt/smtp.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef SMTP_H
+#define SMTP_H
+
+#include <qobject.h>
+#include <qstring.h>
+
+class TQSocket;
+class TQTextStream;
+class TQDns;
+
+class Smtp : public TQObject
+{
+    Q_OBJECT
+
+public:
+    Smtp( const TQString &from, const TQString &to,
+          const TQString &subject, const TQString &body );
+    ~Smtp();
+
+signals:
+    void status( const TQString & );
+
+private slots:
+    void dnsLookupHelper();
+    void readyRead();
+    void connected();
+
+private:
+    enum State {
+        Init,
+        Mail,
+        Rcpt,
+        Data,
+        Body,
+        Quit,
+        Close
+    };
+
+    TQString message;
+    TQString from;
+    TQString rcpt;
+    TQSocket *socket;
+    TQTextStream * t;
+    int state;
+    TQString response;
+    TQDns * mxLookup;
+};
+
+#endif
+
+ +


+

Implementation (smtp.cpp): +

/****************************************************************************
+** $Id: qt/smtp.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "smtp.h"
+
+#include <qtextstream.h>
+#include <qsocket.h>
+#include <qdns.h>
+#include <qtimer.h>
+#include <qapplication.h>
+#include <qmessagebox.h>
+#include <qregexp.h>
+
+
+Smtp::Smtp( const TQString &from, const TQString &to,
+            const TQString &subject,
+            const TQString &body )
+{
+    socket = new TQSocket( this );
+    connect ( socket, SIGNAL( readyRead() ),
+              this, SLOT( readyRead() ) );
+    connect ( socket, SIGNAL( connected() ),
+              this, SLOT( connected() ) );
+
+    mxLookup = new TQDns( to.mid( to.find( '@' )+1 ), TQDns::Mx );
+    connect( mxLookup, SIGNAL(resultsReady()),
+             this, SLOT(dnsLookupHelper()) );
+
+    message = TQString::fromLatin1( "From: " ) + from +
+              TQString::fromLatin1( "\nTo: " ) + to +
+              TQString::fromLatin1( "\nSubject: " ) + subject +
+              TQString::fromLatin1( "\n\n" ) + body + "\n";
+    message.replace( TQString::fromLatin1( "\n" ),
+                     TQString::fromLatin1( "\r\n" ) );
+    message.replace( TQString::fromLatin1( "\r\n.\r\n" ),
+                     TQString::fromLatin1( "\r\n..\r\n" ) );
+
+    this->from = from;
+    rcpt = to;
+
+    state = Init;
+}
+
+
+Smtp::~Smtp()
+{
+    delete t;
+    delete socket;
+}
+
+
+void Smtp::dnsLookupHelper()
+{
+    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 ) );
+
+    socket->connectToHost( s.first().name, 25 );
+    t = new TQTextStream( socket );
+}
+
+
+void Smtp::connected()
+{
+    emit status( tr( "Connected to %1" ).arg( socket->peerName() ) );
+}
+
+void Smtp::readyRead()
+{
+    // SMTP is line-oriented
+    if ( !socket->canReadLine() )
+        return;
+
+    TQString responseLine;
+    do {
+        responseLine = socket->readLine();
+        response += responseLine;
+    } while( socket->canReadLine() && responseLine[3] != ' ' );
+    responseLine.truncate( 3 );
+
+    if ( state == Init && responseLine[0] == '2' ) {
+        // banner was okay, let's go on
+        *t << "HELO there\r\n";
+        state = Mail;
+    } else if ( state == Mail && responseLine[0] == '2' ) {
+        // HELO response was okay (well, it has to be)
+        *t << "MAIL FROM: <" << from << ">\r\n";
+        state = Rcpt;
+    } else if ( state == Rcpt && responseLine[0] == '2' ) {
+        *t << "RCPT TO: <" << rcpt << ">\r\n";
+        state = Data;
+    } else if ( state == Data && responseLine[0] == '2' ) {
+        *t << "DATA\r\n";
+        state = Body;
+    } else if ( state == Body && responseLine[0] == '3' ) {
+        *t << message << ".\r\n";
+        state = Quit;
+    } else if ( state == Quit && responseLine[0] == '2' ) {
+        *t << "TQUIT\r\n";
+        // here, we just close.
+        state = Close;
+        emit status( tr( "Message sent" ) );
+    } else if ( state == Close ) {
+        deleteLater();
+        return;
+    } else {
+        // something broke.
+        TQMessageBox::warning( qApp->activeWindow(),
+                              tr( "TQt Mail Example" ),
+                              tr( "Unexpected reply from SMTP server:\n\n" ) +
+                              response );
+        state = Close;
+    }
+
+    response = "";
+}
+
+ +

See also Network Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/mainclasses.html b/doc/html/mainclasses.html new file mode 100644 index 00000000..7d60b3fb --- /dev/null +++ b/doc/html/mainclasses.html @@ -0,0 +1,281 @@ + + + + + +TQt's Main Classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt's Main Classes

+ + + +

These are the most frequently used TQt classes. +For the complete list (including XML, networking and container +classes), see TQt's Classes. +

+ + + + + + + + + + + + + + + + + + + + + +
A +TQAction + +TQFileDialog + +TQMessageBox + +TQSlider + +TQTimer +
+TQApplication + +TQFont + +TQMovie + +TQSound + +TQToolBar +
B +TQButtonGroup + +TQFontDialog +N +TQNetworkProtocol + +TQSpinBox + +TQToolBox +
C +TQCanvas +G +TQGLWidget +O +TQObject + +TQSplashScreen + +TQToolButton +
+TQCheckBox + +TQGridLayout +P +TQPainter + +TQSplitter + +TQToolTip +
+TQClipboard + +TQGroupBox + +TQPalette + +TQSql + +TQTranslator +
+TQColorDialog + +TQGuardedPtr + +TQPen + +TQSqlDatabase +U +TQUrl +
+TQComboBox +H +TQHBoxLayout + +TQPixmap + +TQSqlDriverPlugin + +TQUrlOperator +
D +TQDataBrowser +I +TQIconSet + +TQPoint + +TQSqlForm +V +TQValidator +
+TQDataTable + +TQIconView + +TQPopupMenu + +TQSqlQuery + +TQValueList +
+TQDataView + +TQImage + +TQPrinter + +TQStatusBar + +TQValueStack +
+TQDate + +TQInputDialog + +TQProcess + +TQString + +TQValueVector +
+TQDateEdit +L +TQLabel + +TQProgressBar + +TQStringList + +TQVariant +
+TQDateTime + +TQLCDNumber + +TQProgressDialog +T +TQTabDialog + +TQVBoxLayout +
+TQDateTimeEdit + +TQLibrary + +TQPushButton + +TQTable +W +TQWhatsThis +
+TQDial + +TQLineEdit +R +TQRadioButton + +TQTabWidget + +TQWidget +
+TQDialog + +TQListBox + +TQRect + +TQTextBrowser + +TQWidgetStack +
+TQDict + +TQListView + +TQRegExp + +TQTextEdit + +TQWizard +
+TQDir +M +TQMainWindow +S +TQScrollView + +TQTextStream + +TQWorkspace +
+TQDockWindow + +TQMap + +TQSettings + +TQTime +X +TQXmlSimpleReader +
F +TQFile + +TQMenuBar + +TQSimpleRichText + +TQTimeEdit + + +
+ + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/mainwindow-w.png b/doc/html/mainwindow-w.png new file mode 100644 index 00000000..c737a4cd Binary files /dev/null and b/doc/html/mainwindow-w.png differ diff --git a/doc/html/makeqpf.html b/doc/html/makeqpf.html new file mode 100644 index 00000000..cc61a5eb --- /dev/null +++ b/doc/html/makeqpf.html @@ -0,0 +1,56 @@ + + + + + +makeqpf + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

makeqpf

+ + + +

Saves TQPF font files by rendering and saving fonts. +

Usage +

+

+makeqpf [-A] [-f spec-file] [font ...]
+
+ +

    +
  • -A - Render and save all fonts in fontdir +
  • -f - File of lines: fontname character-ranges e.g. "smoothtimes 0-ff,20a0-20af" +
  • font - Font to render and save +
+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/mdi-example.html b/doc/html/mdi-example.html new file mode 100644 index 00000000..58f68c77 --- /dev/null +++ b/doc/html/mdi-example.html @@ -0,0 +1,600 @@ + + + + + +An MDI Application + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

An MDI Application

+ + +

+This example program is just like the application example, except +that it provides a Multiple Document Interface (MDI). +


+

Header file: +

/****************************************************************************
+** $Id: qt/application.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef APPLICATION_H
+#define APPLICATION_H
+
+#include <qmainwindow.h>
+#include <qptrlist.h>
+
+class TQTextEdit;
+class TQToolBar;
+class TQPopupMenu;
+class TQWorkspace;
+class TQPopupMenu;
+class TQMovie;
+
+class MDIWindow: public TQMainWindow
+{
+    Q_OBJECT
+public:
+    MDIWindow( TQWidget* parent, const char* name, int wflags );
+    ~MDIWindow();
+
+    void load( const TQString& fn );
+    void save();
+    void saveAs();
+    void print( TQPrinter* );
+
+protected:
+    void closeEvent( TQCloseEvent * );
+
+signals:
+    void message(const TQString&, int );
+
+private:
+    TQTextEdit* medit;
+    TQMovie * mmovie;
+    TQString filename;
+};
+
+
+class ApplicationWindow: public TQMainWindow
+{
+    Q_OBJECT
+public:
+    ApplicationWindow();
+    ~ApplicationWindow();
+
+protected:
+    void closeEvent( TQCloseEvent * );
+
+private slots:
+    MDIWindow* newDoc();
+    void load();
+    void save();
+    void saveAs();
+    void print();
+    void closeWindow();
+    void tileHorizontal();
+
+    void about();
+    void aboutTQt();
+
+    void windowsMenuAboutToShow();
+    void windowsMenuActivated( int id );
+
+private:
+    TQPrinter *printer;
+    TQWorkspace* ws;
+    TQToolBar *fileTools;
+    TQPopupMenu* windowsMenu;
+};
+
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/application.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "application.h"
+#include <qworkspace.h>
+#include <qimage.h>
+#include <qpixmap.h>
+#include <qtoolbar.h>
+#include <qtoolbutton.h>
+#include <qpopupmenu.h>
+#include <qmenubar.h>
+#include <qmovie.h>
+#include <qfile.h>
+#include <qfiledialog.h>
+#include <qlabel.h>
+#include <qstatusbar.h>
+#include <qmessagebox.h>
+#include <qprinter.h>
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qaccel.h>
+#include <qtextstream.h>
+#include <qtextedit.h>
+#include <qpainter.h>
+#include <qpaintdevicemetrics.h>
+#include <qwhatsthis.h>
+#include <qobjectlist.h>
+#include <qvbox.h>
+#include <qsimplerichtext.h>
+
+#include "filesave.xpm"
+#include "fileopen.xpm"
+#include "fileprint.xpm"
+
+
+const char * fileOpenText = "Click this button to open a <em>new file</em>. <br><br>"
+"You can also select the <b>Open command</b> from the File menu.";
+const char * fileSaveText = "Click this button to save the file you are "
+"editing.  You will be prompted for a file name.\n\n"
+"You can also select the Save command from the File menu.\n\n"
+"Note that implementing this function is left as an exercise for the reader.";
+const char * filePrintText = "Click this button to print the file you "
+"are editing.\n\n"
+"You can also select the Print command from the File menu.";
+
+ApplicationWindow::ApplicationWindow()
+    : TQMainWindow( 0, "example application main window", WDestructiveClose )
+{
+    int id;
+
+    TQPixmap openIcon, saveIcon;
+
+    fileTools = new TQToolBar( this, "file operations" );
+    addToolBar( fileTools, tr( "File Operations" ), DockTop, TRUE );
+
+    openIcon = TQPixmap( fileopen );
+    TQToolButton * fileOpen
+        = new TQToolButton( openIcon, "Open File", TQString::null,
+                           this, SLOT(load()), fileTools, "open file" );
+
+    saveIcon = TQPixmap( filesave );
+    TQToolButton * fileSave
+        = new TQToolButton( saveIcon, "Save File", TQString::null,
+                           this, SLOT(save()), fileTools, "save file" );
+
+#ifndef QT_NO_PRINTER
+    printer = new TQPrinter( TQPrinter::HighResolution );
+    TQPixmap printIcon;
+
+    printIcon = TQPixmap( fileprint );
+    TQToolButton * filePrint
+        = new TQToolButton( printIcon, "Print File", TQString::null,
+                           this, SLOT(print()), fileTools, "print file" );
+    TQWhatsThis::add( filePrint, filePrintText );
+#endif
+
+    (void)TQWhatsThis::whatsThisButton( fileTools );
+
+    TQWhatsThis::add( fileOpen, fileOpenText );
+    TQWhatsThis::add( fileSave, fileSaveText );
+
+    TQPopupMenu * file = new TQPopupMenu( this );
+    menuBar()->insertItem( "&File", file );
+
+    file->insertItem( "&New", this, SLOT(newDoc()), CTRL+Key_N );
+
+    id = file->insertItem( openIcon, "&Open...",
+                           this, SLOT(load()), CTRL+Key_O );
+    file->setWhatsThis( id, fileOpenText );
+
+    id = file->insertItem( saveIcon, "&Save",
+                           this, SLOT(save()), CTRL+Key_S );
+    file->setWhatsThis( id, fileSaveText );
+    id = file->insertItem( "Save &As...", this, SLOT(saveAs()) );
+    file->setWhatsThis( id, fileSaveText );
+#ifndef QT_NO_PRINTER
+    file->insertSeparator();
+    id = file->insertItem( printIcon, "&Print...",
+                           this, SLOT(print()), CTRL+Key_P );
+    file->setWhatsThis( id, filePrintText );
+#endif
+    file->insertSeparator();
+    file->insertItem( "&Close", this, SLOT(closeWindow()), CTRL+Key_W );
+    file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
+
+    windowsMenu = new TQPopupMenu( this );
+    windowsMenu->setCheckable( TRUE );
+    connect( windowsMenu, SIGNAL( aboutToShow() ),
+             this, SLOT( windowsMenuAboutToShow() ) );
+    menuBar()->insertItem( "&Windows", windowsMenu );
+
+    menuBar()->insertSeparator();
+    TQPopupMenu * help = new TQPopupMenu( this );
+    menuBar()->insertItem( "&Help", help );
+
+    help->insertItem( "&About", this, SLOT(about()), Key_F1);
+    help->insertItem( "About &TQt", this, SLOT(aboutTQt()));
+    help->insertSeparator();
+    help->insertItem( "What's &This", this, SLOT(whatsThis()), SHIFT+Key_F1);
+
+    TQVBox* vb = new TQVBox( this );
+    vb->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
+    ws = new TQWorkspace( vb );
+    ws->setScrollBarsEnabled( TRUE );
+    setCentralWidget( vb );
+
+    statusBar()->message( "Ready", 2000 );
+}
+
+
+ApplicationWindow::~ApplicationWindow()
+{
+#ifndef QT_NO_PRINTER
+    delete printer;
+#endif
+}
+
+
+
+MDIWindow* ApplicationWindow::newDoc()
+{
+    MDIWindow* w = new MDIWindow( ws, 0, WDestructiveClose );
+    connect( w, SIGNAL( message(const TQString&, int) ), statusBar(), SLOT( message(const TQString&, int )) );
+    w->setCaption("unnamed document");
+    w->setIcon( TQPixmap("document.xpm") );
+    // show the very first window in maximized mode
+    if ( ws->windowList().isEmpty() )
+        w->showMaximized();
+    else
+        w->show();
+    return w;
+}
+
+void ApplicationWindow::load()
+{
+    TQString fn = TQFileDialog::getOpenFileName( TQString::null, TQString::null, this );
+    if ( !fn.isEmpty() ) {
+        MDIWindow* w = newDoc();
+        w->load( fn );
+    }  else {
+        statusBar()->message( "Loading aborted", 2000 );
+    }
+}
+
+void ApplicationWindow::save()
+{
+    MDIWindow* m = (MDIWindow*)ws->activeWindow();
+    if ( m )
+        m->save();
+}
+
+
+void ApplicationWindow::saveAs()
+{
+    MDIWindow* m = (MDIWindow*)ws->activeWindow();
+    if ( m )
+        m->saveAs();
+}
+
+
+void ApplicationWindow::print()
+{
+#ifndef QT_NO_PRINTER
+    MDIWindow* m = (MDIWindow*)ws->activeWindow();
+    if ( m )
+        m->print( printer );
+#endif
+}
+
+
+void ApplicationWindow::closeWindow()
+{
+    MDIWindow* m = (MDIWindow*)ws->activeWindow();
+    if ( m )
+        m->close();
+}
+
+void ApplicationWindow::about()
+{
+    TQMessageBox::about( this, "TQt Application Example",
+                        "This example demonstrates simple use of\n "
+                        "TQt's Multiple Document Interface (MDI).");
+}
+
+
+void ApplicationWindow::aboutTQt()
+{
+    TQMessageBox::aboutTQt( this, "TQt Application Example" );
+}
+
+
+void ApplicationWindow::windowsMenuAboutToShow()
+{
+    windowsMenu->clear();
+    int cascadeId = windowsMenu->insertItem("&Cascade", ws, SLOT(cascade() ) );
+    int tileId = windowsMenu->insertItem("&Tile", ws, SLOT(tile() ) );
+    int horTileId = windowsMenu->insertItem("Tile &Horizontally", this, SLOT(tileHorizontal() ) );
+    if ( ws->windowList().isEmpty() ) {
+        windowsMenu->setItemEnabled( cascadeId, FALSE );
+        windowsMenu->setItemEnabled( tileId, FALSE );
+        windowsMenu->setItemEnabled( horTileId, FALSE );
+    }
+    windowsMenu->insertSeparator();
+    TQWidgetList windows = ws->windowList();
+    for ( int i = 0; i < int(windows.count()); ++i ) {
+        int id = windowsMenu->insertItem(windows.at(i)->caption(),
+                                         this, SLOT( windowsMenuActivated( int ) ) );
+        windowsMenu->setItemParameter( id, i );
+        windowsMenu->setItemChecked( id, ws->activeWindow() == windows.at(i) );
+    }
+}
+
+void ApplicationWindow::windowsMenuActivated( int id )
+{
+    TQWidget* w = ws->windowList().at( id );
+    if ( w )
+        w->showNormal();
+    w->setFocus();
+}
+
+void ApplicationWindow::tileHorizontal()
+{
+    // primitive horizontal tiling
+    TQWidgetList windows = ws->windowList();
+    if ( !windows.count() )
+        return;
+
+    if (ws->activeWindow())
+        ws->activeWindow()->showNormal();
+
+    int heightForEach = ws->height() / windows.count();
+    int y = 0;
+    for ( int i = 0; i < int(windows.count()); ++i ) {
+        TQWidget *window = windows.at(i);
+        int preferredHeight = window->minimumHeight()+window->parentWidget()->baseSize().height();
+        int actHeight = TQMAX(heightForEach, preferredHeight);
+
+        window->parentWidget()->setGeometry( 0, y, ws->width(), actHeight );
+        y += actHeight;
+    }
+}
+
+void ApplicationWindow::closeEvent( TQCloseEvent *e )
+{
+    TQWidgetList windows = ws->windowList();
+    if ( windows.count() ) {
+        for ( int i = 0; i < int(windows.count()); ++i ) {
+            TQWidget *window = windows.at( i );
+            if ( !window->close() ) {
+                e->ignore();
+                return;
+            }
+        }
+    }
+
+    TQMainWindow::closeEvent( e );
+}
+
+MDIWindow::MDIWindow( TQWidget* parent, const char* name, int wflags )
+    : TQMainWindow( parent, name, wflags )
+{
+    mmovie = 0;
+    medit = new TQTextEdit( this );
+    setFocusProxy( medit );
+    setCentralWidget( medit );
+}
+
+MDIWindow::~MDIWindow()
+{
+    delete mmovie;
+}
+
+void MDIWindow::closeEvent( TQCloseEvent *e )
+{
+    if ( medit->isModified() ) {
+        switch( TQMessageBox::warning( this, "Save Changes",
+            tr("Save changes to %1?").arg( caption() ),
+            tr("Yes"), tr("No"), tr("Cancel") ) ) {
+        case 0:
+            {
+                save();
+                if ( !filename.isEmpty() )
+                    e->accept();
+                else
+                    e->ignore();
+            }
+            break;
+        case 1:
+            e->accept();
+            break;
+        default:
+            e->ignore();
+            break;
+        }
+    } else {
+        e->accept();
+    }
+}
+
+void MDIWindow::load( const TQString& fn )
+{
+    filename  = fn;
+    TQFile f( filename );
+    if ( !f.open( IO_ReadOnly ) )
+        return;
+
+    if(fn.contains(".gif")) {
+        TQWidget * tmp=new TQWidget(this);
+        setFocusProxy(tmp);
+        setCentralWidget(tmp);
+        medit->hide();
+        delete medit;
+        TQMovie * qm=new TQMovie(fn);
+#ifdef Q_WS_QWS // temporary speed-test hack
+        qm->setDisplayWidget(tmp);
+#endif
+        tmp->setBackgroundMode(TQWidget::NoBackground);
+        tmp->show();
+        mmovie=qm;
+    } else {
+        mmovie = 0;
+
+        TQTextStream t(&f);
+        TQString s = t.read();
+        medit->setText( s );
+        f.close();
+
+
+    }
+    setCaption( filename );
+    emit message( TQString("Loaded document %1").arg(filename), 2000 );
+}
+
+void MDIWindow::save()
+{
+    if ( filename.isEmpty() ) {
+        saveAs();
+        return;
+    }
+
+    TQString text = medit->text();
+    TQFile f( filename );
+    if ( !f.open( IO_WriteOnly ) ) {
+        emit message( TQString("Could not write to %1").arg(filename),
+                      2000 );
+        return;
+    }
+
+    TQTextStream t( &f );
+    t << text;
+    f.close();
+
+    setCaption( filename );
+
+    emit message( TQString( "File %1 saved" ).arg( filename ), 2000 );
+}
+
+void MDIWindow::saveAs()
+{
+    TQString fn = TQFileDialog::getSaveFileName( filename, TQString::null, this );
+    if ( !fn.isEmpty() ) {
+        filename = fn;
+        save();
+    } else {
+        emit message( "Saving aborted", 2000 );
+    }
+}
+
+void MDIWindow::print( TQPrinter* printer)
+{
+#ifndef QT_NO_PRINTER
+    int pageNo = 1;
+
+    if ( printer->setup(this) ) {               // printer dialog
+        printer->setFullPage( TRUE );
+        emit message( "Printing...", 0 );
+        TQPainter p;
+        if ( !p.begin( printer ) )
+            return;                             // paint on printer
+        TQPaintDeviceMetrics metrics( p.device() );
+        int dpiy = metrics.logicalDpiY();
+        int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins
+        TQRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin );
+        TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(medit->text()),
+                                  TQFont(),
+                                  medit->context(),
+                                  medit->styleSheet(),
+                                  medit->mimeSourceFactory(),
+                                  view.height() );
+        richText.setWidth( &p, view.width() );
+        int page = 1;
+        do {
+            richText.draw( &p, margin, margin, view, colorGroup() );
+            view.moveBy( 0, view.height() );
+            p.translate( 0 , -view.height() );
+            p.drawText( view.right() - p.fontMetrics().width( TQString::number( page ) ),
+                        view.bottom() + p.fontMetrics().ascent() + 5, TQString::number( page ) );
+            if ( view.top() - margin >= richText.height() )
+                break;
+            TQString msg( "Printing (page " );
+            msg += TQString::number( ++pageNo );
+            msg += ")...";
+            emit message( msg, 0 );
+            printer->newPage();
+            page++;
+        } while (TRUE);
+    }
+#endif
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include "application.h"
+
+int main( int argc, char ** argv ) {
+    TQApplication a( argc, argv );
+    ApplicationWindow * mw = new ApplicationWindow();
+    a.setMainWidget(mw);
+    mw->setCaption( "TQt Example - Multiple Documents Interface (MDI)" );
+    mw->show();
+    a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(tquit()) );
+    int res = a.exec();
+    return res;
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/menu-example.html b/doc/html/menu-example.html new file mode 100644 index 00000000..246e72ff --- /dev/null +++ b/doc/html/menu-example.html @@ -0,0 +1,472 @@ + + + + + +Using menus + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Using menus

+ + +

+This example demonstrates a menu bar with pull-down menus, +sub-menus and custom menu items. It also demonstrates a pop-up +context menu. +


+

Header file: +

/****************************************************************************
+** $Id: qt/menu.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef MENU_H
+#define MENU_H
+
+#include <qwidget.h>
+#include <qmenubar.h>
+#include <qlabel.h>
+
+
+class MenuExample : public TQWidget
+{
+    Q_OBJECT
+public:
+    MenuExample( TQWidget *parent=0, const char *name=0 );
+
+public slots:
+    void open();
+    void news();
+    void save();
+    void closeDoc();
+    void undo();
+    void redo();
+    void normal();
+    void bold();
+    void underline();
+    void about();
+    void aboutTQt();
+    void printer();
+    void file();
+    void fax();
+    void printerSetup();
+
+protected:
+    void    resizeEvent( TQResizeEvent * );
+
+signals:
+    void    explain( const TQString& );
+
+private:
+    void contextMenuEvent ( TQContextMenuEvent * );
+
+
+    TQMenuBar *menu;
+    TQLabel   *label;
+    bool isBold;
+    bool isUnderline;
+    int boldID, underlineID;
+};
+
+
+#endif // MENU_H
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/menu.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "menu.h"
+#include <qcursor.h>
+#include <qpopupmenu.h>
+#include <qapplication.h>
+#include <qmessagebox.h>
+#include <qpixmap.h>
+#include <qpainter.h>
+
+/* XPM */
+static const char * p1_xpm[] = {
+"16 16 3 1",
+"       c None",
+".      c #000000000000",
+"X      c #FFFFFFFF0000",
+"                ",
+"                ",
+"         ....   ",
+"        .XXXX.  ",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .............. ",
+"                "};
+
+/* XPM */
+static const char * p2_xpm[] = {
+"16 16 3 1",
+"       c None",
+".      c #000000000000",
+"X      c #FFFFFFFFFFFF",
+"                ",
+"   ......       ",
+"   .XXX.X.      ",
+"   .XXX.XX.     ",
+"   .XXX.XXX.    ",
+"   .XXX.....    ",
+"   .XXXXXXX.    ",
+"   .XXXXXXX.    ",
+"   .XXXXXXX.    ",
+"   .XXXXXXX.    ",
+"   .XXXXXXX.    ",
+"   .XXXXXXX.    ",
+"   .XXXXXXX.    ",
+"   .........    ",
+"                ",
+"                "};
+
+/* XPM */
+static const char * p3_xpm[] = {
+"16 16 3 1",
+"       c None",
+".      c #000000000000",
+"X      c #FFFFFFFFFFFF",
+"                ",
+"                ",
+"   .........    ",
+"  ...........   ",
+"  ........ ..   ",
+"  ...........   ",
+"  ...........   ",
+"  ...........   ",
+"  ...........   ",
+"  ...XXXXX...   ",
+"  ...XXXXX...   ",
+"  ...XXXXX...   ",
+"  ...XXXXX...   ",
+"   .........    ",
+"                ",
+"                "};
+
+
+/*
+  Auxiliary class to provide fancy menu items with different
+  fonts. Used for the "bold" and "underline" menu items in the options
+  menu.
+ */
+class MyMenuItem : public TQCustomMenuItem
+{
+public:
+    MyMenuItem( const TQString& s, const TQFont& f )
+        : string( s ), font( f ){};
+    ~MyMenuItem(){}
+
+    void paint( TQPainter* p, const TQColorGroup& /*cg*/, bool /*act*/, bool /*enabled*/, int x, int y, int w, int h )
+    {
+        p->setFont ( font );
+        p->drawText( x, y, w, h, AlignLeft | AlignVCenter | DontClip | ShowPrefix, string );
+    }
+
+    TQSize sizeHint()
+    {
+        return TQFontMetrics( font ).size( AlignLeft | AlignVCenter | ShowPrefix | DontClip,  string );
+    }
+private:
+    TQString string;
+    TQFont font;
+};
+
+
+MenuExample::MenuExample( TQWidget *parent, const char *name )
+    : TQWidget( parent, name )
+{
+    TQPixmap p1( p1_xpm );
+    TQPixmap p2( p2_xpm );
+    TQPixmap p3( p3_xpm );
+    TQPopupMenu *print = new TQPopupMenu( this );
+    Q_CHECK_PTR( print );
+    print->insertTearOffHandle();
+    print->insertItem( "&Print to printer", this, SLOT(printer()) );
+    print->insertItem( "Print to &file", this, SLOT(file()) );
+    print->insertItem( "Print to fa&x", this, SLOT(fax()) );
+    print->insertSeparator();
+    print->insertItem( "Printer &Setup", this, SLOT(printerSetup()) );
+
+    TQPopupMenu *file = new TQPopupMenu( this );
+    Q_CHECK_PTR( file );
+    file->insertItem( p1, "&Open",  this, SLOT(open()), CTRL+Key_O );
+    file->insertItem( p2, "&New", this, SLOT(news()), CTRL+Key_N );
+    file->insertItem( p3, "&Save", this, SLOT(save()), CTRL+Key_S );
+    file->insertItem( "&Close", this, SLOT(closeDoc()), CTRL+Key_W );
+    file->insertSeparator();
+    file->insertItem( "&Print", print, CTRL+Key_P );
+    file->insertSeparator();
+    file->insertItem( "E&xit",  qApp, SLOT(tquit()), CTRL+Key_Q );
+
+    TQPopupMenu *edit = new TQPopupMenu( this );
+    Q_CHECK_PTR( edit );
+    int undoID = edit->insertItem( "&Undo", this, SLOT(undo()) );
+    int redoID = edit->insertItem( "&Redo", this, SLOT(redo()) );
+    edit->setItemEnabled( undoID, FALSE );
+    edit->setItemEnabled( redoID, FALSE );
+
+    TQPopupMenu* options = new TQPopupMenu( this );
+    Q_CHECK_PTR( options );
+    options->insertTearOffHandle();
+    options->setCaption("Options");
+    options->insertItem( "&Normal Font", this, SLOT(normal()) );
+    options->insertSeparator();
+
+    options->polish(); // adjust system settings
+    TQFont f = options->font();
+    f.setBold( TRUE );
+    boldID = options->insertItem( new MyMenuItem( "Bold", f ) );
+    options->setAccel( CTRL+Key_B, boldID );
+    options->connectItem( boldID, this, SLOT(bold()) );
+    f = font();
+    f.setUnderline( TRUE );
+    underlineID = options->insertItem( new MyMenuItem( "Underline", f ) );
+    options->setAccel( CTRL+Key_U, underlineID );
+    options->connectItem( underlineID, this, SLOT(underline()) );
+
+    isBold = FALSE;
+    isUnderline = FALSE;
+    options->setCheckable( TRUE );
+
+
+    TQPopupMenu *help = new TQPopupMenu( this );
+    Q_CHECK_PTR( help );
+    help->insertItem( "&About", this, SLOT(about()), CTRL+Key_H );
+    help->insertItem( "About &TQt", this, SLOT(aboutTQt()) );
+
+    // If we used a TQMainWindow we could use its built-in menuBar().
+    menu = new TQMenuBar( this );
+    Q_CHECK_PTR( menu );
+    menu->insertItem( "&File", file );
+    menu->insertItem( "&Edit", edit );
+    menu->insertItem( "&Options", options );
+    menu->insertSeparator();
+    menu->insertItem( "&Help", help );
+    menu->setSeparator( TQMenuBar::InWindowsStyle );
+
+
+    TQLabel *msg = new TQLabel( this );
+    Q_CHECK_PTR( msg );
+    msg->setText( "A context menu is available.\n"
+                  "Invoke it by right-clicking or by"
+                  " pressing the 'context' button." );
+    msg->setGeometry( 0, height() - 60, width(), 60 );
+    msg->setAlignment( AlignCenter );
+
+    label = new TQLabel( this );
+    Q_CHECK_PTR( label );
+    label->setGeometry( 20, rect().center().y()-20, width()-40, 40 );
+    label->setFrameStyle( TQFrame::Box | TQFrame::Raised );
+    label->setLineWidth( 1 );
+    label->setAlignment( AlignCenter );
+
+    connect( this,  SIGNAL(explain(const TQString&)),
+             label, SLOT(setText(const TQString&)) );
+
+    setMinimumSize( 100, 80 );
+    setFocusPolicy( TQWidget::ClickFocus );
+}
+
+
+void MenuExample::contextMenuEvent( TQContextMenuEvent * )
+{
+    TQPopupMenu* contextMenu = new TQPopupMenu( this );
+    Q_CHECK_PTR( contextMenu );
+    TQLabel *caption = new TQLabel( "<font color=darkblue><u><b>"
+        "Context Menu</b></u></font>", this );
+    caption->setAlignment( TQt::AlignCenter );
+    contextMenu->insertItem( caption );
+    contextMenu->insertItem( "&New",  this, SLOT(news()), CTRL+Key_N );
+    contextMenu->insertItem( "&Open...", this, SLOT(open()), CTRL+Key_O );
+    contextMenu->insertItem( "&Save", this, SLOT(save()), CTRL+Key_S );
+    TQPopupMenu *submenu = new TQPopupMenu( this );
+    Q_CHECK_PTR( submenu );
+    submenu->insertItem( "&Print to printer", this, SLOT(printer()) );
+    submenu->insertItem( "Print to &file", this, SLOT(file()) );
+    submenu->insertItem( "Print to fa&x", this, SLOT(fax()) );
+    contextMenu->insertItem( "&Print", submenu );
+    contextMenu->exec( TQCursor::pos() );
+    delete contextMenu;
+}
+
+
+void MenuExample::open()
+{
+    emit explain( "File/Open selected" );
+}
+
+
+void MenuExample::news()
+{
+    emit explain( "File/New selected" );
+}
+
+void MenuExample::save()
+{
+    emit explain( "File/Save selected" );
+}
+
+
+void MenuExample::closeDoc()
+{
+    emit explain( "File/Close selected" );
+}
+
+
+void MenuExample::undo()
+{
+    emit explain( "Edit/Undo selected" );
+}
+
+
+void MenuExample::redo()
+{
+    emit explain( "Edit/Redo selected" );
+}
+
+
+void MenuExample::normal()
+{
+    isBold = FALSE;
+    isUnderline = FALSE;
+    TQFont font;
+    label->setFont( font );
+    menu->setItemChecked( boldID, isBold );
+    menu->setItemChecked( underlineID, isUnderline );
+    emit explain( "Options/Normal selected" );
+}
+
+
+void MenuExample::bold()
+{
+    isBold = !isBold;
+    TQFont font;
+    font.setBold( isBold );
+    font.setUnderline( isUnderline );
+    label->setFont( font );
+    menu->setItemChecked( boldID, isBold );
+    emit explain( "Options/Bold selected" );
+}
+
+
+void MenuExample::underline()
+{
+    isUnderline = !isUnderline;
+    TQFont font;
+    font.setBold( isBold );
+    font.setUnderline( isUnderline );
+    label->setFont( font );
+    menu->setItemChecked( underlineID, isUnderline );
+    emit explain( "Options/Underline selected" );
+}
+
+
+void MenuExample::about()
+{
+    TQMessageBox::about( this, "TQt Menu Example",
+                        "This example demonstrates simple use of TQt menus.\n"
+                        "You can cut and paste lines from it to your own\n"
+                        "programs." );
+}
+
+
+void MenuExample::aboutTQt()
+{
+    TQMessageBox::aboutTQt( this, "TQt Menu Example" );
+}
+
+
+void MenuExample::printer()
+{
+    emit explain( "File/Printer/Print selected" );
+}
+
+void MenuExample::file()
+{
+    emit explain( "File/Printer/Print To File selected" );
+}
+
+void MenuExample::fax()
+{
+    emit explain( "File/Printer/Print To Fax selected" );
+}
+
+void MenuExample::printerSetup()
+{
+    emit explain( "File/Printer/Printer Setup selected" );
+}
+
+
+void MenuExample::resizeEvent( TQResizeEvent * )
+{
+    label->setGeometry( 20, rect().center().y()-20, width()-40, 40 );
+}
+
+
+int main( int argc, char ** argv )
+{
+    TQApplication a( argc, argv );
+    MenuExample m;
+    m.setCaption("TQt Examples - Menus");
+    a.setMainWidget( &m );
+    m.show();
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/menubar.png b/doc/html/menubar.png new file mode 100644 index 00000000..7ba43c60 Binary files /dev/null and b/doc/html/menubar.png differ diff --git a/doc/html/metaobjects.html b/doc/html/metaobjects.html new file mode 100644 index 00000000..4b0e832d --- /dev/null +++ b/doc/html/metaobjects.html @@ -0,0 +1,93 @@ + + + + + +Meta Object System + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Meta Object System

+ + + +

+

TQt's Meta Object System provides the signals and slots mechanism for +inter-object communication, runtime type information, and the dynamic +property system. +

The Meta Object System is based on three things: +

    +
  1. the TQObject class; +
  2. the Q_OBJECT macro inside the private section of the class +declaration; +
  3. the Meta Object Compiler (moc). +
+

The moc reads a C++ source file. If it finds one or more class +declarations that contain the Q_OBJECT macro, it produces another C++ +source file which contains the meta object code for the classes that +contain the Q_OBJECT macro. This generated source file is either +#included into the class's source file or compiled and linked with the +class's implementation. +

In addition to providing the signals and +slots mechanism for communication between objects (the main +reason for introducing the system), the meta object code provides +additional features in TQObject: +

    +

  • the className() function that +returns the class name as a string at runtime, without retquiring +native runtime type information (RTTI) support through the C++ +compiler. +

  • the inherits() function that +returns whether an object is an instance of a class that inherits a +specified class within the TQObject inheritance tree. +

  • the tr() and +trUtf8() functions for string +translation as used for internationalization. +

  • the setProperty() and property() functions for dynamically +setting and getting object properties by +name. +

  • the metaObject() function that +returns the associated meta object for the +class. +

+

While it is possible to use TQObject as a base class without the +Q_OBJECT macro and without meta object code, neither signals and slots +nor the other features described here will be available if the +Q_OBJECT macro is not used. From the meta object system's point of +view, a TQObject subclass without meta code is equivalent to its +closest ancestor with meta object code. This means for example, that +className() will not return the actual name of your class, but the +class name of this ancestor. We strongly recommend that all +subclasses of TQObject use the Q_OBJECT macro regardless of whether +they actually use signals, slots and properties or not. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/misc.html b/doc/html/misc.html new file mode 100644 index 00000000..7e07bac7 --- /dev/null +++ b/doc/html/misc.html @@ -0,0 +1,75 @@ + + + + + +Miscellaneous Classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Miscellaneous Classes

+ + +

These classes are useful classes not fitting into any other category. +

+

+
TQAccelHandles keyboard accelerator and shortcut keys +
TQAccessibleEnums and static functions relating to accessibility +
TQAccessibleInterfaceDefines an interface that exposes information about accessible objects +
TQAccessibleObjectImplements parts of the TQAccessibleInterface for TQObjects +
TQCustomMenuItemAbstract base class for custom menu items in popup menus +
TQDoubleValidatorRange checking of floating-point numbers +
TQErrorMessageError message display dialog +
TQFileIconProviderIcons for TQFileDialog to use +
TQFilePreviewFile previewing in TQFileDialog +
TQFocusDataMaintains the list of widgets in the focus chain +
TQIntValidatorValidator which ensures that a string contains a valid integer within a specified range +
TQKeySequenceEncapsulates a key sequence as used by accelerators +
TQMacMimeMaps open-standard MIME to Mac flavors +
TQMenuDataBase class for TQMenuBar and TQPopupMenu +
TQMimeSourceAbstraction of objects which provide formatted data of a certain MIME type +
TQProcessUsed to start external programs and to communicate with them +
TQRangeControlInteger value within a range +
TQRegExpPattern matching using regular expressions +
TQRegExpValidatorUsed to check a string against a regular expression +
TQSettingsPersistent platform-independent application settings +
TQSignalCan be used to send signals for classes that don't inherit TQObject +
TQSplashScreenSplash screen that can be shown during application startup +
TQtNamespace for miscellaneous identifiers that need to be global-like +
TQUrlURL parser and simplifies working with URLs +
TQUrlInfoStores information about URLs +
TQUrlOperatorCommon operations on URLs +
TQValidatorValidation of input text +
TQVariantActs like a union for the most common TQt data types +
TQWindowsMimeMaps open-standard MIME to Window Clipboard formats +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/moc.html b/doc/html/moc.html new file mode 100644 index 00000000..322c570e --- /dev/null +++ b/doc/html/moc.html @@ -0,0 +1,452 @@ + + + + + +Using the Meta Object Compiler + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Using the Meta Object Compiler

+ + + +

+

The Meta Object Compiler, moc among friends, is the program which +handles TQt's C++ extensions. +

The moc reads a C++ source file. If it finds one or more class +declarations that contain the Q_OBJECT macro, it produces another +C++ source file which contains the meta object code for the classes +that use the Q_OBJECT macro. Among other things, meta object code is +retquired for the signal/slot mechanism, runtime type information and +the dynamic property system. +

The C++ source file generated by the moc must be compiled and linked +with the implementation of the class (or it can be #included into the +class's source file). +

If you use qmake to create your +Makefiles, build rules will be included that call the moc when +retquired, so you will not need to use the moc directly. For more +background information on moc, see Why doesn't TQt +use templates for signals and slots?. +

Usage +

+

The moc is typically used with an input file containing class declarations +like this: +

+    class MyClass : public TQObject
+    {
+        Q_OBJECT
+    public:
+        MyClass( TQObject * parent=0, const char * name=0 );
+        ~MyClass();
+
+    signals:
+        void mySignal();
+
+    public slots:
+        void mySlot();
+
+    };
+
+ +

In addition to the signals and slots shown above, the moc also +implements object properties as in the next example. The Q_PROPERTY +macro declares an object property, while Q_ENUMS declares a list of +enumeration types within the class to be usable inside the +property system. In this particular +case we declare a property of the enumeration type Priority that is +also called "priority" and has a get function priority() and a set +function setPriority(). +

+    class MyClass : public TQObject
+    {
+        Q_OBJECT
+        Q_PROPERTY( Priority priority READ priority WRITE setPriority )
+        Q_ENUMS( Priority )
+    public:
+        MyClass( TQObject * parent=0, const char * name=0 );
+        ~MyClass();
+
+        enum Priority { High, Low, VeryHigh, VeryLow };
+        void setPriority( Priority );
+        Priority priority() const;
+    };
+
+ +

Properties can be modified in subclasses with the Q_OVERRIDE +macro. The Q_SETS macro declares enums that are to be used as +sets, i.e. OR'ed together. Another macro, Q_CLASSINFO, can be used to +attach additional name/value-pairs to the class' meta object: +

+    class MyClass : public TQObject
+    {
+        Q_OBJECT
+        Q_CLASSINFO( "Author", "Oscar Peterson")
+        Q_CLASSINFO( "Status", "Active")
+    public:
+        MyClass( TQObject * parent=0, const char * name=0 );
+        ~MyClass();
+    };
+
+ +

The three concepts, signals and slots, properties and class +meta-data, can be combined. +

The output produced by the moc must be compiled and linked, just like +the other C++ code in your program; otherwise the build will fail in +the final link phase. By convention, this is done in one of the +following two ways: +

+

Method A: The class declaration is found in a header +(.h) file +

If the class declaration above is found in the file +myclass.h, the moc output should be put in a file called +moc_myclass.cpp. This file should then be compiled as +usual, resulting in an object file moc_myclass.o (on Unix) +or moc_myclass.obj (on Windows). This object should then be +included in the list of object files that are linked together in the +final building phase of the program. +

Method B: The class declaration is found in an implementation +(.cpp) file +

If the class declaration above is found in the file +myclass.cpp, the moc output should be put in a file called +myclass.moc. This file should be #included in the +implementation file, i.e. myclass.cpp should contain the +line +
+    #include "myclass.moc"
+
+ +at the end. This will cause the moc-generated code to be compiled and +linked together with the normal class definition in myclass.cpp, so +it is not necessary to compile and link it separately, as in Method A. +

+

Method A is the normal method. Method B can be used in cases where you +want the implementation file to be self-contained, or in cases where +the Q_OBJECT class is implementation-internal and thus should not be +visible in the header file. +

Automating moc Usage with Makefiles +

+

For anything but the simplest test programs, it is recommended that +you automate running the moc. By adding some rules to your program's +Makefile, make can take care of running moc when necessary and +handling the moc output. +

We recommend using Trolltech's free makefile generation tool, qmake, for building your Makefiles. This tool +recognizes both Method A and B style source files, and generates a +Makefile that does all the necessary moc handling. +

If you want to create your Makefiles yourself, here are some tips on +how to include moc handling. +

For Q_OBJECT class declarations in header files, here is a useful +makefile rule if you only use GNU make: +

+    moc_%.cpp: %.h
+            moc $< -o $@
+
+ +

If you want to write portably, you can use individual rules with the +following form: +

+    moc_NAME.cpp: NAME.h
+            moc $< -o $@
+
+ +

You must also remember to add moc_NAME.cpp to your SOURCES +(substitute your favorite name) variable and moc_NAME.o or +moc_NAME.obj to your OBJECTS variable. +

(While we prefer to name our C++ source files .cpp, the moc doesn't +care, so you can use .C, .cc, .CC, .cxx or even .c++ if you +prefer.) +

For Q_OBJECT class declarations in implementation (.cpp) files, we +suggest a makefile rule like this: +

+    NAME.o: NAME.moc
+
+    NAME.moc: NAME.cpp
+            moc -i $< -o $@
+
+ +

This guarantees that make will run the moc before it compiles +NAME.cpp. You can then put +

+    #include "NAME.moc"
+
+ +

at the end of NAME.cpp, where all the classes declared in +that file are fully known. +

Invoking moc +

+

Here are the command-line options supported by the moc: +

+ + + + + + + +
Option Meaning +
-o file +Write output to file rather than to stdout. +
-f +Force the generation of an #include statement in the +output. This is the default for files whose name matches the regular expression \.[hH][^.]* (i.e. the extension starts with H or h). This +option is only useful if you have header files that do not follow the +standard naming conventions. +
-i +Do not generate an #include statement in the output. +This may be used to run the moc on on a C++ file containing one or +more class declarations. You should then #include the meta object +code in the .cpp +file. If both -i and -f are present, the last one wins. +
-nw +Do not generate any warnings. Not recommended. +
-ldbg +Write a flood of lex debug information to stdout. +
-p path +Makes the moc prepend path/ to +the file name in the generated #include statement (if one is +generated). +
-q path +Makes the moc prepend path/ to +the file name of qt #include files in the generated code. +
+

You can explicitly tell the moc not to parse parts of a header +file. It recognizes any C++ comment (//) that contains the substrings +MOC_SKIP_BEGIN or MOC_SKIP_END. They work as you would expect and you +can have several levels of them. The net result as seen by the moc is +as if you had removed all lines between a MOC_SKIP_BEGIN and a +MOC_SKIP_END. +

Diagnostics +

+

The moc will warn you about a number of dangerous or illegal +constructs in the Q_OBJECT class declarations. +

If you get linkage errors in the final building phase of your +program, saying that YourClass::className() is undefined or that +YourClass lacks a vtbl, something has been done wrong. Most often, +you have forgotten to compile or #include the moc-generated C++ code, or +(in the former case) include that object file in the link command. +

Limitations +

+

The moc does not expand #include or #define, it simply skips any +preprocessor directives it encounters. This is regrettable, but is +not usually a problem in practice. +

The moc does not handle all of C++. The main problem is that class +templates cannot have signals or slots. Here is an example: +

+    class SomeTemplate<int> : public TQFrame {
+        Q_OBJECT
+        ...
+    signals:
+        void bugInMocDetected( int );
+    };
+
+ +

Less importantly, the following constructs are illegal. All of them +have alternatives which we think are usually better, so removing these +limitations is not a high priority for us. +

Multiple inheritance retquires TQObject to be first +

+

If you are using multiple inheritance, moc assumes that the first +inherited class is a subclass of TQObject. Also, be sure that only +the first inherited class is a TQObject. +

+    class SomeClass : public TQObject, public OtherClass {
+        ...
+    };
+
+ +

(This limitation is almost impossible to remove; since the moc does not expand +#include or #define, it cannot find out which one of the base classes +is a TQObject.) +

Function pointers cannot be arguments to signals or slots +

+

In most cases where you would consider using function pointers as +signal/slot arguments, we think inheritance is a better alternative. +Here is an example of illegal syntax: +

+    class SomeClass : public TQObject {
+        Q_OBJECT
+        ...
+    public slots:
+        // illegal
+        void apply( void (*apply)(List *, void *), char * );
+    };
+
+ +

You can work around this restriction like this: +

+    typedef void (*ApplyFunctionType)( List *, void * );
+
+    class SomeClass : public TQObject {
+        Q_OBJECT
+        ...
+    public slots:
+        void apply( ApplyFunctionType, char * );
+    };
+
+ +

It may sometimes be even better to replace the function pointer with +inheritance and virtual functions, signals or slots. +

Friend declarations cannot be placed in signals or slots sections +

+

Sometimes it will work, but in general, friend declarations cannot be +placed in signals or slots sections. Put them in the private, +protected or public sections instead. Here is an example of the +illegal syntax: +

+    class SomeClass : public TQObject {
+        Q_OBJECT
+        ...
+    signals:
+        friend class ClassTemplate<char>; // WRONG
+    };
+
+ +

Signals and slots cannot be upgraded +

+

The C++ feature of upgrading an inherited member function to +public status is not extended to cover signals and slots. Here is an +illegal example: +

+    class Whatever : public TQButtonGroup {
+        ...
+    public slots:
+        TQButtonGroup::buttonPressed; // WRONG
+        ...
+    };
+
+ +

The TQButtonGroup::buttonPressed() slot is protected. +

C++ tquiz: What happens if you try to upgrade a protected member +function which is overloaded? +

    +
  1. All the functions are overloaded. +
  2. That is not legal C++. +
+

+

Type macros cannot be used for signal and slot parameters +

+

Since the moc does not expand #define, type macros that take an argument +will not work in signals and slots. Here is an illegal example: +

+    #ifdef ultrix
+    #define SIGNEDNESS(a) unsigned a
+    #else
+    #define SIGNEDNESS(a) a
+    #endif
+
+    class Whatever : public TQObject {
+        ...
+    signals:
+        void someSignal( SIGNEDNESS(int) );
+        ...
+    };
+
+ +

A #define without parameters will work as expected. +

Nested classes cannot be in the signals or slots sections nor have +signals or slots +

+

Here's an example: +

+    class A {
+        Q_OBJECT
+    public:
+        class B {
+        public slots:   // WRONG
+            void b();
+            ...
+        };
+    signals:
+        class B {       // WRONG
+            void b();
+            ...
+        }:
+    };
+
+ +

Constructors cannot be used in signals or slots sections +

+

It is a mystery to us why anyone would put a constructor in +either the signals or slots sections. You can't anyway (except +that it happens to work in some cases). Put them in private, +protected or public sections, where they belong. Here is an example +of the illegal syntax: +

+    class SomeClass : public TQObject {
+        Q_OBJECT
+    public slots:
+        SomeClass( TQObject *parent, const char *name )
+            : TQObject( parent, name ) { } // WRONG
+        ...
+    };
+
+ +

Properties need to be declared before the public section that +contains the respective get and set functions +

+

Declaring the first property within or after the public section that +contains the type definition and the respective get and set functions +does not work as expected. The moc will complain that it can neither +find the functions nor resolve the type. Here is an example of the +illegal syntax: +

+    class SomeClass : public TQObject {
+        Q_OBJECT
+    public:
+        ...
+        Q_PROPERTY( Priority priority READ priority WRITE setPriority ) // WRONG
+        Q_ENUMS( Priority ) // WRONG
+        enum Priority { High, Low, VeryHigh, VeryLow };
+        void setPriority( Priority );
+        Priority priority() const;
+        ...
+    };
+
+ +

Work around this limitation by declaring all properties at the +beginning of the class declaration, right after Q_OBJECT: +

+    class SomeClass : public TQObject {
+        Q_OBJECT
+        Q_PROPERTY( Priority priority READ priority WRITE setPriority )
+        Q_ENUMS( Priority )
+    public:
+        ...
+        enum Priority { High, Low, VeryHigh, VeryLow };
+        void setPriority( Priority );
+        Priority priority() const;
+        ...
+    };
+
+ +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/modules.html b/doc/html/modules.html new file mode 100644 index 00000000..0c646d7b --- /dev/null +++ b/doc/html/modules.html @@ -0,0 +1,69 @@ + + + + + +About Modules + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

About Modules

+ + + +

When you install TQt, certain modules are built into the library. For +the TQt Enterprise Edition, TQt Evaluation Edition and TQt Open Source Edition +this is all modules. For TQt Professional Edition, the base modules +are available: the tools, kernel, widgets, dialog, +iconview, and workspace modules. Trolltech does not currently +offer modules for sale individually. +

All modules may be used only under the terms of the licenses associated +with each Edition. +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-customwidget-example.html b/doc/html/motif-customwidget-example.html new file mode 100644 index 00000000..fe752f50 --- /dev/null +++ b/doc/html/motif-customwidget-example.html @@ -0,0 +1,148 @@ + + + + + +Using the Motif Event Loop + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Using the Motif Event Loop

+ + +

+

+


+

Header +

#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <qmainwindow.h>
+
+
+class TQMotifWidget;
+
+class MainWindow : public TQMainWindow
+{
+public:
+    MainWindow();
+
+private:
+    TQMotifWidget *customwidget;
+};
+
+#endif // MAINWINDOW_H
+
+ +


+

Implementation: +

#include "mainwindow.h"
+
+#include <qapplication.h>
+#include <qmotif.h>
+
+
+int main( int argc, char **argv )
+{
+    XtSetLanguageProc( NULL, NULL, NULL );
+
+    TQMotif integrator( "customwidget" );
+    TQApplication app( argc, argv );
+
+    MainWindow mainwindow;
+    app.setMainWidget( &mainwindow );
+    mainwindow.show();
+
+    return app.exec();
+}
+
+ +

#include "mainwindow.h"
+
+#include <qapplication.h>
+#include <qmenubar.h>
+#include <qpopupmenu.h>
+#include <qstatusbar.h>
+
+#include <qmotifwidget.h>
+
+#include <Xm/Form.h>
+#include <Xm/PushB.h>
+#include <Xm/Text.h>
+
+
+MainWindow::MainWindow()
+    : TQMainWindow( 0, "mainwindow" )
+{
+    TQPopupMenu *filemenu = new TQPopupMenu( this );
+    filemenu->insertItem( tr("&Quit"), qApp, SLOT(tquit()) );
+
+    menuBar()->insertItem( tr("&File"), filemenu );
+    statusBar()->message( tr("This is a TQMainWindow with an XmText widget.") );
+
+    customwidget =
+        new TQMotifWidget( this, xmFormWidgetClass, NULL, 0, "form" );
+
+    XmString str;
+    Arg args[6];
+
+    str = XmStringCreateLocalized( "Push Button (XmPushButton)" );
+    XtSetArg( args[0], XmNlabelString, str );
+    XtSetArg( args[1], XmNleftAttachment, XmATTACH_FORM );
+    XtSetArg( args[2], XmNrightAttachment, XmATTACH_FORM );
+    XtSetArg( args[3], XmNbottomAttachment, XmATTACH_FORM );
+    Widget button =
+        XmCreatePushButton( customwidget->motifWidget(), "Push Button", args, 4 );
+    XmStringFree( str );
+
+    XtSetArg( args[0], XmNeditMode, XmMULTI_LINE_EDIT );
+    XtSetArg( args[1], XmNleftAttachment, XmATTACH_FORM );
+    XtSetArg( args[2], XmNrightAttachment, XmATTACH_FORM );
+    XtSetArg( args[3], XmNtopAttachment, XmATTACH_FORM );
+    XtSetArg( args[4], XmNbottomAttachment, XmATTACH_WIDGET );
+    XtSetArg( args[5], XmNbottomWidget, button );
+    Widget texteditor =
+        XmCreateScrolledText( customwidget->motifWidget(), "Text Editor", args, 6 );
+
+    XtManageChild( texteditor );
+    XtManageChild( button );
+
+    setCentralWidget( customwidget );
+
+    resize( 400, 600 );
+}
+
+
+ +

See also TQMotif Support Extension. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-dialog-example.html b/doc/html/motif-dialog-example.html new file mode 100644 index 00000000..6d4d6dac --- /dev/null +++ b/doc/html/motif-dialog-example.html @@ -0,0 +1,237 @@ + + + + + +A Motif Dialog + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A Motif Dialog

+ + +

+

+


+

Header +

#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <qmotifwidget.h>
+
+
+class MainWindow : public TQMotifWidget
+{
+public:
+    MainWindow();
+
+    void showMotifDialog();
+    void showTQtDialog();
+};
+
+#endif // MAINWINDOW_H
+
+ +


+

Implementation: +

#include <qapplication.h>
+#include <qmotif.h>
+
+#include "mainwindow.h"
+
+
+int main( int argc, char **argv )
+{
+    XtSetLanguageProc( NULL, NULL, NULL );
+
+    TQMotif integrator( "dialog" );
+    TQApplication app( argc, argv );
+
+    MainWindow *mainwindow = new MainWindow;
+    app.setMainWidget( mainwindow );
+    mainwindow->show();
+
+    return app.exec();
+}
+
+ +

#include "mainwindow.h"
+#include "dialog.h"
+
+#include <Xm/MainW.h>
+#include <Xm/RowColumn.h>
+#include <Xm/CascadeB.h>
+#include <Xm/PushB.h>
+#include <Xm/PushBG.h>
+#include <Xm/SeparatoG.h>
+#include <Xm/Text.h>
+#include <Xm/MessageB.h>
+#include <Xm/Form.h>
+#include <Xm/LabelG.h>
+
+#include <qapplication.h>
+
+
+static void motifDialogCallback( Widget, XtPointer client_data, XtPointer )
+{
+    MainWindow *mw = (MainWindow *) client_data;
+    mw->showMotifDialog();
+}
+
+static void qtDialogCallback( Widget, XtPointer client_data, XtPointer )
+{
+    MainWindow *mw = (MainWindow *) client_data;
+    mw->showTQtDialog();
+}
+
+static void tquitCallback( Widget, XtPointer client_data, XtPointer )
+{
+    MainWindow *mw = (MainWindow *) client_data;
+    mw->close();
+}
+
+
+MainWindow::MainWindow()
+    : TQMotifWidget( 0, xmMainWindowWidgetClass, NULL, 0, "mainwindow" )
+{
+    Widget menubar = XmCreateMenuBar( motifWidget(), "menubar", NULL, 0 );
+    Widget filemenu = XmCreatePulldownMenu( menubar, "filemenu", NULL, 0 );
+    Widget item;
+
+    item = XtVaCreateManagedWidget( "Motif Dialog...",
+                                    xmPushButtonGadgetClass, filemenu,
+                                    XmNmnemonic, 'C',
+                                    NULL );
+    XtAddCallback( item, XmNactivateCallback, motifDialogCallback, this );
+
+    item = XtVaCreateManagedWidget( "TQt Dialog...",
+                                    xmPushButtonGadgetClass, filemenu,
+                                    XmNmnemonic, 'Q',
+                                    NULL );
+    XtAddCallback( item, XmNactivateCallback, qtDialogCallback, this );
+
+    item = XtVaCreateManagedWidget( "sep",
+                                    xmSeparatorGadgetClass, filemenu,
+                                    NULL );
+
+    item = XtVaCreateManagedWidget( "Exit",
+                                    xmPushButtonGadgetClass, filemenu,
+                                    XmNmnemonic, 'x',
+                                    NULL );
+    XtAddCallback( item, XmNactivateCallback, tquitCallback, this );
+
+    XmString str = XmStringCreateLocalized( "File" );
+    item = XtVaCreateManagedWidget( "File",
+                                    xmCascadeButtonWidgetClass, menubar,
+                                    XmNlabelString, str,
+                                    XmNmnemonic, 'F',
+                                    XmNsubMenuId, filemenu,
+                                    NULL );
+    XmStringFree( str );
+
+    Arg args[2];
+    XtSetArg( args[0], XmNeditMode, XmMULTI_LINE_EDIT );
+    Widget texteditor =
+        XmCreateScrolledText( motifWidget(), "texteditor",
+                              args, 1 );
+
+    XtManageChild( menubar );
+    XtManageChild( texteditor );
+
+    // pick a nice default size
+    XtVaSetValues( motifWidget(),
+                   XmNwidth, 400,
+                   XmNheight, 300,
+                   NULL );
+
+    setCaption( tr("TQMotif Dialog Example") );
+
+}
+
+void MainWindow::showMotifDialog()
+{
+    TQMotifDialog dialog( this, "custom dialog", TRUE );
+    dialog.setCaption( tr("Custom Motif Dialog") );
+
+    Widget form = XmCreateForm( dialog.shell(), "custom motif dialog", NULL, 0 );
+
+    XmString str;
+    Arg args[9];
+
+    str = XmStringCreateLocalized( "Close" );
+    XtSetArg( args[0], XmNlabelString, str );
+    XtSetArg( args[1], XmNshowAsDefault, True );
+    XtSetArg( args[2], XmNleftAttachment, XmATTACH_POSITION );
+    XtSetArg( args[3], XmNleftPosition, 40 );
+    XtSetArg( args[4], XmNrightAttachment, XmATTACH_POSITION );
+    XtSetArg( args[5], XmNrightPosition, 60 );
+    XtSetArg( args[7], XmNbottomAttachment, XmATTACH_FORM );
+    XtSetArg( args[6], XmNtopOffset, 10 );
+    XtSetArg( args[8], XmNbottomOffset, 10 );
+    Widget button = XmCreatePushButton( form, "Close", args, 9 );
+    XmStringFree( str );
+
+    str =
+        XmStringCreateLocalized( "This is a custom Motif-based dialog using\n"
+                                 "TQMotifDialog with a TQWidget-based parent." );
+    XtSetArg( args[0], XmNlabelString, str );
+    XtSetArg( args[1], XmNleftAttachment, XmATTACH_FORM );
+    XtSetArg( args[2], XmNrightAttachment, XmATTACH_FORM );
+    XtSetArg( args[3], XmNtopAttachment, XmATTACH_FORM );
+    XtSetArg( args[4], XmNbottomAttachment, XmATTACH_WIDGET );
+    XtSetArg( args[5], XmNbottomWidget, button );
+    XtSetArg( args[6], XmNtopOffset, 10 );
+    XtSetArg( args[7], XmNbottomOffset, 10 );
+    Widget label = XmCreateLabelGadget( form, "label", args, 8 );
+    XmStringFree( str );
+
+    XtManageChild( button );
+    XtManageChild( label );
+    XtManageChild( form );
+
+    XtAddCallback( button, XmNactivateCallback,
+                   (XtCallbackProc) TQMotifDialog::acceptCallback, &dialog );
+
+    dialog.exec();
+}
+
+void MainWindow::showTQtDialog()
+{
+    // custom TQt-based dialog using a Motif-based parent
+    CustomDialog customdialog( motifWidget(), "custom dialog", TRUE );
+    customdialog.exec();
+}
+
+ +

See also TQMotif Support Extension. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-examples.html b/doc/html/motif-examples.html new file mode 100644 index 00000000..4304eb4b --- /dev/null +++ b/doc/html/motif-examples.html @@ -0,0 +1,52 @@ + + + + + +TQMotif Support Extension + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMotif Support Extension

+ + +

The following example programs illustrate the use of the TQMotif Extension +assisting in the migration process of old Xt and Motif based code +to the more comfortable TQt toolkit. +

For more information see the TQMotif +Support Extension documentation. + +

+
Using the Motif Event Loop +
A Motif Dialog +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-extension.html b/doc/html/motif-extension.html new file mode 100644 index 00000000..0e9931e8 --- /dev/null +++ b/doc/html/motif-extension.html @@ -0,0 +1,127 @@ + + + + + +TQt Motif Extension + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Motif Extension

+ + +

+

This module is part of the TQt Enterprise +Edition and is not part of the Free or Non-Commercial +Editions. +

Introduction +

+

The TQt Motif Extension assists the migration of old Xt and Motif based +applications to the more comfortable TQt toolkit. This extension +replaces the older Xt/Motif Support Extension included with earlier +versions of TQt. +

The TQt Motif Extension consists of the following classes: +

    +
  • TQMotif - Provides the basis of the TQt Motif Extension. +
  • TQMotifWidget - Provides the TQWidget API for Motif widgets. +
  • TQMotifDialog - Provides the TQDialog API for Motif dialogs. +
  • TQXtWidget - The Xt/Motif integration widget from the previous +Xt/Motif extension. This class is unsupported and has many known +problems and limitations. It is provided only to keep existing source +working; it should not be used in new code. +
+

Additional Documentation +

+

+

Common Problems +

+

Incorrect CDE Color Scheme +

+

TQMotifWidget and TQMotifDialog will use the same Visual, Colormap +and color depth that TQApplication uses. When using CDE, the color +scheme may be incorrect when using a Visual, Colormap and color depth +that is not the default. To work around this problem, add the +following resource string to your startup files (for example, +$HOME/.dt/sessions/current/dt.resources): +

+    *userColorObj: false
+
+ +

X11 Header Conflicts +

+

The X11 headers define some constants that conflict with the TQt +headers. The solution is to include all TQt headers first, followed by +headers from this extension, and all Xt/Motif and X11 headers last. +For example: +

+    // TQt headers first
+    #include <qapplication.h>
+    #include <qpushbutton.h>
+    #include <qsocket.h>
+    ...
+
+    // TQMotif* headers next
+    #include <qmotif.h>
+    #include <qmotifdialog.h>
+    #include <qmotifwidget.h>
+
+    // Xt/Motif and X11 headers last
+    #include <X11/Xlib.h>
+    #include <Xt/Intrinsic.h>
+    #include <Xm/Xm.h>
+    ...
+
+ +

Multiple Screen Support +

+

TQMotifWidget can be used together with TQDesktopWidget to create +top-level windows on multiple screens. A common mistake is to create +a TQMotifWidget on a non-default screen while the Xt/Motif widgets are +created on the default screen. The solution is to specify the screen +to both TQMotifWidget and the Xt/Motif child. For example: +

+    Display *dpy = TQMotif::x11Display();
+    Arg args[1];
+
+    // make sure both TQMotifWidget and the XmMainWindow are on screen 1
+    XtSetArg(args[0], XtNscreen, ScreenOfDisplay(dpy, 1));
+    TQMotifWidget *toplevel =
+        new TQMotifWidget(TQApplication::desktop()->screen(1),
+                         xmMainWindowWidgetClass, args, 1, "mainwindow");
+
+ +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-todo.png b/doc/html/motif-todo.png new file mode 100644 index 00000000..fb63130f Binary files /dev/null and b/doc/html/motif-todo.png differ diff --git a/doc/html/motif-walkthrough-1.html b/doc/html/motif-walkthrough-1.html new file mode 100644 index 00000000..aac0cab6 --- /dev/null +++ b/doc/html/motif-walkthrough-1.html @@ -0,0 +1,98 @@ + + + + + +Getting Started + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Getting Started

+ + + +[ Home ] +[ Next: Preparing to Migrate the User Interface ] +

Starting with TQMotif and TQApplication +

+

To be able to use TQt, we need to create a TQApplication object. The +TQApplication class controls all the event delivery and display +management for all other TQt objects and widgets. We need to use the +TQMotif class from the TQt Motif Extension to allow TQApplication +and the XtAppContext to coexist. +

The TQApplication object must be created in the main() function. +We will need to modify todo.c to compile with a C++ compiler, so we +rename todo.c to todo.cpp. +

Next, we add the appropriate includes for the TQMotif and TQApplication +classes. +

+ +


+

Next, we create the TQMotif and TQApplication objects. We create TQMotif +with a foreign XtAppContext, and we create TQApplication with a +foreign Display. +


+

The next change is not yet necessary, but it is included to show that +the TQt Motif Extension provides a complete integration. +Normally, a Motif based program would use the XtAppMainLoop() +function to run the application's event loop. This is still possible, +but since we are migrating to the TQt toolkit, we prefer to use the +TQApplication::exec() function for running the event loop. +


+

Since we renamed todo.c to todo.cpp, we must change the +project file and rerun qmake to regenerate our Makefile. When we +build our project, there are compile and link errors: we will fix +these in the following section. +

Migrating to C++ +

+

We need to convert the code in this file to proper C++ code. +Fortunately, the changes are not too large. Most files included from +existing C projects are not C++ compatible, so we make them compatible +by wrapping them in an extern "C" block. +

+ +


+

Global C functions that are forward declared must also be wrapped into +an extern "C" block. +


+

The manageCB() function needs to be converted to proper C++. +


+

And we need to fix two invalid casts. One is in the Save() function. +


+

The other invalid cast is in the Open() function. +


+

After these changes, the project compiles and links, and the +application runs and operates correctly. +

[ Home ] +[ Next: Preparing to Migrate the User Interface ] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-walkthrough-10.html b/doc/html/motif-walkthrough-10.html new file mode 100644 index 00000000..0d09bc56 --- /dev/null +++ b/doc/html/motif-walkthrough-10.html @@ -0,0 +1,106 @@ + + + + + +Continuing Development + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Continuing Development

+ + + +[ Previous: Replacing the Print Dialog ] +[ Home ] +

We have not tquite finished with the migration to TQt, even though our +project does not use Motif any more. TQt provides many useful features +that we can begin using immediately. Some of the most interesting +ones are presented below as a guide for where to start extending your +existing projects. +

Using Unicode +

+

Support for internationalization is very easy +with TQt. Using TQString instead of char* for storing text gives +us support for most of the written languages around the world. Our Page and Options structs look much simpler now. +

+ +


+


+

All functions that use the Page and Options structs need to be +updated to use TQString properly. Since TQString is also an implicitly shared class, we no longer have to do any memory management with our +strings. We can remove all occurences of the qstrdup() function, +and we never need to use new or delete when done with a string. +TQString will allocate and delete data when needed. +

Here are the MainWindow::fileOpen() and MainWindow::pageChange() +functions from mainwindow.ui.h. Notice that the code no longer +uses delete or qstrdup() when storing text. +

+ +


+

+    ...
+
+ +


+

Almost all of the functions in our application are affected by this +change. In most cases, we end up removing more code than we are +adding. To keep the size of this walkthrough reasonable, we've only +shown a small portion of the retquired changes, since the changes are +very similar to those shown above. +

Writing Platform-Independent Code +

+

TQt provides many input and output classes. We +can use these in MainWindow::readDB() and MainWindow::saveDB(). +Currently, these functions use functions only found on UNIX machines. +Using TQFile and TQTextStream removes this dependency on UNIX, and we can +begin building and testing our application on Microsoft Windows and +Apple Mac OS X. +

The platform-independent versions of the MainWindow::readDB() and +MainWindow::saveDB() functions can be found in the io.cpp file. +

Designing a Modern User Interface +

+

Since we used the TQt Designer to design the Main Window +widget, we can extend the interface easily. We can use some of the +more advanced features of TQMainWindow, which includes dockable +toolbars. Adding these is simple with the TQt Designer. The +final version of our project includes a toolbar, which provides tquick +access to the Open, Save, Print, New Page and Delete to Trash actions. +

The possibilities are endless. An Edit menu, with the common Cut, Copy and Paste actions, could be added in a relatively +short period of time. As our project expands to other platforms, we +could add menus and dialogs that allow us synchronize todo lists +between a normal desktop computer and a handheld device running with +TQt/Embedded. +

[ Previous: Replacing the Print Dialog ] +[ Home ] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-walkthrough-2.html b/doc/html/motif-walkthrough-2.html new file mode 100644 index 00000000..cbe236da --- /dev/null +++ b/doc/html/motif-walkthrough-2.html @@ -0,0 +1,101 @@ + + + + + +Preparing to Migrate the User Interface + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Preparing to Migrate the User Interface

+ + + +[ Previous: Getting Started ] +[ Home ] +[ Next: Using TQt Standard Dialogs ] +

We are ready to start migrating the user interface for our project. +As mentioned in the introduction, we do this in steps, ensuring that +our application is still usable at every step of the migration process. +

The user interface can be viewed as a hierarchy; each top-level window +and dialog depends upon a parent (which is another top-level window or +dialog). When using Motif XmMainWindow widgets, these should be +viewed as two separate entities: the Main Window widget with the +popup-menu hierarchy and the View widget contained in the Main Window widget. The View widget depends on the Main Window +widget. +

We begin migrating the pieces that have no dependencies, and work our +way up the dependency tree until all the pieces have been migrated. +

The hierarchy for this project looks something like this: +

Motif Todo Hierarchy
+

We will begin by migrating and replacing all of the dialogs, then the +Main Window widget with popup-menu hierarchy, and finally the View widget. +

However, we are not ready to begin just yet. The migration process can +be long, but it does not have to be difficult. The Open, Save As, Page Delete and IO Error dialogs use Motif XmFileSelectionBox and XmMessageBox dialogs. TQt provides similar +functionality with TQFileDialog and TQMessageBox, which we can begin +using immediately. +

The Print dialog is special, however. The Print dialog cannot be +replaced until after we have replaced the View widget. TQt provides +a complete printing mechanism with TQPrinter, but we cannot start using +it until we have replaced the View widget. +

Removing the Help Dialog +

+

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

The help text included with the original project is very small and +only contains information about the XmNoteBook widget. The use of +tooltips and whats-this text will suffice for this example. If your +migration project has a large online help system, we recommend looking +at the Simple HTML Help Browser +example for information on how to build an rich text help system with +hypertext navigation and full printing capabilities, or using TQt Assistant. +

Removing the existing Help dialog is relatively simple. We remove +the Xmd/Help.h, Xmd/HelpP.h and Xmd/Help.c files from our +project file and regenerate our Makefile. +

The code to create the Help menu and Help dialog is in todo.cpp. We remove the Xmd/Help.h include, the *help_manager +resource string, the help_cb() function forward declaration and the +help_widget global variable. We also need to remove the code that +creates the Help dialog. We will also remove the code to create +the Help menu, since this menu is now empty. Finally, we remove +the help_cb() function implementation. +

The Help dialog is now removed from our project. We cannot add +TQToolTip and TQWhatsThis help at the moment, since we are still using +XmMainWindow for the Main Window widget. Once we have +migrated the Main Window and the popup-menu hierarchy, we can +begin using TQToolTip and TQWhatsThis for online help. +

[ Previous: Getting Started ] +[ Home ] +[ Next: Using TQt Standard Dialogs ] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-walkthrough-3.html b/doc/html/motif-walkthrough-3.html new file mode 100644 index 00000000..2c0cdba3 --- /dev/null +++ b/doc/html/motif-walkthrough-3.html @@ -0,0 +1,178 @@ + + + + + +Using TQt Standard Dialogs + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Using TQt Standard Dialogs

+ + + +[ Previous: Preparing to Migrate the User Interface ] +[ Home ] +[ Next: Using Custom TQDialogs ] +

We start by using two of the TQt Standard +Dialogs: TQFileDialog and TQMessageBox. Both of these classes +provide useful static convenience functions. +

+
TQFileDialog::getOpenFileName() replacement for the Open dialog +
TQFileDialog::getSaveFileName() replacement for the Save As dialog +
TQMessageBox::information() replacement for Page Delete dialog +
TQMessageBox::warning() replacement for IO Error dialog. +
+

Each of these functions takes a TQWidget *parent argument. If we +pass zero as the parent argument, then we will have dialogs that +are centered on the screen, instead of being centered over our main +window. We can have TQMotifWidget create our XmMainWindow, and we +can then use this class as the parent for both Motif dialogs and TQt +dialogs. +

We need to include the appropriate headers for TQMotifWidget and +TQFileDialog in todo.cpp. +

+ +


+

Next, we make a few modifications to how the application is +initialized. We could initialize Xt/Motif and create the XtAppContext ourselves, but TQMotif can do this for us. +We also let TQApplication open the connection to the X server. Next, +we create a TQMotifWidget, passing xmMainWindowWidgetClass as the widgetclass argument. We can now use the TQMotifWidget::motifWidget() +function to access the Motif widget. The shell widget is created +automatically by TQMotifWidget. We use XtParent() to access it. +The top-level window is now a TQMotifWidget, which means we can use it +as the parent for the TQt Standard Dialogs. +


+

Replacing the Open and Save As Dialogs +

+

First, we completely remove all use of the existing Motif file +selection dialog. We remove the Xm/FileSB.h include, the global file_dialog variable, and the code to create the dialog. We also +remove the PresentFDialog() callback function. None of this code +is needed to use TQFileDialog. +

After removing the PresentFDialog() callback function, we need to +make Open and Save As popup-menu callbacks call the Open() +and Save() functions. +

First we must change the declaration of these two functions. +

+ +


+

We also change the arguments to the callbacks. We pass the top-level +TQMotifWidget as the client_data to these functions, since we will +be using it as the parent for the TQFileDialog. +


+

+    ...
+
+ +


+

Next, we modify the Save() function to use +TQFileDialog::getSaveFileName(). +


+

... and the Open() function to use TQFileDialog::getOpenFileName(). +


+

After we build the project, the application runs and operates as +expected. The difference is that the Open and Save As dialogs +now use TQFileDialog. +

Replacing the Page Delete and IO Error Dialogs +

+

The Page Delete dialog is created and used in actions.c. We +need to migrate this file to C++. We rename it to actions.cpp, +modify the project file and regenerate the Makefile. +

The changes retquired to make actions.cpp compile are minimal. We +need to wrap more C header files and global variables in an extern "C" block. +

+ +


+

We need to forward declare the NewPage(), DeletePage(), EditPage() and SaveIt() functions so that the compiler generates +the correct symbols for these functions. +


+

We need to fix a single invalid pointer cast. +


+

And we need to change the variable named new to newstr in the Trim() function. +

We can now change the DeletePage() function to use +TQMessageBox::information(). +

First, we need to make sure we include the proper header for +TQMessageBox. +

+ +


+

The code for DeletePage() looks like this: +


+

At this point in the code, the page should be deleted. The code to do +this is in the DoDeletePage() function. We move the contents of DoDeletePage() to this point and remove the DoDeletePage() function +completely. +

Next, we change todo.cpp to pass the top-level TQMotifWidget as the +client_data tot he DeletePage() function. +

+ +


+

The IO Error dialog is created and used in io.c. We need to +migrate this file to C++. We rename it to io.cpp, modify the +project file and regenerate the Makefile. +

The changes retquired to make io.cpp compile are minimal. We need +to wrap more C header files and global variables in an extern "C" +block. +

+ +


+

We need to forward declare the ReadDB() and SaveDB() functions +so that the compiler generates the correct symbols for these +functions. +


+

The ParseNewLines() function needs to be converted to proper C++. +


+

The PrintWithNewLines() function also needs to be converted to proper +C++. +


+

We can now change the ReadDB() and SaveDB() functions to use +TQMessageBox::warning(). +

First, we need to make sure we include the proper header for TQMessageBox. +

+ +


+

The code for ReadDB() looks like this: +

+    ...
+
+ +

The code for SaveDB() looks like this: +

+    ...
+
+ +

After we build the project, the application runs and operates as +expected. The difference is that the Page Delete and IO Error dialogs now use TQMessageBox. +

[ Previous: Preparing to Migrate the User Interface ] +[ Home ] +[ Next: Using Custom TQDialogs ] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-walkthrough-4.html b/doc/html/motif-walkthrough-4.html new file mode 100644 index 00000000..5b105665 --- /dev/null +++ b/doc/html/motif-walkthrough-4.html @@ -0,0 +1,102 @@ + + + + + +Using Custom TQDialogs + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Using Custom TQDialogs

+ + + +[ Previous: Using TQt Standard Dialogs ] +[ Home ] +[ Next: Using Existing Dialogs with TQMotifDialog ] +

After we have replaced the standard dialogs, we move onto the custom +dialogs. This project has a single custom dialog: the Page Edit +dialog. +

Instead of writing the code ourselves, we use TQt Designer to design our dialog. +Designing a custom dialog is beyond the scope of +this document: see the TQt Designer Manual if you're unfamiliar +with TQt's visual design tool. +

Replacing the Page Edit Dialog +

+

The custom TQDialog description for the Page Edit dialog is saved +as pageeditdialog.ui. We add this file to the project file by +adding the line +

+FORMS = pageeditdialog.ui
+
+ +to the .pro file, and regenerate the Makefile. The uic +utility generates the code for our custom TQDialog, which is then +compiled and linked into our application. (uic is invoked +automatically from makefiles generated from .pro files.) +

We need to pass the top-level TQMotifWidget as the client_data +argument to the EditPage function, which we will use as the parent +for our new PageEditDialog. We do this the same way as we have +done for the Open and Save As dialogs in todo.cpp. +

+ +


+

The EditPage() function is implemented in actions.cpp. We start +by adding the includes needed for the PageEditDialog and TQLineEdit. +

+ +


+

In the EditPage() function, We create the PageEditDialog, set +the initial values of the three TQLineEdit widgets with values from the +current page and execute the dialog. +

+    ...
+
+ +

At this point in the code, the page properties should be modified. The +code to do this is in the DoEditPage() function. We move the +contents of DoEditPage() to this point and remove the DoEditPage() function completely. +

The Page struct defined in page.h stores strings in char* +arrays. Since the PageEditDialog and the data it contains will be +destroyed when we return from this function, we need to convert the +unicode TQString data into a TQCString in the local encoding and +duplicate it with qstrdup(). +


+

The same process must be done for the minorTab text: +


+

... and for the majorTab text: +


+

[ Previous: Using TQt Standard Dialogs ] +[ Home ] +[ Next: Using Existing Dialogs with TQMotifDialog ] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-walkthrough-5.html b/doc/html/motif-walkthrough-5.html new file mode 100644 index 00000000..8d0be21c --- /dev/null +++ b/doc/html/motif-walkthrough-5.html @@ -0,0 +1,109 @@ + + + + + +Using Existing Dialogs with TQMotifDialog + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Using Existing Dialogs with TQMotifDialog

+ + + +[ Previous: Using Custom TQDialogs ] +[ Home ] +[ Next: Using TQt Main Window Classes ] +

As mentioned earlier, the Print dialog cannot be replaced until we +have converted the View widget. The Print dialog will be +removed once we have finished our migration, since we will use +TQPrinter instead. Based on this information, we decide that it is not +worth replacing the Print dialog with a custom TQDialog replacement. +Instead, we will keep the Motif based dialog and use TQMotifDialog to +integrate the dialog with the application. +

Modality Retquirements +

+

Modality with TQDialog is different from Motif. The TQDialog::exec() +function does not return until the dialog is finished. In Motif, +modality is simply a property of the shell, and the application +programmer must write TQDialog::exec() style functionality if they +want that behavior. +

Since we will be using TQMotifDialog (which is a TQDialog subclass), we +will need to have an accept and a reject callback for each +dialog we integrate with TQMotifDialog. The predefined Motif dialogs +have these already: the XmNokCallback and XmNcancelCallback +callbacks. However, the Print dialog only has an accept callback +(the XmdNprintCallback), but it does not have a reject callback. +We need to add this. +

This is easily done. We add an XtCallbackList for the XmNcancelCallback callback in Xmd/PrintP.h: +

+ +


+

We add the XmNcancelCallback callback to the list of resources for +the XmdPrint widget class in Xmd/Print.c: +

+ +


+

We need to activate this callback whenever we unmanage the widget and +do not activate the print callback, which is in the do_help_cb() +function: +


+

... and in the unmanage_cb() function: +


+

Integrating the Print Dialog +

+

Now that the Print dialog has the appropriate accept and reject callbacks, we can use TQMotifDialog. First we need to include +the TQMotifDialog header in todo.cpp. +

+ +


+

We add a ShowPrintDialog() function which will create and execute the +print dialog. +


+

We change the Print menu item callback to call the new ShowPrintDialog() function. We pass the top-level TQMotifWidget, which +we will use as the parent for the dialog. +


+

The ShowPrintDialog() function creates the Print dialog and +executes it. We use the XmdNprintCallback callback to accept the +dialog and the XmNcancelCallback callback to reject the dialog. We +can do this easily by using the TQMotifDialog::acceptCallback() and +TQMotifDialog::rejectCallback() functions, respectively. We also +ensure that the print callback continues to call the Print() function as before. +


+

After we build the project, the application runs and operates as +expected. There is no visual or behavioral difference, even though +the Print dialog is using TQMotifDialog. +

[ Previous: Using Custom TQDialogs ] +[ Home ] +[ Next: Using TQt Main Window Classes ] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-walkthrough-6.html b/doc/html/motif-walkthrough-6.html new file mode 100644 index 00000000..802f205d --- /dev/null +++ b/doc/html/motif-walkthrough-6.html @@ -0,0 +1,129 @@ + + + + + +Using TQt Main Window Classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Using TQt Main Window Classes

+ + + +[ Previous: Using Existing Dialogs with TQMotifDialog ] +[ Home ] +[ Next: Refactoring Existing Code ] +

After we have replaced all the dialogs, we are ready to begin replacing +the Main Window. As mentioned +above, we will replace the existing XmMainWindow and +popup-menu heirarchy with TQt Main Window +Classes. +

We will use TQt Designer to design +our new main window. +

Implementing the Main Window +

+

The description for the Main Window is saved as mainwindow.ui. +We add this file to the project file and regenerate the Makefile. +The uic utility generates the code for our Main Window, which +is then compiled and linked into our application. +

TQt Designer also created the mainwindow.ui.h file. We need to +add the implementation for our Main Window to this skeleton +implementation. +

We begin by adding the necessary includes for TQApplication +and TQMotifWidget. +

+ +


+

We need includes for the Motif callback structs and the XmdPrint +widget. +


+

We are now ready to add implementations for the slots in our Main Window. We have one slot per menu item. Each slot will call the +existing callback functions found in todo.cpp and actions.cpp. +

+
File menu +
New MainWindow::fileNew() calls the New() callback +
Open MainWindow::fileOpen() calls the Open() callback +
Save MainWindow::fileSave() calls the SaveIt() callback +
Save As MainWindow::fileSaveAs() calls the Save() callback +
Print MainWindow::filePrint() calls the ShowPrintDialog() callback +
Exit MainWindow::fileExit() calls TQApplication::tquit() +
Selected menu +
Properties MainWindow::selProperties() calls the EditPage() callback +
New MainWindow::selNewPage() calls the NewPage() callback +
Delete to Trash MainWindow::selDeletePage() calls the DeletePage() callback +
+

We need to add forward declarations for these callbacks before we can +use them. +


+

Each of the existing callback functions takes three arguments. We pass +NULL to all of the arguments in this example (with a few exceptions, +see below). The existing code does not rely on any of the arguments. +Each slot implementation is a single line calling the related callback +function. The code is not very interesting and would just take up +space, so we've omitted it. +

There are four exceptions to the above. The Open(), Save(), EditPage() and DeletePage() callbacks accept a pointer to the +toplevel TQWidget as argument 2 (the client_data argument). For +these four functions, we pass this as the second argument, which is +a toplevel MainWindow derived from TQMainWindow. +

Replacing the Main Window +

+

The next step is to use the new Main Window in our application. +The changes needed in todo.cpp are large due to the large amount of +code being removed. +

First, we add the include for our new Main Window. +

+ +


+

We can cleanup the Motif includes, since many of them are no longer +needed. +


+

The QuitAppl() and manageCB() callbacks are not needed any more, +so we remove them. We do not need the global shell variable +either. We remove it and all references to it in the New(), Save() and Open() callbacks. +

In main(), we make the large changes. First, we use our new MainWindow instead of TQMotifWidget with XmMainWindow. +

+ +


+

We will now use TQMotifWidget to create the XmNotebook widget. +


+

We remove all of the code used to create the Motif menus. The +remaining code in main() is self-explanatory. +


+

Our application is now using TQMainWindow instead of XmMainWindow. +After we build the project, the application runs and operates as +expected. +

[ Previous: Using Existing Dialogs with TQMotifDialog ] +[ Home ] +[ Next: Refactoring Existing Code ] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-walkthrough-7.html b/doc/html/motif-walkthrough-7.html new file mode 100644 index 00000000..018258ae --- /dev/null +++ b/doc/html/motif-walkthrough-7.html @@ -0,0 +1,214 @@ + + + + + +Refactoring Existing Code + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Refactoring Existing Code

+ + + +[ Previous: Using TQt Main Window Classes ] +[ Home ] +[ Next: Replacing the View Widget ] +

In the author's view, the existing code is slightly disorganized. +Even though the code does work, some cleanups and reorganization +can only help with readability and maintainability. The steps +described below are not necessary during the migration process but are +included for completeness. +

Migrating Data Structures to C++ +

+

The Page data structure is an opaque data type. The real data +structure is called PageRec; Page defined to be a pointer to a +PageRec. In addition, we have the AllocPage() function that +allocates and initializes memory for a PageRec struct. +

With C++, we can do this in the constructor. We can also write a +destructor which automatically frees all resources in the PageRec, +instead of having to do it in several different places. +

The PageRec struct declaration is removed from page.h. We +declare a Page struct with the same data members as PageRec, a +constructor and a destructor. +

+ +


+

The existing pages, currentPage and maxpages global variables +are removed from the source files. We replace them with extern +declarations in page.h. +


+

The global variable instantiations are placed in todo.cpp. +

Each source file contains function declarations that deal with the +global Page related variables. We remove these declarations from +the source files and declare them once in the page.h header file. +


+

Now that Page has a constructor, we remove the AllocPage() +function. It is no longer needed. The calls to AllocPage() are +replaced with 'new Page()' in the NewPage(), DeletePage() +and ReadDB() functions. We also replace the code to deallocate +pages with delete pages[X], where X is the appropriate index +value. This is done in the ReadDB and DeletePage() functions. +

Code that accesses the global pages variable does not need to be +modified since the data members of the Page struct did not change. +The existing code will continue to work. +

The OptionsRec struct declared in page.h is also updated, +following the same pattern as the Page struct above. +


+

The global variable instantiation is also placed in todo.cpp. +

Code that accesses the global options variable does not need to be +modified since the data members of the Options struct did not +change. The existing code will continue to work. +

Using new and delete +

+

The destructors of the Page and Options structs use delete +instead of XtFree() to deallocate all char* members. This is a +necessary change since we are migrating away from Xt/Motif. We need +to fix existing code that modifies the Page struct members to use +new and delete ( instead of XtMalloc(), XtNewString() and +XtFree() ). +

The PageChange() function in todo.cpp simply saves the contents +and cursor position of current page before calling SetPage(). We +use new and delete when modifying members of the Page struct. +

+ +


+

When storing the context of the XmText widget, we use qstrdup() +to make a copy of the string returned by the XmTextGetString() +function. +


+

The ReadDB() function in io.cpp needs similar changes. We +replace all use of XtMalloc() and XtNewString() with new and +qstrdup(), respectively. +

This needs to be done just after opening the file. +

+ +


+

... when starting a new page ... +

+    ...
+
+ +

+

... and when reading in the label and tab texts/ +

+    ...
+
+ +
+    ...
+
+ +
+    ...
+
+ +

+

The ReadDB() function uses XtRealloc() to expand the data +storage buffer. Unfortunately, C++ does not provide a way to +reallocate an existing block of data, so we have to do this ourselves. +


+

There is also one occurence in ReadDB() where we call XtMalloc() +with an argument of 2. This was done when a file could not be read. +Creating an empty string is not necessary, so we remove this code +instead of using new. +


+

The SaveDB() function in io.cpp also needs these changes. We +change one occurence of XtFree() to delete. +


+

Finally, We need to replace two occurences of XtNewString() in the main() function in todo.cpp. +

+ +


+

Moving Existing Code +

+

The rest of the refactoring process involves moving existing code into +new places. Currently, each function in the mainwindow.ui.h file +simply calls the old callback handlers present in the other files. +Instead of calling the old callback functions, the implementations are +moved accordingly. +

+
Function Original File Moved to Function +
New() todo.cpp MainWindow::fileNew() +
Open() todo.cpp MainWindow::fileOpen() +
SaveIt() actions.cpp MainWindow::fileSave() +
Save() todo.cpp MainWindow::fileSaveAs() +
ShowPrintDialog() todo.cpp MainWindow::filePrint() +
EditPage() actions.cpp MainWindow::selProperties() +
NewPage() actions.cpp MainWindow::selNewPage() +
DeletePage() actions.cpp MainWindow::selDeletePage() +
+

The Print() callback function is still used by the Print +dialog, so we move it into mainwindow.ui.h and make it static. +

Previously, the Open(), Save(), EditPage() and DeletePage() +functions created dialogs with client_data as the parent argument. +Since we have moved the code directly into the Main Window +implementation, we create these dialogs with this as the parent +argument. +

The PageChange() callback function is moved from actions.cpp +to todo.cpp and made static since it is not used anywhere else. +

Earlier modifications to actions.cpp caused the Trim() function +to become redundant, so we remove it. +

The MIN() and MAX() macros in todo.cpp are redundant. TQt +provides the TQMIN() and TQMAX() macros which we will use. +

Earlier modifications caused the fallback_resources array to become +redundant, so we remove it. +

In the near future, our program will not use Motif any more, and we +will no longer need to use TQMotif. To prepare for this, we remove the +resources and optionDesc arrays and create the TQMotif instance +with just the APP_CLASS argument. +

The #include statements in the source files are mostly incorrect +due to the refactoring changes. Many of the #include statements +are no longer needed. The #include statements from each file are +listed below, instead of describing which includes are removed and +added to each file. +

Includes for actions.cpp: +

+ +


+

Includes for io.cpp: +

+ +


+

Includes for todo.cpp: +

+ +


+

Includes for mainwindow.ui.h: +

+ +


+

[ Previous: Using TQt Main Window Classes ] +[ Home ] +[ Next: Replacing the View Widget ] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-walkthrough-8.html b/doc/html/motif-walkthrough-8.html new file mode 100644 index 00000000..40bc1f1a --- /dev/null +++ b/doc/html/motif-walkthrough-8.html @@ -0,0 +1,212 @@ + + + + + +Replacing the View Widget + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Replacing the View Widget

+ + + +[ Previous: Refactoring Existing Code ] +[ Home ] +[ Next: Replacing the Print Dialog ] +

We are ready to start replacing the View widget. However, our +example program uses the XmNotebook widget class. TQt does not +provide a direct equivalent of this class, so we are faced with three +possibilities, each with several advantages and disadvantages. +

    +

  1. We can continue the conversion using existing TQt widgets. +

      +

    • Advantages - The widgets provided by TQt are well designed and +tested, allowing us to tquickly redesign the user interface. +

    • Disadvantages - Most, if not all, of the existing data structures +and code will need to be modified or rewritten. New code must be +written in a way that maintains compatibility with previous versions +of our application. +

    +

  2. We can write a new TQWidget subclass that is identical to the XmNotebook widget class. +

      +

    • Advantages - The existing data structures will not change, allowing +compatibility with previous and future versions. +

    • Disadvantages - The new widget will need to be written and +regression tested. Existing code in our application will need to be +changed in order to deal with the new widget's API. +

    +

  3. We can leave the XmNotebook widget untouched. +

      +

    • Advantages - The existing data structures and code remain +unchanged, allowing us to continue development on other projects, +new features, etc. +

    • Disadvantages - This is the simplest solution, but the application +will still be dependent upon X11; we will not be able to deploy our +application on all platforms supported by TQt. +

    +

+

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

We use TQt Designer to add the +TQTextEdit, TQLabel and TQSpinBox widgets to the Main Window widget. +

Data Structure Modifications +

+

The Page struct contains majorPB and minorPB members which +need to be removed.  These members correspond to the tabs displayed in +the existing version. The new version will not have any tabs, so we +remove them. +

+ +


+

Code Modifications +

+

Most of the existing functions in our application need to be modified +to work with the new View widget. The MainWindow class has five +new functions that correspond to existing functions. +

+
Existing Function New Function +
void SetPage( int ) void MainWindow::setPage( int ) +
void PageChange( ... ) void MainWnidow::pageChange( int ) +
void TextChanged( ... ) void MainWnidow::textChanged() +
void ReadDB( char * ) void MainWindow::readDB( char * ) +
void SaveDB( char * ) void MainWindow::saveDB( char * ) +
+

+

The SetPage() function implementation is moved to the MainWindow::setPage() function in mainwindow.ui.h. We remove the +SetPage() function declaration and implementation from page.h +and actions.cpp, respectively. In order to make MainWindow::setPage() work correctly, we need to modify the code to +use the new widgets in our Main Window widget. +

+ +


+

First, we set the current value of the spinbox to the current page +number. +


+

Next, we set the current text and cursor position of the textedit +to the contents of the current page. +


+

If the current page has a custom label, we set it as the current text +of the textlabel; otherwise we set the textlabel contents to +"Page X" (where X is the current page number). +


+

If the current page has major and/or minor tab text, we append these +to the labeltext. This ensures that all information entered by the +user remains visible. +


+

We should continue to handle the possibility that the current page +does not exist. In this case, we clear the contents of the textedit widget and set the textlabel contents to the current page +number (with an indication that the page is invalid). +


+

The PageChange() function is moved from todo.cpp to the MainWindow::pageChange() function in mainwindow.ui.h. As with the +MainWindow::setPae() function, we need to modify the code to use +the new widgets in our Main Window widget. +

Note: TQTextEdit::text() returns a TQString, which needs to be converted +into a normal char* array. To do this we create a copy of the +string in the local encoding. We need to make the copy using qstrdup() because the data contained in the TQCString returned by +TQString::local8Bit() is deallocated when the TQCString is destroyed. +


+

The TextChanged() function does nothing more than set the modified variable to 1. Our new MainWindow::textChanged() function +does exactly the same. +


+

Since both the MainWindow::pageChange() and MainWindow::textChanged() functions access the modified global +variable, we add a forward declaration at the top of mainwindow.ui.h. +

+

The ReadDB() and \s SaveDB() implementations in io.cpp are +renamed to MainWindow::readDB() and MainWindow::saveDB(), +respectively. We need to modify the code in order to make the code +work properly. +

First, We add #include statements for the MainWindow, TQSpinBox +and TQTextEdit classes. +

+ +


+

The new MainWindow::readDB() and MainWindow::saveDB() functions +will not use any Xt/Motif functions, so we remove the Xt/Motif #include statements and the global variables notebook and textw. +These functions remain largely unchanged, maintaining compatibility +with previous versions. Also, the ReadDB() and SaveDB() +functions have been converted into MainWindow member functions, so +we can pass this as the parent argument to the TQMessageBox +functions. +


+

After reading the file in the MainWindow::readDB() function, we set +the current and maximum values of the spinbox to the appropriate +values. +

+ +


+

In the MainWindow::saveDB() function, we need to store the text +currently displayed, so we use TQTextEdit::text() instead of XmTextGetString(). Note: TQTextEdit::text() returns a TQString, which +needs to be converted into a normal char* array. To do this we +create a copy of the string in the local encoding. We need to make +the copy using qstrdup() because the data contained in the TQCString +returned by TQString::local8Bit() is deallocated when the TQCString is +destroyed. +


+

+

Due to the removal of the majorPB and minorPB members from the +Page struct, the FixPages() function in actions.cpp is no +longer needed. We remove the implementation and forward declaration +of FixPages() from actions.cpp and page.h, respectively. +Calls to FixPages() are removed from the MainWindow::selNewPage() and MainWindow::selDeletePage(), both of +which are in mainwindow.ui.h. +

We move AdjustPages() to mainwindow.ui.h and make it static, +since it is only used in this file. We remove the forward declaration +from page.h as well. +

After our modifications, the actions.cpp file is empty. We remove +it from our project file and regenerate our Makefile. +

+

Now that we have implemented our new View widget, we need to remove +the old Motif based view widget from todo.cpp. +

Since we will not be using any Motif widgets, we remove all Motif #include statements, including qmotifwidget.h. +

+ +


+

We also remove the forward declarations of the ReadDB() function +and the notebook, textw and labelw global variables. +


+

Next, we remove the center widget, which uses TQMotifWidget. The Main Window widget and View widget are contained entirely in our +MainWindow class, so no extra initialization is needed after +creating the mainwindow widget. +


+

Since the ReadDB() and SetPage() functions have been changed into +MainWindow member functions, we need to call them using our mainwindow instance. +


+

The View widget has now been replaced. After building our project, +we confirm that the application works correctly. +

[ Previous: Refactoring Existing Code ] +[ Home ] +[ Next: Replacing the Print Dialog ] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-walkthrough-9.html b/doc/html/motif-walkthrough-9.html new file mode 100644 index 00000000..4c0cc9dc --- /dev/null +++ b/doc/html/motif-walkthrough-9.html @@ -0,0 +1,104 @@ + + + + + +Replacing the Print Dialog + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Replacing the Print Dialog

+ + + +[ Previous: Replacing the View Widget ] +[ Home ] +[ Next: Continuing Development ] +

The Print dialog is the last component in our application that +uses Motif. The current Print() function does nothing more than +write the plain text to a temporary file, and then executes 'lpr' to +send the text to the printer. Since we will use TQPrinter, we do not +this function any more, so we remove it. The current MainWindow::filePrint() implementation is removed as well. We will +write a new MainWindow::filePrint() implementation in mainwindow.ui.h. +

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

For completeness, the code to initialize a TQPrinter object is included below. +

+ +


+

Using Rich Text for Printing +

+

TQt provides rich text using a subset of HTML. The TQSimpleRichText +class makes rich-text printing simple. All we need to do is create a +string with the proper format tags inserted at the appropriate +places. For our example, we will keep the printing output similar to +previous versions. +

First, we create the format tags that we will use. +


+

Next we just loop over all pages, appending the page label, contents +and formatting characters to a printtext variable (which is a +TQString). +


+

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


+

Removing the Dependency on Xt/Motif +

+

Our application no longer uses any Xt or Motif widgets. We can now +finish removing the dependencies on Xt and Motif. +

First, we cleanup the #include statements in mainwindow.ui.h. +

+ +


+

The MainWindow::fileNew() function uses the Boolean and False +keywords from the Xt library. C++ has these built into the language, +so we use bool and false instead. +

The last modification needed to completely remove Xt and Motif from +our application is to stop using the TQMotif class. We remove the +qmotif.h #include statement from todo.cpp, and remove the +instantiation from the main() function. +

After doing this, we can remove the -lXm and -lqmotif from the +LIBS variable in our project file. Our project file also contains +source and headers for the the old custom Motif widgets previously +used in our application. We remove these as well. +

After regenerating the Makefile and building our project, we +confirm that the application works correctly. +

[ Previous: Replacing the View Widget ] +[ Home ] +[ Next: Continuing Development ] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/motif-walkthrough.html b/doc/html/motif-walkthrough.html new file mode 100644 index 00000000..6ec13d12 --- /dev/null +++ b/doc/html/motif-walkthrough.html @@ -0,0 +1,150 @@ + + + + + +TQt Motif Extension - A Migration Walkthrough + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Motif Extension - A Migration Walkthrough

+ + + +[ Next: Getting Started ] +

This walkthrough covers a complete migration of a Motif based program +to the TQt toolkit using the TQt Motif Extension. +

It is rarely practical for a large project with hundreds of thousands +or even millions of lines of code to be migrated all at once; such an +endeavor would retquire too many development resources and would incur +significant risks. Every line of code would have to be rewritten, +every user interface redesigned, and quality assurance tests and +procedures all rewritten. The TQt Motif Extension provides a +complete and working solution for incremental migration that can be +paced to suit each individual project and the available resources. The +user interface and related code can be migrated in steps while the +rest of the project need not be changed at all. +

This walkthrough is intended for programmers who will be migrating an +existing Motif based project to the TQt toolkit. We assume that they +have experience with C/C++ and Xt/Motif. Some experience with the TQt +toolkit is also necessary. For developers completely new to TQt we +recommend following the learning plan outlined in How to Learn TQt; or to go on a TQt +training course. (See http://www.trolltech.com for +details of training courses.) +

Goals for the Walkthrough +

+

The goal of this walkthrough is to provide the reader with enough +knowledge to migrate Motif applications to the TQt toolkit. We will do +this by example: We will convert a real-world Motif based program +step-by-step. This walkthrough will discuss both techniques and their +rationales throughout the process. This walkthrough is broken down +into individual chapters which cover a specific topic: +

+

We will use the todo demo program included with the Motif 2.x +distribution as our migration project. This walkthrough contains +references to the source code, which is included in the extensions/motif/examples/walkthrough subdirectory. +

Preretquisites +

+

Before we can start using the TQt Motif Extension, we must satisfy +these retquirements: +

    +
  1. We are using the X11R6.x and Motif 2.x libraries. +
  2. The project is compilable by a C++ compiler. +
  3. We have built and installed the TQt Motif Extension. +
  4. We have built and linked the project with the TQt toolkit and the TQt Motif Extension +
+

X11R6.x and Motif 2.x Libraries +

+

The mechanisms used by the TQt Motif Extension retquire development +headers and libraries from the X11R6 release and the Motif 2.0 +release. Newer versions of these can also be used. +

C++ Compiler +

+

Since TQt is a C++ toolkit, all new code will be written in C++. In +order for existing code to coexist with new code, a C++ compiler must +be able to compile the existing code. +

It is possible to keep existing code and new code separate, and only +convert or rewrite existing code as needed. This is a normal part +of the migration process, and does not need to be done before the +migration process begins. This is the most common scenario, and we +will demonstrate it by migrating existing C code to C++ as needed in +this walkthrough. +

Build and Install the TQt Motif Extension +

+

The TQt Motif Extension is not built and installed along with the +TQt toolkit. The extension resides in the extensions/motif +subdirectory. Run make in this directory to build the extension +and the examples. Once the extension has been built, run make install. +

+    $ cd extensions/motif
+    $ make
+    $ make install
+
+ +

The TQt Motif Extension is now installed and ready to use. +

Build and Link the Project with the TQt Toolkit and the TQt Motif Extension +

+

For simplicity, we use qmake to create the Makefile. The -project option causes qmake to automatically generate a project +file. After qmake -project has generated our project file, we +run qmake again to generate a Makefile. Now, we can just run make to build our project. +

+    $ qmake -project
+    $ qmake
+    $ make
+
+ +

Everything builds correctly, but fails to link because we don't link +with the Motif library. We tell qmake to do this by adding the -lXm to the LIBS variable in our project file. Since we are +planning to use the TQt Motif Extension in this project as well, +we should also add -lqmotif to the list of libraries. +

+    LIBS += -lXm -lqmotif
+
+ +

Now we regenerate our Makefile by running qmake again, and +rebuild using make. This time, our project successfully links, and +the application runs as expected. +

We are now ready to start using the TQt Motif Extension. +

[ Next: Getting Started ] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/movies-example.html b/doc/html/movies-example.html new file mode 100644 index 00000000..d2b292bc --- /dev/null +++ b/doc/html/movies-example.html @@ -0,0 +1,344 @@ + + + + + +Movies or the Story of the Animated GIF file + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Movies or the Story of the Animated GIF file

+ + +

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

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


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qfiledialog.h>
+#include <qpushbutton.h>
+#include <qlabel.h>
+#include <qpainter.h>
+#include <qmessagebox.h>
+#include <qmovie.h>
+#include <qvbox.h>
+
+
+class MovieScreen : public TQFrame {
+    Q_OBJECT
+    TQMovie movie;
+    TQString filename;
+    TQSize sh;
+
+public:
+    MovieScreen(const char* fname, TQMovie m, TQWidget* p=0, const char* name=0, WFlags f=0) :
+        TQFrame(p, name, f),
+        sh(100,100)
+    {
+        setCaption(fname);
+        filename = fname;
+        movie = m;
+
+        // Set a frame around the movie.
+        setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
+
+        // No background needed, since we draw on the whole widget.
+        movie.setBackgroundColor(backgroundColor());
+        setBackgroundMode(NoBackground);
+
+        // Get the movie to tell use when interesting things happen.
+        movie.connectUpdate(this, SLOT(movieUpdated(const TQRect&)));
+        movie.connectResize(this, SLOT(movieResized(const TQSize&)));
+        movie.connectStatus(this, SLOT(movieStatus(int)));
+
+        setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding));
+    }
+
+    TQSize sizeHint() const
+    {
+        return sh;
+    }
+
+protected:
+
+    // Draw the contents of the TQFrame - the movie and on-screen-display
+    void drawContents(TQPainter* p)
+    {
+        // Get the current movie frame.
+        TQPixmap pm = movie.framePixmap();
+
+        // Get the area we have to draw in.
+        TQRect r = contentsRect();
+
+        if ( !pm.isNull() ) {
+            // Only rescale is we need to - it can take CPU!
+            if ( r.size() != pm.size() ) {
+                TQWMatrix m;
+                m.scale((double)r.width()/pm.width(),
+                        (double)r.height()/pm.height());
+                pm = pm.xForm(m);
+            }
+
+            // Draw the [possibly scaled] frame.  movieUpdated() below calls
+            // repaint with only the changed area, so clipping will ensure we
+            // only do the minimum amount of rendering.
+            //
+            p->drawPixmap(r.x(), r.y(), pm);
+        }
+
+
+        // The on-screen display
+
+        const char* message = 0;
+
+        if (movie.paused()) {
+            message = "PAUSED";
+        } else if (movie.finished()) {
+            message = "THE END";
+        } else if (movie.steps() > 0) {
+            message = "FF >>";
+        }
+
+        if (message) {
+            // Find a good font size...
+            p->setFont(TQFont("Helvetica", 24));
+
+            TQFontMetrics fm = p->fontMetrics();
+            if ( fm.width(message) > r.width()-10 )
+                p->setFont(TQFont("Helvetica", 18));
+
+            fm = p->fontMetrics();
+            if ( fm.width(message) > r.width()-10 )
+                p->setFont(TQFont("Helvetica", 14));
+
+            fm = p->fontMetrics();
+            if ( fm.width(message) > r.width()-10 )
+                p->setFont(TQFont("Helvetica", 12));
+
+            fm = p->fontMetrics();
+            if ( fm.width(message) > r.width()-10 )
+                p->setFont(TQFont("Helvetica", 10));
+
+            // "Shadow" effect.
+            p->setPen(black);
+            p->drawText(1, 1, width()-1, height()-1, AlignCenter, message);
+            p->setPen(white);
+            p->drawText(0, 0, width()-1, height()-1, AlignCenter, message);
+        }
+    }
+
+public slots:
+    void restart()
+    {
+        movie.restart();
+        repaint();
+    }
+
+    void togglePause()
+    {
+        if ( movie.paused() )
+            movie.unpause();
+        else
+            movie.pause();
+        repaint();
+    }
+
+    void step()
+    {
+        movie.step();
+        repaint();
+    }
+
+    void step10()
+    {
+        movie.step(10);
+        repaint();
+    }
+
+private slots:
+    void movieUpdated(const TQRect& area)
+    {
+        if (!isVisible())
+            show();
+
+        // The given area of the movie has changed.
+
+        TQRect r = contentsRect();
+
+        if ( r.size() != movie.framePixmap().size() ) {
+            // Need to scale - redraw whole frame.
+            repaint( r );
+        } else {
+            // Only redraw the changed area of the frame
+            repaint( area.x()+r.x(), area.y()+r.x(),
+                     area.width(), area.height() );
+        }
+    }
+
+    void movieResized(const TQSize& size)
+    {
+        // The movie changed size, probably from its initial zero size.
+
+        int fw = frameWidth();
+        sh = TQSize( size.width() + fw*2, size.height() + fw*2 );
+        updateGeometry();
+        if ( parentWidget() && parentWidget()->isHidden() )
+            parentWidget()->show();
+    }
+
+    void movieStatus(int status)
+    {
+        // The movie has sent us a status message.
+
+        if (status < 0) {
+            TQString msg;
+            msg.sprintf("Could not play movie \"%s\"", (const char*)filename);
+            TQMessageBox::warning(this, "movies", msg);
+            parentWidget()->close();
+        } else if (status == TQMovie::Paused || status == TQMovie::EndOfMovie) {
+            repaint(); // Ensure status text is displayed
+        }
+    }
+};
+
+class MoviePlayer : public TQVBox {
+    MovieScreen* movie;
+public:
+    MoviePlayer(const char* fname, TQMovie m, TQWidget* p=0, const char* name=0, WFlags f=0) :
+        TQVBox(p,name,f)
+    {
+        movie = new MovieScreen(fname, m, this);
+        TQHBox* hb = new TQHBox(this);
+        TQPushButton* btn;
+        btn = new TQPushButton("<<", hb);
+        connect(btn, SIGNAL(clicked()), movie, SLOT(restart()));
+        btn = new TQPushButton("||", hb);
+        connect(btn, SIGNAL(clicked()), movie, SLOT(togglePause()));
+        btn = new TQPushButton(">|", hb);
+        connect(btn, SIGNAL(clicked()), movie, SLOT(step()));
+        btn = new TQPushButton(">>|", hb);
+        connect(btn, SIGNAL(clicked()), movie, SLOT(step10()));
+    }
+};
+
+
+// A TQFileDialog that chooses movies.
+//
+class MovieStarter: public TQFileDialog {
+    Q_OBJECT
+public:
+    MovieStarter(const char *dir);
+
+public slots:
+    void startMovie(const TQString& filename);
+    // TQDialog's method - normally closes the file dialog.
+    // We want it left open, and we want Cancel to tquit everything.
+    void done( int r );
+};
+
+
+MovieStarter::MovieStarter(const char *dir)
+    : TQFileDialog(dir, "*.gif *.mng")
+{
+    //behave as in getOpenFilename
+    setMode( ExistingFile );
+    // When a file is selected, show it as a movie.
+    connect(this, SIGNAL(fileSelected(const TQString&)),
+            this, SLOT(startMovie(const TQString&)));
+}
+
+
+void MovieStarter::startMovie(const TQString& filename)
+{
+    if ( filename ) // Start a new movie - have it delete when closed.
+        (new MoviePlayer( filename, TQMovie(filename), 0, 0,
+                               WDestructiveClose))->show();
+}
+
+void MovieStarter::done( int r )
+{
+    if (r != Accepted)
+        qApp->tquit(); // end on Cancel
+    setResult( r );
+
+    // And don't hide.
+}
+
+
+int main(int argc, char **argv)
+{
+    TQApplication a(argc, argv);
+
+    if (argc > 1) {
+        // Commandline mode - show movies given on the command line
+        //
+        bool gui=TRUE;
+        for (int arg=1; arg<argc; arg++) {
+            if ( TQString(argv[arg]) == "-i" )
+                gui = !gui;
+            else if ( gui )
+                (void)new MoviePlayer(argv[arg], TQMovie(argv[arg]), 0, 0,
+                                      TQt::WDestructiveClose);
+            else
+                (void)new MovieScreen(argv[arg], TQMovie(argv[arg]), 0, 0,
+                                      TQt::WDestructiveClose);
+        }
+        TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(tquit()));
+    } else {
+        // "GUI" mode - open a chooser for movies
+        //
+        MovieStarter* fd = new MovieStarter(".");
+        fd->show();
+    }
+
+    // Go!
+    return a.exec();
+}
+
+#include "main.moc"
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/multimedia.html b/doc/html/multimedia.html new file mode 100644 index 00000000..c59b7e63 --- /dev/null +++ b/doc/html/multimedia.html @@ -0,0 +1,52 @@ + + + + + +Multimedia Classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Multimedia Classes

+ + +

These classes provide support for graphics, sound, animation etc. + +

+
TQImageConsumerAbstraction used by TQImageDecoder +
TQImageDecoderIncremental image decoder for all supported image formats +
TQImageFormatIncremental image decoder for a specific image format +
TQImageFormatTypeFactory that makes TQImageFormat objects +
TQMovieIncremental loading of animations or images, signalling as it progresses +
TQSoundAccess to the platform audio facilities +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/mw-addmainwidg.png b/doc/html/mw-addmainwidg.png new file mode 100644 index 00000000..69d1742a Binary files /dev/null and b/doc/html/mw-addmainwidg.png differ diff --git a/doc/html/mw-coloriconv.png b/doc/html/mw-coloriconv.png new file mode 100644 index 00000000..6224d557 Binary files /dev/null and b/doc/html/mw-coloriconv.png differ diff --git a/doc/html/mw-colortable.png b/doc/html/mw-colortable.png new file mode 100644 index 00000000..aa3f629c Binary files /dev/null and b/doc/html/mw-colortable.png differ diff --git a/doc/html/mw-colortool1.png b/doc/html/mw-colortool1.png new file mode 100644 index 00000000..0adaec9a Binary files /dev/null and b/doc/html/mw-colortool1.png differ diff --git a/doc/html/mw-colortool2.png b/doc/html/mw-colortool2.png new file mode 100644 index 00000000..0ef22395 Binary files /dev/null and b/doc/html/mw-colortool2.png differ diff --git a/doc/html/mw-conn1.png b/doc/html/mw-conn1.png new file mode 100644 index 00000000..a48ec627 Binary files /dev/null and b/doc/html/mw-conn1.png differ diff --git a/doc/html/mw-conn2.png b/doc/html/mw-conn2.png new file mode 100644 index 00000000..43f38fe8 Binary files /dev/null and b/doc/html/mw-conn2.png differ diff --git a/doc/html/mw-conn3.png b/doc/html/mw-conn3.png new file mode 100644 index 00000000..387befac Binary files /dev/null and b/doc/html/mw-conn3.png differ diff --git a/doc/html/mw-conn4.png b/doc/html/mw-conn4.png new file mode 100644 index 00000000..5b4eec39 Binary files /dev/null and b/doc/html/mw-conn4.png differ diff --git a/doc/html/mw-dragaction.png b/doc/html/mw-dragaction.png new file mode 100644 index 00000000..54e4717e Binary files /dev/null and b/doc/html/mw-dragaction.png differ diff --git a/doc/html/mw-dragviewitem.png b/doc/html/mw-dragviewitem.png new file mode 100644 index 00000000..2745a893 Binary files /dev/null and b/doc/html/mw-dragviewitem.png differ diff --git a/doc/html/mw-editforw.png b/doc/html/mw-editforw.png new file mode 100644 index 00000000..263f96c3 Binary files /dev/null and b/doc/html/mw-editforw.png differ diff --git a/doc/html/mw-editfunc.png b/doc/html/mw-editfunc.png new file mode 100644 index 00000000..cda5d89d Binary files /dev/null and b/doc/html/mw-editfunc.png differ diff --git a/doc/html/mw-editincimp.png b/doc/html/mw-editincimp.png new file mode 100644 index 00000000..cc37dbdd Binary files /dev/null and b/doc/html/mw-editincimp.png differ diff --git a/doc/html/mw-editvar.png b/doc/html/mw-editvar.png new file mode 100644 index 00000000..84122941 Binary files /dev/null and b/doc/html/mw-editvar.png differ diff --git a/doc/html/mw-laycoloriconv.png b/doc/html/mw-laycoloriconv.png new file mode 100644 index 00000000..76060469 Binary files /dev/null and b/doc/html/mw-laycoloriconv.png differ diff --git a/doc/html/mw-laycolortable.png b/doc/html/mw-laycolortable.png new file mode 100644 index 00000000..6d50142f Binary files /dev/null and b/doc/html/mw-laycolortable.png differ diff --git a/doc/html/mw-laymainwidg.png b/doc/html/mw-laymainwidg.png new file mode 100644 index 00000000..e82bd563 Binary files /dev/null and b/doc/html/mw-laymainwidg.png differ diff --git a/doc/html/mw-menuwiz.png b/doc/html/mw-menuwiz.png new file mode 100644 index 00000000..153a5f12 Binary files /dev/null and b/doc/html/mw-menuwiz.png differ diff --git a/doc/html/mw-newfile.png b/doc/html/mw-newfile.png new file mode 100644 index 00000000..6ce5edee Binary files /dev/null and b/doc/html/mw-newfile.png differ diff --git a/doc/html/mw-newmenuitem.png b/doc/html/mw-newmenuitem.png new file mode 100644 index 00000000..1dd96c64 Binary files /dev/null and b/doc/html/mw-newmenuitem.png differ diff --git a/doc/html/mw-objexplor.png b/doc/html/mw-objexplor.png new file mode 100644 index 00000000..f5c0974b Binary files /dev/null and b/doc/html/mw-objexplor.png differ diff --git a/doc/html/mw-previewform.png b/doc/html/mw-previewform.png new file mode 100644 index 00000000..0ad02628 Binary files /dev/null and b/doc/html/mw-previewform.png differ diff --git a/doc/html/mw-projset.png b/doc/html/mw-projset.png new file mode 100644 index 00000000..d6a7c551 Binary files /dev/null and b/doc/html/mw-projset.png differ diff --git a/doc/html/mw-propedit.png b/doc/html/mw-propedit.png new file mode 100644 index 00000000..c0423502 Binary files /dev/null and b/doc/html/mw-propedit.png differ diff --git a/doc/html/mw-separator.png b/doc/html/mw-separator.png new file mode 100644 index 00000000..bd99e081 Binary files /dev/null and b/doc/html/mw-separator.png differ diff --git a/doc/html/mw-settoolwiz.png b/doc/html/mw-settoolwiz.png new file mode 100644 index 00000000..4d86e92c Binary files /dev/null and b/doc/html/mw-settoolwiz.png differ diff --git a/doc/html/mw-startdesign.png b/doc/html/mw-startdesign.png new file mode 100644 index 00000000..9e245ffc Binary files /dev/null and b/doc/html/mw-startdesign.png differ diff --git a/doc/html/mw-toolbarpits.png b/doc/html/mw-toolbarpits.png new file mode 100644 index 00000000..e9a1faea Binary files /dev/null and b/doc/html/mw-toolbarpits.png differ diff --git a/doc/html/netscape-plugin.html b/doc/html/netscape-plugin.html new file mode 100644 index 00000000..7430efc6 --- /dev/null +++ b/doc/html/netscape-plugin.html @@ -0,0 +1,129 @@ + + + + + +TQt Netscape Plugin Extension + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Netscape Plugin Extension

+ + +

+

The TQt Netscape Plugin software makes it easy to write browser plugins +that can be used on both Unix/Linux and MS-Windows, in Netscape, +Mozilla, and any other web browser supporting Netscape's LiveConnect +protocol. Modern versions of MSIE do not support this protocol. Use +the ActiveTQt Framework to develop plugins for these browsers. +

Information +

+

The Netscape Plugin Extension consists of the follow classes: +

+

How-to +

+

    +
  1. Download the +Plugin SDK from Netscape, and copy the following files from there to +$QTDIR/extensions/nsplugin/src +
      +
    • common/npwin.cpp +
    • common/npunix.c +
    • include/npapi.h +
    • include/npupp.h +
    • include/jri.h +
    • include/jri_md.h +
    • include/jritypes.h +
    +
  2. Build the Netscape Plugin extension library, found in the +extensions/nsplugin/src directory of your TQt distribution. +This produces a static library to be linked with your plugin code. +
  3. Read the plugin class documentation, and +examine the example plugins. +
  4. Do most of your development as a stand-alone TQt application - debugging +Netscape Plugins is cumbersome. You may want to use signal(2) +in your plugin to enable core-dumps if your browser disables them. +
  5. Note the platform-specific build steps below. +
  6. Read about the raw plugin interface +in Netscape's handbook. +
  7. If files viewed by a plugin are provided by an HTTP server +(using a http://... URL) then +the server must be configured to send the correct MIME type +for the file, e.g. by editing Apache's mime.types file. +If the files are viewed via a //... +URL, then the browser will use the filename extension to decide +the file type (and hence the plugin to load) - the user may need +to set the filename extension in the Helpers or Applications +section of their browser preferences. +
+

Building under X11 +

+

    +
  • The Makefiles in the examples are appropriate for UNIX/X11. +
  • The user must install the resulting Shared Object in the Plugins +directory of the browser. +
+

Building under Windows +

+

    +
  • For Netscape plugins to work, TQt needs to be in the system DLL +path or be compiled into the plugin as a static library. +
  • Plugins must be named npname.dll, +or the browser will ignore them. +
  • The link step must include: +
      +
    • /def:name.def +
    • /dll +
    • a compiled resource file defining the +file/MIME types accepted by the plugin. +
    +
  • The user must install the resulting DLL in the Plugins directory +of the browser. +
+

Known Bugs and Limitations +

+

The TQt-based LiveConnect Plugin binding code has a number of bugs and +limitations, but is sufficiently stable for many production +applications. +

    +
  • Keyboard input only works in secondary windows (e.g. dialogs created by the plugin). +
  • You should not expect modality between the plugin and the browser to work. +
  • Netscape 4.78 on Unix/X11 tends to terminate with a bus error. +
  • Opaque resize behaviour is erratic due to browser behavior. +
+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/network-examples.html b/doc/html/network-examples.html new file mode 100644 index 00000000..c0041f76 --- /dev/null +++ b/doc/html/network-examples.html @@ -0,0 +1,53 @@ + + + + + +Network Examples + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Network Examples

+ + +

The following example programs demonstrate the use +of the TQt network module. +

+

+
A qt-interest mail archive search +
A small client-server example +
An FTP client +
A simple HTTP daemon +
A simple mail client +
A simple NNTP implementation +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/network.html b/doc/html/network.html new file mode 100644 index 00000000..1ee0b25d --- /dev/null +++ b/doc/html/network.html @@ -0,0 +1,466 @@ + + + + + +Network Module + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Network Module

+ + + +

+

+

+ + +

Introduction +

+

The network module offers classes to make network programming easier +and portable. Essentially, there are three sets of classes, first low +level classes like TQSocket, TQServerSocket, TQDns, etc. which +allow you to work in a portable way with TCP/IP sockets. In addition, +there are classes like TQNetworkProtocol, TQNetworkOperation in +the TQt base library, which provide an abstract layer for implementing +network protocols and TQUrlOperator which operates on such network +protocols. Finally the third set of network classes are the passive +ones, specifically TQUrl and TQUrlInfo which do URL parsing and +similar. +

The first set of classes (TQSocket, TQServerSocket, TQDns, TQFtp, etc.) are included in TQt's "network" module. +

The TQSocket classes are not directly related to the TQNetwork classes, +but TQSocket should and will be used for implementing network +protocols, which are directly related to the TQNetwork classes. For +example, the TQFtp class (which implements the FTP protocol) uses +TQSockets. But TQSockets don't need to be used for protocol +implementations, e.g. TQLocalFs (which is an implementation of the +local filesystem as network protocol) uses TQDir and doesn't use +TQSocket. Using TQNetworkProtocols you can implement everything which +fits into a hierarchical structure and can be accessed using URLs. +This could be, for example, a protocol which can read pictures from a +digital camera using a serial connection. +

Working Network Protocol independently with TQUrlOperator and TQNetworkOperation +

+

It is tquite easy to just use existing network protocol implementations +and operate on URLs. For example, downloading a file from an FTP +server to the local filesystem can be done with following code: +

+    TQUrlOperator op;
+    op.copy( "ftp://ftp.trolltech.com/qt/source/qt-2.1.0.tar.gz", "file:/tmp", FALSE );
+
+ +

And that's all! Of course an implementation of the FTP protocol has to +be available and registered for doing that. More information on that +later. +

You can also do things like creating directories, removing files, +renaming, etc. For example, to create a folder on a private FTP +account do +

+    TQUrlOperator op( "ftp://username:password@host.domain.no/home/username" );
+    op.mkdir( "New Directory" );
+
+ +

To see all available operations, look at the TQUrlOperator class +documentation. +

Since networking works asynchronously, the function call for an +operation will normally return before the operation has been +completed. This means that the function cannot return a value +indicating failure or success. Instead, the return value always is a +pointer to a TQNetworkOperation, and this object stores +all the information about the operation. +

For example, TQNetworkOperation has a method which returns the state +of this operation. Using this you can find out the state of the +operation at any time. The object also makes available the arguments +you passed to the TQUrlOperator method, the type of the operation +and some more information. For more details see the class +documentation of TQNetworkOperation. +

The TQUrlOperator emits signals to inform you about the progress of +the operations. As you can call many methods which operate on a TQUrlOperator's URL, it queues up all the operations. So you can't know +which operation the TQUrlOperator just processed. Clearly you will +want to know which operation just took place, so each signal's last +argument is a pointer to the TQNetworkOperation object which was +just processed and which caused the signal to be emitted. +

Some of these operations send a start() signal at the beginning (if +this makes sense), and some of them send some signals during +processing. All operations send a finished() signal after they are +done. To find that out if an operation finished successfully you can +use the TQNetworkOperation pointer you got with the finished() +signal. If TQNetworkOperation::state() equals TQNetworkProtocol::StDone the operation finished successfully, if it is +TQNetworkProtocol::StFailed the operation failed. +

Example: A slot which you might connect to the +TQUrlOperator::finished( TQNetworkOperation * ) +

+void MyClass::slotOperationFinished( TQNetworkOperation *op )
+{
+    switch ( op->operation() ) {
+    case TQNetworkProtocol::OpMkDir: 
+        if ( op->state() == TQNetworkProtocol::StFailed )
+            qDebug( "Couldn't create directory %s", op->arg( 0 ).latin1() );
+        else
+            qDebug( "Successfully created directory %s", op->arg( 0 ).latin1() );
+        break;
+    // ... and so on
+    }
+}
+
+ +

As mentioned earlier, some operations send other signals too. Let's +take the list children operation as an example (e.g. read a directory +on a FTP server): +

+TQUrlOperator op;
+
+MyClass::MyClass() : TQObject(), op( "ftp://ftp.trolltech.com" )
+{
+    connect( &op, SIGNAL( newChildren( const TQValueList<TQUrlInfo> &, TQNetworkOperation * ) ),
+             this, SLOT( slotInsertEntries( const TQValueList<TQUrlInfo> &, TQNetworkOperation * ) ) );
+    connect( &op, SIGNAL( start( TQNetworkOperation * ) ),
+             this, SLOT( slotStart( TQNetworkOperation *) ) );
+    connect( &op, SIGNAL( finished( TQNetworkOperation * ) ),
+             this, SLOT( slotFinished( TQNetworkOperation *) ) );
+}
+
+void MyClass::slotInsertEntries( const TQValueList<TQUrlInfo> &info, TQNetworkOperation * )
+{
+    TQValueList<TQUrlInfo>::ConstIterator it = info.begin();
+    for ( ; it != info.end(); ++it ) {
+        const TQUrlInfo &inf = *it;
+        qDebug( "Name: %s, Size: %d, Last Modified: %s",
+            inf.name().latin1(), inf.size(), inf.lastModified().toString().latin1() );
+    }
+}
+
+void MyClass::slotStart( TQNetworkOperation * )
+{
+    qDebug( "Start reading '%s'", op.toString().latin1() );
+}
+
+void MyClass::slotFinished( TQNetworkOperation *operation )
+{
+    if ( operation->operation() == TQNetworkProtocol::OpListChildren ) {
+        if ( operation->state() == TQNetworkProtocol::StFailed )
+            qDebug( "Couldn't read '%s'! Following error occurred: %s",
+                op.toString().latin1(), operation->protocolDetail().latin1() );
+        else
+            qDebug( "Finished reading '%s'!", op.toString().latin1() );
+    }
+}
+
+
+ +

These examples demonstrate now how to use the TQUrlOperator and TQNetworkOperations. The network extension also contains useful example +code. +

Implementing your own Network Protocol +

+

TQNetworkProtocol provides a base class for implementations +of network protocols and an architecture for the a dynamic +registration and de-registration of network protocols. If you use this +architecture you don't need to care about asynchronous programming, as +the architecture hides this and does all the work for you. +

Note It is difficult to design a base class for network protocols +which is useful for all network protocols. The architecture described +here is designed to work with all kinds of hierarchical structures, +like filesystems. So everything which can be interpreted as +hierarchical structure and accessed via URLs, can be implemented as +network protocol and easily used in TQt. This is not limited to +filesystems only! +

To implement a network protocol create a class derived from +TQNetworkProtocol. +

Other classes will use this network protocol implementation +to operate on it. So you should reimplement following protected members +

+    void TQNetworkProtocol::operationListChildren( TQNetworkOperation *op );
+    void TQNetworkProtocol::operationMkDir( TQNetworkOperation *op );
+    void TQNetworkProtocol::operationRemove( TQNetworkOperation *op );
+    void TQNetworkProtocol::operationRename( TQNetworkOperation *op );
+    void TQNetworkProtocol::operationGet( TQNetworkOperation *op );
+    void TQNetworkProtocol::operationPut( TQNetworkOperation *op );
+
+ +

Some notes on reimplementing these methods: You always get a pointer +to a TQNetworkOperation as argument. This pointer holds all the +information about the operation in the current state. If you start +processing such an operation, set the state to TQNetworkProtocol::StInProgress. If you finished processing the +operation, set the state to TQNetworkProtocol::StDone if it was +successful or TQNetworkProtocol::StFailed if an error occurred. If +an error occurred you must set an error code (see +TQNetworkOperation::setErrorCode()) and if you know some details +(e.g. an error message) you can also set this message to the operation +pointer (see TQNetworkOperation::setProtocolDetail()). Also you get +all the relevant information (type, arguments, etc.) about the +operation from the TQNetworkOperation pointer. For details about +which arguments you can get and set look at TQNetworkOperation's +class documentation. +

If you reimplement an operation function, it's very important to emit +the correct signals at the correct time: In general always emit finished() at the end of an operation (when you either successfully +finished processing the operation or an error occurred) with the +network operation as argument. The whole network architecture relies +on correctly emitted finished() signals! Then there are some more +specialized signals which are specific to operations: +

    +
  • Emit in operationListChildren: +
      +
    • start() just before starting to list the children +
    • newChildren() when new children are read +
    +
  • Emit in operationMkDir: +
      +
    • createdDirectory() after the directory has been created +
    • newChild() (or newChildren()) after the directory has been +created (since a new directory is a new child) +
    +
  • Emit in operationRemove: +
      +
    • removed() after a child has been removed +
    +
  • Emit in operationRename: +
      +
    • itemChanged() after a child has been renamed +
    +
  • Emit in operationGet: +
      +
    • data() each time new data has been read +
    • dataTransferProgress() each time new data has been read to +indicate how much of the data has been read now. +
    +
  • Emit in operationPut: +
      +
    • dataTransferProgress() each time data has been written to +indicate how much of the data has been written. Although you +know the whole data when this operation is called, it's +suggested not to write the whole data at once, but to do it +step by step to avoid blocking the GUI. Doing things +incrementally also means that progress can be made visible +to the user. +
    +
+

And remember, always emit the finished() signal at the end! +

For more details about these signals' arguments look at the TQNetworkProtocol class documentation. +

Here is a list of which TQNetworkOperation arguments you can get and +which you must set in which function: +

(To get the URL on which you should work, use the TQNetworkProtocol::url() method which returns a pointer to the URL +operator. Using that you can get the path, host, name filter, etc.) +

    +
  • In operationListChildren: +
      +
    • Nothing. +
    +
  • In operationMkDir: +
      +
    • TQNetworkOperation::arg( 0 ) contains the name of the directory which should be created +
    +
  • In operationRemove: +
      +
    • TQNetworkOperation::arg( 0 ) contains the name of the file +which should be removed. Normally this is a relative name. But +it could be absolute. Use TQUrl( op->arg( 0 ) ).fileName() +to get the filename. +
    +
  • In operationRename: +
      +
    • TQNetworkOperation::arg( 0 ) contains the name of the file +which should be renamed +
    • TQNetworkOperation::arg( 1 ) contains the name to which it +should be renamed. +
    +
  • In operationGet: +
      +
    • TQNetworkOperation::arg( 0 ) contains the full URL of the +file which should be retrieved. +
    +
  • In operationPut: +
      +
    • TQNetworkOperation::arg( 0 ) contains the full URL of the +file in which the data should be stored. +
    • TQNetworkOperation::rawArg( 1 ) contains the data which +should be stored in TQNetworkOperation::arg( 0 ) +
    +
+

In summary: If you reimplement an operation function, you must emit +some special signals and at the end you must always emit a finished() signal, regardless of success or failure. Also you must +change the state of the TQNetworkOperation during processing. You +can also get and set TQNetworkOperation arguments as the operation +progresses. +

It may occur that the network protocol you implement only retquires a +subset of these operations. In such cases, simply reimplement the +operations which are supported by the protocol. Additionally you must +specify which operations you support. This is achieved by +reimplementing +

+    int TQNetworkProtocol::supportedOperations() const;
+
+ +

In your implementation of this method return an int value +which is constructed by OR-ing together the correct values +(supported operations) of the following enum (of TQNetworkProtocol): +

    +
  • OpListChildren +
  • OpMkDir +
  • OpRemove +
  • OpRename +
  • OpGet +
  • OpPut +
+

For example, if your protocol supports listing children and renaming +them, your implementation of supportedOperations() should do this: +

+    return OpListChildren | OpRename;
+
+ +

The last method you must reimplement is +

+    bool TQNetworkProtocol::checkConnection( TQNetworkOperation *op );
+
+ +

Here you must return TRUE, if the connection is up and okay (this means +operations on the protocol can be done). If the connection is not okay, +return FALSE and start to try opening it. If you cannot open the +connection at all (e.g. because the host is not found), emit a finished() +signal and set an error code and the TQNetworkProtocol::StFailed state to +the TQNetworkOperation pointer you get here. +

Now, you never need to check before doing an operation yourself, if +the connection is okay. The network architecture does this, which +means it uses checkConnection() to see if an operation can be done +and if not, it tries it again and again for some time, only calling an +operation function if the connection is okay. +

To be able to use a network protocol with a TQUrlOperator (and so, for +example, in the TQFileDialog), you must register the network +protocol implementation. This can be done like this: +

+    TQNetworkProtocol::registerNetworkProtocol( "myprot", new TQNetworkProtocolFactory<MyProtocol> );
+
+ +

In this case MyProtocol would be a class you implemented as +described here (derived from TQNetworkProtocol) and the name of the +protocol would be "myprot". So to use it, you would do something like +

+    TQUrlOperator op( "myprot://host/path" );
+    op.listChildren();
+
+ +

Finally, as example of a network protocol implementation you could +look at the implementation of TQLocalFs. The network extension also +contains an example implementation of a network protocol. +

Error Handling +

+

Error handling is important for both implementing new network +protocols for and using them (through TQUrlOperator). +

After processing an operation has been finished the network operation +the TQUrlOperator emits the finished() signal. This has as argument +a pointer to the processed TQNetworkOperation. If the state of this +operation is TQNetworkProtocol::StFailed, the operation contains +some more information about this error. The following error codes are +defined in TQNetworkProtocol: +

+
Error Meaning +
TQNetworkProtocol::NoError +No error occurred +
TQNetworkProtocol::ErrValid +The URL you are operating on is not valid +
TQNetworkProtocol::ErrUnknownProtocol +There is no protocol implementation available for the protocol +of the URL you are operating on (e.g. if the protocol is http +and no http implementation has been registered) +
TQNetworkProtocol::ErrUnsupported +The operation is not supported by the protocol +
TQNetworkProtocol::ErrParse +Parse error of the URL +
TQNetworkProtocol::ErrLoginIncorrect +You needed to login but the username or password are wrong +
TQNetworkProtocol::ErrHostNotFound +The specified host (in the URL) couldn't be found +
TQNetworkProtocol::ErrListChildren +An error occurred while listing the children +
TQNetworkProtocol::ErrMkDir +An error occurred when creating a directory +
TQNetworkProtocol::ErrRemove +An error occurred while removing a child +
TQNetworkProtocol::ErrRename +An error occurred while renaming a child +
TQNetworkProtocol::ErrGet +An error occurred while getting (retrieving) data +
TQNetworkProtocol::ErrPut +An error occurred while putting (uploading) data +
TQNetworkProtocol::ErrFileNotExisting +A file which is needed by the operation doesn't exist +
TQNetworkProtocol::ErrPermissionDenied +The permission for doing the operation has been denied +
+

TQNetworkOperation::errorCode() returns one of these codes or +perhaps a different one if you use your an own network protocol +implementation which defines additional error codes. +

TQNetworkOperation::protocolDetails() may also return a string which +contains an error message then which might be suitable for display to +the user. +

If you implement your own network protocol, you must report any +errors which occurred. First you always need to be able to +access the TQNetworkOperation which is being processed at the +moment. This is done using TQNetworkOperation::operationInProgress(), which returns a pointer to +the current network operation or 0 if no operation is processed at the +moment. +

Now if an error occurred and you need to handle it, do this: +

+    if ( operationInProgress() ) {
+        operationInProgress()->setErrorCode( error_code_of_your_error );
+        operationInProgress()->setProtocolDetails( detail ); // optional
+        emit finished( operationInProgress() );
+        return;
+    }
+
+ +

That's all. The connection to the TQUrlOperator and so on is done +automatically. Additionally, if the error was really bad so that no +more operations can be done in the current state (e.g. if the host +couldn't be found), call TQNetworkProtocol::clearOperationStack() before emitting finished(). +

Ideally you should use one of the predefined error codes of TQNetworkProtocol. If this is not possible, you can add own error codes +- they are just normal ints. Just be careful that the value of the +error code doesn't conflict with an existing one. +

An example to look at is in qt/examples/network/ftpclient. +This is the implementation of a fairly complete FTP client, which +supports uploading and downloading files, making directories, etc., +all done using TQUrlOperators. +

You might also like to look at TQFtp (in qt/src/network/qftp.cpp) or at +the example in qt/examples/network/networkprotocol/nntp.cpp. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/networkprotocol-example.html b/doc/html/networkprotocol-example.html new file mode 100644 index 00000000..ef15570d --- /dev/null +++ b/doc/html/networkprotocol-example.html @@ -0,0 +1,364 @@ + + + + + +A simple NNTP implementation + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A simple NNTP implementation

+ + +

+

This example shows how to implement your own TQNetworkProtocol. The +protocol that was chosen for this example is NTTP. Please note that this +implementation is very simple since it is designed to be an example. It +should not be used as a real NNTP implemention. +


+

Header file (nntp.h): +

/****************************************************************************
+** $Id: qt/nntp.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef NNTP_H
+#define NNTP_H
+
+#include <qsocket.h>
+#include <qnetworkprotocol.h>
+
+class Nntp : public TQNetworkProtocol
+{
+    Q_OBJECT
+
+public:
+    Nntp();
+    virtual ~Nntp();
+    virtual int supportedOperations() const;
+
+protected:
+    virtual void operationListChildren( TQNetworkOperation *op );
+    virtual void operationGet( TQNetworkOperation *op );
+
+    TQSocket *commandSocket;
+    bool connectionReady;
+    bool readGroups;
+    bool readArticle;
+
+private:
+    bool checkConnection( TQNetworkOperation *op );
+    void close();
+    void parseGroups();
+    void parseArticle();
+
+protected slots:
+    void hostFound();
+    void connected();
+    void closed();
+    void readyRead();
+    void error( int );
+
+};
+
+#endif
+
+ +


+

Implementation (nntp.cpp): +

/****************************************************************************
+** $Id: qt/nntp.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "nntp.h"
+#include <qurlinfo.h>
+#include <stdlib.h>
+#include <qurloperator.h>
+#include <qstringlist.h>
+#include <qregexp.h>
+
+Nntp::Nntp()
+    : TQNetworkProtocol(), connectionReady( FALSE ),
+      readGroups( FALSE ), readArticle( FALSE )
+{
+    // create the command socket and connect to its signals
+    commandSocket = new TQSocket( this );
+    connect( commandSocket, SIGNAL( hostFound() ),
+             this, SLOT( hostFound() ) );
+    connect( commandSocket, SIGNAL( connected() ),
+             this, SLOT( connected() ) );
+    connect( commandSocket, SIGNAL( connectionClosed() ),
+             this, SLOT( closed() ) );
+    connect( commandSocket, SIGNAL( readyRead() ),
+             this, SLOT( readyRead() ) );
+    connect( commandSocket, SIGNAL( error( int ) ),
+             this, SLOT( error( int ) ) );
+}
+
+Nntp::~Nntp()
+{
+    close();
+    delete commandSocket;
+}
+
+void Nntp::operationListChildren( TQNetworkOperation * )
+{
+    // create a command
+    TQString path = url()->path(), cmd;
+    if ( path.isEmpty() || path == "/" ) {
+        // if the path is empty or we are in the root dir,
+        // we want to read the list of available newsgroups
+        cmd = "list newsgroups\r\n";
+    } else if ( url()->isDir() ) {
+        // if the path is a directory (in our case a news group)
+        // we want to list the articles of this group
+        path = path.replace( "/", "" );
+        cmd = "listgroup " + path + "\r\n";
+    } else
+        return;
+
+    // write the command to the socket
+    commandSocket->writeBlock( cmd.latin1(), cmd.length() );
+    readGroups = TRUE;
+}
+
+void Nntp::operationGet( TQNetworkOperation *op )
+{
+    // get the dirPath of the URL (this is our news group)
+    // and the filename (which is the article we want to read)
+    TQUrl u( op->arg( 0 ) );
+    TQString dirPath = u.dirPath(), file = u.fileName();
+    dirPath = dirPath.replace( "/", "" );
+
+    // go to the group in which the article is
+    TQString cmd;
+    cmd = "group " + dirPath + "\r\n";
+    commandSocket->writeBlock( cmd.latin1(), cmd.length() );
+
+    // read the head of the article
+    cmd = "article " + file + "\r\n";
+    commandSocket->writeBlock( cmd.latin1(), cmd.length() );
+    readArticle = TRUE;
+}
+
+bool Nntp::checkConnection( TQNetworkOperation * )
+{
+    // we are connected, return TRUE
+    if ( commandSocket->isOpen() && connectionReady )
+        return TRUE;
+
+    // seems that there is no chance to connect
+    if ( commandSocket->isOpen() )
+        return FALSE;
+
+    // don't call connectToHost() if we are already trying to connect
+    if ( commandSocket->state() == TQSocket::Connecting )
+        return FALSE;
+
+    // start connecting
+    connectionReady = FALSE;
+    commandSocket->connectToHost( url()->host(),
+                                  url()->port() != -1 ? url()->port() : 119 );
+    return FALSE;
+}
+
+void Nntp::close()
+{
+    // close the command socket
+    if ( commandSocket->isOpen() ) {
+        commandSocket->writeBlock( "tquit\r\n", strlen( "tquit\r\n" ) );
+        commandSocket->close();
+    }
+}
+
+int Nntp::supportedOperations() const
+{
+    // we only support listing children and getting data
+    return OpListChildren | OpGet;
+}
+
+void Nntp::hostFound()
+{
+    if ( url() )
+        emit connectionStateChanged( ConHostFound, tr( "Host %1 found" ).arg( url()->host() ) );
+    else
+        emit connectionStateChanged( ConHostFound, tr( "Host found" ) );
+}
+
+void Nntp::connected()
+{
+    if ( url() )
+        emit connectionStateChanged( ConConnected, tr( "Connected to host %1" ).arg( url()->host() ) );
+    else
+        emit connectionStateChanged( ConConnected, tr( "Connected to host" ) );
+}
+
+void Nntp::closed()
+{
+    if ( url() )
+        emit connectionStateChanged( ConClosed, tr( "Connection to %1 closed" ).arg( url()->host() ) );
+    else
+        emit connectionStateChanged( ConClosed, tr( "Connection closed" ) );
+}
+
+void Nntp::readyRead()
+{
+    // new data arrived on the command socket
+
+    // of we should read the list of available groups, let's do so
+    if ( readGroups ) {
+        parseGroups();
+        return;
+    }
+
+    // of we should read an article, let's do so
+    if ( readArticle ) {
+        parseArticle();
+        return;
+    }
+
+    // read the new data from the socket
+    TQCString s;
+    s.resize( commandSocket->bytesAvailable() + 1 );
+    commandSocket->readBlock( s.data(), commandSocket->bytesAvailable() );
+
+    if ( !url() )
+        return;
+
+    // of the code of the server response was 200, we know that the
+    // server is ready to get commands from us now
+    if ( s.left( 3 ) == "200" )
+        connectionReady = TRUE;
+}
+
+void Nntp::parseGroups()
+{
+    if ( !commandSocket->canReadLine() )
+        return;
+
+    // read one line after the other
+    while ( commandSocket->canReadLine() ) {
+        TQString s = commandSocket->readLine();
+
+        // if the  line starts with a dot, all groups or articles have been listed,
+        // so we finished processing the listChildren() command
+        if ( s[ 0 ] == '.' ) {
+            readGroups = FALSE;
+            operationInProgress()->setState( StDone );
+            emit finished( operationInProgress() );
+            return;
+        }
+
+        // if the code of the server response is 215 or 211
+        // the next line will be the first group or article (depending on what we read).
+        // So let others know that we start reading now...
+        if ( s.left( 3 ) == "215" || s.left( 3 ) == "211" ) {
+            operationInProgress()->setState( StInProgress );
+            emit start( operationInProgress() );
+            continue;
+        }
+
+        // parse the line and create a TQUrlInfo object
+        // which describes the child (group or article)
+        bool tab = s.find( '\t' ) != -1;
+        TQString group = s.mid( 0, s.find( tab ? '\t' : ' ' ) );
+        TQUrlInfo inf;
+        inf.setName( group );
+        TQString path = url()->path();
+        inf.setDir( path.isEmpty() || path == "/" );
+        inf.setSymLink( FALSE );
+        inf.setFile( !inf.isDir() );
+        inf.setWritable( FALSE );
+        inf.setReadable( TRUE );
+
+        // let others know about our new child
+        emit newChild( inf, operationInProgress() );
+    }
+
+}
+
+void Nntp::parseArticle()
+{
+    if ( !commandSocket->canReadLine() )
+        return;
+
+    // read an article one line after the other
+    while ( commandSocket->canReadLine() ) {
+        TQString s = commandSocket->readLine();
+
+        // if the  line starts with a dot, we finished reading something
+        if ( s[ 0 ] == '.' ) {
+            readArticle = FALSE;
+            operationInProgress()->setState( StDone );
+            emit finished( operationInProgress() );
+            return;
+        }
+
+        if ( s.right( 1 ) == "\n" )
+            s.remove( s.length() - 1, 1 );
+
+        // emit the new data of the article which we read
+        emit data( TQCString( s.ascii() ), operationInProgress() );
+    }
+}
+
+void Nntp::error( int code )
+{
+    if ( code == TQSocket::ErrHostNotFound ||
+         code == TQSocket::ErrConnectionRefused ) {
+        // this signal is called if connecting to the server failed
+        if ( operationInProgress() ) {
+            TQString msg = tr( "Host not found or couldn't connect to: \n" + url()->host() );
+            operationInProgress()->setState( StFailed );
+            operationInProgress()->setProtocolDetail( msg );
+            operationInProgress()->setErrorCode( (int)ErrHostNotFound );
+            clearOperationQueue();
+            emit finished( operationInProgress() );
+        }
+    }
+}
+
+ +

See also Network Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/next.png b/doc/html/next.png new file mode 100644 index 00000000..7434fa21 Binary files /dev/null and b/doc/html/next.png differ diff --git a/doc/html/nextunfinished.png b/doc/html/nextunfinished.png new file mode 100644 index 00000000..618fc947 Binary files /dev/null and b/doc/html/nextunfinished.png differ diff --git a/doc/html/nsplugin-examples.html b/doc/html/nsplugin-examples.html new file mode 100644 index 00000000..403beff2 --- /dev/null +++ b/doc/html/nsplugin-examples.html @@ -0,0 +1,51 @@ + + + + + +Netscape Plugin Examples + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Netscape Plugin Examples

+ + +

The following example programs show how to write plugins +that can be used with web browsers supporting the LiveConnect +protocol. +

For more information see the Plugin Howto. + +

+
Grapher Plugin +
Trivial Example +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/object.html b/doc/html/object.html new file mode 100644 index 00000000..ceb8cffb --- /dev/null +++ b/doc/html/object.html @@ -0,0 +1,78 @@ + + + + + +TQt Object Model + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Object Model

+ + + +

The standard C++ Object Model provides very efficient runtime support +for the object paradigm. But the C++ Object Model's static nature is +inflexibile in certain problem domains. Graphical User Interface +programming is a domain that retquires both runtime efficiency and a +high level of flexibility. TQt provides this, by combining the speed of +C++ with the flexibility of the TQt Object Model. +

TQt adds these features to C++: +

+

Many of these TQt features are implemented with standard C++ +techniques, based on inheritance from TQObject. Others, like the +object communication mechanism and the dynamic property system, +retquire the Meta Object System provided +by TQt's own Meta Object Compiler (moc). +

The Meta Object System is a C++ extension that makes the language +better suited to true component GUI programming. Although templates can +be used to extend C++, the Meta Object System provides benefits using +standard C++ that cannot be achieved with templates; see Why doesn't TQt use templates for signals and +slots?. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/objectmodel.html b/doc/html/objectmodel.html new file mode 100644 index 00000000..d4786549 --- /dev/null +++ b/doc/html/objectmodel.html @@ -0,0 +1,52 @@ + + + + + +Object Model + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Object Model

+ + +

These classes form the basis of the TQt Object Model. +

+

+
TQGuardedPtrTemplate class that provides guarded pointers to TQObjects +
TQMetaObjectMeta information about TQt objects +
TQMetaPropertyStores meta data about a property +
TQObjectThe base class of all TQt objects +
TQObjectCleanupHandlerWatches the lifetime of multiple TQObjects +
TQVariantActs like a union for the most common TQt data types +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/objecttrees.html b/doc/html/objecttrees.html new file mode 100644 index 00000000..a7ea7c3a --- /dev/null +++ b/doc/html/objecttrees.html @@ -0,0 +1,68 @@ + + + + + +Object Trees and Object Ownership + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Object Trees and Object Ownership

+ + + +

TQObjects organize themselves in object trees. +When you create a TQObject with another object as parent, it's added to +the parent's children() list, and +is deleted when the parent is. It turns out that this approach fits +the needs of GUI objects very well. For example, a TQAccel (keyboard +accelerator) is a child of the relevant window, so when the user closes +that window, the accelerator is deleted too. +

The static function TQObject::objectTrees() provides access to all +the root objects that currently exist. +

TQWidget, the base class of everything that appears on the screen, +extends the parent-child relationship. A child normally also becomes a +child widget, i.e. it is displayed in its parent's coordinate system +and is graphically clipped by its parent's boundaries. For example, +when the an application deletes a message box after it has been +closed, the message box's buttons and label are also deleted, just as +we'd want, because the buttons and label are children of the message +box. +

You can also delete child objects yourself, and they will remove +themselves from their parents. For example, when the user removes a +toolbar it may lead to the application deleting one of its TQToolBar +objects, in which case the tool bar's TQMainWindow parent would +detect the change and reconfigure its screen space accordingly. +

The debugging functions TQObject::dumpObjectTree() and TQObject::dumpObjectInfo() are often useful when an application looks or +acts strangely. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/opengl-box-example.html b/doc/html/opengl-box-example.html new file mode 100644 index 00000000..36393d0f --- /dev/null +++ b/doc/html/opengl-box-example.html @@ -0,0 +1,50 @@ + + + + + +OpenGL Box Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

OpenGL Box Example

+ + +

+This example demonstrates how to use OpenGL in TQt. +

Essentially, all you do is put your OpenGL code in a class inherited +from TQGLWidget. This class may then be used like any other TQt widget, +including the use of signals and slots and geometry management. +

See $QTDIR/examples/opengl/box for the source code. +

See also OpenGL Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/opengl-examples.html b/doc/html/opengl-examples.html new file mode 100644 index 00000000..cd606fb3 --- /dev/null +++ b/doc/html/opengl-examples.html @@ -0,0 +1,54 @@ + + + + + +OpenGL Examples + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

OpenGL Examples

+ + +

The following example programs demonstrate the use +of the TQt OpenGL module. +

+

+
OpenGL Box Example +
OpenGL Gear Example +
OpenGL Overlay Example +
OpenGL Overlay X11 Example +
OpenGL Pixmap Example +
OpenGL Shared Box Example +
OpenGL Texture Example +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/opengl-gear-example.html b/doc/html/opengl-gear-example.html new file mode 100644 index 00000000..5e3b221c --- /dev/null +++ b/doc/html/opengl-gear-example.html @@ -0,0 +1,47 @@ + + + + + +OpenGL Gear Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

OpenGL Gear Example

+ + +

+This example demonstrates how to use OpenGL display lists. +

See $QTDIR/examples/opengl/gear for the source code. +

See also OpenGL Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/opengl-overlay-example.html b/doc/html/opengl-overlay-example.html new file mode 100644 index 00000000..16ab9e1d --- /dev/null +++ b/doc/html/opengl-overlay-example.html @@ -0,0 +1,52 @@ + + + + + +OpenGL Overlay Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

OpenGL Overlay Example

+ + +

+This example demonstrates how to use OpenGL overlays with the TQt OpenGL +Extension. It features a TQGLWidget with a relatively expensive redrawing +operation, and rubber-band drawing in the overlay plane. Using the +overlay has the advantage that the rubber-band may be drawn and erased +without damaging the image in the main plane, so costly redraws are +avoided. +

See $QTDIR/examples/opengl/overlay for the source code. +

See also OpenGL Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/opengl-overlay-x11-example.html b/doc/html/opengl-overlay-x11-example.html new file mode 100644 index 00000000..554f6e79 --- /dev/null +++ b/doc/html/opengl-overlay-x11-example.html @@ -0,0 +1,105 @@ + + + + + +OpenGL Overlay X11 Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

OpenGL Overlay X11 Example

+ + +

+Warning: From version 5.0 onwards, the TQt OpenGL Extension includes +direct support for use of OpenGL overlays. For many uses of overlays, +this makes the technique described below redundant. See the overlay example program. The +following is a discussion on how to use non-TQGL widgets in overlay +planes. +

Overlayrubber: An example program showing how to use TQt and TQt OpenGL +Extension with X11 overlay visuals. +

See $QTDIR/examples/opengl/overlay_x11 for the source code. +

Background information for this example can be found in the +information on overlays. +

The example program has three main parts: +

    +
  1. GearWidget - a normal, simple TQGLWidget. This renders the usual +gears. It has been modified to print a debug message every time it +redraws (renders) itself. Thus, you can easily confirm that drawing in +the overlay plane does not cause redrawings in the main plane where +the TQGLWidget resides. +

  2. RubberbandWidget - Very simple standard (non-GL) TQt widget that +implements rubberband drawing. Designed for use in an overlay plane. +It takes the plane's transparent color as a constructor argument and +uses that for its background color. Thus, the widget itself will be +invisible, only the rubberbands it draws will be visible. +

  3. main.cpp Creates a GearWidget and a Rubberbandwidget and puts the +latter on top of the former. Contains a routine that checks that the +default visual is in an overlay plane, and returns the transparent +color of that plane. +
+

Running the Example +

+

Start the overlayrubber executable. Click and drag with the left +mouse button to see rubberband drawing. Observe that the TQGLWidget +does not redraw itself (no redraw debug messages are output), and yet +the image is not destroyed. Marvel at the coolness of X11 overlays! +

Using this technique in a real application +

+

For clarity, this example program has been kept very simple. Here are +some hints for real application usage: +

    +

  • All normal widgets are in the overlay plane. This means that you +can put all kinds of TQt widgets (your own or standard TQt widgets) on +top of the OpenGL image (widget), e.g. pushbuttons etc., and they can +be moved, resized, or removed without destroying the OpenGL image. +

  • Using with geometry management. The TQLayout classes don't permit +putting one widget (the overlay) on top of another (the OpenGL +widget); that would defy the whole purpose of the automatic layout. +The solution is to add just one of them to the TQLayout object. Have it +keep a pointer to the other (i.e. the TQGLWidget knows about its +overlay widget or vice versa). Implement the resizeEvent() method of +the widget you put in the layout, and make it call setGeometry() on +the other widget with its own geometry as parameters, thus keeping the +two widgets' geometries synchronized. +

  • Using together with TQPalette and TQColorGroup. Instead of the +simplistic setBackgroundColor( transparentColor ), you can +use TQt's TQPalette system to make your overlay widgets use +transparent color for what you want. This way, the normal TQt widgets +can be used as overlays for fancy effects. Just create a palette for +them with the transparent color for the relevant color roles, e.g. +Background and Base, in the Normal and/or Active modes. This way, you +can create see-through TQPushButtons etc. +
+

See also OpenGL Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/opengl-pixmap-example.html b/doc/html/opengl-pixmap-example.html new file mode 100644 index 00000000..d9b1640e --- /dev/null +++ b/doc/html/opengl-pixmap-example.html @@ -0,0 +1,48 @@ + + + + + +OpenGL Pixmap Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

OpenGL Pixmap Example

+ + +

+This example program is an extension of the OpenGL Box example. +

It demonstrates how to render OpenGL into a TQPixmap. +

See $QTDIR/examples/opengl/glpixmap for the source code. +

See also OpenGL Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/opengl-sharedbox-example.html b/doc/html/opengl-sharedbox-example.html new file mode 100644 index 00000000..28166c32 --- /dev/null +++ b/doc/html/opengl-sharedbox-example.html @@ -0,0 +1,49 @@ + + + + + +OpenGL Shared Box Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

OpenGL Shared Box Example

+ + +

+This example program is an extension of the Box example. +

It demonstrates how to use OpenGL display list sharing with +TQGLWidgets. +

See $QTDIR/examples/opengl/sharedbox for the source code. +

See also OpenGL Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/opengl-texture-example.html b/doc/html/opengl-texture-example.html new file mode 100644 index 00000000..b3670df3 --- /dev/null +++ b/doc/html/opengl-texture-example.html @@ -0,0 +1,47 @@ + + + + + +OpenGL Texture Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

OpenGL Texture Example

+ + +

+This example program demonstrates how to use OpenGL 2D textures. +

See $QTDIR/examples/opengl/texture for the source code. +

See also OpenGL Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/opengl-x11-overlays.html b/doc/html/opengl-x11-overlays.html new file mode 100644 index 00000000..38158289 --- /dev/null +++ b/doc/html/opengl-x11-overlays.html @@ -0,0 +1,115 @@ + + + + + +How to use X11 overlays with the TQt OpenGL extension + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

How to use X11 overlays with the TQt OpenGL extension

+ + + +

X11 overlays are a powerful mechanism for drawing +annotations etc., on top of an image without destroying it, thus saving +a great deal of image rendering time. For more information, consult the highly +recommended book OpenGL Programming for the X Window System (Mark +Kilgard, Addison Wesley Developers Press 1996). +

Warning: From version 5.0 onwards, the TQt OpenGL Extension includes +direct support for the use of OpenGL overlays. For many uses of +overlays, this makes the technique described below redundant. See the +overlay example program. The +following is a discussion on how to use non-TQGL widgets in overlay +planes. +

In the typical case, X11 overlays can easily be used together with the +current version of TQt and the TQt OpenGL Extension. The following +retquirements apply: +

    +
  1. Your X server and graphics card/hardware must support overlays. +For many X servers, overlay support can be turned on with +a configuration option; consult your X server installation +documentation. +

  2. Your X server must (be configured to) use an overlay visual as the +default visual. Most modern X servers do this, since this has the +added advantage that pop-up menus, overlapping windows etc., will +not destroy underlying images in the main plane, thereby +avoiding expensive redraws. +

  3. The best (deepest) visual for OpenGL rendering is in the main +plane. This is the normal case. Typically, X servers that support +overlays provide a 24 bit deep TrueColor visual in the main plane, +and an 8 bit PseudoColor (default) visual in the overlay plane. +
+

The provided example program X11 +overlay will check for these and report if anything is wrong. +See About X11 Visuals, below for more +information. +

How it works +

+

Given the above, a TQGLWidget will by default use the main plane +visual, while all other widgets will use the overlay visual. Thus, we +can place a normal widget on top of the TQGLWidget, and do drawing on +it, without destroying the image in the OpenGL window. In other words, +we can use all the drawing capabilities of TQPainter to draw the +annotations, rubberbands, etc. For the typical use of overlays, +this is much easier than using OpenGL for rendering the annotations. +

An overlay plane has a specific color called the transparent +color. Pixels drawn in this color will not be visible; instead the +underlying OpenGL image will show through. In the example program +X11 overlay, the file +main.cpp contains a routine that returns a TQColor containing the +transparent color. For the overlay widget, you will typically want to +set the background color to the transparent color, so that the OpenGL +image shows through except where explicitly overpainted. +

Note: to use this technique, you must not use the "ManyColor" or +"TrueColor" ColorSpec for TQApplication, because this will force +the normal TQt widgets to use a TrueColor visual, which will typically +be in the main plane, not in the overlay plane as desired. +

+

About X11 visuals +

+

The utilities directory contains two small programs that can help you +determine the capabilities of your X server. These programs are from +the OpenGL book mentioned above, see utilities/NOTICE for copyright +information. The full set of example programs from this book is +available at ftp://ftp.sgi.com/pub/opengl/opengl_for_x/. +

glxvisuals will list all the GL-capable visuals the X server +provides, together with the depth and other GL-specific information +for each. Note especially the column "lvl"; a number in this column +means the visual is in an overlay plane. +

sovinfo will list all available visuals, and provides special +transparency information for overlay visuals. +

The X11 overlay example +program will output what visual is used for the normal TQt widgets, and +what visual is used by the TQGLWidget. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/opengl.html b/doc/html/opengl.html new file mode 100644 index 00000000..d1e73ba0 --- /dev/null +++ b/doc/html/opengl.html @@ -0,0 +1,105 @@ + + + + + +TQt OpenGL 3D Graphics + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt OpenGL 3D Graphics

+ + +

+

+

Introduction +

+

OpenGL is a standard API for rendering 3D graphics. +

OpenGL only deals with 3D rendering and provides little or no support +for GUI programming issues. The user interface for an +OpenGL* application must be created with another toolkit, +such as Motif on the X platform, Microsoft Foundation Classes (MFC) +under Windows, or TQt on both platforms. +

The TQt OpenGL module makes it easy to use OpenGL in TQt applications. +It provides an OpenGL widget class that can be used just like any +other TQt widget, except that it opens an OpenGL display buffer where +you can use the OpenGL API to render the contents. +

The TQt OpenGL module is implemented as a platform-independent TQt/C++ +wrapper around the platform-dependent GLX, WGL, or AGL C APIs. The +functionality provided is very similar to Mark Kilgard's GLUT library, +but with much more non-OpenGL-specific GUI functionality, i.e. the +whole TQt API. +

Installation +

+

When you install TQt for X11, the configure script will autodetect if +OpenGL headers and libraries are installed on your system, and if so, +it will include the TQt OpenGL module in the TQt library. (If your +OpenGL headers or libraries are placed in a non-standard directory, +you may need to change the QMAKE_INCDIR_OPENGL and/or +QMAKE_LIBDIR_OPENGL in the config file for your system). Some +configurations retquire threading to be enabled for OpenGL, so if +OpenGL is not detected, try configure -thread. +

When you install TQt for Windows, the TQt OpenGL module is always +included. +

The TQt OpenGL module is not licensed for use with the TQt Professional +Edition. Consider upgrading to the TQt Enterprise Edition if you +retquire OpenGL support. +

Note about using Mesa on X11: Mesa versions earlier than 3.1 would use +the name "MesaGL" and "MesaGLU" for the libraries, instead of "GL" and +"GLU". If you want to use a pre-3.1 version of Mesa, you must change +the Makefiles to use these library names instead. The easiest way to +do this is to edit the QMAKE_LIBS_OPENGL line in the config file you +are using, changing "-lGL -lGLU" to "-lMesaGL -lMesaGLU"; then run +"configure" again. +

The TQGL Classes +

+

The OpenGL support classes in TQt are: +

    +
  • TQGLWidget: An easy-to-use TQt +widget for rendering OpenGL scenes. +
  • TQGLContext: Encapsulates an OpenGL rendering context. +
  • TQGLFormat: Specifies the +display format of a rendering context. +
  • TQGLColormap: Handles indexed +colormaps in GL-index mode. +
+

Many applications only need the high-level TQGLWidget class. The other +TQGL classes provide advanced features. X11 users might like to read +the notes on overlays. +

See also the OpenGL examples. +

The TQGL documentation assumes that you are familiar with OpenGL +programming. If you're new to the subject a good starting point is +http://www.opengl.org/. +

* OpenGL is a trademark of Silicon Graphics, Inc. in the +United States and other countries. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/opensourceedition.html b/doc/html/opensourceedition.html new file mode 100644 index 00000000..c317d615 --- /dev/null +++ b/doc/html/opensourceedition.html @@ -0,0 +1,100 @@ + + + + + +TQt Open Source Edition + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Open Source Edition

+ + +

+

Open source software (also called "free software") is software that comes +with a license that gives users certain rights. In particular the right to +use the software, to modify it, to obtain its source, and to pass it on +(under the same terms). +

Trolltech supports the open source software concept by providing the TQt Open Source +Edition. You can use this edition of TQt to create open source software, i.e. +software that is licensed under the GNU GPL or a similarly recognized +open source license. Trolltech's support of open source with the TQt Open Source +Edition has enabled large successful software projects like KDE, to +thrive, with thousands of developers around the world using the TQt Open Source +Edition at no cost to themselves. The TQt Open Source Edition is available for +Unix/X11, Macintosh, and embedded Linux. +

The Open Source Edition can be downloaded from here: +http://www.trolltech.com/download/. +

It is also possible to develop commercial software using TQt, but to do +so you must buy a commercial license for the Professional or Enterprise Edition. If +you buy a commercial edition of TQt you can sell your software for any +price and with any license you like. Thousands of commercial companies +use commercial editions of TQt to develop the products they sell. +

If you use the TQt Open Source Edition, there are certain licensing +conditions that the GNU GPL imposes on you, to ensure that your users +enjoy the freedoms guaranteed by the GPL. Users are entitled to: +

    +
  1. Run your software for any purpose. +
  2. Obtain and study your software's source code, and adapt it to their +needs. +
  3. Redistribute your software and its source code to others (under the +same terms). +
  4. Improve or modify your software, and release these changes to the +public. +
+

These freedoms apply to all the source code for all the modules your +software is based on, regardless of whether they have been written by +you or by others. The freedoms also apply to any associated interface +definition files, and even include the scripts and control files used +to control compilation and installation of the executable; otherwise +users could not exercise their rights. +

This means that you cannot use the TQt Open Source Edition if your software +must be built with any modules that impose conditions on you that +contradict the conditions of the GNU GPL, including, but not limited +to, software patents, commercial license agreements, copyrighted +interface definitions or any sort of non-disclosure agreement. In +these circumstances you must use a commercial edition of TQt. +

See the FAQ for answers to frequently +asked questions on TQt Open Source Edition licensing and its implications. +

More information on open source software is available online: +

+

Information about TQt Commercial License Agreements is available at +http://www.trolltech.com/pricing.html. You can also email +sales@trolltech.com. +

If you are in doubt what edition of TQt is right for your project, +please contact +info@trolltech.com. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/organizers.html b/doc/html/organizers.html new file mode 100644 index 00000000..2f35261b --- /dev/null +++ b/doc/html/organizers.html @@ -0,0 +1,60 @@ + + + + + +Organizers + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Organizers

+ + +

These classes are used to organize and group GUI primitives into more +complex applications or dialogs. +

+

+
TQButtonGroupOrganizes TQButton widgets in a group +
TQGroupBoxGroup box frame with a title +
TQHBoxHorizontal geometry management for its child widgets +
TQHButtonGroupOrganizes TQButton widgets in a group with one horizontal row +
TQHGroupBoxOrganizes widgets in a group with one horizontal row +
TQSplitterImplements a splitter widget +
TQTabWidgetStack of tabbed widgets +
TQVBoxVertical geometry management of its child widgets +
TQVButtonGroupOrganizes TQButton widgets in a vertical column +
TQVGroupBoxOrganizes a group of widgets in a vertical column +
TQWidgetStackStack of widgets of which only the top widget is user-visible +
TQWizardFramework for wizard dialogs +
TQWorkspaceWorkspace window that can contain decorated windows, e.g. for MDI +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/outliner-example.html b/doc/html/outliner-example.html new file mode 100644 index 00000000..f289fc63 --- /dev/null +++ b/doc/html/outliner-example.html @@ -0,0 +1,279 @@ + + + + + +Outliner to show use of DOM + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Outliner to show use of DOM

+ + +

+

This example presents a small outliner program to show the basic usage of +the DOM classes. The format of the outlines +is the OPML format as described in http://www.opml.org/spec. +

This example shows how to load a DOM tree from an XML file and how to +traverse it. +


+

Sample XML file (todos.opml): +

<?xml version="1.0" encoding="ISO-8859-1"?>
+<opml version="1.0">
+    <head>
+        <title>Todo List</title>
+        <dateCreated>Tue, 31 Oct 2000 17:00:17 CET</dateCreated>
+        <dateModified>Tue, 31 Oct 2000 17:00:17 CET</dateModified>
+        <ownerName>Arthur Dent</ownerName>
+        <ownerEmail>info@trolltech.com</ownerEmail>
+    </head>
+    <body>
+        <outline text="Background">
+            <outline text="This is an example todo list."/>
+        </outline>
+        <outline text="Books to read">
+            <outline text="Science Fiction">
+                <outline text="Philip K. Dick">
+                    <outline text="Do Androids Dream of Electical Sheep?"/>
+                    <outline text="The Three Stigmata of Palmer Eldritch"/>
+                </outline>
+                <outline text="Robert A. Heinlein">
+                    <outline text="Stranger in a Strange Land"/>
+                </outline>
+                <outline text="Isaac Asimov">
+                    <outline text="Foundation and Empire"/>
+                </outline>
+            </outline>
+            <outline text="TQt Books (in English)">
+                <outline text="Blanchette &amp; Summerfield: C++ GUI Programming with TQt 3"/>
+                <outline text="Dalheimer: Programming with TQt"/>
+                <outline text="Griffith: KDE 2/TQt Programming Bible"/>
+                <outline text="Hughes: Linux Rapid Application Development"/>
+                <outline text="Solin: TQt Programming in 24 hours"/>
+                <outline text="Ward: TQt 2 Programming for Linux and Windows 2000"/>
+            </outline>
+        </outline>
+        <outline text="Shopping list">
+            <outline text="General">
+                <outline text="Towel"/>
+                <outline text="Hair dryer"/>
+                <outline text="Underpants"/>
+            </outline>
+            <outline text="For Sunday">
+                <outline text="Beef"/>
+                <outline text="Rice"/>
+                <outline text="Carrots"/>
+                <outline text="Beans"/>
+                <outline text="Beer"/>
+                <outline text="Wine"/>
+                <outline text="Orange juice"/>
+            </outline>
+        </outline>
+        <outline text="Write a letter to Ford">
+        </outline>
+    </body>
+</opml>
+
+ +


+

Header file (outlinetree.h): +

/****************************************************************************
+** $Id: qt/outlinetree.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef OUTLINETREE_H
+#define OUTLINETREE_H
+
+#include <qlistview.h>
+#include <qdom.h>
+
+class OutlineTree : public TQListView
+{
+    Q_OBJECT
+
+public:
+    OutlineTree( const TQString fileName, TQWidget *parent = 0, const char *name = 0 );
+    ~OutlineTree();
+
+private:
+    TQDomDocument domTree;
+    void getHeaderInformation( const TQDomElement &header );
+    void buildTree( TQListViewItem *parentItem, const TQDomElement &parentElement );
+};
+
+#endif // OUTLINETREE_H
+
+ +


+

Implementation (outlinetree.cpp): +

/****************************************************************************
+** $Id: qt/outlinetree.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "outlinetree.h"
+#include <qfile.h>
+#include <qmessagebox.h>
+
+OutlineTree::OutlineTree( const TQString fileName, TQWidget *parent, const char *name )
+    : TQListView( parent, name )
+{
+    // div. configuration of the list view
+    addColumn( "Outlines" );
+    setSorting( -1 );
+    setRootIsDecorated( TRUE );
+
+    // read the XML file and create DOM tree
+    TQFile opmlFile( fileName );
+    if ( !opmlFile.open( IO_ReadOnly ) ) {
+        TQMessageBox::critical( 0,
+                tr( "Critical Error" ),
+                tr( "Cannot open file %1" ).arg( fileName ) );
+        return;
+    }
+    if ( !domTree.setContent( &opmlFile ) ) {
+        TQMessageBox::critical( 0,
+                tr( "Critical Error" ),
+                tr( "Parsing error for file %1" ).arg( fileName ) );
+        opmlFile.close();
+        return;
+    }
+    opmlFile.close();
+
+    // get the header information from the DOM
+    TQDomElement root = domTree.documentElement();
+    TQDomNode node;
+    node = root.firstChild();
+    while ( !node.isNull() ) {
+        if ( node.isElement() && node.nodeName() == "head" ) {
+            TQDomElement header = node.toElement();
+            getHeaderInformation( header );
+            break;
+        }
+        node = node.nextSibling();
+    }
+    // create the tree view out of the DOM
+    node = root.firstChild();
+    while ( !node.isNull() ) {
+        if ( node.isElement() && node.nodeName() == "body" ) {
+            TQDomElement body = node.toElement();
+            buildTree( 0, body );
+            break;
+        }
+        node = node.nextSibling();
+    }
+}
+
+OutlineTree::~OutlineTree()
+{
+}
+
+void OutlineTree::getHeaderInformation( const TQDomElement &header )
+{
+    // visit all children of the header element and look if you can make
+    // something with it
+    TQDomNode node = header.firstChild();
+    while ( !node.isNull() ) {
+        if ( node.isElement() ) {
+            // case for the different header entries
+            if ( node.nodeName() == "title" ) {
+                TQDomText textChild = node.firstChild().toText();
+                if ( !textChild.isNull() ) {
+                    setColumnText( 0, textChild.nodeValue() );
+                }
+            }
+        }
+        node = node.nextSibling();
+    }
+}
+
+void OutlineTree::buildTree( TQListViewItem *parentItem, const TQDomElement &parentElement )
+{
+    TQListViewItem *thisItem = 0;
+    TQDomNode node = parentElement.firstChild();
+    while ( !node.isNull() ) {
+        if ( node.isElement() && node.nodeName() == "outline" ) {
+            // add a new list view item for the outline
+            if ( parentItem == 0 )
+                thisItem = new TQListViewItem( this, thisItem );
+            else
+                thisItem = new TQListViewItem( parentItem, thisItem );
+            thisItem->setText( 0, node.toElement().attribute( "text" ) );
+            // recursive build of the tree
+            buildTree( thisItem, node.toElement() );
+        }
+        node = node.nextSibling();
+    }
+}
+
+ +


+

Main (main.cpp): +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include "outlinetree.h"
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    OutlineTree outline( "todos.opml" );
+    a.setMainWidget( &outline );
+    outline.show();
+
+    return a.exec();
+}
+
+ +

See also TQt XML Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/overviews-list.html b/doc/html/overviews-list.html new file mode 100644 index 00000000..fd11ee03 --- /dev/null +++ b/doc/html/overviews-list.html @@ -0,0 +1,124 @@ + + + + + +All Overviews and HOWTOs + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

All Overviews and HOWTOs

+ + + +

+ + + + + + +
TQt Object Model +Geometry and Layout +
+ +

+ +
Internationalization +
+ +
General +TQt/Embedded +
+ +

+ +
+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/palette.png b/doc/html/palette.png new file mode 100644 index 00000000..0567db8d Binary files /dev/null and b/doc/html/palette.png differ diff --git a/doc/html/pdf1.png b/doc/html/pdf1.png new file mode 100644 index 00000000..104ac167 Binary files /dev/null and b/doc/html/pdf1.png differ diff --git a/doc/html/pen-cap-styles.png b/doc/html/pen-cap-styles.png new file mode 100644 index 00000000..4c2c0bca Binary files /dev/null and b/doc/html/pen-cap-styles.png differ diff --git a/doc/html/pen-join-styles.png b/doc/html/pen-join-styles.png new file mode 100644 index 00000000..1aec8ecc Binary files /dev/null and b/doc/html/pen-join-styles.png differ diff --git a/doc/html/pen-styles.png b/doc/html/pen-styles.png new file mode 100644 index 00000000..df942b66 Binary files /dev/null and b/doc/html/pen-styles.png differ diff --git a/doc/html/penstyles.png b/doc/html/penstyles.png new file mode 100644 index 00000000..a12878bd Binary files /dev/null and b/doc/html/penstyles.png differ diff --git a/doc/html/phrasebookdialog.png b/doc/html/phrasebookdialog.png new file mode 100644 index 00000000..d1a323a5 Binary files /dev/null and b/doc/html/phrasebookdialog.png differ diff --git a/doc/html/phrasebookopen.png b/doc/html/phrasebookopen.png new file mode 100644 index 00000000..4f76b7d4 Binary files /dev/null and b/doc/html/phrasebookopen.png differ diff --git a/doc/html/picture-example.html b/doc/html/picture-example.html new file mode 100644 index 00000000..8523e188 --- /dev/null +++ b/doc/html/picture-example.html @@ -0,0 +1,182 @@ + + + + + +Picture + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Picture

+ + +

+This example shows how to make a picture, store it to a file, and read it as +a set of drawing commands. +


+

Implementation: +

/****************************************************************************
+** $Id: qt/picture.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qpainter.h>
+#include <qpicture.h>
+#include <qpixmap.h>
+#include <qwidget.h>
+#include <qmessagebox.h>
+#include <qfile.h>
+#include <ctype.h>
+
+
+void paintCar( TQPainter *p )                    // paint a car
+{
+    TQPointArray a;
+    TQBrush brush( TQt::yellow, TQt::SolidPattern );
+    p->setBrush( brush );                       // use solid, yellow brush
+
+    a.setPoints( 5, 50,50, 350,50, 450,120, 450,250, 50,250 );
+    p->drawPolygon( a );                        // draw car body
+
+    TQFont f( "courier", 12, TQFont::Bold );
+    p->setFont( f );
+
+    TQColor windowColor( 120, 120, 255 );        // a light blue color
+    brush.setColor( windowColor );              // set this brush color
+    p->setBrush( brush );                       // set brush
+    p->drawRect( 80, 80, 250, 70 );             // car window
+    p->drawText( 180, 80, 150, 70, TQt::AlignCenter, "--  TQt  --\nTrolltech AS" );
+
+    TQPixmap pixmap;
+    if ( pixmap.load("flag.bmp") )              // load and draw image
+        p->drawPixmap( 100, 85, pixmap );
+
+    p->setBackgroundMode( TQt::OpaqueMode );     // set opaque mode
+    p->setBrush( TQt::DiagCrossPattern );        // black diagonal cross pattern
+    p->drawEllipse( 90, 210, 80, 80 );          // back wheel
+    p->setBrush( TQt::CrossPattern );            // black cross fill pattern
+    p->drawEllipse( 310, 210, 80, 80 );         // front wheel
+}
+
+
+class PictureDisplay : public TQWidget           // picture display widget
+{
+public:
+    PictureDisplay( const char *fileName );
+   ~PictureDisplay();
+protected:
+    void        paintEvent( TQPaintEvent * );
+    void        keyPressEvent( TQKeyEvent * );
+private:
+    TQPicture   *pict;
+    TQString     name;
+};
+
+PictureDisplay::PictureDisplay( const char *fileName )
+{
+    pict = new TQPicture;
+    name = fileName;
+    if ( !pict->load(fileName) ) {              // cannot load picture
+        delete pict;
+        pict = 0;
+        name.sprintf( "Not able to load picture: %s", fileName );
+    }
+}
+
+PictureDisplay::~PictureDisplay()
+{
+    delete pict;
+}
+
+void PictureDisplay::paintEvent( TQPaintEvent * )
+{
+    TQPainter paint( this );                     // paint widget
+    if ( pict )
+        paint.drawPicture( *pict );             // draw picture
+    else
+        paint.drawText( rect(), AlignCenter, name );
+}
+
+void PictureDisplay::keyPressEvent( TQKeyEvent *k )
+{
+    switch ( tolower(k->ascii()) ) {
+        case 'r':                               // reload
+            pict->load( name );
+            update();
+            break;
+        case 'q':                               // tquit
+            TQApplication::exit();
+            break;
+    }
+}
+
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );               // TQApplication retquired!
+
+    const char *fileName = "car.pic";           // default picture file name
+
+    if ( argc == 2 )                            // use argument as file name
+        fileName = argv[1];
+
+    if ( !TQFile::exists(fileName) ) {
+        TQPicture pict;                          // our picture
+        TQPainter paint;                         // our painter
+
+        paint.begin( &pict );                   // begin painting onto picture
+        paintCar( &paint );                     // paint!
+        paint.end();                            // painting done
+
+        pict.save( fileName );                  // save picture
+        TQMessageBox::information(0, "TQt Example - Picture", "Saved.  Run me again!");
+        return 0;
+    } else {
+        PictureDisplay test( fileName );        // create picture display
+        a.setMainWidget( &test);                // set main widget
+        test.setCaption("TQt Example - Picture");
+        test.show();                            // show it
+
+        return a.exec();                        // start event loop
+    }
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/pictures.html b/doc/html/pictures.html new file mode 100644 index 00000000..828db57c --- /dev/null +++ b/doc/html/pictures.html @@ -0,0 +1,95 @@ + + + + + +Pictures of Most TQt Widgets + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Pictures of Most TQt Widgets

+ + + +

Most of these widgets are shown in either Motif or Windows style. +All widgets are supported in both styles (and other styles), but for clarity we just present a selection. +

TQt provides more widgets than the selection shown below. And extra TQt +are available from third parties, and as add-ons to TQt; see TQt +Solutions, and User contributed TQt +additions. +

+

Below we have three views seperated by TQSplitters. At the +top-left there's a TQListBox, at the top-right there's a TQListView with a TQHeader and two TQScrollBars. And at the +bottom there's a TQIconView. +

+

Below we present a TQMainWindow which has +a TQMenuBar and some TQToolBars that contain +various widgets, e.g. TQToolButtons and TQComboBoxes. The central +widget is a TQWorkspace which is used for MDI window management and +which contains an MDI-Window featuring a TQTextEdit. At the bottom +you see a TQStatusBar and at the bottom-right a TQSizeGrip. +

+

The image below shows a TQFileDialog. On the Macintosh and Windows +platforms you can either use a TQFileDialog or the native file +dialog. This is explained in the TQFileDialog class documentation. +

+

Below is a TQPrintDialog. On Macintosh and Windows the native print +dialog is used, but for other platforms we provide TQPrintDialog. Use +TQPrinter::setup() for portability instead of the TQPrintDialog if you +need to be platform independent. +

+

Below is a TQFontDialog. +

Windows +

+

The screenshot below shows a TQColorDialog. +

+

Messages are presented using TQMessageBoxes, as shown below. +

+

The image below shows a TQProgressDialog. The TQProgressBar can +also be used as a separate widget. +

+

In the screenshot below we have a TQGroupBox that contains a TQLineEdit, a read-only TQComboBox and an editable TQComboBox. +

+

The screenshot below shows a TQPopupMenu. +

+

In the screenshot below there's a TQButtonGroup containing four TQRadioButtons and two TQCheckBoxes. +

+

+

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

+

In the screenshot below there's a TQTextBrowser displaying a HTML +page. See also TQTextEdit. +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/plugins-howto.html b/doc/html/plugins-howto.html new file mode 100644 index 00000000..97ecd683 --- /dev/null +++ b/doc/html/plugins-howto.html @@ -0,0 +1,262 @@ + + + + + +TQt Plugins HOWTO + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Plugins HOWTO

+ + + +

TQt provides a simple plugin interface which makes it easy to create +custom database drivers, image formats, text codecs, styles and +widgets as stand-alone components. +(1) +

Writing a plugin is achieved by subclassing the appropriate plugin +base clase, implementing a few functions, and adding a macro. +

There are five plugin base classes. Derived plugins are stored +by default in the standard plugin directory. +

+ + + + + + +
Base Class +Default Path +
TQImageFormatPlugin +pluginsbase/imageformats * +
TQSqlDriverPlugin +pluginsbase/sqldrivers * +
TQStylePlugin +pluginsbase/styles * +
TQTextCodecPlugin +pluginsbase/codecs * +
TQWidgetPlugin +pluginsbase/designer * +
+

But where is the pluginsbase directory? When the application is +run, TQt will first treat the application's executable directory as the +pluginsbase. For example if the application is in C:\Program Files\MyApp and has a style plugin, TQt will look in C:\Program Files\MyApp\styles. (See TQApplication::applicationDirPath() for +how to find out where the application's executable is.) TQt will also +look in the directory given by qInstallPathPlugins(). If you want +TQt to look in additional places you can add as many paths as you need +with calls to TQApplication::addLibraryPath(). And if you want to +set your own path or paths you can use +TQApplication::setLibraryPaths(). +

Suppose that you have a new style class called 'MyStyle' that you want +to make available as a plugin. The retquired code is straightforward: +

+    class MyStylePlugin : public TQStylePlugin
+    {
+    public:
+        MyStylePlugin() {}
+        ~MyStylePlugin() {}
+
+        TQStringList keys() const { 
+            return TQStringList() << "mystyle"; 
+        }
+
+        TQStyle* create( const TQString& key ) { 
+            if ( key == "mystyle" ) 
+                return new MyStyle;
+            return 0;
+        }
+    };
+
+    Q_EXPORT_PLUGIN( MyStylePlugin )
+
+ +

(Note that TQStyleFactory is case-insensitive, and the lower case +version of the key is used; other factories, e.g. TQWidgetFactory, are +case sensitive.) +

The constructor and destructor do not need to do anything, so are left +empty. There are only two virtual functions that must be implemented. +The first is keys() which returns a string list of the classes +implemented in the plugin. (We've just implemented one class in the +example above.) The second is a function that returns an object of the +retquired class (or 0 if the plugin is asked to create an object of a +class that it doesn't implement). For TQStylePlugin, this second +function is called create(). +

It is possible to implement any number of plugin subclasses in a +single plugin, providing they are all derived from the same base +class, e.g. TQStylePlugin. +

For database drivers, image formats, custom widgets and text codecs, +no explicit object creation is retquired. TQt will find and create them +as retquired. Styles are an exception, since you might want to set a +style explicitly in code. To apply a style, use code like this: +

+    TQApplication::setStyle( TQStyleFactory::create( "MyStyle" ) );
+
+ +

Some plugin classes retquire additional functions to be implemented. +See the TQt Designer manual's, +'Creating Custom Widgets' section in the 'Creating Custom Widgets' +chapter, for a complete example of a TQWidgetPlugin, which implements +extra functions to integrate the plugin into TQt Designer. The +TQWidgetFactory class provides additional information on +TQWidgetPlugins. +

See the class documentation for details of the virtual functions that +must be reimplemented for each type of plugin. +

TQt applications automatically know which plugins are available, +because plugins are stored in the standard plugin subdirectories. +Because of this applications don't retquire any code to find and load +plugins, since TQt handles them automatically. +

The default directory for plugins is QTDIR/plugins*, +with each type of plugin in a subdirectory for that type, e.g. styles. If you want your applications to use plugins and you don't +want to use the standard plugins path, have your installation process +determine the path you want to use for the plugins, and save the path, +e.g. using TQSettings, for the application to read when it runs. The +application can then call TQApplication::addLibraryPath() with this +path and your plugins will be available to the application. Note that +the final part of the path, i.e. styles, widgets, etc., cannot +be changed. +

The normal way to include a plugin with an application is either to +compile it in with the application, or to compile it into a DLL (or +so or other platform specific library type) and use it like any +other library. If you want the plugin to be loadable then one approach +is to create a subdirectory under the application, e.g. appdir/plugins/designer, and place the plugin in that directory. +

For TQt Designer, you may need to +call TQApplication::addLibraryPath("QTDIR/plugins/designer") to load +your TQt Designer plugins. +

* All references to QTDIR refer to the path +where TQt was installed. +

Loading and Verifying Plugins +

+

When loading plugins, the TQt library does some sanity checking to +determine whether or not the plugin can be loaded and used. This +provides the ability to have multiple versions and configurations of +the TQt library installed side by side. +

    +
  • Plugins linked with a TQt library that has a higher major and/or +minor version number will not be loaded by a library with a lower +major and/or minor version number. +

    Rationale: +

    A plugin linked against a newer TQt library may use new +features that are not available in older versions. Trolltech +has a policy of adding new features and APIs only between minor +releases, which is why this test only looks at the major and minor +version numbers, and not at the patchlevel version number. +

  • Plugins linked against a TQt library with thread support can only be +loaded by libraries that are built with thread support. +

    Rationale: +

    The threaded and non-threaded TQt libraries have different names. +A library with thread support that loads a plugin linked against a +TQt library without thread support will cause two versions of the same +library to be in memory at the same time. On UNIX systems, this +causes the non-threaded TQt library to be loaded. When this +happens, the constructors for all static objects in the TQt library +will be called a second time, but they will operate on the objects +already in memory. There is no way to work around this, as this is +a feature of the object binary format: the static symbols already +defined by the threaded TQt library cannot be replaced or copied +when the non-threaded TQt library is loaded. +

  • Plugins linked against a TQt library without thread support can only +be loaded by libraries that are built without thread support. +

    Rationale: +

    See the Rationale above. +

  • Starting with TQt 3.0.5, both the TQt library and all plugins are +built using a build key. The build key in the TQt library is +examined against the build key in the plugin, and if they match, +the plugin is loaded. If the build keys do not match, then the TQt +library refuses to load the plugin. +

    Rationale: +

    See the Rationale for the build key below. +

+

The Build Key +

+

The build key contains the following information: +

    +
  • Architecture, operating system and compiler. +

    Rationale: +

    In cases where different versions of the same compiler do not +produce binary compatible code, the version of the compiler is +also present in the build key. +

  • Configuration of the TQt library. The configuration is a list +of the missing features that affect the available API in the +library. +

    Rationale: +

    Two different configurations of the same version of +the TQt library are not binary compatible. The TQt library that +loads the plugin uses the list of (missing) features to +determine if the plugin is binary compatible. +

    Note: There are cases where a plugin can use features that are +available in two different configurations. However, the +developer writing plugins would need to know which features are +in use, both in their plugin and internally by the utility +classes in TQt. The TQt library would retquire complex feature +and dependency queries and verification when loading plugins. +Retquiring this would place an unnecessary burden on the developer, and +increase the overhead of loading a plugin. To reduce both +development time and application runtime costs, a simple string +comparision of the build keys is used. +

  • Optionally, an extra string may be specified on the configure +script command line. +

    Rationale: +

    When distributing binaries of the TQt library with an +application, this provides a way for developers to write +plugins that can only be loaded by the library with which the +plugins were linked. +

+

Plugins and Threaded Applications +

+

If you want to build a plugin which you want to use with a threaded TQt +library (whether or not the plugin itself uses threads) you must use a +threaded environment. Specifically, you must link the plugin with a +threaded TQt library, and you must build TQt +Designer with that library. Your .pro file for your plugin +must include the line: +

+    CONFIG += thread
+
+ +

Warning: Do not mix the normal TQt library and the threaded TQt library in +an application. If your application uses the threaded TQt library, you +should not link your plugin with the normal TQt library. Nor should you +dynamically load the normal TQt library or dynamically load another library, +e.g. a plugin, that depends on the normal TQt library. On some systems, +mixing threaded and non-threaded libraries or plugins will corrupt the +static data used in the TQt library. +

+


+
  1. +TQt 3.0.5 introduces changes into some aspects of plugins, in +particular regarding loading, path handling and library versions. As +a result of this change, no plugins compiled with TQt 3.0.4 and +earlier will work with TQt 3.0.5 and later: they must be recompiled. + Back...
+ + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/plugins.html b/doc/html/plugins.html new file mode 100644 index 00000000..8b7a5501 --- /dev/null +++ b/doc/html/plugins.html @@ -0,0 +1,59 @@ + + + + + +Plugins + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Plugins

+ + +

These classes deal with shared libraries, (e.g. .so and DLL files), +and with TQt plugins. +

See the plugins documentation. +

See also the ActiveTQt framework for +Windows. +

+

+
TQGfxDriverPluginAbstract base for TQt/Embedded graphics driver plugins +
TQImageFormatPluginAbstract base for custom image format plugins +
TQKbdDriverPluginAbstract base for TQt/Embedded keyboard driver plugins +
TQLibraryWrapper for handling shared libraries +
TQMouseDriverPluginAbstract base for TQt/Embedded mouse driver plugins +
TQSqlDriverPluginAbstract base for custom TQSqlDriver plugins +
TQStylePluginAbstract base for custom TQStyle plugins +
TQTextCodecPluginAbstract base for custom TQTextCodec plugins +
TQWidgetPluginAbstract base for custom TQWidget plugins +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/popup-example.html b/doc/html/popup-example.html new file mode 100644 index 00000000..4ae586c6 --- /dev/null +++ b/doc/html/popup-example.html @@ -0,0 +1,247 @@ + + + + + +Popup Widgets + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Popup Widgets

+ + +

+This example shows how to implement widgets that should +pop up. +


+

Header file: +

/****************************************************************************
+** $Id: qt/popup.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of something or other
+**
+** Created : 979899
+**
+** Copyright (C) 1997-2007 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.
+**
+*****************************************************************************/
+
+#ifndef POPUP_H
+#define POPUP_H
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qlineedit.h>
+
+class FancyPopup : public TQLabel
+{
+    Q_OBJECT
+public:
+    FancyPopup( TQWidget* parent = 0, const char*  name=0);
+
+    void popup( TQWidget* parent = 0);
+protected:
+    virtual void mouseMoveEvent( TQMouseEvent * );
+    virtual void mouseReleaseEvent( TQMouseEvent * );
+    virtual void closeEvent( TQCloseEvent * );
+
+private:
+    TQWidget* popupParent;
+    int moves;
+};
+
+
+ class Frame : public TQFrame
+ {
+     Q_OBJECT
+ public:
+     Frame( TQWidget *parent=0, const char*  name=0);
+
+ protected:
+
+ private slots:
+     void button1Clicked();
+     void button2Pressed();
+
+ private:
+     TQPushButton *button1;
+     TQPushButton *button2;
+
+     TQFrame* popup1;
+     FancyPopup* popup2;
+ };
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/popup.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "popup.h"
+#include <qapplication.h>
+#include <qlayout.h>
+
+FancyPopup::FancyPopup( TQWidget* parent, const char*  name ):
+    TQLabel( parent, name, WType_Popup ){
+        setFrameStyle( WinPanel|Raised );
+        setAlignment( AlignCenter );
+        resize(150,100);
+        moves = 0;
+        setMouseTracking( TRUE );
+}
+
+void FancyPopup::mouseMoveEvent( TQMouseEvent * e){
+    moves++;
+    TQString s;
+    s.sprintf("%d/%d", e->pos().x(), e->pos().y());
+    if (e->state() & TQMouseEvent::LeftButton)
+        s += " (down)";
+    setText(s);
+}
+
+void FancyPopup::mouseReleaseEvent( TQMouseEvent * e){
+    if  (rect().contains( e->pos() ) || moves > 5)
+        close();
+}
+
+void FancyPopup::closeEvent( TQCloseEvent *e ){
+    e->accept();
+    moves = 0;
+    if (!popupParent)
+        return;
+
+    // remember that we (as a popup) might recieve the mouse release
+    // event instead of the popupParent. This is due to the fact that
+    // the popupParent popped us up in its mousePressEvent handler. To
+    // avoid the button remaining in pressed state we simply send a
+    // faked mouse button release event to it.
+    TQMouseEvent me( TQEvent::MouseButtonRelease, TQPoint(0,0), TQPoint(0,0), TQMouseEvent::LeftButton, TQMouseEvent::NoButton);
+    TQApplication::sendEvent( popupParent, &me );
+}
+
+void FancyPopup::popup( TQWidget* parent) {
+    popupParent = parent;
+    setText("Move the mouse!");
+    if (popupParent)
+        move( popupParent->mapToGlobal( popupParent->rect().bottomLeft() ) );
+    show();
+}
+
+
+
+
+
+
+Frame::Frame(TQWidget* parent, const char* name): TQFrame(parent, name){
+    button1 = new TQPushButton("Simple Popup", this);
+    connect ( button1, SIGNAL( clicked() ), SLOT( button1Clicked() ) );
+    button2 = new TQPushButton("Fancy Popup", this);
+    connect ( button2, SIGNAL( pressed() ), SLOT( button2Pressed() ) );
+
+    TQBoxLayout * l = new TQHBoxLayout( this );
+    button1->setMaximumSize(button1->sizeHint());
+    button2->setMaximumSize(button2->sizeHint());
+    l->addWidget( button1 );
+    l->addWidget( button2 );
+    l->activate();
+
+//     button1->setGeometry(20,20,100,30);
+//     button2->setGeometry(140,20,100,30);
+    resize(270, 70);
+
+    //create a very simple popup: it is just composed with other
+    //widget and will be shown after clicking on button1
+
+    popup1 = new TQFrame( this ,0, WType_Popup);
+    popup1->setFrameStyle( WinPanel|Raised );
+    popup1->resize(150,100);
+    TQLineEdit *tmpE = new TQLineEdit( popup1 );
+    connect( tmpE, SIGNAL( returnPressed() ), popup1, SLOT( hide() ) );
+    tmpE->setGeometry(10,10, 130, 30);
+    tmpE->setFocus();
+    TQPushButton *tmpB = new TQPushButton("Click me!", popup1);
+    connect( tmpB, SIGNAL( clicked() ), popup1, SLOT( close() ) );
+    tmpB->setGeometry(10, 50, 130, 30);
+
+    // the fancier version uses its own class. It will be shown when
+    // pressing button2, so they behavior is more like a modern menu
+    // or toolbar.
+
+    popup2 = new FancyPopup( this );
+
+    // you might also add new widgets to the popup, just like you do
+    // it with any other widget.  The next four lines (if not
+    // commented out) will for instance add a line edit widget.
+
+//     tmpE = new TQLineEdit( popup2 );
+//     tmpE->setFocus();
+//     connect( tmpE, SIGNAL( returnPressed() ), popup2, SLOT( close() ) );
+//     tmpE->setGeometry(10, 10, 130, 30);
+}
+
+
+void Frame::button1Clicked(){
+    popup1->move( mapToGlobal( button1->geometry().bottomLeft() ) );
+    popup1->show();
+}
+
+void Frame::button2Pressed(){
+    popup2->popup(button2);
+}
+
+
+int main( int argc, char **argv )
+{
+    TQApplication a(argc,argv);
+
+    Frame frame;
+    frame.setCaption("TQt Example - Custom Popups");
+    a.setMainWidget(&frame);
+    frame.show();
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/porting.html b/doc/html/porting.html new file mode 100644 index 00000000..2bbe632a --- /dev/null +++ b/doc/html/porting.html @@ -0,0 +1,803 @@ + + + + + +Porting to TQt 3.x + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Porting to TQt 3.x

+ + + +

This document describes porting applications from TQt 2.x to TQt 3.x. +

The TQt 3.x series is not binary compatible with the 2.x series. This +means programs compiled for TQt 2.x must be recompiled to work with TQt +3.x. TQt 3.x is also not completely source compatible with 2.x, +however all points of incompatibility cause compiler errors or +run-time messages (rather than mysterious results). TQt 3.x includes +many additional features and discards obsolete functionality. Porting +from TQt 2.x to TQt 3.x is straightforward, and once completed makes +the considerable additional power and flexibility of TQt 3.x available +for use in your applications. +

To port code from TQt 2.x to TQt 3.x: +

    +

  1. Briefly read the porting notes below to get an idea of what to expect. +
  2. Be sure your code compiles and runs well on all your target platforms +with TQt 2.x. +
  3. Recompile with TQt 3.x. For each error, search below for related +identifiers (e.g. function names, class names). This document +mentions all relevant identifiers to help you get the information +you need at the cost of being a little verbose. +
  4. If you get stuck, ask on the qt-interest mailing list, or Trolltech Technical Support if +you're a registered licensee. +

+

Table of contents: +

+

+ + +

+

Link Errors on Windows +

+

On Windows, originally in TQt 2.x, the default configuration of the TQt +library is static. If you just use the default configuration you +don't need to set certain preprocessor defines. In TQt 3.0, the +default configuration of the TQt library is to build it as a shared +library, therefore the preprocessor define QT_DLL is needed. +

If you use tmake with TQt 2.x, and now use qmake with TQt 3.x, then the +cause of the problem is with the project file. In the project file, +there is usually line that looks like: +

CONFIG = ... +

this should be changed to +

CONFIG += ... +

so that qmake can look at the configuration that TQt was built with and +set any relevant preprocessor defines in the makefile. +

+

Header file inclusion changes +

+

TQt 3.x remove some unnecessary nested #include directives from +header files. This speeds up compilation when you don't need those +nested header files. But in some cases you will find you need to add +an extra #include to your files. +

For example, if you get a message about TQStringList or its functions +not being defined, then add #include <qstringlist.h> at +the top of the file giving the error. +

Header files that you might need to add #include directives for include: +

    +
  • <qcursor.h> +
  • <qpainter.h> +
  • <qpen.h> +
  • <qstringlist.h> +
  • <qregexp.h> +
  • <qstrlist.h> +
  • <qstyle.h> +
  • <qvaluelist.h> +
+

Namespace +

+

TQt 3.x is namespace clean. A few global identifiers that had been +left in TQt 2.x have been discarded. +

Enumeration TQt::CursorShape and its values are now part of the +special TQt class defined in qnamespace.h. If you get compilation +errors about these being missing (unlikely, since most of your code will +be in classes that inherit from the TQt namespace class), then apply +the following changes: +

+

The names of some debugging macro variables have been changed. We have +tried not to break source compatibility as much as possible. If you observe +error messages on the UNIX console or the Windows debugging stream that were +previously disabled, please check these macro variables: +

    +
  • DEBUG becomes QT_DEBUG +
  • NO_DEBUG becomes QT_NO_DEBUG +
  • NO_CHECK becomes QT_NO_CHECK +
  • CHECK_STATE becomes QT_CHECK_STATE +
  • CHECK_RANGE becomes QT_CHECK_RANGE +
  • CHECK_NULL becomes QT_CHECK_NULL +
  • CHECK_MATH becomes QT_CHECK_MATH +
+

The name of some debugging macro functions has been changed as well +but source compatibility should not be affected if the macro variable +QT_CLEAN_NAMESPACE is not defined: +

    +
  • ASSERT becomes Q_ASSERT +
  • CHECK_PTR becomes Q_CHECK_PTR +
+

For the record, undocumented macro variables that are not part of the API +have been changed: +

    +
  • _OS_*_ becomes Q_OS_* +
  • _WS_*_ becomes Q_WS_* +
  • _CC_*_ becomes Q_CC_* +
+

Removed Functions +

+

All these functions have been removed in TQt 3.x: +

    +
  • TQFont::charSet() +
  • TQFont::setCharSet() +
  • TQMenuBar::setActItem() +
  • TQMenuBar::setWindowsAltMode() +
  • TQObject::initMetaObject() +
  • TQPainter::drawQuadBezier() +
  • TQPointArray::quadBezier() +
  • TQRegExp::find() +
  • TQSpinBox::downButton() +
  • TQSpinBox::upButton() +
  • TQString::basicDirection() +
  • TQString::visual() +
  • TQStyle::set...() functions +
  • TQStyle::drawArrow() +
  • TQWidget::setFontPropagation() +
  • TQWidget::setPalettePropagation() +
+

Also, to avoid conflicts with <iostream>, the following three +global functions have been renamed: +

    +
  • setw() (renamed qSetW()) +
  • setfill() (renamed qSetFill()) +
  • setprecision() (renamed qSetPrecision()) +
+

Obsoleted Functions +

+

The following functions have been obsoleted in TQt 3.0. The +documentation of each of these functions should explain how to +replace them in TQt 3.0. +

Warning: It is best to consult http://doc.trolltech.com/3.0/ +rather than the documentation supplied with TQt to obtain the latest +information regarding obsolete functions and how to replace them in +new code. +

+

Additionally, these preprocessor directives have been removed: +

    +
  • #define strlen qstrlen +
  • #define strcpy qstrcpy +
  • #define strcmp qstrcmp +
  • #define strncmp qstrncmp +
  • #define stricmp qstricmp +
  • #define strnicmp qstrnicmp +
+

See the changes-3.0.0 document for an explanation of why this had to be done. +You might have been relying on the non-portable and unpredictable behavior +resulting from these directives. We strongly recommend that you either make +use of the safe qstr* variants directly or ensure that no 0 pointer is +passed to the standard C functions in your code base. +

Collection Class Renaming +

+

The classes TQArray, TQCollection, TQList, TQListIterator, TQQueue, TQStack +and TQVector have been renamed. To ease porting, the old names and the +old header-file names are still supported. +

+
Old Name New Name New Header File +
TQArray TQMemArray <qmemarray.h> +
TQCollection TQPtrCollection <qptrcollection.h> +
TQList TQPtrList <qptrlist.h> +
TQListIterator TQPtrListIterator <qptrlist.h> +
TQQueue TQPtrQueue <qptrqueue.h> +
TQStack TQPtrStack <qptrstack.h> +
TQVector TQPtrVector <qptrvector.h> +
+

TQButtonGroup +

+

In TQt 2.x, the function TQButtonGroup::selected() returns the selected +radio button (TQRadioButton). In TQt 3.0, it returns the selected toggle button (TQButton::toggleButton), a more general concept. +This might affect programs that use TQButtonGroups that contain a +mixture of radio buttons and non-radio (e.g. TQCheckBox) toggle buttons. +

TQDate +

+

Two TQDate member functions that were virtual in TQt 2.0 are not virtual +in TQt 3.0. This is only relevant if you subclassed TQDate and +reimplemented these functions: +

+

In addition to no longer being virtual, TQDate::monthName() and +TQDate::dayName() have been renamed TQDate::shortMonthName() and +TQDate::shortDayName() and have been made static (as they should had +been in the first place). The old names are still provided for source +compatibility. +

TQFileDialog +

+

If the mode was not set explicitly, and the user entered a +non-existent file, the dialog would accept this. In TQt 3.x, you must +set the mode, e.g. setMode(TQFileDialog::AnyFile), to get the same +behavior. +

TQFont +

+

The internals of TQFont have changed significantly between TQt 2.2 and +TQt 3.0, to give better Unicode support and to make developing +internationalized applications easier. The original API has been +preserved with minimal changes. The CharSet enum and its related +functions have disappeared. This is because TQt now handles all charset +related issues internally, and removes this burden from the developer. +

If you used the CharSet enum or its related functions, e.g +TQFont::charSet() or TQFont::setCharSet(), just remove them from your +code. There are a few functions that took a TQFont::CharSet as a +parameter; in these cases simply remove the charset from the +parameter list. +

TQInputDialog +

+

The two static getText(...) methods in TQInputDialog have been merged. +The echo parameter is the third parameter and defaults to +TQLineEdit::Normal. +

If you used calls to TQInputDialog::getText(...) that provided more +than the first two retquired parameters you will must add a value +for the echo parameter. +

TQLayout and Other Abstract Layout Classes +

+

The definitions of TQGLayoutIterator, TQLayout, TQLayoutItem, TQLayoutIterator, TQSpacerItem and TQWidgetItem have been moved from <qabstractlayout.h> to <qlayout.h>. The header <qabstractlayout.h> now includes <qlayout.h> for compatibility. It +might be removed in a future version. +

TQListViewItem +

+

The paintBranches() function in TQt 2.x had a GUIStyle parameter; this +has been dropped for TQt 3.x since GUI style is handled by the new +style engine (See TQStyle.) +

TQMoveEvent +

+

In TQt 2.x, the function TQMoveEvent::pos() returned the position of the +widget in its parent widget, including the window frame. In TQt 3.0, +it returns the new position of the widget, excluding window frame for +top level widgets. +

TQMultiLineEdit +

+

The TQMultiLineEdit was a simple editor widget in previous TQt versions. +Since TQt 3.0 includes a new richtext engine, which also supports +editing, TQMultiLineEdit is obsolete. For the sake of compatibility +TQMultiLineEdit is still provided. It is now a subclass of TQTextEdit +which wraps the old TQMultiLineEdit so that it is mostly source +compatible to keep old applications working. +

For new applications and when maintaining existing applications we +recommend that you use TQTextEdit instead of TQMultiLineEdit wherever +possible. +

Although most of the old TQMultiLineEdit API is still available, there +is one important difference. The old TQMultiLineEdit operated in terms +of lines, whereas TQTextEdit operates in terms of paragraphs. This is +because lines change all the time during wordwrap, whereas paragraphs +remain paragraphs. The consequence of this change is that functions +which previously operated on lines, e.g. numLines(), textLine(), etc., +now work on paragraphs. +

Also the function getString() has been removed since it +published the internal data structure. +

In most cases, applications that used TQMultiLineEdit will continue to +work without problems. Applications that worked in terms of lines may +retquire some porting. +

The source code for the old 2.x version of TQMultiLineEdit can be found +in $QTDIR/src/attic/qtmultilineedit.h/cpp. Note that the class has +been renamed to TQtMultiLineEdit to avoid name clashes. If you really +need to keep compatibility with the old TQMultiLineEdit, simply include +this class in your project and rename TQMultiLineEdit to +TQtMultiLineEdit throughout. +

TQPrinter +

+

TQPrinter has undergone some changes, to make it more flexible and +to ensure it has the same runtime behaviour on both Unix and Windows. In 2.x, +TQPrinter behaved differently on Windows and Unix, when using view +transformations on the TQPainter. This has changed now, and TQPrinter +behaves consistently across all platforms. A compatibilty mode has been +added that forces the old behaviour, to ease porting from TQt 2.x +to TQt 3.x. This compatibilty mode can be enabled by passing the +TQPrinter::Compatible flag to the TQPrinter constructor. +

On X11, TQPrinter used to generate encapsulated postscript when +fullPage() was TRUE and only one page was printed. This does not +happen by default anymore, providing a more consistent printing output. +

TQRegExp +

+

The TQRegExp class has been rewritten to support many of the features of Perl +regular expressions. Both the regular expression syntax and the TQRegExp +interface have been modified. +

Be also aware that <qregexp.h> is no longer included +automatically when you include <qstringlist.h>. See +above for details. +

+

New special characters +

+

There are five new special characters: (, ), {, +| and } (parentheses, braces and pipe). When porting old +regular expressions, you must add \ (backslash) in front of any +of these (actually, \\ in C++ strings), unless it is already +there. +

Example: Old code like +

+    TQRegExp rx( "([0-9|]*\\)" );        // works in TQt 2.x
+
+ +should be converted into +
+    TQRegExp rx( "\\([0-9\\|]*\\)" );      // works in TQt 2.x and 3.x
+
+ +(Within character classes, the backslash is not necessary in front of certain +characters, e.g. |, but it doesn't hurt.) +

Wildcard patterns need no conversion. Here are two examples: +

+    TQRegExp wild( "(*.*)" );
+    wild.setWildcard( TRUE );
+
+ +
+    // TRUE as third argument means wildcard
+    TQRegExp wild( "(*.*)", FALSE, TRUE );
+
+ +However, when they are used, make sure to use TQRegExp::exactMatch() +rather than the obsolete TQRegExp::match(). TQRegExp::match(), like +TQRegExp::find(), tries to find a match somewhere in the target +string, while TQRegExp::exactMatch() tries to match the whole target +string. +

TQRegExp::operator=() +

+

This function has been replaced by TQRegExp::setPattern() in TQt 2.2. +Old code such as +

+    TQRegExp rx( "alpha" );
+    rx.setCaseSensitive( FALSE );
+    rx.setWildcard( TRUE );
+    rx = "beta";
+
+ +still compiles with TQt 3, but produces a different result (the case sensitivity +and wildcard options are forgotten). This way, +
+    rx = "beta";
+
+ +is the same as +
+    rx = TQRegExp( "beta" );
+
+ +which is what one expects. +

TQRegExp::match() +

+

The following function is now obsolete, as it has an unwieldy +parameter list and was poorly named: +

+It will be removed in a future version of TQt. Its documentation explains how to replace it. +

TQRegExp::find() +

+

This function was removed, after a brief appearance in TQt 2.2. Its +name clashed with TQString::find(). Use TQRegExp::search() or TQString::find() instead. +

TQString::findRev() and TQString::contains() +

+

TQString::findRev()'s and TQString::contains()'s semantics have changed +between 2.0 and 3.0 to be more consistent with the other overloads. +

For example, +

+    TQString( "" ).contains( TQRegExp("") )
+
+ +returns 1 in TQt 2.0; it returns 0 in TQt 3.0. Also, "^" now really means +start of input, so +
+    TQString( "Heisan Hoppsan" ).contains( TQRegExp("^.*$") )
+
+ +returns 1, not 13 or 14. +

This change affect very few existing programs. +

TQString::replace() +

+

With TQt 1.0 and 2.0, a TQString is converted implicitly into a TQRegExp +as the first argument to TQString::replace(): +

+    TQString text = fetch_it_from_somewhere();
+    text.replace( TQString("[A-Z]+"), "" );
+
+ +With TQt 3.0, the compiler gives an error. The solution is to use a +TQRegExp cast: +
+    text.replace( TQRegExp("[A-Z]+"), "" );
+
+ +This change makes it possible to introduce a +TQString::replace(TQString, TQString) overload in a future version of TQt +without breaking source compatibility. +

TQSemiModal +

+

The TQSemiModal class is now obsolete. You should call show() on a +modal dialog instead. +

TQSortedList +

+

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

TQTableView +

+

The TQTableView class has been obsoleted and is no longer a part of the +TQt API. Either use the powerful TQTable class or the simplistic +TQGridView in any new code you create. If you really need the old table +view for compatibility you can find it in $QTDIR/src/attic/qttableview.{cpp,h}. Note that the class has been +renamed from TQTableView to TQtTableView to avoid name clashes. To use +it, simply include it in your project and rename TQTableView to +TQtTableView throughout. +

TQToolButton +

+

The TQToolButton class used to distinguish between "on" and "off" +icons. In 3.0, this mechanism was moved into the TQIconSet class +(see TQIconSet::State). +

The old TQToolButton::onIconSet and TQToolButton::offIconSet +properties are still provided so that old source will compile, but +their semantics have changed: they are now synonyms for TQToolButton::iconSet. If you used that distinction in TQt 2.x, you will +need to adjust your code to use the TQIconSet On/Off mechanism. +

Likewise, the on parameter of these two functions is now ignored: +

    +
  • void TQToolButton::setIconSet ( const TQIconSet & set, bool on ) +
  • TQIconSet TQToolButton::iconSet ( bool on ) const +
+

These functions are only provided for ease of porting. New code +should use the following instead: +

+

Finally, this function is no longer virtual: +

    +
  • void TQToolButton::setIconSet( const TQIconSet & set, bool on ) +
+

If you have a class that inherits TQToolButton and that reimplements +TQToolButton::setIconSet(), you should make the signature of the +reimplementation agree with the new TQToolButton::setIconSet(), +a virtual function. +

TQTextStream +

+

The global TQTextStream manipulators setw(), setfill() and setprecison() +were renamed to qSetW(), qSetFill() and qSetPrecision() to avoid conflicts +with <iostream.h>. If you used them, you must rename the occurrences to +the new names. +

TQTranslator +

+

The TQTranslator class was extended in TQt 2.2, and these extensions +lead to a new interface. This interface is used mainly by translation +tools (for example, TQt +Linguist). For source compatibility, no member function was +effectively removed. The TQTranslator documentation points out +which functions are obsolete. +

This function is no longer virtual: +

+

If you have a class that inherits TQTranslator and which reimplements +TQTranslator::find(), you should reimplement TQTranslator::findMessage() instead. +In fact, find() is now defined in terms of findMessage(). By doing the +conversion, you will also gain support for translator comments and for any +future extensions. +

TQWidget +

+

TQWidget::backgroundColor(), TQWidget::setBackgroundColor(), +TQWidget::backgroundPixmap() and TQWidget::setBackgroundPixmap() have +often been the source of much confusion in previous releases. TQt 3.0 +addresses this by obsoleting these functions and by replacing them +with eight new functions: TQWidget::eraseColor(), +TQWidget::setEraseColor(), TQWidget::erasePixmap(), +TQWidget::setErasePixmap(), TQWidget::paletteBackgroundColor(), +TQWidget::setPaletteBackgroundColor(), +TQWidget::paletteBackgroundPixmap() and +TQWidget::setPaletteBackgroundPixmap(). See their documentation for +details. +

TQXml Classes +

+

TQXmlInputSource +

+

The semantics of TQXmlInputSource has changed slightly. This change +only affects code that parses the same data from the same input source +multiple times. In such cases you must call +TQXmlInputSource::reset() before the second call to +TQXmlSimpleReader::parse(). +

So code like +

+    TQXmlInputSource source( &xmlFile );
+    TQXmlSimpleReader reader;
+    ...
+    reader.parse( source );
+    ...
+    reader.parse( source );
+
+ +must be changed to +
+    TQXmlInputSource source( &xmlFile );
+    TQXmlSimpleReader reader;
+    ...
+    reader.parse( source );
+    ...
+    source.reset();
+    reader.parse( source );
+
+ +

TQXmlLocator +

+

Due to some internal changes, it was necessary to clean-up the semantics of +TQXmlLocator: this class is now an abstract class. This shouldn't cause +any problems, since programmers usually used the TQXmlLocator that was +reported by TQXmlContentHandler::setDocumentLocator(). If you used this +class in some other way, you must adjust your code to use the +TQXmlLocator that is reported by the +TQXmlContentHandler::setDocumentLocator() function. +

Asynchronous I/O Classes +

+

TQASyncIO, TQDataSink, TQDataSource, TQIODeviceSource and TQDataPump were +used internally in previous versions of TQt, but are not used anymore. +They are now obsolete. +

Transparent widgets +

+

In TQt 2.x, the AutoMask property was used to obtain a +transparent-looking widget. In general, this approach is slow and +processor hungry. TQt 3.0 uses the BackgroundOrigin which provides +vastly improved performance and more flexibility in most cases. The +few classes for which the AutoMask property is still the best approach +are TQCheckBox, TQComboBox, TQPushButton, TQRadioButton and TQTabWidget. +

Bezier Curves +

+

The function names for Bezier curves in TQPainter and TQPointArray have +been corrected. They now properly reflect their cubic form instead of +a quadratic one. If you have been using either +TQPainter::drawQuadBezier() or TQPointArray::quadBezier() you must +replace these calls with +

+respectively. Neither the arguments nor the resulting curve have changed. +

Locale-aware String Comparisons in TQIconView, TQListBox, +TQListView and TQTable +

+

In TQt 2.x, TQString only provided string comparisons using the Unicode +values of the characters of a string. This is efficient and reliable, +but it is not the appropriate order for most languages. For example, +French users expect 'é' (e acute) to be treated essentially as +'e' and not put after 'z'. +

In TQt 3.0, TQString::localeAwareCompare() implements locale aware +string comparisions on certain platforms. The classes TQIconView, TQListBox, TQListView and TQTable now use +TQString::localeAwareCompare() instead of TQString::compare(). If you +want to control the behaviour yourself you can always reimplement +TQIconViewItem::compare(), TQListBox::text(), TQListViewItem::compare() +or TQTableItem::key() as appropriate. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/porting2.html b/doc/html/porting2.html new file mode 100644 index 00000000..9f44766e --- /dev/null +++ b/doc/html/porting2.html @@ -0,0 +1,965 @@ + + + + + +Porting to TQt 2.x + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Porting to TQt 2.x

+ + + +

+You're probably looking at this page because you want to port +your application from TQt 1.x to TQt 2.x, but to be sure, let's +review the good reasons to do this: +

    +
  • To get access to all the new TQt 2.x features like the rich text +HTML subset for formatted labels, tooltips, online help etc. +and the much easier to use layout classes and widgets. +
  • To make your application truly international, with support +for Unicode and translations for the languages of the world. +
  • To allow your application to fit into the new look of the +Unix desktop with configurable, very powerful "themes". The +extended style system also integrates TQt applications better +on MS-Windows desktops. TQt will automatically chose the right +colors and fonts and obey global system setting changes. +
  • To stay up-to-date with the version of TQt that gets all the +new features and bug-fixes. +
  • To get more speed and smoother widgets display with all the +new anti-flicker changes in TQt. +
  • Most of all though, you want to port to TQt 2.x +so that your Wheel Mouse works! +
+

+The TQt 2.x series is not binary compatible with the 1.x series. +This means programs compiled for TQt 1.x must be recompiled to work +with TQt 2.x. TQt 2.x is also not completely source compatible +with 1.x, however all points of incompatibility cause +compiler errors (rather than mysterious results), or produce run-time +messages. The result is that TQt 2.x includes many additional features, +discards obsolete functionality that is easily converted to use the new +features, and that porting an application from TQt 1.x to TQt 2.x is +a simple task well worth the amount of effort retquired. +

To port code using TQt 1.x to use TQt 2.x: +

    +
  • Briefly read the porting notes below to get an idea of what to expect. +
  • Be sure your code compiles and runs well on all your target platforms with TQt 1.x. +
  • Recompile with TQt 2.x. For each error, search below for related +identifiers (eg. function names, class names) - this documented is +structured to mention all relevant identifiers to facilitate such +searching, even if that makes it a little verbose. +
  • If you get stuck, ask on the qt-interest mailing list, or +Trolltech Technical Support if you're a Professional Edition +licensee. +
+

Many very major projects, such as KDE +have been port, so there is plenty of expertise in the collective conscious +that is the TQt Developer Community! +

+


+

The Porting Notes

+

+


+

Namespace

+

TQt 2.x is namespace-clean, unlike 1.x. TQt now uses very few +global identifiers. Identifiers like red, blue, LeftButton, +AlignRight, Key_Up, Key_Down, NoBrush etc. are now part of a +special class TQt (defined in qnamespace.h), +which is inherited by +most TQt classes. Member functions of classes that inherit from TQWidget, +etc. are totally unaffected, but code that is +not in functions of classes inherited from TQt, +you must qualify these identifiers like this: TQt::red, +TQt::LeftButton, TQt::AlignRight, etc. +

The qt/bin/qt20fix script helps to fix the code that +needs adaption, though most code does not need changing. +

Compiling with -DQT1COMPATIBILITY will help you get going with TQt 2.x +- it allows all the old "dirty namespace" identifiers from TQt 1.x to +continue working. Without it, you'll get compile errors that can +easily be fixed by searching this page for the clean identifiers. +

No Default 0 Parent Widget

+

In TQt 1.x, all widget constructors were defined with a default value +of 0 for the parent widget. However, only the main window of the +application should be created with a 0 parent, all other widgets +should have parents. Having the 0 default made it too simple to create +bugs by forgetting to specify the parent of non-mainwindow +widgets. Such widgets would typically never be deleted (causing memory +leaks), and they would become top-level widgets, confusing the window +managers. Therefore, in TQt 2.x the 0 default parent has been removed +for the widget classes that are not likely to be used as main windows. +

Note also that programs no longer need (or should) use 0 parent just +to indicate that a widget should be top-level. See +

 TQWidget::isTopLevel() 
+ for details. See also the notes about +TQPopupMenu and TQDialog +below. +

Virtual Functions

+

Some virtual functions have changed signature in TQt 2.x. +If you override them in derived classes, you must change the signature +of your functions accordingly. +

+

    +
  •  TQWidget::setStyle(GUIStyle)
    + +
  •  TQListView::addColumn(const char *, int)
    + +
  •  TQListView::setColumnText(int, const char *)
    + +
  •  TQListViewItem::setText(int, const char *)
    + +
  •  TQMultiLineEdit::insertLine(const char *, int)
    + +
  •  TQMultiLineEdit::insertAt(const char *, int, int, bool)
    + +
  •  TQSpinBox::setPrefix(const char *)
    + +
  •  TQSpinBox::setSuffix(const char *)
    + +
  •  TQToolButton::setTextLabel(const char *, bool)
    + +
  •  TQDoubleValidator::validate(TQString &, int &)
    + +
  •  TQIntValidator::validate(TQString &, int &)
    + +
  •  TQValidator::fixup(TQString &)
    + +
  •  TQSlider::paintSlider(TQPainter *, const TQRect &)
    + +
+

This is one class of changes that are +not detected by the compiler, +so you should mechanically search for each of +these function names in your header files, eg. +

+egrep -w 'setStyle|addColumn|setColumnText|setText...' *.h
+
+ +

Of course, you'll get a few false positives (eg. if you have a setText +function that is not in a subclass of TQListViewItem). +

Collection classes

+

The collection classes include generic +classes such as TQGDict, TQGList, and +the subclasses such as TQDict and TQList. +

The macro-based TQt collection classes are obsolete; use the +template-based classes instead. Simply remove includes of qgeneric.h and +replace e.g. Q_DECLARE(TQCache,TQPixmap) with TQCache. +

The GCI global typedef is replaced by TQCollection::Item. Only if you +make your own subclasses of the undocumented generic collection classes +will you have GCI in your code. +This change has been made to avoid collisions with other namespaces. +

The GCF global typedef is removed (it was not used in TQt). +

Debug vs. Release

+

The Q_ASSERT macro is now a null expression if the QT_CHECK_STATE flag +is not set (i.e. if the QT_NO_CHECK flag is defined). +

The debug() function now outputs nothing if TQt was compiled with +the QT_NO_DEBUG macro defined. +

TQString

+

TQString has undergone major changes internally, and although it is highly +backward compatible, it is worth studying in detail when porting to TQt 2.x. +The TQt 1.x TQString class has been renamed to TQCString in TQt 2.x, though if +you use that you will incur a performance penalty since all TQt functions +that took const char* now take const TQString&. +

+To take full advantage of the new Internationalization +functionality in TQt 2.x, the following steps are retquired: +

    +
  • Start converting all uses of "const char*" in parameters to +"const TQString&" - this can often be done mechanically, eg. +using Perl. Convert usage of char[] for temporary string +building to TQString (much software already uses TQString for +this purpose as it offers many more facilities). +

    If you find that you are mixing usage of TQCString, TQString, +and TQByteArray, this causes lots of unnecessary copying and +might indicate that the true nature of the data you are +dealing with is uncertain. If the data is NUL-terminated +8-bit data, use TQCString; if it is unterminated (ie. +contains NULs) 8-bit data, use TQByteArray; if it is text, +use TQString. +

    +
  • Put a breakpoint in
     TQString::latin1()
    + +to catch places where +Unicode information is being converted to ASCII (loosing +information if your user in not using Latin1). TQt has +a small number of calls to this - ignore those. As a stricter +alternative, compile your code with QT_NO_ASCII_CAST defined, +which hides the automatic conversion of TQString to const char*, +so you can catch problems at compile time. +

    +
  • See the TQt Internationalization page +for information about the full process of internationalizing +your software. +
+

+Points to note about the new TQString are: +

+
Unicode
+
+TQt now uses Unicode throughout. +data() now returns a const reference to an ASCII version +of the string - you cannot directly access the +string as an array of bytes, because it isn't one. Often, latin1() is +what you want rather than data(), or just leave it to convert to +const char* automatically. data() is only used now to aide porting to TQt 2.x, +and ideally you'll only need latin1() or implicit conversion when interfacing +to facilities that do not have Unicode support. +

Automatic-expanding
+
+A big advantage of the new TQString is that it automatically expands +when you write to an indexed position. +

TQChar and TQCharRef
+
+TQChar are the Unicode characters that make up a TQString. A TQCharRef is +a temporary reference to a TQChar in a TQString that when assigned to +ensures that the implicit sharing semantics of the TQString are maintained. +You are unlikely to use TQCharRef in your own code - but so that you +understand compiler error messages, just know that mystring[123] +is a TQCharRef whenever mystring is not a constant string. A TQCharRef +has basically the same functionality as a TQChar, except it is more restricted +in what you can assign to it and cast it to (to avoid programming errors). +

Use TQString
+
+Try to always use TQString. If you must, use TQCString which is the +old implementation from TQt 1.x. +

Unicode vs. ASCII
+
+Every conversion to and from ASCII is wasted time, so try to use TQString +as much as possible rather than const char*. This also ensures you have +full 16-bit support. +

Convertion to ASCII
+
+The return value from operator const char*() is transient - don't expect +it to remain valid while you make deep function calls. +It is valid for as long as you don't modify or destroy the TQString. +

TQString is simpler
+
+Expect your code to become simpler with the new TQString, especially +places where you have used a char* to wander over the string rather +than using indexes into the string. +

Some hacks don't work
+
+This hack: +use_sub_string( &my_string[index] ) +should be replaced by: +use_sub_string( my_string.mid(index) ) +

TQString(const char*, int) is removed
+
+The TQString constructor taking a const char* and an integer is removed. +Use of this constructor was error-prone, since the length included the +'\0' terminator. Use TQString::left(int) or TQString::fromLatin1( const char*, +int ) -- in both cases the int parameter signifies the number of characters. +

TQString(int) is private
+
+The TQString constructor taking an integer is now private. This function +is not meaningful anymore, since TQString does all space allocation +automatically. 99% of cases can simple be changed to use the +default constructor, TQString(). +

+In TQt 1.x the constructor was used in two ways: accidentally, +by attempting to convert a char to a TQString (the char converts to int!) - +giving strange bugs, and as a way to make a TQString big enough prior to +calling

 TQString::sprintf()
+ . In TQt 2.x, the accidental bug case is +prevented (you will get a compilation error) and TQString::sprintf has +been made safe - you no longer need to pre-allocate space (though for +other reasons, sprintf is still a poor choice - eg. it doesn't pass Unicode). +The only remaining common case is conversion of 0 (NULL) to TQString, which +would usually give expected results in TQt 1.x. For TQt 2.x the correct +syntax is to use TQString::null, though note that +the default constructor, TQString(), creates a null string too. +Assignment of 0 to a TQString is ambiguous - assign +TQString::null; you'll mainly find these in code that has been converted +from const char* types to TQString. +This also prevents a common error case from TQt 1.x - in +that version, mystr = 'X' would not produce the expected +results and was always a programming error; in TQt 2.x, it works - making +a single-character string. +

+Also see TQStrList. +

Signals and Slots
+
+Many signal/slots have changed from const char* to TQString. You will +get run-time errors when you try to
 TQObject::connect()
+ +to the old +signals and slots, usually with a message indicating the const TQString& +replacement signal/slot. +

Optimize with Q2HELPER
+
+In qt/src/tools/qstring.cpp there is a Q2HELPER - define it for some +extra debugging/optimizing features (don't leave it it - it kills performance). +You'll get an extra function, qt_qstring_stats(), which will print a +summary of how much your application is doing Unicode and ASCII +back-and-forth conversions. +

TQString::detach() is obsolete and removed
+
+Since TQString is now always shared, this function does nothing. +Remove calls to TQString::detach(). +

TQString::resize(int size) is obsolete and removed
+
+Code using this to truncate a string should use +truncate(size-1). +Code using qstr.resize(0) should use qstr = TQString::null. +Code calling resize(n) prior to using +operator[] up to n just remove +the resize(n) completely. +

TQString::size() is obsolete and removed
+
+Calls to this function must be replaced by +length()+1. +

TQString::setStr(const char*) is removed
+
Try to understand why you were using this. +If you just meant assignment, use that. Otherwise, +you are probably using TQString as an array of bytes, in which case use +TQByteArray or TQCString instead. +

TQString is not an array of bytes
+
+Code that uses TQString as an array of bytes should use TQByteArray +or a char[], then convert that to a TQString if needed. +

"string = 0"
+
+Assigning 0 to a TQString should be assigning the null string, +ie. string = TQString::null. +

System functions
+
+You may find yourself needing latin1() for passing to the operating system +or other libraries, and be tempted to use TQCString to save the conversion, +but you are better off using Unicode throughout, then when the operating +system supports Unicode, you'll be prepared. Some Unix operating systems +are now beginning to have basic Unicode support, and TQt will be tracking +these improvements as they become more widespread. +

Bugs removed
+
+toShort() returns 0 (and sets *ok to false) on error. +toUInt() now works for big valid unsigned integers. +insert() now works into the same string. +

NULL pointers
+
+When converting "const char*" usage to TQString in order to make your +application fully Unicode-aware, use TQString::null for the null value +where you would have used 0 with char pointers. +

TQString is not null terminated
+
+This means that inserting a 0-character +in the middle of the string does not change the length(). ie. +
+   TQString s = "fred";
+   s[1] = '\0';
+     // s.length() == 4
+     // s == "f\0ed"
+     // s.latin1() == "f"
+   s[1] = 'r';
+     // s == "fred"
+     // s.latin1() == "fred"
+ 
+ +Especially look out for this type of code: +
+   TQString s(2);
+   s[0] = '?';
+   s[1] = 0;
+ 
+ +This creates a string 2 characters long. +To find these problems while converting, you might like to +add Q_ASSERT(strlen(d->ascii)==d->len) inside +
 TQString::latin1()
+ . +

TQString or Standard C++ string?
+
+

+The Standard C++ Library string is not Unicode. Nor is wstring defined +to be so (for the small number of platforms where it is defined at all). +This is the same mistake made over and over +in the history of C - only when non-8-bit characters are the norm +do programmers find them usable. Though it is possible to convert between +string and TQString, it is less efficient than using TQString throughout. +For example, when using: +

+    TQLabel::setText( const TQString& )
+
+ +if you use string, like this: +
+    void myclass::dostuffwithtext( const string& str )
+    {
+        mylabel.setText( TQString(str.c_str()) );
+    }
+
+ +that will create a (ASCII only) copy of str, stored in mylabel. +But this: +
+    void myclass::dostuffwithtext( const TQString& str )
+    {
+        mylabel.setText( str );
+    }
+
+ +will make an implicitly shared reference to str in the TQLabel - no copying +at all. This function might be 10 nested function calls away from something +like this: +
+    void toplevelclass::initializationstuff()
+    {
+        doStuff( tr("Okay") );
+    }
+
+ +At this point, in TQt 2.x, the tr() does a very fast dictionary lookup +through memory-mapped message files, returning some Unicode TQString for +the appropriate language (the default being to just make a TQString out +of the text, of course - you're not forced to use any of these +features), and that same memory mapped Unicode will be passed +though the system. All occurrences of the translation of "Okay" can +potentially be shared. +

+

TQApplication

+

In the function

 TQApplication::setColorSpec()
+ , +PrivateColor and TrueColor are obsolete. Use ManyColor instead. +

TQColor

+

+All colors +(color0, +color1, +black, +white, +darkGray, +gray, +lightGray, +red, +green, +blue, +cyan, +magenta, +yellow, +darkRed, +darkGreen, +darkBlue, +darkCyan, +darkMagenta, +and +darkYellow) +are in the TQt namespace. +In members of classes that inherit the TQt namespace-class (eg. TQWidget +subclasses), you can use the unqualified names as before, but in global +functions (eg. main()), you need to qualify them: TQt::red, TQt::white, etc. +See also the TQRgb section below. +

TQRgb

+

In TQRgb (a typedef of long), the order of the RGB channels has changed to +be in the more efficient order (for typical contemporary hardware). If your +code made assumptions about the order, you will get blue where you expect +red and vice versa (you'll not notice the problem if you use shades of +gray, green, or magenta). You should port your code to use the +creator function qRgb(int r,int g,int b) and the +access functions qRed(TQRgb), qBlue(TQRgb), and qGreen(TQRgb). +If you are using the alpha channel, it hasn't moved, but you should use +the functions qRgba(int,int,int,int) and qAlpha(TQRgb). Note also that +TQColor::pixel() does not return a TQRgb (it never did on all platforms, +but your code may have assumed so on your platform) - this may also produce +strange color results - use TQColor::rgb() if you want a TQRgb. +

TQDataStream

+

The TQDatastream serialization format of most TQt classes is changed +in TQt 2.x. Use

 TQDataStream::setVersion( 1 )
+ to get a +datastream object that can read and write TQt 1.x format data streams. +

If you want to write TQt 1.x format datastreams, note the following +compatibility issues: +

    +
  • TQString: TQt 1.x has no Unicode support, so strings will be +serialized by writing the classic C string returned by
    +        TQString::latin1().
    + +
  • TQPoint & al.: Coordinates will be +truncated to the TQt 1.x 16 bit format. +
+

TQWidget

+

TQWidget::recreate()

+

+This function is now called reparent(). +

TQWidget::setAcceptFocus(bool)

+

+This function is removed. +Calls like TQWidget::setAcceptFocus(TRUE) should be replaced by +

 TQWidget::setFocusPolicy(StrongFocus)
+ , and +calls like TQWidget::setAcceptFocus(FALSE) should be replaced by +
 TQWidget::setFocusPolicy(NoFocus)
+ . +Additional policies are TabFocus and ClickFocus. +

TQWidget::paintEvent()

+

+paintEvent(0) is not permitted - subclasses need not check for +a null event, and might crash. +Never pass 0 as the argument to paintEvent(). You probably +just want repaint() or update() instead. +

+When processing a paintEvent, painting is only permitted within +the update region specified in the event. Any painting outside will be +clipped away. This shouldn't break any code (it was always like this +on MS-Windows) but makes many explicit calls to +TQPainter::setClipRegion() superfluous. Apart from the improved +consistency, the change is likely to reduce flicker and to make TQt +event slightly faster. +

TQIODevice

+

+The protected member TQIODevice::index is renamed to TQIODevice::ioIndex +to avoid warnings and to allow compilation with bad C libraries that +#define index to strchr. If you have made a subclass of TQIODevice, +check every occurrence of the string "index" in the implementation, since +a compiler will not always catch cases like

(uint)index
+ +that need to be changed. +

TQLabel

+

 TQLabel::setMargin()
+

+

+

 TQLabel::setMargin()
+ and
 TQLabel::margin()
+ +have been renamed to
 TQLabel::setIndent()
+ and +
 TQLabel::indent()
+ , respectively. This was done to avoid +collision with TQFrame::setMargin(), which is now virtual. +

 TQLabel::setMovie()
+

+

+Previously, setting a movie on a label cleared the value of text(). +Now it doesn't. If you somehow used TQLabel::text() +to detect if a +movie was set, you might have trouble. This is unlikely. +

TQDialog

+

The semantics of the parent pointer changed for modeless dialogs: +In TQt-2.x, dialogs are always top level windows. The parent, however, +takes the ownership of the dialog, i.e. it will delete the dialog at +destruction if it has not been explicitly deleted +already. Furthermore, the window system will be able to tell that both +the dialog and the parent belong together. Some X11 window managers +will for instance provide a common taskbar entry in that case. +

+If the dialog belongs to a top level main window +of your application, pass this main window as parent to the dialog's +constructor. Old code (with 0 pointer) will still run. Old code that +included TQDialogs as child widgets will no longer work (it never really did). +If you think you might be doing this, put a breakpoint in +TQDialog::TQDialog() conditional on parent not being 0. +

TQStrList

+

Many methods that took a TQStrList can now instead take a TQStringList, +which is a real list of TQString values. +

To use TQStringList rather than TQStrList, change loops that look like this: +

+    TQStrList list = ...;
+    const char* s;
+    for ( s = list.first(); s; s = list.next() ) {
+        process(s);
+    }
+
+ +to be like this: +
+    TQStringList list = ...;
+    TQStringList::ConstIterator i;
+    for ( i = list.begin(); i != list.end(); ++i ) {
+        process(*i);
+    }
+
+ +

In general, the TQStrList functions are less efficient, building a temporary TQStringList. +

The following functions now use TQStringList rather than TQStrList +for return types/parameters. +

+

The following functions are added: +

    +
  • TQComboBox::insertStringList(const TQStringList &, int index=-1) +
  • TQListBox::insertStringList(const TQStringList &,int index=-1) +
+

The rarely used static function void +TQFont::listSubstitutions(TQStrList*) is replaced by TQStringList +TQFont::substitutions(). +

TQLayout

+

Calling resize(0,0) or resize(1,1) will no longer work magically. +Remove all such calls. The default size of top level widgets will be their +sizeHint(). +

The default implementation of TQWidget::sizeHint() will no longer +return just an invalid size; if the widget has a layout, it will return +the layout's preferred size. +

The special maximum MaximumHeight/Width is now TQWIDGETSIZE_MAX, +not TQCOORD_MAX. +

TQBoxLayout::addWidget() +now interprets the alignment parameter more aggressively. A +non-default alignment now indicates that the widget should not grow to +fill the available space, but should be sized according to sizeHint(). +If a widget is too small, set the alignment to 0. (Zero indicates no +alignment, and is the default.) +

The class TQGManager is removed. Subclasses of TQLayout need to be rewritten +to use the new, much simpler TQLayout API. +

For typical layouts, all use of +setMinimumSize() +and +setFixedSize() +can be removed. +activate() is no longer necessary. +

+You might like to look at the TQGrid, TQVBox, and TQHBox widgets - they offer +a simple way to build nested widget structures. +

TQListView

+

In TQt 1.x mouse events to the viewport where redirected to the +event handlers for the listview; in TQt 2.x, this functionality is +in TQScrollView where mouse (and other position-oriented) events are +redirected to viewportMousePressEvent() etc, which in turn translate +the event to the coordinate system of the contents and call +contentsMousePressEvent() etc, thus providing events in the most +convenient coordinate system. If you overrode TQListView::MouseButtonPress(), +TQListView::mouseDoubleClickEvent(), TQListView::mouseMoveEvent(), or +TQListView::mouseReleaseEvent() you must instead override +viewportMousePressEvent(), +viewportMouseDoubleClickEvent(), viewportMouseMoveEvent(), or +viewportMouseReleaseEvent() respectively. New code will usually override +contentsMousePressEvent() etc. +

The signal TQListView::selectionChanged(TQListViewItem *) can now be +emitted with a null pointer as parameter. Programs that use the +argument without checking for 0, may crash. +

TQMultiLineEdit

+

+The protected function +

 TQMultiLineEdit::textWidth(TQString*)
+ +changed to +
 TQMultiLineEdit::textWidth(const TQString&)
+ . +This is unlikely to be a problem, and you'll get a compile error +if you called it. +

TQClipboard

+

+

 TQClipboard::pixmap()
+ now returns a TQPixmap, not a TQPixmap*. +The pixmap +will be null if no pixmap is on the +clipboard. TQClipboard now offers powerful MIME-based types on the +clipboard, just like drag-and-drop (in fact, you can reuse most of your +drag-and-drop code with clipboard operations). +

TQDropSite

+

+TQDropSite is obsolete. If you simply passed this, just remove +the inheritance of TQDropSite and call +setAcceptDrops(TRUE) in the class +constructor. +If you passed something other than this, +your code will not work. A common case is passing +the +viewport() of a TQListView, +in which case, +override the +contentsDragMoveEvent(), +etc. +functions rather than TQListView's dragMoveEvent() etc. For other +cases, you will need to use an event filter to act on the drag/drop events +of another widget (as is the usual way to intercept foreign events). +

TQScrollView

+

The parameters in the signal +contentsMoving(int,int) +are now positive rather than negative values, coinciding with +setContentsPos(). Search for +connections you make to this signal, and either change the slot they are +connected to such that it also expects positive rather than negative +values, or introduce an intermediate slot and signal that negates them. +

If you used drag and drop with TQScrollView, you may experience the problem +described for TQDropSite. +

TQTextStream

+

+

 operator<<(TQTextStream&, TQChar&)
+ does not skip whitespace. +
 operator<<(TQTextStream&, char&)
+ does, +as was the case with TQt 1.x. This is for backward compatibility. +

TQUriDrag

+

The class TQUrlDrag is renamed to TQUriDrag, and the API has been +broadened to include additional conversion routines, including +conversions to Unicode filenames (see the class documentation +for details). Note that in TQt 1.x +the TQUrlDrag class used the non-standard MIME type "url/url", +while TQUriDrag uses the standardized "text/uri-list" type. Other +identifiers affected by the Url to Uri change are +TQUrlDrag::setUrls() and TQUrlDrag::urlToLocalFile(). +

TQPainter

+

The GrayText painter flag has been removed. Use +setPen( palette().disabled().foreground() ) +instead. +

The RasterOp enum +(CopyROP, +OrROP, +XorROP, +NotAndROP, +EraseROP, +NotCopyROP, +NotOrROP, +NotXorROP, +AndROP, NotEraseROP, +NotROP, +ClearROP, +SetROP, +NopROP, +AndNotROP, +OrNotROP, +NandROP, +NorROP, LastROP) +is now part of the TQt namespace class, so if you +use it outside a member function, you'll need to prefix with TQt::. +

TQPicture

+

The binary storage format of TQPicture is changed, but the TQt 2.x +TQPicture class can both read and write TQt 1.x format TQPictures. No +special handling is retquired for reading; TQPicture will automatically +detect the version number. In order to write a TQt 1.x format TQPicture, +set the formatVersion parameter to 1 in the TQPicture constructor. +

For writing TQt 1.x format TQPictures, the compatibility issues of TQDataStream applies. +

It is safe to try to read a TQPicture file generated with TQt 2.x +(without formatVersion set to 1) with a program compiled with TQt +1.x. The program will not crash, it will just issue the warning +"TQPicture::play: Incompatible version 2.x" and refuse to load the +picture. +

TQPoint, TQPointArray, TQSize and TQRect

+

The basic coordinate datatype in these classes, TQCOORD, is now 32 +bit (int) instead of a 16 bit (short). The const values TQCOORD_MIN and +TQCOORD_MAX have changed accordingly. +

TQPointArray is now actually, not only seemingly, a TQArray of TQPoint +objects. The semi-internal workaround classes TQPointData and TQPointVal +are removed since they are no longer needed; TQPoint is used directly +instead. The function

 TQPointArray::shortPoints()
+ +provides the point array converted to short (16bit) coordinates for +use with external functions that demand that format. +

TQImage

+

TQImage uses TQRgb for the colors - see the changes to that. +

TQPixmap

+

 TQPixmap::convertToImage()
+ with bitmaps now guarantees that color0 pixels +become color(0) in the resulting TQImage. If you worked around the lack of +this, you may be able to simplify your code. If you made assumptions +about the previous undefined behavior, the symptom will be inverted +bitmaps (eg. "inside-out" masks). +

+

 TQPixmap::optimize(TRUE)
+ +is replaced by +
 TQPixmap::setOptimization(TQPixmap::NormalOptim)
+ +or +
 TQPixmap::setOptimization(TQPixmap::BestOptim)
+ +- see the documentation +to choose which is best for your application. NormalOptim is most like +the TQt 1.x "TRUE" optimization. +

TQMenuData / TQPopupMenu

+

In TQt 1.x, new menu items were assigned either an application-wide +unique identifier or an identifier equal to the index of the item, depending on the +insertItem(...) function used. +In TQt 2.x this confusing +situation has been cleaned up: generated identifiers are always +unique across the entire application. +

If your code depends on generated ids +being equal to the item's index, a tquick fix is to use +

 TQMenuData::indexOf(int id)
+ +in the handling function instead. You may alternatively pass +
 TQMenuData::count()
+ +as identifier when you insert the items. +

Furthermore, TQPopupMenus can (and should!) be created with a parent +widget now, for example the main window that is used to display the +popup. This way, the popup will automatically be destroyed together +with its main window. Otherwise you'll have to take care of the +ownership manually. +

TQPopupMenus are also reusable in 2.x. They may occur in different +locations within one menu structure or be used as both a menubar +drop-down and as a context popup-menu. This should make it possible to +significantly simplify many applications. +

Last but not least, TQPopupMenu no longer inherits TQTableView. Instead, +it directly inherits TQFrame. +

TQValidator (TQLineEdit, TQComboBox, TQSpinBox)

+

 TQValidator::validate(...)
+ +and +
 TQValidator::fixup( TQString & )
+ +are now const +functions. If your subclass reimplements validate() as a +non-const function, +you will get a compile error (validate was pure virtual). +

In TQLineEdit, TQComboBox, and TQSpinBox, +setValidator(...) now takes a const pointer to a TQValidator, and +validator() returns a const pointer. This change highlights the fact +that the widgets do not take the ownership of the validator (a validator is +a TQObject on its own, with its own parent - you can easily set the same validator +object on many different widgets), so changing the state of +such an object or deleting it is very likely a bug. +

TQFile, TQFileInfo, TQDir

+

File and directory names are now always Unicode strings (ie. TQString). If you used TQString +in the past for the simplicity it offers, you'll probably have little consequence. However, +if you pass filenames to system functions rather than using TQt functions (eg. if you use the +Unix unlink() function rather than TQFile::remove(), your code will probably +only work for Latin1 locales (eg. Western Europe, the U.S.). To ensure your code will support +filenames in other locales, either use the TQt functions, or convert the filenames via +

 TQFile::encodeFilename()
+ and
 TQFile::decodeFilename()
+ - but do it +just as you call the system function - code that mixes encoded and unencoded filenames +is very error prone. See the comments in TQString, such as regarding QT_NO_ASCII_CAST that +can help find potential problems. +

TQFontMetrics

+

boundingRect(char) is replaced by +boundingRect(TQChar), but since +char auto-converts to TQChar, you're not likely to run into problems +with this. +

TQWindow

+

This class (which was just TQWidget under a different name) has been +removed. If you used it, do a global search-and-replace of the word +"TQWindow" with "TQWidget". +

TQEvent

+

The global #define macros in qevent.h have been replaced by an +enum in TQEvent. Use e.g. TQEvent::Paint instead of Event_Paint. Same +for all of: +Event_None, +Event_Timer, +Event_MouseButtonPress, +Event_MouseButtonRelease, +Event_MouseButtonDblClick, +Event_MouseMove, +Event_KeyPress, +Event_KeyRelease, +Event_FocusIn, +Event_FocusOut, +Event_Enter, +Event_Leave, +Event_Paint, +Event_Move, +Event_Resize, +Event_Create, +Event_Destroy, +Event_Show, +Event_Hide, +Event_Close, +Event_Quit, +Event_Accel, +Event_Clipboard, +Event_SockAct, +Event_DragEnter, +Event_DragMove, +Event_DragLeave, +Event_Drop, +Event_DragResponse, +Event_ChildInserted, +Event_ChildRemoved, +Event_LayoutHint, +Event_ActivateControl, +Event_DeactivateControl, +and +Event_User. +

The Q_*_EVENT macros in qevent.h have been deleted. Use an +explicit cast instead. The macros were: +Q_TIMER_EVENT, +Q_MOUSE_EVENT, +Q_KEY_EVENT, +Q_FOCUS_EVENT, +Q_PAINT_EVENT, +Q_MOVE_EVENT, +Q_RESIZE_EVENT, +Q_CLOSE_EVENT, +Q_SHOW_EVENT, +Q_HIDE_EVENT, +and +Q_CUSTOM_EVENT. +

TQChildEvents are now sent for all TQObjects, not just TQWidgets. +You may need to add extra checking if you use a TQChildEvent without +much testing of its values. +

All the removed functions

+

All these functions have been removed in +TQt 2.x. Most are simply cases where "const char*" has changed to +"const TQString&", or when an enumeration type has moved into the TQt:: +namespace (which, technically, is a new name, but your code will +compile just the same anyway). This list is provided for completeness. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/prev.png b/doc/html/prev.png new file mode 100644 index 00000000..f9fbd935 Binary files /dev/null and b/doc/html/prev.png differ diff --git a/doc/html/prevunfinished.png b/doc/html/prevunfinished.png new file mode 100644 index 00000000..25cc1a26 Binary files /dev/null and b/doc/html/prevunfinished.png differ diff --git a/doc/html/primes.html b/doc/html/primes.html new file mode 100644 index 00000000..b80c5b7b --- /dev/null +++ b/doc/html/primes.html @@ -0,0 +1,169 @@ + + + + + +Table of Prime Numbers 2-9999 + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Table of Prime Numbers 2-9999

+ + + +


+

+    2     3     5     7    11    13    17    19    23    29
+   31    37    41    43    47    53    59    61    67    71
+   73    79    83    89    97   101   103   107   109   113
+  127   131   137   139   149   151   157   163   167   173
+  179   181   191   193   197   199   211   223   227   229
+  233   239   241   251   257   263   269   271   277   281
+  283   293   307   311   313   317   331   337   347   349
+  353   359   367   373   379   383   389   397   401   409
+  419   421   431   433   439   443   449   457   461   463
+  467   479   487   491   499   503   509   521   523   541
+  547   557   563   569   571   577   587   593   599   601
+  607   613   617   619   631   641   643   647   653   659
+  661   673   677   683   691   701   709   719   727   733
+  739   743   751   757   761   769   773   787   797   809
+  811   821   823   827   829   839   853   857   859   863
+  877   881   883   887   907   911   919   929   937   941
+  947   953   967   971   977   983   991   997  1009  1013
+ 1019  1021  1031  1033  1039  1049  1051  1061  1063  1069
+ 1087  1091  1093  1097  1103  1109  1117  1123  1129  1151
+ 1153  1163  1171  1181  1187  1193  1201  1213  1217  1223
+ 1229  1231  1237  1249  1259  1277  1279  1283  1289  1291
+ 1297  1301  1303  1307  1319  1321  1327  1361  1367  1373
+ 1381  1399  1409  1423  1427  1429  1433  1439  1447  1451
+ 1453  1459  1471  1481  1483  1487  1489  1493  1499  1511
+ 1523  1531  1543  1549  1553  1559  1567  1571  1579  1583
+ 1597  1601  1607  1609  1613  1619  1621  1627  1637  1657
+ 1663  1667  1669  1693  1697  1699  1709  1721  1723  1733
+ 1741  1747  1753  1759  1777  1783  1787  1789  1801  1811
+ 1823  1831  1847  1861  1867  1871  1873  1877  1879  1889
+ 1901  1907  1913  1931  1933  1949  1951  1973  1979  1987
+ 1993  1997  1999  2003  2011  2017  2027  2029  2039  2053
+ 2063  2069  2081  2083  2087  2089  2099  2111  2113  2129
+ 2131  2137  2141  2143  2153  2161  2179  2203  2207  2213
+ 2221  2237  2239  2243  2251  2267  2269  2273  2281  2287
+ 2293  2297  2309  2311  2333  2339  2341  2347  2351  2357
+ 2371  2377  2381  2383  2389  2393  2399  2411  2417  2423
+ 2437  2441  2447  2459  2467  2473  2477  2503  2521  2531
+ 2539  2543  2549  2551  2557  2579  2591  2593  2609  2617
+ 2621  2633  2647  2657  2659  2663  2671  2677  2683  2687
+ 2689  2693  2699  2707  2711  2713  2719  2729  2731  2741
+ 2749  2753  2767  2777  2789  2791  2797  2801  2803  2819
+ 2833  2837  2843  2851  2857  2861  2879  2887  2897  2903
+ 2909  2917  2927  2939  2953  2957  2963  2969  2971  2999
+ 3001  3011  3019  3023  3037  3041  3049  3061  3067  3079
+ 3083  3089  3109  3119  3121  3137  3163  3167  3169  3181
+ 3187  3191  3203  3209  3217  3221  3229  3251  3253  3257
+ 3259  3271  3299  3301  3307  3313  3319  3323  3329  3331
+ 3343  3347  3359  3361  3371  3373  3389  3391  3407  3413
+ 3433  3449  3457  3461  3463  3467  3469  3491  3499  3511
+ 3517  3527  3529  3533  3539  3541  3547  3557  3559  3571
+ 3581  3583  3593  3607  3613  3617  3623  3631  3637  3643
+ 3659  3671  3673  3677  3691  3697  3701  3709  3719  3727
+ 3733  3739  3761  3767  3769  3779  3793  3797  3803  3821
+ 3823  3833  3847  3851  3853  3863  3877  3881  3889  3907
+ 3911  3917  3919  3923  3929  3931  3943  3947  3967  3989
+ 4001  4003  4007  4013  4019  4021  4027  4049  4051  4057
+ 4073  4079  4091  4093  4099  4111  4127  4129  4133  4139
+ 4153  4157  4159  4177  4201  4211  4217  4219  4229  4231
+ 4241  4243  4253  4259  4261  4271  4273  4283  4289  4297
+ 4327  4337  4339  4349  4357  4363  4373  4391  4397  4409
+ 4421  4423  4441  4447  4451  4457  4463  4481  4483  4493
+ 4507  4513  4517  4519  4523  4547  4549  4561  4567  4583
+ 4591  4597  4603  4621  4637  4639  4643  4649  4651  4657
+ 4663  4673  4679  4691  4703  4721  4723  4729  4733  4751
+ 4759  4783  4787  4789  4793  4799  4801  4813  4817  4831
+ 4861  4871  4877  4889  4903  4909  4919  4931  4933  4937
+ 4943  4951  4957  4967  4969  4973  4987  4993  4999  5003
+ 5009  5011  5021  5023  5039  5051  5059  5077  5081  5087
+ 5099  5101  5107  5113  5119  5147  5153  5167  5171  5179
+ 5189  5197  5209  5227  5231  5233  5237  5261  5273  5279
+ 5281  5297  5303  5309  5323  5333  5347  5351  5381  5387
+ 5393  5399  5407  5413  5417  5419  5431  5437  5441  5443
+ 5449  5471  5477  5479  5483  5501  5503  5507  5519  5521
+ 5527  5531  5557  5563  5569  5573  5581  5591  5623  5639
+ 5641  5647  5651  5653  5657  5659  5669  5683  5689  5693
+ 5701  5711  5717  5737  5741  5743  5749  5779  5783  5791
+ 5801  5807  5813  5821  5827  5839  5843  5849  5851  5857
+ 5861  5867  5869  5879  5881  5897  5903  5923  5927  5939
+ 5953  5981  5987  6007  6011  6029  6037  6043  6047  6053
+ 6067  6073  6079  6089  6091  6101  6113  6121  6131  6133
+ 6143  6151  6163  6173  6197  6199  6203  6211  6217  6221
+ 6229  6247  6257  6263  6269  6271  6277  6287  6299  6301
+ 6311  6317  6323  6329  6337  6343  6353  6359  6361  6367
+ 6373  6379  6389  6397  6421  6427  6449  6451  6469  6473
+ 6481  6491  6521  6529  6547  6551  6553  6563  6569  6571
+ 6577  6581  6599  6607  6619  6637  6653  6659  6661  6673
+ 6679  6689  6691  6701  6703  6709  6719  6733  6737  6761
+ 6763  6779  6781  6791  6793  6803  6823  6827  6829  6833
+ 6841  6857  6863  6869  6871  6883  6899  6907  6911  6917
+ 6947  6949  6959  6961  6967  6971  6977  6983  6991  6997
+ 7001  7013  7019  7027  7039  7043  7057  7069  7079  7103
+ 7109  7121  7127  7129  7151  7159  7177  7187  7193  7207
+ 7211  7213  7219  7229  7237  7243  7247  7253  7283  7297
+ 7307  7309  7321  7331  7333  7349  7351  7369  7393  7411
+ 7417  7433  7451  7457  7459  7477  7481  7487  7489  7499
+ 7507  7517  7523  7529  7537  7541  7547  7549  7559  7561
+ 7573  7577  7583  7589  7591  7603  7607  7621  7639  7643
+ 7649  7669  7673  7681  7687  7691  7699  7703  7717  7723
+ 7727  7741  7753  7757  7759  7789  7793  7817  7823  7829
+ 7841  7853  7867  7873  7877  7879  7883  7901  7907  7919
+ 7927  7933  7937  7949  7951  7963  7993  8009  8011  8017
+ 8039  8053  8059  8069  8081  8087  8089  8093  8101  8111
+ 8117  8123  8147  8161  8167  8171  8179  8191  8209  8219
+ 8221  8231  8233  8237  8243  8263  8269  8273  8287  8291
+ 8293  8297  8311  8317  8329  8353  8363  8369  8377  8387
+ 8389  8419  8423  8429  8431  8443  8447  8461  8467  8501
+ 8513  8521  8527  8537  8539  8543  8563  8573  8581  8597
+ 8599  8609  8623  8627  8629  8641  8647  8663  8669  8677
+ 8681  8689  8693  8699  8707  8713  8719  8731  8737  8741
+ 8747  8753  8761  8779  8783  8803  8807  8819  8821  8831
+ 8837  8839  8849  8861  8863  8867  8887  8893  8923  8929
+ 8933  8941  8951  8963  8969  8971  8999  9001  9007  9011
+ 9013  9029  9041  9043  9049  9059  9067  9091  9103  9109
+ 9127  9133  9137  9151  9157  9161  9173  9181  9187  9199
+ 9203  9209  9221  9227  9239  9241  9257  9277  9281  9283
+ 9293  9311  9319  9323  9337  9341  9343  9349  9371  9377
+ 9391  9397  9403  9413  9419  9421  9431  9433  9437  9439
+ 9461  9463  9467  9473  9479  9491  9497  9511  9521  9533
+ 9539  9547  9551  9587  9601  9613  9619  9623  9629  9631
+ 9643  9649  9661  9677  9679  9689  9697  9719  9721  9733
+ 9739  9743  9749  9767  9769  9781  9787  9791  9803  9811
+ 9817  9829  9833  9839  9851  9857  9859  9871  9883  9887
+ 9901  9907  9923  9929  9931  9941  9949  9967  9973
+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/process-example.html b/doc/html/process-example.html new file mode 100644 index 00000000..839f185b --- /dev/null +++ b/doc/html/process-example.html @@ -0,0 +1,148 @@ + + + + + +Starting processes with IO redirection + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Starting processes with IO redirection

+ + +

+

This example shows you how to start other processes with TQt and how +IO redirection is done. The example tries to start the uic (a tool +that comes with the TQt Designer) on a certain ui file and displays the +output of the command. +


+

Implementation (process.cpp): +

/****************************************************************************
+** $Id: qt/process.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qobject.h>
+#include <qprocess.h>
+#include <qvbox.h>
+#include <qtextview.h>
+#include <qpushbutton.h>
+#include <qapplication.h>
+#include <qmessagebox.h>
+
+#include <stdlib.h>
+
+class UicManager : public TQVBox
+{
+    Q_OBJECT
+
+public:
+    UicManager();
+    ~UicManager() {}
+
+public slots:
+    void readFromStdout();
+    void scrollToTop();
+
+private:
+    TQProcess *proc;
+    TQTextView *output;
+    TQPushButton *tquitButton;
+};
+
+UicManager::UicManager()
+{
+    // Layout
+    output = new TQTextView( this );
+    tquitButton = new TQPushButton( tr("Quit"), this );
+    connect( tquitButton, SIGNAL(clicked()),
+            qApp, SLOT(tquit()) );
+    resize( 500, 500 );
+
+    // TQProcess related code
+    proc = new TQProcess( this );
+
+    // Set up the command and arguments.
+    // On the command line you would do:
+    //   uic -tr i18n "small_dialog.ui"
+    proc->addArgument( "uic" );
+    proc->addArgument( "-tr" );
+    proc->addArgument( "i18n" );
+    proc->addArgument( "small_dialog.ui" );
+
+    connect( proc, SIGNAL(readyReadStdout()),
+            this, SLOT(readFromStdout()) );
+    connect( proc, SIGNAL(processExited()),
+            this, SLOT(scrollToTop()) );
+
+    if ( !proc->start() ) {
+        // error handling
+        TQMessageBox::critical( 0,
+                tr("Fatal error"),
+                tr("Could not start the uic command."),
+                tr("Quit") );
+        exit( -1 );
+    }
+}
+
+void UicManager::readFromStdout()
+{
+    // Read and process the data.
+    // Bear in mind that the data might be output in chunks.
+    output->append( proc->readStdout() );
+}
+
+void UicManager::scrollToTop()
+{
+    output->setContentsPos( 0, 0 );
+}
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+    UicManager manager;
+    a.setMainWidget( &manager );
+    manager.show();
+    return a.exec();
+}
+
+#include "process.moc"
+
+ +

See also TQProcess Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/progress-example.html b/doc/html/progress-example.html new file mode 100644 index 00000000..83a14b80 --- /dev/null +++ b/doc/html/progress-example.html @@ -0,0 +1,390 @@ + + + + + +Progress Bar and Dialog Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Progress Bar and Dialog Example

+ + +

+This example displays either a simple (text-only) or a +custom-labelled (user-supplied widget) progress dialog. It also +demonstrates simple use of menus. +


+

Implementation: +

/****************************************************************************
+** $Id: qt/progress.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qprogressdialog.h>
+#include <qapplication.h>
+#include <qmenubar.h>
+#include <qpopupmenu.h>
+#include <qpainter.h>
+#include <stdlib.h>
+
+class AnimatedThingy : public TQLabel {
+public:
+    AnimatedThingy( TQWidget* parent, const TQString& s ) :
+        TQLabel(parent),
+        label(s),
+        step(0)
+    {
+        setBackgroundColor(white);
+        label+="\n... and wasting CPU\nwith this animation!\n";
+
+        for (int i=0; i<nqix; i++)
+            ox[0][i] = oy[0][i] = ox[1][i] = oy[1][i] = 0;
+        x0 = y0 = x1 = y1 = 0;
+        dx0 = rand()%8+2;
+        dy0 = rand()%8+2;
+        dx1 = rand()%8+2;
+        dy1 = rand()%8+2;
+    }
+
+    void show()
+    {
+        if (!isVisible()) startTimer(100);
+        TQWidget::show();
+    }
+
+    void hide()
+    {
+        TQWidget::hide();
+        killTimers();
+    }
+
+    TQSize sizeHint() const
+    {
+        return TQSize(120,100);
+    }
+
+protected:
+    void timerEvent(TQTimerEvent*)
+    {
+        TQPainter p(this);
+        TQPen pn=p.pen();
+        pn.setWidth(2);
+        pn.setColor(backgroundColor());
+        p.setPen(pn);
+
+        step = (step + 1) % nqix;
+
+        p.drawLine(ox[0][step], oy[0][step], ox[1][step], oy[1][step]);
+
+        inc(x0, dx0, width());
+        inc(y0, dy0, height());
+        inc(x1, dx1, width());
+        inc(y1, dy1, height());
+        ox[0][step] = x0;
+        oy[0][step] = y0;
+        ox[1][step] = x1;
+        oy[1][step] = y1;
+
+        TQColor c;
+        c.setHsv( (step*255)/nqix, 255, 255 ); // rainbow effect
+        pn.setColor(c);
+        p.setPen(pn);
+        p.drawLine(ox[0][step], oy[0][step], ox[1][step], oy[1][step]);
+        p.setPen(colorGroup().text());
+        p.drawText(rect(), AlignCenter, label);
+    }
+
+    void paintEvent(TQPaintEvent* event)
+    {
+        TQPainter p(this);
+        TQPen pn=p.pen();
+        pn.setWidth(2);
+        p.setPen(pn);
+        p.setClipRect(event->rect());
+        for (int i=0; i<nqix; i++) {
+            TQColor c;
+            c.setHsv( (i*255)/nqix, 255, 255 ); // rainbow effect
+            pn.setColor(c);
+            p.setPen(pn);
+            p.drawLine(ox[0][i], oy[0][i], ox[1][i], oy[1][i]);
+        }
+        p.setPen(colorGroup().text());
+        p.drawText(rect(), AlignCenter, label);
+    }
+
+private:
+    void inc(int& x, int& dx, int b)
+    {
+        x+=dx;
+        if (x<0) { x=0; dx=rand()%8+2; }
+        else if (x>=b) { x=b-1; dx=-(rand()%8+2); }
+    }
+
+    enum {nqix=10};
+    int ox[2][nqix];
+    int oy[2][nqix];
+    int x0,y0,x1,y1;
+    int dx0,dy0,dx1,dy1;
+    TQString label;
+    int step;
+};
+
+
+class CPUWaster : public TQWidget
+{
+    Q_OBJECT
+
+    enum { first_draw_item = 1000, last_draw_item = 1006 };
+
+    int drawItemRects(int id)
+    {
+        int n = id - first_draw_item;
+        int r = 100;
+        while (n--) r*=(n%3 ? 5 : 4);
+        return r;
+    }
+    TQString drawItemText(int id)
+    {
+        TQString str;
+        str.sprintf("%d Rectangles", drawItemRects(id));
+        return str;
+    }
+
+public:
+    CPUWaster() :
+        pb(0)
+    {
+        menubar = new TQMenuBar( this, "menu" );
+        Q_CHECK_PTR( menubar );
+
+        TQPopupMenu* file = new TQPopupMenu();
+        Q_CHECK_PTR( file );
+        menubar->insertItem( "&File", file );
+        for (int i=first_draw_item; i<=last_draw_item; i++)
+            file->insertItem( drawItemText(i), i );
+        connect( menubar, SIGNAL(activated(int)), this, SLOT(doMenuItem(int)) );
+        file->insertSeparator();
+        file->insertItem( "Quit", qApp,  SLOT(tquit()) );
+
+        options = new TQPopupMenu();
+        Q_CHECK_PTR( options );
+        menubar->insertItem( "&Options", options );
+        td_id = options->insertItem( "Timer driven", this, SLOT(timerDriven()) );
+        ld_id = options->insertItem( "Loop driven", this, SLOT(loopDriven()) );
+        options->insertSeparator();
+        dl_id = options->insertItem( "Default label", this, SLOT(defaultLabel()) );
+        cl_id = options->insertItem( "Custom label", this, SLOT(customLabel()) );
+        options->insertSeparator();
+        md_id = options->insertItem( "No minimum duration", this, SLOT(toggleMinimumDuration()) );
+        options->setCheckable( TRUE );
+        loopDriven();
+        defaultLabel();
+
+        setFixedSize( 400, 300 );
+
+        setBackgroundColor( black );
+    }
+
+public slots:
+    void doMenuItem(int id)
+    {
+        if (id >= first_draw_item && id <= last_draw_item)
+            draw(drawItemRects(id));
+    }
+
+    void stopDrawing() { got_stop = TRUE; }
+
+    void timerDriven()
+    {
+        timer_driven = TRUE;
+        options->setItemChecked( td_id, TRUE );
+        options->setItemChecked( ld_id, FALSE );
+    }
+
+    void loopDriven()
+    {
+        timer_driven = FALSE;
+        options->setItemChecked( ld_id, TRUE );
+        options->setItemChecked( td_id, FALSE );
+    }
+
+    void defaultLabel()
+    {
+        default_label = TRUE;
+        options->setItemChecked( dl_id, TRUE );
+        options->setItemChecked( cl_id, FALSE );
+    }
+
+    void customLabel()
+    {
+        default_label = FALSE;
+        options->setItemChecked( dl_id, FALSE );
+        options->setItemChecked( cl_id, TRUE );
+    }
+
+    void toggleMinimumDuration()
+    {
+        options->setItemChecked( md_id,
+           !options->isItemChecked( md_id ) );
+    }
+
+private:
+    void timerEvent( TQTimerEvent* )
+    {
+        if (!got_stop)
+            pb->setProgress( pb->totalSteps() - rects );
+        rects--;
+
+        {
+            TQPainter p(this);
+
+            int ww = width();
+            int wh = height();
+
+            if ( ww > 8 && wh > 8 ) {
+                TQColor c(rand()%255, rand()%255, rand()%255);
+                int x = rand() % (ww-8);
+                int y = rand() % (wh-8);
+                int w = rand() % (ww-x);
+                int h = rand() % (wh-y);
+                p.fillRect( x, y, w, h, c );
+            }
+        }
+
+        if (!rects || got_stop) {
+            if (!got_stop)
+                pb->setProgress( pb->totalSteps() );
+            TQPainter p(this);
+            p.fillRect(0, 0, width(), height(), backgroundColor());
+            enableDrawingItems(TRUE);
+            killTimers();
+            delete pb;
+            pb = 0;
+        }
+    }
+
+    TQProgressDialog* newProgressDialog( const char* label, int steps, bool modal )
+    {
+        TQProgressDialog *d = new TQProgressDialog(label, "Cancel", steps, this,
+                                                 "progress", modal);
+        if ( options->isItemChecked( md_id ) )
+            d->setMinimumDuration(0);
+        if ( !default_label )
+            d->setLabel( new AnimatedThingy(d,label) );
+        return d;
+    }
+
+    void enableDrawingItems(bool yes)
+    {
+        for (int i=first_draw_item; i<=last_draw_item; i++) {
+            menubar->setItemEnabled(i, yes);
+        }
+    }
+
+    void draw(int n)
+    {
+        if ( timer_driven ) {
+            if ( pb ) {
+                qWarning("This cannot happen!");
+                return;
+            }
+            rects = n;
+            pb = newProgressDialog("Drawing rectangles.\n"
+                                   "Using timer event.", n, FALSE);
+            pb->setCaption("Please Wait");
+            connect(pb, SIGNAL(cancelled()), this, SLOT(stopDrawing()));
+            enableDrawingItems(FALSE);
+            startTimer(0);
+            got_stop = FALSE;
+        } else {
+            TQProgressDialog* lpb = newProgressDialog(
+                        "Drawing rectangles.\nUsing loop.", n, TRUE);
+            lpb->setCaption("Please Wait");
+
+            TQPainter p(this);
+            for (int i=0; i<n; i++) {
+                lpb->setProgress(i);
+                if ( lpb->wasCancelled() )
+                    break;
+
+                TQColor c(rand()%255, rand()%255, rand()%255);
+                int x = rand()%(width()-8);
+                int y = rand()%(height()-8);
+                int w = rand()%(width()-x);
+                int h = rand()%(height()-y);
+                p.fillRect(x,y,w,h,c);
+            }
+
+            p.fillRect(0, 0, width(), height(), backgroundColor());
+
+            delete lpb;
+        }
+    }
+
+    TQMenuBar* menubar;
+    TQProgressDialog* pb;
+    TQPopupMenu* options;
+    int td_id, ld_id;
+    int dl_id, cl_id;
+    int md_id;
+    int rects;
+    bool timer_driven;
+    bool default_label;
+    bool got_stop;
+};
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    int wincount = argc > 1 ? atoi(argv[1]) : 1;
+
+    for ( int i=0; i<wincount; i++ ) {
+        CPUWaster* cpuw = new CPUWaster;
+        if ( i == 0 ) a.setMainWidget(cpuw);
+        cpuw->show();
+    }
+    return a.exec();
+}
+
+#include "progress.moc"
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/progressbar-example.html b/doc/html/progressbar-example.html new file mode 100644 index 00000000..99a024da --- /dev/null +++ b/doc/html/progressbar-example.html @@ -0,0 +1,289 @@ + + + + + +Progress Bar + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Progress Bar

+ + +

+This example shows how to use a progress bar. +


+

Header file: +

/****************************************************************************
+** $Id: qt/progressbar.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef PROGRESSBAR_H
+#define PROGRESSBAR_H
+
+#include <qbuttongroup.h>
+#include <qtimer.h>
+
+class TQRadioButton;
+class TQPushButton;
+class TQProgressBar;
+
+class ProgressBar : public TQButtonGroup
+{
+    Q_OBJECT
+
+public:
+    ProgressBar( TQWidget *parent = 0, const char *name = 0 );
+
+protected:
+    TQRadioButton *slow, *normal, *fast;
+    TQPushButton *start, *pause, *reset;
+    TQProgressBar *progress;
+    TQTimer timer;
+
+protected slots:
+    void slotStart();
+    void slotReset();
+    void slotTimeout();
+
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/progressbar.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "progressbar.h"
+
+#include <qradiobutton.h>
+#include <qpushbutton.h>
+#include <qprogressbar.h>
+#include <qlayout.h>
+
+#include <qmotifstyle.h>
+
+/*
+ * Constructor
+ *
+ * Creates child widgets of the ProgressBar widget
+ */
+
+ProgressBar::ProgressBar( TQWidget *parent, const char *name )
+    : TQButtonGroup( 0, Horizontal, "Progress Bar", parent, name ), timer()
+{
+    setMargin( 10 );
+
+    TQGridLayout* toplayout = new TQGridLayout( layout(), 2, 2, 5);
+
+    setRadioButtonExclusive( TRUE );
+
+    // insert three radiobuttons which the user can use
+    // to set the speed of the progress and two pushbuttons
+    // to start/pause/continue and reset the progress
+    slow = new TQRadioButton( "S&low", this );
+    normal = new TQRadioButton( "&Normal", this );
+    fast = new TQRadioButton( "&Fast", this );
+    TQVBoxLayout* vb1 = new TQVBoxLayout;
+    toplayout->addLayout( vb1, 0, 0 );
+    vb1->addWidget( slow );
+    vb1->addWidget( normal );
+    vb1->addWidget( fast );
+
+    // two push buttons, one for start, for for reset.
+    start = new TQPushButton( "&Start", this );
+    reset = new TQPushButton( "&Reset", this );
+    TQVBoxLayout* vb2 = new TQVBoxLayout;
+    toplayout->addLayout( vb2, 0, 1 );
+    vb2->addWidget( start );
+    vb2->addWidget( reset );
+
+    // Create the progressbar
+    progress = new TQProgressBar( 100, this );
+    //    progress->setStyle( new TQMotifStyle() );
+    toplayout->addMultiCellWidget( progress, 1, 1, 0, 1 );
+
+    // connect the clicked() SIGNALs of the pushbuttons to SLOTs
+    connect( start, SIGNAL( clicked() ), this, SLOT( slotStart() ) );
+    connect( reset, SIGNAL( clicked() ), this, SLOT( slotReset() ) );
+
+    // connect the timeout() SIGNAL of the progress-timer to a SLOT
+    connect( &timer, SIGNAL( timeout() ), this, SLOT( slotTimeout() ) );
+
+    // Let's start with normal speed...
+    normal->setChecked( TRUE );
+
+
+    // some contraints
+    start->setFixedWidth( 80 );
+    setMinimumWidth( 300 );
+}
+
+/*
+ * SLOT slotStart
+ *
+ * This SLOT is called if the user clicks start/pause/continue
+ * button
+ */
+
+void ProgressBar::slotStart()
+{
+    // If the progress bar is at the beginning...
+    if ( progress->progress() == -1 ) {
+        // ...set according to the checked speed-radiobutton
+        // the number of steps which are needed to complete the process
+        if ( slow->isChecked() )
+            progress->setTotalSteps( 10000 );
+        else if ( normal->isChecked() )
+            progress->setTotalSteps( 1000 );
+        else
+            progress->setTotalSteps( 50 );
+
+        // disable the speed-radiobuttons
+        slow->setEnabled( FALSE );
+        normal->setEnabled( FALSE );
+        fast->setEnabled( FALSE );
+    }
+
+    // If the progress is not running...
+    if ( !timer.isActive() ) {
+        // ...start the timer (and so the progress) with a interval of 1 ms...
+        timer.start( 1 );
+        // ...and rename the start/pause/continue button to Pause
+        start->setText( "&Pause" );
+    } else { // if the prgress is running...
+        // ...stop the timer (and so the prgress)...
+        timer.stop();
+        // ...and rename the start/pause/continue button to Continue
+        start->setText( "&Continue" );
+    }
+}
+
+/*
+ * SLOT slotReset
+ *
+ * This SLOT is called when the user clicks the reset button
+ */
+
+void ProgressBar::slotReset()
+{
+    // stop the timer and progress
+    timer.stop();
+
+    // rename the start/pause/continue button to Start...
+    start->setText( "&Start" );
+    // ...and enable this button
+    start->setEnabled( TRUE );
+
+    // enable the speed-radiobuttons
+    slow->setEnabled( TRUE );
+    normal->setEnabled( TRUE );
+    fast->setEnabled( TRUE );
+
+    // reset the progressbar
+    progress->reset();
+}
+
+/*
+ * SLOT slotTimeout
+ *
+ * This SLOT is called each ms when the timer is
+ * active (== progress is running)
+ */
+
+void ProgressBar::slotTimeout()
+{
+    int p = progress->progress();
+
+#if 1
+    // If the progress is complete...
+    if ( p == progress->totalSteps() )  {
+        // ...rename the start/pause/continue button to Start...
+        start->setText( "&Start" );
+        // ...and disable it...
+        start->setEnabled( FALSE );
+        // ...and return
+        return;
+    }
+#endif
+
+    // If the process is not complete increase it
+    progress->setProgress( ++p );
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "progressbar.h"
+#include <qapplication.h>
+
+int main(int argc,char **argv)
+{
+    TQApplication a(argc,argv);
+
+    ProgressBar progressbar;
+    progressbar.setCaption("TQt Example - ProgressBar");
+    a.setMainWidget(&progressbar);
+    progressbar.show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/properties.html b/doc/html/properties.html new file mode 100644 index 00000000..45a97277 --- /dev/null +++ b/doc/html/properties.html @@ -0,0 +1,221 @@ + + + + + +Properties + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Properties

+ + + +

TQt provides a sophisticated property system similar to those supplied +by some compiler vendors. However, as a compiler- and +platform-independent library, TQt cannot rely on non-standard compiler +features like __property or [property]. Our solution works with +any standard C++ compiler on every platform we support. It's based +on the meta-object system that also provides object communication +through signals and slots. +

The Q_PROPERTY macro in a class declaration declares a +property. Properties can only be declared in classes that inherit TQObject. A second macro, Q_OVERRIDE, can be used to override some +aspects of an inherited property in a subclass. (See Q_OVERRIDE.) +

To the outer world, a property appears to be similar to a data member. +But properties have several features that distinguish them from +ordinary data members: +

    +
  • A read function. This always exists. +

  • A write function. This is optional: read-only properties like TQWidget::isDesktop() do not have one. +

  • An attribute "stored" that indicates persistence. Most properties +are stored, but a few virtual properties are not. For example, TQWidget::minimumWidth() isn't stored, since it's just a view of +TQWidget::minimumSize(), and has no data of its own. +

  • A reset function to set a property back to its context specific +default value. This is very rare, but for example, TQWidget::font() +needs this, since no call to TQWidget::setFont() can mean 'reset to +the context specific font'. +

  • An attribute "designable" that indicates whether it makes sense to +make the property available in a GUI builder (e.g. TQt Designer). For most properties this +makes sense, but not for all, e.g. TQButton::isDown(). The user can +press buttons, and the application programmer can make the program +press its own buttons, but a GUI design tool can't press buttons. +

+

The read, write, and reset functions must be public member functions +from the class in which the property is defined. +

Properties can be read and written through generic functions in +TQObject without knowing anything about the class in use. These two +function calls are equivalent: +

+    // TQButton *b and TQObject *o point to the same button
+    b->setDown( TRUE );
+    o->setProperty( "down", TRUE );
+
+ +

Equivalent, that is, except that the first is faster, and provides +much better diagnostics at compile time. When practical, the first is +better. However, since you can get a list of all available properties +for any TQObject through its TQMetaObject, TQObject::setProperty() +can give you control over classes that weren't available at compile +time. +

As well as TQObject::setProperty(), there is a corresponding TQObject::property() function. TQMetaObject::propertyNames() returns +the names of all available properties. TQMetaObject::property() +returns the property data for a named property: a TQMetaProperty +object. +

Here's a simple example that shows the most important property +functions in use: +

+    class MyClass : public TQObject
+    {
+        Q_OBJECT
+    public:
+        MyClass( TQObject * parent=0, const char * name=0 );
+        ~MyClass();
+
+        enum Priority { High, Low, VeryHigh, VeryLow };
+        void setPriority( Priority );
+        Priority priority() const;
+    };
+
+ +

The class has a property "priority" that is not yet known to the meta object system. In order to make the property known, you must +declare it with the Q_PROPERTY macro. The syntax is as follows: +

+Q_PROPERTY( type name READ getFunction [WRITE setFunction]
+            [RESET resetFunction] [DESIGNABLE bool] 
+            [SCRIPTABLE bool] [STORED bool] )
+
+ +

For the declaration to be valid, the get function must be const and +to return either the type itself, a pointer to it, or a reference to +it. The optional write function must return void and must take exactly +one argument, either the type itself, a pointer or a const reference +to it. The meta object compiler enforces this. +

The type of a property can be any TQVariant supported type or an +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 +(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 +is a TQVariant whose value is the entire list or map. +

Enumeration types are registered with the Q_ENUMS macro. Here's the +final class declaration including the property related declarations: +

+    class MyClass : public TQObject
+    {
+        Q_OBJECT
+        Q_PROPERTY( Priority priority READ priority WRITE setPriority )
+        Q_ENUMS( Priority )
+    public:
+        MyClass( TQObject * parent=0, const char * name=0 );
+        ~MyClass();
+
+        enum Priority { High, Low, VeryHigh, VeryLow };
+        void setPriority( Priority );
+        Priority priority() const;
+    };
+
+ +

Another similar macro is Q_SETS. Like Q_ENUMS, it registers an +enumeration type but marks it in addition as a "set", i.e. the +enumeration values can be OR-ed together. An I/O class might have +enumeration values "Read" and "Write" and accept "Read|Write": such an +enum is best handled with Q_SETS, rather than Q_ENUMS. +

The remaining keywords in the Q_PROPERTY section are RESET, DESIGNABLE, SCRIPTABLE and STORED. +

RESET names a function that will set the property to its default +state (which may have changed since initialization). The function +must return void and take no arguments. +

DESIGNABLE declares whether this property is suitable for +modification by a GUI design tool. The default is TRUE for +writable properties; otherwise FALSE. Instead of TRUE or FALSE, you can specify a boolean member function. +

SCRIPTABLE declares whether this property is suited for access by a +scripting engine. The default is TRUE. Instead of TRUE or FALSE, +you can specify a boolean member function. +

STORED declares whether the property's value must be remembered +when storing an object's state. Stored makes only sense for writable +properties. The default value is TRUE. Technically superfluous +properties (like TQPoint pos if TQRect geometry is already a property) +define this to be FALSE. +

Connected to the property system is an additional macro, "Q_CLASSINFO", +that can be used to attach additional name/value-pairs to a class' +meta object, for example: +

+    Q_CLASSINFO( "Version", "3.0.0" )
+
+ +

Like other meta data, class information is accessible at runtime +through the meta object, see TQMetaObject::classInfo() for details. +

+

Q_OVERRIDE +

+

When you inherit a TQObject subclass you may wish to override some +aspects of some of the class's properties. +

For example, in TQWidget we have the autoMask property defined like +this: +

+    Q_PROPERTY( bool autoMask READ autoMask WRITE setAutoMask DESIGNABLE false SCRIPTABLE false )
+
+ +

But we need to make the auto mask property designable in some TQWidget +subclasses. Similarly some classes will need this property to be +scriptable (e.g. for TQSA). This is achieved by overriding these +features of the property in a subclass. In TQCheckBox, for example, we +achieve this using the following code: +

+    Q_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
+
+ +

Another example is TQToolButton. By default TQToolButton has a read-only +"toggleButton" property, because that's what it inherits from TQButton: +

+    Q_PROPERTY( bool toggleButton READ isToggleButton )
+
+ +

But we want to make our tool buttons able to be toggled, so we write a +WRITE function in TQToolButton, and use the following property override +to make it acessible: +

+    Q_OVERRIDE( bool toggleButton WRITE setToggleButton )
+
+ +The result is read-write (and scriptable and designable, since we now +have a WRITE function) boolean property "toggleButton" for tool +buttons. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/propertydocs b/doc/html/propertydocs new file mode 100644 index 00000000..6d8d3e7f --- /dev/null +++ b/doc/html/propertydocs @@ -0,0 +1,5312 @@ + + + QAction::accel + +<p>This property holds the action's accelerator key. +<p>The keycodes can be found in <a href="qt.html#Key-enum">Qt::Key</a> and <a href="qt.html#Modifier-enum">Qt::Modifier</a>. There +is no default accelerator key. + +<p>Set this property's value with <a href="qaction.html#setAccel">setAccel</a>() and get this property's value with <a href="qaction.html#accel">accel</a>(). + + + + QAction::enabled + +<p>This property holds whether the action is enabled. +<p>Disabled actions can't be chosen by the user. They don't disappear +from the menu/tool bar but are displayed in a way which indicates +that they are unavailable, e.g. they might be displayed grayed +out. +<p> What's this? help on disabled actions is still available provided +the <a href="qaction.html#whatsThis-prop">QAction::whatsThis</a> property is set. + +<p>Set this property's value with <a href="qaction.html#setEnabled">setEnabled</a>() and get this property's value with <a href="qaction.html#isEnabled">isEnabled</a>(). + + + + QAction::iconSet + +<p>This property holds the action's icon. +<p>The icon is used as the tool button icon and in the menu to the +left of the menu text. There is no default icon. +<p> If a null icon (<a href="qiconset.html#isNull">QIconSet::isNull</a>() is passed into this function, +the icon of the action is cleared. +<p> (See the action/toggleaction/toggleaction.cpp example.) +<p> +<p>Set this property's value with <a href="qaction.html#setIconSet">setIconSet</a>() and get this property's value with <a href="qaction.html#iconSet">iconSet</a>(). + + + + QAction::menuText + +<p>This property holds the action's menu text. +<p>If the action is added to a menu the menu option will consist of +the icon (if there is one), the menu text and the accelerator (if +there is one). If the menu text is not explicitly set in the +constructor or by using <a href="qaction.html#setMenuText">setMenuText</a>() the action's description +text will be used as the menu text. There is no default menu text. +<p> <p>See also <a href="qaction.html#text-prop">text</a>. + +<p>Set this property's value with <a href="qaction.html#setMenuText">setMenuText</a>() and get this property's value with <a href="qaction.html#menuText">menuText</a>(). + + + + QAction::on + +<p>This property holds whether a toggle action is on. +<p>This property is always on (TRUE) for command actions and +<a href="qactiongroup.html">QActionGroup</a>s; <a href="qaction.html#setOn">setOn</a>() has no effect on them. For action's +where <a href="qaction.html#isToggleAction">isToggleAction</a>() is TRUE, this property's default value is +off (FALSE). +<p> <p>See also <a href="qaction.html#toggleAction-prop">toggleAction</a>. + +<p>Set this property's value with <a href="qaction.html#setOn">setOn</a>() and get this property's value with <a href="qaction.html#isOn">isOn</a>(). + + + + QAction::statusTip + +<p>This property holds the action's status tip. +<p>The statusTip is displayed on all status bars that this action's +toplevel parent widget provides. +<p> If no status tip is defined, the action uses the tool tip text. +<p> There is no default statusTip text. +<p> <p>See also <a href="qaction.html#statusTip-prop">statusTip</a> and <a href="qaction.html#toolTip-prop">toolTip</a>. + +<p>Set this property's value with <a href="qaction.html#setStatusTip">setStatusTip</a>() and get this property's value with <a href="qaction.html#statusTip">statusTip</a>(). + + + + QAction::text + +<p>This property holds the action's descriptive text. +<p>If <a href="qmainwindow.html#usesTextLabel-prop">QMainWindow::usesTextLabel</a> is TRUE, the text appears as a +label in the relevant tool button. It also serves as the default +text in menus and tool tips if these have not been specifically +defined. There is no default text. +<p> <p>See also <a href="qaction.html#menuText-prop">menuText</a>, <a href="qaction.html#toolTip-prop">toolTip</a>, and <a href="qaction.html#statusTip-prop">statusTip</a>. + +<p>Set this property's value with <a href="qaction.html#setText">setText</a>() and get this property's value with <a href="qaction.html#text">text</a>(). + + + + QAction::toggleAction + +<p>This property holds whether the action is a toggle action. +<p>A toggle action is one which has an on/off state. For example a +Bold toolbar button is either on or off. An action which is not a +toggle action is a command action; a command action is simply +executed, e.g. file save. This property's default is FALSE. +<p> In some situations, the state of one toggle action should depend +on the state of others. For example, "Left Align", "Center" and +"Right Align" toggle actions are mutually exclusive. To achieve +exclusive toggling, add the relevant toggle actions to a +<a href="qactiongroup.html">QActionGroup</a> with the <a href="qactiongroup.html#exclusive-prop">QActionGroup::exclusive</a> property set to +TRUE. + +<p>Set this property's value with <a href="qaction.html#setToggleAction">setToggleAction</a>() and get this property's value with <a href="qaction.html#isToggleAction">isToggleAction</a>(). + + + + QAction::toolTip + +<p>This property holds the action's tool tip. +<p>This text is used for the tool tip. If no status tip has been set +the tool tip will be used for the status tip. +<p> If no tool tip is specified the action's text is used, and if that +hasn't been specified the description text is used as the tool tip +text. +<p> There is no default tool tip text. +<p> <p>See also <a href="qaction.html#statusTip-prop">statusTip</a> and <a href="qaction.html#accel-prop">accel</a>. + +<p>Set this property's value with <a href="qaction.html#setToolTip">setToolTip</a>() and get this property's value with <a href="qaction.html#toolTip">toolTip</a>(). + + + + QAction::visible + +<p>This property holds whether the action can be seen (e.g. in menus and toolbars). +<p>If <em>visible</em> is TRUE the action can be seen (e.g. in menus and +toolbars) and chosen by the user; if <em>visible</em> is FALSE the +action cannot be seen or chosen by the user. +<p> Actions which are not visible are <em>not</em> grayed out; they do not +appear at all. + +<p>Set this property's value with <a href="qaction.html#setVisible">setVisible</a>() and get this property's value with <a href="qaction.html#isVisible">isVisible</a>(). + + + + QAction::whatsThis + +<p>This property holds the action's "What's This?" help text. +<p>The whats this text is used to provide a brief description of the +action. The text may contain rich text (HTML-like tags -- see +<a href="qstylesheet.html">QStyleSheet</a> for the list of supported tags). There is no default +"What's This" text. +<p> <p>See also <a href="qwhatsthis.html">QWhatsThis</a>. + +<p>Set this property's value with <a href="qaction.html#setWhatsThis">setWhatsThis</a>() and get this property's value with <a href="qaction.html#whatsThis">whatsThis</a>(). + + + + QActionGroup::exclusive + +<p>This property holds whether the action group does exclusive toggling. +<p>If exclusive is TRUE only one toggle action in the action group +can ever be active at any one time. If the user chooses another +toggle action in the group the one they chose becomes active and +the one that was active becomes inactive. +<p> <p>See also <a href="qaction.html#toggleAction-prop">QAction::toggleAction</a>. + +<p>Set this property's value with <a href="qactiongroup.html#setExclusive">setExclusive</a>() and get this property's value with <a href="qactiongroup.html#isExclusive">isExclusive</a>(). + + + + QActionGroup::usesDropDown + +<p>This property holds whether the group's actions are displayed in a subwidget of the widgets the action group is added to. +<p>Exclusive action groups added to a toolbar display their actions +in a combobox with the action's <a href="qaction.html#text-prop">QAction::text</a> and <a href="qaction.html#iconSet-prop">QAction::iconSet</a> properties shown. Non-exclusive groups are +represented by a tool button showing their <a href="qaction.html#iconSet-prop">QAction::iconSet</a> and +-- depending on <a href="qmainwindow.html#usesTextLabel">QMainWindow::usesTextLabel</a>() -- <a href="qaction.html#text">text</a>() +property. +<p> In a popup menu the member actions are displayed in a submenu. +<p> Changing usesDropDown only affects <em>subsequent</em> calls to <a href="qactiongroup.html#addTo">addTo</a>(). +<p> Note that setting this property for actions in a combobox causes +calls to their <a href="qaction.html#setVisible">QAction::setVisible</a>(), +<a href="qaction.html#setEnabled">QAction::setEnabled</a>(), and +<a href="qaction.html#setDisabled">QAction::setDisabled</a>() functions to have no effect. +<p> This property's default is FALSE. +<p> +<p>Set this property's value with <a href="qactiongroup.html#setUsesDropDown">setUsesDropDown</a>() and get this property's value with <a href="qactiongroup.html#usesDropDown">usesDropDown</a>(). + + + + QAssistantClient::open + +<p>This property holds whether Qt Assistant is open. +<p> +<p>Get this property's value with <a href="qassistantclient.html#isOpen">isOpen</a>(). + + + + QAxBase::control + +<p>This property holds the name of the COM object wrapped by this QAxBase object. +<p>Setting this property initilializes the COM object. Any COM object +previously set is shut down. +<p> The most efficient way to set this property is by using the +registered component's UUID, e.g. +<pre> + ctrl-&gt;setControl( "{8E27C92B-1264-101C-8A2F-040224009C02}" ); + </pre> + +The second fastest way is to use the registered control's class +name (with or without version number), e.g. +<pre> + ctrl-&gt;setControl( "MSCal.Calendar" ); + </pre> + +The slowest, but easiest way to use is to use the control's full +name, e.g. +<pre> + ctrl-&gt;setControl( "Calendar Control 9.0" ); + </pre> + +<p> If the component's UUID is used the following patterns can be used +to initialize the control on a remote machine, to initialize a +licensed control or to connect to a running object: +<ul> +<li> To initialize the control on a different machine use the following +pattern: +<pre> + &lt;domain/username&gt;:&lt;password&gt;@server/{8E27C92B-1264-101C-8A2F-040224009C02} + </pre> + +<li> To initialize a licensed control use the following pattern: +<pre> + {8E27C92B-1264-101C-8A2F-040224009C02}:&lt;LicenseKey&gt; + </pre> + +<li> To connect to an already running object use the following pattern: +<pre> + {8E27C92B-1264-101C-8A2F-040224009C02}&amp; + </pre> + +</ul> +The first two patterns can be combined, e.g. to initialize a licensed +control on a remote machine: +<pre> + ctrl-&gt;setControl("DOMAIN/user:password@server/{8E27C92B-1264-101C-8A2F-040224009C02}:LicenseKey"); + </pre> + +<p> The control's read function always returns the control's UUID, if provided including the license +key, and the name of the server, but not including the username, the domain or the password. + +<p>Set this property's value with <a href="qaxbase.html#setControl">setControl</a>() and get this property's value with <a href="qaxbase.html#control">control</a>(). + + + + QButton::accel + +<p>This property holds the accelerator associated with the button. +<p>This property is 0 if there is no accelerator set. If you set this +property to 0 then any current accelerator is removed. + +<p>Set this property's value with <a href="qbutton.html#setAccel">setAccel</a>() and get this property's value with <a href="qbutton.html#accel">accel</a>(). + + + + QButton::autoRepeat + +<p>This property holds whether autoRepeat is enabled. +<p>If autoRepeat is enabled then the <a href="qbutton.html#clicked">clicked</a>() signal is emitted at +regular intervals if the button is down. This property has no +effect on toggle buttons. autoRepeat is off by default. + +<p>Set this property's value with <a href="qbutton.html#setAutoRepeat">setAutoRepeat</a>() and get this property's value with <a href="qbutton.html#autoRepeat">autoRepeat</a>(). + + + + QButton::autoResize + <p>This property holds whether autoResize is enabled. +<p><b>This property is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> If autoResize is enabled then the button will resize itself +whenever the contents are changed. + +<p>Set this property's value with <a href="qbutton.html#setAutoResize">setAutoResize</a>() and get this property's value with <a href="qbutton.html#autoResize">autoResize</a>(). + + + + QButton::down + +<p>This property holds whether the button is pressed. +<p>If this property is TRUE, the button is pressed down. The signals +<a href="qbutton.html#pressed">pressed</a>() and <a href="qbutton.html#clicked">clicked</a>() are not emitted if you set this property +to TRUE. The default is FALSE. + +<p>Set this property's value with <a href="qbutton.html#setDown">setDown</a>() and get this property's value with <a href="qbutton.html#isDown">isDown</a>(). + + + + QButton::exclusiveToggle + +<p>This property holds whether the button is an exclusive toggle. +<p>If this property is TRUE and the button is in a <a href="qbuttongroup.html">QButtonGroup</a>, the +button can only be toggled off by another one being toggled on. +The default is FALSE. + +<p>Get this property's value with <a href="qbutton.html#isExclusiveToggle">isExclusiveToggle</a>(). + + + + QButton::on + +<p>This property holds whether the button is toggled. +<p>This property should only be set for toggle buttons. + +<p>Get this property's value with <a href="qbutton.html#isOn">isOn</a>(). + + + + QButton::pixmap + +<p>This property holds the pixmap shown on the button. +<p>If the pixmap is monochrome (i.e. it is a <a href="qbitmap.html">QBitmap</a> or its <a href="qpixmap.html#depth">depth</a> is 1) and it does not have a mask, +this property will set the pixmap to be its own mask. The purpose +of this is to draw transparent bitmaps which are important for +toggle buttons, for example. +<p> <a href="qbutton.html#pixmap">pixmap</a>() returns 0 if no pixmap was set. + +<p>Set this property's value with <a href="qbutton.html#setPixmap">setPixmap</a>() and get this property's value with <a href="qbutton.html#pixmap">pixmap</a>(). + + + + QButton::text + +<p>This property holds the text shown on the button. +<p>This property will return a <a href="qstring.html#QString-null">QString::null</a> if the button has no +text. If the text has an ampersand (&amp;) in it, then an +accelerator is automatically created for it using the character +that follows the '&amp;' as the accelerator key. Any previous +accelerator will be overwritten, or cleared if no accelerator is +defined by the text. +<p> There is no default text. + +<p>Set this property's value with <a href="qbutton.html#setText">setText</a>() and get this property's value with <a href="qbutton.html#text">text</a>(). + + + + QButton::toggleButton + +<p>This property holds whether the button is a toggle button. +<p>The default value is FALSE. + +<p>Get this property's value with <a href="qbutton.html#isToggleButton">isToggleButton</a>(). + + + + QButton::toggleState + +<p>This property holds the state of the toggle button. +<p>If this property is changed then it does not cause the button +to be repainted. + +<p>Get this property's value with <a href="qbutton.html#state">state</a>(). + + + + QButton::toggleType + +<p>This property holds the type of toggle on the button. +<p>The default toggle type is <a href="qbutton.html#ToggleType-enum">SingleShot</a>. +<p> <p>See also <a href="qbutton.html#ToggleType-enum">QButton::ToggleType</a>. + +<p>Get this property's value with <a href="qbutton.html#toggleType">toggleType</a>(). + + + + QButtonGroup::exclusive + +<p>This property holds whether the button group is exclusive. +<p>If this property is TRUE, then the buttons in the group are +toggled, and to untoggle a button you must click on another button +in the group. The default value is FALSE. + +<p>Set this property's value with <a href="qbuttongroup.html#setExclusive">setExclusive</a>() and get this property's value with <a href="qbuttongroup.html#isExclusive">isExclusive</a>(). + + + + QButtonGroup::radioButtonExclusive + +<p>This property holds whether the radio buttons in the group are exclusive. +<p>If this property is TRUE (the default), the <a href="qradiobutton.html">radiobuttons</a> in the group are treated exclusively. + +<p>Set this property's value with <a href="qbuttongroup.html#setRadioButtonExclusive">setRadioButtonExclusive</a>() and get this property's value with <a href="qbuttongroup.html#isRadioButtonExclusive">isRadioButtonExclusive</a>(). + + + + QButtonGroup::selectedId + +<p>This property holds the selected toggle button. +<p>The toggle button is specified as an ID. +<p> If no toggle button is selected, this property holds -1. +<p> If <a href="qbuttongroup.html#setButton">setButton</a>() is called on an exclusive group, the button with +the given id will be set to on and all the others will be set to +off. +<p> <p>See also <a href="qbuttongroup.html#selected">selected</a>(). + +<p>Set this property's value with <a href="qbuttongroup.html#setButton">setButton</a>() and get this property's value with <a href="qbuttongroup.html#selectedId">selectedId</a>(). + + + + QCheckBox::checked + +<p>This property holds whether the checkbox is checked. +<p>The default is unchecked, i.e. FALSE. + +<p>Set this property's value with <a href="qcheckbox.html#setChecked">setChecked</a>() and get this property's value with <a href="qcheckbox.html#isChecked">isChecked</a>(). + + + + QCheckBox::tristate + +<p>This property holds whether the checkbox is a tri-state checkbox. +<p>The default is two-state, i.e. tri-state is FALSE. + +<p>Set this property's value with <a href="qcheckbox.html#setTristate">setTristate</a>() and get this property's value with <a href="qcheckbox.html#isTristate">isTristate</a>(). + + + + QComboBox::autoCompletion + +<p>This property holds whether auto-completion is enabled. +<p>This property can only be set for editable comboboxes, for +non-editable comboboxes it has no effect. It is FALSE by default. + +<p>Set this property's value with <a href="qcombobox.html#setAutoCompletion">setAutoCompletion</a>() and get this property's value with <a href="qcombobox.html#autoCompletion">autoCompletion</a>(). + + + + QComboBox::autoResize + <p>This property holds whether auto resize is enabled. +<p><b>This property is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> If this property is set to TRUE then the combobox will resize itself +whenever its contents change. The default is FALSE. + +<p>Set this property's value with <a href="qcombobox.html#setAutoResize">setAutoResize</a>() and get this property's value with <a href="qcombobox.html#autoResize">autoResize</a>(). + + + + QComboBox::count + +<p>This property holds the number of items in the combobox. +<p> +<p>Get this property's value with <a href="qcombobox.html#count">count</a>(). + + + + QComboBox::currentItem + +<p>This property holds the index of the current item in the combobox. +<p>Note that the <a href="qcombobox.html#activated">activated</a>() and <a href="qcombobox.html#highlighted">highlighted</a>() signals are only +emitted when the user changes the current item, not when it is +changed programmatically. + +<p>Set this property's value with <a href="qcombobox.html#setCurrentItem">setCurrentItem</a>() and get this property's value with <a href="qcombobox.html#currentItem">currentItem</a>(). + + + + QComboBox::currentText + +<p>This property holds the text of the combobox's current item. +<p> +<p>Set this property's value with <a href="qcombobox.html#setCurrentText">setCurrentText</a>() and get this property's value with <a href="qcombobox.html#currentText">currentText</a>(). + + + + QComboBox::duplicatesEnabled + +<p>This property holds whether duplicates are allowed. +<p>If the combobox is editable and the user enters some text in the +combobox's lineedit and presses Enter (and the <a href="qcombobox.html#insertionPolicy">insertionPolicy</a>() +is not <a href="qcombobox.html#Policy-enum">NoInsertion</a>), then what happens is this: +<ul> +<li> If the text is not already in the list, the text is inserted. +<li> If the text is in the list and this property is TRUE (the +default), the text is inserted. +<li> If the text is in the list and this property is FALSE, the text +is <em>not</em> inserted; instead the item which has matching text becomes +the current item. +</ul> +<p> This property only affects user-interaction. You can use +<a href="qcombobox.html#insertItem">insertItem</a>() to insert duplicates if you wish regardless of this +setting. + +<p>Set this property's value with <a href="qcombobox.html#setDuplicatesEnabled">setDuplicatesEnabled</a>() and get this property's value with <a href="qcombobox.html#duplicatesEnabled">duplicatesEnabled</a>(). + + + + QComboBox::editable + +<p>This property holds whether the combobox is editable. +<p>This property's default is FALSE. Note that the combobox will be +cleared if this property is set to TRUE for a 1.x <a href="motif-extension.html#Motif">Motif</a> style +combobox. To avoid this, use <a href="qcombobox.html#setEditable">setEditable</a>() before inserting any +items. Also note that the 1.x version of Motif didn't have any +editable comboboxes, so the combobox will change it's appearance +to a 2.0 style Motif combobox is it is set to be editable. + +<p>Set this property's value with <a href="qcombobox.html#setEditable">setEditable</a>() and get this property's value with <a href="qcombobox.html#editable">editable</a>(). + + + + QComboBox::insertionPolicy + +<p>This property holds the position of the items inserted by the user. +<p>The default insertion policy is <a href="qcombobox.html#Policy-enum">AtBottom</a>. See <a href="qcombobox.html#Policy-enum">Policy</a>. + +<p>Set this property's value with <a href="qcombobox.html#setInsertionPolicy">setInsertionPolicy</a>() and get this property's value with <a href="qcombobox.html#insertionPolicy">insertionPolicy</a>(). + + + + QComboBox::maxCount + +<p>This property holds the maximum number of items allowed in the combobox. +<p> +<p>Set this property's value with <a href="qcombobox.html#setMaxCount">setMaxCount</a>() and get this property's value with <a href="qcombobox.html#maxCount">maxCount</a>(). + + + + QComboBox::sizeLimit + +<p>This property holds the maximum on-screen size of the combobox. +<p>This property is ignored for both <a href="motif-extension.html#Motif">Motif</a> 1.x style and non-editable +comboboxes in Mac style. The default limit is ten +lines. If the number of items in the combobox is or grows larger +than lines, a scrollbar is added. + +<p>Set this property's value with <a href="qcombobox.html#setSizeLimit">setSizeLimit</a>() and get this property's value with <a href="qcombobox.html#sizeLimit">sizeLimit</a>(). + + + + QDataBrowser::autoEdit + +<p>This property holds whether the browser automatically applies edits. +<p>The default value for this property is TRUE. When the user begins +an insertion or an update on a form there are two possible +outcomes when they navigate to another record: +<p> <ul> +<li> the insert or update is is performed -- this occurs if autoEdit is TRUE +<li> the insert or update is discarded -- this occurs if autoEdit is FALSE +</ul> + +<p>Set this property's value with <a href="qdatabrowser.html#setAutoEdit">setAutoEdit</a>() and get this property's value with <a href="qdatabrowser.html#autoEdit">autoEdit</a>(). + + + + QDataBrowser::boundaryChecking + +<p>This property holds whether boundary checking is active. +<p>When boundary checking is active (the default), signals are +emitted indicating the current position of the default cursor. +<p> <p>See also <a href="qdatabrowser.html#boundary">boundary</a>(). + +<p>Set this property's value with <a href="qdatabrowser.html#setBoundaryChecking">setBoundaryChecking</a>() and get this property's value with <a href="qdatabrowser.html#boundaryChecking">boundaryChecking</a>(). + + + + QDataBrowser::confirmCancels + +<p>This property holds whether the browser confirms cancel operations. +<p>If this property is TRUE, all cancels must be confirmed by the +user through a message box (this behavior can be changed by +overriding the <a href="qdatabrowser.html#confirmCancel">confirmCancel</a>() function), otherwise all cancels +occur immediately. The default is FALSE. +<p> <p>See also <a href="qdatabrowser.html#confirmEdits-prop">confirmEdits</a> and <a href="qdatabrowser.html#confirmCancel">confirmCancel</a>(). + +<p>Set this property's value with <a href="qdatabrowser.html#setConfirmCancels">setConfirmCancels</a>() and get this property's value with <a href="qdatabrowser.html#confirmCancels">confirmCancels</a>(). + + + + QDataBrowser::confirmDelete + +<p>This property holds whether the browser confirms deletions. +<p>If this property is TRUE, the browser confirms deletions, +otherwise deletions happen immediately. +<p> <p>See also <a href="qdatabrowser.html#confirmCancels-prop">confirmCancels</a>, <a href="qdatabrowser.html#confirmEdits-prop">confirmEdits</a>, <a href="qdatabrowser.html#confirmUpdate-prop">confirmUpdate</a>, <a href="qdatabrowser.html#confirmInsert-prop">confirmInsert</a>, and <a href="qdatabrowser.html#confirmEdit">confirmEdit</a>(). + +<p>Set this property's value with <a href="qdatabrowser.html#setConfirmDelete">setConfirmDelete</a>() and get this property's value with <a href="qdatabrowser.html#confirmDelete">confirmDelete</a>(). + + + + QDataBrowser::confirmEdits + +<p>This property holds whether the browser confirms edits. +<p>If this property is TRUE, the browser confirms all edit operations +(insertions, updates and deletions), otherwise all edit operations +happen immediately. Confirmation is achieved by presenting the +user with a message box -- this behavior can be changed by +reimplementing the <a href="qdatabrowser.html#confirmEdit">confirmEdit</a>() function, +<p> <p>See also <a href="qdatabrowser.html#confirmEdit">confirmEdit</a>(), <a href="qdatabrowser.html#confirmCancels-prop">confirmCancels</a>, <a href="qdatabrowser.html#confirmInsert-prop">confirmInsert</a>, <a href="qdatabrowser.html#confirmUpdate-prop">confirmUpdate</a>, and <a href="qdatabrowser.html#confirmDelete-prop">confirmDelete</a>. + +<p>Set this property's value with <a href="qdatabrowser.html#setConfirmEdits">setConfirmEdits</a>() and get this property's value with <a href="qdatabrowser.html#confirmEdits">confirmEdits</a>(). + + + + QDataBrowser::confirmInsert + +<p>This property holds whether the data browser confirms insertions. +<p>If this property is TRUE, the browser confirms insertions, +otherwise insertions happen immediately. +<p> <p>See also <a href="qdatabrowser.html#confirmCancels-prop">confirmCancels</a>, <a href="qdatabrowser.html#confirmEdits-prop">confirmEdits</a>, <a href="qdatabrowser.html#confirmUpdate-prop">confirmUpdate</a>, <a href="qdatabrowser.html#confirmDelete-prop">confirmDelete</a>, and <a href="qdatabrowser.html#confirmEdit">confirmEdit</a>(). + +<p>Set this property's value with <a href="qdatabrowser.html#setConfirmInsert">setConfirmInsert</a>() and get this property's value with <a href="qdatabrowser.html#confirmInsert">confirmInsert</a>(). + + + + QDataBrowser::confirmUpdate + +<p>This property holds whether the browser confirms updates. +<p>If this property is TRUE, the browser confirms updates, otherwise +updates happen immediately. +<p> <p>See also <a href="qdatabrowser.html#confirmCancels-prop">confirmCancels</a>, <a href="qdatabrowser.html#confirmEdits-prop">confirmEdits</a>, <a href="qdatabrowser.html#confirmInsert-prop">confirmInsert</a>, <a href="qdatabrowser.html#confirmDelete-prop">confirmDelete</a>, and <a href="qdatabrowser.html#confirmEdit">confirmEdit</a>(). + +<p>Set this property's value with <a href="qdatabrowser.html#setConfirmUpdate">setConfirmUpdate</a>() and get this property's value with <a href="qdatabrowser.html#confirmUpdate">confirmUpdate</a>(). + + + + QDataBrowser::filter + +<p>This property holds the data browser's filter. +<p>The filter applies to the data shown in the browser. Call +<a href="qdatabrowser.html#refresh">refresh</a>() to apply the new filter. A filter is a string containing +a SQL WHERE clause without the WHERE keyword, e.g. "id>1000", +"name LIKE 'A%'", etc. +<p> There is no default filter. +<p> <p>See also <a href="qdatabrowser.html#sort-prop">sort</a>. + +<p>Set this property's value with <a href="qdatabrowser.html#setFilter">setFilter</a>() and get this property's value with <a href="qdatabrowser.html#filter">filter</a>(). + + + + QDataBrowser::readOnly + +<p>This property holds whether the browser is read-only. +<p>The default is FALSE, i.e. data can be edited. If the data browser +is read-only, no database edits will be allowed. + +<p>Set this property's value with <a href="qdatabrowser.html#setReadOnly">setReadOnly</a>() and get this property's value with <a href="qdatabrowser.html#isReadOnly">isReadOnly</a>(). + + + + QDataBrowser::sort + +<p>This property holds the data browser's sort. +<p>The data browser's sort affects the order in which records are +viewed in the browser. Call <a href="qdatabrowser.html#refresh">refresh</a>() to apply the new sort. +<p> When retrieving the sort property, a string list is returned in +the form 'fieldname order', e.g. 'id ASC', 'surname DESC'. +<p> There is no default sort. +<p> Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +<pre> + <a href="qstringlist.html">QStringList</a> list = myDataBrowser.sort(); + QStringList::Iterator it = list.<a href="qvaluelist.html#begin">begin</a>(); + while( it != list.<a href="qvaluelist.html#end">end</a>() ) { + myProcessing( *it ); + ++it; + } + </pre> + + +<p>Set this property's value with <a href="qdatabrowser.html#setSort">setSort</a>() and get this property's value with <a href="qdatabrowser.html#sort">sort</a>(). + + + + QDataTable::autoEdit + +<p>This property holds whether the data table automatically applies edits. +<p>The default value for this property is TRUE. When the user begins +an insert or update in the table there are two possible outcomes +when they navigate to another record: +<p> <ol type=1> +<li> the insert or update is is performed -- this occurs if autoEdit is TRUE +<li> the insert or update is abandoned -- this occurs if autoEdit is FALSE +</ol> + +<p>Set this property's value with <a href="qdatatable.html#setAutoEdit">setAutoEdit</a>() and get this property's value with <a href="qdatatable.html#autoEdit">autoEdit</a>(). + + + + QDataTable::confirmCancels + +<p>This property holds whether the data table confirms cancel operations. +<p>If the confirmCancel property is TRUE, all cancels must be +confirmed by the user through a message box (this behavior can be +changed by overriding the <a href="qdatatable.html#confirmCancel">confirmCancel</a>() function), otherwise all +cancels occur immediately. The default is FALSE. +<p> <p>See also <a href="qdatatable.html#confirmEdits-prop">confirmEdits</a> and <a href="qdatatable.html#confirmCancel">confirmCancel</a>(). + +<p>Set this property's value with <a href="qdatatable.html#setConfirmCancels">setConfirmCancels</a>() and get this property's value with <a href="qdatatable.html#confirmCancels">confirmCancels</a>(). + + + + QDataTable::confirmDelete + +<p>This property holds whether the data table confirms delete operations. +<p>If the confirmDelete property is TRUE, all deletions must be +confirmed by the user through a message box (this behaviour can be +changed by overriding the <a href="qdatatable.html#confirmEdit">confirmEdit</a>() function), otherwise all +delete operations occur immediately. +<p> <p>See also <a href="qdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="qdatatable.html#confirmEdits-prop">confirmEdits</a>, <a href="qdatatable.html#confirmUpdate-prop">confirmUpdate</a>, and <a href="qdatatable.html#confirmInsert-prop">confirmInsert</a>. + +<p>Set this property's value with <a href="qdatatable.html#setConfirmDelete">setConfirmDelete</a>() and get this property's value with <a href="qdatatable.html#confirmDelete">confirmDelete</a>(). + + + + QDataTable::confirmEdits + +<p>This property holds whether the data table confirms edit operations. +<p>If the confirmEdits property is TRUE, the data table confirms all +edit operations (inserts, updates and deletes). Finer control of +edit confirmation can be achieved using <a href="qdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="qdatatable.html#confirmInsert-prop">confirmInsert</a>, <a href="qdatatable.html#confirmUpdate-prop">confirmUpdate</a> and <a href="qdatatable.html#confirmDelete-prop">confirmDelete</a>. +<p> <p>See also <a href="qdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="qdatatable.html#confirmInsert-prop">confirmInsert</a>, <a href="qdatatable.html#confirmUpdate-prop">confirmUpdate</a>, and <a href="qdatatable.html#confirmDelete-prop">confirmDelete</a>. + +<p>Set this property's value with <a href="qdatatable.html#setConfirmEdits">setConfirmEdits</a>() and get this property's value with <a href="qdatatable.html#confirmEdits">confirmEdits</a>(). + + + + QDataTable::confirmInsert + +<p>This property holds whether the data table confirms insert operations. +<p>If the confirmInsert property is TRUE, all insertions must be +confirmed by the user through a message box (this behaviour can be +changed by overriding the <a href="qdatatable.html#confirmEdit">confirmEdit</a>() function), otherwise all +insert operations occur immediately. +<p> <p>See also <a href="qdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="qdatatable.html#confirmEdits-prop">confirmEdits</a>, <a href="qdatatable.html#confirmUpdate-prop">confirmUpdate</a>, and <a href="qdatatable.html#confirmDelete-prop">confirmDelete</a>. + +<p>Set this property's value with <a href="qdatatable.html#setConfirmInsert">setConfirmInsert</a>() and get this property's value with <a href="qdatatable.html#confirmInsert">confirmInsert</a>(). + + + + QDataTable::confirmUpdate + +<p>This property holds whether the data table confirms update operations. +<p>If the confirmUpdate property is TRUE, all updates must be +confirmed by the user through a message box (this behaviour can be +changed by overriding the <a href="qdatatable.html#confirmEdit">confirmEdit</a>() function), otherwise all +update operations occur immediately. +<p> <p>See also <a href="qdatatable.html#confirmCancels-prop">confirmCancels</a>, <a href="qdatatable.html#confirmEdits-prop">confirmEdits</a>, <a href="qdatatable.html#confirmInsert-prop">confirmInsert</a>, and <a href="qdatatable.html#confirmDelete-prop">confirmDelete</a>. + +<p>Set this property's value with <a href="qdatatable.html#setConfirmUpdate">setConfirmUpdate</a>() and get this property's value with <a href="qdatatable.html#confirmUpdate">confirmUpdate</a>(). + + + + QDataTable::dateFormat + +<p>This property holds the format used for displaying date/time values. +<p>The dateFormat property is used for displaying date/time values in +the table. The default value is <a href="qt.html#DateFormat-enum">Qt::LocalDate</a>. + +<p>Set this property's value with <a href="qdatatable.html#setDateFormat">setDateFormat</a>() and get this property's value with <a href="qdatatable.html#dateFormat">dateFormat</a>(). + + + + QDataTable::falseText + +<p>This property holds the text used to represent false values. +<p>The falseText property will be used to represent NULL values in +the table. The default value is "False". + +<p>Set this property's value with <a href="qdatatable.html#setFalseText">setFalseText</a>() and get this property's value with <a href="qdatatable.html#falseText">falseText</a>(). + + + + QDataTable::filter + +<p>This property holds the data filter for the data table. +<p>The filter applies to the data shown in the table. To view data +with a new filter, use <a href="qdatatable.html#refresh">refresh</a>(). A filter string is an SQL WHERE +clause without the WHERE keyword. +<p> There is no default filter. +<p> <p>See also <a href="qdatatable.html#sort-prop">sort</a>. + +<p> +<p>Set this property's value with <a href="qdatatable.html#setFilter">setFilter</a>() and get this property's value with <a href="qdatatable.html#filter">filter</a>(). + + + + QDataTable::nullText + +<p>This property holds the text used to represent NULL values. +<p>The nullText property will be used to represent NULL values in the +table. The default value is provided by the cursor's driver. + +<p>Set this property's value with <a href="qdatatable.html#setNullText">setNullText</a>() and get this property's value with <a href="qdatatable.html#nullText">nullText</a>(). + + + + QDataTable::numCols + +<p>This property holds the number of columns in the table. +<p> +<p>Get this property's value with <a href="qdatatable.html#numCols">numCols</a>(). + + + + QDataTable::numRows + +<p>This property holds the number of rows in the table. +<p> +<p>Get this property's value with <a href="qdatatable.html#numRows">numRows</a>(). + + + + QDataTable::sort + +<p>This property holds the data table's sort. +<p>The table's sort affects the order in which data records are +displayed in the table. To apply a sort, use <a href="qdatatable.html#refresh">refresh</a>(). +<p> When examining the sort property, a string list is returned with +each item having the form 'fieldname order' (e.g., 'id ASC', +'surname DESC'). +<p> There is no default sort. +<p> Note that if you want to iterate over the sort list, you should +iterate over a copy, e.g. +<pre> + <a href="qstringlist.html">QStringList</a> list = myDataTable.sort(); + QStringList::Iterator it = list.<a href="qvaluelist.html#begin">begin</a>(); + while( it != list.<a href="qvaluelist.html#end">end</a>() ) { + myProcessing( *it ); + ++it; + } + </pre> + +<p> <p>See also <a href="qdatatable.html#filter-prop">filter</a> and <a href="qdatatable.html#refresh">refresh</a>(). + +<p>Set this property's value with <a href="qdatatable.html#setSort">setSort</a>() and get this property's value with <a href="qdatatable.html#sort">sort</a>(). + + + + QDataTable::trueText + +<p>This property holds the text used to represent true values. +<p>The trueText property will be used to represent NULL values in the +table. The default value is "True". + +<p>Set this property's value with <a href="qdatatable.html#setTrueText">setTrueText</a>() and get this property's value with <a href="qdatatable.html#trueText">trueText</a>(). + + + + QDateEdit::autoAdvance + +<p>This property holds whether the editor automatically advances to the next section. +<p>If autoAdvance is TRUE, the editor will automatically advance +focus to the next date section if a user has completed a section. +The default is FALSE. + +<p>Set this property's value with <a href="qdateedit.html#setAutoAdvance">setAutoAdvance</a>() and get this property's value with <a href="qdateedit.html#autoAdvance">autoAdvance</a>(). + + + + QDateEdit::date + +<p>This property holds the editor's date value. +<p>If the date property is not valid, the editor displays all zeroes +and <a href="qdateedit.html#date">QDateEdit::date</a>() will return an invalid date. It is strongly +recommended that the editor is given a default date value (e.g. +currentDate()). That way, attempts to set the date property to an +invalid date will fail. +<p> When changing the date property, if the date is less than +<a href="qdateedit.html#minValue">minValue</a>(), or is greater than <a href="qdateedit.html#maxValue">maxValue</a>(), nothing happens. + +<p>Set this property's value with <a href="qdateedit.html#setDate">setDate</a>() and get this property's value with <a href="qdateedit.html#date">date</a>(). + + + + QDateEdit::maxValue + +<p>This property holds the editor's maximum value. +<p>Setting the maximum date value for the editor is equivalent to +calling <a href="qdateedit.html#setRange">QDateEdit::setRange</a>( <a href="qdateedit.html#minValue">minValue</a>(), <em>d</em> ), where <em>d</em> is the +maximum date. The default maximum date is 8000-12-31. +<p> <p>See also <a href="qdateedit.html#minValue-prop">minValue</a> and <a href="qdateedit.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qdateedit.html#setMaxValue">setMaxValue</a>() and get this property's value with <a href="qdateedit.html#maxValue">maxValue</a>(). + + + + QDateEdit::minValue + +<p>This property holds the editor's minimum value. +<p>Setting the minimum date value is equivalent to calling +<a href="qdateedit.html#setRange">QDateEdit::setRange</a>( <em>d</em>, <a href="qdateedit.html#maxValue">maxValue</a>() ), where <em>d</em> is the minimum +date. The default minimum date is 1752-09-14. +<p> <p>See also <a href="qdateedit.html#maxValue-prop">maxValue</a> and <a href="qdateedit.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qdateedit.html#setMinValue">setMinValue</a>() and get this property's value with <a href="qdateedit.html#minValue">minValue</a>(). + + + + QDateEdit::order + +<p>This property holds the order in which the year, month and day appear. +<p>The default order is locale dependent. +<p> <p>See also <a href="qdateedit.html#Order-enum">Order</a>. + +<p>Set this property's value with <a href="qdateedit.html#setOrder">setOrder</a>() and get this property's value with <a href="qdateedit.html#order">order</a>(). + + + + QDateTimeEdit::dateTime + +<p>This property holds the editor's datetime value. +<p>The datetime edit's datetime which may be an invalid datetime. + +<p>Set this property's value with <a href="qdatetimeedit.html#setDateTime">setDateTime</a>() and get this property's value with <a href="qdatetimeedit.html#dateTime">dateTime</a>(). + + + + QDial::lineStep + +<p>This property holds the current line step. +<p>setLineStep() calls the virtual <a href="qrangecontrol.html#stepChange">stepChange</a>() function if the new +line step is different from the previous setting. +<p> <p>See also <a href="qrangecontrol.html#setSteps">QRangeControl::setSteps</a>(), <a href="qdial.html#pageStep-prop">pageStep</a>, and <a href="qrangecontrol.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qdial.html#setLineStep">setLineStep</a>() and get this property's value with <a href="qdial.html#lineStep">lineStep</a>(). + + + + QDial::maxValue + +<p>This property holds the current maximum value. +<p>When setting this property, the <a href="qdial.html#minValue-prop">QDial::minValue</a> is adjusted if +necessary to ensure that the range remains valid. +<p> <p>See also <a href="qrangecontrol.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qdial.html#setMaxValue">setMaxValue</a>() and get this property's value with <a href="qdial.html#maxValue">maxValue</a>(). + + + + QDial::minValue + +<p>This property holds the current minimum value. +<p>When setting this property, the <a href="qdial.html#maxValue-prop">QDial::maxValue</a> is adjusted if +necessary to ensure that the range remains valid. +<p> <p>See also <a href="qrangecontrol.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qdial.html#setMinValue">setMinValue</a>() and get this property's value with <a href="qdial.html#minValue">minValue</a>(). + + + + QDial::notchSize + +<p>This property holds the current notch size. +<p>The notch size is in range control units, not pixels, and if +possible it is a multiple of <a href="qdial.html#lineStep">lineStep</a>() that results in an +on-screen notch size near <a href="qdial.html#notchTarget">notchTarget</a>(). +<p> <p>See also <a href="qdial.html#notchTarget-prop">notchTarget</a> and <a href="qdial.html#lineStep-prop">lineStep</a>. + +<p>Get this property's value with <a href="qdial.html#notchSize">notchSize</a>(). + + + + QDial::notchTarget + +<p>This property holds the target number of pixels between notches. +<p>The notch target is the number of pixels QDial attempts to put +between each notch. +<p> The actual size may differ from the target size. + +<p>Set this property's value with <a href="qdial.html#setNotchTarget">setNotchTarget</a>() and get this property's value with <a href="qdial.html#notchTarget">notchTarget</a>(). + + + + QDial::notchesVisible + +<p>This property holds whether the notches are shown. +<p>If TRUE, the notches are shown. If FALSE (the default) notches are +not shown. + +<p>Set this property's value with <a href="qdial.html#setNotchesVisible">setNotchesVisible</a>() and get this property's value with <a href="qdial.html#notchesVisible">notchesVisible</a>(). + + + + QDial::pageStep + +<p>This property holds the current page step. +<p>setPageStep() calls the virtual <a href="qrangecontrol.html#stepChange">stepChange</a>() function if the new +page step is different from the previous setting. +<p> <p>See also <a href="qrangecontrol.html#stepChange">stepChange</a>(). + +<p>Set this property's value with <a href="qdial.html#setPageStep">setPageStep</a>() and get this property's value with <a href="qdial.html#pageStep">pageStep</a>(). + + + + QDial::tracking + +<p>This property holds whether tracking is enabled. +<p>If TRUE (the default), tracking is enabled. This means that the +arrow can be moved using the mouse; otherwise the arrow cannot be +moved with the mouse. + +<p>Set this property's value with <a href="qdial.html#setTracking">setTracking</a>() and get this property's value with <a href="qdial.html#tracking">tracking</a>(). + + + + QDial::value + +<p>This property holds the current dial value. +<p>This is guaranteed to be within the range +<a href="qdial.html#minValue-prop">QDial::minValue</a>..<a href="qdial.html#maxValue-prop">QDial::maxValue</a>. +<p> <p>See also <a href="qdial.html#minValue-prop">minValue</a> and <a href="qdial.html#maxValue-prop">maxValue</a>. + +<p>Set this property's value with <a href="qdial.html#setValue">setValue</a>() and get this property's value with <a href="qdial.html#value">value</a>(). + + + + QDial::wrapping + +<p>This property holds whether wrapping is enabled. +<p>If TRUE, wrapping is enabled. This means that the arrow can be +turned around 360°. Otherwise there is some space at the bottom of +the dial which is skipped by the arrow. +<p> This property's default is FALSE. + +<p>Set this property's value with <a href="qdial.html#setWrapping">setWrapping</a>() and get this property's value with <a href="qdial.html#wrapping">wrapping</a>(). + + + + QDialog::modal + <p>This property holds whether <a href="qdialog.html#show">show</a>() should pop up the dialog as modal or modeless. +<p>By default, this property is false and show() pops up the dialog as +modeless. +<p> <a href="qdialog.html#exec">exec</a>() ignores the value of this property and always pops up the +dialog as modal. +<p> <p>See also <a href="qdialog.html#show">show</a>() and <a href="qdialog.html#exec">exec</a>(). + +<p>Set this property's value with <a href="qdialog.html#setModal">setModal</a>() and get this property's value with <a href="qdialog.html#isModal">isModal</a>(). + + + + QDialog::sizeGripEnabled + +<p>This property holds whether the size grip is enabled. +<p>A <a href="qsizegrip.html">QSizeGrip</a> is placed in the bottom right corner of the dialog when this +property is enabled. By default, the size grip is disabled. + +<p>Set this property's value with <a href="qdialog.html#setSizeGripEnabled">setSizeGripEnabled</a>() and get this property's value with <a href="qdialog.html#isSizeGripEnabled">isSizeGripEnabled</a>(). + + + + QDockArea::count + +<p>This property holds the number of dock windows in the dock area. +<p> +<p>Get this property's value with <a href="qdockarea.html#count">count</a>(). + + + + QDockArea::empty + +<p>This property holds whether the dock area is empty. +<p> +<p>Get this property's value with <a href="qdockarea.html#isEmpty">isEmpty</a>(). + + + + QDockArea::handlePosition + +<p>This property holds where the dock window splitter handle is placed in the dock area. +<p>The default position is <a href="qdockarea.html#HandlePosition-enum">Normal</a>. + +<p>Get this property's value with <a href="qdockarea.html#handlePosition">handlePosition</a>(). + + + + QDockArea::orientation + +<p>This property holds the dock area's orientation. +<p>There is no default value; the orientation is specified in the +constructor. + +<p>Get this property's value with <a href="qdockarea.html#orientation">orientation</a>(). + + + + QDockWindow::closeMode + +<p>This property holds the close mode of a dock window. +<p>Defines when (if ever) the dock window has a close button. The +choices are <a href="qdockwindow.html#CloseMode-enum">Never</a>, <a href="qdockwindow.html#CloseMode-enum">Docked</a> (i.e. only when docked), <a href="qdockwindow.html#CloseMode-enum">Undocked</a> (only when undocked, i.e. floated) or <a href="qdockwindow.html#CloseMode-enum">Always</a>. +<p> The default is <a href="qdockwindow.html#CloseMode-enum">Never</a>. + +<p>Set this property's value with <a href="qdockwindow.html#setCloseMode">setCloseMode</a>() and get this property's value with <a href="qdockwindow.html#closeMode">closeMode</a>(). + + + + QDockWindow::horizontallyStretchable + +<p>This property holds whether the dock window is horizontally stretchable. +<p>A dock window is horizontally stretchable if you call +<a href="qdockwindow.html#setHorizontallyStretchable">setHorizontallyStretchable</a>(TRUE) or <a href="qdockwindow.html#setResizeEnabled">setResizeEnabled</a>(TRUE). +<p> <p>See also <a href="qdockwindow.html#resizeEnabled-prop">resizeEnabled</a>. + +<p>Bugs and limitations: +<ul> +<li> Strecthability is broken. You must call setResizeEnabled(TRUE) to get +proper behavior and even then QDockWindow does not limit stretchablilty. +</ul> +<p>Set this property's value with <a href="qdockwindow.html#setHorizontallyStretchable">setHorizontallyStretchable</a>() and get this property's value with <a href="qdockwindow.html#isHorizontallyStretchable">isHorizontallyStretchable</a>(). + + + + QDockWindow::movingEnabled + +<p>This property holds whether the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window. +<p>This property is TRUE by default. + +<p>Set this property's value with <a href="qdockwindow.html#setMovingEnabled">setMovingEnabled</a>() and get this property's value with <a href="qdockwindow.html#isMovingEnabled">isMovingEnabled</a>(). + + + + QDockWindow::newLine + +<p>This property holds whether the dock window prefers to start a new line in the dock area. +<p>The default is FALSE, i.e. the dock window doesn't retquire a new +line in the dock area. + +<p>Set this property's value with <a href="qdockwindow.html#setNewLine">setNewLine</a>() and get this property's value with <a href="qdockwindow.html#newLine">newLine</a>(). + + + + QDockWindow::offset + +<p>This property holds the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas). +<p>The default is 0. + +<p>Set this property's value with <a href="qdockwindow.html#setOffset">setOffset</a>() and get this property's value with <a href="qdockwindow.html#offset">offset</a>(). + + + + QDockWindow::opaqueMoving + +<p>This property holds whether the dock window will be shown normally whilst it is being moved. +<p>If this property is FALSE, (the default), the dock window will be +represented by an outline rectangle whilst it is being moved. +<p> <b>Warning:</b> Currently opaque moving has some problems and we do not +recommend using it at this time. We expect to fix these problems +in a future release. + +<p>Set this property's value with <a href="qdockwindow.html#setOpaqueMoving">setOpaqueMoving</a>() and get this property's value with <a href="qdockwindow.html#opaqueMoving">opaqueMoving</a>(). + + + + QDockWindow::resizeEnabled + +<p>This property holds whether the dock window is resizeable. +<p>A resizeable dock window can be resized using splitter-like +handles inside a dock area and like every other top level window +when floating. +<p> A dock window is both horizontally and vertically stretchable if +you call <a href="qdockwindow.html#setResizeEnabled">setResizeEnabled</a>(TRUE). +<p> This property is FALSE by default. +<p> <p>See also <a href="qdockwindow.html#verticallyStretchable-prop">verticallyStretchable</a> and <a href="qdockwindow.html#horizontallyStretchable-prop">horizontallyStretchable</a>. + +<p>Set this property's value with <a href="qdockwindow.html#setResizeEnabled">setResizeEnabled</a>() and get this property's value with <a href="qdockwindow.html#isResizeEnabled">isResizeEnabled</a>(). + + + + QDockWindow::stretchable + +<p>This property holds whether the dock window is stretchable in the current <a href="qdockwindow.html#orientation">orientation</a>(). +<p>This property can be set using <a href="qdockwindow.html#setHorizontallyStretchable">setHorizontallyStretchable</a>() and +<a href="qdockwindow.html#setVerticallyStretchable">setVerticallyStretchable</a>(), or with <a href="qdockwindow.html#setResizeEnabled">setResizeEnabled</a>(). +<p> <p>See also <a href="qdockwindow.html#resizeEnabled-prop">resizeEnabled</a>. + +<p>Bugs and limitations: +<ul> +<li> Strecthability is broken. You must call setResizeEnabled(TRUE) to get +proper behavior and even then QDockWindow does not limit stretchablilty. +</ul> +<p>Get this property's value with <a href="qdockwindow.html#isStretchable">isStretchable</a>(). + + + + QDockWindow::verticallyStretchable + +<p>This property holds whether the dock window is vertically stretchable. +<p>A dock window is vertically stretchable if you call +<a href="qdockwindow.html#setVerticallyStretchable">setVerticallyStretchable</a>(TRUE) or <a href="qdockwindow.html#setResizeEnabled">setResizeEnabled</a>(TRUE). +<p> <p>See also <a href="qdockwindow.html#resizeEnabled-prop">resizeEnabled</a>. + +<p>Bugs and limitations: +<ul> +<li> Strecthability is broken. You must call setResizeEnabled(TRUE) to get +proper behavior and even then QDockWindow does not limit stretchablilty. +</ul> +<p>Set this property's value with <a href="qdockwindow.html#setVerticallyStretchable">setVerticallyStretchable</a>() and get this property's value with <a href="qdockwindow.html#isVerticallyStretchable">isVerticallyStretchable</a>(). + + + + QDoubleValidator::bottom + +<p>This property holds the validator's minimum acceptable value. +<p>Set this property's value with <a href="qdoublevalidator.html#setBottom">setBottom</a>() and get this property's value with <a href="qdoublevalidator.html#bottom">bottom</a>(). +<p><p>See also <a href="qdoublevalidator.html#setRange">setRange</a>(). + + + + + QDoubleValidator::decimals + +<p>This property holds the validator's maximum number of digits after the decimal point. +<p>Set this property's value with <a href="qdoublevalidator.html#setDecimals">setDecimals</a>() and get this property's value with <a href="qdoublevalidator.html#decimals">decimals</a>(). +<p><p>See also <a href="qdoublevalidator.html#setRange">setRange</a>(). + + + + + QDoubleValidator::top + +<p>This property holds the validator's maximum acceptable value. +<p>Set this property's value with <a href="qdoublevalidator.html#setTop">setTop</a>() and get this property's value with <a href="qdoublevalidator.html#top">top</a>(). +<p><p>See also <a href="qdoublevalidator.html#setRange">setRange</a>(). + + + + + QFileDialog::contentsPreview + +<p>This property holds whether the file dialog can provide a contents preview of the currently selected file. +<p>The default is FALSE. +<p> <p>See also <a href="qfiledialog.html#setContentsPreview">setContentsPreview</a>() and <a href="qfiledialog.html#infoPreview-prop">infoPreview</a>. + +<p>Set this property's value with <a href="qfiledialog.html#setContentsPreviewEnabled">setContentsPreviewEnabled</a>() and get this property's value with <a href="qfiledialog.html#isContentsPreviewEnabled">isContentsPreviewEnabled</a>(). + + + + QFileDialog::dirPath + +<p>This property holds the file dialog's working directory. +<p>Get this property's value with <a href="qfiledialog.html#dirPath">dirPath</a>(). +<p><p>See also <a href="qfiledialog.html#dir">dir</a>() and <a href="qfiledialog.html#setDir">setDir</a>(). + + + + + QFileDialog::infoPreview + +<p>This property holds whether the file dialog can provide preview information about the currently selected file. +<p>The default is FALSE. + +<p>Set this property's value with <a href="qfiledialog.html#setInfoPreviewEnabled">setInfoPreviewEnabled</a>() and get this property's value with <a href="qfiledialog.html#isInfoPreviewEnabled">isInfoPreviewEnabled</a>(). + + + + QFileDialog::mode + +<p>This property holds the file dialog's mode. +<p>The default mode is <a href="qfiledialog.html#Mode-enum">ExistingFile</a>. + +<p>Set this property's value with <a href="qfiledialog.html#setMode">setMode</a>() and get this property's value with <a href="qfiledialog.html#mode">mode</a>(). + + + + QFileDialog::previewMode + +<p>This property holds the preview mode for the file dialog. +<p>If you set the mode to be a mode other than <em>NoPreview</em>, you must +use <a href="qfiledialog.html#setInfoPreview">setInfoPreview</a>() or <a href="qfiledialog.html#setContentsPreview">setContentsPreview</a>() to set the dialog's +preview widget to your preview widget and enable the preview +widget(s) with <a href="qfiledialog.html#setInfoPreviewEnabled">setInfoPreviewEnabled</a>() or +<a href="qfiledialog.html#setContentsPreviewEnabled">setContentsPreviewEnabled</a>(). +<p> <p>See also <a href="qfiledialog.html#infoPreview-prop">infoPreview</a>, <a href="qfiledialog.html#contentsPreview-prop">contentsPreview</a>, and <a href="qfiledialog.html#viewMode-prop">viewMode</a>. + +<p>Set this property's value with <a href="qfiledialog.html#setPreviewMode">setPreviewMode</a>() and get this property's value with <a href="qfiledialog.html#previewMode">previewMode</a>(). + + + + QFileDialog::selectedFile + +<p>This property holds the name of the selected file. +<p>If a file was selected selectedFile contains the file's name including +its absolute path; otherwise selectedFile is empty. +<p> <p>See also <a href="qstring.html#isEmpty">QString::isEmpty</a>(), <a href="qfiledialog.html#selectedFiles-prop">selectedFiles</a>, and <a href="qfiledialog.html#selectedFilter-prop">selectedFilter</a>. + +<p>Get this property's value with <a href="qfiledialog.html#selectedFile">selectedFile</a>(). + + + + QFileDialog::selectedFiles + +<p>This property holds the list of selected files. +<p>If one or more files are selected, selectedFiles contains their +names including their absolute paths. If no files are selected or +the mode isn't ExistingFiles selectedFiles is an empty list. +<p> It is more convenient to use <a href="qfiledialog.html#selectedFile">selectedFile</a>() if the mode is +<a href="qfiledialog.html#Mode-enum">ExistingFile</a>, <a href="qfiledialog.html#Mode-enum">Directory</a> or <a href="qfiledialog.html#Mode-enum">DirectoryOnly</a>. +<p> Note that if you want to iterate over the list, you should +iterate over a copy, e.g. +<pre> + <a href="qstringlist.html">QStringList</a> list = myFileDialog.selectedFiles(); + QStringList::Iterator it = list.<a href="qvaluelist.html#begin">begin</a>(); + while( it != list.<a href="qvaluelist.html#end">end</a>() ) { + myProcessing( *it ); + ++it; + } + </pre> + +<p> <p>See also <a href="qfiledialog.html#selectedFile-prop">selectedFile</a>, <a href="qfiledialog.html#selectedFilter-prop">selectedFilter</a>, and <a href="qvaluelist.html#empty">QValueList::empty</a>(). + +<p>Get this property's value with <a href="qfiledialog.html#selectedFiles">selectedFiles</a>(). + + + + QFileDialog::selectedFilter + +<p>This property holds the filter which the user has selected in the file dialog. +<p>Get this property's value with <a href="qfiledialog.html#selectedFilter">selectedFilter</a>(). +<p><p>See also <a href="qfiledialog.html#filterSelected">filterSelected</a>(), <a href="qfiledialog.html#selectedFiles-prop">selectedFiles</a>, and <a href="qfiledialog.html#selectedFile-prop">selectedFile</a>. + + + + + QFileDialog::showHiddenFiles + +<p>This property holds whether hidden files are shown in the file dialog. +<p>The default is FALSE, i.e. don't show hidden files. + +<p>Set this property's value with <a href="qfiledialog.html#setShowHiddenFiles">setShowHiddenFiles</a>() and get this property's value with <a href="qfiledialog.html#showHiddenFiles">showHiddenFiles</a>(). + + + + QFileDialog::viewMode + +<p>This property holds the file dialog's view mode. +<p>If you set the view mode to be <em>Detail</em> (the default), then you +will see the file's details, such as the size of the file and the +date the file was last modified in addition to the file's name. +<p> If you set the view mode to be <em>List</em>, then you will just +see a list of the files and folders. +<p> See <a href="qfiledialog.html#ViewMode-enum">QFileDialog::ViewMode</a> + +<p>Set this property's value with <a href="qfiledialog.html#setViewMode">setViewMode</a>() and get this property's value with <a href="qfiledialog.html#viewMode">viewMode</a>(). + + + + QFrame::contentsRect + +<p>This property holds the rectangle inside the frame. +<p>Get this property's value with <a href="qframe.html#contentsRect">contentsRect</a>(). +<p><p>See also <a href="qframe.html#frameRect-prop">frameRect</a> and <a href="qframe.html#drawContents">drawContents</a>(). + + + + + QFrame::frameRect + +<p>This property holds the frame rectangle. +<p>The frame rectangle is the rectangle the frame is drawn in. By +default, this is the entire widget. Setting this property does <em>not</em> cause a widget update. +<p> If this property is set to a null rectangle (for example +<tt>QRect(0, 0, 0, 0)</tt>), then the frame rectangle is equivalent to +the <a href="qwidget.html#rect">widget rectangle</a>. +<p> <p>See also <a href="qframe.html#contentsRect-prop">contentsRect</a>. + +<p>Set this property's value with <a href="qframe.html#setFrameRect">setFrameRect</a>() and get this property's value with <a href="qframe.html#frameRect">frameRect</a>(). + + + + QFrame::frameShadow + +<p>This property holds the frame shadow value from the frame style. +<p>Set this property's value with <a href="qframe.html#setFrameShadow">setFrameShadow</a>() and get this property's value with <a href="qframe.html#frameShadow">frameShadow</a>(). +<p><p>See also <a href="qframe.html#frameStyle">frameStyle</a>() and <a href="qframe.html#frameShape-prop">frameShape</a>. + + + + + QFrame::frameShape + +<p>This property holds the frame shape value from the frame style. +<p>Set this property's value with <a href="qframe.html#setFrameShape">setFrameShape</a>() and get this property's value with <a href="qframe.html#frameShape">frameShape</a>(). +<p><p>See also <a href="qframe.html#frameStyle">frameStyle</a>() and <a href="qframe.html#frameShadow-prop">frameShadow</a>. + + + + + QFrame::frameWidth + +<p>This property holds the width of the frame that is drawn. +<p>Note that the frame width depends on the <a href="qframe.html#setFrameStyle">frame style</a>, not only the line +width and the mid-line width. For example, the style <a href="qframe.html#Shape-enum">NoFrame</a> +always has a frame width of 0, whereas the style <a href="qframe.html#Shape-enum">Panel</a> has a +frame width equivalent to the line width. The frame width also +includes the margin. +<p> <p>See also <a href="qframe.html#lineWidth-prop">lineWidth</a>, <a href="qframe.html#midLineWidth-prop">midLineWidth</a>, <a href="qframe.html#frameStyle">frameStyle</a>(), and <a href="qframe.html#margin-prop">margin</a>. + +<p>Get this property's value with <a href="qframe.html#frameWidth">frameWidth</a>(). + + + + QFrame::lineWidth + +<p>This property holds the line width. +<p>Note that the <em>total</em> line width for <a href="qframe.html#Shape-enum">HLine</a> and <a href="qframe.html#Shape-enum">VLine</a> is +given by <a href="qframe.html#frameWidth">frameWidth</a>(), not <a href="qframe.html#lineWidth">lineWidth</a>(). +<p> The default value is 1. +<p> <p>See also <a href="qframe.html#midLineWidth-prop">midLineWidth</a> and <a href="qframe.html#frameWidth-prop">frameWidth</a>. + +<p>Set this property's value with <a href="qframe.html#setLineWidth">setLineWidth</a>() and get this property's value with <a href="qframe.html#lineWidth">lineWidth</a>(). + + + + QFrame::margin + +<p>This property holds the width of the margin. +<p>The margin is the distance between the innermost pixel of the +frame and the outermost pixel of <a href="qframe.html#contentsRect">contentsRect</a>(). It is included in +<a href="qframe.html#frameWidth">frameWidth</a>(). +<p> The margin is filled according to <a href="qwidget.html#backgroundMode">backgroundMode</a>(). +<p> The default value is 0. +<p> <p>See also <a href="qframe.html#margin-prop">margin</a>, <a href="qframe.html#lineWidth-prop">lineWidth</a>, and <a href="qframe.html#frameWidth-prop">frameWidth</a>. + +<p>Set this property's value with <a href="qframe.html#setMargin">setMargin</a>() and get this property's value with <a href="qframe.html#margin">margin</a>(). + + + + QFrame::midLineWidth + +<p>This property holds the width of the mid-line. +<p>The default value is 0. +<p> <p>See also <a href="qframe.html#lineWidth-prop">lineWidth</a> and <a href="qframe.html#frameWidth-prop">frameWidth</a>. + +<p>Set this property's value with <a href="qframe.html#setMidLineWidth">setMidLineWidth</a>() and get this property's value with <a href="qframe.html#midLineWidth">midLineWidth</a>(). + + + + QGridView::cellHeight + +<p>This property holds the height of a grid row. +<p>All rows in a grid view have the same height. +<p> <p>See also <a href="qgridview.html#cellWidth-prop">cellWidth</a>. + +<p>Set this property's value with <a href="qgridview.html#setCellHeight">setCellHeight</a>() and get this property's value with <a href="qgridview.html#cellHeight">cellHeight</a>(). + + + + QGridView::cellWidth + +<p>This property holds the width of a grid column. +<p>All columns in a grid view have the same width. +<p> <p>See also <a href="qgridview.html#cellHeight-prop">cellHeight</a>. + +<p>Set this property's value with <a href="qgridview.html#setCellWidth">setCellWidth</a>() and get this property's value with <a href="qgridview.html#cellWidth">cellWidth</a>(). + + + + QGridView::numCols + +<p>This property holds the number of columns in the grid. +<p>Set this property's value with <a href="qgridview.html#setNumCols">setNumCols</a>() and get this property's value with <a href="qgridview.html#numCols">numCols</a>(). +<p><p>See also <a href="qgridview.html#numRows-prop">numRows</a>. + + + + + QGridView::numRows + +<p>This property holds the number of rows in the grid. +<p>Set this property's value with <a href="qgridview.html#setNumRows">setNumRows</a>() and get this property's value with <a href="qgridview.html#numRows">numRows</a>(). +<p><p>See also <a href="qgridview.html#numCols-prop">numCols</a>. + + + + + QGroupBox::alignment + +<p>This property holds the alignment of the group box title. +<p>The title is always placed on the upper frame line. The horizontal +alignment can be specified by the alignment parameter. +<p> The alignment is one of the following flags: +<ul> +<li> <a href="qt.html#AlignmentFlags-enum">AlignAuto</a> aligns the title according to the language, +usually to the left. +<li> <a href="qt.html#AlignmentFlags-enum">AlignLeft</a> aligns the title text to the left. +<li> <a href="qt.html#AlignmentFlags-enum">AlignRight</a> aligns the title text to the right. +<li> <a href="qt.html#AlignmentFlags-enum">AlignHCenter</a> aligns the title text centered. +</ul> +<p> The default alignment is <a href="qt.html#AlignmentFlags-enum">AlignAuto</a>. +<p> <p>See also <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a>. + +<p>Set this property's value with <a href="qgroupbox.html#setAlignment">setAlignment</a>() and get this property's value with <a href="qgroupbox.html#alignment">alignment</a>(). + + + + QGroupBox::checkable + +<p>This property holds whether the group box has a checkbox in its title. +<p>If this property is TRUE, the group box has a checkbox. If the +checkbox is checked (which is the default), the group box's +children are enabled. +<p> <a href="qgroupbox.html#setCheckable">setCheckable</a>() controls whether or not the group box has a +checkbox, and <a href="qgroupbox.html#isCheckable">isCheckable</a>() controls whether the checkbox is +checked or not. + +<p>Set this property's value with <a href="qgroupbox.html#setCheckable">setCheckable</a>() and get this property's value with <a href="qgroupbox.html#isCheckable">isCheckable</a>(). + + + + QGroupBox::checked + +<p>This property holds whether the group box's checkbox is checked. +<p>If the group box has a check box (see <a href="qgroupbox.html#isCheckable">isCheckable</a>()), and the +check box is checked (see <a href="qgroupbox.html#isChecked">isChecked</a>()), the group box's children +are enabled. If the checkbox is unchecked the children are +disabled. + +<p>Set this property's value with <a href="qgroupbox.html#setChecked">setChecked</a>() and get this property's value with <a href="qgroupbox.html#isChecked">isChecked</a>(). + + + + QGroupBox::columns + +<p>This property holds the number of columns or rows (depending on <a href="qgroupbox.html#orientation-prop">QGroupBox::orientation</a>) in the group box. +<p>Usually it is not a good idea to set this property because it is +slow (it does a complete layout). It is best to set the number +of columns directly in the constructor. + +<p>Set this property's value with <a href="qgroupbox.html#setColumns">setColumns</a>() and get this property's value with <a href="qgroupbox.html#columns">columns</a>(). + + + + QGroupBox::flat + +<p>This property holds whether the group box is painted flat or has a frame. +<p>By default a group box has a surrounding frame, with the title +being placed on the upper frame line. In flat mode the right, left +and bottom frame lines are omitted, and only the thin line at the +top is drawn. +<p> <p>See also <a href="qgroupbox.html#title-prop">title</a>. + +<p>Set this property's value with <a href="qgroupbox.html#setFlat">setFlat</a>() and get this property's value with <a href="qgroupbox.html#isFlat">isFlat</a>(). + + + + QGroupBox::orientation + +<p>This property holds the group box's orientation. +<p>A horizontal group box arranges it's children in columns, while a +vertical group box arranges them in rows. +<p> Usually it is not a good idea to set this property because it is +slow (it does a complete layout). It is better to set the +orientation directly in the constructor. + +<p>Set this property's value with <a href="qgroupbox.html#setOrientation">setOrientation</a>() and get this property's value with <a href="qgroupbox.html#orientation">orientation</a>(). + + + + QGroupBox::title + +<p>This property holds the group box title text. +<p>The group box title text will have a focus-change keyboard +accelerator if the title contains &amp;, followed by a letter. +<p> <pre> + g-&gt;setTitle( "&amp;User information" ); + </pre> + +This produces "<u>U</u>ser information"; Alt+U moves the <a href="focus.html#keyboard-focus">keyboard focus</a> to the group box. +<p> There is no default title text. + +<p>Set this property's value with <a href="qgroupbox.html#setTitle">setTitle</a>() and get this property's value with <a href="qgroupbox.html#title">title</a>(). + + + + QHeader::count + +<p>This property holds the number of sections in the header. +<p> +<p>Get this property's value with <a href="qheader.html#count">count</a>(). + + + + QHeader::moving + +<p>This property holds whether the header sections can be moved. +<p>If this property is TRUE (the default) the user can move sections. +If the user moves a section the <a href="qheader.html#indexChange">indexChange</a>() signal is emitted. +<p> <p>See also <a href="qheader.html#setClickEnabled">setClickEnabled</a>() and <a href="qheader.html#setResizeEnabled">setResizeEnabled</a>(). + +<p>Set this property's value with <a href="qheader.html#setMovingEnabled">setMovingEnabled</a>() and get this property's value with <a href="qheader.html#isMovingEnabled">isMovingEnabled</a>(). + + + + QHeader::offset + +<p>This property holds the header's left-most (or top-most) visible pixel. +<p>Setting this property will scroll the header so that <em>offset</em> +becomes the left-most (or top-most for vertical headers) visible +pixel. + +<p>Set this property's value with <a href="qheader.html#setOffset">setOffset</a>() and get this property's value with <a href="qheader.html#offset">offset</a>(). + + + + QHeader::orientation + +<p>This property holds the header's orientation. +<p>The orientation is either <a href="qt.html#Orientation-enum">Vertical</a> or <a href="qt.html#Orientation-enum">Horizontal</a> (the +default). +<p> Call <a href="qheader.html#setOrientation">setOrientation</a>() before adding labels if you don't provide a +size parameter otherwise the sizes will be incorrect. + +<p>Set this property's value with <a href="qheader.html#setOrientation">setOrientation</a>() and get this property's value with <a href="qheader.html#orientation">orientation</a>(). + + + + QHeader::stretching + +<p>This property holds whether the header sections always take up the full width (or height) of the header. +<p> +<p>Set this property's value with <a href="qheader.html#setStretchEnabled">setStretchEnabled</a>() and get this property's value with <a href="qheader.html#isStretchEnabled">isStretchEnabled</a>(). + + + + QHeader::tracking + +<p>This property holds whether the <a href="qheader.html#sizeChange">sizeChange</a>() signal is emitted continuously. +<p>If tracking is on, the sizeChange() signal is emitted continuously +while the mouse is moved (i.e. when the header is resized), +otherwise it is only emitted when the mouse button is released at +the end of resizing. +<p> Tracking defaults to FALSE. + +<p>Set this property's value with <a href="qheader.html#setTracking">setTracking</a>() and get this property's value with <a href="qheader.html#tracking">tracking</a>(). + + + + QIconView::arrangement + +<p>This property holds the arrangement mode of the icon view. +<p>This can be <a href="qiconview.html#Arrangement-enum">LeftToRight</a> or <a href="qiconview.html#Arrangement-enum">TopToBottom</a>. The default is <a href="qiconview.html#Arrangement-enum">LeftToRight</a>. + +<p>Set this property's value with <a href="qiconview.html#setArrangement">setArrangement</a>() and get this property's value with <a href="qiconview.html#arrangement">arrangement</a>(). + + + + QIconView::autoArrange + +<p>This property holds whether the icon view rearranges its items when a new item is inserted. +<p>The default is TRUE. +<p> Note that if the icon view is not visible at the time of +insertion, QIconView defers all position-related work until it is +shown and then calls <a href="qiconview.html#arrangeItemsInGrid">arrangeItemsInGrid</a>(). + +<p>Set this property's value with <a href="qiconview.html#setAutoArrange">setAutoArrange</a>() and get this property's value with <a href="qiconview.html#autoArrange">autoArrange</a>(). + + + + QIconView::count + +<p>This property holds the number of items in the icon view. +<p> +<p>Get this property's value with <a href="qiconview.html#count">count</a>(). + + + + QIconView::gridX + +<p>This property holds the horizontal grid of the icon view. +<p>If the value is -1, (the default), QIconView computes suitable +column widths based on the icon view's contents. +<p> Note that setting a grid width overrides <a href="qiconview.html#setMaxItemWidth">setMaxItemWidth</a>(). + +<p>Set this property's value with <a href="qiconview.html#setGridX">setGridX</a>() and get this property's value with <a href="qiconview.html#gridX">gridX</a>(). + + + + QIconView::gridY + +<p>This property holds the vertical grid of the icon view. +<p>If the value is -1, (the default), QIconView computes suitable +column heights based on the icon view's contents. + +<p>Set this property's value with <a href="qiconview.html#setGridY">setGridY</a>() and get this property's value with <a href="qiconview.html#gridY">gridY</a>(). + + + + QIconView::itemTextBackground + +<p>This property holds the brush to use when drawing the background of an item's text. +<p>By default this brush is set to NoBrush, meaning that only the +normal icon view background is used. + +<p>Set this property's value with <a href="qiconview.html#setItemTextBackground">setItemTextBackground</a>() and get this property's value with <a href="qiconview.html#itemTextBackground">itemTextBackground</a>(). + + + + QIconView::itemTextPos + +<p>This property holds the position where the text of each item is drawn. +<p>Valid values are <a href="qiconview.html#ItemTextPos-enum">Bottom</a> or <a href="qiconview.html#ItemTextPos-enum">Right</a>. The default is <a href="qiconview.html#ItemTextPos-enum">Bottom</a>. + +<p>Set this property's value with <a href="qiconview.html#setItemTextPos">setItemTextPos</a>() and get this property's value with <a href="qiconview.html#itemTextPos">itemTextPos</a>(). + + + + QIconView::itemsMovable + +<p>This property holds whether the user is allowed to move items around in the icon view. +<p>The default is TRUE. + +<p>Set this property's value with <a href="qiconview.html#setItemsMovable">setItemsMovable</a>() and get this property's value with <a href="qiconview.html#itemsMovable">itemsMovable</a>(). + + + + QIconView::maxItemTextLength + +<p>This property holds the maximum length (in characters) that an item's text may have. +<p>The default is 255 characters. + +<p>Set this property's value with <a href="qiconview.html#setMaxItemTextLength">setMaxItemTextLength</a>() and get this property's value with <a href="qiconview.html#maxItemTextLength">maxItemTextLength</a>(). + + + + QIconView::maxItemWidth + +<p>This property holds the maximum width that an item may have. +<p>The default is 100 pixels. +<p> Note that if the <a href="qiconview.html#gridX">gridX</a>() value is set QIconView will ignore +this property. + +<p>Set this property's value with <a href="qiconview.html#setMaxItemWidth">setMaxItemWidth</a>() and get this property's value with <a href="qiconview.html#maxItemWidth">maxItemWidth</a>(). + + + + QIconView::resizeMode + +<p>This property holds the resize mode of the icon view. +<p>This can be <a href="qiconview.html#ResizeMode-enum">Fixed</a> or <a href="qiconview.html#ResizeMode-enum">Adjust</a>. The default is <a href="qiconview.html#ResizeMode-enum">Fixed</a>. +See <a href="qiconview.html#ResizeMode-enum">ResizeMode</a>. + +<p>Set this property's value with <a href="qiconview.html#setResizeMode">setResizeMode</a>() and get this property's value with <a href="qiconview.html#resizeMode">resizeMode</a>(). + + + + QIconView::selectionMode + +<p>This property holds the selection mode of the icon view. +<p>This can be <a href="qiconview.html#SelectionMode-enum">Single</a> (the default), <a href="qiconview.html#SelectionMode-enum">Extended</a>, <a href="qiconview.html#SelectionMode-enum">Multi</a> or <a href="qiconview.html#SelectionMode-enum">NoSelection</a>. + +<p>Set this property's value with <a href="qiconview.html#setSelectionMode">setSelectionMode</a>() and get this property's value with <a href="qiconview.html#selectionMode">selectionMode</a>(). + + + + QIconView::showToolTips + +<p>This property holds whether the icon view will display a tool tip with the complete text for any truncated item text. +<p>The default is TRUE. Note that this has no effect if +<a href="qiconview.html#setWordWrapIconText">setWordWrapIconText</a>() is TRUE, as it is by default. + +<p>Set this property's value with <a href="qiconview.html#setShowToolTips">setShowToolTips</a>() and get this property's value with <a href="qiconview.html#showToolTips">showToolTips</a>(). + + + + QIconView::sortDirection + +<p>This property holds whether the sort direction for inserting new items is ascending;. +<p>The default is TRUE (i.e. ascending). This sort direction is only +meaningful if both <a href="qiconview.html#sorting">sorting</a>() and <a href="qiconview.html#autoArrange">autoArrange</a>() are TRUE. +<p> To set the sort direction, use <a href="qiconview.html#setSorting">setSorting</a>() + +<p>Get this property's value with <a href="qiconview.html#sortDirection">sortDirection</a>(). + + + + QIconView::sorting + +<p>This property holds whether the icon view sorts on insertion. +<p>The default is FALSE, i.e. no sorting on insertion. +<p> To set the sorting, use <a href="qiconview.html#setSorting">setSorting</a>(). + +<p>Get this property's value with <a href="qiconview.html#sorting">sorting</a>(). + + + + QIconView::spacing + +<p>This property holds the space in pixels between icon view items. +<p>The default is 5 pixels. +<p> Negative values for spacing are illegal. + +<p>Set this property's value with <a href="qiconview.html#setSpacing">setSpacing</a>() and get this property's value with <a href="qiconview.html#spacing">spacing</a>(). + + + + QIconView::wordWrapIconText + +<p>This property holds whether the item text will be word-wrapped if it is too long. +<p>The default is TRUE. +<p> If this property is FALSE, icon text that is too long is +truncated, and an ellipsis (...) appended to indicate that +truncation has occurred. The full text can still be seen by the +user if they hover the mouse because the full text is shown in a +tooltip; see <a href="qiconview.html#setShowToolTips">setShowToolTips</a>(). + +<p>Set this property's value with <a href="qiconview.html#setWordWrapIconText">setWordWrapIconText</a>() and get this property's value with <a href="qiconview.html#wordWrapIconText">wordWrapIconText</a>(). + + + + QIntValidator::bottom + +<p>This property holds the validator's lowest acceptable value. +<p>Set this property's value with <a href="qintvalidator.html#setBottom">setBottom</a>() and get this property's value with <a href="qintvalidator.html#bottom">bottom</a>(). +<p><p>See also <a href="qintvalidator.html#setRange">setRange</a>(). + + + + + QIntValidator::top + +<p>This property holds the validator's highest acceptable value. +<p>Set this property's value with <a href="qintvalidator.html#setTop">setTop</a>() and get this property's value with <a href="qintvalidator.html#top">top</a>(). +<p><p>See also <a href="qintvalidator.html#setRange">setRange</a>(). + + + + + QLCDNumber::intValue + +<p>This property holds the displayed value rounded to the nearest integer. +<p>This property corresponds to the nearest integer to the current +value displayed by the LCDNumber. This is the value used for +hexadecimal, octal and binary modes. +<p> If the displayed value is not a number, the property has a value +of 0. + +<p>Set this property's value with <a href="qlcdnumber.html#display">display</a>() and get this property's value with <a href="qlcdnumber.html#intValue">intValue</a>(). + + + + QLCDNumber::mode + +<p>This property holds the current display mode (number base). +<p>Corresponds to the current display mode, which is one of <a href="qlcdnumber.html#Mode-enum">BIN</a>, +<a href="qlcdnumber.html#Mode-enum">OCT</a>, <a href="qlcdnumber.html#Mode-enum">DEC</a> (the default) and <a href="qlcdnumber.html#Mode-enum">HEX</a>. <a href="qlcdnumber.html#Mode-enum">DEC</a> mode can display +floating point values, the other modes display the integer +equivalent. +<p> <p>See also <a href="qlcdnumber.html#smallDecimalPoint-prop">smallDecimalPoint</a>, <a href="qlcdnumber.html#setHexMode">setHexMode</a>(), <a href="qlcdnumber.html#setDecMode">setDecMode</a>(), <a href="qlcdnumber.html#setOctMode">setOctMode</a>(), and <a href="qlcdnumber.html#setBinMode">setBinMode</a>(). + +<p>Set this property's value with <a href="qlcdnumber.html#setMode">setMode</a>() and get this property's value with <a href="qlcdnumber.html#mode">mode</a>(). + + + + QLCDNumber::numDigits + +<p>This property holds the current number of digits displayed. +<p>Corresponds to the current number of digits. If <a href="qlcdnumber.html#smallDecimalPoint-prop">QLCDNumber::smallDecimalPoint</a> is FALSE, the decimal point occupies +one digit position. +<p> <p>See also <a href="qlcdnumber.html#smallDecimalPoint-prop">smallDecimalPoint</a>. + +<p>Set this property's value with <a href="qlcdnumber.html#setNumDigits">setNumDigits</a>() and get this property's value with <a href="qlcdnumber.html#numDigits">numDigits</a>(). + + + + QLCDNumber::segmentStyle + +<p>This property holds the style of the LCDNumber. +<p><center><table cellpadding="4" cellspacing="2" border="0"> +<tr bgcolor="#a2c511"> <th valign="top">Style <th valign="top">Result +<tr bgcolor="#f0f0f0"> <td valign="top"><a href="qlcdnumber.html#SegmentStyle-enum">Outline</a> +<td valign="top">Produces raised segments filled with the background color +(this is the default). +<tr bgcolor="#d0d0d0"> <td valign="top"><a href="qlcdnumber.html#SegmentStyle-enum">Filled</a> +<td valign="top">Produces raised segments filled with the foreground color. +<tr bgcolor="#f0f0f0"> <td valign="top"><a href="qlcdnumber.html#SegmentStyle-enum">Flat</a> +<td valign="top">Produces flat segments filled with the foreground color. +</table></center> +<p> <a href="qlcdnumber.html#SegmentStyle-enum">Outline</a> and <a href="qlcdnumber.html#SegmentStyle-enum">Filled</a> will additionally use +<a href="qcolorgroup.html#light">QColorGroup::light</a>() and <a href="qcolorgroup.html#dark">QColorGroup::dark</a>() for shadow effects. + +<p>Set this property's value with <a href="qlcdnumber.html#setSegmentStyle">setSegmentStyle</a>() and get this property's value with <a href="qlcdnumber.html#segmentStyle">segmentStyle</a>(). + + + + QLCDNumber::smallDecimalPoint + +<p>This property holds the style of the decimal point. +<p>If TRUE the decimal point is drawn between two digit positions. +Otherwise it occupies a digit position of its own, i.e. is drawn +in a digit position. The default is FALSE. +<p> The inter-digit space is made slightly wider when the decimal +point is drawn between the digits. +<p> <p>See also <a href="qlcdnumber.html#mode-prop">mode</a>. + +<p>Set this property's value with <a href="qlcdnumber.html#setSmallDecimalPoint">setSmallDecimalPoint</a>() and get this property's value with <a href="qlcdnumber.html#smallDecimalPoint">smallDecimalPoint</a>(). + + + + QLCDNumber::value + +<p>This property holds the displayed value. +<p>This property corresponds to the current value displayed by the +LCDNumber. +<p> If the displayed value is not a number, the property has a value +of 0. + +<p>Set this property's value with <a href="qlcdnumber.html#display">display</a>() and get this property's value with <a href="qlcdnumber.html#value">value</a>(). + + + + QLabel::alignment + +<p>This property holds the alignment of the label's contents. +<p>The alignment is a bitwise OR of <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a> and <a href="qt.html#TextFlags-enum">Qt::TextFlags</a> values. The <a href="qt.html#TextFlags-enum">ExpandTabs</a>, <a href="qt.html#TextFlags-enum">SingleLine</a> and <a href="qt.html#TextFlags-enum">ShowPrefix</a> flags apply only if the label contains plain text; +otherwise they are ignored. The <a href="qt.html#TextFlags-enum">DontClip</a> flag is always +ignored. <a href="qt.html#TextFlags-enum">WordBreak</a> applies to both rich text and plain text +labels. The <a href="qt.html#TextFlags-enum">BreakAnywhere</a> flag is not supported in QLabel. +<p> If the label has a buddy, the <a href="qt.html#TextFlags-enum">ShowPrefix</a> flag is forced to +TRUE. +<p> The default alignment is <tt>AlignAuto | AlignVCenter | ExpandTabs</tt> +if the label doesn't have a buddy and <tt>AlignAuto | AlignVCenter | ExpandTabs | ShowPrefix</tt> if the label has a buddy. If the label +contains rich text, additionally <a href="qt.html#TextFlags-enum">WordBreak</a> is turned on. +<p> <p>See also <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a>, <a href="qlabel.html#setBuddy">setBuddy</a>(), and <a href="qlabel.html#text-prop">text</a>. + +<p>Set this property's value with <a href="qlabel.html#setAlignment">setAlignment</a>() and get this property's value with <a href="qlabel.html#alignment">alignment</a>(). + + + + QLabel::indent + +<p>This property holds the label's text indent in pixels. +<p>If a label displays text, the indent applies to the left edge if +<a href="qlabel.html#alignment">alignment</a>() is <a href="qt.html#AlignmentFlags-enum">AlignLeft</a>, to the right edge if alignment() is +<a href="qt.html#AlignmentFlags-enum">AlignRight</a>, to the top edge if alignment() is <a href="qt.html#AlignmentFlags-enum">AlignTop</a>, and +to to the bottom edge if alignment() is <a href="qt.html#AlignmentFlags-enum">AlignBottom</a>. +<p> If indent is negative, or if no indent has been set, the label +computes the effective indent as follows: If <a href="qframe.html#frameWidth">frameWidth</a>() is 0, +the effective indent becomes 0. If frameWidth() is greater than 0, +the effective indent becomes half the width of the "x" character +of the widget's current <a href="qwidget.html#font">font</a>(). +<p> <p>See also <a href="qlabel.html#alignment-prop">alignment</a>, <a href="qframe.html#frameWidth-prop">frameWidth</a>, and <a href="qwidget.html#font-prop">font</a>. + +<p>Set this property's value with <a href="qlabel.html#setIndent">setIndent</a>() and get this property's value with <a href="qlabel.html#indent">indent</a>(). + + + + QLabel::pixmap + +<p>This property holds the label's pixmap. +<p>If no pixmap has been set this will return an invalid pixmap. +<p> Setting the pixmap clears any previous content, and resizes the +label if <a href="qlabel.html#autoResize">QLabel::autoResize</a>() is TRUE. The buddy accelerator, +if any, is disabled. + +<p>Set this property's value with <a href="qlabel.html#setPixmap">setPixmap</a>() and get this property's value with <a href="qlabel.html#pixmap">pixmap</a>(). + + + + QLabel::scaledContents + +<p>This property holds whether the label will scale its contents to fill all available space. +<p>When enabled and the label shows a pixmap, it will scale the +pixmap to fill the available space. +<p> This property's default is FALSE. +<p> <p>See also <a href="qlabel.html#scaledContents-prop">scaledContents</a>. + +<p>Set this property's value with <a href="qlabel.html#setScaledContents">setScaledContents</a>() and get this property's value with <a href="qlabel.html#hasScaledContents">hasScaledContents</a>(). + + + + QLabel::text + +<p>This property holds the label's text. +<p>If no text has been set this will return an empty string. Setting +the text clears any previous content, unless they are the same. +<p> The text will be interpreted either as a plain text or as a rich +text, depending on the text format setting; see <a href="qlabel.html#setTextFormat">setTextFormat</a>(). +The default setting is <a href="qt.html#TextFormat-enum">AutoText</a>, i.e. QLabel will try to +auto-detect the format of the text set. +<p> If the text is interpreted as a plain text and a buddy has been +set, the buddy accelerator key is updated from the new text. +<p> The label resizes itself if auto-resizing is enabled. +<p> Note that Qlabel is well-suited to display small rich text +documents, i.e. those small documents that get their document +specific settings (font, text color, link color) from the label's +palette and font properties. For large documents, use <a href="qtextedit.html">QTextEdit</a> +in read-only mode instead. QTextEdit will flicker less on resize +and can also provide a scrollbar when necessary. +<p> <p>See also <a href="qlabel.html#textFormat-prop">textFormat</a>, <a href="qlabel.html#setBuddy">setBuddy</a>(), and <a href="qlabel.html#alignment-prop">alignment</a>. + +<p>Set this property's value with <a href="qlabel.html#setText">setText</a>() and get this property's value with <a href="qlabel.html#text">text</a>(). + + + + QLabel::textFormat + +<p>This property holds the label's text format. +<p>See the <a href="qt.html#TextFormat-enum">Qt::TextFormat</a> enum for an explanation of the possible +options. +<p> The default format is <a href="qt.html#TextFormat-enum">AutoText</a>. +<p> <p>See also <a href="qlabel.html#text-prop">text</a>. + +<p>Set this property's value with <a href="qlabel.html#setTextFormat">setTextFormat</a>() and get this property's value with <a href="qlabel.html#textFormat">textFormat</a>(). + + + + QLayout::margin + +<p>This property holds the width of the outside border of the layout. +<p>For some layout classes this property has an effect only on +top-level layouts; <a href="qboxlayout.html">QBoxLayout</a> and <a href="qgridlayout.html">QGridLayout</a> support margins for +child layouts. The default value is 0. +<p> <p>See also <a href="qlayout.html#spacing-prop">spacing</a>. + +<p>Set this property's value with <a href="qlayout.html#setMargin">setMargin</a>() and get this property's value with <a href="qlayout.html#margin">margin</a>(). + + + + QLayout::resizeMode + +<p>This property holds the resize mode of the layout. +<p>The default mode is <a href="qlayout.html#ResizeMode-enum">Auto</a>. +<p> <p>See also <a href="qlayout.html#ResizeMode-enum">QLayout::ResizeMode</a>. + +<p>Set this property's value with <a href="qlayout.html#setResizeMode">setResizeMode</a>() and get this property's value with <a href="qlayout.html#resizeMode">resizeMode</a>(). + + + + QLayout::spacing + +<p>This property holds the spacing between widgets inside the layout. +<p>The default value is -1, which signifies that the layout's spacing +should not override the widget's spacing. +<p> <p>See also <a href="qlayout.html#margin-prop">margin</a>. + +<p>Set this property's value with <a href="qlayout.html#setSpacing">setSpacing</a>() and get this property's value with <a href="qlayout.html#spacing">spacing</a>(). + + + + QLineEdit::acceptableInput + +<p>This property holds whether the input satisfies the inputMask and the validator. +<p>Get this property's value with <a href="qlineedit.html#hasAcceptableInput">hasAcceptableInput</a>(). +<p><p>See also <a href="qlineedit.html#inputMask-prop">inputMask</a> and <a href="qlineedit.html#setValidator">setValidator</a>(). + + + + + QLineEdit::alignment + +<p>This property holds the alignment of the line edit. +<p>Possible Values are <a href="qt.html#AlignmentFlags-enum">Qt::AlignAuto</a>, <a href="qt.html#AlignmentFlags-enum">Qt::AlignLeft</a>, <a href="qt.html#AlignmentFlags-enum">Qt::AlignRight</a> and <a href="qt.html#AlignmentFlags-enum">Qt::AlignHCenter</a>. +<p> Attempting to set the alignment to an illegal flag combination +does nothing. +<p> <p>See also <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a>. + +<p>Set this property's value with <a href="qlineedit.html#setAlignment">setAlignment</a>() and get this property's value with <a href="qlineedit.html#alignment">alignment</a>(). + + + + QLineEdit::cursorPosition + +<p>This property holds the current cursor position for this line edit. +<p>Setting the cursor position causes a repaint when appropriate. + +<p>Set this property's value with <a href="qlineedit.html#setCursorPosition">setCursorPosition</a>() and get this property's value with <a href="qlineedit.html#cursorPosition">cursorPosition</a>(). + + + + QLineEdit::displayText + +<p>This property holds the displayed text. +<p>If <a href="qlineedit.html#EchoMode-enum">EchoMode</a> is <a href="qlineedit.html#EchoMode-enum">Normal</a> this returns the same as <a href="qlineedit.html#text">text</a>(); if +<a href="qlineedit.html#EchoMode-enum">EchoMode</a> is <a href="qlineedit.html#EchoMode-enum">Password</a> it returns a string of asterisks +text().length() characters long, e.g. "******"; if <a href="qlineedit.html#EchoMode-enum">EchoMode</a> is +<a href="qlineedit.html#EchoMode-enum">NoEcho</a> returns an empty string, "". +<p> <p>See also <a href="qlineedit.html#echoMode-prop">echoMode</a>, <a href="qlineedit.html#text-prop">text</a>, and <a href="qlineedit.html#EchoMode-enum">EchoMode</a>. + +<p>Get this property's value with <a href="qlineedit.html#displayText">displayText</a>(). + + + + QLineEdit::dragEnabled + +<p>This property holds whether the lineedit starts a drag if the user presses and moves the mouse on some selected text. +<p> +<p>Set this property's value with <a href="qlineedit.html#setDragEnabled">setDragEnabled</a>() and get this property's value with <a href="qlineedit.html#dragEnabled">dragEnabled</a>(). + + + + QLineEdit::echoMode + +<p>This property holds the line edit's echo mode. +<p>The initial setting is <a href="qlineedit.html#EchoMode-enum">Normal</a>, but QLineEdit also supports <a href="qlineedit.html#EchoMode-enum">NoEcho</a> and <a href="qlineedit.html#EchoMode-enum">Password</a> modes. +<p> The widget's display and the ability to copy or drag the text is +affected by this setting. +<p> <p>See also <a href="qlineedit.html#EchoMode-enum">EchoMode</a> and <a href="qlineedit.html#displayText-prop">displayText</a>. + +<p>Set this property's value with <a href="qlineedit.html#setEchoMode">setEchoMode</a>() and get this property's value with <a href="qlineedit.html#echoMode">echoMode</a>(). + + + + QLineEdit::edited + +<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> <p>This property holds whether the line edit has been edited. Use modified instead. +<p> +<p>Set this property's value with <a href="qlineedit.html#setEdited">setEdited</a>() and get this property's value with <a href="qlineedit.html#edited">edited</a>(). + + + + QLineEdit::frame + +<p>This property holds whether the line edit draws itself with a frame. +<p>If enabled (the default) the line edit draws itself inside a +two-pixel frame, otherwise the line edit draws itself without any +frame. + +<p>Set this property's value with <a href="qlineedit.html#setFrame">setFrame</a>() and get this property's value with <a href="qlineedit.html#frame">frame</a>(). + + + + QLineEdit::hasMarkedText + +<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> <p>This property holds whether part of the text has been selected by the user. Use hasSelectedText instead. +<p> +<p>Get this property's value with <a href="qlineedit.html#hasMarkedText">hasMarkedText</a>(). + + + + QLineEdit::hasSelectedText + +<p>This property holds whether there is any text selected. +<p>hasSelectedText() returns TRUE if some or all of the text has been +selected by the user; otherwise returns FALSE. +<p> <p>See also <a href="qlineedit.html#selectedText-prop">selectedText</a>. + +<p>Get this property's value with <a href="qlineedit.html#hasSelectedText">hasSelectedText</a>(). + + + + QLineEdit::inputMask + +<p>This property holds the validation input mask. +<p>If no mask is set, <a href="qlineedit.html#inputMask">inputMask</a>() returns <a href="qstring.html#QString-null">QString::null</a>. +<p> Sets the QLineEdit's validation mask. Validators can be used +instead of, or in conjunction with masks; see <a href="qlineedit.html#setValidator">setValidator</a>(). +<p> Unset the mask and return to normal QLineEdit operation by passing +an empty string ("") or just calling <a href="qlineedit.html#setInputMask">setInputMask</a>() with no +arguments. +<p> The mask format understands these mask characters: +<center><table cellpadding="4" cellspacing="2" border="0"> +<tr bgcolor="#a2c511"> <th valign="top">Character <th valign="top">Meaning +<tr bgcolor="#f0f0f0"> <td valign="top"><tt>A</tt> <td valign="top">ASCII alphabetic character retquired. A-Z, a-z. +<tr bgcolor="#d0d0d0"> <td valign="top"><tt>a</tt> <td valign="top">ASCII alphabetic character permitted but not retquired. +<tr bgcolor="#f0f0f0"> <td valign="top"><tt>N</tt> <td valign="top">ASCII alphanumeric character retquired. A-Z, a-z, 0-9. +<tr bgcolor="#d0d0d0"> <td valign="top"><tt>n</tt> <td valign="top">ASCII alphanumeric character permitted but not retquired. +<tr bgcolor="#f0f0f0"> <td valign="top"><tt>X</tt> <td valign="top">Any character retquired. +<tr bgcolor="#d0d0d0"> <td valign="top"><a href="qwidget.html#x-prop">x</a> <td valign="top">Any character permitted but not retquired. +<tr bgcolor="#f0f0f0"> <td valign="top"><tt>9</tt> <td valign="top">ASCII digit retquired. 0-9. +<tr bgcolor="#d0d0d0"> <td valign="top"><tt>0</tt> <td valign="top">ASCII digit permitted but not retquired. +<tr bgcolor="#f0f0f0"> <td valign="top"><tt>D</tt> <td valign="top">ASCII digit retquired. 1-9. +<tr bgcolor="#d0d0d0"> <td valign="top"><tt>d</tt> <td valign="top">ASCII digit permitted but not retquired (1-9). +<tr bgcolor="#f0f0f0"> <td valign="top"><tt>#</tt> <td valign="top">ASCII digit or plus/minus sign permitted but not retquired. +<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&gt;</tt> <td valign="top">All following alphabetic characters are uppercased. +<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;</tt> <td valign="top">All following alphabetic characters are lowercased. +<tr bgcolor="#d0d0d0"> <td valign="top"><tt>!</tt> <td valign="top">Switch off case conversion. +<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&#92;</tt> <td valign="top">Use <tt>&#92;</tt> to escape the special +characters listed above to use them as +separators. +</table></center> +<p> The mask consists of a string of mask characters and separators, +optionally followed by a semi-colon and the character used for +blanks: the blank characters are always removed from the text +after editing. The default blank character is space. +<p> Examples: +<center><table cellpadding="4" cellspacing="2" border="0"> +<tr bgcolor="#a2c511"> <th valign="top">Mask <th valign="top">Notes +<tr bgcolor="#d0d0d0"> <td valign="top"><tt>000.000.000.000;_</tt> <td valign="top">IP address; blanks are <tt>_</tt>. +<tr bgcolor="#f0f0f0"> <td valign="top"><tt>0000-00-00</tt> <td valign="top">ISO Date; blanks are <tt>space</tt> +<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&gt;AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#</tt> <td valign="top">License number; +blanks are <tt>-</tt> and all (alphabetic) characters are converted to +uppercase. +</table></center> +<p> To get range control (e.g. for an IP address) use masks together +with <a href="qlineedit.html#setValidator">validators</a>. +<p> <p>See also <a href="qlineedit.html#maxLength-prop">maxLength</a>. + +<p>Set this property's value with <a href="qlineedit.html#setInputMask">setInputMask</a>() and get this property's value with <a href="qlineedit.html#inputMask">inputMask</a>(). + + + + QLineEdit::markedText + +<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> <p>This property holds the text selected by the user. Use selectedText instead. +<p> +<p>Get this property's value with <a href="qlineedit.html#markedText">markedText</a>(). + + + + QLineEdit::maxLength + +<p>This property holds the maximum permitted length of the text. +<p>If the text is too long, it is truncated at the limit. +<p> If truncation occurs any selected text will be unselected, the +cursor position is set to 0 and the first part of the string is +shown. +<p> If the line edit has an input mask, the mask defines the maximum +string length. +<p> <p>See also <a href="qlineedit.html#inputMask-prop">inputMask</a>. + +<p>Set this property's value with <a href="qlineedit.html#setMaxLength">setMaxLength</a>() and get this property's value with <a href="qlineedit.html#maxLength">maxLength</a>(). + + + + QLineEdit::modified + +<p>This property holds whether the line edit's contents has been modified by the user. +<p>The modified flag is never read by QLineEdit; it has a default value +of FALSE and is changed to TRUE whenever the user changes the line +edit's contents. +<p> This is useful for things that need to provide a default value but +do not start out knowing what the default should be (perhaps it +depends on other fields on the form). Start the line edit without +the best default, and when the default is known, if modified() +returns FALSE (the user hasn't entered any text), insert the +default value. +<p> Calling <a href="qlineedit.html#clearModified">clearModified</a>() or <a href="qlineedit.html#setText">setText</a>() resets the modified flag to +FALSE. + +<p>Get this property's value with <a href="qlineedit.html#isModified">isModified</a>(). + + + + QLineEdit::readOnly + +<p>This property holds whether the line edit is read only. +<p>In read-only mode, the user can still copy the text to the +clipboard or drag-and-drop the text (if <a href="qlineedit.html#echoMode">echoMode</a>() is <a href="qlineedit.html#EchoMode-enum">Normal</a>), +but cannot edit it. +<p> QLineEdit does not show a cursor in read-only mode. +<p> <p>See also <a href="qwidget.html#enabled-prop">enabled</a>. + +<p>Set this property's value with <a href="qlineedit.html#setReadOnly">setReadOnly</a>() and get this property's value with <a href="qlineedit.html#isReadOnly">isReadOnly</a>(). + + + + QLineEdit::redoAvailable + +<p>This property holds whether redo is available. +<p> +<p>Get this property's value with <a href="qlineedit.html#isRedoAvailable">isRedoAvailable</a>(). + + + + QLineEdit::selectedText + +<p>This property holds the selected text. +<p>If there is no selected text this property's value is +<a href="qstring.html#QString-null">QString::null</a>. +<p> <p>See also <a href="qlineedit.html#hasSelectedText-prop">hasSelectedText</a>. + +<p>Get this property's value with <a href="qlineedit.html#selectedText">selectedText</a>(). + + + + QLineEdit::text + +<p>This property holds the line edit's text. +<p>Note that setting this property clears the selection, clears the +undo/redo history, moves the cursor to the end of the line and +resets the <a href="qlineedit.html#modified-prop">modified</a> property to FALSE. The text is not +validated when inserted with <a href="qlineedit.html#setText">setText</a>(). +<p> The text is truncated to <a href="qlineedit.html#maxLength">maxLength</a>() length. +<p> <p>See also <a href="qlineedit.html#insert">insert</a>(). + +<p>Set this property's value with <a href="qlineedit.html#setText">setText</a>() and get this property's value with <a href="qlineedit.html#text">text</a>(). + + + + QLineEdit::undoAvailable + +<p>This property holds whether undo is available. +<p> +<p>Get this property's value with <a href="qlineedit.html#isUndoAvailable">isUndoAvailable</a>(). + + + + QListBox::columnMode + +<p>This property holds the column layout mode for this list box. +<p>setColumnMode() sets the layout mode and adjusts the number of +displayed columns. The row layout mode automatically becomes <a href="qlistbox.html#LayoutMode-enum">Variable</a>, unless the column mode is <a href="qlistbox.html#LayoutMode-enum">Variable</a>. +<p> <p>See also <a href="qlistbox.html#rowMode-prop">rowMode</a>, <a href="qlistbox.html#rowMode-prop">rowMode</a>, and <a href="qlistbox.html#numColumns-prop">numColumns</a>. + +<p>Set this property's value with <a href="qlistbox.html#setColumnMode">setColumnMode</a>() and get this property's value with <a href="qlistbox.html#columnMode">columnMode</a>(). + + + + QListBox::count + +<p>This property holds the number of items in the list box. +<p> +<p>Get this property's value with <a href="qlistbox.html#count">count</a>(). + + + + QListBox::currentItem + +<p>This property holds the current highlighted item. +<p>When setting this property, the highlighting is moved to the item +and the list box scrolled as necessary. +<p> If no item is current, <a href="qlistbox.html#currentItem">currentItem</a>() returns -1. + +<p>Set this property's value with <a href="qlistbox.html#setCurrentItem">setCurrentItem</a>() and get this property's value with <a href="qlistbox.html#currentItem">currentItem</a>(). + + + + QListBox::currentText + +<p>This property holds the text of the current item. +<p>This is equivalent to <a href="qlistbox.html#text">text</a>(currentItem()). + +<p>Get this property's value with <a href="qlistbox.html#currentText">currentText</a>(). + + + + QListBox::multiSelection + +<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> <p>This property holds whether or not the list box is in Multi selection mode. +<p>Consider using the <a href="qlistbox.html#selectionMode-prop">QListBox::selectionMode</a> property instead of +this property. +<p> When setting this property, Multi selection mode is used if set to TRUE and +to Single selection mode if set to FALSE. +<p> When getting this property, TRUE is returned if the list box is in +Multi selection mode or Extended selection mode, and FALSE if it is +in Single selection mode or NoSelection mode. +<p> <p>See also <a href="qlistbox.html#selectionMode-prop">selectionMode</a>. + +<p>Set this property's value with <a href="qlistbox.html#setMultiSelection">setMultiSelection</a>() and get this property's value with <a href="qlistbox.html#isMultiSelection">isMultiSelection</a>(). + + + + QListBox::numColumns + +<p>This property holds the number of columns in the list box. +<p>This is normally 1, but can be different if <a href="qlistbox.html#columnMode-prop">QListBox::columnMode</a> or <a href="qlistbox.html#rowMode-prop">QListBox::rowMode</a> has been set. +<p> <p>See also <a href="qlistbox.html#columnMode-prop">columnMode</a>, <a href="qlistbox.html#rowMode-prop">rowMode</a>, and <a href="qlistbox.html#numRows-prop">numRows</a>. + +<p>Get this property's value with <a href="qlistbox.html#numColumns">numColumns</a>(). + + + + QListBox::numItemsVisible + +<p>This property holds the number of visible items. +<p>Both partially and entirely visible items are counted. + +<p>Get this property's value with <a href="qlistbox.html#numItemsVisible">numItemsVisible</a>(). + + + + QListBox::numRows + +<p>This property holds the number of rows in the list box. +<p>This is equal to the number of items in the default single-column +layout, but can be different. +<p> <p>See also <a href="qlistbox.html#columnMode-prop">columnMode</a>, <a href="qlistbox.html#rowMode-prop">rowMode</a>, and <a href="qlistbox.html#numColumns-prop">numColumns</a>. + +<p>Get this property's value with <a href="qlistbox.html#numRows">numRows</a>(). + + + + QListBox::rowMode + +<p>This property holds the row layout mode for this list box. +<p>This property is normally <a href="qlistbox.html#LayoutMode-enum">Variable</a>. +<p> <a href="qlistbox.html#setRowMode">setRowMode</a>() sets the layout mode and adjusts the number of +displayed rows. The column layout mode automatically becomes <a href="qlistbox.html#LayoutMode-enum">Variable</a>, unless the row mode is <a href="qlistbox.html#LayoutMode-enum">Variable</a>. +<p> <p>See also <a href="qlistbox.html#columnMode-prop">columnMode</a>. + +<p>Set this property's value with <a href="qlistbox.html#setRowMode">setRowMode</a>() and get this property's value with <a href="qlistbox.html#rowMode">rowMode</a>(). + + + + QListBox::selectionMode + +<p>This property holds the selection mode of the list box. +<p>Sets the list box's selection mode, which may be one of <a href="qlistbox.html#SelectionMode-enum">Single</a> +(the default), <a href="qlistbox.html#SelectionMode-enum">Extended</a>, <a href="qlistbox.html#SelectionMode-enum">Multi</a> or <a href="qlistbox.html#SelectionMode-enum">NoSelection</a>. +<p> <p>See also <a href="qlistbox.html#SelectionMode-enum">SelectionMode</a>. + +<p>Set this property's value with <a href="qlistbox.html#setSelectionMode">setSelectionMode</a>() and get this property's value with <a href="qlistbox.html#selectionMode">selectionMode</a>(). + + + + QListBox::topItem + +<p>This property holds the index of an item at the top of the screen. +<p>When getting this property and the listbox has multiple columns, +an arbitrary item is selected and returned. +<p> When setting this property, the list box is scrolled so the item +at position <em>index</em> in the list is displayed in the top row of +the list box. + +<p>Set this property's value with <a href="qlistbox.html#setTopItem">setTopItem</a>() and get this property's value with <a href="qlistbox.html#topItem">topItem</a>(). + + + + QListBox::variableHeight + +<p>This property holds whether this list box has variable-height rows. +<p>When the list box has variable-height rows (the default), each row +is as high as the highest item in that row. When it has same-sized +rows, all rows are as high as the highest item in the list box. +<p> <p>See also <a href="qlistbox.html#variableWidth-prop">variableWidth</a>. + +<p>Set this property's value with <a href="qlistbox.html#setVariableHeight">setVariableHeight</a>() and get this property's value with <a href="qlistbox.html#variableHeight">variableHeight</a>(). + + + + QListBox::variableWidth + +<p>This property holds whether this list box has variable-width columns. +<p>When the list box has variable-width columns, each column is as +wide as the widest item in that column. When it has same-sized +columns (the default), all columns are as wide as the widest item +in the list box. +<p> <p>See also <a href="qlistbox.html#variableHeight-prop">variableHeight</a>. + +<p>Set this property's value with <a href="qlistbox.html#setVariableWidth">setVariableWidth</a>() and get this property's value with <a href="qlistbox.html#variableWidth">variableWidth</a>(). + + + + QListView::allColumnsShowFocus + +<p>This property holds whether items should show <a href="focus.html#keyboard-focus">keyboard focus</a> using all columns. +<p>If this property is TRUE all columns will show focus and selection +states, otherwise only column 0 will show focus. +<p> The default is FALSE. +<p> Setting this to TRUE if it's not necessary may cause noticeable +flicker. + +<p>Set this property's value with <a href="qlistview.html#setAllColumnsShowFocus">setAllColumnsShowFocus</a>() and get this property's value with <a href="qlistview.html#allColumnsShowFocus">allColumnsShowFocus</a>(). + + + + QListView::childCount + +<p>This property holds the number of parentless (top-level) <a href="qlistviewitem.html">QListViewItem</a> objects in this QListView. +<p>Holds the current number of parentless (top-level) QListViewItem +objects in this QListView. +<p> <p>See also <a href="qlistviewitem.html#childCount">QListViewItem::childCount</a>(). + +<p>Get this property's value with <a href="qlistview.html#childCount">childCount</a>(). + + + + QListView::columns + +<p>This property holds the number of columns in this list view. +<p>Get this property's value with <a href="qlistview.html#columns">columns</a>(). +<p><p>See also <a href="qlistview.html#addColumn">addColumn</a>() and <a href="qlistview.html#removeColumn">removeColumn</a>(). + + + + + QListView::defaultRenameAction + +<p>This property holds what action to perform when the editor loses focus during renaming. +<p>If this property is <a href="qlistview.html#RenameAction-enum">Accept</a>, and the user renames an item and +the editor loses focus (without the user pressing Enter), the +item will still be renamed. If the property's value is <a href="qlistview.html#RenameAction-enum">Reject</a>, +the item will not be renamed unless the user presses Enter. The +default is <a href="qlistview.html#RenameAction-enum">Reject</a>. + +<p>Set this property's value with <a href="qlistview.html#setDefaultRenameAction">setDefaultRenameAction</a>() and get this property's value with <a href="qlistview.html#defaultRenameAction">defaultRenameAction</a>(). + + + + QListView::itemMargin + +<p>This property holds the advisory item margin that list items may use. +<p>The item margin defaults to one pixel and is the margin between +the item's edges and the area where it draws its contents. +<a href="qlistviewitem.html#paintFocus">QListViewItem::paintFocus</a>() draws in the margin. +<p> <p>See also <a href="qlistviewitem.html#paintCell">QListViewItem::paintCell</a>(). + +<p>Set this property's value with <a href="qlistview.html#setItemMargin">setItemMargin</a>() and get this property's value with <a href="qlistview.html#itemMargin">itemMargin</a>(). + + + + QListView::multiSelection + <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> <p>This property holds whether the list view is in multi-selection or extended-selection mode. +<p>If you enable multi-selection, <a href="qlistview.html#SelectionMode-enum">Multi</a>, mode, it is possible to +specify whether or not this mode should be extended. <a href="qlistview.html#SelectionMode-enum">Extended</a> +means that the user can select multiple items only when pressing +the Shift or Ctrl key at the same time. +<p> The default selection mode is <a href="qlistview.html#SelectionMode-enum">Single</a>. +<p> <p>See also <a href="qlistview.html#selectionMode-prop">selectionMode</a>. + +<p>Set this property's value with <a href="qlistview.html#setMultiSelection">setMultiSelection</a>() and get this property's value with <a href="qlistview.html#isMultiSelection">isMultiSelection</a>(). + + + + QListView::resizeMode + +<p>This property holds whether all, none or the only the last column should be resized. +<p>Specifies whether all, none or only the last column should be +resized to fit the full width of the list view. The values for this +property can be one of: <a href="qlistview.html#ResizeMode-enum">NoColumn</a> (the default), <a href="qlistview.html#ResizeMode-enum">AllColumns</a> +or <a href="qlistview.html#ResizeMode-enum">LastColumn</a>. +<p> <b>Warning:</b> Setting the resize mode should be done after all necessary +columns have been added to the list view, otherwise the behavior is +undefined. +<p> <p>See also <a href="qheader.html">QHeader</a> and <a href="qlistview.html#header">header</a>(). + +<p>Set this property's value with <a href="qlistview.html#setResizeMode">setResizeMode</a>() and get this property's value with <a href="qlistview.html#resizeMode">resizeMode</a>(). + + + + QListView::rootIsDecorated + +<p>This property holds whether the list view shows open/close signs on root items. +<p>Open/close signs are small <b>+</b> or <b>-</b> symbols in windows +style, or arrows in <a href="motif-extension.html#Motif">Motif</a> style. The default is FALSE. + +<p>Set this property's value with <a href="qlistview.html#setRootIsDecorated">setRootIsDecorated</a>() and get this property's value with <a href="qlistview.html#rootIsDecorated">rootIsDecorated</a>(). + + + + QListView::selectionMode + +<p>This property holds the list view's selection mode. +<p>The mode can be <a href="qlistview.html#SelectionMode-enum">Single</a> (the default), <a href="qlistview.html#SelectionMode-enum">Extended</a>, <a href="qlistview.html#SelectionMode-enum">Multi</a> or +<a href="qlistview.html#SelectionMode-enum">NoSelection</a>. +<p> <p>See also <a href="qlistview.html#multiSelection-prop">multiSelection</a>. + +<p>Set this property's value with <a href="qlistview.html#setSelectionMode">setSelectionMode</a>() and get this property's value with <a href="qlistview.html#selectionMode">selectionMode</a>(). + + + + QListView::showSortIndicator + +<p>This property holds whether the list view header should display a sort indicator. +<p>If this property is TRUE, an arrow is drawn in the header of the +list view to indicate the sort order of the list view contents. +The arrow will be drawn in the correct column and will point up or +down, depending on the current sort direction. The default is +FALSE (don't show an indicator). +<p> <p>See also <a href="qheader.html#setSortIndicator">QHeader::setSortIndicator</a>(). + +<p>Set this property's value with <a href="qlistview.html#setShowSortIndicator">setShowSortIndicator</a>() and get this property's value with <a href="qlistview.html#showSortIndicator">showSortIndicator</a>(). + + + + QListView::showToolTips + +<p>This property holds whether this list view should show tooltips for truncated column texts. +<p>The default is TRUE. + +<p>Set this property's value with <a href="qlistview.html#setShowToolTips">setShowToolTips</a>() and get this property's value with <a href="qlistview.html#showToolTips">showToolTips</a>(). + + + + QListView::treeStepSize + +<p>This property holds the number of pixels a child is offset from its parent. +<p>The default is 20 pixels. +<p> Of course, this property is only meaningful for hierarchical list +views. + +<p>Set this property's value with <a href="qlistview.html#setTreeStepSize">setTreeStepSize</a>() and get this property's value with <a href="qlistview.html#treeStepSize">treeStepSize</a>(). + + + + QMainWindow::dockWindowsMovable + +<p>This property holds whether the dock windows are movable. +<p>If TRUE (the default), the user will be able to move movable dock +windows from one QMainWindow dock area to another, including the +<tt>TearOff</tt> area (i.e. where the dock window floats freely as a +window in its own right), and the <a href="qt.html#Dock-enum">Minimized</a> area (where only +the dock window's handle is shown below the menu bar). Moveable +dock windows can also be moved within QMainWindow dock areas, i.e. +to rearrange them within a dock area. +<p> If FALSE the user will not be able to move any dock windows. +<p> By default dock windows are moved transparently (i.e. only an +outline rectangle is shown during the drag), but this setting can +be changed with <a href="qmainwindow.html#setOpaqueMoving">setOpaqueMoving</a>(). +<p> <p>See also <a href="qmainwindow.html#setDockEnabled">setDockEnabled</a>() and <a href="qmainwindow.html#opaqueMoving-prop">opaqueMoving</a>. + +<p>Set this property's value with <a href="qmainwindow.html#setDockWindowsMovable">setDockWindowsMovable</a>() and get this property's value with <a href="qmainwindow.html#dockWindowsMovable">dockWindowsMovable</a>(). + + + + QMainWindow::opaqueMoving + +<p>This property holds whether dock windows are moved opaquely. +<p>If TRUE the dock windows of the main window are shown opaquely +(i.e. it shows the toolbar as it looks when docked) whilst it is +being moved. If FALSE (the default) they are shown transparently, +(i.e. as an outline rectangle). +<p> <b>Warning:</b> Opaque moving of toolbars and dockwindows is known to +have several problems. We recommend avoiding the use of this +feature for the time being. We intend fixing the problems in a +future release. + +<p>Set this property's value with <a href="qmainwindow.html#setOpaqueMoving">setOpaqueMoving</a>() and get this property's value with <a href="qmainwindow.html#opaqueMoving">opaqueMoving</a>(). + + + + QMainWindow::rightJustification + +<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> <p>This property holds whether the main window right-justifies its dock windows. +<p>If disabled (the default), stretchable dock windows are expanded, +and non-stretchable dock windows are given the minimum space they +need. Since most dock windows are not stretchable, this usually +results in an unjustified right edge (or unjustified bottom edge +for a vertical dock area). If enabled, the main window will +right-justify its dock windows. +<p> <p>See also <a href="qdockwindow.html#setVerticalStretchable">QDockWindow::setVerticalStretchable</a>() and <a href="qdockwindow.html#setHorizontalStretchable">QDockWindow::setHorizontalStretchable</a>(). + +<p>Set this property's value with <a href="qmainwindow.html#setRightJustification">setRightJustification</a>() and get this property's value with <a href="qmainwindow.html#rightJustification">rightJustification</a>(). + + + + QMainWindow::usesBigPixmaps + +<p>This property holds whether big pixmaps are enabled. +<p>If FALSE (the default), the tool buttons will use small pixmaps; +otherwise big pixmaps will be used. +<p> Tool buttons and other widgets that wish to respond to this +setting are responsible for reading the correct state on startup, +and for connecting to the main window's widget's +<a href="qmainwindow.html#pixmapSizeChanged">pixmapSizeChanged</a>() signal. + +<p>Set this property's value with <a href="qmainwindow.html#setUsesBigPixmaps">setUsesBigPixmaps</a>() and get this property's value with <a href="qmainwindow.html#usesBigPixmaps">usesBigPixmaps</a>(). + + + + QMainWindow::usesTextLabel + +<p>This property holds whether text labels for toolbar buttons are enabled. +<p>If disabled (the default), the tool buttons will not use text +labels. If enabled, text labels will be used. +<p> Tool buttons and other widgets that wish to respond to this +setting are responsible for reading the correct state on startup, +and for connecting to the main window's widget's +<a href="qmainwindow.html#usesTextLabelChanged">usesTextLabelChanged</a>() signal. +<p> <p>See also <a href="qtoolbutton.html#usesTextLabel-prop">QToolButton::usesTextLabel</a>. + +<p>Set this property's value with <a href="qmainwindow.html#setUsesTextLabel">setUsesTextLabel</a>() and get this property's value with <a href="qmainwindow.html#usesTextLabel">usesTextLabel</a>(). + + + + QMenuBar::defaultUp + +<p>This property holds the popup orientation. +<p>The default popup orientation. By default, menus pop "down" the +screen. By setting the property to TRUE, the menu will pop "up". +You might call this for menus that are <em>below</em> the document to +which they refer. +<p> If the menu would not fit on the screen, the other direction is +used automatically. + +<p>Set this property's value with <a href="qmenubar.html#setDefaultUp">setDefaultUp</a>() and get this property's value with <a href="qmenubar.html#isDefaultUp">isDefaultUp</a>(). + + + + QMenuBar::separator + +<p>This property holds in which cases a menubar sparator is drawn. +<p><b>This property is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> +<p>Set this property's value with <a href="qmenubar.html#setSeparator">setSeparator</a>() and get this property's value with <a href="qmenubar.html#separator">separator</a>(). + + + + QMessageBox::icon + +<p>This property holds the message box's icon. +<p>The icon of the message box can be one of the following predefined +icons: +<ul> +<li> QMessageBox::NoIcon +<li> QMessageBox::Question +<li> QMessageBox::Information +<li> QMessageBox::Warning +<li> QMessageBox::Critical +</ul> +<p> The actual pixmap used for displaying the icon depends on the +current <a href="qwidget.html#style">GUI style</a>. You can also set +a custom pixmap icon using the <a href="qmessagebox.html#iconPixmap-prop">QMessageBox::iconPixmap</a> +property. The default icon is QMessageBox::NoIcon. +<p> <p>See also <a href="qmessagebox.html#iconPixmap-prop">iconPixmap</a>. + +<p>Set this property's value with <a href="qmessagebox.html#setIcon">setIcon</a>() and get this property's value with <a href="qmessagebox.html#icon">icon</a>(). + + + + QMessageBox::iconPixmap + +<p>This property holds the current icon. +<p>The icon currently used by the message box. Note that it's often +hard to draw one pixmap that looks appropriate in both <a href="motif-extension.html#Motif">Motif</a> and +Windows GUI styles; you may want to draw two pixmaps. +<p> <p>See also <a href="qmessagebox.html#icon-prop">icon</a>. + +<p>Set this property's value with <a href="qmessagebox.html#setIconPixmap">setIconPixmap</a>() and get this property's value with <a href="qmessagebox.html#iconPixmap">iconPixmap</a>(). + + + + QMessageBox::text + +<p>This property holds the message box text to be displayed. +<p>The text will be interpreted either as a plain text or as rich +text, depending on the text format setting (<a href="qmessagebox.html#textFormat-prop">QMessageBox::textFormat</a>). The default setting is <a href="qt.html#TextFormat-enum">AutoText</a>, i.e. +the message box will try to auto-detect the format of the text. +<p> The default value of this property is <a href="qstring.html#QString-null">QString::null</a>. +<p> <p>See also <a href="qmessagebox.html#textFormat-prop">textFormat</a>. + +<p>Set this property's value with <a href="qmessagebox.html#setText">setText</a>() and get this property's value with <a href="qmessagebox.html#text">text</a>(). + + + + QMessageBox::textFormat + +<p>This property holds the format of the text displayed by the message box. +<p>The current text format used by the message box. See the <a href="qt.html#TextFormat-enum">Qt::TextFormat</a> enum for an explanation of the possible options. +<p> The default format is <a href="qt.html#TextFormat-enum">AutoText</a>. +<p> <p>See also <a href="qmessagebox.html#text-prop">text</a>. + +<p>Set this property's value with <a href="qmessagebox.html#setTextFormat">setTextFormat</a>() and get this property's value with <a href="qmessagebox.html#textFormat">textFormat</a>(). + + + + QMultiLineEdit::alignment + <p>This property holds the editor's paragraph alignment. +<p>Sets the alignment to flag, which must be <a href="qt.html#AlignmentFlags-enum">AlignLeft</a>, <a href="qt.html#AlignmentFlags-enum">AlignHCenter</a> or <a href="qt.html#AlignmentFlags-enum">AlignRight</a>. +<p> If flag is an illegal flag nothing happens. +<p> <p>See also <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a>. + +<p>Set this property's value with <a href="qmultilineedit.html#setAlignment">setAlignment</a>() and get this property's value with <a href="qmultilineedit.html#alignment">alignment</a>(). + + + + QMultiLineEdit::atBeginning + <p>This property holds whether the cursor is placed at the beginning of the text. +<p>Get this property's value with <a href="qmultilineedit.html#atBeginning">atBeginning</a>(). +<p><p>See also <a href="qmultilineedit.html#atEnd-prop">atEnd</a>. + + + + + QMultiLineEdit::atEnd + <p>This property holds whether the cursor is placed at the end of the text. +<p>Get this property's value with <a href="qmultilineedit.html#atEnd">atEnd</a>(). +<p><p>See also <a href="qmultilineedit.html#atBeginning-prop">atBeginning</a>. + + + + + QMultiLineEdit::edited + <p>This property holds whether the document has been edited by the user. +<p>This is the same as <a href="qtextedit.html">QTextEdit</a>'s "modifed" property. +<p> <p>See also <a href="qtextedit.html#modified-prop">QTextEdit::modified</a>. + +<p>Set this property's value with <a href="qmultilineedit.html#setEdited">setEdited</a>() and get this property's value with <a href="qmultilineedit.html#edited">edited</a>(). + + + + QMultiLineEdit::numLines + <p>This property holds the number of paragraphs in the editor. +<p>The count includes any empty paragraph at top and bottom, so for an +empty editor this method returns 1. + +<p>Get this property's value with <a href="qmultilineedit.html#numLines">numLines</a>(). + + + + QObject::name + +<p>This property holds the name of this object. +<p>You can find an object by name (and type) using <a href="qobject.html#child">child</a>(). You can +find a set of objects with <a href="qobject.html#queryList">queryList</a>(). +<p> The object name is set by the constructor or by the <a href="qobject.html#setName">setName</a>() +function. The object name is not very useful in the current +version of Qt, but will become increasingly important in the +future. +<p> If the object does not have a name, the <a href="qobject.html#name">name</a>() function returns +"unnamed", so printf() (used in <a href="qapplication.html#qDebug">qDebug</a>()) will not be asked to +output a null pointer. If you want a null pointer to be returned +for unnamed objects, you can call name( 0 ). +<p> <pre> + <a href="qapplication.html#qDebug">qDebug</a>( "MyClass::setPrecision(): (%s) invalid precision %f", + <a href="qobject.html#name">name</a>(), newPrecision ); + </pre> + +<p> <p>See also <a href="qobject.html#className">className</a>(), <a href="qobject.html#child">child</a>(), and <a href="qobject.html#queryList">queryList</a>(). + +<p>Set this property's value with <a href="qobject.html#setName">setName</a>() and get this property's value with <a href="qobject.html#name">name</a>(). + + + + QPopupMenu::checkable + +<p>This property holds whether the display of check marks on menu items is enabled. +<p>When TRUE, the display of check marks on menu items is enabled. +Checking is always enabled when in Windows-style. +<p> <p>See also <a href="qmenudata.html#setItemChecked">QMenuData::setItemChecked</a>(). + +<p>Set this property's value with <a href="qpopupmenu.html#setCheckable">setCheckable</a>() and get this property's value with <a href="qpopupmenu.html#isCheckable">isCheckable</a>(). + + + + QProgressBar::centerIndicator + +<p>This property holds whether the indicator string should be centered. +<p>Changing this property sets <a href="qprogressbar.html#indicatorFollowsStyle-prop">QProgressBar::indicatorFollowsStyle</a> +to FALSE. The default is TRUE. + +<p>Set this property's value with <a href="qprogressbar.html#setCenterIndicator">setCenterIndicator</a>() and get this property's value with <a href="qprogressbar.html#centerIndicator">centerIndicator</a>(). + + + + QProgressBar::indicatorFollowsStyle + +<p>This property holds whether the display of the indicator string should follow the GUI style. +<p>The default is TRUE. +<p> <p>See also <a href="qprogressbar.html#centerIndicator-prop">centerIndicator</a>. + +<p>Set this property's value with <a href="qprogressbar.html#setIndicatorFollowsStyle">setIndicatorFollowsStyle</a>() and get this property's value with <a href="qprogressbar.html#indicatorFollowsStyle">indicatorFollowsStyle</a>(). + + + + QProgressBar::percentageVisible + +<p>This property holds whether the current progress value is displayed. +<p>The default is TRUE. +<p> <p>See also <a href="qprogressbar.html#centerIndicator-prop">centerIndicator</a> and <a href="qprogressbar.html#indicatorFollowsStyle-prop">indicatorFollowsStyle</a>. + +<p>Set this property's value with <a href="qprogressbar.html#setPercentageVisible">setPercentageVisible</a>() and get this property's value with <a href="qprogressbar.html#percentageVisible">percentageVisible</a>(). + + + + QProgressBar::progress + +<p>This property holds the current amount of progress. +<p>This property is -1 if progress counting has not started. + +<p>Set this property's value with <a href="qprogressbar.html#setProgress">setProgress</a>() and get this property's value with <a href="qprogressbar.html#progress">progress</a>(). + + + + QProgressBar::progressString + +<p>This property holds the amount of progress as a string. +<p>This property is <a href="qstring.html#QString-null">QString::null</a> if progress counting has not started. + +<p>Get this property's value with <a href="qprogressbar.html#progressString">progressString</a>(). + + + + QProgressBar::totalSteps + +<p>This property holds the total number of steps. +<p>If totalSteps is 0, the progress bar will display a busy +indicator. +<p> <p>See also +<p>Set this property's value with <a href="qprogressbar.html#setTotalSteps">setTotalSteps</a>() and get this property's value with <a href="qprogressbar.html#totalSteps">totalSteps</a>(). + + + + QProgressDialog::autoClose + +<p>This property holds whether the dialog gets hidden by <a href="qprogressdialog.html#reset">reset</a>(). +<p>The default is TRUE. +<p> <p>See also <a href="qprogressdialog.html#autoReset-prop">autoReset</a>. + +<p>Set this property's value with <a href="qprogressdialog.html#setAutoClose">setAutoClose</a>() and get this property's value with <a href="qprogressdialog.html#autoClose">autoClose</a>(). + + + + QProgressDialog::autoReset + +<p>This property holds whether the progress dialog calls <a href="qprogressdialog.html#reset">reset</a>() as soon as <a href="qprogressdialog.html#progress">progress</a>() equals <a href="qprogressdialog.html#totalSteps">totalSteps</a>(). +<p>The default is TRUE. +<p> <p>See also <a href="qprogressdialog.html#autoClose-prop">autoClose</a>. + +<p>Set this property's value with <a href="qprogressdialog.html#setAutoReset">setAutoReset</a>() and get this property's value with <a href="qprogressdialog.html#autoReset">autoReset</a>(). + + + + QProgressDialog::labelText + +<p>This property holds the label's text. +<p>The default text is <a href="qstring.html#QString-null">QString::null</a>. + +<p>Set this property's value with <a href="qprogressdialog.html#setLabelText">setLabelText</a>() and get this property's value with <a href="qprogressdialog.html#labelText">labelText</a>(). + + + + QProgressDialog::minimumDuration + +<p>This property holds the time that must pass before the dialog appears. +<p>If the expected duration of the task is less than the +minimumDuration, the dialog will not appear at all. This prevents +the dialog popping up for tasks that are tquickly over. For tasks +that are expected to exceed the minimumDuration, the dialog will +pop up after the minimumDuration time or as soon as any progress +is set. +<p> If set to 0, the dialog is always shown as soon as any progress is +set. The default is 4000 milliseconds. + +<p>Set this property's value with <a href="qprogressdialog.html#setMinimumDuration">setMinimumDuration</a>() and get this property's value with <a href="qprogressdialog.html#minimumDuration">minimumDuration</a>(). + + + + QProgressDialog::progress + +<p>This property holds the current amount of progress made. +<p>For the progress dialog to work as expected, you should initially set +this property to 0 and finally set it to +<a href="qprogressdialog.html#totalSteps">QProgressDialog::totalSteps</a>(); you can call <a href="qprogressdialog.html#setProgress">setProgress</a>() any number of times +in-between. +<p> <b>Warning:</b> If the progress dialog is modal +(see <a href="qprogressdialog.html#QProgressDialog">QProgressDialog::QProgressDialog</a>()), +this function calls <a href="qapplication.html#processEvents">QApplication::processEvents</a>(), so take care that +this does not cause undesirable re-entrancy in your code. For example, +don't use a QProgressDialog inside a <a href="qwidget.html#paintEvent">paintEvent</a>()! +<p> <p>See also <a href="qprogressdialog.html#totalSteps-prop">totalSteps</a>. + +<p>Set this property's value with <a href="qprogressdialog.html#setProgress">setProgress</a>() and get this property's value with <a href="qprogressdialog.html#progress">progress</a>(). + + + + QProgressDialog::totalSteps + +<p>This property holds the total number of steps. +<p>The default is 0. + +<p>Set this property's value with <a href="qprogressdialog.html#setTotalSteps">setTotalSteps</a>() and get this property's value with <a href="qprogressdialog.html#totalSteps">totalSteps</a>(). + + + + QProgressDialog::wasCanceled + +<p>This property holds whether the dialog was canceled. +<p>Get this property's value with <a href="qprogressdialog.html#wasCanceled">wasCanceled</a>(). +<p><p>See also <a href="qprogressdialog.html#progress-prop">progress</a>. + + + + + QProgressDialog::wasCancelled + +<p>This property holds whether the dialog was canceled. +<p><b>This property is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> Use <a href="qprogressdialog.html#wasCanceled-prop">wasCanceled</a> instead. + +<p>Get this property's value with <a href="qprogressdialog.html#wasCancelled">wasCancelled</a>(). + + + + QPushButton::autoDefault + +<p>This property holds whether the push button is the auto default button. +<p>If this property is set to TRUE then the push button is the auto +default button in a dialog. +<p> In some GUI styles a default button is drawn with an extra frame +around it, up to 3 pixels or more. Qt automatically keeps this +space free around auto-default buttons, i.e. auto-default buttons +may have a slightly larger size hint. +<p> This property's default is TRUE for buttons that have a <a href="qdialog.html">QDialog</a> +parent; otherwise it defaults to FALSE. +<p> See the <a href="qpushbutton.html#default-prop">default</a> property for details of how <a href="qpushbutton.html#default-prop">default</a> and +auto-default interact. + +<p>Set this property's value with <a href="qpushbutton.html#setAutoDefault">setAutoDefault</a>() and get this property's value with <a href="qpushbutton.html#autoDefault">autoDefault</a>(). + + + + QPushButton::default + +<p>This property holds whether the push button is the default button. +<p>If this property is set to TRUE then the push button will be +pressed if the user presses the Enter (or Return) key in a dialog. +<p> Regardless of focus, if the user presses Enter: If there is a +default button the default button is pressed; otherwise, if +there are one or more <a href="qpushbutton.html#autoDefault-prop">autoDefault</a> buttons the first <a href="qpushbutton.html#autoDefault-prop">autoDefault</a> +button that is next in the tab order is pressed. If there are no +default or <a href="qpushbutton.html#autoDefault-prop">autoDefault</a> buttons only pressing Space on a button +with focus, mouse clicking, or using an accelerator will press a +button. +<p> In a dialog, only one push button at a time can be the default +button. This button is then displayed with an additional frame +(depending on the GUI style). +<p> The default button behavior is provided only in dialogs. Buttons +can always be clicked from the keyboard by pressing Enter (or +Return) or the Spacebar when the button has focus. +<p> This property's default is FALSE. + +<p>Set this property's value with <a href="qpushbutton.html#setDefault">setDefault</a>() and get this property's value with <a href="qpushbutton.html#isDefault">isDefault</a>(). + + + + QPushButton::flat + +<p>This property holds whether the border is disabled. +<p>This property's default is FALSE. + +<p>Set this property's value with <a href="qpushbutton.html#setFlat">setFlat</a>() and get this property's value with <a href="qpushbutton.html#isFlat">isFlat</a>(). + + + + QPushButton::iconSet + +<p>This property holds the icon set on the push button. +<p>This property will return 0 if the push button has no iconset. + +<p>Set this property's value with <a href="qpushbutton.html#setIconSet">setIconSet</a>() and get this property's value with <a href="qpushbutton.html#iconSet">iconSet</a>(). + + + + QPushButton::menuButton + <p>This property holds whether the push button has a menu button on it. +<p><b>This property is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> If this property is set to TRUE, then a down arrow is drawn on the push +button to indicate that a menu will pop up if the user clicks on the +arrow. + +<p>Get this property's value with <a href="qpushbutton.html#isMenuButton">isMenuButton</a>(). + + + + QRadioButton::checked + +<p>This property holds whether the radio button is checked. +<p>This property will not effect any other radio buttons unless they +have been placed in the same <a href="qbuttongroup.html">QButtonGroup</a>. The default value is +FALSE (unchecked). + +<p>Set this property's value with <a href="qradiobutton.html#setChecked">setChecked</a>() and get this property's value with <a href="qradiobutton.html#isChecked">isChecked</a>(). + + + + QScrollBar::draggingSlider + +<p>This property holds whether the user has clicked the mouse on the slider and is currently dragging it. +<p> +<p>Get this property's value with <a href="qscrollbar.html#draggingSlider">draggingSlider</a>(). + + + + QScrollBar::lineStep + +<p>This property holds the line step. +<p>When setting lineStep, the virtual <a href="qrangecontrol.html#stepChange">stepChange</a>() function will be +called if the new line step is different from the previous +setting. +<p> <p>See also <a href="qrangecontrol.html#setSteps">setSteps</a>(), <a href="qrangecontrol.html#pageStep">QRangeControl::pageStep</a>(), and <a href="qrangecontrol.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qscrollbar.html#setLineStep">setLineStep</a>() and get this property's value with <a href="qscrollbar.html#lineStep">lineStep</a>(). + + + + QScrollBar::maxValue + +<p>This property holds the scroll bar's maximum value. +<p>When setting this property, the <a href="qscrollbar.html#minValue-prop">QScrollBar::minValue</a> is +adjusted if necessary to ensure that the range remains valid. +<p> <p>See also <a href="qrangecontrol.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qscrollbar.html#setMaxValue">setMaxValue</a>() and get this property's value with <a href="qscrollbar.html#maxValue">maxValue</a>(). + + + + QScrollBar::minValue + +<p>This property holds the scroll bar's minimum value. +<p>When setting this property, the <a href="qscrollbar.html#maxValue-prop">QScrollBar::maxValue</a> is +adjusted if necessary to ensure that the range remains valid. +<p> <p>See also <a href="qrangecontrol.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qscrollbar.html#setMinValue">setMinValue</a>() and get this property's value with <a href="qscrollbar.html#minValue">minValue</a>(). + + + + QScrollBar::orientation + +<p>This property holds the orientation of the scroll bar. +<p>The orientation must be <a href="qt.html#Orientation-enum">Qt::Vertical</a> (the default) or <a href="qt.html#Orientation-enum">Qt::Horizontal</a>. + +<p>Set this property's value with <a href="qscrollbar.html#setOrientation">setOrientation</a>() and get this property's value with <a href="qscrollbar.html#orientation">orientation</a>(). + + + + QScrollBar::pageStep + +<p>This property holds the page step. +<p>When setting pageStep, the virtual <a href="qrangecontrol.html#stepChange">stepChange</a>() function will be +called if the new page step is different from the previous +setting. +<p> <p>See also <a href="qrangecontrol.html#setSteps">QRangeControl::setSteps</a>(), <a href="qscrollbar.html#lineStep-prop">lineStep</a>, and <a href="qrangecontrol.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qscrollbar.html#setPageStep">setPageStep</a>() and get this property's value with <a href="qscrollbar.html#pageStep">pageStep</a>(). + + + + QScrollBar::tracking + +<p>This property holds whether scroll bar tracking is enabled. +<p>If tracking is enabled (the default), the scroll bar emits the +<a href="qscrollbar.html#valueChanged">valueChanged</a>() signal while the slider is being dragged. If +tracking is disabled, the scroll bar emits the valueChanged() +signal only when the user releases the mouse button after moving +the slider. + +<p>Set this property's value with <a href="qscrollbar.html#setTracking">setTracking</a>() and get this property's value with <a href="qscrollbar.html#tracking">tracking</a>(). + + + + QScrollBar::value + +<p>This property holds the scroll bar's value. +<p>Set this property's value with <a href="qscrollbar.html#setValue">setValue</a>() and get this property's value with <a href="qscrollbar.html#value">value</a>(). +<p><p>See also <a href="qrangecontrol.html#value">QRangeControl::value</a>() and <a href="qrangecontrol.html#prevValue">prevValue</a>(). + + + + + QScrollView::contentsHeight + +<p>This property holds the height of the contents area. +<p> +<p>Get this property's value with <a href="qscrollview.html#contentsHeight">contentsHeight</a>(). + + + + QScrollView::contentsWidth + +<p>This property holds the width of the contents area. +<p> +<p>Get this property's value with <a href="qscrollview.html#contentsWidth">contentsWidth</a>(). + + + + QScrollView::contentsX + +<p>This property holds the X coordinate of the contents that are at the left edge of the viewport. +<p> +<p>Get this property's value with <a href="qscrollview.html#contentsX">contentsX</a>(). + + + + QScrollView::contentsY + +<p>This property holds the Y coordinate of the contents that are at the top edge of the viewport. +<p> +<p>Get this property's value with <a href="qscrollview.html#contentsY">contentsY</a>(). + + + + QScrollView::dragAutoScroll + +<p>This property holds whether autoscrolling in drag move events is enabled. +<p>If this property is set to TRUE (the default), the QScrollView +automatically scrolls the contents in drag move events if the user +moves the cursor close to a border of the view. Of course this +works only if the viewport accepts drops. Specifying FALSE +disables this autoscroll feature. +<p> <b>Warning:</b> Enabling this property might not be enough to +effectively turn on autoscrolling. If you put a custom widget in +the QScrollView, you might need to call QDragEvent::ignore() on +the event in the <a href="qwidget.html#dragEnterEvent">dragEnterEvent</a>() and <a href="qwidget.html#dragMoveEvent">dragMoveEvent</a>() +reimplementations. + +<p>Set this property's value with <a href="qscrollview.html#setDragAutoScroll">setDragAutoScroll</a>() and get this property's value with <a href="qscrollview.html#dragAutoScroll">dragAutoScroll</a>(). + + + + QScrollView::hScrollBarMode + +<p>This property holds the mode for the horizontal scroll bar. +<p>The default mode is <a href="qscrollview.html#ScrollBarMode-enum">QScrollView::Auto</a>. +<p> <p>See also <a href="qscrollview.html#vScrollBarMode-prop">vScrollBarMode</a>. + +<p>Set this property's value with <a href="qscrollview.html#setHScrollBarMode">setHScrollBarMode</a>() and get this property's value with <a href="qscrollview.html#hScrollBarMode">hScrollBarMode</a>(). + + + + QScrollView::resizePolicy + +<p>This property holds the resize policy. +<p>The default is <a href="qscrollview.html#ResizePolicy-enum">Default</a>. +<p> <p>See also <a href="qscrollview.html#ResizePolicy-enum">ResizePolicy</a>. + +<p>Set this property's value with <a href="qscrollview.html#setResizePolicy">setResizePolicy</a>() and get this property's value with <a href="qscrollview.html#resizePolicy">resizePolicy</a>(). + + + + QScrollView::vScrollBarMode + +<p>This property holds the mode for the vertical scroll bar. +<p>The default mode is <a href="qscrollview.html#ScrollBarMode-enum">QScrollView::Auto</a>. +<p> <p>See also <a href="qscrollview.html#hScrollBarMode-prop">hScrollBarMode</a>. + +<p>Set this property's value with <a href="qscrollview.html#setVScrollBarMode">setVScrollBarMode</a>() and get this property's value with <a href="qscrollview.html#vScrollBarMode">vScrollBarMode</a>(). + + + + QScrollView::visibleHeight + +<p>This property holds the vertical amount of the content that is visible. +<p> +<p>Get this property's value with <a href="qscrollview.html#visibleHeight">visibleHeight</a>(). + + + + QScrollView::visibleWidth + +<p>This property holds the horizontal amount of the content that is visible. +<p> +<p>Get this property's value with <a href="qscrollview.html#visibleWidth">visibleWidth</a>(). + + + + QSlider::lineStep + +<p>This property holds the current line step. +<p>When setting lineStep, the virtual <a href="qrangecontrol.html#stepChange">stepChange</a>() function will be +called if the new line step is different from the previous +setting. +<p> <p>See also <a href="qrangecontrol.html#setSteps">setSteps</a>(), <a href="qrangecontrol.html#pageStep">QRangeControl::pageStep</a>(), and <a href="qrangecontrol.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qslider.html#setLineStep">setLineStep</a>() and get this property's value with <a href="qslider.html#lineStep">lineStep</a>(). + + + + QSlider::maxValue + +<p>This property holds the current maximum value of the slider. +<p>When setting this property, the <a href="qslider.html#minValue-prop">QSlider::minValue</a> is adjusted, +if necessary, to ensure that the range remains valid. +<p> <p>See also <a href="qrangecontrol.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qslider.html#setMaxValue">setMaxValue</a>() and get this property's value with <a href="qslider.html#maxValue">maxValue</a>(). + + + + QSlider::minValue + +<p>This property holds the current minimum value of the slider. +<p>When setting this property, the <a href="qslider.html#maxValue-prop">QSlider::maxValue</a> is adjusted, +if necessary, to ensure that the range remains valid. +<p> <p>See also <a href="qrangecontrol.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qslider.html#setMinValue">setMinValue</a>() and get this property's value with <a href="qslider.html#minValue">minValue</a>(). + + + + QSlider::orientation + +<p>This property holds the slider's orientation. +<p>The orientation must be <a href="qt.html#Orientation-enum">Qt::Vertical</a> (the default) or <a href="qt.html#Orientation-enum">Qt::Horizontal</a>. + +<p>Set this property's value with <a href="qslider.html#setOrientation">setOrientation</a>() and get this property's value with <a href="qslider.html#orientation">orientation</a>(). + + + + QSlider::pageStep + +<p>This property holds the current page step. +<p>When setting pageStep, the virtual <a href="qrangecontrol.html#stepChange">stepChange</a>() function will be +called if the new page step is different from the previous +setting. +<p> <p>See also <a href="qrangecontrol.html#setSteps">QRangeControl::setSteps</a>(), <a href="qslider.html#lineStep-prop">lineStep</a>, and <a href="qrangecontrol.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qslider.html#setPageStep">setPageStep</a>() and get this property's value with <a href="qslider.html#pageStep">pageStep</a>(). + + + + QSlider::tickInterval + +<p>This property holds the interval between tickmarks. +<p>This is a value interval, not a pixel interval. If it is 0, the +slider will choose between <a href="qslider.html#lineStep">lineStep</a>() and <a href="qslider.html#pageStep">pageStep</a>(). The initial +value of tickInterval is 0. +<p> <p>See also <a href="qrangecontrol.html#lineStep">QRangeControl::lineStep</a>() and <a href="qrangecontrol.html#pageStep">QRangeControl::pageStep</a>(). + +<p>Set this property's value with <a href="qslider.html#setTickInterval">setTickInterval</a>() and get this property's value with <a href="qslider.html#tickInterval">tickInterval</a>(). + + + + QSlider::tickmarks + +<p>This property holds the tickmark settings for this slider. +<p>The valid values are in <a href="qslider.html#TickSetting-enum">QSlider::TickSetting</a>. The default is +<a href="qslider.html#TickSetting-enum">NoMarks</a>. +<p> <p>See also <a href="qslider.html#tickInterval-prop">tickInterval</a>. + +<p>Set this property's value with <a href="qslider.html#setTickmarks">setTickmarks</a>() and get this property's value with <a href="qslider.html#tickmarks">tickmarks</a>(). + + + + QSlider::tracking + +<p>This property holds whether slider tracking is enabled. +<p>If tracking is enabled (the default), the slider emits the +<a href="qslider.html#valueChanged">valueChanged</a>() signal whenever the slider is being dragged. If +tracking is disabled, the slider emits the valueChanged() signal +when the user releases the mouse button (unless the value happens +to be the same as before). + +<p>Set this property's value with <a href="qslider.html#setTracking">setTracking</a>() and get this property's value with <a href="qslider.html#tracking">tracking</a>(). + + + + QSlider::value + +<p>This property holds the current slider value. +<p>Set this property's value with <a href="qslider.html#setValue">setValue</a>() and get this property's value with <a href="qslider.html#value">value</a>(). +<p><p>See also <a href="qrangecontrol.html#value">QRangeControl::value</a>() and <a href="qrangecontrol.html#prevValue">prevValue</a>(). + + + + + QSpinBox::buttonSymbols + +<p>This property holds the current button symbol mode. +<p>The possible values can be either <a href="qspinbox.html#ButtonSymbols-enum">UpDownArrows</a> or <a href="qspinbox.html#ButtonSymbols-enum">PlusMinus</a>. +The default is <a href="qspinbox.html#ButtonSymbols-enum">UpDownArrows</a>. +<p> <p>See also <a href="qspinbox.html#ButtonSymbols-enum">ButtonSymbols</a>. + +<p>Set this property's value with <a href="qspinbox.html#setButtonSymbols">setButtonSymbols</a>() and get this property's value with <a href="qspinbox.html#buttonSymbols">buttonSymbols</a>(). + + + + QSpinBox::cleanText + +<p>This property holds the spin box's text with no <a href="qspinbox.html#prefix">prefix</a>(), <a href="qspinbox.html#suffix">suffix</a>() or leading or trailing whitespace. +<p>Get this property's value with <a href="qspinbox.html#cleanText">cleanText</a>(). +<p><p>See also <a href="qspinbox.html#text-prop">text</a>, <a href="qspinbox.html#prefix-prop">prefix</a>, and <a href="qspinbox.html#suffix-prop">suffix</a>. + + + + + QSpinBox::lineStep + +<p>This property holds the line step. +<p>When the user uses the arrows to change the spin box's value the +value will be incremented/decremented by the amount of the line +step. +<p> The <a href="qspinbox.html#setLineStep">setLineStep</a>() function calls the virtual <a href="qrangecontrol.html#stepChange">stepChange</a>() function +if the new line step is different from the previous setting. +<p> <p>See also <a href="qrangecontrol.html#setSteps">QRangeControl::setSteps</a>() and <a href="qrangecontrol.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qspinbox.html#setLineStep">setLineStep</a>() and get this property's value with <a href="qspinbox.html#lineStep">lineStep</a>(). + + + + QSpinBox::maxValue + +<p>This property holds the maximum value of the spin box. +<p>When setting this property, <a href="qspinbox.html#minValue-prop">QSpinBox::minValue</a> is adjusted, if +necessary, to ensure that the range remains valid. +<p> <p>See also <a href="qrangecontrol.html#setRange">setRange</a>() and <a href="qspinbox.html#specialValueText-prop">specialValueText</a>. + +<p>Set this property's value with <a href="qspinbox.html#setMaxValue">setMaxValue</a>() and get this property's value with <a href="qspinbox.html#maxValue">maxValue</a>(). + + + + QSpinBox::minValue + +<p>This property holds the minimum value of the spin box. +<p>When setting this property, <a href="qspinbox.html#maxValue-prop">QSpinBox::maxValue</a> is adjusted, if +necessary, to ensure that the range remains valid. +<p> <p>See also <a href="qrangecontrol.html#setRange">setRange</a>() and <a href="qspinbox.html#specialValueText-prop">specialValueText</a>. + +<p>Set this property's value with <a href="qspinbox.html#setMinValue">setMinValue</a>() and get this property's value with <a href="qspinbox.html#minValue">minValue</a>(). + + + + QSpinBox::prefix + +<p>This property holds the spin box's prefix. +<p>The prefix is prepended to the start of the displayed value. +Typical use is to display a unit of measurement or a currency +symbol. For example: +<p> <pre> + sb-&gt;setPrefix( "$" ); + </pre> + +<p> To turn off the prefix display, set this property to an empty +string. The default is no prefix. The prefix is not displayed for +the <a href="qspinbox.html#minValue">minValue</a>() if <a href="qspinbox.html#specialValueText">specialValueText</a>() is not empty. +<p> If no prefix is set, <a href="qspinbox.html#prefix">prefix</a>() returns <a href="qstring.html#QString-null">QString::null</a>. +<p> <p>See also <a href="qspinbox.html#suffix-prop">suffix</a>. + +<p>Set this property's value with <a href="qspinbox.html#setPrefix">setPrefix</a>() and get this property's value with <a href="qspinbox.html#prefix">prefix</a>(). + + + + QSpinBox::specialValueText + +<p>This property holds the special-value text. +<p>If set, the spin box will display this text instead of a numeric +value whenever the current value is equal to minVal(). Typical use +is to indicate that this choice has a special (default) meaning. +<p> For example, if your spin box allows the user to choose the margin +width in a print dialog and your application is able to +automatically choose a good margin width, you can set up the spin +box like this: +<pre> + QSpinBox marginBox( -1, 20, 1, parent, "marginBox" ); + marginBox-&gt;<a href="qspinbox.html#setSuffix">setSuffix</a>( " mm" ); + marginBox-&gt;<a href="qspinbox.html#setSpecialValueText">setSpecialValueText</a>( "Auto" ); + </pre> + +The user will then be able to choose a margin width from 0-20 +millimeters or select "Auto" to leave it to the application to +choose. Your code must then interpret the spin box value of -1 as +the user requesting automatic margin width. +<p> All values are displayed with the <a href="qspinbox.html#prefix">prefix</a>() and <a href="qspinbox.html#suffix">suffix</a>() (if set), +<em>except</em> for the special value, which only shows the special +value text. +<p> To turn off the special-value text display, call this function +with an empty string. The default is no special-value text, i.e. +the numeric value is shown as usual. +<p> If no special-value text is set, <a href="qspinbox.html#specialValueText">specialValueText</a>() returns +<a href="qstring.html#QString-null">QString::null</a>. + +<p>Set this property's value with <a href="qspinbox.html#setSpecialValueText">setSpecialValueText</a>() and get this property's value with <a href="qspinbox.html#specialValueText">specialValueText</a>(). + + + + QSpinBox::suffix + +<p>This property holds the suffix of the spin box. +<p>The suffix is appended to the end of the displayed value. Typical +use is to display a unit of measurement or a currency symbol. For +example: +<p> <pre> + sb-&gt;setSuffix( " km" ); + </pre> + +<p> To turn off the suffix display, set this property to an empty +string. The default is no suffix. The suffix is not displayed for +the <a href="qspinbox.html#minValue">minValue</a>() if <a href="qspinbox.html#specialValueText">specialValueText</a>() is not empty. +<p> If no suffix is set, <a href="qspinbox.html#suffix">suffix</a>() returns a <a href="qstring.html#QString-null">QString::null</a>. +<p> <p>See also <a href="qspinbox.html#prefix-prop">prefix</a>. + +<p>Set this property's value with <a href="qspinbox.html#setSuffix">setSuffix</a>() and get this property's value with <a href="qspinbox.html#suffix">suffix</a>(). + + + + QSpinBox::text + +<p>This property holds the spin box's text, including any <a href="qspinbox.html#prefix">prefix</a>() and <a href="qspinbox.html#suffix">suffix</a>(). +<p>There is no default text. +<p> <p>See also <a href="qspinbox.html#value-prop">value</a>. + +<p>Get this property's value with <a href="qspinbox.html#text">text</a>(). + + + + QSpinBox::value + +<p>This property holds the value of the spin box. +<p>Set this property's value with <a href="qspinbox.html#setValue">setValue</a>() and get this property's value with <a href="qspinbox.html#value">value</a>(). +<p><p>See also <a href="qrangecontrol.html#setValue">QRangeControl::setValue</a>(). + + + + + QSpinBox::wrapping + +<p>This property holds whether it is possible to step the value from the highest value to the lowest value and vice versa. +<p>By default, wrapping is turned off. +<p> If you have a range of 0..100 and wrapping is off when the user +reaches 100 and presses the Up Arrow nothing will happen; but if +wrapping is on the value will change from 100 to 0, then to 1, +etc. When wrapping is on, navigating past the highest value takes +you to the lowest and vice versa. +<p> <p>See also <a href="qspinbox.html#minValue-prop">minValue</a>, <a href="qspinbox.html#maxValue-prop">maxValue</a>, and <a href="qrangecontrol.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qspinbox.html#setWrapping">setWrapping</a>() and get this property's value with <a href="qspinbox.html#wrapping">wrapping</a>(). + + + + QSplitter::childrenCollapsible + +<p>This property holds whether child widgets can be resized down to size 0 by the user. +<p>By default, children are collapsible. It is possible to enable +and disable the collapsing of individual children; see +<a href="qsplitter.html#setCollapsible">setCollapsible</a>(). + +<p>Set this property's value with <a href="qsplitter.html#setChildrenCollapsible">setChildrenCollapsible</a>() and get this property's value with <a href="qsplitter.html#childrenCollapsible">childrenCollapsible</a>(). + + + + QSplitter::handleWidth + +<p>This property holds the width of the splitter handle. +<p> +<p>Set this property's value with <a href="qsplitter.html#setHandleWidth">setHandleWidth</a>() and get this property's value with <a href="qsplitter.html#handleWidth">handleWidth</a>(). + + + + QSplitter::opaqueResize + +<p>This property holds whether resizing is opaque. +<p>Opaque resizing is off by default. + +<p>Set this property's value with <a href="qsplitter.html#setOpaqueResize">setOpaqueResize</a>() and get this property's value with <a href="qsplitter.html#opaqueResize">opaqueResize</a>(). + + + + QSplitter::orientation + +<p>This property holds the orientation of the splitter. +<p>By default the orientation is horizontal (the widgets are side by +side). The possible orientations are <a href="qt.html#Orientation-enum">Horizontal</a> and +<a href="qt.html#Orientation-enum">Vertical</a>. + +<p>Set this property's value with <a href="qsplitter.html#setOrientation">setOrientation</a>() and get this property's value with <a href="qsplitter.html#orientation">orientation</a>(). + + + + QSqlDatabase::connectOptions + +<p>This property holds the database connect options. +<p>The format of the options string is a semi-colon separated list of +option names or option = value pairs. The options depend on the +database client used: +<p> <center><table cellpadding="4" cellspacing="2" border="0"> +<tr bgcolor="#a2c511"> <th valign="top">ODBC <th valign="top">MySQL <th valign="top">PostgreSQL +<tr bgcolor="#f0f0f0"> +<p> <td valign="top"> +<ul> +<li> SQL_ATTR_ACCESS_MODE +<li> SQL_ATTR_LOGIN_TIMEOUT +<li> SQL_ATTR_CONNECTION_TIMEOUT +<li> SQL_ATTR_CURRENT_CATALOG +<li> SQL_ATTR_METADATA_ID +<li> SQL_ATTR_PACKET_SIZE +<li> SQL_ATTR_TRACEFILE +<li> SQL_ATTR_TRACE +</ul> +<p> <td valign="top"> +<ul> +<li> CLIENT_COMPRESS +<li> CLIENT_FOUND_ROWS +<li> CLIENT_IGNORE_SPACE +<li> CLIENT_SSL +<li> CLIENT_ODBC +<li> CLIENT_NO_SCHEMA +<li> CLIENT_INTERACTIVE +</ul> +<p> <td valign="top"> +<ul> +<li> connect_timeout +<li> options +<li> tty +<li> retquiressl +<li> service +</ul> +<tr bgcolor="#a2c511"> <th valign="top">DB2 <th valign="top">OCI <th valign="top">TDS +<tr bgcolor="#d0d0d0"> +<p> <td valign="top"> +<ul> +<li> SQL_ATTR_ACCESS_MODE +<li> SQL_ATTR_LOGIN_TIMEOUT +</ul> +<p> <td valign="top"> +<em>none</em> +<p> <td valign="top"> +<em>none</em> +<p> </table></center> +<p> Example of usage: +<pre> + ... + // MySQL connection + db-&gt;setConnectOptions( "CLIENT_SSL;CLIENT_IGNORE_SPACE" ); // use an SSL connection to the server + if ( !db-&gt;open() ) { + db-&gt;setConnectOptions(); // clears the connect option string + ... + } + ... + // PostgreSQL connection + db-&gt;setConnectOptions( "retquiressl=1" ); // enable PostgreSQL SSL connections + if ( !db-&gt;open() ) { + db-&gt;setConnectOptions(); // clear options + ... + } + ... + // ODBC connection + db-&gt;setConnectOptions( "SQL_ATTR_ACCESS_MODE=SQL_MODE_READ_ONLY;SQL_ATTR_TRACE=SQL_OPT_TRACE_ON" ); // set ODBC options + if ( !db-&gt;open() ) { + db-&gt;setConnectOptions(); // don't try to set this option + ... + } + </pre> + +<p> Please refer to the client library documentation for more +information about the different options. The options will be set +prior to opening the database connection. Setting new options +without re-opening the connection does nothing. +<p> <p>See also +<p>Set this property's value with <a href="qsqldatabase.html#setConnectOptions">setConnectOptions</a>() and get this property's value with <a href="qsqldatabase.html#connectOptions">connectOptions</a>(). + + + + QSqlDatabase::databaseName + +<p>This property holds the name of the database. +<p>Note that the database name is the TNS Service Name for the <a href="sql-driver.html#QOCI8">QOCI8</a> +(Oracle) driver. +<p> For the <a href="sql-driver.html#QODBC3">QODBC3</a> driver it can either be a DSN, a DSN filename (the +file must have a <tt>.dsn</tt> extension), or a connection string. MS +Access users can for example use the following connection string +to open a <tt>.mdb</tt> file directly, instead of having to create a DSN +entry in the ODBC manager: +<p> <pre> + ... + db = QSqlDatabase::<a href="qsqldatabase.html#addDatabase">addDatabase</a>( "QODBC3" ); + db-&gt;setDatabaseName( "DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DBQ=myaccessfile.mdb" ); + if ( db-&gt;open() ) { + // success! + } + ... + </pre> + +("FIL" is the retquired spelling in Microsoft's API.) +<p> There is no default value. + +<p>Set this property's value with <a href="qsqldatabase.html#setDatabaseName">setDatabaseName</a>() and get this property's value with <a href="qsqldatabase.html#databaseName">databaseName</a>(). + + + + QSqlDatabase::hostName + +<p>This property holds the host name where the database resides. +<p>There is no default value. + +<p>Set this property's value with <a href="qsqldatabase.html#setHostName">setHostName</a>() and get this property's value with <a href="qsqldatabase.html#hostName">hostName</a>(). + + + + QSqlDatabase::password + +<p>This property holds the password used to connect to the database. +<p>There is no default value. +<p> <b>Warning:</b> This function stores the password in plain text within +Qt. Use the <a href="qsqldatabase.html#open">open</a>() call that takes a password as parameter to +avoid this behaviour. +<p> <p>See also <a href="qsqldatabase.html#open">open</a>(). + +<p>Set this property's value with <a href="qsqldatabase.html#setPassword">setPassword</a>() and get this property's value with <a href="qsqldatabase.html#password">password</a>(). + + + + QSqlDatabase::port + +<p>This property holds the port used to connect to the database. +<p>There is no default value. + +<p>Set this property's value with <a href="qsqldatabase.html#setPort">setPort</a>() and get this property's value with <a href="qsqldatabase.html#port">port</a>(). + + + + QSqlDatabase::userName + +<p>This property holds the user name connected to the database. +<p>There is no default value. + +<p>Set this property's value with <a href="qsqldatabase.html#setUserName">setUserName</a>() and get this property's value with <a href="qsqldatabase.html#userName">userName</a>(). + + + + QStatusBar::sizeGripEnabled + +<p>This property holds whether the <a href="qsizegrip.html">QSizeGrip</a> in the bottom right of the status bar is enabled. +<p>Enables or disables the QSizeGrip in the bottom right of the +status bar. By default, the size grip is enabled. + +<p>Set this property's value with <a href="qstatusbar.html#setSizeGripEnabled">setSizeGripEnabled</a>() and get this property's value with <a href="qstatusbar.html#isSizeGripEnabled">isSizeGripEnabled</a>(). + + + + QTabBar::count + +<p>This property holds the number of tabs in the tab bar. +<p>Get this property's value with <a href="qtabbar.html#count">count</a>(). +<p><p>See also <a href="qtabbar.html#tab">tab</a>(). + + + + + QTabBar::currentTab + +<p>This property holds the id of the tab bar's visible tab. +<p>If no tab page is currently visible, the property's value is -1. +Even if the property's value is not -1, you cannot assume that the +user can see the relevant page, or that the tab is enabled. When +you need to display something the value of this property +represents the best page to display. +<p> When this property is set to <em>id</em>, it will raise the tab with the +id <em>id</em> and emit the <a href="qtabbar.html#selected">selected</a>() signal. +<p> <p>See also <a href="qtabbar.html#selected">selected</a>() and <a href="qtabbar.html#isTabEnabled">isTabEnabled</a>(). + +<p>Set this property's value with <a href="qtabbar.html#setCurrentTab">setCurrentTab</a>() and get this property's value with <a href="qtabbar.html#currentTab">currentTab</a>(). + + + + QTabBar::keyboardFocusTab + +<p>This property holds the id of the tab that has the <a href="focus.html#keyboard-focus">keyboard focus</a>. +<p>This property contains the id of the tab that has the keyboard +focus or -1 if the tab bar does not have the keyboard focus. + +<p>Get this property's value with <a href="qtabbar.html#keyboardFocusTab">keyboardFocusTab</a>(). + + + + QTabBar::shape + +<p>This property holds the shape of the tabs in the tab bar. +<p>The value of this property is one of the following: <a href="qtabbar.html#Shape-enum">RoundedAbove</a> (default), <a href="qtabbar.html#Shape-enum">RoundedBelow</a>, <a href="qtabbar.html#Shape-enum">TriangularAbove</a> or <a href="qtabbar.html#Shape-enum">TriangularBelow</a>. +<p> <p>See also <a href="qtabbar.html#Shape-enum">Shape</a>. + +<p>Set this property's value with <a href="qtabbar.html#setShape">setShape</a>() and get this property's value with <a href="qtabbar.html#shape">shape</a>(). + + + + QTabWidget::count + +<p>This property holds the number of tabs in the tab bar. +<p> +<p>Get this property's value with <a href="qtabwidget.html#count">count</a>(). + + + + QTabWidget::currentPage + +<p>This property holds the index position of the current tab page. +<p>Set this property's value with <a href="qtabwidget.html#setCurrentPage">setCurrentPage</a>() and get this property's value with <a href="qtabwidget.html#currentPageIndex">currentPageIndex</a>(). +<p><p>See also <a href="qtabbar.html#currentTab-prop">QTabBar::currentTab</a>. + + + + + QTabWidget::margin + +<p>This property holds the margin in this tab widget. +<p>The margin is the distance between the innermost pixel of the +frame and the outermost pixel of the pages. + +<p>Set this property's value with <a href="qtabwidget.html#setMargin">setMargin</a>() and get this property's value with <a href="qtabwidget.html#margin">margin</a>(). + + + + QTabWidget::tabPosition + +<p>This property holds the position of the tabs in this tab widget. +<p>Possible values for this property are <a href="qtabwidget.html#TabPosition-enum">QTabWidget::Top</a> and <a href="qtabwidget.html#TabPosition-enum">QTabWidget::Bottom</a>. +<p> <p>See also <a href="qtabwidget.html#TabPosition-enum">TabPosition</a>. + +<p>Set this property's value with <a href="qtabwidget.html#setTabPosition">setTabPosition</a>() and get this property's value with <a href="qtabwidget.html#tabPosition">tabPosition</a>(). + + + + QTabWidget::tabShape + +<p>This property holds the shape of the tabs in this tab widget. +<p>Possible values for this property are <a href="qtabwidget.html#TabShape-enum">QTabWidget::Rounded</a> +(default) or <a href="qtabwidget.html#TabShape-enum">QTabWidget::Triangular</a>. +<p> <p>See also <a href="qtabwidget.html#TabShape-enum">TabShape</a>. + +<p>Set this property's value with <a href="qtabwidget.html#setTabShape">setTabShape</a>() and get this property's value with <a href="qtabwidget.html#tabShape">tabShape</a>(). + + + + QTable::columnMovingEnabled + +<p>This property holds whether columns can be moved by the user. +<p>The default is FALSE. Columns are moved by dragging whilst holding +down the Ctrl key. +<p> <b>Warning:</b> If QTable is used to move header sections as a result of user +interaction, the mapping between header indexes and section exposed by +<a href="qheader.html">QHeader</a> will not reflect the order of the headers in the table; i.e., +QTable does not call <a href="qheader.html#moveSection">QHeader::moveSection</a>() to move sections but handles +move operations internally. +<p> <p>See also <a href="qtable.html#rowMovingEnabled-prop">rowMovingEnabled</a>. + +<p>Set this property's value with <a href="qtable.html#setColumnMovingEnabled">setColumnMovingEnabled</a>() and get this property's value with <a href="qtable.html#columnMovingEnabled">columnMovingEnabled</a>(). + + + + QTable::focusStyle + +<p>This property holds how the current (focus) cell is drawn. +<p>The default style is <a href="qtable.html#FocusStyle-enum">SpreadSheet</a>. +<p> <p>See also <a href="qtable.html#FocusStyle-enum">QTable::FocusStyle</a>. + +<p>Set this property's value with <a href="qtable.html#setFocusStyle">setFocusStyle</a>() and get this property's value with <a href="qtable.html#focusStyle">focusStyle</a>(). + + + + QTable::numCols + +<p>This property holds the number of columns in the table. +<p>Set this property's value with <a href="qtable.html#setNumCols">setNumCols</a>() and get this property's value with <a href="qtable.html#numCols">numCols</a>(). +<p><p>See also <a href="qtable.html#numRows-prop">numRows</a>. + + + + + QTable::numRows + +<p>This property holds the number of rows in the table. +<p>Set this property's value with <a href="qtable.html#setNumRows">setNumRows</a>() and get this property's value with <a href="qtable.html#numRows">numRows</a>(). +<p><p>See also <a href="qtable.html#numCols-prop">numCols</a>. + + + + + QTable::numSelections + +<p>This property holds the number of selections. +<p>Get this property's value with <a href="qtable.html#numSelections">numSelections</a>(). +<p><p>See also <a href="qtable.html#currentSelection">currentSelection</a>(). + + + + + QTable::readOnly + +<p>This property holds whether the table is read-only. +<p>Whether a cell in the table is editable or read-only depends on +the cell's <a href="qtableitem.html#EditType-enum">EditType</a>, and this setting: +see <a href="qtableitem.html#wheneditable">QTableItem::EditType</a>. +<p> <p>See also <a href="qwidget.html#enabled-prop">QWidget::enabled</a>, <a href="qtable.html#setColumnReadOnly">setColumnReadOnly</a>(), and <a href="qtable.html#setRowReadOnly">setRowReadOnly</a>(). + +<p>Set this property's value with <a href="qtable.html#setReadOnly">setReadOnly</a>() and get this property's value with <a href="qtable.html#isReadOnly">isReadOnly</a>(). + + + + QTable::rowMovingEnabled + +<p>This property holds whether rows can be moved by the user. +<p>The default is FALSE. Rows are moved by dragging whilst holding +down the Ctrl key. +<p> <b>Warning:</b> If QTable is used to move header sections as a result of user +interaction, the mapping between header indexes and section exposed by +<a href="qheader.html">QHeader</a> will not reflect the order of the headers in the table; i.e., +QTable does not call <a href="qheader.html#moveSection">QHeader::moveSection</a>() to move sections but handles +move operations internally. +<p> <p>See also <a href="qtable.html#columnMovingEnabled-prop">columnMovingEnabled</a>. + +<p>Set this property's value with <a href="qtable.html#setRowMovingEnabled">setRowMovingEnabled</a>() and get this property's value with <a href="qtable.html#rowMovingEnabled">rowMovingEnabled</a>(). + + + + QTable::selectionMode + +<p>This property holds the current selection mode. +<p>The default mode is <a href="qtable.html#SelectionMode-enum">Multi</a> which allows the user to select +multiple ranges of cells. +<p> <p>See also <a href="qtable.html#SelectionMode-enum">SelectionMode</a> and <a href="qtable.html#selectionMode-prop">selectionMode</a>. + +<p>Set this property's value with <a href="qtable.html#setSelectionMode">setSelectionMode</a>() and get this property's value with <a href="qtable.html#selectionMode">selectionMode</a>(). + + + + QTable::showGrid + +<p>This property holds whether the table's grid is displayed. +<p>The grid is shown by default. + +<p>Set this property's value with <a href="qtable.html#setShowGrid">setShowGrid</a>() and get this property's value with <a href="qtable.html#showGrid">showGrid</a>(). + + + + QTable::sorting + +<p>This property holds whether a click on the header of a column sorts that column. +<p>Set this property's value with <a href="qtable.html#setSorting">setSorting</a>() and get this property's value with <a href="qtable.html#sorting">sorting</a>(). +<p><p>See also <a href="qtable.html#sortColumn">sortColumn</a>(). + + + + + QTextBrowser::source + +<p>This property holds the name of the displayed document. +<p>This is a <a href="qstring.html#QString-null">QString::null</a> if no document is displayed or if the +source is unknown. +<p> Setting this property uses the <a href="qtextedit.html#mimeSourceFactory">mimeSourceFactory</a>() to lookup the +named document. It also checks for optional anchors and scrolls +the document accordingly. +<p> If the first tag in the document is <tt>&lt;qt type=detail&gt;</tt>, the +document is displayed as a popup rather than as new document in +the browser window itself. Otherwise, the document is displayed +normally in the text browser with the text set to the contents of +the named document with <a href="qtextedit.html#setText">setText</a>(). +<p> If you are using the filesystem access capabilities of the mime +source factory, you must ensure that the factory knows about the +encoding of specified files; otherwise no data will be available. +The default factory handles a couple of common file extensions +such as <tt>*.html</tt> and <tt>*.txt</tt> with reasonable defaults. See +<a href="qmimesourcefactory.html#data">QMimeSourceFactory::data</a>() for details. + +<p>Set this property's value with <a href="qtextbrowser.html#setSource">setSource</a>() and get this property's value with <a href="qtextbrowser.html#source">source</a>(). + + + + QTextEdit::autoFormatting + +<p>This property holds the enabled set of auto formatting features. +<p>The value can be any combination of the values in the <a href="qtextedit.html#AutoFormatting-enum">AutoFormatting</a> enum. The default is <a href="qtextedit.html#AutoFormatting-enum">AutoAll</a>. Choose <a href="qtextedit.html#AutoFormatting-enum">AutoNone</a> +to disable all automatic formatting. +<p> Currently, the only automatic formatting feature provided is <a href="qtextedit.html#AutoFormatting-enum">AutoBulletList</a>; future versions of Qt may offer more. + +<p>Set this property's value with <a href="qtextedit.html#setAutoFormatting">setAutoFormatting</a>() and get this property's value with <a href="qtextedit.html#autoFormatting">autoFormatting</a>(). + + + + QTextEdit::documentTitle + +<p>This property holds the title of the document parsed from the text. +<p>For <a href="qt.html#TextFormat-enum">PlainText</a> the title will be an empty string. For <a href="qt.html#TextFormat-enum">RichText</a> the title will be the text between the <tt>&lt;title&gt;</tt> tags, +if present, otherwise an empty string. + +<p>Get this property's value with <a href="qtextedit.html#documentTitle">documentTitle</a>(). + + + + QTextEdit::hasSelectedText + +<p>This property holds whether some text is selected in selection 0. +<p> +<p>Get this property's value with <a href="qtextedit.html#hasSelectedText">hasSelectedText</a>(). + + + + QTextEdit::length + +<p>This property holds the number of characters in the text. +<p> +<p>Get this property's value with <a href="qtextedit.html#length">length</a>(). + + + + QTextEdit::linkUnderline + +<p>This property holds whether hypertext links will be underlined. +<p>If TRUE (the default) hypertext links will be displayed +underlined. If FALSE links will not be displayed underlined. + +<p>Set this property's value with <a href="qtextedit.html#setLinkUnderline">setLinkUnderline</a>() and get this property's value with <a href="qtextedit.html#linkUnderline">linkUnderline</a>(). + + + + QTextEdit::modified + +<p>This property holds whether the document has been modified by the user. +<p> +<p>Set this property's value with <a href="qtextedit.html#setModified">setModified</a>() and get this property's value with <a href="qtextedit.html#isModified">isModified</a>(). + + + + QTextEdit::overwriteMode + +<p>This property holds the text edit's overwrite mode. +<p>If FALSE (the default) characters entered by the user are inserted +with any characters to the right being moved out of the way. If +TRUE, the editor is in overwrite mode, i.e. characters entered by +the user overwrite any characters to the right of the cursor +position. + +<p>Set this property's value with <a href="qtextedit.html#setOverwriteMode">setOverwriteMode</a>() and get this property's value with <a href="qtextedit.html#isOverwriteMode">isOverwriteMode</a>(). + + + + QTextEdit::paper + +<p>This property holds the background (paper) brush. +<p>The brush that is currently used to draw the background of the +text edit. The initial setting is an empty brush. + +<p>Set this property's value with <a href="qtextedit.html#setPaper">setPaper</a>() and get this property's value with <a href="qtextedit.html#paper">paper</a>(). + + + + QTextEdit::readOnly + +<p>This property holds whether the text edit is read-only. +<p>In a read-only text edit the user can only navigate through the +text and select text; modifying the text is not possible. +<p> This property's default is FALSE. + +<p>Set this property's value with <a href="qtextedit.html#setReadOnly">setReadOnly</a>() and get this property's value with <a href="qtextedit.html#isReadOnly">isReadOnly</a>(). + + + + QTextEdit::selectedText + +<p>This property holds the selected text (from selection 0) or an empty string if there is no currently selected text (in selection 0). +<p>The text is always returned as <a href="qt.html#TextFormat-enum">PlainText</a> if the <a href="qtextedit.html#textFormat">textFormat</a>() is +<a href="qt.html#TextFormat-enum">PlainText</a> or <a href="qt.html#TextFormat-enum">AutoText</a>, otherwise it is returned as HTML. +<p> <p>See also <a href="qtextedit.html#hasSelectedText-prop">hasSelectedText</a>. + +<p>Get this property's value with <a href="qtextedit.html#selectedText">selectedText</a>(). + + + + QTextEdit::tabChangesFocus + <p>This property holds whether TAB changes focus or is accepted as input. +<p>In some occasions text edits should not allow the user to input +tabulators or change indentation using the TAB key, as this breaks +the focus chain. The default is FALSE. +<p> +<p>Set this property's value with <a href="qtextedit.html#setTabChangesFocus">setTabChangesFocus</a>() and get this property's value with <a href="qtextedit.html#tabChangesFocus">tabChangesFocus</a>(). + + + + QTextEdit::tabStopWidth + +<p>This property holds the tab stop width in pixels. +<p> +<p>Set this property's value with <a href="qtextedit.html#setTabStopWidth">setTabStopWidth</a>() and get this property's value with <a href="qtextedit.html#tabStopWidth">tabStopWidth</a>(). + + + + QTextEdit::text + +<p>This property holds the text edit's text. +<p>There is no default text. +<p> On setting, any previous text is deleted. +<p> The text may be interpreted either as plain text or as rich text, +depending on the <a href="qtextedit.html#textFormat">textFormat</a>(). The default setting is <a href="qt.html#TextFormat-enum">AutoText</a>, +i.e. the text edit auto-detects the format of the text. +<p> For richtext, calling <a href="qtextedit.html#text">text</a>() on an editable QTextEdit will cause +the text to be regenerated from the textedit. This may mean that +the <a href="qstring.html">QString</a> returned may not be exactly the same as the one that +was set. +<p> <p>See also <a href="qtextedit.html#textFormat-prop">textFormat</a>. + +<p>Set this property's value with <a href="qtextedit.html#setText">setText</a>() and get this property's value with <a href="qtextedit.html#text">text</a>(). + + + + QTextEdit::textFormat + +<p>This property holds the text format: rich text, plain text, log text or auto text. +<p>The text format is one of the following: +<ul> +<li> PlainText - all characters, except newlines, are displayed +verbatim, including spaces. Whenever a newline appears in the text +the text edit inserts a hard line break and begins a new +paragraph. +<li> RichText - rich text rendering. The available styles are +defined in the default stylesheet <a href="qstylesheet.html#defaultSheet">QStyleSheet::defaultSheet</a>(). +<li> LogText - optimized mode for very large texts. Supports a very +limited set of formatting tags (color, bold, underline and italic +settings). +<li> AutoText - this is the default. The text edit autodetects which +rendering style is best, <a href="qt.html#TextFormat-enum">PlainText</a> or <a href="qt.html#TextFormat-enum">RichText</a>. This is done +by using the <a href="qstylesheet.html#mightBeRichText">QStyleSheet::mightBeRichText</a>() function. +</ul> + +<p>Set this property's value with <a href="qtextedit.html#setTextFormat">setTextFormat</a>() and get this property's value with <a href="qtextedit.html#textFormat">textFormat</a>(). + + + + QTextEdit::undoDepth + +<p>This property holds the depth of the undo history. +<p>The maximum number of steps in the undo/redo history. The default +is 100. +<p> <p>See also <a href="qtextedit.html#undo">undo</a>() and <a href="qtextedit.html#redo">redo</a>(). + +<p>Set this property's value with <a href="qtextedit.html#setUndoDepth">setUndoDepth</a>() and get this property's value with <a href="qtextedit.html#undoDepth">undoDepth</a>(). + + + + QTextEdit::undoRedoEnabled + +<p>This property holds whether undo/redo is enabled. +<p>When changing this property, the undo/redo history is cleared. +<p> The default is TRUE. + +<p>Set this property's value with <a href="qtextedit.html#setUndoRedoEnabled">setUndoRedoEnabled</a>() and get this property's value with <a href="qtextedit.html#isUndoRedoEnabled">isUndoRedoEnabled</a>(). + + + + QTextEdit::wordWrap + +<p>This property holds the word wrap mode. +<p>The default mode is <a href="qtextedit.html#WordWrap-enum">WidgetWidth</a> which causes words to be +wrapped at the right edge of the text edit. Wrapping occurs at +whitespace, keeping whole words intact. If you want wrapping to +occur within words use <a href="qtextedit.html#setWrapPolicy">setWrapPolicy</a>(). If you set a wrap mode of +<a href="qtextedit.html#WordWrap-enum">FixedPixelWidth</a> or <a href="qtextedit.html#WordWrap-enum">FixedColumnWidth</a> you should also call +<a href="qtextedit.html#setWrapColumnOrWidth">setWrapColumnOrWidth</a>() with the width you want. +<p> <p>See also <a href="qtextedit.html#WordWrap-enum">WordWrap</a>, <a href="qtextedit.html#wrapColumnOrWidth-prop">wrapColumnOrWidth</a>, and <a href="qtextedit.html#wrapPolicy-prop">wrapPolicy</a>. + +<p>Set this property's value with <a href="qtextedit.html#setWordWrap">setWordWrap</a>() and get this property's value with <a href="qtextedit.html#wordWrap">wordWrap</a>(). + + + + QTextEdit::wrapColumnOrWidth + +<p>This property holds the position (in pixels or columns depending on the wrap mode) where text will be wrapped. +<p>If the wrap mode is <a href="qtextedit.html#WordWrap-enum">FixedPixelWidth</a>, the value is the number of +pixels from the left edge of the text edit at which text should be +wrapped. If the wrap mode is <a href="qtextedit.html#WordWrap-enum">FixedColumnWidth</a>, the value is the +column number (in character columns) from the left edge of the +text edit at which text should be wrapped. +<p> <p>See also <a href="qtextedit.html#wordWrap-prop">wordWrap</a>. + +<p>Set this property's value with <a href="qtextedit.html#setWrapColumnOrWidth">setWrapColumnOrWidth</a>() and get this property's value with <a href="qtextedit.html#wrapColumnOrWidth">wrapColumnOrWidth</a>(). + + + + QTextEdit::wrapPolicy + +<p>This property holds the word wrap policy, at whitespace or anywhere. +<p>Defines where text can be wrapped when word wrap mode is not <a href="qtextedit.html#WordWrap-enum">NoWrap</a>. The choices are <a href="qtextedit.html#WrapPolicy-enum">AtWordBoundary</a> (the default), <a href="qtextedit.html#WrapPolicy-enum">Anywhere</a> and <a href="qtextedit.html#WrapPolicy-enum">AtWordOrDocumentBoundary</a> +<p> <p>See also <a href="qtextedit.html#wordWrap-prop">wordWrap</a>. + +<p>Set this property's value with <a href="qtextedit.html#setWrapPolicy">setWrapPolicy</a>() and get this property's value with <a href="qtextedit.html#wrapPolicy">wrapPolicy</a>(). + + + + QTimeEdit::autoAdvance + +<p>This property holds whether the editor automatically advances to the next section. +<p>If autoAdvance is TRUE, the editor will automatically advance +focus to the next time section if a user has completed a section. +The default is FALSE. + +<p>Set this property's value with <a href="qtimeedit.html#setAutoAdvance">setAutoAdvance</a>() and get this property's value with <a href="qtimeedit.html#autoAdvance">autoAdvance</a>(). + + + + QTimeEdit::display + +<p>This property holds the sections that are displayed in the time edit. +<p>The value can be any combination of the values in the Display enum. +By default, the widget displays hours, minutes and seconds. + +<p>Set this property's value with <a href="qtimeedit.html#setDisplay">setDisplay</a>() and get this property's value with <a href="qtimeedit.html#display">display</a>(). + + + + QTimeEdit::maxValue + +<p>This property holds the maximum time value. +<p>Setting the maximum time value is equivalent to calling +<a href="qtimeedit.html#setRange">QTimeEdit::setRange</a>( <a href="qtimeedit.html#minValue">minValue</a>(), <em>t</em> ), where <em>t</em> is the maximum +time. The default maximum time is 23:59:59. +<p> <p>See also <a href="qtimeedit.html#minValue-prop">minValue</a> and <a href="qtimeedit.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qtimeedit.html#setMaxValue">setMaxValue</a>() and get this property's value with <a href="qtimeedit.html#maxValue">maxValue</a>(). + + + + QTimeEdit::minValue + +<p>This property holds the minimum time value. +<p>Setting the minimum time value is equivalent to calling +<a href="qtimeedit.html#setRange">QTimeEdit::setRange</a>( <em>t</em>, <a href="qtimeedit.html#maxValue">maxValue</a>() ), where <em>t</em> is the minimum +time. The default minimum time is 00:00:00. +<p> <p>See also <a href="qtimeedit.html#maxValue-prop">maxValue</a> and <a href="qtimeedit.html#setRange">setRange</a>(). + +<p>Set this property's value with <a href="qtimeedit.html#setMinValue">setMinValue</a>() and get this property's value with <a href="qtimeedit.html#minValue">minValue</a>(). + + + + QTimeEdit::time + +<p>This property holds the editor's time value. +<p>When changing the time property, if the time is less than +<a href="qtimeedit.html#minValue">minValue</a>(), or is greater than <a href="qtimeedit.html#maxValue">maxValue</a>(), nothing happens. + +<p>Set this property's value with <a href="qtimeedit.html#setTime">setTime</a>() and get this property's value with <a href="qtimeedit.html#time">time</a>(). + + + + QToolBar::label + +<p>This property holds the toolbar's label. +<p>If the toolbar is floated the label becomes the toolbar window's +caption. There is no default label text. + +<p>Set this property's value with <a href="qtoolbar.html#setLabel">setLabel</a>() and get this property's value with <a href="qtoolbar.html#label">label</a>(). + + + + QToolBox::count + +<p>This property holds the number of items contained in the toolbox. +<p> +<p>Get this property's value with <a href="qtoolbox.html#count">count</a>(). + + + + QToolBox::currentIndex + +<p>This property holds the index of the current item, or -1 if the toolbox is empty. +<p>Set this property's value with <a href="qtoolbox.html#setCurrentIndex">setCurrentIndex</a>() and get this property's value with <a href="qtoolbox.html#currentIndex">currentIndex</a>(). +<p><p>See also <a href="qtoolbox.html#currentItem">currentItem</a>(), <a href="qtoolbox.html#indexOf">indexOf</a>(), and <a href="qtoolbox.html#item">item</a>(). + + + + + QToolButton::autoRaise + +<p>This property holds whether auto-raising is enabled. +<p>The default is disabled (i.e. FALSE). + +<p>Set this property's value with <a href="qtoolbutton.html#setAutoRaise">setAutoRaise</a>() and get this property's value with <a href="qtoolbutton.html#autoRaise">autoRaise</a>(). + + + + QToolButton::iconSet + +<p>This property holds the icon set providing the icon shown on the button. +<p>Setting this property sets <a href="qtoolbutton.html#pixmap-prop">QToolButton::pixmap</a> to a null +pixmap. There is no default iconset. +<p> <p>See also <a href="qtoolbutton.html#pixmap-prop">pixmap</a>, <a href="qtoolbutton.html#toggleButton-prop">toggleButton</a>, and <a href="qtoolbutton.html#on-prop">on</a>. + +<p>Set this property's value with <a href="qtoolbutton.html#setIconSet">setIconSet</a>() and get this property's value with <a href="qtoolbutton.html#iconSet">iconSet</a>(). + + + + QToolButton::offIconSet + +<p>This property holds the icon set that is used when the button is in an "off" state. +<p><b>This property is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> Since Qt 3.0, <a href="qiconset.html">QIconSet</a> contains both the On and Off icons. There is +now an <a href="qtoolbutton.html#iconSet-prop">QToolButton::iconSet</a> property that replaces both <a href="qtoolbutton.html#onIconSet-prop">QToolButton::onIconSet</a> and <a href="qtoolbutton.html#offIconSet-prop">QToolButton::offIconSet</a>. +<p> For ease of porting, this property is a synonym for <a href="qtoolbutton.html#iconSet-prop">QToolButton::iconSet</a>. You probably want to go over your application +code and use the QIconSet On/Off mechanism. +<p> <p>See also <a href="qtoolbutton.html#iconSet-prop">iconSet</a> and <a href="qiconset.html#State-enum">QIconSet::State</a>. + +<p>Set this property's value with <a href="qtoolbutton.html#setOffIconSet">setOffIconSet</a>() and get this property's value with <a href="qtoolbutton.html#offIconSet">offIconSet</a>(). + + + + QToolButton::onIconSet + +<p>This property holds the icon set that is used when the button is in an "on" state. +<p><b>This property is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> Since Qt 3.0, <a href="qiconset.html">QIconSet</a> contains both the On and Off icons. There is +now an <a href="qtoolbutton.html#iconSet-prop">QToolButton::iconSet</a> property that replaces both <a href="qtoolbutton.html#onIconSet-prop">QToolButton::onIconSet</a> and <a href="qtoolbutton.html#offIconSet-prop">QToolButton::offIconSet</a>. +<p> For ease of porting, this property is a synonym for <a href="qtoolbutton.html#iconSet-prop">QToolButton::iconSet</a>. You probably want to go over your application +code and use the QIconSet On/Off mechanism. +<p> <p>See also <a href="qtoolbutton.html#iconSet-prop">iconSet</a> and <a href="qiconset.html#State-enum">QIconSet::State</a>. + +<p>Set this property's value with <a href="qtoolbutton.html#setOnIconSet">setOnIconSet</a>() and get this property's value with <a href="qtoolbutton.html#onIconSet">onIconSet</a>(). + + + + QToolButton::popupDelay + +<p>This property holds the time delay between pressing the button and the appearance of the associated popup menu in milliseconds. +<p>Usually this is around half a second. A value of 0 draws the down +arrow button to the side of the button which can be used to open +up the popup menu. +<p> <p>See also <a href="qtoolbutton.html#setPopup">setPopup</a>(). + +<p>Set this property's value with <a href="qtoolbutton.html#setPopupDelay">setPopupDelay</a>() and get this property's value with <a href="qtoolbutton.html#popupDelay">popupDelay</a>(). + + + + QToolButton::textLabel + +<p>This property holds the label of this button. +<p>Setting this property automatically sets the text as a tool tip +too. There is no default text. + +<p>Set this property's value with <a href="qtoolbutton.html#setTextLabel">setTextLabel</a>() and get this property's value with <a href="qtoolbutton.html#textLabel">textLabel</a>(). + + + + QToolButton::textPosition + +<p>This property holds the position of the text label of this button. +<p> +<p>Set this property's value with <a href="qtoolbutton.html#setTextPosition">setTextPosition</a>() and get this property's value with <a href="qtoolbutton.html#textPosition">textPosition</a>(). + + + + QToolButton::usesBigPixmap + +<p>This property holds whether this toolbutton uses big pixmaps. +<p>QToolButton automatically connects this property to the relevant +signal in the <a href="qmainwindow.html">QMainWindow</a> in which it resides. We strongly +recommend that you use <a href="qmainwindow.html#setUsesBigPixmaps">QMainWindow::setUsesBigPixmaps</a>() instead. +<p> This property's default is TRUE. +<p> <b>Warning:</b> If you set some buttons (in a QMainWindow) to have big +pixmaps and others to have small pixmaps, QMainWindow may not get +the geometry right. + +<p>Set this property's value with <a href="qtoolbutton.html#setUsesBigPixmap">setUsesBigPixmap</a>() and get this property's value with <a href="qtoolbutton.html#usesBigPixmap">usesBigPixmap</a>(). + + + + QToolButton::usesTextLabel + +<p>This property holds whether the toolbutton displays a text label below the button pixmap. +<p>The default is FALSE. +<p> QToolButton automatically connects this slot to the relevant +signal in the <a href="qmainwindow.html">QMainWindow</a> in which is resides. + +<p>Set this property's value with <a href="qtoolbutton.html#setUsesTextLabel">setUsesTextLabel</a>() and get this property's value with <a href="qtoolbutton.html#usesTextLabel">usesTextLabel</a>(). + + + + QToolTipGroup::delay + +<p>This property holds whether the display of the group text is delayed. +<p>If set to TRUE (the default), the group text is displayed at the +same time as the tool tip. Otherwise, the group text is displayed +immediately when the cursor enters the widget. + +<p>Set this property's value with <a href="qtooltipgroup.html#setDelay">setDelay</a>() and get this property's value with <a href="qtooltipgroup.html#delay">delay</a>(). + + + + QToolTipGroup::enabled + +<p>This property holds whether tool tips in the group are enabled. +<p>This property's default is TRUE. + +<p>Set this property's value with <a href="qtooltipgroup.html#setEnabled">setEnabled</a>() and get this property's value with <a href="qtooltipgroup.html#enabled">enabled</a>(). + + + + QWidget::acceptDrops + +<p>This property holds whether drop events are enabled for this widget. +<p>Setting this property to TRUE announces to the system that this +widget <em>may</em> be able to accept drop events. +<p> If the widget is the desktop (<a href="qwidget.html#isDesktop">QWidget::isDesktop</a>()), this may +fail if another application is using the desktop; you can call +<a href="qwidget.html#acceptDrops">acceptDrops</a>() to test if this occurs. +<p> <b>Warning:</b> +Do not modify this property in a Drag&Drop event handler. + +<p>Set this property's value with <a href="qwidget.html#setAcceptDrops">setAcceptDrops</a>() and get this property's value with <a href="qwidget.html#acceptDrops">acceptDrops</a>(). + + + + QWidget::autoMask + +<p>This property holds whether the auto mask feature is enabled for the widget. +<p>Transparent widgets use a mask to define their visible region. +QWidget has some built-in support to make the task of +recalculating the mask easier. When setting auto mask to TRUE, +<a href="qwidget.html#updateMask">updateMask</a>() will be called whenever the widget is resized or +changes its focus state. Note that you must reimplement +updateMask() (which should include a call to <a href="qwidget.html#setMask">setMask</a>()) or nothing +will happen. +<p> Note: when you re-implement <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>() or +<a href="qwidget.html#focusOutEvent">focusOutEvent</a>() in your custom widgets and still want to ensure +that the auto mask calculation works, you should add: +<p> <pre> + if ( <a href="qwidget.html#autoMask">autoMask</a>() ) + <a href="qwidget.html#updateMask">updateMask</a>(); + </pre> + +<p> at the end of your event handlers. This is true for all member +functions that change the appearance of the widget in a way that +retquires a recalculation of the mask. +<p> While being a technically appealing concept, masks have a big +drawback: when using complex masks that cannot be expressed easily +with relatively simple regions, they can be very slow on some +window systems. The classic example is a transparent label. The +complex shape of its contents makes it necessary to represent its +mask by a bitmap, which consumes both memory and time. If all you +want is to blend the background of several neighboring widgets +together seamlessly, you will probably want to use +<a href="qwidget.html#setBackgroundOrigin">setBackgroundOrigin</a>() rather than a mask. +<p> <p>See also <a href="qwidget.html#updateMask">updateMask</a>(), <a href="qwidget.html#setMask">setMask</a>(), <a href="qwidget.html#clearMask">clearMask</a>(), and <a href="qwidget.html#backgroundOrigin-prop">backgroundOrigin</a>. + +<p>Set this property's value with <a href="qwidget.html#setAutoMask">setAutoMask</a>() and get this property's value with <a href="qwidget.html#autoMask">autoMask</a>(). + + + + QWidget::backgroundBrush + +<p>This property holds the widget's background brush. +<p>The background brush depends on a widget's palette and its +background mode. +<p> <p>See also <a href="qwidget.html#backgroundColor">backgroundColor</a>(), <a href="qwidget.html#backgroundPixmap">backgroundPixmap</a>(), <a href="qwidget.html#eraseColor">eraseColor</a>(), <a href="qwidget.html#palette-prop">palette</a>, and <a href="qapplication.html#setPalette">QApplication::setPalette</a>(). + +<p>Get this property's value with <a href="qwidget.html#backgroundBrush">backgroundBrush</a>(). + + + + QWidget::backgroundMode + +<p>This property holds the color role used for painting the background of the widget. +<p>setPaletteBackgroundColor() reads this property to determine which +entry of the <a href="qwidget.html#palette-prop">palette</a> to set. +<p> For most widgets the default suffices (<a href="qt.html#BackgroundMode-enum">PaletteBackground</a>, +typically gray), but some need to use <a href="qt.html#BackgroundMode-enum">PaletteBase</a> (the +background color for text output, typically white) or another +role. +<p> <a href="qlistbox.html">QListBox</a>, which is "sunken" and uses the base color to contrast +with its environment, does this in its constructor: +<p> <pre> + <a href="qwidget.html#setBackgroundMode">setBackgroundMode</a>( <a href="qt.html#BackgroundMode-enum">PaletteBase</a> ); + </pre> + +<p> You will never need to set the background mode of a built-in +widget in Qt, but you might consider setting it in your custom +widgets, so that <a href="qwidget.html#setPaletteBackgroundColor">setPaletteBackgroundColor</a>() works as expected. +<p> Note that two of the BackgroundMode values make no sense for +<a href="qwidget.html#setBackgroundMode">setBackgroundMode</a>(), namely <a href="qt.html#BackgroundMode-enum">FixedPixmap</a> and <a href="qt.html#BackgroundMode-enum">FixedColor</a>. You +must call <a href="qwidget.html#setBackgroundPixmap">setBackgroundPixmap</a>() and setPaletteBackgroundColor() +instead. + +<p>Set this property's value with <a href="qwidget.html#setBackgroundMode">setBackgroundMode</a>() and get this property's value with <a href="qwidget.html#backgroundMode">backgroundMode</a>(). + + + + QWidget::backgroundOrigin + +<p>This property holds the origin of the widget's background. +<p>The origin is either WidgetOrigin (the default), ParentOrigin, +WindowOrigin or AncestorOrigin. +<p> This only makes a difference if the widget has a background +pixmap, in which case positioning matters. Using <a href="qwidget.html#BackgroundOrigin-enum">WindowOrigin</a> +for several neighboring widgets makes the background blend +together seamlessly. <a href="qwidget.html#BackgroundOrigin-enum">AncestorOrigin</a> allows blending backgrounds +seamlessly when an ancestor of the widget has an origin other than +<a href="qwidget.html#BackgroundOrigin-enum">WindowOrigin</a>. +<p> <p>See also <a href="qwidget.html#backgroundPixmap">backgroundPixmap</a>() and <a href="qwidget.html#backgroundMode-prop">backgroundMode</a>. + +<p>Set this property's value with <a href="qwidget.html#setBackgroundOrigin">setBackgroundOrigin</a>() and get this property's value with <a href="qwidget.html#backgroundOrigin">backgroundOrigin</a>(). + + + + QWidget::baseSize + +<p>This property holds the base size of the widget. +<p>The base size is used to calculate a proper widget size if the +widget defines <a href="qwidget.html#sizeIncrement">sizeIncrement</a>(). +<p> <p>See also <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>. + +<p>Set this property's value with <a href="qwidget.html#setBaseSize">setBaseSize</a>() and get this property's value with <a href="qwidget.html#baseSize">baseSize</a>(). + + + + QWidget::caption + +<p>This property holds the window caption (title). +<p>This property only makes sense for top-level widgets. If no +caption has been set, the caption is <a href="qstring.html#QString-null">QString::null</a>. +<p> <p>See also <a href="qwidget.html#icon-prop">icon</a> and <a href="qwidget.html#iconText-prop">iconText</a>. + +<p>Set this property's value with <a href="qwidget.html#setCaption">setCaption</a>() and get this property's value with <a href="qwidget.html#caption">caption</a>(). + + + + QWidget::childrenRect + +<p>This property holds the bounding rectangle of the widget's children. +<p>Hidden children are excluded. +<p> <p>See also <a href="qwidget.html#childrenRegion-prop">childrenRegion</a> and <a href="qwidget.html#geometry-prop">geometry</a>. + +<p>Get this property's value with <a href="qwidget.html#childrenRect">childrenRect</a>(). + + + + QWidget::childrenRegion + +<p>This property holds the combined region occupied by the widget's children. +<p>Hidden children are excluded. +<p> <p>See also <a href="qwidget.html#childrenRect-prop">childrenRect</a> and <a href="qwidget.html#geometry-prop">geometry</a>. + +<p>Get this property's value with <a href="qwidget.html#childrenRegion">childrenRegion</a>(). + + + + QWidget::colorGroup + +<p>This property holds the current color group of the widget palette. +<p>The color group is determined by the state of the widget. A +disabled widget has the <a href="qpalette.html#disabled">QPalette::disabled</a>() color group, a widget +with <a href="focus.html#keyboard-focus">keyboard focus</a> has the <a href="qpalette.html#active">QPalette::active</a>() color group, and an +inactive widget has the <a href="qpalette.html#inactive">QPalette::inactive</a>() color group. +<p> <p>See also <a href="qwidget.html#palette-prop">palette</a>. + +<p>Get this property's value with <a href="qwidget.html#colorGroup">colorGroup</a>(). + + + + QWidget::cursor + +<p>This property holds the cursor shape for this widget. +<p>The mouse cursor will assume this shape when it's over this +widget. See the <a href="qt.html#CursorShape-enum">list of predefined cursor + objects</a> for a range of useful shapes. +<p> An editor widget might use an I-beam cursor: +<pre> + <a href="qwidget.html#setCursor">setCursor</a>( <a href="qt.html#CursorShape-enum">IbeamCursor</a> ); + </pre> + +<p> If no cursor has been set, or after a call to <a href="qwidget.html#unsetCursor">unsetCursor</a>(), the +parent's cursor is used. The function unsetCursor() has no effect +on top-level widgets. +<p> <p>See also <a href="qapplication.html#setOverrideCursor">QApplication::setOverrideCursor</a>(). + +<p>Set this property's value with <a href="qwidget.html#setCursor">setCursor</a>(), get this property's value with <a href="qwidget.html#cursor">cursor</a>(), and reset this property's value with <a href="qwidget.html#unsetCursor">unsetCursor</a>(). + + + + QWidget::customWhatsThis + +<p>This property holds whether the widget wants to handle What's This help manually. +<p>The default implementation of <a href="qwidget.html#customWhatsThis">customWhatsThis</a>() returns FALSE, +which means the widget will not receive any events in Whats This +mode. +<p> The widget may leave What's This mode by calling +<a href="qwhatsthis.html#leaveWhatsThisMode">QWhatsThis::leaveWhatsThisMode</a>(), with or without actually +displaying any help text. +<p> You can also reimplement customWhatsThis() if your widget is a +"passive interactor" supposed to work under all circumstances. +Simply don't call QWhatsThis::leaveWhatsThisMode() in that case. +<p> <p>See also <a href="qwhatsthis.html#inWhatsThisMode">QWhatsThis::inWhatsThisMode</a>() and <a href="qwhatsthis.html#leaveWhatsThisMode">QWhatsThis::leaveWhatsThisMode</a>(). + +<p>Get this property's value with <a href="qwidget.html#customWhatsThis">customWhatsThis</a>(). + + + + QWidget::enabled + +<p>This property holds whether the widget is enabled. +<p>An enabled widget receives keyboard and mouse events; a disabled +widget does not. In fact, an enabled widget only receives keyboard +events when it is in focus. +<p> Some widgets display themselves differently when they are +disabled. For example a button might draw its label grayed out. If +your widget needs to know when it becomes enabled or disabled, you +can reimplement the <a href="qwidget.html#enabledChange">enabledChange</a>() function. +<p> Disabling a widget implicitly disables all its children. Enabling +respectively enables all child widgets unless they have been +explicitly disabled. +<p> <p>See also <a href="qwidget.html#enabled-prop">enabled</a>, <a href="qwidget.html#isEnabledTo">isEnabledTo</a>(), <a href="qkeyevent.html">QKeyEvent</a>, <a href="qmouseevent.html">QMouseEvent</a>, and <a href="qwidget.html#enabledChange">enabledChange</a>(). + +<p>Set this property's value with <a href="qwidget.html#setEnabled">setEnabled</a>() and get this property's value with <a href="qwidget.html#isEnabled">isEnabled</a>(). + + + + QWidget::focus + +<p>This property holds whether this widget (or its focus proxy) has the keyboard input focus. +<p>Effectively equivalent to <tt>qApp-&gt;focusWidget() == this</tt>. +<p> <p>See also <a href="qwidget.html#setFocus">setFocus</a>(), <a href="qwidget.html#clearFocus">clearFocus</a>(), <a href="qwidget.html#focusPolicy-prop">focusPolicy</a>, and <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>(). + +<p>Get this property's value with <a href="qwidget.html#hasFocus">hasFocus</a>(). + + + + QWidget::focusEnabled + +<p>This property holds whether the widget accepts <a href="focus.html#keyboard-focus">keyboard focus</a>. +<p>Keyboard focus is initially disabled (i.e. <a href="qwidget.html#focusPolicy">focusPolicy</a>() == +<a href="qwidget.html#FocusPolicy-enum">QWidget::NoFocus</a>). +<p> You must enable keyboard focus for a widget if it processes +keyboard events. This is normally done from the widget's +constructor. For instance, the <a href="qlineedit.html">QLineEdit</a> constructor calls +<a href="qwidget.html#setFocusPolicy">setFocusPolicy</a>(QWidget::StrongFocus). +<p> <p>See also <a href="qwidget.html#focusPolicy-prop">focusPolicy</a>, <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), and <a href="qwidget.html#enabled-prop">enabled</a>. + +<p>Get this property's value with <a href="qwidget.html#isFocusEnabled">isFocusEnabled</a>(). + + + + QWidget::focusPolicy + +<p>This property holds the way the widget accepts <a href="focus.html#keyboard-focus">keyboard focus</a>. +<p>The policy is <a href="qwidget.html#FocusPolicy-enum">QWidget::TabFocus</a> if the widget accepts keyboard +focus by tabbing, <a href="qwidget.html#FocusPolicy-enum">QWidget::ClickFocus</a> if the widget accepts +focus by clicking, <a href="qwidget.html#FocusPolicy-enum">QWidget::StrongFocus</a> if it accepts both, and +<a href="qwidget.html#FocusPolicy-enum">QWidget::NoFocus</a> (the default) if it does not accept focus at +all. +<p> You must enable keyboard focus for a widget if it processes +keyboard events. This is normally done from the widget's +constructor. For instance, the <a href="qlineedit.html">QLineEdit</a> constructor calls +<a href="qwidget.html#setFocusPolicy">setFocusPolicy</a>(QWidget::StrongFocus). +<p> <p>See also <a href="qwidget.html#focusEnabled-prop">focusEnabled</a>, <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), and <a href="qwidget.html#enabled-prop">enabled</a>. + +<p>Set this property's value with <a href="qwidget.html#setFocusPolicy">setFocusPolicy</a>() and get this property's value with <a href="qwidget.html#focusPolicy">focusPolicy</a>(). + + + + QWidget::font + +<p>This property holds the font currently set for the widget. +<p>The <a href="qwidget.html#fontInfo">fontInfo</a>() function reports the actual font that is being used +by the widget. +<p> As long as no special font has been set, or after <a href="qwidget.html#unsetFont">unsetFont</a>() is +called, this is either a special font for the widget class, the +parent's font or (if this widget is a top level widget), the +default application font. +<p> This code fragment sets a 12 point helvetica bold font: +<pre> + <a href="qfont.html">QFont</a> f( "Helvetica", 12, QFont::Bold ); + <a href="qwidget.html#setFont">setFont</a>( f ); + </pre> + +<p> In addition to setting the font, <a href="qwidget.html#setFont">setFont</a>() informs all children +about the change. +<p> <p>See also <a href="qwidget.html#fontChange">fontChange</a>(), <a href="qwidget.html#fontInfo">fontInfo</a>(), <a href="qwidget.html#fontMetrics">fontMetrics</a>(), and <a href="qwidget.html#ownFont-prop">ownFont</a>. + +<p>Set this property's value with <a href="qwidget.html#setFont">setFont</a>(), get this property's value with <a href="qwidget.html#font">font</a>(), and reset this property's value with <a href="qwidget.html#unsetFont">unsetFont</a>(). + + + + QWidget::frameGeometry + +<p>This property holds geometry of the widget relative to its parent including any window frame. +<p>See the <a href="geometry.html">Window Geometry documentation</a> +for an overview of geometry issues with top-level widgets. +<p> <p>See also <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#x-prop">x</a>, <a href="qwidget.html#y-prop">y</a>, and <a href="qwidget.html#pos-prop">pos</a>. + +<p>Get this property's value with <a href="qwidget.html#frameGeometry">frameGeometry</a>(). + + + + QWidget::frameSize + +<p>This property holds the size of the widget including any window frame. +<p> +<p>Get this property's value with <a href="qwidget.html#frameSize">frameSize</a>(). + + + + QWidget::fullScreen + +<p>This property holds whether the widget is full screen. +<p>Get this property's value with <a href="qwidget.html#isFullScreen">isFullScreen</a>(). +<p><p>See also <a href="qwidget.html#windowState">windowState</a>(), <a href="qwidget.html#minimized-prop">minimized</a>, and <a href="qwidget.html#maximized-prop">maximized</a>. + + + + + QWidget::geometry + +<p>This property holds the geometry of the widget relative to its parent and excluding the window frame. +<p>When changing the geometry, the widget, if visible, receives a +move event (<a href="qwidget.html#moveEvent">moveEvent</a>()) and/or a resize event (<a href="qwidget.html#resizeEvent">resizeEvent</a>()) +immediately. If the widget is not currently visible, it is +guaranteed to receive appropriate events before it is shown. +<p> The size component is adjusted if it lies outside the range +defined by <a href="qwidget.html#minimumSize">minimumSize</a>() and <a href="qwidget.html#maximumSize">maximumSize</a>(). +<p> <a href="qwidget.html#setGeometry">setGeometry</a>() is virtual, and all other overloaded setGeometry() +implementations in Qt call it. +<p> <b>Warning:</b> Calling setGeometry() inside resizeEvent() or moveEvent() +can lead to infinite recursion. +<p> See the <a href="geometry.html">Window Geometry documentation</a> +for an overview of top-level widget geometry. +<p> <p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#rect-prop">rect</a>, <a href="qwidget.html#pos-prop">pos</a>, <a href="qwidget.html#size-prop">size</a>, <a href="qwidget.html#moveEvent">moveEvent</a>(), <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qwidget.html#minimumSize-prop">minimumSize</a>, and <a href="qwidget.html#maximumSize-prop">maximumSize</a>. + +<p>Set this property's value with <a href="qwidget.html#setGeometry">setGeometry</a>() and get this property's value with <a href="qwidget.html#geometry">geometry</a>(). + + + + QWidget::height + +<p>This property holds the height of the widget excluding any window frame. +<p>See the <a href="geometry.html">Window Geometry documentation</a> +for an overview of top-level widget geometry. +<p> <p>See also <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#width-prop">width</a>, and <a href="qwidget.html#size-prop">size</a>. + +<p>Get this property's value with <a href="qwidget.html#height">height</a>(). + + + + QWidget::hidden + +<p>This property holds whether the widget is explicitly hidden. +<p>If FALSE, the widget is visible or would become visible if all its +ancestors became visible. +<p> <p>See also <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#isVisibleTo">isVisibleTo</a>(), and <a href="qwidget.html#shown-prop">shown</a>. + +<p>Set this property's value with <a href="qwidget.html#setHidden">setHidden</a>() and get this property's value with <a href="qwidget.html#isHidden">isHidden</a>(). + + + + QWidget::icon + +<p>This property holds the widget's icon. +<p>This property only makes sense for top-level widgets. If no icon +has been set, <a href="qwidget.html#icon">icon</a>() returns 0. +<p> <p>See also <a href="qwidget.html#iconText-prop">iconText</a>, <a href="qwidget.html#caption-prop">caption</a>, and <a href="appicon.html">Setting the Application Icon</a>. + +<p>Set this property's value with <a href="qwidget.html#setIcon">setIcon</a>() and get this property's value with <a href="qwidget.html#icon">icon</a>(). + + + + QWidget::iconText + +<p>This property holds the widget's icon text. +<p>This property only makes sense for top-level widgets. If no icon +text has been set, this functions returns <a href="qstring.html#QString-null">QString::null</a>. +<p> <p>See also <a href="qwidget.html#icon-prop">icon</a> and <a href="qwidget.html#caption-prop">caption</a>. + +<p>Set this property's value with <a href="qwidget.html#setIconText">setIconText</a>() and get this property's value with <a href="qwidget.html#iconText">iconText</a>(). + + + + QWidget::inputMethodEnabled + +<p>This property holds enables or disables the use of input methods for this widget. +<p>Most Widgets (as eg. buttons) that do not handle text input should have +the input method disabled if they have focus. This is the default. +<p> If a widget handles text input it should set this property to TRUE. + +<p>Set this property's value with <a href="qwidget.html#setInputMethodEnabled">setInputMethodEnabled</a>() and get this property's value with <a href="qwidget.html#isInputMethodEnabled">isInputMethodEnabled</a>(). + + + + QWidget::isActiveWindow + +<p>This property holds whether this widget is the active window. +<p>The active window is the window that contains the widget +that has <a href="focus.html#keyboard-focus">keyboard focus</a>. +<p> When popup windows are visible, this property is TRUE for both the +active window <em>and</em> for the popup. +<p> <p>See also <a href="qwidget.html#setActiveWindow">setActiveWindow</a>() and <a href="qapplication.html#activeWindow">QApplication::activeWindow</a>(). + +<p>Get this property's value with <a href="qwidget.html#isActiveWindow">isActiveWindow</a>(). + + + + QWidget::isDesktop + +<p>This property holds whether the widget is a desktop widget, i.e. represents the desktop. +<p>A desktop widget is also a top-level widget. +<p> <p>See also <a href="qwidget.html#isTopLevel-prop">isTopLevel</a> and <a href="qapplication.html#desktop">QApplication::desktop</a>(). + +<p>Get this property's value with <a href="qwidget.html#isDesktop">isDesktop</a>(). + + + + QWidget::isDialog + +<p>This property holds whether the widget is a dialog widget. +<p>A dialog widget is a secondary top-level widget, i.e. a top-level +widget with a parent. +<p> <p>See also <a href="qwidget.html#isTopLevel-prop">isTopLevel</a> and <a href="qdialog.html">QDialog</a>. + +<p>Get this property's value with <a href="qwidget.html#isDialog">isDialog</a>(). + + + + QWidget::isModal + +<p>This property holds whether the widget is a modal widget. +<p>This property only makes sense for top-level widgets. A modal +widget prevents widgets in all other top-level widgets from +getting any input. +<p> <p>See also <a href="qwidget.html#isTopLevel-prop">isTopLevel</a>, <a href="qwidget.html#isDialog-prop">isDialog</a>, and <a href="qdialog.html">QDialog</a>. + +<p>Get this property's value with <a href="qwidget.html#isModal">isModal</a>(). + + + + QWidget::isPopup + +<p>This property holds whether the widget is a popup widget. +<p>A popup widget is created by specifying the <a href="qt.html#WidgetFlags">widget flag</a> <a href="qt.html#WidgetFlags-enum">WType_Popup</a> to the widget constructor. A popup widget is also a +top-level widget. +<p> <p>See also <a href="qwidget.html#isTopLevel-prop">isTopLevel</a>. + +<p>Get this property's value with <a href="qwidget.html#isPopup">isPopup</a>(). + + + + QWidget::isTopLevel + +<p>This property holds whether the widget is a top-level widget. +<p>A top-level widget is a widget which usually has a frame and a +<a href="qwidget.html#caption-prop">caption (title)</a>. <a href="qwidget.html#isPopup">Popup</a> and <a href="qwidget.html#isDesktop">desktop</a> widgets are also top-level widgets. +<p> A top-level widget can have a <a href="qwidget.html#parentWidget">parent + widget</a>. It will then be grouped with its parent and deleted +when the parent is deleted, minimized when the parent is minimized +etc. If supported by the window manager, it will also have a +common taskbar entry with its parent. +<p> <a href="qdialog.html">QDialog</a> and <a href="qmainwindow.html">QMainWindow</a> widgets are by default top-level, even if +a parent widget is specified in the constructor. This behavior is +specified by the <a href="qt.html#WidgetFlags-enum">WType_TopLevel</a> widget flag. +<p> <p>See also <a href="qwidget.html#topLevelWidget">topLevelWidget</a>(), <a href="qwidget.html#isDialog-prop">isDialog</a>, <a href="qwidget.html#isModal-prop">isModal</a>, <a href="qwidget.html#isPopup-prop">isPopup</a>, <a href="qwidget.html#isDesktop-prop">isDesktop</a>, and <a href="qwidget.html#parentWidget">parentWidget</a>(). + +<p>Get this property's value with <a href="qwidget.html#isTopLevel">isTopLevel</a>(). + + + + QWidget::maximized + +<p>This property holds whether this widget is maximized. +<p>This property is only relevant for top-level widgets. +<p> Note that due to limitations in some window-systems, this does not +always report the expected results (e.g. if the user on X11 +maximizes the window via the window manager, Qt has no way of +distinguishing this from any other resize). This is expected to +improve as window manager protocols evolve. +<p> <p>See also <a href="qwidget.html#windowState">windowState</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), and <a href="qwidget.html#minimized-prop">minimized</a>. + +<p>Get this property's value with <a href="qwidget.html#isMaximized">isMaximized</a>(). + + + + QWidget::maximumHeight + +<p>This property holds the widget's maximum height. +<p>This property corresponds to <a href="qwidget.html#maximumSize">maximumSize</a>().<a href="qwidget.html#height">height</a>(). +<p> <p>See also <a href="qwidget.html#maximumSize-prop">maximumSize</a> and <a href="qwidget.html#maximumWidth-prop">maximumWidth</a>. + +<p>Set this property's value with <a href="qwidget.html#setMaximumHeight">setMaximumHeight</a>() and get this property's value with <a href="qwidget.html#maximumHeight">maximumHeight</a>(). + + + + QWidget::maximumSize + +<p>This property holds the widget's maximum size. +<p>The widget cannot be resized to a larger size than the maximum +widget size. +<p> <p>See also <a href="qwidget.html#maximumWidth-prop">maximumWidth</a>, <a href="qwidget.html#maximumHeight-prop">maximumHeight</a>, <a href="qwidget.html#maximumSize-prop">maximumSize</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, and <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>. + +<p>Set this property's value with <a href="qwidget.html#setMaximumSize">setMaximumSize</a>() and get this property's value with <a href="qwidget.html#maximumSize">maximumSize</a>(). + + + + QWidget::maximumWidth + +<p>This property holds the widget's maximum width. +<p>This property corresponds to <a href="qwidget.html#maximumSize">maximumSize</a>().<a href="qwidget.html#width">width</a>(). +<p> <p>See also <a href="qwidget.html#maximumSize-prop">maximumSize</a> and <a href="qwidget.html#maximumHeight-prop">maximumHeight</a>. + +<p>Set this property's value with <a href="qwidget.html#setMaximumWidth">setMaximumWidth</a>() and get this property's value with <a href="qwidget.html#maximumWidth">maximumWidth</a>(). + + + + QWidget::microFocusHint + +<p>This property holds the currently set micro focus hint for this widget. +<p>See the documentation of <a href="qwidget.html#setMicroFocusHint">setMicroFocusHint</a>() for more information. + +<p>Get this property's value with <a href="qwidget.html#microFocusHint">microFocusHint</a>(). + + + + QWidget::minimized + +<p>This property holds whether this widget is minimized (iconified). +<p>This property is only relevant for top-level widgets. +<p> <p>See also <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), and <a href="qwidget.html#maximized-prop">maximized</a>. + +<p>Get this property's value with <a href="qwidget.html#isMinimized">isMinimized</a>(). + + + + QWidget::minimumHeight + +<p>This property holds the widget's minimum height. +<p>This property corresponds to <a href="qwidget.html#minimumSize">minimumSize</a>().<a href="qwidget.html#height">height</a>(). +<p> <p>See also <a href="qwidget.html#minimumSize-prop">minimumSize</a> and <a href="qwidget.html#minimumWidth-prop">minimumWidth</a>. + +<p>Set this property's value with <a href="qwidget.html#setMinimumHeight">setMinimumHeight</a>() and get this property's value with <a href="qwidget.html#minimumHeight">minimumHeight</a>(). + + + + QWidget::minimumSize + +<p>This property holds the widget's minimum size. +<p>The widget cannot be resized to a smaller size than the minimum +widget size. The widget's size is forced to the minimum size if +the current size is smaller. +<p> If you use a layout inside the widget, the minimum size will be +set by the layout and not by <a href="qwidget.html#setMinimumSize">setMinimumSize</a>(), unless you set the +layout's resize mode to QLayout::FreeResize. +<p> <p>See also <a href="qwidget.html#minimumWidth-prop">minimumWidth</a>, <a href="qwidget.html#minimumHeight-prop">minimumHeight</a>, <a href="qwidget.html#maximumSize-prop">maximumSize</a>, <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>, and <a href="qlayout.html#resizeMode-prop">QLayout::resizeMode</a>. + +<p>Set this property's value with <a href="qwidget.html#setMinimumSize">setMinimumSize</a>() and get this property's value with <a href="qwidget.html#minimumSize">minimumSize</a>(). + + + + QWidget::minimumSizeHint + +<p>This property holds the recommended minimum size for the widget. +<p>If the value of this property is an invalid size, no minimum size +is recommended. +<p> The default implementation of <a href="qwidget.html#minimumSizeHint">minimumSizeHint</a>() returns an invalid +size if there is no layout for this widget, and returns the +layout's minimum size otherwise. Most built-in widgets reimplement +minimumSizeHint(). +<p> <a href="qlayout.html">QLayout</a> will never resize a widget to a size smaller than +minimumSizeHint. +<p> <p>See also <a href="qsize.html#isValid">QSize::isValid</a>(), <a href="qwidget.html#size-prop">size</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, and <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>. + +<p>Get this property's value with <a href="qwidget.html#minimumSizeHint">minimumSizeHint</a>(). + + + + QWidget::minimumWidth + +<p>This property holds the widget's minimum width. +<p>This property corresponds to <a href="qwidget.html#minimumSize">minimumSize</a>().<a href="qwidget.html#width">width</a>(). +<p> <p>See also <a href="qwidget.html#minimumSize-prop">minimumSize</a> and <a href="qwidget.html#minimumHeight-prop">minimumHeight</a>. + +<p>Set this property's value with <a href="qwidget.html#setMinimumWidth">setMinimumWidth</a>() and get this property's value with <a href="qwidget.html#minimumWidth">minimumWidth</a>(). + + + + QWidget::mouseTracking + +<p>This property holds whether mouse tracking is enabled for the widget. +<p>If mouse tracking is disabled (the default), the widget only +receives mouse move events when at least one mouse button is +pressed while the mouse is being moved. +<p> If mouse tracking is enabled, the widget receives mouse move +events even if no buttons are pressed. +<p> <p>See also <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>() and <a href="qapplication.html#setGlobalMouseTracking">QApplication::setGlobalMouseTracking</a>(). + +<p>Set this property's value with <a href="qwidget.html#setMouseTracking">setMouseTracking</a>() and get this property's value with <a href="qwidget.html#hasMouseTracking">hasMouseTracking</a>(). + + + + QWidget::ownCursor + +<p>This property holds whether the widget uses its own cursor. +<p>If FALSE, the widget uses its parent widget's cursor. +<p> <p>See also <a href="qwidget.html#cursor-prop">cursor</a>. + +<p>Get this property's value with <a href="qwidget.html#ownCursor">ownCursor</a>(). + + + + QWidget::ownFont + +<p>This property holds whether the widget uses its own font. +<p>If FALSE, the widget uses its parent widget's font. +<p> <p>See also <a href="qwidget.html#font-prop">font</a>. + +<p>Get this property's value with <a href="qwidget.html#ownFont">ownFont</a>(). + + + + QWidget::ownPalette + +<p>This property holds whether the widget uses its own palette. +<p>If FALSE, the widget uses its parent widget's palette. +<p> <p>See also <a href="qwidget.html#palette-prop">palette</a>. + +<p>Get this property's value with <a href="qwidget.html#ownPalette">ownPalette</a>(). + + + + QWidget::palette + +<p>This property holds the widget's palette. +<p>As long as no special palette has been set, or after <a href="qwidget.html#unsetPalette">unsetPalette</a>() +has been called, this is either a special palette for the widget +class, the parent's palette or (if this widget is a top level +widget), the default application palette. +<p> Instead of defining an entirely new palette, you can also use the +<a href="qwidget.html#paletteBackgroundColor-prop">paletteBackgroundColor</a>, +<a href="qwidget.html#paletteBackgroundPixmap-prop">paletteBackgroundPixmap</a> and +<a href="qwidget.html#paletteForegroundColor-prop">paletteForegroundColor</a> +convenience properties to change a widget's +background and foreground appearance only. +<p> <p>See also <a href="qwidget.html#ownPalette-prop">ownPalette</a>, <a href="qwidget.html#colorGroup-prop">colorGroup</a>, and <a href="qapplication.html#palette">QApplication::palette</a>(). + +<p>Set this property's value with <a href="qwidget.html#setPalette">setPalette</a>(), get this property's value with <a href="qwidget.html#palette">palette</a>(), and reset this property's value with <a href="qwidget.html#unsetPalette">unsetPalette</a>(). + + + + QWidget::paletteBackgroundColor + +<p>This property holds the background color of the widget. +<p>The palette background color is usually set implicitly by +<a href="qwidget.html#setBackgroundMode">setBackgroundMode</a>(), although it can also be set explicitly by +<a href="qwidget.html#setPaletteBackgroundColor">setPaletteBackgroundColor</a>(). setPaletteBackgroundColor() is a +convenience function that creates and sets a modified <a href="qpalette.html">QPalette</a> +with <a href="qwidget.html#setPalette">setPalette</a>(). The palette is modified according to the +widget's background mode. For example, if the background mode is +<a href="qt.html#BackgroundMode-enum">PaletteButton</a> the color used for the palette's <a href="qcolorgroup.html#ColorRole-enum">QColorGroup::Button</a> color entry is set. +<p> If there is a background pixmap (set using +<a href="qwidget.html#setPaletteBackgroundPixmap">setPaletteBackgroundPixmap</a>()), then the return value of this +function is indeterminate. +<p> <p>See also <a href="qwidget.html#paletteBackgroundPixmap-prop">paletteBackgroundPixmap</a>, <a href="qwidget.html#paletteForegroundColor-prop">paletteForegroundColor</a>, <a href="qwidget.html#palette-prop">palette</a>, and <a href="qwidget.html#colorGroup-prop">colorGroup</a>. + +<p>Set this property's value with <a href="qwidget.html#setPaletteBackgroundColor">setPaletteBackgroundColor</a>(), get this property's value with <a href="qwidget.html#paletteBackgroundColor">paletteBackgroundColor</a>(), and reset this property's value with <a href="qwidget.html#unsetPalette">unsetPalette</a>(). + + + + QWidget::paletteBackgroundPixmap + +<p>This property holds the background pixmap of the widget. +<p>The palette background pixmap is usually set implicitly by +<a href="qwidget.html#setBackgroundMode">setBackgroundMode</a>(), although it can also be set explicitly by +<a href="qwidget.html#setPaletteBackgroundPixmap">setPaletteBackgroundPixmap</a>(). setPaletteBackgroundPixmap() is a +convenience function that creates and sets a modified <a href="qpalette.html">QPalette</a> +with <a href="qwidget.html#setPalette">setPalette</a>(). The palette is modified according to the +widget's background mode. For example, if the background mode is +<a href="qt.html#BackgroundMode-enum">PaletteButton</a> the pixmap used for the palette's +<a href="qcolorgroup.html#ColorRole-enum">QColorGroup::Button</a> color entry is set. +<p> If there is a plain background color (set using +<a href="qwidget.html#setPaletteBackgroundColor">setPaletteBackgroundColor</a>()), then this function returns 0. +<p> <p>See also <a href="qwidget.html#paletteBackgroundColor-prop">paletteBackgroundColor</a>, <a href="qwidget.html#paletteForegroundColor-prop">paletteForegroundColor</a>, <a href="qwidget.html#palette-prop">palette</a>, and <a href="qwidget.html#colorGroup-prop">colorGroup</a>. + +<p>Set this property's value with <a href="qwidget.html#setPaletteBackgroundPixmap">setPaletteBackgroundPixmap</a>(), get this property's value with <a href="qwidget.html#paletteBackgroundPixmap">paletteBackgroundPixmap</a>(), and reset this property's value with <a href="qwidget.html#unsetPalette">unsetPalette</a>(). + + + + QWidget::paletteForegroundColor + +<p>This property holds the foreground color of the widget. +<p>setPaletteForegroundColor() is a convenience function that creates +and sets a modified <a href="qpalette.html">QPalette</a> with <a href="qwidget.html#setPalette">setPalette</a>(). The palette is +modified according to the widget's <em>background mode</em>. For +example, if the background mode is <a href="qt.html#BackgroundMode-enum">PaletteButton</a> the palette entry +<a href="qcolorgroup.html#ColorRole-enum">QColorGroup::ButtonText</a> is set to color. +<p> <p>See also <a href="qwidget.html#palette-prop">palette</a>, <a href="qapplication.html#setPalette">QApplication::setPalette</a>(), <a href="qwidget.html#backgroundMode-prop">backgroundMode</a>, <a href="qwidget.html#foregroundColor">foregroundColor</a>(), <a href="qwidget.html#backgroundMode-prop">backgroundMode</a>, and <a href="qwidget.html#setEraseColor">setEraseColor</a>(). + +<p>Set this property's value with <a href="qwidget.html#setPaletteForegroundColor">setPaletteForegroundColor</a>(), get this property's value with <a href="qwidget.html#paletteForegroundColor">paletteForegroundColor</a>(), and reset this property's value with <a href="qwidget.html#unsetPalette">unsetPalette</a>(). + + + + QWidget::pos + +<p>This property holds the position of the widget within its parent widget. +<p>If the widget is a top-level widget, the position is that of the +widget on the desktop, including its frame. +<p> When changing the position, the widget, if visible, receives a +move event (<a href="qwidget.html#moveEvent">moveEvent</a>()) immediately. If the widget is not +currently visible, it is guaranteed to receive an event before it +is shown. +<p> <a href="qwidget.html#move">move</a>() is virtual, and all other overloaded move() implementations +in Qt call it. +<p> <b>Warning:</b> Calling move() or <a href="qwidget.html#setGeometry">setGeometry</a>() inside moveEvent() can +lead to infinite recursion. +<p> See the <a href="geometry.html">Window Geometry documentation</a> +for an overview of top-level widget geometry. +<p> <p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#size-prop">size</a>, <a href="qwidget.html#x-prop">x</a>, and <a href="qwidget.html#y-prop">y</a>. + +<p>Set this property's value with <a href="qwidget.html#move">move</a>() and get this property's value with <a href="qwidget.html#pos">pos</a>(). + + + + QWidget::rect + +<p>This property holds the internal geometry of the widget excluding any window frame. +<p>The rect property equals <a href="qrect.html">QRect</a>(0, 0, <a href="qwidget.html#width">width</a>(), <a href="qwidget.html#height">height</a>()). +<p> See the <a href="geometry.html">Window Geometry documentation</a> +for an overview of top-level widget geometry. +<p> <p>See also <a href="qwidget.html#size-prop">size</a>. + +<p>Get this property's value with <a href="qwidget.html#rect">rect</a>(). + + + + QWidget::shown + +<p>This property holds whether the widget is shown. +<p>If TRUE, the widget is visible or would become visible if all its +ancestors became visible. +<p> <p>See also <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#isVisibleTo">isVisibleTo</a>(), and <a href="qwidget.html#hidden-prop">hidden</a>. + +<p>Set this property's value with <a href="qwidget.html#setShown">setShown</a>() and get this property's value with <a href="qwidget.html#isShown">isShown</a>(). + + + + QWidget::size + +<p>This property holds the size of the widget excluding any window frame. +<p>When resizing, the widget, if visible, receives a resize event +(<a href="qwidget.html#resizeEvent">resizeEvent</a>()) immediately. If the widget is not currently +visible, it is guaranteed to receive an event before it is shown. +<p> The size is adjusted if it lies outside the range defined by +<a href="qwidget.html#minimumSize">minimumSize</a>() and <a href="qwidget.html#maximumSize">maximumSize</a>(). Furthermore, the size is always +at least <a href="qsize.html">QSize</a>(1, 1). For toplevel widgets, the minimum size +might be larger, depending on the window manager. +<p> If you want a top-level window to have a fixed size, call +setResizeMode( QLayout::FreeResize ) on its layout. +<p> <a href="qwidget.html#resize">resize</a>() is virtual, and all other overloaded resize() +implementations in Qt call it. +<p> <b>Warning:</b> Calling resize() or <a href="qwidget.html#setGeometry">setGeometry</a>() inside resizeEvent() can +lead to infinite recursion. +<p> <p>See also <a href="qwidget.html#pos-prop">pos</a>, <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, <a href="qwidget.html#maximumSize-prop">maximumSize</a>, and <a href="qwidget.html#resizeEvent">resizeEvent</a>(). + +<p>Set this property's value with <a href="qwidget.html#resize">resize</a>() and get this property's value with <a href="qwidget.html#size">size</a>(). + + + + QWidget::sizeHint + +<p>This property holds the recommended size for the widget. +<p>If the value of this property is an invalid size, no size is +recommended. +<p> The default implementation of <a href="qwidget.html#sizeHint">sizeHint</a>() returns an invalid size +if there is no layout for this widget, and returns the layout's +preferred size otherwise. +<p> <p>See also <a href="qsize.html#isValid">QSize::isValid</a>(), <a href="qwidget.html#minimumSizeHint-prop">minimumSizeHint</a>, <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, and <a href="qwidget.html#updateGeometry">updateGeometry</a>(). + +<p>Get this property's value with <a href="qwidget.html#sizeHint">sizeHint</a>(). + + + + QWidget::sizeIncrement + +<p>This property holds the size increment of the widget. +<p>When the user resizes the window, the size will move in steps of +<a href="qwidget.html#sizeIncrement">sizeIncrement</a>().<a href="qwidget.html#width">width</a>() pixels horizontally and +sizeIncrement.<a href="qwidget.html#height">height</a>() pixels vertically, with <a href="qwidget.html#baseSize">baseSize</a>() as the +basis. Preferred widget sizes are for non-negative integers <em>i</em> +and <em>j</em>: +<pre> + <a href="qwidget.html#width-prop">width</a> = <a href="qwidget.html#baseSize">baseSize</a>().width() + i * sizeIncrement().width(); + <a href="qwidget.html#height-prop">height</a> = <a href="qwidget.html#baseSize">baseSize</a>().height() + j * sizeIncrement().height(); + </pre> + +<p> Note that while you can set the size increment for all widgets, it +only affects top-level widgets. +<p> <b>Warning:</b> The size increment has no effect under Windows, and may +be disregarded by the window manager on X. +<p> <p>See also <a href="qwidget.html#size-prop">size</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, and <a href="qwidget.html#maximumSize-prop">maximumSize</a>. + +<p>Set this property's value with <a href="qwidget.html#setSizeIncrement">setSizeIncrement</a>() and get this property's value with <a href="qwidget.html#sizeIncrement">sizeIncrement</a>(). + + + + QWidget::sizePolicy + +<p>This property holds the default layout behavior of the widget. +<p>If there is a <a href="qlayout.html">QLayout</a> that manages this widget's children, the +size policy specified by that layout is used. If there is no such +QLayout, the result of this function is used. +<p> The default policy is Preferred/Preferred, which means that the +widget can be freely resized, but prefers to be the size +<a href="qwidget.html#sizeHint">sizeHint</a>() returns. Button-like widgets set the size policy to +specify that they may stretch horizontally, but are fixed +vertically. The same applies to lineedit controls (such as +<a href="qlineedit.html">QLineEdit</a>, <a href="qspinbox.html">QSpinBox</a> or an editable <a href="qcombobox.html">QComboBox</a>) and other +horizontally orientated widgets (such as <a href="qprogressbar.html">QProgressBar</a>). +<a href="qtoolbutton.html">QToolButton</a>'s are normally square, so they allow growth in both +directions. Widgets that support different directions (such as +<a href="qslider.html">QSlider</a>, <a href="qscrollbar.html">QScrollBar</a> or <a href="qheader.html">QHeader</a>) specify stretching in the +respective direction only. Widgets that can provide scrollbars +(usually subclasses of <a href="qscrollview.html">QScrollView</a>) tend to specify that they can +use additional space, and that they can make do with less than +sizeHint(). +<p> <p>See also <a href="qwidget.html#sizeHint-prop">sizeHint</a>, <a href="qlayout.html">QLayout</a>, <a href="qsizepolicy.html">QSizePolicy</a>, and <a href="qwidget.html#updateGeometry">updateGeometry</a>(). + +<p>Set this property's value with <a href="qwidget.html#setSizePolicy">setSizePolicy</a>() and get this property's value with <a href="qwidget.html#sizePolicy">sizePolicy</a>(). + + + + QWidget::underMouse + +<p>This property holds whether the widget is under the mouse cursor. +<p>This value is not updated properly during drag and drop +operations. +<p> <p>See also <a href="qevent.html#Type-enum">QEvent::Enter</a> and <a href="qevent.html#Type-enum">QEvent::Leave</a>. + +<p>Get this property's value with <a href="qwidget.html#hasMouse">hasMouse</a>(). + + + + QWidget::updatesEnabled + +<p>This property holds whether updates are enabled. +<p>Calling <a href="qwidget.html#update">update</a>() and <a href="qwidget.html#repaint">repaint</a>() has no effect if updates are +disabled. Paint events from the window system are processed +normally even if updates are disabled. +<p> <a href="qwidget.html#setUpdatesEnabled">setUpdatesEnabled</a>() is normally used to disable updates for a +short period of time, for instance to avoid screen flicker during +large changes. +<p> Example: +<pre> + <a href="qwidget.html#setUpdatesEnabled">setUpdatesEnabled</a>( FALSE ); + bigVisualChanges(); + <a href="qwidget.html#setUpdatesEnabled">setUpdatesEnabled</a>( TRUE ); + <a href="qwidget.html#repaint">repaint</a>(); + </pre> + +<p> <p>See also <a href="qwidget.html#update">update</a>(), <a href="qwidget.html#repaint">repaint</a>(), and <a href="qwidget.html#paintEvent">paintEvent</a>(). + +<p>Set this property's value with <a href="qwidget.html#setUpdatesEnabled">setUpdatesEnabled</a>() and get this property's value with <a href="qwidget.html#isUpdatesEnabled">isUpdatesEnabled</a>(). + + + + QWidget::visible + +<p>This property holds whether the widget is visible. +<p>Calling <a href="qwidget.html#show">show</a>() sets the widget to visible status if all its parent +widgets up to the top-level widget are visible. If an ancestor is +not visible, the widget won't become visible until all its +ancestors are shown. +<p> Calling <a href="qwidget.html#hide">hide</a>() hides a widget explicitly. An explicitly hidden +widget will never become visible, even if all its ancestors become +visible, unless you show it. +<p> A widget receives show and hide events when its visibility status +changes. Between a hide and a show event, there is no need to +waste CPU cycles preparing or displaying information to the user. +A video application, for example, might simply stop generating new +frames. +<p> A widget that happens to be obscured by other windows on the +screen is considered to be visible. The same applies to iconified +top-level widgets and windows that exist on another virtual +desktop (on platforms that support this concept). A widget +receives spontaneous show and hide events when its mapping status +is changed by the window system, e.g. a spontaneous hide event +when the user minimizes the window, and a spontaneous show event +when the window is restored again. +<p> <p>See also <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#hidden-prop">hidden</a>, <a href="qwidget.html#isVisibleTo">isVisibleTo</a>(), <a href="qwidget.html#minimized-prop">minimized</a>, <a href="qwidget.html#showEvent">showEvent</a>(), and <a href="qwidget.html#hideEvent">hideEvent</a>(). + +<p>Get this property's value with <a href="qwidget.html#isVisible">isVisible</a>(). + + + + QWidget::visibleRect + +<p>This property holds the visible rectangle. +<p><b>This property is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. +<p> No longer necessary, you can simply call <a href="qwidget.html#repaint">repaint</a>(). If you do not +need the rectangle for repaint(), use <a href="qwidget.html#clipRegion">clipRegion</a>() instead. + +<p>Get this property's value with <a href="qwidget.html#visibleRect">visibleRect</a>(). + + + + QWidget::width + +<p>This property holds the width of the widget excluding any window frame. +<p>See the <a href="geometry.html">Window Geometry documentation</a> +for an overview of top-level widget geometry. +<p> <p>See also <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#height-prop">height</a>, and <a href="qwidget.html#size-prop">size</a>. + +<p>Get this property's value with <a href="qwidget.html#width">width</a>(). + + + + QWidget::windowOpacity + +<p>This property holds the level of opacity for the window. +<p>The valid range of opacity is from 1.0 (completely opaque) to +0.0 (completely transparent). +<p> By default the value of this property is 1.0. +<p> This feature is only present on Mac OS X and Windows 2000 and up. +<p> <b>Warning:</b> Changing this property from opaque to transparent might issue a +paint event that needs to be processed before the window is displayed +correctly. This affects mainly the use of <a href="qpixmap.html#grabWindow">QPixmap::grabWindow</a>(). Also note +that semi-transparent windows update and resize significantely slower than +opaque windows. + +<p>Set this property's value with <a href="qwidget.html#setWindowOpacity">setWindowOpacity</a>() and get this property's value with <a href="qwidget.html#windowOpacity">windowOpacity</a>(). + + + + QWidget::x + <p>This property holds the x coordinate of the widget relative to its parent including any window frame. +<p>See the <a href="geometry.html">Window Geometry documentation</a> +for an overview of top-level widget geometry. +<p> <p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#y-prop">y</a>, and <a href="qwidget.html#pos-prop">pos</a>. + +<p>Get this property's value with <a href="qwidget.html#x">x</a>(). + + + + QWidget::y + +<p>This property holds the y coordinate of the widget relative to its parent and including any window frame. +<p>See the <a href="geometry.html">Window Geometry documentation</a> +for an overview of top-level widget geometry. +<p> <p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#x-prop">x</a>, and <a href="qwidget.html#pos-prop">pos</a>. + +<p>Get this property's value with <a href="qwidget.html#y">y</a>(). + + + + QWizard::titleFont + +<p>This property holds the font used for page titles. +<p>The default is <a href="qapplication.html#font">QApplication::font</a>(). + +<p>Set this property's value with <a href="qwizard.html#setTitleFont">setTitleFont</a>() and get this property's value with <a href="qwizard.html#titleFont">titleFont</a>(). + + + + QWorkspace::scrollBarsEnabled + +<p>This property holds whether the workspace provides scrollbars. +<p>If this property is set to TRUE, it is possible to resize child +windows over the right or the bottom edge out of the visible area +of the workspace. The workspace shows scrollbars to make it +possible for the user to access those windows. If this property is +set to FALSE (the default), resizing windows out of the visible +area of the workspace is not permitted. + +<p>Set this property's value with <a href="qworkspace.html#setScrollBarsEnabled">setScrollBarsEnabled</a>() and get this property's value with <a href="qworkspace.html#scrollBarsEnabled">scrollBarsEnabled</a>(). + + + diff --git a/doc/html/propertyindex b/doc/html/propertyindex new file mode 100644 index 00000000..c108faa7 --- /dev/null +++ b/doc/html/propertyindex @@ -0,0 +1,425 @@ +"QAction/accel" qaction.html#accel-prop +"QAction/enabled" qaction.html#enabled-prop +"QAction/iconSet" qaction.html#iconSet-prop +"QAction/menuText" qaction.html#menuText-prop +"QAction/on" qaction.html#on-prop +"QAction/statusTip" qaction.html#statusTip-prop +"QAction/text" qaction.html#text-prop +"QAction/toggleAction" qaction.html#toggleAction-prop +"QAction/toolTip" qaction.html#toolTip-prop +"QAction/visible" qaction.html#visible-prop +"QAction/whatsThis" qaction.html#whatsThis-prop +"QActionGroup/exclusive" qactiongroup.html#exclusive-prop +"QActionGroup/usesDropDown" qactiongroup.html#usesDropDown-prop +"QAssistantClient/open" qassistantclient.html#open-prop +"QAxBase/control" qaxbase.html#control-prop +"QButton/accel" qbutton.html#accel-prop +"QButton/autoRepeat" qbutton.html#autoRepeat-prop +"QButton/autoResize" qbutton.html#autoResize-prop +"QButton/down" qbutton.html#down-prop +"QButton/exclusiveToggle" qbutton.html#exclusiveToggle-prop +"QButton/on" qbutton.html#on-prop +"QButton/pixmap" qbutton.html#pixmap-prop +"QButton/text" qbutton.html#text-prop +"QButton/toggleButton" qbutton.html#toggleButton-prop +"QButton/toggleState" qbutton.html#toggleState-prop +"QButton/toggleType" qbutton.html#toggleType-prop +"QButtonGroup/exclusive" qbuttongroup.html#exclusive-prop +"QButtonGroup/radioButtonExclusive" qbuttongroup.html#radioButtonExclusive-prop +"QButtonGroup/selectedId" qbuttongroup.html#selectedId-prop +"QCheckBox/checked" qcheckbox.html#checked-prop +"QCheckBox/tristate" qcheckbox.html#tristate-prop +"QComboBox/autoCompletion" qcombobox.html#autoCompletion-prop +"QComboBox/autoResize" qcombobox.html#autoResize-prop +"QComboBox/count" qcombobox.html#count-prop +"QComboBox/currentItem" qcombobox.html#currentItem-prop +"QComboBox/currentText" qcombobox.html#currentText-prop +"QComboBox/duplicatesEnabled" qcombobox.html#duplicatesEnabled-prop +"QComboBox/editable" qcombobox.html#editable-prop +"QComboBox/insertionPolicy" qcombobox.html#insertionPolicy-prop +"QComboBox/maxCount" qcombobox.html#maxCount-prop +"QComboBox/sizeLimit" qcombobox.html#sizeLimit-prop +"QDataBrowser/autoEdit" qdatabrowser.html#autoEdit-prop +"QDataBrowser/boundaryChecking" qdatabrowser.html#boundaryChecking-prop +"QDataBrowser/confirmCancels" qdatabrowser.html#confirmCancels-prop +"QDataBrowser/confirmDelete" qdatabrowser.html#confirmDelete-prop +"QDataBrowser/confirmEdits" qdatabrowser.html#confirmEdits-prop +"QDataBrowser/confirmInsert" qdatabrowser.html#confirmInsert-prop +"QDataBrowser/confirmUpdate" qdatabrowser.html#confirmUpdate-prop +"QDataBrowser/filter" qdatabrowser.html#filter-prop +"QDataBrowser/readOnly" qdatabrowser.html#readOnly-prop +"QDataBrowser/sort" qdatabrowser.html#sort-prop +"QDataTable/autoEdit" qdatatable.html#autoEdit-prop +"QDataTable/confirmCancels" qdatatable.html#confirmCancels-prop +"QDataTable/confirmDelete" qdatatable.html#confirmDelete-prop +"QDataTable/confirmEdits" qdatatable.html#confirmEdits-prop +"QDataTable/confirmInsert" qdatatable.html#confirmInsert-prop +"QDataTable/confirmUpdate" qdatatable.html#confirmUpdate-prop +"QDataTable/dateFormat" qdatatable.html#dateFormat-prop +"QDataTable/falseText" qdatatable.html#falseText-prop +"QDataTable/filter" qdatatable.html#filter-prop +"QDataTable/nullText" qdatatable.html#nullText-prop +"QDataTable/numCols" qdatatable.html#numCols-prop +"QDataTable/numRows" qdatatable.html#numRows-prop +"QDataTable/sort" qdatatable.html#sort-prop +"QDataTable/trueText" qdatatable.html#trueText-prop +"QDateEdit/autoAdvance" qdateedit.html#autoAdvance-prop +"QDateEdit/date" qdateedit.html#date-prop +"QDateEdit/maxValue" qdateedit.html#maxValue-prop +"QDateEdit/minValue" qdateedit.html#minValue-prop +"QDateEdit/order" qdateedit.html#order-prop +"QDateTimeEdit/dateTime" qdatetimeedit.html#dateTime-prop +"QDial/lineStep" qdial.html#lineStep-prop +"QDial/maxValue" qdial.html#maxValue-prop +"QDial/minValue" qdial.html#minValue-prop +"QDial/notchSize" qdial.html#notchSize-prop +"QDial/notchTarget" qdial.html#notchTarget-prop +"QDial/notchesVisible" qdial.html#notchesVisible-prop +"QDial/pageStep" qdial.html#pageStep-prop +"QDial/tracking" qdial.html#tracking-prop +"QDial/value" qdial.html#value-prop +"QDial/wrapping" qdial.html#wrapping-prop +"QDialog/modal" qdialog.html#modal-prop +"QDialog/sizeGripEnabled" qdialog.html#sizeGripEnabled-prop +"QDockArea/count" qdockarea.html#count-prop +"QDockArea/empty" qdockarea.html#empty-prop +"QDockArea/handlePosition" qdockarea.html#handlePosition-prop +"QDockArea/orientation" qdockarea.html#orientation-prop +"QDockWindow/closeMode" qdockwindow.html#closeMode-prop +"QDockWindow/horizontallyStretchable" qdockwindow.html#horizontallyStretchable-prop +"QDockWindow/movingEnabled" qdockwindow.html#movingEnabled-prop +"QDockWindow/newLine" qdockwindow.html#newLine-prop +"QDockWindow/offset" qdockwindow.html#offset-prop +"QDockWindow/opaqueMoving" qdockwindow.html#opaqueMoving-prop +"QDockWindow/place" qdockwindow.html +"QDockWindow/resizeEnabled" qdockwindow.html#resizeEnabled-prop +"QDockWindow/stretchable" qdockwindow.html#stretchable-prop +"QDockWindow/verticallyStretchable" qdockwindow.html#verticallyStretchable-prop +"QDoubleValidator/bottom" qdoublevalidator.html#bottom-prop +"QDoubleValidator/decimals" qdoublevalidator.html#decimals-prop +"QDoubleValidator/top" qdoublevalidator.html#top-prop +"QFileDialog/contentsPreview" qfiledialog.html#contentsPreview-prop +"QFileDialog/dirPath" qfiledialog.html#dirPath-prop +"QFileDialog/infoPreview" qfiledialog.html#infoPreview-prop +"QFileDialog/mode" qfiledialog.html#mode-prop +"QFileDialog/previewMode" qfiledialog.html#previewMode-prop +"QFileDialog/selectedFile" qfiledialog.html#selectedFile-prop +"QFileDialog/selectedFiles" qfiledialog.html#selectedFiles-prop +"QFileDialog/selectedFilter" qfiledialog.html#selectedFilter-prop +"QFileDialog/showHiddenFiles" qfiledialog.html#showHiddenFiles-prop +"QFileDialog/viewMode" qfiledialog.html#viewMode-prop +"QFrame/contentsRect" qframe.html#contentsRect-prop +"QFrame/frameRect" qframe.html#frameRect-prop +"QFrame/frameShadow" qframe.html#frameShadow-prop +"QFrame/frameShape" qframe.html#frameShape-prop +"QFrame/frameWidth" qframe.html#frameWidth-prop +"QFrame/lineWidth" qframe.html#lineWidth-prop +"QFrame/margin" qframe.html#margin-prop +"QFrame/midLineWidth" qframe.html#midLineWidth-prop +"QGridView/cellHeight" qgridview.html#cellHeight-prop +"QGridView/cellWidth" qgridview.html#cellWidth-prop +"QGridView/numCols" qgridview.html#numCols-prop +"QGridView/numRows" qgridview.html#numRows-prop +"QGroupBox/alignment" qgroupbox.html#alignment-prop +"QGroupBox/checkable" qgroupbox.html#checkable-prop +"QGroupBox/checked" qgroupbox.html#checked-prop +"QGroupBox/columns" qgroupbox.html#columns-prop +"QGroupBox/flat" qgroupbox.html#flat-prop +"QGroupBox/orientation" qgroupbox.html#orientation-prop +"QGroupBox/title" qgroupbox.html#title-prop +"QHeader/count" qheader.html#count-prop +"QHeader/moving" qheader.html#moving-prop +"QHeader/offset" qheader.html#offset-prop +"QHeader/orientation" qheader.html#orientation-prop +"QHeader/stretching" qheader.html#stretching-prop +"QHeader/tracking" qheader.html#tracking-prop +"QIconView/arrangement" qiconview.html#arrangement-prop +"QIconView/autoArrange" qiconview.html#autoArrange-prop +"QIconView/count" qiconview.html#count-prop +"QIconView/gridX" qiconview.html#gridX-prop +"QIconView/gridY" qiconview.html#gridY-prop +"QIconView/itemTextBackground" qiconview.html#itemTextBackground-prop +"QIconView/itemTextPos" qiconview.html#itemTextPos-prop +"QIconView/itemsMovable" qiconview.html#itemsMovable-prop +"QIconView/maxItemTextLength" qiconview.html#maxItemTextLength-prop +"QIconView/maxItemWidth" qiconview.html#maxItemWidth-prop +"QIconView/resizeMode" qiconview.html#resizeMode-prop +"QIconView/selectionMode" qiconview.html#selectionMode-prop +"QIconView/showToolTips" qiconview.html#showToolTips-prop +"QIconView/sortDirection" qiconview.html#sortDirection-prop +"QIconView/sorting" qiconview.html#sorting-prop +"QIconView/spacing" qiconview.html#spacing-prop +"QIconView/wordWrapIconText" qiconview.html#wordWrapIconText-prop +"QIntValidator/bottom" qintvalidator.html#bottom-prop +"QIntValidator/top" qintvalidator.html#top-prop +"QLCDNumber/intValue" qlcdnumber.html#intValue-prop +"QLCDNumber/mode" qlcdnumber.html#mode-prop +"QLCDNumber/numDigits" qlcdnumber.html#numDigits-prop +"QLCDNumber/segmentStyle" qlcdnumber.html#segmentStyle-prop +"QLCDNumber/smallDecimalPoint" qlcdnumber.html#smallDecimalPoint-prop +"QLCDNumber/value" qlcdnumber.html#value-prop +"QLabel/alignment" qlabel.html#alignment-prop +"QLabel/indent" qlabel.html#indent-prop +"QLabel/pixmap" qlabel.html#pixmap-prop +"QLabel/scaledContents" qlabel.html#scaledContents-prop +"QLabel/text" qlabel.html#text-prop +"QLabel/textFormat" qlabel.html#textFormat-prop +"QLayout/margin" qlayout.html#margin-prop +"QLayout/resizeMode" qlayout.html#resizeMode-prop +"QLayout/spacing" qlayout.html#spacing-prop +"QLineEdit/acceptableInput" qlineedit.html#acceptableInput-prop +"QLineEdit/alignment" qlineedit.html#alignment-prop +"QLineEdit/cursorPosition" qlineedit.html#cursorPosition-prop +"QLineEdit/displayText" qlineedit.html#displayText-prop +"QLineEdit/dragEnabled" qlineedit.html#dragEnabled-prop +"QLineEdit/echoMode" qlineedit.html#echoMode-prop +"QLineEdit/edited" qlineedit.html#edited-prop +"QLineEdit/frame" qlineedit.html#frame-prop +"QLineEdit/hasMarkedText" qlineedit.html#hasMarkedText-prop +"QLineEdit/hasSelectedText" qlineedit.html#hasSelectedText-prop +"QLineEdit/inputMask" qlineedit.html#inputMask-prop +"QLineEdit/markedText" qlineedit.html#markedText-prop +"QLineEdit/maxLength" qlineedit.html#maxLength-prop +"QLineEdit/modified" qlineedit.html#modified-prop +"QLineEdit/readOnly" qlineedit.html#readOnly-prop +"QLineEdit/redoAvailable" qlineedit.html#redoAvailable-prop +"QLineEdit/selectedText" qlineedit.html#selectedText-prop +"QLineEdit/text" qlineedit.html#text-prop +"QLineEdit/undoAvailable" qlineedit.html#undoAvailable-prop +"QListBox/columnMode" qlistbox.html#columnMode-prop +"QListBox/count" qlistbox.html#count-prop +"QListBox/currentItem" qlistbox.html#currentItem-prop +"QListBox/currentText" qlistbox.html#currentText-prop +"QListBox/multiSelection" qlistbox.html#multiSelection-prop +"QListBox/numColumns" qlistbox.html#numColumns-prop +"QListBox/numItemsVisible" qlistbox.html#numItemsVisible-prop +"QListBox/numRows" qlistbox.html#numRows-prop +"QListBox/rowMode" qlistbox.html#rowMode-prop +"QListBox/selectionMode" qlistbox.html#selectionMode-prop +"QListBox/topItem" qlistbox.html#topItem-prop +"QListBox/variableHeight" qlistbox.html#variableHeight-prop +"QListBox/variableWidth" qlistbox.html#variableWidth-prop +"QListView/allColumnsShowFocus" qlistview.html#allColumnsShowFocus-prop +"QListView/childCount" qlistview.html#childCount-prop +"QListView/columns" qlistview.html#columns-prop +"QListView/defaultRenameAction" qlistview.html#defaultRenameAction-prop +"QListView/itemMargin" qlistview.html#itemMargin-prop +"QListView/multiSelection" qlistview.html#multiSelection-prop +"QListView/resizeMode" qlistview.html#resizeMode-prop +"QListView/rootIsDecorated" qlistview.html#rootIsDecorated-prop +"QListView/selectionMode" qlistview.html#selectionMode-prop +"QListView/showSortIndicator" qlistview.html#showSortIndicator-prop +"QListView/showToolTips" qlistview.html#showToolTips-prop +"QListView/treeStepSize" qlistview.html#treeStepSize-prop +"QMainWindow/dockWindowsMovable" qmainwindow.html#dockWindowsMovable-prop +"QMainWindow/opaqueMoving" qmainwindow.html#opaqueMoving-prop +"QMainWindow/rightJustification" qmainwindow.html#rightJustification-prop +"QMainWindow/usesBigPixmaps" qmainwindow.html#usesBigPixmaps-prop +"QMainWindow/usesTextLabel" qmainwindow.html#usesTextLabel-prop +"QMenuBar/defaultUp" qmenubar.html#defaultUp-prop +"QMenuBar/separator" qmenubar.html#separator-prop +"QMessageBox/icon" qmessagebox.html#icon-prop +"QMessageBox/iconPixmap" qmessagebox.html#iconPixmap-prop +"QMessageBox/text" qmessagebox.html#text-prop +"QMessageBox/textFormat" qmessagebox.html#textFormat-prop +"QMultiLineEdit/alignment" qmultilineedit.html#alignment-prop +"QMultiLineEdit/atBeginning" qmultilineedit.html#atBeginning-prop +"QMultiLineEdit/atEnd" qmultilineedit.html#atEnd-prop +"QMultiLineEdit/edited" qmultilineedit.html#edited-prop +"QMultiLineEdit/numLines" qmultilineedit.html#numLines-prop +"QObject/name" qobject.html#name-prop +"QPopupMenu/checkable" qpopupmenu.html#checkable-prop +"QProgressBar/centerIndicator" qprogressbar.html#centerIndicator-prop +"QProgressBar/indicatorFollowsStyle" qprogressbar.html#indicatorFollowsStyle-prop +"QProgressBar/percentageVisible" qprogressbar.html#percentageVisible-prop +"QProgressBar/progress" qprogressbar.html#progress-prop +"QProgressBar/progressString" qprogressbar.html#progressString-prop +"QProgressBar/totalSteps" qprogressbar.html#totalSteps-prop +"QProgressDialog/autoClose" qprogressdialog.html#autoClose-prop +"QProgressDialog/autoReset" qprogressdialog.html#autoReset-prop +"QProgressDialog/labelText" qprogressdialog.html#labelText-prop +"QProgressDialog/minimumDuration" qprogressdialog.html#minimumDuration-prop +"QProgressDialog/progress" qprogressdialog.html#progress-prop +"QProgressDialog/totalSteps" qprogressdialog.html#totalSteps-prop +"QProgressDialog/wasCanceled" qprogressdialog.html#wasCanceled-prop +"QProgressDialog/wasCancelled" qprogressdialog.html#wasCancelled-prop +"QPushButton/autoDefault" qpushbutton.html#autoDefault-prop +"QPushButton/default" qpushbutton.html#default-prop +"QPushButton/flat" qpushbutton.html#flat-prop +"QPushButton/iconSet" qpushbutton.html#iconSet-prop +"QPushButton/menuButton" qpushbutton.html#menuButton-prop +"QRadioButton/checked" qradiobutton.html#checked-prop +"QScrollBar/draggingSlider" qscrollbar.html#draggingSlider-prop +"QScrollBar/lineStep" qscrollbar.html#lineStep-prop +"QScrollBar/maxValue" qscrollbar.html#maxValue-prop +"QScrollBar/minValue" qscrollbar.html#minValue-prop +"QScrollBar/orientation" qscrollbar.html#orientation-prop +"QScrollBar/pageStep" qscrollbar.html#pageStep-prop +"QScrollBar/tracking" qscrollbar.html#tracking-prop +"QScrollBar/value" qscrollbar.html#value-prop +"QScrollView/contentsHeight" qscrollview.html#contentsHeight-prop +"QScrollView/contentsWidth" qscrollview.html#contentsWidth-prop +"QScrollView/contentsX" qscrollview.html#contentsX-prop +"QScrollView/contentsY" qscrollview.html#contentsY-prop +"QScrollView/dragAutoScroll" qscrollview.html#dragAutoScroll-prop +"QScrollView/hScrollBarMode" qscrollview.html#hScrollBarMode-prop +"QScrollView/resizePolicy" qscrollview.html#resizePolicy-prop +"QScrollView/vScrollBarMode" qscrollview.html#vScrollBarMode-prop +"QScrollView/visibleHeight" qscrollview.html#visibleHeight-prop +"QScrollView/visibleWidth" qscrollview.html#visibleWidth-prop +"QSlider/lineStep" qslider.html#lineStep-prop +"QSlider/maxValue" qslider.html#maxValue-prop +"QSlider/minValue" qslider.html#minValue-prop +"QSlider/orientation" qslider.html#orientation-prop +"QSlider/pageStep" qslider.html#pageStep-prop +"QSlider/tickInterval" qslider.html#tickInterval-prop +"QSlider/tickmarks" qslider.html#tickmarks-prop +"QSlider/tracking" qslider.html#tracking-prop +"QSlider/value" qslider.html#value-prop +"QSpinBox/buttonSymbols" qspinbox.html#buttonSymbols-prop +"QSpinBox/cleanText" qspinbox.html#cleanText-prop +"QSpinBox/lineStep" qspinbox.html#lineStep-prop +"QSpinBox/maxValue" qspinbox.html#maxValue-prop +"QSpinBox/minValue" qspinbox.html#minValue-prop +"QSpinBox/prefix" qspinbox.html#prefix-prop +"QSpinBox/specialValueText" qspinbox.html#specialValueText-prop +"QSpinBox/suffix" qspinbox.html#suffix-prop +"QSpinBox/text" qspinbox.html#text-prop +"QSpinBox/value" qspinbox.html#value-prop +"QSpinBox/wrapping" qspinbox.html#wrapping-prop +"QSplitter/childrenCollapsible" qsplitter.html#childrenCollapsible-prop +"QSplitter/handleWidth" qsplitter.html#handleWidth-prop +"QSplitter/opaqueResize" qsplitter.html#opaqueResize-prop +"QSplitter/orientation" qsplitter.html#orientation-prop +"QSqlDatabase/connectOptions" qsqldatabase.html#connectOptions-prop +"QSqlDatabase/databaseName" qsqldatabase.html#databaseName-prop +"QSqlDatabase/hostName" qsqldatabase.html#hostName-prop +"QSqlDatabase/password" qsqldatabase.html#password-prop +"QSqlDatabase/port" qsqldatabase.html#port-prop +"QSqlDatabase/userName" qsqldatabase.html#userName-prop +"QStatusBar/sizeGripEnabled" qstatusbar.html#sizeGripEnabled-prop +"QTabBar/count" qtabbar.html#count-prop +"QTabBar/currentTab" qtabbar.html#currentTab-prop +"QTabBar/keyboardFocusTab" qtabbar.html#keyboardFocusTab-prop +"QTabBar/shape" qtabbar.html#shape-prop +"QTabWidget/count" qtabwidget.html#count-prop +"QTabWidget/currentPage" qtabwidget.html#currentPage-prop +"QTabWidget/margin" qtabwidget.html#margin-prop +"QTabWidget/tabPosition" qtabwidget.html#tabPosition-prop +"QTabWidget/tabShape" qtabwidget.html#tabShape-prop +"QTable/columnMovingEnabled" qtable.html#columnMovingEnabled-prop +"QTable/focusStyle" qtable.html#focusStyle-prop +"QTable/numCols" qtable.html#numCols-prop +"QTable/numRows" qtable.html#numRows-prop +"QTable/numSelections" qtable.html#numSelections-prop +"QTable/readOnly" qtable.html#readOnly-prop +"QTable/rowMovingEnabled" qtable.html#rowMovingEnabled-prop +"QTable/selectionMode" qtable.html#selectionMode-prop +"QTable/showGrid" qtable.html#showGrid-prop +"QTable/sorting" qtable.html#sorting-prop +"QTextBrowser/source" qtextbrowser.html#source-prop +"QTextEdit/autoFormatting" qtextedit.html#autoFormatting-prop +"QTextEdit/documentTitle" qtextedit.html#documentTitle-prop +"QTextEdit/hasSelectedText" qtextedit.html#hasSelectedText-prop +"QTextEdit/length" qtextedit.html#length-prop +"QTextEdit/linkUnderline" qtextedit.html#linkUnderline-prop +"QTextEdit/modified" qtextedit.html#modified-prop +"QTextEdit/overwriteMode" qtextedit.html#overwriteMode-prop +"QTextEdit/paper" qtextedit.html#paper-prop +"QTextEdit/readOnly" qtextedit.html#readOnly-prop +"QTextEdit/selectedText" qtextedit.html#selectedText-prop +"QTextEdit/tabChangesFocus" qtextedit.html#tabChangesFocus-prop +"QTextEdit/tabStopWidth" qtextedit.html#tabStopWidth-prop +"QTextEdit/text" qtextedit.html#text-prop +"QTextEdit/textFormat" qtextedit.html#textFormat-prop +"QTextEdit/undoDepth" qtextedit.html#undoDepth-prop +"QTextEdit/undoRedoEnabled" qtextedit.html#undoRedoEnabled-prop +"QTextEdit/wordWrap" qtextedit.html#wordWrap-prop +"QTextEdit/wrapColumnOrWidth" qtextedit.html#wrapColumnOrWidth-prop +"QTextEdit/wrapPolicy" qtextedit.html#wrapPolicy-prop +"QTimeEdit/autoAdvance" qtimeedit.html#autoAdvance-prop +"QTimeEdit/display" qtimeedit.html#display-prop +"QTimeEdit/maxValue" qtimeedit.html#maxValue-prop +"QTimeEdit/minValue" qtimeedit.html#minValue-prop +"QTimeEdit/time" qtimeedit.html#time-prop +"QToolBar/label" qtoolbar.html#label-prop +"QToolBox/count" qtoolbox.html#count-prop +"QToolBox/currentIndex" qtoolbox.html#currentIndex-prop +"QToolButton/autoRaise" qtoolbutton.html#autoRaise-prop +"QToolButton/iconSet" qtoolbutton.html#iconSet-prop +"QToolButton/offIconSet" qtoolbutton.html#offIconSet-prop +"QToolButton/onIconSet" qtoolbutton.html#onIconSet-prop +"QToolButton/popupDelay" qtoolbutton.html#popupDelay-prop +"QToolButton/textLabel" qtoolbutton.html#textLabel-prop +"QToolButton/textPosition" qtoolbutton.html#textPosition-prop +"QToolButton/usesBigPixmap" qtoolbutton.html#usesBigPixmap-prop +"QToolButton/usesTextLabel" qtoolbutton.html#usesTextLabel-prop +"QToolTipGroup/delay" qtooltipgroup.html#delay-prop +"QToolTipGroup/enabled" qtooltipgroup.html#enabled-prop +"QWidget/acceptDrops" qwidget.html#acceptDrops-prop +"QWidget/autoMask" qwidget.html#autoMask-prop +"QWidget/backgroundBrush" qwidget.html#backgroundBrush-prop +"QWidget/backgroundMode" qwidget.html#backgroundMode-prop +"QWidget/backgroundOrigin" qwidget.html#backgroundOrigin-prop +"QWidget/baseSize" qwidget.html#baseSize-prop +"QWidget/caption" qwidget.html#caption-prop +"QWidget/childrenRect" qwidget.html#childrenRect-prop +"QWidget/childrenRegion" qwidget.html#childrenRegion-prop +"QWidget/colorGroup" qwidget.html#colorGroup-prop +"QWidget/cursor" qwidget.html#cursor-prop +"QWidget/customWhatsThis" qwidget.html#customWhatsThis-prop +"QWidget/enabled" qwidget.html#enabled-prop +"QWidget/focus" qwidget.html#focus-prop +"QWidget/focusEnabled" qwidget.html#focusEnabled-prop +"QWidget/focusPolicy" qwidget.html#focusPolicy-prop +"QWidget/font" qwidget.html#font-prop +"QWidget/frameGeometry" qwidget.html#frameGeometry-prop +"QWidget/frameSize" qwidget.html#frameSize-prop +"QWidget/fullScreen" qwidget.html#fullScreen-prop +"QWidget/geometry" qwidget.html#geometry-prop +"QWidget/height" qwidget.html#height-prop +"QWidget/hidden" qwidget.html#hidden-prop +"QWidget/icon" qwidget.html#icon-prop +"QWidget/iconText" qwidget.html#iconText-prop +"QWidget/inputMethodEnabled" qwidget.html#inputMethodEnabled-prop +"QWidget/isActiveWindow" qwidget.html#isActiveWindow-prop +"QWidget/isDesktop" qwidget.html#isDesktop-prop +"QWidget/isDialog" qwidget.html#isDialog-prop +"QWidget/isModal" qwidget.html#isModal-prop +"QWidget/isPopup" qwidget.html#isPopup-prop +"QWidget/isTopLevel" qwidget.html#isTopLevel-prop +"QWidget/maximized" qwidget.html#maximized-prop +"QWidget/maximumHeight" qwidget.html#maximumHeight-prop +"QWidget/maximumSize" qwidget.html#maximumSize-prop +"QWidget/maximumWidth" qwidget.html#maximumWidth-prop +"QWidget/microFocusHint" qwidget.html#microFocusHint-prop +"QWidget/minimized" qwidget.html#minimized-prop +"QWidget/minimumHeight" qwidget.html#minimumHeight-prop +"QWidget/minimumSize" qwidget.html#minimumSize-prop +"QWidget/minimumSizeHint" qwidget.html#minimumSizeHint-prop +"QWidget/minimumWidth" qwidget.html#minimumWidth-prop +"QWidget/mouseTracking" qwidget.html#mouseTracking-prop +"QWidget/ownCursor" qwidget.html#ownCursor-prop +"QWidget/ownFont" qwidget.html#ownFont-prop +"QWidget/ownPalette" qwidget.html#ownPalette-prop +"QWidget/palette" qwidget.html#palette-prop +"QWidget/paletteBackgroundColor" qwidget.html#paletteBackgroundColor-prop +"QWidget/paletteBackgroundPixmap" qwidget.html#paletteBackgroundPixmap-prop +"QWidget/paletteForegroundColor" qwidget.html#paletteForegroundColor-prop +"QWidget/pos" qwidget.html#pos-prop +"QWidget/rect" qwidget.html#rect-prop +"QWidget/shown" qwidget.html#shown-prop +"QWidget/size" qwidget.html#size-prop +"QWidget/sizeHint" qwidget.html#sizeHint-prop +"QWidget/sizeIncrement" qwidget.html#sizeIncrement-prop +"QWidget/sizePolicy" qwidget.html#sizePolicy-prop +"QWidget/underMouse" qwidget.html#underMouse-prop +"QWidget/updatesEnabled" qwidget.html#updatesEnabled-prop +"QWidget/visible" qwidget.html#visible-prop +"QWidget/visibleRect" qwidget.html#visibleRect-prop +"QWidget/width" qwidget.html#width-prop +"QWidget/windowOpacity" qwidget.html#windowOpacity-prop +"QWidget/x" qwidget.html#x-prop +"QWidget/y" qwidget.html#y-prop +"QWizard/titleFont" qwizard.html#titleFont-prop +"QWorkspace/scrollBarsEnabled" qworkspace.html#scrollBarsEnabled-prop diff --git a/doc/html/qaccel-h.html b/doc/html/qaccel-h.html new file mode 100644 index 00000000..5b630c51 --- /dev/null +++ b/doc/html/qaccel-h.html @@ -0,0 +1,155 @@ + + + + + +qaccel.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qaccel.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qaccel.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQAccel class
+**
+** Created : 950419
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQACCEL_H
+#define TQACCEL_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qkeysequence.h"
+#endif // QT_H
+
+#ifndef QT_NO_ACCEL
+
+class TQAccelPrivate;
+
+class Q_EXPORT TQAccel : public TQObject			// accelerator class
+{
+    Q_OBJECT
+public:
+    TQAccel( TQWidget *parent, const char *name=0 );
+    TQAccel( TQWidget* watch, TQObject *parent, const char *name=0 );
+    ~TQAccel();
+
+    bool isEnabled() const;
+    void setEnabled( bool );
+
+    uint count() const;
+
+    int insertItem( const TQKeySequence& key, int id=-1);
+    void removeItem( int id );
+    void clear();
+
+    TQKeySequence key( int id );
+    int findKey( const TQKeySequence& key ) const;
+
+    bool isItemEnabled( int id ) const;
+    void setItemEnabled( int id, bool enable );
+
+    bool connectItem( int id,  const TQObject *receiver, const char* member );
+    bool disconnectItem( int id,  const TQObject *receiver, const char* member );
+
+    void repairEventFilter();
+
+    void setWhatsThis( int id, const TQString& );
+    TQString whatsThis( int id ) const;
+    void setIgnoreWhatsThis( bool );
+    bool ignoreWhatsThis() const;
+
+    static TQKeySequence shortcutKey( const TQString & );
+    static TQString keyToString(TQKeySequence k );
+    static TQKeySequence stringToKey( const TQString & );
+
+signals:
+    void activated( int id );
+    void activatedAmbiguously( int id );
+
+protected:
+    bool eventFilter( TQObject *, TQEvent * );
+
+private:
+    TQAccelPrivate * d;
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQAccel( const TQAccel & );
+    TQAccel &operator=( const TQAccel & );
+#endif
+    friend class TQAccelPrivate;
+    friend class TQAccelManager;
+};
+
+#endif // QT_NO_ACCEL
+#endif // TQACCEL_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaccel-members.html b/doc/html/qaccel-members.html new file mode 100644 index 00000000..f9c49ecb --- /dev/null +++ b/doc/html/qaccel-members.html @@ -0,0 +1,110 @@ + + + + + +TQAccel Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAccel

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaccel.html b/doc/html/qaccel.html new file mode 100644 index 00000000..b7c1dd7f --- /dev/null +++ b/doc/html/qaccel.html @@ -0,0 +1,337 @@ + + + + + +TQAccel Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAccel Class Reference

+ +

The TQAccel class handles keyboard accelerator and shortcut keys. +More... +

#include <qaccel.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • TQAccel ( TQWidget * parent, const char * name = 0 )
  • +
  • TQAccel ( TQWidget * watch, TQObject * parent, const char * name = 0 )
  • +
  • ~TQAccel ()
  • +
  • bool isEnabled () const
  • +
  • void setEnabled ( bool enable )
  • +
  • uint count () const
  • +
  • int insertItem ( const TQKeySequence & key, int id = -1 )
  • +
  • void removeItem ( int id )
  • +
  • void clear ()
  • +
  • TQKeySequence key ( int id )
  • +
  • int findKey ( const TQKeySequence & key ) const
  • +
  • bool isItemEnabled ( int id ) const
  • +
  • void setItemEnabled ( int id, bool enable )
  • +
  • bool connectItem ( int id, const TQObject * receiver, const char * member )
  • +
  • bool disconnectItem ( int id, const TQObject * receiver, const char * member )
  • +
  • void repairEventFilter ()  (obsolete)
  • +
  • void setWhatsThis ( int id, const TQString & text )
  • +
  • TQString whatsThis ( int id ) const
  • +
+

Signals

+ +

Static Public Members

+
    +
  • TQKeySequence shortcutKey ( const TQString & str )
  • +
  • TQString keyToString ( TQKeySequence k )  (obsolete)
  • +
  • TQKeySequence stringToKey ( const TQString & s )  (obsolete)
  • +
+

Protected Members

+
    +
  • virtual bool eventFilter ( TQObject *, TQEvent * )  (obsolete)
  • +
+

Detailed Description

+ + +The TQAccel class handles keyboard accelerator and shortcut keys. +

+

A keyboard accelerator triggers an action when a certain key +combination is pressed. The accelerator handles all keyboard +activity for all the children of one top-level widget, so it is +not affected by the keyboard focus. +

In most cases, you will not need to use this class directly. Use +the TQAction class to create actions with accelerators that can be +used in both menus and toolbars. If you're only interested in +menus use TQMenuData::insertItem() or TQMenuData::setAccel() to make +accelerators for operations that are also available on menus. Many +widgets automatically generate accelerators, such as TQButton, +TQGroupBox, TQLabel (with TQLabel::setBuddy()), TQMenuBar and TQTabBar. +Example: +

+        TQPushButton p( "&Exit", parent ); // automatic shortcut ALT+Key_E
+        TQPopupMenu *fileMenu = new fileMenu( parent );
+        fileMenu->insertItem( "Undo", parent, SLOT(undo()), CTRL+Key_Z );
+    
+ +

A TQAccel contains a list of accelerator items that can be +manipulated using insertItem(), removeItem(), clear(), key() and +findKey(). +

Each accelerator item consists of an identifier and a TQKeySequence. A single key sequence consists of a keyboard code +combined with modifiers (SHIFT, CTRL, ALT or UNICODE_ACCEL). For example, CTRL + Key_P could be a shortcut +for printing a document. The key codes are listed in qnamespace.h. As an alternative, use UNICODE_ACCEL with the +unicode code point of the character. For example, UNICODE_ACCEL + 'A' gives the same accelerator as Key_A. +

When an accelerator key is pressed, the accelerator sends out the +signal activated() with a number that identifies this particular +accelerator item. Accelerator items can also be individually +connected, so that two different keys will activate two different +slots (see connectItem() and disconnectItem()). +

The activated() signal is not emitted when two or more +accelerators match the same key. Instead, the first matching +accelerator sends out the activatedAmbiguously() signal. By +pressing the key multiple times, users can navigate between all +matching accelerators. Some standard controls like TQPushButton and +TQCheckBox connect the activatedAmbiguously() signal to the +harmless setFocus() slot, whereas activated() is connected to a +slot invoking the button's action. Most controls, like TQLabel and +TQTabBar, treat activated() and activatedAmbiguously() as +equivalent. +

Use setEnabled() to enable or disable all the items in an +accelerator, or setItemEnabled() to enable or disable individual +items. An item is active only when both the TQAccel and the item +itself are enabled. +

The function setWhatsThis() specifies a help text that appears +when the user presses an accelerator key in What's This mode. +

The accelerator will be deleted when parent is deleted, +and will consume relevant key events until then. +

Please note that the accelerator +

+        accelerator->insertItem( TQKeySequence("M") );
+    
+ +can be triggered with both the 'M' key, and with Shift+M, +unless a second accelerator is defined for the Shift+M +combination. +

Example: +

+        TQAccel *a = new TQAccel( myWindow );        // create accels for myWindow
+        a->connectItem( a->insertItem(Key_P+CTRL), // adds Ctrl+P accelerator
+                        myWindow,                  // connected to myWindow's
+                        SLOT(printDoc()) );        // printDoc() slot
+    
+ +

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


Member Function Documentation

+

TQAccel::TQAccel ( TQWidget * parent, const char * name = 0 ) +

+Constructs a TQAccel object called name, with parent parent. +The accelerator operates on parent. + +

TQAccel::TQAccel ( TQWidget * watch, TQObject * parent, const char * name = 0 ) +

+Constructs a TQAccel object called name, that operates on watch, and is a child of parent. +

This constructor is not needed for normal application programming. + +

TQAccel::~TQAccel () +

+Destroys the accelerator object and frees all allocated resources. + +

void TQAccel::activated ( int id ) [signal] +

+ +

This signal is emitted when an accelerator key is pressed. id +is a number that identifies this particular accelerator item. +

See also activatedAmbiguously(). + +

void TQAccel::activatedAmbiguously ( int id ) [signal] +

+ +

This signal is emitted when an accelerator key is pressed. id +is a number that identifies this particular accelerator item. +

See also activated(). + +

void TQAccel::clear () +

+Removes all accelerator items. + +

bool TQAccel::connectItem ( int id, const TQObject * receiver, const char * member ) +

+Connects the accelerator item id to the slot member of receiver. +

+        a->connectItem( 201, mainView, SLOT(tquit()) );
+    
+ +

Of course, you can also send a signal as member. +

Normally accelerators are connected to slots which then receive +the activated(int id) signal with the id of the accelerator +item that was activated. If you choose to connect a specific +accelerator item using this function, the activated() signal is +emitted if the associated key sequence is pressed but no activated(int id) signal is emitted. +

See also disconnectItem(). + +

Example: t14/gamebrd.cpp. +

uint TQAccel::count () const +

+Returns the number of accelerator items in this accelerator. + +

bool TQAccel::disconnectItem ( int id, const TQObject * receiver, const char * member ) +

+Disconnects an accelerator item with id id from the function +called member in the receiver object. +

See also connectItem(). + +

bool TQAccel::eventFilter ( TQObject *, TQEvent * ) [virtual protected] +

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

Reimplemented from TQObject. +

int TQAccel::findKey ( const TQKeySequence & key ) const +

+Returns the identifier of the accelerator item with the key code +key, or -1 if the item cannot be found. + +

int TQAccel::insertItem ( const TQKeySequence & key, int id = -1 ) +

+Inserts an accelerator item and returns the item's identifier. +

key is a key code and an optional combination of SHIFT, CTRL +and ALT. id is the accelerator item id. +

If id is negative, then the item will be assigned a unique +negative identifier less than -1. +

+        TQAccel *a = new TQAccel( myWindow );        // create accels for myWindow
+        a->insertItem( CTRL + Key_P, 200 );        // Ctrl+P, e.g. to print document
+        a->insertItem( ALT + Key_X, 201 );         // Alt+X, e.g. to tquit
+        a->insertItem( UNICODE_ACCEL + 'q', 202 ); // Unicode 'q', e.g. to tquit
+        a->insertItem( Key_D );                    // gets a unique negative id < -1
+        a->insertItem( CTRL + SHIFT + Key_P );     // gets a unique negative id < -1
+    
+ + +

Example: t14/gamebrd.cpp. +

bool TQAccel::isEnabled () const +

+Returns TRUE if the accelerator is enabled; otherwise returns +FALSE. +

See also setEnabled() and isItemEnabled(). + +

bool TQAccel::isItemEnabled ( int id ) const +

+Returns TRUE if the accelerator item with the identifier id is +enabled. Returns FALSE if the item is disabled or cannot be found. +

See also setItemEnabled() and isEnabled(). + +

TQKeySequence TQAccel::key ( int id ) +

+Returns the key sequence of the accelerator item with identifier +id, or an invalid key sequence (0) if the id cannot be found. + +

TQString TQAccel::keyToString ( TQKeySequence k ) [static] +

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

Creates an accelerator string for the key k. +For instance CTRL+Key_O gives "Ctrl+O". The "Ctrl" etc. +are translated (using TQObject::tr()) in the "TQAccel" context. +

The function is superfluous. Cast the TQKeySequence k to a +TQString for the same effect. + +

void TQAccel::removeItem ( int id ) +

+Removes the accelerator item with the identifier id. + +

void TQAccel::repairEventFilter () +

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

void TQAccel::setEnabled ( bool enable ) +

+Enables the accelerator if enable is TRUE, or disables it if enable is FALSE. +

Individual keys can also be enabled or disabled using +setItemEnabled(). To work, a key must be an enabled item in an +enabled TQAccel. +

See also isEnabled() and setItemEnabled(). + +

void TQAccel::setItemEnabled ( int id, bool enable ) +

+Enables the accelerator item with the identifier id if enable is TRUE, and disables item id if enable is FALSE. +

To work, an item must be enabled and be in an enabled TQAccel. +

See also isItemEnabled() and isEnabled(). + +

void TQAccel::setWhatsThis ( int id, const TQString & text ) +

+Sets a What's This help text for the accelerator item id to text. +

The text will be shown when the application is in What's This mode +and the user hits the accelerator key. +

To set What's This help on a menu item (with or without an +accelerator key), use TQMenuData::setWhatsThis(). +

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

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

+Returns the shortcut key sequence for str, or an invalid key +sequence (0) if str has no shortcut sequence. +

For example, shortcutKey("E&xit") returns ALT+Key_X, +shortcutKey("&Quit") returns ALT+Key_Q and shortcutKey("Quit") +returns 0. (In code that does not inherit the TQt namespace class, +you must write e.g. TQt::ALT+TQt::Key_Q.) +

We provide a list of common accelerators in English. At the time of writing, Microsoft and Open +Group do not appear to have issued equivalent recommendations for +other languages. + +

TQKeySequence TQAccel::stringToKey ( const TQString & s ) [static] +

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

Returns an accelerator code for the string s. For example +"Ctrl+O" gives CTRL+UNICODE_ACCEL+'O'. The strings "Ctrl", +"Shift", "Alt" are recognized, as well as their translated +equivalents in the "TQAccel" context (using TQObject::tr()). Returns 0 +if s is not recognized. +

This function is typically used with tr(), so that accelerator keys can be replaced in +translations: +

+    TQPopupMenu *file = new TQPopupMenu( this );
+    file->insertItem( p1, tr("&Open..."), this, SLOT(open()),
+                      TQAccel::stringToKey(tr("Ctrl+O", "File|Open")) );
+  
+ +

Notice the "File|Open" translator comment. It is by no means +necessary, but it provides some context for the human translator. +

The function is superfluous. Construct a TQKeySequence from the +string s for the same effect. +

See also TQObject::tr() and Internationalization with TQt. + +

Example: i18n/mywidget.cpp. +

TQString TQAccel::whatsThis ( int id ) const +

+Returns the What's This help text for the specified item id or +TQString::null if no text has been specified. +

See also setWhatsThis(). + + +


+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/qaccessible-h.html b/doc/html/qaccessible-h.html new file mode 100644 index 00000000..0ab9461b --- /dev/null +++ b/doc/html/qaccessible-h.html @@ -0,0 +1,340 @@ + + + + + +qaccessible.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qaccessible.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qaccessible.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQAccessible and TQAccessibleObject classes
+**
+** Copyright (C) 2000-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQACCESSIBLE_H
+#define TQACCESSIBLE_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include <private/qcom_p.h>
+#include "qrect.h"
+#include "qguardedptr.h"
+#include "qmemarray.h"
+#endif // QT_H
+
+#if defined(QT_ACCESSIBILITY_SUPPORT)
+
+struct TQAccessibleInterface;
+
+class Q_EXPORT TQAccessible
+{
+private:
+#ifdef Q_WS_MAC
+    static TQMAC_PASCAL OSStatus globalEventProcessor(EventHandlerCallRef,  EventRef, void *);
+    static TQObject *queryAccessibleObject(TQAccessibleInterface *);
+#endif
+public:
+    enum Event {
+	SoundPlayed	    = 0x0001,
+	Alert		    = 0x0002,
+	ForegroundChanged   = 0x0003,
+	MenuStart	    = 0x0004,
+	MenuEnd		    = 0x0005,
+	PopupMenuStart	    = 0x0006,
+	PopupMenuEnd	    = 0x0007,
+	ContextHelpStart    = 0x000C,
+	ContextHelpEnd	    = 0x000D,
+	DragDropStart	    = 0x000E,
+	DragDropEnd	    = 0x000F,
+	DialogStart	    = 0x0010,
+	DialogEnd	    = 0x0011,
+	ScrollingStart	    = 0x0012,
+	ScrollingEnd	    = 0x0013,
+
+	MenuCommand	    = 0x0018,
+
+	ObjectCreated	    = 0x8000,
+	ObjectDestroyed	    = 0x8001,
+	ObjectShow	    = 0x8002,
+	ObjectHide	    = 0x8003,
+	ObjectReorder	    = 0x8004,
+	Focus		    = 0x8005,
+	Selection	    = 0x8006,
+	SelectionAdd	    = 0x8007,
+	SelectionRemove	    = 0x8008,
+	SelectionWithin	    = 0x8009,
+	StateChanged	    = 0x800A,
+	LocationChanged	    = 0x800B,
+	NameChanged	    = 0x800C,
+	DescriptionChanged  = 0x800D,
+	ValueChanged	    = 0x800E,
+	ParentChanged	    = 0x800F,
+	HelpChanged	    = 0x80A0,
+	DefaultActionChanged= 0x80B0,
+	AcceleratorChanged  = 0x80C0
+    };
+
+    enum State {
+	Normal		= 0x00000000,
+	Unavailable	= 0x00000001,
+	Selected	= 0x00000002,
+	Focused		= 0x00000004,
+	Pressed		= 0x00000008,
+	Checked		= 0x00000010,
+	Mixed		= 0x00000020,
+	ReadOnly	= 0x00000040,
+	HotTracked	= 0x00000080,
+	Default		= 0x00000100,
+	Expanded	= 0x00000200,
+	Collapsed	= 0x00000400,
+	Busy		= 0x00000800,
+	Floating	= 0x00001000,
+	Marqueed	= 0x00002000,
+	Animated	= 0x00004000,
+	Invisible	= 0x00008000,
+	Offscreen	= 0x00010000,
+	Sizeable	= 0x00020000,
+	Moveable	= 0x00040000,
+	SelfVoicing	= 0x00080000,
+	Focusable	= 0x00100000,
+	Selectable	= 0x00200000,
+	Linked		= 0x00400000,
+	Traversed	= 0x00800000,
+	MultiSelectable	= 0x01000000,
+	ExtSelectable	= 0x02000000,
+	AlertLow	= 0x04000000,
+	AlertMedium	= 0x08000000,
+	AlertHigh	= 0x10000000,
+	Protected	= 0x20000000,
+	Valid		= 0x3fffffff
+    };
+
+    enum Role {
+	NoRole		= 0x00000000,
+	TitleBar	= 0x00000001,
+	MenuBar		= 0x00000002,
+	ScrollBar	= 0x00000003,
+	Grip		= 0x00000004,
+	Sound		= 0x00000005,
+	Cursor		= 0x00000006,
+	Caret		= 0x00000007,
+	AlertMessage	= 0x00000008,
+	Window		= 0x00000009,
+	Client		= 0x0000000A,
+	PopupMenu	= 0x0000000B,
+	MenuItem	= 0x0000000C,
+	ToolTip		= 0x0000000D,
+	Application	= 0x0000000E,
+	Document	= 0x0000000F,
+	Pane		= 0x00000010,
+	Chart		= 0x00000011,
+	Dialog		= 0x00000012,
+	Border		= 0x00000013,
+	Grouping	= 0x00000014,
+	Separator	= 0x00000015,
+	ToolBar		= 0x00000016,
+	StatusBar	= 0x00000017,
+	Table		= 0x00000018,
+	ColumnHeader	= 0x00000019,
+	RowHeader	= 0x0000001A,
+	Column		= 0x0000001B,
+	Row		= 0x0000001C,
+	Cell		= 0x0000001D,
+	Link		= 0x0000001E,
+	HelpBalloon	= 0x0000001F,
+	Character	= 0x00000020,
+	List		= 0x00000021,
+	ListItem	= 0x00000022,
+	Outline		= 0x00000023,
+	OutlineItem	= 0x00000024,
+	PageTab		= 0x00000025,
+	PropertyPage	= 0x00000026,
+	Indicator	= 0x00000027,
+	Graphic		= 0x00000028,
+	StaticText	= 0x00000029,
+	EditableText	= 0x0000002A,  // Editable, selectable, etc.
+	PushButton	= 0x0000002B,
+	CheckBox	= 0x0000002C,
+	RadioButton	= 0x0000002D,
+	ComboBox	= 0x0000002E,
+	DropLest	= 0x0000002F,
+	ProgressBar	= 0x00000030,
+	Dial		= 0x00000031,
+	HotkeyField	= 0x00000032,
+	Slider		= 0x00000033,
+	SpinBox		= 0x00000034,
+	Diagram		= 0x00000035,
+	Animation	= 0x00000036,
+	Equation	= 0x00000037,
+	ButtonDropDown	= 0x00000038,
+	ButtonMenu	= 0x00000039,
+	ButtonDropGrid	= 0x0000003A,
+	Whitespace	= 0x0000003B,
+	PageTabList	= 0x0000003C,
+	Clock		= 0x0000003D
+    };
+
+    enum NavDirection {
+	NavUp		= 0x00000001,
+	NavDown		= 0x00000002,
+	NavLeft		= 0x00000003,
+	NavRight	= 0x00000004,
+	NavNext		= 0x00000005,
+	NavPrevious	= 0x00000006,
+	NavFirstChild	= 0x00000007,
+	NavLastChild	= 0x00000008,
+	NavFocusChild	= 0x00000009
+    };
+
+    enum Text {
+	Name		= 0,
+	Description,
+	Value,
+	Help,
+	Accelerator,
+	DefaultAction
+    };
+
+    static TQRESULT queryAccessibleInterface( TQObject *, TQAccessibleInterface ** );
+    static void updateAccessibility( TQObject *, int who, Event reason );
+    static bool isActive();
+
+    static void initialize();
+    static void cleanup();
+};
+
+// {EC86CB9C-5DA0-4c43-A739-13EBDF1C6B14}
+#define IID_QAccessible TQUuid( 0xec86cb9c, 0x5da0, 0x4c43, 0xa7, 0x39, 0x13, 0xeb, 0xdf, 0x1c, 0x6b, 0x14 )
+
+struct Q_EXPORT TQAccessibleInterface : public TQAccessible, public TQUnknownInterface
+{
+    // check for valid pointers
+    virtual bool	isValid() const = 0;
+
+    // hierarchy
+    virtual int		childCount() const = 0;
+    virtual TQRESULT	queryChild( int control, TQAccessibleInterface** ) const = 0;
+    virtual TQRESULT	queryParent( TQAccessibleInterface** ) const = 0;
+
+    // navigation
+    virtual int		controlAt( int x, int y ) const = 0;
+    virtual TQRect	rect( int control ) const = 0;
+    virtual int		navigate( NavDirection direction, int startControl ) const = 0;
+
+    // properties and state
+    virtual TQString	text( Text t, int control ) const = 0;
+    virtual void	setText( Text t, int control, const TQString &text ) = 0;
+    virtual Role	role( int control ) const = 0;
+    virtual State	state( int control ) const = 0;
+    virtual TQMemArray<int> selection() const = 0;
+
+    // methods
+    virtual bool	doDefaultAction( int control ) = 0;
+    virtual bool	setFocus( int control ) = 0;
+    virtual bool	setSelected( int control, bool on, bool extend ) = 0;
+    virtual void	clearSelection() = 0;    
+};
+
+// {49F4C6A7-412F-41DE-9E24-648843421FD3} 
+#ifndef IID_QAccessibleFactory
+#define IID_QAccessibleFactory TQUuid( 0x49f4c6a7, 0x412f, 0x41de, 0x9e, 0x24, 0x64, 0x88, 0x43, 0x42, 0x1f, 0xd3 )
+#endif
+
+struct Q_EXPORT TQAccessibleFactoryInterface : public TQAccessible, public TQFeatureListInterface
+{
+    virtual TQRESULT createAccessibleInterface( const TQString &, TQObject *, TQAccessibleInterface** ) = 0;
+};
+
+class Q_EXPORT TQAccessibleObject : public TQObject, public TQAccessibleInterface
+{
+public:
+    TQAccessibleObject( TQObject *object );
+    virtual ~TQAccessibleObject();
+
+    TQRESULT	queryInterface( const TQUuid &, TQUnknownInterface** );
+    Q_REFCOUNT
+
+    bool	isValid() const;
+
+protected:
+    TQObject *object() const;
+
+private:
+    TQGuardedPtr<TQObject> object_;
+};
+
+#define Q_DEFINED_QACCESSIBLE_OBJECT
+#include "qwinexport.h"
+#endif //QT_ACCESSIBILITY_SUPPORT
+
+#endif //TQACCESSIBLE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaccessible-members.html b/doc/html/qaccessible-members.html new file mode 100644 index 00000000..5cbc24d3 --- /dev/null +++ b/doc/html/qaccessible-members.html @@ -0,0 +1,49 @@ + + + + + +TQAccessible Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAccessible

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaccessible.html b/doc/html/qaccessible.html new file mode 100644 index 00000000..b54702f9 --- /dev/null +++ b/doc/html/qaccessible.html @@ -0,0 +1,291 @@ + + + + + +TQAccessible Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAccessible Class Reference

+ +

The TQAccessible class provides enums and static functions +relating to accessibility. +More... +

#include <qaccessible.h> +

Inherited by TQAccessibleInterface. +

List of all member functions. +

Public Members

+
    +
  • enum Event { SoundPlayed = 0x0001, Alert = 0x0002, ForegroundChanged = 0x0003, MenuStart = 0x0004, MenuEnd = 0x0005, PopupMenuStart = 0x0006, PopupMenuEnd = 0x0007, ContextHelpStart = 0x000C, ContextHelpEnd = 0x000D, DragDropStart = 0x000E, DragDropEnd = 0x000F, DialogStart = 0x0010, DialogEnd = 0x0011, ScrollingStart = 0x0012, ScrollingEnd = 0x0013, MenuCommand = 0x0018, ObjectCreated = 0x8000, ObjectDestroyed = 0x8001, ObjectShow = 0x8002, ObjectHide = 0x8003, ObjectReorder = 0x8004, Focus = 0x8005, Selection = 0x8006, SelectionAdd = 0x8007, SelectionRemove = 0x8008, SelectionWithin = 0x8009, StateChanged = 0x800A, LocationChanged = 0x800B, NameChanged = 0x800C, DescriptionChanged = 0x800D, ValueChanged = 0x800E, ParentChanged = 0x800F, HelpChanged = 0x80A0, DefaultActionChanged = 0x80B0, AcceleratorChanged = 0x80C0 }
  • +
  • enum State { Normal = 0x00000000, Unavailable = 0x00000001, Selected = 0x00000002, Focused = 0x00000004, Pressed = 0x00000008, Checked = 0x00000010, Mixed = 0x00000020, ReadOnly = 0x00000040, HotTracked = 0x00000080, Default = 0x00000100, Expanded = 0x00000200, Collapsed = 0x00000400, Busy = 0x00000800, Floating = 0x00001000, Marqueed = 0x00002000, Animated = 0x00004000, Invisible = 0x00008000, Offscreen = 0x00010000, Sizeable = 0x00020000, Moveable = 0x00040000, SelfVoicing = 0x00080000, Focusable = 0x00100000, Selectable = 0x00200000, Linked = 0x00400000, Traversed = 0x00800000, MultiSelectable = 0x01000000, ExtSelectable = 0x02000000, AlertLow = 0x04000000, AlertMedium = 0x08000000, AlertHigh = 0x10000000, Protected = 0x20000000, Valid = 0x3fffffff }
  • +
  • enum Role { NoRole = 0x00000000, TitleBar = 0x00000001, MenuBar = 0x00000002, ScrollBar = 0x00000003, Grip = 0x00000004, Sound = 0x00000005, Cursor = 0x00000006, Caret = 0x00000007, AlertMessage = 0x00000008, Window = 0x00000009, Client = 0x0000000A, PopupMenu = 0x0000000B, MenuItem = 0x0000000C, ToolTip = 0x0000000D, Application = 0x0000000E, Document = 0x0000000F, Pane = 0x00000010, Chart = 0x00000011, Dialog = 0x00000012, Border = 0x00000013, Grouping = 0x00000014, Separator = 0x00000015, ToolBar = 0x00000016, StatusBar = 0x00000017, Table = 0x00000018, ColumnHeader = 0x00000019, RowHeader = 0x0000001A, Column = 0x0000001B, Row = 0x0000001C, Cell = 0x0000001D, Link = 0x0000001E, HelpBalloon = 0x0000001F, Character = 0x00000020, List = 0x00000021, ListItem = 0x00000022, Outline = 0x00000023, OutlineItem = 0x00000024, PageTab = 0x00000025, PropertyPage = 0x00000026, Indicator = 0x00000027, Graphic = 0x00000028, StaticText = 0x00000029, EditableText = 0x0000002A, PushButton = 0x0000002B, CheckBox = 0x0000002C, RadioButton = 0x0000002D, ComboBox = 0x0000002E, DropLest = 0x0000002F, ProgressBar = 0x00000030, Dial = 0x00000031, HotkeyField = 0x00000032, Slider = 0x00000033, SpinBox = 0x00000034, Diagram = 0x00000035, Animation = 0x00000036, Equation = 0x00000037, ButtonDropDown = 0x00000038, ButtonMenu = 0x00000039, ButtonDropGrid = 0x0000003A, Whitespace = 0x0000003B, PageTabList = 0x0000003C, Clock = 0x0000003D }
  • +
  • enum NavDirection { NavUp = 0x00000001, NavDown = 0x00000002, NavLeft = 0x00000003, NavRight = 0x00000004, NavNext = 0x00000005, NavPrevious = 0x00000006, NavFirstChild = 0x00000007, NavLastChild = 0x00000008, NavFocusChild = 0x00000009 }
  • +
  • enum Text { Name = 0, Description, Value, Help, Accelerator, DefaultAction }
  • +
+

Static Public Members

+ +

Detailed Description

+ + +The TQAccessible class provides enums and static functions +relating to accessibility. +

+

Accessibility clients use implementations of the +TQAccessibleInterface to read the information an accessible object +exposes, or to call functions to manipulate the accessible object. +

+

See the plugin documentation for +more details about how to redistribute TQt plugins. +

See also Miscellaneous Classes. + +


Member Type Documentation

+

TQAccessible::Event

+ +

This enum type defines event types when the state of the +accessible object has changed. The event types are: +

    +
  • TQAccessible::SoundPlayed +
  • TQAccessible::Alert +
  • TQAccessible::ForegroundChanged +
  • TQAccessible::MenuStart +
  • TQAccessible::MenuEnd +
  • TQAccessible::PopupMenuStart +
  • TQAccessible::PopupMenuEnd +
  • TQAccessible::ContextHelpStart +
  • TQAccessible::ContextHelpEnd +
  • TQAccessible::DragDropStart +
  • TQAccessible::DragDropEnd +
  • TQAccessible::DialogStart +
  • TQAccessible::DialogEnd +
  • TQAccessible::ScrollingStart +
  • TQAccessible::ScrollingEnd +
  • TQAccessible::ObjectCreated +
  • TQAccessible::ObjectDestroyed +
  • TQAccessible::ObjectShow +
  • TQAccessible::ObjectHide +
  • TQAccessible::ObjectReorder +
  • TQAccessible::Focus +
  • TQAccessible::Selection +
  • TQAccessible::SelectionAdd +
  • TQAccessible::SelectionRemove +
  • TQAccessible::SelectionWithin +
  • TQAccessible::StateChanged +
  • TQAccessible::LocationChanged +
  • TQAccessible::NameChanged +
  • TQAccessible::DescriptionChanged +
  • TQAccessible::ValueChanged +
  • TQAccessible::ParentChanged +
  • TQAccessible::HelpChanged +
  • TQAccessible::DefaultActionChanged +
  • TQAccessible::AcceleratorChanged +
  • TQAccessible::MenuCommand +
+

TQAccessible::NavDirection

+ +

This enum specifies which item to move to when navigating. +

    +
  • TQAccessible::NavUp - sibling above +
  • TQAccessible::NavDown - sibling below +
  • TQAccessible::NavLeft - left sibling +
  • TQAccessible::NavRight - right sibling +
  • TQAccessible::NavNext - next sibling +
  • TQAccessible::NavPrevious - previous sibling +
  • TQAccessible::NavFirstChild - first child +
  • TQAccessible::NavLastChild - last child +
  • TQAccessible::NavFocusChild - child with focus +
+

TQAccessible::Role

+ +

This enum defines a number of roles an accessible object can have. +The roles are: +

    +
  • TQAccessible::NoRole +
  • TQAccessible::TitleBar +
  • TQAccessible::MenuBar +
  • TQAccessible::ScrollBar +
  • TQAccessible::Grip +
  • TQAccessible::Sound +
  • TQAccessible::Cursor +
  • TQAccessible::Caret +
  • TQAccessible::AlertMessage +
  • TQAccessible::Window +
  • TQAccessible::Client +
  • TQAccessible::PopupMenu +
  • TQAccessible::MenuItem +
  • TQAccessible::ToolTip +
  • TQAccessible::Application +
  • TQAccessible::Document +
  • TQAccessible::Pane +
  • TQAccessible::Chart +
  • TQAccessible::Dialog +
  • TQAccessible::Border +
  • TQAccessible::Grouping +
  • TQAccessible::Separator +
  • TQAccessible::ToolBar +
  • TQAccessible::StatusBar +
  • TQAccessible::Table +
  • TQAccessible::ColumnHeader +
  • TQAccessible::RowHeader +
  • TQAccessible::Column +
  • TQAccessible::Row +
  • TQAccessible::Cell +
  • TQAccessible::Link +
  • TQAccessible::HelpBalloon +
  • TQAccessible::Character +
  • TQAccessible::List +
  • TQAccessible::ListItem +
  • TQAccessible::Outline +
  • TQAccessible::OutlineItem +
  • TQAccessible::PageTab +
  • TQAccessible::PropertyPage +
  • TQAccessible::Indicator +
  • TQAccessible::Graphic +
  • TQAccessible::StaticText +
  • TQAccessible::EditableText +
  • TQAccessible::PushButton +
  • TQAccessible::CheckBox +
  • TQAccessible::RadioButton +
  • TQAccessible::ComboBox +
  • TQAccessible::DropLest +
  • TQAccessible::ProgressBar +
  • TQAccessible::Dial +
  • TQAccessible::HotkeyField +
  • TQAccessible::Slider +
  • TQAccessible::SpinBox +
  • TQAccessible::Diagram +
  • TQAccessible::Animation +
  • TQAccessible::Equation +
  • TQAccessible::ButtonDropDown +
  • TQAccessible::ButtonMenu +
  • TQAccessible::ButtonDropGrid +
  • TQAccessible::Whitespace +
  • TQAccessible::PageTabList +
  • TQAccessible::Clock +
+

TQAccessible::State

+ +

This enum type defines bitflags that can be combined to indicate +the state of the accessible object. The values are: +

    +
  • TQAccessible::Normal +
  • TQAccessible::Unavailable +
  • TQAccessible::Selected +
  • TQAccessible::Focused +
  • TQAccessible::Pressed +
  • TQAccessible::Checked +
  • TQAccessible::Mixed +
  • TQAccessible::ReadOnly +
  • TQAccessible::HotTracked +
  • TQAccessible::Default +
  • TQAccessible::Expanded +
  • TQAccessible::Collapsed +
  • TQAccessible::Busy +
  • TQAccessible::Floating +
  • TQAccessible::Marqueed +
  • TQAccessible::Animated +
  • TQAccessible::Invisible +
  • TQAccessible::Offscreen +
  • TQAccessible::Sizeable +
  • TQAccessible::Moveable +
  • TQAccessible::SelfVoicing +
  • TQAccessible::Focusable +
  • TQAccessible::Selectable +
  • TQAccessible::Linked +
  • TQAccessible::Traversed +
  • TQAccessible::MultiSelectable +
  • TQAccessible::ExtSelectable +
  • TQAccessible::AlertLow +
  • TQAccessible::AlertMedium +
  • TQAccessible::AlertHigh +
  • TQAccessible::Protected +
  • TQAccessible::Valid +
+

TQAccessible::Text

+ +

This enum specifies string information that an accessible object +returns. +

    +
  • TQAccessible::Name - The name of the object +
  • TQAccessible::Description - A short text describing the object +
  • TQAccessible::Value - The value of the object +
  • TQAccessible::Help - A longer text giving information about how +to use the object +
  • TQAccessible::DefaultAction - The default method to interact with the object +
  • TQAccessible::Accelerator - The keyboard shortcut that executes the +default action +
+

Member Function Documentation

+

bool TQAccessible::isActive () [static] +

+Returns TRUE if an accessibility implementation has been requested, +during the runtime of the application, otherwise returns FALSE. +

Use this function to prevent potentially expensive notifications via +updateAccessibility(). +

+ +

TQRESULT TQAccessible::queryAccessibleInterface ( TQObject * object, TQAccessibleInterface ** iface ) [static] +

+Sets iface to point to the implementation of the +TQAccessibleInterface for object, and returns TQS_OK if +successfull, or sets iface to 0 and returns TQE_NOCOMPONENT if +no accessibility implementation for object exists. +

The function uses the classname of object to find a suitable implementation. If no +implementation for the object's class is available the function +tries to find an implementation for the object's parent class. +

This function is called to answer an accessibility client's +request for object information. You should never need to call this +function yourself. + +

void TQAccessible::updateAccessibility ( TQObject * object, int control, Event reason ) [static] +

+ +

Notifies accessibility clients about a change in object's +accessibility information. +

reason specifies the cause of the change, for example, +ValueChange when the position of a slider has been changed. control is the ID of the child element that has changed. When control is 0, the object itself has changed. +

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

If there are no accessibility tools listening to this event, the +performance penalty for calling this function is minor, but if determining +the parameters of the call is expensive you can use isActive() to +avoid unnecessary performance penalties if no client is listening. + + +


+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/qaccessibleinterface-members.html b/doc/html/qaccessibleinterface-members.html new file mode 100644 index 00000000..5c70cc11 --- /dev/null +++ b/doc/html/qaccessibleinterface-members.html @@ -0,0 +1,65 @@ + + + + + +TQAccessibleInterface Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAccessibleInterface

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaccessibleinterface.html b/doc/html/qaccessibleinterface.html new file mode 100644 index 00000000..5b11b16e --- /dev/null +++ b/doc/html/qaccessibleinterface.html @@ -0,0 +1,233 @@ + + + + + +TQAccessibleInterface Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAccessibleInterface Class Reference

+ +

The TQAccessibleInterface class defines an interface that exposes information about accessible objects. +More... +

#include <qaccessible.h> +

Inherits TQAccessible. +

Inherited by TQAccessibleObject. +

List of all member functions. +

Public Members

+
    +
  • virtual bool isValid () const = 0
  • +
  • virtual int childCount () const = 0
  • +
  • virtual TQRESULT queryChild ( int control, TQAccessibleInterface ** iface ) const = 0
  • +
  • virtual TQRESULT queryParent ( TQAccessibleInterface ** iface ) const = 0
  • +
  • virtual int controlAt ( int x, int y ) const = 0
  • +
  • virtual TQRect rect ( int control ) const = 0
  • +
  • virtual int navigate ( NavDirection direction, int startControl ) const = 0
  • +
  • virtual TQString text ( Text t, int control ) const = 0
  • +
  • virtual void setText ( Text t, int control, const TQString & text ) = 0
  • +
  • virtual Role role ( int control ) const = 0
  • +
  • virtual State state ( int control ) const = 0
  • +
  • virtual TQMemArray<int> selection () const = 0
  • +
  • virtual bool doDefaultAction ( int control ) = 0
  • +
  • virtual bool setFocus ( int control ) = 0
  • +
  • virtual bool setSelected ( int control, bool on, bool extend ) = 0
  • +
  • virtual void clearSelection () = 0
  • +
+

Detailed Description

+ + +The TQAccessibleInterface class defines an interface that exposes information about accessible objects. +

+

See also Miscellaneous Classes. + +


Member Function Documentation

+

int TQAccessibleInterface::childCount () const [pure virtual] +

+ +

Returns the number of children that belong to this object. A child +can provide accessibility information on it's own (e.g. a child +widget), or be a sub-element of this accessible object. +

All objects provide this information. +

See also queryChild(). + +

void TQAccessibleInterface::clearSelection () [pure virtual] +

+ +

Removes any selection from the object. +

See also setSelected(). + +

int TQAccessibleInterface::controlAt ( int x, int y ) const [pure virtual] +

+ +

Returns the ID of the child that contains the screen coordinates +(x, y). This function returns 0 if the point is positioned +on the object itself. If the tested point is outside the +boundaries of the object this function returns -1. +

All visual objects provide this information. + +

bool TQAccessibleInterface::doDefaultAction ( int control ) [pure virtual] +

+ +

Calling this function performs the default action of the child +object specified by control, or the default action of the +object itself if control is 0. + +

bool TQAccessibleInterface::isValid () const [pure virtual] +

+ +

Returns TRUE if all the data necessary to use this interface +implementation is valid (e.g. all pointers are non-null), +otherwise returns FALSE. + +

int TQAccessibleInterface::navigate ( NavDirection direction, int startControl ) const [pure virtual] +

+ +

This function traverses to another object, or to a sub-element of +the current object. direction specifies in which direction to +navigate, and startControl specifies the start point of the +navigation, which is either 0 if the navigation starts at the +object itself, or an ID of one of the object's sub-elements. +

The function returns the ID of the sub-element located in the direction specified. If there is nothing in the navigated direction, this function returns -1. +

All objects support navigation. + +

TQRESULT TQAccessibleInterface::queryChild ( int control, TQAccessibleInterface ** iface ) const [pure virtual] +

+ +

Sets iface to point to the implementation of the +TQAccessibleInterface for the child specified with control. If +the child doesn't provide accessibility information on it's own, +the value of iface is set to 0. For those elements, this +object is responsible for exposing the child's properties. +

All objects provide this information. +

See also childCount() and queryParent(). + +

TQRESULT TQAccessibleInterface::queryParent ( TQAccessibleInterface ** iface ) const [pure virtual] +

+ +

Sets iface to point to the implementation of the +TQAccessibleInterface for the parent object, or to 0 if there is +no such implementation or object. +

All objects provide this information. +

See also queryChild(). + +

TQRect TQAccessibleInterface::rect ( int control ) const [pure virtual] +

+ +

Returns the location of the child specified with control in +screen coordinates. This function returns the location of the +object itself if control is 0. +

All visual objects provide this information. + +

Role TQAccessibleInterface::role ( int control ) const [pure virtual] +

+ +

Returns the role of the object if control is 0, or the role of +the object's sub-element with ID control. The role of an object +is usually static. All accessible objects have a role. +

See also text(), state(), and selection(). + +

TQMemArray<int> TQAccessibleInterface::selection () const [pure virtual] +

+ +

Returns the list of all the element IDs that are selected. +

See also text(), role(), and state(). + +

bool TQAccessibleInterface::setFocus ( int control ) [pure virtual] +

+ +

Gives the focus to the child object specified by control, or to +the object itself if control is 0. +

Returns TRUE if the focus could be set; otherwise returns FALSE. + +

bool TQAccessibleInterface::setSelected ( int control, bool on, bool extend ) [pure virtual] +

+ +

Sets the selection of the child object with ID control to on. If extend is TRUE, all child elements between the focused +item and the specified child object have their selection set to on. +

Returns TRUE if the selection could be set; otherwise returns +FALSE. +

See also setFocus() and clearSelection(). + +

void TQAccessibleInterface::setText ( Text t, int control, const TQString & text ) [pure virtual] +

+ +

Sets the text property t of the child object control to text. If control is 0, the text property of the object itself +is set. + +

State TQAccessibleInterface::state ( int control ) const [pure virtual] +

+ +

Returns the current state of the object if control is 0, or the +state of the object's sub-element element with ID control. All +objects have a state. +

See also text(), role(), and selection(). + +

TQString TQAccessibleInterface::text ( Text t, int control ) const [pure virtual] +

+ +

Returns a string property t of the child object specified by control, or the string property of the object itself if control +is 0. +

The Name is a string used by clients to identify, find or +announce an accessible object for the user. All objects must have +a name that is unique within their container. +

An accessible object's Description provides textual information +about an object's visual appearance. The description is primarily +used to provide greater context for low-vision or blind users, but +is also used for context searching or other applications. Not all +objects have a description. An "OK" button would not need a +description, but a toolbutton that shows a picture of a smiley +would. +

The Value of an accessible object represents visual information +contained by the object, e.g. the text in a line edit. Usually, +the value can be modified by the user. Not all objects have a +value, e.g. static text labels don't, and some objects have a +state that already is the value, e.g. toggle buttons. +

The Help text provides information about the function and +usage of an accessible object. Not all objects provide this +information. +

An accessible object's DefaultAction describes the object's +primary method of manipulation, and should be a verb or a short +phrase, e.g. "Press" for a button. +

The accelerator is a keyboard shortcut that activates the default +action of the object. A keyboard shortcut is the underlined +character in the text of a menu, menu item or control, and is +either the character itself, or a combination of this character +and a modifier key like ALT, CTRL or SHIFT. Command controls like +tool buttons also have shortcut keys and usually display them in +their tooltip. +

See also role(), state(), and selection(). + + +


+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/qaccessibleobject-members.html b/doc/html/qaccessibleobject-members.html new file mode 100644 index 00000000..0dc4816f --- /dev/null +++ b/doc/html/qaccessibleobject-members.html @@ -0,0 +1,110 @@ + + + + + +TQAccessibleObject Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAccessibleObject

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaccessibleobject.html b/doc/html/qaccessibleobject.html new file mode 100644 index 00000000..1f0b420f --- /dev/null +++ b/doc/html/qaccessibleobject.html @@ -0,0 +1,86 @@ + + + + + +TQAccessibleObject Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAccessibleObject Class Reference

+ +

The TQAccessibleObject class implements parts of the +TQAccessibleInterface for TQObjects. +More... +

#include <qaccessible.h> +

Inherits TQObject and TQAccessibleInterface. +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • TQObject * object () const
  • +
+

Detailed Description

+ + +The TQAccessibleObject class implements parts of the +TQAccessibleInterface for TQObjects. +

+

This class is mainly provided for convenience. All subclasses of +the TQAccessibleInterface should use this class as the base class. +

See also Miscellaneous Classes. + +


Member Function Documentation

+

TQAccessibleObject::TQAccessibleObject ( TQObject * object ) +

+Creates a TQAccessibleObject for object. + +

TQAccessibleObject::~TQAccessibleObject () [virtual] +

+Destroys the TQAccessibleObject. +

This only happens when a call to release() decrements the internal +reference counter to zero. + +

TQObject * TQAccessibleObject::object () const [protected] +

+Returns the TQObject for which this TQAccessibleInterface +implementation provides information. Use isValid() to make sure +the object pointer is safe to use. + + +

+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/qaction-application-example.html b/doc/html/qaction-application-example.html new file mode 100644 index 00000000..c166a8d9 --- /dev/null +++ b/doc/html/qaction-application-example.html @@ -0,0 +1,438 @@ + + + + + +A Complete Application Window with Actions + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A Complete Application Window with Actions

+ + +

+

The TQAction class provides a way of associating user input from different +user interface elements with abstract high level actions. This approach makes +it easy to customize applications for different types of users. +

This example program is just like the +application example, +but uses TQAction to build the menu and the toolbar. +


+

Header file: +

/****************************************************************************
+** $Id: qt/application.h   3.3.8   edited Jan 11 14:36 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef APPLICATION_H
+#define APPLICATION_H
+
+#include <qmainwindow.h>
+
+class TQTextEdit;
+
+class ApplicationWindow: public TQMainWindow
+{
+    Q_OBJECT
+
+public:
+    ApplicationWindow();
+    ~ApplicationWindow();
+
+protected:
+    void closeEvent( TQCloseEvent* );
+
+private slots:
+    void newDoc();
+    void choose();
+    void load( const TQString &fileName );
+    void save();
+    void saveAs();
+    void print();
+
+    void about();
+    void aboutTQt();
+
+private:
+    TQPrinter *printer;
+    TQTextEdit *e;
+    TQString filename;
+};
+
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/application.cpp   3.3.8   edited Jan 11 14:36 $
+**
+** Copyright (C) 1992-2007 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 "application.h"
+
+#include <qimage.h>
+#include <qpixmap.h>
+#include <qtoolbar.h>
+#include <qtoolbutton.h>
+#include <qpopupmenu.h>
+#include <qmenubar.h>
+#include <qtextedit.h>
+#include <qfile.h>
+#include <qfiledialog.h>
+#include <qstatusbar.h>
+#include <qmessagebox.h>
+#include <qprinter.h>
+#include <qapplication.h>
+#include <qaccel.h>
+#include <qtextstream.h>
+#include <qpainter.h>
+#include <qpaintdevicemetrics.h>
+#include <qwhatsthis.h>
+#include <qaction.h>
+#include <qsimplerichtext.h>
+
+#include "filesave.xpm"
+#include "fileopen.xpm"
+#include "fileprint.xpm"
+
+
+ApplicationWindow::ApplicationWindow()
+    : TQMainWindow( 0, "example application main window", WDestructiveClose )
+{
+    printer = new TQPrinter( TQPrinter::HighResolution );
+
+    TQAction * fileNewAction;
+    TQAction * fileOpenAction;
+    TQAction * fileSaveAction, * fileSaveAsAction, * filePrintAction;
+    TQAction * fileCloseAction, * fileQuitAction;
+
+    fileNewAction = new TQAction( "&New", CTRL+Key_N, this, "new" );
+    connect( fileNewAction, SIGNAL( activated() ) , this,
+             SLOT( newDoc() ) );
+
+    fileOpenAction = new TQAction( TQPixmap( fileopen ), "&Open...",
+                                  CTRL+Key_O, this, "open" );
+    connect( fileOpenAction, SIGNAL( activated() ) , this, SLOT( choose() ) );
+
+    const char * fileOpenText = "<p><img source=\"fileopen\"> "
+                     "Click this button to open a <em>new file</em>. <br>"
+                     "You can also select the <b>Open</b> command "
+                     "from the <b>File</b> menu.</p>";
+    TQMimeSourceFactory::defaultFactory()->setPixmap( "fileopen",
+                          fileOpenAction->iconSet().pixmap() );
+    fileOpenAction->setWhatsThis( fileOpenText );
+
+    fileSaveAction = new TQAction( TQPixmap( filesave ),
+                                  "&Save", CTRL+Key_S, this, "save" );
+    connect( fileSaveAction, SIGNAL( activated() ) , this, SLOT( save() ) );
+
+    const char * fileSaveText = "<p>Click this button to save the file you "
+                     "are editing. You will be prompted for a file name.\n"
+                     "You can also select the <b>Save</b> command "
+                     "from the <b>File</b> menu.</p>";
+    fileSaveAction->setWhatsThis( fileSaveText );
+
+    fileSaveAsAction = new TQAction( "Save File As", "Save &As...", 0,  this,
+                                    "save as" );
+    connect( fileSaveAsAction, SIGNAL( activated() ) , this,
+             SLOT( saveAs() ) );
+    fileSaveAsAction->setWhatsThis( fileSaveText );
+
+    filePrintAction = new TQAction( "Print File", TQPixmap( fileprint ),
+                                   "&Print...", CTRL+Key_P, this, "print" );
+    connect( filePrintAction, SIGNAL( activated() ) , this,
+             SLOT( print() ) );
+
+    const char * filePrintText = "Click this button to print the file you "
+                     "are editing.\n You can also select the Print "
+                     "command from the File menu.";
+    filePrintAction->setWhatsThis( filePrintText );
+
+    fileCloseAction = new TQAction( "Close", "&Close", CTRL+Key_W, this,
+                                   "close" );
+    connect( fileCloseAction, SIGNAL( activated() ) , this,
+             SLOT( close() ) );
+
+    fileQuitAction = new TQAction( "Quit", "&Quit", CTRL+Key_Q, this,
+                                  "tquit" );
+    connect( fileQuitAction, SIGNAL( activated() ) , qApp,
+             SLOT( closeAllWindows() ) );
+
+    // populate a tool bar with some actions
+
+    TQToolBar * fileTools = new TQToolBar( this, "file operations" );
+    fileTools->setLabel( "File Operations" );
+    fileOpenAction->addTo( fileTools );
+    fileSaveAction->addTo( fileTools );
+    filePrintAction->addTo( fileTools );
+    (void)TQWhatsThis::whatsThisButton( fileTools );
+
+
+    // populate a menu with all actions
+
+    TQPopupMenu * file = new TQPopupMenu( this );
+    menuBar()->insertItem( "&File", file );
+    fileNewAction->addTo( file );
+    fileOpenAction->addTo( file );
+    fileSaveAction->addTo( file );
+    fileSaveAsAction->addTo( file );
+    file->insertSeparator();
+    filePrintAction->addTo( file );
+    file->insertSeparator();
+    fileCloseAction->addTo( file );
+    fileQuitAction->addTo( file );
+
+
+    menuBar()->insertSeparator();
+
+    // add a help menu
+
+    TQPopupMenu * help = new TQPopupMenu( this );
+    menuBar()->insertItem( "&Help", help );
+    help->insertItem( "&About", this, SLOT(about()), Key_F1 );
+    help->insertItem( "About &TQt", this, SLOT(aboutTQt()) );
+    help->insertSeparator();
+    help->insertItem( "What's &This", this, SLOT(whatsThis()),
+                      SHIFT+Key_F1 );
+
+
+    // create and define the central widget
+
+    e = new TQTextEdit( this, "editor" );
+    e->setFocus();
+    setCentralWidget( e );
+    statusBar()->message( "Ready", 2000 );
+
+    resize( 450, 600 );
+}
+
+
+ApplicationWindow::~ApplicationWindow()
+{
+    delete printer;
+}
+
+
+
+void ApplicationWindow::newDoc()
+{
+    ApplicationWindow *ed = new ApplicationWindow;
+    ed->show();
+}
+
+void ApplicationWindow::choose()
+{
+    TQString fn = TQFileDialog::getOpenFileName( TQString::null, TQString::null,
+                                               this);
+    if ( !fn.isEmpty() )
+        load( fn );
+    else
+        statusBar()->message( "Loading aborted", 2000 );
+}
+
+
+void ApplicationWindow::load( const TQString &fileName )
+{
+    TQFile f( fileName );
+    if ( !f.open( IO_ReadOnly ) )
+        return;
+
+    TQTextStream ts( &f );
+    e->setText( ts.read() );
+    e->setModified( FALSE );
+    setCaption( fileName );
+    statusBar()->message( "Loaded document " + fileName, 2000 );
+}
+
+
+void ApplicationWindow::save()
+{
+    if ( filename.isEmpty() ) {
+        saveAs();
+        return;
+    }
+
+    TQString text = e->text();
+    TQFile f( filename );
+    if ( !f.open( IO_WriteOnly ) ) {
+        statusBar()->message( TQString("Could not write to %1").arg(filename),
+                              2000 );
+        return;
+    }
+
+    TQTextStream t( &f );
+    t << text;
+    f.close();
+
+    e->setModified( FALSE );
+
+    setCaption( filename );
+
+    statusBar()->message( TQString( "File %1 saved" ).arg( filename ), 2000 );
+}
+
+
+void ApplicationWindow::saveAs()
+{
+    TQString fn = TQFileDialog::getSaveFileName( TQString::null, TQString::null,
+                                               this );
+    if ( !fn.isEmpty() ) {
+        filename = fn;
+        save();
+    } else {
+        statusBar()->message( "Saving aborted", 2000 );
+    }
+}
+
+
+void ApplicationWindow::print()
+{
+    printer->setFullPage( TRUE );
+    if ( printer->setup(this) ) {               // printer dialog
+        statusBar()->message( "Printing..." );
+        TQPainter p;
+        if( !p.begin( printer ) ) {               // paint on printer
+            statusBar()->message( "Printing aborted", 2000 );
+            return;
+        }
+
+        TQPaintDeviceMetrics metrics( p.device() );
+        int dpiy = metrics.logicalDpiY();
+        int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins
+        TQRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin );
+        TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()),
+                                  TQFont(),
+                                  e->context(),
+                                  e->styleSheet(),
+                                  e->mimeSourceFactory(),
+                                  view.height() );
+        richText.setWidth( &p, view.width() );
+        int page = 1;
+        do {
+            richText.draw( &p, margin, margin, view, colorGroup() );
+            view.moveBy( 0, view.height() );
+            p.translate( 0 , -view.height() );
+            p.drawText( view.right() - p.fontMetrics().width( TQString::number( page ) ),
+                        view.bottom() + p.fontMetrics().ascent() + 5, TQString::number( page ) );
+            if ( view.top() - margin >= richText.height() )
+                break;
+            printer->newPage();
+            page++;
+        } while (TRUE);
+
+        statusBar()->message( "Printing completed", 2000 );
+    } else {
+        statusBar()->message( "Printing aborted", 2000 );
+    }
+}
+
+void ApplicationWindow::closeEvent( TQCloseEvent* ce )
+{
+    if ( !e->isModified() ) {
+        ce->accept();
+        return;
+    }
+
+    switch( TQMessageBox::information( this, "TQt Application Example",
+                                      "The document has been changed since "
+                                      "the last save.",
+                                      "Save Now", "Cancel", "Leave Anyway",
+                                      0, 1 ) ) {
+    case 0:
+        save();
+        ce->accept();
+        break;
+    case 1:
+    default: // just for sanity
+        ce->ignore();
+        break;
+    case 2:
+        ce->accept();
+        break;
+    }
+}
+
+
+void ApplicationWindow::about()
+{
+    TQMessageBox::about( this, "TQt Application Example",
+                        "This example demonstrates simple use of "
+                        "TQMainWindow,\nTQMenuBar and TQToolBar.");
+}
+
+
+void ApplicationWindow::aboutTQt()
+{
+    TQMessageBox::aboutTQt( this, "TQt Application Example" );
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:36 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include "application.h"
+
+int main( int argc, char ** argv ) {
+    TQApplication a( argc, argv );
+    ApplicationWindow * mw = new ApplicationWindow();
+    mw->setCaption( "Document 1" );
+    mw->show();
+    a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(tquit()) );
+    return a.exec();
+}
+
+ +

See also TQAction Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaction-examples.html b/doc/html/qaction-examples.html new file mode 100644 index 00000000..bf8a5b5f --- /dev/null +++ b/doc/html/qaction-examples.html @@ -0,0 +1,49 @@ + + + + + +TQAction Examples + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAction Examples

+ + +

The following example programs show how to use the +TQAction and TQActionGroup classes. +

+

+
A Complete Application Window with Actions +
A Tiny Example Featuring a Toggle Action +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaction-h.html b/doc/html/qaction-h.html new file mode 100644 index 00000000..ae63dcc6 --- /dev/null +++ b/doc/html/qaction-h.html @@ -0,0 +1,263 @@ + + + + + +qaction.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qaction.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qaction.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQAction class
+**
+** Created : 000000
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQACTION_H
+#define TQACTION_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qiconset.h"
+#include "qstring.h"
+#include "qkeysequence.h"
+#endif // QT_H
+
+#ifndef QT_NO_ACTION
+
+class TQActionPrivate;
+class TQActionGroupPrivate;
+class TQStatusBar;
+class TQPopupMenu;
+class TQToolTipGroup;
+
+class Q_EXPORT TQAction : public TQObject
+{
+    Q_OBJECT
+    Q_PROPERTY( bool toggleAction READ isToggleAction WRITE setToggleAction)
+    Q_PROPERTY( bool on READ isOn WRITE setOn )
+    Q_PROPERTY( bool enabled READ isEnabled WRITE setEnabled )
+    Q_PROPERTY( TQIconSet iconSet READ iconSet WRITE setIconSet )
+    Q_PROPERTY( TQString text READ text WRITE setText )
+    Q_PROPERTY( TQString menuText READ menuText WRITE setMenuText )
+    Q_PROPERTY( TQString toolTip READ toolTip WRITE setToolTip )
+    Q_PROPERTY( TQString statusTip READ statusTip WRITE setStatusTip )
+    Q_PROPERTY( TQString whatsThis READ whatsThis WRITE setWhatsThis )
+#ifndef QT_NO_ACCEL
+    Q_PROPERTY( TQKeySequence accel READ accel WRITE setAccel )
+#endif
+    Q_PROPERTY( bool visible READ isVisible WRITE setVisible )
+
+public:
+    TQAction( TQObject* parent, const char* name = 0 );
+#ifndef QT_NO_ACCEL
+    TQAction( const TQString& menuText, TQKeySequence accel,
+	     TQObject* parent, const char* name = 0 );
+    TQAction( const TQIconSet& icon, const TQString& menuText, TQKeySequence accel,
+	     TQObject* parent, const char* name = 0 );
+
+    TQAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, TQKeySequence accel,
+	     TQObject* parent, const char* name = 0, bool toggle = FALSE ); // obsolete
+    TQAction( const TQString& text, const TQString& menuText, TQKeySequence accel, TQObject* parent,
+	     const char* name = 0, bool toggle = FALSE ); // obsolete
+#endif
+    TQAction( TQObject* parent, const char* name , bool toggle ); // obsolete
+    ~TQAction();
+
+    virtual void setIconSet( const TQIconSet& );
+    TQIconSet iconSet() const;
+    virtual void setText( const TQString& );
+    TQString text() const;
+    virtual void setMenuText( const TQString& );
+    TQString menuText() const;
+    virtual void setToolTip( const TQString& );
+    TQString toolTip() const;
+    virtual void setStatusTip( const TQString& );
+    TQString statusTip() const;
+    virtual void setWhatsThis( const TQString& );
+    TQString whatsThis() const;
+#ifndef QT_NO_ACCEL
+    virtual void setAccel( const TQKeySequence& key );
+    TQKeySequence accel() const;
+#endif
+    virtual void setToggleAction( bool );
+
+    bool isToggleAction() const;
+    bool isOn() const;
+    bool isEnabled() const;
+    bool isVisible() const;
+    virtual bool addTo( TQWidget* );
+    virtual bool removeFrom( TQWidget* );
+
+protected:
+    virtual void addedTo( TQWidget *actionWidget, TQWidget *container );
+    virtual void addedTo( int index, TQPopupMenu *menu );
+
+public slots:
+    void activate();
+    void toggle();
+    virtual void setOn( bool );
+    virtual void setEnabled( bool );
+    void setDisabled( bool );
+    void setVisible( bool );
+
+signals:
+    void activated();
+    void toggled( bool );
+
+private slots:
+    void internalActivation();
+    void toolButtonToggled( bool );
+    void objectDestroyed();
+    void menuStatusText( int id );
+    void showStatusText( const TQString& );
+    void clearStatusText();
+
+private:
+    void init();
+
+    friend class TQActionGroup;
+    friend class TQActionGroupPrivate;
+    TQActionPrivate* d;
+
+#if defined(Q_DISABLE_COPY)  // Disabled copy constructor and operator=
+    TQAction( const TQAction & );
+    TQAction &operator=( const TQAction & );
+#endif
+};
+
+class Q_EXPORT TQActionGroup : public TQAction
+{
+    Q_OBJECT
+    Q_PROPERTY( bool exclusive READ isExclusive WRITE setExclusive )
+    Q_PROPERTY( bool usesDropDown READ usesDropDown WRITE setUsesDropDown )
+
+public:
+    TQActionGroup( TQObject* parent, const char* name = 0 );
+    TQActionGroup( TQObject* parent, const char* name , bool exclusive  ); // obsolete
+    ~TQActionGroup();
+    void setExclusive( bool );
+    bool isExclusive() const;
+    void add( TQAction* a);
+    void addSeparator();
+    bool addTo( TQWidget* );
+    bool removeFrom( TQWidget* );
+    void setEnabled( bool );
+    void setToggleAction( bool toggle );
+    void setOn( bool on );
+
+    void setUsesDropDown( bool enable );
+    bool usesDropDown() const;
+
+    void setIconSet( const TQIconSet& );
+    void setText( const TQString& );
+    void setMenuText( const TQString& );
+    void setToolTip( const TQString& );
+    void setWhatsThis( const TQString& );
+
+protected:
+    void childEvent( TQChildEvent* );
+    virtual void addedTo( TQWidget *actionWidget, TQWidget *container, TQAction *a );
+    virtual void addedTo( int index, TQPopupMenu *menu, TQAction *a );
+    virtual void addedTo( TQWidget *actionWidget, TQWidget *container );
+    virtual void addedTo( int index, TQPopupMenu *menu );
+
+signals:
+    void selected( TQAction* );
+
+private slots:
+    void childToggled( bool );
+    void childDestroyed();
+    void internalComboBoxActivated( int );
+    void internalComboBoxHighlighted( int );
+    void internalToggle( TQAction* );
+    void objectDestroyed();
+
+private:
+    TQActionGroupPrivate* d;
+
+#ifndef QT_NO_COMPAT
+public:
+    void insert( TQAction* a ) { add( a ); }
+#endif
+
+private:
+#if defined(Q_DISABLE_COPY)  // Disabled copy constructor and operator=
+    TQActionGroup( const TQActionGroup & );
+    TQActionGroup &operator=( const TQActionGroup & );
+#endif
+};
+
+#endif
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaction-members.html b/doc/html/qaction-members.html new file mode 100644 index 00000000..2c83d1e5 --- /dev/null +++ b/doc/html/qaction-members.html @@ -0,0 +1,120 @@ + + + + + +TQAction Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAction

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaction.html b/doc/html/qaction.html new file mode 100644 index 00000000..216edf3d --- /dev/null +++ b/doc/html/qaction.html @@ -0,0 +1,520 @@ + + + + + +TQAction Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAction Class Reference

+ +

The TQAction class provides an abstract user interface +action that can appear both in menus and tool bars. +More... +

#include <qaction.h> +

Inherits TQObject. +

Inherited by TQActionGroup. +

List of all member functions. +

Public Members

+
    +
  • TQAction ( TQObject * parent, const char * name = 0 )
  • +
  • TQAction ( const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0 )
  • +
  • TQAction ( const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0 )
  • +
  • TQAction ( const TQString & text, const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE )  (obsolete)
  • +
  • TQAction ( const TQString & text, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE )  (obsolete)
  • +
  • TQAction ( TQObject * parent, const char * name, bool toggle )  (obsolete)
  • +
  • ~TQAction ()
  • +
  • virtual void setIconSet ( const TQIconSet & )
  • +
  • TQIconSet iconSet () const
  • +
  • virtual void setText ( const TQString & )
  • +
  • TQString text () const
  • +
  • virtual void setMenuText ( const TQString & )
  • +
  • TQString menuText () const
  • +
  • virtual void setToolTip ( const TQString & )
  • +
  • TQString toolTip () const
  • +
  • virtual void setStatusTip ( const TQString & )
  • +
  • TQString statusTip () const
  • +
  • virtual void setWhatsThis ( const TQString & )
  • +
  • TQString whatsThis () const
  • +
  • virtual void setAccel ( const TQKeySequence & key )
  • +
  • TQKeySequence accel () const
  • +
  • virtual void setToggleAction ( bool )
  • +
  • bool isToggleAction () const
  • +
  • bool isOn () const
  • +
  • bool isEnabled () const
  • +
  • bool isVisible () const
  • +
  • virtual bool addTo ( TQWidget * w )
  • +
  • virtual bool removeFrom ( TQWidget * w )
  • +
+

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • TQKeySequence accel - the action's accelerator key
  • +
  • bool enabled - whether the action is enabled
  • +
  • TQIconSet iconSet - the action's icon
  • +
  • TQString menuText - the action's menu text
  • +
  • bool on - whether a toggle action is on
  • +
  • TQString statusTip - the action's status tip
  • +
  • TQString text - the action's descriptive text
  • +
  • bool toggleAction - whether the action is a toggle action
  • +
  • TQString toolTip - the action's tool tip
  • +
  • bool visible - whether the action can be seen (e.g. in menus and toolbars)
  • +
  • TQString whatsThis - the action's "What's This?" help text
  • +
+

Protected Members

+
    +
  • virtual void addedTo ( TQWidget * actionWidget, TQWidget * container )
  • +
  • virtual void addedTo ( int index, TQPopupMenu * menu )
  • +
+

Detailed Description

+ + +The TQAction class provides an abstract user interface +action that can appear both in menus and tool bars. +

+ + +

In GUI applications many commands can be invoked via a menu +option, a toolbar button and a keyboard accelerator. Since the +same action must be performed regardless of how the action was +invoked, and since the menu and toolbar should be kept in sync, it +is useful to represent a command as an action. An action can be +added to a menu and a toolbar and will automatically keep them in +sync. For example, if the user presses a Bold toolbar button the +Bold menu item will automatically be checked. +

A TQAction may contain an icon, a menu text, an accelerator, a +status text, a whats this text and a tool tip. Most of these can +be set in the constructor. They can also be set independently with +setIconSet(), setText(), setMenuText(), setToolTip(), +setStatusTip(), setWhatsThis() and setAccel(). +

An action may be a toggle action e.g. a Bold toolbar button, or a +command action, e.g. 'Open File' to invoke an open file dialog. +Toggle actions emit the toggled() signal when their state changes. +Both command and toggle actions emit the activated() signal when +they are invoked. Use setToggleAction() to set an action's toggled +status. To see if an action is a toggle action use +isToggleAction(). A toggle action may be "on", isOn() returns +TRUE, or "off", isOn() returns FALSE. +

Actions are added to widgets (menus or toolbars) using addTo(), +and removed using removeFrom(). +

Once a TQAction has been created it should be added to the relevant +menu and toolbar and then connected to the slot which will perform +the action. For example: +

+ +

        fileOpenAction = new TQAction( TQPixmap( fileopen ), "&Open...",
+                                      CTRL+Key_O, this, "open" );
+        connect( fileOpenAction, SIGNAL( activated() ) , this, SLOT( choose() ) );
+
+

We create a "File Save" action with a menu text of "&Save" and +Ctrl+S as the keyboard accelerator. We connect the +fileSaveAction's activated() signal to our own save() slot. Note +that at this point there is no menu or toolbar action, we'll add +them next: +

        TQToolBar * fileTools = new TQToolBar( this, "file operations" );
+
        fileSaveAction->addTo( fileTools );
+
        TQPopupMenu * file = new TQPopupMenu( this );
+        menuBar()->insertItem( "&File", file );
+
        fileSaveAction->addTo( file );
+
+

We create a toolbar and add our fileSaveAction to it. Similarly we +create a menu, add a top-level menu item, and add our +fileSaveAction. +

We recommend that actions are created as children of the window +that they are used in. In most cases actions will be children of +the application's main window. +

To prevent recursion, don't create an action as a child of a +widget that the action is later added to. +

See also Main Window and Related Classes and Basic Widgets. + +


Member Function Documentation

+

TQAction::TQAction ( TQObject * parent, const char * name = 0 ) +

+Constructs an action called name with parent parent. +

If parent is a TQActionGroup, the new action inserts itself into +parent. +

For accelerators and status tips to work, parent must either be +a widget, or an action group whose parent is a widget. +

Warning: To prevent recursion, don't create an action as a child +of a widget that the action is later added to. + +

TQAction::TQAction ( const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0 ) +

+This constructor results in an icon-less action with the the menu +text menuText and keyboard accelerator accel. It is a child +of parent and called name. +

If parent is a TQActionGroup, the action automatically becomes +a member of it. +

For accelerators and status tips to work, parent must either be +a widget, or an action group whose parent is a widget. +

The action uses a stripped version of menuText (e.g. "&Menu +Option..." becomes "Menu Option") as descriptive text for +toolbuttons. You can override this by setting a specific +description with setText(). The same text and accel will be +used for tool tips and status tips unless you provide text for +these using setToolTip() and setStatusTip(). +

Call setToggleAction(TRUE) to make the action a toggle action. +

Warning: To prevent recursion, don't create an action as a child +of a widget that the action is later added to. + +

TQAction::TQAction ( const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0 ) +

+This constructor creates an action with the following properties: +the icon or iconset icon, the menu text menuText and +keyboard accelerator accel. It is a child of parent and +called name. +

If parent is a TQActionGroup, the action automatically becomes +a member of it. +

For accelerators and status tips to work, parent must either be +a widget, or an action group whose parent is a widget. +

The action uses a stripped version of menuText (e.g. "&Menu +Option..." becomes "Menu Option") as descriptive text for +toolbuttons. You can override this by setting a specific +description with setText(). The same text and accel will be +used for tool tips and status tips unless you provide text for +these using setToolTip() and setStatusTip(). +

Call setToggleAction(TRUE) to make the action a toggle action. +

Warning: To prevent recursion, don't create an action as a child +of a widget that the action is later added to. + +

TQAction::TQAction ( const TQString & text, const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE ) +

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

This constructor creates an action with the following properties: +the description text, the icon or iconset icon, the menu +text menuText and keyboard accelerator accel. It is a child +of parent and called name. If toggle is TRUE the action +will be a toggle action, otherwise it will be a command action. +

If parent is a TQActionGroup, the action automatically becomes +a member of it. +

For accelerators and status tips to work, parent must either be +a widget, or an action group whose parent is a widget. +

The text and accel will be used for tool tips and status +tips unless you provide specific text for these using setToolTip() +and setStatusTip(). + +

TQAction::TQAction ( const TQString & text, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE ) +

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

This constructor results in an icon-less action with the +description text, the menu text menuText and the keyboard +accelerator accel. Its parent is parent and it is called name. If toggle is TRUE the action will be a toggle action, +otherwise it will be a command action. +

The action automatically becomes a member of parent if parent is a TQActionGroup. +

For accelerators and status tips to work, parent must either be +a widget, or an action group whose parent is a widget. +

The text and accel will be used for tool tips and status +tips unless you provide specific text for these using setToolTip() +and setStatusTip(). + +

TQAction::TQAction ( TQObject * parent, const char * name, bool toggle ) +

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

Constructs an action called name with parent parent. +

If toggle is TRUE the action will be a toggle action, otherwise +it will be a command action. +

If parent is a TQActionGroup, the new action inserts itself into +parent. +

For accelerators and status tips to work, parent must either be +a widget, or an action group whose parent is a widget. + +

TQAction::~TQAction () +

+Destroys the object and frees allocated resources. + +

TQKeySequence TQAction::accel () const +

Returns the action's accelerator key. +See the "accel" property for details. +

void TQAction::activate () [slot] +

+Activates the action and executes all connected slots. +This only works for actions that are not toggle action. +

See also toggle(). + +

void TQAction::activated () [signal] +

+ +

This signal is emitted when an action is activated by the user, +e.g. when the user clicks a menu option or a toolbar button or +presses an action's accelerator key combination. +

Connect to this signal for command actions. Connect to the +toggled() signal for toggle actions. + +

Examples: action/application.cpp, chart/chartform.cpp, and themes/themes.cpp. +

bool TQAction::addTo ( TQWidget * w ) [virtual] +

+Adds this action to widget w. +

Currently actions may be added to TQToolBar and TQPopupMenu widgets. +

An action added to a tool bar is automatically displayed as a tool +button; an action added to a pop up menu appears as a menu option. +

addTo() returns TRUE if the action was added successfully and +FALSE otherwise. (If w is not a TQToolBar or TQPopupMenu the +action will not be added and FALSE will be returned.) +

See also removeFrom(). + +

Examples: action/application.cpp, action/toggleaction/toggleaction.cpp, and chart/chartform.cpp. +

Reimplemented in TQActionGroup. +

void TQAction::addedTo ( TQWidget * actionWidget, TQWidget * container ) [virtual protected] +

+This function is called from the addTo() function when it has +created a widget (actionWidget) for the action in the container. + +

void TQAction::addedTo ( int index, TQPopupMenu * menu ) [virtual protected] +

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

This function is called from the addTo() function when it has +created a menu item at the index position index in the popup +menu menu. + +

TQIconSet TQAction::iconSet () const +

Returns the action's icon. +See the "iconSet" property for details. +

bool TQAction::isEnabled () const +

Returns TRUE if the action is enabled; otherwise returns FALSE. +See the "enabled" property for details. +

bool TQAction::isOn () const +

Returns TRUE if a toggle action is on; otherwise returns FALSE. +See the "on" property for details. +

bool TQAction::isToggleAction () const +

Returns TRUE if the action is a toggle action; otherwise returns FALSE. +See the "toggleAction" property for details. +

bool TQAction::isVisible () const +

Returns TRUE if the action can be seen (e.g. in menus and toolbars); otherwise returns FALSE. +See the "visible" property for details. +

TQString TQAction::menuText () const +

Returns the action's menu text. +See the "menuText" property for details. +

bool TQAction::removeFrom ( TQWidget * w ) [virtual] +

+Removes the action from widget w. +

Returns TRUE if the action was removed successfully; otherwise +returns FALSE. +

See also addTo(). + +

void TQAction::setAccel ( const TQKeySequence & key ) [virtual] +

Sets the action's accelerator key to key. +See the "accel" property for details. +

void TQAction::setDisabled ( bool disable ) [slot] +

+Disables the action if disable is TRUE; otherwise +enables the action. +

See the enabled documentation for more information. + +

void TQAction::setEnabled ( bool ) [virtual slot] +

Sets whether the action is enabled. +See the "enabled" property for details. +

void TQAction::setIconSet ( const TQIconSet & ) [virtual] +

Sets the action's icon. +See the "iconSet" property for details. +

void TQAction::setMenuText ( const TQString & ) [virtual] +

Sets the action's menu text. +See the "menuText" property for details. +

void TQAction::setOn ( bool ) [virtual slot] +

Sets whether a toggle action is on. +See the "on" property for details. +

void TQAction::setStatusTip ( const TQString & ) [virtual] +

Sets the action's status tip. +See the "statusTip" property for details. +

void TQAction::setText ( const TQString & ) [virtual] +

Sets the action's descriptive text. +See the "text" property for details. +

void TQAction::setToggleAction ( bool ) [virtual] +

Sets whether the action is a toggle action. +See the "toggleAction" property for details. +

void TQAction::setToolTip ( const TQString & ) [virtual] +

Sets the action's tool tip. +See the "toolTip" property for details. +

void TQAction::setVisible ( bool ) [slot] +

Sets whether the action can be seen (e.g. in menus and toolbars). +See the "visible" property for details. +

void TQAction::setWhatsThis ( const TQString & ) [virtual] +

Sets the action's "What's This?" help text. +See the "whatsThis" property for details. +

TQString TQAction::statusTip () const +

Returns the action's status tip. +See the "statusTip" property for details. +

TQString TQAction::text () const +

Returns the action's descriptive text. +See the "text" property for details. +

void TQAction::toggle () [slot] +

+Toggles the state of a toggle action. +

See also on, activate(), toggled(), and toggleAction. + +

void TQAction::toggled ( bool on ) [signal] +

+ +

This signal is emitted when a toggle action changes state; command +actions and TQActionGroups don't emit toggled(). +

The on argument denotes the new state: If on is TRUE the +toggle action is switched on, and if on is FALSE the toggle +action is switched off. +

To trigger a user command depending on whether a toggle action has +been switched on or off connect it to a slot that takes a bool to +indicate the state, e.g. +

+ +

        TQMainWindow * window = new TQMainWindow;
+
        TQAction * labelonoffaction = new TQAction( window, "labelonoff" );
+
        TQObject::connect( labelonoffaction, SIGNAL( toggled( bool ) ),
+                          window, SLOT( setUsesTextLabel( bool ) ) );
+
+

See also activated(), toggleAction, and on. + +

Example: action/toggleaction/toggleaction.cpp. +

TQString TQAction::toolTip () const +

Returns the action's tool tip. +See the "toolTip" property for details. +

TQString TQAction::whatsThis () const +

Returns the action's "What's This?" help text. +See the "whatsThis" property for details. +


Property Documentation

+

TQKeySequence accel

+

This property holds the action's accelerator key. +

The keycodes can be found in TQt::Key and TQt::Modifier. There +is no default accelerator key. + +

Set this property's value with setAccel() and get this property's value with accel(). +

bool enabled

+

This property holds whether the action is enabled. +

Disabled actions can't be chosen by the user. They don't disappear +from the menu/tool bar but are displayed in a way which indicates +that they are unavailable, e.g. they might be displayed grayed +out. +

What's this? help on disabled actions is still available provided +the TQAction::whatsThis property is set. + +

Set this property's value with setEnabled() and get this property's value with isEnabled(). +

TQIconSet iconSet

+

This property holds the action's icon. +

The icon is used as the tool button icon and in the menu to the +left of the menu text. There is no default icon. +

If a null icon (TQIconSet::isNull() is passed into this function, +the icon of the action is cleared. +

(See the action/toggleaction/toggleaction.cpp example.) +

+

Set this property's value with setIconSet() and get this property's value with iconSet(). +

TQString menuText

+

This property holds the action's menu text. +

If the action is added to a menu the menu option will consist of +the icon (if there is one), the menu text and the accelerator (if +there is one). If the menu text is not explicitly set in the +constructor or by using setMenuText() the action's description +text will be used as the menu text. There is no default menu text. +

See also text. + +

Set this property's value with setMenuText() and get this property's value with menuText(). +

bool on

+

This property holds whether a toggle action is on. +

This property is always on (TRUE) for command actions and +TQActionGroups; setOn() has no effect on them. For action's +where isToggleAction() is TRUE, this property's default value is +off (FALSE). +

See also toggleAction. + +

Set this property's value with setOn() and get this property's value with isOn(). +

TQString statusTip

+

This property holds the action's status tip. +

The statusTip is displayed on all status bars that this action's +toplevel parent widget provides. +

If no status tip is defined, the action uses the tool tip text. +

There is no default statusTip text. +

See also statusTip and toolTip. + +

Set this property's value with setStatusTip() and get this property's value with statusTip(). +

TQString text

+

This property holds the action's descriptive text. +

If TQMainWindow::usesTextLabel is TRUE, the text appears as a +label in the relevant tool button. It also serves as the default +text in menus and tool tips if these have not been specifically +defined. There is no default text. +

See also menuText, toolTip, and statusTip. + +

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

bool toggleAction

+

This property holds whether the action is a toggle action. +

A toggle action is one which has an on/off state. For example a +Bold toolbar button is either on or off. An action which is not a +toggle action is a command action; a command action is simply +executed, e.g. file save. This property's default is FALSE. +

In some situations, the state of one toggle action should depend +on the state of others. For example, "Left Align", "Center" and +"Right Align" toggle actions are mutually exclusive. To achieve +exclusive toggling, add the relevant toggle actions to a +TQActionGroup with the TQActionGroup::exclusive property set to +TRUE. + +

Set this property's value with setToggleAction() and get this property's value with isToggleAction(). +

TQString toolTip

+

This property holds the action's tool tip. +

This text is used for the tool tip. If no status tip has been set +the tool tip will be used for the status tip. +

If no tool tip is specified the action's text is used, and if that +hasn't been specified the description text is used as the tool tip +text. +

There is no default tool tip text. +

See also statusTip and accel. + +

Set this property's value with setToolTip() and get this property's value with toolTip(). +

bool visible

+

This property holds whether the action can be seen (e.g. in menus and toolbars). +

If visible is TRUE the action can be seen (e.g. in menus and +toolbars) and chosen by the user; if visible is FALSE the +action cannot be seen or chosen by the user. +

Actions which are not visible are not grayed out; they do not +appear at all. + +

Set this property's value with setVisible() and get this property's value with isVisible(). +

TQString whatsThis

+

This property holds the action's "What's This?" help text. +

The whats this text is used to provide a brief description of the +action. The text may contain rich text (HTML-like tags -- see +TQStyleSheet for the list of supported tags). There is no default +"What's This" text. +

See also TQWhatsThis. + +

Set this property's value with setWhatsThis() and get this property's value with whatsThis(). + +


+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/qactiongroup-members.html b/doc/html/qactiongroup-members.html new file mode 100644 index 00000000..66a10f50 --- /dev/null +++ b/doc/html/qactiongroup-members.html @@ -0,0 +1,128 @@ + + + + + +TQActionGroup Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQActionGroup

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qactiongroup.html b/doc/html/qactiongroup.html new file mode 100644 index 00000000..4a4ef8d3 --- /dev/null +++ b/doc/html/qactiongroup.html @@ -0,0 +1,219 @@ + + + + + +TQActionGroup Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQActionGroup Class Reference

+ +

The TQActionGroup class groups actions together. +More... +

#include <qaction.h> +

Inherits TQAction. +

List of all member functions. +

Public Members

+ +

Signals

+ +

Properties

+
    +
  • bool exclusive - whether the action group does exclusive toggling
  • +
  • bool usesDropDown - whether the group's actions are displayed in a subwidget of the widgets the action group is added to
  • +
+

Detailed Description

+ + +The TQActionGroup class groups actions together. +

+ +

In some situations it is useful to group actions together. For +example, if you have a left justify action, a right justify action +and a center action, only one of these actions should be active at +any one time, and one simple way of achieving this is to group the +actions together in an action group. +

An action group can also be added to a menu or a toolbar as a +single unit, with all the actions within the action group +appearing as separate menu options and toolbar buttons. +

Here's an example from examples/textedit: + + +

        TQActionGroup *grp = new TQActionGroup( this );
+        connect( grp, SIGNAL( selected( TQAction* ) ), this, SLOT( textAlign( TQAction* ) ) );
+
+

Here we create a new action group. Since the action group is exclusive +by default, only one of the actions in the group is ever active at any +one time. We then connect the group's selected() signal to our +textAlign() slot. +

        actionAlignLeft = new TQAction( TQPixmap::fromMimeSource( "textleft.xpm" ), tr( "&Left" ), CTRL + Key_L, grp, "textLeft" );
+        actionAlignLeft->setToggleAction( TRUE );
+
+

We create a left align action, add it to the toolbar and the menu +and make it a toggle action. We create center and right align +actions in exactly the same way. +

+The actions in an action group emit their activated() (and for +toggle actions, toggled()) signals as usual. +

The setExclusive() function is used to ensure that only one action +is active at any one time: it should be used with actions which +have their toggleAction set to TRUE. +

Action group actions appear as individual menu options and toolbar +buttons. For exclusive action groups use setUsesDropDown() to +display the actions in a subwidget of any widget the action group +is added to. For example, the actions would appear in a combobox +in a toolbar or as a submenu in a menu. +

Actions can be added to an action group using add(), but normally +they are added by creating the action with the action group as +parent. Actions can have separators dividing them using +addSeparator(). Action groups are added to widgets with addTo(). +

See also Main Window and Related Classes and Basic Widgets. + +


Member Function Documentation

+

TQActionGroup::TQActionGroup ( TQObject * parent, const char * name = 0 ) +

+Constructs an action group called name, with parent parent. +

The action group is exclusive by default. Call setExclusive(FALSE) to make +the action group non-exclusive. + +

TQActionGroup::TQActionGroup ( TQObject * parent, const char * name, bool exclusive ) +

+Constructs an action group called name, with parent parent. +

If exclusive is TRUE only one toggle action in the group will +ever be active. +

See also exclusive. + +

TQActionGroup::~TQActionGroup () +

+Destroys the object and frees allocated resources. + +

void TQActionGroup::add ( TQAction * action ) +

+Adds action action to this group. +

Normally an action is added to a group by creating it with the +group as parent, so this function is not usually used. +

See also addTo(). + +

void TQActionGroup::addSeparator () +

+Adds a separator to the group. + +

bool TQActionGroup::addTo ( TQWidget * w ) [virtual] +

+Adds this action group to the widget w. +

If isExclusive() is FALSE or usesDropDown() is FALSE, the actions within +the group are added to the widget individually. For example, if the widget +is a menu, the actions will appear as individual menu options, and +if the widget is a toolbar, the actions will appear as toolbar buttons. +

If both isExclusive() and usesDropDown() are TRUE, the actions +are presented either in a combobox (if w is a toolbar) or in a +submenu (if w is a menu). +

All actions should be added to the action group before the +action group is added to the widget. If actions are added to the +action group after the action group has been added to the +widget these later actions will not appear. +

See also exclusive, usesDropDown, and removeFrom(). + +

Example: themes/themes.cpp. +

Reimplemented from TQAction. +

void TQActionGroup::insert ( TQAction * a ) +

+

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

Use add() instead, or better still create the action with the action +group as its parent. + +

bool TQActionGroup::isExclusive () const +

Returns TRUE if the action group does exclusive toggling; otherwise returns FALSE. +See the "exclusive" property for details. +

void TQActionGroup::selected ( TQAction * ) [signal] +

+ +

This signal is emitted from exclusive groups when toggle actions +change state. +

The argument is the action whose state changed to "on". +

See also exclusive, on, and TQAction::toggled(). + +

Examples: chart/chartform.cpp and textedit/textedit.cpp. +

void TQActionGroup::setExclusive ( bool ) +

Sets whether the action group does exclusive toggling. +See the "exclusive" property for details. +

void TQActionGroup::setUsesDropDown ( bool enable ) +

Sets whether the group's actions are displayed in a subwidget of the widgets the action group is added to to enable. +See the "usesDropDown" property for details. +

bool TQActionGroup::usesDropDown () const +

Returns TRUE if the group's actions are displayed in a subwidget of the widgets the action group is added to; otherwise returns FALSE. +See the "usesDropDown" property for details. +


Property Documentation

+

bool exclusive

+

This property holds whether the action group does exclusive toggling. +

If exclusive is TRUE only one toggle action in the action group +can ever be active at any one time. If the user chooses another +toggle action in the group the one they chose becomes active and +the one that was active becomes inactive. +

See also TQAction::toggleAction. + +

Set this property's value with setExclusive() and get this property's value with isExclusive(). +

bool usesDropDown

+

This property holds whether the group's actions are displayed in a subwidget of the widgets the action group is added to. +

Exclusive action groups added to a toolbar display their actions +in a combobox with the action's TQAction::text and TQAction::iconSet properties shown. Non-exclusive groups are +represented by a tool button showing their TQAction::iconSet and +-- depending on TQMainWindow::usesTextLabel() -- text() +property. +

In a popup menu the member actions are displayed in a submenu. +

Changing usesDropDown only affects subsequent calls to addTo(). +

Note that setting this property for actions in a combobox causes +calls to their TQAction::setVisible(), +TQAction::setEnabled(), and +TQAction::setDisabled() functions to have no effect. +

This property's default is FALSE. +

+

Set this property's value with setUsesDropDown() and get this property's value with usesDropDown(). + +


+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/qactiongroup_menu.png b/doc/html/qactiongroup_menu.png new file mode 100644 index 00000000..13318223 Binary files /dev/null and b/doc/html/qactiongroup_menu.png differ diff --git a/doc/html/qactiongroup_menu_subwidget.png b/doc/html/qactiongroup_menu_subwidget.png new file mode 100644 index 00000000..5a75e683 Binary files /dev/null and b/doc/html/qactiongroup_menu_subwidget.png differ diff --git a/doc/html/qactiongroup_toolbar.png b/doc/html/qactiongroup_toolbar.png new file mode 100644 index 00000000..dc131efc Binary files /dev/null and b/doc/html/qactiongroup_toolbar.png differ diff --git a/doc/html/qactiongroup_toolbar_exclusive_subwidget.png b/doc/html/qactiongroup_toolbar_exclusive_subwidget.png new file mode 100644 index 00000000..ff7454cf Binary files /dev/null and b/doc/html/qactiongroup_toolbar_exclusive_subwidget.png differ diff --git a/doc/html/qactiongroup_toolbar_nonexclusive_subwidget.png b/doc/html/qactiongroup_toolbar_nonexclusive_subwidget.png new file mode 100644 index 00000000..161b8537 Binary files /dev/null and b/doc/html/qactiongroup_toolbar_nonexclusive_subwidget.png differ diff --git a/doc/html/qapplication-h.html b/doc/html/qapplication-h.html new file mode 100644 index 00000000..a822ad04 --- /dev/null +++ b/doc/html/qapplication-h.html @@ -0,0 +1,576 @@ + + + + + +qapplication.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qapplication.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qapplication.h   3.3.8   edited Jan 16 10:54 $
+**
+** Definition of TQApplication class
+**
+** Created : 931107
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQAPPLICATION_H
+#define TQAPPLICATION_H
+
+#ifndef QT_H
+#include "qdesktopwidget.h"
+#include "qasciidict.h"
+#include "qpalette.h"
+#include "qtranslator.h"
+#include "qstrlist.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+class TQSessionManager;
+class TQStyle;
+class TQTranslator;
+class TQEventLoop;
+#if defined(Q_WS_QWS)
+class TQWSDecoration;
+#endif
+
+#ifdef QT_THREAD_SUPPORT
+class TQMutex;
+#endif // QT_THREAD_SUPPORT
+
+
+class TQApplication;
+extern Q_EXPORT TQApplication *qApp;		// global application object
+
+
+class Q_EXPORT TQApplication : public TQObject
+{
+    Q_OBJECT
+public:
+    TQApplication( int &argc, char **argv );
+    TQApplication( int &argc, char **argv, bool GUIenabled );
+    enum Type { Tty, GuiClient, GuiServer };
+    TQApplication( int &argc, char **argv, Type );
+#if defined(Q_WS_X11)
+    TQApplication( Display* dpy, HANDLE visual = 0, HANDLE cmap = 0 );
+    TQApplication( Display *dpy, int argc, char **argv,
+		  HANDLE visual = 0, HANDLE cmap= 0 );
+#endif
+    virtual ~TQApplication();
+
+    int		    argc()	const;
+    char	  **argv()	const;
+
+    Type type() const;
+
+#ifndef QT_NO_STYLE
+    static TQStyle  &style();
+    static void	    setStyle( TQStyle* );
+    static TQStyle*  setStyle( const TQString& );
+#endif
+#ifndef Q_QDOC
+    enum ColorMode { NormalColors, CustomColors };
+    static ColorMode colorMode();
+    static void      setColorMode( TQApplication::ColorMode );
+#endif
+
+    enum ColorSpec { NormalColor=0, CustomColor=1, ManyColor=2 };
+    static int	     colorSpec();
+    static void      setColorSpec( int );
+#ifndef QT_NO_CURSOR
+    static TQCursor  *overrideCursor();
+    static void	     setOverrideCursor( const TQCursor &, bool replace=FALSE );
+    static void	     restoreOverrideCursor();
+#endif
+    static bool	     hasGlobalMouseTracking();
+    static void	     setGlobalMouseTracking( bool enable );
+#ifndef QT_NO_PALETTE
+    static TQPalette  palette( const TQWidget* = 0 );
+    static void	     setPalette( const TQPalette &, bool informWidgets=FALSE,
+				 const char* className = 0 );
+#endif
+    static TQFont     font( const TQWidget* = 0 );
+    static void	     setFont( const TQFont &, bool informWidgets=FALSE,
+			      const char* className = 0 );
+    static TQFontMetrics fontMetrics();
+
+    TQWidget	    *mainWidget()  const;
+    virtual void     setMainWidget( TQWidget * );
+    virtual void     polish( TQWidget * );
+
+    static TQWidgetList *allWidgets();
+    static TQWidgetList *topLevelWidgets();
+
+    static TQDesktopWidget   *desktop();
+
+    static TQWidget     *activePopupWidget();
+    static TQWidget     *activeModalWidget();
+#ifndef QT_NO_CLIPBOARD
+    static TQClipboard  *clipboard();
+#endif
+    TQWidget	       *focusWidget() const;
+    TQWidget	       *activeWindow() const;
+
+    static TQWidget  *widgetAt( int x, int y, bool child=FALSE );
+    static TQWidget  *widgetAt( const TQPoint &, bool child=FALSE );
+
+    static TQEventLoop *eventLoop();
+
+    int		     exec();
+    void	     processEvents();
+    void	     processEvents( int maxtime );
+    void	     processOneEvent();
+    bool	     hasPendingEvents();
+    int		     enter_loop();
+    void	     exit_loop();
+    int		     loopLevel() const;
+    static void	     exit( int retcode=0 );
+
+    static bool	     sendEvent( TQObject *receiver, TQEvent *event );
+    static void	     postEvent( TQObject *receiver, TQEvent *event );
+    static void	     sendPostedEvents( TQObject *receiver, int event_type );
+    static void	     sendPostedEvents();
+
+    static void      removePostedEvents( TQObject *receiver );
+
+    virtual bool     notify( TQObject *, TQEvent * );
+
+    static bool	     startingUp();
+    static bool	     closingDown();
+
+    static void	     flushX();
+    static void flush();
+    static void	     syncX();
+
+    static void	     beep();
+
+#ifndef QT_NO_TRANSLATION
+# ifndef QT_NO_TEXTCODEC
+    void	     setDefaultCodec( TQTextCodec * );
+    TQTextCodec*	     defaultCodec() const;
+# endif
+    void	     installTranslator( TQTranslator * );
+    void	     removeTranslator( TQTranslator * );
+#endif
+    enum Encoding { DefaultCodec, UnicodeUTF8 };
+    TQString	     translate( const char * context,
+				const char * key,
+				const char * comment = 0,
+				Encoding encoding = DefaultCodec ) const;
+#ifndef QT_NO_DIR
+    TQString   applicationDirPath();
+    TQString   applicationFilePath();
+#endif
+#ifndef QT_NO_PALETTE
+    // obsolete functions
+    static void      setWinStyleHighlightColor( const TQColor &c ) {
+	TQPalette p( palette() );
+	p.setColor( TQColorGroup::Highlight, c );
+	setPalette( p, TRUE);
+    }
+    static const TQColor &winStyleHighlightColor() {
+	return palette().active().highlight();
+    }
+#endif
+    static void      setDesktopSettingsAware( bool );
+    static bool      desktopSettingsAware();
+
+    static void      setCursorFlashTime( int );
+    static int       cursorFlashTime();
+
+    static void      setDoubleClickInterval( int );
+    static int       doubleClickInterval();
+#ifndef QT_NO_WHEELEVENT
+    static void      setWheelScrollLines( int );
+    static int       wheelScrollLines();
+#endif
+    static void	     setGlobalStrut( const TQSize & );
+    static TQSize     globalStrut();
+
+#ifndef QT_NO_COMPONENT
+    static void      setLibraryPaths( const TQStringList & );
+    static TQStringList libraryPaths();
+    static void      addLibraryPath( const TQString & );
+    static void      removeLibraryPath( const TQString & );
+#endif // QT_NO_COMPONENT
+    static void setStartDragTime( int ms );
+    static int startDragTime();
+    static void setStartDragDistance( int l );
+    static int startDragDistance();
+
+    static void setReverseLayout( bool b );
+    static bool reverseLayout();
+
+    static int horizontalAlignment( int align );
+
+    static bool	    isEffectEnabled( TQt::UIEffect );
+    static void	    setEffectEnabled( TQt::UIEffect, bool enable = TRUE );
+
+#if defined(Q_WS_MAC)
+    virtual bool     macEventFilter( EventHandlerCallRef, EventRef );
+#endif
+#if defined(Q_WS_WIN)
+    virtual bool     winEventFilter( MSG * );
+#endif
+#if defined(Q_WS_X11)
+    virtual bool     x11EventFilter( XEvent * );
+    virtual int	     x11ClientMessage( TQWidget*, XEvent*, bool passive_only);
+    int              x11ProcessEvent( XEvent* );
+#endif
+#if defined(Q_WS_QWS)
+    virtual bool     qwsEventFilter( TQWSEvent * );
+    int              qwsProcessEvent( TQWSEvent* );
+    void             qwsSetCustomColors( TQRgb *colortable, int start, int numColors );
+/*!
+  \internal
+    Returns true if the process is GUI server
+*/
+    bool          qwsIsGUIServer();
+#ifndef QT_NO_QWS_MANAGER
+    static TQWSDecoration &qwsDecoration();
+    static void      qwsSetDecoration( TQWSDecoration *);
+#endif
+#endif
+
+#if defined(Q_OS_WIN32) || defined(Q_OS_CYGWIN)
+    static WindowsVersion winVersion();
+#elif defined(Q_OS_MAC)
+    static MacintoshVersion macVersion();
+#endif
+#if defined(Q_WS_WIN)
+    void	     winFocus( TQWidget *, bool );
+    static void	     winMouseButtonUp();
+#endif
+
+#ifndef QT_NO_SESSIONMANAGER
+    // session management
+    bool	     isSessionRestored() const;
+    TQString 	sessionId() const;
+    TQString 	sessionKey() const;
+    virtual void     commitData( TQSessionManager& sm );
+    virtual void     saveState( TQSessionManager& sm );
+#endif
+#if defined(Q_WS_X11)
+    static void create_xim();
+    static void close_xim();
+    static bool x11_apply_settings();
+#endif
+    void	     wakeUpGuiThread();
+#if defined(QT_THREAD_SUPPORT)
+    void	     lock();
+    void	     unlock(bool wakeUpGui = TRUE);
+    bool	     locked();
+    bool             tryLock();
+#endif
+
+signals:
+    void	     lastWindowClosed();
+    void	     aboutToQuit();
+    void	     guiThreadAwake();
+
+public slots:
+    void	     tquit();
+    void	     closeAllWindows();
+    void	     aboutTQt();
+
+#if defined(Q_WS_QWS)
+protected:
+    void setArgs(int, char **);
+#endif
+
+protected:
+    bool event(TQEvent *);
+
+private:
+    void construct( int &argc, char **argv, Type );
+    void initialize( int, char ** );
+    void init_precmdline();
+    void process_cmdline( int* argcptr, char ** argv );
+    bool internalNotify( TQObject *, TQEvent * );
+#if defined(Q_WS_QWS)
+    static TQWidget *findChildWidget( const TQWidget *p, const TQPoint &pos );
+    static TQWidget *findWidget( const TQObjectList&, const TQPoint &, bool rec );
+#endif
+
+#if defined(Q_WS_MAC)
+    bool do_mouse_down(Point *, bool *);
+    static TQMAC_PASCAL OSStatus globalEventProcessor(EventHandlerCallRef,  EventRef, void *);
+    static TQMAC_PASCAL OSStatus globalAppleEventProcessor(const AppleEvent *, AppleEvent *, long);
+    static TQMAC_PASCAL void qt_context_timer_callbk(EventLoopTimerRef, void *);
+    static TQMAC_PASCAL void qt_select_timer_callbk(EventLoopTimerRef, void *);
+    static bool qt_mac_apply_settings();
+    friend class TQMacInputMethod;
+    friend TQMAC_PASCAL OSStatus qt_window_event(EventHandlerCallRef, EventRef, void *);
+    friend void qt_mac_update_os_settings();
+    friend bool qt_set_socket_handler( int, int, TQObject *, bool);
+    friend void qt_mac_destroy_widget(TQWidget *);
+    friend void qt_init(int *, char **, TQApplication::Type);
+#endif
+
+#ifdef QT_THREAD_SUPPORT
+    static TQMutex   *qt_mutex;
+#endif // QT_THREAD_SUPPORT
+
+    int		     app_argc;
+    char	   **app_argv;
+    bool	     tquit_now;
+    int		     tquit_code;
+    static TQStyle   *app_style;
+    static int	     app_cspec;
+#ifndef QT_NO_PALETTE
+    static TQPalette *app_pal;
+#endif
+    static TQFont    *app_font;
+#ifndef QT_NO_CURSOR
+    static TQCursor  *app_cursor;
+#endif
+    static TQEventLoop* eventloop;
+    static int	     app_tracking;
+    static bool	     is_app_running;
+    static bool	     is_app_closing;
+    static bool	     app_exit_loop;
+    static int	     loop_level;
+    static TQWidget  *main_widget;
+    static TQWidget  *focus_widget;
+    static TQWidget  *active_window;
+    static bool	     obey_desktop_settings;
+    static int	     cursor_flash_time;
+    static int	     mouse_double_click_time;
+    static int	     wheel_scroll_lines;
+    static int	     composedUnicode; // Value, meta-composed character
+
+    static bool	     animate_ui;
+    static bool	     animate_menu;
+    static bool	     animate_tooltip;
+    static bool	     animate_combo;
+    static bool	     fade_menu;
+    static bool	     fade_tooltip;
+    static bool	     animate_toolbox;
+    static bool	     widgetCount; // Coupled with -widgetcount switch
+    static bool	     metaComposeUnicode;
+
+    TQValueList<TQTranslator*> *translators;
+#ifndef QT_NO_SESSIONMANAGER
+    TQSessionManager *session_manager;
+    TQString	     session_id;
+    static TQString* session_key;
+    bool	     is_session_restored;
+#endif
+#if defined(Q_WS_X11) && !defined (QT_NO_STYLE )
+    static void x11_initialize_style();
+#endif
+
+    static TQSize     app_strut;
+#ifndef QT_NO_COMPONENT
+    static TQStringList *app_libpaths;
+#endif
+    static TQAsciiDict<TQPalette> *app_palettes;
+    static TQAsciiDict<TQFont>    *app_fonts;
+
+    static TQWidgetList *popupWidgets;
+    bool	     inPopupMode() const;
+    void	     closePopup( TQWidget *popup );
+    void	     openPopup( TQWidget *popup );
+    void	     setActiveWindow( TQWidget* act );
+
+    static bool      sendSpontaneousEvent( TQObject *receiver, TQEvent *event );
+    static void      removePostedEvent( TQEvent * );
+
+    friend class TQWidget;
+    friend class TQETWidget;
+    friend class TQDialog;
+    friend class TQAccelManager;
+    friend class TQEvent;
+    friend class TQTranslator;
+    friend class TQEventLoop;
+    friend Q_EXPORT void qt_ucm_initialize( TQApplication * );
+#if defined(Q_WS_WIN)
+    friend bool qt_sendSpontaneousEvent( TQObject*, TQEvent* );
+#endif
+#if defined(Q_WS_QWS)
+    friend class TQInputContext;
+#endif
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQApplication( const TQApplication & );
+    TQApplication &operator=( const TQApplication & );
+#endif
+};
+
+inline int TQApplication::argc() const
+{
+    return app_argc;
+}
+
+inline char **TQApplication::argv() const
+{
+    return app_argv;
+}
+
+#if defined(Q_WS_QWS)
+inline void TQApplication::setArgs(int c, char **v)
+{
+        app_argc = c;
+	    app_argv = v;
+}
+#endif
+
+#ifndef QT_NO_CURSOR
+inline TQCursor *TQApplication::overrideCursor()
+{
+    return app_cursor;
+}
+#endif
+inline bool TQApplication::hasGlobalMouseTracking()
+{
+    return app_tracking > 0;
+}
+
+inline TQWidget *TQApplication::mainWidget() const
+{
+    return main_widget;
+}
+
+inline TQWidget *TQApplication::focusWidget() const
+{
+    return focus_widget;
+}
+
+inline TQWidget *TQApplication::activeWindow() const
+{
+    return active_window;
+}
+
+inline TQWidget *TQApplication::widgetAt( const TQPoint &p, bool child )
+{
+    return widgetAt( p.x(), p.y(), child );
+}
+
+inline bool TQApplication::inPopupMode() const
+{
+    return popupWidgets != 0;
+}
+#ifndef QT_NO_SESSIONMANAGER
+inline bool TQApplication::isSessionRestored() const
+{
+    return is_session_restored;
+}
+
+inline TQString TQApplication::sessionId() const
+{
+    return session_id;
+}
+
+inline TQString TQApplication::sessionKey() const
+{
+    return session_key ? *session_key : TQString::null;
+}
+#endif
+inline TQSize TQApplication::globalStrut()
+{
+    return app_strut;
+}
+
+inline bool TQApplication::sendEvent( TQObject *receiver, TQEvent *event )
+{  if ( event ) event->spont = FALSE; return qApp ? qApp->notify( receiver, event ) : FALSE; }
+
+inline bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event )
+{ if ( event ) event->spont = TRUE; return qApp ? qApp->notify( receiver, event ) : FALSE; }
+
+#ifdef QT_NO_TRANSLATION
+// Simple versions
+inline TQString TQApplication::translate( const char *, const char *sourceText,
+					const char *, Encoding encoding ) const
+{
+#ifndef QT_NO_TEXTCODEC
+    if ( encoding == UnicodeUTF8 )
+	return TQString::fromUtf8( sourceText );
+    else
+#endif
+	return TQString::fromLatin1( sourceText );
+}
+#endif
+
+inline int TQApplication::horizontalAlignment( int align )
+{
+    align &= AlignHorizontal_Mask;
+    if ( align == AlignAuto ) {
+	if ( reverseLayout() )
+	    align = AlignRight;
+	else
+	    align = AlignLeft;
+    }
+    return align;
+}
+
+#endif // TQAPPLICATION_H
+
+
+ +


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

Complete Member List for TQApplication

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qapplication.html b/doc/html/qapplication.html new file mode 100644 index 00000000..cfdfa098 --- /dev/null +++ b/doc/html/qapplication.html @@ -0,0 +1,2046 @@ + + + + + +TQApplication Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQApplication Class Reference

+ +

The TQApplication class manages the GUI application's control +flow and main settings. +More... +

#include <qapplication.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Static Public Members

+ +

Related Functions

+ +

Detailed Description

+ + +The TQApplication class manages the GUI application's control +flow and main settings. +

+ +

It contains the main event loop, where all events from the window +system and other sources are processed and dispatched. It also +handles the application's initialization and finalization, and +provides session management. It also handles most system-wide and +application-wide settings. +

For any GUI application that uses TQt, there is precisely one +TQApplication object, no matter whether the application has 0, 1, 2 +or more windows at any time. +

The TQApplication object is accessible through the global pointer qApp. Its main areas of responsibility are: +

    +

  • It initializes the application with the user's desktop settings +such as palette(), font() and doubleClickInterval(). It keeps track +of these properties in case the user changes the desktop globally, for +example through some kind of control panel. +

  • It performs event handling, meaning that it receives events +from the underlying window system and dispatches them to the relevant +widgets. By using sendEvent() and postEvent() you can send your own +events to widgets. +

  • It parses common command line arguments and sets its internal +state accordingly. See the constructor documentation below for more details about this. +

  • It defines the application's look and feel, which is +encapsulated in a TQStyle object. This can be changed at runtime +with setStyle(). +

  • It specifies how the application is to allocate colors. +See setColorSpec() for details. +

  • It provides localization of strings that are visible to the user +via translate(). +

  • It provides some magical objects like the desktop() and the +clipboard(). +

  • It knows about the application's windows. You can ask which +widget is at a certain position using widgetAt(), get a list of +topLevelWidgets() and closeAllWindows(), etc. +

  • It manages the application's mouse cursor handling, +see setOverrideCursor() and setGlobalMouseTracking(). +

  • On the X window system, it provides functions to flush and sync +the communication stream, see flushX() and syncX(). +

  • It provides support for sophisticated session management. This makes it possible +for applications to terminate gracefully when the user logs out, to +cancel a shutdown process if termination isn't possible and even to +preserve the entire application's state for a future session. See +isSessionRestored(), sessionId() and commitData() and saveState() +for details. +

+

The Application walk-through +example contains a typical complete main() that does the usual +things with TQApplication. +

Since the TQApplication object does so much initialization, it +must be created before any other objects related to the user +interface are created. +

Since it also deals with common command line arguments, it is +usually a good idea to create it before any interpretation or +modification of argv is done in the application itself. (Note +also that for X11, setMainWidget() may change the main widget +according to the -geometry option. To preserve this +functionality, you must set your defaults before setMainWidget() and +any overrides after.) +

+ + + + + + + + + + + +
Groups of functions +
System settings + +desktopSettingsAware(), +setDesktopSettingsAware(), +cursorFlashTime(), +setCursorFlashTime(), +doubleClickInterval(), +setDoubleClickInterval(), +wheelScrollLines(), +setWheelScrollLines(), +palette(), +setPalette(), +font(), +setFont(), +fontMetrics(). +
Event handling + +exec(), +processEvents(), +enter_loop(), +exit_loop(), +exit(), +tquit(). +sendEvent(), +postEvent(), +sendPostedEvents(), +removePostedEvents(), +hasPendingEvents(), +notify(), +macEventFilter(), +qwsEventFilter(), +x11EventFilter(), +x11ProcessEvent(), +winEventFilter(). +
GUI Styles + +style(), +setStyle(), +polish(). +
Color usage + +colorSpec(), +setColorSpec(), +qwsSetCustomColors(). +
Text handling + +installTranslator(), +removeTranslator() +translate(). +
Widgets + +mainWidget(), +setMainWidget(), +allWidgets(), +topLevelWidgets(), +desktop(), +activePopupWidget(), +activeModalWidget(), +clipboard(), +focusWidget(), +winFocus(), +activeWindow(), +widgetAt(). +
Advanced cursor handling + +hasGlobalMouseTracking(), +setGlobalMouseTracking(), +overrideCursor(), +setOverrideCursor(), +restoreOverrideCursor(). +
X Window System synchronization + +flushX(), +syncX(). +
Session management + +isSessionRestored(), +sessionId(), +commitData(), +saveState(). +
Threading + +lock(), unlock(), locked(), tryLock(), +wakeUpGuiThread() +
Miscellaneous + +closeAllWindows(), +startingUp(), +closingDown(), +type(). +
+

Non-GUI programs: While TQt is not optimized or +designed for writing non-GUI programs, it's possible to use +some of its classes without creating a +TQApplication. This can be useful if you wish to share code between +a non-GUI server and a GUI client. + + + +

See also Main Window and Related Classes. + +


Member Type Documentation

+

TQApplication::ColorSpec

+ +
    +
  • TQApplication::NormalColor - the default color allocation policy +
  • TQApplication::CustomColor - the same as NormalColor for X11; allocates colors +to a palette on demand under Windows +
  • TQApplication::ManyColor - the right choice for applications that use thousands of +colors +

See setColorSpec() for full details. + +

TQApplication::Encoding

+

This enum type defines the 8-bit encoding of character string +arguments to translate(): +

    +
  • TQApplication::DefaultCodec - the encoding specified by +TQTextCodec::codecForTr() (Latin-1 if none has been set) +
  • TQApplication::UnicodeUTF8 - UTF-8 +

See also TQObject::tr(), TQObject::trUtf8(), and TQString::fromUtf8(). + +

TQApplication::Type

+ +
    +
  • TQApplication::Tty - a console application +
  • TQApplication::GuiClient - a GUI client application +
  • TQApplication::GuiServer - a GUI server application +
+

Member Function Documentation

+

TQApplication::TQApplication ( int & argc, char ** argv ) +

+Initializes the window system and constructs an application object +with argc command line arguments in argv. +

The global qApp pointer refers to this application object. Only +one application object should be created. +

This application object must be constructed before any paint devices (including widgets, pixmaps, bitmaps +etc.). +

Note that argc and argv might be changed. TQt removes command +line arguments that it recognizes. The modified argc and argv +can also be accessed later with qApp->argc() and qApp->argv(). +The documentation for argv() contains a detailed description of how +to process command line arguments. +

TQt debugging options (not available if TQt was compiled with the +QT_NO_DEBUG flag defined): +

    +
  • -nograb, tells TQt that it must never grab the mouse or the keyboard. +
  • -dograb (only under X11), running under a debugger can cause +an implicit -nograb, use -dograb to override. +
  • -sync (only under X11), switches to synchronous mode for +debugging. +
+

See Debugging Techniques for a more +detailed explanation. +

All TQt programs automatically support the following command line options: +

    +
  • -reverse causes text to be formatted for right-to-left languages +rather than in the usual left-to-right direction. +
  • -style= style, sets the application GUI style. Possible values +are motif, windows, and platinum. If you compiled TQt +with additional styles or have additional styles as plugins these +will be available to the -style command line option. +
  • -style style, is the same as listed above. +
  • -session= session, restores the application from an earlier +session. +
  • -session session, is the same as listed above. +
  • -widgetcount, prints debug message at the end about number of widgets left +undestroyed and maximum number of widgets existed at the same time +
+

The X11 version of TQt also supports some traditional X11 +command line options: +

    +
  • -display display, sets the X display (default is $DISPLAY). +
  • -geometry geometry, sets the client geometry of the +main widget. +
  • -fn or -font font, defines the application font. The +font should be specified using an X logical font description. +
  • -bg or -background color, sets the default background color +and an application palette (light and dark shades are calculated). +
  • -fg or -foreground color, sets the default foreground color. +
  • -btn or -button color, sets the default button color. +
  • -name name, sets the application name. +
  • -title title, sets the application title (caption). +
  • -visual TrueColor, forces the application to use a TrueColor visual +on an 8-bit display. +
  • -ncols count, limits the number of colors allocated in the +color cube on an 8-bit display, if the application is using the +TQApplication::ManyColor color specification. If count is +216 then a 6x6x6 color cube is used (i.e. 6 levels of red, 6 of green, +and 6 of blue); for other values, a cube +approximately proportional to a 2x3x1 cube is used. +
  • -cmap, causes the application to install a private color map +on an 8-bit display. +
+

See also argc() and argv(). + +

TQApplication::TQApplication ( int & argc, char ** argv, bool GUIenabled ) +

+Constructs an application object with argc command line arguments +in argv. If GUIenabled is TRUE, a GUI application is +constructed, otherwise a non-GUI (console) application is created. +

Set GUIenabled to FALSE for programs without a graphical user +interface that should be able to run without a window system. +

On X11, the window system is initialized if GUIenabled is TRUE. +If GUIenabled is FALSE, the application does not connect to the +X-server. +On Windows and Macintosh, currently the window system is always +initialized, regardless of the value of GUIenabled. This may change in +future versions of TQt. +

The following example shows how to create an application that +uses a graphical interface when available. +

+  int main( int argc, char **argv )
+  {
+#ifdef Q_WS_X11
+    bool useGUI = getenv( "DISPLAY" ) != 0;
+#else
+    bool useGUI = TRUE;
+#endif
+    TQApplication app(argc, argv, useGUI);
+
+    if ( useGUI ) {
+       //start GUI version
+       ...
+    } else {
+       //start non-GUI version
+       ...
+    }
+    return app.exec();
+  }
+
+ + +

TQApplication::TQApplication ( int & argc, char ** argv, Type type ) +

+Constructs an application object with argc command line arguments +in argv. +

For TQt/Embedded, passing TQApplication::GuiServer for type +makes this application the server (equivalent to running with the +-qws option). + +

TQApplication::TQApplication ( Display * dpy, HANDLE visual = 0, HANDLE colormap = 0 ) +

+Create an application, given an already open display dpy. If visual and colormap are non-zero, the application will use those as +the default Visual and Colormap contexts. +

Warning: TQt only supports TrueColor visuals at depths higher than 8 +bits-per-pixel. +

This is available only on X11. + +

TQApplication::TQApplication ( Display * dpy, int argc, char ** argv, HANDLE visual = 0, HANDLE colormap = 0 ) +

+Create an application, given an already open display dpy and using +argc command line arguments in argv. If visual and colormap are non-zero, the application will use those as +the default Visual and Colormap contexts. +

Warning: TQt only supports TrueColor visuals at depths higher than 8 +bits-per-pixel. +

This is available only on X11. +

+

TQApplication::~TQApplication () [virtual] +

+Cleans up any window system resources that were allocated by this +application. Sets the global variable qApp to 0. + +

void TQApplication::aboutTQt () [slot] +

+Displays a simple message box about TQt. The message includes the +version number of TQt being used by the application. +

This is useful for inclusion in the Help menu of an application. +See the examples/menu/menu.cpp example. +

This function is a convenience slot for TQMessageBox::aboutTQt(). + +

void TQApplication::aboutToQuit () [signal] +

+ +

This signal is emitted when the application is about to tquit the +main event loop, e.g. when the event loop level drops to zero. +This may happen either after a call to tquit() from inside the +application or when the users shuts down the entire desktop session. +

The signal is particularly useful if your application has to do some +last-second cleanup. Note that no user interaction is possible in +this state. +

See also tquit(). + +

TQWidget * TQApplication::activeModalWidget () [static] +

+Returns the active modal widget. +

A modal widget is a special top level widget which is a subclass of +TQDialog that specifies the modal parameter of the constructor as +TRUE. A modal widget must be closed before the user can continue +with other parts of the program. +

Modal widgets are organized in a stack. This function returns +the active modal widget at the top of the stack. +

See also activePopupWidget() and topLevelWidgets(). + +

TQWidget * TQApplication::activePopupWidget () [static] +

+Returns the active popup widget. +

A popup widget is a special top level widget that sets the WType_Popup widget flag, e.g. the TQPopupMenu widget. When the +application opens a popup widget, all events are sent to the popup. +Normal widgets and modal widgets cannot be accessed before the popup +widget is closed. +

Only other popup widgets may be opened when a popup widget is shown. +The popup widgets are organized in a stack. This function returns +the active popup widget at the top of the stack. +

See also activeModalWidget() and topLevelWidgets(). + +

TQWidget * TQApplication::activeWindow () const +

+ +

Returns the application top-level window that has the keyboard input +focus, or 0 if no application window has the focus. Note that +there might be an activeWindow() even if there is no focusWidget(), +for example if no widget in that window accepts key events. +

See also TQWidget::setFocus(), TQWidget::focus, and focusWidget(). + +

Example: network/mail/smtp.cpp. +

void TQApplication::addLibraryPath ( const TQString & path ) [static] +

+Append path to the end of the library path list. If path is +empty or already in the path list, the path list is not changed. +

The default path list consists of a single entry, the installation +directory for plugins. The default installation directory for plugins +is INSTALL/plugins, where INSTALL is the directory where TQt was +installed. +

See also removeLibraryPath(), libraryPaths(), and setLibraryPaths(). + +

TQWidgetList * TQApplication::allWidgets () [static] +

+Returns a list of all the widgets in the application. +

The list is created using new and must be deleted by the caller. +

The list is empty (TQPtrList::isEmpty()) if there are no widgets. +

Note that some of the widgets may be hidden. +

Example that updates all widgets: +

+    TQWidgetList  *list = TQApplication::allWidgets();
+    TQWidgetListIt it( *list );         // iterate over the widgets
+    TQWidget * w;
+    while ( (w=it.current()) != 0 ) {  // for each widget...
+        ++it;
+        w->update();
+    }
+    delete list;                      // delete the list, not the widgets
+  
+ +

The TQWidgetList class is defined in the qwidgetlist.h header +file. +

Warning: Delete the list as soon as you have finished using it. +The widgets in the list may be deleted by someone else at any time. +

See also topLevelWidgets(), TQWidget::visible, and TQPtrList::isEmpty(). + +

TQString TQApplication::applicationDirPath () +

+Returns the directory that contains the application executable. +

For example, if you have installed TQt in the C:\Trolltech\TQt +directory, and you run the demo example, this function will +return "C:/Trolltech/TQt/examples/demo". +

On Mac OS X this will point to the directory actually containing the +executable, which may be inside of an application bundle (if the +application is bundled). +

Warning: On Unix, this function assumes that argv[0] contains the file +name of the executable (which it normally does). It also assumes that +the current directory hasn't been changed by the application. +

See also applicationFilePath(). + +

TQString TQApplication::applicationFilePath () +

+Returns the file path of the application executable. +

For example, if you have installed TQt in the C:\Trolltech\TQt +directory, and you run the demo example, this function will +return "C:/Trolltech/TQt/examples/demo/demo.exe". +

Warning: On Unix, this function assumes that argv[0] contains the file +name of the executable (which it normally does). It also assumes that +the current directory hasn't been changed by the application. +

See also applicationDirPath(). + +

int TQApplication::argc () const +

+ +

Returns the number of command line arguments. +

The documentation for argv() describes how to process command line +arguments. +

See also argv() and TQApplication::TQApplication(). + +

Examples: chart/main.cpp and scribble/scribble.cpp. +

char ** TQApplication::argv () const +

+ +

Returns the command line argument vector. +

argv()[0] is the program name, argv()[1] is the first +argument and argv()[argc()-1] is the last argument. +

A TQApplication object is constructed by passing argc and argv from the main() function. Some of the arguments may be +recognized as TQt options and removed from the argument vector. For +example, the X11 version of TQt knows about -display, -font +and a few more options. +

Example: +

+        // showargs.cpp - displays program arguments in a list box
+
+        #include <qapplication.h>
+        #include <qlistbox.h>
+
+        int main( int argc, char **argv )
+        {
+            TQApplication a( argc, argv );
+            TQListBox b;
+            a.setMainWidget( &b );
+            for ( int i = 0; i < a.argc(); i++ )  // a.argc() == argc
+                b.insertItem( a.argv()[i] );      // a.argv()[i] == argv[i]
+            b.show();
+            return a.exec();
+        }
+    
+ +

If you run showargs -display unix:0 -font 9x15bold hello world +under X11, the list box contains the three strings "showargs", +"hello" and "world". +

TQt provides a global pointer, qApp, that points to the +TQApplication object, and through which you can access argc() and +argv() in functions other than main(). +

See also argc() and TQApplication::TQApplication(). + +

Examples: chart/main.cpp and scribble/scribble.cpp. +

void TQApplication::beep () [static] +

+Sounds the bell, using the default volume and sound. + +

TQClipboard * TQApplication::clipboard () [static] +

+Returns a pointer to the application global clipboard. + +

Examples: regexptester/regexptester.cpp and showimg/showimg.cpp. +

void TQApplication::closeAllWindows () [slot] +

+Closes all top-level windows. +

This function is particularly useful for applications with many +top-level windows. It could, for example, be connected to a "Quit" +entry in the file menu as shown in the following code example: +

+    // the "Quit" menu entry should try to close all windows
+    TQPopupMenu* file = new TQPopupMenu( this );
+    file->insertItem( "&Quit", qApp, SLOT(closeAllWindows()), CTRL+Key_Q );
+
+    // when the last window is closed, the application should tquit
+    connect( qApp, SIGNAL( lastWindowClosed() ), qApp, SLOT( tquit() ) );
+  
+ +

The windows are closed in random order, until one window does not +accept the close event. +

See also TQWidget::close(), TQWidget::closeEvent(), lastWindowClosed(), tquit(), topLevelWidgets(), and TQWidget::isTopLevel. + +

+

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

bool TQApplication::closingDown () [static] +

+Returns TRUE if the application objects are being destroyed; +otherwise returns FALSE. +

See also startingUp(). + +

int TQApplication::colorSpec () [static] +

+Returns the color specification. +

See also TQApplication::setColorSpec(). + +

Example: showimg/showimg.cpp. +

void TQApplication::commitData ( TQSessionManager & sm ) [virtual] +

+ +

This function deals with session + management. It is invoked when the TQSessionManager wants the +application to commit all its data. +

Usually this means saving all open files, after getting +permission from the user. Furthermore you may want to provide a means +by which the user can cancel the shutdown. +

Note that you should not exit the application within this function. +Instead, the session manager may or may not do this afterwards, +depending on the context. +

Warning: Within this function, no user interaction is possible, unless you ask the session manager sm for explicit permission. +See TQSessionManager::allowsInteraction() and +TQSessionManager::allowsErrorInteraction() for details and example +usage. +

The default implementation requests interaction and sends a close +event to all visible top level widgets. If any event was +rejected, the shutdown is canceled. +

See also isSessionRestored(), sessionId(), saveState(), and the Session Management overview. + +

int TQApplication::cursorFlashTime () [static] +

+Returns the text cursor's flash (blink) time in milliseconds. The +flash time is the time retquired to display, invert and restore the +caret display. +

The default value on X11 is 1000 milliseconds. On Windows, the +control panel value is used. +

Widgets should not cache this value since it may be changed at any +time by the user changing the global desktop settings. +

See also setCursorFlashTime(). + +

TQTextCodec * TQApplication::defaultCodec () const +

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

Returns TQTextCodec::codecForTr(). + +

TQDesktopWidget * TQApplication::desktop () [static] +

+Returns the desktop widget (also called the root window). +

The desktop widget is useful for obtaining the size of the screen. +It may also be possible to draw on the desktop. We recommend against +assuming that it's possible to draw on the desktop, since this does +not work on all operating systems. +

+    TQDesktopWidget *d = TQApplication::desktop();
+    int w = d->width();     // returns desktop width
+    int h = d->height();    // returns desktop height
+  
+ + +

Examples: canvas/main.cpp, desktop/desktop.cpp, helpviewer/main.cpp, i18n/main.cpp, qmag/qmag.cpp, qwerty/main.cpp, and scribble/main.cpp. +

bool TQApplication::desktopSettingsAware () [static] +

+Returns the value set by setDesktopSettingsAware(); by default TRUE. +

See also setDesktopSettingsAware(). + +

int TQApplication::doubleClickInterval () [static] +

+Returns the maximum duration for a double click. +

The default value on X11 is 400 milliseconds. On Windows, the +control panel value is used. +

See also setDoubleClickInterval(). + +

int TQApplication::enter_loop () +

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

This function enters the main event loop (recursively). Do not call +it unless you really know what you are doing. +

Use TQApplication::eventLoop()->enterLoop() instead. +

+

TQEventLoop * TQApplication::eventLoop () [static] +

+Returns the application event loop. This function will return +zero if called during and after destroying TQApplication. +

To create your own instance of TQEventLoop or TQEventLoop subclass create +it before you create the TQApplication object. +

See also TQEventLoop. + +

Example: distributor/distributor.ui.h. +

int TQApplication::exec () +

+Enters the main event loop and waits until exit() is called or the +main widget is destroyed, and returns the value that was set to +exit() (which is 0 if exit() is called via tquit()). +

It is necessary to call this function to start event handling. The +main event loop receives events from the window system and +dispatches these to the application widgets. +

Generally speaking, no user interaction can take place before +calling exec(). As a special case, modal widgets like TQMessageBox +can be used before calling exec(), because modal widgets call +exec() to start a local event loop. +

To make your application perform idle processing, i.e. executing a +special function whenever there are no pending events, use a +TQTimer with 0 timeout. More advanced idle processing schemes can +be achieved using processEvents(). +

See also tquit(), exit(), processEvents(), and setMainWidget(). + +

Examples: helpsystem/main.cpp, life/main.cpp, network/archivesearch/main.cpp, network/ftpclient/main.cpp, opengl/main.cpp, t1/main.cpp, and t4/main.cpp. +

void TQApplication::exit ( int retcode = 0 ) [static] +

+Tells the application to exit with a return code. +

After this function has been called, the application leaves the main +event loop and returns from the call to exec(). The exec() function +returns retcode. +

By convention, a retcode of 0 means success, and any non-zero +value indicates an error. +

Note that unlike the C library function of the same name, this +function does return to the caller -- it is event processing that +stops. +

See also tquit() and exec(). + +

Examples: chart/chartform.cpp, extension/mainform.ui.h, and picture/picture.cpp. +

void TQApplication::exit_loop () +

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

This function exits from a recursive call to the main event loop. +Do not call it unless you are an expert. +

Use TQApplication::eventLoop()->exitLoop() instead. +

+

void TQApplication::flush () [static] +

+Flushes the window system specific event queues. +

If you are doing graphical changes inside a loop that does not +return to the event loop on asynchronous window systems like X11 +or double buffered window systems like MacOS X, and you want to +visualize these changes immediately (e.g. Splash Screens), call +this function. +

See also flushX(), sendPostedEvents(), and TQPainter::flush(). + +

void TQApplication::flushX () [static] +

+Flushes the X event queue in the X11 implementation. This normally +returns almost immediately. Does nothing on other platforms. +

See also syncX(). + +

Example: xform/xform.cpp. +

TQWidget * TQApplication::focusWidget () const +

+ +

Returns the application widget that has the keyboard input focus, or +0 if no widget in this application has the focus. +

See also TQWidget::setFocus(), TQWidget::focus, and activeWindow(). + +

TQFont TQApplication::font ( const TQWidget * w = 0 ) [static] +

+Returns the default font for the widget w, or the default +application font if w is 0. +

See also setFont(), fontMetrics(), and TQWidget::font. + +

Examples: qfd/fontdisplayer.cpp, themes/metal.cpp, and themes/themes.cpp. +

TQFontMetrics TQApplication::fontMetrics () [static] +

+Returns display (screen) font metrics for the application font. +

See also font(), setFont(), TQWidget::fontMetrics(), and TQPainter::fontMetrics(). + +

TQSize TQApplication::globalStrut () [static] +

+ +

Returns the application's global strut. +

The strut is a size object whose dimensions are the minimum that any +GUI element that the user can interact with should have. For example +no button should be resized to be smaller than the global strut size. +

See also setGlobalStrut(). + +

void TQApplication::guiThreadAwake () [signal] +

+ +

This signal is emitted after the event loop returns from a function +that could block. +

See also wakeUpGuiThread(). + +

bool TQApplication::hasGlobalMouseTracking () [static] +

+ +

Returns TRUE if global mouse tracking is enabled; otherwise +returns FALSE. +

See also setGlobalMouseTracking(). + +

bool TQApplication::hasPendingEvents () +

+This function returns TRUE if there are pending events; otherwise +returns FALSE. Pending events can be either from the window system +or posted events using TQApplication::postEvent(). + +

int TQApplication::horizontalAlignment ( int align ) [static] +

+ +

Strips out vertical alignment flags and transforms an +alignment align of AlignAuto into AlignLeft or +AlignRight according to the language used. The other horizontal +alignment flags are left untouched. + +

void TQApplication::installTranslator ( TQTranslator * mf ) +

+Adds the message file mf to the list of message files to be used +for translations. +

Multiple message files can be installed. Translations are searched +for in the last installed message file, then the one from last, and +so on, back to the first installed message file. The search stops as +soon as a matching translation is found. +

See also removeTranslator(), translate(), and TQTranslator::load(). + +

Example: i18n/main.cpp. +

bool TQApplication::isEffectEnabled ( TQt::UIEffect effect ) [static] +

+Returns TRUE if effect is enabled; otherwise returns FALSE. +

By default, TQt will try to use the desktop settings. Call +setDesktopSettingsAware(FALSE) to prevent this. +

Note: All effects are disabled on screens running at less than +16-bit color depth. +

See also setEffectEnabled() and TQt::UIEffect. + +

bool TQApplication::isSessionRestored () const +

+ +

Returns TRUE if the application has been restored from an earlier +session; otherwise returns FALSE. +

See also sessionId(), commitData(), and saveState(). + +

void TQApplication::lastWindowClosed () [signal] +

+ +

This signal is emitted when the user has closed the last +top level window. +

The signal is very useful when your application has many top level +widgets but no main widget. You can then connect it to the tquit() +slot. +

For convenience, this signal is not emitted for transient top level +widgets such as popup menus and dialogs. +

See also mainWidget(), topLevelWidgets(), TQWidget::isTopLevel, and TQWidget::close(). + +

Examples: addressbook/main.cpp, extension/main.cpp, helpviewer/main.cpp, mdi/main.cpp, network/archivesearch/main.cpp, qwerty/main.cpp, and regexptester/main.cpp. +

TQStringList TQApplication::libraryPaths () [static] +

+Returns a list of paths that the application will search when +dynamically loading libraries. +The installation directory for plugins is the only entry if no +paths have been set. The default installation directory for plugins +is INSTALL/plugins, where INSTALL is the directory where TQt was +installed. The directory of the application executable (NOT the +working directory) is also added to the plugin paths. +

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

+    TQStringList list = app.libraryPaths();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See the plugins documentation for a +description of how the library paths are used. +

See also setLibraryPaths(), addLibraryPath(), removeLibraryPath(), and TQLibrary. + +

void TQApplication::lock () +

+

Lock the TQt Library Mutex. If another thread has already locked the +mutex, the calling thread will block until the other thread has +unlocked the mutex. +

See also unlock(), locked(), and Thread Support in TQt. + +

bool TQApplication::locked () +

+

Returns TRUE if the TQt Library Mutex is locked by a different thread; +otherwise returns FALSE. +

Warning: Due to different implementations of recursive mutexes on +the supported platforms, calling this function from the same thread +that previously locked the mutex will give undefined results. +

See also lock(), unlock(), and Thread Support in TQt. + +

int TQApplication::loopLevel () const +

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

Returns the current loop level. +

Use TQApplication::eventLoop()->loopLevel() instead. +

+

bool TQApplication::macEventFilter ( EventHandlerCallRef, EventRef ) [virtual] +

+This virtual function is only implemented under Macintosh. +

If you create an application that inherits TQApplication and +reimplement this function, you get direct access to all Carbon Events +that are received from the MacOS. +

Return TRUE if you want to stop the event from being processed. +Return FALSE for normal event dispatching. + +

TQWidget * TQApplication::mainWidget () const +

+ +

Returns the main application widget, or 0 if there is no main +widget. +

See also setMainWidget(). + +

bool TQApplication::notify ( TQObject * receiver, TQEvent * e ) [virtual] +

+Sends event e to receiver: receiver->event(e). +Returns the value that is returned from the receiver's event handler. +

For certain types of events (e.g. mouse and key events), +the event will be propagated to the receiver's parent and so on up to +the top-level object if the receiver is not interested in the event +(i.e., it returns FALSE). +

There are five different ways that events can be processed; +reimplementing this virtual function is just one of them. All five +approaches are listed below: +

    +
  1. Reimplementing this function. This is very powerful, providing +complete control; but only one subclass can be qApp. +

  2. Installing an event filter on qApp. Such an event filter is able +to process all events for all widgets, so it's just as powerful as +reimplementing notify(); furthermore, it's possible to have more +than one application-global event filter. Global event filters even +see mouse events for disabled + widgets, and if global mouse + tracking is enabled, as well as mouse move events for all +widgets. +

  3. Reimplementing TQObject::event() (as TQWidget does). If you do +this you get Tab key presses, and you get to see the events before +any widget-specific event filters. +

  4. Installing an event filter on the object. Such an event filter +gets all the events except Tab and Shift-Tab key presses. +

  5. Reimplementing paintEvent(), mousePressEvent() and so +on. This is the commonest, easiest and least powerful way. +
+

See also TQObject::event() and installEventFilter(). + +

TQCursor * TQApplication::overrideCursor () [static] +

+ +

Returns the active application override cursor. +

This function returns 0 if no application cursor has been defined +(i.e. the internal cursor stack is empty). +

See also setOverrideCursor() and restoreOverrideCursor(). + +

TQPalette TQApplication::palette ( const TQWidget * w = 0 ) [static] +

+Returns the application palette. +

If a widget is passed in w, the default palette for the +widget's class is returned. This may or may not be the application +palette. In most cases there isn't a special palette for certain +types of widgets, but one notable exception is the popup menu under +Windows, if the user has defined a special background color for +menus in the display settings. +

See also setPalette() and TQWidget::palette. + +

Examples: desktop/desktop.cpp, themes/metal.cpp, and themes/wood.cpp. +

void TQApplication::polish ( TQWidget * w ) [virtual] +

+Initialization of the appearance of the widget w before it is first +shown. +

Usually widgets call this automatically when they are polished. It +may be used to do some style-based central customization of widgets. +

Note that you are not limited to the public functions of TQWidget. +Instead, based on meta information like TQObject::className() you are +able to customize any kind of widget. +

See also TQStyle::polish(), TQWidget::polish(), setPalette(), and setFont(). + +

void TQApplication::postEvent ( TQObject * receiver, TQEvent * event ) [static] +

Note: This function is thread-safe when TQt is built withthread support.

+ +Adds the event event with the object receiver as the receiver of the +event, to an event queue and returns immediately. +

The event must be allocated on the heap since the post event queue +will take ownership of the event and delete it once it has been posted. +

When control returns to the main event loop, all events that are +stored in the queue will be sent using the notify() function. +

+

See also sendEvent() and notify(). + +

void TQApplication::processEvents () +

+Processes pending events, for 3 seconds or until there are no more +events to process, whichever is shorter. +

You can call this function occasionally when your program is busy +performing a long operation (e.g. copying a file). +

See also exec(), TQTimer, and TQEventLoop::processEvents(). + +

Examples: fileiconview/qfileiconview.cpp and network/ftpclient/main.cpp. +

void TQApplication::processEvents ( int maxtime ) +

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

Processes pending events for maxtime milliseconds or until +there are no more events to process, whichever is shorter. +

You can call this function occasionally when you program is busy +doing a long operation (e.g. copying a file). +

See also exec(), TQTimer, and TQEventLoop::processEvents(). + +

void TQApplication::processOneEvent () +

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

Waits for an event to occur, processes it, then returns. +

This function is useful for adapting TQt to situations where the +event processing must be grafted onto existing program loops. +

Using this function in new applications may be an indication of design +problems. +

See also processEvents(), exec(), and TQTimer. + +

void TQApplication::tquit () [slot] +

+Tells the application to exit with return code 0 (success). +Equivalent to calling TQApplication::exit( 0 ). +

It's common to connect the lastWindowClosed() signal to tquit(), and +you also often connect e.g. TQButton::clicked() or signals in +TQAction, TQPopupMenu or TQMenuBar to it. +

Example: +

+    TQPushButton *tquitButton = new TQPushButton( "Quit" );
+    connect( tquitButton, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+  
+ +

See also exit(), aboutToQuit(), lastWindowClosed(), and TQAction. + +

Examples: addressbook/main.cpp, mdi/main.cpp, network/archivesearch/main.cpp, regexptester/main.cpp, t2/main.cpp, t4/main.cpp, and t6/main.cpp. +

TQWSDecoration & TQApplication::qwsDecoration () [static] +

+Return the TQWSDecoration used for decorating windows. +

This method is non-portable. It is available only in TQt/Embedded. +

See also TQWSDecoration. + +

bool TQApplication::qwsEventFilter ( TQWSEvent * ) [virtual] +

+This virtual function is only implemented under TQt/Embedded. +

If you create an application that inherits TQApplication and +reimplement this function, you get direct access to all TQWS (Q +Window System) events that the are received from the TQWS master +process. +

Return TRUE if you want to stop the event from being processed. +Return FALSE for normal event dispatching. + +

void TQApplication::qwsSetCustomColors ( TQRgb * colorTable, int start, int numColors ) +

+Set TQt/Embedded custom color table. +

TQt/Embedded on 8-bpp displays allocates a standard 216 color cube. +The remaining 40 colors may be used by setting a custom color +table in the TQWS master process before any clients connect. +

colorTable is an array of up to 40 custom colors. start is +the starting index (0-39) and numColors is the number of colors +to be set (1-40). +

This method is non-portable. It is available only in +TQt/Embedded. + +

void TQApplication::qwsSetDecoration ( TQWSDecoration * d ) [static] +

+Set the TQWSDecoration derived class to use for decorating the +TQt/Embedded windows to d. +

This method is non-portable. It is available only in +TQt/Embedded. +

See also TQWSDecoration. + +

void TQApplication::removeLibraryPath ( const TQString & path ) [static] +

+Removes path from the library path list. If path is empty or not +in the path list, the list is not changed. +

See also addLibraryPath(), libraryPaths(), and setLibraryPaths(). + +

void TQApplication::removePostedEvents ( TQObject * receiver ) [static] +

Note: This function is thread-safe when TQt is built withthread support.

+ +Removes all events posted using postEvent() for receiver. +

The events are not dispatched, instead they are removed from the +queue. You should never need to call this function. If you do call it, +be aware that killing events may cause receiver to break one or +more invariants. +

+ +

void TQApplication::removeTranslator ( TQTranslator * mf ) +

+Removes the message file mf from the list of message files used by +this application. (It does not delete the message file from the file +system.) +

See also installTranslator(), translate(), and TQObject::tr(). + +

Example: i18n/main.cpp. +

void TQApplication::restoreOverrideCursor () [static] +

+Undoes the last setOverrideCursor(). +

If setOverrideCursor() has been called twice, calling +restoreOverrideCursor() will activate the first cursor set. +Calling this function a second time restores the original widgets' +cursors. +

See also setOverrideCursor() and overrideCursor(). + +

Examples: distributor/distributor.ui.h, network/archivesearch/archivedialog.ui.h, network/ftpclient/ftpmainwindow.ui.h, and showimg/showimg.cpp. +

bool TQApplication::reverseLayout () [static] +

+Returns TRUE if all dialogs and widgets will be laid out in a +mirrored (right to left) fashion. Returns FALSE if dialogs and +widgets will be laid out left to right. +

See also setReverseLayout(). + +

void TQApplication::saveState ( TQSessionManager & sm ) [virtual] +

+ +

This function deals with session + management. It is invoked when the +session manager wants the application +to preserve its state for a future session. +

For example, a text editor would create a temporary file that +includes the current contents of its edit buffers, the location of +the cursor and other aspects of the current editing session. +

Note that you should never exit the application within this +function. Instead, the session manager may or may not do this +afterwards, depending on the context. Futhermore, most session +managers will very likely request a saved state immediately after +the application has been started. This permits the session manager +to learn about the application's restart policy. +

Warning: Within this function, no user interaction is possible, unless you ask the session manager sm for explicit permission. +See TQSessionManager::allowsInteraction() and +TQSessionManager::allowsErrorInteraction() for details. +

See also isSessionRestored(), sessionId(), commitData(), and the Session Management overview. + +

bool TQApplication::sendEvent ( TQObject * receiver, TQEvent * event ) [static] +

+ +

Sends event event directly to receiver receiver, using the +notify() function. Returns the value that was returned from the event +handler. +

The event is not deleted when the event has been sent. The normal +approach is to create the event on the stack, e.g. +

+    TQMouseEvent me( TQEvent::MouseButtonPress, pos, 0, 0 );
+    TQApplication::sendEvent( mainWindow, &me );
+    
+ +If you create the event on the heap you must delete it. +

See also postEvent() and notify(). + +

Example: popup/popup.cpp. +

void TQApplication::sendPostedEvents ( TQObject * receiver, int event_type ) [static] +

+Immediately dispatches all events which have been previously queued +with TQApplication::postEvent() and which are for the object receiver +and have the event type event_type. +

Note that events from the window system are not dispatched by this +function, but by processEvents(). +

If receiver is null, the events of event_type are sent for all +objects. If event_type is 0, all the events are sent for receiver. + +

void TQApplication::sendPostedEvents () [static] +

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

Dispatches all posted events, i.e. empties the event queue. + +

TQString TQApplication::sessionId () const +

+ +

Returns the current session's identifier. +

If the application has been restored from an earlier session, this +identifier is the same as it was in that previous session. +

The session identifier is guaranteed to be unique both for different +applications and for different instances of the same application. +

See also isSessionRestored(), sessionKey(), commitData(), and saveState(). + +

TQString TQApplication::sessionKey () const +

+ +

Returns the session key in the current session. +

If the application has been restored from an earlier session, this +key is the same as it was when the previous session ended. +

The session key changes with every call of commitData() or +saveState(). +

See also isSessionRestored(), sessionId(), commitData(), and saveState(). + +

void TQApplication::setColorSpec ( int spec ) [static] +

+Sets the color specification for the application to spec. +

The color specification controls how the application allocates colors +when run on a display with a limited amount of colors, e.g. 8 bit / 256 +color displays. +

The color specification must be set before you create the TQApplication +object. +

The options are: +

    +
  • TQApplication::NormalColor. +This is the default color allocation strategy. Use this option if +your application uses buttons, menus, texts and pixmaps with few +colors. With this option, the application uses system global +colors. This works fine for most applications under X11, but on +Windows machines it may cause dithering of non-standard colors. +
  • TQApplication::CustomColor. +Use this option if your application needs a small number of custom +colors. On X11, this option is the same as NormalColor. On Windows, TQt +creates a Windows palette, and allocates colors to it on demand. +
  • TQApplication::ManyColor. +Use this option if your application is very color hungry +(e.g. it retquires thousands of colors). +Under X11 the effect is: +
      +
    • For 256-color displays which have at best a 256 color true color +visual, the default visual is used, and colors are allocated +from a color cube. The color cube is the 6x6x6 (216 color) "Web +palette"*, but the number of colors can be changed +by the -ncols option. The user can force the application to +use the true color visual with the -visual option. +
    • For 256-color displays which have a true color visual with more +than 256 colors, use that visual. Silicon Graphics X servers +have this feature, for example. They provide an 8 bit visual +by default but can deliver true color when asked. +
    +On Windows, TQt creates a Windows palette, and fills it with a color cube. +
+

Be aware that the CustomColor and ManyColor choices may lead to colormap +flashing: The foreground application gets (most) of the available +colors, while the background windows will look less attractive. +

Example: +

+  int main( int argc, char **argv )
+  {
+      TQApplication::setColorSpec( TQApplication::ManyColor );
+      TQApplication a( argc, argv );
+      ...
+  }
+  
+ +

TQColor provides more functionality for controlling color allocation and +freeing up certain colors. See TQColor::enterAllocContext() for more +information. +

To check what mode you end up with, call TQColor::numBitPlanes() once +the TQApplication object exists. A value greater than 8 (typically +16, 24 or 32) means true color. +

* The color cube used by TQt has 216 colors whose red, +green, and blue components always have one of the following values: +0x00, 0x33, 0x66, 0x99, 0xCC, or 0xFF. +

See also colorSpec(), TQColor::numBitPlanes(), and TQColor::enterAllocContext(). + +

Examples: helpviewer/main.cpp, opengl/main.cpp, showimg/main.cpp, t9/main.cpp, tetrax/tetrax.cpp, tetrix/tetrix.cpp, and themes/main.cpp. +

void TQApplication::setCursorFlashTime ( int msecs ) [static] +

+Sets the text cursor's flash (blink) time to msecs +milliseconds. The flash time is the time retquired to display, +invert and restore the caret display. Usually the text cursor is +displayed for msecs/2 milliseconds, then hidden for msecs/2 +milliseconds, but this may vary. +

Note that on Microsoft Windows, calling this function sets the +cursor flash time for all windows. +

See also cursorFlashTime(). + +

void TQApplication::setDefaultCodec ( TQTextCodec * codec ) +

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

This is the same as TQTextCodec::setCodecForTr(). + +

void TQApplication::setDesktopSettingsAware ( bool on ) [static] +

+By default, TQt will try to use the current standard colors, fonts +etc., from the underlying window system's desktop settings, +and use them for all relevant widgets. This behavior can be switched off +by calling this function with on set to FALSE. +

This static function must be called before creating the TQApplication +object, like this: +

+  int main( int argc, char** argv ) {
+    TQApplication::setDesktopSettingsAware( FALSE ); // I know better than the user
+    TQApplication myApp( argc, argv ); // Use default fonts & colors
+    ...
+  }
+  
+ +

See also desktopSettingsAware(). + +

void TQApplication::setDoubleClickInterval ( int ms ) [static] +

+Sets the time limit that distinguishes a double click from two +consecutive mouse clicks to ms milliseconds. +

Note that on Microsoft Windows, calling this function sets the +double click interval for all windows. +

See also doubleClickInterval(). + +

void TQApplication::setEffectEnabled ( TQt::UIEffect effect, bool enable = TRUE ) [static] +

+Enables the UI effect effect if enable is TRUE, otherwise +the effect will not be used. +

Note: All effects are disabled on screens running at less than +16-bit color depth. +

See also isEffectEnabled(), TQt::UIEffect, and setDesktopSettingsAware(). + +

void TQApplication::setFont ( const TQFont & font, bool informWidgets = FALSE, const char * className = 0 ) [static] +

Changes the default application font to font. If informWidgets is TRUE, then existing widgets are informed about the +change and may adjust themselves to the new application +setting. If informWidgets is FALSE, the change only affects newly +created widgets. If className is passed, the change applies only +to classes that inherit className (as reported by +TQObject::inherits()). +

On application start-up, the default font depends on the window +system. It can vary depending on both the window system version and +the locale. This function lets you override the default font; but +overriding may be a bad idea because, for example, some locales need +extra-large fonts to support their special characters. +

See also font(), fontMetrics(), and TQWidget::font. + +

Examples: desktop/desktop.cpp, themes/metal.cpp, and themes/themes.cpp. +

void TQApplication::setGlobalMouseTracking ( bool enable ) [static] +

+Enables global mouse tracking if enable is TRUE, or disables it +if enable is FALSE. +

Enabling global mouse tracking makes it possible for widget event +filters or application event filters to get all mouse move events, +even when no button is depressed. This is useful for special GUI +elements, e.g. tooltips. +

Global mouse tracking does not affect widgets and their +mouseMoveEvent(). For a widget to get mouse move events when no +button is depressed, it must do TQWidget::setMouseTracking(TRUE). +

This function uses an internal counter. Each +setGlobalMouseTracking(TRUE) must have a corresponding +setGlobalMouseTracking(FALSE): +

+        // at this point global mouse tracking is off
+        TQApplication::setGlobalMouseTracking( TRUE );
+        TQApplication::setGlobalMouseTracking( TRUE );
+        TQApplication::setGlobalMouseTracking( FALSE );
+        // at this point it's still on
+        TQApplication::setGlobalMouseTracking( FALSE );
+        // but now it's off
+    
+ +

See also hasGlobalMouseTracking() and TQWidget::mouseTracking. + +

void TQApplication::setGlobalStrut ( const TQSize & strut ) [static] +

+Sets the application's global strut to strut. +

The strut is a size object whose dimensions are the minimum that any +GUI element that the user can interact with should have. For example +no button should be resized to be smaller than the global strut size. +

The strut size should be considered when reimplementing GUI controls +that may be used on touch-screens or similar IO-devices. +

Example: +

+  TQSize& WidgetClass::sizeHint() const
+  {
+      return TQSize( 80, 25 ).expandedTo( TQApplication::globalStrut() );
+  }
+  
+ +

See also globalStrut(). + +

void TQApplication::setLibraryPaths ( const TQStringList & paths ) [static] +

+Sets the list of directories to search when loading libraries to paths. +All existing paths will be deleted and the path list will consist of the +paths given in paths. +

See also libraryPaths(), addLibraryPath(), removeLibraryPath(), and TQLibrary. + +

void TQApplication::setMainWidget ( TQWidget * mainWidget ) [virtual] +

+Sets the application's main widget to mainWidget. +

In most respects the main widget is like any other widget, except +that if it is closed, the application exits. Note that +TQApplication does not take ownership of the mainWidget, so +if you create your main widget on the heap you must delete it +yourself. +

You need not have a main widget; connecting lastWindowClosed() to +tquit() is an alternative. +

For X11, this function also resizes and moves the main widget +according to the -geometry command-line option, so you should +set the default geometry (using TQWidget::setGeometry()) before +calling setMainWidget(). +

See also mainWidget(), exec(), and tquit(). + +

Examples: chart/main.cpp, helpsystem/main.cpp, life/main.cpp, network/ftpclient/main.cpp, opengl/main.cpp, t1/main.cpp, and t4/main.cpp. +

void TQApplication::setOverrideCursor ( const TQCursor & cursor, bool replace = FALSE ) [static] +

+Sets the application override cursor to cursor. +

Application override cursors are intended for showing the user +that the application is in a special state, for example during an +operation that might take some time. +

This cursor will be displayed in all the application's widgets +until restoreOverrideCursor() or another setOverrideCursor() is +called. +

Application cursors are stored on an internal stack. +setOverrideCursor() pushes the cursor onto the stack, and +restoreOverrideCursor() pops the active cursor off the stack. +Every setOverrideCursor() must eventually be followed by a +corresponding restoreOverrideCursor(), otherwise the stack will +never be emptied. +

If replace is TRUE, the new cursor will replace the last +override cursor (the stack keeps its depth). If replace is +FALSE, the new stack is pushed onto the top of the stack. +

Example: +

+        TQApplication::setOverrideCursor( TQCursor(TQt::WaitCursor) );
+        calculateHugeMandelbrot();              // lunch time...
+        TQApplication::restoreOverrideCursor();
+    
+ +

See also overrideCursor(), restoreOverrideCursor(), and TQWidget::cursor. + +

Examples: distributor/distributor.ui.h, network/archivesearch/archivedialog.ui.h, network/ftpclient/ftpmainwindow.ui.h, and showimg/showimg.cpp. +

void TQApplication::setPalette ( const TQPalette & palette, bool informWidgets = FALSE, const char * className = 0 ) [static] +

+Changes the default application palette to palette. If informWidgets is TRUE, then existing widgets are informed about the +change and may adjust themselves to the new application +setting. If informWidgets is FALSE, the change only affects newly +created widgets. +

If className is passed, the change applies only to widgets that +inherit className (as reported by TQObject::inherits()). If +className is left 0, the change affects all widgets, thus overriding +any previously set class specific palettes. +

The palette may be changed according to the current GUI style in +TQStyle::polish(). +

See also TQWidget::palette, palette(), and TQStyle::polish(). + +

Examples: i18n/main.cpp, themes/metal.cpp, themes/themes.cpp, and themes/wood.cpp. +

void TQApplication::setReverseLayout ( bool b ) [static] +

+If b is TRUE, all dialogs and widgets will be laid out in a +mirrored fashion, as retquired by right to left languages such as +Arabic and Hebrew. If b is FALSE, dialogs and widgets are laid +out left to right. +

Changing this flag in runtime does not cause a relayout of already +instantiated widgets. +

See also reverseLayout(). + +

void TQApplication::setStartDragDistance ( int l ) [static] +

+Sets the distance after which a drag should start to l pixels. +

See also startDragDistance(). + +

void TQApplication::setStartDragTime ( int ms ) [static] +

+Sets the time after which a drag should start to ms ms. +

See also startDragTime(). + +

void TQApplication::setStyle ( TQStyle * style ) [static] +

+Sets the application's GUI style to style. Ownership of the style +object is transferred to TQApplication, so TQApplication will delete +the style object on application exit or when a new style is set. +

Example usage: +

+    TQApplication::setStyle( new TQWindowsStyle );
+  
+ +

When switching application styles, the color palette is set back to +the initial colors or the system defaults. This is necessary since +certain styles have to adapt the color palette to be fully +style-guide compliant. +

See also style(), TQStyle, setPalette(), and desktopSettingsAware(). + +

Example: themes/themes.cpp. +

TQStyle * TQApplication::setStyle ( const TQString & style ) [static] +

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

Requests a TQStyle object for style from the TQStyleFactory. +

The string must be one of the TQStyleFactory::keys(), typically one +of "windows", "motif", "cde", "motifplus", "platinum", "sgi" and +"compact". Depending on the platform, "windowsxp", "aqua" or +"macintosh" may be available. +

A later call to the TQApplication constructor will override the +requested style when a "-style" option is passed in as a commandline +parameter. +

Returns 0 if an unknown style is passed, otherwise the TQStyle object +returned is set as the application's GUI style. + +

void TQApplication::setWheelScrollLines ( int n ) [static] +

+Sets the number of lines to scroll when the mouse wheel is rotated +to n. +

If this number exceeds the number of visible lines in a certain +widget, the widget should interpret the scroll operation as a +single page up / page down operation instead. +

See also wheelScrollLines(). + +

void TQApplication::setWinStyleHighlightColor ( const TQColor & c ) [static] +

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

Sets the color used to mark selections in windows style for all widgets +in the application. Will repaint all widgets if the color is changed. +

The default color is darkBlue. +

See also winStyleHighlightColor(). + +

int TQApplication::startDragDistance () [static] +

+If you support drag and drop in you application and a drag should +start after a mouse click and after moving the mouse a certain +distance, you should use the value which this method returns as the +distance. +

For example, if the mouse position of the click is stored in startPos and the current position (e.g. in the mouse move event) is +currPos, you can find out if a drag should be started with code +like this: +

+  if ( ( startPos - currPos ).manhattanLength() >
+       TQApplication::startDragDistance() )
+    startTheDrag();
+  
+ +

TQt uses this value internally, e.g. in TQFileDialog. +

The default value is 4 pixels. +

See also setStartDragDistance(), startDragTime(), and TQPoint::manhattanLength(). + +

int TQApplication::startDragTime () [static] +

+If you support drag and drop in you application and a drag should +start after a mouse click and after a certain time elapsed, you +should use the value which this method returns as the delay (in ms). +

TQt also uses this delay internally, e.g. in TQTextEdit and TQLineEdit, +for starting a drag. +

The default value is 500 ms. +

See also setStartDragTime() and startDragDistance(). + +

bool TQApplication::startingUp () [static] +

+Returns TRUE if an application object has not been created yet; +otherwise returns FALSE. +

See also closingDown(). + +

TQStyle & TQApplication::style () [static] +

+Returns the application's style object. +

See also setStyle() and TQStyle. + +

void TQApplication::syncX () [static] +

+Synchronizes with the X server in the X11 implementation. This +normally takes some time. Does nothing on other platforms. +

See also flushX(). + +

TQWidgetList * TQApplication::topLevelWidgets () [static] +

+Returns a list of the top level widgets in the application. +

The list is created using new and must be deleted by the caller. +

The list is empty (TQPtrList::isEmpty()) if there are no top level +widgets. +

Note that some of the top level widgets may be hidden, for example +the tooltip if no tooltip is currently shown. +

Example: +

+    // Show all hidden top level widgets.
+    TQWidgetList  *list = TQApplication::topLevelWidgets();
+    TQWidgetListIt it( *list );  // iterate over the widgets
+    TQWidget * w;
+    while ( (w=it.current()) != 0 ) {   // for each top level widget...
+        ++it;
+        if ( !w->isVisible() )
+            w->show();
+    }
+    delete list;                // delete the list, not the widgets
+  
+ +

Warning: Delete the list as soon you have finished using it. +The widgets in the list may be deleted by someone else at any time. +

See also allWidgets(), TQWidget::isTopLevel, TQWidget::visible, and TQPtrList::isEmpty(). + +

TQString TQApplication::translate ( const char * context, const char * sourceText, const char * comment = 0, Encoding encoding = DefaultCodec ) const +

Note: This function is reentrant when TQt is built with thread support.

+ +Returns the translation text for sourceText, by querying the +installed messages files. The message files are searched from the most +recently installed message file back to the first installed message +file. +

TQObject::tr() and TQObject::trUtf8() provide this functionality more +conveniently. +

context is typically a class name (e.g., "MyDialog") and +sourceText is either English text or a short identifying text, if +the output text will be very long (as for help texts). +

comment is a disambiguating comment, for when the same sourceText is used in different roles within the same context. By +default, it is null. encoding indicates the 8-bit encoding of +character stings +

See the TQTranslator documentation for more information about +contexts and comments. +

If none of the message files contain a translation for sourceText in context, this function returns a TQString +equivalent of sourceText. The encoding of sourceText is +specified by encoding; it defaults to DefaultCodec. +

This function is not virtual. You can use alternative translation +techniques by subclassing TQTranslator. +

Warning: This method is reentrant only if all translators are +installed before calling this method. Installing or removing +translators while performing translations is not supported. Doing +so will most likely result in crashes or other undesirable behavior. +

See also TQObject::tr(), installTranslator(), and defaultCodec(). + +

bool TQApplication::tryLock () +

+

Attempts to lock the TQt Library Mutex, and returns immediately. If +the lock was obtained, this function returns TRUE. If another thread +has locked the mutex, this function returns FALSE, instead of +waiting for the lock to become available. +

The mutex must be unlocked with unlock() before another thread can +successfully lock it. +

See also lock(), unlock(), and Thread Support in TQt. + +

Type TQApplication::type () const +

+Returns the type of application, Tty, GuiClient or GuiServer. + +

void TQApplication::unlock ( bool wakeUpGui = TRUE ) +

+

Unlock the TQt Library Mutex. If wakeUpGui is TRUE (the default), +then the GUI thread will be woken with TQApplication::wakeUpGuiThread(). +

See also lock(), locked(), and Thread Support in TQt. + +

void TQApplication::wakeUpGuiThread () +

+

Wakes up the GUI thread. +

See also guiThreadAwake() and Thread Support in TQt. + +

int TQApplication::wheelScrollLines () [static] +

+Returns the number of lines to scroll when the mouse wheel is +rotated. +

See also setWheelScrollLines(). + +

TQWidget * TQApplication::widgetAt ( int x, int y, bool child = FALSE ) [static] +

+Returns a pointer to the widget at global screen position (x, y), or 0 if there is no TQt widget there. +

If child is FALSE and there is a child widget at position (x, y), the top-level widget containing it is returned. If child +is TRUE the child widget at position (x, y) is returned. +

This function is normally rather slow. +

See also TQCursor::pos(), TQWidget::grabMouse(), and TQWidget::grabKeyboard(). + +

TQWidget * TQApplication::widgetAt ( const TQPoint & pos, bool child = FALSE ) [static] +

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

Returns a pointer to the widget at global screen position pos, +or 0 if there is no TQt widget there. +

If child is FALSE and there is a child widget at position pos, the top-level widget containing it is returned. If child +is TRUE the child widget at position pos is returned. + +

bool TQApplication::winEventFilter ( MSG * ) [virtual] +

+This virtual function is only implemented under Windows. +

The message procedure calls this function for every message +received. Reimplement this function if you want to process window +messages that are not processed by TQt. If you don't want +the event to be processed by TQt, then return TRUE; otherwise +return FALSE. + +

void TQApplication::winFocus ( TQWidget * widget, bool gotFocus ) +

+This function is available only on Windows. +

If gotFocus is TRUE, widget will become the active window. +Otherwise the active window is reset to NULL. + +

const TQColor & TQApplication::winStyleHighlightColor () [static] +

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

Returns the color used to mark selections in windows style. +

See also setWinStyleHighlightColor(). + +

bool TQApplication::x11EventFilter ( XEvent * ) [virtual] +

+This virtual function is only implemented under X11. +

If you create an application that inherits TQApplication and +reimplement this function, you get direct access to all X events +that the are received from the X server. +

Return TRUE if you want to stop the event from being processed. +Return FALSE for normal event dispatching. +

See also x11ProcessEvent(). + +

int TQApplication::x11ProcessEvent ( XEvent * event ) +

+This function does the core processing of individual X +events, normally by dispatching TQt events to the right +destination. +

It returns 1 if the event was consumed by special handling, 0 if +the event was consumed by normal handling, and -1 if the event was for an unrecognized widget. +

See also x11EventFilter(). + +


Related Functions

+

void Q_ASSERT ( bool test ) +

+ +

+

Prints a warning message containing the source code file name and +line number if test is FALSE. +

This is really a macro defined in qglobal.h. +

Q_ASSERT is useful for testing pre- and post-conditions. +

Example: +

+        //
+        // File: div.cpp
+        //
+
+        #include <qglobal.h>
+
+        int divide( int a, int b )
+        {
+            Q_ASSERT( b != 0 );                 // this is line 9
+            return a/b;
+        }
+    
+ +

If b is zero, the Q_ASSERT statement will output the following +message using the qWarning() function: +

+        ASSERT: "b != 0" in div.cpp (9)
+    
+ +

See also qWarning() and Debugging. + +

void Q_CHECK_PTR ( void * p ) +

+ +

+

If p is 0, prints a warning message containing the source code file +name and line number, saying that the program ran out of memory. +

This is really a macro defined in qglobal.h. +

Example: +

+        int *a;
+
+        Q_CHECK_PTR( a = new int[80] );  // WRONG!
+
+        a = new (nothrow) int[80];       // Right
+        Q_CHECK_PTR( a );
+    
+ +

See also qWarning() and Debugging. + +

void qAddPostRoutine ( TQtCleanUpFunction p ) +

+ +

Adds a global routine that will be called from the TQApplication +destructor. This function is normally used to add cleanup routines +for program-wide functionality. +

The function given by p should take no arguments and return +nothing, like this: +

+    static int *global_ptr = 0;
+
+    static void cleanup_ptr()
+    {
+        delete [] global_ptr;
+        global_ptr = 0;
+    }
+
+    void init_ptr()
+    {
+        global_ptr = new int[100];      // allocate data
+        qAddPostRoutine( cleanup_ptr ); // delete later
+    }
+  
+ +

Note that for an application- or module-wide cleanup, +qAddPostRoutine() is often not suitable. People have a tendency to +make such modules dynamically loaded, and then unload those modules +long before the TQApplication destructor is called, for example. +

For modules and libraries, using a reference-counted initialization +manager or TQt' parent-child delete mechanism may be better. Here is +an example of a private class which uses the parent-child mechanism +to call a cleanup function at the right time: +

+    class MyPrivateInitStuff: public TQObject {
+    private:
+        MyPrivateInitStuff( TQObject * parent ): TQObject( parent) {
+            // initialization goes here
+        }
+        MyPrivateInitStuff * p;
+
+    public:
+        static MyPrivateInitStuff * initStuff( TQObject * parent ) {
+            if ( !p )
+                p = new MyPrivateInitStuff( parent );
+            return p;
+        }
+
+        ~MyPrivateInitStuff() {
+            // cleanup (the "post routine") goes here
+        }
+    }
+  
+ +

By selecting the right parent widget/object, this can often be made +to clean up the module's data at the exact right moment. + +

void qDebug ( const char * msg, ... ) +

+ +

+

Prints a debug message msg, or calls the message handler (if it +has been installed). +

This function takes a format string and a list of arguments, +similar to the C printf() function. +

Example: +

+        qDebug( "my window handle = %x", myWidget->id() );
+    
+ +

Under X11, the text is printed to stderr. Under Windows, the text +is sent to the debugger. +

Warning: The internal buffer is limited to 8196 bytes (including +the '\0'-terminator). +

Warning: Passing (const char *)0 as argument to qDebug might lead +to crashes on certain platforms due to the platforms printf implementation. +

See also qWarning(), qFatal(), qInstallMsgHandler(), and Debugging. + +

void qFatal ( const char * msg, ... ) +

+ +

+

Prints a fatal error message msg and exits, or calls the +message handler (if it has been installed). +

This function takes a format string and a list of arguments, +similar to the C printf() function. +

Example: +

+        int divide( int a, int b )
+        {
+            if ( b == 0 )                               // program error
+                qFatal( "divide: cannot divide by zero" );
+            return a/b;
+        }
+    
+ +

Under X11, the text is printed to stderr. Under Windows, the text +is sent to the debugger. +

Warning: The internal buffer is limited to 8196 bytes (including +the '\0'-terminator). +

Warning: Passing (const char *)0 as argument to qFatal might lead +to crashes on certain platforms due to the platforms printf implementation. +

See also qDebug(), qWarning(), qInstallMsgHandler(), and Debugging. + +

TQtMsgHandler qInstallMsgHandler ( TQtMsgHandler h ) +

+ +

Installs a TQt message handler h. Returns a pointer to the +message handler previously defined. +

The message handler is a function that prints out debug messages, +warnings and fatal error messages. The TQt library (debug version) +contains hundreds of warning messages that are printed when +internal errors (usually invalid function arguments) occur. If you +implement your own message handler, you get total control of these +messages. +

The default message handler prints the message to the standard +output under X11 or to the debugger under Windows. If it is a +fatal message, the application aborts immediately. +

Only one message handler can be defined, since this is usually +done on an application-wide basis to control debug output. +

To restore the message handler, call qInstallMsgHandler(0). +

Example: +

+        #include <qapplication.h>
+        #include <stdio.h>
+        #include <stdlib.h>
+
+        void myMessageOutput( TQtMsgType type, const char *msg )
+        {
+            switch ( type ) {
+                case TQtDebugMsg:
+                    fprintf( stderr, "Debug: %s\n", msg );
+                    break;
+                case TQtWarningMsg:
+                    fprintf( stderr, "Warning: %s\n", msg );
+                    break;
+                case TQtFatalMsg:
+                    fprintf( stderr, "Fatal: %s\n", msg );
+                    abort();                    // deliberately core dump
+            }
+        }
+
+        int main( int argc, char **argv )
+        {
+            qInstallMsgHandler( myMessageOutput );
+            TQApplication a( argc, argv );
+            ...
+            return a.exec();
+        }
+    
+ +

See also qDebug(), qWarning(), qFatal(), and Debugging. + +

bool qSysInfo ( int * wordSize, bool * bigEndian ) +

+ +

Obtains information about the system. +

The system's word size in bits (typically 32) is returned in *wordSize. The *bigEndian is set to TRUE if this is a big-endian +machine, or to FALSE if this is a little-endian machine. +

In debug mode, this function calls qFatal() with a message if the +computer is truly weird (i.e. different endianness for 16 bit and +32 bit integers); in release mode it returns FALSE. + +

void qSystemWarning ( const char * msg, int code ) +

+ +

Prints the message msg and uses code to get a system specific +error message. When code is -1 (the default), the system's last +error code will be used if possible. Use this method to handle +failures in platform specific API calls. +

This function does nothing when TQt is built with QT_NO_DEBUG +defined. + +

const char * qVersion () +

+ +

Returns the TQt version number as a string, for example, "2.3.0" or +"3.0.5". +

The QT_VERSION define has the numeric value in the form: +0xmmiibb (m = major, i = minor, b = bugfix). For example, TQt +3.0.5's QT_VERSION is 0x030005. + +

void qWarning ( const char * msg, ... ) +

+ +

+

Prints a warning message msg, or calls the message handler (if +it has been installed). +

This function takes a format string and a list of arguments, +similar to the C printf() function. +

Example: +

+        void f( int c )
+        {
+            if ( c > 200 )
+                qWarning( "f: bad argument, c == %d", c );
+        }
+    
+ +

Under X11, the text is printed to stderr. Under Windows, the text +is sent to the debugger. +

Warning: The internal buffer is limited to 8196 bytes (including +the '\0'-terminator). +

Warning: Passing (const char *)0 as argument to qWarning might lead +to crashes on certain platforms due to the platforms printf implementation. +

See also qDebug(), qFatal(), qInstallMsgHandler(), and Debugging. + + +


+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/qarray.html b/doc/html/qarray.html new file mode 100644 index 00000000..ba478368 --- /dev/null +++ b/doc/html/qarray.html @@ -0,0 +1,47 @@ + + + + + +TQArray Class Reference (obsolete) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQArray Class Reference (obsolete)

+ + +

+#include <qarray.h>
+ +

The TQArray class has been renamed TQMemArray in TQt 3.0. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qasciicache-h.html b/doc/html/qasciicache-h.html new file mode 100644 index 00000000..369128a3 --- /dev/null +++ b/doc/html/qasciicache-h.html @@ -0,0 +1,170 @@ + + + + + +qasciicache.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qasciicache.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qasciicache.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQAsciiCache template/macro class
+**
+** Created : 950209
+**
+** 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 retquirements 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 TQASCIICACHE_H
+#define TQASCIICACHE_H
+
+#ifndef QT_H
+#include "qgcache.h"
+#endif // QT_H
+
+
+template<class type> 
+class TQAsciiCache
+#ifdef Q_QDOC
+	: public TQPtrCollection
+#else
+	: public TQGCache
+#endif
+{
+public:
+    TQAsciiCache( const TQAsciiCache<type> &c ) : TQGCache(c) {}
+    TQAsciiCache( int maxCost=100, int size=17, bool caseSensitive=TRUE,
+		 bool copyKeys=TRUE )
+	: TQGCache( maxCost, size, AsciiKey, caseSensitive, copyKeys ) {}
+   ~TQAsciiCache()			{ clear(); }
+    TQAsciiCache<type> &operator=( const TQAsciiCache<type> &c )
+			{ return (TQAsciiCache<type>&)TQGCache::operator=(c); }
+    int	  maxCost()   const		{ return TQGCache::maxCost(); }
+    int	  totalCost() const		{ return TQGCache::totalCost(); }
+    void  setMaxCost( int m )		{ TQGCache::setMaxCost(m); }
+    uint  count()     const		{ return TQGCache::count(); }
+    uint  size()      const		{ return TQGCache::size(); }
+    bool  isEmpty()   const		{ return TQGCache::count() == 0; }
+    void  clear()			{ TQGCache::clear(); }
+    bool  insert( const char *k, const type *d, int c=1, int p=0 )
+			{ return TQGCache::insert_other(k,(Item)d,c,p);}
+    bool  remove( const char *k )
+			{ return TQGCache::remove_other(k); }
+    type *take( const char *k )
+			{ return (type *)TQGCache::take_other(k); }
+    type *find( const char *k, bool ref=TRUE ) const
+			{ return (type *)TQGCache::find_other(k,ref);}
+    type *operator[]( const char *k ) const
+			{ return (type *)TQGCache::find_other(k);}
+    void  statistics() const	      { TQGCache::statistics(); }
+private:
+    void  deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void TQAsciiCache<void>::deleteItem( TQPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void TQAsciiCache<type>::deleteItem( TQPtrCollection::Item d )
+{
+    if ( del_item ) delete (type *)d;
+}
+
+
+template<class type> 
+class TQAsciiCacheIterator : public TQGCacheIterator
+{
+public:
+    TQAsciiCacheIterator( const TQAsciiCache<type> &c ):TQGCacheIterator((TQGCache &)c) {}
+    TQAsciiCacheIterator( const TQAsciiCacheIterator<type> &ci)
+				: TQGCacheIterator( (TQGCacheIterator &)ci ) {}
+    TQAsciiCacheIterator<type> &operator=(const TQAsciiCacheIterator<type>&ci)
+	{ return ( TQAsciiCacheIterator<type>&)TQGCacheIterator::operator=( ci ); }
+    uint  count()   const     { return TQGCacheIterator::count(); }
+    bool  isEmpty() const     { return TQGCacheIterator::count() == 0; }
+    bool  atFirst() const     { return TQGCacheIterator::atFirst(); }
+    bool  atLast()  const     { return TQGCacheIterator::atLast(); }
+    type *toFirst()	      { return (type *)TQGCacheIterator::toFirst(); }
+    type *toLast()	      { return (type *)TQGCacheIterator::toLast(); }
+    operator type *() const   { return (type *)TQGCacheIterator::get(); }
+    type *current()   const   { return (type *)TQGCacheIterator::get(); }
+    const char *currentKey() const { return TQGCacheIterator::getKeyAscii(); }
+    type *operator()()	      { return (type *)TQGCacheIterator::operator()();}
+    type *operator++()	      { return (type *)TQGCacheIterator::operator++(); }
+    type *operator+=(uint j)  { return (type *)TQGCacheIterator::operator+=(j);}
+    type *operator--()	      { return (type *)TQGCacheIterator::operator--(); }
+    type *operator-=(uint j)  { return (type *)TQGCacheIterator::operator-=(j);}
+};
+
+
+#endif // TQASCIICACHE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qasciicache-members.html b/doc/html/qasciicache-members.html new file mode 100644 index 00000000..841c36b8 --- /dev/null +++ b/doc/html/qasciicache-members.html @@ -0,0 +1,64 @@ + + + + + +TQAsciiCache Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAsciiCache

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qasciicache.html b/doc/html/qasciicache.html new file mode 100644 index 00000000..5b0b7993 --- /dev/null +++ b/doc/html/qasciicache.html @@ -0,0 +1,252 @@ + + + + + +TQAsciiCache Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAsciiCache Class Reference

+ +

The TQAsciiCache class is a template class that provides a cache based on char* keys. +More... +

#include <qasciicache.h> +

Inherits TQPtrCollection. +

List of all member functions. +

Public Members

+
    +
  • TQAsciiCache ( int maxCost = 100, int size = 17, bool caseSensitive = TRUE, bool copyKeys = TRUE )
  • +
  • ~TQAsciiCache ()
  • +
  • int maxCost () const
  • +
  • int totalCost () const
  • +
  • void setMaxCost ( int m )
  • +
  • virtual uint count () const
  • +
  • uint size () const
  • +
  • bool isEmpty () const
  • +
  • virtual void clear ()
  • +
  • bool insert ( const char * k, const type * d, int c = 1, int p = 0 )
  • +
  • bool remove ( const char * k )
  • +
  • type * take ( const char * k )
  • +
  • type * find ( const char * k, bool ref = TRUE ) const
  • +
  • type * operator[] ( const char * k ) const
  • +
  • void statistics () const
  • +
+

Detailed Description

+ + +

The TQAsciiCache class is a template class that provides a cache based on char* keys. +

+ +

TQAsciiCache is implemented as a template class. Define a template +instance TQAsciiCache<X> to create a cache that operates on +pointers to X (X*). +

A cache is a least recently used (LRU) list of cache items. The +cache items are accessed via char* keys. For Unicode keys use +the TQCache template instead, which uses TQString keys. A TQCache +has the same performace as a TQAsciiCache. +

Each cache item has a cost. The sum of item costs, totalCost(), +will not exceed the maximum cache cost, maxCost(). If inserting a +new item would cause the total cost to exceed the maximum cost, +the least recently used items in the cache are removed. +

Apart from insert(), by far the most important function is find() +(which also exists as operator[]()). This function looks up an +item, returns it, and by default marks it as being the most +recently used item. +

There are also methods to remove() or take() an object from the +cache. Calling setAutoDelete(TRUE) tells the cache to delete items that +are removed. The default is to not delete items when then are +removed (i.e., remove() and take() are equivalent). +

When inserting an item into the cache, only the pointer is copied, +not the item itself. This is called a shallow copy. It is possible +to make the cache copy all of the item's data (known as a deep copy) when an item is inserted. insert() calls the virtual +function TQPtrCollection::newItem() for the item to be inserted. +Inherit a cache and reimplement newItem() if you want deep copies. +

When removing a cache item the virtual function +TQPtrCollection::deleteItem() is called. Its default implementation +in TQAsciiCache is to delete the item if auto-deletion is enabled. +

There is a TQAsciiCacheIterator which may be used to traverse the +items in the cache in arbitrary order. +

See also TQAsciiCacheIterator, TQCache, TQIntCache, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQAsciiCache::TQAsciiCache ( int maxCost = 100, int size = 17, bool caseSensitive = TRUE, bool copyKeys = TRUE ) +

+ +

Constructs a cache whose contents will never have a total cost +greater than maxCost and which is expected to contain less than +size items. +

size is actually the size of an internal hash array; it's +usually best to make it prime and at least 50% bigger than the +largest expected number of items in the cache. +

Each inserted item has an associated cost. When inserting a new +item, if the total cost of all items in the cache will exceed maxCost, the cache will start throwing out the older (least +recently used) items until there is enough room for the new item +to be inserted. +

If caseSensitive is TRUE (the default), the cache keys are case +sensitive; if it is FALSE, they are case-insensitive. +Case-insensitive comparison only affects the 26 letters in +US-ASCII. If copyKeys is TRUE (the default), TQAsciiCache makes +a copy of the cache keys, otherwise it copies just the const char +* pointer - slightly faster if you can guarantee that the keys +will never change, but very risky. + +

TQAsciiCache::~TQAsciiCache () +

+ +

Removes all items from the cache and destroys it. +All iterators that access this cache will be reset. + +

void TQAsciiCache::clear () [virtual] +

+ +

Removes all items from the cache, and deletes them if auto-deletion has been +enabled. +

All cache iterators that operate on this cache are reset. +

See also remove() and take(). + +

Reimplemented from TQPtrCollection. +

uint TQAsciiCache::count () const [virtual] +

+ +

Returns the number of items in the cache. +

See also totalCost() and size(). + +

Reimplemented from TQPtrCollection. +

type * TQAsciiCache::find ( const char * k, bool ref = TRUE ) const +

+ +

Returns the item with key k, or 0 if the key does not exist +in the cache. If ref is TRUE (the default), the item is moved +to the front of the least recently used list. +

If there are two or more items with equal keys, the one that was +inserted last is returned. + +

bool TQAsciiCache::insert ( const char * k, const type * d, int c = 1, int p = 0 ) +

+ +

Inserts the item d into the cache using key k, and with an +associated cost of c. Returns TRUE if the item is successfully +inserted. Returns FALSE if the item is not inserted, for example, +if the cost of the item exceeds maxCost(). +

The cache's size is limited, and if the total cost is too high, +TQAsciiCache will remove old, least recently used items until there +is room for this new item. +

Items with duplicate keys can be inserted. +

The parameter p is internal and should be left at the default +value (0). +

Warning: If this function returns FALSE, you must delete d +yourself. Additionally, be very careful about using d after +calling this function, because any other insertions into the +cache, from anywhere in the application or within TQt itself, could +cause the object to be discarded from the cache and the pointer to +become invalid. + +

bool TQAsciiCache::isEmpty () const +

+ +

Returns TRUE if the cache is empty; otherwise returns FALSE. + +

int TQAsciiCache::maxCost () const +

+ +

Returns the maximum allowed total cost of the cache. +

See also setMaxCost() and totalCost(). + +

type * TQAsciiCache::operator[] ( const char * k ) const +

+ +

Returns the item with key k, or 0 if k does not exist in +the cache, and moves the item to the front of the least recently +used list. +

If there are two or more items with equal keys, the one that was +inserted last is returned. +

This is the same as find( k, TRUE ). +

See also find(). + +

bool TQAsciiCache::remove ( const char * k ) +

+ +

Removes the item with key k and returns TRUE if the item was +present in the cache; otherwise returns FALSE. +

The item is deleted if auto-deletion has been enabled, i.e., if +you have called setAutoDelete(TRUE). +

If there are two or more items with equal keys, the one that was +inserted last is removed. +

All iterators that refer to the removed item are set to point to +the next item in the cache's traversal order. +

See also take() and clear(). + +

void TQAsciiCache::setMaxCost ( int m ) +

+ +

Sets the maximum allowed total cost of the cache to m. If the +current total cost is greater than m, some items are removed +immediately. +

See also maxCost() and totalCost(). + +

uint TQAsciiCache::size () const +

+ +

Returns the size of the hash array used to implement the cache. +This should be a bit bigger than count() is likely to be. + +

void TQAsciiCache::statistics () const +

+ +

A debug-only utility function. Prints out cache usage, hit/miss, +and distribution information using qDebug(). This function does +nothing in the release library. + +

type * TQAsciiCache::take ( const char * k ) +

+ +

Takes the item associated with k out of the cache without +deleting it and returns a pointer to the item taken out, or 0 +if the key does not exist in the cache. +

If there are two or more items with equal keys, the one that was +inserted last is taken. +

All iterators that refer to the taken item are set to point to the +next item in the cache's traversal order. +

See also remove() and clear(). + +

int TQAsciiCache::totalCost () const +

+ +

Returns the total cost of the items in the cache. This is an +integer in the range 0 to maxCost(). +

See also setMaxCost(). + + +


+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/qasciicacheiterator-members.html b/doc/html/qasciicacheiterator-members.html new file mode 100644 index 00000000..20e38a75 --- /dev/null +++ b/doc/html/qasciicacheiterator-members.html @@ -0,0 +1,62 @@ + + + + + +TQAsciiCacheIterator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAsciiCacheIterator

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qasciicacheiterator.html b/doc/html/qasciicacheiterator.html new file mode 100644 index 00000000..45c5b238 --- /dev/null +++ b/doc/html/qasciicacheiterator.html @@ -0,0 +1,211 @@ + + + + + +TQAsciiCacheIterator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAsciiCacheIterator Class Reference

+ +

The TQAsciiCacheIterator class provides an iterator for TQAsciiCache collections. +More... +

#include <qasciicache.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQAsciiCacheIterator class provides an iterator for TQAsciiCache collections. +

+ +

Note that the traversal order is arbitrary; you are not guaranteed +any particular order. If new objects are inserted into the cache +while the iterator is active, the iterator may or may not see +them. +

Multiple iterators are completely independent, even when they +operate on the same TQAsciiCache. TQAsciiCache updates all iterators +that refer an item when that item is removed. +

TQAsciiCacheIterator provides an operator++() and an operator+=() +to traverse the cache; current() and currentKey() to access the +current cache item and its key. It also provides atFirst() and +atLast(), which return TRUE if the iterator points to the first or +last item in the cache respectively. The isEmpty() function +returns TRUE if the cache is empty; and count() returns the number +of items in the cache. +

Note that atFirst() and atLast() refer to the iterator's arbitrary +ordering, not to the cache's internal least recently used list. +

See also TQAsciiCache, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQAsciiCacheIterator::TQAsciiCacheIterator ( const TQAsciiCache<type> & cache ) +

+ +

Constructs an iterator for cache. The current iterator item is +set to point to the first item in the cache. + +

TQAsciiCacheIterator::TQAsciiCacheIterator ( const TQAsciiCacheIterator<type> & ci ) +

+ +

Constructs an iterator for the same cache as ci. The new +iterator starts at the same item as ci.current() but moves +independently from there on. + +

bool TQAsciiCacheIterator::atFirst () const +

+ +

Returns TRUE if the iterator points to the first item in the +cache; otherwise returns FALSE. Note that this refers to the +iterator's arbitrary ordering, not to the cache's internal least +recently used list. +

See also toFirst() and atLast(). + +

bool TQAsciiCacheIterator::atLast () const +

+ +

Returns TRUE if the iterator points to the last item in the cache; +otherwise returns FALSE. Note that this refers to the iterator's +arbitrary ordering, not to the cache's internal least recently +used list. +

See also toLast() and atFirst(). + +

uint TQAsciiCacheIterator::count () const +

+ +

Returns the number of items in the cache over which this iterator +operates. +

See also isEmpty(). + +

type * TQAsciiCacheIterator::current () const +

+ +

Returns a pointer to the current iterator item. + +

const char * TQAsciiCacheIterator::currentKey () const +

+ +

Returns the key for the current iterator item. + +

bool TQAsciiCacheIterator::isEmpty () const +

+ +

Returns TRUE if the cache is empty, i.e. count() == 0; otherwise +returns FALSE. +

See also count(). + +

TQAsciiCacheIterator::operator type * () const +

+ +

Cast operator. Returns a pointer to the current iterator item. +Same as current(). + +

type * TQAsciiCacheIterator::operator() () +

+ +

Makes the succeeding item current and returns the original current +item. +

If the current iterator item was the last item in the cache or if +it was 0, 0 is returned. + +

type * TQAsciiCacheIterator::operator++ () +

+ +

Prefix ++ makes the iterator point to the item just after +current(), and makes that the new current item for the iterator. If +current() was the last item, operator++() returns 0. + +

type * TQAsciiCacheIterator::operator+= ( uint jump ) +

+ +

Returns the item jump positions after the current item, or 0 +if it is beyond the last item. Makes this the current item. + +

type * TQAsciiCacheIterator::operator-- () +

+ +

Prefix -- makes the iterator point to the item just before +current(), and makes that the new current item for the iterator. If +current() was the first item, operator--() returns 0. + +

type * TQAsciiCacheIterator::operator-= ( uint jump ) +

+ +

Returns the item jump positions before the current item, or 0 +if it is before the first item. Makes this the current item. + +

TQAsciiCacheIterator<type> & TQAsciiCacheIterator::operator= ( const TQAsciiCacheIterator<type> & ci ) +

+ +

Makes this an iterator for the same cache as ci. The new +iterator starts at the same item as ci.current(), but moves +independently thereafter. + +

type * TQAsciiCacheIterator::toFirst () +

+ +

Sets the iterator to point to the first item in the cache and +returns a pointer to the item. +

Sets the iterator to 0 and returns 0 if the cache is empty. +

See also toLast() and isEmpty(). + +

type * TQAsciiCacheIterator::toLast () +

+ +

Sets the iterator to point to the last item in the cache and +returns a pointer to the item. +

Sets the iterator to 0 and returns 0 if the cache is empty. +

See also isEmpty(). + + +


+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/qasciidict-h.html b/doc/html/qasciidict-h.html new file mode 100644 index 00000000..30b5d5c0 --- /dev/null +++ b/doc/html/qasciidict-h.html @@ -0,0 +1,168 @@ + + + + + +qasciidict.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qasciidict.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qasciidict.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQAsciiDict template class
+**
+** Created : 920821
+**
+** 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 retquirements 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 TQASCIIDICT_H
+#define TQASCIIDICT_H
+
+#ifndef QT_H
+#include "qgdict.h"
+#endif // QT_H
+
+template<class type>
+class TQAsciiDict
+#ifdef Q_QDOC
+	: public TQPtrCollection
+#else
+	: public TQGDict
+#endif
+{
+public:
+    TQAsciiDict(int size=17, bool caseSensitive=TRUE, bool copyKeys=TRUE )
+	: TQGDict(size,AsciiKey,caseSensitive,copyKeys) {}
+    TQAsciiDict( const TQAsciiDict<type> &d ) : TQGDict(d) {}
+   ~TQAsciiDict()			{ clear(); }
+    TQAsciiDict<type> &operator=(const TQAsciiDict<type> &d)
+			{ return (TQAsciiDict<type>&)TQGDict::operator=(d); }
+    uint  count()   const		{ return TQGDict::count(); }
+    uint  size()    const		{ return TQGDict::size(); }
+    bool  isEmpty() const		{ return TQGDict::count() == 0; }
+
+    void  insert( const char *k, const type *d )
+					{ TQGDict::look_ascii(k,(Item)d,1); }
+    void  replace( const char *k, const type *d )
+					{ TQGDict::look_ascii(k,(Item)d,2); }
+    bool  remove( const char *k )	{ return TQGDict::remove_ascii(k); }
+    type *take( const char *k )		{ return (type *)TQGDict::take_ascii(k); }
+    type *find( const char *k ) const
+		{ return (type *)((TQGDict*)this)->TQGDict::look_ascii(k,0,0); }
+    type *operator[]( const char *k ) const
+		{ return (type *)((TQGDict*)this)->TQGDict::look_ascii(k,0,0); }
+
+    void  clear()			{ TQGDict::clear(); }
+    void  resize( uint n )		{ TQGDict::resize(n); }
+    void  statistics() const		{ TQGDict::statistics(); }
+
+#ifdef Q_QDOC
+protected:
+    virtual TQDataStream& read( TQDataStream &, TQPtrCollection::Item & );
+    virtual TQDataStream& write( TQDataStream &, TQPtrCollection::Item ) const;
+#endif
+
+private:
+    void  deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void TQAsciiDict<void>::deleteItem( TQPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void TQAsciiDict<type>::deleteItem( TQPtrCollection::Item d )
+{
+    if ( del_item ) delete (type *)d;
+}
+
+template<class type>
+class TQAsciiDictIterator : public TQGDictIterator
+{
+public:
+    TQAsciiDictIterator(const TQAsciiDict<type> &d)
+	: TQGDictIterator((TQGDict &)d) {}
+   ~TQAsciiDictIterator()      {}
+    uint  count()   const     { return dict->count(); }
+    bool  isEmpty() const     { return dict->count() == 0; }
+    type *toFirst()	      { return (type *)TQGDictIterator::toFirst(); }
+    operator type *() const   { return (type *)TQGDictIterator::get(); }
+    type   *current() const   { return (type *)TQGDictIterator::get(); }
+    const char *currentKey() const { return TQGDictIterator::getKeyAscii(); }
+    type *operator()()	      { return (type *)TQGDictIterator::operator()(); }
+    type *operator++()	      { return (type *)TQGDictIterator::operator++(); }
+    type *operator+=(uint j)  { return (type *)TQGDictIterator::operator+=(j);}
+};
+
+#define Q_DEFINED_QASCIIDICT
+#include "qwinexport.h"
+#endif // TQASCIIDICT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qasciidict-members.html b/doc/html/qasciidict-members.html new file mode 100644 index 00000000..ccd53a1e --- /dev/null +++ b/doc/html/qasciidict-members.html @@ -0,0 +1,67 @@ + + + + + +TQAsciiDict Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAsciiDict

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qasciidict.html b/doc/html/qasciidict.html new file mode 100644 index 00000000..34c0919b --- /dev/null +++ b/doc/html/qasciidict.html @@ -0,0 +1,325 @@ + + + + + +TQAsciiDict Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAsciiDict Class Reference

+ +

The TQAsciiDict class is a template class that provides a dictionary based on char* keys. +More... +

#include <qasciidict.h> +

Inherits TQPtrCollection. +

List of all member functions. +

Public Members

+
    +
  • TQAsciiDict ( int size = 17, bool caseSensitive = TRUE, bool copyKeys = TRUE )
  • +
  • TQAsciiDict ( const TQAsciiDict<type> & dict )
  • +
  • ~TQAsciiDict ()
  • +
  • TQAsciiDict<type> & operator= ( const TQAsciiDict<type> & dict )
  • +
  • virtual uint count () const
  • +
  • uint size () const
  • +
  • bool isEmpty () const
  • +
  • void insert ( const char * key, const type * item )
  • +
  • void replace ( const char * key, const type * item )
  • +
  • bool remove ( const char * key )
  • +
  • type * take ( const char * key )
  • +
  • type * find ( const char * key ) const
  • +
  • type * operator[] ( const char * key ) const
  • +
  • virtual void clear ()
  • +
  • void resize ( uint newsize )
  • +
  • void statistics () const
  • +
+

Important Inherited Members

+ +

Protected Members

+
    +
  • virtual TQDataStream & read ( TQDataStream & s, TQPtrCollection::Item & item )
  • +
  • virtual TQDataStream & write ( TQDataStream & s, TQPtrCollection::Item ) const
  • +
+

Detailed Description

+ + +The TQAsciiDict class is a template class that provides a dictionary based on char* keys. +

+ +

+

TQAsciiDict is implemented as a template class. Define a template +instance TQAsciiDict<X> to create a dictionary that operates on +pointers to X (X*). +

A dictionary is a collection of key-value pairs. The key is a +char* used for insertion, removal and lookup. The value is a +pointer. Dictionaries provide very fast insertion and lookup. +

TQAsciiDict cannot handle Unicode keys; use the TQDict template +instead, which uses TQString keys. A TQDict has the same +performace as a TQAsciiDict. +

Example: +

+    TQAsciiDict<TQLineEdit> fields; // char* keys, TQLineEdit* values
+    fields.insert( "forename", new TQLineEdit( this ) );
+    fields.insert( "surname", new TQLineEdit( this ) );
+
+    fields["forename"]->setText( "Homer" );
+    fields["surname"]->setText( "Simpson" );
+
+    TQAsciiDictIterator<TQLineEdit> it( fields ); // See TQAsciiDictIterator
+    for( ; it.current(); ++it )
+        cout << it.currentKey() << ": " << it.current()->text() << endl;
+    cout << endl;
+
+    if ( fields["forename"] && fields["surname"] )
+        cout << fields["forename"]->text() << " " 
+            << fields["surname"]->text() << endl;  // Prints "Homer Simpson"
+
+    fields.remove( "forename" ); // Does not delete the line edit
+    if ( ! fields["forename"] )
+        cout << "forename is not in the dictionary" << endl;
+    
+ +In this example we use a dictionary to keep track of the line +edits we're using. We insert each line edit into the dictionary +with a unique name and then access the line edits via the +dictionary. See TQPtrDict, TQIntDict and TQDict. +

See TQDict for full details, including the choice of dictionary +size, and how deletions are handled. +

See also TQAsciiDictIterator, TQDict, TQIntDict, TQPtrDict, Collection Classes, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQAsciiDict::TQAsciiDict ( int size = 17, bool caseSensitive = TRUE, bool copyKeys = TRUE ) +

+ +

Constructs a dictionary optimized for less than size entries. +

We recommend setting size to a suitably large prime number (a +bit larger than the expected number of entries). This makes the +hash distribution better and will improve lookup performance. +

When caseSensitive is TRUE (the default) TQAsciiDict treats +"abc" and "Abc" as different keys; when it is FALSE "abc" and +"Abc" are the same. Case-insensitive comparison only considers the +26 letters in US-ASCII. +

If copyKeys is TRUE (the default), the dictionary copies keys +using strcpy(); if it is FALSE, the dictionary just copies the +pointers. + +

TQAsciiDict::TQAsciiDict ( const TQAsciiDict<type> & dict ) +

+ +

Constructs a copy of dict. +

Each item in dict is inserted into this dictionary. Only the +pointers are copied (shallow copy). + +

TQAsciiDict::~TQAsciiDict () +

+ +

Removes all items from the dictionary and destroys it. +

The items are deleted if auto-delete is enabled. +

All iterators that access this dictionary will be reset. +

See also setAutoDelete(). + +

bool TQPtrCollection::autoDelete () const +

+ +

Returns the setting of the auto-delete option. The default is FALSE. +

See also setAutoDelete(). + +

void TQAsciiDict::clear () [virtual] +

+ +

Removes all items from the dictionary. +

The removed items are deleted if auto-deletion is enabled. +

All dictionary iterators that operate on dictionary are reset. +

See also remove(), take(), and setAutoDelete(). + +

Reimplemented from TQPtrCollection. +

uint TQAsciiDict::count () const [virtual] +

+ +

Returns the number of items in the dictionary. +

See also isEmpty(). + +

Reimplemented from TQPtrCollection. +

type * TQAsciiDict::find ( const char * key ) const +

+ +

Returns the item associated with key, or 0 if the key does not +exist in the dictionary. +

This function uses an internal hashing algorithm to optimize +lookup. +

If there are two or more items with equal keys, then the item that +was most recently inserted will be found. +

Equivalent to the [] operator. +

See also operator[](). + +

void TQAsciiDict::insert ( const char * key, const type * item ) +

+ +

Inserts the key with the item into the dictionary. +

Multiple items can have the same key, in which case only the last +item will be accessible using operator[](). +

item may not be 0. +

See also replace(). + +

bool TQAsciiDict::isEmpty () const +

+ +

Returns TRUE if the dictionary is empty, i.e. count() == 0; +otherwise it returns FALSE. +

See also count(). + +

TQAsciiDict<type> & TQAsciiDict::operator= ( const TQAsciiDict<type> & dict ) +

+ +

Assigns dict to this dictionary and returns a reference to this +dictionary. +

This dictionary is first cleared and then each item in dict is +inserted into this dictionary. Only the pointers are copied +(shallow copy) unless newItem() has been reimplemented(). + +

type * TQAsciiDict::operator[] ( const char * key ) const +

+ +

Returns the item associated with key, or 0 if the key does +not exist in the dictionary. +

This function uses an internal hashing algorithm to optimize +lookup. +

If there are two or more items with equal keys, then the item that +was most recently inserted will be found. +

Equivalent to the find() function. +

See also find(). + +

TQDataStream & TQAsciiDict::read ( TQDataStream & s, TQPtrCollection::Item & item ) [virtual protected] +

+ +

Reads a dictionary item from the stream s and returns a +reference to the stream. +

The default implementation sets item to 0. +

See also write(). + +

bool TQAsciiDict::remove ( const char * key ) +

+ +

Removes the item associated with key from the dictionary. +Returns TRUE if successful, i.e. if the key existed in the +dictionary; otherwise returns FALSE. +

If there are two or more items with equal keys, then the most +recently inserted item will be removed. +

The removed item is deleted if auto-deletion is enabled. +

All dictionary iterators that refer to the removed item will be +set to point to the next item in the dictionary traversal order. +

See also take(), clear(), and setAutoDelete(). + +

void TQAsciiDict::replace ( const char * key, const type * item ) +

+ +

Replaces an item that has a key equal to key with item. +

If the item does not already exist, it will be inserted. +

item may not be 0. +

Equivalent to: +

+        TQAsciiDict<char> dict;
+            ...
+        if ( dict.find(key) )
+            dict.remove( key );
+        dict.insert( key, item );
+    
+ +

If there are two or more items with equal keys, then the most +recently inserted item will be replaced. +

See also insert(). + +

void TQAsciiDict::resize ( uint newsize ) +

+ +

Changes the size of the hashtable to newsize. The contents of +the dictionary are preserved but all iterators on the dictionary +become invalid. + +

void TQPtrCollection::setAutoDelete ( bool enable ) +

+ +

Sets the collection to auto-delete its contents if enable is +TRUE and to never delete them if enable is FALSE. +

If auto-deleting is turned on, all the items in a collection are +deleted when the collection itself is deleted. This is convenient +if the collection has the only pointer to the items. +

The default setting is FALSE, for safety. If you turn it on, be +careful about copying the collection - you might find yourself +with two collections deleting the same items. +

Note that the auto-delete setting may also affect other functions +in subclasses. For example, a subclass that has a remove() +function will remove the item from its data structure, and if +auto-delete is enabled, will also delete the item. +

See also autoDelete(). + +

Examples: grapher/grapher.cpp, scribble/scribble.cpp, and table/bigtable/main.cpp. +

uint TQAsciiDict::size () const +

+ +

Returns the size of the internal hash array (as specified in the +constructor). +

See also count(). + +

void TQAsciiDict::statistics () const +

+ +

Debugging-only function that prints out the dictionary +distribution using qDebug(). + +

type * TQAsciiDict::take ( const char * key ) +

+ +

Takes the item associated with key out of the dictionary +without deleting it (even if auto-deletion is enabled). +

If there are two or more items with equal keys, then the most +recently inserted item will be taken. +

Returns a pointer to the item taken out, or 0 if the key does not +exist in the dictionary. +

All dictionary iterators that refer to the taken item will be set +to point to the next item in the dictionary traversal order. +

See also remove(), clear(), and setAutoDelete(). + +

TQDataStream & TQAsciiDict::write ( TQDataStream & s, TQPtrCollection::Item ) const [virtual protected] +

+ +

Writes a dictionary item to the stream s and returns a +reference to the stream. +

See also read(). + + +


+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/qasciidictiterator-members.html b/doc/html/qasciidictiterator-members.html new file mode 100644 index 00000000..d7cc87f5 --- /dev/null +++ b/doc/html/qasciidictiterator-members.html @@ -0,0 +1,57 @@ + + + + + +TQAsciiDictIterator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAsciiDictIterator

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qasciidictiterator.html b/doc/html/qasciidictiterator.html new file mode 100644 index 00000000..cef5e55b --- /dev/null +++ b/doc/html/qasciidictiterator.html @@ -0,0 +1,179 @@ + + + + + +TQAsciiDictIterator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAsciiDictIterator Class Reference

+ +

The TQAsciiDictIterator class provides an iterator for TQAsciiDict collections. +More... +

#include <qasciidict.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQAsciiDictIterator class provides an iterator for TQAsciiDict collections. +

+ +

TQAsciiDictIterator is implemented as a template class. Define a +template instance TQAsciiDictIterator<X> to create a dictionary +iterator that operates on TQAsciiDict<X> (dictionary of X*). +

Example: +

+    TQAsciiDict<TQLineEdit> fields;
+    fields.insert( "forename", new TQLineEdit( this ) );
+    fields.insert( "surname", new TQLineEdit( this ) );
+    fields.insert( "age", new TQLineEdit( this ) );
+
+    fields["forename"]->setText( "Homer" );
+    fields["surname"]->setText( "Simpson" );
+    fields["age"]->setText( "45" );
+
+    TQAsciiDictIterator<TQLineEdit> it( fields );
+    for( ; it.current(); ++it )
+        cout << it.currentKey() << ": " << it.current()->text() << endl;
+    cout << endl;
+
+    // Output (random order):
+    //  age: 45
+    //  surname: Simpson
+    //  forename: Homer
+    
+ +In the example we insert some line edits into a dictionary, then +iterate over the dictionary printing the strings associated with +those line edits. +

Note that the traversal order is arbitrary; you are not guaranteed +any particular order. +

Multiple iterators may independently traverse the same dictionary. +A TQAsciiDict knows about all the iterators that are operating on +the dictionary. When an item is removed from the dictionary, +TQAsciiDict updates all the iterators that are referring to the +removed item to point to the next item in the (arbitrary) +traversal order. +

See also TQAsciiDict, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQAsciiDictIterator::TQAsciiDictIterator ( const TQAsciiDict<type> & dict ) +

+ +

Constructs an iterator for dict. The current iterator item is +set to point on the first item in the dict. + +

TQAsciiDictIterator::~TQAsciiDictIterator () +

+ +

Destroys the iterator. + +

uint TQAsciiDictIterator::count () const +

+ +

Returns the number of items in the dictionary this iterator +operates over. +

See also isEmpty(). + +

type * TQAsciiDictIterator::current () const +

+ +

Returns a pointer to the current iterator item. + +

const char * TQAsciiDictIterator::currentKey () const +

+ +

Returns a pointer to the key for the current iterator item. + +

bool TQAsciiDictIterator::isEmpty () const +

+ +

Returns TRUE if the dictionary is empty, i.e. count() == 0, +otherwise returns FALSE. +

See also count(). + +

TQAsciiDictIterator::operator type * () const +

+ +

Cast operator. Returns a pointer to the current iterator item. +Same as current(). + +

type * TQAsciiDictIterator::operator() () +

+ +

Makes the succeeding item current and returns the original current +item. +

If the current iterator item was the last item in the dictionary +or if it was 0, 0 is returned. + +

type * TQAsciiDictIterator::operator++ () +

+ +

Prefix ++ makes the succeeding item current and returns the new +current item. +

If the current iterator item was the last item in the dictionary +or if it was 0, 0 is returned. + +

type * TQAsciiDictIterator::operator+= ( uint jump ) +

+ +

Sets the current item to the item jump positions after the +current item, and returns a pointer to that item. +

If that item is beyond the last item or if the dictionary is +empty, it sets the current item to 0 and returns 0. + +

type * TQAsciiDictIterator::toFirst () +

+ +

Sets the current iterator item to point to the first item in the +dictionary and returns a pointer to the item. If the dictionary is +empty it sets the current item to 0 and returns 0. + + +


+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/qassistantclient-h.html b/doc/html/qassistantclient-h.html new file mode 100644 index 00000000..e1cae1b7 --- /dev/null +++ b/doc/html/qassistantclient-h.html @@ -0,0 +1,124 @@ + + + + + +qassistantclient.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qassistantclient.h

+ +

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


+
+/**********************************************************************
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the TQAssistantClient library.
+**
+** 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 retquirements 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.
+**
+** 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 TQASSISTANTCLIENT_H
+#define TQASSISTANTCLIENT_H
+
+#include <qobject.h>
+
+class TQSocket;
+class TQProcess;
+
+class TQAssistantClient : public TQObject
+{
+    Q_OBJECT
+    Q_PROPERTY( bool open READ isOpen )
+
+public:
+    TQAssistantClient( const TQString &path, TQObject *parent = 0, const char *name = 0 );
+    ~TQAssistantClient();
+
+    bool isOpen() const;
+
+    void setArguments( const TQStringList &args );
+
+public slots:
+    virtual void openAssistant();
+    virtual void closeAssistant();
+    virtual void showPage( const TQString &page );
+
+signals:
+    void assistantOpened();
+    void assistantClosed();
+    void error( const TQString &msg );
+
+private slots:
+    void socketConnected();
+    void socketConnectionClosed();
+    void readPort();
+    void socketError( int );
+    void readStdError();
+
+private:
+    TQSocket *socket;
+    TQProcess *proc;
+    Q_UINT16 port;
+    TQString host, assistantCommand, pageBuffer;
+    bool opened;
+};
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qassistantclient-members.html b/doc/html/qassistantclient-members.html new file mode 100644 index 00000000..47881bc8 --- /dev/null +++ b/doc/html/qassistantclient-members.html @@ -0,0 +1,98 @@ + + + + + +TQAssistantClient Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAssistantClient

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qassistantclient.html b/doc/html/qassistantclient.html new file mode 100644 index 00000000..6e664a44 --- /dev/null +++ b/doc/html/qassistantclient.html @@ -0,0 +1,179 @@ + + + + + +TQAssistantClient Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAssistantClient Class Reference

+ +

The TQAssistantClient class provides a means of using TQt +Assistant as an application's help tool. +More... +

#include <qassistantclient.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • bool open - whether TQt Assistant is open  (read only)
  • +
+

Detailed Description

+ + +The TQAssistantClient class provides a means of using TQt +Assistant as an application's help tool. +

Using TQt Assistant is simple: Create a TQAssistantClient instance, +then call showPage() as often as necessary to show your help +pages. When you call showPage(), TQt Assistant will be launched if +it isn't already running. +

The TQAssistantClient instance can open (openAssistant()) or close +(closeAssistant()) TQt Assistant whenever retquired. If TQt Assistant +is open, isOpen() returns TRUE. +

One TQAssistantClient instance interacts with one TQt Assistant +instance, so every time you call openAssistant(), showPage() or +closeAssistant() they are applied to the particular TQt Assistant +instance associated with the TQAssistantClient. +

When you call openAssistant() the assistantOpened() signal is +emitted. Similarly when closeAssistant() is called, +assistantClosed() is emitted. In either case, if an error occurs, +error() is emitted. +

This class is not included in the TQt library itself. To use it you +must link against libqassistantclient.a (Unix) or qassistantclient.lib (Windows), which is built into INSTALL/lib +if you built the TQt tools (INSTALL is the directory where TQt is +installed). If you use qmake, then you can simply add the following +line to your pro file: +

+        LIBS += -lqassistantclient
+    
+ +

See also "Adding Documentation to TQt Assistant" in the TQt Assistant manual. + +


Member Function Documentation

+

TQAssistantClient::TQAssistantClient ( const TQString & path, TQObject * parent = 0, const char * name = 0 ) +

+Constructs an assistant client object. The path specifies the +path to the TQt Assistant executable. If path is an empty +string the system path (%PATH% or $PATH) is used. +

The assistant client object is a child of parent and is called +name. + +

TQAssistantClient::~TQAssistantClient () +

+Destroys the assistant client object and frees up all allocated +resources. + +

void TQAssistantClient::assistantClosed () [signal] +

+ +

This signal is emitted when the connection to TQt Assistant is +closed. This happens when the user exits TQt Assistant, or when an +error in the server or client occurs, or if closeAssistant() is +called. + +

void TQAssistantClient::assistantOpened () [signal] +

+ +

This signal is emitted when TQt Assistant is open and the +client-server communication is set up. + +

void TQAssistantClient::closeAssistant () [virtual slot] +

+Use this function to close TQt Assistant. +

See also assistantClosed(). + +

void TQAssistantClient::error ( const TQString & msg ) [signal] +

+ +

This signal is emitted if TQt Assistant cannot be started or if an +error occurs during the initialization of the connection between +TQt Assistant and the calling application. The msg provides an +explanation of the error. + +

bool TQAssistantClient::isOpen () const +

Returns TRUE if TQt Assistant is open; otherwise returns FALSE. +See the "open" property for details. +

void TQAssistantClient::openAssistant () [virtual slot] +

+This function opens TQt Assistant and sets up the client-server +communiction between the application and TQt Assistant. If it is +already open, this function does nothing. If an error occurs, +error() is emitted. +

See also assistantOpened(). + +

void TQAssistantClient::setArguments ( const TQStringList & args ) +

+Sets the command line arguments used when TQt Assistant is +started to args. + +

void TQAssistantClient::showPage ( const TQString & page ) [virtual slot] +

+Call this function to make TQt Assistant show a particular page. +The page is a filename (e.g. myhelpfile.html). See "Adding +Documentation to TQt Assistant" in the TQt + Assistant manual for further information. +

If TQt Assistant hasn't been opened +yet, this function will do nothing. You can use isOpen() to +determine whether TQt Assistant is up and running, or you can +connect to the asssistantOpened() signal. +

See also open and assistantOpened(). + +

Example: helpsystem/mainwindow.cpp. +


Property Documentation

+

bool open

+

This property holds whether TQt Assistant is open. +

+

Get this property's value with isOpen(). + +


+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/qasyncimageio-h.html b/doc/html/qasyncimageio-h.html new file mode 100644 index 00000000..99c0c8f9 --- /dev/null +++ b/doc/html/qasyncimageio-h.html @@ -0,0 +1,156 @@ + + + + + +qasyncimageio.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qasyncimageio.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qasyncimageio.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of asynchronous image/movie loading classes
+**
+** Created : 970617
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQASYNCIMAGEIO_H
+#define TQASYNCIMAGEIO_H
+
+#ifndef QT_H
+#include "qimage.h"
+#endif // QT_H
+
+#ifndef QT_NO_ASYNC_IMAGE_IO
+
+#if __GNUC__ - 0 > 3
+#pragma GCC system_header
+#endif
+
+class Q_EXPORT TQImageConsumer {
+public:
+    virtual void end()=0;
+
+    // Change transfer type 1.
+    virtual void changed( const TQRect& ) = 0;
+    virtual void frameDone() = 0;
+
+    // Change transfer type 2.
+    virtual void frameDone( const TQPoint&, const TQRect& ) = 0;
+
+    virtual void setLooping( int ) = 0;
+    virtual void setFramePeriod( int ) = 0;
+    virtual void setSize( int, int ) = 0;
+};
+
+class Q_EXPORT TQImageFormat {
+public:
+    virtual ~TQImageFormat();
+    virtual int decode( TQImage& img, TQImageConsumer* consumer,
+			const uchar* buffer, int length ) = 0;
+};
+
+class Q_EXPORT TQImageFormatType {
+public:
+    virtual ~TQImageFormatType();
+    virtual TQImageFormat* decoderFor( const uchar* buffer, int length ) = 0;
+    virtual const char* formatName() const = 0;
+protected:
+    TQImageFormatType();
+};
+
+class TQImageDecoderPrivate;
+class Q_EXPORT TQImageDecoder {
+public:
+    TQImageDecoder( TQImageConsumer* c );
+    ~TQImageDecoder();
+
+    const TQImage& image() { return img; }
+    int decode( const uchar* buffer, int length );
+
+    static const char* formatName( const uchar* buffer, int length );
+    static TQImageFormatType* format( const char* name ); // direct use - no decode()
+
+    static TQStrList inputFormats();
+    static void registerDecoderFactory( TQImageFormatType* );
+    static void unregisterDecoderFactory( TQImageFormatType* );
+
+private:
+    TQImageFormat* actual_decoder;
+    TQImageConsumer* consumer;
+    TQImage img;
+    TQImageDecoderPrivate *d;
+};
+
+#endif // QT_NO_ASYNC_IMAGE_IO
+
+#endif // TQASYNCIMAGEIO_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qasyncio-h.html b/doc/html/qasyncio-h.html new file mode 100644 index 00000000..3894724f --- /dev/null +++ b/doc/html/qasyncio-h.html @@ -0,0 +1,165 @@ + + + + + +qasyncio.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qasyncio.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qasyncio.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of asynchronous I/O classes
+**
+** Created : 970617
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQASYNCIO_H
+#define TQASYNCIO_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qsignal.h"
+#include "qtimer.h"
+#endif // QT_H
+
+#ifndef QT_NO_ASYNC_IO
+
+class TQIODevice;
+
+class Q_EXPORT TQAsyncIO {
+public:
+    virtual ~TQAsyncIO();
+    void connect(TQObject*, const char *member);
+
+protected:
+    void ready();
+
+private:
+    TQSignal signal;
+};
+
+class Q_EXPORT TQDataSink : public TQAsyncIO {
+public:
+    // Call this to know how much I can take.
+    virtual int readyToReceive()=0;
+    virtual void receive(const uchar*, int count)=0;
+    virtual void eof()=0;
+    void maybeReady();
+};
+
+class Q_EXPORT TQDataSource : public TQAsyncIO {
+public:
+    virtual int readyToSend()=0; // returns -1 when never any more ready
+    virtual void sendTo(TQDataSink*, int count)=0;
+    void maybeReady();
+
+    virtual bool rewindable() const;
+    virtual void enableRewind(bool);
+    virtual void rewind();
+};
+
+class Q_EXPORT TQIODeviceSource : public TQDataSource {
+    const int buf_size;
+    uchar *buffer;
+    TQIODevice* iod;
+    bool rew;
+
+public:
+    TQIODeviceSource(TQIODevice*, int bufsize=4096);
+   ~TQIODeviceSource();
+
+    int readyToSend();
+    void sendTo(TQDataSink* sink, int n);
+    bool rewindable() const;
+    void enableRewind(bool on);
+    void rewind();
+};
+
+class Q_EXPORT TQDataPump : public TQObject {
+    Q_OBJECT
+    int interval;
+    TQTimer timer;
+    TQDataSource* source;
+    TQDataSink* sink;
+
+public:
+    TQDataPump(TQDataSource*, TQDataSink*);
+
+private slots:
+    void kickStart();
+    void tryToPump();
+};
+
+#endif	// QT_NO_ASYNC_IO
+
+#endif
+
+ +


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

Complete Member List for TQAsyncIO

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qasyncio.html b/doc/html/qasyncio.html new file mode 100644 index 00000000..c1570404 --- /dev/null +++ b/doc/html/qasyncio.html @@ -0,0 +1,83 @@ + + + + + +TQAsyncIO Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAsyncIO Class Reference
[obsolete]

+ +

The TQAsyncIO class encapsulates I/O asynchronicity. +More... +

#include <qasyncio.h> +

Inherited by TQDataSink and TQDataSource. +

List of all member functions. +

Public Members

+ +

Protected Members

+ +

Detailed Description

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

The TQAsyncIO class encapsulates I/O asynchronicity. +

The TQt classes for asynchronous input/output provide a simple +mechanism to allow large files or slow data sources to be processed +without using large amounts of memory or blocking the user interface. +

This facility is used in TQt to drive animated images. See TQImageConsumer. + +


Member Function Documentation

+

TQAsyncIO::~TQAsyncIO () [virtual] +

+Destroys the async IO object. + +

void TQAsyncIO::connect ( TQObject * obj, const char * member ) +

+Ensures that only one object, obj and function, member, can +respond to changes in readiness. + +

void TQAsyncIO::ready () [protected] +

+Derived classes should call this when they change from being +unready to ready. + + +

+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/qaxaggregated-members.html b/doc/html/qaxaggregated-members.html new file mode 100644 index 00000000..6468c613 --- /dev/null +++ b/doc/html/qaxaggregated-members.html @@ -0,0 +1,50 @@ + + + + + +TQAxAggregated Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAxAggregated

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxaggregated.html b/doc/html/qaxaggregated.html new file mode 100644 index 00000000..f27d564b --- /dev/null +++ b/doc/html/qaxaggregated.html @@ -0,0 +1,155 @@ + + + + + +TQAxAggregated Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAxAggregated Class Reference
[TQAxServer module]

+ +

The TQAxAggregated class is an abstract base class for implementations of +additional COM interfaces. +More... +

This class is part of the TQt ActiveTQt Extension. +

#include <qaxbindable.h> +

List of all member functions. +

Public Members

+
    +
  • virtual long queryInterface ( const TQUuid & iid, void ** iface ) = 0
  • +
+

Protected Members

+ +

Detailed Description

+

This class is defined in the TQt ActiveTQt Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQAxAggregated class is an abstract base class for implementations of +additional COM interfaces. + +

+ +

Create a subclass of TQAxAggregated and reimplement +queryInterface() to support additional COM interfaces. Use +multiple inheritance from those COM interfaces. Implement the +IUnknown interface of those COM interfaces by delegating the calls +to QueryInterface(), AddRef() and Release() to the interface +provided by controllingUnknown(). +

Use the widget() method if you need to make calls to the TQWidget +implementing the ActiveX control. You must not store that pointer +in your subclass (unless you use TQGuardedPtr), as the TQWidget can +be destroyed by the ActiveTQt framework at any time. + +


Member Function Documentation

+

IUnknown * TQAxAggregated::controllingUnknown () const [protected] +

+ +

Returns the IUnknown interface of the ActiveX control. Implement +the IUnknown interface in your TQAxAggregated subclass to delegate +calls to QueryInterface(), AddRef() and Release() to the interface +provided by this function. +

+    HRESULT AxImpl::QueryInterface( REFIID iid, void **iface )
+    {
+        return controllingUnknown()->QueryInterface( iid, iface );
+    }
+
+    unsigned long AxImpl::AddRef()
+    {
+        return controllingUnknown()->AddRef();
+    }
+
+    unsigned long AxImpl::Release()
+    {
+        return controllingUnknown()->Release();
+    }
+    
+ +

The TQAXAGG_IUNKNOWN macro expands to the code above, and you can +use it in the class declaration of your subclass. + +

TQObject * TQAxAggregated::object () const [protected] +

+ +

Returns a pointer to the TQObject subclass implementing the COM object. +This function might return 0. +

Warning: +You must not store the returned pointer, unless you use a +TQGuardedPtr, since the TQObject can be destroyed by ActiveTQt at any +time. + +

long TQAxAggregated::queryInterface ( const TQUuid & iid, void ** iface ) [pure virtual] +

+ +

Reimplement this pure virtual function to support additional COM +interfaces. Set the value of iface to point to this object to +support the interface iid. Note that you must cast the this pointer to the appropriate superclass. +

+    long AxImpl::queryInterface( const TQUuid &iid, void **iface )
+    {
+        *iface = 0;
+        if ( iid == IID_ISomeCOMInterface )
+            *iface = (ISomeCOMInterface*)this;
+        else
+            return E_NOINTERFACE;
+
+        AddRef();
+        return S_OK;
+    }
+    
+ +

Return the standard COM results S_OK (interface is supported) or +E_NOINTERFACE (requested interface is not supported). +

Warning: +Even though you must implement the IUnknown interface if you +implement any COM interface you must not support the IUnknown +interface in your queryInterface() implementation. + +

TQWidget * TQAxAggregated::widget () const [protected] +

+ +

Returns a pointer to the TQWidget subclass implementing the ActiveX control. +This function might return 0. +

Warning: +You must not store the returned pointer, unless you use a +TQGuardedPtr, since the TQWidget can be destroyed by ActiveTQt at any +time. + + +


+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/qaxbase-h.html b/doc/html/qaxbase-h.html new file mode 100644 index 00000000..2b879af0 --- /dev/null +++ b/doc/html/qaxbase-h.html @@ -0,0 +1,209 @@ + + + + + +qaxbase.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qaxbase.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qaxbase.h   3.3.8   edited Jan 11 14:46 $
+**
+** Declaration of the TQAxBase class
+**
+** Copyright (C) 2001-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the Active TQt integration.
+**
+** Licensees holding valid TQt Enterprise Edition
+** licenses for Windows may use this file in accordance with the TQt Commercial
+** License Agreement provided with the Software.
+**
+** This file is not available for use under any other license without
+** express written permission from the copyright holder.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about TQt Commercial License Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef UNICODE
+#define UNICODE
+#endif
+
+#ifndef TQAXBASE_H
+#define TQAXBASE_H
+
+#include <qvariant.h>
+#include <qobject.h>
+
+struct IUnknown;
+struct TQUuid;
+class TQAxEventSink;
+class TQAxObject;
+class TQAxBasePrivate;
+
+class TQAxBase
+{
+#ifdef Q_QDOC
+#error "The Symbol Q_QDOC is reserved for documentation purposes."
+    Q_PROPERTY( TQString control READ control WRITE setControl )
+#endif
+public:
+#ifndef Q_QDOC
+    typedef TQMap<TQCString, TQVariant> PropertyBag;
+#endif
+
+    TQAxBase( IUnknown *iface = 0 );
+    virtual ~TQAxBase();
+
+    TQString control() const;
+
+    long queryInterface( const TQUuid &, void** ) const;
+
+    TQVariant dynamicCall( const TQCString&, const TQVariant &v1 = TQVariant(), 
+					   const TQVariant &v2 = TQVariant(),
+					   const TQVariant &v3 = TQVariant(),
+					   const TQVariant &v4 = TQVariant(),
+					   const TQVariant &v5 = TQVariant(),
+					   const TQVariant &v6 = TQVariant(),
+					   const TQVariant &v7 = TQVariant(),
+					   const TQVariant &v8 = TQVariant() );
+    TQVariant dynamicCall( const TQCString&, TQValueList<TQVariant> &vars );
+    TQAxObject *querySubObject( const TQCString &name, const TQVariant &v1 = TQVariant(),
+					    const TQVariant &v2 = TQVariant(),
+					    const TQVariant &v3 = TQVariant(),
+					    const TQVariant &v4 = TQVariant(),
+					    const TQVariant &v5 = TQVariant(),
+					    const TQVariant &v6 = TQVariant(),
+					    const TQVariant &v7 = TQVariant(),
+					    const TQVariant &v8 = TQVariant() );
+
+    virtual TQMetaObject *metaObject() const;
+    virtual bool qt_invoke( int, TQUObject* );
+    virtual bool qt_property( int, int, TQVariant* );
+    virtual bool qt_emit( int, TQUObject* ) = 0;
+    virtual const char *className() const = 0;
+    virtual TQObject *qObject() = 0;
+
+    PropertyBag propertyBag() const;
+    void setPropertyBag( const PropertyBag& );
+
+    TQString generateDocumentation();
+
+    virtual bool propertyWritable( const char* ) const;
+    virtual void setPropertyWritable( const char*, bool );
+
+    bool isNull() const;
+
+    TQVariant asVariant() const;
+
+#ifdef Q_QDOC
+#error "The Symbol Q_QDOC is reserved for documentation purposes."
+    enum PropertyBag {};
+signals:
+    void signal(const TQString&,int,void*);
+    void propertyChanged(const TQString&);
+    void exception(int,const TQString&,const TQString&,const TQString&);
+#endif
+
+public:
+    virtual void clear();
+    bool setControl( const TQString& );
+
+    void disableMetaObject();
+    void disableClassInfo();
+    void disableEventSink();
+
+protected:
+    virtual bool initialize( IUnknown** ptr );
+    bool initializeRemote(IUnknown** ptr);
+    bool initializeLicensed(IUnknown** ptr);
+    bool initializeActive(IUnknown** ptr);
+
+private:
+    bool initializeLicensedHelper(void *factory, const TQString &key, IUnknown **ptr);
+    TQAxBasePrivate *d;
+
+    static TQMetaObject *staticMetaObject() { return 0; }
+    virtual TQMetaObject *parentMetaObject() const = 0;
+    bool internalInvoke( const TQCString &name, void *out, TQVariant var[], TQCString &type );
+
+    TQString ctrl;
+};
+
+inline TQString TQAxBase::generateDocumentation()
+{
+    extern TQString qax_generateDocumentation(TQAxBase *, TQAxBasePrivate *);
+    return qax_generateDocumentation(this, d);
+}
+
+#ifndef QT_NO_DATASTREAM
+inline TQDataStream &operator >>( TQDataStream &s, TQAxBase &c )
+{
+    TQAxBase::PropertyBag bag;
+    c.qObject()->blockSignals( TRUE );
+    TQString control;
+    s >> control;
+    c.setControl( control );
+    s >> bag;
+    c.setPropertyBag( bag );
+    c.qObject()->blockSignals( FALSE );
+
+    return s;
+}
+
+inline TQDataStream &operator <<( TQDataStream &s, const TQAxBase &c )
+{
+    TQAxBase::PropertyBag bag = c.propertyBag();
+    s << c.control();
+    s << bag;
+
+    return s;
+}
+#endif // QT_NO_DATASTREAM
+
+#endif // TQAXBASE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxbase-members.html b/doc/html/qaxbase-members.html new file mode 100644 index 00000000..a3fb0fe3 --- /dev/null +++ b/doc/html/qaxbase-members.html @@ -0,0 +1,71 @@ + + + + + +TQAxBase Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAxBase

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxbase.html b/doc/html/qaxbase.html new file mode 100644 index 00000000..473d5cad --- /dev/null +++ b/doc/html/qaxbase.html @@ -0,0 +1,658 @@ + + + + + +TQAxBase Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAxBase Class Reference
[TQAxContainer module]

+ +

The TQAxBase class is an abstract class that provides an API +to initalize and access a COM object. +More... +

This class is part of the TQt ActiveTQt Extension. +

#include <qaxbase.h> +

Inherited by TQAxObject and TQAxWidget. +

List of all member functions. +

Public Members

+
    +
  • TQAxBase ( IUnknown * iface = 0 )
  • +
  • virtual ~TQAxBase ()
  • +
  • TQString control () const
  • +
  • long queryInterface ( const TQUuid & uuid, void ** iface ) const
  • +
  • TQVariant dynamicCall ( const TQCString & function, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) )
  • +
  • TQVariant dynamicCall ( const TQCString & function, TQValueList<TQVariant> & vars )
  • +
  • TQAxObject * querySubObject ( const TQCString & name, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) )
  • +
  • PropertyBag propertyBag () const
  • +
  • void setPropertyBag ( const PropertyBag & bag )
  • +
  • TQString generateDocumentation ()
  • +
  • virtual bool propertyWritable ( const char * prop ) const
  • +
  • virtual void setPropertyWritable ( const char * prop, bool ok )
  • +
  • bool isNull () const
  • +
  • TQVariant asVariant () const
  • +
  • enum PropertyBag { }
  • +
  • virtual void clear ()
  • +
  • bool setControl ( const TQString & )
  • +
  • void disableMetaObject ()
  • +
  • void disableClassInfo ()
  • +
  • void disableEventSink ()
  • +
+

Signals

+
    +
  • void signal ( const TQString & name, int argc, void * argv )
  • +
  • void propertyChanged ( const TQString & name )
  • +
  • void exception ( int code, const TQString & source, const TQString & desc, const TQString & help )
  • +
+

Properties

+
    +
  • TQString control - the name of the COM object wrapped by this TQAxBase object
  • +
+

Protected Members

+ +

Detailed Description

+

This class is defined in the TQt ActiveTQt Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +

The TQAxBase class is an abstract class that provides an API +to initalize and access a COM object. + +

+ +

TQAxBase is an abstract class that cannot be used directly, and is +instantiated through the subclasses TQAxObject and TQAxWidget. This +class provides the API to access the COM object directly +through its IUnknown implementation. If the COM object implements +the IDispatch interface, the properties and methods of that object +become available as TQt properties and slots. +

+    connect( buttonBack, SIGNAL(clicked()), webBrowser, SLOT(GoBack()) );
+    
+ +

Properties exposed by the object's IDispatch implementation can be +read and written through the property system provided by the TQt +Object Model (both subclasses are TQObjects, so you can use setProperty() and property() as with TQObject). Properties +with multiple parameters are not supported. +

+    activeX->setProperty( "text", "some text" );
+    int value = activeX->property( "value" );
+    
+ +

Write-functions for properties and other methods exposed by the +object's IDispatch implementation can be called directly using +dynamicCall(), or indirectly as slots connected to a signal. +

+    webBrowser->dynamicCall( "GoHome()" );
+    
+ +

Outgoing events supported by the COM object are emitted as +standard TQt signals. +

+    connect( webBrowser, SIGNAL(TitleChanged(const TQString&)),
+             this, SLOT(setCaption(const TQString&)) );
+    
+ +

TQAxBase transparently converts between COM data types and the +equivalent TQt data types. Some COM types have no equivalent TQt data structure. +

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. +

+ + + + + + + + + + + + + + + + + + +
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 +TQDateTime +const TQDateTime& +TQDateTime& +
CY +Q_LLONG +Q_LLONG +Q_LLONG& +
OLE_COLOR +TQColor +const TQColor& +TQColor& +
SAFEARRAY(VARIANT) +TQValueList<TQVariant> +const TQValueList<TQVariant>& +TQValueList<TQVariant>& +
SAFEARRAY(BYTE) +TQByteArray +const TQByteArray& +TQByteArray& +
SAFEARRAY(BSTR) +TQStringList +const TQStringList& +TQStringList& +
VARIANT +type-dependent +const TQVariant& +TQVariant& +
IFontDisp* +TQFont +const TQFont& +TQFont& +
IPictureDisp* +TQPixmap +const TQPixmap& +TQPixmap& +
IDispatch* +TQAxObject* (read-only) +TQAxBase::asVariant() +TQAxObject* (return value) +
IUnknown* +TQAxObject* (read-only) +TQAxBase::asVariant() +TQAxObject* (return value) +
SCODE, DECIMAL +unsupported +unsupported +unsupported +
+

Supported are also enumerations, and typedefs to supported types. +

To call the methods of a COM interface described by the following IDL +

+    dispinterface IControl
+    {
+    properties:
+        [id(1)] BSTR text;
+        [id(2)] IFontDisp *font;
+
+    methods:
+        [id(6)] void showColumn( [in] int i );
+        [id(3)] bool addColumn( [in] BSTR t );
+        [id(4)] int fillList( [in, out] SAFEARRAY(VARIANT) *list );
+        [id(5)] IDispatch *item( [in] int i );
+    };
+    
+ +use the TQAxBase API like this: +
+    TQAxObject object( "<CLSID>" );
+
+    TQString text = object.property( "text" ).toString();
+    object.setProperty( "font", TQFont( "Times New Roman", 12 ) );
+
+    connect( this, SIGNAL(clicked(int)), &object, SLOT(showColumn(int)) );
+    bool ok = object.dynamicCall( "addColumn(const TQString&)", "Column 1" ).toBool();
+
+    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 +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 +IDispatch implementation or other interfaces. Those interfaces can be +retrieved through queryInterface(). +

+    IUnknown *iface = 0;
+    activeX->queryInterface( IID_IUnknown, (void**)&iface );
+    if ( iface ) {
+        // use the interface
+        iface->Release();
+    }
+    
+ +

To get the definition of the COM interfaces you will have to use the header +files provided with the component you want to use. Some compilers can also +import type libraries using the #import compiler directive. See the component +documentation to find out which type libraries you have to import, and how to use +them. +

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. + +


Member Type Documentation

+

TQAxBase::PropertyBag

+ +

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


Member Function Documentation

+

TQAxBase::TQAxBase ( IUnknown * iface = 0 ) +

+Creates a TQAxBase object that wraps the COM object iface. If iface is 0 (the default), use setControl() to instantiate a COM +object. + +

TQAxBase::~TQAxBase () [virtual] +

+Shuts down the COM object and destroys the TQAxBase object. +

See also clear(). + +

TQVariant TQAxBase::asVariant () const +

+Returns a TQVariant that wraps the COM object. The variant can +then be used as a parameter in e.g. dynamicCall(). + +

void TQAxBase::clear () [virtual] +

+Disconnects and destroys the COM object. +

If you reimplement this function you must also reimplement the +destructor to call clear(), and call this implementation at the +end of your clear() function. + +

TQString TQAxBase::control () const +

Returns the name of the COM object wrapped by this TQAxBase object. +See the "control" property for details. +

void TQAxBase::disableClassInfo () +

+Disables the class info generation for this ActiveX container. If +you don't retquire any class information about the ActiveX control +use this function to speed up the meta object generation. +

Note that this function must be called immediately after +construction of the object (without passing an object identifier), +and before calling TQAxWidget->setControl(). + +

void TQAxBase::disableEventSink () +

+Disables the event sink implementation for this ActiveX container. +If you don't intend to listen to the ActiveX control's events use +this function to speed up the meta object generation. +

Some ActiveX controls might be unstable when connected to an event +sink. To get OLE events you must use standard COM methods to +register your own event sink. Use queryInterface() to get access +to the raw COM object. +

Note that this function should be called immediately after +construction of the object (without passing an object identifier), +and before calling TQAxWidget->setControl(). + +

void TQAxBase::disableMetaObject () +

+Disables the meta object generation for this ActiveX container. +This also disables the event sink and class info generation. If +you don't intend to use the TQt meta object implementation call +this function to speed up the meta object generation. +

Some ActiveX controls might be unstable when used with OLE +automation. Use standard COM methods to use those controls through +the COM interfaces provided by queryInterface(). +

Note that this function must be called immediately after +construction of the object (without passing an object identifier), +and before calling TQAxWidget->setControl(). + +

TQVariant TQAxBase::dynamicCall ( const TQCString & function, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) ) +

+Calls the COM object's method function, passing the +parameters var1, var1, var2, var3, var4, var5, +var6, var7 and var8, and returns the value returned by +the method, or an invalid TQVariant if the method does not return +a value or when the function call failed. +

If function is a method of the object the string must be provided +as the full prototype, for example as it would be written in a +TQObject::connect() call. +

+    activeX->dynamicCall( "Navigate(const TQString&)", "www.trolltech.com" );
+    
+ +

Alternatively a function can be called passing the parameters embedded +in the string, e.g. above function can also be invoked using +

+    activeX->dynamicCall("Navigate(\"www.trolltech.com\");
+    
+ +All parameters are passed as strings; it depends on the control whether +they are interpreted correctly, and is slower than using the prototype +with correctly typed parameters. +

If function is a property the string has to be the name of the +property. The property setter is called when var1 is a valid TQVariant, +otherwise the getter is called. +

+    activeX->dynamicCall( "Value", 5 );
+    TQString text = activeX->dynamicCall( "Text" ).toString();
+    
+ +Note that it is faster to get and set properties using +TQObject::property() and TQObject::setProperty(). +

It is only possible to call functions through dynamicCall() that +have parameters or return values of datatypes supported by +TQVariant. See the TQAxBase class documentation for a list of +supported and unsupported datatypes. If you want to call functions +that have unsupported datatypes in the parameter list, use +queryInterface() to retrieve the appropriate COM interface, and +use the function directly. +

+    IWebBrowser2 *webBrowser = 0;
+    activeX->queryInterface( IID_IWebBrowser2, (void**)&webBrowser );
+    if ( webBrowser ) {
+        webBrowser->Navigate2( pvarURL );
+        webBrowser->Release();
+    }
+    
+ +

This is also more efficient. + +

Example: qutlook/centralwidget.cpp. +

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 +parameters in vars, 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 +TQVariant object. +

The TQVariant objects in vars are updated when the method has +out-parameters. + +

void TQAxBase::exception ( int code, const TQString & source, const TQString & desc, const TQString & help ) [signal] +

+ +

This signal is emitted when the COM object throws an exception while called using the OLE automation +interface IDispatch. code, source, desc and help provide information about the exception as +provided by the COM server and can be used to provide useful feedback to the end user. help includes +the help file, and the help context ID in brackets, e.g. "filename [id]". + +

TQString TQAxBase::generateDocumentation () +

+ +

Returns a rich text string with documentation for the +wrapped COM object. Dump the string to an HTML-file, +or use it in e.g. a TQTextBrowser widget. + +

bool TQAxBase::initialize ( IUnknown ** ptr ) [virtual protected] +

+This virtual function is called by setControl() and creates the +requested COM object. ptr is set to the object's IUnknown +implementation. The function returns TRUE if the object +initialization succeeded; otherwise the function returns FALSE. +

The default implementation interprets the string returned by +control(), and calls initializeRemote(), initializeLicensed() +or initializeActive() if the string matches the respective +patterns. If no pattern is matched, or if remote or licensed +initialization fails, CoCreateInstance is used directly to create +the object. +

See the control property documentation for details about +supported patterns. +

The interface returned in ptr must be referenced exactly once +when this function returns. The interface provided by e.g. +CoCreateInstance is already referenced, and there is no need to +reference it again. + +

bool TQAxBase::initializeActive ( IUnknown ** ptr ) [protected] +

+Returns an active instance running on the current machine, and returns the +IUnknown interface to the running object in ptr. This function returns TRUE +if successful, otherwise returns FALSE. +

This function is called by initialize() if the control string contains the +substring "}&". +

See also initialize(). + +

bool TQAxBase::initializeLicensed ( IUnknown ** ptr ) [protected] +

+Creates an instance of a licensed control, and returns the IUnknown interface +to the object in ptr. This functions returns TRUE if successful, otherwise +returns FALSE. +

This function is called by initialize() if the control string contains the +substring "}:". The license key needs to follow this substring. +

See also initialize(). + +

bool TQAxBase::initializeRemote ( IUnknown ** ptr ) [protected] +

+Creates the instance on a remote server, and returns the IUnknown interface +to the object in ptr. This function returns TRUE if successful, otherwise +returns FALSE. +

This function is called by initialize() if the control string contains the +substring "/{". The information about the remote machine needs to be provided +in front of the substring. +

See also initialize(). + +

bool TQAxBase::isNull () const +

+Returns TRUE if there is no COM object loaded by this wrapper; +otherwise return FALSE. +

See also control. + +

PropertyBag TQAxBase::propertyBag () const +

+Returns a name:value map of all the properties exposed by the COM +object. +

This is more efficient than getting multiple properties +individually if the COM object supports property bags. +

Warning: It is not guaranteed that the property bag implementation +of the COM object returns all properties, or that the properties +returned are the same as those available through the IDispatch +interface. + +

void TQAxBase::propertyChanged ( const TQString & name ) [signal] +

+ +

If the COM object supports property notification, this signal gets +emitted when the property called name is changed. + +

bool TQAxBase::propertyWritable ( const char * prop ) const [virtual] +

+Returns TRUE if the property prop is writable; otherwise +returns FALSE. By default, all properties are writable. +

Warning: +Depending on the control implementation this setting might be +ignored for some properties. +

See also setPropertyWritable() and propertyChanged(). + +

long TQAxBase::queryInterface ( const TQUuid & uuid, void ** iface ) const +

+Requests the interface uuid from the COM object and sets the +value of iface to the provided interface, or to 0 if the +requested interface could not be provided. +

Returns the result of the QueryInterface implementation of the COM object. +

See also control. + +

TQAxObject * TQAxBase::querySubObject ( const TQCString & name, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) ) +

+Returns a pointer to a TQAxObject wrapping the COM object provided +by the method or property name, passing passing the parameters +var1, var1, var2, var3, var4, var5, var6, +var7 and var8. +

If name is provided by a method the string must include the +full function prototype. +

If name is a property the string must be the name of the property, +and var1, ... var8 are ignored. +

The returned TQAxObject is a child of this object (which is either of +type TQAxObject or TQAxWidget), and is deleted when this object is +deleted. It is however safe to delete the returned object yourself, +and you should do so when you iterate over lists of subobjects. +

COM enabled applications usually have an object model publishing +certain elements of the application as dispatch interfaces. Use +this method to navigate the hierarchy of the object model, e.g. +

+    TQAxWidget outlook( "Outlook.Application" );
+    TQAxObject *session = outlook.querySubObject( "Session" );
+    if ( session ) {
+        TQAxObject *defFolder = session->querySubObject(
+                                "GetDefaultFolder(OlDefaultFolders)",
+                                "olFolderContacts" );
+        //...
+    }
+    
+ + +

Example: qutlook/centralwidget.cpp. +

bool TQAxBase::setControl ( const TQString & ) +

Sets the name of the COM object wrapped by this TQAxBase object. +See the "control" property for details. +

void TQAxBase::setPropertyBag ( const PropertyBag & bag ) +

+Sets the properties of the COM object to the corresponding values +in bag. +

Warning: +You should only set property bags that have been returned by the +propertyBag function, as it cannot be guaranteed that the property +bag implementation of the COM object supports the same properties +that are available through the IDispatch interface. +

See also propertyBag(). + +

void TQAxBase::setPropertyWritable ( const char * prop, bool ok ) [virtual] +

+Sets the property prop to writable if ok is TRUE, otherwise +sets prop to be read-only. By default, all properties are +writable. +

Warning: +Depending on the control implementation this setting might be +ignored for some properties. +

See also propertyWritable() and propertyChanged(). + +

void TQAxBase::signal ( const TQString & name, int argc, void * argv ) [signal] +

+ +

This generic signal gets emitted when the COM object issues the +event name. argc is the number of parameters provided by the +event (DISPPARAMS.cArgs), and argv is the pointer to the +parameter values (DISPPARAMS.rgvarg). Note that the order of parameter +values is turned around, ie. the last element of the array is the first +parameter in the function. +

+    void Receiver::slot( const TQString &name, int argc, void *argv )
+    {
+        VARIANTARG *params = (VARIANTARG*)argv;
+        if ( name.startsWith( "BeforeNavigate2(" ) ) {
+            IDispatch *pDisp = params[argc-1].pdispVal;
+            VARIANTARG URL = *params[argc-2].pvarVal;
+            VARIANTARG Flags = *params[argc-3].pvarVal;
+            VARIANTARG TargetFrameName = *params[argc-4].pvarVal;
+            VARIANTARG PostData = *params[argc-5].pvarVal;
+            VARIANTARG Headers = *params[argc-6].pvarVal;
+            bool *Cancel = params[argc-7].pboolVal;
+        }
+    }
+    
+ +

Use this signal if the event has parameters of unsupported data +types. Otherwise, connect directly to the signal name. + +


Property Documentation

+

TQString control

+

This property holds the name of the COM object wrapped by this TQAxBase object. +

Setting this property initilializes the COM object. Any COM object +previously set is shut down. +

The most efficient way to set this property is by using the +registered component's UUID, e.g. +

+    ctrl->setControl( "{8E27C92B-1264-101C-8A2F-040224009C02}" );
+    
+ +The second fastest way is to use the registered control's class +name (with or without version number), e.g. +
+    ctrl->setControl( "MSCal.Calendar" );
+    
+ +The slowest, but easiest way to use is to use the control's full +name, e.g. +
+    ctrl->setControl( "Calendar Control 9.0" );
+    
+ +

If the component's UUID is used the following patterns can be used +to initialize the control on a remote machine, to initialize a +licensed control or to connect to a running object: +

    +
  • To initialize the control on a different machine use the following +pattern: +
    +    <domain/username>:<password>@server/{8E27C92B-1264-101C-8A2F-040224009C02}
    +    
    + +
  • To initialize a licensed control use the following pattern: +
    +    {8E27C92B-1264-101C-8A2F-040224009C02}:<LicenseKey>
    +    
    + +
  • To connect to an already running object use the following pattern: +
    +    {8E27C92B-1264-101C-8A2F-040224009C02}&
    +    
    + +
+The first two patterns can be combined, e.g. to initialize a licensed +control on a remote machine: +
+    ctrl->setControl("DOMAIN/user:password@server/{8E27C92B-1264-101C-8A2F-040224009C02}:LicenseKey");
+    
+ +

The control's read function always returns the control's UUID, if provided including the license +key, and the name of the server, but not including the username, the domain or the password. + +

Set this property's value with setControl() and get this property's value with control(). + +


+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/qaxbindable-h.html b/doc/html/qaxbindable-h.html new file mode 100644 index 00000000..b6f933d6 --- /dev/null +++ b/doc/html/qaxbindable-h.html @@ -0,0 +1,133 @@ + + + + + +qaxbindable.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qaxbindable.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qaxbindable.h   3.3.8   edited Jan 11 14:46 $
+**
+** Declaration of the TQAxBindable class
+**
+** Copyright (C) 2001-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the Active TQt integration.
+**
+** Licensees holding valid TQt Enterprise Edition
+** licenses for Windows may use this file in accordance with the TQt Commercial
+** License Agreement provided with the Software.
+**
+** This file is not available for use under any other license without
+** express written permission from the copyright holder.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about TQt Commercial License Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef TQAXBINDABLE_H
+#define TQAXBINDABLE_H
+
+#include <qwidget.h>
+#include <private/qcom_p.h>
+
+struct IAxServerBase;
+struct IUnknown;
+
+class TQAxAggregated
+{
+    friend class TQAxServerBase;
+public:
+    virtual long queryInterface( const TQUuid &iid, void **iface ) = 0;
+
+protected:
+    virtual ~TQAxAggregated();
+
+    IUnknown *controllingUnknown() const
+    { return controlling_unknown; }
+    TQWidget *widget() const 
+    { 
+	if ( the_object && the_object->isWidgetType() )
+	    return (TQWidget*)the_object;
+	return 0;
+    }
+    TQObject *object() const { return the_object; }
+
+private:
+    IUnknown *controlling_unknown;
+    TQObject *the_object;
+};
+
+#define TQAXAGG_IUNKNOWN \
+    HRESULT WINAPI QueryInterface( REFIID iid, LPVOID *iface ) { \
+    return controllingUnknown()->QueryInterface( iid, iface ); } \
+    ULONG WINAPI AddRef() {return controllingUnknown()->AddRef(); } \
+    ULONG WINAPI Release() {return controllingUnknown()->Release(); } \
+
+
+class TQAxBindable
+{
+    friend class TQAxServerBase;
+public:
+    TQAxBindable();
+    virtual ~TQAxBindable();
+    
+    virtual TQAxAggregated *createAggregate();
+    static void reportError( int code, const TQString &src, const TQString &desc, const TQString &help = TQString::null );
+
+protected:
+    bool requestPropertyChange( const char *property );
+    void propertyChanged( const char *property );
+
+    IUnknown *clientSite() const;
+
+private:
+    IAxServerBase *activex;
+};
+
+#endif // TQAXBINDABLE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxbindable-members.html b/doc/html/qaxbindable-members.html new file mode 100644 index 00000000..7d1afdc6 --- /dev/null +++ b/doc/html/qaxbindable-members.html @@ -0,0 +1,53 @@ + + + + + +TQAxBindable Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAxBindable

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxbindable.html b/doc/html/qaxbindable.html new file mode 100644 index 00000000..2d495cb3 --- /dev/null +++ b/doc/html/qaxbindable.html @@ -0,0 +1,169 @@ + + + + + +TQAxBindable Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAxBindable Class Reference
[TQAxServer module]

+ +

The TQAxBindable class provides an interface between a +TQWidget and an ActiveX client. +More... +

This class is part of the TQt ActiveTQt Extension. +

#include <qaxbindable.h> +

List of all member functions. +

Public Members

+ +

Static Public Members

+
    +
  • void reportError ( int code, const TQString & src, const TQString & desc, const TQString & context = TQString::null )
  • +
+

Protected Members

+ +

Detailed Description

+

This class is defined in the TQt ActiveTQt Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQAxBindable class provides an interface between a +TQWidget and an ActiveX client. + +

+ +

The functions provided by this class allow an ActiveX control to +communicate property changes to a client application. Inherit +your control class from both TQWidget (directly or indirectly) and +this class to get access to this class's functions. The meta object compiler retquires you to inherit from +TQWidget first. +

+    class MyActiveX : public TQWidget, public TQAxBindable
+    {
+        Q_OBJECT
+        Q_PROPERTY( int value READ value WRITE setValue )
+    public:
+        MyActiveX( TQWidget *parent = 0, const char *name = 0 );
+        ...
+
+        int value() const;
+        void setValue( int );
+    };
+    
+ +

When implementing the property write function, use +requestPropertyChange() to get permission from the ActiveX client +application to change this property. When the property changes, +call propertyChanged() to notify the ActiveX client application +about the change. If a fatal error occurs in the control, use the +static reportError() function to notify the client. +

Use the interface returned by clientSite() to call the ActiveX +client. To implement additional COM interfaces in your ActiveX +control, reimplement createAggregate() to return a new object of a +TQAxAggregated subclass. + +


Member Function Documentation

+

TQAxBindable::TQAxBindable () +

+Constructs an empty TQAxBindable object. + +

TQAxBindable::~TQAxBindable () [virtual] +

+Destroys the TQAxBindable object. + +

IUnknown * TQAxBindable::clientSite () const [protected] +

+Returns a pointer to the client site interface for this ActiveX object, +or null if no client site has been set. +

Call QueryInterface() on the returned interface to get the interface you +want to call. + +

TQAxAggregated * TQAxBindable::createAggregate () [virtual] +

+Reimplement this function when you want to implement additional +COM interfaces in the ActiveX control, or when you want to provide +alternative implementations of COM interfaces. Return a new object +of a TQAxAggregated subclass. +

The default implementation returns the null pointer. + +

void TQAxBindable::propertyChanged ( const char * property ) [protected] +

+Call this function to notify the client that is hosting this +ActiveX control that the property property has been changed. +

This function is usually called at the end of the property's write +function. +

See also requestPropertyChange(). + +

void TQAxBindable::reportError ( int code, const TQString & src, const TQString & desc, const TQString & context = TQString::null ) [static] +

+ +

Reports an error to the client application. code is a +control-defined error code. desc is a human-readable description +of the error intended for the application user. src is the name +of the source for the error, typically the ActiveX server name. context can be the location of a help file with more information +about the error. If context ends with a number in brackets, +e.g. [12], this number will be interpreted as the context ID in +the help file. + +

bool TQAxBindable::requestPropertyChange ( const char * property ) [protected] +

+Call this function to request permission to change the property +property from the client that is hosting this ActiveX control. +Returns TRUE if the client allows the change; otherwise returns +FALSE. +

This function is usually called first in the write function for property, and writing is abandoned if the function returns FALSE. +

+    void MyActiveTQt::setText( const TQString &text )
+    {
+        if ( !requestPropertyChange( "text" ) )
+            return;
+
+        // update property
+
+        propertyChanged( "text" );
+    }
+    
+ +

See also propertyChanged(). + + +


+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/qaxcontainer-example-qutlook.html b/doc/html/qaxcontainer-example-qutlook.html new file mode 100644 index 00000000..b3ca43ca --- /dev/null +++ b/doc/html/qaxcontainer-example-qutlook.html @@ -0,0 +1,243 @@ + + + + + +In Sync with Outlook + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

In Sync with Outlook

+ + + +This example is a modified version of the standard +TQt addressbook example. +

It demonstrates the use of TQAxObject and querySubObject to instantiate and +navigate the Outlook Object Model, and the use of the TQt property system to +read and write values of items in the Outlook contact folder. +

+ +The modifications in the class declaration of the central widget are +a forward declaration of the TQAxObject class and the IDispatch interface, +and a new TQListViewItem subclass ABListViewItem that implements a +constructor and a destructor and has a member contact_item of type +TQAxObject. +

    class TQAxObject;
+    struct IDispatch;
+
+    class ABListViewItem : public TQListViewItem
+    {
+    public:
+        ABListViewItem( TQListView *listview, TQString firstName, TQString lastName, TQString address, TQString eMail, TQAxObject *contact );
+        ~ABListViewItem();
+
+        TQAxObject *contactItem() const;
+
+    private:
+        TQAxObject *contact_item;
+    };
+
+

The ABCentralWidget gets a destructor, a new protected function setupOutlook, +a new protected slot updateOutlook, and also three members of type TQAxObject. +

        void findEntries();
+
+        void updateOutlook();
+
+    protected:
+        void setupTabWidget();
+        void setupListView();
+        void setupOutlook();
+
+        TQAxObject *outlook, *outlookSession, *contactItems;
+
+        TQGridLayout *mainGrid;
+
+

+ +The implementation of the ABListViewItem class is trivial: +

    ABListViewItem::ABListViewItem( TQListView *listview,
+                                    TQString firstName,
+                                    TQString lastName,
+                                    TQString address,
+                                    TQString eMail,
+                                    TQAxObject *contact )
+    : TQListViewItem( listview, firstName, lastName, address, eMail ), contact_item( contact )
+    {
+    }
+
+    ABListViewItem::~ABListViewItem()
+    {
+        delete contact_item;
+    }
+
+    TQAxObject *ABListViewItem::contactItem() const
+    {
+        return contact_item;
+    }
+
The ABCentralWidget constructor initializes the TQAxObject pointers to zero and +calls the setupOutlook function. The ABCentralWidget destructor calls the +Logoff method of the outlookSession object. +
    ABCentralWidget::ABCentralWidget( TQWidget *parent, const char *name )
+        : TQWidget( parent, name ), outlook( 0 ), outlookSession( 0 ), contactItems( 0 )
+    {
+        mainGrid = new TQGridLayout( this, 2, 1, 5, 5 );
+
+        setupTabWidget();
+        setupListView();
+        setupOutlook();
+
+        mainGrid->setRowStretch( 0, 0 );
+        mainGrid->setRowStretch( 1, 1 );
+    }
+
+    ABCentralWidget::~ABCentralWidget()
+    {
+        if ( outlookSession )
+            outlookSession->dynamicCall( "Logoff()" );
+    }
+
The setupOutlook implementation creates a TQAxObject to wrap the +Outlook.Application COM object. +
    void ABCentralWidget::setupOutlook()
+    {
+        outlook = new TQAxObject( "Outlook.Application", this );
+
The call to querySubObject returns a new TQAxObject wrapper around the +"Session" object of the Outlook Object hierarchy. If the call fails for +some reason setupOutlook returns, otherwise it calls the "Logon" method +of the Session object. +
        // Get a session object
+        outlookSession = outlook->querySubObject( "Session" );
+        if ( !outlookSession )
+            return;
+        // Login; doesn't hurt if you are already running and logged on...
+        outlookSession->dynamicCall( "Logon()" );
+
The following call to querySubObject returns a new TQAxObject wrapper +around the default folder for "contacts". +
        // Get the default folder for contacts
+        TQAxObject *defFolder = outlookSession->querySubObject( "GetDefaultFolder(OlDefaultFolders)", "olFolderContacts" );
+
querySubObject is then used again to get the list of all items in the +folder. The connect statement connects the new ABCentralWidget slot +to the signals provided by the "Items" COM object. Finally, it calls the +updateOutlook function to populate the listview. +
        // Get all items
+        if ( defFolder ) {
+            contactItems = defFolder->querySubObject( "Items" );
+            connect( contactItems, SIGNAL(ItemAdd(IDispatch*)), this, SLOT(updateOutlook()) );
+            connect( contactItems, SIGNAL(ItemChange(IDispatch*)), this, SLOT(updateOutlook()) );
+            connect( contactItems, SIGNAL(ItemRemove()), this, SLOT(updateOutlook()) );
+        }
+
+        updateOutlook();
+    }
+
+

The implementation of the updateOutlook slot clears the listview, and uses +querySubObject to iterate through the list of items. For every item provided a new +ABListViewItem object is created and filled with the properties of the item +object. The object returned by querySubObject is a child of the callee (ie. "contactItems"), +but the list view item should take ownership to provide a cleaner relation between +entries, so the item has to be removed from its parent object. +

    void ABCentralWidget::updateOutlook()
+    {
+        listView->clear();
+        if ( !contactItems )
+            return;
+
+        TQAxObject *item = contactItems->querySubObject( "GetFirst()" );
+        while ( item ) {
+            TQString firstName = item->property( "FirstName" ).toString();
+            TQString lastName = item->property( "LastName" ).toString();
+            TQString address = item->property( "HomeAddress" ).toString();
+            TQString email = item->property( "Email1Address" ).toString();
+
+            (void)new ABListViewItem( listView, firstName, lastName, address, email, item );
+            // the listviewitem takes ownership
+            item->parent()->removeChild( item );
+
+            item = contactItems->querySubObject( "GetNext()" );
+        }
+    }
+
+

The addEntry implementation calls the CreateItem method of the Outlook.Application +object to create a new contact item, and creates a new ABListViewItem if the call +succeeds. +

    void ABCentralWidget::addEntry()
+    {
+        if ( !iFirstName->text().isEmpty() || !iLastName->text().isEmpty() ||
+             !iAddress->text().isEmpty() || !iEMail->text().isEmpty() ) {
+            TQAxObject *contactItem = outlook->querySubObject( "CreateItem(OlItemType)", "olContactItem" );
+            if ( contactItem ) {
+                contactItem->setProperty( "FirstName", iFirstName->text() );
+                contactItem->setProperty( "LastName", iLastName->text() );
+                contactItem->setProperty( "HomeAddress", iAddress->text() );
+                contactItem->setProperty( "Email1Address", iEMail->text() );
+                contactItem->dynamicCall( "Save()" );
+
+                new ABListViewItem( listView, iFirstName->text(),
+                    iLastName->text(), iAddress->text(), iEMail->text(), contactItem );
+            }
+        }
+
+        iFirstName->setText( "" );
+        iLastName->setText( "" );
+        iAddress->setText( "" );
+        iEMail->setText( "" );
+    }
+
+

The changeEntry implementation updates the values in the contact item of the current +listview item as well as the values of the listview item itself. +

    void ABCentralWidget::changeEntry()
+    {
+        ABListViewItem *item = (ABListViewItem*)listView->currentItem();
+
+        if ( item &&
+             ( !iFirstName->text().isEmpty() || !iLastName->text().isEmpty() ||
+               !iAddress->text().isEmpty() || !iEMail->text().isEmpty() ) ) {
+
+            TQAxObject *contactItem = item->contactItem();
+            contactItem->setProperty( "FirstName", iFirstName->text() );
+            contactItem->setProperty( "LastName", iLastName->text() );
+            contactItem->setProperty( "HomeAddress", iAddress->text() );
+            contactItem->setProperty( "Email1Address", iEMail->text() );
+            contactItem->dynamicCall( "Save()" );
+
+            item->setText( 0, iFirstName->text() );
+            item->setText( 1, iLastName->text() );
+            item->setText( 2, iAddress->text() );
+            item->setText( 3, iEMail->text() );
+        }
+    }
+
+

To build the example you must first build the TQAxContainer +library. Then run your make tool in examples/qutlook and run the resulting qutlok.exe. +

See also The TQAxContainer Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxcontainer-example-webbrowser.html b/doc/html/qaxcontainer-example-webbrowser.html new file mode 100644 index 00000000..76f4b3a3 --- /dev/null +++ b/doc/html/qaxcontainer-example-webbrowser.html @@ -0,0 +1,128 @@ + + + + + +A Web Browser + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A Web Browser

+ + + +This example utilizes the Microsoft Web Browser ActiveX control +to implement a fully functional Web Browser application. The +user interface has been developed using the TQt Designer +integration of the TQAxWidget class. +

The code demonstrates how the TQt application can communicate +with the embedded ActiveX controls using signals, slots and the +dynamicCall() function. Most signal and slot connections have +already been set up within TQt Designer. +

+ +

    void MainWindow::init()
+    {
+        pb = new TQProgressBar( statusBar() );
+        pb->setPercentageVisible( FALSE );
+        pb->hide();
+        statusBar()->addWidget( pb, 0, TRUE );
+
+        connect( WebBrowser, SIGNAL(ProgressChange(int,int)), this, SLOT(setProgress(int,int)) );
+        connect( WebBrowser, SIGNAL(StatusTextChange(const TQString&)), statusBar(), SLOT(message(const TQString&)) );
+
+        WebBrowser->dynamicCall( "GoHome()" );
+    }
+
The init() function is implemented to create a progress bar as +the child of the status bar, and to connect Internet Explorer's +ProgressChange() and StatusTextChange() signals to the +respective displays. +

Finally the GoHome() function of Internet Explorer is invoked +using the TQAxBase::dynamicCall() dynamicCall() API. +

    void MainWindow::go()
+    {
+        actionStop->setEnabled( TRUE );
+        WebBrowser->dynamicCall( "Navigate(const TQString&)", addressEdit->text() );
+    }
+
The go() function calls the NavigateTo() function of Internet +Explorer, passing the text of the address bar as the argument. +

    void MainWindow::setTitle( const TQString &title )
+    {
+        setCaption( "TQt WebBrowser - " + title );
+    }
+
The setTitle() slot is connected to the TitleChange() signal +of Internet Explorer, and updates the caption of the window +using the provided title string. +

    void MainWindow::setProgress( int a, int b )
+    {
+        if ( a <= 0 || b <= 0 ) {
+            pb->hide();
+            return;
+        }
+        pb->show();
+        pb->setTotalSteps( b );
+        pb->setProgress( a );
+    }
+
+    void MainWindow::setCommandState( int cmd, bool on )
+    {
+        switch ( cmd ) {
+        case 1:
+            actionForward->setEnabled( on );
+            break;
+        case 2:
+            actionBack->setEnabled( on );
+            break;
+        }
+    }
+
+    void MainWindow::navigateBegin()
+    {
+        actionStop->setEnabled( TRUE );
+    }
+
+    void MainWindow::navigateComplete()
+    {
+        actionStop->setEnabled( FALSE );
+    }
+
The setProgress(), setCommandState(), navigateBegin() and +navigateComplete() slots are connected to the respective +signals of Internet Explorer and update the user interface. +

The rest of the implementation is not related to ActiveTQt and +omitted for brevity. +

To build the example you must first build the +TQAxContainer library. +Then run your make tool in examples/webbrowser and +run the resulting webbrowser.exe. +

See also The TQAxContainer Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxcontainer-examples.html b/doc/html/qaxcontainer-examples.html new file mode 100644 index 00000000..e12b7264 --- /dev/null +++ b/doc/html/qaxcontainer-examples.html @@ -0,0 +1,51 @@ + + + + + +The TQAxContainer Examples + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

The TQAxContainer Examples

+ + + +The following example programs illustrate the embedding of ActiveX +controls using the TQAxContainer module. +

For more information see the TQAxContainer documentation. + +

+
In Sync with Outlook +
A Web Browser +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxcontainer.html b/doc/html/qaxcontainer.html new file mode 100644 index 00000000..381bf31b --- /dev/null +++ b/doc/html/qaxcontainer.html @@ -0,0 +1,188 @@ + + + + + +The TQAxContainer Module + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

The TQAxContainer Module

+ + +

+

+

+ + +

Introduction +

+

The TQAxContainer module provides a library implementing a TQWidget +subclass, TQAxWidget, that acts as a container for ActiveX +controls, and a TQObject subclass, TQAxObject, that can be used to +easily access non-visual COM objects. Scripting COM objects embedded +using these classes is possible through the TQAxScript, TQAxScriptManager +and TQAxScriptEngine classes. +

This module is part of the ActiveTQt + framework. (To make an application into an ActiveX server +see the TQAxServer module.) +

The module consists of six classes +

    +
  1. TQAxBase is an abstract class that provides an API to initialize +and access a COM/ActiveX object. +
  2. TQAxObject provides a TQObject that wraps a COM object. +
  3. TQAxWidget is a TQWidget that wraps an ActiveX control. +
  4. TQAxScriptManager, TQAxScript and TQAxScriptEngine provide an +interface to the Windows Script Host. +
+

Some example applications +that use standard ActiveX controls to provide high level user +interface functionality are provided. +

Building the library +

+

In the activeqt directory (usually QTDIR/extensions/activeqt) +enter the container subdirectory and run qmake to generate the +makefile, and use the make tool (nmake for VC++, make for Borland) +to build the library. The library qaxcontainer.lib will be linked +into QTDIR/lib. +

If you have a shared configuration of TQt enter the plugin subdirectory +and run qmake and your make tool to build a plugin that integrates the +TQAxWidget class into TQt Designer. +

Using the library +

+

To build TQt applications that can host COM objects and ActiveX controls +link the application against the TQAxContainer module by adding +

+    LIBS += qaxcontainer.lib
+    
+ +

to the application's .pro file. +

Distributing TQAxContainer applications +

+

The TQAxContainer library is static, so there is no need to redistribute +any additional files when using this module. Note however that the +ActiveX server binaries you are using might not be installed on the +target system, so you have to ship them with your package and register +them during the installation process of your application. +

Instantiating COM objects +

+

To instantiate a COM object use the TQAxBase::setControl() API, or pass +the name of the object directly into the constructor of the TQAxBase +subclass you are using. +

The control can be specified in a variety of formats, but the fastest +and most powerful format is to use the class ID (CLSID) of the object +directly. The class ID can be prepended with information about a remote +machine that the object should run on, and can include a license key +for licensed controls. +

Accessing the object API +

+

ActiveTQt provides a TQt API to the COM object, and replaces COM +datatypes with TQt equivalents. Use the dumpdoc tool to get the +documentation of the TQt API for any COM object and it's subobjects. +

See the TQAxWidget and TQAxObject API documentation about how to +use this class to use ActiveX controls and COM objects in TQt +applications. To access the COM object with scripting languages use +the TQAxScript class. +

To call functions of the COM object that can not be accessed via +ActiveTQt it is possible to request the COM interface directly using +TQAxBase::queryInterface(). To get a C++ definition of the respective +interface classes use the #import directive with the type library +provided with the control. +

Typical error messages +

+

ActiveTQt prints error messages to the debug output when it +encounters error situations at runtime. Usually you must run +your program in the debugger to see these messages (e.g. in Visual +Studio's Debug output). +

Requested control could not be instantiated +

+

The control requested in TQAxBase::setControl() is not installed +on this system, or is not accessible for the current user. +

The control might retquire administrator rights, or a license key. +If the control is licensed, reimplement initialize() and use the +COM APIs to call the IClassFactory2 interface functions. +

TQAxBase::internalInvoke: No such method +

+

A dynamicCall() failed - the function prototype did not +match any function available in the object's API. +

Error calling IDispatch member: Non-optional parameter +missing +

+

A dynamicCall() failed - the function prototype was correct, +but too few parameters were provided. +

Error calling IDispatch member: Type mismatch in +parameter n +

+

A dynamicCall() failed - the function prototype was correct, +but the paramter at index n was of the wrong type and could +not be coerced to the correct type. +

TQAxScriptManager::call(): No script provides this function +

+

You try to call a function that is provided through an engine +that doesn't provide introspection (ie. ActivePython or +ActivePerl). You need to call the function directly on the +respective TQAxScript object. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxfactory-h.html b/doc/html/qaxfactory-h.html new file mode 100644 index 00000000..6ea839e2 --- /dev/null +++ b/doc/html/qaxfactory-h.html @@ -0,0 +1,327 @@ + + + + + +qaxfactory.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qaxfactory.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qaxfactory.h   3.3.8   edited Jan 11 14:46 $
+**
+** Declaration of the TQAxFactory class
+**
+** Copyright (C) 2001-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the Active TQt integration.
+**
+** Licensees holding valid TQt Enterprise Edition
+** licenses for Windows may use this file in accordance with the TQt Commercial
+** License Agreement provided with the Software.
+**
+** This file is not available for use under any other license without
+** express written permission from the copyright holder.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about TQt Commercial License Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef TQAXFACTORY_H
+#define TQAXFACTORY_H
+
+#include <qdict.h>
+#include <quuid.h>
+#include <private/qcom_p.h>
+#include <qmetaobject.h>
+
+// {22B230F6-8722-4051-ADCB-E7C9CE872EB3}
+#ifndef IID_QAxFactory
+#define IID_QAxFactory TQUuid( 0x22b230f6, 0x8722, 0x4051, 0xad, 0xcb, 0xe7, 0xc9, 0xce, 0x87, 0x2e, 0xb3 )
+#endif
+
+class TQWidget;
+class TQMetaObject;
+class TQSettings;
+struct IDispatch;
+
+struct TQAxFactoryInterface : public TQFeatureListInterface
+{
+public:
+#ifndef Q_QDOC
+    virtual TQWidget *create( const TQString &key, TQWidget *parent = 0, const char *name = 0 ) = 0;
+    virtual TQObject *createObject( const TQString &key, TQObject *parent = 0, const char *name = 0 ) = 0;
+    virtual TQMetaObject *metaObject( const TQString &key ) const = 0;
+    virtual bool createObjectWrapper(TQObject *object, IDispatch **wrapper) = 0;
+
+    virtual TQUuid classID( const TQString &key ) const = 0;
+    virtual TQUuid interfaceID( const TQString &key ) const = 0;
+    virtual TQUuid eventsID( const TQString &key ) const = 0;    
+    virtual TQUuid typeLibID() const = 0;
+    virtual TQUuid appID() const = 0;
+
+    virtual void registerClass( const TQString &key, TQSettings * ) const = 0;
+    virtual void unregisterClass( const TQString &key, TQSettings * ) const = 0;
+
+    virtual bool validateLicenseKey( const TQString &key, const TQString &licenseKey) const = 0;
+
+    virtual TQString exposeToSuperClass( const TQString &key ) const = 0;
+    virtual bool stayTopLevel( const TQString &key ) const = 0;
+    virtual bool hasStockEvents( const TQString &key ) const = 0;
+    virtual bool isService() const = 0;
+#endif
+};
+
+extern TQAxFactoryInterface *qAxFactory();
+
+class TQAxFactory : public TQAxFactoryInterface
+{
+public:
+    TQAxFactory( const TQUuid &, const TQUuid &);
+    virtual ~TQAxFactory();
+    Q_REFCOUNT;
+
+    TQRESULT queryInterface( const TQUuid &iid, TQUnknownInterface **iface );
+
+#ifdef Q_QDOC
+    virtual TQStringList featureList() const = 0;
+#endif
+    virtual TQWidget *create( const TQString &key, TQWidget *parent = 0, const char *name = 0 );
+    virtual TQObject *createObject( const TQString &key, TQObject *parent = 0, const char *name = 0 );
+    virtual TQMetaObject *metaObject( const TQString &key ) const;
+    virtual bool createObjectWrapper(TQObject *object, IDispatch **wrapper);
+
+    virtual TQUuid classID( const TQString &key ) const;
+    virtual TQUuid interfaceID( const TQString &key ) const;
+    virtual TQUuid eventsID( const TQString &key ) const;
+
+    virtual TQUuid typeLibID() const;
+    virtual TQUuid appID() const;
+
+    virtual void registerClass( const TQString &key, TQSettings * ) const;
+    virtual void unregisterClass( const TQString &key, TQSettings * ) const;
+
+    virtual bool validateLicenseKey( const TQString &key, const TQString &licenseKey) const;
+
+    virtual TQString exposeToSuperClass( const TQString &key ) const;
+    virtual bool stayTopLevel( const TQString &key ) const;
+    virtual bool hasStockEvents( const TQString &key ) const;
+    virtual bool isService() const;
+
+    enum ServerType {
+	SingleInstance,
+	MultipleInstances
+    };
+
+    static bool isServer();
+    static TQString serverDirPath();
+    static TQString serverFilePath();
+    static bool startServer(ServerType type = MultipleInstances);
+    static bool stopServer();
+
+private:
+    TQUuid typelib;
+    TQUuid app;
+};
+
+inline bool TQAxFactory::startServer(ServerType type)
+{
+    // implementation in qaxservermain.cpp
+    extern bool qax_startServer(ServerType);
+    return qax_startServer(type);
+}
+
+inline bool TQAxFactory::stopServer()
+{
+    // implementation in qaxservermain.cpp
+    extern bool qax_stopServer();
+    return qax_stopServer();
+}
+
+#define TQAXFACTORY_EXPORT( IMPL, TYPELIB, APPID )	\
+    TQUnknownInterface *ucm_instantiate()		\
+    {							\
+	IMPL *impl = new IMPL( TQUuid(TYPELIB), TQUuid(APPID) );	\
+	TQUnknownInterface* iface = 0; 			\
+	impl->queryInterface( IID_QUnknown, &iface );	\
+	return iface;					\
+    }
+
+#define TQAXFACTORY_DEFAULT( Class, IIDClass, IIDInterface, IIDEvents, IIDTypeLib, IIDApp ) \
+    class TQAxDefaultFactory : public TQAxFactory \
+    { \
+    public: \
+	TQAxDefaultFactory( const TQUuid &app, const TQUuid &lib) \
+	: TQAxFactory( app, lib ) {} \
+	TQStringList featureList() const \
+	{ \
+	    TQStringList list; \
+	    list << #Class; \
+	    return list; \
+	} \
+	TQMetaObject *metaObject( const TQString &key ) const \
+	{ \
+	    if ( key == #Class ) \
+		return Class::staticMetaObject(); \
+	    return 0; \
+	} \
+	TQWidget *create( const TQString &key, TQWidget *parent, const char *name ) \
+	{ \
+	    if ( key == #Class ) \
+		return new Class( parent, name ); \
+	    return 0; \
+	} \
+	TQUuid classID( const TQString &key ) const \
+	{ \
+	    if ( key == #Class ) \
+		return TQUuid( IIDClass ); \
+	    return TQUuid(); \
+	} \
+	TQUuid interfaceID( const TQString &key ) const \
+	{ \
+	    if ( key == #Class ) \
+		return TQUuid( IIDInterface ); \
+	    return TQUuid(); \
+	} \
+	TQUuid eventsID( const TQString &key ) const \
+	{ \
+	    if ( key == #Class ) \
+		return TQUuid( IIDEvents ); \
+	    return TQUuid(); \
+	} \
+    }; \
+    TQAXFACTORY_EXPORT( TQAxDefaultFactory, IIDTypeLib, IIDApp ) \
+
+template<class T>
+class TQAxClass : public TQAxFactory
+{
+public:
+    TQAxClass(const TQString &appId, const TQString &libId)
+    : TQAxFactory(appId, libId)
+    {}
+
+    TQMetaObject *metaObject(const TQString &key) const { return T::staticMetaObject(); }
+    TQStringList featureList() const { return TQString(T::staticMetaObject()->className()); }
+    TQWidget *create(const TQString &key, TQWidget *parent, const char *name)
+    {
+	if (key != TQString(T::staticMetaObject()->className())) return 0;
+	if (!qstrcmp(T::staticMetaObject()->classInfo("Creatable", TRUE), "no")) return 0;
+	return new T(parent, name);
+    }
+};
+
+#define TQAXFACTORY_BEGIN(IDTypeLib, IDApp) \
+    class TQAxFactoryList : public TQAxFactory \
+    { \
+	TQStringList factoryKeys; \
+	TQDict<TQAxFactoryInterface> factories; \
+    public: \
+	TQAxFactoryList() \
+	: TQAxFactory(IDApp, IDTypeLib) \
+	{ \
+	    factories.setAutoDelete(TRUE); \
+	    TQAxFactoryInterface *factory = 0; \
+	    TQStringList keys; \
+	    TQStringList::Iterator it; \
+
+#define TQAXCLASS(Class) \
+	    factory = new TQAxClass<Class>(appID(), typeLibID()); \
+	    keys = factory->featureList(); \
+	    for (it = keys.begin(); it != keys.end(); ++it) { \
+		factoryKeys += *it; \
+		factories.insert(*it, factory); \
+	    }\
+
+#define TQAXFACTORY_END() \
+	} \
+	TQStringList featureList() const {  return factoryKeys; } \
+	TQWidget *create(const TQString &key, TQWidget *parent, const char *name) { \
+	    TQAxFactoryInterface *f = factories[key]; \
+	    return f ? f->create(key, parent, name) : 0; \
+	} \
+	TQUuid classID(const TQString &key) { \
+	    TQAxFactoryInterface *f = factories[key]; \
+	    return f ? f->classID(key) : TQUuid(); \
+	} \
+	TQUuid interfaceID(const TQString &key) { \
+	    TQAxFactoryInterface *f = factories[key]; \
+	    return f ? f->interfaceID(key) : TQUuid(); \
+	} \
+	TQUuid eventsID(const TQString &key) { \
+	    TQAxFactoryInterface *f = factories[key]; \
+	    return f ? f->eventsID(key) : TQUuid(); \
+	} \
+	void registerClass( const TQString &key, TQSettings *s ) const { \
+	    TQAxFactoryInterface *f = factories[key]; \
+	    if (f) f->registerClass(key, s); \
+	} \
+	void unregisterClass( const TQString &key, TQSettings *s ) const { \
+	    TQAxFactoryInterface *f = factories[key]; \
+	    if (f) f->unregisterClass(key, s); \
+	} \
+	TQString exposeToSuperClass( const TQString &key ) const { \
+	    TQAxFactoryInterface *f = factories[key]; \
+	    return f ? f->exposeToSuperClass(key) : TQString(); \
+	} \
+	bool stayTopLevel( const TQString &key ) const { \
+	    TQAxFactoryInterface *f = factories[key]; \
+	    return f ? f->stayTopLevel(key) : FALSE; \
+	} \
+	bool hasStockEvents( const TQString &key ) const { \
+	    TQAxFactoryInterface *f = factories[key]; \
+	    return f ? f->hasStockEvents(key) : FALSE; \
+	} \
+    }; \
+    TQUnknownInterface *ucm_instantiate()		\
+    {							\
+	TQAxFactoryList *impl = new TQAxFactoryList();	\
+	TQUnknownInterface* iface = 0; 			\
+	impl->queryInterface( IID_QUnknown, &iface );	\
+	return iface;					\
+    }
+
+
+#endif // TQAXFACTORY_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxfactory-members.html b/doc/html/qaxfactory-members.html new file mode 100644 index 00000000..9ebff5ba --- /dev/null +++ b/doc/html/qaxfactory-members.html @@ -0,0 +1,70 @@ + + + + + +TQAxFactory Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAxFactory

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxfactory.html b/doc/html/qaxfactory.html new file mode 100644 index 00000000..e3ff0d31 --- /dev/null +++ b/doc/html/qaxfactory.html @@ -0,0 +1,424 @@ + + + + + +TQAxFactory Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAxFactory Class Reference
[TQAxServer module]

+ +

The TQAxFactory class defines a factory for the creation of COM components. +More... +

This class is part of the TQt ActiveTQt Extension. +

#include <qaxfactory.h> +

List of all member functions. +

Public Members

+
    +
  • TQAxFactory ( const TQUuid & libid, const TQUuid & appid )
  • +
  • virtual ~TQAxFactory ()
  • +
  • virtual TQStringList featureList () const = 0
  • +
  • virtual TQWidget * create ( const TQString & key, TQWidget * parent = 0, const char * name = 0 )
  • +
  • virtual TQObject * createObject ( const TQString & key, TQObject * parent = 0, const char * name = 0 )
  • +
  • virtual TQMetaObject * metaObject ( const TQString & key ) const
  • +
  • virtual bool createObjectWrapper ( TQObject * object, IDispatch ** wrapper )
  • +
  • virtual TQUuid classID ( const TQString & key ) const
  • +
  • virtual TQUuid interfaceID ( const TQString & key ) const
  • +
  • virtual TQUuid eventsID ( const TQString & key ) const
  • +
  • virtual TQUuid typeLibID () const
  • +
  • virtual TQUuid appID () const
  • +
  • virtual void registerClass ( const TQString & key, TQSettings * settings ) const
  • +
  • virtual void unregisterClass ( const TQString & key, TQSettings * settings ) const
  • +
  • virtual bool validateLicenseKey ( const TQString & key, const TQString & licenseKey ) const
  • +
  • virtual TQString exposeToSuperClass ( const TQString & key ) const
  • +
  • virtual bool stayTopLevel ( const TQString & key ) const
  • +
  • virtual bool hasStockEvents ( const TQString & key ) const
  • +
  • virtual bool isService () const
  • +
  • enum ServerType { SingleInstance, MultipleInstances }
  • +
+

Static Public Members

+ +

Detailed Description

+

This class is defined in the TQt ActiveTQt Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQAxFactory class defines a factory for the creation of COM components. + +

+ + +

Implement this factory once in your ActiveX server to provide +information about the components the server can create. If your +server supports just a single ActiveX control, you can use the +default factory implementation instead of implementing the factory +yourself. Use the TQAXFACTORY_DEFAULT macro in any +implementation file (e.g. main.cpp) to instantiate and export the +default factory: +

+    #include <qapplication.h>
+    #include <qaxfactory.h>
+
+    #include "theactivex.h"
+
+    TQAXFACTORY_DEFAULT(
+        TheActiveX,                               // widget class
+        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // class ID
+        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // interface ID
+        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // event interface ID
+        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
+        "{01234567-89AB-CDEF-0123-456789ABCDEF}"  // application ID
+        )
+    
+ +

If you implement your own factory reimplement the pure virtual +functions, provide the unique identifiers for the ActiveX +controls, and use the TQAXFACTORY_EXPORT macro to instantiate +and export it: +

+    TQStringList ActiveTQtFactory::featureList() const
+    {
+        TQStringList list;
+        list << "ActiveX1";
+        list << "ActiveX2";
+        ...
+        return list;
+    }
+
+    TQWidget *ActiveTQtFactory::create( const TQString &key, TQWidget *parent, const char *name )
+    {
+        if ( key == "ActiveX1" )
+            return new ActiveX1( parent, name );
+        if ( key == "ActiveX2" )
+            return new ActiveX2( parent, name );
+        ...
+        return 0;
+    }
+
+    TQUuid ActiveTQtFactory::classID( const TQString &key ) const
+    {
+        if ( key == "ActiveX1" )
+            return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
+        ...
+        return TQUuid();
+    }
+
+    TQUuid ActiveTQtFactory::interfaceID( const TQString &key ) const
+    {
+        if ( key == "ActiveX1" )
+            return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
+        ...
+        return TQUuid();
+    }
+
+    TQUuid ActiveTQtFactory::eventsID( const TQString &key ) const
+    {
+        if ( key == "ActiveX1" )
+            return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
+        ...
+        return TQUuid();
+    }
+
+    TQAXFACTORY_EXPORT(
+        MyFactory,                                // factory class
+        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
+        "{01234567-89AB-CDEF-0123-456789ABCDEF}"  // application ID
+        )
+    
+ +

If you use the Q_CLASSINFO macro to provide the unique identifiers +or other attributes for your class you can use the TQAXFACTORY_BEGIN, +TQAXCLASS and TQAXFACTORY_END macros to expose one or more classes +as COM objects. +

+    TQAXFACTORY_BEGIN(
+        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
+        "{01234567-89AB-CDEF-0123-456789ABCDEF}"  // application ID
+    )
+        TQAXCLASS(Class1)
+        TQAXCLASS(Class2)
+    TQAXFACTORY_END()
+    
+ +

Only one TQAxFactory implementation may be instantiated and +exported by an ActiveX server application. This instance is accessible +through the global qAxFactory() function. +

A factory can also reimplement the registerClass() and +unregisterClass() functions to set additional flags for an ActiveX +control in the registry. To limit the number of methods or +properties a widget class exposes from its parent classes +reimplement exposeToSuperClass(). + +


Member Type Documentation

+

TQAxFactory::ServerType

+ +

This enum specifies the different types of servers that can be +started with startServer. +

    +
  • TQAxFactory::SingleInstance - The server can create only one instance of each +supplied class. +
  • TQAxFactory::MultipleInstances - The server can create multiple instances of +each supplied class. +
+

Member Function Documentation

+

TQAxFactory::TQAxFactory ( const TQUuid & libid, const TQUuid & appid ) +

+Constructs a TQAxFactory object that returns libid and appid +in the implementation of the respective interface functions. + +

TQAxFactory::~TQAxFactory () [virtual] +

+Destroys the TQAxFactory object. + +

TQUuid TQAxFactory::appID () const [virtual] +

+ +

Reimplement this function to return the ActiveX server's +application identifier. + +

TQUuid TQAxFactory::classID ( const TQString & key ) const [virtual] +

+Reimplement this function to return the class identifier for each +key returned by the featureList() implementation, or an empty +TQUuid if this factory doesn't support the value of key. +

The default implementation interprets key as the class name, +and returns the value of the Q_CLASSINFO entry "ClassID". + +

TQWidget * TQAxFactory::create ( const TQString & key, TQWidget * parent = 0, const char * name = 0 ) [virtual] +

+Reimplement this function to return a new widget for key. +Propagate parent and name to the TQWidget constructor. Return +0 if this factory doesn't support the value of key. +

The returned widget will be exposed as an ActiveX control, e.g. +a COM object that can be embedded as a control into applications. +

The default implementation returns 0. + +

TQObject * TQAxFactory::createObject ( const TQString & key, TQObject * parent = 0, const char * name = 0 ) [virtual] +

+Reimplement this function to return a new object for key. +Propagate parent and name to the TQWidget constructor. Return +0 if this factory doesn't support the value of key. +

If the object returned is a TQWidget it will be exposed as an ActiveX +control, otherwise the returned object will be exposed as a COM object. +

The default implementation returns the result TQAxFactory::create() if +parent is 0 or a widget, otherwise returns 0. + +

bool TQAxFactory::createObjectWrapper ( TQObject * object, IDispatch ** wrapper ) [virtual] +

+ +

Reimplement this function to provide the COM object for object +in wrapper. Return TRUE if the function was successfull, otherwise +return FALSE. +

The default implementation creates a generic automation wrapper based +on the meta object information of object. + +

TQUuid TQAxFactory::eventsID ( const TQString & key ) const [virtual] +

+Reimplement this function to return the identifier of the event +interface for each key returned by the featureList() +implementation, or an empty TQUuid if this factory doesn't support +the value of key. +

The default implementation interprets key as the class name, +and returns the value of the Q_CLASSINFO entry "EventsID". + +

TQString TQAxFactory::exposeToSuperClass ( const TQString & key ) const [virtual] +

+Reimplement this function to return the name of the super class of +key up to which methods and properties should be exposed by the +ActiveX control. +

The default implementation interprets key as the class name, +and returns the value of the Q_CLASSINFO entry "ToSuperClass". If +no such value is set the null-string is returned, and the functions +and properties of all the super classes including TQWidget will be +exposed. +

To only expose the functions and properties of the class itself, +reimplement this function to return key. + +

TQStringList TQAxFactory::featureList () const [pure virtual] +

+ +

Reimplement this function to return a list of the widgets (class +names) supported by this factory. + +

bool TQAxFactory::hasStockEvents ( const TQString & key ) const [virtual] +

+Reimplement this function to return TRUE if the ActiveX control +key should support the standard ActiveX events +
    +
  • Click +
  • DblClick +
  • KeyDown +
  • KeyPress +
  • KeyUp +
  • MouseDown +
  • MouseUp +
  • MouseMove +
+

The default implementation interprets key as the class name, +and returns TRUE if the value of the Q_CLASSINFO entry "StockEvents" +is "yes". Otherwise this function returns FALSE. + +

TQUuid TQAxFactory::interfaceID ( const TQString & key ) const [virtual] +

+Reimplement this function to return the interface identifier for +each key returned by the featureList() implementation, or an +empty TQUuid if this factory doesn't support the value of key. +

The default implementation interprets key as the class name, +and returns the value of the Q_CLASSINFO entry "InterfaceID". + +

bool TQAxFactory::isServer () [static] +

+Returns TRUE if the application has been started (by COM) as an ActiveX +server, otherwise returns FALSE. +

+    int main( int argc, char**argv )
+    {
+        TQApplication app( argc, argv );
+
+        if ( !TQAxFactory::isServer() ) {
+            // initialize for stand-alone execution
+        }
+
+        return app.exec() // standard event processing
+    }
+    
+ + +

bool TQAxFactory::isService () const [virtual] +

+Reimplement this function to return TRUE if the server is +running as a persistent service (e.g. an NT service) and should +not terminate even when all objects provided have been released. +

The default implementation returns FALSE. + +

TQMetaObject * TQAxFactory::metaObject ( const TQString & key ) const [virtual] +

+Reimplement this function to return the TQMetaObject corresponding to +key, or 0 if this factory doesn't support the value of key. +

The default implementation returns the TQMetaObject for the class +key. + +

void TQAxFactory::registerClass ( const TQString & key, TQSettings * settings ) const [virtual] +

+Registers additional values for the class key in the system +registry using the settings object. The standard values have +already been registed by the framework, but additional values, +e.g. implemented categories, can be added in an implementation of +this function. +

+    settings->writeEntry( "/CLSID/" + classID(key) + "/Implemented Categories/{00000000-0000-0000-000000000000}/.", TQString::null );
+    
+ +

If you reimplement this function you must also reimplement +unregisterClass() to remove the additional registry values. +

See also TQSettings. + +

TQString TQAxFactory::serverDirPath () [static] +

+Returns the directory that contains the server binary. +

For out-of-process servers this is the same as +TQApplication::applicationDirPath(). For in-process servers +that function returns the directory that contains the hosting +application. + +

TQString TQAxFactory::serverFilePath () [static] +

+Returns the file path of the server binary. +

For out-of-process servers this is the same as +TQApplication::applicationFilePath(). For in-process servers +that function returns the file path of the hosting application. + +

bool TQAxFactory::startServer ( ServerType type = MultipleInstances ) [static] +

+ +

Starts the COM server with type and returns TRUE if successful, +otherwise returns FALSE. +

Calling this function if the server is already running (or for an +in-process server) does nothing and returns TRUE. +

The server is started automatically with type set to MultipleUse +if the server executable has been started with the -activex +command line parameter. + +

bool TQAxFactory::stayTopLevel ( const TQString & key ) const [virtual] +

+Reimplement this function to return TRUE if the ActiveX control key +should be a top level window, e.g. a dialog. The default implementation +returns FALSE. + +

bool TQAxFactory::stopServer () [static] +

+ +

Stops the COM server and returns TRUE if successful, otherwise +returns FALSE. +

Calling this function if the server is not running (or for an +in-process server) does nothing and returns TRUE. +

Stopping the server will not invalidate existing objects, but no +new objects can be created from the existing server process. Usually +COM will start a new server process if additional objects are requested. +

The server is stopped automatically when the main() function returns. + +

TQUuid TQAxFactory::typeLibID () const [virtual] +

+ +

Reimplement this function to return the ActiveX server's type +library identifier. + +

void TQAxFactory::unregisterClass ( const TQString & key, TQSettings * settings ) const [virtual] +

+Unregisters any additional values for the class key from the +system registry using the settings object. +

+    settings->removeEntry( "/CLSID/" + classID(key) + "/Implemented Categories/{00000000-0000-0000-000000000000}/." );
+    
+ +

See also registerClass() and TQSettings. + +

bool TQAxFactory::validateLicenseKey ( const TQString & key, const TQString & licenseKey ) const [virtual] +

+Reimplement this function to return TRUE if licenseKey is a valid +license for the class key, or if the current machine is licensed. +

The default implementation returns TRUE if the class key is not +licensed (ie. no Q_CLASSINFO attribute "LicenseKey"), or if +licenseKey matches the value of the "LicenseKey" attribute, or +if the machine is licensed through a .LIC file with the same filename +as this COM server. + + +


+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/qaxobject-h.html b/doc/html/qaxobject-h.html new file mode 100644 index 00000000..d2a1b69a --- /dev/null +++ b/doc/html/qaxobject-h.html @@ -0,0 +1,104 @@ + + + + + +qaxobject.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qaxobject.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qaxobject.h   3.3.8   edited Jan 11 14:46 $
+**
+** Declaration of the TQAxObject class
+**
+** Copyright (C) 2001-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the Active TQt integration.
+**
+** Licensees holding valid TQt Enterprise Edition
+** licenses for Windows may use this file in accordance with the TQt Commercial
+** License Agreement provided with the Software.
+**
+** This file is not available for use under any other license without
+** express written permission from the copyright holder.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about TQt Commercial License Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef UNICODE
+#define UNICODE
+#endif
+
+#ifndef TQAXOBJECT_H
+#define TQAXOBJECT_H
+
+#include "qaxbase.h"
+#include <qobject.h>
+
+class TQAxObject : public TQObject, public TQAxBase
+{
+    friend class TQAxEventSink;
+public:
+    TQMetaObject *metaObject() const;
+    const char *className() const;
+    void* qt_cast( const char* );
+    bool qt_invoke( int, TQUObject* );
+    bool qt_emit( int, TQUObject* );
+    bool qt_property( int, int, TQVariant* );
+    TQObject* qObject() { return (TQObject*)this; }
+
+    TQAxObject( TQObject *parent = 0, const char *name = 0 );
+    TQAxObject( const TQString &c, TQObject *parent = 0, const char *name = 0 );
+    TQAxObject( IUnknown *iface, TQObject *parent = 0, const char *name = 0 );
+    ~TQAxObject();
+
+private:
+    TQMetaObject *parentMetaObject() const;
+};
+
+#endif //TQAXOBJECT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxobject-members.html b/doc/html/qaxobject-members.html new file mode 100644 index 00000000..30759a11 --- /dev/null +++ b/doc/html/qaxobject-members.html @@ -0,0 +1,113 @@ + + + + + +TQAxObject Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAxObject

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxobject.html b/doc/html/qaxobject.html new file mode 100644 index 00000000..eba6c756 --- /dev/null +++ b/doc/html/qaxobject.html @@ -0,0 +1,205 @@ + + + + + +TQAxObject Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAxObject Class Reference
[TQAxContainer module]

+ +

The TQAxObject class provides a TQObject that wraps a COM object. +More... +

This class is part of the TQt ActiveTQt Extension. +

#include <qaxobject.h> +

Inherits TQObject and TQAxBase. +

Inherited by TQAxScriptEngine. +

List of all member functions. +

Public Members

+
    +
  • TQAxObject ( TQObject * parent = 0, const char * name = 0 )
  • +
  • TQAxObject ( const TQString & c, TQObject * parent = 0, const char * name = 0 )
  • +
  • TQAxObject ( IUnknown * iface, TQObject * parent = 0, const char * name = 0 )
  • +
  • ~TQAxObject ()
  • +
+

Important Inherited Members

+
    +
  • TQVariant dynamicCall ( const TQCString & function, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) )
  • +
  • TQVariant dynamicCall ( const TQCString & function, TQValueList<TQVariant> & vars )
  • +
  • TQAxObject * querySubObject ( const TQCString & name, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) )
  • +
+

Detailed Description

+

This class is defined in the TQt ActiveTQt Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQAxObject class provides a TQObject that wraps a COM object. + +

+ +

A TQAxObject can be instantiated as an empty object, with the name +of the COM object it should wrap, or with a pointer to the +IUnknown that represents an existing COM object. If the COM object +implements the IDispatch interface, the properties, methods and +events of that object become available as TQt properties, slots and +signals. The base class, TQAxBase, provides an API to access the +COM object directly through the IUnknown pointer. +

TQAxObject is a TQObject and can be used as such, e.g. it can be +organized in an object hierarchy, receive events and connect to +signals and slots. +

Warning: +You can subclass TQAxObject, but you cannot use the Q_OBJECT macro +in the subclass (the generated moc-file will not compile), so you +cannot add further signals, slots or properties. This limitation is +due to the metaobject information generated in runtime. +To work around this problem, aggregate the TQAxObject as a member of +the TQObject subclass. +

+


Member Function Documentation

+

TQAxObject::TQAxObject ( TQObject * parent = 0, const char * name = 0 ) +

+Creates an empty COM object and propagates parent and name +to the TQObject constructor. To initialize the object, call setControl. + +

TQAxObject::TQAxObject ( const TQString & c, TQObject * parent = 0, const char * name = 0 ) +

+Creates a TQAxObject that wraps the COM object c. parent and +name are propagated to the TQWidget contructor. +

See also control. + +

TQAxObject::TQAxObject ( IUnknown * iface, TQObject * parent = 0, const char * name = 0 ) +

+Creates a TQAxObject that wraps the COM object referenced by iface. parent and name are propagated to the TQObject +contructor. + +

TQAxObject::~TQAxObject () +

+Releases the COM object and destroys the TQAxObject, +cleaning up all allocated resources. + +

TQVariant TQAxBase::dynamicCall ( const TQCString & function, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) ) +

+Calls the COM object's method function, passing the +parameters var1, var1, var2, var3, var4, var5, +var6, var7 and var8, and returns the value returned by +the method, or an invalid TQVariant if the method does not return +a value or when the function call failed. +

If function is a method of the object the string must be provided +as the full prototype, for example as it would be written in a +TQObject::connect() call. +

+    activeX->dynamicCall( "Navigate(const TQString&)", "www.trolltech.com" );
+    
+ +

Alternatively a function can be called passing the parameters embedded +in the string, e.g. above function can also be invoked using +

+    activeX->dynamicCall("Navigate(\"www.trolltech.com\");
+    
+ +All parameters are passed as strings; it depends on the control whether +they are interpreted correctly, and is slower than using the prototype +with correctly typed parameters. +

If function is a property the string has to be the name of the +property. The property setter is called when var1 is a valid TQVariant, +otherwise the getter is called. +

+    activeX->dynamicCall( "Value", 5 );
+    TQString text = activeX->dynamicCall( "Text" ).toString();
+    
+ +Note that it is faster to get and set properties using +TQObject::property() and TQObject::setProperty(). +

It is only possible to call functions through dynamicCall() that +have parameters or return values of datatypes supported by +TQVariant. See the TQAxBase class documentation for a list of +supported and unsupported datatypes. If you want to call functions +that have unsupported datatypes in the parameter list, use +queryInterface() to retrieve the appropriate COM interface, and +use the function directly. +

+    IWebBrowser2 *webBrowser = 0;
+    activeX->queryInterface( IID_IWebBrowser2, (void**)&webBrowser );
+    if ( webBrowser ) {
+        webBrowser->Navigate2( pvarURL );
+        webBrowser->Release();
+    }
+    
+ +

This is also more efficient. + +

Example: qutlook/centralwidget.cpp. +

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 +parameters in vars, 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 +TQVariant object. +

The TQVariant objects in vars are updated when the method has +out-parameters. + +

TQAxObject * TQAxBase::querySubObject ( const TQCString & name, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) ) +

+Returns a pointer to a TQAxObject wrapping the COM object provided +by the method or property name, passing passing the parameters +var1, var1, var2, var3, var4, var5, var6, +var7 and var8. +

If name is provided by a method the string must include the +full function prototype. +

If name is a property the string must be the name of the property, +and var1, ... var8 are ignored. +

The returned TQAxObject is a child of this object (which is either of +type TQAxObject or TQAxWidget), and is deleted when this object is +deleted. It is however safe to delete the returned object yourself, +and you should do so when you iterate over lists of subobjects. +

COM enabled applications usually have an object model publishing +certain elements of the application as dispatch interfaces. Use +this method to navigate the hierarchy of the object model, e.g. +

+    TQAxWidget outlook( "Outlook.Application" );
+    TQAxObject *session = outlook.querySubObject( "Session" );
+    if ( session ) {
+        TQAxObject *defFolder = session->querySubObject(
+                                "GetDefaultFolder(OlDefaultFolders)",
+                                "olFolderContacts" );
+        //...
+    }
+    
+ + +

Example: qutlook/centralwidget.cpp. + +


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


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxscript-h.html b/doc/html/qaxscript-h.html new file mode 100644 index 00000000..fcc15968 --- /dev/null +++ b/doc/html/qaxscript-h.html @@ -0,0 +1,261 @@ + + + + + +qaxscript.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qaxscript.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qaxscript.h   3.3.8   edited Jan 11 14:46 $
+**
+** Declaration of the TQAxScriptEngine, TQAxScript and TQAxScriptManager classes
+**
+** Copyright (C) 2002-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the Active TQt integration.
+**
+** Licensees holding valid TQt Enterprise Edition
+** licenses for Windows may use this file in accordance with the TQt Commercial
+** License Agreement provided with the Software.
+**
+** This file is not available for use under any other license without
+** express written permission from the copyright holder.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about TQt Commercial License Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef TQAXSCRIPT_H
+#define TQAXSCRIPT_H
+
+#include <qaxobject.h>
+
+class TQAxBase;
+class TQAxScript;
+class TQAxScriptSite;
+class TQAxScriptEngine;
+class TQAxScriptManager;
+class TQAxScriptManagerPrivate;
+struct IActiveScript;
+
+class TQAxScriptEngine : public TQAxObject
+{
+public:
+    enum State {
+	Uninitialized = 0,
+	Initialized = 5,
+	Started = 1,
+	Connected = 2,
+	Disconnected = 3,
+	Closed = 4
+    };
+
+    TQAxScriptEngine(const TQString &language, TQAxScript *script);
+    ~TQAxScriptEngine();
+
+    bool isValid() const;
+    bool hasIntrospection() const;
+
+    TQString scriptLanguage() const;
+
+    State state() const;
+    void setState(State st);
+
+    void addItem(const TQString &name);
+
+    long queryInterface( const TQUuid &, void** ) const;
+
+protected:
+    bool initialize(IUnknown** ptr);
+
+private:
+    TQAxScript *script_code;
+    IActiveScript *engine;
+
+    TQString script_language;
+};
+
+class TQAxScript : public TQObject
+{
+    Q_OBJECT
+
+public:
+    enum FunctionFlags {
+	FunctionNames = 0,
+	FunctionSignatures	
+    };
+
+    TQAxScript(const TQString &name, TQAxScriptManager *manager);
+    ~TQAxScript();
+
+    bool load(const TQString &code, const TQString &language = TQString::null);
+
+    TQStringList functions(FunctionFlags = FunctionNames) const;
+
+    TQString scriptCode() const;
+    TQString scriptName() const;
+    TQAxScriptEngine *scriptEngine() const;
+
+    TQVariant call(const TQString &function, const TQVariant &v1 = TQVariant(), 
+					   const TQVariant &v2 = TQVariant(),
+					   const TQVariant &v3 = TQVariant(),
+					   const TQVariant &v4 = TQVariant(),
+					   const TQVariant &v5 = TQVariant(),
+					   const TQVariant &v6 = TQVariant(),
+					   const TQVariant &v7 = TQVariant(),
+					   const TQVariant &v8 = TQVariant());
+    TQVariant call(const TQString &function, TQValueList<TQVariant> &arguments);
+
+signals:
+    void entered();
+    void finished();
+    void finished(const TQVariant &result);
+    void finished(int code, const TQString &source,const TQString &description, const TQString &help);
+    void stateChanged(int state);
+    void error(int code, const TQString &description, int sourcePosition, const TQString &sourceText);
+
+private:
+    friend class TQAxScriptSite;
+    friend class TQAxScriptEngine;
+
+    void updateObjects();
+    TQAxBase *findObject(const TQString &name);
+
+    TQString script_name;
+    TQString script_code;
+    TQAxScriptManager *script_manager;
+    TQAxScriptEngine *script_engine;
+    TQAxScriptSite *script_site;
+};
+
+class TQAxScriptManager : public TQObject
+{
+    Q_OBJECT
+
+public:
+    TQAxScriptManager( TQObject *parent = 0, const char *name = 0 );
+    ~TQAxScriptManager();
+
+    void addObject(TQAxBase *object);
+    void addObject(TQObject *object);
+
+    TQStringList functions(TQAxScript::FunctionFlags = TQAxScript::FunctionNames) const;
+    TQStringList scriptNames() const;
+    TQAxScript *script(const TQString &name) const;
+
+    TQAxScript* load(const TQString &code, const TQString &name, const TQString &language);
+    TQAxScript* load(const TQString &file, const TQString &name);
+
+    TQVariant call(const TQString &function, const TQVariant &v1 = TQVariant(), 
+					   const TQVariant &v2 = TQVariant(),
+					   const TQVariant &v3 = TQVariant(),
+					   const TQVariant &v4 = TQVariant(),
+					   const TQVariant &v5 = TQVariant(),
+					   const TQVariant &v6 = TQVariant(),
+					   const TQVariant &v7 = TQVariant(),
+					   const TQVariant &v8 = TQVariant());
+    TQVariant call(const TQString &function, TQValueList<TQVariant> &arguments);
+
+    static bool registerEngine(const TQString &name, const TQString &extension, const TQString &code = TQString());
+    static TQString scriptFileFilter();
+
+signals:
+    void error(TQAxScript *script, int code, const TQString &description, int sourcePosition, const TQString &sourceText);
+
+private slots:
+    void objectDestroyed(TQObject *o);
+    void scriptError(int code, const TQString &description, int sourcePosition, const TQString &sourceText);
+
+private:
+    friend class TQAxScript;
+    TQAxScriptManagerPrivate *d;
+
+    void updateScript(TQAxScript*);
+    TQAxScript *scriptForFunction(const TQString &function) const;
+};
+
+
+// TQAxScript inlines
+
+inline TQString TQAxScript::scriptCode() const
+{
+    return script_code;
+}
+
+inline TQString TQAxScript::scriptName() const
+{
+    return script_name;
+}
+
+inline TQAxScriptEngine *TQAxScript::scriptEngine() const
+{
+    return script_engine;
+}
+
+// TQAxScriptEngine inlines
+
+inline bool TQAxScriptEngine::isValid() const
+{
+    return engine != 0;
+}
+
+inline TQString TQAxScriptEngine::scriptLanguage() const
+{
+    return script_language;
+}
+
+// TQAxScriptManager inlines
+
+inline void TQAxScriptManager::addObject(TQObject *object)
+{
+    extern TQAxBase *qax_create_object_wrapper(TQObject*);
+    TQAxBase *wrapper = qax_create_object_wrapper(object);
+    addObject(wrapper);
+}
+
+#endif // TQAXSCRIPT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxscript-members.html b/doc/html/qaxscript-members.html new file mode 100644 index 00000000..ad4f0b2e --- /dev/null +++ b/doc/html/qaxscript-members.html @@ -0,0 +1,100 @@ + + + + + +TQAxScript Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAxScript

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxscript.html b/doc/html/qaxscript.html new file mode 100644 index 00000000..e098c5a9 --- /dev/null +++ b/doc/html/qaxscript.html @@ -0,0 +1,199 @@ + + + + + +TQAxScript Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAxScript Class Reference
[TQAxContainer module]

+ +

The TQAxScript class provides a wrapper around script code. +More... +

This class is part of the TQt ActiveTQt Extension. +

#include <qaxscript.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • enum FunctionFlags { FunctionNames = 0, FunctionSignatures }
  • +
  • TQAxScript ( const TQString & name, TQAxScriptManager * manager )
  • +
  • ~TQAxScript ()
  • +
  • bool load ( const TQString & code, const TQString & language = TQString::null )
  • +
  • TQStringList functions ( FunctionFlags flags = FunctionNames ) const
  • +
  • TQString scriptCode () const
  • +
  • TQString scriptName () const
  • +
  • TQAxScriptEngine * scriptEngine () const
  • +
  • TQVariant call ( const TQString & function, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) )
  • +
  • TQVariant call ( const TQString & function, TQValueList<TQVariant> & arguments )
  • +
+

Signals

+
    +
  • void entered ()
  • +
  • void finished ()
  • +
  • void finished ( const TQVariant & result )
  • +
  • void finished ( int code, const TQString & source, const TQString & description, const TQString & help )
  • +
  • void stateChanged ( int state )
  • +
  • void error ( int code, const TQString & description, int sourcePosition, const TQString & sourceText )
  • +
+

Detailed Description

+

This class is defined in the TQt ActiveTQt Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQAxScript class provides a wrapper around script code. + + +

Every instance of the TQAxScript class represents a piece of +scripting code in a particular scripting language. The code is +loaded into the script engine using load(). Functions declared +in the code can be called using call(). +

The script provides scriptEngine() provides feedback to the +application through signals. The most important signal is the +error() signal. Direct access to the TQAxScriptEngine is provided +through the scriptEngine() function. +

Warning: This class is not available with the bcc5.5 and MingW +compilers. + +


Member Type Documentation

+

TQAxScript::FunctionFlags

+ +

This FunctionFlags enum describes formatting for function introspection. +

    +
  • TQAxScript::FunctionNames - Only function names are returned. +
  • TQAxScript::FunctionSignatures - Returns the functions with signatures. +
+

Member Function Documentation

+

TQAxScript::TQAxScript ( const TQString & name, TQAxScriptManager * manager ) +

+Constructs a TQAxScript object called name and registers +it with the TQAxScriptManager manager. This is usually done by the +TQAxScriptManager class when loading a + script. +

A script should always have a name. A manager is necessary to allow +the script code to reference objects in the application. The manager +takes ownership of the object. + +

TQAxScript::~TQAxScript () +

+Destroys the object, releasing all allocated resources. + +

TQVariant TQAxScript::call ( const TQString & function, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) ) +

+Calls function, passing the parameters var1, var1, +var2, var3, var4, var5, var6, var7 and var8 +as arguments and returns the value returned by the function, or an +invalid TQVariant if the function does not return a value or when +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 ) +

+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. +

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

void TQAxScript::entered () [signal] +

+

This signal is emitted when a script engine has started executing code. + +

void TQAxScript::error ( int code, const TQString & description, int sourcePosition, const TQString & sourceText ) [signal] +

+ +

This signal is emitted when an execution error occured while +running a script. +

code, description, sourcePosition and sourceText +contain information about the execution error. + +

void TQAxScript::finished () [signal] +

+

This signal is emitted when a script engine has finished executing code. + +

void TQAxScript::finished ( const TQVariant & result ) [signal] +

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

result contains the script's result. This will be an invalid +TQVariant if the script has no return value. + +

void TQAxScript::finished ( int code, const TQString & source, const TQString & description, const TQString & help ) [signal] +

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

code, source, description and help contain exception information +when the script terminated. + +

TQStringList TQAxScript::functions ( FunctionFlags flags = FunctionNames ) const +

+Returns a list of all the functions in this script if the respective +script engine supports introspection; otherwise returns an empty list. +The functions are either provided with full prototypes or only as +names, depending on the value of flags. +

See also TQAxScriptEngine::hasIntrospection(). + +

bool TQAxScript::load ( const TQString & code, const TQString & language = TQString::null ) +

+Loads the script source code written in language language +into the script engine. Returns TRUE if code was successfully +entered into the script engine; otherwise returns FALSE. +

If language is empty (the default) it will be determined +heuristically. If code contains the string End Sub it will +be interpreted as VBScript, otherwise as JScript. Additional +scripting languages can be registered using +TQAxScript::registerEngine(). +

This function can only be called once for each TQAxScript object, +which is done automatically when using TQAxScriptManager::load(). + +

TQString TQAxScript::scriptCode () const +

+Returns the script's code, or the null-string if no +code has been loaded yet. +

See also load(). + +

TQAxScriptEngine * TQAxScript::scriptEngine () const +

+Returns a pointer to the script engine. +

You can use the object returned to connect signals to the +script functions, or to access the script engine directly. + +

TQString TQAxScript::scriptName () const +

+Returns the name of the script. + +

void TQAxScript::stateChanged ( int state ) [signal] +

+

This signal is emitted when a script engine changes state. +state can be any value in the TQAxScriptEngineState enumeration. + + +


+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/qaxscriptengine-members.html b/doc/html/qaxscriptengine-members.html new file mode 100644 index 00000000..ba147186 --- /dev/null +++ b/doc/html/qaxscriptengine-members.html @@ -0,0 +1,119 @@ + + + + + +TQAxScriptEngine Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAxScriptEngine

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxscriptengine.html b/doc/html/qaxscriptengine.html new file mode 100644 index 00000000..93478a2f --- /dev/null +++ b/doc/html/qaxscriptengine.html @@ -0,0 +1,146 @@ + + + + + +TQAxScriptEngine Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAxScriptEngine Class Reference
[TQAxContainer module]

+ +

The TQAxScriptEngine class provides a wrapper around a script engine. +More... +

This class is part of the TQt ActiveTQt Extension. +

#include <qaxscript.h> +

Inherits TQAxObject. +

List of all member functions. +

Public Members

+ +

Detailed Description

+

This class is defined in the TQt ActiveTQt Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQAxScriptEngine class provides a wrapper around a script engine. + + +

Every instance of the TQAxScriptEngine class represents an interpreter +for script code in a particular scripting language. The class is usually +not used directly. The TQAxScript and TQAxScriptManager classes provide +convenient functions to handle and call script code. +

Direct access to the script engine is provided through +queryInterface(). +

Warning: This class is not available with the bcc5.5 and MingW +compilers. + +


Member Type Documentation

+

TQAxScriptEngine::State

+ +

The State enumeration defines the different states a script +engine can be in. +

    +
  • TQAxScriptEngine::Uninitialized - The script has been created, but not yet initialized +
  • TQAxScriptEngine::Initialized - The script has been initialized, but is not running +
  • TQAxScriptEngine::Started - The script can execute code, but does not yet handle events +
  • TQAxScriptEngine::Connected - The script can execute code and is connected so +that it can handle events +
  • TQAxScriptEngine::Disconnected - The script is loaded, but is not connected to +event sources +
  • TQAxScriptEngine::Closed - The script has been closed. +
+

Member Function Documentation

+

TQAxScriptEngine::TQAxScriptEngine ( const TQString & language, TQAxScript * script ) +

+Constructs a TQAxScriptEngine object interpreting script code in language +provided by the code in script. This is usually done by the TQAxScript +class when loading a script. +

Instances of TQAxScriptEngine should always have both a language and a +script. + +

TQAxScriptEngine::~TQAxScriptEngine () +

+Destroys the TQAxScriptEngine object, releasing all allocated +resources. + +

void TQAxScriptEngine::addItem ( const TQString & name ) +

+Registers an item with the script engine. Script code can +refer to this item using name. + +

bool TQAxScriptEngine::hasIntrospection () const +

+Returns TRUE if the script engine supports introspection; +otherwise returns FALSE. + +

bool TQAxScriptEngine::isValid () const +

+ +

Returns TRUE if the script engine has been initialized +correctly; otherwise returns FALSE. + +

long TQAxScriptEngine::queryInterface ( const TQUuid & uuid, void ** iface ) const +

+Requests the interface uuid from the script engine object and +sets the value of iface to the provided interface, or to 0 if +the requested interface could not be provided. +

Returns the result of the QueryInterface implementation of the COM +object. + +

TQString TQAxScriptEngine::scriptLanguage () const +

+Returns the scripting language, for example "VBScript", +or "JScript". + +

void TQAxScriptEngine::setState ( State st ) +

+Sets the state of the script engine to st. +Calling this function is usually not necessary. + +

State TQAxScriptEngine::state () const +

+Returns the state of the script engine. + + +

+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/qaxscriptmanager-members.html b/doc/html/qaxscriptmanager-members.html new file mode 100644 index 00000000..3fb5d52e --- /dev/null +++ b/doc/html/qaxscriptmanager-members.html @@ -0,0 +1,99 @@ + + + + + +TQAxScriptManager Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAxScriptManager

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxscriptmanager.html b/doc/html/qaxscriptmanager.html new file mode 100644 index 00000000..02894175 --- /dev/null +++ b/doc/html/qaxscriptmanager.html @@ -0,0 +1,230 @@ + + + + + +TQAxScriptManager Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAxScriptManager Class Reference
[TQAxContainer module]

+ +

The TQAxScriptManager class provides a bridge between application objects +and script code. +More... +

This class is part of the TQt ActiveTQt Extension. +

#include <qaxscript.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • TQAxScriptManager ( TQObject * parent = 0, const char * name = 0 )
  • +
  • ~TQAxScriptManager ()
  • +
  • void addObject ( TQAxBase * object )
  • +
  • void addObject ( TQObject * object )
  • +
  • TQStringList functions ( TQAxScript::FunctionFlags flags = TQAxScript::FunctionNames ) const
  • +
  • TQStringList scriptNames () const
  • +
  • TQAxScript * script ( const TQString & name ) const
  • +
  • TQAxScript * load ( const TQString & code, const TQString & name, const TQString & language )
  • +
  • TQAxScript * load ( const TQString & file, const TQString & name )
  • +
  • TQVariant call ( const TQString & function, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) )
  • +
  • TQVariant call ( const TQString & function, TQValueList<TQVariant> & arguments )
  • +
+

Signals

+
    +
  • void error ( TQAxScript * script, int code, const TQString & description, int sourcePosition, const TQString & sourceText )
  • +
+

Static Public Members

+
    +
  • bool registerEngine ( const TQString & name, const TQString & extension, const TQString & code = TQString ( ) )
  • +
  • TQString scriptFileFilter ()
  • +
+

Detailed Description

+

This class is defined in the TQt ActiveTQt Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQAxScriptManager class provides a bridge between application objects +and script code. + + +

The TQAxScriptManager acts as a bridge between the COM objects embedded +in the TQt application through TQAxObject or TQAxWidget, and the scripting +languages available through the Windows Script technologies, usually JScript +and VBScript. +

Create one TQAxScriptManager for each separate document in your +application, and add the COM objects the scripts need to access +using addObject(). Then load() the script sources and invoke the +functions using call(). +

Warning: This class is not available with the bcc5.5 and MingW +compilers. + +


Member Function Documentation

+

TQAxScriptManager::TQAxScriptManager ( TQObject * parent = 0, const char * name = 0 ) +

+Creates a TQAxScriptManager object. parent and name are passed +on to the TQObject constructor. +

It is usual to create one TQAxScriptManager for each document in an +application. + +

TQAxScriptManager::~TQAxScriptManager () +

+Destroys the objects, releasing all allocated resources. + +

void TQAxScriptManager::addObject ( TQAxBase * object ) +

+Adds object to the manager. Scripts handled by this +manager can access the object in the code using the object's name property. +

You must add all the necessary objects before loading any scripts. + +

void TQAxScriptManager::addObject ( TQObject * object ) +

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

Adds a generic COM wrapper for object to the manager. object +must be exposed as a COM object using the functionality provided +by the TQAxServer module.. Applications +using this function you must link against the qaxserver library. + +

TQVariant TQAxScriptManager::call ( const TQString & function, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) ) +

+Calls function, passing the parameters var1, var1, +var2, var3, var4, var5, var6, var7 and var8 +as arguments and returns the value returned by the function, or an +invalid TQVariant if the function does not return a value or when +the function call failed. The call returns when the script's +execution has finished. +

In most script engines the only supported parameter type is "const +TQVariant&", for example, to call a JavaScript function +

+    function setNumber(number)
+    {
+        n = number;
+    }
+    
+ +use +
+    TQValueList args;
+    args << 5;
+    script->call("setNumber(const TQVariant&)", args);
+    
+ +As with dynamicCall the +parameters can directly be embedded in the function string. +
+    script->call("setNumber(5)");
+    
+ +However, this is slower. +

Functions provided by script engines that don't support +introspection are not available and must be called directly +using TQAxScript::call() on the respective script object. +

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 ) +

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. + +

void TQAxScriptManager::error ( TQAxScript * script, int code, const TQString & description, int sourcePosition, const TQString & sourceText ) [signal] +

+ +

This signal is emitted when an execution error occured while +running script. +

code, description, sourcePosition and sourceText +contain information about the execution error. + +

TQStringList TQAxScriptManager::functions ( TQAxScript::FunctionFlags flags = TQAxScript::FunctionNames ) const +

+Returns a list with all the functions that are available. +Functions provided by script engines that don't support +introspection are not included in the list. +The functions are either provided with full prototypes or +only as names, depending on the value of flags. + +

TQAxScript * TQAxScriptManager::load ( const TQString & code, const TQString & name, const TQString & language ) +

+Loads the script source code using the script engine for language. The script can later be referred to using its name +which should not be empty. +

The function returns a pointer to the script for the given +code if the code was loaded successfully; otherwise it +returns 0. +

If language is empty it will be determined heuristically. If code contains the string "End Sub" it will be interpreted as +VBScript, otherwise as JScript. Additional script engines can be +registered using registerEngine(). +

You must add all the objects necessary (using addObject()) before loading any scripts. If code declares a function that is +already available (no matter in which language) the first function +is overloaded and can no longer be called via call(); but it will +still be available by calling its script +directly. +

See also addObject(), scriptNames(), and functions(). + +

TQAxScript * TQAxScriptManager::load ( const TQString & file, const TQString & name ) +

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

Loads the source code from the file. The script can later be +referred to using its name which should not be empty. +

The function returns a pointer to the script engine for the code +in file if file was loaded successfully; otherwise it +returns 0. +

The script engine used is determined from the file's extension. By +default ".js" files are interpreted as JScript files, and ".vbs" +and ".dsm" files are interpreted as VBScript. Additional script +engines can be registered using registerEngine(). + +

bool TQAxScriptManager::registerEngine ( const TQString & name, const TQString & extension, const TQString & code = TQString ( ) ) [static] +

+Registers the script engine called name and returns TRUE if the +engine was found; otherwise does nothing and returns FALSE. +

The script engine will be used when loading files with the given +extension, or when loading source code that contains the string +code. + +

TQAxScript * TQAxScriptManager::script ( const TQString & name ) const +

+Returns the script called name. +

You can use the returned pointer to call functions directly +through TQAxScript::call(), to access the script engine directly, or +to delete and thus unload the script. + +

TQString TQAxScriptManager::scriptFileFilter () [static] +

+Returns a file filter listing all the supported script languages. +This filter string is convenient for use with TQFileDialog. + +

TQStringList TQAxScriptManager::scriptNames () const +

+Returns a list with the names of all the scripts. + + +

+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/qaxserver-demo-hierarchy.html b/doc/html/qaxserver-demo-hierarchy.html new file mode 100644 index 00000000..9ac1865a --- /dev/null +++ b/doc/html/qaxserver-demo-hierarchy.html @@ -0,0 +1,82 @@ + + + + + +TQt Widget Hierarchy + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Widget Hierarchy

+ + +

+ + +

+This widget can have many children!
+ +[Object not available! Did you forget to build and register the server?] +
+

+ + + + +
+ + +
+ + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-demo-menus.html b/doc/html/qaxserver-demo-menus.html new file mode 100644 index 00000000..ca1b9460 --- /dev/null +++ b/doc/html/qaxserver-demo-menus.html @@ -0,0 +1,50 @@ + + + + + +Menubar merging + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Menubar merging

+ + +

This documentation is under development and is subject to change. +

This example is not full functional at the moment. +

+ +[Object not available! Did you forget to build and register the server?] + + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-demo-multiple.html b/doc/html/qaxserver-demo-multiple.html new file mode 100644 index 00000000..de91e923 --- /dev/null +++ b/doc/html/qaxserver-demo-multiple.html @@ -0,0 +1,79 @@ + + + + + +Two simple TQt widgets + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Two simple TQt widgets

+ + +

+ + +

+This is one TQWidget subclass:
+ +[Object not available! Did you forget to build and register the server?] +
+

+Fill Color: + + + +
+ +

+This is another TQWidget subclass:
+ +[Object not available! Did you forget to build and register the server?] +
+

+Line width: + +
+ + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-demo-opengl.html b/doc/html/qaxserver-demo-opengl.html new file mode 100644 index 00000000..bf74be99 --- /dev/null +++ b/doc/html/qaxserver-demo-opengl.html @@ -0,0 +1,68 @@ + + + + + +OpenGL in an HTML page + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

OpenGL in an HTML page

+ + +

+ + +

+An OpenGL scene:
+ +[Object not available! Did you forget to build and register the server?] +
+ +

+Rotate the scene:
+X:
+Y:
+Z:
+ +
+ + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-demo-simple.html b/doc/html/qaxserver-demo-simple.html new file mode 100644 index 00000000..58e77ff9 --- /dev/null +++ b/doc/html/qaxserver-demo-simple.html @@ -0,0 +1,80 @@ + + + + + +A standard ActiveX and the "simple" ActiveTQt widget. + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A standard ActiveX and the "simple" ActiveTQt widget.

+ + +

+ + + +[Object not available! Did you forget to build and register the server?] + + +

+ +
+ + +[Standard Calendar control not available!] + + + +
+ +
+ + + + + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-demo-tetrax.html b/doc/html/qaxserver-demo-tetrax.html new file mode 100644 index 00000000..0e4363ea --- /dev/null +++ b/doc/html/qaxserver-demo-tetrax.html @@ -0,0 +1,62 @@ + + + + + +Play Tetrix! + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Play Tetrix!

+ + +

+ + +[Object not available! Did you forget to build and register the server?] + + +

+ +
+ + + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-demo-wrapper.html b/doc/html/qaxserver-demo-wrapper.html new file mode 100644 index 00000000..e001464e --- /dev/null +++ b/doc/html/qaxserver-demo-wrapper.html @@ -0,0 +1,92 @@ + + + + + +Standard TQt widgets in an HTML page + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Standard TQt widgets in an HTML page

+ + +

+ +

+A TQPushButton:
+ + +[Object not available! Did you forget to build and register the server?] +
+ +

+A TQCheckBox:
+ + +[Object not available! Did you forget to build and register the server?] +
+ +

+A TQToolButton:
+ +[Object not available! Did you forget to build and register the server?] +
+ +

+A TQRadioButton:
+ + +[Object not available! Did you forget to build and register the server?] +
+ + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-example-hierarchy.html b/doc/html/qaxserver-example-hierarchy.html new file mode 100644 index 00000000..3179e127 --- /dev/null +++ b/doc/html/qaxserver-example-hierarchy.html @@ -0,0 +1,262 @@ + + + + + +TQt Widget Hierarchy (in-process) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Widget Hierarchy (in-process)

+ + + +The ActiveX control in this example is a TQWidget +subclass with child widgets that are accessible as sub types. +

+ +

    class TQParentWidget : public TQWidget
+    {
+        Q_OBJECT
+    public:
+        TQParentWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+
+        TQSize sizeHint() const;
+
+    public slots:
+        void createSubWidget( const TQString &name );
+
+        TQSubWidget *subWidget( const TQString &name );
+
+    private:
+        TQVBoxLayout *vbox;
+    };
+
The TQParentWidget class provides slots to create a widget +with a name, and to return a pointer to a named widget. +

+ +

    TQParentWidget::TQParentWidget( TQWidget *parent, const char *name, WFlags f )
+    : TQWidget( parent, name, f )
+    {
+        vbox = new TQVBoxLayout( this );
+        vbox->setAutoAdd( TRUE );
+    }
+
The constructor of TQParentWidget creates a vertical box layout. +New child widgets are automatically added to the layout. +

    void TQParentWidget::createSubWidget( const TQString &name )
+    {
+        TQSubWidget *sw = new TQSubWidget( this, name );
+        sw->setLabel( name );
+        sw->show();
+    }
+
The createSubWidget slot creates a new TQSubWidget with +the name provided in the parameter, and sets the label to that +name. The widget is also shown explicitly. +

    TQSubWidget *TQParentWidget::subWidget( const TQString &name )
+    {
+        return (TQSubWidget*)child( name, "TQSubWidget" );
+    }
+
The subWidget slot uses the TQObject::child() function and +returns the first child of type TQSubWidget that has the requested +name. +

+ +

    class TQSubWidget : public TQWidget
+    {
+        Q_OBJECT
+        Q_PROPERTY( TQString label READ label WRITE setLabel )
+    public:
+        TQSubWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+
+        void setLabel( const TQString &text );
+        TQString label() const;
+
+        TQSize sizeHint() const;
+
+    protected:
+        void paintEvent( TQPaintEvent *e );
+
+    private:
+        TQString lbl;
+    };
+
The TQSubWidget class has a single string-property label, +and implements the paintEvent to draw the label. +

+ +

    TQSubWidget::TQSubWidget( TQWidget *parent, const char *name, WFlags f )
+    : TQWidget( parent, name, f )
+    {
+    }
+
+    void TQSubWidget::setLabel( const TQString &text )
+    {
+        lbl = text;
+        setName( text );
+        update();
+    }
+
+    TQString TQSubWidget::label() const
+    {
+        return lbl;
+    }
+
+    TQSize TQSubWidget::sizeHint() const
+    {
+        TQFontMetrics fm( font() );
+        return TQSize( fm.width(lbl), fm.height() );
+    }
+
+    void TQSubWidget::paintEvent( TQPaintEvent * )
+    {
+        TQPainter painter(this);
+        painter.setPen( colorGroup().text() );
+        painter.drawText( rect(), AlignCenter, lbl );
+    }
+
The implementation of the TQSubWidget class is self-explanatory. +

+ +

    class ActiveTQtFactory : public TQAxFactory
+    {
+    public:
+        ActiveTQtFactory( const TQUuid &lib, const TQUuid &app )
+            : TQAxFactory( lib, app )
+        {}
+        TQStringList featureList() const
+        {
+            TQStringList list;
+            list << "TQParentWidget";
+            list << "TQSubWidget";
+            return list;
+        }
+
The ActiveTQtFactory class implements a TQAxFactory. It returns +the class names of all supported types, TQParentWidget and +TQSubWidget, from the featureList() reimplementation. +

        TQWidget *create( const TQString &key, TQWidget *parent, const char *name )
+        {
+            if ( key == "TQParentWidget" )
+                return new TQParentWidget( parent, name );
+
+            return 0;
+        }
+
The factory can however only create objects of the TQParentWidget +type directly - objects of subtypes can only be created through the +interface of TQParentWidget objects. +

        TQUuid classID( const TQString &key ) const
+        {
+            if ( key == "TQParentWidget" )
+                return TQUuid( "{d574a747-8016-46db-a07c-b2b4854ee75c}" );
+            if ( key == "TQSubWidget" )
+                return TQUuid( "{850652f4-8f71-4f69-b745-bce241ccdc30}" );
+
+            return TQUuid();
+        }
+        TQUuid interfaceID( const TQString &key ) const
+        {
+            if ( key == "TQParentWidget" )
+                return TQUuid( "{4a30719d-d9c2-4659-9d16-67378209f822}" );
+            if ( key == "TQSubWidget" )
+                return TQUuid( "{2d76cc2f-3488-417a-83d6-debff88b3c3f}" );
+
+            return TQUuid();
+        }
+        TQUuid eventsID( const TQString &key ) const
+        {
+            if ( key == "TQParentWidget" )
+                return TQUuid( "{aac9f855-c3dc-4cae-b747-c77f4d509f4c}" );
+            if ( key == "TQSubWidget" )
+                return TQUuid( "{25fac47e-c723-4696-8c74-6185903bdf65}" );
+
+            return TQUuid();
+        }
+
COM however retquires the IDs for the interfaces of the sub types as +well to be able to marshal calls correctly. +

        TQString exposeToSuperClass( const TQString &key ) const
+        {
+            if ( key == "TQSubWidget" )
+                return key;
+            return TQAxFactory::exposeToSuperClass(key);
+        }
+    };
+
Objects of the TQSubWidget type should not expose the full +functionality of e.g. TQWidget. Only those properties and slots +explicitly declared in the type are accessible. +

    TQAXFACTORY_EXPORT( ActiveTQtFactory, "{9e626211-be62-4d18-9483-9419358fbb03}", "{75c276de-1df5-451f-a004-e4fa1a587df1}" )
+
The factory is then exported using the TQAXFACTORY_EXPORT +macro. +

To build the example you must first build the TQAxServer library. Then run qmake and your make tool in +examples/multiple. +


+

The demonstration retquires your +WebBrowser to support ActiveX controls, and scripting to be enabled. +

+ +

    <script language=javascript>
+    function createSubWidget( form )
+    {
+        ParentWidget.createSubWidget( form.nameEdit.value );
+    }
+
+    function renameSubWidget( form )
+    {
+        var SubWidget = ParentWidget.subWidget( form.nameEdit.value );
+        if ( !SubWidget ) {
+            alert( "No such widget " + form.nameEdit.value + "!" );
+            return;
+        }
+        SubWidget.label = form.labelEdit.value;
+        form.nameEdit.value = SubWidget.label;
+    }
+
+    function setFont( form )
+    {
+        ParentWidget.font = form.fontEdit.value;
+    }
+    </script>
+
+    <p>
+    This widget can have many children!<br>
+    <object ID="ParentWidget" CLASSID="CLSID:d574a747-8016-46db-a07c-b2b4854ee75c"
+    CODEBASE=http://www.trolltech.com/demos/hierarchy.cab>
+    [Object not available! Did you forget to build and register the server?]
+    </object><br>
+    <form>
+    <input type="edit" ID="nameEdit" value = "<enter object name>">
+    <input type="button" value = "Create" onClick="createSubWidget(this.form)">
+    <input type="edit" ID="labelEdit">
+    <input type="button" value = "Rename" onClick="renameSubWidget(this.form)">
+    <br>
+    <input type="edit" ID="fontEdit" value = "MS Sans Serif">
+    <input type="button" value = "Set Font" onClick="setFont(this.form)">
+    </form>
+

See also The TQAxServer Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-example-menus.html b/doc/html/qaxserver-example-menus.html new file mode 100644 index 00000000..c111baf3 --- /dev/null +++ b/doc/html/qaxserver-example-menus.html @@ -0,0 +1,59 @@ + + + + + +Menubar merging + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Menubar merging

+ + + +

This documentation is under development and is subject to change. +

This example demonstrates the use of TQMenuBar and TQStatusBar in +a TQMainWindow to implement an in-place active control. +

To build the example you must first build the TQAxServer library. Then run qmake and your make tool in +examples/menus. +


+

The demonstration retquires your +WebBrowser to support ActiveX controls, and scripting to be enabled. +

+ +

    <object ID="TQMenus" CLASSID="CLSID:4dc3f340-a6f7-44e4-a79b-3e9217695fbd"
+    CODEBASE=http://www.trolltech.com/demos/menusax.cab>
+    [Object not available! Did you forget to build and register the server?]
+    </object>
+

See also The TQAxServer Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-example-multiple.html b/doc/html/qaxserver-example-multiple.html new file mode 100644 index 00000000..457342dd --- /dev/null +++ b/doc/html/qaxserver-example-multiple.html @@ -0,0 +1,201 @@ + + + + + +Two simple TQt widgets (in-process) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Two simple TQt widgets (in-process)

+ + + +The ActiveX controls in this example are simple TQWidget +subclasses reimplementing the paintEvent() method. The classes use +the Q_CLASSINFO macro to +

The example demonstrates the use of the Q_CLASSINFO macro to set +ActiveTQt-specific attributes for TQObject sub classes, and the use of +the TQAXFACTORY_BEGIN, TQAXCLASS and TQAXFACTORY_END macros. +

+ +

    class TQAxWidget1 : public TQWidget
+    {
+        Q_OBJECT
+        Q_CLASSINFO("ClassID", "{1D9928BD-4453-4bdd-903D-E525ED17FDE5}")
+        Q_CLASSINFO("InterfaceID", "{99F6860E-2C5A-42ec-87F2-43396F4BE389}")
+        Q_CLASSINFO("EventsID", "{0A3E9F27-E4F1-45bb-9E47-63099BCCD0E3}")
+
The class declaration includes the Q_OBJECT macro to activate TQt's meta object system, and sets COM identifiers for the class using the +Q_CLASSINFO macro. +
        Q_PROPERTY( TQColor fillColor READ fillColor WRITE setFillColor )
+    public:
+        TQAxWidget1( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 )
+            : TQWidget( parent, name, f ), fill_color( red )
+        {
+        }
+
+        TQColor fillColor() const
+        {
+            return fill_color;
+        }
+        void setFillColor( const TQColor &fc )
+        {
+            fill_color = fc;
+            repaint();
+        }
+
+    protected:
+        void paintEvent( TQPaintEvent *e )
+        {
+            TQPainter paint( this );
+            TQRect r = rect();
+            r.addCoords( 10, 10, -10, -10 );
+            paint.fillRect( r, fill_color );
+        }
+
+    private:
+        TQColor fill_color;
+    };
+
The control draws a filled rectangle. The fill color is exposed as a +property using the Q_PROPERTY macro. +

+ +

    class TQAxWidget2 : public TQWidget
+    {
+        Q_OBJECT
+        Q_CLASSINFO("ClassID", "{58139D56-6BE9-4b17-937D-1B1EDEDD5B71}")
+        Q_CLASSINFO("InterfaceID", "{B66280AB-08CC-4dcc-924F-58E6D7975B7D}")
+        Q_CLASSINFO("EventsID", "{D72BACBA-03C4-4480-B4BB-DE4FE3AA14A0}")
+        Q_CLASSINFO("ToSuperClass", "TQAxWidget2")
+        Q_CLASSINFO("StockEvents", "yes")
+
The declaration of the second control class uses the Q_CLASSINFO macro +to set the COM identifiers as well as additional COM attributes for the +class. Objects of that class will not expose the TQWidget API, and provide +the ActiveX stock events (ie. Click, KeyDown etc.). +
        Q_PROPERTY( int lineWidth READ lineWidth WRITE setLineWidth )
+    public:
+        TQAxWidget2( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 )
+            : TQWidget( parent, name, f ), line_width( 1 )
+        {
+        }
+
+        int lineWidth() const
+        {
+            return line_width;
+        }
+        void setLineWidth( int lw )
+        {
+            line_width = lw;
+            repaint();
+        }
+
+    protected:
+        void paintEvent( TQPaintEvent *e )
+        {
+            TQPainter paint( this );
+            TQPen pen = paint.pen();
+            pen.setWidth( line_width );
+            paint.setPen( pen );
+
+            TQRect r = rect();
+            r.addCoords( 10, 10, -10, -10 );
+            paint.drawEllipse( r );
+        }
+
+    private:
+        int line_width;
+    };
+
The control draws a circle. The line width is exposed as a property +using the Q_PROPERTY macro. +

The controls are exposed by the implementation of TQAxFactory as provided +by the TQAXFACTORY_BEGIN and TQAXFACTORY_END macros. + + +

    #include <qaxfactory.h>
+
+    #include "ax1.h"
+    #include "ax2.h"
+
+    TQAXFACTORY_BEGIN("{98DE28B6-6CD3-4e08-B9FA-3D1DB43F1D2F}", "{05828915-AD1C-47ab-AB96-D6AD1E25F0E2}")
+
The factory is initialied using the TQAXFACTORY_BEGIN macro, providing +the IDs for the application and the type library. +
        TQAXCLASS(TQAxWidget1)
+        TQAXCLASS(TQAxWidget2)
+
The classes exposed are listed using the TQAXCLASS macro. +
    TQAXFACTORY_END()
+
Finally the factory declaration is closed using the TQAXFACTORY_END +macro. +

To build the example you must first build the TQAxServer library. Then run qmake and your make tool in +examples/multiple. +


+

The demonstration retquires your +WebBrowser to support ActiveX controls, and scripting to be enabled. +

+ +

    <script language=javascript>
+    function setColor( form )
+    {
+        Ax1.fillColor = form.colorEdit.value;
+    }
+
+    function setWidth( form )
+    {
+        Ax2.lineWidth = form.widthEdit.value;
+    }
+    </script>
+
+    <p>
+    This is one TQWidget subclass:<br>
+    <object ID="Ax1" CLASSID="CLSID:1D9928BD-4453-4bdd-903D-E525ED17FDE5"
+    CODEBASE=http://www.trolltech.com/demos/multipleax.cab>
+    [Object not available! Did you forget to build and register the server?]
+    </object><br>
+    <form>
+    Fill Color: <input type="edit" ID="colorEdit" value = "red">
+    <input type="button" value = "Set" onClick="setColor(this.form)">
+    <input type="button" value = "Hide" onClick="Ax1.hide()">
+    <input type="button" value = "Show" onClick="Ax1.show()">
+    </form>
+
+    <p>
+    This is another TQWidget subclass:<br>
+    <object ID="Ax2" CLASSID="CLSID:58139D56-6BE9-4b17-937D-1B1EDEDD5B71"
+    CODEBASE=http://www.trolltech.com/demos/multipleax.cab>
+    [Object not available! Did you forget to build and register the server?]
+    </object><br>
+    <form>
+    Line width: <input type="edit" ID="widthEdit" value = "1">
+    <input type="button" value = "Set" onClick="setWidth(this.form)">
+    </form>
+

See also The TQAxServer Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-example-opengl.html b/doc/html/qaxserver-example-opengl.html new file mode 100644 index 00000000..52f73083 --- /dev/null +++ b/doc/html/qaxserver-example-opengl.html @@ -0,0 +1,206 @@ + + + + + +TQt' OpenGL widgets as an ActiveX (executable) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt' OpenGL widgets as an ActiveX (executable)

+ + + +The ActiveX control in this example uses the TQGlWidget class in +TQt to render an OpenGL scene in an ActiveX. The control exposes a few +methods to change the scene. The example is based on the +"box" example from the standard +TQt distribution. +

The example demonstrates the use of the default factory and +TQAxFactory::isServer(), and the implementation of an additional COM +interface using TQAxBindable and TQAxAggregated. The server executable +can run both as an ActiveX server and as a stand alone application. +

+ +The application uses the default factory as provided by the +TQAXFACTORY_DEFAULT macro to expose the GLBox widget as an ActiveX +control. +

    #include <qaxfactory.h>
+
+    TQAXFACTORY_DEFAULT( GLBox,
+                        "{5fd9c22e-ed45-43fa-ba13-1530bb6b03e0}",
+                        "{33b051af-bb25-47cf-a390-5cfd2987d26a}",
+                        "{8c996c29-eafa-46ac-a6f9-901951e765b5}",
+                        "{2c3c183a-eeda-41a4-896e-3d9c12c3577d}",
+                        "{83e16271-6480-45d5-aaf1-3f40b7661ae4}"
+                      )
+
The implementation of main initializes the TQApplication object, +and uses TQAxFactory::isServer() to determine whether or not it is +appropriate to create and show the application interface. +
    /*
+      The main program is here.
+    */
+
+    int main( int argc, char **argv )
+    {
+        TQApplication::setColorSpec( TQApplication::CustomColor );
+        TQApplication a(argc,argv);
+
+        if ( !TQGLFormat::hasOpenGL() ) {
+            qWarning( "This system has no OpenGL support. Exiting." );
+            return -1;
+        }
+
+        if ( !TQAxFactory::isServer() ) {
+            GLObjectWindow w;
+            w.resize( 400, 350 );
+            a.setMainWidget( &w );
+            w.show();
+            return a.exec();
+        }
+        return a.exec();
+    }
+
+

+ +The GLBox class inherits from both the TQGLWidget class to be able +to render OpenGL, and from TQAxBindable. +

    #include <qaxbindable.h>
+
+    class GLBox : public TQGLWidget,
+                  public TQAxBindable
+    {
+        Q_OBJECT
+
The class reimplements the TQAxBindable::createAggregate() function from TQAxBindable +to return the pointer to a TQAxAggregated object. +
    public:
+
+        GLBox( TQWidget* parent, const char* name );
+        ~GLBox();
+
+        TQAxAggregated *createAggregate();
+
+    public slots:
+
+        void                setXRotation( int degrees );
+
The rest of the class declaration and the implementation of the OpenGL +rendering is identical to the original "box" example. +

+ +The implementation file of the GLBox class includes the objsafe.h +system header, in which the IObjectSafety COM interface is defined. +

    #include <objsafe.h>
+
A class ObjectSafetyImpl is declared using multiple inheritance +to subclass the TQAxAggregated class, and to implement the IObjectSafety +interface. +
    class ObjectSafetyImpl : public TQAxAggregated,
+                             public IObjectSafety
+    {
+    public:
+
The class declares a default constructor, and implements the queryInterface +function to support the IObjectSafety interface. +
        ObjectSafetyImpl() {}
+
+        long queryInterface( const TQUuid &iid, void **iface )
+        {
+            *iface = 0;
+            if ( iid == IID_IObjectSafety )
+                *iface = (IObjectSafety*)this;
+            else
+                return E_NOINTERFACE;
+
+            AddRef();
+            return S_OK;
+        }
+
Since every COM interface inherits IUnknown the TQAXAGG_IUNKNOWN macro +is used to provide the default implementation of the IUnknown interface. +The macro is defined to delegate all calls to QueryInterface, AddRef +and Release to the interface returned by the controllingUnknown() function. +
        TQAXAGG_IUNKNOWN;
+
The implementation of the IObjectSafety interface provides the caller +with information about supported and enabled safety options, and returns +S_OK for all calls to indicate that the ActiveX control is safe. +
        HRESULT WINAPI GetInterfaceSafetyOptions( REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions )
+        {
+            *pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACESAFE_FOR_UNTRUSTED_CALLER;
+            *pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACESAFE_FOR_UNTRUSTED_CALLER;
+            return S_OK;
+        }
+        HRESULT WINAPI SetInterfaceSafetyOptions( REFIID riid, DWORD pdwSupportedOptions, DWORD pdwEnabledOptions )
+        {
+            return S_OK;
+        }
+    };
+
The implementation of the createAggregate() function just returns a new +ObjectSafetyImpl object. +
    TQAxAggregated *GLBox::createAggregate()
+    {
+        return new ObjectSafetyImpl();
+    }
+
+

To build the example you must first build the TQAxServer library. Then run qmake and your make tool in +examples/wrapper. +


+

The demonstration retquires your +WebBrowser to support ActiveX controls, and scripting to be enabled. +

In contrast to the other TQAxServer examples Internet Explorer will not +open a dialog box to ask the user whether or not the scripting of the GLBox +control should be allowed (the exact browser behaviour depends on the security +settings in the Internet Options dialog). +

+ +

    <SCRIPT LANGUAGE=JavaScript>
+    function setRot( form )
+    {
+        GLBox.setXRotation( form.XEdit.value );
+        GLBox.setYRotation( form.YEdit.value );
+        GLBox.setZRotation( form.ZEdit.value );
+    }
+    </SCRIPT>
+
+    <p>
+    An OpenGL scene:<br>
+    <object ID="GLBox" CLASSID="CLSID:5fd9c22e-ed45-43fa-ba13-1530bb6b03e0"
+    CODEBASE=http://www.trolltech.com/demos/openglax.cab>
+    [Object not available! Did you forget to build and register the server?]
+    </object><br>
+
+    <form>
+    Rotate the scene:<br>
+    X:<input type="edit" ID="XEdit" value="0"><br>
+    Y:<input type="edit" name="YEdit" value="0"><br>
+    Z:<input type="edit" name="ZEdit" value="0"><br>
+    <input type="button" value="Set" onClick="setRot(this.form)">
+    </form>
+

See also The TQAxServer Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-example-simple.html b/doc/html/qaxserver-example-simple.html new file mode 100644 index 00000000..4cc86423 --- /dev/null +++ b/doc/html/qaxserver-example-simple.html @@ -0,0 +1,182 @@ + + + + + +A simple ActiveTQt control (executable) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A simple ActiveTQt control (executable)

+ + + +The ActiveX control in this example is a layouted TQWidget +with a TQSlider, a TQLCDNumber and a TQLineEdit. +It provides a signal/slot/property interface to change the +values of the slider and the line edit, and to get notified +of any property changes. +

It demonstrates the use of TQAxBindable::requestPropertyChange() +and TQAxBindable::propertyChanged(), and the use of the default +TQAxFactory through the TQAXFACTORY_DEFAULT macro. +

+ +

The TQt implementation of the ActiveX for this example is +

    class TQSimpleAX : public TQWidget, public TQAxBindable
+    {
+        Q_OBJECT
+        Q_PROPERTY( TQString text READ text WRITE setText )
+        Q_PROPERTY( int value READ value WRITE setValue )
+    public:
+        TQSimpleAX( TQWidget *parent = 0, const char *name = 0 )
+        : TQWidget( parent, name )
+        {
+            TQVBoxLayout *vbox = new TQVBoxLayout( this );
+
+            slider = new TQSlider( 0, 100, 1, 0, TQSlider::Horizontal, this );
+            LCD = new TQLCDNumber( 3, this );
+            edit = new TQLineEdit( this );
+
+            connect( slider, SIGNAL( valueChanged( int ) ), this, SLOT( setValue(int) ) );
+            connect( edit, SIGNAL(textChanged(const TQString&)), this, SLOT(setText(const TQString&)) );
+
+            vbox->addWidget( slider );
+            vbox->addWidget( LCD );
+            vbox->addWidget( edit );
+        }
+
+        TQString text() const
+        {
+            return edit->text();
+        }
+        int value() const
+        {
+            return slider->value();
+        }
+
+    signals:
+        void someSignal();
+        void valueChanged(int);
+        void textChanged(const TQString&);
+
+    public slots:
+        void setText( const TQString &string )
+        {
+            if ( !requestPropertyChange( "text" ) )
+                return;
+
+            edit->blockSignals( TRUE );
+            edit->setText( string );
+            edit->blockSignals( FALSE );
+            emit someSignal();
+            emit textChanged( string );
+
+            propertyChanged( "text" );
+        }
+        void about()
+        {
+            TQMessageBox::information( this, "About TQSimpleAX", "This is a TQt widget, and this slot has been\n"
+                                                              "called through ActiveX/OLE automation!" );
+        }
+        void setValue( int i )
+        {
+            if ( !requestPropertyChange( "value" ) )
+                return;
+            slider->blockSignals( TRUE );
+            slider->setValue( i );
+            slider->blockSignals( FALSE );
+            LCD->display( i );
+            emit valueChanged( i );
+
+            propertyChanged( "value" );
+        }
+
+    private:
+        TQSlider *slider;
+        TQLCDNumber *LCD;
+        TQLineEdit *edit;
+    };
+
+

The control is exported using the default TQAxFactory +

    TQAXFACTORY_DEFAULT(TQSimpleAX,
+               "{DF16845C-92CD-4AAB-A982-EB9840E74669}",
+               "{616F620B-91C5-4410-A74E-6B81C76FFFE0}",
+               "{E1816BBA-BF5D-4A31-9855-D6BA432055FF}",
+               "{EC08F8FC-2754-47AB-8EFE-56A54057F34E}",
+               "{A095BA0C-224F-4933-A458-2DD7F6B85D8F}")
+
+

To build the example you must first build the TQAxServer library. Then run qmake and your make tool in +examples/simple. +


+

The demonstration retquires your +WebBrowser to support ActiveX controls, and scripting to be enabled. +

The simple ActiveX control is embedded using the <object> tag. + + +

    <object ID="TQSimpleAX" CLASSID="CLSID:DF16845C-92CD-4AAB-A982-EB9840E74669"
+    CODEBASE=http://www.trolltech.com/demos/simpleax.cab>
+        <PARAM NAME="text" VALUE="A simple control">
+        <PARAM NAME="value" VALUE="1">
+    [Object not available! Did you forget to build and register the server?]
+    </object>
+
+

A simple HTML button is connected to the ActiveTQt's about() slot. +

    <FORM>
+        <INPUT TYPE="BUTTON" VALUE="About..." onClick="TQSimpleAX.about()">
+    </FORM>
+
+

A second ActiveX control - the standard Calendar Control - is instantiated +

    <object ID="Calendar" CLASSID="CLSID:8E27C92B-1264-101C-8A2F-040224009C02">
+    [Standard Calendar control not available!]
+        <PARAM NAME="day" VALUE="1">
+    </object>
+
+

Events from the ActiveX controls are handled using both Visual Basic Script +and JavaScript. +

    <SCRIPT LANGUAGE=VBScript>
+    Sub Calendar_Click()
+        MsgBox( "Calendar Clicked!" )
+    End Sub
+
+    Sub TQSimpleAX_TextChanged( str )
+        document.title = str
+    End Sub
+    </SCRIPT>
+    <SCRIPT LANGUAGE=JavaScript>
+    function TQSimpleAX::ValueChanged( Newvalue )
+    {
+        Calendar.Day = Newvalue;
+    }
+    </SCRIPT>
+

See also The TQAxServer Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-example-tetrax.html b/doc/html/qaxserver-example-tetrax.html new file mode 100644 index 00000000..bbe994a0 --- /dev/null +++ b/doc/html/qaxserver-example-tetrax.html @@ -0,0 +1,124 @@ + + + + + +A TQt example as a scriptable ActiveX control (executable) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A TQt example as a scriptable ActiveX control (executable)

+ + + +This example shows how to turn an existing TQt application +into an ActiveX control server. The ActiveX control is based +on the TQt tetrix example. +

It demonstrates the use of the default factory provied by the +TQAXFACTORY_DEFAULT macro, and of TQAxFactory::isServer(). +

The code changes for the tetrix GUI are minimal (a property score, +a signal gameOver and a slot startGame) and provide a better scripting +interface for the use of the control in a web environment. +

The implementation of the ActiveX server functionality is only in the +tetrax.cpp file. + + +The default implementation of the TQAxFactory is used through the +TQAXFACTORY_DEFAULT macro, and exports the TQTetrax object specifying +the five unique IDs retquired by COM to instantiate and communicate with +the server. +

    #include "qtetrax.h"
+    #include "qdragapp.h"
+    #include "qfont.h"
+
+    #include <qaxfactory.h>
+
+    TQAXFACTORY_DEFAULT( TQTetrax,
+                "{852558AD-CBD6-4f07-844C-D1E8983CD6FC}",
+                "{2F5D0068-772C-4d1e-BCD2-D3F6BC7FD315}",
+                "{769F4820-9F28-490f-BA50-5545BD381DCB}",
+                "{5753B1A8-53B9-4abe-8690-6F14EC5CA8D0}",
+                "{DE2F7CE3-CFA7-4938-A9FC-867E2FEB63BA}" )
+
The main entry point method instantiates a TQApplication object, and +creates the GUI only if the program is not running as an ActiveX server (ie. +the program has been started by the user, not by COM). +
    int main( int argc, char **argv )
+    {
+        TQApplication::setColorSpec( TQApplication::CustomColor );
+        TQDragApplication a(argc,argv);
+
+        TQTetrax *tetrax = 0;
+        if ( !TQAxFactory::isServer() ) {
+            tetrax = new TQTetrax;
+            tetrax->setCaption("Tetrax");
+            a.setMainWidget(tetrax);
+            tetrax->setCaption("TQt Example - Tetrax");
+            tetrax->show();
+        }
+
The server enters the application event loop, and destroys the GUI before exiting. +
        int res = a.exec();
+        delete tetrax;
+        return res;
+    }
+
+

To build the example you must first build the TQAxServer library. Then run qmake and your make tool in +examples/tetrix. +


+

The demonstration retquires your +Web browser to support ActiveX controls, and scripting to be enabled. +

+ +The "Tetrix" control is embedded using the <object> tag. Note that the +dimensions of the control are provided explicitely, as the control itself +does not use TQt's layout engine. +

    <object ID="TQTetrax" width=550 height=370
+        CLASSID="CLSID:852558AD-CBD6-4f07-844C-D1E8983CD6FC"
+        CODEBASE=http://www.trolltech.com/demos/tetrax.cab>
+        <PARAM NAME="score" VALUE="0">
+    [Object not available! Did you forget to build and register the server?]
+    </object>
+
An HTML button is added to start the game. +
    <form>
+        <input type="button" value="Start Game..."
+            onClick="TQTetrax.startGame()">
+    </form>
+
And an event handler for the gameOver() event is implemented in JavaScript +to display a simple message box. +
    <SCRIPT LANGUAGE=JavaScript>
+    function TQTetrax::gameOver()
+    {
+        alert( "GameOver!" );
+    }
+    </SCRIPT>
+

See also The TQAxServer Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-example-wrapper.html b/doc/html/qaxserver-example-wrapper.html new file mode 100644 index 00000000..dad6313b --- /dev/null +++ b/doc/html/qaxserver-example-wrapper.html @@ -0,0 +1,207 @@ + + + + + +Standard TQt widgets as ActiveX controls (in-process) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Standard TQt widgets as ActiveX controls (in-process)

+ + + +The ActiveX controls in this example are the standard button +classes TQPushButton, TQCheckBox and TQRadioButton as provided by +TQt. +

It demonstrates how to export existing TQWidget classes as ActiveX +controls, and the use of TQAxFactory together with the TQAXFACTORY_EXPORT +macro. +

+ +

    class ActiveTQtFactory : public TQAxFactory
+    {
+    public:
+        ActiveTQtFactory( const TQUuid &lib, const TQUuid &app )
+            : TQAxFactory( lib, app )
+        {}
+        TQStringList featureList() const
+        {
+            TQStringList list;
+            list << "TQButton";
+            list << "TQCheckBox";
+            list << "TQRadioButton";
+            list << "TQPushButton";
+            list << "TQToolButton";
+            return list;
+        }
+        TQWidget *create( const TQString &key, TQWidget *parent, const char *name )
+        {
+            if ( key == "TQButton" )
+                return new TQButton( parent, name );
+            if ( key == "TQCheckBox" )
+                return new TQCheckBox( parent, name );
+            if ( key == "TQRadioButton" )
+                return new TQRadioButton( parent, name );
+            if ( key == "TQPushButton" )
+                return new TQPushButton( parent, name );
+            if ( key == "TQToolButton" ) {
+                TQToolButton *tb = new TQToolButton( parent, name );
+                tb->setPixmap( TQPixmap(fileopen) );
+                return tb;
+            }
+
+            return 0;
+        }
+        TQMetaObject *metaObject( const TQString &key ) const
+        {
+            if ( key == "TQButton" )
+                return TQButton::staticMetaObject();
+            if ( key == "TQCheckBox" )
+                return TQCheckBox::staticMetaObject();
+            if ( key == "TQRadioButton" )
+                return TQRadioButton::staticMetaObject();
+            if ( key == "TQPushButton" )
+                return TQPushButton::staticMetaObject();
+            if ( key == "TQToolButton" )
+                return TQToolButton::staticMetaObject();
+
+            return 0;
+        }
+        TQUuid classID( const TQString &key ) const
+        {
+            if ( key == "TQButton" )
+                return "{23F5012A-7333-43D3-BCA8-836AABC61B4A}";
+            if ( key == "TQCheckBox" )
+                return "{6E795DE9-872D-43CF-A831-496EF9D86C68}";
+            if ( key == "TQRadioButton" )
+                return "{AFCF78C8-446C-409A-93B3-BA2959039189}";
+            if ( key == "TQPushButton" )
+                return "{2B262458-A4B6-468B-B7D4-CF5FEE0A7092}";
+            if ( key == "TQToolButton" )
+                return "{7c0ffe7a-60c3-4666-bde2-5cf2b54390a1}";
+
+            return TQUuid();
+        }
+        TQUuid interfaceID( const TQString &key ) const
+        {
+            if ( key == "TQButton" )
+                return "{6DA689FB-928F-423C-8632-678C3D3606DB}";
+            if ( key == "TQCheckBox" )
+                return "{4FD39DD7-2DE0-43C1-A8C2-27C51A052810}";
+            if ( key == "TQRadioButton" )
+                return "{7CC8AE30-206C-48A3-A009-B0A088026C2F}";
+            if ( key == "TQPushButton" )
+                return "{06831CC9-59B6-436A-9578-6D53E5AD03D3}";
+            if ( key == "TQToolButton" )
+                return "{6726080f-d63d-4950-a366-9bf33e5cdf84}";
+
+            return TQUuid();
+        }
+        TQUuid eventsID( const TQString &key ) const
+        {
+            if ( key == "TQButton" )
+                return "{73A5D03F-8ADE-4D84-9AE0-A93B4F85A130}";
+            if ( key == "TQCheckBox" )
+                return "{FDB6FFBE-56A3-4E90-8F4D-198488418B3A}";
+            if ( key == "TQRadioButton" )
+                return "{73EE4860-684C-4A66-BF63-9B9EFFA0CBE5}";
+            if ( key == "TQPushButton" )
+                return "{3CC3F17F-EA59-4B58-BBD3-842D467131DD}";
+            if ( key == "TQToolButton" )
+                return "{f4d421fd-4ead-4fd9-8a25-440766939639}";
+
+            return TQUuid();
+        }
+    };
+
The factory implementation returns the list of supported controls, +creates controls on request and provides information about the unique +IDs of the COM classes and interfaces for each control. +

    TQAXFACTORY_EXPORT( ActiveTQtFactory, "{3B756301-0075-4E40-8BE8-5A81DE2426B7}", "{AB068077-4924-406a-BBAF-42D91C8727DD}" )
+
The factory is exported using the TQAXFACTORY_EXPORT macro. +

To build the example you must first build the TQAxServer library. Then run qmake and your make tool in +examples/wrapper. +


+

The demonstration retquires your +WebBrowser to support ActiveX controls, and scripting to be enabled. +

+ +

    <SCRIPT LANGUAGE=VBScript>
+    Sub ToolButton_Clicked()
+        RadioButton.text = InputBox( "Enter something", "Wrapper Demo" )
+    End Sub
+
+    Sub PushButton_clicked()
+        MsgBox( "Thank you!" )
+    End Sub
+
+    Sub CheckBox_toggled( state )
+        if state = 0 then
+            CheckBox.text = "Check me!"
+        else
+            CheckBox.text = "Uncheck me!"
+        end if
+    End Sub
+    </SCRIPT>
+    <p>
+    A TQPushButton:<br>
+    <object ID="PushButton" CLASSID="CLSID:2B262458-A4B6-468B-B7D4-CF5FEE0A7092"
+    CODEBASE=http://www.trolltech.com/demos/wrapperax.cab>
+        <PARAM NAME="text" VALUE="Click me!">
+    [Object not available! Did you forget to build and register the server?]
+    </object><br>
+
+    <p>
+    A TQCheckBox:<br>
+    <object ID="CheckBox" CLASSID="CLSID:6E795de9-872d-43cf-a831-496ef9d86c68"
+    CODEBASE=http://www.trolltech.com/demos/wrapperax.cab>
+        <PARAM NAME="text" VALUE="Check me!">
+    [Object not available! Did you forget to build and register the server?]
+    </object><br>
+
+    <p>
+    A TQToolButton:<br>
+    <object ID="ToolButton" CLASSID="CLSID:7c0ffe7a-60c3-4666-bde2-5cf2b54390a1"
+    CODEBASE=http://www.trolltech.com/demos/wrapperax.cab>
+    [Object not available! Did you forget to build and register the server?]
+    </object><br>
+
+    <p>
+    A TQRadioButton:<br>
+    <object ID="RadioButton" CLASSID="CLSID:afcf78c8-446c-409a-93b3-ba2959039189"
+    CODEBASE=http://www.trolltech.com/demos/wrapperax.cab>
+        <PARAM NAME="text" VALUE="Tune me!">
+    [Object not available! Did you forget to build and register the server?]
+    </object><br>
+

See also The TQAxServer Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver-examples.html b/doc/html/qaxserver-examples.html new file mode 100644 index 00000000..c282b862 --- /dev/null +++ b/doc/html/qaxserver-examples.html @@ -0,0 +1,58 @@ + + + + + +The TQAxServer Examples + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

The TQAxServer Examples

+ + + +The following example programs illustrate the development of ActiveX +controls using the the TQAxServer module. +

For more information see the TQAxServer +documentation. + +

+
Walkthrough: Using TQt objects in Microsoft .NET +
TQt Widget Hierarchy (in-process) +
Menubar merging +
Two simple TQt widgets (in-process) +
TQt' OpenGL widgets as an ActiveX (executable) +
A simple ActiveTQt control (executable) +
A TQt example as a scriptable ActiveX control (executable) +
Standard TQt widgets as ActiveX controls (in-process) +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxserver.html b/doc/html/qaxserver.html new file mode 100644 index 00000000..766a1e04 --- /dev/null +++ b/doc/html/qaxserver.html @@ -0,0 +1,1073 @@ + + + + + +The TQAxServer Module + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

The TQAxServer Module

+ + +

+

+

+ + +

Introduction +

+

The TQAxServer module provides a static library implementing the +functions retquired to turn a standard TQt binary into an ActiveX +control server. +

This module is part of the ActiveTQt + framework. (To incorporate ActiveX controls in a TQt +application see the TQAxContainer + module.) +

The module consists of three classes +

    +
  • TQAxFactory defines a factory for the creation of ActiveX components. +
  • TQAxBindable provides an interface between the TQt widget and the +ActiveX control. +
  • TQAxAggregated can be subclassed to implement additional COM interfaces. +
+

Some example implementations +of ActiveX controls are provided. +

Building the library +

+

In the activeqt directory (usually QTDIR/extensions/activeqt) +enter the control subdirectory and run qmake to generate the +makefile, and use the make tool (nmake for VC++, make for Borland) +to build the library. The library qaxserver.lib will be linked into +QTDIR/lib. +

Using the library +

+

To turn a standard TQt application into an ActiveX server using the +TQAxServer library you must add activeqt as a CONFIG setting +in your .pro file. +

An out-of-process executable server is generated from a .pro +file like this: +

+    TEMPLATE = app
+    CONFIG  += qt activeqt
+
+    RC_FILE  = qaxserver.rc
+    ...
+    
+ +

To build an in-process server, use a .pro file like this: +

+    TEMPLATE = lib
+    CONFIG  += qt activeqt dll
+    
+    DEF_FILE = qaxserver.def
+    RC_FILE  = qaxserver.rc
+    ...
+    
+ +

The files qaxserver.rc and qaxserver.def are part of the +framework and can be used from their usual location (specify a +path in the .pro file), or copied into the project directory. +You can modify these files as long as it includes any file as the +type library entry, ie. you can add version information or use a +different toolbox icon. +

The activeqt configuration will cause the qmake tool to add the +retquired build steps to the build system: +

    +
  • link the binary against qaxserver.lib +
  • generate an interface definition and link the type library into +the binary +
  • register the server +
+

Additionally you can specify a version number using the VERSION +variable, e.g. +

+    TEMPLATE = lib
+    VERSION = 2.5
+    ...
+    
+ +The version number specified will be used as the version of the type +library and of the server when registering. +

Out-of-process vs. In-process +

+

Whether your ActiveX server should run as a stand-alone executable +or as a shared library in the client process depends mainly on the +type of controls you want to provide in the server. +

An executable server has the advantage of being able to run as a +stand-alone application, but adds considerable overhead to the +communication between the ActiveX client and the control. If the +control has a programming error only the server process running +the control will crash, and the client application will probably +continue to run. +

An in-process server is usually smaller and has faster startup +time. The communication between client and server is done directly +through virtual function calls and does not introduce the overhead +retquired for remote procedure calls. But if the server crashes the +client application is likely to crash as well. +

Both server types can use TQt either as a shared library, or +statically linked into the server binary. +

The TQAxServer build system +

+

To be able to build ActiveX controls with TQt, the build system +must be extended to include some additional build steps that are +used when the .pro file includes activeqt in the CONFIG +settings. The resulting makefile will: +

    +
  • Link the executable against qaxserver.lib instead of qtmain.lib +
  • Call the resulting executable with the -dumpidl parameter to +generate an IDL description of the ActiveX controls provided by +the server. +
  • Compile the IDL into a type library using the MIDL tool +
  • Attach the resulting type library as a binary resource to the server +executable +
+

Attaching resources to an executable is not supported by +Windows 95/98/ME, but a server built on +Windows NT/2000/XP will work on those versions. +

Typical build problems +

+

The compiler/linker errors listed are based on those issued by the +Microsoft Visual C++ 6.0 compiler. +

Compiler errors +

+

"No overloaded function takes 2 parameters" +
+

When the error occurs in code that uses the TQAXFACTORY_DEFAULT +macro, the widget class had no constructor that can be used by the +default factory. Either add a standard widget constructor or +implement a custom factory that doesn't retquire one. +

When the error occurs in code that uses the TQAXFACTORY_EXPORT +macro, the TQAxFactory subclass had no appropriate constructor. +Provide a public class constructor like +

+    MyFactory( const TQUuid &, const TQUuid & );
+    
+ +for your factory class. +

"syntax error: bad suffix on number" +
+

The unique identifiers have not been passed as strings into the +TQAXFACTORY_EXPORT or TQAXFACTORY_DEFAULT macro. +

Linker errors +

+

"unresolved external symbol _ucm_instantiate" +
+

The server does not export an implementation of a TQAxFactory. Use +the TQAXFACTORY_EXPORT macro in one of the project's +implementation files to instantiate and export a factory, or use +the TQAXFACTORY_DEFAULT macro to use the default factory. +

"_ucm_initialize already defined in ..." +
+

The server exports more than one implementation of a TQAxFactory, +or exports the same implementation twice. If you use the default +factory, the TQAXFACTORY_DEFAULT macro must only be used once in +the project. Use a custom TQAxFactory implementation and the TQAXFACTORY_EXPORT macro if the server provides multiple ActiveX +controls. +

"cannot open file ... " +
+

The ActiveX server could not shut down properly when the last +client stopped using it. It usually takes about two seconds for +the application to terminate, but you might have to use the task +manager to kill the process (e.g. when a client doesn't release +the controls properly). +

Postprocessing and runtime errors +

+

The ActiveTQt build system performs four commands after the linking +of the binary to make it into an ActiveX server. +

    +
  • Call the server to dump the IDL for the controls +
  • Compile the IDL into a type library +
  • Attach the type library as a binary resource to the server +
  • Register the server +
+

For this to work the server has to meet some retquirements: +

    +
  • All controls exposed can be created with nothing but a TQApplication +instance being present +
  • The initial linking of the server includes a temporary type +library resource +
  • All dependencies retquired to run the server are in the system path +(or in the path used by the calling environment; note that Visual +Studio has it's own set of environment variables listed in the +Tools|Options|Directories dialog). +
+

If those retquirements are not met one ore more of the following +errors are likely to occure: +

The server executable crashes +
+

To generate the IDL the widgets exposed as ActiveX controls need to +be instantiated (the constructor is called). At this point, nothing +else but a TQApplication object exists. Your widget constructor must +not rely on any other objects to be created, e.g. it should check for +null-pointers. +

To debug your server run it with -dumpidl outputfile and check where +it crashes. +

Note that no functions of the control are called. +

The server executable is not a valid Win32 application +
+

Attaching the type library corrupted the server binary. This is a +bug in Windows and happens only with release builds. +

The first linking step has to link a dummy type library into the +executable that can later be replaced by idc. Add a resource file +with a type library to your project as demonstrated in the examples. +

"Unable to Locate DLL" +
+

The build system needs to run the server executable to generate +the interface definition, and to register the server. If a dynamic +link library the server links against is not in the path this +might fail (e.g. Visual Studio calls the server using the +enivronment settings specified in the "Directories" option). Make +sure that all DLLs retquired by your server are located in a +directory that is listed in the path as printed in the error +message box. +

The Server does not respond +
+

If the system is unable to start the server (check with the task +manager whether the server runs a process), make sure that no DLL +the server depends on is missing from the system path (e.g. the TQt +DLL!). Use a dependency walker to view all dependencies of the server +binary. +

If the server runs (e.g. the task manager lists a process), see +the following section for information on debugging your server. +

The Object cannot be created +
+

If the server could be built and registered correctly during the build +process, but the object cannot be initiliazed e.g. by the OLE/COM Object +Viewer application, make sure that no DLL the server depends on is +missing from the system path (e.g. the TQt DLL). Use a dependency walker +to view all dependencies of the server binary. +

If the server runs, see the following section for information on +debugging your server. +

Debugging runtime errors +

+

To debug an in-process server in Visual Studio, set the server project +as the active project, and specify a client "executable for debug +session" in the project settings (e.g. use the ActiveX Test Container). +You can set breakpoints in your code, and also step into ActiveTQt and +TQt code if you installed the debug version. +

To debug an executable server, run the application in a debugger +and start with the command line parameter "-activex". Then start +your client and create an instance of your ActiveX control. COM +will use the existing process for the next client trying to create +an ActiveX control. +

Implementing Controls +

+

To implement an ActiveX control with TQt, create a subclass of TQWidget +or any existing TQWidget subclass: +

+    #include <qwidget.h>
+
+    class MyActiveX : public TQWidget
+    {
+        Q_OBJECT
+    
+ +

The Q_OBJECT macro is retquired to provide the meta object information +about the widget to the ActiveTQt framework. +Use the Q_PROPERTY macro to declare properties for the ActiveX control: +

+        Q_PROPERTY( int value READ value WRITE setValue )
+    
+ +

Declare a standard TQWidget constructor taking a parent widget and a name, +and functions, signals and slots like any normal TQWidget. +(1) +

+    public:
+        MyActiveX( TQWidget *parent = 0, const char *name = 0 )
+        ...
+        
+        int value() const;
+
+    public slots:
+        void setValue( int );
+        ...
+       
+    signals:
+        void valueChange( int );
+        ...
+
+    };
+    
+ +

The ActiveTQt framework will expose properties and public slots as ActiveX +properties and methods, and signals as ActiveX events, and convert between +the TQt data types and the equivalent COM data types. +

Data Types +

+

The TQt data types that are supported for properties are: +

+ + + + + + + + + + + + + + + + + + + + + + +
TQt data type +COM property +
bool +VARIANT_BOOL +
TQString +BSTR +
TQCString +BSTR +
int +int +
uint +unsigned int +
double +double +
Q_LLONG +CY +
Q_ULLONG +CY +
TQColor +OLE_COLOR +
TQDate +DATE +
TQDateTime +DATE +
TQTime +DATE +
TQFont +IFontDisp* +
TQPixmap +IPictureDisp* +(2) +
TQVariant +VARIANT +
TQValueList<TQVariant> +SAFEARRAY(VARIANT) +
TQStringList +SAFEARRAY(BSTR) +
TQByteArray +SAFEARRAY(BYTE) +
TQRect +User defined type +
TQSize +User defined type +
TQPoint +User defined type +
+

The TQt data types that are supported for parameters in signals and +slots are: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TQt data type +COM parameter +
bool +[in] VARIANT_BOOL +
bool& +[in, out] VARIANT_BOOL* +
TQString, const TQString& +[in] BSTR +
TQString& +[in, out] BSTR* +
TQCString, const TQCString& +[in] BSTR +
TQString& +[in, out] BSTR* +
int +[in] int +
int& +[in,out] int +
uint +[in] unsigned int +
uint& +[in, out] unsigned int* +
double +[in] double +
double& +[in, out] double* +
TQColor, const TQColor& +[in] OLE_COLOR +
TQColor& +[in, out] OLE_COLOR* +
TQDate, const TQDate& +[in] DATE +
TQDate& +[in, out] DATE* +
TQDateTime, const TQDateTime& +[in] DATE +
TQDateTime& +[in, out] DATE* +
TQFont, const TQFont& +[in] IFontDisp* +
TQFont& +[in, out] IFontDisp** +
TQPixmap, const TQPixmap& +[in] IPictureDisp* +
TQPixmap& +[in, out] IPictureDisp** +
TQValueList<TQVariant>, const TQValueList<TQVariant>& +[in] SAFEARRAY(VARIANT) +
TQValueList<TQVariant>& +[in, out] SAFEARRAY(VARIANT)* +
TQStringList, const TQStringList& +[in] SAFEARRAY(BSTR) +
TQStringList& +[in, out] SAFEARRAY(BSTR)* +
TQByteArray, const TQByteArray& +[in] SAFEARRAY(BYTE) +
TQByteArray& +[in, out] SAFEARRAY(BYTE)* +
TQObject* +[in] IDispatch* +
TQRect& +(3) +[in, out] struct TQRect (user defined) +
TQSize& +[in, out] struct TQSize (user defined) +
TQPoint& +[in, out] struct TQPoint (user defined) +
+

Also supported are exported enums and sets (see Q_ENUMS and Q_SETS). +The in-parameter types are also supported as return values. +

Properties and signals/slots that have parameters using any other +data types are ignored by the TQActiveX framework. +

Sub-Objects +

+

COM objects can have multiple sub-objects that can represent a sub element +of the COM object. A COM object representing a multi-document spread sheet +application can for example provide one sub-object for each spread sheet. +

Any TQObject subclass can be used as the type for a sub object in ActiveX. The +TQAxFactory implementation (see below) needs to return the classname of the +sub type as one key in the featureList() implementation, as well as the IDs +for the COM class, the interface and event interface of that type. Then the +type can be used as e.g. the return value or paramter of a slot. +

Property Notification +

+

To make the properties bindable for the ActiveX client, use multiple +inheritance from the TQAxBindable class: +

+

+    #include <qwidget.h>
+    #include <qaxbindable.h>
+
+    class MyActiveX : public TQWidget, public TQAxBindable
+    {
+        Q_OBJECT
+    
+ +When implementing the property write functions, use the +TQAxBindable class's requestPropertyChange() and propertyChanged() +functions to allow ActiveX clients to bind to the control +properties. +(4) +

Serving Controls +

+

To make an ActiveX control available to the COM system it must +be registered in the system registry using five unique +identifiers. These identifiers are provided by tools like guidgen or uuidgen. The registration information allows COM to +localize the binary providing a requested ActiveX control, +marshall remote procedure calls to the control and read type +information about the methods and properties exposed by the +control. +

To create the ActiveX control when the client asks for it the +server must export an implementation of a TQAxFactory. Use the +default factory when the server provides only a single ActiveX +control, and implement a subclass of TQAxFactory to provide +multiple ActiveX controls. The default factory is available +through a macro that takes the identifiers COM retquires to locate +the ActiveX control on the target system: +

+    TQAXFACTORY_DEFAULT ( MyActiveX,
+                "{ad90301a-849e-4e8b-9a91-0a6dc5f6461f}",
+                "{87a5b65e-7fa9-4dc6-a176-47295988dcbd}",
+                "{a6130ae9-8327-47ec-815b-d0b45a0d6e5e}",
+                "{26c4e136-4e23-4347-af37-faf933b027e9}",
+                "{a8f21901-7ff7-4f6a-b939-789620c03d83}" )
+    
+ +

The TQAxFactory class documentation explains +how to use this macro, and how to implement and use custom factories. +

For out-of-process executable servers you can implement a main() +function to instantiate a TQApplication object and enter the event +loop just like any normal TQt application. By default the +application will start as a standard TQt application, but if you +pass -activex on the command line it will start as an ActiveX +server. Use TQAxFactory::isServer() to create and run a standard +application interface, or to prevent a stand-alone execution: +

+

+    #include <qapplication.h>
+    #include <qaxfactory.h>
+
+    int main( int argc, char **argv )
+    {
+        TQApplication app( argc, argv );
+        if ( !TQAxFactory::isServer() ) {
+            // create and show main window...
+        }
+        return app.exec();
+    }
+    
+ +This is however not necessary as ActiveTQt provides a default implementation +of a main function. The default implemenation calls TQAxFactory::startServer(), +creates a TQApplication instance and calls exec(). +

To build the ActiveX server executable run qmake to generate the makefile, and use your compiler's +make tool as for any other TQt application. The make process will +also register the controls in the system registry by calling the +resulting executable with the -regserver command line option. +

If the ActiveX server is an executable, the following command line +options are supported: +

+
Option Result +
-regserver Registers the server in the system registry +
-unregserver Unregisters the server from the system registry +
-activex Starts the application as an ActiveX server +
-dumpidl <file> -version x.y Writes the server's IDL to the +specified file. The type library will have version x.y +
+

In-process servers can be registered using the regsvr32 tool available +on all Windows systems. +

Distributing TQAxServer binaries +

+

ActiveX servers written with TQt can use TQt either as a shared +library, or have TQt linked statically into the binary. Both ways +will produce rather large packages (either the server binary +itself becomes large, or you have to ship the TQt DLL). +

Installing stand-alone Servers +

+

When your ActiveX server can also run as a stand-alone application, +run the server executable with the -regserver command line +parameter after installing the executable on the target system. +After that the controls provided by the server will be available to +ActiveX clients. +

Installing In-process Servers +

+

When your ActiveX server is part of an installation package, use the +regsvr32 tool provided by Microsoft to register the controls on +the target system. If this tool is not present, load the DLL into +your installer process, resolve the DllRegisterServer symbol and +call the function: +

+    HMODULE dll = LoadLibrary( "myserver.dll" );
+    typedef HRESULT(__stdcall *DllRegisterServerProc)();
+    DllRegisterServerProc DllRegisterServer = 
+        (DllRegisterServerProc)GetProcAddress( dll, "DllRegisterServer" );
+
+    HRESULT res = E_FAIL;
+    if ( DllRegisterServer )
+        res = DllRegisterServer();
+    if ( res != S_OK )
+        // error handling
+    
+ +

Distributing Servers over the Internet +

+

If you want to use controls in your server in web-pages you need to +make the server available to the browser used to view your page, and +you need to specify the location of the server package in your page. +

To specify the location of a server, use the CODEBASE attribute in +the OBJECT tag of your web-site. The value can point to the server +file itself, to an INF file listing other files the server retquires +(e.g. the TQt DLL), or a compressed CAB archive. +

INF and CAB files are documented in almost every book available about +ActiveX and COM programming as well as in the MSDN library and various +other Online resources. The examples include INF files that can be used +to build CAB archives: +

+ +

    [version]
+        signature="$CHICAGO$"
+        AdvancedINF=2.0
+     [Add.Code]
+        simpleax.exe=simpleax.exe
+     [simpleax.exe]
+        file-win32-x86=thiscab
+        clsid={DF16845C-92CD-4AAB-A982-EB9840E74669}
+        RegisterServer=yes
+
+

The CABARC tool from Microsoft can easily generate CAB archives: +

 cabarc N simpleax.cab simpleax.exe simple.inf 
+ +

The INF files assume a static build of TQt, so no dependencies to other DLLs +are listed in the INF files. To distribute an ActiveX server depending on +DLLs you must add the dependencies, and provide the library files +with the archive. +

Using the Controls +

+

To use the ActiveX controls, e.g. to embed them in a web page, use +the <object> HTML tag. +

+    <object ID="MyActiveX1" CLASSID="CLSID:ad90301a-849e-4e8b-9a91-0a6dc5f6461f">
+       ...
+    <\object>
+    
+ +

To initialize the control's properties, use +

+    <object ID=...>
+        <param name="name" value="value">
+    <\object>
+    
+ +

If the web browser supports scripting use JavaScript, VBScript and +forms to script the control. The examples include demonstration HTML pages for the +example controls. +

Supported and Unsupported ActiveX clients +

+

The following is largly based on our own experiements with ActiveX +controls and client applications, and is by no means complete. +

Supported Clients +

+

These standard applications work with ActiveX controls developed with +ActiveTQt. Note that some clients support only in-process controls. +

    +
  • Internet Explorer +
  • Microsoft ActiveX Control Test Container +
  • Microsoft Visual Studio 6.0 +
  • Microsoft Visual Studio.NET/2003 +
  • Microsoft Visual Basic 6.0 +
  • MFC- and ATL-based containers +
  • Sybase PowerBuilder +
  • ActiveTQt based containers +
+

Microsoft Office applications are supported, but you need to register +the controls as "Insertable" objects. Reimplement TQAxFactory::registerClass +to add this attribute to the COM class, or set the "Insertable" class info +for your class to "yes" using the Q_CLASSINFO macro. +

Unsupported Clients +

+

We have not managed to make ActiveTQt based COM objects work with the +following client applications. +

    +
  • Borland C++ Builder (Versions 5 and 6) +
  • Borland Delphi +
+

Enhanced features +

+

Fewer methods and properties +

+

By default all ActiveX controls expose not only their own methods +and properties to ActiveX clients, but also those of all super +classes, including TQWidget. +

This can be controlled by reimplementing TQAxFactory's +exposeToSuperClass() function. Reimplement the function to return +the last (furthest up the inheritance hierarchy) super class that +should be exposed: +

+    TQString MyFactory::exposeToSuperClass( const TQString &key ) const
+    {
+        if ( key == "SmallActiveX" )
+            return key;
+        return TQAxFactory::exposeToSuperClass( key );
+    }
+    
+ +

The SmallActiveX control will only expose its own functions and +properties to clients, while all other ActiveX controls provided +by this factory will expose their own functions and properties and +also those of all their super classes including TQWidget. The +SmallActiveX class can of course propagate some of the TQWidget +functions and properties into its own interface. +

Class Information and Tuning +

+

An alternative way to reimplementing TQAxFactory to have more control +about how objects are registered or exposed is to provide class +specific information using the Q_CLASSINFO macro, which is part of +TQt's meta object system. +

+ + + + + + + + + + + + + + + +
Key +Meaning of value +
Version +The version of the class (1.0 is default) +
Description +A string describing the class. +
ClassID +The class ID. +You must reimplement TQAxFactory::classID if not specified. +
InterfaceID +The interface ID. +You must reimplement TQAxFactory::interfaceID if not specified. +
EventsID +The event interface ID. +No signals are exposed as COM events if not specified. +
DefaultProperty +The property specified represents the default property of this class. +Ie. the default property of a push button would be "text". +
DefaultSignal +The signal specified respresents the default signal of this class. +Ie. the default signal of a push button would be "clicked". +
LicenseKey +Object creation retquires the specified license key. The key can be +empty to retquire a licensed machine. By default classes are not +licensed. Also see the following section. +
StockEvents +Objects expose stock events if value is "yes". +See TQAxFactory::hasStockEvents() +
ToSuperClass +Objects expose functionality of all super classes up to and +including the class name in value. +See TQAxFactory::exposeToSuperClass() +
Insertable +If the value is "yes" the class is registered to be "Insertable" +and will be listed in OLE 2 containers (ie. Microsoft Office). This +attribute is not be set by default. +
Aggregatable +If the value is "no" the class does not support aggregation. By +default aggregation is supported. +
Creatable +If the value is "no" the class cannot be created by the client, +and is only available through the API of another class (ie. the +class is a sub-type). +
RegisterObject +If the value is "yes" objects of this class are registered with +OLE and accessible from the running object table (ie. clients +can connect to an already running instance of this class). This +attribute is only supported in out-of-process servers. +
+

Note that both keys and values are case sensitive. +

The following declares version 2.0 of a class that exposes only its +own API, and is available in the "Insert Objects" dialog of Microsoft +Office applications. +

+

+    class MyActiveX : public TQWidget
+    {
+        Q_OBJECT
+        Q_CLASSINFO("Version", "2.0")
+        Q_CLASSINFO("ClassID", "{7a4cffd8-cbcd-4ae9-ae7e-343e1e5710df}")
+        Q_CLASSINFO("InterfaceID", "{6fb035bf-8019-48d8-be51-ef05427d8994}")
+        Q_CLASSINFO("EventsID", "{c42fffdf-6557-47c9-817a-2da2228bc29c}")
+        Q_CLASSINFO("Insertable", "yes")
+        Q_CLASSINFO("ToSuperClass", "MyActiveX")
+
+        Q_PROPERTY( ...
+    public:
+        MyActiveX(TQWidget *parent = 0, const char *name = 0);
+
+        ...
+    };
+    
+ +

Developing licensed components +

+

If you develop components you might want to control who is able to instantiate +those components. Since the server binary can be shipped to and registered on +any client machine it is possible for anybody to use those components in his +own software. +

Licensing components can be done using a variety of techniques, e.g. the code +creating the control can provide a license key, or the machine on which the +control is supposed to run needs to be licensed. +

To mark a TQt class as licensed specify a "LicenseKey" using the Q_CLASSINFO +macro. + +

+    class MyLicensedControl : public TQWidget
+    {
+        Q_OBJECT
+        Q_CLASSINFO("LicenseKey", "<key string>")
+    ...
+    };
+    
+ +The key is retquired to be able to create an instance of MyLicensedControl +on a machine that is not licensed itself. The licensed developer can now +redistributes the server binary with his application, which creates the control +using the value of "LicenseKey", while users of the application cannot create +the control without the license key. +

If a single license key for the control is not sufficient (ie. you want +differnet developers to receive different license keys) you can specify an +empty key to indicate that the control retquires a license, and reimplement +TQAxFactory::validateLicenseKey() to verify that a license exists on the +system (ie. through a license file). +

More Interfaces +

+

ActiveX controls provided by ActiveTQt servers support a minimal set of COM +interfaces to implement the OLE specifications. When the ActiveX class inherits +from the TQAxBindable class it can also implement additional COM interfaces. +

Create a new subclass of TQAxAggregated and use multiple inheritance +to subclass additional COM interface classes. +

+    class AxImpl : public TQAxAggregated, public ISomeCOMInterface
+    {
+    public:
+        AxImpl() {}
+
+        long queryInterface( const TQUuid &iid, void **iface );
+
+        // IUnknown
+        TQAXAGG_IUNKNOWN
+
+        // ISomeCOMInterface
+        ...
+    }
+    
+ +

Reimplement the queryInterface() function to support the additional +COM interfaces. +

+    long AxImpl::queryInterface( const TQUuid &iid, void **iface )
+    {
+        *iface = 0;
+        if ( iid == IID_ISomeCOMInterface )
+            *iface = (ISomeCOMInterface*)this;
+        else
+            return E_NOINTERFACE;
+
+        AddRef();
+        return S_OK;
+    }
+    
+ +

Since ISomeCOMInterface is a subclass of IUnknown you will have +to implement the QueryInterface, AddRef and Release functions. +Use the TQAXAGG_IUNKNOWN macro in your class definition to do that. If +you implement the IUnknown functions manually, delegate the calls to the +interface pointer returned by the controllingUnknown() function, e.g. +

+    HRESULT AxImpl::QueryInterface( REFIID iid, void **iface )
+    {
+        return controllingUnknown()->QueryInterface( iid, iface );
+    }
+    
+ +Do not support the IUnknown interface itself in your queryInterface() +implementation. +

Implement the methods of the COM interfaces, and use TQAxAggregated::Object() +if you need to make calls to the TQObject subclass implementing the control. +

In your TQAxBindable subclass, implement createAggregate() to return +a new object of the TQAxAggregated subclass. +

+

+    class MyActiveX : public TQWidget,                       
+                      public TQAxBindable
+    {
+    	Q_OBJECT
+    public:
+        MyActiveX( TQWidget *parent, const char *name = 0 );
+
+        TQAxAggregated *createAggregate()
+        {
+            return new AxImpl();
+        }
+        
+    };
+    
+ +
+
  1. + +If a standard constructor is not present the compiler will issue +an error "no overloaded function takes 2 parameters" when using +the default factory through the TQAXFACTORY_DEFAULT macro. If you +cannot provide a standard constructor you must implement a TQAxFactory custom factory and call the constructor you have in +your implementation of TQAxFactory::create. + Back...
  2. + +COM cannot marshal IPictureDisp accross process boundaries, +so TQPixmap properties cannot be called for out-of-process servers. You +can however marshal the image data via e.g. temporary files. See the +Microsoft +KB article + Q150034 for more information. + Back...
  3. + +OLE needs to marshal user defined types by reference (ByRef), and cannot +marshal them by value (ByVal). This is why const-references and object +parameters are not supported for TQRect, TQSize and TQPoint. Also note that +servers with this datatype retquire Windows 98 or DCOM 1.2 to be installed. + Back...
  4. + +This is not retquired, but gives the client more control over +the ActiveX control. + Back...
+ + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxwidget-h.html b/doc/html/qaxwidget-h.html new file mode 100644 index 00000000..63f1d601 --- /dev/null +++ b/doc/html/qaxwidget-h.html @@ -0,0 +1,121 @@ + + + + + +qaxwidget.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qaxwidget.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qaxwidget.h   3.3.8   edited Jan 11 14:46 $
+**
+** Declaration of the TQAxWidget class
+**
+** Copyright (C) 2001-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the Active TQt integration.
+**
+** Licensees holding valid TQt Enterprise Edition
+** licenses for Windows may use this file in accordance with the TQt Commercial
+** License Agreement provided with the Software.
+**
+** This file is not available for use under any other license without
+** express written permission from the copyright holder.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about TQt Commercial License Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef TQAXWIDGET_H
+#define TQAXWIDGET_H
+
+#include "qaxbase.h"
+#include <qwidget.h>
+
+class TQAxHostWindow;
+
+class TQAxWidget : public TQWidget, public TQAxBase
+{
+public:
+    TQMetaObject *metaObject() const;
+    const char *className() const;
+    void* qt_cast( const char* );
+    bool qt_invoke( int, TQUObject* );
+    bool qt_emit( int, TQUObject* );
+    bool qt_property( int, int, TQVariant* );
+    TQObject* qObject() { return (TQObject*)this; }
+
+    TQAxWidget( TQWidget* parent = 0, const char* name = 0, WFlags f = 0 );
+    TQAxWidget( const TQString &c, TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+    TQAxWidget( IUnknown *iface, TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+    ~TQAxWidget();
+
+    void clear();
+
+    TQSize sizeHint() const;
+    TQSize minimumSizeHint() const;
+
+protected:
+    bool initialize( IUnknown** );
+    virtual bool createHostWindow( bool );
+
+    void enabledChange( bool old );
+    void paletteChange( const TQPalette &old );
+    void fontChange( const TQFont &old );
+    void windowActivationChange( bool old );
+
+    void resizeEvent( TQResizeEvent * );
+    virtual bool translateKeyEvent(int message, int keycode) const;
+private:
+    friend class TQAxHostWindow;
+
+    TQMetaObject *parentMetaObject() const;
+
+    TQAxHostWindow *container;
+};
+
+#endif // TQAXWIDGET_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxwidget-members.html b/doc/html/qaxwidget-members.html new file mode 100644 index 00000000..bc635194 --- /dev/null +++ b/doc/html/qaxwidget-members.html @@ -0,0 +1,363 @@ + + + + + +TQAxWidget Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQAxWidget

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qaxwidget.html b/doc/html/qaxwidget.html new file mode 100644 index 00000000..006e57f9 --- /dev/null +++ b/doc/html/qaxwidget.html @@ -0,0 +1,250 @@ + + + + + +TQAxWidget Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQAxWidget Class Reference
[TQAxContainer module]

+ +

The TQAxWidget class is a TQWidget that wraps an ActiveX control. +More... +

This class is part of the TQt ActiveTQt Extension. +

#include <qaxwidget.h> +

Inherits TQWidget and TQAxBase. +

List of all member functions. +

Public Members

+
    +
  • TQAxWidget ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )
  • +
  • TQAxWidget ( const TQString & c, TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )
  • +
  • TQAxWidget ( IUnknown * iface, TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )
  • +
  • ~TQAxWidget ()
  • +
+

Important Inherited Members

+
    +
  • TQVariant dynamicCall ( const TQCString & function, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) )
  • +
  • TQVariant dynamicCall ( const TQCString & function, TQValueList<TQVariant> & vars )
  • +
  • TQAxObject * querySubObject ( const TQCString & name, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) )
  • +
+

Protected Members

+ +

Detailed Description

+

This class is defined in the TQt ActiveTQt Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQAxWidget class is a TQWidget that wraps an ActiveX control. + +

+ +

A TQAxWidget can be instantiated as an empty object, with the name +of the ActiveX control it should wrap, or with an existing +interface pointer to the ActiveX control. The ActiveX control's +properties, methods and events which only use supported data types, become available as TQt properties, +slots and signals. The base class TQAxBase provides an API to +access the ActiveX directly through the IUnknown pointer. +

TQAxWidget is a TQWidget and can be used as such, e.g. it can be +organized in a widget hierarchy, receive events or act as an event +filter. Standard widget properties, e.g. enabled are supported, but it depends on the ActiveX +control to implement support for ambient properties like e.g. +palette or font. TQAxWidget tries to provide the necessary hints. +

Warning: +You can subclass TQAxWidget, but you cannot use the Q_OBJECT macro +in the subclass (the generated moc-file will not compile), so you +cannot add further signals, slots or properties. This limitation +is due to the metaobject information generated in runtime. To work +around this problem, aggregate the TQAxWidget as a member of the +TQObject subclass. +

+


Member Function Documentation

+

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

+Creates an empty TQAxWidget widget and propagates parent, name and f to the TQWidget constructor. To initialize a control, +call setControl. + +

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

+Creates an TQAxWidget widget and initializes the ActiveX control c. +parent, name and f are propagated to the TQWidget contructor. +

See also control. + +

TQAxWidget::TQAxWidget ( IUnknown * iface, TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

+Creates a TQAxWidget that wraps the COM object referenced by iface. +parent, name and f are propagated to the TQWidget contructor. + +

TQAxWidget::~TQAxWidget () +

+Shuts down the ActiveX control and destroys the TQAxWidget widget, +cleaning up all allocated resources. +

See also clear(). + +

bool TQAxWidget::createHostWindow ( bool initialized ) [virtual protected] +

+Creates the client site for the ActiveX control, and returns TRUE if +the control could be embedded successfully, otherwise returns FALSE. +If initialized is TRUE the control has already been initialized. +

This function is called by initialize(). If you reimplement initialize +to customize the actual control instantiation, call this function in your +reimplementation to have the control embedded by the default client side. +Creates the client site for the ActiveX control, and returns TRUE if +the control could be embedded successfully, otherwise returns FALSE. + +

TQVariant TQAxBase::dynamicCall ( const TQCString & function, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) ) +

+Calls the COM object's method function, passing the +parameters var1, var1, var2, var3, var4, var5, +var6, var7 and var8, and returns the value returned by +the method, or an invalid TQVariant if the method does not return +a value or when the function call failed. +

If function is a method of the object the string must be provided +as the full prototype, for example as it would be written in a +TQObject::connect() call. +

+    activeX->dynamicCall( "Navigate(const TQString&)", "www.trolltech.com" );
+    
+ +

Alternatively a function can be called passing the parameters embedded +in the string, e.g. above function can also be invoked using +

+    activeX->dynamicCall("Navigate(\"www.trolltech.com\");
+    
+ +All parameters are passed as strings; it depends on the control whether +they are interpreted correctly, and is slower than using the prototype +with correctly typed parameters. +

If function is a property the string has to be the name of the +property. The property setter is called when var1 is a valid TQVariant, +otherwise the getter is called. +

+    activeX->dynamicCall( "Value", 5 );
+    TQString text = activeX->dynamicCall( "Text" ).toString();
+    
+ +Note that it is faster to get and set properties using +TQObject::property() and TQObject::setProperty(). +

It is only possible to call functions through dynamicCall() that +have parameters or return values of datatypes supported by +TQVariant. See the TQAxBase class documentation for a list of +supported and unsupported datatypes. If you want to call functions +that have unsupported datatypes in the parameter list, use +queryInterface() to retrieve the appropriate COM interface, and +use the function directly. +

+    IWebBrowser2 *webBrowser = 0;
+    activeX->queryInterface( IID_IWebBrowser2, (void**)&webBrowser );
+    if ( webBrowser ) {
+        webBrowser->Navigate2( pvarURL );
+        webBrowser->Release();
+    }
+    
+ +

This is also more efficient. + +

Example: qutlook/centralwidget.cpp. +

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 +parameters in vars, 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 +TQVariant object. +

The TQVariant objects in vars are updated when the method has +out-parameters. + +

TQAxObject * TQAxBase::querySubObject ( const TQCString & name, const TQVariant & var1 = TQVariant ( ), const TQVariant & var2 = TQVariant ( ), const TQVariant & var3 = TQVariant ( ), const TQVariant & var4 = TQVariant ( ), const TQVariant & var5 = TQVariant ( ), const TQVariant & var6 = TQVariant ( ), const TQVariant & var7 = TQVariant ( ), const TQVariant & var8 = TQVariant ( ) ) +

+Returns a pointer to a TQAxObject wrapping the COM object provided +by the method or property name, passing passing the parameters +var1, var1, var2, var3, var4, var5, var6, +var7 and var8. +

If name is provided by a method the string must include the +full function prototype. +

If name is a property the string must be the name of the property, +and var1, ... var8 are ignored. +

The returned TQAxObject is a child of this object (which is either of +type TQAxObject or TQAxWidget), and is deleted when this object is +deleted. It is however safe to delete the returned object yourself, +and you should do so when you iterate over lists of subobjects. +

COM enabled applications usually have an object model publishing +certain elements of the application as dispatch interfaces. Use +this method to navigate the hierarchy of the object model, e.g. +

+    TQAxWidget outlook( "Outlook.Application" );
+    TQAxObject *session = outlook.querySubObject( "Session" );
+    if ( session ) {
+        TQAxObject *defFolder = session->querySubObject(
+                                "GetDefaultFolder(OlDefaultFolders)",
+                                "olFolderContacts" );
+        //...
+    }
+    
+ + +

Example: qutlook/centralwidget.cpp. +

bool TQAxWidget::translateKeyEvent ( int message, int keycode ) const [virtual protected] +

+Reimplement this function to pass certain key events to the +ActiveX control. message is the Window message identifier +specifying the message type (ie. WM_KEYDOWN), and keycode is +the virtual keycode (ie. VK_TAB). +

If the function returns TRUE the key event is passed on to the +ActiveX control, which then either processes the event or passes +the event on to TQt. +

If the function returns FALSE the processing of the key event is +ignored by ActiveTQt, ie. the ActiveX control might handle it or +not. +

The default implementation returns TRUE for the following cases: +

+ + +
WM_SYSKEYDOWN +WM_SYSKEYUP +WM_KEYDOWN +
All keycodes +VK_MENU +VK_TAB, VK_DELETE and all non-arrow-keys in combination with VK_SHIFT, +VK_CONTROL or VK_MENU +
+

This table is the result of experimenting with popular ActiveX controls, +ie. Internet Explorer and Microsoft Office applications, but for some +controls it might retquire modification. + + +


+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/qbig5codec-h.html b/doc/html/qbig5codec-h.html new file mode 100644 index 00000000..f815aadb --- /dev/null +++ b/doc/html/qbig5codec-h.html @@ -0,0 +1,134 @@ + + + + + +qbig5codec.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qbig5codec.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qbig5codec.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQBig5Codec class
+**
+** Created : 990713
+**
+** 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 retquirements 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.
+**
+**********************************************************************/
+
+// Most of the code here was originally written by Ming-Che Chuang and
+// is included in TQt with the author's permission, and the grateful
+// thanks of the Trolltech team.
+
+#ifndef TQBIG5CODEC_H
+#define TQBIG5CODEC_H
+
+#ifndef QT_H
+#include "qtextcodec.h"
+#endif // QT_H
+
+#ifndef QT_NO_BIG_CODECS
+
+class TQBig5Codec : public TQTextCodec {
+public:
+    virtual int mibEnum() const;
+    const char* name() const;
+
+    TQTextDecoder* makeDecoder() const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQTextCodec::fromUnicode;
+#endif
+    TQCString fromUnicode(const TQString& uc, int& lenInOut) const;
+    TQString toUnicode(const char* chars, int len) const;
+
+    int heuristicContentMatch(const char* chars, int len) const;
+    int heuristicNameMatch(const char* hint) const;
+};
+
+class TQBig5hkscsCodec : public TQTextCodec {
+public:
+    virtual int mibEnum() const;
+    const char* name() const;
+
+    TQTextDecoder* makeDecoder() const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQTextCodec::fromUnicode;
+#endif
+    TQCString fromUnicode(const TQString& uc, int& lenInOut) const;
+    TQString toUnicode(const char* chars, int len) const;
+
+    int heuristicContentMatch(const char* chars, int len) const;
+    int heuristicNameMatch(const char* hint) const;
+};
+
+#endif
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbig5codec-members.html b/doc/html/qbig5codec-members.html new file mode 100644 index 00000000..0d0f9117 --- /dev/null +++ b/doc/html/qbig5codec-members.html @@ -0,0 +1,71 @@ + + + + + +TQBig5Codec Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQBig5Codec

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbig5codec.html b/doc/html/qbig5codec.html new file mode 100644 index 00000000..e491fa01 --- /dev/null +++ b/doc/html/qbig5codec.html @@ -0,0 +1,101 @@ + + + + + +TQBig5Codec Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQBig5Codec Class Reference

+ +

The TQBig5Codec class provides conversion to and from the Big5 encoding. +More... +

#include <qbig5codec.h> +

Inherits TQTextCodec. +

List of all member functions. +


Detailed Description

+ + + +

The TQBig5Codec class provides conversion to and from the Big5 encoding. +

TQBig5Codec was originally contributed by Ming-Che Chuang +<mingche@cobra.ee.ntu.edu.tw> for the Big-5+ encoding, and was +included in TQt with the author's permission, and the grateful +thanks of the Trolltech team. (Note: Ming-Che's code is TQPL'd, as +per an mail to info@trolltech.com.) +

However, since Big-5+ was never formally approved, and was never +used by anyone, the Taiwan Free Software community and the Li18nux +Big5 Standard Subgroup agree that the de-facto standard Big5-ETen +(zh_TW.Big5 or zh_TW.TW-Big5) be used instead. +

TQBig5Codec is currently implemented as a pure subset of +TQBig5hkscsCodec, so more fine-tuning is needed to make it +identical to the standard Big5 mapping as determined by +Li18nux-Big5. See http://www.autrijus.org/xml/ for the draft +Big5 (2002) standard. +

James Su <suzhe@turbolinux.com.cn> <suzhe@gnuchina.org> +generated the Big5-HKSCS<->Unicode tables with a very +space-efficient algorithm. He generously donated his code to glibc +in May 2002. Subsequently, James has kindly allowed Anthony Fok +<anthony@thizlinux.com> <foka@debian.org> to adapt the code +for TQt. +

+

Copyright (C) 2000 Ming-Che Chuang +Copyright (C) 2002 James Su, Turbolinux Inc. +Copyright (C) 2002 Anthony Fok, ThizLinux Laboratory Ltd. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. +

See also Internationalization with TQt. + + +


+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/qbig5hkscscodec-members.html b/doc/html/qbig5hkscscodec-members.html new file mode 100644 index 00000000..a321f8bb --- /dev/null +++ b/doc/html/qbig5hkscscodec-members.html @@ -0,0 +1,71 @@ + + + + + +TQBig5hkscsCodec Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQBig5hkscsCodec

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbig5hkscscodec.html b/doc/html/qbig5hkscscodec.html new file mode 100644 index 00000000..a4f3b084 --- /dev/null +++ b/doc/html/qbig5hkscscodec.html @@ -0,0 +1,104 @@ + + + + + +TQBig5hkscsCodec Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQBig5hkscsCodec Class Reference

+ +

The TQBig5hkscsCodec class provides conversion to and from the Big5-HKSCS encoding. +More... +

#include <qbig5codec.h> +

Inherits TQTextCodec. +

List of all member functions. +


Detailed Description

+ +

The TQBig5hkscsCodec class provides conversion to and from the Big5-HKSCS encoding. +

TQBig5hkscsCodec grew out of the TQBig5Codec originally contributed by +Ming-Che Chuang <mingche@cobra.ee.ntu.edu.tw>. James Su +<suzhe@turbolinux.com.cn> <suzhe@gnuchina.org> and Anthony Fok +<anthony@thizlinux.com> <foka@debian.org> implemented HKSCS-1999 +TQBig5hkscsCodec for TQt-2.3.x, but it was too late in TQt development +schedule to be officially included in the TQt-2.3.x series. +

Wu Yi <wuyi@hancom.com> ported the HKSCS-1999 TQBig5hkscsCodec to +TQt-3.0.1 in March 2002. +

With the advent of the new HKSCS-2001 standard, James Su +<suzhe@turbolinux.com.cn> <suzhe@gnuchina.org> generated the +Big5-HKSCS<->Unicode tables with a very space-efficient algorithm. +He generously donated his code to glibc in May 2002. Subsequently, +James has generously allowed Anthony Fok to adapt the code for +TQt-3.0.5. +

Currently, the Big5-HKSCS tables are generated from the following +sources, and with the Euro character added: +

    +
  1. http://www.microsoft.com/typography/unicode/950.txt +
  2. http://www.info.gov.hk/digital21/chi/hkscs/download/big5-iso.txt +
  3. http://www.info.gov.hk/digital21/chi/hkscs/download/big5cmp.txt +
+

There may be more fine-tuning to the TQBig5hkscsCodec to maximize its +compatibility with the standard Big5 (2002) mapping as determined by +Li18nux Big5 Standard Subgroup. See http://www.autrijus.org/xml/ +for the various Big5 CharMapML tables. +

+

Copyright (C) 2000 Ming-Che Chuang +Copyright (C) 2001, 2002 James Su, Turbolinux Inc. +Copyright (C) 2002 WU Yi, HancomLinux Inc. +Copyright (C) 2001, 2002 Anthony Fok, ThizLinux Laboratory Ltd. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + +


+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/qbitarray-h.html b/doc/html/qbitarray-h.html new file mode 100644 index 00000000..754bf12d --- /dev/null +++ b/doc/html/qbitarray-h.html @@ -0,0 +1,214 @@ + + + + + +qbitarray.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qbitarray.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qbitarray.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQBitArray class
+**
+** Created : 940118
+**
+** 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 retquirements 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 TQBITARRAY_H
+#define TQBITARRAY_H
+
+#ifndef QT_H
+#include "qstring.h"
+#endif // QT_H
+
+
+/*****************************************************************************
+  TQBitVal class; a context class for TQBitArray::operator[]
+ *****************************************************************************/
+
+class TQBitArray;
+
+class Q_EXPORT TQBitVal
+{
+private:
+    TQBitArray *array;
+    uint    index;
+public:
+    TQBitVal( TQBitArray *a, uint i ) : array(a), index(i) {}
+    operator int();
+    TQBitVal &operator=( const TQBitVal &v );
+    TQBitVal &operator=( bool v );
+};
+
+
+/*****************************************************************************
+  TQBitArray class
+ *****************************************************************************/
+
+class Q_EXPORT TQBitArray : public TQByteArray
+{
+public:
+    TQBitArray();
+    TQBitArray( uint size );
+    TQBitArray( const TQBitArray &a ) : TQByteArray( a ) {}
+
+    TQBitArray &operator=( const TQBitArray & );
+
+    uint    size() const;
+    bool    resize( uint size );
+
+    bool    fill( bool v, int size = -1 );
+
+    void    detach();
+    TQBitArray copy() const;
+
+    bool    testBit( uint index ) const;
+    void    setBit( uint index );
+    void    setBit( uint index, bool value );
+    void    clearBit( uint index );
+    bool    toggleBit( uint index );
+
+    bool    at( uint index ) const;
+    TQBitVal operator[]( int index );
+    bool operator[]( int index ) const;
+
+    TQBitArray &operator&=( const TQBitArray & );
+    TQBitArray &operator|=( const TQBitArray & );
+    TQBitArray &operator^=( const TQBitArray & );
+    TQBitArray  operator~() const;
+
+protected:
+    struct bitarr_data : public TQGArray::array_data {
+	uint   nbits;
+    };
+    array_data *newData()		    { return new bitarr_data; }
+    void	deleteData( array_data *d ) { delete (bitarr_data*)d; }
+private:
+    void    pad0();
+};
+
+
+inline TQBitArray &TQBitArray::operator=( const TQBitArray &a )
+{ return (TQBitArray&)assign( a ); }
+
+inline uint TQBitArray::size() const
+{ return ((bitarr_data*)sharedBlock())->nbits; }
+
+inline void TQBitArray::setBit( uint index, bool value )
+{ if ( value ) setBit(index); else clearBit(index); }
+
+inline bool TQBitArray::at( uint index ) const
+{ return testBit(index); }
+
+inline TQBitVal TQBitArray::operator[]( int index )
+{ return TQBitVal( (TQBitArray*)this, index ); }
+
+inline bool TQBitArray::operator[]( int index ) const
+{ return testBit( index ); }
+
+
+/*****************************************************************************
+  Misc. TQBitArray operator functions
+ *****************************************************************************/
+
+Q_EXPORT TQBitArray operator&( const TQBitArray &, const TQBitArray & );
+Q_EXPORT TQBitArray operator|( const TQBitArray &, const TQBitArray & );
+Q_EXPORT TQBitArray operator^( const TQBitArray &, const TQBitArray & );
+
+
+inline TQBitVal::operator int()
+{
+    return array->testBit( index );
+}
+
+inline TQBitVal &TQBitVal::operator=( const TQBitVal &v )
+{
+    array->setBit( index, v.array->testBit(v.index) );
+    return *this;
+}
+
+inline TQBitVal &TQBitVal::operator=( bool v )
+{
+    array->setBit( index, v );
+    return *this;
+}
+
+
+/*****************************************************************************
+  TQBitArray stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQBitArray & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQBitArray & );
+#endif
+
+#endif // TQBITARRAY_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbitarray-members.html b/doc/html/qbitarray-members.html new file mode 100644 index 00000000..fd957eee --- /dev/null +++ b/doc/html/qbitarray-members.html @@ -0,0 +1,82 @@ + + + + + +TQBitArray Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQBitArray

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbitarray.html b/doc/html/qbitarray.html new file mode 100644 index 00000000..7584aa87 --- /dev/null +++ b/doc/html/qbitarray.html @@ -0,0 +1,350 @@ + + + + + +TQBitArray Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQBitArray Class Reference

+ +

The TQBitArray class provides an array of bits. +More... +

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

+

#include <qbitarray.h> +

Inherits TQByteArray. +

List of all member functions. +

Public Members

+ +

Related Functions

+
    +
  • TQBitArray operator& ( const TQBitArray & a1, const TQBitArray & a2 )
  • +
  • TQBitArray operator| ( const TQBitArray & a1, const TQBitArray & a2 )
  • +
  • TQBitArray operator^ ( const TQBitArray & a1, const TQBitArray & a2 )
  • +
  • TQDataStream & operator<< ( TQDataStream & s, const TQBitArray & a )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQBitArray & a )
  • +
+

Detailed Description

+ + + +The TQBitArray class provides an array of bits. +

+ + +

Because TQBitArray is a TQMemArray, it uses explicit sharing with a reference count. +

A TQBitArray is a special byte array that can access individual +bits and perform bit-operations (AND, OR, XOR and NOT) on entire +arrays or bits. +

Bits can be manipulated by the setBit() and clearBit() functions, +but it is also possible to use the indexing [] operator to test +and set individual bits. The [] operator is a little slower than +setBit() and clearBit() because some tricks are retquired to +implement single-bit assignments. +

Example: +

+    TQBitArray a(3);
+    a.setBit( 0 );
+    a.clearBit( 1 );
+    a.setBit( 2 );     // a = [1 0 1]
+
+    TQBitArray b(3);
+    b[0] = 1;
+    b[1] = 1;
+    b[2] = 0;          // b = [1 1 0]
+
+    TQBitArray c;
+    c = ~a & b;        // c = [0 1 0]
+    
+ +

When a TQBitArray is constructed the bits are uninitialized. Use +fill() to set all the bits to 0 or 1. The array can be resized +with resize() and copied with copy(). Bits can be set with +setBit() and cleared with clearBit(). Bits can be toggled with +toggleBit(). A bit's value can be obtained with testBit() and with +at(). +

TQBitArray supports the & (AND), | (OR), ^ (XOR) and ~ (NOT) +operators. +

See also Collection Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQBitArray::TQBitArray () +

+Constructs an empty bit array. + +

TQBitArray::TQBitArray ( uint size ) +

+Constructs a bit array of size bits. The bits are uninitialized. +

See also fill(). + +

TQBitArray::TQBitArray ( const TQBitArray & a ) +

+ +

Constructs a shallow copy of a. + +

bool TQBitArray::at ( uint index ) const +

+ +

Returns the value (0 or 1) of the bit at position index. +

See also operator[](). + +

void TQBitArray::clearBit ( uint index ) +

+Clears the bit at position index, i.e. sets it to 0. +

See also setBit() and toggleBit(). + +

TQBitArray TQBitArray::copy () const +

+Returns a deep copy of the bit array. +

See also detach(). + +

void TQBitArray::detach () [virtual] +

+Detaches from shared bit array data and makes sure that this bit +array is the only one referring to the data. +

If multiple bit arrays share common data, this bit array +dereferences the data and gets a copy of the data. Nothing happens +if there is only a single reference. +

See also copy(). + +

Reimplemented from TQMemArray. +

bool TQBitArray::fill ( bool v, int size = -1 ) +

+Fills the bit array with v (1's if v is TRUE, or 0's if v +is FALSE). +

fill() resizes the bit array to size bits if size is +nonnegative. +

Returns FALSE if a nonnegative size was specified and the bit +array could not be resized; otherwise returns TRUE. +

See also resize(). + +

TQBitArray & TQBitArray::operator&= ( const TQBitArray & a ) +

+Performs the AND operation between all bits in this bit array and +a. Returns a reference to this bit array. +

The result has the length of the longest of the two bit arrays, +with any missing bits (i.e. if one array is shorter than the +other), taken to be 0. +

+    TQBitArray a( 3 ), b( 2 );
+    a[0] = 1;  a[1] = 0;  a[2] = 1;     // a = [1 0 1]
+    b[0] = 1;  b[1] = 0;                // b = [1 0]
+    a &= b;                             // a = [1 0 0]
+    
+ +

See also operator|=(), operator^=(), and operator~(). + +

TQBitArray & TQBitArray::operator= ( const TQBitArray & a ) +

+ +

Assigns a shallow copy of a to this bit array and returns a +reference to this array. + +

TQBitVal TQBitArray::operator[] ( int index ) +

+ +

Implements the [] operator for bit arrays. +

The returned TQBitVal is a context object. It makes it possible to +get and set a single bit value by its index position. +

Example: +

+    TQBitArray a( 3 );
+    a[0] = 0;
+    a[1] = 1;
+    a[2] = a[0] ^ a[1];
+    
+ +

The functions testBit(), setBit() and clearBit() are faster. +

See also at(). + +

bool TQBitArray::operator[] ( int index ) const +

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

Implements the [] operator for constant bit arrays. + +

TQBitArray & TQBitArray::operator^= ( const TQBitArray & a ) +

+Performs the XOR operation between all bits in this bit array and +a. Returns a reference to this bit array. +

The result has the length of the longest of the two bit arrays, +with any missing bits (i.e. if one array is shorter than the +other), taken to be 0. +

+    TQBitArray a( 3 ), b( 2 );
+    a[0] = 1;  a[1] = 0;  a[2] = 1;     // a = [1 0 1]
+    b[0] = 1;  b[1] = 0;                // b = [1 0]
+    a ^= b;                             // a = [0 0 1]
+    
+ +

See also operator&=(), operator|=(), and operator~(). + +

TQBitArray & TQBitArray::operator|= ( const TQBitArray & a ) +

+Performs the OR operation between all bits in this bit array and +a. Returns a reference to this bit array. +

The result has the length of the longest of the two bit arrays, +with any missing bits (i.e. if one array is shorter than the +other), taken to be 0. +

+    TQBitArray a( 3 ), b( 2 );
+    a[0] = 1;  a[1] = 0;  a[2] = 1;     // a = [1 0 1]
+    b[0] = 1;  b[1] = 0;                // b = [1 0]
+    a |= b;                             // a = [1 0 1]
+    
+ +

See also operator&=(), operator^=(), and operator~(). + +

TQBitArray TQBitArray::operator~ () const +

+Returns a bit array that contains the inverted bits of this bit array. +

Example: +

+    TQBitArray a( 3 ), b;
+    a[0] = 1;  a[1] = 0; a[2] = 1;      // a = [1 0 1]
+    b = ~a;                             // b = [0 1 0]
+    
+ + +

bool TQBitArray::resize ( uint size ) +

+Resizes the bit array to size bits and returns TRUE if the bit +array could be resized; otherwise returns FALSE. The array becomes +a null array if size == 0. +

If the array is expanded, the new bits are set to 0. +

See also size(). + +

void TQBitArray::setBit ( uint index, bool value ) +

+ +

Sets the bit at position index to value. +

Equivalent to: +

+    if ( value )
+        setBit( index );
+    else
+        clearBit( index );
+    
+ +

See also clearBit() and toggleBit(). + +

void TQBitArray::setBit ( uint index ) +

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

Sets the bit at position index to 1. +

See also clearBit() and toggleBit(). + +

uint TQBitArray::size () const +

+ +

Returns the bit array's size (number of bits). +

See also resize(). + +

bool TQBitArray::testBit ( uint index ) const +

+Returns TRUE if the bit at position index is set, i.e. is 1; +otherwise returns FALSE. +

See also setBit() and clearBit(). + +

bool TQBitArray::toggleBit ( uint index ) +

+Toggles the bit at position index. +

If the previous value was 0, the new value will be 1. If the +previous value was 1, the new value will be 0. +

See also setBit() and clearBit(). + +


Related Functions

+

TQBitArray operator& ( const TQBitArray & a1, const TQBitArray & a2 ) +

+ +

Returns the AND result between the bit arrays a1 and a2. +

The result has the length of the longest of the two bit arrays, +with any missing bits (i.e. if one array is shorter than the +other), taken to be 0. +

See also TQBitArray::operator&=(). + +

TQDataStream & operator<< ( TQDataStream & s, const TQBitArray & a ) +

+ +

Writes bit array a to stream s. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQBitArray & a ) +

+ +

Reads a bit array into a from stream s. +

See also Format of the TQDataStream operators. + +

TQBitArray operator^ ( const TQBitArray & a1, const TQBitArray & a2 ) +

+ +

Returns the XOR result between the bit arrays a1 and a2. +

The result has the length of the longest of the two bit arrays, +with any missing bits (i.e. if one array is shorter than the +other), taken to be 0. +

See also TQBitArray::operator^(). + +

TQBitArray operator| ( const TQBitArray & a1, const TQBitArray & a2 ) +

+ +

Returns the OR result between the bit arrays a1 and a2. +

The result has the length of the longest of the two bit arrays, +with any missing bits (i.e. if one array is shorter than the +other), taken to be 0. +

See also TQBitArray::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/qbitmap-h.html b/doc/html/qbitmap-h.html new file mode 100644 index 00000000..cd46a33f --- /dev/null +++ b/doc/html/qbitmap-h.html @@ -0,0 +1,118 @@ + + + + + +qbitmap.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qbitmap.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qbitmap.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQBitmap class
+**
+** Created : 941020
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQBITMAP_H
+#define TQBITMAP_H
+
+#ifndef QT_H
+#include "qpixmap.h"
+#endif // QT_H
+
+
+class Q_EXPORT TQBitmap : public TQPixmap
+{
+public:
+    TQBitmap();
+    TQBitmap( int w, int h,  bool clear = FALSE,
+	     TQPixmap::Optimization = TQPixmap::DefaultOptim );
+    TQBitmap( const TQSize &, bool clear = FALSE,
+	     TQPixmap::Optimization = TQPixmap::DefaultOptim );
+    TQBitmap( int w, int h,  const uchar *bits, bool isXbitmap=FALSE );
+    TQBitmap( const TQSize &, const uchar *bits, bool isXbitmap=FALSE );
+    TQBitmap( const TQBitmap & );
+#ifndef QT_NO_IMAGEIO
+    TQBitmap( const TQString &fileName, const char *format=0 );
+#endif
+    TQBitmap &operator=( const TQBitmap & );
+    TQBitmap &operator=( const TQPixmap & );
+    TQBitmap &operator=( const TQImage  & );
+
+#ifndef QT_NO_PIXMAP_TRANSFORMATION
+    TQBitmap  xForm( const TQWMatrix & ) const;
+#endif
+};
+
+
+#endif // TQBITMAP_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbitmap-members.html b/doc/html/qbitmap-members.html new file mode 100644 index 00000000..5a19cb75 --- /dev/null +++ b/doc/html/qbitmap-members.html @@ -0,0 +1,107 @@ + + + + + +TQBitmap Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQBitmap

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbitmap.html b/doc/html/qbitmap.html new file mode 100644 index 00000000..2e2f3f78 --- /dev/null +++ b/doc/html/qbitmap.html @@ -0,0 +1,186 @@ + + + + + +TQBitmap Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQBitmap Class Reference

+ +

The TQBitmap class provides monochrome (1-bit depth) pixmaps. +More... +

#include <qbitmap.h> +

Inherits TQPixmap. +

List of all member functions. +

Public Members

+
    +
  • TQBitmap ()
  • +
  • TQBitmap ( int w, int h, bool clear = FALSE, TQPixmap::Optimization optimization = TQPixmap::DefaultOptim )
  • +
  • TQBitmap ( const TQSize & size, bool clear = FALSE, TQPixmap::Optimization optimization = TQPixmap::DefaultOptim )
  • +
  • TQBitmap ( int w, int h, const uchar * bits, bool isXbitmap = FALSE )
  • +
  • TQBitmap ( const TQSize & size, const uchar * bits, bool isXbitmap = FALSE )
  • +
  • TQBitmap ( const TQBitmap & bitmap )
  • +
  • TQBitmap ( const TQString & fileName, const char * format = 0 )
  • +
  • TQBitmap & operator= ( const TQBitmap & bitmap )
  • +
  • TQBitmap & operator= ( const TQPixmap & pixmap )
  • +
  • TQBitmap & operator= ( const TQImage & image )
  • +
  • TQBitmap xForm ( const TQWMatrix & matrix ) const
  • +
+

Detailed Description

+ + +The TQBitmap class provides monochrome (1-bit depth) pixmaps. +

+ + +

The TQBitmap class is a monochrome off-screen paint device used +mainly for creating custom TQCursor and TQBrush objects, in +TQPixmap::setMask() and for TQRegion. +

A TQBitmap is a TQPixmap with a depth +of 1. If a pixmap with a depth greater than 1 is assigned to a +bitmap, the bitmap will be dithered automatically. A TQBitmap is +guaranteed to always have the depth 1, unless it is +TQPixmap::isNull() which has depth 0. +

When drawing in a TQBitmap (or TQPixmap with depth 1), we recommend +using the TQColor objects TQt::color0 and TQt::color1. +Painting with color0 sets the bitmap bits to 0, and painting +with color1 sets the bits to 1. For a bitmap, 0-bits indicate +background (or transparent) and 1-bits indicate foreground (or +opaque). Using the black and white TQColor objects make no +sense because the TQColor::pixel() value is not necessarily 0 for +black and 1 for white. +

The TQBitmap can be transformed (translated, scaled, sheared or +rotated) using xForm(). +

Just like the TQPixmap class, TQBitmap is optimized by the use of +implicit sharing, so it is very +efficient to pass TQBitmap objects as arguments. +

See also TQPixmap, TQPainter::drawPixmap(), bitBlt(), Shared Classes, Graphics Classes, Image Processing Classes, and Implicitly and Explicitly Shared Classes. + +


Member Function Documentation

+

TQBitmap::TQBitmap () +

+Constructs a null bitmap. +

See also TQPixmap::isNull(). + +

TQBitmap::TQBitmap ( int w, int h, bool clear = FALSE, TQPixmap::Optimization optimization = TQPixmap::DefaultOptim ) +

+Constructs a bitmap with width w and height h. +

The contents of the bitmap is uninitialized if clear is FALSE; +otherwise it is filled with pixel value 0 (the TQColor TQt::color0). +

The optional optimization argument specifies the optimization +setting for the bitmap. The default optimization should be used in +most cases. Games and other pixmap-intensive applications may +benefit from setting this argument; see TQPixmap::Optimization. +

See also TQPixmap::setOptimization() and TQPixmap::setDefaultOptimization(). + +

TQBitmap::TQBitmap ( const TQSize & size, bool clear = FALSE, TQPixmap::Optimization optimization = TQPixmap::DefaultOptim ) +

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

Constructs a bitmap with the size size. +

The contents of the bitmap is uninitialized if clear is FALSE; +otherwise it is filled with pixel value 0 (the TQColor TQt::color0). +

The optional optimization argument specifies the optimization +setting for the bitmap. The default optimization should be used in +most cases. Games and other pixmap-intensive applications may +benefit from setting this argument; see TQPixmap::Optimization. + +

TQBitmap::TQBitmap ( int w, int h, const uchar * bits, bool isXbitmap = FALSE ) +

+Constructs a bitmap with width w and height h and sets the +contents to bits. +

The isXbitmap flag should be TRUE if bits was generated by +the X11 bitmap program. The X bitmap bit order is little endian. +The TQImage documentation discusses bit order of monochrome images. +

Example (creates an arrow bitmap): +

+        uchar arrow_bits[] = { 0x3f, 0x1f, 0x0f, 0x1f, 0x3b, 0x71, 0xe0, 0xc0 };
+        TQBitmap bm( 8, 8, arrow_bits, TRUE );
+    
+ + +

TQBitmap::TQBitmap ( const TQSize & size, const uchar * bits, bool isXbitmap = FALSE ) +

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

Constructs a bitmap with the size size and sets the contents to +bits. +

The isXbitmap flag should be TRUE if bits was generated by +the X11 bitmap program. The X bitmap bit order is little endian. +The TQImage documentation discusses bit order of monochrome images. + +

TQBitmap::TQBitmap ( const TQBitmap & bitmap ) +

+Constructs a bitmap that is a copy of bitmap. + +

TQBitmap::TQBitmap ( const TQString & fileName, const char * format = 0 ) +

+Constructs a bitmap from the file fileName. If the file does +not exist or is of an unknown format, the bitmap becomes a null +bitmap. +

The parameters fileName and format are passed on to +TQPixmap::load(). Dithering will be performed if the file format +uses more than 1 bit per pixel. +

See also TQPixmap::isNull(), TQPixmap::load(), TQPixmap::loadFromData(), TQPixmap::save(), and TQPixmap::imageFormat(). + +

TQBitmap & TQBitmap::operator= ( const TQBitmap & bitmap ) +

+Assigns the bitmap bitmap to this bitmap and returns a +reference to this bitmap. + +

TQBitmap & TQBitmap::operator= ( const TQPixmap & pixmap ) +

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

Assigns the pixmap pixmap to this bitmap and returns a +reference to this bitmap. +

Dithering will be performed if the pixmap has a TQPixmap::depth() +greater than 1. + +

TQBitmap & TQBitmap::operator= ( const TQImage & image ) +

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

Converts the image image to a bitmap and assigns the result to +this bitmap. Returns a reference to the bitmap. +

Dithering will be performed if the image has a TQImage::depth() +greater than 1. + +

TQBitmap TQBitmap::xForm ( const TQWMatrix & matrix ) const +

+Returns a transformed copy of this bitmap by using matrix. +

This function does exactly the same as TQPixmap::xForm(), except +that it returns a TQBitmap instead of a TQPixmap. +

See also TQPixmap::xForm(). + + +


+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/qbitval-members.html b/doc/html/qbitval-members.html new file mode 100644 index 00000000..ca208f0a --- /dev/null +++ b/doc/html/qbitval-members.html @@ -0,0 +1,49 @@ + + + + + +TQBitVal Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQBitVal

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbitval.html b/doc/html/qbitval.html new file mode 100644 index 00000000..759a7427 --- /dev/null +++ b/doc/html/qbitval.html @@ -0,0 +1,90 @@ + + + + + +TQBitVal Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQBitVal Class Reference

+ +

The TQBitVal class is an internal class, used with TQBitArray. +More... +

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

+

#include <qbitarray.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQBitVal class is an internal class, used with TQBitArray. +

+

The TQBitVal is retquired by the indexing [] operator on bit arrays. +It is not for use in any other context. +

See also Collection Classes. + +


Member Function Documentation

+

TQBitVal::TQBitVal ( TQBitArray * a, uint i ) +

+ +

Constructs a reference to element i in the TQBitArray a. +This is what TQBitArray::operator[] constructs its return value +with. + +

TQBitVal::operator int () +

+ +

Returns the value referenced by the TQBitVal. + +

TQBitVal & TQBitVal::operator= ( const TQBitVal & v ) +

+ +

Sets the value referenced by the TQBitVal to that referenced by +TQBitVal v. + +

TQBitVal & TQBitVal::operator= ( bool v ) +

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

Sets the value referenced by the TQBitVal to v. + + +


+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/qboxlayout-members.html b/doc/html/qboxlayout-members.html new file mode 100644 index 00000000..64d1dcc7 --- /dev/null +++ b/doc/html/qboxlayout-members.html @@ -0,0 +1,144 @@ + + + + + +TQBoxLayout Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQBoxLayout

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qboxlayout.html b/doc/html/qboxlayout.html new file mode 100644 index 00000000..4eb2d65d --- /dev/null +++ b/doc/html/qboxlayout.html @@ -0,0 +1,367 @@ + + + + + +TQBoxLayout Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQBoxLayout Class Reference

+ +

The TQBoxLayout class lines up child widgets horizontally or +vertically. +More... +

#include <qlayout.h> +

Inherits TQLayout. +

Inherited by TQHBoxLayout and TQVBoxLayout. +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • void insertItem ( int index, TQLayoutItem * item )
  • +
+

Detailed Description

+ + +

The TQBoxLayout class lines up child widgets horizontally or +vertically. +

+ +

TQBoxLayout takes the space it gets (from its parent layout or from +the mainWidget()), divides it up into a row of boxes, and makes +each managed widget fill one box. +

Horizontal box with five child widgets
+

If the TQBoxLayout's orientation is Horizontal the boxes are +placed in a row, with suitable sizes. Each widget (or other box) +will get at least its minimum size and at most its maximum size. +Any excess space is shared according to the stretch factors (more +about that below). +

Vertical box with five child widgets
+

If the TQBoxLayout's orientation is Vertical, the boxes are +placed in a column, again with suitable sizes. +

The easiest way to create a TQBoxLayout is to use one of the +convenience classes, e.g. TQHBoxLayout (for Horizontal boxes) or +TQVBoxLayout (for Vertical boxes). You can also use the +TQBoxLayout constructor directly, specifying its direction as LeftToRight, Down, RightToLeft or Up. +

If the TQBoxLayout is not the top-level layout (i.e. it is not +managing all of the widget's area and children), you must add it +to its parent layout before you can do anything with it. The +normal way to add a layout is by calling +parentLayout->addLayout(). +

Once you have done this, you can add boxes to the TQBoxLayout using +one of four functions: +

    +
  • addWidget() to add a widget to the TQBoxLayout and set the +widget's stretch factor. (The stretch factor is along the row of +boxes.) +

  • addSpacing() to create an empty box; this is one of the +functions you use to create nice and spacious dialogs. See below +for ways to set margins. +

  • addStretch() to create an empty, stretchable box. +

  • addLayout() to add a box containing another TQLayout to the row +and set that layout's stretch factor. +
+

Use insertWidget(), insertSpacing(), insertStretch() or +insertLayout() to insert a box at a specified position in the +layout. +

TQBoxLayout also includes two margin widths: +

    +
  • setMargin() sets the width of the outer border. This is the width +of the reserved space along each of the TQBoxLayout's four sides. +
  • setSpacing() sets the width between neighboring boxes. (You +can use addSpacing() to get more space at a particular spot.) +
+

The margin defaults to 0. The spacing defaults to the same as the +margin width for a top-level layout, or to the same as the parent +layout. Both are parameters to the constructor. +

To remove a widget from a layout, call remove(). Calling +TQWidget::hide() on a widget also effectively removes the widget +from the layout until TQWidget::show() is called. +

You will almost always want to use TQVBoxLayout and TQHBoxLayout +rather than TQBoxLayout because of their convenient constructors. +

See also TQGrid, Layout Overview, Widget Appearance and Style, and Layout Management. + +


Member Type Documentation

+

TQBoxLayout::Direction

+ +

This type is used to determine the direction of a box layout. +

    +
  • TQBoxLayout::LeftToRight - Horizontal, from left to right +
  • TQBoxLayout::RightToLeft - Horizontal, from right to left +
  • TQBoxLayout::TopToBottom - Vertical, from top to bottom +
  • TQBoxLayout::Down - The same as TopToBottom +
  • TQBoxLayout::BottomToTop - Vertical, from bottom to top +
  • TQBoxLayout::Up - The same as BottomToTop +
+

Member Function Documentation

+

TQBoxLayout::TQBoxLayout ( TQWidget * parent, Direction d, int margin = 0, int spacing = -1, const char * name = 0 ) +

+Constructs a new TQBoxLayout with direction d and main widget parent. parent may not be 0. +

The margin is the number of pixels between the edge of the +widget and its managed children. The spacing is the default +number of pixels between neighboring children. If spacing is -1 +the value of margin is used for spacing. +

name is the internal object name. +

See also direction(). + +

TQBoxLayout::TQBoxLayout ( TQLayout * parentLayout, Direction d, int spacing = -1, const char * name = 0 ) +

+Constructs a new TQBoxLayout called name, with direction d, +and inserts it into parentLayout. +

The spacing is the default number of pixels between neighboring +children. If spacing is -1, the layout will inherit its +parent's spacing(). + +

TQBoxLayout::TQBoxLayout ( Direction d, int spacing = -1, const char * name = 0 ) +

+Constructs a new TQBoxLayout called name, with direction d. +

If spacing is -1, the layout will inherit its parent's +spacing(); otherwise spacing is used. +

You must insert this box into another layout. + +

TQBoxLayout::~TQBoxLayout () +

+Destroys this box layout. +

The layout's widgets aren't destroyed. + +

void TQBoxLayout::addItem ( TQLayoutItem * item ) [virtual] +

+Adds item to the end of this box layout. + +

Examples: chart/optionsform.cpp and chart/setdataform.cpp. +

Reimplemented from TQLayout. +

void TQBoxLayout::addLayout ( TQLayout * layout, int stretch = 0 ) +

+Adds layout to the end of the box, with serial stretch factor +stretch. +

When a layout is constructed with another layout as its parent, +you don't need to call addLayout(); the child layout is +automatically added to the parent layout as it is constructed. +

See also insertLayout(), setAutoAdd(), addWidget(), and addSpacing(). + +

Examples: chart/optionsform.cpp, chart/setdataform.cpp, fonts/simple-qfont-demo/viewer.cpp, listbox/listbox.cpp, regexptester/regexptester.cpp, and tictac/tictac.cpp. +

void TQBoxLayout::addSpacing ( int size ) +

+Adds a non-stretchable space with size size to the end of this +box layout. TQBoxLayout provides default margin and spacing. This +function adds additional space. +

See also insertSpacing() and addStretch(). + +

Example: listbox/listbox.cpp. +

void TQBoxLayout::addStretch ( int stretch = 0 ) +

+Adds a stretchable space with zero minimum size and stretch factor +stretch to the end of this box layout. +

See also addSpacing(). + +

Examples: layout/layout.cpp, listbox/listbox.cpp, regexptester/regexptester.cpp, and t13/gamebrd.cpp. +

void TQBoxLayout::addStrut ( int size ) +

+Limits the perpendicular dimension of the box (e.g. height if the +box is LeftToRight) to a minimum of size. Other constraints may +increase the limit. + +

void TQBoxLayout::addWidget ( TQWidget * widget, int stretch = 0, int alignment = 0 ) +

+Adds widget to the end of this box layout, with a stretch factor of stretch and alignment alignment. +

The stretch factor applies only in the direction of the TQBoxLayout, and is relative to the other boxes and +widgets in this TQBoxLayout. Widgets and boxes with higher stretch +factors grow more. +

If the stretch factor is 0 and nothing else in the TQBoxLayout has +a stretch factor greater than zero, the space is distributed +according to the TQWidget:sizePolicy() of each widget that's +involved. +

Alignment is specified by alignment which is a bitwise OR of TQt::AlignmentFlags values. The default alignment is 0, which means +that the widget fills the entire cell. +

From TQt 3.0, the alignment parameter is interpreted more +aggressively than in previous versions of TQt. A non-default +alignment now indicates that the widget should not grow to fill +the available space, but should be sized according to sizeHint(). +

See also insertWidget(), setAutoAdd(), addLayout(), and addSpacing(). + +

Examples: chart/optionsform.cpp, checklists/checklists.cpp, layout/layout.cpp, lineedits/lineedits.cpp, listbox/listbox.cpp, t13/gamebrd.cpp, and t13/lcdrange.cpp. +

Direction TQBoxLayout::direction () const +

+ +

Returns the direction of the box. addWidget() and addSpacing() +work in this direction; the stretch stretches in this direction. +

See also TQBoxLayout::Direction, addWidget(), and addSpacing(). + +

TQSizePolicy::ExpandData TQBoxLayout::expanding () const [virtual] +

+Returns whether this layout can make use of more space than +sizeHint(). A value of Vertical or Horizontal means that it wants +to grow in only one dimension, whereas BothDirections means that +it wants to grow in both dimensions. + +

Reimplemented from TQLayout. +

int TQBoxLayout::findWidget ( TQWidget * w ) +

+Searches for widget w in this layout (not including child +layouts). +

Returns the index of w, or -1 if w is not found. + +

bool TQBoxLayout::hasHeightForWidth () const [virtual] +

+Returns TRUE if this layout's preferred height depends on its width; +otherwise returns FALSE. + +

Reimplemented from TQLayoutItem. +

int TQBoxLayout::heightForWidth ( int w ) const [virtual] +

+Returns the layout's preferred height when it is w pixels wide. + +

Reimplemented from TQLayoutItem. +

void TQBoxLayout::insertItem ( int index, TQLayoutItem * item ) [protected] +

+Inserts item into this box layout at position index. If index is negative, the item is added at the end. +

Warning: Does not call TQLayout::insertChildLayout() if item is +a TQLayout. +

See also addItem() and findWidget(). + +

void TQBoxLayout::insertLayout ( int index, TQLayout * layout, int stretch = 0 ) +

+Inserts layout at position index, with stretch factor stretch. If index is negative, the layout is added at the end. +

layout becomes a child of the box layout. +

See also setAutoAdd(), insertWidget(), and insertSpacing(). + +

void TQBoxLayout::insertSpacing ( int index, int size ) +

+Inserts a non-stretchable space at position index, with size size. If index is negative the space is added at the end. +

The box layout has default margin and spacing. This function adds +additional space. +

See also insertStretch(). + +

void TQBoxLayout::insertStretch ( int index, int stretch = 0 ) +

+Inserts a stretchable space at position index, with zero +minimum size and stretch factor stretch. If index is +negative the space is added at the end. +

See also insertSpacing(). + +

void TQBoxLayout::insertWidget ( int index, TQWidget * widget, int stretch = 0, int alignment = 0 ) +

+Inserts widget at position index, with stretch factor stretch and alignment alignment. If index is negative, the +widget is added at the end. +

The stretch factor applies only in the direction of the TQBoxLayout, and is relative to the other boxes and +widgets in this TQBoxLayout. Widgets and boxes with higher stretch +factors grow more. +

If the stretch factor is 0 and nothing else in the TQBoxLayout has +a stretch factor greater than zero, the space is distributed +according to the TQWidget:sizePolicy() of each widget that's +involved. +

Alignment is specified by alignment, which is a bitwise OR of +TQt::AlignmentFlags values. The default alignment is 0, which +means that the widget fills the entire cell. +

From TQt 3.0, the alignment parameter is interpreted more +aggressively than in previous versions of TQt. A non-default +alignment now indicates that the widget should not grow to fill +the available space, but should be sized according to sizeHint(). +

See also setAutoAdd(), insertLayout(), and insertSpacing(). + +

void TQBoxLayout::invalidate () [virtual] +

+Resets cached information. + +

Reimplemented from TQLayout. +

TQSize TQBoxLayout::maximumSize () const [virtual] +

+Returns the maximum size needed by this box layout. + +

Reimplemented from TQLayout. +

TQSize TQBoxLayout::minimumSize () const [virtual] +

+Returns the minimum size needed by this box layout. + +

Reimplemented from TQLayout. +

void TQBoxLayout::setDirection ( Direction direction ) +

+Sets the direction of this layout to direction. + +

void TQBoxLayout::setGeometry ( const TQRect & r ) [virtual] +

+Resizes managed widgets within the rectangle r. + +

Reimplemented from TQLayout. +

bool TQBoxLayout::setStretchFactor ( TQWidget * w, int stretch ) +

+Sets the stretch factor for widget w to stretch and returns +TRUE if w is found in this layout (not including child +layouts); otherwise returns FALSE. + +

bool TQBoxLayout::setStretchFactor ( TQLayout * l, int stretch ) +

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

Sets the stretch factor for the layout l to stretch and +returns TRUE if l is found in this layout (not including child +layouts); otherwise returns FALSE. + +

TQSize TQBoxLayout::sizeHint () const [virtual] +

+Returns the preferred size of this box layout. + +

Reimplemented from TQLayoutItem. + +


+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/qbrush-h.html b/doc/html/qbrush-h.html new file mode 100644 index 00000000..50938b22 --- /dev/null +++ b/doc/html/qbrush-h.html @@ -0,0 +1,139 @@ + + + + + +qbrush.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qbrush.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qbrush.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQBrush class
+**
+** Created : 940112
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQBRUSH_H
+#define TQBRUSH_H
+
+#ifndef QT_H
+#include "qcolor.h"
+#include "qshared.h"
+#endif // QT_H
+
+
+class Q_EXPORT TQBrush: public TQt
+{
+friend class TQPainter;
+public:
+    TQBrush();
+    TQBrush( BrushStyle );
+    TQBrush( const TQColor &, BrushStyle=SolidPattern );
+    TQBrush( const TQColor &, const TQPixmap & );
+    TQBrush( const TQBrush & );
+   ~TQBrush();
+    TQBrush &operator=( const TQBrush & );
+
+    BrushStyle	style()	 const		{ return data->style; }
+    void	setStyle( BrushStyle );
+    const TQColor &color()const		{ return data->color; }
+    void	setColor( const TQColor & );
+    TQPixmap    *pixmap() const		{ return data->pixmap; }
+    void	setPixmap( const TQPixmap & );
+
+    bool	operator==( const TQBrush &p ) const;
+    bool	operator!=( const TQBrush &b ) const
+					{ return !(operator==(b)); }
+
+private:
+    TQBrush	copy()	const;
+    void	detach();
+    void	init( const TQColor &, BrushStyle );
+    struct TQBrushData : public TQShared {	// brush data
+	BrushStyle style;
+	TQColor	  color;
+	TQPixmap	 *pixmap;
+    } *data;
+};
+
+
+/*****************************************************************************
+  TQBrush stream functions
+ *****************************************************************************/
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQBrush & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQBrush & );
+#endif
+
+#endif // TQBRUSH_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbrush-members.html b/doc/html/qbrush-members.html new file mode 100644 index 00000000..6099d703 --- /dev/null +++ b/doc/html/qbrush-members.html @@ -0,0 +1,57 @@ + + + + + +TQBrush Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQBrush

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbrush.html b/doc/html/qbrush.html new file mode 100644 index 00000000..088a97cc --- /dev/null +++ b/doc/html/qbrush.html @@ -0,0 +1,239 @@ + + + + + +TQBrush Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQBrush Class Reference

+ +

The TQBrush class defines the fill pattern of shapes drawn by a TQPainter. +More... +

#include <qbrush.h> +

Inherits TQt. +

List of all member functions. +

Public Members

+
    +
  • TQBrush ()
  • +
  • TQBrush ( BrushStyle style )
  • +
  • TQBrush ( const TQColor & color, BrushStyle style = SolidPattern )
  • +
  • TQBrush ( const TQColor & color, const TQPixmap & pixmap )
  • +
  • TQBrush ( const TQBrush & b )
  • +
  • ~TQBrush ()
  • +
  • TQBrush & operator= ( const TQBrush & b )
  • +
  • BrushStyle style () const
  • +
  • void setStyle ( BrushStyle s )
  • +
  • const TQColor & color () const
  • +
  • void setColor ( const TQColor & c )
  • +
  • TQPixmap * pixmap () const
  • +
  • void setPixmap ( const TQPixmap & pixmap )
  • +
  • bool operator== ( const TQBrush & b ) const
  • +
  • bool operator!= ( const TQBrush & b ) const
  • +
+

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQBrush & b )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQBrush & b )
  • +
+

Detailed Description

+ + +

The TQBrush class defines the fill pattern of shapes drawn by a TQPainter. +

+ + +

A brush has a style and a color. One of the brush styles is a +custom pattern, which is defined by a TQPixmap. +

The brush style defines the fill pattern. The default brush style +is NoBrush (depending on how you construct a brush). This style +tells the painter to not fill shapes. The standard style for +filling is SolidPattern. +

The brush color defines the color of the fill pattern. The TQColor +documentation lists the predefined colors. +

Use the TQPen class for specifying line/outline styles. +

Example: +

+        TQPainter painter;
+        TQBrush   brush( yellow );           // yellow solid pattern
+        painter.begin( &anyPaintDevice );   // paint something
+        painter.setBrush( brush );          // set the yellow brush
+        painter.setPen( NoPen );            // do not draw outline
+        painter.drawRect( 40,30, 200,100 ); // draw filled rectangle
+        painter.setBrush( NoBrush );        // do not fill
+        painter.setPen( black );            // set black pen, 0 pixel width
+        painter.drawRect( 10,10, 30,20 );   // draw rectangle outline
+        painter.end();                      // painting done
+    
+ +

See the setStyle() function for a complete list of brush styles. +

Brush Styles
+

See also TQPainter, TQPainter::setBrush(), TQPainter::setBrushOrigin(), Graphics Classes, Image Processing Classes, and Implicitly and Explicitly Shared Classes. + +


Member Function Documentation

+

TQBrush::TQBrush () +

+Constructs a default black brush with the style NoBrush (will +not fill shapes). + +

TQBrush::TQBrush ( BrushStyle style ) +

+Constructs a black brush with the style style. +

See also setStyle(). + +

TQBrush::TQBrush ( const TQColor & color, BrushStyle style = SolidPattern ) +

+Constructs a brush with the color color and the style style. +

See also setColor() and setStyle(). + +

TQBrush::TQBrush ( const TQColor & color, const TQPixmap & pixmap ) +

+Constructs a brush with the color color and a custom pattern +stored in pixmap. +

The color will only have an effect for monochrome pixmaps, i.e. +for TQPixmap::depth() == 1. +

Pixmap brushes are currently not supported when printing on X11. +

See also setColor() and setPixmap(). + +

TQBrush::TQBrush ( const TQBrush & b ) +

+Constructs a brush that is a shallow + copy of b. + +

TQBrush::~TQBrush () +

+Destroys the brush. + +

const TQColor & TQBrush::color () const +

+ +

Returns the brush color. +

See also setColor(). + +

bool TQBrush::operator!= ( const TQBrush & b ) const +

+ +

Returns TRUE if the brush is different from b; otherwise +returns FALSE. +

Two brushes are different if they have different styles, colors or +pixmaps. +

See also operator==(). + +

TQBrush & TQBrush::operator= ( const TQBrush & b ) +

+Assigns b to this brush and returns a reference to this brush. + +

bool TQBrush::operator== ( const TQBrush & b ) const +

+Returns TRUE if the brush is equal to b; otherwise returns +FALSE. +

Two brushes are equal if they have equal styles, colors and +pixmaps. +

See also operator!=(). + +

TQPixmap * TQBrush::pixmap () const +

+ +

Returns a pointer to the custom brush pattern, or 0 if no custom +brush pattern has been set. +

See also setPixmap(). + +

Example: richtext/richtext.cpp. +

void TQBrush::setColor ( const TQColor & c ) +

+Sets the brush color to c. +

See also color() and setStyle(). + +

Example: picture/picture.cpp. +

void TQBrush::setPixmap ( const TQPixmap & pixmap ) +

+Sets the brush pixmap to pixmap. The style is set to CustomPattern. +

The current brush color will only have an effect for monochrome +pixmaps, i.e. for TQPixmap::depth() == 1. +

Pixmap brushes are currently not supported when printing on X11. +

See also pixmap() and color(). + +

Example: richtext/richtext.cpp. +

void TQBrush::setStyle ( BrushStyle s ) +

+Sets the brush style to s. +

The brush styles are: +

+
Pattern Meaning +
NoBrush will not fill shapes (default). +
SolidPattern solid (100%) fill pattern. +
Dense1Pattern 94% fill pattern. +
Dense2Pattern 88% fill pattern. +
Dense3Pattern 63% fill pattern. +
Dense4Pattern 50% fill pattern. +
Dense5Pattern 37% fill pattern. +
Dense6Pattern 12% fill pattern. +
Dense7Pattern 6% fill pattern. +
HorPattern horizontal lines pattern. +
VerPattern vertical lines pattern. +
CrossPattern crossing lines pattern. +
BDiagPattern diagonal lines (directed /) pattern. +
FDiagPattern diagonal lines (directed \) pattern. +
DiagCrossPattern diagonal crossing lines pattern. +
CustomPattern set when a pixmap pattern is being used. +
+

On Windows, dense and custom patterns cannot be transparent. +

See the Detailed Description for a picture +of all the styles. +

See also style(). + +

BrushStyle TQBrush::style () const +

+ +

Returns the brush style. +

See also setStyle(). + +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQBrush & b ) +

+ +

Writes the brush b to the stream s and returns a reference +to the stream. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQBrush & b ) +

+ +

Reads the brush b from the stream s and returns a reference +to the stream. +

See also Format of the TQDataStream operators. + + +


+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/qbttngrp-m.png b/doc/html/qbttngrp-m.png new file mode 100644 index 00000000..fd776477 Binary files /dev/null and b/doc/html/qbttngrp-m.png differ diff --git a/doc/html/qbttngrp-w.png b/doc/html/qbttngrp-w.png new file mode 100644 index 00000000..fdbc76f3 Binary files /dev/null and b/doc/html/qbttngrp-w.png differ diff --git a/doc/html/qbuffer-h.html b/doc/html/qbuffer-h.html new file mode 100644 index 00000000..b7ec7c80 --- /dev/null +++ b/doc/html/qbuffer-h.html @@ -0,0 +1,148 @@ + + + + + +qbuffer.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qbuffer.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qbuffer.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQBuffer class
+**
+** Created : 930812
+**
+** 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 retquirements 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 TQBUFFER_H
+#define TQBUFFER_H
+
+#ifndef QT_H
+#include "qiodevice.h"
+#include "qstring.h"
+#endif // QT_H
+
+
+class Q_EXPORT TQBuffer : public TQIODevice
+{
+public:
+    TQBuffer();
+    TQBuffer( TQByteArray );
+   ~TQBuffer();
+
+    TQByteArray buffer() const;
+    bool  setBuffer( TQByteArray );
+
+    bool  open( int );
+    void  close();
+    void  flush();
+
+    Offset size() const;
+    Offset at() const;
+    bool  at( Offset );
+
+    Q_LONG	  readBlock( char *p, Q_ULONG );
+    Q_LONG	  writeBlock( const char *p, Q_ULONG );
+    Q_LONG	  writeBlock( const TQByteArray& data )
+	      { return TQIODevice::writeBlock(data); }
+    Q_LONG	  readLine( char *p, Q_ULONG );
+
+    int	  getch();
+    int	  putch( int );
+    int	  ungetch( int );
+
+protected:
+    TQByteArray a;
+
+private:
+    uint  a_len;
+    uint  a_inc;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQBuffer( const TQBuffer & );
+    TQBuffer &operator=( const TQBuffer & );
+#endif
+};
+
+
+inline TQByteArray TQBuffer::buffer() const
+{ return a; }
+
+inline TQIODevice::Offset TQBuffer::size() const
+{ return (Offset)a.size(); }
+
+inline TQIODevice::Offset TQBuffer::at() const
+{ return ioIndex; }
+
+
+#endif // TQBUFFER_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbuffer-members.html b/doc/html/qbuffer-members.html new file mode 100644 index 00000000..000f2ab5 --- /dev/null +++ b/doc/html/qbuffer-members.html @@ -0,0 +1,87 @@ + + + + + +TQBuffer Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQBuffer

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbuffer.html b/doc/html/qbuffer.html new file mode 100644 index 00000000..3685fee2 --- /dev/null +++ b/doc/html/qbuffer.html @@ -0,0 +1,148 @@ + + + + + +TQBuffer Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQBuffer Class Reference

+ +

The TQBuffer class is an I/O device that operates on a TQByteArray. +More... +

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

+

#include <qbuffer.h> +

Inherits TQIODevice. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQBuffer class is an I/O device that operates on a TQByteArray. +

+ +

TQBuffer is used to read and write to a memory buffer. It is +normally used with a TQTextStream or a TQDataStream. TQBuffer has an +associated TQByteArray which holds the buffer data. The size() of +the buffer is automatically adjusted as data is written. +

The constructor TQBuffer(TQByteArray) creates a TQBuffer using an +existing byte array. The byte array can also be set with +setBuffer(). Writing to the TQBuffer will modify the original byte +array because TQByteArray is explicitly + shared. +

Use open() to open the buffer before use and to set the mode +(read-only, write-only, etc.). close() closes the buffer. The +buffer must be closed before reopening or calling setBuffer(). +

A common way to use TQBuffer is through TQDataStream or TQTextStream, which have constructors that take a TQBuffer +parameter. For convenience, there are also TQDataStream and +TQTextStream constructors that take a TQByteArray parameter. These +constructors create and open an internal TQBuffer. +

Note that TQTextStream can also operate on a TQString (a Unicode +string); a TQBuffer cannot. +

You can also use TQBuffer directly through the standard TQIODevice +functions readBlock(), writeBlock() readLine(), at(), getch(), +putch() and ungetch(). +

See also TQFile, TQDataStream, TQTextStream, TQByteArray, Shared Classes, Collection Classes, and Input/Output and Networking. + +


Member Function Documentation

+

TQBuffer::TQBuffer () +

+Constructs an empty buffer. + +

TQBuffer::TQBuffer ( TQByteArray buf ) +

+Constructs a buffer that operates on buf. +

If you open the buffer in write mode (IO_WriteOnly or +IO_ReadWrite) and write something into the buffer, buf +will be modified. +

Example: +

+    TQCString str = "abc";
+    TQBuffer b( str );
+    b.open( IO_WriteOnly );
+    b.at( 3 ); // position at the 4th character (the terminating \0)
+    b.writeBlock( "def", 4 ); // write "def" including the terminating \0
+    b.close();
+    // Now, str == "abcdef" with a terminating \0
+    
+ +

See also setBuffer(). + +

TQBuffer::~TQBuffer () +

+Destroys the buffer. + +

TQByteArray TQBuffer::buffer () const +

+ +

Returns this buffer's byte array. +

See also setBuffer(). + +

bool TQBuffer::setBuffer ( TQByteArray buf ) +

+Replaces the buffer's contents with buf and returns TRUE. +

Does nothing (and returns FALSE) if isOpen() is TRUE. +

Note that if you open the buffer in write mode (IO_WriteOnly or +IO_ReadWrite) and write something into the buffer, buf is also +modified because TQByteArray is an explicitly shared class. +

See also buffer(), open(), and close(). + +

Q_LONG TQBuffer::writeBlock ( const char * p, Q_ULONG len ) [virtual] +

+Writes len bytes from p into the buffer at the current +index position, overwriting any characters there and extending the +buffer if necessary. Returns the number of bytes actually written. +

Returns -1 if an error occurred. +

See also readBlock(). + +

Reimplemented from TQIODevice. +

Q_LONG TQBuffer::writeBlock ( const TQByteArray & data ) +

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

This convenience function is the same as calling +writeBlock( data.data(), data.size() ) with data. + + +


+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/qbutton-h.html b/doc/html/qbutton-h.html new file mode 100644 index 00000000..bad80e7e --- /dev/null +++ b/doc/html/qbutton-h.html @@ -0,0 +1,279 @@ + + + + + +qbutton.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qbutton.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qbutton.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQButton widget class
+**
+** Created : 940206
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQBUTTON_H
+#define TQBUTTON_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qkeysequence.h"
+#endif // QT_H
+
+#ifndef QT_NO_BUTTON
+
+
+class TQButtonGroup;
+class TQToolBar;
+class TQButtonData;
+
+class Q_EXPORT TQButton : public TQWidget
+{
+    Q_OBJECT
+    Q_ENUMS( ToggleType ToggleState )
+    Q_PROPERTY( TQString text READ text WRITE setText )
+    Q_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap )
+    Q_PROPERTY( TQKeySequence accel READ accel WRITE setAccel )
+    Q_PROPERTY( bool toggleButton READ isToggleButton )
+    Q_PROPERTY( ToggleType toggleType READ toggleType )
+    Q_PROPERTY( bool down READ isDown WRITE setDown DESIGNABLE false  )
+    Q_PROPERTY( bool on READ isOn )
+    Q_PROPERTY( ToggleState toggleState READ state )
+    Q_PROPERTY( bool autoResize READ autoResize WRITE setAutoResize DESIGNABLE false )
+    Q_PROPERTY( bool autoRepeat READ autoRepeat WRITE setAutoRepeat )
+    Q_PROPERTY( bool exclusiveToggle READ isExclusiveToggle )
+
+public:
+    TQButton( TQWidget* parent=0, const char* name=0, WFlags f=0 );
+    ~TQButton();
+
+    TQString text() const;
+    virtual void setText( const TQString &);
+    const TQPixmap *pixmap() const;
+    virtual void setPixmap( const TQPixmap & );
+
+#ifndef QT_NO_ACCEL
+    TQKeySequence		accel()	const;
+    virtual void	setAccel( const TQKeySequence& );
+#endif
+
+    bool	isToggleButton() const;
+
+    enum ToggleType { SingleShot, Toggle, Tristate };
+    ToggleType	toggleType() const;
+
+    virtual void setDown( bool );
+    bool	isDown() const;
+
+    bool	isOn() const;
+
+    enum ToggleState { Off, NoChange, On };
+    ToggleState	state() const;
+
+#ifndef QT_NO_COMPAT
+    bool	autoResize() const;
+    void	setAutoResize( bool );
+#endif
+
+    bool	autoRepeat() const;
+    virtual void setAutoRepeat( bool );
+    bool	isExclusiveToggle() const;
+
+    TQButtonGroup *group() const;
+
+public slots:
+    void	animateClick();
+    void	toggle();
+
+signals:
+    void	pressed();
+    void	released();
+    void	clicked();
+    void	toggled( bool );
+    void	stateChanged( int );
+
+protected:
+    void	setToggleButton( bool );
+    virtual void	setToggleType( ToggleType );
+    void	setOn( bool );
+    virtual void	setState( ToggleState );
+
+    virtual bool hitButton( const TQPoint &pos ) const;
+    virtual void drawButton( TQPainter * );
+    virtual void drawButtonLabel( TQPainter * );
+
+    void	keyPressEvent( TQKeyEvent *);
+    void	keyReleaseEvent( TQKeyEvent *);
+    void	mousePressEvent( TQMouseEvent * );
+    void	mouseReleaseEvent( TQMouseEvent * );
+    void	mouseMoveEvent( TQMouseEvent * );
+    void	paintEvent( TQPaintEvent * );
+    void	focusInEvent( TQFocusEvent * );
+    void	focusOutEvent( TQFocusEvent * );
+
+    void	enabledChange( bool );
+
+private slots:
+    void	animateTimeout();
+    void	autoRepeatTimeout();
+    void	emulateClick();
+
+private:
+    TQString	btext;
+    TQPixmap    *bpixmap;
+    uint	toggleTyp	: 2;
+    uint	buttonDown	: 1;
+    uint	stat		: 2;
+    uint	mlbDown		: 1;
+    uint	autoresize	: 1;
+    uint	animation	: 1;
+    uint	repeat		: 1;
+    TQButtonData *d;
+
+    friend class TQButtonGroup;
+    friend class TQToolBar;
+    void          ensureData();
+    virtual void setGroup( TQButtonGroup* );
+    TQTimer	 *timer();
+    void	nextState();
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQButton( const TQButton & );
+    TQButton &operator=( const TQButton & );
+#endif
+};
+
+
+inline TQString TQButton::text() const
+{
+    return btext;
+}
+
+inline const TQPixmap *TQButton::pixmap() const
+{
+    return bpixmap;
+}
+
+inline bool TQButton::isToggleButton() const
+{
+    return toggleTyp != SingleShot;
+}
+
+inline  bool TQButton::isDown() const
+{
+    return buttonDown;
+}
+
+inline bool TQButton::isOn() const
+{
+    return stat != Off;
+}
+
+#ifndef QT_NO_COMPAT
+inline bool TQButton::autoResize() const
+{
+    return autoresize;
+}
+#endif
+
+inline bool TQButton::autoRepeat() const
+{
+    return repeat;
+}
+
+inline TQButton::ToggleState TQButton::state() const
+{
+    return ToggleState(stat);
+}
+
+inline void TQButton::setToggleButton( bool b )
+{
+    setToggleType( b ? Toggle : SingleShot );
+}
+
+inline void TQButton::setOn( bool y )
+{
+    setState( y ? On : Off );
+}
+
+inline TQButton::ToggleType TQButton::toggleType() const
+{
+    return ToggleType(toggleTyp);
+}
+
+
+#endif // QT_NO_BUTTON
+
+#endif // TQBUTTON_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbutton-members.html b/doc/html/qbutton-members.html new file mode 100644 index 00000000..a30f6aba --- /dev/null +++ b/doc/html/qbutton-members.html @@ -0,0 +1,370 @@ + + + + + +TQButton Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQButton

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbutton.html b/doc/html/qbutton.html new file mode 100644 index 00000000..a2e801e9 --- /dev/null +++ b/doc/html/qbutton.html @@ -0,0 +1,477 @@ + + + + + +TQButton Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQButton Class Reference

+ +

The TQButton class is the abstract base class of button +widgets, providing functionality common to buttons. +More... +

#include <qbutton.h> +

Inherits TQWidget. +

Inherited by TQCheckBox, TQPushButton, TQRadioButton, and TQToolButton. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • TQKeySequence accel - the accelerator associated with the button
  • +
  • bool autoRepeat - whether autoRepeat is enabled
  • +
  • bool autoResize - whether autoResize is enabled  (obsolete)
  • +
  • bool down - whether the button is pressed
  • +
  • bool exclusiveToggle - whether the button is an exclusive toggle  (read only)
  • +
  • bool on - whether the button is toggled  (read only)
  • +
  • TQPixmap pixmap - the pixmap shown on the button
  • +
  • TQString text - the text shown on the button
  • +
  • bool toggleButton - whether the button is a toggle button  (read only)
  • +
  • ToggleState toggleState - the state of the toggle button  (read only)
  • +
  • ToggleType toggleType - the type of toggle on the button  (read only)
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQButton class is the abstract base class of button +widgets, providing functionality common to buttons. +

+

If you want to create a button use TQPushButton. +

The TQButton class implements an abstract button, and lets +subclasses specify how to reply to user actions and how to draw +the button. +

TQButton provides both push and toggle buttons. The TQRadioButton +and TQCheckBox classes provide only toggle buttons; TQPushButton and +TQToolButton provide both toggle and push buttons. +

Any button can have either a text or pixmap label. setText() sets +the button to be a text button and setPixmap() sets it to be a +pixmap button. The text/pixmap is manipulated as necessary to +create the "disabled" appearance when the button is disabled. +

TQButton provides most of the states used for buttons: +

    +
  • isDown() indicates whether the button is pressed down. +
  • isOn() indicates whether the button is on. +Only toggle buttons can be switched on and off (see below). +
  • isEnabled() indicates whether the button can be pressed by the +user. +
  • setAutoRepeat() sets whether the button will auto-repeat +if the user holds it down. +
  • setToggleButton() sets whether the button is a toggle +button or not. +
+

The difference between isDown() and isOn() is as follows: When the +user clicks a toggle button to toggle it on, the button is first +pressed and then released into the on state. When the user +clicks it again (to toggle it off), the button moves first to the +pressed state, then to the off state (isOn() and isDown() +are both FALSE). +

Default buttons (as used in many dialogs) are provided by +TQPushButton::setDefault() and TQPushButton::setAutoDefault(). +

TQButton provides five signals: +

    +
  1. pressed() is emitted when the button is pressed. E.g. with the mouse +or when animateClick() is called. +
  2. released() is emitted when the button is released. E.g. when the mouse +is released or the cursor is moved outside the widget. +
  3. clicked() is emitted when the button is first pressed and then +released when the accelerator key is typed, or when +animateClick() is called. +
  4. toggled(bool) is emitted when the state of a toggle button changes. +
  5. stateChanged(int) is emitted when the state of a tristate +toggle button changes. +
+

If the button is a text button with an ampersand (&) in its text, +TQButton creates an automatic accelerator key. This code creates a +push button labelled "Rock & Roll" (where the c is +underlined). The button gets an automatic accelerator key, Alt+C: +

+        TQPushButton *p = new TQPushButton( "Ro&ck && Roll", this );
+    
+ +

In this example, when the user presses Alt+C the button will call +animateClick(). +

You can also set a custom accelerator using the setAccel() +function. This is useful mostly for pixmap buttons because they +have no automatic accelerator. +

+        p->setPixmap( TQPixmap("print.png") );
+        p->setAccel( ALT+Key_F7 );
+    
+ +

All of the buttons provided by TQt (TQPushButton, TQToolButton, +TQCheckBox and TQRadioButton) can display both text and +pixmaps. +

To subclass TQButton, you must reimplement at least drawButton() +(to draw the button's outline) and drawButtonLabel() (to draw its +text or pixmap). It is generally advisable to reimplement +sizeHint() as well, and sometimes hitButton() (to determine +whether a button press is within the button). +

To reduce flickering, TQButton::paintEvent() sets up a pixmap that +the drawButton() function draws in. You should not reimplement +paintEvent() for a subclass of TQButton unless you want to take +over all drawing. +

See also TQButtonGroup and Abstract Widget Classes. + +


Member Type Documentation

+

TQButton::ToggleState

+ +

This enum defines the state of a toggle button. +

    +
  • TQButton::Off - the button is in the "off" state +
  • TQButton::NoChange - the button is in the default/unchanged state +
  • TQButton::On - the button is in the "on" state +
+

TQButton::ToggleType

+ +

This enum type defines what a button can do in response to a +mouse/keyboard press: +

    +
  • TQButton::SingleShot - pressing the button causes an action, then the +button returns to the unpressed state. +
  • TQButton::Toggle - pressing the button toggles it between an On and +an Off state. +
  • TQButton::Tristate - pressing the button cycles between the three +states On, Off and NoChange +
+

Member Function Documentation

+

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

+Constructs a standard button called name with parent parent, +using the widget flags f. +

If parent is a TQButtonGroup, this constructor calls +TQButtonGroup::insert(). + +

TQButton::~TQButton () +

+Destroys the button. + +

TQKeySequence TQButton::accel () const +

Returns the accelerator associated with the button. +See the "accel" property for details. +

void TQButton::animateClick () [slot] +

+Performs an animated click: the button is pressed and released a +short while later. +

The pressed(), released(), clicked(), toggled(), and +stateChanged() signals are emitted as appropriate. +

This function does nothing if the button is disabled. +

See also accel. + +

bool TQButton::autoRepeat () const +

Returns TRUE if autoRepeat is enabled; otherwise returns FALSE. +See the "autoRepeat" property for details. +

bool TQButton::autoResize () const +

Returns TRUE if autoResize is enabled; otherwise returns FALSE. +See the "autoResize" property for details. +

void TQButton::clicked () [signal] +

+ +

This signal is emitted when the button is activated (i.e. first +pressed down and then released when the mouse cursor is inside the +button), when the accelerator key is typed or when animateClick() +is called. This signal is not emitted if you call setDown(). +

The TQButtonGroup::clicked() signal does the same job, if you want +to connect several buttons to the same slot. +

Warning: Don't launch a model dialog in response to this signal +for a button that has autoRepeat turned on. +

See also pressed(), released(), toggled(), autoRepeat, and down. + +

Examples: chart/setdataform.cpp, listbox/listbox.cpp, network/clientserver/client/client.cpp, progressbar/progressbar.cpp, richtext/richtext.cpp, t2/main.cpp, and t4/main.cpp. +

void TQButton::drawButton ( TQPainter * ) [virtual protected] +

+Draws the button. The default implementation does nothing. +

This virtual function is reimplemented by subclasses to draw real +buttons. At some point, these reimplementations should call +drawButtonLabel(). +

See also drawButtonLabel() and paintEvent(). + +

void TQButton::drawButtonLabel ( TQPainter * ) [virtual protected] +

+Draws the button text or pixmap. +

This virtual function is reimplemented by subclasses to draw real +buttons. It is invoked by drawButton(). +

See also drawButton() and paintEvent(). + +

TQButtonGroup * TQButton::group () const +

+Returns the group that this button belongs to. +

If the button is not a member of any TQButtonGroup, this function +returns 0. +

See also TQButtonGroup. + +

bool TQButton::hitButton ( const TQPoint & pos ) const [virtual protected] +

+Returns TRUE if pos is inside the clickable button rectangle; +otherwise returns FALSE. +

By default, the clickable area is the entire widget. Subclasses +may reimplement it, though. + +

bool TQButton::isDown () const +

Returns TRUE if the button is pressed; otherwise returns FALSE. +See the "down" property for details. +

bool TQButton::isExclusiveToggle () const +

Returns TRUE if the button is an exclusive toggle; otherwise returns FALSE. +See the "exclusiveToggle" property for details. +

bool TQButton::isOn () const +

Returns TRUE if the button is toggled; otherwise returns FALSE. +See the "on" property for details. +

bool TQButton::isToggleButton () const +

Returns TRUE if the button is a toggle button; otherwise returns FALSE. +See the "toggleButton" property for details. +

void TQButton::paintEvent ( TQPaintEvent * ) [virtual protected] +

+Handles paint events for buttons. Small and typically complex +buttons are painted double-buffered to reduce flicker. The +actually drawing is done in the virtual functions drawButton() and +drawButtonLabel(). +

See also drawButton() and drawButtonLabel(). + +

Reimplemented from TQWidget. +

const TQPixmap * TQButton::pixmap () const +

Returns the pixmap shown on the button. +See the "pixmap" property for details. +

void TQButton::pressed () [signal] +

+ +

This signal is emitted when the button is pressed down. +

See also released() and clicked(). + +

Examples: network/httpd/httpd.cpp and popup/popup.cpp. +

void TQButton::released () [signal] +

+ +

This signal is emitted when the button is released. +

See also pressed(), clicked(), and toggled(). + +

void TQButton::setAccel ( const TQKeySequence & ) [virtual] +

Sets the accelerator associated with the button. +See the "accel" property for details. +

void TQButton::setAutoRepeat ( bool ) [virtual] +

Sets whether autoRepeat is enabled. +See the "autoRepeat" property for details. +

void TQButton::setAutoResize ( bool ) +

Sets whether autoResize is enabled. +See the "autoResize" property for details. +

void TQButton::setDown ( bool ) [virtual] +

Sets whether the button is pressed. +See the "down" property for details. +

void TQButton::setOn ( bool on ) [protected] +

+ +

Sets the state of this button to On if on is TRUE; otherwise to +Off. +

See also toggleState. + +

void TQButton::setPixmap ( const TQPixmap & ) [virtual] +

Sets the pixmap shown on the button. +See the "pixmap" property for details. +

void TQButton::setState ( ToggleState s ) [virtual protected] +

+Sets the toggle state of the button to s. s can be Off, NoChange or On. + +

void TQButton::setText ( const TQString & ) [virtual] +

Sets the text shown on the button. +See the "text" property for details. +

void TQButton::setToggleButton ( bool b ) [protected] +

+ +

If b is TRUE, this button becomes a toggle button; if b is +FALSE, this button becomes a command button. +

See also toggleButton. + +

void TQButton::setToggleType ( ToggleType type ) [virtual protected] +

+Sets the toggle type of the button to type. +

type can be set to SingleShot, Toggle and Tristate. + +

ToggleState TQButton::state () const +

Returns the state of the toggle button. +See the "toggleState" property for details. +

void TQButton::stateChanged ( int state ) [signal] +

+ +

This signal is emitted whenever a toggle button changes state. state is On if the button is on, NoChange if it is in the +"no change" state or Off +if the button is off. +

This may be the result of a user action, toggle() slot activation, +setState(), or because setOn() was called. +

See also clicked() and TQButton::ToggleState. + +

TQString TQButton::text () const +

Returns the text shown on the button. +See the "text" property for details. +

void TQButton::toggle () [slot] +

+Toggles the state of a toggle button. +

See also on, setOn(), toggled(), and toggleButton. + +

ToggleType TQButton::toggleType () const +

Returns the type of toggle on the button. +See the "toggleType" property for details. +

void TQButton::toggled ( bool on ) [signal] +

+ +

This signal is emitted whenever a toggle button changes status. on is TRUE if the button is on, or FALSE if the button is off. +

This may be the result of a user action, toggle() slot activation, +or because setOn() was called. +

See also clicked(). + +

Example: listbox/listbox.cpp. +


Property Documentation

+

TQKeySequence accel

+

This property holds the accelerator associated with the button. +

This property is 0 if there is no accelerator set. If you set this +property to 0 then any current accelerator is removed. + +

Set this property's value with setAccel() and get this property's value with accel(). +

bool autoRepeat

+

This property holds whether autoRepeat is enabled. +

If autoRepeat is enabled then the clicked() signal is emitted at +regular intervals if the button is down. This property has no +effect on toggle buttons. autoRepeat is off by default. + +

Set this property's value with setAutoRepeat() and get this property's value with autoRepeat(). +

bool autoResize

This property holds whether autoResize is enabled. +

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

If autoResize is enabled then the button will resize itself +whenever the contents are changed. + +

Set this property's value with setAutoResize() and get this property's value with autoResize(). +

bool down

+

This property holds whether the button is pressed. +

If this property is TRUE, the button is pressed down. The signals +pressed() and clicked() are not emitted if you set this property +to TRUE. The default is FALSE. + +

Set this property's value with setDown() and get this property's value with isDown(). +

bool exclusiveToggle

+

This property holds whether the button is an exclusive toggle. +

If this property is TRUE and the button is in a TQButtonGroup, the +button can only be toggled off by another one being toggled on. +The default is FALSE. + +

Get this property's value with isExclusiveToggle(). +

bool on

+

This property holds whether the button is toggled. +

This property should only be set for toggle buttons. + +

Get this property's value with isOn(). +

TQPixmap pixmap

+

This property holds the pixmap shown on the button. +

If the pixmap is monochrome (i.e. it is a TQBitmap or its depth is 1) and it does not have a mask, +this property will set the pixmap to be its own mask. The purpose +of this is to draw transparent bitmaps which are important for +toggle buttons, for example. +

pixmap() returns 0 if no pixmap was set. + +

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

TQString text

+

This property holds the text shown on the button. +

This property will return a TQString::null if the button has no +text. If the text has an ampersand (&) in it, then an +accelerator is automatically created for it using the character +that follows the '&' as the accelerator key. Any previous +accelerator will be overwritten, or cleared if no accelerator is +defined by the text. +

There is no default text. + +

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

bool toggleButton

+

This property holds whether the button is a toggle button. +

The default value is FALSE. + +

Get this property's value with isToggleButton(). +

ToggleState toggleState

+

This property holds the state of the toggle button. +

If this property is changed then it does not cause the button +to be repainted. + +

Get this property's value with state(). +

ToggleType toggleType

+

This property holds the type of toggle on the button. +

The default toggle type is SingleShot. +

See also TQButton::ToggleType. + +

Get this property's value with toggleType(). + +


+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/qbuttongroup-h.html b/doc/html/qbuttongroup-h.html new file mode 100644 index 00000000..9061a805 --- /dev/null +++ b/doc/html/qbuttongroup-h.html @@ -0,0 +1,166 @@ + + + + + +qbuttongroup.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qbuttongroup.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qbuttongroup.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQButtonGroup class
+**
+** Created : 950130
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQBUTTONGROUP_H
+#define TQBUTTONGROUP_H
+
+#ifndef QT_H
+#include "qgroupbox.h"
+#endif // QT_H
+
+#ifndef QT_NO_BUTTONGROUP
+
+
+class TQButton;
+class TQButtonList;
+
+
+class Q_EXPORT TQButtonGroup : public TQGroupBox
+{
+    Q_OBJECT
+    Q_PROPERTY( bool exclusive READ isExclusive WRITE setExclusive )
+    Q_PROPERTY( bool radioButtonExclusive READ isRadioButtonExclusive WRITE setRadioButtonExclusive )
+    Q_PROPERTY( int selectedId READ selectedId WRITE setButton )
+
+public:
+    TQButtonGroup( TQWidget* parent=0, const char* name=0 );
+    TQButtonGroup( const TQString &title,
+		  TQWidget* parent=0, const char* name=0 );
+    TQButtonGroup( int columns, Orientation o,
+		  TQWidget* parent=0, const char* name=0 );
+    TQButtonGroup( int columns, Orientation o, const TQString &title,
+		  TQWidget* parent=0, const char* name=0 );
+    ~TQButtonGroup();
+
+    bool	isExclusive() const;
+    bool	isRadioButtonExclusive() const { return radio_excl; }
+    virtual void setExclusive( bool );
+    virtual void setRadioButtonExclusive( bool );
+
+public:
+    int		insert( TQButton *, int id=-1 );
+    void	remove( TQButton * );
+    TQButton    *find( int id ) const;
+    int		id( TQButton * ) const;
+    int		count() const;
+
+    virtual void setButton( int id );
+
+    virtual void moveFocus( int );
+
+    TQButton    *selected() const;
+    int    selectedId() const;
+
+signals:
+    void	pressed( int id );
+    void	released( int id );
+    void	clicked( int id );
+
+protected slots:
+    void	buttonPressed();
+    void	buttonReleased();
+    void	buttonClicked();
+    void	buttonToggled( bool on );
+
+protected:
+    bool 	event( TQEvent * e );
+
+private:
+    void	init();
+    bool	excl_grp;
+    bool	radio_excl;
+    TQButtonList *buttons;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQButtonGroup( const TQButtonGroup & );
+    TQButtonGroup &operator=( const TQButtonGroup & );
+#endif
+};
+
+
+#endif // QT_NO_BUTTONGROUP
+
+#endif // TQBUTTONGROUP_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbuttongroup-h.png b/doc/html/qbuttongroup-h.png new file mode 100644 index 00000000..2a210940 Binary files /dev/null and b/doc/html/qbuttongroup-h.png differ diff --git a/doc/html/qbuttongroup-members.html b/doc/html/qbuttongroup-members.html new file mode 100644 index 00000000..135a8a2d --- /dev/null +++ b/doc/html/qbuttongroup-members.html @@ -0,0 +1,392 @@ + + + + + +TQButtonGroup Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQButtonGroup

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbuttongroup-v.png b/doc/html/qbuttongroup-v.png new file mode 100644 index 00000000..e5070b68 Binary files /dev/null and b/doc/html/qbuttongroup-v.png differ diff --git a/doc/html/qbuttongroup.html b/doc/html/qbuttongroup.html new file mode 100644 index 00000000..6cad480c --- /dev/null +++ b/doc/html/qbuttongroup.html @@ -0,0 +1,264 @@ + + + + + +TQButtonGroup Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQButtonGroup Class Reference

+ +

The TQButtonGroup widget organizes TQButton widgets in a group. +More... +

#include <qbuttongroup.h> +

Inherits TQGroupBox. +

Inherited by TQHButtonGroup and TQVButtonGroup. +

List of all member functions. +

Public Members

+ +

Signals

+ +

Properties

+ +

Detailed Description

+ + +The TQButtonGroup widget organizes TQButton widgets in a group. +

+ + + +

A button group widget makes it easier to deal with groups of +buttons. Each button in a button group has a unique identifier. +The button group emits a clicked() signal with this identifier +when a button in the group is clicked. This makes a button group +particularly useful when you have several similar buttons and want +to connect all their clicked() signals to a single slot. +

An exclusive button group switches +off all toggle buttons except the one that was clicked. A button +group is, by default, non-exclusive. Note that all radio buttons +that are inserted into a button group are mutually exclusive even +if the button group is non-exclusive. (See +setRadioButtonExclusive().) +

There are two ways of using a button group: +

    +
  • The button group is the parent widget of a number of buttons, +i.e. the button group is the parent argument in the button +constructor. The buttons are assigned identifiers 0, 1, 2, etc., +in the order they are created. A TQButtonGroup can display a frame +and a title because it inherits TQGroupBox. +
  • The button group is an invisible widget and the contained +buttons have some other parent widget. In this usage, each button +must be manually inserted, using insert(), into the button group +and given an identifier. +
+

A button can be removed from the group with remove(). A pointer to +a button with a given id can be obtained using find(). The id of a +button is available using id(). A button can be set on with +setButton(). The number of buttons in the group is returned by +count(). +

+

See also TQPushButton, TQCheckBox, TQRadioButton, Widget Appearance and Style, Layout Management, and Organizers. + +


Member Function Documentation

+

TQButtonGroup::TQButtonGroup ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a button group with no title. +

The parent and name arguments are passed to the TQWidget +constructor. + +

TQButtonGroup::TQButtonGroup ( const TQString & title, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a button group with the title title. +

The parent and name arguments are passed to the TQWidget +constructor. + +

TQButtonGroup::TQButtonGroup ( int strips, Orientation orientation, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a button group with no title. Child widgets will be +arranged in strips rows or columns (depending on orientation). +

The parent and name arguments are passed to the TQWidget +constructor. + +

TQButtonGroup::TQButtonGroup ( int strips, Orientation orientation, const TQString & title, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a button group with title title. Child widgets will +be arranged in strips rows or columns (depending on orientation). +

The parent and name arguments are passed to the TQWidget +constructor. + +

void TQButtonGroup::clicked ( int id ) [signal] +

+ +

This signal is emitted when a button in the group is clicked. The id argument is the +button's identifier. +

See also insert(). + +

Examples: drawdemo/drawdemo.cpp and xform/xform.cpp. +

int TQButtonGroup::count () const +

+Returns the number of buttons in the group. + +

TQButton * TQButtonGroup::find ( int id ) const +

+Returns the button with the specified identifier id, or 0 if +the button was not found. + +

int TQButtonGroup::id ( TQButton * button ) const +

+Returns the id of button, or -1 if button is not a member of +this group. +

See also selectedId. + +

int TQButtonGroup::insert ( TQButton * button, int id = -1 ) +

+Inserts the button with the identifier id into the button +group. Returns the button identifier. +

Buttons are normally inserted into a button group automatically by +passing the button group as the parent when the button is +constructed. So it is not necessary to manually insert buttons +that have this button group as their parent widget. An exception +is when you want custom identifiers instead of the default 0, 1, +2, etc., or if you want the buttons to have some other parent. +

The button is assigned the identifier id or an automatically +generated identifier. It works as follows: If id >= 0, this +identifier is assigned. If id == -1 (default), the identifier +is equal to the number of buttons in the group. If id is any +other negative integer, for instance -2, a unique identifier +(negative integer <= -2) is generated. No button has an id of -1. +

See also find(), remove(), and exclusive. + +

Examples: listbox/listbox.cpp and xform/xform.cpp. +

bool TQButtonGroup::isExclusive () const +

Returns TRUE if the button group is exclusive; otherwise returns FALSE. +See the "exclusive" property for details. +

bool TQButtonGroup::isRadioButtonExclusive () const +

Returns TRUE if the radio buttons in the group are exclusive; otherwise returns FALSE. +See the "radioButtonExclusive" property for details. +

void TQButtonGroup::moveFocus ( int key ) [virtual] +

+Moves the keyboard focus according to key, and if appropriate +checks the new focus item. +

This function does nothing unless the keyboard focus points to one +of the button group members and key is one of Key_Up, Key_Down, Key_Left and Key_Right. + +

void TQButtonGroup::pressed ( int id ) [signal] +

+ +

This signal is emitted when a button in the group is pressed. The id argument is the +button's identifier. +

See also insert(). + +

void TQButtonGroup::released ( int id ) [signal] +

+ +

This signal is emitted when a button in the group is released. The id argument is the +button's identifier. +

See also insert(). + +

void TQButtonGroup::remove ( TQButton * button ) +

+Removes the button from the button group. +

See also insert(). + +

TQButton * TQButtonGroup::selected () const +

+Returns the selected toggle button if exactly one is selected; +otherwise returns 0. +

See also selectedId. + +

int TQButtonGroup::selectedId () const +

Returns the selected toggle button. +See the "selectedId" property for details. +

void TQButtonGroup::setButton ( int id ) [virtual] +

Sets the selected toggle button to id. +See the "selectedId" property for details. +

void TQButtonGroup::setExclusive ( bool ) [virtual] +

Sets whether the button group is exclusive. +See the "exclusive" property for details. +

void TQButtonGroup::setRadioButtonExclusive ( bool ) [virtual] +

Sets whether the radio buttons in the group are exclusive. +See the "radioButtonExclusive" property for details. +


Property Documentation

+

bool exclusive

+

This property holds whether the button group is exclusive. +

If this property is TRUE, then the buttons in the group are +toggled, and to untoggle a button you must click on another button +in the group. The default value is FALSE. + +

Set this property's value with setExclusive() and get this property's value with isExclusive(). +

bool radioButtonExclusive

+

This property holds whether the radio buttons in the group are exclusive. +

If this property is TRUE (the default), the radiobuttons in the group are treated exclusively. + +

Set this property's value with setRadioButtonExclusive() and get this property's value with isRadioButtonExclusive(). +

int selectedId

+

This property holds the selected toggle button. +

The toggle button is specified as an ID. +

If no toggle button is selected, this property holds -1. +

If setButton() is called on an exclusive group, the button with +the given id will be set to on and all the others will be set to +off. +

See also selected(). + +

Set this property's value with setButton() and get this property's value with selectedId(). + +


+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/qbytearray-members.html b/doc/html/qbytearray-members.html new file mode 100644 index 00000000..9e801ad5 --- /dev/null +++ b/doc/html/qbytearray-members.html @@ -0,0 +1,74 @@ + + + + + +TQByteArray Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQByteArray

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qbytearray.html b/doc/html/qbytearray.html new file mode 100644 index 00000000..8df0bb82 --- /dev/null +++ b/doc/html/qbytearray.html @@ -0,0 +1,119 @@ + + + + + +TQByteArray Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQByteArray Class Reference

+ +

The TQByteArray class provides an array of bytes. +More... +

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

+

#include <qcstring.h> +

Inherits TQMemArray<char>. +

Inherited by TQBitArray and TQCString. +

List of all member functions. +

Public Members

+ +

Related Functions

+
    +
  • TQByteArray qCompress ( const TQByteArray & data )
  • +
  • TQByteArray qCompress ( const uchar * data, int nbytes )
  • +
  • TQByteArray qUncompress ( const TQByteArray & data )
  • +
  • TQByteArray qUncompress ( const uchar * data, int nbytes )
  • +
+

Detailed Description

+ + + +The TQByteArray class provides an array of bytes. +

+ +

The TQByteArray class provides an explicitly shared array of bytes. +It is useful for manipulating memory areas with custom data. +TQByteArray is implemented as a TQMemArray<char>. See the TQMemArray documentation for further information. +

See also Collection Classes and Non-GUI Classes. + +


Member Function Documentation

+

TQByteArray::TQByteArray () +

+ +

Constructs an empty TQByteArray. + +

TQByteArray::TQByteArray ( int size ) +

+ +

Constructs a TQByteArray of size size. + +


Related Functions

+

TQByteArray qCompress ( const TQByteArray & data ) +

+ +

+

Compresses the array data and returns the compressed byte +array using zlib. +

See also qUncompress(). + +

TQByteArray qCompress ( const uchar * data, int nbytes ) +

+ +

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

Compresses the array data which is nbytes long and returns the +compressed byte array. + +

TQByteArray qUncompress ( const TQByteArray & data ) +

+ +

+

Uncompresses the array data and returns the uncompressed byte +array. +

Returns an empty TQByteArray if the input data was corrupt. + +

See also qCompress(). + +

TQByteArray qUncompress ( const uchar * data, int nbytes ) +

+ +

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

Uncompresses the array data which is nbytes long and returns +the uncompressed byte array. + + +


+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/qcache-h.html b/doc/html/qcache-h.html new file mode 100644 index 00000000..3eb240fe --- /dev/null +++ b/doc/html/qcache-h.html @@ -0,0 +1,166 @@ + + + + + +qcache.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qcache.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qcache.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQCache template class
+**
+** Created : 950209
+**
+** 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 retquirements 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 TQCACHE_H
+#define TQCACHE_H
+
+#ifndef QT_H
+#include "qgcache.h"
+#endif // QT_H
+
+template<class type>
+class TQCache
+#ifdef Q_QDOC
+	: public TQPtrCollection
+#else
+	: public TQGCache
+#endif
+{
+public:
+    TQCache( const TQCache<type> &c ) : TQGCache(c) {}
+    TQCache( int maxCost=100, int size=17, bool caseSensitive=TRUE )
+	: TQGCache( maxCost, size, StringKey, caseSensitive, FALSE ) {}
+   ~TQCache()				{ clear(); }
+    TQCache<type> &operator=( const TQCache<type> &c )
+			{ return (TQCache<type>&)TQGCache::operator=(c); }
+    int	  maxCost()   const		{ return TQGCache::maxCost(); }
+    int	  totalCost() const		{ return TQGCache::totalCost(); }
+    void  setMaxCost( int m )		{ TQGCache::setMaxCost(m); }
+    uint  count()     const		{ return TQGCache::count(); }
+    uint  size()      const		{ return TQGCache::size(); }
+    bool  isEmpty()   const		{ return TQGCache::count() == 0; }
+    void  clear()			{ TQGCache::clear(); }
+    bool  insert( const TQString &k, const type *d, int c=1, int p=0 )
+			{ return TQGCache::insert_string(k,(Item)d,c,p);}
+    bool  remove( const TQString &k )
+			{ return TQGCache::remove_string(k); }
+    type *take( const TQString &k )
+			{ return (type *)TQGCache::take_string(k); }
+    type *find( const TQString &k, bool ref=TRUE ) const
+			{ return (type *)TQGCache::find_string(k,ref);}
+    type *operator[]( const TQString &k ) const
+			{ return (type *)TQGCache::find_string(k);}
+    void  statistics() const	      { TQGCache::statistics(); }
+private:
+    void  deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void TQCache<void>::deleteItem( TQPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void TQCache<type>::deleteItem( TQPtrCollection::Item d )
+{
+    if ( del_item ) delete (type *)d;
+}
+
+template<class type>
+class TQCacheIterator : public TQGCacheIterator
+{
+public:
+    TQCacheIterator( const TQCache<type> &c ):TQGCacheIterator((TQGCache &)c) {}
+    TQCacheIterator( const TQCacheIterator<type> &ci)
+				: TQGCacheIterator( (TQGCacheIterator &)ci ) {}
+    TQCacheIterator<type> &operator=(const TQCacheIterator<type>&ci)
+	{ return ( TQCacheIterator<type>&)TQGCacheIterator::operator=( ci ); }
+    uint  count()   const     { return TQGCacheIterator::count(); }
+    bool  isEmpty() const     { return TQGCacheIterator::count() == 0; }
+    bool  atFirst() const     { return TQGCacheIterator::atFirst(); }
+    bool  atLast()  const     { return TQGCacheIterator::atLast(); }
+    type *toFirst()	      { return (type *)TQGCacheIterator::toFirst(); }
+    type *toLast()	      { return (type *)TQGCacheIterator::toLast(); }
+    operator type *() const   { return (type *)TQGCacheIterator::get(); }
+    type *current()   const   { return (type *)TQGCacheIterator::get(); }
+    TQString currentKey() const{ return TQGCacheIterator::getKeyString(); }
+    type *operator()()	      { return (type *)TQGCacheIterator::operator()();}
+    type *operator++()	      { return (type *)TQGCacheIterator::operator++(); }
+    type *operator+=(uint j)  { return (type *)TQGCacheIterator::operator+=(j);}
+    type *operator--()	      { return (type *)TQGCacheIterator::operator--(); }
+    type *operator-=(uint j)  { return (type *)TQGCacheIterator::operator-=(j);}
+};
+
+#endif // TQCACHE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcache-members.html b/doc/html/qcache-members.html new file mode 100644 index 00000000..0f2f3f87 --- /dev/null +++ b/doc/html/qcache-members.html @@ -0,0 +1,64 @@ + + + + + +TQCache Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCache

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcache.html b/doc/html/qcache.html new file mode 100644 index 00000000..7e26fd47 --- /dev/null +++ b/doc/html/qcache.html @@ -0,0 +1,279 @@ + + + + + +TQCache Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCache Class Reference

+ +

The TQCache class is a template class that provides a cache based on TQString keys. +More... +

#include <qcache.h> +

Inherits TQPtrCollection. +

List of all member functions. +

Public Members

+
    +
  • TQCache ( int maxCost = 100, int size = 17, bool caseSensitive = TRUE )
  • +
  • ~TQCache ()
  • +
  • int maxCost () const
  • +
  • int totalCost () const
  • +
  • void setMaxCost ( int m )
  • +
  • virtual uint count () const
  • +
  • uint size () const
  • +
  • bool isEmpty () const
  • +
  • virtual void clear ()
  • +
  • bool insert ( const TQString & k, const type * d, int c = 1, int p = 0 )
  • +
  • bool remove ( const TQString & k )
  • +
  • type * take ( const TQString & k )
  • +
  • type * find ( const TQString & k, bool ref = TRUE ) const
  • +
  • type * operator[] ( const TQString & k ) const
  • +
  • void statistics () const
  • +
+

Important Inherited Members

+ +

Detailed Description

+ + +The TQCache class is a template class that provides a cache based on TQString keys. +

+ +

+

A cache is a least recently used (LRU) list of cache items. Each +cache item has a key and a certain cost. The sum of item costs, +totalCost(), never exceeds the maximum cache cost, maxCost(). If +inserting a new item would cause the total cost to exceed the +maximum cost, the least recently used items in the cache are +removed. +

TQCache is a template class. TQCache<X> defines a cache that +operates on pointers to X, or X*. +

Apart from insert(), by far the most important function is find() +(which also exists as operator[]()). This function looks up an +item, returns it, and by default marks it as being the most +recently used item. +

There are also methods to remove() or take() an object from the +cache. Calling setAutoDelete(TRUE) for a cache tells it to delete +items that are removed. The default is to not delete items when +they are removed (i.e., remove() and take() are equivalent). +

When inserting an item into the cache, only the pointer is copied, +not the item itself. This is called a shallow copy. It is possible +to make the cache copy all of the item's data (known as a deep copy) when an item is inserted. insert() calls the virtual +function TQPtrCollection::newItem() for the item to be inserted. +Inherit a cache and reimplement newItem() if you want deep copies. +

When removing a cache item, the virtual function +TQPtrCollection::deleteItem() is called. The default +implementation deletes the item if auto-deletion is enabled, and +does nothing otherwise. +

There is a TQCacheIterator that can be used to traverse the items +in the cache in arbitrary order. +

In TQCache, the cache items are accessed via TQString keys, which +are Unicode strings. If you want to use non-Unicode, plain 8-bit +char* keys, use the TQAsciiCache template. A TQCache has the +same performance as a TQAsciiCache. +

See also TQCacheIterator, TQAsciiCache, TQIntCache, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQCache::TQCache ( int maxCost = 100, int size = 17, bool caseSensitive = TRUE ) +

+ +

Constructs a cache whose contents will never have a total cost +greater than maxCost and which is expected to contain less than +size items. +

size is actually the size of an internal hash array; it's +usually best to make it a prime number and at least 50% bigger +than the largest expected number of items in the cache. +

Each inserted item has an associated cost. When inserting a new +item, if the total cost of all items in the cache will exceed maxCost, the cache will start throwing out the older (least +recently used) items until there is enough room for the new item +to be inserted. +

If caseSensitive is TRUE (the default), the cache keys are case +sensitive; if it is FALSE, they are case-insensitive. +Case-insensitive comparison considers all Unicode letters. + +

TQCache::~TQCache () +

+ +

Removes all items from the cache and destroys it. All iterators +that access this cache will be reset. + +

bool TQPtrCollection::autoDelete () const +

+ +

Returns the setting of the auto-delete option. The default is FALSE. +

See also setAutoDelete(). + +

void TQCache::clear () [virtual] +

+ +

Removes all items from the cache and deletes them if auto-deletion +has been enabled. +

All cache iterators that operate this on cache are reset. +

See also remove() and take(). + +

Reimplemented from TQPtrCollection. +

uint TQCache::count () const [virtual] +

+ +

Returns the number of items in the cache. +

See also totalCost(). + +

Reimplemented from TQPtrCollection. +

type * TQCache::find ( const TQString & k, bool ref = TRUE ) const +

+ +

Returns the item associated with key k, or 0 if the key does +not exist in the cache. If ref is TRUE (the default), the item +is moved to the front of the least recently used list. +

If there are two or more items with equal keys, the one that was +inserted last is returned. + +

bool TQCache::insert ( const TQString & k, const type * d, int c = 1, int p = 0 ) +

+ +

Inserts the item d into the cache with key k and associated +cost, c. Returns TRUE if it is successfully inserted; otherwise +returns FALSE. +

The cache's size is limited, and if the total cost is too high, +TQCache will remove old, least recently used items until there is +room for this new item. +

The parameter p is internal and should be left at the default +value (0). +

Warning: If this function returns FALSE (which could happen, e.g. +if the cost of this item alone exceeds maxCost()) you must delete +d yourself. Additionally, be very careful about using d +after calling this function because any other insertions into the +cache, from anywhere in the application or within TQt itself, could +cause the object to be discarded from the cache and the pointer to +become invalid. + +

bool TQCache::isEmpty () const +

+ +

Returns TRUE if the cache is empty; otherwise returns FALSE. + +

int TQCache::maxCost () const +

+ +

Returns the maximum allowed total cost of the cache. +

See also setMaxCost() and totalCost(). + +

type * TQCache::operator[] ( const TQString & k ) const +

+ +

Returns the item associated with key k, or 0 if k does not +exist in the cache, and moves the item to the front of the least +recently used list. +

If there are two or more items with equal keys, the one that was +inserted last is returned. +

This is the same as find( k, TRUE ). +

See also find(). + +

bool TQCache::remove ( const TQString & k ) +

+ +

Removes the item associated with k, and returns TRUE if the +item was present in the cache; otherwise returns FALSE. +

The item is deleted if auto-deletion has been enabled, i.e., if +you have called setAutoDelete(TRUE). +

If there are two or more items with equal keys, the one that was +inserted last is removed. +

All iterators that refer to the removed item are set to point to +the next item in the cache's traversal order. +

See also take() and clear(). + +

void TQPtrCollection::setAutoDelete ( bool enable ) +

+ +

Sets the collection to auto-delete its contents if enable is +TRUE and to never delete them if enable is FALSE. +

If auto-deleting is turned on, all the items in a collection are +deleted when the collection itself is deleted. This is convenient +if the collection has the only pointer to the items. +

The default setting is FALSE, for safety. If you turn it on, be +careful about copying the collection - you might find yourself +with two collections deleting the same items. +

Note that the auto-delete setting may also affect other functions +in subclasses. For example, a subclass that has a remove() +function will remove the item from its data structure, and if +auto-delete is enabled, will also delete the item. +

See also autoDelete(). + +

Examples: grapher/grapher.cpp, scribble/scribble.cpp, and table/bigtable/main.cpp. +

void TQCache::setMaxCost ( int m ) +

+ +

Sets the maximum allowed total cost of the cache to m. If the +current total cost is greater than m, some items are deleted +immediately. +

See also maxCost() and totalCost(). + +

uint TQCache::size () const +

+ +

Returns the size of the hash array used to implement the cache. +This should be a bit bigger than count() is likely to be. + +

void TQCache::statistics () const +

+ +

A debug-only utility function. Prints out cache usage, hit/miss, +and distribution information using qDebug(). This function does +nothing in the release library. + +

type * TQCache::take ( const TQString & k ) +

+ +

Takes the item associated with k out of the cache without +deleting it, and returns a pointer to the item taken out, or 0 +if the key does not exist in the cache. +

If there are two or more items with equal keys, the one that was +inserted last is taken. +

All iterators that refer to the taken item are set to point to the +next item in the cache's traversal order. +

See also remove() and clear(). + +

int TQCache::totalCost () const +

+ +

Returns the total cost of the items in the cache. This is an +integer in the range 0 to maxCost(). +

See also setMaxCost(). + + +


+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/qcacheiterator-members.html b/doc/html/qcacheiterator-members.html new file mode 100644 index 00000000..2bbd4dca --- /dev/null +++ b/doc/html/qcacheiterator-members.html @@ -0,0 +1,62 @@ + + + + + +TQCacheIterator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCacheIterator

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcacheiterator.html b/doc/html/qcacheiterator.html new file mode 100644 index 00000000..a53556e3 --- /dev/null +++ b/doc/html/qcacheiterator.html @@ -0,0 +1,211 @@ + + + + + +TQCacheIterator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCacheIterator Class Reference

+ +

The TQCacheIterator class provides an iterator for TQCache collections. +More... +

#include <qcache.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQCacheIterator class provides an iterator for TQCache collections. +

+ +

Note that the traversal order is arbitrary; you are not guaranteed +any particular order. If new objects are inserted into the cache +while the iterator is active, the iterator may or may not see +them. +

Multiple iterators are completely independent, even when they +operate on the same TQCache. TQCache updates all iterators that +refer an item when that item is removed. +

TQCacheIterator provides an operator++(), and an operator+=() to +traverse the cache. The current() and currentKey() functions are +used to access the current cache item and its key. The atFirst() +and atLast() return TRUE if the iterator points to the first or +last item in the cache respectively. The isEmpty() function +returns TRUE if the cache is empty, and count() returns the number +of items in the cache. +

Note that atFirst() and atLast() refer to the iterator's arbitrary +ordering, not to the cache's internal least recently used list. +

See also TQCache, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQCacheIterator::TQCacheIterator ( const TQCache<type> & cache ) +

+ +

Constructs an iterator for cache. The current iterator item is +set to point to the first item in the cache. + +

TQCacheIterator::TQCacheIterator ( const TQCacheIterator<type> & ci ) +

+ +

Constructs an iterator for the same cache as ci. The new +iterator starts at the same item as ci.current(), but moves +independently from there on. + +

bool TQCacheIterator::atFirst () const +

+ +

Returns TRUE if the iterator points to the first item in the +cache; otherwise returns FALSE. Note that this refers to the +iterator's arbitrary ordering, not to the cache's internal least +recently used list. +

See also toFirst() and atLast(). + +

bool TQCacheIterator::atLast () const +

+ +

Returns TRUE if the iterator points to the last item in the cache; +otherwise returns FALSE. Note that this refers to the iterator's +arbitrary ordering, not to the cache's internal least recently +used list. +

See also toLast() and atFirst(). + +

uint TQCacheIterator::count () const +

+ +

Returns the number of items in the cache on which this iterator +operates. +

See also isEmpty(). + +

type * TQCacheIterator::current () const +

+ +

Returns a pointer to the current iterator item. + +

TQString TQCacheIterator::currentKey () const +

+ +

Returns the key for the current iterator item. + +

bool TQCacheIterator::isEmpty () const +

+ +

Returns TRUE if the cache is empty, i.e. count() == 0; otherwise +it returns FALSE. +

See also count(). + +

TQCacheIterator::operator type * () const +

+ +

Cast operator. Returns a pointer to the current iterator item. +Same as current(). + +

type * TQCacheIterator::operator() () +

+ +

Makes the succeeding item current and returns the original current +item. +

If the current iterator item was the last item in the cache or if +it was 0, 0 is returned. + +

type * TQCacheIterator::operator++ () +

+ +

Prefix++ makes the iterator point to the item just after current() +and makes that the new current item for the iterator. If current() +was the last item, operator++() returns 0. + +

type * TQCacheIterator::operator+= ( uint jump ) +

+ +

Returns the item jump positions after the current item, or 0 if +it is beyond the last item. Makes this the current item. + +

type * TQCacheIterator::operator-- () +

+ +

Prefix-- makes the iterator point to the item just before +current() and makes that the new current item for the iterator. If +current() was the first item, operator--() returns 0. + +

type * TQCacheIterator::operator-= ( uint jump ) +

+ +

Returns the item jump positions before the current item, or 0 +if it is before the first item. Makes this the current item. + +

TQCacheIterator<type> & TQCacheIterator::operator= ( const TQCacheIterator<type> & ci ) +

+ +

Makes this an iterator for the same cache as ci. The new +iterator starts at the same item as ci.current(), but moves +independently thereafter. + +

type * TQCacheIterator::toFirst () +

+ +

Sets the iterator to point to the first item in the cache and +returns a pointer to the item. +

Sets the iterator to 0 and returns 0 if the cache is empty. +

See also toLast() and isEmpty(). + +

type * TQCacheIterator::toLast () +

+ +

Sets the iterator to point to the last item in the cache and +returns a pointer to the item. +

Sets the iterator to 0 and returns 0 if the cache is empty. +

See also toFirst() and isEmpty(). + + +


+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/qcanvas-h.html b/doc/html/qcanvas-h.html new file mode 100644 index 00000000..1b1f4ffa --- /dev/null +++ b/doc/html/qcanvas-h.html @@ -0,0 +1,861 @@ + + + + + +qcanvas.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qcanvas.h

+ +

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


+
+/**********************************************************************
+** $Id: qt/qcanvas.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQCanvas classes
+**
+** Created : 991211
+**
+** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the canvas 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 retquirements 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 TQCANVAS_H
+#define TQCANVAS_H
+
+#ifndef QT_H
+#include "qscrollview.h"
+#include "qpixmap.h"
+#include "qptrlist.h"
+#include "qbrush.h"
+#include "qpen.h"
+#include "qvaluelist.h"
+#include "qpointarray.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_CANVAS ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_CANVAS )
+#define TQM_EXPORT_CANVAS
+#define TQM_TEMPLATE_EXTERN_CANVAS
+#else
+#define TQM_EXPORT_CANVAS Q_EXPORT
+#define TQM_TEMPLATE_EXTERN_CANVAS Q_TEMPLATE_EXTERN
+#endif
+
+#ifndef QT_NO_CANVAS
+
+
+class TQCanvasSprite;
+class TQCanvasPolygonalItem;
+class TQCanvasRectangle;
+class TQCanvasPolygon;
+class TQCanvasEllipse;
+class TQCanvasText;
+class TQCanvasLine;
+class TQCanvasChunk;
+class TQCanvas;
+class TQCanvasItem;
+class TQCanvasView;
+class TQCanvasPixmap;
+
+#if defined(Q_TEMPLATEDLL) && ( !defined(Q_CC_BOR) || !defined(QT_MAKEDLL) || defined(Q_EXPORT_TEMPLATES) )
+// MOC_SKIP_BEGIN
+TQM_TEMPLATE_EXTERN_CANVAS template class TQM_EXPORT_CANVAS TQValueListIterator< TQCanvasItem* >;
+TQM_TEMPLATE_EXTERN_CANVAS template class TQM_EXPORT_CANVAS TQValueList< TQCanvasItem* >;
+// MOC_SKIP_END
+#endif
+
+class TQM_EXPORT_CANVAS TQCanvasItemList : public TQValueList<TQCanvasItem*> {
+public:
+    void sort();
+    void drawUnique( TQPainter& painter );
+    TQCanvasItemList operator+(const TQCanvasItemList &l) const;
+};
+
+
+class TQCanvasItemExtra;
+
+class TQM_EXPORT_CANVAS TQCanvasItem : public TQt
+{
+public:
+    TQCanvasItem(TQCanvas* canvas);
+    virtual ~TQCanvasItem();
+
+    double x() const
+	{ return myx; }
+    double y() const
+	{ return myy; }
+    double z() const
+	{ return myz; } // (depth)
+
+    virtual void moveBy(double dx, double dy);
+    void move(double x, double y);
+    void setX(double a) { move(a,y()); }
+    void setY(double a) { move(x(),a); }
+    void setZ(double a) { myz=a; changeChunks(); }
+
+    bool animated() const;
+    virtual void setAnimated(bool y);
+    virtual void setVelocity( double vx, double vy);
+    void setXVelocity( double vx ) { setVelocity(vx,yVelocity()); }
+    void setYVelocity( double vy ) { setVelocity(xVelocity(),vy); }
+    double xVelocity() const;
+    double yVelocity() const;
+    virtual void advance(int stage);
+
+    virtual bool collidesWith( const TQCanvasItem* ) const=0;
+
+    TQCanvasItemList collisions(bool exact /* NO DEFAULT */ ) const;
+
+    virtual void setCanvas(TQCanvas*);
+
+    virtual void draw(TQPainter&)=0;
+
+    void show();
+    void hide();
+
+    virtual void setVisible(bool yes);
+    bool isVisible() const
+	{ return (bool)vis; }
+    virtual void setSelected(bool yes);
+    bool isSelected() const
+	{ return (bool)sel; }
+    virtual void setEnabled(bool yes);
+    bool isEnabled() const
+	{ return (bool)ena; }
+    virtual void setActive(bool yes);
+    bool isActive() const
+	{ return (bool)act; }
+#ifndef QT_NO_COMPAT
+    bool visible() const
+	{ return (bool)vis; }
+    bool selected() const
+	{ return (bool)sel; }
+    bool enabled() const
+	{ return (bool)ena; }
+    bool active() const
+	{ return (bool)act; }
+#endif
+
+    enum RttiValues {
+	Rtti_Item = 0,
+	Rtti_Sprite = 1,
+	Rtti_PolygonalItem = 2,
+	Rtti_Text = 3,
+	Rtti_Polygon = 4,
+	Rtti_Rectangle = 5,
+	Rtti_Ellipse = 6,
+	Rtti_Line = 7,
+	Rtti_Spline = 8
+    };
+
+    virtual int rtti() const;
+    static int RTTI;
+
+    virtual TQRect boundingRect() const=0;
+    virtual TQRect boundingRectAdvanced() const;
+
+    TQCanvas* canvas() const
+	{ return cnv; }
+
+protected:
+    void update() { changeChunks(); }
+
+private:
+    // For friendly subclasses...
+
+    friend class TQCanvasPolygonalItem;
+    friend class TQCanvasSprite;
+    friend class TQCanvasRectangle;
+    friend class TQCanvasPolygon;
+    friend class TQCanvasEllipse;
+    friend class TQCanvasText;
+    friend class TQCanvasLine;
+
+    virtual TQPointArray chunks() const;
+    virtual void addToChunks();
+    virtual void removeFromChunks();
+    virtual void changeChunks();
+    virtual bool collidesWith( const TQCanvasSprite*,
+			       const TQCanvasPolygonalItem*,
+			       const TQCanvasRectangle*,
+			       const TQCanvasEllipse*,
+			       const TQCanvasText* ) const = 0;
+    // End of friend stuff
+
+    TQCanvas* cnv;
+    static TQCanvas* current_canvas;
+    double myx,myy,myz;
+    TQCanvasItemExtra *ext;
+    TQCanvasItemExtra& extra();
+    uint ani:1;
+    uint vis:1;
+    uint val:1;
+    uint sel:1;
+    uint ena:1;
+    uint act:1;
+};
+
+
+class TQCanvasData;
+
+class TQM_EXPORT_CANVAS TQCanvas : public TQObject
+{
+    Q_OBJECT
+public:
+    TQCanvas( TQObject* parent = 0, const char* name = 0 );
+    TQCanvas(int w, int h);
+    TQCanvas( TQPixmap p, int h, int v, int tilewidth, int tileheight );
+
+    virtual ~TQCanvas();
+
+    virtual void setTiles( TQPixmap tiles, int h, int v,
+			   int tilewidth, int tileheight );
+    virtual void setBackgroundPixmap( const TQPixmap& p );
+    TQPixmap backgroundPixmap() const;
+
+    virtual void setBackgroundColor( const TQColor& c );
+    TQColor backgroundColor() const;
+
+    virtual void setTile( int x, int y, int tilenum );
+    int tile( int x, int y ) const
+	{ return grid[x+y*htiles]; }
+
+    int tilesHorizontally() const
+	{ return htiles; }
+    int tilesVertically() const
+	{ return vtiles; }
+
+    int tileWidth() const
+	{ return tilew; }
+    int tileHeight() const
+	{ return tileh; }
+
+    virtual void resize(int width, int height);
+    int width() const
+	{ return awidth; }
+    int height() const
+	{ return aheight; }
+    TQSize size() const
+	{ return TQSize(awidth,aheight); }
+    TQRect rect() const
+	{ return TQRect( 0, 0, awidth, aheight ); }
+    bool onCanvas( int x, int y ) const
+	{ return x>=0 && y>=0 && x<awidth && y<aheight; }
+    bool onCanvas( const TQPoint& p ) const
+	{ return onCanvas(p.x(),p.y()); }
+    bool validChunk( int x, int y ) const
+	{ return x>=0 && y>=0 && x<chwidth && y<chheight; }
+    bool validChunk( const TQPoint& p ) const
+	{ return validChunk(p.x(),p.y()); }
+
+    int chunkSize() const
+	{ return chunksize; }
+    virtual void retune(int chunksize, int maxclusters=100);
+
+    bool sameChunk(int x1, int y1, int x2, int y2) const
+	{ return x1/chunksize==x2/chunksize && y1/chunksize==y2/chunksize; }
+    virtual void setChangedChunk(int i, int j);
+    virtual void setChangedChunkContaining(int x, int y);
+    virtual void setAllChanged();
+    virtual void setChanged(const TQRect& area);
+    virtual void setUnchanged(const TQRect& area);
+
+    // These call setChangedChunk.
+    void addItemToChunk(TQCanvasItem*, int i, int j);
+    void removeItemFromChunk(TQCanvasItem*, int i, int j);
+    void addItemToChunkContaining(TQCanvasItem*, int x, int y);
+    void removeItemFromChunkContaining(TQCanvasItem*, int x, int y);
+
+    TQCanvasItemList allItems();
+    TQCanvasItemList collisions( const TQPoint&) const;
+    TQCanvasItemList collisions( const TQRect&) const;
+    TQCanvasItemList collisions( const TQPointArray& pa, const TQCanvasItem* item,
+				bool exact) const;
+
+    void drawArea(const TQRect&, TQPainter* p, bool double_buffer=FALSE);
+
+    // These are for TQCanvasView to call
+    virtual void addView(TQCanvasView*);
+    virtual void removeView(TQCanvasView*);
+    void drawCanvasArea(const TQRect&, TQPainter* p=0, bool double_buffer=TRUE);
+    void drawViewArea( TQCanvasView* view, TQPainter* p, const TQRect& r, bool dbuf );
+
+    // These are for TQCanvasItem to call
+    virtual void addItem(TQCanvasItem*);
+    virtual void addAnimation(TQCanvasItem*);
+    virtual void removeItem(TQCanvasItem*);
+    virtual void removeAnimation(TQCanvasItem*);
+
+    virtual void setAdvancePeriod(int ms);
+    virtual void setUpdatePeriod(int ms);
+
+    virtual void setDoubleBuffering(bool y);
+
+signals:
+    void resized();
+
+public slots:
+    virtual void advance();
+    virtual void update();
+
+protected:
+    virtual void drawBackground(TQPainter&, const TQRect& area);
+    virtual void drawForeground(TQPainter&, const TQRect& area);
+
+private:
+    void init(int w, int h, int chunksze=16, int maxclust=100);
+
+    TQCanvasChunk& chunk(int i, int j) const;
+    TQCanvasChunk& chunkContaining(int x, int y) const;
+
+    TQRect changeBounds(const TQRect& inarea);
+    void drawChanges(const TQRect& inarea);
+
+    TQPixmap offscr;
+    int awidth,aheight;
+    int chunksize;
+    int maxclusters;
+    int chwidth,chheight;
+    TQCanvasChunk* chunks;
+
+    TQCanvasData* d;
+
+    void initTiles(TQPixmap p, int h, int v, int tilewidth, int tileheight);
+    ushort *grid;
+    ushort htiles;
+    ushort vtiles;
+    ushort tilew;
+    ushort tileh;
+    bool oneone;
+    TQPixmap pm;
+    TQTimer* update_timer;
+    TQColor bgcolor;
+    bool debug_redraw_areas;
+    bool dblbuf;
+
+    friend void qt_unview(TQCanvas* c);
+
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQCanvas( const TQCanvas & );
+    TQCanvas &operator=( const TQCanvas & );
+#endif
+};
+
+class TQCanvasViewData;
+
+class TQM_EXPORT_CANVAS TQCanvasView : public TQScrollView
+{
+    Q_OBJECT
+public:
+
+    TQCanvasView(TQWidget* parent=0, const char* name=0, WFlags f=0);
+    TQCanvasView(TQCanvas* viewing, TQWidget* parent=0, const char* name=0, WFlags f=0);
+    ~TQCanvasView();
+
+    TQCanvas* canvas() const
+	{ return viewing; }
+    void setCanvas(TQCanvas* v);
+
+    const TQWMatrix &worldMatrix() const;
+    const TQWMatrix &inverseWorldMatrix() const;
+    bool setWorldMatrix( const TQWMatrix & );
+
+protected:
+    void drawContents( TQPainter*, int cx, int cy, int cw, int ch );
+    TQSize sizeHint() const;
+
+private:
+    void drawContents( TQPainter* );
+    TQCanvas* viewing;
+    TQCanvasViewData* d;
+    friend void qt_unview(TQCanvas* c);
+
+private slots:
+    void cMoving(int,int);
+    void updateContentsSize();
+
+private:
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQCanvasView( const TQCanvasView & );
+    TQCanvasView &operator=( const TQCanvasView & );
+#endif
+};
+
+
+class TQM_EXPORT_CANVAS TQCanvasPixmap : public TQPixmap
+{
+public:
+#ifndef QT_NO_IMAGEIO
+    TQCanvasPixmap(const TQString& datafilename);
+#endif
+    TQCanvasPixmap(const TQImage& image);
+    TQCanvasPixmap(const TQPixmap&, const TQPoint& hotspot);
+    ~TQCanvasPixmap();
+
+    int offsetX() const
+	{ return hotx; }
+    int offsetY() const
+	{ return hoty; }
+    void setOffset(int x, int y) { hotx = x; hoty = y; }
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQCanvasPixmap( const TQCanvasPixmap & );
+    TQCanvasPixmap &operator=( const TQCanvasPixmap & );
+#endif
+    void init(const TQImage&);
+    void init(const TQPixmap& pixmap, int hx, int hy);
+
+    friend class TQCanvasSprite;
+    friend class TQCanvasPixmapArray;
+    friend bool qt_testCollision(const TQCanvasSprite* s1, const TQCanvasSprite* s2);
+
+    int hotx,hoty;
+
+    TQImage* collision_mask;
+};
+
+
+class TQM_EXPORT_CANVAS TQCanvasPixmapArray
+{
+public:
+    TQCanvasPixmapArray();
+#ifndef QT_NO_IMAGEIO
+    TQCanvasPixmapArray(const TQString& datafilenamepattern, int framecount=0);
+#endif
+    // this form is deprecated
+    TQCanvasPixmapArray(TQPtrList<TQPixmap>, TQPtrList<TQPoint> hotspots);
+
+    TQCanvasPixmapArray(TQValueList<TQPixmap>, TQPointArray hotspots = TQPointArray() );
+    ~TQCanvasPixmapArray();
+
+#ifndef QT_NO_IMAGEIO
+    bool readPixmaps(const TQString& datafilenamepattern, int framecount=0);
+    bool readCollisionMasks(const TQString& filenamepattern);
+#endif
+
+    // deprecated
+    bool operator!(); // Failure check.
+    bool isValid() const;
+
+    TQCanvasPixmap* image(int i) const
+	{ return img ? img[i] : 0; }
+    void setImage(int i, TQCanvasPixmap* p);
+    uint count() const
+	{ return (uint)framecount; }
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQCanvasPixmapArray( const TQCanvasPixmapArray & );
+    TQCanvasPixmapArray &operator=( const TQCanvasPixmapArray & );
+#endif
+#ifndef QT_NO_IMAGEIO
+    bool readPixmaps(const TQString& datafilenamepattern, int framecount, bool maskonly);
+#endif
+
+    void reset();
+    int framecount;
+    TQCanvasPixmap** img;
+};
+
+
+class TQM_EXPORT_CANVAS TQCanvasSprite : public TQCanvasItem
+{
+public:
+    TQCanvasSprite(TQCanvasPixmapArray* array, TQCanvas* canvas);
+
+    void setSequence(TQCanvasPixmapArray* seq);
+
+    virtual ~TQCanvasSprite();
+
+    void move(double x, double y);
+    virtual void move(double x, double y, int frame);
+    void setFrame(int);
+    enum FrameAnimationType { Cycle, Oscillate };
+    virtual void setFrameAnimation(FrameAnimationType=Cycle, int step=1, int state=0);
+    int frame() const
+	{ return frm; }
+    int frameCount() const
+	{ return images->count(); }
+
+    int rtti() const;
+    static int RTTI;
+
+    bool collidesWith( const TQCanvasItem* ) const;
+
+    TQRect boundingRect() const;
+
+    // is there a reason for these to be protected? Lars
+//protected:
+
+    int width() const;
+    int height() const;
+
+    int leftEdge() const;
+    int topEdge() const;
+    int rightEdge() const;
+    int bottomEdge() const;
+
+    int leftEdge(int nx) const;
+    int topEdge(int ny) const;
+    int rightEdge(int nx) const;
+    int bottomEdge(int ny) const;
+    TQCanvasPixmap* image() const
+	{ return images->image(frm); }
+    virtual TQCanvasPixmap* imageAdvanced() const;
+    TQCanvasPixmap* image(int f) const
+	{ return images->image(f); }
+    virtual void advance(int stage);
+
+public:
+    void draw(TQPainter& painter);
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQCanvasSprite( const TQCanvasSprite & );
+    TQCanvasSprite &operator=( const TQCanvasSprite & );
+#endif
+    void addToChunks();
+    void removeFromChunks();
+    void changeChunks();
+
+    int frm;
+    ushort anim_val;
+    uint anim_state:2;
+    uint anim_type:14;
+    bool collidesWith( const TQCanvasSprite*,
+		       const TQCanvasPolygonalItem*,
+		       const TQCanvasRectangle*,
+		       const TQCanvasEllipse*,
+		       const TQCanvasText* ) const;
+
+    friend bool qt_testCollision( const TQCanvasSprite* s1,
+				  const TQCanvasSprite* s2 );
+
+    TQCanvasPixmapArray* images;
+};
+
+class TQPolygonalProcessor;
+
+class TQM_EXPORT_CANVAS TQCanvasPolygonalItem : public TQCanvasItem
+{
+public:
+    TQCanvasPolygonalItem(TQCanvas* canvas);
+    virtual ~TQCanvasPolygonalItem();
+
+    bool collidesWith( const TQCanvasItem* ) const;
+
+    virtual void setPen(TQPen p);
+    virtual void setBrush(TQBrush b);
+
+    TQPen pen() const
+	{ return pn; }
+    TQBrush brush() const
+	{ return br; }
+
+    virtual TQPointArray areaPoints() const=0;
+    virtual TQPointArray areaPointsAdvanced() const;
+    TQRect boundingRect() const;
+
+    int rtti() const;
+    static int RTTI;
+
+protected:
+    void draw(TQPainter &);
+    virtual void drawShape(TQPainter &) = 0;
+
+    bool winding() const;
+    void setWinding(bool);
+
+    void invalidate();
+    bool isValid() const
+	{ return (bool)val; }
+
+private:
+    void scanPolygon( const TQPointArray& pa, int winding,
+		      TQPolygonalProcessor& process ) const;
+    TQPointArray chunks() const;
+
+    bool collidesWith( const TQCanvasSprite*,
+		       const TQCanvasPolygonalItem*,
+		       const TQCanvasRectangle*,
+		       const TQCanvasEllipse*,
+		       const TQCanvasText* ) const;
+
+    TQBrush br;
+    TQPen pn;
+    uint wind:1;
+};
+
+
+class TQM_EXPORT_CANVAS TQCanvasRectangle : public TQCanvasPolygonalItem
+{
+public:
+    TQCanvasRectangle(TQCanvas* canvas);
+    TQCanvasRectangle(const TQRect&, TQCanvas* canvas);
+    TQCanvasRectangle(int x, int y, int width, int height, TQCanvas* canvas);
+
+    ~TQCanvasRectangle();
+
+    int width() const;
+    int height() const;
+    void setSize(int w, int h);
+    TQSize size() const
+	{ return TQSize(w,h); }
+    TQPointArray areaPoints() const;
+    TQRect rect() const
+	{ return TQRect(int(x()),int(y()),w,h); }
+
+    bool collidesWith( const TQCanvasItem* ) const;
+
+    int rtti() const;
+    static int RTTI;
+
+protected:
+    void drawShape(TQPainter &);
+    TQPointArray chunks() const;
+
+private:
+    bool collidesWith(   const TQCanvasSprite*,
+			 const TQCanvasPolygonalItem*,
+			 const TQCanvasRectangle*,
+			 const TQCanvasEllipse*,
+			 const TQCanvasText* ) const;
+
+    int w, h;
+};
+
+
+class TQM_EXPORT_CANVAS TQCanvasPolygon : public TQCanvasPolygonalItem
+{
+public:
+    TQCanvasPolygon(TQCanvas* canvas);
+    ~TQCanvasPolygon();
+    void setPoints(TQPointArray);
+    TQPointArray points() const;
+    void moveBy(double dx, double dy);
+
+    TQPointArray areaPoints() const;
+
+    int rtti() const;
+    static int RTTI;
+
+protected:
+    void drawShape(TQPainter &);
+    TQPointArray poly;
+};
+
+
+class TQM_EXPORT_CANVAS TQCanvasSpline : public TQCanvasPolygon
+{
+public:
+    TQCanvasSpline(TQCanvas* canvas);
+    ~TQCanvasSpline();
+
+    void setControlPoints(TQPointArray, bool closed=TRUE);
+    TQPointArray controlPoints() const;
+    bool closed() const;
+
+    int rtti() const;
+    static int RTTI;
+
+private:
+    void recalcPoly();
+    TQPointArray bez;
+    bool cl;
+};
+
+
+class TQM_EXPORT_CANVAS TQCanvasLine : public TQCanvasPolygonalItem
+{
+public:
+    TQCanvasLine(TQCanvas* canvas);
+    ~TQCanvasLine();
+    void setPoints(int x1, int y1, int x2, int y2);
+
+    TQPoint startPoint() const
+	{ return TQPoint(x1,y1); }
+    TQPoint endPoint() const
+	{ return TQPoint(x2,y2); }
+
+    int rtti() const;
+    static int RTTI;
+
+    void setPen(TQPen p);
+    void moveBy(double dx, double dy);
+
+protected:
+    void drawShape(TQPainter &);
+    TQPointArray areaPoints() const;
+
+private:
+    int x1,y1,x2,y2;
+};
+
+
+class TQM_EXPORT_CANVAS TQCanvasEllipse : public TQCanvasPolygonalItem
+{
+
+public:
+    TQCanvasEllipse( TQCanvas* canvas );
+    TQCanvasEllipse( int width, int height, TQCanvas* canvas );
+    TQCanvasEllipse( int width, int height, int startangle, int angle,
+		    TQCanvas* canvas );
+
+    ~TQCanvasEllipse();
+
+    int width() const;
+    int height() const;
+    void setSize(int w, int h);
+    void setAngles(int start, int length);
+    int angleStart() const
+	{ return a1; }
+    int angleLength() const
+	{ return a2; }
+    TQPointArray areaPoints() const;
+
+    bool collidesWith( const TQCanvasItem* ) const;
+
+    int rtti() const;
+    static int RTTI;
+
+protected:
+    void drawShape(TQPainter &);
+
+private:
+    bool collidesWith( const TQCanvasSprite*,
+		       const TQCanvasPolygonalItem*,
+		       const TQCanvasRectangle*,
+		       const TQCanvasEllipse*,
+		       const TQCanvasText* ) const;
+    int w, h;
+    int a1, a2;
+};
+
+
+class TQCanvasTextExtra;
+
+class TQM_EXPORT_CANVAS TQCanvasText : public TQCanvasItem
+{
+public:
+    TQCanvasText(TQCanvas* canvas);
+    TQCanvasText(const TQString&, TQCanvas* canvas);
+    TQCanvasText(const TQString&, TQFont, TQCanvas* canvas);
+
+    virtual ~TQCanvasText();
+
+    void setText( const TQString& );
+    void setFont( const TQFont& );
+    void setColor( const TQColor& );
+    TQString text() const;
+    TQFont font() const;
+    TQColor color() const;
+
+    void moveBy(double dx, double dy);
+
+    int textFlags() const
+	{ return flags; }
+    void setTextFlags(int);
+
+    TQRect boundingRect() const;
+
+    bool collidesWith( const TQCanvasItem* ) const;
+
+    int rtti() const;
+    static int RTTI;
+
+protected:
+    virtual void draw(TQPainter&);
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQCanvasText( const TQCanvasText & );
+    TQCanvasText &operator=( const TQCanvasText & );
+#endif
+    void addToChunks();
+    void removeFromChunks();
+    void changeChunks();
+
+    void setRect();
+    TQRect brect;
+    TQString txt;
+    int flags;
+    TQFont fnt;
+    TQColor col;
+    TQCanvasTextExtra* extra;
+
+    bool collidesWith(   const TQCanvasSprite*,
+			 const TQCanvasPolygonalItem*,
+			 const TQCanvasRectangle*,
+			 const TQCanvasEllipse*,
+			 const TQCanvasText* ) const;
+};
+
+#define Q_DEFINED_QCANVAS
+#include "qwinexport.h"
+#endif // QT_NO_CANVAS
+
+#endif // TQCANVAS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvas-members.html b/doc/html/qcanvas-members.html new file mode 100644 index 00000000..53aa6854 --- /dev/null +++ b/doc/html/qcanvas-members.html @@ -0,0 +1,124 @@ + + + + + +TQCanvas Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvas

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvas.html b/doc/html/qcanvas.html new file mode 100644 index 00000000..5c68676f --- /dev/null +++ b/doc/html/qcanvas.html @@ -0,0 +1,588 @@ + + + + + +TQCanvas Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvas Class Reference
[canvas module]

+ +

The TQCanvas class provides a 2D area that can contain TQCanvasItem objects. +More... +

#include <qcanvas.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Protected Members

+
    +
  • virtual void drawBackground ( TQPainter & painter, const TQRect & clip )
  • +
  • virtual void drawForeground ( TQPainter & painter, const TQRect & clip )
  • +
+

Detailed Description

+ + +The TQCanvas class provides a 2D area that can contain TQCanvasItem objects. + +

+ + + + +

The TQCanvas class manages its 2D graphic area and all the canvas +items the area contains. The canvas has no visual appearance of +its own. Instead, it is displayed on screen using a TQCanvasView. +Multiple TQCanvasView widgets may be associated with a canvas to +provide multiple views of the same canvas. +

The canvas is optimized for large numbers of items, particularly +where only a small percentage of the items change at any +one time. If the entire display changes very frequently, you should +consider using your own custom TQScrollView subclass. +

TQt provides a rich +set of canvas item classes, e.g. TQCanvasEllipse, TQCanvasLine, +TQCanvasPolygon, TQCanvasPolygonalItem, TQCanvasRectangle, TQCanvasSpline, +TQCanvasSprite and TQCanvasText. You can subclass to create your own +canvas items; TQCanvasPolygonalItem is the most common base class used +for this purpose. +

Items appear on the canvas after their show() function has been called (or setVisible(TRUE)), and after +update() has been called. The canvas only shows items that are +visible, and then only if +update() is called. (By default the canvas is white and so are +canvas items, so if nothing appears try changing colors.) +

If you created the canvas without passing a width and height to +the constructor you must also call resize(). +

Although a canvas may appear to be similar to a widget with child +widgets, there are several notable differences: +

    +
  • Canvas items are usually much faster to manipulate and redraw than +child widgets, with the speed advantage becoming especially great when +there are many canvas items and non-rectangular items. In most +situations canvas items are also a lot more memory efficient than child +widgets. +

  • It's easy to detect overlapping items (collision detection). +

  • The canvas can be larger than a widget. A million-by-million canvas +is perfectly possible. At such a size a widget might be very +inefficient, and some window systems might not support it at all, +whereas TQCanvas scales well. Even with a billion pixels and a million +items, finding a particular canvas item, detecting collisions, etc., +is still fast (though the memory consumption may be prohibitive +at such extremes). +

  • Two or more TQCanvasView objects can view the same canvas. +

  • An arbitrary transformation matrix can be set on each TQCanvasView +which makes it easy to zoom, rotate or shear the viewed canvas. +

  • Widgets provide a lot more functionality, such as input (TQKeyEvent, +TQMouseEvent etc.) and layout management (TQGridLayout etc.). +

+

A canvas consists of a background, a number of canvas items organized by +x, y and z coordinates, and a foreground. A canvas item's z coordinate +can be treated as a layer number -- canvas items with a higher z +coordinate appear in front of canvas items with a lower z coordinate. +

The background is white by default, but can be set to a different color +using setBackgroundColor(), or to a repeated pixmap using +setBackgroundPixmap() or to a mosaic of smaller pixmaps using +setTiles(). Individual tiles can be set with setTile(). There +are corresponding get functions, e.g. backgroundColor() and +backgroundPixmap(). +

Note that TQCanvas does not inherit from TQWidget, even though it has some +functions which provide the same functionality as those in TQWidget. One +of these is setBackgroundPixmap(); some others are resize(), size(), +width() and height(). TQCanvasView is the widget used to display a +canvas on the screen. +

Canvas items are added to a canvas by constructing them and passing the +canvas to the canvas item's constructor. An item can be moved to a +different canvas using TQCanvasItem::setCanvas(). +

Canvas items are movable (and in the case of TQCanvasSprites, animated) +objects that inherit TQCanvasItem. Each canvas item has a position on the +canvas (x, y coordinates) and a height (z coordinate), all of which are +held as floating-point numbers. Moving canvas items also have x and y +velocities. It's possible for a canvas item to be outside the canvas +(for example TQCanvasItem::x() is greater than width()). When a canvas +item is off the canvas, onCanvas() returns FALSE and the canvas +disregards the item. (Canvas items off the canvas do not slow down any +of the common operations on the canvas.) +

Canvas items can be moved with TQCanvasItem::move(). The advance() +function moves all TQCanvasItem::animated() canvas items and +setAdvancePeriod() makes TQCanvas move them automatically on a periodic +basis. In the context of the TQCanvas classes, to `animate' a canvas item +is to set it in motion, i.e. using TQCanvasItem::setVelocity(). Animation +of a canvas item itself, i.e. items which change over time, is enabled +by calling TQCanvasSprite::setFrameAnimation(), or more generally by +subclassing and reimplementing TQCanvasItem::advance(). To detect collisions +use one of the TQCanvasItem::collisions() functions. +

The changed parts of the canvas are redrawn (if they are visible in a +canvas view) whenever update() is called. You can either call update() +manually after having changed the contents of the canvas, or force +periodic updates using setUpdatePeriod(). If you have moving objects on +the canvas, you must call advance() every time the objects should +move one step further. Periodic calls to advance() can be forced using +setAdvancePeriod(). The advance() function will call +TQCanvasItem::advance() on every item that is animated and trigger an update of the +affected areas afterwards. (A canvas item that is `animated' is simply +a canvas item that is in motion.) +

TQCanvas organizes its canvas items into chunks; these are areas on +the canvas that are used to speed up most operations. Many operations +start by eliminating most chunks (i.e. those which haven't changed) +and then process only the canvas items that are in the few interesting +(i.e. changed) chunks. A valid chunk, validChunk(), is one which is on +the canvas. +

The chunk size is a key factor to TQCanvas's speed: if there are too many +chunks, the speed benefit of grouping canvas items into chunks is +reduced. If the chunks are too large, it takes too long to process each +one. The TQCanvas constructor tries to pick a suitable size, but you +can call retune() to change it at any time. The chunkSize() function +returns the current chunk size. The canvas items always make sure +they're in the right chunks; all you need to make sure of is that +the canvas uses the right chunk size. A good rule of thumb is that +the size should be a bit smaller than the average canvas item +size. If you have moving objects, the chunk size should be a bit +smaller than the average size of the moving items. +

The foreground is normally nothing, but if you reimplement +drawForeground(), you can draw things in front of all the canvas +items. +

Areas can be set as changed with setChanged() and set unchanged with +setUnchanged(). The entire canvas can be set as changed with +setAllChanged(). A list of all the items on the canvas is returned by +allItems(). +

An area can be copied (painted) to a TQPainter with drawArea(). +

If the canvas is resized it emits the resized() signal. +

The examples/canvas application and the 2D graphics page of the +examples/demo application demonstrate many of TQCanvas's facilities. +

See also TQCanvasView, TQCanvasItem, Abstract Widget Classes, Graphics Classes, and Image Processing Classes. + +


Member Function Documentation

+

TQCanvas::TQCanvas ( TQObject * parent = 0, const char * name = 0 ) +

+Create a TQCanvas with no size. parent and name are passed to +the TQObject superclass. +

Warning: You must call resize() at some time after creation to +be able to use the canvas. + +

TQCanvas::TQCanvas ( int w, int h ) +

+Constructs a TQCanvas that is w pixels wide and h pixels high. + +

TQCanvas::TQCanvas ( TQPixmap p, int h, int v, int tilewidth, int tileheight ) +

+Constructs a TQCanvas which will be composed of h tiles +horizontally and v tiles vertically. Each tile will be an image +tilewidth by tileheight pixels taken from pixmap p. +

The pixmap p is a list of tiles, arranged left to right, (and +in the case of pixmaps that have multiple rows of tiles, top to +bottom), with tile 0 in the top-left corner, tile 1 next to the +right, and so on, e.g. +

+
0 1 2 3 +
4 5 6 7 +
+

The TQCanvas is initially sized to show exactly the given number of +tiles horizontally and vertically. If it is resized to be larger, +the entire matrix of tiles will be repeated as often as necessary +to cover the area. If it is smaller, tiles to the right and bottom +will not be visible. +

See also setTiles(). + +

TQCanvas::~TQCanvas () [virtual] +

+Destroys the canvas and all the canvas's canvas items. + +

void TQCanvas::advance () [virtual slot] +

+Moves all TQCanvasItem::animated() canvas items on the canvas and +refreshes all changes to all views of the canvas. (An `animated' +item is an item that is in motion; see setVelocity().) +

The advance takes place in two phases. In phase 0, the +TQCanvasItem::advance() function of each TQCanvasItem::animated() +canvas item is called with paramater 0. Then all these canvas +items are called again, with parameter 1. In phase 0, the canvas +items should not change position, merely examine other items on +the canvas for which special processing is retquired, such as +collisions between items. In phase 1, all canvas items should +change positions, ignoring any other items on the canvas. This +two-phase approach allows for considerations of "fairness", +although no TQCanvasItem subclasses supplied with TQt do anything +interesting in phase 0. +

The canvas can be configured to call this function periodically +with setAdvancePeriod(). +

See also update(). + +

TQCanvasItemList TQCanvas::allItems () +

+Returns a list of all the items in the canvas. + +

TQColor TQCanvas::backgroundColor () const +

+Returns the color set by setBackgroundColor(). By default, this is +white. +

This function is not a reimplementation of +TQWidget::backgroundColor() (TQCanvas is not a subclass of TQWidget), +but all TQCanvasViews that are viewing the canvas will set their +backgrounds to this color. +

See also setBackgroundColor() and backgroundPixmap(). + +

TQPixmap TQCanvas::backgroundPixmap () const +

+Returns the pixmap set by setBackgroundPixmap(). By default, +this is a null pixmap. +

See also setBackgroundPixmap() and backgroundColor(). + +

int TQCanvas::chunkSize () const +

+ +

Returns the chunk size of the canvas. +

See also retune(). + +

TQCanvasItemList TQCanvas::collisions ( const TQPoint & p ) const +

+Returns a list of canvas items that collide with the point p. +The list is ordered by z coordinates, from highest z coordinate +(front-most item) to lowest z coordinate (rear-most item). + +

TQCanvasItemList TQCanvas::collisions ( const TQRect & r ) const +

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

Returns a list of items which collide with the rectangle r. The +list is ordered by z coordinates, from highest z coordinate +(front-most item) to lowest z coordinate (rear-most item). + +

TQCanvasItemList TQCanvas::collisions ( const TQPointArray & chunklist, const TQCanvasItem * item, bool exact ) const +

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

Returns a list of canvas items which intersect with the chunks +listed in chunklist, excluding item. If exact is TRUE, +only those which actually collide with item are returned; otherwise canvas items +are included just for being in the chunks. +

This is a utility function mainly used to implement the simpler +TQCanvasItem::collisions() function. + +

void TQCanvas::drawArea ( const TQRect & clip, TQPainter * painter, bool dbuf = FALSE ) +

+Paints all canvas items that are in the area clip to painter, using double-buffering if dbuf is TRUE. +

e.g. to print the canvas to a printer: +

+    TQPrinter pr;
+    if ( pr.setup() ) {
+        TQPainter p(&pr);
+        canvas.drawArea( canvas.rect(), &p );
+    }
+    
+ + +

Example: canvas/canvas.cpp. +

void TQCanvas::drawBackground ( TQPainter & painter, const TQRect & clip ) [virtual protected] +

+This virtual function is called for all updates of the canvas. It +renders any background graphics using the painter painter, in +the area clip. If the canvas has a background pixmap or a tiled +background, that graphic is used, otherwise the canvas is cleared +using the background color. +

If the graphics for an area change, you must explicitly call +setChanged(const TQRect&) for the result to be visible when +update() is next called. +

See also setBackgroundColor(), setBackgroundPixmap(), and setTiles(). + +

void TQCanvas::drawForeground ( TQPainter & painter, const TQRect & clip ) [virtual protected] +

+This virtual function is called for all updates of the canvas. It +renders any foreground graphics using the painter painter, in +the area clip. +

If the graphics for an area change, you must explicitly call +setChanged(const TQRect&) for the result to be visible when +update() is next called. +

The default is to draw nothing. + +

int TQCanvas::height () const +

+ +

Returns the height of the canvas, in pixels. + +

Example: canvas/canvas.cpp. +

bool TQCanvas::onCanvas ( int x, int y ) const +

+ +

Returns TRUE if the pixel position (x, y) is on the canvas; +otherwise returns FALSE. +

See also validChunk(). + +

bool TQCanvas::onCanvas ( const TQPoint & p ) const +

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

Returns TRUE if the pixel position p is on the canvas; +otherwise returns FALSE. +

See also validChunk(). + +

TQRect TQCanvas::rect () const +

+ +

Returns a rectangle the size of the canvas. + +

void TQCanvas::resize ( int w, int h ) [virtual] +

+Changes the size of the canvas to have a width of w and a +height of h. This is a slow operation. + +

Examples: canvas/canvas.cpp and chart/chartform.cpp. +

void TQCanvas::resized () [signal] +

+ +

This signal is emitted whenever the canvas is resized. Each +TQCanvasView connects to this signal to keep the scrollview's size +correct. + +

void TQCanvas::retune ( int chunksze, int mxclusters = 100 ) [virtual] +

+Change the efficiency tuning parameters to mxclusters clusters, +each of size chunksze. This is a slow operation if there are +many objects on the canvas. +

The canvas is divided into chunks which are rectangular areas chunksze wide by chunksze high. Use a chunk size which is about +the average size of the canvas items. If you choose a chunk size +which is too small it will increase the amount of calculation +retquired when drawing since each change will affect many chunks. +If you choose a chunk size which is too large the amount of +drawing retquired will increase because for each change, a lot of +drawing will be retquired since there will be many (unchanged) +canvas items which are in the same chunk as the changed canvas +items. +

Internally, a canvas uses a low-resolution "chunk matrix" to keep +track of all the items in the canvas. A 64x64 chunk matrix is the +default for a 1024x1024 pixel canvas, where each chunk collects +canvas items in a 16x16 pixel square. This default is also +affected by setTiles(). You can tune this default using this +function. For example if you have a very large canvas and want to +trade off speed for memory then you might set the chunk size to 32 +or 64. +

The mxclusters argument is the number of rectangular groups of +chunks that will be separately drawn. If the canvas has a large +number of small, dispersed items, this should be about that +number. Our testing suggests that a large number of clusters is +almost always best. +

+

void TQCanvas::setAdvancePeriod ( int ms ) [virtual] +

+Sets the canvas to call advance() every ms milliseconds. Any +previous setting by setAdvancePeriod() or setUpdatePeriod() is +overridden. +

If ms is less than 0 advancing will be stopped. + +

Example: canvas/main.cpp. +

void TQCanvas::setAllChanged () [virtual] +

+Marks the whole canvas as changed. +All views of the canvas will be entirely redrawn when +update() is called next. + +

void TQCanvas::setBackgroundColor ( const TQColor & c ) [virtual] +

+Sets the solid background to be the color c. +

See also backgroundColor(), setBackgroundPixmap(), and setTiles(). + +

void TQCanvas::setBackgroundPixmap ( const TQPixmap & p ) [virtual] +

+Sets the solid background to be the pixmap p repeated as +necessary to cover the entire canvas. +

See also backgroundPixmap(), setBackgroundColor(), and setTiles(). + +

void TQCanvas::setChanged ( const TQRect & area ) [virtual] +

+Marks area as changed. This area will be redrawn in all +views that are showing it when update() is called next. + +

void TQCanvas::setDoubleBuffering ( bool y ) [virtual] +

+If y is TRUE (the default) double-buffering is switched on; +otherwise double-buffering is switched off. +

Turning off double-buffering causes the redrawn areas to flicker a +little and also gives a (usually small) performance improvement. + +

Example: canvas/canvas.cpp. +

void TQCanvas::setTile ( int x, int y, int tilenum ) [virtual] +

+Sets the tile at (x, y) to use tile number tilenum, which +is an index into the tile pixmaps. The canvas will update +appropriately when update() is next called. +

The images are taken from the pixmap set by setTiles() and are +arranged left to right, (and in the case of pixmaps that have +multiple rows of tiles, top to bottom), with tile 0 in the +top-left corner, tile 1 next to the right, and so on, e.g. +

+
0 1 2 3 +
4 5 6 7 +
+

See also tile() and setTiles(). + +

void TQCanvas::setTiles ( TQPixmap p, int h, int v, int tilewidth, int tileheight ) [virtual] +

+Sets the TQCanvas to be composed of h tiles horizontally and v tiles vertically. Each tile will be an image tilewidth by tileheight pixels from pixmap p. +

The pixmap p is a list of tiles, arranged left to right, (and +in the case of pixmaps that have multiple rows of tiles, top to +bottom), with tile 0 in the top-left corner, tile 1 next to the +right, and so on, e.g. +

+
0 1 2 3 +
4 5 6 7 +
+

If the canvas is larger than the matrix of tiles, the entire +matrix is repeated as necessary to cover the whole canvas. If it +is smaller, tiles to the right and bottom are not visible. +

The width and height of p must be a multiple of tilewidth +and tileheight. If they are not the function will do nothing. +

If you want to unset any tiling set, then just pass in a null +pixmap and 0 for h, v, tilewidth, and +tileheight. + +

void TQCanvas::setUnchanged ( const TQRect & area ) [virtual] +

+Marks area as unchanged. The area will not be redrawn in +the views for the next update(), unless it is marked or changed +again before the next call to update(). + +

void TQCanvas::setUpdatePeriod ( int ms ) [virtual] +

+Sets the canvas to call update() every ms milliseconds. Any +previous setting by setAdvancePeriod() or setUpdatePeriod() is +overridden. +

If ms is less than 0 automatic updating will be stopped. + +

TQSize TQCanvas::size () const +

+ +

Returns the size of the canvas, in pixels. + +

int TQCanvas::tile ( int x, int y ) const +

+ +

Returns the tile at position (x, y). Initially, all tiles +are 0. +

The parameters must be within range, i.e. +0 < x < tilesHorizontally() and +0 < y < tilesVertically(). +

See also setTile(). + +

int TQCanvas::tileHeight () const +

+ +

Returns the height of each tile. + +

int TQCanvas::tileWidth () const +

+ +

Returns the width of each tile. + +

int TQCanvas::tilesHorizontally () const +

+ +

Returns the number of tiles horizontally. + +

int TQCanvas::tilesVertically () const +

+ +

Returns the number of tiles vertically. + +

void TQCanvas::update () [virtual slot] +

+Repaints changed areas in all views of the canvas. +

See also advance(). + +

bool TQCanvas::validChunk ( int x, int y ) const +

+ +

Returns TRUE if the chunk position (x, y) is on the canvas; +otherwise returns FALSE. +

See also onCanvas(). + +

bool TQCanvas::validChunk ( const TQPoint & p ) const +

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

Returns TRUE if the chunk position p is on the canvas; otherwise +returns FALSE. +

See also onCanvas(). + +

int TQCanvas::width () const +

+ +

Returns the width of the canvas, in pixels. + +

Example: canvas/canvas.cpp. + +


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


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvas.png b/doc/html/qcanvas.png new file mode 100644 index 00000000..0fe8ae82 Binary files /dev/null and b/doc/html/qcanvas.png differ diff --git a/doc/html/qcanvasellipse-members.html b/doc/html/qcanvasellipse-members.html new file mode 100644 index 00000000..2a7614c1 --- /dev/null +++ b/doc/html/qcanvasellipse-members.html @@ -0,0 +1,104 @@ + + + + + +TQCanvasEllipse Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvasEllipse

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvasellipse.html b/doc/html/qcanvasellipse.html new file mode 100644 index 00000000..18131f94 --- /dev/null +++ b/doc/html/qcanvasellipse.html @@ -0,0 +1,169 @@ + + + + + +TQCanvasEllipse Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvasEllipse Class Reference
[canvas module]

+ +

The TQCanvasEllipse class provides an ellipse or ellipse segment on a TQCanvas. +More... +

#include <qcanvas.h> +

Inherits TQCanvasPolygonalItem. +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • virtual void drawShape ( TQPainter & p )
  • +
+

Detailed Description

+ + +The TQCanvasEllipse class provides an ellipse or ellipse segment on a TQCanvas. + +

+ + +

A canvas item that paints an ellipse or ellipse segment with a TQBrush. +The ellipse's height, width, start angle and angle length can be set +at construction time. The size can be changed at runtime with +setSize(), and the angles can be changed (if you're displaying an +ellipse segment rather than a whole ellipse) with setAngles(). +

Note that angles are specified in 16ths of a degree. +

+

Ellipse
+

If a start angle and length angle are set then an ellipse segment +will be drawn. The start angle is the angle that goes from zero in a +counter-clockwise direction (shown in green in the diagram). The +length angle is the angle from the start angle in a +counter-clockwise direction (shown in blue in the diagram). The blue +segment is the segment of the ellipse that would be drawn. If no +start angle and length angle are specified the entire ellipse is +drawn. +

The ellipse can be drawn on a painter with drawShape(). +

Like any other canvas item ellipses can be moved with move() and +moveBy(), or by setting coordinates with setX(), setY() and setZ(). +

Note: TQCanvasEllipse does not use the pen. +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

TQCanvasEllipse::TQCanvasEllipse ( TQCanvas * canvas ) +

+Constructs a 32x32 ellipse, centered at (0, 0) on canvas. + +

TQCanvasEllipse::TQCanvasEllipse ( int width, int height, TQCanvas * canvas ) +

+Constructs a width by height pixel ellipse, centered at +(0, 0) on canvas. + +

TQCanvasEllipse::TQCanvasEllipse ( int width, int height, int startangle, int angle, TQCanvas * canvas ) +

+Constructs a width by height pixel ellipse, centered at +(0, 0) on canvas. Only a segment of the ellipse is drawn, +starting at angle startangle, and extending for angle angle +(the angle length). +

Note that angles are specified in +1/16ths of a degree. + +

TQCanvasEllipse::~TQCanvasEllipse () +

+Destroys the ellipse. + +

int TQCanvasEllipse::angleLength () const +

+ +

Returns the length angle (the extent of the ellipse segment) in +16ths of a degree. Initially this will be 360 * 16 (a complete +ellipse). +

See also setAngles() and angleStart(). + +

int TQCanvasEllipse::angleStart () const +

+ +

Returns the start angle in 16ths of a degree. Initially +this will be 0. +

See also setAngles() and angleLength(). + +

void TQCanvasEllipse::drawShape ( TQPainter & p ) [virtual protected] +

+Draws the ellipse, centered at x(), y() using the painter p. +

Note that TQCanvasEllipse does not support an outline (the pen is +always NoPen). + +

Reimplemented from TQCanvasPolygonalItem. +

int TQCanvasEllipse::height () const +

+Returns the height of the ellipse. + +

int TQCanvasEllipse::rtti () const [virtual] +

+Returns 6 (TQCanvasItem::Rtti_Ellipse). +

See also TQCanvasItem::rtti(). + +

Reimplemented from TQCanvasPolygonalItem. +

void TQCanvasEllipse::setAngles ( int start, int length ) +

+Sets the angles for the ellipse. The start angle is start and +the extent of the segment is length (the angle length) from the +start. The angles are specified in 16ths of a degree. By +default the ellipse will start at 0 and have an angle length of +360 * 16 (a complete ellipse). +

See also angleStart() and angleLength(). + +

void TQCanvasEllipse::setSize ( int width, int height ) +

+Sets the width and height of the ellipse. + +

int TQCanvasEllipse::width () const +

+Returns the width of the ellipse. + + +

+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/qcanvasellipse.png b/doc/html/qcanvasellipse.png new file mode 100644 index 00000000..2abfb6b9 Binary files /dev/null and b/doc/html/qcanvasellipse.png differ diff --git a/doc/html/qcanvasitem-members.html b/doc/html/qcanvasitem-members.html new file mode 100644 index 00000000..69ef1baa --- /dev/null +++ b/doc/html/qcanvasitem-members.html @@ -0,0 +1,87 @@ + + + + + +TQCanvasItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvasItem

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvasitem.html b/doc/html/qcanvasitem.html new file mode 100644 index 00000000..aef4e564 --- /dev/null +++ b/doc/html/qcanvasitem.html @@ -0,0 +1,480 @@ + + + + + +TQCanvasItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvasItem Class Reference
[canvas module]

+ +

The TQCanvasItem class provides an abstract graphic object on a TQCanvas. +More... +

#include <qcanvas.h> +

Inherits TQt. +

Inherited by TQCanvasSprite, TQCanvasPolygonalItem, and TQCanvasText. +

List of all member functions. +

Public Members

+
    +
  • TQCanvasItem ( TQCanvas * canvas )
  • +
  • virtual ~TQCanvasItem ()
  • +
  • double x () const
  • +
  • double y () const
  • +
  • double z () const
  • +
  • virtual void moveBy ( double dx, double dy )
  • +
  • void move ( double x, double y )
  • +
  • void setX ( double x )
  • +
  • void setY ( double y )
  • +
  • void setZ ( double z )
  • +
  • bool animated () const
  • +
  • virtual void setAnimated ( bool y )
  • +
  • virtual void setVelocity ( double vx, double vy )
  • +
  • void setXVelocity ( double vx )
  • +
  • void setYVelocity ( double vy )
  • +
  • double xVelocity () const
  • +
  • double yVelocity () const
  • +
  • virtual void advance ( int phase )
  • +
  • virtual bool collidesWith ( const TQCanvasItem * other ) const = 0
  • +
  • TQCanvasItemList collisions ( bool exact ) const
  • +
  • virtual void setCanvas ( TQCanvas * c )
  • +
  • virtual void draw ( TQPainter & painter ) = 0
  • +
  • void show ()
  • +
  • void hide ()
  • +
  • virtual void setVisible ( bool yes )
  • +
  • bool isVisible () const
  • +
  • virtual void setSelected ( bool yes )
  • +
  • bool isSelected () const
  • +
  • virtual void setEnabled ( bool yes )
  • +
  • bool isEnabled () const
  • +
  • virtual void setActive ( bool yes )
  • +
  • bool isActive () const
  • +
  • bool visible () const  (obsolete)
  • +
  • bool selected () const  (obsolete)
  • +
  • bool enabled () const  (obsolete)
  • +
  • bool active () const  (obsolete)
  • +
  • enum RttiValues { Rtti_Item = 0, Rtti_Sprite = 1, Rtti_PolygonalItem = 2, Rtti_Text = 3, Rtti_Polygon = 4, Rtti_Rectangle = 5, Rtti_Ellipse = 6, Rtti_Line = 7, Rtti_Spline = 8 }
  • +
  • virtual int rtti () const
  • +
  • virtual TQRect boundingRect () const = 0
  • +
  • virtual TQRect boundingRectAdvanced () const
  • +
  • TQCanvas * canvas () const
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQCanvasItem class provides an abstract graphic object on a TQCanvas. + +

+ + +

A variety of TQCanvasItem subclasses provide immediately usable +behaviour. This class is a pure abstract superclass providing the +behaviour that is shared among all the concrete canvas item classes. +TQCanvasItem is not intended for direct subclassing. It is much easier +to subclass one of its subclasses, e.g. TQCanvasPolygonalItem (the +commonest base class), TQCanvasRectangle, TQCanvasSprite, TQCanvasEllipse +or TQCanvasText. +

Canvas items are added to a canvas by constructing them and passing the +canvas to the canvas item's constructor. An item can be moved to a +different canvas using setCanvas(). +

Items appear on the canvas after their show() +function has been called (or setVisible(TRUE)), and after update() has been called. The +canvas only shows items that are visible, +and then only if update() is called. If you created the canvas +without passing a width and height to the constructor you'll also need +to call resize(). Since the canvas +background defaults to white and canvas items default to white, +you may need to change colors to see your items. +

A TQCanvasItem object can be moved in the x(), y() and z() dimensions +using functions such as move(), moveBy(), setX(), setY() and setZ(). A +canvas item can be set in motion, `animated', using setAnimated() and +given a velocity in the x and y directions with setXVelocity() and +setYVelocity() -- the same effect can be achieved by calling +setVelocity(). Use the collidesWith() function to see if the canvas item +will collide on the next advance(1) and use collisions() to see what +collisions have occurred. +

Use TQCanvasSprite or your own subclass of TQCanvasSprite to create canvas +items which are animated, i.e. which change over time. +

The size of a canvas item is given by boundingRect(). Use +boundingRectAdvanced() to see what the size of the canvas item will be +after the next advance(1) call. +

The rtti() function is used for identifying subclasses of TQCanvasItem. +The canvas() function returns a pointer to the canvas which contains the +canvas item. +

TQCanvasItem provides the show() and isVisible() functions like those in +TQWidget. +

TQCanvasItem also provides the setEnabled(), setActive() and +setSelected() functions; these functions set the relevant boolean and +cause a repaint but the boolean values they set are not used in +TQCanvasItem itself. You can make use of these booleans in your subclasses. +

By default, canvas items have no velocity, no size, and are not in +motion. The subclasses provided in TQt do not change these defaults +except where noted. +

See also Graphics Classes and Image Processing Classes. + +


Member Type Documentation

+

TQCanvasItem::RttiValues

+ +

This enum is used to name the different types of canvas item. +

    +
  • TQCanvasItem::Rtti_Item - Canvas item abstract base class +
  • TQCanvasItem::Rtti_Ellipse +
  • TQCanvasItem::Rtti_Line +
  • TQCanvasItem::Rtti_Polygon +
  • TQCanvasItem::Rtti_PolygonalItem +
  • TQCanvasItem::Rtti_Rectangle +
  • TQCanvasItem::Rtti_Spline +
  • TQCanvasItem::Rtti_Sprite +
  • TQCanvasItem::Rtti_Text +

+


Member Function Documentation

+

TQCanvasItem::TQCanvasItem ( TQCanvas * canvas ) +

+Constructs a TQCanvasItem on canvas canvas. +

See also setCanvas(). + +

TQCanvasItem::~TQCanvasItem () [virtual] +

+Destroys the TQCanvasItem and removes it from its canvas. + +

bool TQCanvasItem::active () const +

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

+Use isActive() instead. + +

void TQCanvasItem::advance ( int phase ) [virtual] +

+The default implementation moves the canvas item, if it is +animated(), by the preset velocity if phase is 1, and does +nothing if phase is 0. +

Note that if you reimplement this function, the reimplementation +must not change the canvas in any way, for example it must not add +or remove items. +

See also TQCanvas::advance() and setVelocity(). + +

Example: canvas/canvas.cpp. +

Reimplemented in TQCanvasSprite. +

bool TQCanvasItem::animated () const +

+Returns TRUE if the canvas item is in motion; otherwise returns +FALSE. +

See also setVelocity() and setAnimated(). + +

TQRect TQCanvasItem::boundingRect () const [pure virtual] +

+ +

Returns the bounding rectangle in pixels that the canvas item covers. +

See also boundingRectAdvanced(). + +

Reimplemented in TQCanvasSprite, TQCanvasPolygonalItem, and TQCanvasText. +

TQRect TQCanvasItem::boundingRectAdvanced () const [virtual] +

+Returns the bounding rectangle of pixels that the canvas item will cover after advance(1) is called. +

See also boundingRect(). + +

TQCanvas * TQCanvasItem::canvas () const +

+ +

Returns the canvas containing the canvas item. + +

bool TQCanvasItem::collidesWith ( const TQCanvasItem * other ) const [pure virtual] +

+ +

Returns TRUE if the canvas item will collide with the other +item after they have moved by their current velocities; +otherwise returns FALSE. +

See also collisions(). + +

Example: canvas/canvas.cpp. +

TQCanvasItemList TQCanvasItem::collisions ( bool exact ) const +

+Returns the list of canvas items that this canvas item has +collided with. +

A collision is generally defined as occurring when the pixels of +one item draw on the pixels of another item, but not all +subclasses are so precise. Also, since pixel-wise collision +detection can be slow, this function works in either exact or +inexact mode, according to the exact parameter. +

If exact is TRUE, the canvas items returned have been +accurately tested for collision with the canvas item. +

If exact is FALSE, the canvas items returned are near the +canvas item. You can test the canvas items returned using +collidesWith() if any are interesting collision candidates. By +using this approach, you can ignore some canvas items for which +collisions are not relevant. +

The returned list is a list of TQCanvasItems, but often you will +need to cast the items to their subclass types. The safe way to do +this is to use rtti() before casting. This provides some of the +functionality of the standard C++ dynamic cast operation even on +compilers where dynamic casts are not available. +

Note that a canvas item may be `on' a canvas, e.g. it was created +with the canvas as parameter, even though its coordinates place it +beyond the edge of the canvas's area. Collision detection only +works for canvas items which are wholly or partly within the +canvas's area. +

Note that if items have a velocity (see setVelocity()), then +collision testing is done based on where the item will be when +it moves, not its current location. For example, a "ball" item +doesn't need to actually embed into a "wall" item before a +collision is detected. For items without velocity, plain +intersection is used. + +

void TQCanvasItem::draw ( TQPainter & painter ) [pure virtual] +

+ +

This abstract virtual function draws the canvas item using painter. +

Warning: When you reimplement this function, make sure that you +leave the painter in the same state as you found it. For example, +if you start by calling TQPainter::translate(50, 50), end your +code by calling TQPainter::translate(-50, -50). Be also aware that +the painter might already have some transformations set (i.e., +don't call TQPainter::resetXForm() when you're done). + +

Reimplemented in TQCanvasSprite, TQCanvasPolygonalItem, and TQCanvasText. +

bool TQCanvasItem::enabled () const +

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

+Use isEnabled() instead. + +

void TQCanvasItem::hide () +

Shorthand for setVisible(FALSE). +

bool TQCanvasItem::isActive () const +

+ +

Returns TRUE if the TQCanvasItem is active; otherwise returns FALSE. + +

bool TQCanvasItem::isEnabled () const +

+ +

Returns TRUE if the TQCanvasItem is enabled; otherwise returns FALSE. + +

bool TQCanvasItem::isSelected () const +

+ +

Returns TRUE if the canvas item is selected; otherwise returns FALSE. + +

bool TQCanvasItem::isVisible () const +

+ +

Returns TRUE if the canvas item is visible; otherwise returns +FALSE. +

Note that in this context TRUE does not mean that the canvas +item is currently in a view, merely that if a view is showing the +area where the canvas item is positioned, and the item is not +obscured by items with higher z values, and the view is not +obscured by overlaying windows, it would be visible. +

See also setVisible() and z(). + +

void TQCanvasItem::move ( double x, double y ) +

+Moves the canvas item to the absolute position (x, y). + +

Example: canvas/canvas.cpp. +

void TQCanvasItem::moveBy ( double dx, double dy ) [virtual] +

+Moves the canvas item relative to its current position by (dx, +dy). + +

Example: canvas/canvas.cpp. +

int TQCanvasItem::rtti () const [virtual] +

+Returns 0 (TQCanvasItem::Rtti_Item). +

Make your derived classes return their own values for rtti(), so +that you can distinguish between objects returned by +TQCanvas::at(). You should use values greater than 1000 to allow +for extensions to this class. +

Overuse of this functionality can damage it's extensibility. For +example, once you have identified a base class of a TQCanvasItem +found by TQCanvas::at(), cast it to that type and call meaningful +methods rather than acting upon the object based on its rtti +value. +

For example: +

+        TQCanvasItem* item;
+        // Find an item, e.g. with TQCanvasItem::collisions().
+        ...
+        if (item->rtti() == MySprite::RTTI ) {
+            MySprite* s = (MySprite*)item;
+            if (s->isDamagable()) s->loseHitPoints(1000);
+            if (s->isHot()) myself->loseHitPoints(1000);
+            ...
+        }
+    
+ + +

Example: canvas/canvas.cpp. +

Reimplemented in TQCanvasSprite, TQCanvasPolygonalItem, and TQCanvasText. +

bool TQCanvasItem::selected () const +

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

+Use isSelected() instead. + +

void TQCanvasItem::setActive ( bool yes ) [virtual] +

+Sets the active flag of the item to yes. If this changes the +item's active state the item will be redrawn when +TQCanvas::update() is next called. +

The TQCanvas, TQCanvasItem and the TQt-supplied TQCanvasItem +subclasses do not make use of this value. The setActive() function +is supplied because many applications need it, but it is up to you +how you use the isActive() value. + +

void TQCanvasItem::setAnimated ( bool y ) [virtual] +

+Sets the canvas item to be in motion if y is TRUE, or not if y is FALSE. The speed and direction of the motion is set with +setVelocity(), or with setXVelocity() and setYVelocity(). +

See also advance() and TQCanvas::advance(). + +

void TQCanvasItem::setCanvas ( TQCanvas * c ) [virtual] +

+Sets the TQCanvas upon which the canvas item is to be drawn to c. +

See also canvas(). + +

void TQCanvasItem::setEnabled ( bool yes ) [virtual] +

+Sets the enabled flag of the item to yes. If this changes the +item's enabled state the item will be redrawn when +TQCanvas::update() is next called. +

The TQCanvas, TQCanvasItem and the TQt-supplied TQCanvasItem +subclasses do not make use of this value. The setEnabled() +function is supplied because many applications need it, but it is +up to you how you use the isEnabled() value. + +

void TQCanvasItem::setSelected ( bool yes ) [virtual] +

+Sets the selected flag of the item to yes. If this changes the +item's selected state the item will be redrawn when +TQCanvas::update() is next called. +

The TQCanvas, TQCanvasItem and the TQt-supplied TQCanvasItem +subclasses do not make use of this value. The setSelected() +function is supplied because many applications need it, but it is +up to you how you use the isSelected() value. + +

void TQCanvasItem::setVelocity ( double vx, double vy ) [virtual] +

+Sets the canvas item to be in motion, moving by vx and vy +pixels in the horizontal and vertical directions respectively. +

See also advance(), setXVelocity(), and setYVelocity(). + +

void TQCanvasItem::setVisible ( bool yes ) [virtual] +

+Makes the canvas item visible if yes is TRUE, or invisible if +yes is FALSE. The change takes effect when TQCanvas::update() is +next called. + +

void TQCanvasItem::setX ( double x ) +

+ +

Moves the canvas item so that its x-position is x. +

See also x() and move(). + +

Example: chart/chartform_canvas.cpp. +

void TQCanvasItem::setXVelocity ( double vx ) +

+ +

Sets the horizontal component of the canvas item's velocity to vx. +

See also setYVelocity() and setVelocity(). + +

void TQCanvasItem::setY ( double y ) +

+ +

Moves the canvas item so that its y-position is y. +

See also y() and move(). + +

Example: chart/chartform_canvas.cpp. +

void TQCanvasItem::setYVelocity ( double vy ) +

+ +

Sets the vertical component of the canvas item's velocity to vy. +

See also setXVelocity() and setVelocity(). + +

void TQCanvasItem::setZ ( double z ) +

+ +

Sets the z index of the canvas item to z. Higher-z items +obscure (are in front of) lower-z items. +

See also z() and move(). + +

Examples: canvas/canvas.cpp and chart/chartform_canvas.cpp. +

void TQCanvasItem::show () +

Shorthand for setVisible(TRUE). +

Examples: canvas/canvas.cpp and chart/chartform_canvas.cpp. +

void TQCanvasItem::update () [protected] +

+ +

Call this function to repaint the canvas's changed chunks. + +

bool TQCanvasItem::visible () const +

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

+Use isVisible() instead. + +

double TQCanvasItem::x () const +

+ +

Returns the horizontal position of the canvas item. Note that +subclasses often have an origin other than the top-left corner. + +

Example: canvas/canvas.cpp. +

double TQCanvasItem::xVelocity () const +

+Returns the horizontal velocity component of the canvas item. + +

double TQCanvasItem::y () const +

+ +

Returns the vertical position of the canvas item. Note that +subclasses often have an origin other than the top-left corner. + +

Example: canvas/canvas.cpp. +

double TQCanvasItem::yVelocity () const +

+Returns the vertical velocity component of the canvas item. + +

double TQCanvasItem::z () const +

+ +

Returns the z index of the canvas item, which is used for visual +order: higher-z items obscure (are in front of) lower-z items. + + +


+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/qcanvasitemlist-members.html b/doc/html/qcanvasitemlist-members.html new file mode 100644 index 00000000..16973e92 --- /dev/null +++ b/doc/html/qcanvasitemlist-members.html @@ -0,0 +1,80 @@ + + + + + +TQCanvasItemList Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvasItemList

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvasitemlist.html b/doc/html/qcanvasitemlist.html new file mode 100644 index 00000000..5d57c503 --- /dev/null +++ b/doc/html/qcanvasitemlist.html @@ -0,0 +1,72 @@ + + + + + +TQCanvasItemList Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvasItemList Class Reference
[canvas module]

+ +

The TQCanvasItemList class is a list of TQCanvasItems. +More... +

#include <qcanvas.h> +

Inherits TQValueList<TQCanvasItem * >. +

List of all member functions. +

Public Members

+
    +
  • TQCanvasItemList operator+ ( const TQCanvasItemList & l ) const
  • +
+

Detailed Description

+ + +The TQCanvasItemList class is a list of 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. +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

TQCanvasItemList TQCanvasItemList::operator+ ( const TQCanvasItemList & l ) const +

+Returns the concatenation of this list and list l. + + +

+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/qcanvasline-members.html b/doc/html/qcanvasline-members.html new file mode 100644 index 00000000..30a14929 --- /dev/null +++ b/doc/html/qcanvasline-members.html @@ -0,0 +1,101 @@ + + + + + +TQCanvasLine Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvasLine

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvasline.html b/doc/html/qcanvasline.html new file mode 100644 index 00000000..01c229ab --- /dev/null +++ b/doc/html/qcanvasline.html @@ -0,0 +1,109 @@ + + + + + +TQCanvasLine Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvasLine Class Reference
[canvas module]

+ +

The TQCanvasLine class provides a line on a TQCanvas. +More... +

#include <qcanvas.h> +

Inherits TQCanvasPolygonalItem. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQCanvasLine class provides a line on a TQCanvas. + +

+ + +

The line inherits functionality from TQCanvasPolygonalItem, for +example the setPen() function. The start and end points of the +line are set with setPoints(). +

Like any other canvas item lines can be moved with +TQCanvasItem::move() and TQCanvasItem::moveBy(), or by setting +coordinates with TQCanvasItem::setX(), TQCanvasItem::setY() and +TQCanvasItem::setZ(). +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

TQCanvasLine::TQCanvasLine ( TQCanvas * canvas ) +

+Constructs a line from (0,0) to (0,0) on canvas. +

See also setPoints(). + +

TQCanvasLine::~TQCanvasLine () +

+Destroys the line. + +

TQPoint TQCanvasLine::endPoint () const +

+ +

Returns the end point of the line. +

See also setPoints() and startPoint(). + +

int TQCanvasLine::rtti () const [virtual] +

+Returns 7 (TQCanvasItem::Rtti_Line). +

See also TQCanvasItem::rtti(). + +

Reimplemented from TQCanvasPolygonalItem. +

void TQCanvasLine::setPoints ( int xa, int ya, int xb, int yb ) +

+Sets the line's start point to (xa, ya) and its end point to +(xb, yb). + +

Example: canvas/canvas.cpp. +

TQPoint TQCanvasLine::startPoint () const +

+ +

Returns the start point of the line. +

See also setPoints() and endPoint(). + + +


+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/qcanvaspixmap-members.html b/doc/html/qcanvaspixmap-members.html new file mode 100644 index 00000000..d24f2e5b --- /dev/null +++ b/doc/html/qcanvaspixmap-members.html @@ -0,0 +1,111 @@ + + + + + +TQCanvasPixmap Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvasPixmap

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvaspixmap.html b/doc/html/qcanvaspixmap.html new file mode 100644 index 00000000..a86352d4 --- /dev/null +++ b/doc/html/qcanvaspixmap.html @@ -0,0 +1,128 @@ + + + + + +TQCanvasPixmap Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvasPixmap Class Reference
[canvas module]

+ +

The TQCanvasPixmap class provides pixmaps for TQCanvasSprites. +More... +

#include <qcanvas.h> +

Inherits TQPixmap. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQCanvasPixmap class provides pixmaps for TQCanvasSprites. + +

+ + +

If you want to show a single pixmap on a TQCanvas use a +TQCanvasSprite with just one pixmap. +

When pixmaps are inserted into a TQCanvasPixmapArray they are held +as TQCanvasPixmaps. TQCanvasSprites are used to show pixmaps on +TQCanvases and hold their pixmaps in a TQCanvasPixmapArray. If +you retrieve a frame (pixmap) from a TQCanvasSprite it will be +returned as a TQCanvasPixmap. +

The pixmap is a TQPixmap and can only be set in the constructor. +There are three different constructors, one taking a TQPixmap, one +a TQImage and one a file name that refers to a file in any +supported file format (see TQImageIO). +

TQCanvasPixmap can have a hotspot which is defined in terms of an (x, +y) offset. When you create a TQCanvasPixmap from a PNG file or from +a TQImage that has a TQImage::offset(), the offset() is initialized +appropriately, otherwise the constructor leaves it at (0, 0). You +can set it later using setOffset(). When the TQCanvasPixmap is used +in a TQCanvasSprite, the offset position is the point at +TQCanvasItem::x() and TQCanvasItem::y(), not the top-left corner of +the pixmap. +

Note that for TQCanvasPixmap objects created by a TQCanvasSprite, the +position of each TQCanvasPixmap object is set so that the hotspot +stays in the same position. +

See also TQCanvasPixmapArray, TQCanvasItem, TQCanvasSprite, Graphics Classes, and Image Processing Classes. + +


Member Function Documentation

+

TQCanvasPixmap::TQCanvasPixmap ( const TQString & datafilename ) +

+Constructs a TQCanvasPixmap that uses the image stored in datafilename. + +

TQCanvasPixmap::TQCanvasPixmap ( const TQImage & image ) +

+Constructs a TQCanvasPixmap from the image image. + +

TQCanvasPixmap::TQCanvasPixmap ( const TQPixmap & pm, const TQPoint & offset ) +

+Constructs a TQCanvasPixmap from the pixmap pm using the offset +offset. + +

TQCanvasPixmap::~TQCanvasPixmap () +

+Destroys the pixmap. + +

int TQCanvasPixmap::offsetX () const +

+ +

Returns the x-offset of the pixmap's hotspot. +

See also setOffset(). + +

int TQCanvasPixmap::offsetY () const +

+ +

Returns the y-offset of the pixmap's hotspot. +

See also setOffset(). + +

void TQCanvasPixmap::setOffset ( int x, int y ) +

+ +

Sets the offset of the pixmap's hotspot to (x, y). +

Warning: Do not call this function if any TQCanvasSprites are +currently showing this pixmap. + + +


+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/qcanvaspixmaparray-members.html b/doc/html/qcanvaspixmaparray-members.html new file mode 100644 index 00000000..a968724e --- /dev/null +++ b/doc/html/qcanvaspixmaparray-members.html @@ -0,0 +1,55 @@ + + + + + +TQCanvasPixmapArray Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvasPixmapArray

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvaspixmaparray.html b/doc/html/qcanvaspixmaparray.html new file mode 100644 index 00000000..75d63d41 --- /dev/null +++ b/doc/html/qcanvaspixmaparray.html @@ -0,0 +1,192 @@ + + + + + +TQCanvasPixmapArray Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvasPixmapArray Class Reference
[canvas module]

+ +

The TQCanvasPixmapArray class provides an array of TQCanvasPixmaps. +More... +

#include <qcanvas.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQCanvasPixmapArray class provides an array of TQCanvasPixmaps. + +

+ + +

This class is used by TQCanvasSprite to hold an array of pixmaps. +It is used to implement animated sprites, i.e. images that change +over time, with each pixmap in the array holding one frame. +

Depending on the constructor you use you can load multiple pixmaps +into the array either from a directory (specifying a wildcard +pattern for the files), or from a list of TQPixmaps. You can also +read in a set of pixmaps after construction using readPixmaps(). +

Individual pixmaps can be set with setImage() and retrieved with +image(). The number of pixmaps in the array is returned by +count(). +

TQCanvasSprite uses an image's mask for collision detection. You +can change this by reading in a separate set of image masks using +readCollisionMasks(). +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

TQCanvasPixmapArray::TQCanvasPixmapArray () +

+Constructs an invalid array (i.e. isValid() will return FALSE). +You must call readPixmaps() before being able to use this +TQCanvasPixmapArray. + +

TQCanvasPixmapArray::TQCanvasPixmapArray ( const TQString & datafilenamepattern, int fc = 0 ) +

+Constructs a TQCanvasPixmapArray from files. +

The fc parameter sets the number of frames to be loaded for +this image. +

If fc is not 0, datafilenamepattern should contain "%1", +e.g. "foo%1.png". The actual filenames are formed by replacing the +%1 with four-digit integers from 0 to (fc - 1), e.g. foo0000.png, +foo0001.png, foo0002.png, etc. +

If fc is 0, datafilenamepattern is asssumed to be a +filename, and the image contained in this file will be loaded as +the first (and only) frame. +

If datafilenamepattern does not exist, is not readable, isn't +an image, or some other error occurs, the array ends up empty and +isValid() returns FALSE. + +

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 ) +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 ( ) ) +

+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 +be at position (0, 0). +

If an error occurs, isValid() will return FALSE. + +

TQCanvasPixmapArray::~TQCanvasPixmapArray () +

+Destroys the pixmap array and all the pixmaps it contains. + +

uint TQCanvasPixmapArray::count () const +

+ +

Returns the number of pixmaps in the array. + +

TQCanvasPixmap * TQCanvasPixmapArray::image ( int i ) const +

+ +

Returns pixmap i in the array, if i is non-negative and less +than than count(), and returns an unspecified value otherwise. + +

bool TQCanvasPixmapArray::isValid () const +

+Returns TRUE if the pixmap array is valid; otherwise returns +FALSE. + +

bool TQCanvasPixmapArray::operator! () +

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

Use isValid() instead. +

This returns FALSE if the array is valid, and TRUE if it is not. + +

bool TQCanvasPixmapArray::readCollisionMasks ( const TQString & filename ) +

+Reads new collision masks for the array. +

By default, TQCanvasSprite uses the image mask of a sprite to +detect collisions. Use this function to set your own collision +image masks. +

If count() is 1 filename must specify a real filename to read +the mask from. If count() is greater than 1, the filename must +contain a "%1" that will get replaced by the number of the mask to +be loaded, just like TQCanvasPixmapArray::readPixmaps(). +

All collision masks must be 1-bit images or this function call +will fail. +

If the file isn't readable, contains the wrong number of images, +or there is some other error, this function will return FALSE, and +the array will be flagged as invalid; otherwise this function +returns TRUE. +

See also isValid(). + +

bool TQCanvasPixmapArray::readPixmaps ( const TQString & filenamepattern, int fc = 0 ) +

+Reads one or more pixmaps into the pixmap array. +

If fc is not 0, filenamepattern should contain "%1", e.g. +"foo%1.png". The actual filenames are formed by replacing the %1 +with four-digit integers from 0 to (fc - 1), e.g. foo0000.png, +foo0001.png, foo0002.png, etc. +

If fc is 0, filenamepattern is asssumed to be a filename, +and the image contained in this file will be loaded as the first +(and only) frame. +

If filenamepattern does not exist, is not readable, isn't an +image, or some other error occurs, this function will return +FALSE, and isValid() will return FALSE; otherwise this function +will return TRUE. +

See also isValid(). + +

void TQCanvasPixmapArray::setImage ( int i, TQCanvasPixmap * p ) +

+Replaces the pixmap at index i with pixmap p. +

The array takes ownership of p and will delete p when the +array itself is deleted. +

If i is beyond the end of the array the array is extended to at +least i+1 elements, with elements count() to i-1 being initialized +to 0. + + +


+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/qcanvaspolygon-members.html b/doc/html/qcanvaspolygon-members.html new file mode 100644 index 00000000..3cacb599 --- /dev/null +++ b/doc/html/qcanvaspolygon-members.html @@ -0,0 +1,100 @@ + + + + + +TQCanvasPolygon Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvasPolygon

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvaspolygon.html b/doc/html/qcanvaspolygon.html new file mode 100644 index 00000000..14589214 --- /dev/null +++ b/doc/html/qcanvaspolygon.html @@ -0,0 +1,126 @@ + + + + + +TQCanvasPolygon Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvasPolygon Class Reference
[canvas module]

+ +

The TQCanvasPolygon class provides a polygon on a TQCanvas. +More... +

#include <qcanvas.h> +

Inherits TQCanvasPolygonalItem. +

Inherited by TQCanvasSpline. +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • virtual void drawShape ( TQPainter & p )
  • +
+

Detailed Description

+ + +The TQCanvasPolygon class provides a polygon on a TQCanvas. + +

+ + +

Paints a polygon with a TQBrush. The polygon's points can be set in +the constructor or set or changed later using setPoints(). Use +points() to retrieve the points, or areaPoints() to retrieve the +points relative to the canvas's origin. +

The polygon can be drawn on a painter with drawShape(). +

Like any other canvas item polygons can be moved with +TQCanvasItem::move() and TQCanvasItem::moveBy(), or by setting +coordinates with TQCanvasItem::setX(), TQCanvasItem::setY() and +TQCanvasItem::setZ(). +

Note: TQCanvasPolygon does not use the pen. +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

TQCanvasPolygon::TQCanvasPolygon ( TQCanvas * canvas ) +

+Constructs a point-less polygon on the canvas canvas. You +should call setPoints() before using it further. + +

TQCanvasPolygon::~TQCanvasPolygon () +

+Destroys the polygon. + +

TQPointArray TQCanvasPolygon::areaPoints () const [virtual] +

+Returns the vertices of the polygon translated by the polygon's +current x(), y() position, i.e. relative to the canvas's origin. +

See also setPoints() and points(). + +

Reimplemented from TQCanvasPolygonalItem. +

void TQCanvasPolygon::drawShape ( TQPainter & p ) [virtual protected] +

+Draws the polygon using the painter p. +

Note that TQCanvasPolygon does not support an outline (the pen is +always NoPen). + +

Reimplemented from TQCanvasPolygonalItem. +

TQPointArray TQCanvasPolygon::points () const +

+ +

Returns the vertices of the polygon, not translated by the position. +

See also setPoints() and areaPoints(). + +

int TQCanvasPolygon::rtti () const [virtual] +

+Returns 4 (TQCanvasItem::Rtti_Polygon). +

See also TQCanvasItem::rtti(). + +

Reimplemented from TQCanvasPolygonalItem. +

Reimplemented in TQCanvasSpline. +

void TQCanvasPolygon::setPoints ( TQPointArray pa ) +

+Sets the points of the polygon to be pa. These points will have +their x and y coordinates automatically translated by x(), y() as +the polygon is moved. + + +

+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/qcanvaspolygonalitem-members.html b/doc/html/qcanvaspolygonalitem-members.html new file mode 100644 index 00000000..9545c840 --- /dev/null +++ b/doc/html/qcanvaspolygonalitem-members.html @@ -0,0 +1,98 @@ + + + + + +TQCanvasPolygonalItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvasPolygonalItem

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvaspolygonalitem.html b/doc/html/qcanvaspolygonalitem.html new file mode 100644 index 00000000..213ffd47 --- /dev/null +++ b/doc/html/qcanvaspolygonalitem.html @@ -0,0 +1,235 @@ + + + + + +TQCanvasPolygonalItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvasPolygonalItem Class Reference
[canvas module]

+ +

The TQCanvasPolygonalItem class provides a polygonal canvas item +on a TQCanvas. +More... +

#include <qcanvas.h> +

Inherits TQCanvasItem. +

Inherited by TQCanvasRectangle, TQCanvasPolygon, TQCanvasLine, and TQCanvasEllipse. +

List of all member functions. +

Public Members

+ +

Protected Members

+ +

Detailed Description

+ + +The TQCanvasPolygonalItem class provides a polygonal canvas item +on a TQCanvas. + +

+ + +

The mostly rectangular classes, such as TQCanvasSprite and +TQCanvasText, use the object's bounding rectangle for movement, +repainting and collision calculations. For most other items, the +bounding rectangle can be far too large -- a diagonal line being +the worst case, and there are many other cases which are also bad. +TQCanvasPolygonalItem provides polygon-based bounding rectangle +handling, etc., which is much faster for non-rectangular items. +

Derived classes should try to define as small an area as possible +to maximize efficiency, but the polygon must definitely be +contained completely within the polygonal area. Calculating the +exact retquirements is usually difficult, but if you allow a small +overestimate it can be easy and tquick, while still getting almost +all of TQCanvasPolygonalItem's speed. +

Note that all subclasses must call hide() in their destructor +since hide() needs to be able to access areaPoints(). +

Normally, TQCanvasPolygonalItem uses the odd-even algorithm for +determining whether an object intersects this object. You can +change this to the winding algorithm using setWinding(). +

The bounding rectangle is available using boundingRect(). The +points bounding the polygonal item are retrieved with +areaPoints(). Use areaPointsAdvanced() to retrieve the bounding +points the polygonal item will have after +TQCanvasItem::advance(1) has been called. +

If the shape of the polygonal item is about to change while the +item is visible, call invalidate() before updating with a +different result from areaPoints(). +

By default, TQCanvasPolygonalItem objects have a black pen and no +brush (the default TQPen and TQBrush constructors). You can change +this with setPen() and setBrush(), but note that some +TQCanvasPolygonalItem subclasses only use the brush, ignoring the +pen setting. +

The polygonal item can be drawn on a painter with draw(). +Subclasses must reimplement drawShape() to draw themselves. +

Like any other canvas item polygonal items can be moved with +TQCanvasItem::move() and TQCanvasItem::moveBy(), or by setting coordinates +with TQCanvasItem::setX(), TQCanvasItem::setY() and TQCanvasItem::setZ(). +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

TQCanvasPolygonalItem::TQCanvasPolygonalItem ( TQCanvas * canvas ) +

+Constructs a TQCanvasPolygonalItem on the canvas canvas. + +

TQCanvasPolygonalItem::~TQCanvasPolygonalItem () [virtual] +

+Note that all subclasses must call hide() in their destructor +since hide() needs to be able to access areaPoints(). + +

TQPointArray TQCanvasPolygonalItem::areaPoints () const [pure virtual] +

+ +

This function must be reimplemented by subclasses. It must +return the points bounding (i.e. outside and not touching) the +shape or drawing errors will occur. + +

Reimplemented in TQCanvasPolygon. +

TQPointArray TQCanvasPolygonalItem::areaPointsAdvanced () const [virtual] +

+Returns the points the polygonal item will have after +TQCanvasItem::advance(1) is called, i.e. what the points are when +advanced by the current xVelocity() and yVelocity(). + +

TQRect TQCanvasPolygonalItem::boundingRect () const [virtual] +

+Returns the bounding rectangle of the polygonal item, based on +areaPoints(). + +

Reimplemented from TQCanvasItem. +

TQBrush TQCanvasPolygonalItem::brush () const +

+ +

Returns the TQBrush used to fill the item, if filled. +

See also setBrush(). + +

void TQCanvasPolygonalItem::draw ( TQPainter & p ) [virtual protected] +

+Reimplemented from TQCanvasItem, this draws the polygonal item by +setting the pen and brush for the item on the painter p and +calling drawShape(). + +

Reimplemented from TQCanvasItem. +

void TQCanvasPolygonalItem::drawShape ( TQPainter & p ) [pure virtual protected] +

+ +

Subclasses must reimplement this function to draw their shape. The +pen and brush of p are already set to pen() and brush() prior +to calling this function. +

Warning: When you reimplement this function, make sure that you +leave the painter in the same state as you found it. For example, +if you start by calling TQPainter::translate(50, 50), end your +code by calling TQPainter::translate(-50, -50). Be also aware that +the painter might already have some transformations set (i.e., +don't call TQPainter::resetXForm() when you're done). +

See also draw(). + +

Reimplemented in TQCanvasRectangle, TQCanvasPolygon, and TQCanvasEllipse. +

void TQCanvasPolygonalItem::invalidate () [protected] +

+Invalidates all information about the area covered by the canvas +item. The item will be updated automatically on the next call that +changes the item's status, for example, move() or update(). Call +this function if you are going to change the shape of the item (as +returned by areaPoints()) while the item is visible. + +

bool TQCanvasPolygonalItem::isValid () const [protected] +

+ +

Returns TRUE if the polygonal item's area information has not been +invalidated; otherwise returns FALSE. +

See also invalidate(). + +

TQPen TQCanvasPolygonalItem::pen () const +

+ +

Returns the TQPen used to draw the outline of the item, if any. +

See also setPen(). + +

int TQCanvasPolygonalItem::rtti () const [virtual] +

+Returns 2 (TQCanvasItem::Rtti_PolygonalItem). +

See also TQCanvasItem::rtti(). + +

Reimplemented from TQCanvasItem. +

Reimplemented in TQCanvasRectangle, TQCanvasPolygon, TQCanvasLine, and TQCanvasEllipse. +

void TQCanvasPolygonalItem::setBrush ( TQBrush b ) [virtual] +

+Sets the TQBrush used when drawing the polygonal item to the brush b. +

See also setPen(), brush(), and drawShape(). + +

Examples: canvas/canvas.cpp and chart/chartform_canvas.cpp. +

void TQCanvasPolygonalItem::setPen ( TQPen p ) [virtual] +

+Sets the TQPen used when drawing the item to the pen p. +Note that many TQCanvasPolygonalItems do not use the pen value. +

See also setBrush(), pen(), and drawShape(). + +

Examples: canvas/canvas.cpp and chart/chartform_canvas.cpp. +

void TQCanvasPolygonalItem::setWinding ( bool enable ) [protected] +

+If enable is TRUE, the polygonal item will use the winding +algorithm to determine the "inside" of the polygon; otherwise the +odd-even algorithm will be used. +

The default is to use the odd-even algorithm. +

See also winding(). + +

bool TQCanvasPolygonalItem::winding () const [protected] +

+Returns TRUE if the polygonal item uses the winding algorithm to +determine the "inside" of the polygon. Returns FALSE if it uses +the odd-even algorithm. +

The default is to use the odd-even algorithm. +

See also setWinding(). + + +


+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/qcanvasrectangle-members.html b/doc/html/qcanvasrectangle-members.html new file mode 100644 index 00000000..33789415 --- /dev/null +++ b/doc/html/qcanvasrectangle-members.html @@ -0,0 +1,104 @@ + + + + + +TQCanvasRectangle Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvasRectangle

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvasrectangle.html b/doc/html/qcanvasrectangle.html new file mode 100644 index 00000000..6ea6ec96 --- /dev/null +++ b/doc/html/qcanvasrectangle.html @@ -0,0 +1,147 @@ + + + + + +TQCanvasRectangle Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvasRectangle Class Reference
[canvas module]

+ +

The TQCanvasRectangle class provides a rectangle on a TQCanvas. +More... +

#include <qcanvas.h> +

Inherits TQCanvasPolygonalItem. +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • virtual void drawShape ( TQPainter & p )
  • +
  • virtual TQPointArray chunks () const
  • +
+

Detailed Description

+ + +The TQCanvasRectangle class provides a rectangle on a TQCanvas. + +

+ + +

This item paints a single rectangle which may have any pen() and +brush(), but may not be tilted/rotated. For rotated rectangles, +use TQCanvasPolygon. +

The rectangle's size and initial position can be set in the +constructor. The size can be set or changed later using setSize(). +Use height() and width() to retrieve the rectangle's dimensions. +

The rectangle can be drawn on a painter with drawShape(). +

Like any other canvas item rectangles can be moved with +TQCanvasItem::move() and TQCanvasItem::moveBy(), or by setting +coordinates with TQCanvasItem::setX(), TQCanvasItem::setY() and +TQCanvasItem::setZ(). +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

TQCanvasRectangle::TQCanvasRectangle ( TQCanvas * canvas ) +

+Constructs a rectangle at position (0,0) with both width and +height set to 32 pixels on canvas. + +

TQCanvasRectangle::TQCanvasRectangle ( const TQRect & r, TQCanvas * canvas ) +

+Constructs a rectangle positioned and sized by r on canvas. + +

TQCanvasRectangle::TQCanvasRectangle ( int x, int y, int width, int height, TQCanvas * canvas ) +

+Constructs a rectangle at position (x, y) and size width +by height, on canvas. + +

TQCanvasRectangle::~TQCanvasRectangle () +

+Destroys the rectangle. + +

TQPointArray TQCanvasRectangle::chunks () const [virtual protected] +

+Simply calls TQCanvasItem::chunks(). + +

void TQCanvasRectangle::drawShape ( TQPainter & p ) [virtual protected] +

+Draws the rectangle on painter p. + +

Example: canvas/canvas.cpp. +

Reimplemented from TQCanvasPolygonalItem. +

int TQCanvasRectangle::height () const +

+Returns the height of the rectangle. + +

TQRect TQCanvasRectangle::rect () const +

+ +

Returns the integer-converted x(), y() position and size() of the +rectangle as a TQRect. + +

int TQCanvasRectangle::rtti () const [virtual] +

+Returns 5 (TQCanvasItem::Rtti_Rectangle). +

See also TQCanvasItem::rtti(). + +

Reimplemented from TQCanvasPolygonalItem. +

void TQCanvasRectangle::setSize ( int width, int height ) +

+Sets the width and height of the rectangle. + +

TQSize TQCanvasRectangle::size () const +

+ +

Returns the width() and height() of the rectangle. +

See also rect() and setSize(). + +

int TQCanvasRectangle::width () const +

+Returns the width of the rectangle. + + +

+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/qcanvasspline-members.html b/doc/html/qcanvasspline-members.html new file mode 100644 index 00000000..6da3ce49 --- /dev/null +++ b/doc/html/qcanvasspline-members.html @@ -0,0 +1,103 @@ + + + + + +TQCanvasSpline Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvasSpline

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvasspline.html b/doc/html/qcanvasspline.html new file mode 100644 index 00000000..40ec0666 --- /dev/null +++ b/doc/html/qcanvasspline.html @@ -0,0 +1,121 @@ + + + + + +TQCanvasSpline Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvasSpline Class Reference
[canvas module]

+ +

The TQCanvasSpline class provides multi-bezier splines on a TQCanvas. +More... +

#include <qcanvas.h> +

Inherits TQCanvasPolygon. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQCanvasSpline class provides multi-bezier splines on a TQCanvas. + +

+ + +

A TQCanvasSpline is a sequence of 4-point bezier curves joined +together to make a curved shape. +

You set the control points of the spline with setControlPoints(). +

If the bezier is closed(), then the first control point will be +re-used as the last control point. Therefore, a closed bezier must +have a multiple of 3 control points and an open bezier must have +one extra point. +

The beziers are not necessarily joined "smoothly". To ensure this, +set control points appropriately (general reference texts about +beziers will explain this in detail). +

Like any other canvas item splines can be moved with +TQCanvasItem::move() and TQCanvasItem::moveBy(), or by setting +coordinates with TQCanvasItem::setX(), TQCanvasItem::setY() and +TQCanvasItem::setZ(). +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

TQCanvasSpline::TQCanvasSpline ( TQCanvas * canvas ) +

+Create a spline with no control points on the canvas canvas. +

See also setControlPoints(). + +

TQCanvasSpline::~TQCanvasSpline () +

+Destroy the spline. + +

bool TQCanvasSpline::closed () const +

+Returns TRUE if the control points are a closed set; otherwise +returns FALSE. + +

TQPointArray TQCanvasSpline::controlPoints () const +

+Returns the current set of control points. +

See also setControlPoints() and closed(). + +

int TQCanvasSpline::rtti () const [virtual] +

+Returns 8 (TQCanvasItem::Rtti_Spline). +

See also TQCanvasItem::rtti(). + +

Reimplemented from TQCanvasPolygon. +

void TQCanvasSpline::setControlPoints ( TQPointArray ctrl, bool close = TRUE ) +

+Set the spline control points to ctrl. +

If close is TRUE, then the first point in ctrl will be +re-used as the last point, and the number of control points must +be a multiple of 3. If close is FALSE, one additional control +point is retquired, and the number of control points must be one of +(4, 7, 10, 13, ...). +

If the number of control points doesn't meet the above conditions, +the number of points will be truncated to the largest number of +points that do meet the retquirement. + +

Example: canvas/canvas.cpp. + +


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


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvassprite-members.html b/doc/html/qcanvassprite-members.html new file mode 100644 index 00000000..da5a8d11 --- /dev/null +++ b/doc/html/qcanvassprite-members.html @@ -0,0 +1,100 @@ + + + + + +TQCanvasSprite Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvasSprite

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvassprite.html b/doc/html/qcanvassprite.html new file mode 100644 index 00000000..8ebff73d --- /dev/null +++ b/doc/html/qcanvassprite.html @@ -0,0 +1,303 @@ + + + + + +TQCanvasSprite Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvasSprite Class Reference
[canvas module]

+ +

The TQCanvasSprite class provides an animated canvas item on a TQCanvas. +More... +

#include <qcanvas.h> +

Inherits TQCanvasItem. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQCanvasSprite class provides an animated canvas item on a TQCanvas. + +

+ + +

A canvas sprite is an object which can contain any number of images +(referred to as frames), only one of which is current, i.e. +displayed, at any one time. The images can be passed in the +constructor or set or changed later with setSequence(). If you +subclass TQCanvasSprite you can change the frame that is displayed +periodically, e.g. whenever TQCanvasItem::advance(1) is called to +create the effect of animation. +

The current frame can be set with setFrame() or with move(). The +number of frames available is given by frameCount(). The bounding +rectangle of the current frame is returned by boundingRect(). +

The current frame's image can be retrieved with image(); use +imageAdvanced() to retrieve the image for the frame that will be +shown after advance(1) is called. Use the image() overload passing +it an integer index to retrieve a particular image from the list of +frames. +

Use width() and height() to retrieve the dimensions of the current +frame. +

Use leftEdge() and rightEdge() to retrieve the current frame's +left-hand and right-hand x-coordinates respectively. Use +bottomEdge() and topEdge() to retrieve the current frame's bottom +and top y-coordinates respectively. These functions have an overload +which will accept an integer frame number to retrieve the +coordinates of a particular frame. +

TQCanvasSprite draws very tquickly, at the expense of memory. +

The current frame's image can be drawn on a painter with draw(). +

Like any other canvas item, canvas sprites can be moved with +move() which sets the x and y coordinates and the frame number, as +well as with TQCanvasItem::move() and TQCanvasItem::moveBy(), or by +setting coordinates with TQCanvasItem::setX(), TQCanvasItem::setY() +and TQCanvasItem::setZ(). +

See also Graphics Classes and Image Processing Classes. + +


Member Type Documentation

+

TQCanvasSprite::FrameAnimationType

+ +

This enum is used to identify the different types of frame +animation offered by TQCanvasSprite. +

    +
  • TQCanvasSprite::Cycle - at each advance the frame number will be incremented by +1 (modulo the frame count). +
  • TQCanvasSprite::Oscillate - at each advance the frame number will be +incremented by 1 up to the frame count then decremented to by 1 to +0, repeating this sequence forever. +
+

Member Function Documentation

+

TQCanvasSprite::TQCanvasSprite ( TQCanvasPixmapArray * a, TQCanvas * canvas ) +

+Constructs a TQCanvasSprite which uses images from the +TQCanvasPixmapArray a. +

The sprite in initially positioned at (0, 0) on canvas, using +frame 0. + +

TQCanvasSprite::~TQCanvasSprite () [virtual] +

+Destroys the sprite and removes it from the canvas. Does not +delete the images. + +

void TQCanvasSprite::advance ( int phase ) [virtual] +

+Extends the default TQCanvasItem implementation to provide the +functionality of setFrameAnimation(). +

The phase is 0 or 1: see TQCanvasItem::advance() for details. +

See also TQCanvasItem::advance() and setVelocity(). + +

Example: canvas/canvas.cpp. +

Reimplemented from TQCanvasItem. +

int TQCanvasSprite::bottomEdge () const +

+Returns the y-coordinate of the current bottom edge of the sprite. +(This may change as the sprite animates since different frames may +have different bottom edges.) +

See also leftEdge(), rightEdge(), and topEdge(). + +

int TQCanvasSprite::bottomEdge ( int ny ) const +

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

Returns what the y-coordinate of the top edge of the sprite would +be if the sprite (actually its hotspot) were moved to y-position +ny. +

See also leftEdge(), rightEdge(), and topEdge(). + +

TQRect TQCanvasSprite::boundingRect () const [virtual] +

+Returns the bounding rectangle for the image in the sprite's +current frame. This assumes that the images are tightly cropped +(i.e. do not have transparent pixels all along a side). + +

Reimplemented from TQCanvasItem. +

void TQCanvasSprite::draw ( TQPainter & painter ) [virtual] +

+Draws the current frame's image at the sprite's current position +on painter painter. + +

Reimplemented from TQCanvasItem. +

int TQCanvasSprite::frame () const +

+ +

Returns the index of the current animation frame in the +TQCanvasSprite's TQCanvasPixmapArray. +

See also setFrame() and move(). + +

int TQCanvasSprite::frameCount () const +

+ +

Returns the number of frames in the TQCanvasSprite's +TQCanvasPixmapArray. + +

int TQCanvasSprite::height () const +

+The height of the sprite for the current frame's image. +

See also frame(). + +

TQCanvasPixmap * TQCanvasSprite::image () const +

+ +

Returns the current frame's image. +

See also frame() and setFrame(). + +

TQCanvasPixmap * TQCanvasSprite::image ( int f ) const +

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

Returns the image for frame f. Does not do any bounds checking on f. + +

TQCanvasPixmap * TQCanvasSprite::imageAdvanced () const [virtual] +

+Returns the image the sprite will have after advance(1) is +called. By default this is the same as image(). + +

int TQCanvasSprite::leftEdge () const +

+Returns the x-coordinate of the current left edge of the sprite. +(This may change as the sprite animates since different frames may +have different left edges.) +

See also rightEdge(), bottomEdge(), and topEdge(). + +

int TQCanvasSprite::leftEdge ( int nx ) const +

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

Returns what the x-coordinate of the left edge of the sprite would +be if the sprite (actually its hotspot) were moved to x-position +nx. +

See also rightEdge(), bottomEdge(), and topEdge(). + +

void TQCanvasSprite::move ( double nx, double ny, int nf ) [virtual] +

+ +

Set the position of the sprite to nx, ny and the current +frame to nf. nf will be ignored if it is larger than +frameCount() or smaller than 0. + +

int TQCanvasSprite::rightEdge () const +

+Returns the x-coordinate of the current right edge of the sprite. +(This may change as the sprite animates since different frames may +have different right edges.) +

See also leftEdge(), bottomEdge(), and topEdge(). + +

int TQCanvasSprite::rightEdge ( int nx ) const +

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

Returns what the x-coordinate of the right edge of the sprite +would be if the sprite (actually its hotspot) were moved to +x-position nx. +

See also leftEdge(), bottomEdge(), and topEdge(). + +

int TQCanvasSprite::rtti () const [virtual] +

+Returns 1 (TQCanvasItem::Rtti_Sprite). +

See also TQCanvasItem::rtti(). + +

Example: canvas/canvas.cpp. +

Reimplemented from TQCanvasItem. +

void TQCanvasSprite::setFrame ( int f ) +

+Sets the animation frame used for displaying the sprite to f, +an index into the TQCanvasSprite's TQCanvasPixmapArray. The call +will be ignored if f is larger than frameCount() or smaller +than 0. +

See also frame() and move(). + +

void TQCanvasSprite::setFrameAnimation ( FrameAnimationType type = Cycle, int step = 1, int state = 0 ) [virtual] +

+Sets the animation characteristics for the sprite. +

For type == Cycle, the frames will increase by step +at each advance, modulo the frameCount(). +

For type == Oscillate, the frames will increase by step +at each advance, up to the frameCount(), then decrease by step +back to 0, repeating forever. +

The state parameter is for internal use. + +

void TQCanvasSprite::setSequence ( TQCanvasPixmapArray * a ) +

+Set the array of images used for displaying the sprite to the +TQCanvasPixmapArray a. +

If the current frame() is larger than the number of images in a, the current frame will be reset to 0. + +

int TQCanvasSprite::topEdge () const +

+Returns the y-coordinate of the top edge of the sprite. (This may +change as the sprite animates since different frames may have +different top edges.) +

See also leftEdge(), rightEdge(), and bottomEdge(). + +

int TQCanvasSprite::topEdge ( int ny ) const +

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

Returns what the y-coordinate of the top edge of the sprite would +be if the sprite (actually its hotspot) were moved to y-position +ny. +

See also leftEdge(), rightEdge(), and bottomEdge(). + +

int TQCanvasSprite::width () const +

+The width of the sprite for the current frame's image. +

See also frame(). + + +


+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/qcanvastext-members.html b/doc/html/qcanvastext-members.html new file mode 100644 index 00000000..4544c192 --- /dev/null +++ b/doc/html/qcanvastext-members.html @@ -0,0 +1,95 @@ + + + + + +TQCanvasText Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvasText

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvastext.html b/doc/html/qcanvastext.html new file mode 100644 index 00000000..b2f38122 --- /dev/null +++ b/doc/html/qcanvastext.html @@ -0,0 +1,169 @@ + + + + + +TQCanvasText Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvasText Class Reference
[canvas module]

+ +

The TQCanvasText class provides a text object on a TQCanvas. +More... +

#include <qcanvas.h> +

Inherits TQCanvasItem. +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • virtual void draw ( TQPainter & painter )
  • +
+

Detailed Description

+ + +The TQCanvasText class provides a text object on a TQCanvas. + +

+ + +

A canvas text item has text with font, color and alignment +attributes. The text and font can be set in the constructor or set +or changed later with setText() and setFont(). The color is set +with setColor() and the alignment with setTextFlags(). The text +item's bounding rectangle is retrieved with boundingRect(). +

The text can be drawn on a painter with draw(). +

Like any other canvas item text items can be moved with +TQCanvasItem::move() and TQCanvasItem::moveBy(), or by setting +coordinates with TQCanvasItem::setX(), TQCanvasItem::setY() and +TQCanvasItem::setZ(). +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

TQCanvasText::TQCanvasText ( TQCanvas * canvas ) +

+Constructs a TQCanvasText with the text "<text>", on canvas. + +

TQCanvasText::TQCanvasText ( const TQString & t, TQCanvas * canvas ) +

+Constructs a TQCanvasText with the text t, on canvas canvas. + +

TQCanvasText::TQCanvasText ( const TQString & t, TQFont f, TQCanvas * canvas ) +

+Constructs a TQCanvasText with the text t and font f, on the +canvas canvas. + +

TQCanvasText::~TQCanvasText () [virtual] +

+Destroys the canvas text item. + +

TQRect TQCanvasText::boundingRect () const [virtual] +

+Returns the bounding rectangle of the text. + +

Reimplemented from TQCanvasItem. +

TQColor TQCanvasText::color () const +

+Returns the color of the text. +

See also setColor(). + +

void TQCanvasText::draw ( TQPainter & painter ) [virtual protected] +

+Draws the text using the painter painter. + +

Reimplemented from TQCanvasItem. +

TQFont TQCanvasText::font () const +

+Returns the font in which the text is drawn. +

See also setFont(). + +

int TQCanvasText::rtti () const [virtual] +

+Returns 3 (TQCanvasItem::Rtti_Text). +

See also TQCanvasItem::rtti(). + +

Reimplemented from TQCanvasItem. +

void TQCanvasText::setColor ( const TQColor & c ) +

+Sets the color of the text to the color c. +

See also color() and setFont(). + +

Example: chart/chartform_canvas.cpp. +

void TQCanvasText::setFont ( const TQFont & f ) +

+Sets the font in which the text is drawn to font f. +

See also font(). + +

void TQCanvasText::setText ( const TQString & t ) +

+Sets the text item's text to t. The text may contain newlines. +

See also text(), setFont(), setColor(), and setTextFlags(). + +

Example: canvas/canvas.cpp. +

void TQCanvasText::setTextFlags ( int f ) +

+Sets the alignment flags to f. These are a bitwise OR of the +flags available to TQPainter::drawText() -- see the +TQt::AlignmentFlags. +

See also setFont() and setColor(). + +

TQString TQCanvasText::text () const +

+Returns the text item's text. +

See also setText(). + +

int TQCanvasText::textFlags () const +

+ +

Returns the currently set alignment flags. +

See also setTextFlags() and TQt::AlignmentFlags. + + +


+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/qcanvasview-members.html b/doc/html/qcanvasview-members.html new file mode 100644 index 00000000..587036d6 --- /dev/null +++ b/doc/html/qcanvasview-members.html @@ -0,0 +1,429 @@ + + + + + +TQCanvasView Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCanvasView

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcanvasview.html b/doc/html/qcanvasview.html new file mode 100644 index 00000000..6957a7e2 --- /dev/null +++ b/doc/html/qcanvasview.html @@ -0,0 +1,190 @@ + + + + + +TQCanvasView Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCanvasView Class Reference
[canvas module]

+ +

The TQCanvasView class provides an on-screen view of a TQCanvas. +More... +

#include <qcanvas.h> +

Inherits TQScrollView. +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • virtual void drawContents ( TQPainter * p, int cx, int cy, int cw, int ch )
  • +
  • virtual TQSize sizeHint () const
  • +
+

Detailed Description

+ + +The TQCanvasView class provides an on-screen view of a TQCanvas. + +

+ + +

A TQCanvasView is widget which provides a view of a TQCanvas. +

If you want users to be able to interact with a canvas view, +subclass TQCanvasView. You might then reimplement +TQScrollView::contentsMousePressEvent(). For example, assuming no +transformation matrix is set: +

+    void MyCanvasView::contentsMousePressEvent( TQMouseEvent* e )
+    {
+        TQCanvasItemList l = canvas()->collisions(e->pos());
+        for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
+            if ( (*it)->rtti() == TQCanvasRectangle::RTTI )
+                qDebug("A TQCanvasRectangle lies somewhere at this point");
+        }
+    }
+    
+ +

The canvas view shows canvas canvas(); this can be changed using +setCanvas(). +

A transformation matrix can be used to transform the view of the +canvas in various ways, for example, zooming in or out or rotating. +For example: +

+    TQWMatrix wm;
+    wm.scale( 2, 2 );   // Zooms in by 2 times
+    wm.rotate( 90 );    // Rotates 90 degrees counter clockwise
+                        // around the origin.
+    wm.translate( 0, -canvas->height() );
+                        // moves the canvas down so what was visible
+                        // before is still visible.
+    myCanvasView->setWorldMatrix( wm );
+    
+ +

Use setWorldMatrix() to set the canvas view's world matrix: you must +ensure that the world matrix is invertible. The current world matrix +is retrievable with worldMatrix(), and its inversion is retrievable +with inverseWorldMatrix(). +

Example: +

The following code finds the part of the canvas that is visible in +this view, i.e. the bounding rectangle of the view in canvas coordinates. +

+    TQRect rc = TQRect( myCanvasView->contentsX(), myCanvasView->contentsY(),
+                        myCanvasView->visibleWidth(), myCanvasView->visibleHeight() );
+    TQRect canvasRect = myCanvasView->inverseWorldMatrix().mapRect(rc);
+    
+ +

See also TQWMatrix, TQPainter::setWorldMatrix(), Graphics Classes, and Image Processing Classes. + +

+


Member Function Documentation

+

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

+Constructs a TQCanvasView with parent parent, and name name, +using the widget flags f. The canvas view is not associated +with a canvas, so you must to call setCanvas() to view a +canvas. + +

TQCanvasView::TQCanvasView ( TQCanvas * canvas, TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

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

Constructs a TQCanvasView which views canvas canvas, with parent +parent, and name name, using the widget flags f. + +

TQCanvasView::~TQCanvasView () +

+Destroys the canvas view. The associated canvas is not deleted. + +

TQCanvas * TQCanvasView::canvas () const +

+ +

Returns a pointer to the canvas which the TQCanvasView is currently +showing. + +

void TQCanvasView::drawContents ( TQPainter * p, int cx, int cy, int cw, int ch ) [virtual protected] +

+Repaints part of the TQCanvas that the canvas view is showing +starting at cx by cy, with a width of cw and a height of ch using the painter p. +

Warning: When double buffering is enabled, drawContents() will +not respect the current settings of the painter when setting up +the painter for the double buffer (e.g., viewport() and +window()). Also, be aware that TQCanvas::update() bypasses +drawContents(), which means any reimplementation of +drawContents() is not called. +

See also TQCanvas::setDoubleBuffering(). + +

Reimplemented from TQScrollView. +

const TQWMatrix & TQCanvasView::inverseWorldMatrix () const +

+Returns a reference to the inverse of the canvas view's current +transformation matrix. +

See also setWorldMatrix() and worldMatrix(). + +

void TQCanvasView::setCanvas ( TQCanvas * canvas ) +

+Sets the canvas that the TQCanvasView is showing to the canvas canvas. + +

bool TQCanvasView::setWorldMatrix ( const TQWMatrix & wm ) +

+Sets the transformation matrix of the TQCanvasView to wm. The +matrix must be invertible (i.e. if you create a world matrix that +zooms out by 2 times, then the inverse of this matrix is one that +will zoom in by 2 times). +

When you use this, you should note that the performance of the +TQCanvasView will decrease considerably. +

Returns FALSE if wm is not invertable; otherwise returns TRUE. +

See also worldMatrix(), inverseWorldMatrix(), and TQWMatrix::isInvertible(). + +

Example: canvas/canvas.cpp. +

TQSize TQCanvasView::sizeHint () const [virtual protected] +

+Suggests a size sufficient to view the entire canvas. + +

const TQWMatrix & TQCanvasView::worldMatrix () const +

+Returns a reference to the canvas view's current transformation matrix. +

See also setWorldMatrix() and inverseWorldMatrix(). + +

Example: canvas/canvas.cpp. + +


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


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcdestyle-h.html b/doc/html/qcdestyle-h.html new file mode 100644 index 00000000..5ad1dedb --- /dev/null +++ b/doc/html/qcdestyle-h.html @@ -0,0 +1,131 @@ + + + + + +qcdestyle.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qcdestyle.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qcdestyle.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of the CDE-like style class
+**
+** Created : 990513
+**
+** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQCDESTYLE_H
+#define TQCDESTYLE_H
+
+#ifndef QT_H
+#include "qmotifstyle.h"
+#endif // QT_H
+
+#if !defined(QT_NO_STYLE_CDE) || defined(QT_PLUGIN)
+
+#if defined(QT_PLUGIN)
+#define Q_EXPORT_STYLE_CDE
+#else
+#define Q_EXPORT_STYLE_CDE Q_EXPORT
+#endif
+
+class Q_EXPORT_STYLE_CDE TQCDEStyle : public TQMotifStyle
+{
+    Q_OBJECT
+public:
+
+    TQCDEStyle( bool useHighlightCols = FALSE );
+    virtual ~TQCDEStyle();
+
+    int pixelMetric( PixelMetric metric, const TQWidget *widget = 0 ) const;
+
+    void drawControl( ControlElement element,
+		      TQPainter *p,
+		      const TQWidget *widget,
+		      const TQRect &r,
+		      const TQColorGroup &cg,
+		      SFlags how = Style_Default,
+		      const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawPrimitive( PrimitiveElement pe,
+			TQPainter *p,
+			const TQRect &r,
+			const TQColorGroup &cg,
+			SFlags flags = Style_Default,
+			const TQStyleOption& = TQStyleOption::Default ) const;
+
+};
+
+#endif // QT_NO_STYLE_CDE
+
+#endif // TQCDESTYLE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcdestyle-members.html b/doc/html/qcdestyle-members.html new file mode 100644 index 00000000..b05cb162 --- /dev/null +++ b/doc/html/qcdestyle-members.html @@ -0,0 +1,113 @@ + + + + + +TQCDEStyle Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCDEStyle

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcdestyle.html b/doc/html/qcdestyle.html new file mode 100644 index 00000000..66fddb1b --- /dev/null +++ b/doc/html/qcdestyle.html @@ -0,0 +1,83 @@ + + + + + +TQCDEStyle Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCDEStyle Class Reference

+ +

The TQCDEStyle class provides a CDE look and feel. +More... +

#include <qcdestyle.h> +

Inherits TQMotifStyle. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQCDEStyle class provides a CDE look and feel. +

+

This style provides a slightly improved Motif look similar to some +versions of the Common Desktop Environment (CDE). The main +differences are thinner frames and more modern radio buttons and +checkboxes. Together with a dark background and a bright +text/foreground color, the style looks tquite attractive (at least +for Motif fans). +

Note that the functions provided by TQCDEStyle are +reimplementations of TQStyle functions; see TQStyle for their +documentation. +

See also Widget Appearance and Style. + +


Member Function Documentation

+

TQCDEStyle::TQCDEStyle ( bool useHighlightCols = FALSE ) +

+Constructs a TQCDEStyle. +

If useHighlightCols is FALSE (the default), then the style will +polish the application's color palette to emulate the Motif way of +highlighting, which is a simple inversion between the base and the +text color. + +

TQCDEStyle::~TQCDEStyle () [virtual] +

+Destroys the style. + + +

+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/qchar-members.html b/doc/html/qchar-members.html new file mode 100644 index 00000000..5bd90198 --- /dev/null +++ b/doc/html/qchar-members.html @@ -0,0 +1,74 @@ + + + + + +TQChar Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQChar

+ +

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

+ +


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

TQChar Class Reference

+ +

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

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

#include <qstring.h> +

List of all member functions. +

Public Members

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

Static Public Members

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

Related Functions

+ +

Detailed Description

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

+

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

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

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

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

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

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

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

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

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


Member Type Documentation

+

TQChar::Category

+ +

This enum maps the Unicode character categories. +

The following characters are normative in Unicode: +

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

The following categories are informative in Unicode: +

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

There are two categories that are specific to TQt: +

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

+

TQChar::CombiningClass

+ +

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

TQChar::Decomposition

+ +

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

TQChar::Direction

+ +

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

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

TQChar::Joining

+ +

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


Member Function Documentation

+

TQChar::TQChar () +

+ +

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

TQChar::TQChar ( char c ) +

+ +

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

TQChar::TQChar ( uchar c ) +

+ +

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

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

+ +

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

TQChar::TQChar ( const TQChar & c ) +

+ +

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

TQChar::TQChar ( ushort rc ) +

+ +

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

TQChar::TQChar ( short rc ) +

+ +

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

TQChar::TQChar ( uint rc ) +

+ +

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

TQChar::TQChar ( int rc ) +

+ +

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

Category TQChar::category () const +

+Returns the character category. +

See also Category. + +

uchar TQChar::cell () const +

+ +

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

unsigned char TQChar::combiningClass () const +

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

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

const TQString & TQChar::decomposition () const +

Warning: This function is not reentrant.

+ + +

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

Decomposition TQChar::decompositionTag () const +

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

int TQChar::digitValue () const +

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

Direction TQChar::direction () const +

+Returns the character's direction. +

See also Direction. + +

bool TQChar::isDigit () const +

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

bool TQChar::isLetter () const +

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

bool TQChar::isLetterOrNumber () const +

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

bool TQChar::isMark () const +

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

bool TQChar::isNull () const +

+ +

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

bool TQChar::isNumber () const +

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

See also isDigit(). + +

bool TQChar::isPrint () const +

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

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

bool TQChar::isPunct () const +

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

bool TQChar::isSpace () const +

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

bool TQChar::isSymbol () const +

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

Joining TQChar::joining () const +

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

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

char TQChar::latin1 () const +

+ +

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

TQChar TQChar::lower () const +

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

bool TQChar::mirrored () const +

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

TQChar TQChar::mirroredChar () const +

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

bool TQChar::networkOrdered () [static] +

+ +

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

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

TQChar::operator char () const +

+ +

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

See also unicode(). + +

uchar TQChar::row () const +

+ +

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

ushort TQChar::unicode () const +

+ +

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

ushort & TQChar::unicode () +

+ +

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

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

TQChar TQChar::upper () const +

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

Related Functions

+

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

+ +

+

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

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

+ +

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

+

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

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

+ +

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

+

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

int operator< ( TQChar c1, TQChar c2 ) +

+ +

+

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

int operator< ( TQChar c, char ch ) +

+ +

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

+

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

int operator< ( char ch, TQChar c ) +

+ +

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

+

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

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

+ +

+

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

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

+ +

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

+

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

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

+ +

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

+

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

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

+ +

+

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

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

+ +

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

+

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

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

+ +

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

+

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

int operator> ( TQChar c1, TQChar c2 ) +

+ +

+

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

int operator> ( TQChar c, char ch ) +

+ +

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

+

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

int operator> ( char ch, TQChar c ) +

+ +

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

+

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

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

+ +

+

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

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

+ +

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

+

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

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

+ +

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

+

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


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


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

Complete Member List for TQCharRef

+ +

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

    +
+ +


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

TQCharRef Class Reference

+ +

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

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

+

#include <qstring.h> +

List of all member functions. +


Detailed Description

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

+

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

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

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


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


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcheckbox-h.html b/doc/html/qcheckbox-h.html new file mode 100644 index 00000000..1044e650 --- /dev/null +++ b/doc/html/qcheckbox-h.html @@ -0,0 +1,141 @@ + + + + + +qcheckbox.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qcheckbox.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qcheckbox.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQCheckBox class
+**
+** Created : 940222
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQCHECKBOX_H
+#define TQCHECKBOX_H
+
+#ifndef QT_H
+#include "qbutton.h"
+#endif // QT_H
+
+#ifndef QT_NO_CHECKBOX
+
+class Q_EXPORT TQCheckBox : public TQButton
+{
+    Q_OBJECT
+    Q_PROPERTY( bool checked READ isChecked WRITE setChecked )
+    Q_PROPERTY( bool tristate READ isTristate WRITE setTristate )
+    Q_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
+
+public:
+    TQCheckBox( TQWidget *parent, const char* name=0 );
+    TQCheckBox( const TQString &text, TQWidget *parent, const char* name=0 );
+
+    bool    isChecked() const;
+
+    void    setNoChange();
+
+    void    setTristate(bool y=TRUE);
+    bool    isTristate() const;
+
+    TQSize   sizeHint() const;
+
+public slots:
+    void    setChecked( bool check );
+
+protected:
+    void    resizeEvent( TQResizeEvent* );
+    void    drawButton( TQPainter * );
+    void    drawButtonLabel( TQPainter * );
+    void    updateMask();
+    bool    hitButton( const TQPoint &pos ) const;
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQCheckBox( const TQCheckBox & );
+    TQCheckBox &operator=( const TQCheckBox & );
+#endif
+};
+
+
+inline bool TQCheckBox::isChecked() const
+{ return isOn(); }
+
+inline void TQCheckBox::setChecked( bool check )
+{ setOn( check ); }
+
+
+#endif // QT_NO_CHECKBOX
+
+#endif // TQCHECKBOX_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcheckbox-members.html b/doc/html/qcheckbox-members.html new file mode 100644 index 00000000..964b1456 --- /dev/null +++ b/doc/html/qcheckbox-members.html @@ -0,0 +1,374 @@ + + + + + +TQCheckBox Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCheckBox

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcheckbox.html b/doc/html/qcheckbox.html new file mode 100644 index 00000000..29b6797b --- /dev/null +++ b/doc/html/qcheckbox.html @@ -0,0 +1,302 @@ + + + + + +TQCheckBox Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCheckBox Class Reference

+ +

The TQCheckBox widget provides a checkbox with a text label. +More... +

#include <qcheckbox.h> +

Inherits TQButton. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Important Inherited Members

+ +

Properties

+
    +
  • bool autoMask - whether the checkbox is automatically masked  (read only)
  • +
  • bool checked - whether the checkbox is checked
  • +
  • bool tristate - whether the checkbox is a tri-state checkbox
  • +
+

Detailed Description

+ + +The TQCheckBox widget provides a checkbox with a text label. +

+ +

TQCheckBox and TQRadioButton are both option buttons. That is, they +can be switched on (checked) or off (unchecked). The classes +differ in how the choices for the user are restricted. Radio +buttons define a "one of many" choice, whereas checkboxes provide +"many of many" choices. +

A TQButtonGroup can be used to group check buttons visually. +

Whenever a checkbox is checked or cleared it emits the signal +toggled(). Connect to this signal if you want to trigger an action +each time the checkbox changes state. You can use isChecked() to +query whether or not a checkbox is checked. +

Warning: The toggled() signal can not be trusted for tristate +checkboxes. +

In addition to the usual checked and unchecked states, TQCheckBox +optionally provides a third state to indicate "no change". This +is useful whenever you need to give the user the option of neither +checking nor unchecking a checkbox. If you need this third state, +enable it with setTristate() and use state() to query the current +toggle state. When a tristate checkbox changes state, it emits the +stateChanged() signal. +

Just like TQPushButton, a checkbox can display text or a pixmap. +The text can be set in the constructor or with setText(); the +pixmap is set with setPixmap(). +

+

+

See also TQButton, TQRadioButton, Fowler: Check Box, and Basic Widgets. + +


Member Function Documentation

+

TQCheckBox::TQCheckBox ( TQWidget * parent, const char * name = 0 ) +

+Constructs a checkbox with no text. +

The parent and name arguments are sent to the TQWidget +constructor. + +

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

+Constructs a checkbox with text text. +

The parent and name arguments are sent to the TQWidget +constructor. + +

TQKeySequence TQButton::accel () const +

Returns the accelerator associated with the button. +See the "accel" property for details. +

bool TQButton::autoRepeat () const +

Returns TRUE if autoRepeat is enabled; otherwise returns FALSE. +See the "autoRepeat" property for details. +

void TQButton::clicked () [signal] +

+ +

This signal is emitted when the button is activated (i.e. first +pressed down and then released when the mouse cursor is inside the +button), when the accelerator key is typed or when animateClick() +is called. This signal is not emitted if you call setDown(). +

The TQButtonGroup::clicked() signal does the same job, if you want +to connect several buttons to the same slot. +

Warning: Don't launch a model dialog in response to this signal +for a button that has autoRepeat turned on. +

See also pressed(), released(), toggled(), autoRepeat, and down. + +

Examples: chart/setdataform.cpp, listbox/listbox.cpp, network/clientserver/client/client.cpp, progressbar/progressbar.cpp, richtext/richtext.cpp, t2/main.cpp, and t4/main.cpp. +

TQButtonGroup * TQButton::group () const +

+Returns the group that this button belongs to. +

If the button is not a member of any TQButtonGroup, this function +returns 0. +

See also TQButtonGroup. + +

bool TQCheckBox::isChecked () const +

Returns TRUE if the checkbox is checked; otherwise returns FALSE. +See the "checked" property for details. +

bool TQButton::isDown () const +

Returns TRUE if the button is pressed; otherwise returns FALSE. +See the "down" property for details. +

bool TQButton::isExclusiveToggle () const +

Returns TRUE if the button is an exclusive toggle; otherwise returns FALSE. +See the "exclusiveToggle" property for details. +

bool TQButton::isOn () const +

Returns TRUE if the button is toggled; otherwise returns FALSE. +See the "on" property for details. +

bool TQButton::isToggleButton () const +

Returns TRUE if the button is a toggle button; otherwise returns FALSE. +See the "toggleButton" property for details. +

bool TQCheckBox::isTristate () const +

Returns TRUE if the checkbox is a tri-state checkbox; otherwise returns FALSE. +See the "tristate" property for details. +

const TQPixmap * TQButton::pixmap () const +

Returns the pixmap shown on the button. +See the "pixmap" property for details. +

void TQButton::pressed () [signal] +

+ +

This signal is emitted when the button is pressed down. +

See also released() and clicked(). + +

Examples: network/httpd/httpd.cpp and popup/popup.cpp. +

void TQButton::released () [signal] +

+ +

This signal is emitted when the button is released. +

See also pressed(), clicked(), and toggled(). + +

void TQButton::setAccel ( const TQKeySequence & ) [virtual] +

Sets the accelerator associated with the button. +See the "accel" property for details. +

void TQButton::setAutoRepeat ( bool ) [virtual] +

Sets whether autoRepeat is enabled. +See the "autoRepeat" property for details. +

void TQCheckBox::setChecked ( bool check ) [slot] +

Sets whether the checkbox is checked to check. +See the "checked" property for details. +

void TQButton::setDown ( bool ) [virtual] +

Sets whether the button is pressed. +See the "down" property for details. +

void TQCheckBox::setNoChange () +

+Sets the checkbox to the "no change" state. +

See also tristate. + +

void TQButton::setPixmap ( const TQPixmap & ) [virtual] +

Sets the pixmap shown on the button. +See the "pixmap" property for details. +

void TQButton::setText ( const TQString & ) [virtual] +

Sets the text shown on the button. +See the "text" property for details. +

void TQCheckBox::setTristate ( bool y = TRUE ) +

Sets whether the checkbox is a tri-state checkbox to y. +See the "tristate" property for details. +

ToggleState TQButton::state () const +

Returns the state of the toggle button. +See the "toggleState" property for details. +

void TQButton::stateChanged ( int state ) [signal] +

+ +

This signal is emitted whenever a toggle button changes state. state is On if the button is on, NoChange if it is in the +"no change" state or Off +if the button is off. +

This may be the result of a user action, toggle() slot activation, +setState(), or because setOn() was called. +

See also clicked() and TQButton::ToggleState. + +

TQString TQButton::text () const +

Returns the text shown on the button. +See the "text" property for details. +

void TQButton::toggle () [slot] +

+Toggles the state of a toggle button. +

See also on, setOn(), toggled(), and toggleButton. + +

void TQButton::toggled ( bool on ) [signal] +

+ +

This signal is emitted whenever a toggle button changes status. on is TRUE if the button is on, or FALSE if the button is off. +

This may be the result of a user action, toggle() slot activation, +or because setOn() was called. +

See also clicked(). + +

Example: listbox/listbox.cpp. +


Property Documentation

+

TQKeySequence accel

+

This property holds the accelerator associated with the button. +

This property is 0 if there is no accelerator set. If you set this +property to 0 then any current accelerator is removed. + +

Set this property's value with setAccel() and get this property's value with accel(). +

bool autoMask

+

This property holds whether the checkbox is automatically masked. +

See also TQWidget::autoMask. + +

bool autoRepeat

+

This property holds whether autoRepeat is enabled. +

If autoRepeat is enabled then the clicked() signal is emitted at +regular intervals if the button is down. This property has no +effect on toggle buttons. autoRepeat is off by default. + +

Set this property's value with setAutoRepeat() and get this property's value with autoRepeat(). +

bool checked

+

This property holds whether the checkbox is checked. +

The default is unchecked, i.e. FALSE. + +

Set this property's value with setChecked() and get this property's value with isChecked(). +

TQPixmap pixmap

+

This property holds the pixmap shown on the button. +

If the pixmap is monochrome (i.e. it is a TQBitmap or its depth is 1) and it does not have a mask, +this property will set the pixmap to be its own mask. The purpose +of this is to draw transparent bitmaps which are important for +toggle buttons, for example. +

pixmap() returns 0 if no pixmap was set. + +

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

TQString text

+

This property holds the text shown on the button. +

This property will return a TQString::null if the button has no +text. If the text has an ampersand (&) in it, then an +accelerator is automatically created for it using the character +that follows the '&' as the accelerator key. Any previous +accelerator will be overwritten, or cleared if no accelerator is +defined by the text. +

There is no default text. + +

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

bool tristate

+

This property holds whether the checkbox is a tri-state checkbox. +

The default is two-state, i.e. tri-state is FALSE. + +

Set this property's value with setTristate() and get this property's value with isTristate(). + +


+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/qchecklistitem-members.html b/doc/html/qchecklistitem-members.html new file mode 100644 index 00000000..ca0dd4eb --- /dev/null +++ b/doc/html/qchecklistitem-members.html @@ -0,0 +1,120 @@ + + + + + +TQCheckListItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCheckListItem

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qchecklistitem.html b/doc/html/qchecklistitem.html new file mode 100644 index 00000000..a3ad180e --- /dev/null +++ b/doc/html/qchecklistitem.html @@ -0,0 +1,256 @@ + + + + + +TQCheckListItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCheckListItem Class Reference

+ +

The TQCheckListItem class provides checkable list view items. +More... +

#include <qlistview.h> +

Inherits TQListViewItem. +

List of all member functions. +

Public Members

+
    +
  • enum Type { RadioButton, CheckBox, Controller, RadioButtonController = Controller, CheckBoxController }
  • +
  • enum ToggleState { Off, NoChange, On }
  • +
  • TQCheckListItem ( TQCheckListItem * parent, const TQString & text, Type tt = RadioButtonController )
  • +
  • TQCheckListItem ( TQCheckListItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )
  • +
  • TQCheckListItem ( TQListViewItem * parent, const TQString & text, Type tt = RadioButtonController )
  • +
  • TQCheckListItem ( TQListViewItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )
  • +
  • TQCheckListItem ( TQListView * parent, const TQString & text, Type tt = RadioButtonController )
  • +
  • TQCheckListItem ( TQListView * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )
  • +
  • TQCheckListItem ( TQListViewItem * parent, const TQString & text, const TQPixmap & p )
  • +
  • TQCheckListItem ( TQListView * parent, const TQString & text, const TQPixmap & p )
  • +
  • ~TQCheckListItem ()
  • +
  • virtual void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
  • +
  • virtual void paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r )
  • +
  • virtual void setOn ( bool b )
  • +
  • bool isOn () const
  • +
  • Type type () const
  • +
  • TQString text () const
  • +
  • void setTristate ( bool b )
  • +
  • bool isTristate () const
  • +
  • ToggleState state () const
  • +
  • void setState ( ToggleState s )
  • +
  • virtual int rtti () const
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQCheckListItem class provides checkable list view items. +

+

TQCheckListItems are used in TQListViews to provide +TQListViewItems that are checkboxes, radio buttons or +controllers. +

Checkbox and controller check list items may be inserted at any +level in a list view. Radio button check list items must be +children of a controller check list item. +

The item can be checked or unchecked with setOn(). Its type can be +retrieved with type() and its text retrieved with text(). +

List View Items
+

See also TQListViewItem, TQListView, and Advanced Widgets. + +


Member Type Documentation

+

TQCheckListItem::ToggleState

+ +

This enum specifies a TQCheckListItem's toggle state. +

    +
  • TQCheckListItem::Off +
  • TQCheckListItem::NoChange +
  • TQCheckListItem::On +
+

TQCheckListItem::Type

+ +

This enum type specifies a TQCheckListItem's type: +

    +
  • TQCheckListItem::RadioButton +
  • TQCheckListItem::CheckBox +
  • TQCheckListItem::Controller - obsolete (use RadioButtonController instead) +
  • TQCheckListItem::RadioButtonController +
  • TQCheckListItem::CheckBoxController +
+

Member Function Documentation

+

TQCheckListItem::TQCheckListItem ( TQCheckListItem * parent, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, text text +and of type tt. Note that a RadioButton must be the child of a +RadioButtonController, otherwise it will not toggle. + +

TQCheckListItem::TQCheckListItem ( TQCheckListItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, which is after +after in the parent's list of children, and with text text +and of type tt. Note that a RadioButton must be the child of +a RadioButtonController, otherwise it will not toggle. + +

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, text text +and of type tt. Note that this item must not be a RadioButton. Radio buttons must be children of a RadioButtonController. + +

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, which is after +after in the parent's list of children, with text text and +of type tt. Note that this item must not be a RadioButton. Radio buttons must be children of a RadioButtonController. + +

TQCheckListItem::TQCheckListItem ( TQListView * parent, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, text text +and of type tt. Note that tt must not be RadioButton. +Radio buttons must be children of a RadioButtonController. + +

TQCheckListItem::TQCheckListItem ( TQListView * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, which is after +after in the parent's list of children, with text text and +of type tt. Note that tt must not be RadioButton. +Radio buttons must be children of a RadioButtonController. + +

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, const TQString & text, const TQPixmap & p ) +

+Constructs a RadioButtonController item with parent parent, +text text and pixmap p. + +

TQCheckListItem::TQCheckListItem ( TQListView * parent, const TQString & text, const TQPixmap & p ) +

+Constructs a RadioButtonController item with parent parent, +text text and pixmap p. + +

TQCheckListItem::~TQCheckListItem () +

+Destroys the item, and all its children to any depth, freeing up +all allocated resources. + +

void TQCheckListItem::activate () [virtual protected] +

+Toggle check box or set radio button to on. + +

Reimplemented from TQListViewItem. +

bool TQCheckListItem::isOn () const +

+ +

Returns TRUE if the item is toggled on; otherwise returns FALSE. + +

bool TQCheckListItem::isTristate () const +

+Returns TRUE if the item is tristate; otherwise returns FALSE. +

See also setTristate(). + +

void TQCheckListItem::paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) [virtual] +

+Paints the item using the painter p and the color group cg. +The item is in column column, has width width and has +alignment align. (See TQt::AlignmentFlags for valid alignments.) + +

Reimplemented from TQListViewItem. +

void TQCheckListItem::paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r ) [virtual] +

+Draws the focus rectangle r using the color group cg on the +painter p. + +

Reimplemented from TQListViewItem. +

int TQCheckListItem::rtti () const [virtual] +

+ +

Returns 1. +

Make your derived classes return their own values for rtti(), and +you can distinguish between list view items. You should use values +greater than 1000, to allow for extensions to this class. + +

Reimplemented from TQListViewItem. +

void TQCheckListItem::setOn ( bool b ) [virtual] +

+Sets the button on if b is TRUE, otherwise sets it off. +Maintains radio button exclusivity. + +

void TQCheckListItem::setState ( ToggleState s ) +

+Sets the toggle state of the checklistitem to s. s can be +Off, NoChange or On. +

Tristate can only be enabled for CheckBox or CheckBoxController, +therefore the NoChange only applies to them. +

Setting the state to On or Off on a CheckBoxController +will recursivly set the states of its children to the same state. +

Setting the state to NoChange on a CheckBoxController will +make it recursivly recall the previous stored state of its +children. If there was no previous stored state the children are +all set to On. + +

void TQCheckListItem::setTristate ( bool b ) +

+Sets tristate to b if the Type is either a CheckBoxController or +a CheckBox. +

CheckBoxControllers are tristate by default. +

See also state() and isTristate(). + +

ToggleState TQCheckListItem::state () const +

+Returns the state of the item. +

See also TQCheckListItem::ToggleState. + +

void TQCheckListItem::stateChange ( bool ) [virtual protected] +

+This virtual function is called when the item changes its state. +NoChange (if tristate is enabled and the type is either CheckBox or CheckBoxController) reports the same as Off, so +use state() to determine if the state is actually Off or NoChange. + +

TQString TQCheckListItem::text () const +

+ +

Returns the item's text. + +

void TQCheckListItem::turnOffChild () [protected] +

+If this is a RadioButtonController that has RadioButton +children, turn off the child that is on. + +

Type TQCheckListItem::type () const +

+ +

Returns the type of this item. + + +


+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/qchecktableitem-members.html b/doc/html/qchecktableitem-members.html new file mode 100644 index 00000000..e5a000da --- /dev/null +++ b/doc/html/qchecktableitem-members.html @@ -0,0 +1,75 @@ + + + + + +TQCheckTableItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCheckTableItem

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qchecktableitem.html b/doc/html/qchecktableitem.html new file mode 100644 index 00000000..b2e36160 --- /dev/null +++ b/doc/html/qchecktableitem.html @@ -0,0 +1,113 @@ + + + + + +TQCheckTableItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCheckTableItem Class Reference
[table module]

+ +

The TQCheckTableItem class provides checkboxes in TQTables. +More... +

#include <qtable.h> +

Inherits TQTableItem. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQCheckTableItem class provides checkboxes in TQTables. + +

+ +

A TQCheckTableItem is a table item which looks and behaves like a +checkbox. The advantage of using TQCheckTableItems rather than real +checkboxes is that a TQCheckTableItem uses far less resources than +a real checkbox would in a TQTable. When the cell has the focus +it displays a real checkbox which the user can interact with. When +the cell does not have the focus the cell looks like a +checkbox. Pixmaps may not be used in TQCheckTableItems. +

TQCheckTableItem items have the edit type WhenCurrent (see +EditType). +

To change the checkbox's label use setText(). The checkbox can be +checked and unchecked with setChecked() and its state retrieved +using isChecked(). +

To populate a table cell with a TQCheckTableItem use +TQTable::setItem(). +

TQCheckTableItems can be distinguished from TQTableItems and +TQComboTableItems using their Run Time Type Identification +(rtti) value. +

Table Items
+

See also rtti(), EditType, TQComboTableItem, TQTableItem, TQCheckBox, and Advanced Widgets. + +


Member Function Documentation

+

TQCheckTableItem::TQCheckTableItem ( TQTable * table, const TQString & txt ) +

+Creates a TQCheckTableItem with an EditType of WhenCurrent +as a child of table. The checkbox is initially unchecked and +its label is set to the string txt. + +

bool TQCheckTableItem::isChecked () const +

+Returns TRUE if the checkbox table item is checked; otherwise +returns FALSE. +

See also setChecked(). + +

int TQCheckTableItem::rtti () const [virtual] +

+ +

Returns 2. +

Make your derived classes return their own values for rtti()to +distinguish between different table item subclasses. You should +use values greater than 1000, preferably a large random number, to +allow for extensions to this class. +

See also TQTableItem::rtti(). + +

Reimplemented from TQTableItem. +

void TQCheckTableItem::setChecked ( bool b ) [virtual] +

+If b is TRUE the checkbox is checked; if b is FALSE the +checkbox is unchecked. +

See also isChecked(). + + +


+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/qchildevent-members.html b/doc/html/qchildevent-members.html new file mode 100644 index 00000000..7bd15fb2 --- /dev/null +++ b/doc/html/qchildevent-members.html @@ -0,0 +1,52 @@ + + + + + +TQChildEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQChildEvent

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qchildevent.html b/doc/html/qchildevent.html new file mode 100644 index 00000000..5a018966 --- /dev/null +++ b/doc/html/qchildevent.html @@ -0,0 +1,98 @@ + + + + + +TQChildEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQChildEvent Class Reference

+ +

The TQChildEvent class contains event parameters for child object +events. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQChildEvent class contains event parameters for child object +events. +

+

Child events are sent to objects when children are inserted or +removed. +

A ChildRemoved event is sent immediately, but a ChildInserted event is posted (with TQApplication::postEvent()). +

Note that if a child is removed immediately after it is inserted, +the ChildInserted event may be suppressed, but the ChildRemoved event will always be sent. In this case there will be +a ChildRemoved event without a corresponding ChildInserted +event. +

The handler for these events is TQObject::childEvent(). +

See also Event Classes. + +


Member Function Documentation

+

TQChildEvent::TQChildEvent ( Type type, TQObject * child ) +

+ +

Constructs a child event object. The child is the object that +is to be removed or inserted. +

The type parameter must be either TQEvent::ChildInserted or +TQEvent::ChildRemoved. + +

TQObject * TQChildEvent::child () const +

+ +

Returns the child widget that was inserted or removed. + +

bool TQChildEvent::inserted () const +

+ +

Returns TRUE if the widget received a new child; otherwise returns +FALSE. + +

bool TQChildEvent::removed () const +

+ +

Returns TRUE if the object lost a child; 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/qchkbox-m.png b/doc/html/qchkbox-m.png new file mode 100644 index 00000000..a3d344da Binary files /dev/null and b/doc/html/qchkbox-m.png differ diff --git a/doc/html/qchkbox-w.png b/doc/html/qchkbox-w.png new file mode 100644 index 00000000..7a8f18aa Binary files /dev/null and b/doc/html/qchkbox-w.png differ diff --git a/doc/html/qclipboard-h.html b/doc/html/qclipboard-h.html new file mode 100644 index 00000000..6345160c --- /dev/null +++ b/doc/html/qclipboard-h.html @@ -0,0 +1,179 @@ + + + + + +qclipboard.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qclipboard.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qclipboard.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQClipboard class
+**
+** Created : 960430
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQCLIPBOARD_H
+#define TQCLIPBOARD_H
+
+#ifndef QT_H
+#include "qwindowdefs.h"
+#include "qobject.h"
+#endif // QT_H
+
+#ifndef QT_NO_CLIPBOARD
+
+class TQMimeSource;
+
+class Q_EXPORT TQClipboard : public TQObject
+{
+    Q_OBJECT
+private:
+    TQClipboard( TQObject *parent=0, const char *name=0 );
+    ~TQClipboard();
+
+public:
+    enum Mode { Clipboard, Selection };
+
+    void	clear( Mode mode );	       	// ### default arg = Clipboard in 4.0
+    void	clear();		       	// ### remove 4.0
+
+    bool	supportsSelection() const;
+    bool	ownsSelection() const;
+    bool	ownsClipboard() const;
+
+    void	setSelectionMode(bool enable);		// ### remove 4.0
+    bool	selectionModeEnabled() const; 		// ### remove 4.0
+
+    // ### default arg mode = Clipboard in 4.0 for all of these
+    TQString     text( Mode mode )	 const;
+    TQString     text( TQCString& subtype, Mode mode ) const;
+    void	setText( const TQString &, Mode mode );
+
+#ifndef QT_NO_MIMECLIPBOARD
+    TQMimeSource *data( Mode mode ) const;
+    void setData( TQMimeSource*, Mode mode );
+
+    TQImage	image( Mode mode ) const;
+    TQPixmap	pixmap( Mode mode ) const;
+    void	setImage( const TQImage &, Mode mode );
+    void	setPixmap( const TQPixmap &, Mode mode );
+#endif
+
+    // ### remove all of these in 4.0
+    TQString     text()	 const;
+    TQString     text(TQCString& subtype) const;
+    void	setText( const TQString &);
+
+#ifndef QT_NO_MIMECLIPBOARD
+    TQMimeSource	*data() const;
+    void	setData( TQMimeSource* );
+
+    TQImage	image() const;
+    TQPixmap	pixmap() const;
+    void	setImage( const TQImage & );
+    void	setPixmap( const TQPixmap & );
+#endif
+
+signals:
+    void        selectionChanged();
+    void	dataChanged();
+
+private slots:
+    void	ownerDestroyed();
+
+protected:
+    void	connectNotify( const char * );
+    bool	event( TQEvent * );
+
+    friend class TQApplication;
+    friend class TQBaseApplication;
+    friend class TQDragManager;
+    friend class TQMimeSource;
+
+private:
+#if defined(Q_WS_MAC)
+    void loadScrap(bool convert);
+    void saveScrap();
+#endif
+
+    // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQClipboard( const TQClipboard & );
+    TQClipboard &operator=( const TQClipboard & );
+#endif
+};
+
+#endif // QT_NO_CLIPBOARD
+
+#endif // TQCLIPBOARD_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qclipboard-members.html b/doc/html/qclipboard-members.html new file mode 100644 index 00000000..75bd4c7d --- /dev/null +++ b/doc/html/qclipboard-members.html @@ -0,0 +1,104 @@ + + + + + +TQClipboard Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQClipboard

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qclipboard.html b/doc/html/qclipboard.html new file mode 100644 index 00000000..d6841c52 --- /dev/null +++ b/doc/html/qclipboard.html @@ -0,0 +1,447 @@ + + + + + +TQClipboard Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQClipboard Class Reference

+ +

The TQClipboard class provides access to the window system clipboard. +More... +

#include <qclipboard.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • enum Mode { Clipboard, Selection }
  • +
  • void clear ( Mode mode )
  • +
  • void clear ()
  • +
  • bool supportsSelection () const
  • +
  • bool ownsSelection () const
  • +
  • bool ownsClipboard () const
  • +
  • void setSelectionMode ( bool enable )  (obsolete)
  • +
  • bool selectionModeEnabled () const  (obsolete)
  • +
  • TQString text ( Mode mode ) const
  • +
  • TQString text ( TQCString & subtype, Mode mode ) const
  • +
  • void setText ( const TQString & text, Mode mode )
  • +
  • TQMimeSource * data ( Mode mode ) const
  • +
  • void setData ( TQMimeSource * src, Mode mode )
  • +
  • TQImage image ( Mode mode ) const
  • +
  • TQPixmap pixmap ( Mode mode ) const
  • +
  • void setImage ( const TQImage & image, Mode mode )
  • +
  • void setPixmap ( const TQPixmap & pixmap, Mode mode )
  • +
  • TQString text () const
  • +
  • TQString text ( TQCString & subtype ) const
  • +
  • void setText ( const TQString & text )
  • +
  • TQMimeSource * data () const
  • +
  • void setData ( TQMimeSource * src )
  • +
  • TQImage image () const
  • +
  • TQPixmap pixmap () const
  • +
  • void setImage ( const TQImage & image )
  • +
  • void setPixmap ( const TQPixmap & pixmap )
  • +
+

Signals

+ +

Detailed Description

+ + +The TQClipboard class provides access to the window system clipboard. +

+ + +

The clipboard offers a simple mechanism to copy and paste data +between applications. +

TQClipboard supports the same data types that TQDragObject does, and +uses similar mechanisms. For advanced clipboard usage +read the drag-and-drop documentation. +

There is a single TQClipboard object in an application, and you can +access it using TQApplication::clipboard(). +

Example: +

+    TQClipboard *cb = TQApplication::clipboard();
+
+    // Copy text from the clipboard (paste)
+    TQString text = cb->text(TQClipboard::Clipboard);
+    if ( !text.isNull() )
+        qDebug( "The clipboard contains: " + text );
+
+    // Copy text into the clipboard
+    cb->setText( "This text can be pasted by other programs",
+                 TQClipboard::Clipboard );
+    
+ +

TQClipboard features some convenience functions to access common data +types: setText() allows the exchange of Unicode text and +setPixmap() and setImage() allows the exchange of TQPixmaps +and TQImages between applications. The setData() function is the +ultimate in flexibility: it allows you to add any TQMimeSource into the +clipboard. There are corresponding getters for each of these, e.g. +text(), image() and pixmap(). +

You can clear the clipboard by calling clear(). +

Platform Specific Information +

+

X11 +

+

    +

  • The X11 Window System has the concept of a separate selection +and clipboard. When text is selected, it is immediately available +as the global mouse selection. The global mouse selection may +later be copied to the clipboard. By convention, the middle mouse +button is used to paste the global mouse selection. +

  • X11 also has the concept of ownership; if you change the +selection within a window, X11 will only notify the owner and the +previous owner of the change, i.e. it will not notify all +applications that the selection or clipboard data changed. +

  • Lastly, the X11 clipboard is event driven, i.e. the clipboard +will not function properly if the event loop is not running. +Similarly, it is recommended that the contents of the clipboard +are stored or retrieved in direct response to user-input events, +e.g. mouse button or key presses and releases. You should not +store or retrieve the clipboard contents in response to timer or +non-user-input events. +

+

Windows +

+

    +

  • Microsoft Windows does not support the global mouse selection; +it only supports the global clipboard, e.g. Windows only adds text +to the clipboard when an explicit copy or cut is made. +

  • Windows does not have the concept of ownership; the clipboard +is a fully global resource so all applications are notified of +changes. +

+

See the multiclip example in the TQt Designer examples +directory for an example of a multiplatform clipboard application +that also demonstrates selection handling. +

See also Environment Classes and Input/Output and Networking. + +


Member Type Documentation

+

TQClipboard::Mode

+ +

This enum type is used to control which part of the system clipboard is +used by TQClipboard::data(), TQClipboard::setData() and related functions. +

    +
  • TQClipboard::Clipboard - indicates that data should be stored and retrieved from +the global clipboard. +
  • TQClipboard::Selection - indicates that data should be stored and retrieved from +the global mouse selection. +

Note: Support for Selection is provided only on systems with a +global mouse selection (e.g. X11). +

See also TQClipboard::supportsSelection(). + +


Member Function Documentation

+

void TQClipboard::clear ( Mode mode ) +

+Clear the clipboard contents. +

The mode argument is used to control which part of the system +clipboard is used. If mode is TQClipboard::Clipboard, this +function clears the the global clipboard contents. If mode is +TQClipboard::Selection, this function clears the global mouse +selection contents. +

See also TQClipboard::Mode and supportsSelection(). + +

void TQClipboard::clear () +

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

This function uses the TQClipboard::clear() function which takes +a TQClipboard::Mode argument. The value of the mode argument is +determined by the return value of selectionModeEnabled(). +If selectionModeEnabled() returns TRUE, the mode argument is +TQClipboard::Selection, otherwise the mode argument is TQClipboard::Clipboard. + +

TQMimeSource * TQClipboard::data ( Mode mode ) const +

+Returns a reference to a TQMimeSource representation of the current +clipboard data. +

The mode argument is used to control which part of the system +clipboard is used. If mode is TQClipboard::Clipboard, the +data is retrieved from the global clipboard. If mode is +TQClipboard::Selection, the data is retrieved from the global +mouse selection. +

See also setData(). + +

TQMimeSource * TQClipboard::data () const +

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

This function uses the TQClipboard::data() function which takes +a TQClipboard::Mode argument. The value of the mode argument is +determined by the return value of selectionModeEnabled(). +If selectionModeEnabled() returns TRUE, the mode argument is +TQClipboard::Selection, otherwise the mode argument is +TQClipboard::Clipboard. + +

void TQClipboard::dataChanged () [signal] +

+ +

This signal is emitted when the clipboard data is changed. + +

TQImage TQClipboard::image ( Mode mode ) const +

+Returns the clipboard image, or returns a null image if the +clipboard does not contain an image or if it contains an image in +an unsupported image format. +

The mode argument is used to control which part of the system +clipboard is used. If mode is TQClipboard::Clipboard, the +image is retrieved from the global clipboard. If mode is +TQClipboard::Selection, the image is retrieved from the global +mouse selection. +

See also setImage(), pixmap(), data(), and TQImage::isNull(). + +

TQImage TQClipboard::image () const +

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

This function uses the TQClipboard::image() function which takes +a TQClipboard::Mode argument. The value of the mode argument is +determined by the return value of selectionModeEnabled(). +If selectionModeEnabled() returns TRUE, the mode argument is +TQClipboard::Selection, otherwise the mode argument is +TQClipboard::Clipboard. + +

bool TQClipboard::ownsClipboard () const +

+Returns TRUE if this clipboard object owns the clipboard data; +otherwise returns FALSE. + +

bool TQClipboard::ownsSelection () const +

+Returns TRUE if this clipboard object owns the mouse selection +data; otherwise returns FALSE. + +

TQPixmap TQClipboard::pixmap ( Mode mode ) const +

+Returns the clipboard pixmap, or null if the clipboard does not +contain a pixmap. Note that this can lose information. For +example, if the image is 24-bit and the display is 8-bit, the +result is converted to 8 bits, and if the image has an alpha +channel, the result just has a mask. +

The mode argument is used to control which part of the system +clipboard is used. If mode is TQClipboard::Clipboard, the +pixmap is retrieved from the global clipboard. If mode is +TQClipboard::Selection, the pixmap is retrieved from the global +mouse selection. +

See also setPixmap(), image(), data(), and TQPixmap::convertFromImage(). + +

TQPixmap TQClipboard::pixmap () const +

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

This function uses the TQClipboard::pixmap() function which takes +a TQClipboard::Mode argument. The value of the mode argument is +determined by the return value of selectionModeEnabled(). +If selectionModeEnabled() returns TRUE, the mode argument is +TQClipboard::Selection, otherwise the mode argument is +TQClipboard::Clipboard. + +

void TQClipboard::selectionChanged () [signal] +

+ +

This signal is emitted when the selection is changed. This only +applies to windowing systems that support selections, e.g. X11. +Windows doesn't support selections. + +

bool TQClipboard::selectionModeEnabled () const +

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

Use the TQClipboard::data(), TQClipboard::setData() and related functions +which take a TQClipboard::Mode argument. +

Returns the selection mode. +

See also setSelectionMode() and supportsSelection(). + +

void TQClipboard::setData ( TQMimeSource * src, Mode mode ) +

+Sets the clipboard data to src. Ownership of the data is +transferred to the clipboard. If you want to remove the data +either call clear() or call setData() again with new data. +

The mode argument is used to control which part of the system +clipboard is used. If mode is TQClipboard::Clipboard, the +data is retrieved from the global clipboard. If mode is +TQClipboard::Selection, the data is retrieved from the global +mouse selection. +

The TQDragObject subclasses are reasonable objects to put into the +clipboard (but do not try to call TQDragObject::drag() on the same +object). Any TQDragObject placed in the clipboard should have a +parent of 0. Do not put TQDragMoveEvent or TQDropEvent subclasses in +the clipboard, as they do not belong to the event handler which +receives them. +

The setText(), setImage() and setPixmap() functions are simpler +wrappers for setting text, image and pixmap data respectively. +

See also data(). + +

void TQClipboard::setData ( TQMimeSource * src ) +

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

This function uses the TQClipboard::setData() function which takes +a TQClipboard::Mode argument. The value of the mode argument is +determined by the return value of selectionModeEnabled(). +If selectionModeEnabled() returns TRUE, the mode argument is +TQClipboard::Selection, otherwise the mode argument is +TQClipboard::Clipboard. + +

void TQClipboard::setImage ( const TQImage & image, Mode mode ) +

+Copies image into the clipboard. +

The mode argument is used to control which part of the system +clipboard is used. If mode is TQClipboard::Clipboard, the +image is stored in the global clipboard. If mode is +TQClipboard::Selection, the data is stored in the global +mouse selection. +

This is shorthand for: +

+        setData( new TQImageDrag(image), mode )
+    
+ +

See also image(), setPixmap(), and setData(). + +

void TQClipboard::setImage ( const TQImage & image ) +

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

This function uses the TQClipboard::setImage() function which takes +a TQClipboard::Mode argument. The value of the mode argument is +determined by the return value of selectionModeEnabled(). +If selectionModeEnabled() returns TRUE, the mode argument is +TQClipboard::Selection, otherwise the mode argument is +TQClipboard::Clipboard. + +

void TQClipboard::setPixmap ( const TQPixmap & pixmap, Mode mode ) +

+Copies pixmap into the clipboard. Note that this is slower +than setImage() because it needs to convert the TQPixmap to a +TQImage first. +

The mode argument is used to control which part of the system +clipboard is used. If mode is TQClipboard::Clipboard, the +pixmap is stored in the global clipboard. If mode is +TQClipboard::Selection, the pixmap is stored in the global +mouse selection. +

See also pixmap(), setImage(), and setData(). + +

void TQClipboard::setPixmap ( const TQPixmap & pixmap ) +

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

This function uses the TQClipboard::setPixmap() function which takes +a TQClipboard::Mode argument. The value of the mode argument is +determined by the return value of selectionModeEnabled(). +If selectionModeEnabled() returns TRUE, the mode argument is +TQClipboard::Selection, otherwise the mode argument is +TQClipboard::Clipboard. + +

void TQClipboard::setSelectionMode ( bool enable ) +

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

Use the TQClipboard::data(), TQClipboard::setData() and related functions +which take a TQClipboard::Mode argument. +

Sets the clipboard selection mode. If enable is TRUE, then +subsequent calls to TQClipboard::setData() and other functions +which put data into the clipboard will put the data into the mouse +selection, otherwise the data will be put into the clipboard. +

See also supportsSelection() and selectionModeEnabled(). + +

void TQClipboard::setText ( const TQString & text, Mode mode ) +

+Copies text into the clipboard as plain text. +

The mode argument is used to control which part of the system +clipboard is used. If mode is TQClipboard::Clipboard, the +text is stored in the global clipboard. If mode is +TQClipboard::Selection, the text is stored in the global +mouse selection. +

See also text() and setData(). + +

Example: regexptester/regexptester.cpp. +

void TQClipboard::setText ( const TQString & text ) +

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

This function uses the TQClipboard::setText() function which takes +a TQClipboard::Mode argument. The value of the mode argument is +determined by the return value of selectionModeEnabled(). +If selectionModeEnabled() returns TRUE, the mode argument is +TQClipboard::Selection, otherwise the mode argument is +TQClipboard::Clipboard. + +

bool TQClipboard::supportsSelection () const +

+Returns TRUE if the clipboard supports mouse selection; otherwise +returns FALSE. + +

Example: regexptester/regexptester.cpp. +

TQString TQClipboard::text ( Mode mode ) const +

+Returns the clipboard text as plain text, or a null string if the +clipboard does not contain any text. +

The mode argument is used to control which part of the system +clipboard is used. If mode is TQClipboard::Clipboard, the +text is retrieved from the global clipboard. If mode is +TQClipboard::Selection, the text is retrieved from the global +mouse selection. +

See also setText(), data(), and TQString::operator!(). + +

TQString TQClipboard::text ( TQCString & subtype, Mode mode ) const +

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

Returns the clipboard text in subtype subtype, or a null string +if the clipboard does not contain any text. If subtype is null, +any subtype is acceptable, and subtype is set to the chosen +subtype. +

The mode argument is used to control which part of the system +clipboard is used. If mode is TQClipboard::Clipboard, the +text is retrieved from the global clipboard. If mode is +TQClipboard::Selection, the text is retrieved from the global +mouse selection. +

Common values for subtype are "plain" and "html". +

See also setText(), data(), and TQString::operator!(). + +

TQString TQClipboard::text () const +

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

This function uses the TQClipboard::text() function which takes +a TQClipboard::Mode argument. The value of the mode argument is +determined by the return value of selectionModeEnabled(). +If selectionModeEnabled() returns TRUE, the mode argument is +TQClipboard::Selection, otherwise the mode argument is +TQClipboard::Clipboard. + +

TQString TQClipboard::text ( TQCString & subtype ) const +

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

Returns the clipboard text in subtype subtype, or a null string +if the clipboard does not contain any text. This function uses the +TQClipboard::text() function which takes a TQClipboard::Mode +argument. The value of the mode argument is determined by the +return value of selectionModeEnabled(). If selectionModeEnabled() +returns TRUE, the mode argument is TQClipboard::Selection, +otherwise the mode argument is TQClipboard::Clipboard. + + +


+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/qcloseevent-members.html b/doc/html/qcloseevent-members.html new file mode 100644 index 00000000..a96a1e63 --- /dev/null +++ b/doc/html/qcloseevent-members.html @@ -0,0 +1,52 @@ + + + + + +TQCloseEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCloseEvent

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcloseevent.html b/doc/html/qcloseevent.html new file mode 100644 index 00000000..9849d37a --- /dev/null +++ b/doc/html/qcloseevent.html @@ -0,0 +1,134 @@ + + + + + +TQCloseEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCloseEvent Class Reference

+ +

The TQCloseEvent class contains parameters that describe a close event. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQCloseEvent class contains parameters that describe a close event. +

+

Close events are sent to widgets that the user wants to close, +usually by choosing "Close" from the window menu, or by clicking +the `X' titlebar button. They are also sent when you call +TQWidget::close() to close a widget programmatically. +

Close events contain a flag that indicates whether the receiver +wants the widget to be closed or not. When a widget accepts the +close event, it is hidden (and destroyed if it was created with +the WDestructiveClose flag). If it refuses to accept the close +event nothing happens. (Under X11 it is possible that the window +manager will forcibly close the window; but at the time of writing +we are not aware of any window manager that does this.) +

The application's main widget -- TQApplication::mainWidget() -- +is a special case. When it accepts the close event, TQt leaves the +main event loop and the application is immediately terminated +(i.e. it returns from the call to TQApplication::exec() in the +main() function). +

The event handler TQWidget::closeEvent() receives close events. The +default implementation of this event handler accepts the close +event. If you do not want your widget to be hidden, or want some +special handing, you should reimplement the event handler. +

The closeEvent() in the + Application Walkthrough shows a close event handler that +asks whether to save a document before closing. +

If you want the widget to be deleted when it is closed, create it +with the WDestructiveClose widget flag. This is very useful for +independent top-level windows in a multi-window application. +

TQObjects emits the destroyed() signal when they are deleted. +

If the last top-level window is closed, the +TQApplication::lastWindowClosed() signal is emitted. +

The isAccepted() function returns TRUE if the event's receiver has +agreed to close the widget; call accept() to agree to close the +widget and call ignore() if the receiver of this event does not +want the widget to be closed. +

See also TQWidget::close(), TQWidget::hide(), TQObject::destroyed(), TQApplication::setMainWidget(), TQApplication::lastWindowClosed(), TQApplication::exec(), TQApplication::tquit(), and Event Classes. + +


Member Function Documentation

+

TQCloseEvent::TQCloseEvent () +

+ +

Constructs a close event object with the accept parameter flag set +to FALSE. +

See also accept(). + +

void TQCloseEvent::accept () +

+ +

Sets the accept flag of the close event object. +

Setting the accept flag indicates that the receiver of this event +agrees to close the widget. +

The accept flag is not set by default. +

If you choose to accept in TQWidget::closeEvent(), the widget will +be hidden. If the widget's WDestructiveClose flag is set, it +will also be destroyed. +

See also ignore() and TQWidget::hide(). + +

Examples: action/application.cpp, application/application.cpp, mdi/application.cpp, popup/popup.cpp, and qwerty/qwerty.cpp. +

void TQCloseEvent::ignore () +

+ +

Clears the accept flag of the close event object. +

Clearing the accept flag indicates that the receiver of this event +does not want the widget to be closed. +

The close event is constructed with the accept flag cleared. +

See also accept(). + +

Examples: action/application.cpp, application/application.cpp, mdi/application.cpp, and qwerty/qwerty.cpp. +

bool TQCloseEvent::isAccepted () const +

+ +

Returns TRUE if the receiver of the event has agreed to close the +widget; otherwise returns FALSE. +

See also accept() and ignore(). + + +


+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/qcollection.html b/doc/html/qcollection.html new file mode 100644 index 00000000..4493c415 --- /dev/null +++ b/doc/html/qcollection.html @@ -0,0 +1,47 @@ + + + + + +TQCollection Class Reference (obsolete) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCollection Class Reference (obsolete)

+ + +

+#include <qcollection.h>
+ +

The TQCollection class has been renamed TQPtrCollection in TQt 3.0. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcolor-h.html b/doc/html/qcolor-h.html new file mode 100644 index 00000000..cb40dd6c --- /dev/null +++ b/doc/html/qcolor-h.html @@ -0,0 +1,274 @@ + + + + + +qcolor.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qcolor.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qcolor.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQColor class
+**
+** Created : 940112
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQCOLOR_H
+#define TQCOLOR_H
+
+#ifndef QT_H
+#include "qwindowdefs.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+const TQRgb  RGB_MASK    = 0x00ffffff;		// masks RGB values
+
+Q_EXPORT inline int qRed( TQRgb rgb )		// get red part of RGB
+{ return (int)((rgb >> 16) & 0xff); }
+
+Q_EXPORT inline int qGreen( TQRgb rgb )		// get green part of RGB
+{ return (int)((rgb >> 8) & 0xff); }
+
+Q_EXPORT inline int qBlue( TQRgb rgb )		// get blue part of RGB
+{ return (int)(rgb & 0xff); }
+
+Q_EXPORT inline int qAlpha( TQRgb rgb )		// get alpha part of RGBA
+{ return (int)((rgb >> 24) & 0xff); }
+
+Q_EXPORT inline TQRgb qRgb( int r, int g, int b )// set RGB value
+{ return (0xff << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
+
+Q_EXPORT inline TQRgb qRgba( int r, int g, int b, int a )// set RGBA value
+{ return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
+
+Q_EXPORT inline int qGray( int r, int g, int b )// convert R,G,B to gray 0..255
+{ return (r*11+g*16+b*5)/32; }
+
+Q_EXPORT inline int qGray( TQRgb rgb )		// convert RGB to gray 0..255
+{ return qGray( qRed(rgb), qGreen(rgb), qBlue(rgb) ); }
+
+
+class Q_EXPORT TQColor
+{
+public:
+    enum Spec { Rgb, Hsv };
+
+    TQColor();
+    TQColor( int r, int g, int b );
+    TQColor( int x, int y, int z, Spec );
+    TQColor( TQRgb rgb, uint pixel=0xffffffff);
+    TQColor( const TQString& name );
+    TQColor( const char *name );
+    TQColor( const TQColor & );
+    TQColor &operator=( const TQColor & );
+
+    bool   isValid() const;
+    bool   isDirty() const;
+    TQString name() const;
+    void   setNamedColor( const TQString& name );
+
+    TQRgb   rgb()    const;
+    void   setRgb( int r, int g, int b );
+    void   setRgb( TQRgb rgb );
+    void   getRgb( int *r, int *g, int *b ) const { rgb( r, g, b ); }
+    void   rgb( int *r, int *g, int *b ) const; // obsolete
+
+    int	   red()    const;
+    int	   green()  const;
+    int	   blue()   const;
+
+    void   setHsv( int h, int s, int v );
+    void   getHsv( int *h, int *s, int *v ) const { hsv( h, s, v ); }
+    void   hsv( int *h, int *s, int *v ) const; // obsolete
+    void   getHsv( int &h, int &s, int &v ) const { hsv( &h, &s, &v ); } // obsolete
+
+    TQColor light( int f = 150 ) const;
+    TQColor dark( int f = 200 )	const;
+
+    bool   operator==( const TQColor &c ) const;
+    bool   operator!=( const TQColor &c ) const;
+
+    uint   alloc();
+    uint   pixel()  const;
+
+#if defined(Q_WS_X11)
+    // ### in 4.0, make this take a default argument of -1 for default screen?
+    uint alloc( int screen );
+    uint pixel( int screen ) const;
+#endif
+
+    static int  maxColors();
+    static int  numBitPlanes();
+
+    static int  enterAllocContext();
+    static void leaveAllocContext();
+    static int  currentAllocContext();
+    static void destroyAllocContext( int );
+
+#if defined(Q_WS_WIN)
+    static const TQRgb* palette( int* numEntries = 0 );
+    static int setPaletteEntries( const TQRgb* entries, int numEntries,
+				  int base = -1 );
+    static HPALETTE hPal()  { return hpal; }
+    static uint	realizePal( TQWidget * );
+#endif
+
+    static void initialize();
+    static void cleanup();
+#ifndef QT_NO_STRINGLIST
+    static TQStringList colorNames();
+#endif
+    enum { Dirt = 0x44495254, Invalid = 0x49000000 };
+
+private:
+    void setSystemNamedColor( const TQString& name );
+    void setPixel( uint pixel );
+    static void initGlobalColors();
+    static uint argbToPix32(TQRgb);
+    static TQColor* globalColors();
+    static bool color_init;
+    static bool globals_init;
+#if defined(Q_WS_WIN)
+    static HPALETTE hpal;
+#endif
+    static enum ColorModel { d8, d32 } colormodel;
+    union {
+	TQRgb argb;
+	struct D8 {
+	    TQRgb argb;
+	    uchar pix;
+	    uchar invalid;
+	    uchar dirty;
+	    uchar direct;
+	} d8;
+	struct D32 {
+	    TQRgb argb;
+	    uint pix;
+	    bool invalid() const { return argb == TQColor::Invalid && pix == TQColor::Dirt; }
+	    bool probablyDirty() const { return pix == TQColor::Dirt; }
+	} d32;
+    } d;
+};
+
+
+inline TQColor::TQColor()
+{ d.d32.argb = Invalid; d.d32.pix = Dirt; }
+
+inline TQColor::TQColor( int r, int g, int b )
+{
+    d.d32.argb = Invalid;
+    d.d32.pix = Dirt;
+    setRgb( r, g, b );
+}
+
+inline TQRgb TQColor::rgb() const
+{ return d.argb; }
+
+inline int TQColor::red() const
+{ return qRed(d.argb); }
+
+inline int TQColor::green() const
+{ return qGreen(d.argb); }
+
+inline int TQColor::blue() const
+{ return qBlue(d.argb); }
+
+inline bool TQColor::isValid() const
+{
+    if ( colormodel == d8 )
+	return !d.d8.invalid;
+    else
+	return !d.d32.invalid();
+}
+
+inline bool TQColor::operator==( const TQColor &c ) const
+{
+    return d.argb == c.d.argb && isValid() == c.isValid();
+}
+
+inline bool TQColor::operator!=( const TQColor &c ) const
+{
+    return !operator==(c);
+}
+
+
+/*****************************************************************************
+  TQColor stream functions
+ *****************************************************************************/
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQColor & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQColor & );
+#endif
+
+#endif // TQCOLOR_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcolor-members.html b/doc/html/qcolor-members.html new file mode 100644 index 00000000..d5630757 --- /dev/null +++ b/doc/html/qcolor-members.html @@ -0,0 +1,75 @@ + + + + + +TQColor Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQColor

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcolor.html b/doc/html/qcolor.html new file mode 100644 index 00000000..421cbde1 --- /dev/null +++ b/doc/html/qcolor.html @@ -0,0 +1,618 @@ + + + + + +TQColor Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQColor Class Reference

+ +

The TQColor class provides colors based on RGB or HSV values. +More... +

#include <qcolor.h> +

List of all member functions. +

Public Members

+
    +
  • enum Spec { Rgb, Hsv }
  • +
  • TQColor ()
  • +
  • TQColor ( int r, int g, int b )
  • +
  • TQColor ( int x, int y, int z, Spec colorSpec )
  • +
  • TQColor ( TQRgb rgb, uint pixel = 0xffffffff )
  • +
  • TQColor ( const TQString & name )
  • +
  • TQColor ( const char * name )
  • +
  • TQColor ( const TQColor & c )
  • +
  • TQColor & operator= ( const TQColor & c )
  • +
  • bool isValid () const
  • +
  • TQString name () const
  • +
  • void setNamedColor ( const TQString & name )
  • +
  • TQRgb rgb () const
  • +
  • void setRgb ( int r, int g, int b )
  • +
  • void setRgb ( TQRgb rgb )
  • +
  • void getRgb ( int * r, int * g, int * b ) const
  • +
  • void rgb ( int * r, int * g, int * b ) const  (obsolete)
  • +
  • int red () const
  • +
  • int green () const
  • +
  • int blue () const
  • +
  • void setHsv ( int h, int s, int v )
  • +
  • void getHsv ( int * h, int * s, int * v ) const
  • +
  • void hsv ( int * h, int * s, int * v ) const  (obsolete)
  • +
  • void getHsv ( int & h, int & s, int & v ) const  (obsolete)
  • +
  • TQColor light ( int factor = 150 ) const
  • +
  • TQColor dark ( int factor = 200 ) const
  • +
  • bool operator== ( const TQColor & c ) const
  • +
  • bool operator!= ( const TQColor & c ) const
  • +
  • uint alloc ()
  • +
  • uint pixel () const
  • +
  • uint pixel ( int screen ) const
  • +
+

Static Public Members

+ +

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQColor & c )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQColor & c )
  • +
  • int qRed ( TQRgb rgb )
  • +
  • int qGreen ( TQRgb rgb )
  • +
  • int qBlue ( TQRgb rgb )
  • +
  • int qAlpha ( TQRgb rgba )
  • +
  • TQRgb qRgb ( int r, int g, int b )
  • +
  • TQRgb qRgba ( int r, int g, int b, int a )
  • +
  • int qGray ( int r, int g, int b )
  • +
  • int qGray ( qRgb rgb )
  • +
+

Detailed Description

+ + +The TQColor class provides colors based on RGB or HSV values. +

+ + +

A color is normally specified in terms of RGB (red, green and blue) +components, but it is also possible to specify HSV (hue, saturation +and value) or set a color name (the names are copied from from the +X11 color database). +

In addition to the RGB value, a TQColor also has a pixel value and a +validity. The pixel value is used by the underlying window system +to refer to a color. It can be thought of as an index into the +display hardware's color table. +

The validity (isValid()) indicates whether the color is legal at +all. For example, a RGB color with RGB values out of range is +illegal. For performance reasons, TQColor mostly disregards illegal +colors. The result of using an invalid color is unspecified and +will usually be surprising. +

There are 19 predefined TQColor objects: white, black, red, darkRed, green, darkGreen, blue, darkBlue, cyan, darkCyan, magenta, darkMagenta, yellow, darkYellow, gray, darkGray, lightGray, color0 and color1, accessible as members of the TQt namespace (ie. TQt::red). +

TQt Colors
+

The colors color0 (zero pixel value) and color1 (non-zero +pixel value) are special colors for drawing in bitmaps. Painting with color0 sets the bitmap bits to 0 +(transparent, i.e. background), and painting with color1 sets the +bits to 1 (opaque, i.e. foreground). +

The TQColor class has an efficient, dynamic color allocation +strategy. A color is normally allocated the first time it is used +(lazy allocation), that is, whenever the pixel() function is called. +The following steps are taken to allocate a color. If, at any point, +a suitable color is found then the appropriate pixel value is +returned and the subsequent steps are not taken: +

    +
  1. Is the pixel value valid? If it is, just return it; otherwise, +allocate a pixel value. +
  2. Check an internal hash table to see if we allocated an equal RGB +value earlier. If we did, set the corresponding pixel value for the +color and return it. +
  3. Try to allocate the RGB value. If we succeed, we get a pixel value +that we save in the internal table with the RGB value. +Return the pixel value. +
  4. The color could not be allocated. Find the closest matching +color, save it in the internal table, and return it. +
+

A color can be set by passing setNamedColor() an RGB string like +"#112233", or a color name, e.g. "blue". The names are taken from +X11's rgb.txt database but can also be used under Windows. To get +a lighter or darker color use light() and dark() respectively. +Colors can also be set using setRgb() and setHsv(). The color +components can be accessed in one go with rgb() and hsv(), or +individually with red(), green() and blue(). +

Use maxColors() and numBitPlanes() to determine the maximum number +of colors and the number of bit planes supported by the underlying +window system, +

If you need to allocate many colors temporarily, for example in an +image viewer application, enterAllocContext(), leaveAllocContext() and +destroyAllocContext() will prove useful. +

HSV Colors +

+

Because many people don't know the HSV color model very well, we'll +cover it briefly here. +

The RGB model is hardware-oriented. Its representation is close to +what most monitors show. In contrast, HSV represents color in a way +more suited to the human perception of color. For example, the +relationships "stronger than", "darker than" and "the opposite of" +are easily expressed in HSV but are much harder to express in RGB. +

HSV, like RGB, has three components: +

    +

  • H, for hue, is either 0-359 if the color is chromatic (not +gray), or meaningless if it is gray. It represents degrees on the +color wheel familiar to most people. Red is 0 (degrees), green is +120 and blue is 240. +

  • S, for saturation, is 0-255, and the bigger it is, the +stronger the color is. Grayish colors have saturation near 0; very +strong colors have saturation near 255. +

  • V, for value, is 0-255 and represents lightness or brightness +of the color. 0 is black; 255 is as far from black as possible. +

+

Here are some examples: Pure red is H=0, S=255, V=255. A dark red, +moving slightly towards the magenta, could be H=350 (equivalent to +-10), S=255, V=180. A grayish light red could have H about 0 (say +350-359 or 0-10), S about 50-100, and S=255. +

TQt returns a hue value of -1 for achromatic colors. If you pass a +too-big hue value, TQt forces it into range. Hue 360 or 720 is +treated as 0; hue 540 is treated as 180. +

See also TQPalette, TQColorGroup, TQApplication::setColorSpec(), Color FAQ, Widget Appearance and Style, Graphics Classes, and Image Processing Classes. + +


Member Type Documentation

+

TQColor::Spec

+ +

The type of color specified, either RGB or HSV, e.g. in the +TQColor::TQColor( x, y, z, colorSpec) constructor. +

    +
  • TQColor::Rgb +
  • TQColor::Hsv +
+

Member Function Documentation

+

TQColor::TQColor () +

+ +

Constructs an invalid color with the RGB value (0, 0, 0). An +invalid color is a color that is not properly set up for the +underlying window system. +

The alpha value of an invalid color is unspecified. +

See also isValid(). + +

TQColor::TQColor ( int r, int g, int b ) +

+ +

Constructs a color with the RGB value r, g, b, in the +same way as setRgb(). +

The color is left invalid if any or the arguments are illegal. +

See also setRgb(). + +

TQColor::TQColor ( int x, int y, int z, Spec colorSpec ) +

+Constructs a color with the RGB or HSV value x, y, z. +

The arguments are an RGB value if colorSpec is TQColor::Rgb. x (red), y (green), and z (blue). All of them must be in the +range 0-255. +

The arguments are an HSV value if colorSpec is TQColor::Hsv. x (hue) must be -1 for achromatic colors and 0-359 for chromatic +colors; y (saturation) and z (value) must both be in the +range 0-255. +

See also setRgb() and setHsv(). + +

TQColor::TQColor ( TQRgb rgb, uint pixel = 0xffffffff ) +

+Constructs a color with the RGB value rgb and a custom pixel +value pixel. +

If pixel == 0xffffffff (the default), then the color uses the +RGB value in a standard way. If pixel is something else, then +the pixel value is set directly to pixel, skipping the normal +allocation procedure. + +

TQColor::TQColor ( const TQString & name ) +

+Constructs a named color in the same way as setNamedColor() using +name name. +

The color is left invalid if name cannot be parsed. +

See also setNamedColor(). + +

TQColor::TQColor ( const char * name ) +

+Constructs a named color in the same way as setNamedColor() using +name name. +

The color is left invalid if name cannot be parsed. +

See also setNamedColor(). + +

TQColor::TQColor ( const TQColor & c ) +

+Constructs a color that is a copy of c. + +

uint TQColor::alloc () +

+Allocates the RGB color and returns the pixel value. +

Allocating a color means to obtain a pixel value from the RGB +specification. The pixel value is an index into the global color +table, but should be considered an arbitrary platform-dependent value. +

The pixel() function calls alloc() if necessary, so in general you +don't need to call this function. +

See also enterAllocContext(). + +

int TQColor::blue () const +

+ +

Returns the B (blue) component of the RGB value. + +

void TQColor::cleanup () [static] +

+Internal clean up retquired for TQColor. +This function is called from the TQApplication destructor. +

See also initialize(). + +

TQStringList TQColor::colorNames () [static] +

+ +Returns a TQStringList containing the color names TQt knows about. + +

int TQColor::currentAllocContext () [static] +

+Returns the current color allocation context. +

The default context is 0. +

See also enterAllocContext() and leaveAllocContext(). + +

TQColor TQColor::dark ( int factor = 200 ) const +

+Returns a darker (or lighter) color, but does not change this +object. +

Returns a darker color if factor is greater than 100. Setting +factor to 300 returns a color that has one-third the +brightness. +

Returns a lighter color if factor is less than 100. We +recommend using lighter() for this purpose. If factor is 0 or +negative, the return value is unspecified. +

(This function converts the current RGB color to HSV, divides V by +factor and converts back to RGB.) +

See also light(). + +

Examples: desktop/desktop.cpp and themes/wood.cpp. +

void TQColor::destroyAllocContext ( int context ) [static] +

+Destroys a color allocation context, context. +

This function deallocates all colors that were allocated in the +specified context. If context == -1, it frees up all colors +that the application has allocated. If context == -2, it frees +up all colors that the application has allocated, except those in +the default context. +

The function does nothing for true color displays. +

See also enterAllocContext() and alloc(). + +

Example: showimg/showimg.cpp. +

int TQColor::enterAllocContext () [static] +

+Enters a color allocation context and returns a non-zero unique +identifier. +

Color allocation contexts are useful for programs that need to +allocate many colors and throw them away later, like image +viewers. The allocation context functions work for true color +displays as well as for colormap displays, except that +TQColor::destroyAllocContext() does nothing for true color. +

Example: +

+    TQPixmap loadPixmap( TQString fileName )
+    {
+        static int alloc_context = 0;
+        if ( alloc_context )
+            TQColor::destroyAllocContext( alloc_context );
+        alloc_context = TQColor::enterAllocContext();
+        TQPixmap pm( fileName );
+        TQColor::leaveAllocContext();
+        return pm;
+    }
+    
+ +

The example code loads a pixmap from file. It frees up all colors +that were allocated the last time loadPixmap() was called. +

The initial/default context is 0. TQt keeps a list of colors +associated with their allocation contexts. You can call +destroyAllocContext() to get rid of all colors that were allocated +in a specific context. +

Calling enterAllocContext() enters an allocation context. The +allocation context lasts until you call leaveAllocContext(). +TQColor has an internal stack of allocation contexts. Each call to +enterAllocContex() must have a corresponding leaveAllocContext(). +

+        // context 0 active
+    int c1 = TQColor::enterAllocContext();    // enter context c1
+        // context c1 active
+    int c2 = TQColor::enterAllocContext();    // enter context c2
+        // context c2 active
+    TQColor::leaveAllocContext();             // leave context c2
+        // context c1 active
+    TQColor::leaveAllocContext();             // leave context c1
+        // context 0 active
+        // Now, free all colors that were allocated in context c2
+    TQColor::destroyAllocContext( c2 );
+    
+ +

You may also want to set the application's color specification. +See TQApplication::setColorSpec() for more information. +

See also leaveAllocContext(), currentAllocContext(), destroyAllocContext(), and TQApplication::setColorSpec(). + +

Example: showimg/showimg.cpp. +

void TQColor::getHsv ( int * h, int * s, int * v ) const +

+

Returns the current RGB value as HSV. The contents of the h, s and v pointers are set to the HSV values. If any of the three +pointers are null, the function does nothing. +

The hue (which h points to) is set to -1 if the color is +achromatic. +

Warning: Colors are stored internally as RGB values, so getHSv() +may return slightly different values to those set by setHsv(). +

See also setHsv() and rgb(). + +

void TQColor::getHsv ( int & h, int & s, int & v ) const +

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

+

void TQColor::getRgb ( int * r, int * g, int * b ) const +

+

Sets the contents pointed to by r, g and b to the red, +green and blue components of the RGB value respectively. The value +range for a component is 0..255. +

See also rgb(), setRgb(), and getHsv(). + +

int TQColor::green () const +

+ +

Returns the G (green) component of the RGB value. + +

void TQColor::hsv ( int * h, int * s, int * v ) const +

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

Example: themes/metal.cpp. +

void TQColor::initialize () [static] +

+Internal initialization retquired for TQColor. +This function is called from the TQApplication constructor. +

See also cleanup(). + +

bool TQColor::isValid () const +

+ +

Returns FALSE if the color is invalid, i.e. it was constructed using the +default constructor; otherwise returns TRUE. + +

Examples: chart/element.cpp, chart/setdataform.cpp, and scribble/scribble.cpp. +

void TQColor::leaveAllocContext () [static] +

+Leaves a color allocation context. +

See enterAllocContext() for a detailed explanation. +

See also enterAllocContext() and currentAllocContext(). + +

Example: showimg/showimg.cpp. +

TQColor TQColor::light ( int factor = 150 ) const +

+Returns a lighter (or darker) color, but does not change this +object. +

Returns a lighter color if factor is greater than 100. Setting +factor to 150 returns a color that is 50% brighter. +

Returns a darker color if factor is less than 100. We recommend +using dark() for this purpose. If factor is 0 or negative, the +return value is unspecified. +

(This function converts the current RGB color to HSV, multiplies V +by factor, and converts the result back to RGB.) +

See also dark(). + +

Examples: desktop/desktop.cpp and themes/wood.cpp. +

int TQColor::maxColors () [static] +

+Returns the maximum number of colors supported by the underlying +window system if the window system uses a palette. +

Otherwise returns -1. Use numBitPlanes() to calculate the available +colors in that case. + +

TQString TQColor::name () const +

+Returns the name of the color in the format "#RRGGBB", i.e. a "#" +character followed by three two-digit hexadecimal numbers. +

See also setNamedColor(). + +

Example: chart/setdataform.cpp. +

int TQColor::numBitPlanes () [static] +

+Returns the number of color bit planes for the underlying window +system. +

The returned value is equal to the default pixmap depth. +

See also TQPixmap::defaultDepth(). + +

bool TQColor::operator!= ( const TQColor & c ) const +

+ +Returns TRUE if this color has a different RGB value from c; +otherwise returns FALSE. + +

TQColor & TQColor::operator= ( const TQColor & c ) +

+Assigns a copy of the color c and returns a reference to this +color. + +

bool TQColor::operator== ( const TQColor & c ) const +

+ +

Returns TRUE if this color has the same RGB value as c; +otherwise returns FALSE. + +

uint TQColor::pixel () const +

+Returns the pixel value. +

This value is used by the underlying window system to refer to a +color. It can be thought of as an index into the display +hardware's color table, but the value is an arbitrary 32-bit +value. +

See also alloc(). + +

uint TQColor::pixel ( int screen ) const +

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

Returns the pixel value for screen screen. +

This value is used by the underlying window system to refer to a color. +It can be thought of as an index into the display hardware's color table, +but the value is an arbitrary 32-bit value. +

See also alloc(). + +

int TQColor::red () const +

+ +

Returns the R (red) component of the RGB value. + +

TQRgb TQColor::rgb () const +

+ +

Returns the RGB value. +

The return type TQRgb is equivalent to unsigned int. +

For an invalid color, the alpha value of the returned color is +unspecified. +

See also setRgb(), hsv(), qRed(), qBlue(), qGreen(), and isValid(). + +

void TQColor::rgb ( int * r, int * g, int * b ) const +

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

void TQColor::setHsv ( int h, int s, int v ) +

+Sets a HSV color value. h is the hue, s is the saturation +and v is the value of the HSV color. +

If s or v are not in the range 0-255, or h is < -1, the +color is not changed. +

Warning: Colors are stored internally as RGB values, so getHSv() +may return slightly different values to those set by setHsv(). +

See also hsv() and setRgb(). + +

Examples: drawdemo/drawdemo.cpp, grapher/grapher.cpp, and progress/progress.cpp. +

void TQColor::setNamedColor ( const TQString & name ) +

+Sets the RGB value to name, which may be in one of these +formats: +
    +
  • #RGB (each of R, G and B is a single hex digit) +
  • #RRGGBB +
  • #RRRGGGBBB +
  • #RRRRGGGGBBBB +
  • A name from the X color database (rgb.txt) (e.g. +"steelblue" or "gainsboro"). These color names also work +under Windows. +
+

The color is invalid if name cannot be parsed. + +

void TQColor::setRgb ( int r, int g, int b ) +

+Sets the RGB value to r, g, b. The arguments, r, g +and b must all be in the range 0..255. If any of them are +outside the legal range, the color is not changed. +

See also rgb() and setHsv(). + +

void TQColor::setRgb ( TQRgb rgb ) +

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

Sets the RGB value to rgb. +

The type TQRgb is equivalent to unsigned int. +

See also rgb() and setHsv(). + +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQColor & c ) +

+ +Writes a color object, c to the stream, s. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQColor & c ) +

+ +Reads a color object, c, from the stream, s. +

See also Format of the TQDataStream operators. + +

int qAlpha ( TQRgb rgba ) +

+ + +

Returns the alpha component of the RGBA quadruplet rgba. + +

int qBlue ( TQRgb rgb ) +

+ + +

Returns the blue component of the RGB triplet rgb. +

See also qRgb() and TQColor::blue(). + +

int qGray ( int r, int g, int b ) +

+ + +

Returns a gray value 0..255 from the (r, g, b) triplet. +

The gray value is calculated using the formula (r*11 + g*16 + +b*5)/32. + +

int qGray ( qRgb rgb ) +

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

+

Returns a gray value 0..255 from the given rgb colour. + +

int qGreen ( TQRgb rgb ) +

+ + +

Returns the green component of the RGB triplet rgb. +

See also qRgb() and TQColor::green(). + +

int qRed ( TQRgb rgb ) +

+ + +

Returns the red component of the RGB triplet rgb. +

See also qRgb() and TQColor::red(). + +

TQRgb qRgb ( int r, int g, int b ) +

+ + +

Returns the RGB triplet (r,g,b). +

The return type TQRgb is equivalent to unsigned int. +

See also qRgba(), qRed(), qGreen(), and qBlue(). + +

TQRgb qRgba ( int r, int g, int b, int a ) +

+ + +

Returns the RGBA quadruplet (r,g,b,a). +

The return type TQRgba is equivalent to unsigned int. +

See also qRgb(), qRed(), qGreen(), and qBlue(). + + +


+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/qcolordialog-h.html b/doc/html/qcolordialog-h.html new file mode 100644 index 00000000..89a80390 --- /dev/null +++ b/doc/html/qcolordialog-h.html @@ -0,0 +1,138 @@ + + + + + +qcolordialog.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qcolordialog.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qcolordialog.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQColorDialog class
+**
+** Created : 990222
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the dialogs 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 retquirements 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 TQCOLORDIALOG_H
+#define TQCOLORDIALOG_H
+
+#ifndef QT_H
+#include "qdialog.h"
+#endif // QT_H
+
+#ifndef QT_NO_COLORDIALOG
+
+class TQColorDialogPrivate;
+
+class Q_EXPORT TQColorDialog : public TQDialog
+{
+    Q_OBJECT
+
+public:
+    static TQColor getColor( const TQColor& init = white, TQWidget* parent=0, const char* name=0 );
+    static TQRgb getRgba( TQRgb, bool* ok = 0,
+			 TQWidget* parent=0, const char* name=0 );
+
+    static int customCount();
+    static TQRgb customColor( int );
+    static void setCustomColor( int, TQRgb );
+    static void setStandardColor( int, TQRgb );
+
+private:
+    ~TQColorDialog();
+    TQColorDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE );
+
+    void setColor( const TQColor& );
+    TQColor color() const;
+
+    bool selectColor( const TQColor& );
+
+    void setSelectedAlpha( int );
+    int selectedAlpha() const;
+
+    void showCustom( bool=TRUE );
+
+private:	// Disabled copy constructor and operator=
+    TQColorDialogPrivate *d;
+    friend class TQColorDialogPrivate;
+    friend class TQColorShower;
+
+#if defined(Q_DISABLE_COPY)
+    TQColorDialog( const TQColorDialog & );
+    TQColorDialog& operator=( const TQColorDialog & );
+#endif
+};
+
+#endif
+
+#endif //TQCOLORDIALOG_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcolordialog-members.html b/doc/html/qcolordialog-members.html new file mode 100644 index 00000000..42b592bd --- /dev/null +++ b/doc/html/qcolordialog-members.html @@ -0,0 +1,356 @@ + + + + + +TQColorDialog Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQColorDialog

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcolordialog.html b/doc/html/qcolordialog.html new file mode 100644 index 00000000..18a6f985 --- /dev/null +++ b/doc/html/qcolordialog.html @@ -0,0 +1,118 @@ + + + + + +TQColorDialog Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQColorDialog Class Reference

+ +

The TQColorDialog class provides a dialog widget for specifying colors. +More... +

#include <qcolordialog.h> +

Inherits TQDialog. +

List of all member functions. +

Static Public Members

+
    +
  • TQColor getColor ( const TQColor & initial = white, TQWidget * parent = 0, const char * name = 0 )
  • +
  • TQRgb getRgba ( TQRgb initial, bool * ok = 0, TQWidget * parent = 0, const char * name = 0 )
  • +
  • int customCount ()
  • +
  • TQRgb customColor ( int i )
  • +
  • void setCustomColor ( int i, TQRgb c )
  • +
  • void setStandardColor ( int i, TQRgb c )
  • +
+

Detailed Description

+ + +The TQColorDialog class provides a dialog widget for specifying colors. + + + +

The color dialog's function is to allow users to choose colors. +For example, you might use this in a drawing program to allow the +user to set the brush color. +

The static functions provide modal color dialogs. + +

The static getColor() function shows the dialog and allows the +user to specify a color. The getRgba() function does the same but +also allows the user to specify a color with an alpha channel +(transparency) value. +

The user can store customCount() different custom colors. The +custom colors are shared by all color dialogs, and remembered +during the execution of the program. Use setCustomColor() to set +the custom colors, and use customColor() to get them. +

See also Dialog Classes and Graphics Classes. + +


Member Function Documentation

+

TQRgb TQColorDialog::customColor ( int i ) [static] +

+Returns custom color number i as a TQRgb. + +

int TQColorDialog::customCount () [static] +

+Returns the number of custom colors supported by TQColorDialog. All +color dialogs share the same custom colors. + +

TQColor TQColorDialog::getColor ( const TQColor & initial = white, TQWidget * parent = 0, const char * name = 0 ) [static] +

+Pops up a modal color dialog, lets the user choose a color, and +returns that color. The color is initially set to initial. The +dialog is a child of parent and is called name. It returns +an invalid (see TQColor::isValid()) color if the user cancels the +dialog. All colors allocated by the dialog will be deallocated +before this function returns. + +

Examples: chart/setdataform.cpp and scribble/scribble.cpp. +

TQRgb TQColorDialog::getRgba ( TQRgb initial, bool * ok = 0, TQWidget * parent = 0, const char * name = 0 ) [static] +

+Pops up a modal color dialog to allow the user to choose a color +and an alpha channel (transparency) value. The color+alpha is +initially set to initial. The dialog is a child of parent +and called name. +

If ok is non-null, *ok is set to TRUE if the user clicked +OK, and to FALSE if the user clicked Cancel. +

If the user clicks Cancel, the initial value is returned. + +

void TQColorDialog::setCustomColor ( int i, TQRgb c ) [static] +

+Sets custom color number i to the TQRgb value c. + +

void TQColorDialog::setStandardColor ( int i, TQRgb c ) [static] +

+Sets standard color number i to the TQRgb value c. + + +

+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/qcolordlg-w.png b/doc/html/qcolordlg-w.png new file mode 100644 index 00000000..ddeb8330 Binary files /dev/null and b/doc/html/qcolordlg-w.png differ diff --git a/doc/html/qcolordrag-members.html b/doc/html/qcolordrag-members.html new file mode 100644 index 00000000..8e7c5171 --- /dev/null +++ b/doc/html/qcolordrag-members.html @@ -0,0 +1,106 @@ + + + + + +TQColorDrag Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQColorDrag

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcolordrag.html b/doc/html/qcolordrag.html new file mode 100644 index 00000000..7a555f3b --- /dev/null +++ b/doc/html/qcolordrag.html @@ -0,0 +1,98 @@ + + + + + +TQColorDrag Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQColorDrag Class Reference

+ +

The TQColorDrag class provides a drag and drop object for +transferring colors. +More... +

#include <qdragobject.h> +

Inherits TQStoredDrag. +

List of all member functions. +

Public Members

+
    +
  • TQColorDrag ( const TQColor & col, TQWidget * dragsource = 0, const char * name = 0 )
  • +
  • TQColorDrag ( TQWidget * dragsource = 0, const char * name = 0 )
  • +
  • void setColor ( const TQColor & col )
  • +
+

Static Public Members

+
    +
  • bool canDecode ( TQMimeSource * e )
  • +
  • bool decode ( TQMimeSource * e, TQColor & col )
  • +
+

Detailed Description

+ + +

The TQColorDrag class provides a drag and drop object for +transferring colors. +

+

This class provides a drag object which can be used to transfer data +about colors for drag and drop and in the clipboard. For example, it +is used in TQColorDialog. +

The color is set in the constructor but can be changed with +setColor(). +

For more information about drag and drop, see the TQDragObject class +and the drag and drop documentation. +

See also Drag And Drop Classes. + +


Member Function Documentation

+

TQColorDrag::TQColorDrag ( const TQColor & col, TQWidget * dragsource = 0, const char * name = 0 ) +

+Constructs a color drag object with the color col. Passes dragsource and name to the TQStoredDrag constructor. + +

TQColorDrag::TQColorDrag ( TQWidget * dragsource = 0, const char * name = 0 ) +

+Constructs a color drag object with a white color. Passes dragsource and name to the TQStoredDrag constructor. + +

bool TQColorDrag::canDecode ( TQMimeSource * e ) [static] +

+Returns TRUE if the color drag object can decode the mime source +e; otherwise returns FALSE. + +

bool TQColorDrag::decode ( TQMimeSource * e, TQColor & col ) [static] +

+Decodes the mime source e and sets the decoded values to col. + +

void TQColorDrag::setColor ( const TQColor & col ) +

+Sets the color of the color drag to col. + + +

+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/qcolorgroup-members.html b/doc/html/qcolorgroup-members.html new file mode 100644 index 00000000..3cfb96f8 --- /dev/null +++ b/doc/html/qcolorgroup-members.html @@ -0,0 +1,71 @@ + + + + + +TQColorGroup Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQColorGroup

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcolorgroup.html b/doc/html/qcolorgroup.html new file mode 100644 index 00000000..07cf10e3 --- /dev/null +++ b/doc/html/qcolorgroup.html @@ -0,0 +1,346 @@ + + + + + +TQColorGroup Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQColorGroup Class Reference

+ +

The TQColorGroup class contains a group of widget colors. +More... +

#include <qpalette.h> +

List of all member functions. +

Public Members

+
    +
  • TQColorGroup ()
  • +
  • TQColorGroup ( const TQColor & foreground, const TQColor & background, const TQColor & light, const TQColor & dark, const TQColor & mid, const TQColor & text, const TQColor & base )  (obsolete)
  • +
  • TQColorGroup ( const TQBrush & foreground, const TQBrush & button, const TQBrush & light, const TQBrush & dark, const TQBrush & mid, const TQBrush & text, const TQBrush & bright_text, const TQBrush & base, const TQBrush & background )
  • +
  • TQColorGroup ( const TQColorGroup & other )
  • +
  • ~TQColorGroup ()
  • +
  • TQColorGroup & operator= ( const TQColorGroup & other )
  • +
  • enum ColorRole { Foreground, Button, Light, Midlight, Dark, Mid, Text, BrightText, ButtonText, Base, Background, Shadow, Highlight, HighlightedText, Link, LinkVisited, NColorRoles }
  • +
  • const TQColor & color ( ColorRole r ) const
  • +
  • const TQBrush & brush ( ColorRole r ) const
  • +
  • void setColor ( ColorRole r, const TQColor & c )
  • +
  • void setBrush ( ColorRole r, const TQBrush & b )
  • +
  • const TQColor & foreground () const
  • +
  • const TQColor & button () const
  • +
  • const TQColor & light () const
  • +
  • const TQColor & dark () const
  • +
  • const TQColor & mid () const
  • +
  • const TQColor & text () const
  • +
  • const TQColor & base () const
  • +
  • const TQColor & background () const
  • +
  • const TQColor & midlight () const
  • +
  • const TQColor & brightText () const
  • +
  • const TQColor & buttonText () const
  • +
  • const TQColor & shadow () const
  • +
  • const TQColor & highlight () const
  • +
  • const TQColor & highlightedText () const
  • +
  • const TQColor & link () const
  • +
  • const TQColor & linkVisited () const
  • +
  • bool operator== ( const TQColorGroup & g ) const
  • +
  • bool operator!= ( const TQColorGroup & g ) const
  • +
+

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQColorGroup & g )
  • +
+

Detailed Description

+ + +The TQColorGroup class contains a group of widget colors. +

+ + +

A color group contains a group of colors used by widgets for +drawing themselves. We recommend that widgets use color group +roles such as "foreground" and "base" rather than literal colors +like "red" or "turquoise". The color roles are enumerated and +defined in the ColorRole documentation. +

The most common use of TQColorGroup is like this: +

+        TQPainter p;
+        ...
+        p.setPen( colorGroup().foreground() );
+        p.drawLine( ... )
+    
+ +

It is also possible to modify color groups or create new color +groups from scratch. +

The color group class can be created using three different +constructors or by modifying one supplied by TQt. The default +constructor creates an all-black color group, which can then be +modified using set functions; there's also a constructor for +specifying all the color group colors. And there is also a copy +constructor. +

We strongly recommend using a system-supplied color group and +modifying that as necessary. +

You modify a color group by calling the access functions +setColor() and setBrush(), depending on whether you want a pure +color or a pixmap pattern. +

There are also corresponding color() and brush() getters, and a +commonly used convenience function to get each ColorRole: +background(), foreground(), base(), etc. +

See also TQColor, TQPalette, TQWidget::colorGroup, Widget Appearance and Style, Graphics Classes, and Image Processing Classes. + +


Member Type Documentation

+

TQColorGroup::ColorRole

+ +

The ColorRole enum defines the different symbolic color roles used +in current GUIs. +

The central roles are: +

    +
  • TQColorGroup::Background - general background color. +
  • TQColorGroup::Foreground - general foreground color. +
  • TQColorGroup::Base - used as background color for text entry widgets, for example; +usually white or another light color. +
  • TQColorGroup::Text - the foreground color used with Base. Usually this +is the same as the Foreground, in which case it must provide good +contrast with Background and Base. +
  • TQColorGroup::Button - general button background color in which buttons need a +background different from Background, as in the Macintosh style. +
  • TQColorGroup::ButtonText - a foreground color used with the Button color. +

There are some color roles used mostly for 3D bevel and shadow +effects: +

    +
  • TQColorGroup::Light - lighter than Button color. +
  • TQColorGroup::Midlight - between Button and Light. +
  • TQColorGroup::Dark - darker than Button. +
  • TQColorGroup::Mid - between Button and Dark. +
  • TQColorGroup::Shadow - a very dark color. +By default, the shadow color is TQt::black. +

All of these are normally derived from Background and used in +ways that depend on that relationship. For example, buttons depend +on it to make the bevels look attractive, and Motif scroll bars +depend on Mid to be slightly different from Background. +

Selected (marked) items have two roles: +

    +
  • TQColorGroup::Highlight - a color to indicate a selected item or the +current item. By default, the highlight color is TQt::darkBlue. +
  • TQColorGroup::HighlightedText - a text color that contrasts with Highlight. +By default, the highlighted text color is TQt::white. +

Finally, there is a special role for text that needs to be +drawn where Text or Foreground would give poor contrast, +such as on pressed push buttons: +

    +
  • TQColorGroup::BrightText - a text color that is very different from Foreground and contrasts well with e.g. Dark. +
  • TQColorGroup::Link - a text color used for unvisited hyperlinks. +By default, the link color is TQt::blue. +
  • TQColorGroup::LinkVisited - a text color used for already visited hyperlinks. +By default, the linkvisited color is TQt::magenta. +
  • TQColorGroup::NColorRoles - Internal. +

Note that text colors can be used for things other than just +words; text colors are usually used for text, but it's tquite +common to use the text color roles for lines, icons, etc. +

This image shows most of the color roles in use: +

Color Roles
+

Member Function Documentation

+

TQColorGroup::TQColorGroup () +

+Constructs a color group with all colors set to black. + +

TQColorGroup::TQColorGroup ( const TQColor & foreground, const TQColor & background, const TQColor & light, const TQColor & dark, const TQColor & mid, const TQColor & text, const TQColor & base ) +

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

Constructs a color group with the specified colors. The button +color will be set to the background color. + +

TQColorGroup::TQColorGroup ( const TQBrush & foreground, const TQBrush & button, const TQBrush & light, const TQBrush & dark, const TQBrush & mid, const TQBrush & text, const TQBrush & bright_text, const TQBrush & base, const TQBrush & background ) +

+Constructs a color group. You can pass either brushes, pixmaps or +plain colors for foreground, button, light, dark, mid, text, bright_text, base and background. +

See also TQBrush. + +

TQColorGroup::TQColorGroup ( const TQColorGroup & other ) +

+Constructs a color group that is an independent copy of other. + +

TQColorGroup::~TQColorGroup () +

+Destroys the color group. + +

const TQColor & TQColorGroup::background () const +

+ +

Returns the background color of the color group. +

See also ColorRole. + +

const TQColor & TQColorGroup::base () const +

+ +

Returns the base color of the color group. +

See also ColorRole. + +

const TQColor & TQColorGroup::brightText () const +

+ +

Returns the bright text foreground color of the color group. +

See also ColorRole. + +

Examples: themes/metal.cpp and themes/wood.cpp. +

const TQBrush & TQColorGroup::brush ( ColorRole r ) const +

+Returns the brush that has been set for color role r. +

See also color(), setBrush(), and ColorRole. + +

Examples: themes/metal.cpp and themes/wood.cpp. +

const TQColor & TQColorGroup::button () const +

+ +

Returns the button color of the color group. +

See also ColorRole. + +

Examples: themes/metal.cpp and themes/wood.cpp. +

const TQColor & TQColorGroup::buttonText () const +

+ +

Returns the button text foreground color of the color group. +

See also ColorRole. + +

Examples: themes/metal.cpp and themes/wood.cpp. +

const TQColor & TQColorGroup::color ( ColorRole r ) const +

+Returns the color that has been set for color role r. +

See also brush() and ColorRole. + +

const TQColor & TQColorGroup::dark () const +

+ +

Returns the dark color of the color group. +

See also ColorRole. + +

Example: themes/wood.cpp. +

const TQColor & TQColorGroup::foreground () const +

+ +

Returns the foreground color of the color group. +

See also ColorRole. + +

Examples: themes/metal.cpp and themes/wood.cpp. +

const TQColor & TQColorGroup::highlight () const +

+ +

Returns the highlight color of the color group. +

See also ColorRole. + +

const TQColor & TQColorGroup::highlightedText () const +

+ +

Returns the highlighted text color of the color group. +

See also ColorRole. + +

const TQColor & TQColorGroup::light () const +

+ +

Returns the light color of the color group. +

See also ColorRole. + +

Example: themes/wood.cpp. +

const TQColor & TQColorGroup::link () const +

+ +

Returns the unvisited link text color of the color group. +

See also ColorRole. + +

const TQColor & TQColorGroup::linkVisited () const +

+ +

Returns the visited link text color of the color group. +

See also ColorRole. + +

const TQColor & TQColorGroup::mid () const +

+ +

Returns the mid color of the color group. +

See also ColorRole. + +

Examples: themes/metal.cpp and themes/wood.cpp. +

const TQColor & TQColorGroup::midlight () const +

+ +

Returns the midlight color of the color group. +

See also ColorRole. + +

bool TQColorGroup::operator!= ( const TQColorGroup & g ) const +

+ +

Returns TRUE if this color group is different from g; otherwise +returns FALSE. +

See also +

TQColorGroup & TQColorGroup::operator= ( const TQColorGroup & other ) +

+Copies the colors of other to this color group. + +

bool TQColorGroup::operator== ( const TQColorGroup & g ) const +

+Returns TRUE if this color group is equal to g; otherwise +returns FALSE. +

See also +

void TQColorGroup::setBrush ( ColorRole r, const TQBrush & b ) +

+Sets the brush used for color role r to b. +

See also brush(), setColor(), and ColorRole. + +

Example: themes/wood.cpp. +

void TQColorGroup::setColor ( ColorRole r, const TQColor & c ) +

+Sets the brush used for color role r to a solid color c. +

See also brush() and ColorRole. + +

Examples: listviews/listviews.cpp, table/statistics/statistics.cpp, and themes/metal.cpp. +

const TQColor & TQColorGroup::shadow () const +

+ +

Returns the shadow color of the color group. +

See also ColorRole. + +

const TQColor & TQColorGroup::text () const +

+ +

Returns the text foreground color of the color group. +

See also ColorRole. + +

Example: listviews/listviews.cpp. +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQColorGroup & g ) +

+ +

Writes color group, g to the stream s. +

See also Format of the TQDataStream operators. + + +


+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/qcombo1-m.png b/doc/html/qcombo1-m.png new file mode 100644 index 00000000..1ca2ea85 Binary files /dev/null and b/doc/html/qcombo1-m.png differ diff --git a/doc/html/qcombo1-w.png b/doc/html/qcombo1-w.png new file mode 100644 index 00000000..fbebfdcb Binary files /dev/null and b/doc/html/qcombo1-w.png differ diff --git a/doc/html/qcombo2-m.png b/doc/html/qcombo2-m.png new file mode 100644 index 00000000..8a675426 Binary files /dev/null and b/doc/html/qcombo2-m.png differ diff --git a/doc/html/qcombo3-m.png b/doc/html/qcombo3-m.png new file mode 100644 index 00000000..e5fe6b33 Binary files /dev/null and b/doc/html/qcombo3-m.png differ diff --git a/doc/html/qcombobox-h.html b/doc/html/qcombobox-h.html new file mode 100644 index 00000000..fcd4dd37 --- /dev/null +++ b/doc/html/qcombobox-h.html @@ -0,0 +1,251 @@ + + + + + +qcombobox.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qcombobox.h

+ +

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


+
+/**********************************************************************
+** $Id: qt/qcombobox.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQComboBox class
+**
+** Created : 950426
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQCOMBOBOX_H
+#define TQCOMBOBOX_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#endif // QT_H
+
+#ifndef QT_NO_COMBOBOX
+
+
+class TQStrList;
+class TQStringList;
+class TQLineEdit;
+class TQValidator;
+class TQListBox;
+class TQComboBoxData;
+class TQWheelEvent;
+
+class Q_EXPORT TQComboBox : public TQWidget
+{
+    Q_OBJECT
+    Q_ENUMS( Policy )
+    Q_PROPERTY( bool editable READ editable WRITE setEditable )
+    Q_PROPERTY( int count READ count )
+    Q_PROPERTY( TQString currentText READ currentText WRITE setCurrentText DESIGNABLE false )
+    Q_PROPERTY( int currentItem READ currentItem WRITE setCurrentItem )
+    Q_PROPERTY( bool autoResize READ autoResize WRITE setAutoResize DESIGNABLE false )
+    Q_PROPERTY( int sizeLimit READ sizeLimit WRITE setSizeLimit )
+    Q_PROPERTY( int maxCount READ maxCount WRITE setMaxCount )
+    Q_PROPERTY( Policy insertionPolicy READ insertionPolicy WRITE setInsertionPolicy )
+    Q_PROPERTY( bool autoCompletion READ autoCompletion WRITE setAutoCompletion )
+    Q_PROPERTY( bool duplicatesEnabled READ duplicatesEnabled WRITE setDuplicatesEnabled )
+    Q_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
+
+public:
+    TQComboBox( TQWidget* parent=0, const char* name=0 );
+    TQComboBox( bool rw, TQWidget* parent=0, const char* name=0 );
+    ~TQComboBox();
+
+    int		count() const;
+
+    void	insertStringList( const TQStringList &, int index=-1 );
+    void	insertStrList( const TQStrList &, int index=-1 );
+    void	insertStrList( const TQStrList *, int index=-1 );
+    void	insertStrList( const char **, int numStrings=-1, int index=-1);
+
+    void	insertItem( const TQString &text, int index=-1 );
+    void	insertItem( const TQPixmap &pixmap, int index=-1 );
+    void	insertItem( const TQPixmap &pixmap, const TQString &text, int index=-1 );
+
+    void	removeItem( int index );
+
+    int		currentItem() const;
+    virtual void setCurrentItem( int index );
+
+    TQString 	currentText() const;
+    virtual void setCurrentText( const TQString& );
+
+    TQString 	text( int index ) const;
+    const TQPixmap *pixmap( int index ) const;
+
+    void	changeItem( const TQString &text, int index );
+    void	changeItem( const TQPixmap &pixmap, int index );
+    void	changeItem( const TQPixmap &pixmap, const TQString &text, int index );
+
+    bool	autoResize()	const;
+    virtual void setAutoResize( bool );
+    TQSize	sizeHint() const;
+
+    void	setPalette( const TQPalette & );
+    void	setFont( const TQFont & );
+    void	setEnabled( bool );
+
+    virtual void setSizeLimit( int );
+    int		sizeLimit() const;
+
+    virtual void setMaxCount( int );
+    int		maxCount() const;
+
+    enum Policy { NoInsertion, AtTop, AtCurrent, AtBottom,
+		  AfterCurrent, BeforeCurrent };
+
+    virtual void setInsertionPolicy( Policy policy );
+    Policy	insertionPolicy() const;
+
+    virtual void setValidator( const TQValidator * );
+    const TQValidator * validator() const;
+
+    virtual void setListBox( TQListBox * );
+    TQListBox *	listBox() const;
+
+    virtual void setLineEdit( TQLineEdit *edit );
+    TQLineEdit*	lineEdit() const;
+
+    virtual void setAutoCompletion( bool );
+    bool	autoCompletion() const;
+
+    bool	eventFilter( TQObject *object, TQEvent *event );
+
+    void	setDuplicatesEnabled( bool enable );
+    bool	duplicatesEnabled() const;
+
+    bool	editable() const;
+    void	setEditable( bool );
+
+    virtual void popup();
+
+    void	hide();
+
+public slots:
+    void	clear();
+    void	clearValidator();
+    void	clearEdit();
+    virtual void setEditText( const TQString &);
+
+signals:
+    void	activated( int index );
+    void	highlighted( int index );
+    void	activated( const TQString &);
+    void	highlighted( const TQString &);
+    void	textChanged( const TQString &);
+
+private slots:
+    void	internalActivate( int );
+    void	internalHighlight( int );
+    void	internalClickTimeout();
+    void	returnPressed();
+
+protected:
+    void	paintEvent( TQPaintEvent * );
+    void	resizeEvent( TQResizeEvent * );
+    void	mousePressEvent( TQMouseEvent * );
+    void	mouseMoveEvent( TQMouseEvent * );
+    void	mouseReleaseEvent( TQMouseEvent * );
+    void	mouseDoubleClickEvent( TQMouseEvent * );
+    void	keyPressEvent( TQKeyEvent *e );
+    void	focusInEvent( TQFocusEvent *e );
+    void	focusOutEvent( TQFocusEvent *e );
+#ifndef QT_NO_WHEELEVENT
+    void	wheelEvent( TQWheelEvent *e );
+#endif
+    void	styleChange( TQStyle& );
+
+    void	updateMask();
+
+private:
+    void	setUpListBox();
+    void	setUpLineEdit();
+    void	popDownListBox();
+    void	reIndex();
+    void	currentChanged();
+    int		completionIndex( const TQString &, int ) const;
+
+    TQComboBoxData	*d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQComboBox( const TQComboBox & );
+    TQComboBox &operator=( const TQComboBox & );
+#endif
+};
+
+
+#endif // QT_NO_COMBOBOX
+
+#endif // TQCOMBOBOX_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcombobox-members.html b/doc/html/qcombobox-members.html new file mode 100644 index 00000000..4b2f2222 --- /dev/null +++ b/doc/html/qcombobox-members.html @@ -0,0 +1,378 @@ + + + + + +TQComboBox Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQComboBox

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcombobox.html b/doc/html/qcombobox.html new file mode 100644 index 00000000..5697138f --- /dev/null +++ b/doc/html/qcombobox.html @@ -0,0 +1,602 @@ + + + + + +TQComboBox Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQComboBox Class Reference

+ +

The TQComboBox widget is a combined button and popup list. +More... +

#include <qcombobox.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • bool autoCompletion - whether auto-completion is enabled
  • +
  • bool autoMask - whether the combobox is automatically masked  (read only)
  • +
  • bool autoResize - whether auto resize is enabled  (obsolete)
  • +
  • int count - the number of items in the combobox  (read only)
  • +
  • int currentItem - the index of the current item in the combobox
  • +
  • TQString currentText - the text of the combobox's current item
  • +
  • bool duplicatesEnabled - whether duplicates are allowed
  • +
  • bool editable - whether the combobox is editable
  • +
  • Policy insertionPolicy - the position of the items inserted by the user
  • +
  • int maxCount - the maximum number of items allowed in the combobox
  • +
  • int sizeLimit - the maximum on-screen size of the combobox
  • +
+

Detailed Description

+ + +The TQComboBox widget is a combined button and popup list. +

+ +

A combobox is a selection widget which displays the current item +and can pop up a list of items. A combobox may be editable in +which case the user can enter arbitrary strings. +

Comboboxes provide a means of showing the user's current choice +out of a list of options in a way that takes up the minimum amount +of screen space. +

TQComboBox supports three different display styles: Aqua/Motif 1.x, +Motif 2.0 and Windows. In Motif 1.x, a combobox was called +XmOptionMenu. In Motif 2.0, OSF introduced an improved combobox +and named that XmComboBox. TQComboBox provides both. +

TQComboBox provides two different constructors. The simplest +constructor creates an "old-style" combobox in Motif (or Aqua) +style: +

+        TQComboBox *c = new TQComboBox( this, "read-only combobox" );
+    
+ +

The other constructor creates a new-style combobox in Motif style, +and can create both read-only and editable comboboxes: +

+        TQComboBox *c1 = new TQComboBox( FALSE, this, "read-only combobox" );
+        TQComboBox *c2 = new TQComboBox( TRUE, this, "editable combobox" );
+    
+ +

New-style comboboxes use a list box in both Motif and Windows +styles, and both the content size and the on-screen size of the +list box can be limited with sizeLimit() and setMaxCount() +respectively. Old-style comboboxes use a popup in Aqua and Motif +style, and that popup will happily grow larger than the desktop if +you put enough data into it. +

The two constructors create identical-looking comboboxes in +Windows style. +

Comboboxes can contain pixmaps as well as strings; the +insertItem() and changeItem() functions are suitably overloaded. +For editable comboboxes, the function clearEdit() is provided, +to clear the displayed string without changing the combobox's +contents. +

A combobox emits two signals, activated() and highlighted(), when +a new item has been activated (selected) or highlighted (made +current). Both signals exist in two versions, one with a TQString argument and one with an int argument. If the user +highlights or activates a pixmap, only the int signals are +emitted. Whenever the text of an editable combobox is changed the +textChanged() signal is emitted. +

When the user enters a new string in an editable combobox, the +widget may or may not insert it, and it can insert it in several +locations. The default policy is is AtBottom but you can change +this using setInsertionPolicy(). +

It is possible to constrain the input to an editable combobox +using TQValidator; see setValidator(). By default, any input is +accepted. +

If the combobox is not editable then it has a default +focusPolicy() of TabFocus, i.e. it will not grab focus if +clicked. This differs from both Windows and Motif. If the combobox +is editable then it has a default focusPolicy() of StrongFocus, +i.e. it will grab focus if clicked. +

A combobox can be populated using the insert functions, +insertStringList() and insertItem() for example. Items can be +changed with changeItem(). An item can be removed with +removeItem() and all items can be removed with clear(). The text +of the current item is returned by currentText(), and the text of +a numbered item is returned with text(). The current item can be +set with setCurrentItem() or setCurrentText(). The number of items +in the combobox is returned by count(); the maximum number of +items can be set with setMaxCount(). You can allow editing using +setEditable(). For editable comboboxes you can set auto-completion +using setAutoCompletion() and whether or not the user can add +duplicates is set with setDuplicatesEnabled(). +

(Motif 1, read-only)
+(Motif 2, editable)
+(Motif 2, read-only)
+(Windows style) +

Depending on the style, TQComboBox will use a TQListBox or a +TQPopupMenu to display the list of items. See setListBox() for +more information. +

See also TQLineEdit, TQListBox, TQSpinBox, TQRadioButton, TQButtonGroup, GUI Design Handbook: Combo Box, GUI Design Handbook: Drop-Down List Box, and Basic Widgets. + +


Member Type Documentation

+

TQComboBox::Policy

+ +

This enum specifies what the TQComboBox should do when a new string +is entered by the user. +

    +
  • TQComboBox::NoInsertion - the string will not be inserted into the +combobox. +
  • TQComboBox::AtTop - insert the string as the first item in the combobox. +
  • TQComboBox::AtCurrent - replace the previously selected item with the +string the user has entered. +
  • TQComboBox::AtBottom - insert the string as the last item in the +combobox. +
  • TQComboBox::AfterCurrent - insert the string after the previously +selected item. +
  • TQComboBox::BeforeCurrent - insert the string before the previously +selected item. +

activated() is always emitted when the string is entered. +

If inserting the new string would cause the combobox to breach its +content size limit, the item at the other end of the list is +deleted. The definition of "other end" is +implementation-dependent. + +


Member Function Documentation

+

TQComboBox::TQComboBox ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a combobox widget with parent parent called name. +

This constructor creates a popup list if the program uses Motif +(or Aqua) look and feel; this is compatible with Motif 1.x and +Aqua. +

Note: If you use this constructor to create your TQComboBox, then +the pixmap() function will always return 0. To workaround this, +use the other constructor. +

+

TQComboBox::TQComboBox ( bool rw, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a combobox with a maximum size and either Motif 2.0 or +Windows look and feel. +

The input field can be edited if rw is TRUE, otherwise the user +may only choose one of the items in the combobox. +

The parent and name arguments are passed on to the TQWidget +constructor. + +

TQComboBox::~TQComboBox () +

+Destroys the combobox. + +

void TQComboBox::activated ( int index ) [signal] +

+ +

This signal is emitted when a new item has been activated +(selected). The index is the position of the item in the +combobox. +

This signal is not emitted if the item is changed +programmatically, e.g. using setCurrentItem(). + +

Examples: fileiconview/mainwindow.cpp, helpviewer/helpwindow.cpp, lineedits/lineedits.cpp, listboxcombo/listboxcombo.cpp, and qmag/qmag.cpp. +

void TQComboBox::activated ( const TQString & string ) [signal] +

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

This signal is emitted when a new item has been activated +(selected). string is the selected string. +

You can also use the activated(int) signal, but be aware that its +argument is meaningful only for selected strings, not for user +entered strings. + +

bool TQComboBox::autoCompletion () const +

Returns TRUE if auto-completion is enabled; otherwise returns FALSE. +See the "autoCompletion" property for details. +

bool TQComboBox::autoResize () const +

Returns TRUE if auto resize is enabled; otherwise returns FALSE. +See the "autoResize" property for details. +

void TQComboBox::changeItem ( const TQString & t, int index ) +

+Replaces the item at position index with the text t. + +

void TQComboBox::changeItem ( const TQPixmap & im, int index ) +

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

Replaces the item at position index with the pixmap im, +unless the combobox is editable. +

See also insertItem(). + +

void TQComboBox::changeItem ( const TQPixmap & im, const TQString & t, int index ) +

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

Replaces the item at position index with the pixmap im and +the text t. +

See also insertItem(). + +

void TQComboBox::clear () [slot] +

+Removes all combobox items. + +

void TQComboBox::clearEdit () [slot] +

+Clears the line edit without changing the combobox's contents. +Does nothing if the combobox isn't editable. +

This is particularly useful when using a combobox as a line edit +with history. For example you can connect the combobox's +activated() signal to clearEdit() in order to present the user +with a new, empty line as soon as Enter is pressed. +

See also setEditText(). + +

void TQComboBox::clearValidator () [slot] +

+This slot is equivalent to setValidator( 0 ). + +

int TQComboBox::count () const +

Returns the number of items in the combobox. +See the "count" property for details. +

int TQComboBox::currentItem () const +

Returns the index of the current item in the combobox. +See the "currentItem" property for details. +

TQString TQComboBox::currentText () const +

Returns the text of the combobox's current item. +See the "currentText" property for details. +

bool TQComboBox::duplicatesEnabled () const +

Returns TRUE if duplicates are allowed; otherwise returns FALSE. +See the "duplicatesEnabled" property for details. +

bool TQComboBox::editable () const +

Returns TRUE if the combobox is editable; otherwise returns FALSE. +See the "editable" property for details. +

void TQComboBox::highlighted ( int index ) [signal] +

+ +

This signal is emitted when a new item has been set to be the +current item. The index is the position of the item in the +combobox. +

This signal is not emitted if the item is changed +programmatically, e.g. using setCurrentItem(). + +

void TQComboBox::highlighted ( const TQString & string ) [signal] +

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

This signal is emitted when a new item has been set to be the +current item. string is the item's text. +

You can also use the highlighted(int) signal. + +

void TQComboBox::insertItem ( const TQString & t, int index = -1 ) +

+Inserts a text item with text t, at position index. The item +will be appended if index is negative. + +

Examples: chart/optionsform.cpp, fileiconview/mainwindow.cpp, helpviewer/helpwindow.cpp, lineedits/lineedits.cpp, listboxcombo/listboxcombo.cpp, regexptester/regexptester.cpp, and tictac/tictac.cpp. +

void TQComboBox::insertItem ( const TQPixmap & pixmap, int index = -1 ) +

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

Inserts a pixmap item at position index. The item will be +appended if index is negative. + +

void TQComboBox::insertItem ( const TQPixmap & pixmap, const TQString & text, int index = -1 ) +

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

Inserts a pixmap item with additional text text at position +index. The item will be appended if index is negative. + +

void TQComboBox::insertStrList ( const char ** strings, int numStrings = -1, int index = -1 ) +

+Inserts the array of char * strings at position index in the +combobox. +

The numStrings argument is the number of strings. If numStrings is -1 (default), the strings array must be +terminated with 0. +

Example: +

+        static const char* items[] = { "red", "green", "blue", 0 };
+        combo->insertStrList( items );
+    
+ +

See also insertStringList(). + +

Example: qmag/qmag.cpp. +

void TQComboBox::insertStrList ( const TQStrList & list, int index = -1 ) +

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

Inserts the list of strings at position index in the +combobox. +

This is only for compatibility since it does not support Unicode +strings. See insertStringList(). + +

void TQComboBox::insertStrList ( const TQStrList * list, int index = -1 ) +

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

Inserts the list of strings at position index in the +combobox. +

This is only for compatibility since it does not support Unicode +strings. See insertStringList(). + +

void TQComboBox::insertStringList ( const TQStringList & list, int index = -1 ) +

+Inserts the list of strings at position index in the +combobox. + +

Policy TQComboBox::insertionPolicy () const +

Returns the position of the items inserted by the user. +See the "insertionPolicy" property for details. +

TQLineEdit * TQComboBox::lineEdit () const +

+Returns the line edit, or 0 if there is no line edit. +

Only editable listboxes have a line editor. + +

TQListBox * TQComboBox::listBox () const +

+Returns the current list box, or 0 if there is no list box. +(TQComboBox can use TQPopupMenu instead of TQListBox.) Provided to +match setListBox(). +

See also setListBox(). + +

Example: listboxcombo/listboxcombo.cpp. +

int TQComboBox::maxCount () const +

Returns the maximum number of items allowed in the combobox. +See the "maxCount" property for details. +

const TQPixmap * TQComboBox::pixmap ( int index ) const +

+Returns the pixmap item at position index, or 0 if the item is +not a pixmap. + +

void TQComboBox::popup () [virtual] +

+Pops up the combobox popup list. +

If the list is empty, no items appear. + +

void TQComboBox::removeItem ( int index ) +

+Removes the item at position index. + +

void TQComboBox::setAutoCompletion ( bool ) [virtual] +

Sets whether auto-completion is enabled. +See the "autoCompletion" property for details. +

void TQComboBox::setAutoResize ( bool ) [virtual] +

Sets whether auto resize is enabled. +See the "autoResize" property for details. +

void TQComboBox::setCurrentItem ( int index ) [virtual] +

Sets the index of the current item in the combobox to index. +See the "currentItem" property for details. +

void TQComboBox::setCurrentText ( const TQString & ) [virtual] +

Sets the text of the combobox's current item. +See the "currentText" property for details. +

void TQComboBox::setDuplicatesEnabled ( bool enable ) +

Sets whether duplicates are allowed to enable. +See the "duplicatesEnabled" property for details. +

void TQComboBox::setEditText ( const TQString & newText ) [virtual slot] +

+Sets the text in the line edit to newText without changing the +combobox's contents. Does nothing if the combobox isn't editable. +

This is useful e.g. for providing a good starting point for the +user's editing and entering the change in the combobox only when +the user presses Enter. +

See also clearEdit() and insertItem(). + +

void TQComboBox::setEditable ( bool ) +

Sets whether the combobox is editable. +See the "editable" property for details. +

void TQComboBox::setFont ( const TQFont & font ) [virtual] +

+Sets the font for both the combobox button and the combobox popup +list to font. + +

Reimplemented from TQWidget. +

void TQComboBox::setInsertionPolicy ( Policy policy ) [virtual] +

Sets the position of the items inserted by the user to policy. +See the "insertionPolicy" property for details. +

void TQComboBox::setLineEdit ( TQLineEdit * edit ) [virtual] +

+Sets the line edit to use edit instead of the current line edit. + +

void TQComboBox::setListBox ( TQListBox * newListBox ) [virtual] +

+Sets the combobox to use newListBox instead of the current list +box or popup. As a side effect, it clears the combobox of its +current contents. +

Warning: TQComboBox assumes that newListBox->text(n) returns +non-null for 0 <= n < newListbox->count(). This assumption is +necessary because of the line edit in TQComboBox. + +

void TQComboBox::setMaxCount ( int ) [virtual] +

Sets the maximum number of items allowed in the combobox. +See the "maxCount" property for details. +

void TQComboBox::setPalette ( const TQPalette & palette ) [virtual] +

+Sets the palette for both the combobox button and the combobox +popup list to palette. + +

Reimplemented from TQWidget. +

void TQComboBox::setSizeLimit ( int ) [virtual] +

Sets the maximum on-screen size of the combobox. +See the "sizeLimit" property for details. +

void TQComboBox::setValidator ( const TQValidator * v ) [virtual] +

+Applies the validator v to the combobox so that only text which +is valid according to v is accepted. +

This function does nothing if the combobox is not editable. +

See also validator(), clearValidator(), and TQValidator. + +

int TQComboBox::sizeLimit () const +

Returns the maximum on-screen size of the combobox. +See the "sizeLimit" property for details. +

TQString TQComboBox::text ( int index ) const +

+Returns the text item at position index, or TQString::null if +the item is not a string. +

See also currentText. + +

Examples: fileiconview/mainwindow.cpp and helpviewer/helpwindow.cpp. +

void TQComboBox::textChanged ( const TQString & string ) [signal] +

+ +

This signal is used for editable comboboxes. It is emitted +whenever the contents of the text entry field changes. string +contains the new text. + +

const TQValidator * TQComboBox::validator () const +

+Returns the validator which constrains editing for this combobox +if there is one; otherwise returns 0. +

See also setValidator(), clearValidator(), and TQValidator. + +


Property Documentation

+

bool autoCompletion

+

This property holds whether auto-completion is enabled. +

This property can only be set for editable comboboxes, for +non-editable comboboxes it has no effect. It is FALSE by default. + +

Set this property's value with setAutoCompletion() and get this property's value with autoCompletion(). +

bool autoMask

+

This property holds whether the combobox is automatically masked. +

See also TQWidget::autoMask. + +

bool autoResize

This property holds whether auto resize is enabled. +

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

If this property is set to TRUE then the combobox will resize itself +whenever its contents change. The default is FALSE. + +

Set this property's value with setAutoResize() and get this property's value with autoResize(). +

int count

+

This property holds the number of items in the combobox. +

+

Get this property's value with count(). +

int currentItem

+

This property holds the index of the current item in the combobox. +

Note that the activated() and highlighted() signals are only +emitted when the user changes the current item, not when it is +changed programmatically. + +

Set this property's value with setCurrentItem() and get this property's value with currentItem(). +

TQString currentText

+

This property holds the text of the combobox's current item. +

+

Set this property's value with setCurrentText() and get this property's value with currentText(). +

bool duplicatesEnabled

+

This property holds whether duplicates are allowed. +

If the combobox is editable and the user enters some text in the +combobox's lineedit and presses Enter (and the insertionPolicy() +is not NoInsertion), then what happens is this: +

    +
  • If the text is not already in the list, the text is inserted. +
  • If the text is in the list and this property is TRUE (the +default), the text is inserted. +
  • If the text is in the list and this property is FALSE, the text +is not inserted; instead the item which has matching text becomes +the current item. +
+

This property only affects user-interaction. You can use +insertItem() to insert duplicates if you wish regardless of this +setting. + +

Set this property's value with setDuplicatesEnabled() and get this property's value with duplicatesEnabled(). +

bool editable

+

This property holds whether the combobox is editable. +

This property's default is FALSE. Note that the combobox will be +cleared if this property is set to TRUE for a 1.x Motif style +combobox. To avoid this, use setEditable() before inserting any +items. Also note that the 1.x version of Motif didn't have any +editable comboboxes, so the combobox will change it's appearance +to a 2.0 style Motif combobox is it is set to be editable. + +

Set this property's value with setEditable() and get this property's value with editable(). +

Policy insertionPolicy

+

This property holds the position of the items inserted by the user. +

The default insertion policy is AtBottom. See Policy. + +

Set this property's value with setInsertionPolicy() and get this property's value with insertionPolicy(). +

int maxCount

+

This property holds the maximum number of items allowed in the combobox. +

+

Set this property's value with setMaxCount() and get this property's value with maxCount(). +

int sizeLimit

+

This property holds the maximum on-screen size of the combobox. +

This property is ignored for both Motif 1.x style and non-editable +comboboxes in Mac style. The default limit is ten +lines. If the number of items in the combobox is or grows larger +than lines, a scrollbar is added. + +

Set this property's value with setSizeLimit() and get this property's value with sizeLimit(). + +


+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/qcombotableitem-members.html b/doc/html/qcombotableitem-members.html new file mode 100644 index 00000000..85a14c52 --- /dev/null +++ b/doc/html/qcombotableitem-members.html @@ -0,0 +1,81 @@ + + + + + +TQComboTableItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQComboTableItem

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcombotableitem.html b/doc/html/qcombotableitem.html new file mode 100644 index 00000000..f88fd505 --- /dev/null +++ b/doc/html/qcombotableitem.html @@ -0,0 +1,179 @@ + + + + + +TQComboTableItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQComboTableItem Class Reference
[table module]

+ +

The TQComboTableItem class provides a means of using +comboboxes in TQTables. +More... +

#include <qtable.h> +

Inherits TQTableItem. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQComboTableItem class provides a means of using +comboboxes in TQTables. + +

+ +

A TQComboTableItem is a table item which looks and behaves like a +combobox. The advantage of using TQComboTableItems rather than real +comboboxes is that a TQComboTableItem uses far less resources than +real comboboxes in TQTables. When the cell has the focus it +displays a real combobox which the user can interact with. When +the cell does not have the focus the cell looks like a +combobox. Only text items (i.e. no pixmaps) may be used in +TQComboTableItems. +

TQComboTableItem items have the edit type WhenCurrent (see +EditType). The TQComboTableItem's list of items is provided by +a TQStringList passed to the constructor. +

The list of items may be changed using setStringList(). The +current item can be set with setCurrentItem() and retrieved with +currentItem(). The text of the current item can be obtained with +currentText(), and the text of a particular item can be retrieved +with text(). +

If isEditable() is TRUE the TQComboTableItem will permit the user +to either choose an existing list item, or create a new list item +by entering their own text; otherwise the user may only choose one +of the existing list items. +

To populate a table cell with a TQComboTableItem use +TQTable::setItem(). +

TQComboTableItems may be deleted with TQTable::clearCell(). +

TQComboTableItems can be distinguished from TQTableItems and +TQCheckTableItems using their Run Time Type Identification +number (see rtti()). +

Table Items
+

See also TQCheckTableItem, TQTableItem, TQComboBox, and Advanced Widgets. + +


Member Function Documentation

+

TQComboTableItem::TQComboTableItem ( TQTable * table, const TQStringList & list, bool editable = FALSE ) +

+Creates a combo table item for the table table. The combobox's +list of items is passed in the list argument. If editable is +TRUE the user may type in new list items; if editable is FALSE +the user may only select from the list of items provided. +

By default TQComboTableItems cannot be replaced by other table +items since isReplaceable() returns FALSE by default. +

See also TQTable::clearCell() and EditType. + +

TQComboTableItem::~TQComboTableItem () +

+TQComboTableItem destructor. + +

int TQComboTableItem::count () const +

+Returns the total number of list items in the combo table item. + +

int TQComboTableItem::currentItem () const +

+Returns the index of the combo table item's current list item. +

See also setCurrentItem(). + +

TQString TQComboTableItem::currentText () const +

+Returns the text of the combo table item's current list item. +

See also currentItem() and text(). + +

bool TQComboTableItem::isEditable () const +

+Returns TRUE if the user can add their own list items to the +combobox's list of items; otherwise returns FALSE. +

See also setEditable(). + +

int TQComboTableItem::rtti () const [virtual] +

+ +

Returns 1. +

Make your derived classes return their own values for rtti()to +distinguish between different table item subclasses. You should +use values greater than 1000, preferably a large random number, to +allow for extensions to this class. +

See also TQTableItem::rtti(). + +

Reimplemented from TQTableItem. +

void TQComboTableItem::setCurrentItem ( int i ) [virtual] +

+Sets the list item i to be the combo table item's current list +item. +

See also currentItem(). + +

Example: table/small-table-demo/main.cpp. +

void TQComboTableItem::setCurrentItem ( const TQString & s ) [virtual] +

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

Sets the list item whose text is s to be the combo table item's +current list item. Does nothing if no list item has the text s. +

See also currentItem(). + +

void TQComboTableItem::setEditable ( bool b ) [virtual] +

+If b is TRUE the combo table item can be edited, i.e. the user +may enter a new text item themselves. If b is FALSE the user may +may only choose one of the existing items. +

See also isEditable(). + +

void TQComboTableItem::setStringList ( const TQStringList & l ) [virtual] +

+Sets the list items of this TQComboTableItem to the strings in the +string list l. + +

TQString TQComboTableItem::text ( int i ) const +

+Returns the text of the combo's list item at index i. +

See also currentText(). + + +


+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/qcommonstyle-h.html b/doc/html/qcommonstyle-h.html new file mode 100644 index 00000000..34638c1c --- /dev/null +++ b/doc/html/qcommonstyle-h.html @@ -0,0 +1,182 @@ + + + + + +qcommonstyle.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qcommonstyle.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qcommonstyle.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQCommonStyle class
+**
+** Created : 980616
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQCOMMONSTYLE_H
+#define TQCOMMONSTYLE_H
+
+#ifndef QT_H
+#include "qstyle.h"
+#endif // QT_H
+
+#ifndef QT_NO_STYLE
+
+class Q_EXPORT TQCommonStyle: public TQStyle
+{
+    Q_OBJECT
+
+public:
+    TQCommonStyle();
+    ~TQCommonStyle();
+
+    void drawPrimitive( PrimitiveElement pe,
+			TQPainter *p,
+			const TQRect &r,
+			const TQColorGroup &cg,
+			SFlags flags = Style_Default,
+			const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawControl( ControlElement element,
+		      TQPainter *p,
+		      const TQWidget *widget,
+		      const TQRect &r,
+		      const TQColorGroup &cg,
+		      SFlags how = Style_Default,
+		      const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawControlMask( ControlElement element,
+			  TQPainter *p,
+			  const TQWidget *widget,
+			  const TQRect &r,
+			  const TQStyleOption& = TQStyleOption::Default ) const;
+
+    TQRect subRect( SubRect r, const TQWidget *widget ) const;
+
+    void drawComplexControl( ComplexControl control,
+			     TQPainter *p,
+			     const TQWidget *widget,
+			     const TQRect &r,
+			     const TQColorGroup &cg,
+			     SFlags how = Style_Default,
+#ifdef Q_QDOC
+			     SCFlags sub = SC_All,
+#else
+			     SCFlags sub = (uint)SC_All,
+#endif
+			     SCFlags subActive = SC_None,
+			     const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawComplexControlMask( ComplexControl control,
+				 TQPainter *p,
+				 const TQWidget *widget,
+				 const TQRect &r,
+				 const TQStyleOption& = TQStyleOption::Default ) const;
+
+    TQRect querySubControlMetrics( ComplexControl control,
+				  const TQWidget *widget,
+				  SubControl sc,
+				  const TQStyleOption& = TQStyleOption::Default ) const;
+
+    SubControl querySubControl( ComplexControl control,
+				const TQWidget *widget,
+				const TQPoint &pos,
+				const TQStyleOption& = TQStyleOption::Default ) const;
+
+    int pixelMetric( PixelMetric m, const TQWidget *widget = 0 ) const;
+
+    TQSize sizeFromContents( ContentsType s,
+			    const TQWidget *widget,
+			    const TQSize &contentsSize,
+			    const TQStyleOption& = TQStyleOption::Default ) const;
+
+    int styleHint(StyleHint sh, const TQWidget *, const TQStyleOption &, TQStyleHintReturn *) const;
+
+    TQPixmap stylePixmap( StylePixmap sp,
+			 const TQWidget *widget = 0,
+			 const TQStyleOption& = TQStyleOption::Default ) const;
+
+
+private:
+    // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQCommonStyle( const TQCommonStyle & );
+    TQCommonStyle &operator=( const TQCommonStyle & );
+#endif
+};
+
+
+
+#endif // QT_NO_STYLE
+
+#endif // TQCOMMONSTYLE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcommonstyle-members.html b/doc/html/qcommonstyle-members.html new file mode 100644 index 00000000..da95ee5e --- /dev/null +++ b/doc/html/qcommonstyle-members.html @@ -0,0 +1,110 @@ + + + + + +TQCommonStyle Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCommonStyle

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcommonstyle.html b/doc/html/qcommonstyle.html new file mode 100644 index 00000000..280cb42e --- /dev/null +++ b/doc/html/qcommonstyle.html @@ -0,0 +1,70 @@ + + + + + +TQCommonStyle Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCommonStyle Class Reference

+ +

The TQCommonStyle class encapsulates the common Look and Feel of a GUI. +More... +

#include <qcommonstyle.h> +

Inherits TQStyle. +

Inherited by TQMotifStyle and TQWindowsStyle. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQCommonStyle class encapsulates the common Look and Feel of a GUI. +

+

This abstract class implements some of the widget's look and feel +that is common to all GUI styles provided and shipped as part of +TQt. +

All the functions are documented in TQStyle. +

See also Widget Appearance and Style. + +


Member Function Documentation

+

TQCommonStyle::TQCommonStyle () +

+Constructs a TQCommonStyle. + + +

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


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

Complete Member List for TQConstString

+ +

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

+ +


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

TQConstString Class Reference

+ +

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

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

+

#include <qstring.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

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

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

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

See also Text Related Classes. + +


Member Function Documentation

+

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

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

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

TQConstString::~TQConstString () +

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

const TQString & TQConstString::string () const +

+ +

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


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


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcontextmenuevent-members.html b/doc/html/qcontextmenuevent-members.html new file mode 100644 index 00000000..20204299 --- /dev/null +++ b/doc/html/qcontextmenuevent-members.html @@ -0,0 +1,62 @@ + + + + + +TQContextMenuEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQContextMenuEvent

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcontextmenuevent.html b/doc/html/qcontextmenuevent.html new file mode 100644 index 00000000..509cdc37 --- /dev/null +++ b/doc/html/qcontextmenuevent.html @@ -0,0 +1,223 @@ + + + + + +TQContextMenuEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQContextMenuEvent Class Reference

+ +

The TQContextMenuEvent class contains parameters that describe a context menu event. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQContextMenuEvent class contains parameters that describe a context menu event. +

+

Context menu events are sent to widgets when a user triggers a +context menu. What triggers this is platform dependent. For +example, on Windows, pressing the menu button or releasing the +right mouse button will cause this event to be sent. +

When this event occurs it is customary to show a TQPopupMenu with a +context menu, if this is relevant to the context. +

Context menu events contain a special accept flag that indicates +whether the receiver accepted the event. If the event handler does +not accept the event, then whatever triggered the event will be +handled as a regular input event if possible. +

See also TQPopupMenu and Event Classes. + +


Member Type Documentation

+

TQContextMenuEvent::Reason

+ +

This enum describes the reason the ContextMenuEvent was sent. The +values are: +

    +
  • TQContextMenuEvent::Mouse - The mouse caused the event to be sent. Normally this +means the right mouse button was clicked, but this is platform +specific. +
  • TQContextMenuEvent::Keyboard - The keyboard caused this event to be sent. On +Windows this means the menu button was pressed. +
  • TQContextMenuEvent::Other - The event was sent by some other means (i.e. not by +the mouse or keyboard). +
+

Member Function Documentation

+

TQContextMenuEvent::TQContextMenuEvent ( Reason reason, const TQPoint & pos, const TQPoint & globalPos, int state ) +

+ +

Constructs a context menu event object with the accept parameter +flag set to FALSE. +

The reason parameter must be TQContextMenuEvent::Mouse or TQContextMenuEvent::Keyboard. +

The pos parameter specifies the mouse position relative to the +receiving widget. globalPos is the mouse position in absolute +coordinates. state is the ButtonState at the time of the event. + +

TQContextMenuEvent::TQContextMenuEvent ( Reason reason, const TQPoint & pos, int state ) +

+ +

Constructs a context menu event object with the accept parameter +flag set to FALSE. +

The reason parameter must be TQContextMenuEvent::Mouse or TQContextMenuEvent::Keyboard. +

The pos parameter specifies the mouse position relative to the +receiving widget. state is the ButtonState at the time of the +event. +

The globalPos() is initialized to TQCursor::pos(), which may not be +appropriate. Use the other constructor to specify the global +position explicitly. + +

void TQContextMenuEvent::accept () +

+ +

Sets the accept flag of the context event object. +

Setting the accept flag indicates that the receiver of this event +has processed the event. Processing the event means you did +something with it and it will be implicitly consumed. +

The accept flag is not set by default. +

See also ignore() and consume(). + +

void TQContextMenuEvent::consume () +

+ +

Sets the consume flag of the context event object. +

Setting the consume flag indicates that the receiver of this event +does not want the event to be propagated further (i.e. not sent to +parent classes.) +

The consumed flag is not set by default. +

See also ignore() and accept(). + +

const TQPoint & TQContextMenuEvent::globalPos () const +

+ +

Returns the global position of the mouse pointer at the time of +the event. +

See also x(), y(), and pos(). + +

int TQContextMenuEvent::globalX () const +

+ +

Returns the global x-position of the mouse pointer at the time of +the event. +

See also globalY() and globalPos(). + +

int TQContextMenuEvent::globalY () const +

+ +

Returns the global y-position of the mouse pointer at the time of +the event. +

See also globalX() and globalPos(). + +

void TQContextMenuEvent::ignore () +

+ +

Clears the accept flag of the context event object. +

Clearing the accept flag indicates that the receiver of this event +does not need to show a context menu. This will implicitly remove +the consumed flag as well. +

The accept flag is not set by default. +

See also accept() and consume(). + +

bool TQContextMenuEvent::isAccepted () const +

+ +

Returns TRUE if the receiver has processed the event; otherwise +returns FALSE. +

See also accept(), ignore(), and consume(). + +

bool TQContextMenuEvent::isConsumed () const +

+ +

Returns TRUE (which stops propagation of the event) if the +receiver has blocked the event; otherwise returns FALSE. +

See also accept(), ignore(), and consume(). + +

const TQPoint & TQContextMenuEvent::pos () const +

+ +

Returns the position of the mouse pointer relative to the widget +that received the event. +

See also x(), y(), and globalPos(). + +

Reason TQContextMenuEvent::reason () const +

+ +

Returns the reason for this context event. + +

ButtonState TQContextMenuEvent::state () const +

+ +

Returns the button state (a combination of mouse buttons and +keyboard modifiers), i.e. what buttons and keys were being +pressed immediately before the event was generated. +

The returned value is LeftButton, RightButton, MidButton, +ShiftButton, ControlButton and AltButton OR'ed together. + +

int TQContextMenuEvent::x () const +

+ +

Returns the x-position of the mouse pointer, relative to the +widget that received the event. +

See also y() and pos(). + +

int TQContextMenuEvent::y () const +

+ +

Returns the y-position of the mouse pointer, relative to the +widget that received the event. +

See also x() and pos(). + + +


+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/qcopchannel-members.html b/doc/html/qcopchannel-members.html new file mode 100644 index 00000000..a5cea093 --- /dev/null +++ b/doc/html/qcopchannel-members.html @@ -0,0 +1,95 @@ + + + + + +TQCopChannel Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCopChannel

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcopchannel.html b/doc/html/qcopchannel.html new file mode 100644 index 00000000..44b9b660 --- /dev/null +++ b/doc/html/qcopchannel.html @@ -0,0 +1,178 @@ + + + + + +TQCopChannel Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCopChannel Class Reference

+ +

The TQCopChannel class provides communication capabilities +between several clients. +More... +

#include <qcopchannel_qws.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • TQCopChannel ( const TQCString & channel, TQObject * parent = 0, const char * name = 0 )
  • +
  • virtual ~TQCopChannel ()
  • +
  • TQCString channel () const
  • +
  • virtual void receive ( const TQCString & msg, const TQByteArray & data )
  • +
+

Signals

+
    +
  • void received ( const TQCString & msg, const TQByteArray & data )
  • +
+

Static Public Members

+
    +
  • bool isRegistered ( const TQCString & channel )
  • +
  • bool send ( const TQCString & channel, const TQCString & msg )
  • +
  • bool send ( const TQCString & channel, const TQCString & msg, const TQByteArray & data )
  • +
+

Detailed Description

+ + +

The TQCopChannel class provides communication capabilities +between several clients. +

The TQt Cop (TQCOP) is a COmmunication Protocol, allowing clients to +communicate both within the same address space and between +different processes. +

Currently, this facility is only available on TQt/Embedded. On X11 +and Windows we are exploring the use of existing standards such as +DCOP and COM. +

TQCopChannel provides send() and isRegistered() which are static +functions usable without an object. +

The channel() function returns the name of the channel. +

In order to listen to the traffic on a channel, you should +either subclass TQCopChannel and reimplement receive(), or +connect() to the received() signal. + +


Member Function Documentation

+

TQCopChannel::TQCopChannel ( const TQCString & channel, TQObject * parent = 0, const char * name = 0 ) +

+Constructs a TQCop channel and registers it with the server using +the name channel. The standard parent and name arguments +are passed on to the TQObject constructor. + +

TQCopChannel::~TQCopChannel () [virtual] +

+Destroys the client's end of the channel and notifies the server +that the client has closed its connection. The server will keep +the channel open until the last registered client detaches. + +

TQCString TQCopChannel::channel () const +

+Returns the name of the channel. + +

bool TQCopChannel::isRegistered ( const TQCString & channel ) [static] +

+Queries the server for the existence of channel. +

Returns TRUE if channel is registered; otherwise returns FALSE. + +

void TQCopChannel::receive ( const TQCString & msg, const TQByteArray & data ) [virtual] +

+This virtual function allows subclasses of TQCopChannel to process +data received from their channel. +

The default implementation emits the received() signal. +

Note that the format of data has to be well defined in order to +extract the information it contains. +

Example: +

+    void MyClass::receive( const TQCString &msg, const TQByteArray &data )
+    {
+        TQDataStream stream( data, IO_ReadOnly );
+        if ( msg == "execute(TQString,TQString)" ) {
+            TQString cmd, arg;
+            stream >> cmd >> arg;
+            ...
+        } else if ( msg == "delete(TQString)" ) {
+            TQString filenname;
+            stream >> filename;
+            ...
+        } else ...
+    }
+    
+ +This example assumes that the msg is a DCOP-style function +signature and the data contains the function's arguments. (See +send().) +

Using the DCOP convention is a recommendation, but not a +retquirement. Whatever convention you use the sender and receiver +must agree on the argument types. +

See also send(). + +

void TQCopChannel::received ( const TQCString & msg, const TQByteArray & data ) [signal] +

+ +

This signal is emitted with the msg and data whenever the +receive() function gets incoming data. + +

bool TQCopChannel::send ( const TQCString & channel, const TQCString & msg, const TQByteArray & data ) [static] +

+Send the message msg on channel channel with data data. +The message will be distributed to all clients subscribed to the +channel. +

Note that TQDataStream provides a convenient way to fill the byte +array with auxiliary data. +

Example: +

+    TQByteArray ba;
+    TQDataStream stream( ba, IO_WriteOnly );
+    stream << TQString("cat") << TQString("file.txt");
+    TQCopChannel::send( "System/Shell", "execute(TQString,TQString)", ba );
+    
+ +Here the channel is "System/Shell". The msg is an arbitrary +string, but in the example we've used the DCOP convention of +passing a function signature. Such a signature is formatted as +functionname(types) where types is a list of zero or more +comma-separated type names, with no whitespace, no consts and no +pointer or reference marks, i.e. no "*" or "&". +

Using the DCOP convention is a recommendation, but not a +retquirement. Whatever convention you use the sender and receiver +must agree on the argument types. +

See also receive(). + +

bool TQCopChannel::send ( const TQCString & channel, const TQCString & msg ) [static] +

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

Send the message msg on channel channel. The message will be +distributed to all clients subscribed to the channel. +

See also receive(). + + +


+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/qcopchannel_qws-h.html b/doc/html/qcopchannel_qws-h.html new file mode 100644 index 00000000..00c0b316 --- /dev/null +++ b/doc/html/qcopchannel_qws-h.html @@ -0,0 +1,133 @@ + + + + + +qcopchannel_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qcopchannel_qws.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qcopchannel_qws.h   3.3.8   edited Jan 11 14:46 $
+**
+** TQCOP protocol classes
+**
+** Created : 20000616
+**
+** Copyright (C) 2000-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQCOPCHANNEL_QWS_H
+#define TQCOPCHANNEL_QWS_H
+
+#ifndef QT_H
+#include "qobject.h"
+#endif // QT_H
+
+#ifndef QT_NO_COP
+
+class TQWSClient;
+class TQCopChannelPrivate;
+
+class TQCopChannel : public TQObject
+{
+    Q_OBJECT
+public:
+    TQCopChannel( const TQCString& channel, TQObject* parent=0, const char* name=0 );
+    virtual ~TQCopChannel();
+
+    TQCString channel() const;
+
+    static bool isRegistered( const TQCString& channel );
+    static bool send( const TQCString &channel, const TQCString &msg );
+    static bool send( const TQCString &channel, const TQCString &msg,
+		      const TQByteArray &data );
+
+    static void sendLocally(  const TQCString &ch, const TQCString &msg,
+			       const TQByteArray &data );
+
+    virtual void receive( const TQCString &msg, const TQByteArray &data );
+
+signals:
+    void received( const TQCString &msg, const TQByteArray &data );
+
+private:
+    // server side
+    static void registerChannel( const TQString &ch, const TQWSClient *cl );
+    static void detach( const TQWSClient *cl );
+    static void answer( TQWSClient *cl, const TQCString &ch,
+			const TQCString &msg, const TQByteArray &data );
+    // client side
+    TQCopChannelPrivate* d;
+
+    friend class TQWSServer;
+    friend class TQApplication;
+};
+
+#endif
+
+#endif // TQCOPCHANNEL_QWS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcstring-h.html b/doc/html/qcstring-h.html new file mode 100644 index 00000000..15756a83 --- /dev/null +++ b/doc/html/qcstring-h.html @@ -0,0 +1,437 @@ + + + + + +qcstring.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qcstring.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qcstring.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of the extended char array operations,
+** and TQByteArray and TQCString classes
+**
+** Created : 920609
+**
+** 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 retquirements 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 TQCSTRING_H
+#define TQCSTRING_H
+
+#ifndef QT_H
+#include "qmemarray.h"
+#endif // QT_H
+
+#include <string.h>
+
+
+/*****************************************************************************
+  Safe and portable C string functions; extensions to standard string.h
+ *****************************************************************************/
+
+Q_EXPORT void *qmemmove( void *dst, const void *src, uint len );
+
+Q_EXPORT char *qstrdup( const char * );
+
+Q_EXPORT inline uint qstrlen( const char *str )
+{ return str ? (uint)strlen(str) : 0u; }
+
+Q_EXPORT inline char *qstrcpy( char *dst, const char *src )
+{ return src ? strcpy(dst, src) : 0; }
+
+Q_EXPORT char *qstrncpy( char *dst, const char *src, uint len );
+
+Q_EXPORT inline int qstrcmp( const char *str1, const char *str2 )
+{
+    return ( str1 && str2 ) ? strcmp( str1, str2 )
+			    : ( str1 ? 1 : ( str2 ? -1 : 0 ) );
+}
+
+Q_EXPORT inline int qstrncmp( const char *str1, const char *str2, uint len )
+{
+    return ( str1 && str2 ) ? strncmp( str1, str2, len )
+			    : ( str1 ? 1 : ( str2 ? -1 : 0 ) );
+}
+
+Q_EXPORT int qstricmp( const char *, const char * );
+
+Q_EXPORT int qstrnicmp( const char *, const char *, uint len );
+
+#ifndef QT_CLEAN_NAMESPACE
+Q_EXPORT inline uint cstrlen( const char *str )
+{ return (uint)strlen(str); }
+
+Q_EXPORT inline char *cstrcpy( char *dst, const char *src )
+{ return strcpy(dst,src); }
+
+Q_EXPORT inline int cstrcmp( const char *str1, const char *str2 )
+{ return strcmp(str1,str2); }
+
+Q_EXPORT inline int cstrncmp( const char *str1, const char *str2, uint len )
+{ return strncmp(str1,str2,len); }
+#endif
+
+
+// qChecksum: Internet checksum
+
+Q_EXPORT Q_UINT16 qChecksum( const char *s, uint len );
+
+/*****************************************************************************
+  TQByteArray class
+ *****************************************************************************/
+
+#if defined(Q_QDOC)
+/*
+  We want qdoc to document TQByteArray as a real class that inherits
+  TQMemArray<char> and that is inherited by TQBitArray.
+*/
+class TQByteArray : public TQMemArray<char>
+{
+public:
+    TQByteArray();
+    TQByteArray( int size );
+};
+#else
+typedef TQMemArray<char> TQByteArray;
+#endif
+
+#ifndef QT_NO_COMPRESS
+Q_EXPORT TQByteArray qCompress( const uchar* data, int nbytes );
+Q_EXPORT TQByteArray qUncompress( const uchar* data, int nbytes );
+Q_EXPORT inline TQByteArray qCompress( const TQByteArray& data)
+{ return qCompress( (const uchar*)data.data(), data.size() ); }
+Q_EXPORT inline TQByteArray qUncompress( const TQByteArray& data )
+{ return qUncompress( (const uchar*)data.data(), data.size() ); }
+#endif
+
+/*****************************************************************************
+  TQByteArray stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQByteArray & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQByteArray & );
+#endif
+
+/*****************************************************************************
+  TQCString class
+ *****************************************************************************/
+
+class TQRegExp;
+
+class Q_EXPORT TQCString : public TQByteArray	// C string class
+{
+public:
+    TQCString() {}				// make null string
+    TQCString( int size );			// allocate size incl. \0
+    TQCString( const TQCString &s ) : TQByteArray( s ) {}
+    TQCString( const char *str );		// deep copy
+    TQCString( const char *str, uint maxlen );	// deep copy, max length
+    ~TQCString();
+
+    TQCString    &operator=( const TQCString &s );// shallow copy
+    TQCString    &operator=( const char *str );	// deep copy
+
+    bool	isNull()	const;
+    bool	isEmpty()	const;
+    uint	length()	const;
+    bool	resize( uint newlen );
+    bool	truncate( uint pos );
+    bool	fill( char c, int len = -1 );
+
+    TQCString	copy()	const;
+
+    TQCString    &sprintf( const char *format, ... );
+
+    int		find( char c, int index=0, bool cs=TRUE ) const;
+    int		find( const char *str, int index=0, bool cs=TRUE ) const;
+#ifndef QT_NO_REGEXP
+    int		find( const TQRegExp &, int index=0 ) const;
+#endif
+    int		findRev( char c, int index=-1, bool cs=TRUE) const;
+    int		findRev( const char *str, int index=-1, bool cs=TRUE) const;
+#ifndef QT_NO_REGEXP_CAPTURE
+    int		findRev( const TQRegExp &, int index=-1 ) const;
+#endif
+    int		contains( char c, bool cs=TRUE ) const;
+    int		contains( const char *str, bool cs=TRUE ) const;
+#ifndef QT_NO_REGEXP
+    int		contains( const TQRegExp & ) const;
+#endif
+    TQCString	left( uint len )  const;
+    TQCString	right( uint len ) const;
+    TQCString	mid( uint index, uint len=0xffffffff) const;
+
+    TQCString	leftJustify( uint width, char fill=' ', bool trunc=FALSE)const;
+    TQCString	rightJustify( uint width, char fill=' ',bool trunc=FALSE)const;
+
+    TQCString	lower() const;
+    TQCString	upper() const;
+
+    TQCString	stripWhiteSpace()	const;
+    TQCString	simplifyWhiteSpace()	const;
+
+    TQCString    &insert( uint index, const char * );
+    TQCString    &insert( uint index, char );
+    TQCString    &append( const char * );
+    TQCString    &prepend( const char * );
+    TQCString    &remove( uint index, uint len );
+    TQCString    &replace( uint index, uint len, const char * );
+#ifndef QT_NO_REGEXP
+    TQCString    &replace( const TQRegExp &, const char * );
+#endif
+    TQCString    &replace( char c, const char *after );
+    TQCString    &replace( const char *, const char * );
+    TQCString    &replace( char, char );
+
+    short	toShort( bool *ok=0 )	const;
+    ushort	toUShort( bool *ok=0 )	const;
+    int		toInt( bool *ok=0 )	const;
+    uint	toUInt( bool *ok=0 )	const;
+    long	toLong( bool *ok=0 )	const;
+    ulong	toULong( bool *ok=0 )	const;
+    float	toFloat( bool *ok=0 )	const;
+    double	toDouble( bool *ok=0 )	const;
+
+    TQCString    &setStr( const char *s );
+    TQCString    &setNum( short );
+    TQCString    &setNum( ushort );
+    TQCString    &setNum( int );
+    TQCString    &setNum( uint );
+    TQCString    &setNum( long );
+    TQCString    &setNum( ulong );
+    TQCString    &setNum( float, char f='g', int prec=6 );
+    TQCString    &setNum( double, char f='g', int prec=6 );
+
+    bool	setExpand( uint index, char c );
+
+		operator const char *() const;
+    TQCString    &operator+=( const char *str );
+    TQCString    &operator+=( char c );
+private:
+    int	find( const char *str, int index, bool cs, uint l ) const;
+};
+
+
+/*****************************************************************************
+  TQCString stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQCString & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQCString & );
+#endif
+
+/*****************************************************************************
+  TQCString inline functions
+ *****************************************************************************/
+
+inline TQCString &TQCString::operator=( const TQCString &s )
+{ return (TQCString&)assign( s ); }
+
+inline TQCString &TQCString::operator=( const char *str )
+{ return (TQCString&)duplicate( str, qstrlen(str)+1 ); }
+
+inline bool TQCString::isNull() const
+{ return data() == 0; }
+
+inline bool TQCString::isEmpty() const
+{ return data() == 0 || *data() == '\0'; }
+
+inline uint TQCString::length() const
+{ return qstrlen( data() ); }
+
+inline bool TQCString::truncate( uint pos )
+{ return resize(pos+1); }
+
+inline TQCString TQCString::copy() const
+{ return TQCString( data() ); }
+
+inline TQCString &TQCString::prepend( const char *s )
+{ return insert(0,s); }
+
+inline TQCString &TQCString::append( const char *s )
+{ return operator+=(s); }
+
+inline TQCString &TQCString::setNum( short n )
+{ return setNum((long)n); }
+
+inline TQCString &TQCString::setNum( ushort n )
+{ return setNum((ulong)n); }
+
+inline TQCString &TQCString::setNum( int n )
+{ return setNum((long)n); }
+
+inline TQCString &TQCString::setNum( uint n )
+{ return setNum((ulong)n); }
+
+inline TQCString &TQCString::setNum( float n, char f, int prec )
+{ return setNum((double)n,f,prec); }
+
+inline TQCString::operator const char *() const
+{ return (const char *)data(); }
+
+
+/*****************************************************************************
+  TQCString non-member operators
+ *****************************************************************************/
+
+Q_EXPORT inline bool operator==( const TQCString &s1, const TQCString &s2 )
+{ return qstrcmp( s1.data(), s2.data() ) == 0; }
+
+Q_EXPORT inline bool operator==( const TQCString &s1, const char *s2 )
+{ return qstrcmp( s1.data(), s2 ) == 0; }
+
+Q_EXPORT inline bool operator==( const char *s1, const TQCString &s2 )
+{ return qstrcmp( s1, s2.data() ) == 0; }
+
+Q_EXPORT inline bool operator!=( const TQCString &s1, const TQCString &s2 )
+{ return qstrcmp( s1.data(), s2.data() ) != 0; }
+
+Q_EXPORT inline bool operator!=( const TQCString &s1, const char *s2 )
+{ return qstrcmp( s1.data(), s2 ) != 0; }
+
+Q_EXPORT inline bool operator!=( const char *s1, const TQCString &s2 )
+{ return qstrcmp( s1, s2.data() ) != 0; }
+
+Q_EXPORT inline bool operator<( const TQCString &s1, const TQCString& s2 )
+{ return qstrcmp( s1.data(), s2.data() ) < 0; }
+
+Q_EXPORT inline bool operator<( const TQCString &s1, const char *s2 )
+{ return qstrcmp( s1.data(), s2 ) < 0; }
+
+Q_EXPORT inline bool operator<( const char *s1, const TQCString &s2 )
+{ return qstrcmp( s1, s2.data() ) < 0; }
+
+Q_EXPORT inline bool operator<=( const TQCString &s1, const TQCString &s2 )
+{ return qstrcmp( s1.data(), s2.data() ) <= 0; }
+
+Q_EXPORT inline bool operator<=( const TQCString &s1, const char *s2 )
+{ return qstrcmp( s1.data(), s2 ) <= 0; }
+
+Q_EXPORT inline bool operator<=( const char *s1, const TQCString &s2 )
+{ return qstrcmp( s1, s2.data() ) <= 0; }
+
+Q_EXPORT inline bool operator>( const TQCString &s1, const TQCString &s2 )
+{ return qstrcmp( s1.data(), s2.data() ) > 0; }
+
+Q_EXPORT inline bool operator>( const TQCString &s1, const char *s2 )
+{ return qstrcmp( s1.data(), s2 ) > 0; }
+
+Q_EXPORT inline bool operator>( const char *s1, const TQCString &s2 )
+{ return qstrcmp( s1, s2.data() ) > 0; }
+
+Q_EXPORT inline bool operator>=( const TQCString &s1, const TQCString& s2 )
+{ return qstrcmp( s1.data(), s2.data() ) >= 0; }
+
+Q_EXPORT inline bool operator>=( const TQCString &s1, const char *s2 )
+{ return qstrcmp( s1.data(), s2 ) >= 0; }
+
+Q_EXPORT inline bool operator>=( const char *s1, const TQCString &s2 )
+{ return qstrcmp( s1, s2.data() ) >= 0; }
+
+Q_EXPORT inline const TQCString operator+( const TQCString &s1,
+					  const TQCString &s2 )
+{
+    TQCString tmp( s1.data() );
+    tmp += s2;
+    return tmp;
+}
+
+Q_EXPORT inline const TQCString operator+( const TQCString &s1, const char *s2 )
+{
+    TQCString tmp( s1.data() );
+    tmp += s2;
+    return tmp;
+}
+
+Q_EXPORT inline const TQCString operator+( const char *s1, const TQCString &s2 )
+{
+    TQCString tmp( s1 );
+    tmp += s2;
+    return tmp;
+}
+
+Q_EXPORT inline const TQCString operator+( const TQCString &s1, char c2 )
+{
+    TQCString tmp( s1.data() );
+    tmp += c2;
+    return tmp;
+}
+
+Q_EXPORT inline const TQCString operator+( char c1, const TQCString &s2 )
+{
+    TQCString tmp;
+    tmp += c1;
+    tmp += s2;
+    return tmp;
+}
+#include "qwinexport.h"
+#endif // TQCSTRING_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcstring-members.html b/doc/html/qcstring-members.html new file mode 100644 index 00000000..35ea0385 --- /dev/null +++ b/doc/html/qcstring-members.html @@ -0,0 +1,102 @@ + + + + + +TQCString Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCString

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcstring.html b/doc/html/qcstring.html new file mode 100644 index 00000000..d5e5a2d2 --- /dev/null +++ b/doc/html/qcstring.html @@ -0,0 +1,1105 @@ + + + + + +TQCString Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCString Class Reference

+ +

The TQCString class provides an abstraction of the classic C +zero-terminated char array (char *). +More... +

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

+

#include <qcstring.h> +

Inherits TQByteArray. +

List of all member functions. +

Public Members

+
    +
  • TQCString ()
  • +
  • TQCString ( int size )
  • +
  • TQCString ( const TQCString & s )
  • +
  • TQCString ( const char * str )
  • +
  • TQCString ( const char * str, uint maxsize )
  • +
  • TQCString & operator= ( const TQCString & s )
  • +
  • TQCString & operator= ( const char * str )
  • +
  • bool isNull () const
  • +
  • bool isEmpty () const
  • +
  • uint length () const
  • +
  • bool resize ( uint len )
  • +
  • bool truncate ( uint pos )
  • +
  • bool fill ( char c, int len = -1 )
  • +
  • TQCString copy () const
  • +
  • TQCString & sprintf ( const char * format, ... )
  • +
  • int find ( char c, int index = 0, bool cs = TRUE ) const
  • +
  • int find ( const char * str, int index = 0, bool cs = TRUE ) const
  • +
  • int find ( const TQRegExp & rx, int index = 0 ) const
  • +
  • int findRev ( char c, int index = -1, bool cs = TRUE ) const
  • +
  • int findRev ( const char * str, int index = -1, bool cs = TRUE ) const
  • +
  • int findRev ( const TQRegExp & rx, int index = -1 ) const
  • +
  • int contains ( char c, bool cs = TRUE ) const
  • +
  • int contains ( const char * str, bool cs = TRUE ) const
  • +
  • int contains ( const TQRegExp & rx ) const
  • +
  • TQCString left ( uint len ) const
  • +
  • TQCString right ( uint len ) const
  • +
  • TQCString mid ( uint index, uint len = 0xffffffff ) const
  • +
  • TQCString leftJustify ( uint width, char fill = ' ', bool truncate = FALSE ) const
  • +
  • TQCString rightJustify ( uint width, char fill = ' ', bool truncate = FALSE ) const
  • +
  • TQCString lower () const
  • +
  • TQCString upper () const
  • +
  • TQCString stripWhiteSpace () const
  • +
  • TQCString simplifyWhiteSpace () const
  • +
  • TQCString & insert ( uint index, const char * s )
  • +
  • TQCString & insert ( uint index, char c )
  • +
  • TQCString & append ( const char * str )
  • +
  • TQCString & prepend ( const char * s )
  • +
  • TQCString & remove ( uint index, uint len )
  • +
  • TQCString & replace ( uint index, uint len, const char * str )
  • +
  • TQCString & replace ( const TQRegExp & rx, const char * str )
  • +
  • TQCString & replace ( char c, const char * after )
  • +
  • TQCString & replace ( const char * before, const char * after )
  • +
  • TQCString & replace ( char c1, char c2 )
  • +
  • short toShort ( bool * ok = 0 ) const
  • +
  • ushort toUShort ( bool * ok = 0 ) const
  • +
  • int toInt ( bool * ok = 0 ) const
  • +
  • uint toUInt ( bool * ok = 0 ) const
  • +
  • long toLong ( bool * ok = 0 ) const
  • +
  • ulong toULong ( bool * ok = 0 ) const
  • +
  • float toFloat ( bool * ok = 0 ) const
  • +
  • double toDouble ( bool * ok = 0 ) const
  • +
  • TQCString & setStr ( const char * str )
  • +
  • TQCString & setNum ( short n )
  • +
  • TQCString & setNum ( ushort n )
  • +
  • TQCString & setNum ( int n )
  • +
  • TQCString & setNum ( uint n )
  • +
  • TQCString & setNum ( long n )
  • +
  • TQCString & setNum ( ulong n )
  • +
  • TQCString & setNum ( float n, char f = 'g', int prec = 6 )
  • +
  • TQCString & setNum ( double n, char f = 'g', int prec = 6 )
  • +
  • bool setExpand ( uint index, char c )
  • +
  • operator const char * () const
  • +
  • TQCString & operator+= ( const char * str )
  • +
  • TQCString & operator+= ( char c )
  • +
+

Related Functions

+
    +
  • void * qmemmove ( void * dst, const void * src, uint len )
  • +
  • char * qstrdup ( const char * src )
  • +
  • char * qstrcpy ( char * dst, const char * src )
  • +
  • char * qstrncpy ( char * dst, const char * src, uint len )
  • +
  • uint qstrlen ( const char * str )
  • +
  • int qstrcmp ( const char * str1, const char * str2 )
  • +
  • int qstrncmp ( const char * str1, const char * str2, uint len )
  • +
  • int qstricmp ( const char * str1, const char * str2 )
  • +
  • int qstrnicmp ( const char * str1, const char * str2, uint len )
  • +
  • TQDataStream & operator<< ( TQDataStream & s, const TQCString & str )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQCString & str )
  • +
  • bool operator== ( const TQCString & s1, const TQCString & s2 )
  • +
  • bool operator== ( const TQCString & s1, const char * s2 )
  • +
  • bool operator== ( const char * s1, const TQCString & s2 )
  • +
  • bool operator!= ( const TQCString & s1, const TQCString & s2 )
  • +
  • bool operator!= ( const TQCString & s1, const char * s2 )
  • +
  • bool operator!= ( const char * s1, const TQCString & s2 )
  • +
  • bool operator< ( const TQCString & s1, const char * s2 )
  • +
  • bool operator< ( const char * s1, const TQCString & s2 )
  • +
  • bool operator<= ( const TQCString & s1, const char * s2 )
  • +
  • bool operator<= ( const char * s1, const TQCString & s2 )
  • +
  • bool operator> ( const TQCString & s1, const char * s2 )
  • +
  • bool operator> ( const char * s1, const TQCString & s2 )
  • +
  • bool operator>= ( const TQCString & s1, const char * s2 )
  • +
  • bool operator>= ( const char * s1, const TQCString & s2 )
  • +
  • const TQCString operator+ ( const TQCString & s1, const TQCString & s2 )
  • +
  • const TQCString operator+ ( const TQCString & s1, const char * s2 )
  • +
  • const TQCString operator+ ( const char * s1, const TQCString & s2 )
  • +
  • const TQCString operator+ ( const TQCString & s, char c )
  • +
  • const TQCString operator+ ( char c, const TQCString & s )
  • +
+

Detailed Description

+ + + +The TQCString class provides an abstraction of the classic C +zero-terminated char array (char *). +

+ + + +

TQCString inherits TQByteArray, which is defined as +TQMemArray<char>. Since TQCString is a TQMemArray, it uses explicit sharing with a reference count. +

TQCString tries to behave like a more convenient const char *. +The price of doing this is that some algorithms will perform +badly. For example, append() is O(length()) since it scans for a +null terminator. Although you might use TQCString for text that is +never exposed to the user, for most purposes, and especially for +user-visible text, you should use TQString. TQString provides +implicit sharing, Unicode and other internationalization support, +and is well optimized. +

Note that for the TQCString methods that take a const char * +parameter the const char * must either be 0 (null) or not-null +and '\0' (NUL byte) terminated; otherwise the results are +undefined. +

A TQCString that has not been assigned to anything is null, i.e. +both the length and the data pointer is 0. A TQCString that +references the empty string ("", a single '\0' char) is empty. +Both null and empty TQCStrings are legal parameters to the methods. +Assigning const char * 0 to TQCString produces a null TQCString. +

The length() function returns the length of the string; resize() +resizes the string and truncate() truncates the string. A string +can be filled with a character using fill(). Strings can be left +or right padded with characters using leftJustify() and +rightJustify(). Characters, strings and regular expressions can be +searched for using find() and findRev(), and counted using +contains(). +

Strings and characters can be inserted with insert() and appended +with append(). A string can be prepended with prepend(). +Characters can be removed from the string with remove() and +replaced with replace(). +

Portions of a string can be extracted using left(), right() and +mid(). Whitespace can be removed using stripWhiteSpace() and +simplifyWhiteSpace(). Strings can be converted to uppercase or +lowercase with upper() and lower() respectively. +

Strings that contain numbers can be converted to numbers with +toShort(), toInt(), toLong(), toULong(), toFloat() and toDouble(). +Numbers can be converted to strings with setNum(). +

Many operators are overloaded to work with TQCStrings. TQCString +also supports some more obscure functions, e.g. sprintf(), +setStr() and setExpand(). +

+

Note on Character Comparisons + +

In TQCString the notion of uppercase and lowercase and of which +character is greater than or less than another character is locale +dependent. This affects functions which support a case insensitive +option or which compare or lowercase or uppercase their arguments. +Case insensitive operations and comparisons will be accurate if +both strings contain only ASCII characters. (If $LC_CTYPE is +set, most Unix systems do "the right thing".) Functions that this +affects include contains(), find(), findRev(), operator<(), operator<=(), operator>(), operator>=(), lower() and +upper(). +

This issue does not apply to TQStrings since they represent +characters using Unicode. +

+

+

Performance note: The TQCString methods for TQRegExp searching are +implemented by converting the TQCString to a TQString and performing +the search on that. This implies a deep copy of the TQCString data. +If you are going to perform many TQRegExp searches on a large +TQCString, you will get better performance by converting the +TQCString to a TQString yourself, and then searching in the TQString. +

See also Collection Classes, Implicitly and Explicitly Shared Classes, Text Related Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQCString::TQCString () +

+ +

Constructs a null string. +

See also isNull(). + +

TQCString::TQCString ( int size ) +

+Constructs a string with room for size characters, including +the '\0'-terminator. Makes a null string if size == 0. +

If size > 0, then the first and last characters in the string +are initialized to '\0'. All other characters are uninitialized. +

See also resize() and isNull(). + +

TQCString::TQCString ( const TQCString & s ) +

+ +

Constructs a shallow copy s. +

See also assign(). + +

TQCString::TQCString ( const char * str ) +

+Constructs a string that is a deep copy of str. +

If str is 0 a null string is created. +

See also isNull(). + +

TQCString::TQCString ( const char * str, uint maxsize ) +

+Constructs a string that is a deep copy of str. The copy will +be at most maxsize bytes long including the '\0'-terminator. +

Example: +

+    TQCString str( "helloworld", 6 ); // assigns "hello" to str
+    
+ +

If str contains a 0 byte within the first maxsize bytes, the +resulting TQCString will be terminated by this 0. If str is 0 a +null string is created. +

See also isNull(). + +

TQCString & TQCString::append ( const char * str ) +

+ +

Appends string str to the string and returns a reference to the +string. Equivalent to operator+=(). + +

int TQCString::contains ( char c, bool cs = TRUE ) const +

+Returns the number of times the character c occurs in the +string. +

The match is case sensitive if cs is TRUE, or case insensitive +if cs if FALSE. +

See also Note on character comparisons. + +

int TQCString::contains ( const char * str, bool cs = TRUE ) const +

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

Returns the number of times str occurs in the string. +

The match is case sensitive if cs is TRUE, or case insensitive +if cs if FALSE. +

This function counts overlapping substrings, for example, "banana" +contains two occurrences of "ana". +

See also findRev() and Note on character comparisons. + +

int TQCString::contains ( const TQRegExp & rx ) const +

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

Counts the number of overlapping occurrences of rx in the string. +

Example: +

+    TQString s = "banana and panama";
+    TQRegExp r = TQRegExp( "a[nm]a", TRUE, FALSE );
+    s.contains( r ); // 4 matches
+    
+ +

See also find() and findRev(). + +

Warning: If you want to apply this function repeatedly to the same +string it is more efficient to convert the string to a TQString and +apply the function to that. + +

TQCString TQCString::copy () const +

+ +

Returns a deep copy of this string. +

See also detach(). + +

bool TQCString::fill ( char c, int len = -1 ) +

+Fills the string with len bytes of character c, followed by +a '\0'-terminator. +

If len is negative, then the current string length is used. +

Returns FALSE is len is nonnegative and there is not enough +memory to resize the string; otherwise returns TRUE. + +

int TQCString::find ( char c, int index = 0, bool cs = TRUE ) const +

+Finds the first occurrence of the character c, starting at +position index. +

The search is case sensitive if cs is TRUE, or case insensitive +if cs is FALSE. +

Returns the position of c, or -1 if c could not be found. +

See also Note on character comparisons. + +

Example: network/networkprotocol/nntp.cpp. +

int TQCString::find ( const char * str, int index = 0, bool cs = TRUE ) const +

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

Finds the first occurrence of the string str, starting at +position index. +

The search is case sensitive if cs is TRUE, or case insensitive +if cs is FALSE. +

Returns the position of str, or -1 if str could not be +found. +

See also Note on character comparisons. + +

int TQCString::find ( const TQRegExp & rx, int index = 0 ) const +

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

Finds the first occurrence of the regular expression rx, +starting at position index. +

Returns the position of the next match, or -1 if rx was not +found. +

Warning: If you want to apply this function repeatedly to the same +string it is more efficient to convert the string to a TQString and +apply the function to that. + +

int TQCString::findRev ( char c, int index = -1, bool cs = TRUE ) const +

+Finds the first occurrence of the character c, starting at +position index and searching backwards. +

The search is case sensitive if cs is TRUE, or case insensitive +if cs is FALSE. +

Returns the position of c, or -1 if c could not be found. +

See also Note on character comparisons. + +

int TQCString::findRev ( const char * str, int index = -1, bool cs = TRUE ) const +

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

Finds the first occurrence of the string str, starting at +position index and searching backwards. +

The search is case sensitive if cs is TRUE, or case insensitive +if cs is FALSE. +

Returns the position of str, or -1 if str could not be +found. +

See also Note on character comparisons. + +

int TQCString::findRev ( const TQRegExp & rx, int index = -1 ) const +

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

Finds the first occurrence of the regular expression rx, +starting at position index and searching backwards. +

Returns the position of the next match (backwards), or -1 if rx +was not found. +

Warning: If you want to apply this function repeatedly to the same +string it is more efficient to convert the string to a TQString and +apply the function to that. + +

TQCString & TQCString::insert ( uint index, char c ) +

+Inserts character c into the string at position index and +returns a reference to the string. +

If index is beyond the end of the string, the string is +padded with spaces (ASCII 32) to length index and then c +is appended. +

Example: +

+    TQCString s = "Yes";
+    s.insert( 3, '!');   // s == "Yes!"
+    
+ +

See also remove() and replace(). + +

TQCString & TQCString::insert ( uint index, const char * s ) +

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

Inserts string s into the string at position index. +

If index is beyond the end of the string, the string is +padded with spaces (ASCII 32) to length index and then s +is appended. +

+    TQCString s = "I like fish";
+    s.insert( 2, "don't ");     // s == "I don't like fish"
+
+    s = "x";                    // index 01234
+    s.insert( 3, "yz" );        // s == "x  yz"
+    
+ + +

bool TQCString::isEmpty () const +

+ +

Returns TRUE if the string is empty, i.e. if length() == 0; +otherwise returns FALSE. An empty string is not always a null +string. +

See example in isNull(). +

See also isNull(), length(), and size(). + +

bool TQCString::isNull () const +

+ +

Returns TRUE if the string is null, i.e. if data() == 0; otherwise +returns FALSE. A null string is also an empty string. +

Example: +

+    TQCString a;         // a.data() == 0,  a.size() == 0, a.length() == 0
+    TQCString b == "";   // b.data() == "", b.size() == 1, b.length() == 0
+    a.isNull();         // TRUE  because a.data() == 0
+    a.isEmpty();        // TRUE  because a.length() == 0
+    b.isNull();         // FALSE because b.data() == ""
+    b.isEmpty();        // TRUE  because b.length() == 0
+    
+ +

See also isEmpty(), length(), and size(). + +

TQCString TQCString::left ( uint len ) const +

+Returns a substring that contains the len leftmost characters +of the string. +

The whole string is returned if len exceeds the length of the +string. +

Example: +

+    TQCString s = "Pineapple";
+    TQCString t = s.left( 4 );  // t == "Pine"
+    
+ +

See also right() and mid(). + +

Example: network/networkprotocol/nntp.cpp. +

TQCString TQCString::leftJustify ( uint width, char fill = ' ', bool truncate = FALSE ) const +

+Returns a string of length width (plus one for the terminating +'\0') that contains this string padded with the fill character. +

If the length of the string exceeds width and truncate is +FALSE (the default), then the returned string is a copy of the +string. If the length of the string exceeds width and truncate is TRUE, then the returned string is a left(width). +

Example: +

+    TQCString s("apple");
+    TQCString t = s.leftJustify(8, '.');  // t == "apple..."
+    
+ +

See also rightJustify(). + +

uint TQCString::length () const +

+ +

Returns the length of the string, excluding the '\0'-terminator. +Equivalent to calling strlen(data()). +

Null strings and empty strings have zero length. +

See also size(), isNull(), and isEmpty(). + +

Example: network/networkprotocol/nntp.cpp. +

TQCString TQCString::lower () const +

+Returns a new string that is a copy of this string converted to lower +case. +

Example: +

+    TQCString s("Credit");
+    TQCString t = s.lower();  // t == "credit"
+    
+ +

See also upper() and Note on character comparisons. + +

TQCString TQCString::mid ( uint index, uint len = 0xffffffff ) const +

+Returns a substring that contains at most len characters from +this string, starting at position index. +

Returns a null string if the string is empty or if index is out +of range. Returns the whole string from index if index+len +exceeds the length of the string. +

Example: +

+    TQCString s = "Two pineapples";
+    TQCString t = s.mid( 4, 3 );     // t == "pin"
+    
+ +

See also left() and right(). + +

Example: network/networkprotocol/nntp.cpp. +

TQCString::operator const char * () const +

+ +

Returns the string data. + +

TQCString & TQCString::operator+= ( const char * str ) +

+Appends string str to the string and returns a reference to the string. + +

TQCString & TQCString::operator+= ( char c ) +

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

Appends character c to the string and returns a reference to the string. + +

TQCString & TQCString::operator= ( const TQCString & s ) +

+ +

Assigns a shallow copy of s to this string and returns a +reference to this string. + +

TQCString & TQCString::operator= ( const char * str ) +

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

Assigns a deep copy of str to this string and returns a +reference to this string. +

If str is 0 a null string is created. +

See also isNull(). + +

TQCString & TQCString::prepend ( const char * s ) +

+ +

Prepend s to the string. Equivalent to insert(0, s). +

See also insert(). + +

TQCString & TQCString::remove ( uint index, uint len ) +

+Removes len characters from the string, starting at position index, and returns a reference to the string. +

If index is out of range, nothing happens. If index is +valid, but index + len is larger than the length of the +string, the string is truncated at position index. +

+    TQCString s = "Montreal";
+    s.remove( 1, 4 );         // s == "Meal"
+    
+ +

See also insert() and replace(). + +

Example: network/networkprotocol/nntp.cpp. +

TQCString & TQCString::replace ( uint index, uint len, const char * str ) +

+Replaces len characters from the string, starting at position +index, with str, and returns a reference to the string. +

If index is out of range, nothing is removed and str is +appended at the end of the string. If index is valid, but index + len is larger than the length of the string, str +replaces the rest of the string from position index. +

+    TQCString s = "Say yes!";
+    s.replace( 4, 3, "NO" );  // s == "Say NO!"
+    
+ +

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

TQCString & TQCString::replace ( const TQRegExp & rx, const char * str ) +

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

Replaces every occurrence of rx in the string with str. +Returns a reference to the string. +

Example: +

+    TQString s = "banana";
+    s.replace( TQRegExp("a.*a"), "" );     // becomes "b"
+
+    s = "banana";
+    s.replace( TQRegExp("^[bn]a"), "X" );  // becomes "Xnana"
+
+    s = "banana";
+    s.replace( TQRegExp("^[bn]a"), "" );   // becomes "nana"
+    
+ +

Warning: If you want to apply this function repeatedly to the same +string it is more efficient to convert the string to a TQString and +apply the function to that. + +

TQCString & TQCString::replace ( char c, const char * after ) +

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

Replaces every occurrence of the character c in the string +with after. Returns a reference to the string. +

Example: +

+    TQCString s = "a,b,c";
+    s.replace( ',', " or " );
+    // s == "a or b or c"
+    
+ + +

TQCString & TQCString::replace ( const char * before, const char * after ) +

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

Replaces every occurrence of the string before in the string +with the string after. Returns a reference to the string. +

Example: +

+    TQCString s = "Greek is Greek";
+    s.replace( "Greek", "English" );
+    // s == "English is English"
+    
+ + +

TQCString & TQCString::replace ( char c1, char c2 ) +

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

Replaces every occurrence of c1 with the char c2. +Returns a reference to the string. + +

bool TQCString::resize ( uint len ) +

+Extends or shrinks the string to len bytes, including the +'\0'-terminator. +

A '\0'-terminator is set at position len - 1 unless +len == 0. +

Example: +

+    TQCString s = "resize this string";
+    s.resize( 7 );                      // s == "resize"
+    
+ +

See also truncate(). + +

Example: network/networkprotocol/nntp.cpp. +

TQCString TQCString::right ( uint len ) const +

+Returns a substring that contains the len rightmost characters +of the string. +

The whole string is returned if len exceeds the length of the +string. +

Example: +

+    TQCString s = "Pineapple";
+    TQCString t = s.right( 5 );  // t == "apple"
+    
+ +

See also left() and mid(). + +

Example: network/networkprotocol/nntp.cpp. +

TQCString TQCString::rightJustify ( uint width, char fill = ' ', bool truncate = FALSE ) const +

+Returns a string of length width (plus one for the terminating +'\0') that contains zero or more of the fill character followed +by this string. +

If the length of the string exceeds width and truncate is +FALSE (the default), then the returned string is a copy of the +string. If the length of the string exceeds width and truncate is TRUE, then the returned string is a left(width). +

Example: +

+    TQCString s("pie");
+    TQCString t = s.rightJustify(8, '.');  // t == ".....pie"
+    
+ +

See also leftJustify(). + +

bool TQCString::setExpand ( uint index, char c ) +

+Sets the character at position index to c and expands the +string if necessary, padding with spaces. +

Returns FALSE if index was out of range and the string could +not be expanded; otherwise returns TRUE. + +

TQCString & TQCString::setNum ( double n, char f = 'g', int prec = 6 ) +

+Sets the string to the string representation of the number n +and returns a reference to the string. +

The format of the string representation is specified by the format +character f, and the precision (number of digits after the +decimal point) is specified with prec. +

The valid formats for f are 'e', 'E', 'f', 'g' and 'G'. The +formats are the same as for sprintf(); they are explained in TQString::arg(). + +

TQCString & TQCString::setNum ( short n ) +

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

Sets the string to the string representation of the number n +and returns a reference to the string. + +

TQCString & TQCString::setNum ( ushort n ) +

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

Sets the string to the string representation of the number n +and returns a reference to the string. + +

TQCString & TQCString::setNum ( int n ) +

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

Sets the string to the string representation of the number n +and returns a reference to the string. + +

TQCString & TQCString::setNum ( uint n ) +

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

Sets the string to the string representation of the number n +and returns a reference to the string. + +

TQCString & TQCString::setNum ( long n ) +

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

Sets the string to the string representation of the number n +and returns a reference to the string. + +

TQCString & TQCString::setNum ( ulong n ) +

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

Sets the string to the string representation of the number n +and returns a reference to the string. + +

TQCString & TQCString::setNum ( float n, char f = 'g', int prec = 6 ) +

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

TQCString & TQCString::setStr ( const char * str ) +

+Makes a deep copy of str. Returns a reference to the string. + +

TQCString TQCString::simplifyWhiteSpace () const +

+Returns a new string that has white space removed from the start +and the end, plus any sequence of internal white space replaced +with a single space (ASCII 32). +

White space means the decimal ASCII codes 9, 10, 11, 12, 13 and +32. +

+    TQCString s = "  lots\t of\nwhite    space ";
+    TQCString t = s.simplifyWhiteSpace(); // t == "lots of white space"
+    
+ +

See also stripWhiteSpace(). + +

TQCString & TQCString::sprintf ( const char * format, ... ) +

+Implemented as a call to the native vsprintf() (see the manual for +your C library). +

If the string is shorter than 256 characters, this sprintf() calls +resize(256) to decrease the chance of memory corruption. The +string is resized back to its actual length before sprintf() +returns. +

Example: +

+    TQCString s;
+    s.sprintf( "%d - %s", 1, "first" );         // result < 256 chars
+
+    TQCString big( 25000 );                      // very long string
+    big.sprintf( "%d - %s", 2, longString );    // result < 25000 chars
+    
+ +

Warning: All vsprintf() implementations will write past the end of +the target string (*this) if the format specification and +arguments happen to be longer than the target string, and some +will also fail if the target string is longer than some arbitrary +implementation limit. +

Giving user-supplied arguments to sprintf() is risky: Sooner or +later someone will paste a huge line into your application. + +

TQCString TQCString::stripWhiteSpace () const +

+Returns a new string that has white space removed from the start +and the end. +

White space means the decimal ASCII codes 9, 10, 11, 12, 13 and +32. +

Example: +

+    TQCString s = " space ";
+    TQCString t = s.stripWhiteSpace();           // t == "space"
+    
+ +

See also simplifyWhiteSpace(). + +

double TQCString::toDouble ( bool * ok = 0 ) const +

+Returns the string converted to a double value. +

If ok is not 0: *ok is set to FALSE if the string is not a +number, or if it has trailing garbage; otherwise *ok is set to +TRUE. + +

float TQCString::toFloat ( bool * ok = 0 ) const +

+Returns the string converted to a float value. +

If ok is not 0: *ok is set to FALSE if the string is not a +number, or if it has trailing garbage; otherwise *ok is set to +TRUE. + +

int TQCString::toInt ( bool * ok = 0 ) const +

+Returns the string converted to a int value. +

If ok is not 0: *ok is set to FALSE if the string is not a +number, or if it has trailing garbage; otherwise *ok is set to +TRUE. + +

long TQCString::toLong ( bool * ok = 0 ) const +

+Returns the string converted to a long value. +

If ok is not 0: *ok is set to FALSE if the string is not a +number, or if it has trailing garbage; otherwise *ok is set to +TRUE. + +

short TQCString::toShort ( bool * ok = 0 ) const +

+Returns the string converted to a short value. +

If ok is not 0: *ok is set to FALSE if the string is not a +number, is out of range, or if it has trailing garbage; otherwise +*ok is set to TRUE. + +

uint TQCString::toUInt ( bool * ok = 0 ) const +

+Returns the string converted to an unsigned int value. +

If ok is not 0: *ok is set to FALSE if the string is not a +number, or if it has trailing garbage; otherwise *ok is set to +TRUE. + +

ulong TQCString::toULong ( bool * ok = 0 ) const +

+Returns the string converted to an unsigned long value. +

If ok is not 0: *ok is set to FALSE if the string is not a +number, or if it has trailing garbage; otherwise *ok is set to +TRUE. + +

ushort TQCString::toUShort ( bool * ok = 0 ) const +

+Returns the string converted to an unsigned short value. +

If ok is not 0: *ok is set to FALSE if the string is not a +number, is out of range, or if it has trailing garbage; otherwise +*ok is set to TRUE. + +

bool TQCString::truncate ( uint pos ) +

+ +

Truncates the string at position pos. +

Equivalent to calling resize(pos+1). +

Example: +

+    TQCString s = "truncate this string";
+    s.truncate( 5 );                      // s == "trunc"
+    
+ +

See also resize(). + +

TQCString TQCString::upper () const +

+Returns a new string that is a copy of this string converted to upper case. +

Example: +

+    TQCString s( "Debit" );
+    TQCString t = s.upper();  // t == "DEBIT"
+    
+ +

See also lower() and Note on character comparisons. + +


Related Functions

+

bool operator!= ( const TQCString & s1, const TQCString & s2 ) +

+ +

+

Returns TRUE if s1 and s2 are different; otherwise returns FALSE. +

Equivalent to qstrcmp(s1, s2) != 0. + +

bool operator!= ( const TQCString & s1, const char * s2 ) +

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

+

Returns TRUE if s1 and s2 are different; otherwise returns FALSE. +

Equivalent to qstrcmp(s1, s2) != 0. + +

bool operator!= ( const char * s1, const TQCString & s2 ) +

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

+

Returns TRUE if s1 and s2 are different; otherwise returns FALSE. +

Equivalent to qstrcmp(s1, s2) != 0. + +

const TQCString operator+ ( const TQCString & s1, const TQCString & s2 ) +

+ +

+

Returns a string which consists of the concatenation of s1 and +s2. + +

const TQCString operator+ ( const TQCString & s1, const char * s2 ) +

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

+

Returns a string which consists of the concatenation of s1 and s2. + +

const TQCString operator+ ( const char * s1, const TQCString & s2 ) +

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

+

Returns a string which consists of the concatenation of s1 and s2. + +

const TQCString operator+ ( const TQCString & s, char c ) +

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

+

Returns a string which consists of the concatenation of s and c. + +

const TQCString operator+ ( char c, const TQCString & s ) +

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

+

Returns a string which consists of the concatenation of c and s. + +

bool operator< ( const TQCString & s1, const char * s2 ) +

+ +

+

Returns TRUE if s1 is less than s2; otherwise returns FALSE. +

Equivalent to qstrcmp(s1, s2) < 0. +

See also Note on character comparisons. + +

bool operator< ( const char * s1, const TQCString & s2 ) +

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

+

Returns TRUE if s1 is less than s2; otherwise returns FALSE. +

Equivalent to qstrcmp(s1, s2) < 0. +

See also Note on character comparisons. + +

TQDataStream & operator<< ( TQDataStream & s, const TQCString & str ) +

+ +

Writes string str to the stream s. +

See also Format of the TQDataStream operators. + +

bool operator<= ( const TQCString & s1, const char * s2 ) +

+ +

+

Returns TRUE if s1 is less than or equal to s2; otherwise +returns FALSE. +

Equivalent to qstrcmp(s1, s2) <= 0. +

See also Note on character comparisons. + +

bool operator<= ( const char * s1, const TQCString & s2 ) +

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

+

Returns TRUE if s1 is less than or equal to s2; otherwise +returns FALSE. +

Equivalent to qstrcmp(s1, s2) <= 0. +

See also Note on character comparisons. + +

bool operator== ( const TQCString & s1, const TQCString & s2 ) +

+ +

+

Returns TRUE if s1 and s2 are equal; otherwise returns FALSE. +

Equivalent to qstrcmp(s1, s2) == 0. + +

bool operator== ( const TQCString & s1, const char * s2 ) +

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

+

Returns TRUE if s1 and s2 are equal; otherwise returns FALSE. +

Equivalent to qstrcmp(s1, s2) == 0. + +

bool operator== ( const char * s1, const TQCString & s2 ) +

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

+

Returns TRUE if s1 and s2 are equal; otherwise returns FALSE. +

Equivalent to qstrcmp(s1, s2) == 0. + +

bool operator> ( const TQCString & s1, const char * s2 ) +

+ +

+

Returns TRUE if s1 is greater than s2; otherwise returns FALSE. +

Equivalent to qstrcmp(s1, s2) > 0. +

See also Note on character comparisons. + +

bool operator> ( const char * s1, const TQCString & s2 ) +

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

+

Returns TRUE if s1 is greater than s2; otherwise returns FALSE. +

Equivalent to qstrcmp(s1, s2) > 0. +

See also Note on character comparisons. + +

bool operator>= ( const TQCString & s1, const char * s2 ) +

+ +

+

Returns TRUE if s1 is greater than or equal to s2; otherwise +returns FALSE. +

Equivalent to qstrcmp(s1, s2) >= 0. +

See also Note on character comparisons. + +

bool operator>= ( const char * s1, const TQCString & s2 ) +

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

+

Returns TRUE if s1 is greater than or equal to s2; otherwise +returns FALSE. +

Equivalent to qstrcmp(s1, s2) >= 0. +

See also Note on character comparisons. + +

TQDataStream & operator>> ( TQDataStream & s, TQCString & str ) +

+ +

Reads a string into str from the stream s. +

See also Format of the TQDataStream operators. + +

void * qmemmove ( void * dst, const void * src, uint len ) +

+ +

This function is normally part of the C library. TQt implements +memmove() for platforms that do not provide it. +

memmove() copies len bytes from src into dst. The data +is copied correctly even if src and dst overlap. + +

int qstrcmp ( const char * str1, const char * str2 ) +

+ +

+

A safe strcmp() function. +

Compares str1 and str2. Returns a negative value if str1 +is less than str2, 0 if str1 is equal to str2 or a +positive value if str1 is greater than str2. +

Special case I: Returns 0 if str1 and str2 are both 0. +

Special case II: Returns a random nonzero value if str1 is 0 +or str2 is 0 (but not both). +

See also qstrncmp(), qstricmp(), qstrnicmp(), and Note on character comparisons. + +

char * qstrcpy ( char * dst, const char * src ) +

+ +

+

A safe strcpy() function. +

Copies all characters up to and including the '\0' from src +into dst and returns a pointer to dst. + +

char * qstrdup ( const char * src ) +

+ +

Returns a duplicate string. +

Allocates space for a copy of src, copies it, and returns a +pointer to the copy. If src is 0, it immediately returns 0. +

The returned string must be deleted using delete[]. + +

int qstricmp ( const char * str1, const char * str2 ) +

+ +

A safe stricmp() function. +

Compares str1 and str2 ignoring the case. +

Returns a negative value if str1 is less than str2, 0 if str1 is equal to str2 or a positive value if str1 is greater +than str2. +

Special case I: Returns 0 if str1 and str2 are both 0. +

Special case II: Returns a random nonzero value if str1 is 0 +or str2 is 0 (but not both). +

See also qstrcmp(), qstrncmp(), qstrnicmp(), and Note on character comparisons. + +

uint qstrlen ( const char * str ) +

+ +

+

A safe strlen function. +

Returns the number of characters that precede the terminating '\0'. +or 0 if str is 0. + +

int qstrncmp ( const char * str1, const char * str2, uint len ) +

+ +

+

A safe strncmp() function. +

Compares at most len bytes of str1 and str2. +

Returns a negative value if str1 is less than str2, 0 if str1 is equal to str2 or a positive value if str1 is greater +than str2. +

Special case I: Returns 0 if str1 and str2 are both 0. +

Special case II: Returns a random nonzero value if str1 is 0 +or str2 is 0 (but not both). +

See also qstrcmp(), qstricmp(), qstrnicmp(), and Note on character comparisons. + +

char * qstrncpy ( char * dst, const char * src, uint len ) +

+ +

A safe strncpy() function. +

Copies at most len bytes from src (stopping at len or the +terminating '\0' whichever comes first) into dst and returns a +pointer to dst. Guarantees that dst is '\0'-terminated. If +src or dst is 0, returns 0 immediately. +

See also qstrcpy(). + +

int qstrnicmp ( const char * str1, const char * str2, uint len ) +

+ +

A safe strnicmp() function. +

Compares at most len bytes of str1 and str2 ignoring the case. +

Returns a negative value if str1 is less than str2, 0 if str1 +is equal to str2 or a positive value if str1 is greater than str2. +

Special case I: Returns 0 if str1 and str2 are both 0. +

Special case II: Returns a random nonzero value if str1 is 0 +or str2 is 0 (but not both). +

See also qstrcmp(), qstrncmp(), qstricmp(), and Note on character comparisons. + + +


+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/qcursor-h.html b/doc/html/qcursor-h.html new file mode 100644 index 00000000..bbd490de --- /dev/null +++ b/doc/html/qcursor-h.html @@ -0,0 +1,198 @@ + + + + + +qcursor.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qcursor.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qcursor.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQCursor class
+**
+** Created : 940219
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQCURSOR_H
+#define TQCURSOR_H
+
+#ifndef QT_H
+#include "qpoint.h"
+#include "qshared.h"
+#endif // QT_H
+
+/*
+  ### The fake cursor has to go first with old qdoc.
+*/
+#ifdef QT_NO_CURSOR
+
+class Q_EXPORT TQCursor : public TQt
+{
+public:
+    static TQPoint pos();
+    static void	  setPos( int x, int y );
+    static void	  setPos( const TQPoint & );
+private:
+    TQCursor();
+};
+
+#endif // QT_NO_CURSOR
+
+#ifndef QT_NO_CURSOR
+
+struct TQCursorData;
+
+
+class Q_EXPORT TQCursor : public TQt
+{
+public:
+    TQCursor();				// create default arrow cursor
+    TQCursor( int shape );
+    TQCursor( const TQBitmap &bitmap, const TQBitmap &mask,
+	     int hotX=-1, int hotY=-1 );
+    TQCursor( const TQPixmap &pixmap,
+	     int hotX=-1, int hotY=-1 );
+    TQCursor( const TQCursor & );
+   ~TQCursor();
+    TQCursor &operator=( const TQCursor & );
+
+    int		  shape()   const;
+    void	  setShape( int );
+
+    const TQBitmap *bitmap() const;
+    const TQBitmap *mask()   const;
+    TQPoint	  hotSpot() const;
+
+#if defined(Q_WS_WIN)
+    HCURSOR	  handle()  const;
+    TQCursor( HCURSOR );
+#elif defined(Q_WS_X11)
+    HANDLE	  handle()  const;
+    TQCursor( HANDLE );
+#elif defined(Q_WS_MAC)
+    HANDLE handle() const;
+#elif defined(Q_WS_QWS)
+    HANDLE	  handle()  const;
+#endif
+
+    static TQPoint pos();
+    static void	  setPos( int x, int y );
+    static void	  setPos( const TQPoint & );
+
+    static void	  initialize();
+    static void	  cleanup();
+
+#if defined(Q_WS_X11)
+    static int 	  x11Screen();
+#endif
+private:
+    void	  setBitmap( const TQBitmap &bitmap, const TQBitmap &mask,
+				 int hotX, int hotY );
+    void	  update() const;
+    TQCursorData	 *data;
+    TQCursor	 *find_cur(int);
+#if defined(Q_WS_MAC)
+    friend void qt_mac_set_cursor(const TQCursor *c, const Point *p);
+#endif
+};
+
+
+#if !defined(QT_CLEAN_NAMESPACE)
+// CursorShape is defined in X11/X.h
+#ifdef CursorShape
+#define X_CursorShape CursorShape
+#undef CursorShape
+#endif
+typedef TQt::CursorShape TQCursorShape;
+#ifdef X_CursorShape
+#define CursorShape X_CursorShape
+#endif
+#endif
+
+
+/*****************************************************************************
+  TQCursor stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQCursor & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQCursor & );
+#endif
+#endif // QT_NO_CURSOR
+
+
+inline void TQCursor::setPos( const TQPoint &p )
+{
+    setPos( p.x(), p.y() );
+}
+
+#endif // TQCURSOR_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcursor-members.html b/doc/html/qcursor-members.html new file mode 100644 index 00000000..139d9b0f --- /dev/null +++ b/doc/html/qcursor-members.html @@ -0,0 +1,59 @@ + + + + + +TQCursor Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCursor

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcursor.html b/doc/html/qcursor.html new file mode 100644 index 00000000..daf5302e --- /dev/null +++ b/doc/html/qcursor.html @@ -0,0 +1,287 @@ + + + + + +TQCursor Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCursor Class Reference

+ +

The TQCursor class provides a mouse cursor with an arbitrary +shape. +More... +

#include <qcursor.h> +

Inherits TQt. +

List of all member functions. +

Public Members

+
    +
  • TQCursor ()
  • +
  • TQCursor ( int shape )
  • +
  • TQCursor ( const TQBitmap & bitmap, const TQBitmap & mask, int hotX = -1, int hotY = -1 )
  • +
  • TQCursor ( const TQPixmap & pixmap, int hotX = -1, int hotY = -1 )
  • +
  • TQCursor ( const TQCursor & c )
  • +
  • ~TQCursor ()
  • +
  • TQCursor & operator= ( const TQCursor & c )
  • +
  • int shape () const
  • +
  • void setShape ( int shape )
  • +
  • const TQBitmap * bitmap () const
  • +
  • const TQBitmap * mask () const
  • +
  • TQPoint hotSpot () const
  • +
  • HCURSOR handle () const
  • +
  • TQCursor ( HCURSOR handle )
  • +
  • HANDLE handle () const
  • +
+

Static Public Members

+ +

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQCursor & c )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQCursor & c )
  • +
+

Detailed Description

+ + +

The TQCursor class provides a mouse cursor with an arbitrary +shape. +

+ +

This class is mainly used to create mouse cursors that are +associated with particular widgets and to get and set the position +of the mouse cursor. +

TQt has a number of standard cursor shapes, but you can also make +custom cursor shapes based on a TQBitmap, a mask and a hotspot. +

To associate a cursor with a widget, use TQWidget::setCursor(). To +associate a cursor with all widgets (normally for a short period +of time), use TQApplication::setOverrideCursor(). +

To set a cursor shape use TQCursor::setShape() or use the TQCursor +constructor which takes the shape as argument, or you can use one +of the predefined cursors defined in the CursorShape enum. +

If you want to create a cursor with your own bitmap, either use +the TQCursor constructor which takes a bitmap and a mask or the +constructor which takes a pixmap as arguments. +

To set or get the position of the mouse cursor use the static +methods TQCursor::pos() and TQCursor::setPos(). +

Cursor Shapes
+

See also TQWidget, GUI Design Handbook: + Cursors, Widget Appearance and Style, and Implicitly and Explicitly Shared Classes. + +

On X11, TQt supports the Xcursor +library, which allows for full color icon themes. The table below +shows the cursor name used for each TQt::CursorShape value. If a +cursor cannot be found using the name shown below, a standard X11 +cursor will be used instead. Note: X11 does not provide +appropriate cursors for all possible TQt::CursorShape values. It +is possible that some cursors will be taken from the Xcursor +theme, while others will use an internal bitmap cursor. +

+
TQt::CursorShape Values Cursor Names +
TQt::ArrowCursor left_ptr +
TQt::UpArrowCursor up_arrow +
TQt::CrossCursor cross +
TQt::WaitCursor wait +
TQt::BusyCursor left_ptr_watch +
TQt::IbeamCursor ibeam +
TQt::SizeVerCursor size_ver +
TQt::SizeHorCursor size_hor +
TQt::SizeBDiagCursor size_bdiag +
TQt::SizeFDiagCursor size_fdiag +
TQt::SizeAllCursor size_all +
TQt::SplitVCursor split_v +
TQt::SplitHCursor split_h +
TQt::PointingHandCursor pointing_hand +
TQt::ForbiddenCursor forbidden +
TQt::WhatsThisCursor whats_this +
+ +

Member Function Documentation

+

TQCursor::TQCursor () +

+Constructs a cursor with the default arrow shape. + +

TQCursor::TQCursor ( int shape ) +

+Constructs a cursor with the specified shape. +

See CursorShape for a list of shapes. +

See also setShape(). + +

TQCursor::TQCursor ( const TQBitmap & bitmap, const TQBitmap & mask, int hotX = -1, int hotY = -1 ) +

+Constructs a custom bitmap cursor. +

bitmap and +mask make up the bitmap. +hotX and +hotY define the cursor's hot spot. +

If hotX is negative, it is set to the bitmap().width()/2. +If hotY is negative, it is set to the bitmap().height()/2. +

The cursor bitmap (B) and mask (M) bits are combined like this: +

    +
  • B=1 and M=1 gives black. +
  • B=0 and M=1 gives white. +
  • B=0 and M=0 gives transparent. +
  • B=1 and M=0 gives an undefined result. +
+

Use the global TQt color color0 to draw 0-pixels and color1 to +draw 1-pixels in the bitmaps. +

Valid cursor sizes depend on the display hardware (or the +underlying window system). We recommend using 32x32 cursors, +because this size is supported on all platforms. Some platforms +also support 16x16, 48x48 and 64x64 cursors. +

See also TQBitmap::TQBitmap() and TQBitmap::setMask(). + +

TQCursor::TQCursor ( const TQPixmap & pixmap, int hotX = -1, int hotY = -1 ) +

+Constructs a custom pixmap cursor. +

pixmap is the image. It is usual to give it a mask (set using +TQPixmap::setMask()). hotX and hotY define the cursor's hot +spot. +

If hotX is negative, it is set to the pixmap().width()/2. +If hotY is negative, it is set to the pixmap().height()/2. +

Valid cursor sizes depend on the display hardware (or the +underlying window system). We recommend using 32x32 cursors, +because this size is supported on all platforms. Some platforms +also support 16x16, 48x48 and 64x64 cursors. +

Currently, only black-and-white pixmaps can be used. +

See also TQPixmap::TQPixmap() and TQPixmap::setMask(). + +

TQCursor::TQCursor ( const TQCursor & c ) +

+Constructs a copy of the cursor c. + +

TQCursor::TQCursor ( HCURSOR handle ) +

+ +

Creates a cursor with the specified window system handle handle. +

Warning: +Portable in principle, but if you use it you are probably about to +do something non-portable. Be careful. + +

TQCursor::~TQCursor () +

+Destroys the cursor. + +

const TQBitmap * TQCursor::bitmap () const +

+Returns the cursor bitmap, or 0 if it is one of the standard +cursors. + +

void TQCursor::cleanup () [static] +

+Internal function that deinitializes the predefined cursors. +This function is called from the TQApplication destructor. +

See also initialize(). + +

HANDLE TQCursor::handle () const +

+Returns the window system cursor handle. +

Warning: +Portable in principle, but if you use it you are probably about to +do something non-portable. Be careful. + +

TQPoint TQCursor::hotSpot () const +

+Returns the cursor hot spot, or (0, 0) if it is one of the +standard cursors. + +

void TQCursor::initialize () [static] +

+Internal function that initializes the predefined cursors. +This function is called from the TQApplication constructor. +

See also cleanup(). + +

const TQBitmap * TQCursor::mask () const +

+Returns the cursor bitmap mask, or 0 if it is one of the standard +cursors. + +

TQCursor & TQCursor::operator= ( const TQCursor & c ) +

+Assigns c to this cursor and returns a reference to this +cursor. + +

TQPoint TQCursor::pos () [static] +

+Returns the position of the cursor (hot spot) in global screen +coordinates. +

You can call TQWidget::mapFromGlobal() to translate it to widget +coordinates. +

See also setPos(), TQWidget::mapFromGlobal(), and TQWidget::mapToGlobal(). + +

Examples: chart/canvasview.cpp, fileiconview/qfileiconview.cpp, and menu/menu.cpp. +

void TQCursor::setPos ( int x, int y ) [static] +

+Moves the cursor (hot spot) to the global screen position (x, +y). +

You can call TQWidget::mapToGlobal() to translate widget +coordinates to global screen coordinates. +

See also pos(), TQWidget::mapFromGlobal(), and TQWidget::mapToGlobal(). + +

void TQCursor::setPos ( const TQPoint & ) [static] +

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

+

void TQCursor::setShape ( int shape ) +

+Sets the cursor to the shape identified by shape. +

See CursorShape for the list of cursor shapes. +

See also shape(). + +

int TQCursor::shape () const +

+Returns the cursor shape identifier. The return value is one of +the CursorShape enum values (cast to an int). +

See also setShape(). + +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQCursor & c ) +

+ +Writes the cursor c to the stream s. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQCursor & c ) +

+ +Reads a cursor from the stream s and sets c to the read data. +

See also Format of the TQDataStream operators. + + +


+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/qcustomevent-members.html b/doc/html/qcustomevent-members.html new file mode 100644 index 00000000..a2a867ff --- /dev/null +++ b/doc/html/qcustomevent-members.html @@ -0,0 +1,51 @@ + + + + + +TQCustomEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCustomEvent

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcustomevent.html b/doc/html/qcustomevent.html new file mode 100644 index 00000000..3c727fa2 --- /dev/null +++ b/doc/html/qcustomevent.html @@ -0,0 +1,136 @@ + + + + + +TQCustomEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCustomEvent Class Reference

+ +

The TQCustomEvent class provides support for custom events. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQCustomEvent class provides support for custom events. +

+

TQCustomEvent is a generic event class for user-defined events. +User defined events can be sent to widgets or other TQObject +instances using TQApplication::postEvent() or +TQApplication::sendEvent(). Subclasses of TQObject can easily +receive custom events by implementing the TQObject::customEvent() +event handler function. +

TQCustomEvent objects should be created with a type ID that +uniquely identifies the event type. To avoid clashes with the +TQt-defined events types, the value should be at least as large as +the value of the "User" entry in the TQEvent::Type enum. +

TQCustomEvent contains a generic void* data member that may be used +for transferring event-specific data to the receiver. Note that +since events are normally delivered asynchronously, the data +pointer, if used, must remain valid until the event has been +received and processed. +

TQCustomEvent can be used as-is for simple user-defined event +types, but normally you will want to make a subclass of it for +your event types. In a subclass, you can add data members that are +suitable for your event type. +

Example: +

+    class ColorChangeEvent : public TQCustomEvent
+    {
+    public:
+        ColorChangeEvent( TQColor color )
+            : TQCustomEvent( 65432 ), c( color ) {}
+        TQColor color() const { return c; }
+    private:
+        TQColor c;
+    };
+
+    // To send an event of this custom event type:
+
+    ColorChangeEvent* ce = new ColorChangeEvent( blue );
+    TQApplication::postEvent( receiver, ce );  // TQt will delete it when done
+
+    // To receive an event of this custom event type:
+
+    void MyWidget::customEvent( TQCustomEvent * e )
+    {
+        if ( e->type() == 65432 ) {  // It must be a ColorChangeEvent
+            ColorChangeEvent* ce = (ColorChangeEvent*)e;
+            newColor = ce->color();
+        }
+    }
+    
+ +

See also TQWidget::customEvent(), TQApplication::notify(), and Event Classes. + +


Member Function Documentation

+

TQCustomEvent::TQCustomEvent ( int type ) +

+Constructs a custom event object with event type type. The +value of type must be at least as large as TQEvent::User. The +data pointer is set to 0. + +

TQCustomEvent::TQCustomEvent ( Type type, void * data ) +

+ +

Constructs a custom event object with the event type type and a +pointer to data. (Note that any int value may safely be cast to +TQEvent::Type). + +

void * TQCustomEvent::data () const +

+ +

Returns a pointer to the generic event data. +

See also setData(). + +

void TQCustomEvent::setData ( void * data ) +

+ +

Sets the generic data pointer to data. +

See also data(). + + +


+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/qcustommenuitem-members.html b/doc/html/qcustommenuitem-members.html new file mode 100644 index 00000000..8761e6d8 --- /dev/null +++ b/doc/html/qcustommenuitem-members.html @@ -0,0 +1,53 @@ + + + + + +TQCustomMenuItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCustomMenuItem

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qcustommenuitem.html b/doc/html/qcustommenuitem.html new file mode 100644 index 00000000..eab2a03d --- /dev/null +++ b/doc/html/qcustommenuitem.html @@ -0,0 +1,137 @@ + + + + + +TQCustomMenuItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCustomMenuItem Class Reference

+ +

The TQCustomMenuItem class is an abstract base class for custom menu items in popup menus. +More... +

#include <qmenudata.h> +

Inherits TQt. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQCustomMenuItem class is an abstract base class for custom menu items in popup menus. +

+

A custom menu item is a menu item that is defined by two pure +virtual functions, paint() and sizeHint(). The size hint tells the +menu how much space it needs to reserve for this item, and paint +is called whenever the item needs painting. +

This simple mechanism allows you to create all kinds of +application specific menu items. Examples are items showing +different fonts in a word processor or menus that allow the +selection of drawing utilities in a vector drawing program. +

A custom item is inserted into a popup menu with +TQPopupMenu::insertItem(). +

By default, a custom item can also have an icon and a keyboard +accelerator. You can reimplement fullSpan() to return TRUE if you +want the item to span the entire popup menu width. This is +particularly useful for labels. +

If you want the custom item to be treated just as a separator, +reimplement isSeparator() to return TRUE. +

Note that you can insert pixmaps or bitmaps as items into a popup +menu without needing to create a TQCustomMenuItem. However, custom +menu items offer more flexibility, and -- especially important +with Windows style -- provide the possibility of drawing the item +with a different color when it is highlighted. +

menu/menu.cpp shows a simple +example how custom menu items can be used. +

Note: the current implementation of TQCustomMenuItem will not +recognize shortcut keys that are from text with ampersands. Normal +accelerators work though. +

+

See also TQMenuData, TQPopupMenu, and Miscellaneous Classes. + +


Member Function Documentation

+

TQCustomMenuItem::TQCustomMenuItem () +

+Constructs a TQCustomMenuItem + +

TQCustomMenuItem::~TQCustomMenuItem () [virtual] +

+Destroys a TQCustomMenuItem + +

bool TQCustomMenuItem::fullSpan () const [virtual] +

+Returns TRUE if this item wants to span the entire popup menu +width; otherwise returns FALSE. The default is FALSE, meaning that +the menu may show an icon and an accelerator key for this item as +well. + +

bool TQCustomMenuItem::isSeparator () const [virtual] +

+Returns TRUE if this item is just a separator; otherwise returns +FALSE. + +

void TQCustomMenuItem::paint ( TQPainter * p, const TQColorGroup & cg, bool act, bool enabled, int x, int y, int w, int h ) [pure virtual] +

+ +

Paints this item. When this function is invoked, the painter p +is set to a font and foreground color suitable for a menu item +text using color group cg. The item is active if act is TRUE +and enabled if enabled is TRUE. The geometry values x, y, +w and h specify where to draw the item. +

Do not draw any background, this has already been done by the +popup menu according to the current GUI style. + +

void TQCustomMenuItem::setFont ( const TQFont & font ) [virtual] +

+Sets the font of the custom menu item to font. +

This function is called whenever the font in the popup menu +changes. For menu items that show their own individual font entry, +you want to ignore this. + +

TQSize TQCustomMenuItem::sizeHint () [pure virtual] +

+ +

Returns the item's size hint. + + +


+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/qd-actioneditor.png b/doc/html/qd-actioneditor.png new file mode 100644 index 00000000..d2825deb Binary files /dev/null and b/doc/html/qd-actioneditor.png differ diff --git a/doc/html/qd-colortool-name.png b/doc/html/qd-colortool-name.png new file mode 100644 index 00000000..cdce323f Binary files /dev/null and b/doc/html/qd-colortool-name.png differ diff --git a/doc/html/qd-databrowserwzd.png b/doc/html/qd-databrowserwzd.png new file mode 100644 index 00000000..a8e1f6df Binary files /dev/null and b/doc/html/qd-databrowserwzd.png differ diff --git a/doc/html/qd-databrowserwzdpage2.png b/doc/html/qd-databrowserwzdpage2.png new file mode 100644 index 00000000..32793466 Binary files /dev/null and b/doc/html/qd-databrowserwzdpage2.png differ diff --git a/doc/html/qd-databrowserwzdpage3.png b/doc/html/qd-databrowserwzdpage3.png new file mode 100644 index 00000000..45c850ca Binary files /dev/null and b/doc/html/qd-databrowserwzdpage3.png differ diff --git a/doc/html/qd-databrowserwzdpage4.png b/doc/html/qd-databrowserwzdpage4.png new file mode 100644 index 00000000..59154484 Binary files /dev/null and b/doc/html/qd-databrowserwzdpage4.png differ diff --git a/doc/html/qd-databrowserwzdpage5.png b/doc/html/qd-databrowserwzdpage5.png new file mode 100644 index 00000000..0f950d83 Binary files /dev/null and b/doc/html/qd-databrowserwzdpage5.png differ diff --git a/doc/html/qd-databrowserwzdpage6.png b/doc/html/qd-databrowserwzdpage6.png new file mode 100644 index 00000000..3530203f Binary files /dev/null and b/doc/html/qd-databrowserwzdpage6.png differ diff --git a/doc/html/qd-datatablewzd.png b/doc/html/qd-datatablewzd.png new file mode 100644 index 00000000..515b4df9 Binary files /dev/null and b/doc/html/qd-datatablewzd.png differ diff --git a/doc/html/qd-datatablewzdpage2.png b/doc/html/qd-datatablewzdpage2.png new file mode 100644 index 00000000..9312a3dc Binary files /dev/null and b/doc/html/qd-datatablewzdpage2.png differ diff --git a/doc/html/qd-datatablewzdpage3.png b/doc/html/qd-datatablewzdpage3.png new file mode 100644 index 00000000..96e73fdd Binary files /dev/null and b/doc/html/qd-datatablewzdpage3.png differ diff --git a/doc/html/qd-datatablewzdpage4.png b/doc/html/qd-datatablewzdpage4.png new file mode 100644 index 00000000..fb2609ba Binary files /dev/null and b/doc/html/qd-datatablewzdpage4.png differ diff --git a/doc/html/qd-datatablewzdpage5.png b/doc/html/qd-datatablewzdpage5.png new file mode 100644 index 00000000..2c5f64ee Binary files /dev/null and b/doc/html/qd-datatablewzdpage5.png differ diff --git a/doc/html/qd-dataviewwzd.png b/doc/html/qd-dataviewwzd.png new file mode 100644 index 00000000..a9c325ea Binary files /dev/null and b/doc/html/qd-dataviewwzd.png differ diff --git a/doc/html/qd-dataviewwzdpage2.png b/doc/html/qd-dataviewwzdpage2.png new file mode 100644 index 00000000..abc092d6 Binary files /dev/null and b/doc/html/qd-dataviewwzdpage2.png differ diff --git a/doc/html/qd-dataviewwzdpage3.png b/doc/html/qd-dataviewwzdpage3.png new file mode 100644 index 00000000..c6aa160d Binary files /dev/null and b/doc/html/qd-dataviewwzdpage3.png differ diff --git a/doc/html/qd-dataviewwzdpage4.png b/doc/html/qd-dataviewwzdpage4.png new file mode 100644 index 00000000..e830c0c7 Binary files /dev/null and b/doc/html/qd-dataviewwzdpage4.png differ diff --git a/doc/html/qd-helptoolbuttons3.png b/doc/html/qd-helptoolbuttons3.png new file mode 100644 index 00000000..dfb06a9b Binary files /dev/null and b/doc/html/qd-helptoolbuttons3.png differ diff --git a/doc/html/qd-mainwinwzd.png b/doc/html/qd-mainwinwzd.png new file mode 100644 index 00000000..17fc2d5d Binary files /dev/null and b/doc/html/qd-mainwinwzd.png differ diff --git a/doc/html/qd-mainwinwzdpage2.png b/doc/html/qd-mainwinwzdpage2.png new file mode 100644 index 00000000..f27a67bc Binary files /dev/null and b/doc/html/qd-mainwinwzdpage2.png differ diff --git a/doc/html/qd-preface.png b/doc/html/qd-preface.png new file mode 100644 index 00000000..2832f528 Binary files /dev/null and b/doc/html/qd-preface.png differ diff --git a/doc/html/qd-preferences-dlg.png b/doc/html/qd-preferences-dlg.png new file mode 100644 index 00000000..1ef446a5 Binary files /dev/null and b/doc/html/qd-preferences-dlg.png differ diff --git a/doc/html/qdatabrowser-h.html b/doc/html/qdatabrowser-h.html new file mode 100644 index 00000000..1d7ebede --- /dev/null +++ b/doc/html/qdatabrowser-h.html @@ -0,0 +1,221 @@ + + + + + +qdatabrowser.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdatabrowser.h

+ +

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


+
+/****************************************************************************
+**
+** Definition of TQDataBrowser class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQDATABROWSER_H
+#define TQDATABROWSER_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qstring.h"
+#include "qstringlist.h"
+#include "qsql.h"
+#include "qsqlindex.h"
+#include "qsqlcursor.h"
+#include "qsqlerror.h"
+#endif // QT_H
+
+#ifndef QT_NO_SQL_VIEW_WIDGETS
+
+class TQSqlForm;
+class TQDataBrowserPrivate;
+
+class Q_EXPORT TQDataBrowser : public TQWidget
+{
+    Q_OBJECT
+    Q_PROPERTY( bool boundaryChecking READ boundaryChecking WRITE setBoundaryChecking )
+    Q_PROPERTY( TQString filter READ filter WRITE setFilter )
+    Q_PROPERTY( TQStringList sort READ sort WRITE setSort )
+    Q_PROPERTY( bool confirmEdits READ confirmEdits WRITE setConfirmEdits )
+    Q_PROPERTY( bool confirmInsert READ confirmInsert WRITE setConfirmInsert )
+    Q_PROPERTY( bool confirmUpdate READ confirmUpdate WRITE setConfirmUpdate )
+    Q_PROPERTY( bool confirmDelete READ confirmDelete WRITE setConfirmDelete )
+    Q_PROPERTY( bool confirmCancels READ confirmCancels WRITE setConfirmCancels )
+    Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
+    Q_PROPERTY( bool autoEdit READ autoEdit WRITE setAutoEdit )
+
+public:
+    TQDataBrowser( TQWidget* parent=0, const char* name=0, WFlags fl = 0 );
+    ~TQDataBrowser();
+
+    enum Boundary {
+	Unknown,
+	None,
+	BeforeBeginning,
+	Beginning,
+	End,
+	AfterEnd
+    };
+
+    Boundary boundary();
+    void setBoundaryChecking( bool active );
+    bool boundaryChecking() const;
+
+    void setSort( const TQSqlIndex& sort );
+    void setSort( const TQStringList& sort );
+    TQStringList  sort() const;
+    void setFilter( const TQString& filter );
+    TQString filter() const;
+    virtual void setSqlCursor( TQSqlCursor* cursor, bool autoDelete = FALSE );
+    TQSqlCursor* sqlCursor() const;
+    virtual void setForm( TQSqlForm* form );
+    TQSqlForm* form();
+
+    virtual void setConfirmEdits( bool confirm );
+    virtual void setConfirmInsert( bool confirm );
+    virtual void setConfirmUpdate( bool confirm );
+    virtual void setConfirmDelete( bool confirm );
+    virtual void setConfirmCancels( bool confirm );
+    bool confirmEdits() const;
+    bool confirmInsert() const;
+    bool confirmUpdate() const;
+    bool confirmDelete() const;
+    bool confirmCancels() const;
+
+    virtual void setReadOnly( bool active );
+    bool isReadOnly() const;
+    virtual void setAutoEdit( bool autoEdit );
+    bool autoEdit() const;
+
+    virtual bool seek( int i, bool relative = FALSE );
+
+signals:
+    void firstRecordAvailable( bool available );
+    void lastRecordAvailable( bool available );
+    void nextRecordAvailable( bool available );
+    void prevRecordAvailable( bool available );
+
+    void currentChanged( const TQSqlRecord* record );
+    void primeInsert( TQSqlRecord* buf );
+    void primeUpdate( TQSqlRecord* buf );
+    void primeDelete( TQSqlRecord* buf );
+    void beforeInsert( TQSqlRecord* buf );
+    void beforeUpdate( TQSqlRecord* buf );
+    void beforeDelete( TQSqlRecord* buf );
+    void cursorChanged( TQSqlCursor::Mode mode );
+
+public slots:
+    virtual void refresh();
+
+    virtual void insert();
+    virtual void update();
+    virtual void del();
+
+    virtual void first();
+    virtual void last();
+    virtual void next();
+    virtual void prev();
+
+    virtual void readFields();
+    virtual void writeFields();
+    virtual void clearValues();
+
+    void updateBoundary();
+
+protected:
+    virtual bool insertCurrent();
+    virtual bool updateCurrent();
+    virtual bool deleteCurrent();
+    virtual bool currentEdited();
+
+    virtual TQSql::Confirm confirmEdit( TQSql::Op m );
+    virtual TQSql::Confirm confirmCancel( TQSql::Op m );
+
+    virtual void handleError( const TQSqlError& error );
+
+private:
+    typedef bool (TQSqlCursor::*Nav)();
+    bool preNav();
+    void postNav( bool primeUpd );
+    void nav( Nav nav );
+    TQDataBrowserPrivate* d;
+
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQDataBrowser( const TQDataBrowser & );
+    TQDataBrowser &operator=( const TQDataBrowser & );
+#endif
+};
+
+
+#endif
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatabrowser-members.html b/doc/html/qdatabrowser-members.html new file mode 100644 index 00000000..86a916fd --- /dev/null +++ b/doc/html/qdatabrowser-members.html @@ -0,0 +1,394 @@ + + + + + +TQDataBrowser Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDataBrowser

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatabrowser.html b/doc/html/qdatabrowser.html new file mode 100644 index 00000000..da6c3125 --- /dev/null +++ b/doc/html/qdatabrowser.html @@ -0,0 +1,715 @@ + + + + + +TQDataBrowser Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDataBrowser Class Reference
[sql module]

+ +

The TQDataBrowser class provides data manipulation and +navigation for data entry forms. +More... +

#include <qdatabrowser.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • bool autoEdit - whether the browser automatically applies edits
  • +
  • bool boundaryChecking - whether boundary checking is active
  • +
  • bool confirmCancels - whether the browser confirms cancel operations
  • +
  • bool confirmDelete - whether the browser confirms deletions
  • +
  • bool confirmEdits - whether the browser confirms edits
  • +
  • bool confirmInsert - whether the data browser confirms insertions
  • +
  • bool confirmUpdate - whether the browser confirms updates
  • +
  • TQString filter - the data browser's filter
  • +
  • bool readOnly - whether the browser is read-only
  • +
  • TQStringList sort - the data browser's sort
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQDataBrowser class provides data manipulation and +navigation for data entry forms. +

+ + +

A high-level API is provided for navigating through data records +in a cursor, for inserting, updating and deleting records, and for +refreshing data in the display. +

If you want a read-only form to present database data use +TQDataView; if you want a table-based presentation of your data use +TQDataTable. +

A TQDataBrowser is used to associate a dataset with a form in much +the same way as a TQDataTable associates a dataset with a table. +Once the data browser has been constructed it can be associated +with a dataset with setSqlCursor(), and with a form with +setForm(). Boundary checking, sorting and filtering can be set +with setBoundaryChecking(), setSort() and setFilter(), +respectively. +

The insertCurrent() function reads the fields from the default +form into the default cursor and performs the insert. The +updateCurrent() and deleteCurrent() functions perform similarly to +update and delete the current record respectively. +

The user can be asked to confirm all edits with setConfirmEdits(). +For more precise control use setConfirmInsert(), +setConfirmUpdate(), setConfirmDelete() and setConfirmCancels(). +Use setAutoEdit() to control the behaviour of the form when the +user edits a record and then navigates. +

The record set is navigated using first(), next(), prev(), last() +and seek(). The form's display is updated with refresh(). When +navigation takes place the firstRecordAvailable(), +lastRecordAvailable(), nextRecordAvailable() and +prevRecordAvailable() signals are emitted. When the cursor record +is changed due to navigation the cursorChanged() signal is +emitted. +

If you want finer control of the insert, update and delete +processes then you can use the lower level functions to perform +these operations as described below. +

The form is populated with data from the database with +readFields(). If the user is allowed to edit, (see setReadOnly()), +write the form's data back to the cursor's edit buffer with +writeFields(). You can clear the values in the form with +clearValues(). Editing is performed as follows: +

    +
  • insert When the data browser enters insertion mode it emits the +primeInsert() signal which you can connect to, for example to +pre-populate fields. Call writeFields() to write the user's edits to +the cursor's edit buffer then call insert() to insert the record +into the database. The beforeInsert() signal is emitted just before +the cursor's edit buffer is inserted into the database; connect to +this for example, to populate fields such as an auto-generated +primary key. +
  • update For updates the primeUpdate() signal is emitted when +the data browser enters update mode. After calling writeFields() +call update() to update the record and connect to the beforeUpdate() +signal to manipulate the user's data before the update takes place. +
  • delete For deletion the primeDelete() signal is emitted when +the data browser enters deletion mode. After calling writeFields() +call del() to delete the record and connect to the beforeDelete() +signal, for example to record an audit of the deleted record. +
+

See also Database Classes. + +


Member Type Documentation

+

TQDataBrowser::Boundary

+ +

This enum describes where the data browser is positioned. +

    +
  • TQDataBrowser::Unknown - the boundary cannot be determined (usually because +there is no default cursor, or the default cursor is not active). +
  • TQDataBrowser::None - the browser is not positioned on a boundary, but it is +positioned on a record somewhere in the middle. +
  • TQDataBrowser::BeforeBeginning - the browser is positioned before the +first available record. +
  • TQDataBrowser::Beginning - the browser is positioned at the first record. +
  • TQDataBrowser::End - the browser is positioned at the last +record. +
  • TQDataBrowser::AfterEnd - the browser is positioned after the last +available record. +
+

Member Function Documentation

+

TQDataBrowser::TQDataBrowser ( TQWidget * parent = 0, const char * name = 0, WFlags fl = 0 ) +

+Constructs a data browser which is a child of parent, with the +name name and widget flags set to fl. + +

TQDataBrowser::~TQDataBrowser () +

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

bool TQDataBrowser::autoEdit () const +

Returns TRUE if the browser automatically applies edits; otherwise returns FALSE. +See the "autoEdit" property for details. +

void TQDataBrowser::beforeDelete ( TQSqlRecord * buf ) [signal] +

+ +

This signal is emitted just before the cursor's edit buffer is +deleted from the database. The buf parameter points to the edit +buffer being deleted. You might connect to this signal to capture +some auditing information about the deletion. + +

void TQDataBrowser::beforeInsert ( TQSqlRecord * buf ) [signal] +

+ +

This signal is emitted just before the cursor's edit buffer is +inserted into the database. The buf parameter points to the +edit buffer being inserted. You might connect to this signal to +populate a generated primary key for example. + +

void TQDataBrowser::beforeUpdate ( TQSqlRecord * buf ) [signal] +

+ +

This signal is emitted just before the cursor's edit buffer is +updated in the database. The buf parameter points to the edit +buffer being updated. You might connect to this signal to capture +some auditing information about the update. + +

Boundary TQDataBrowser::boundary () +

+Returns an enum indicating the boundary status of the browser. +

This is achieved by moving the default cursor and checking the +position, however the current default form values will not be +altered. After checking for the boundary, the cursor is moved back +to its former position. See TQDataBrowser::Boundary. +

See also Boundary. + +

bool TQDataBrowser::boundaryChecking () const +

Returns TRUE if boundary checking is active; otherwise returns FALSE. +See the "boundaryChecking" property for details. +

void TQDataBrowser::clearValues () [virtual slot] +

+Clears all the values in the form. +

All the edit buffer field values are set to their 'zero state', +e.g. 0 for numeric fields and "" for string fields. Then the +widgets are updated using the property map. For example, a +combobox that is property-mapped to integers would scroll to the +first item. See the TQSqlPropertyMap constructor for the default +mappings of widgets to properties. + +

TQSql::Confirm TQDataBrowser::confirmCancel ( TQSql::Op m ) [virtual protected] +

+Protected virtual function which returns a confirmation for +cancelling an edit mode m. Derived classes can reimplement this +function and provide their own confirmation dialog. The default +implementation uses a message box which prompts the user to +confirm the edit action. + +

bool TQDataBrowser::confirmCancels () const +

Returns TRUE if the browser confirms cancel operations; otherwise returns FALSE. +See the "confirmCancels" property for details. +

bool TQDataBrowser::confirmDelete () const +

Returns TRUE if the browser confirms deletions; otherwise returns FALSE. +See the "confirmDelete" property for details. +

TQSql::Confirm TQDataBrowser::confirmEdit ( TQSql::Op m ) [virtual protected] +

+Protected virtual function which returns a confirmation for an +edit of mode m. Derived classes can reimplement this function +and provide their own confirmation dialog. The default +implementation uses a message box which prompts the user to +confirm the edit action. + +

bool TQDataBrowser::confirmEdits () const +

Returns TRUE if the browser confirms edits; otherwise returns FALSE. +See the "confirmEdits" property for details. +

bool TQDataBrowser::confirmInsert () const +

Returns TRUE if the data browser confirms insertions; otherwise returns FALSE. +See the "confirmInsert" property for details. +

bool TQDataBrowser::confirmUpdate () const +

Returns TRUE if the browser confirms updates; otherwise returns FALSE. +See the "confirmUpdate" property for details. +

void TQDataBrowser::currentChanged ( const TQSqlRecord * record ) [signal] +

+ +

This signal is emitted whenever the current cursor position +changes. The record parameter points to the contents of the +current cursor's record. + +

bool TQDataBrowser::currentEdited () [virtual protected] +

+Returns TRUE if the form's edit buffer differs from the current +cursor buffer; otherwise returns FALSE. + +

void TQDataBrowser::cursorChanged ( TQSqlCursor::Mode mode ) [signal] +

+ +

This signal is emitted whenever the cursor record was changed due +to navigation. The mode parameter is the edit that just took +place, e.g. Insert, Update or Delete. See TQSqlCursor::Mode. + +

void TQDataBrowser::del () [virtual slot] +

+Performs a delete operation on the data browser's cursor. If there +is no default cursor or no default form, nothing happens. +

Otherwise, the following happens: +

The current form's record is deleted from the database, providing +that the data browser is not in insert mode. If the data browser +is actively inserting a record (see insert()), the insert action +is canceled, and the browser navigates to the last valid record +that was current. If there is an error, handleError() is called. + +

bool TQDataBrowser::deleteCurrent () [virtual protected] +

+Performs a delete on the default cursor using the values from the +default form and updates the default form. If there is no default +form or no default cursor, nothing happens. If the deletion was +successful, the cursor is repositioned to the nearest record and +TRUE is returned. The nearest record is the next record if there +is one otherwise the previous record if there is one. If an error +occurred during the deletion from the database, handleError() is +called and FALSE is returned. +

See also cursor, form(), and handleError(). + +

TQString TQDataBrowser::filter () const +

Returns the data browser's filter. +See the "filter" property for details. +

void TQDataBrowser::first () [virtual slot] +

+Moves the default cursor to the first record and refreshes the +default form to display this record. If there is no default form +or no default cursor, nothing happens. If the data browser +successfully navigated to the first record, the default cursor is +primed for update and the primeUpdate() signal is emitted. +

If the browser is already positioned on the first record nothing +happens. +

+

void TQDataBrowser::firstRecordAvailable ( bool available ) [signal] +

+ +

This signal is emitted whenever the position of the cursor +changes. The available parameter indicates whether or not the +first record in the default cursor is available. + +

TQSqlForm * TQDataBrowser::form () +

+Returns the data browser's default form or 0 if no form has been +set. + +

void TQDataBrowser::handleError ( const TQSqlError & error ) [virtual protected] +

+Virtual function which handles the error error. The default +implementation warns the user with a message box. + +

void TQDataBrowser::insert () [virtual slot] +

+Performs an insert operation on the data browser's cursor. If +there is no default cursor or no default form, nothing happens. +

If auto-editing is on (see setAutoEdit()), the following happens: +

    +
  • If the browser is already actively inserting a record, +the current form's data is inserted into the database. +
  • If the browser is not inserting a record, but the current record +was changed by the user, the record is updated in the database with +the current form's data (i.e. with the changes). +
+

If there is an error handling any of the above auto-edit actions, +handleError() is called and no insert or update is performed. +

If no error occurred, or auto-editing is not enabled, the data browser +begins actively inserting a record into the database by performing the +following actions: +

    +
  • The default cursor is primed for insert using TQSqlCursor::primeInsert(). +
  • The primeInsert() signal is emitted. +
  • The form is updated with the values in the default cursor's. +edit buffer so that the user can fill in the values to be inserted. +
+

+

bool TQDataBrowser::insertCurrent () [virtual protected] +

+Reads the fields from the default form into the default cursor and +performs an insert on the default cursor. If there is no default +form or no default cursor, nothing happens. If an error occurred +during the insert into the database, handleError() is called and +FALSE is returned. If the insert was successfull, the cursor is +refreshed and relocated to the newly inserted record, the +cursorChanged() signal is emitted, and TRUE is returned. +

See also cursorChanged(), sqlCursor(), form(), and handleError(). + +

bool TQDataBrowser::isReadOnly () const +

Returns TRUE if the browser is read-only; otherwise returns FALSE. +See the "readOnly" property for details. +

void TQDataBrowser::last () [virtual slot] +

+Moves the default cursor to the last record and refreshes the +default form to display this record. If there is no default form +or no default cursor, nothing happens. If the data browser +successfully navigated to the last record, the default cursor is +primed for update and the primeUpdate() signal is emitted. +

If the browser is already positioned on the last record nothing +happens. + +

void TQDataBrowser::lastRecordAvailable ( bool available ) [signal] +

+ +

This signal is emitted whenever the position of the cursor +changes. The available parameter indicates whether or not the +last record in the default cursor is available. + +

void TQDataBrowser::next () [virtual slot] +

+Moves the default cursor to the next record and refreshes the +default form to display this record. If there is no default form +or no default cursor, nothing happens. If the data browser +successfully navigated to the next record, the default cursor is +primed for update and the primeUpdate() signal is emitted. +

If the browser is positioned on the last record nothing happens. + +

void TQDataBrowser::nextRecordAvailable ( bool available ) [signal] +

+ +

This signal is emitted whenever the position of the cursor +changes. The available parameter indicates whether or not the +next record in the default cursor is available. + +

void TQDataBrowser::prev () [virtual slot] +

+Moves the default cursor to the previous record and refreshes the +default form to display this record. If there is no default form +or no default cursor, nothing happens. If the data browser +successfully navigated to the previous record, the default cursor +is primed for update and the primeUpdate() signal is emitted. +

If the browser is positioned on the first record nothing happens. + +

void TQDataBrowser::prevRecordAvailable ( bool available ) [signal] +

+ +

This signal is emitted whenever the position of the cursor +changes. The available parameter indicates whether or not the +previous record in the default cursor is available. + +

void TQDataBrowser::primeDelete ( TQSqlRecord * buf ) [signal] +

+ +

This signal is emitted when the data browser enters deletion mode. +The buf parameter points to the record buffer being deleted. +(Note that TQSqlCursor::primeDelete() is not called on the +default cursor, as this would corrupt values in the form.) +Connect to this signal in order to, for example, save a copy of +the deleted record for auditing purposes. +

See also del(). + +

void TQDataBrowser::primeInsert ( TQSqlRecord * buf ) [signal] +

+ +

This signal is emitted when the data browser enters insertion +mode. The buf parameter points to the record buffer that is to +be inserted. Connect to this signal to, for example, prime the +record buffer with default data values, auto-numbered fields etc. +(Note that TQSqlCursor::primeInsert() is not called on the +default cursor, as this would corrupt values in the form.) +

See also insert(). + +

void TQDataBrowser::primeUpdate ( TQSqlRecord * buf ) [signal] +

+ +

This signal is emitted when the data browser enters update mode. +Note that during navigation (first(), last(), next(), prev()), +each record that is shown in the default form is primed for +update. The buf parameter points to the record buffer being +updated. (Note that TQSqlCursor::primeUpdate() is not called on +the default cursor, as this would corrupt values in the form.) +Connect to this signal in order to, for example, keep track of +which records have been updated, perhaps for auditing purposes. +

See also update(). + +

void TQDataBrowser::readFields () [virtual slot] +

+Reads the fields from the default cursor's edit buffer and +displays them in the form. If there is no default cursor or no +default form, nothing happens. + +

void TQDataBrowser::refresh () [virtual slot] +

+Refreshes the data browser's data using the default cursor. The +browser's current filter and sort are applied if they have been +set. +

See also filter and sort. + +

bool TQDataBrowser::seek ( int i, bool relative = FALSE ) [virtual] +

+Moves the default cursor to the record specified by the index i +and refreshes the default form to display this record. If there is +no default form or no default cursor, nothing happens. If relative is TRUE (the default is FALSE), the cursor is moved +relative to its current position. If the data browser successfully +navigated to the desired record, the default cursor is primed for +update and the primeUpdate() signal is emitted. +

If the browser is already positioned on the desired record nothing +happens. + +

void TQDataBrowser::setAutoEdit ( bool autoEdit ) [virtual] +

Sets whether the browser automatically applies edits to autoEdit. +See the "autoEdit" property for details. +

void TQDataBrowser::setBoundaryChecking ( bool active ) +

Sets whether boundary checking is active to active. +See the "boundaryChecking" property for details. +

void TQDataBrowser::setConfirmCancels ( bool confirm ) [virtual] +

Sets whether the browser confirms cancel operations to confirm. +See the "confirmCancels" property for details. +

void TQDataBrowser::setConfirmDelete ( bool confirm ) [virtual] +

Sets whether the browser confirms deletions to confirm. +See the "confirmDelete" property for details. +

void TQDataBrowser::setConfirmEdits ( bool confirm ) [virtual] +

Sets whether the browser confirms edits to confirm. +See the "confirmEdits" property for details. +

void TQDataBrowser::setConfirmInsert ( bool confirm ) [virtual] +

Sets whether the data browser confirms insertions to confirm. +See the "confirmInsert" property for details. +

void TQDataBrowser::setConfirmUpdate ( bool confirm ) [virtual] +

Sets whether the browser confirms updates to confirm. +See the "confirmUpdate" property for details. +

void TQDataBrowser::setFilter ( const TQString & filter ) +

Sets the data browser's filter to filter. +See the "filter" property for details. +

void TQDataBrowser::setForm ( TQSqlForm * form ) [virtual] +

+Sets the browser's default form to form. The cursor and all +navigation and data manipulation functions that the browser +provides become available to the form. + +

void TQDataBrowser::setReadOnly ( bool active ) [virtual] +

Sets whether the browser is read-only to active. +See the "readOnly" property for details. +

void TQDataBrowser::setSort ( const TQStringList & sort ) +

Sets the data browser's sort to sort. +See the "sort" property for details. +

void TQDataBrowser::setSort ( const TQSqlIndex & sort ) +

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

Sets the data browser's sort to the TQSqlIndex sort. To apply +the new sort, use refresh(). +

+

void TQDataBrowser::setSqlCursor ( TQSqlCursor * cursor, bool autoDelete = FALSE ) [virtual] +

+Sets the default cursor used by the data browser to cursor. If +autoDelete is TRUE (the default is FALSE), the data browser +takes ownership of the cursor pointer, which will be deleted +when the browser is destroyed, or when setSqlCursor() is called +again. To activate the cursor use refresh(). The cursor's edit +buffer is used in the default form to browse and edit records. +

See also sqlCursor(), form(), and setForm(). + +

TQStringList TQDataBrowser::sort () const +

Returns the data browser's sort. +See the "sort" property for details. +

TQSqlCursor * TQDataBrowser::sqlCursor () const +

+Returns the default cursor used for navigation, or 0 if there is +no default cursor. +

See also setSqlCursor(). + +

void TQDataBrowser::update () [virtual slot] +

+Performs an update operation on the data browser's cursor. +

If there is no default cursor or no default form, nothing happens. +Otherwise, the following happens: +

If the data browser is actively inserting a record (see insert()), +that record is inserted into the database using insertCurrent(). +Otherwise, the database is updated with the current form's data +using updateCurrent(). If there is an error handling either +action, handleError() is called. + +

void TQDataBrowser::updateBoundary () [slot] +

+If boundaryChecking() is TRUE, checks the boundary of the current +default cursor and emits signals which indicate the position of +the cursor. + +

bool TQDataBrowser::updateCurrent () [virtual protected] +

+Reads the fields from the default form into the default cursor and +performs an update on the default cursor. If there is no default +form or no default cursor, nothing happens. If an error occurred +during the update on the database, handleError() is called and +FALSE is returned. If the update was successfull, the cursor is +refreshed and relocated to the updated record, the cursorChanged() +signal is emitted, and TRUE is returned. +

See also cursor, form(), and handleError(). + +

void TQDataBrowser::writeFields () [virtual slot] +

+Writes the form's data to the default cursor's edit buffer. If +there is no default cursor or no default form, nothing happens. + +

Property Documentation

+

bool autoEdit

+

This property holds whether the browser automatically applies edits. +

The default value for this property is TRUE. When the user begins +an insertion or an update on a form there are two possible +outcomes when they navigate to another record: +

    +
  • the insert or update is is performed -- this occurs if autoEdit is TRUE +
  • the insert or update is discarded -- this occurs if autoEdit is FALSE +
+ +

Set this property's value with setAutoEdit() and get this property's value with autoEdit(). +

bool boundaryChecking

+

This property holds whether boundary checking is active. +

When boundary checking is active (the default), signals are +emitted indicating the current position of the default cursor. +

See also boundary(). + +

Set this property's value with setBoundaryChecking() and get this property's value with boundaryChecking(). +

bool confirmCancels

+

This property holds whether the browser confirms cancel operations. +

If this property is TRUE, all cancels must be confirmed by the +user through a message box (this behavior can be changed by +overriding the confirmCancel() function), otherwise all cancels +occur immediately. The default is FALSE. +

See also confirmEdits and confirmCancel(). + +

Set this property's value with setConfirmCancels() and get this property's value with confirmCancels(). +

bool confirmDelete

+

This property holds whether the browser confirms deletions. +

If this property is TRUE, the browser confirms deletions, +otherwise deletions happen immediately. +

See also confirmCancels, confirmEdits, confirmUpdate, confirmInsert, and confirmEdit(). + +

Set this property's value with setConfirmDelete() and get this property's value with confirmDelete(). +

bool confirmEdits

+

This property holds whether the browser confirms edits. +

If this property is TRUE, the browser confirms all edit operations +(insertions, updates and deletions), otherwise all edit operations +happen immediately. Confirmation is achieved by presenting the +user with a message box -- this behavior can be changed by +reimplementing the confirmEdit() function, +

See also confirmEdit(), confirmCancels, confirmInsert, confirmUpdate, and confirmDelete. + +

Set this property's value with setConfirmEdits() and get this property's value with confirmEdits(). +

bool confirmInsert

+

This property holds whether the data browser confirms insertions. +

If this property is TRUE, the browser confirms insertions, +otherwise insertions happen immediately. +

See also confirmCancels, confirmEdits, confirmUpdate, confirmDelete, and confirmEdit(). + +

Set this property's value with setConfirmInsert() and get this property's value with confirmInsert(). +

bool confirmUpdate

+

This property holds whether the browser confirms updates. +

If this property is TRUE, the browser confirms updates, otherwise +updates happen immediately. +

See also confirmCancels, confirmEdits, confirmInsert, confirmDelete, and confirmEdit(). + +

Set this property's value with setConfirmUpdate() and get this property's value with confirmUpdate(). +

TQString filter

+

This property holds the data browser's filter. +

The filter applies to the data shown in the browser. Call +refresh() to apply the new filter. A filter is a string containing +a SQL WHERE clause without the WHERE keyword, e.g. "id>1000", +"name LIKE 'A%'", etc. +

There is no default filter. +

See also sort. + +

Set this property's value with setFilter() and get this property's value with filter(). +

bool readOnly

+

This property holds whether the browser is read-only. +

The default is FALSE, i.e. data can be edited. If the data browser +is read-only, no database edits will be allowed. + +

Set this property's value with setReadOnly() and get this property's value with isReadOnly(). +

TQStringList sort

+

This property holds the data browser's sort. +

The data browser's sort affects the order in which records are +viewed in the browser. Call refresh() to apply the new sort. +

When retrieving the sort property, a string list is returned in +the form 'fieldname order', e.g. 'id ASC', 'surname DESC'. +

There is no default sort. +

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

+    TQStringList list = myDataBrowser.sort();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ + +

Set this property's value with setSort() and get this property's value with sort(). + +


+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/qdatapump-members.html b/doc/html/qdatapump-members.html new file mode 100644 index 00000000..9527cb53 --- /dev/null +++ b/doc/html/qdatapump-members.html @@ -0,0 +1,89 @@ + + + + + +TQDataPump Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDataPump

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatapump.html b/doc/html/qdatapump.html new file mode 100644 index 00000000..15213161 --- /dev/null +++ b/doc/html/qdatapump.html @@ -0,0 +1,74 @@ + + + + + +TQDataPump Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDataPump Class Reference
[obsolete]

+ +

The TQDataPump class moves data from a TQDataSource to a TQDataSink during event processing. +More... +

#include <qasyncio.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • TQDataPump ( TQDataSource * data_source, TQDataSink * data_sink )
  • +
+

Detailed Description

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

The TQDataPump class moves data from a TQDataSource to a TQDataSink during event processing. +

For a TQDataSource to provide data to a TQDataSink, a controller must exist +to examine the TQDataSource::readyToSend() and TQDataSink::readyToReceive() +methods and respond to the TQASyncIO::activate() signal of the source and +sink. One very useful way to do this is interleaved with other event +processing. TQDataPump provides this - create a pipe between a source +and a sink, and data will be moved during subsequent event processing. +

Note that each source can only provide data to one sink and each sink +can only receive data from one source (although it is tquite possible +to write a multiplexing sink that is multiple sources). + +


Member Function Documentation

+

TQDataPump::TQDataPump ( TQDataSource * data_source, TQDataSink * data_sink ) +

+Constructs a TQDataPump to move data from a given data_source +to a given data_sink. + + +

+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/qdatasink-members.html b/doc/html/qdatasink-members.html new file mode 100644 index 00000000..4eadbc70 --- /dev/null +++ b/doc/html/qdatasink-members.html @@ -0,0 +1,52 @@ + + + + + +TQDataSink Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDataSink

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatasink.html b/doc/html/qdatasink.html new file mode 100644 index 00000000..3ff7aefd --- /dev/null +++ b/doc/html/qdatasink.html @@ -0,0 +1,93 @@ + + + + + +TQDataSink Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDataSink Class Reference
[obsolete]

+ +

The TQDataSink class is an asynchronous consumer of data. +More... +

#include <qasyncio.h> +

Inherits TQAsyncIO. +

List of all member functions. +

Public Members

+ +

Detailed Description

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

The TQDataSink class is an asynchronous consumer of data. +

A data sink is an object which receives data from some source in an +asynchronous manner. This means that at some time not determined by +the data sink, blocks of data are given to it from processing. The +data sink is able to limit the maximum size of such blocks which it +is currently able to process. +

See also TQAsyncIO, TQDataSource, and TQDataPump. + +


Member Function Documentation

+

void TQDataSink::eof () [pure virtual] +

+ +

This function will be called when no more data is available for +processing. + +

void TQDataSink::maybeReady () +

+This should be called whenever readyToReceive() might have become non-zero. +It is merely calls TQAsyncIO::ready() if readyToReceive() is non-zero. + +

int TQDataSink::readyToReceive () [pure virtual] +

+ +

The data sink should return a value indicating how much data it is ready +to consume. This may be 0. + +

void TQDataSink::receive ( const uchar *, int count ) [pure virtual] +

+ +

This function is called to provide data for the data sink. The count +will be no more than the amount indicated by the most recent call to +readyToReceive(). The sink must use all the provided data. + + +


+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/qdatasource-members.html b/doc/html/qdatasource-members.html new file mode 100644 index 00000000..accce671 --- /dev/null +++ b/doc/html/qdatasource-members.html @@ -0,0 +1,54 @@ + + + + + +TQDataSource Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDataSource

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatasource.html b/doc/html/qdatasource.html new file mode 100644 index 00000000..33e2131e --- /dev/null +++ b/doc/html/qdatasource.html @@ -0,0 +1,120 @@ + + + + + +TQDataSource Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDataSource Class Reference
[obsolete]

+ +

The TQDataSource class is an asynchronous producer of data. +More... +

#include <qasyncio.h> +

Inherits TQAsyncIO. +

Inherited by TQIODeviceSource. +

List of all member functions. +

Public Members

+ +

Detailed Description

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

The TQDataSource class is an asynchronous producer of data. +

A data source is an object which provides data from some source in an +asynchronous manner. This means that at some time not determined by +the data source, blocks of data will be taken from it for processing. +The data source is able to limit the maximum size of such blocks which +it is currently able to provide. +

See also TQAsyncIO, TQDataSink, and TQDataPump. + +


Member Function Documentation

+

void TQDataSource::enableRewind ( bool on ) [virtual] +

+If this function is called with on set to TRUE, and rewindable() +is TRUE, then the data source must take measures to allow the rewind() +function to subsequently operate as described. If rewindable() is FALSE, +the function should call TQDataSource::enableRewind(), which aborts with +a qFatal() error. +

For example, a network connection may choose to use a disk cache +of input only if rewinding is enabled before the first buffer-full of +data is discarded, returning FALSE in rewindable() if that first buffer +is discarded. + +

Reimplemented in TQIODeviceSource. +

void TQDataSource::maybeReady () +

+This should be called whenever readyToSend() might have become non-zero. +It is merely calls TQAsyncIO::ready() if readyToSend() is non-zero. + +

int TQDataSource::readyToSend () [pure virtual] +

+ +

The data source should return a value indicating how much data it is ready +to provide. This may be 0. If the data source knows it will never be +able to provide any more data (until after a rewind()), it may return -1. + +

Reimplemented in TQIODeviceSource. +

void TQDataSource::rewind () [virtual] +

+This function rewinds the data source. This may only be called if +enableRewind(TRUE) has been previously called. + +

Reimplemented in TQIODeviceSource. +

bool TQDataSource::rewindable () const [virtual] +

+This function should return TRUE if the data source can be rewound. +

The default returns FALSE. + +

Reimplemented in TQIODeviceSource. +

void TQDataSource::sendTo ( TQDataSink *, int count ) [pure virtual] +

+ +

This function is called to extract data from the source, by sending +it to the given data sink. The count will be no more than the amount +indicated by the most recent call to readyToSend(). The source must +use all the provided data, and the sink will be prepared to accept at +least this much data. + +

Reimplemented in TQIODeviceSource. + +


+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/qdatastream-h.html b/doc/html/qdatastream-h.html new file mode 100644 index 00000000..c2175e6a --- /dev/null +++ b/doc/html/qdatastream-h.html @@ -0,0 +1,238 @@ + + + + + +qdatastream.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdatastream.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdatastream.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQDataStream class
+**
+** Created : 930831
+**
+** 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 retquirements 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 TQDATASTREAM_H
+#define TQDATASTREAM_H
+
+#ifndef QT_H
+#include "qiodevice.h"
+#include "qstring.h"
+#endif // QT_H
+
+#ifndef QT_NO_DATASTREAM
+class Q_EXPORT TQDataStream				// data stream class
+{
+public:
+    TQDataStream();
+    TQDataStream( TQIODevice * );
+    TQDataStream( TQByteArray, int mode );
+    virtual ~TQDataStream();
+
+    TQIODevice	*device() const;
+    void	 setDevice( TQIODevice * );
+    void	 unsetDevice();
+
+    bool	 atEnd() const;
+    bool	 eof() const;
+
+    enum ByteOrder { BigEndian, LittleEndian };
+    int		 byteOrder()	const;
+    void	 setByteOrder( int );
+
+    bool	 isPrintableData() const;
+    void	 setPrintableData( bool );
+
+    int		 version() const;
+    void	 setVersion( int );
+
+    TQDataStream &operator>>( Q_INT8 &i );
+    TQDataStream &operator>>( Q_UINT8 &i );
+    TQDataStream &operator>>( Q_INT16 &i );
+    TQDataStream &operator>>( Q_UINT16 &i );
+    TQDataStream &operator>>( Q_INT32 &i );
+    TQDataStream &operator>>( Q_UINT32 &i );
+    TQDataStream &operator>>( Q_INT64 &i );
+    TQDataStream &operator>>( Q_UINT64 &i );
+#if !defined(Q_OS_WIN64)
+    TQDataStream &operator>>( Q_LONG &i );
+    TQDataStream &operator>>( Q_ULONG &i );
+#endif
+
+    TQDataStream &operator>>( float &f );
+    TQDataStream &operator>>( double &f );
+    TQDataStream &operator>>( char *&str );
+
+    TQDataStream &operator<<( Q_INT8 i );
+    TQDataStream &operator<<( Q_UINT8 i );
+    TQDataStream &operator<<( Q_INT16 i );
+    TQDataStream &operator<<( Q_UINT16 i );
+    TQDataStream &operator<<( Q_INT32 i );
+    TQDataStream &operator<<( Q_UINT32 i );
+    TQDataStream &operator<<( Q_INT64 i );
+    TQDataStream &operator<<( Q_UINT64 i );
+#if !defined(Q_OS_WIN64)
+    TQDataStream &operator<<( Q_LONG i );
+    TQDataStream &operator<<( Q_ULONG i );
+#endif
+    TQDataStream &operator<<( float f );
+    TQDataStream &operator<<( double f );
+    TQDataStream &operator<<( const char *str );
+
+    TQDataStream &readBytes( char *&, uint &len );
+    TQDataStream &readRawBytes( char *, uint len );
+
+    TQDataStream &writeBytes( const char *, uint len );
+    TQDataStream &writeRawBytes( const char *, uint len );
+
+private:
+    TQIODevice	*dev;
+    bool	 owndev;
+    int		 byteorder;
+    bool	 printable;
+    bool	 noswap;
+    int		 ver;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQDataStream( const TQDataStream & );
+    TQDataStream &operator=( const TQDataStream & );
+#endif
+};
+
+
+/*****************************************************************************
+  TQDataStream inline functions
+ *****************************************************************************/
+
+inline TQIODevice *TQDataStream::device() const
+{ return dev; }
+
+inline bool TQDataStream::atEnd() const
+{ return dev ? dev->atEnd() : TRUE; }
+
+inline bool TQDataStream::eof() const
+{ return atEnd(); }
+
+inline int TQDataStream::byteOrder() const
+{ return byteorder; }
+
+inline bool TQDataStream::isPrintableData() const
+{ return printable; }
+
+inline void TQDataStream::setPrintableData( bool p )
+{ printable = p; }
+
+inline int TQDataStream::version() const
+{ return ver; }
+
+inline void TQDataStream::setVersion( int v )
+{ ver = v; }
+
+inline TQDataStream &TQDataStream::operator>>( Q_UINT8 &i )
+{ return *this >> (Q_INT8&)i; }
+
+inline TQDataStream &TQDataStream::operator>>( Q_UINT16 &i )
+{ return *this >> (Q_INT16&)i; }
+
+inline TQDataStream &TQDataStream::operator>>( Q_UINT32 &i )
+{ return *this >> (Q_INT32&)i; }
+
+inline TQDataStream &TQDataStream::operator>>( Q_UINT64 &i )
+{ return *this >> (Q_INT64&)i; }
+
+#if !defined(Q_OS_WIN64)
+inline TQDataStream &TQDataStream::operator>>( Q_ULONG &i )
+{ return *this >> (Q_LONG&)i; }
+#endif
+
+inline TQDataStream &TQDataStream::operator<<( Q_UINT8 i )
+{ return *this << (Q_INT8)i; }
+
+inline TQDataStream &TQDataStream::operator<<( Q_UINT16 i )
+{ return *this << (Q_INT16)i; }
+
+inline TQDataStream &TQDataStream::operator<<( Q_UINT32 i )
+{ return *this << (Q_INT32)i; }
+
+inline TQDataStream &TQDataStream::operator<<( Q_UINT64 i )
+{ return *this << (Q_INT64)i; }
+
+#if !defined(Q_OS_WIN64)
+inline TQDataStream &TQDataStream::operator<<( Q_ULONG i )
+{ return *this << (Q_LONG)i; }
+#endif
+
+#endif // QT_NO_DATASTREAM
+#endif // TQDATASTREAM_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatastream-members.html b/doc/html/qdatastream-members.html new file mode 100644 index 00000000..6e654598 --- /dev/null +++ b/doc/html/qdatastream-members.html @@ -0,0 +1,65 @@ + + + + + +TQDataStream Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDataStream

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatastream.html b/doc/html/qdatastream.html new file mode 100644 index 00000000..316e9351 --- /dev/null +++ b/doc/html/qdatastream.html @@ -0,0 +1,570 @@ + + + + + +TQDataStream Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDataStream Class Reference

+ +

The TQDataStream class provides serialization of binary data +to a TQIODevice. +More... +

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

+

#include <qdatastream.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDataStream class provides serialization of binary data +to a TQIODevice. +

+

A data stream is a binary stream of encoded information which is +100% independent of the host computer's operating system, CPU or +byte order. For example, a data stream that is written by a PC +under Windows can be read by a Sun SPARC running Solaris. +

You can also use a data stream to read/write raw + unencoded binary data. If you want a "parsing" input +stream, see TQTextStream. +

The TQDataStream class implements the serialization of C++'s basic +data types, like char, short, int, char*, etc. +Serialization of more complex data is accomplished by breaking up +the data into primitive units. +

A data stream cooperates closely with a TQIODevice. A TQIODevice +represents an input/output medium one can read data from and write +data to. The TQFile class is an example of an IO device. +

Example (write binary data to a stream): +

+    TQFile file( "file.dat" );
+    file.open( IO_WriteOnly );
+    TQDataStream stream( &file ); // we will serialize the data into the file
+    stream << "the answer is";   // serialize a string
+    stream << (Q_INT32)42;       // serialize an integer
+    
+ +

Example (read binary data from a stream): +

+    TQFile file( "file.dat" );
+    file.open( IO_ReadOnly );
+    TQDataStream stream( &file );  // read the data serialized from the file
+    TQString str;
+    Q_INT32 a;
+    stream >> str >> a;           // extract "the answer is" and 42
+    
+ +

Each item written to the stream is written in a predefined binary +format that varies depending on the item's type. Supported TQt +types include TQBrush, TQColor, TQDateTime, TQFont, TQPixmap, TQString, +TQVariant and many others. For the complete list of all TQt types +supporting data streaming see the Format of the TQDataStream operators. +

For integers it is best to always cast to a TQt integer type for +writing, and to read back into the same TQt integer type. This +ensures that you get integers of the size you want and insulates +you from compiler and platform differences. +

To take one example, a char* string is written as a 32-bit +integer equal to the length of the string including the NUL byte +('\0'), followed by all the characters of the string including the +NUL byte. When reading a char* string, 4 bytes are read to +create the 32-bit length value, then that many characters for the +char* string including the NUL are read. +

The initial IODevice is usually set in the constructor, but can be +changed with setDevice(). If you've reached the end of the data +(or if there is no IODevice set) atEnd() will return TRUE. +

If you want the data to be compatible with an earlier version of +TQt use setVersion(). +

If you want the data to be human-readable, e.g. for debugging, you +can set the data stream into printable data mode with +setPrintableData(). The data is then written slower, in a bloated +but human readable format. +

If you are producing a new binary data format, such as a file +format for documents created by your application, you could use a +TQDataStream to write the data in a portable format. Typically, you +would write a brief header containing a magic string and a version +number to give yourself room for future expansion. For example: +

+    TQFile file( "file.xxx" );
+    file.open( IO_WriteOnly );
+    TQDataStream stream( &file );
+
+    // Write a header with a "magic number" and a version
+    stream << (Q_UINT32)0xA0B0C0D0;
+    stream << (Q_INT32)123;
+
+    // Write the data
+    stream << [lots of interesting data]
+    
+ +

Then read it in with: +

+    TQFile file( "file.xxx" );
+    file.open( IO_ReadOnly );
+    TQDataStream stream( &file );
+
+    // Read and check the header
+    Q_UINT32 magic;
+    stream >> magic;
+    if ( magic != 0xA0B0C0D0 )
+        return XXX_BAD_FILE_FORMAT;
+
+    // Read the version
+    Q_INT32 version;
+    stream >> version;
+    if ( version < 100 )
+        return XXX_BAD_FILE_TOO_OLD;
+    if ( version > 123 )
+        return XXX_BAD_FILE_TOO_NEW;
+    if ( version <= 110 )
+        stream.setVersion(1);
+
+    // Read the data
+    stream >> [lots of interesting data];
+    if ( version > 120 )
+        stream >> [data new in XXX version 1.2];
+    stream >> [other interesting data];
+    
+ +

You can select which byte order to use when serializing data. The +default setting is big endian (MSB first). Changing it to little +endian breaks the portability (unless the reader also changes to +little endian). We recommend keeping this setting unless you have +special retquirements. +

+

Reading and writing raw binary data +

+

You may wish to read/write your own raw binary data to/from the +data stream directly. Data may be read from the stream into a +preallocated char* using readRawBytes(). Similarly data can be +written to the stream using writeRawBytes(). Notice that any +encoding/decoding of the data must be done by you. +

A similar pair of functions is readBytes() and writeBytes(). These +differ from their raw counterparts as follows: readBytes() +reads a Q_UINT32 which is taken to be the length of the data to be +read, then that number of bytes is read into the preallocated +char*; writeBytes() writes a Q_UINT32 containing the length of the +data, followed by the data. Notice that any encoding/decoding of +the data (apart from the length Q_UINT32) must be done by you. +

See also TQTextStream, TQVariant, and Input/Output and Networking. + +


Member Type Documentation

+

TQDataStream::ByteOrder

+ +

The byte order used for reading/writing the data. +

    +
  • TQDataStream::BigEndian - the default +
  • TQDataStream::LittleEndian +
+

Member Function Documentation

+

TQDataStream::TQDataStream () +

+Constructs a data stream that has no IO device. +

See also setDevice(). + +

TQDataStream::TQDataStream ( TQIODevice * d ) +

+Constructs a data stream that uses the IO device d. +

Warning: If you use TQSocket or TQSocketDevice as the IO device d +for reading data, you must make sure that enough data is available +on the socket for the operation to successfully proceed; +TQDataStream does not have any means to handle or recover from +short-reads. +

See also setDevice() and device(). + +

TQDataStream::TQDataStream ( TQByteArray a, int mode ) +

+Constructs a data stream that operates on a byte array, a, +through an internal TQBuffer device. The mode is a +TQIODevice::mode(), usually either IO_ReadOnly or IO_WriteOnly. +

Example: +

+    static char bindata[] = { 231, 1, 44, ... };
+    TQByteArray a;
+    a.setRawData( bindata, sizeof(bindata) );   // a points to bindata
+    TQDataStream stream( a, IO_ReadOnly );       // open on a's data
+    stream >> [something];                      // read raw bindata
+    a.resetRawData( bindata, sizeof(bindata) ); // finished
+    
+ +

The TQByteArray::setRawData() function is not for the inexperienced. + +

TQDataStream::~TQDataStream () [virtual] +

+Destroys the data stream. +

The destructor will not affect the current IO device, unless it is +an internal IO device processing a TQByteArray passed in the constructor, in which case the internal IO device is destroyed. + +

bool TQDataStream::atEnd () const +

+ +

Returns TRUE if the IO device has reached the end position (end of +the stream or file) or if there is no IO device set; otherwise +returns FALSE, i.e. if the current position of the IO device is +before the end position. +

See also TQIODevice::atEnd(). + +

int TQDataStream::byteOrder () const +

+ +

Returns the current byte order setting -- either BigEndian or +LittleEndian. +

See also setByteOrder(). + +

TQIODevice * TQDataStream::device () const +

+ +

Returns the IO device currently set. +

See also setDevice() and unsetDevice(). + +

bool TQDataStream::eof () const +

+

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

Returns TRUE if the IO device has reached the end position (end of +stream or file) or if there is no IO device set. +

Returns FALSE if the current position of the read/write head of the IO +device is somewhere before the end position. +

See also TQIODevice::atEnd(). + +

bool TQDataStream::isPrintableData () const +

+ +

Returns TRUE if the printable data flag has been set; otherwise +returns FALSE. +

See also setPrintableData(). + +

TQDataStream & TQDataStream::operator<< ( Q_INT8 i ) +

+Writes a signed byte, i, to the stream and returns a reference +to the stream. + +

TQDataStream & TQDataStream::operator<< ( Q_UINT8 i ) +

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

Writes an unsigned byte, i, to the stream and returns a +reference to the stream. + +

TQDataStream & TQDataStream::operator<< ( Q_INT16 i ) +

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

Writes a signed 16-bit integer, i, to the stream and returns a +reference to the stream. + +

TQDataStream & TQDataStream::operator<< ( Q_UINT16 i ) +

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

Writes an unsigned 16-bit integer, i, to the stream and returns +a reference to the stream. + +

TQDataStream & TQDataStream::operator<< ( Q_INT32 i ) +

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

Writes a signed 32-bit integer, i, to the stream and returns a +reference to the stream. + +

TQDataStream & TQDataStream::operator<< ( Q_UINT32 i ) +

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

Writes an unsigned integer, i, to the stream as a 32-bit +unsigned integer (Q_UINT32). Returns a reference to the stream. + +

TQDataStream & TQDataStream::operator<< ( Q_INT64 i ) +

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

Writes a signed 64-bit integer, i, to the stream and returns a +reference to the stream. + +

TQDataStream & TQDataStream::operator<< ( Q_UINT64 i ) +

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

Writes an unsigned 64-bit integer, i, to the stream and returns a +reference to the stream. + +

TQDataStream & TQDataStream::operator<< ( Q_LONG i ) +

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

Writes a signed integer i, of the system's word length, to the +stream and returns a reference to the stream. + +

TQDataStream & TQDataStream::operator<< ( Q_ULONG i ) +

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

Writes an unsigned integer i, of the system's word length, to +the stream and returns a reference to the stream. + +

TQDataStream & TQDataStream::operator<< ( float f ) +

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

Writes a 32-bit floating point number, f, to the stream using +the standard IEEE754 format. Returns a reference to the stream. + +

TQDataStream & TQDataStream::operator<< ( double f ) +

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

Writes a 64-bit floating point number, f, to the stream using +the standard IEEE754 format. Returns a reference to the stream. + +

TQDataStream & TQDataStream::operator<< ( const char * s ) +

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

Writes the '\0'-terminated string s to the stream and returns a +reference to the stream. +

The string is serialized using writeBytes(). + +

TQDataStream & TQDataStream::operator>> ( Q_INT8 & i ) +

+Reads a signed byte from the stream into i, and returns a +reference to the stream. + +

TQDataStream & TQDataStream::operator>> ( Q_UINT8 & i ) +

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

Reads an unsigned byte from the stream into i, and returns a +reference to the stream. + +

TQDataStream & TQDataStream::operator>> ( Q_INT16 & i ) +

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

Reads a signed 16-bit integer from the stream into i, and +returns a reference to the stream. + +

TQDataStream & TQDataStream::operator>> ( Q_UINT16 & i ) +

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

Reads an unsigned 16-bit integer from the stream into i, and +returns a reference to the stream. + +

TQDataStream & TQDataStream::operator>> ( Q_INT32 & i ) +

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

Reads a signed 32-bit integer from the stream into i, and +returns a reference to the stream. + +

TQDataStream & TQDataStream::operator>> ( Q_UINT32 & i ) +

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

Reads an unsigned 32-bit integer from the stream into i, and +returns a reference to the stream. + +

TQDataStream & TQDataStream::operator>> ( Q_INT64 & i ) +

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

Reads a signed 64-bit integer from the stream into i, and +returns a reference to the stream. + +

TQDataStream & TQDataStream::operator>> ( Q_UINT64 & i ) +

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

Reads an unsigned 64-bit integer from the stream, into i, and +returns a reference to the stream. + +

TQDataStream & TQDataStream::operator>> ( Q_LONG & i ) +

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

Reads a signed integer of the system's word length from the stream +into i, and returns a reference to the stream. +

+

TQDataStream & TQDataStream::operator>> ( Q_ULONG & i ) +

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

Reads an unsigned integer of the system's word length from the +stream, into i, and returns a reference to the stream. + +

TQDataStream & TQDataStream::operator>> ( float & f ) +

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

Reads a 32-bit floating point number from the stream into f, +using the standard IEEE754 format. Returns a reference to the +stream. + +

TQDataStream & TQDataStream::operator>> ( double & f ) +

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

Reads a 64-bit floating point number from the stream into f, +using the standard IEEE754 format. Returns a reference to the +stream. + +

TQDataStream & TQDataStream::operator>> ( char *& s ) +

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

Reads the '\0'-terminated string s from the stream and returns +a reference to the stream. +

Space for the string is allocated using new -- the caller must +destroy it with delete[]. + +

TQDataStream & TQDataStream::readBytes ( char *& s, uint & l ) +

+Reads the buffer s from the stream and returns a reference to +the stream. +

The buffer s is allocated using new. Destroy it with the delete[] operator. If the length is zero or s cannot be +allocated, s is set to 0. +

The l parameter will be set to the length of the buffer. +

The serialization format is a Q_UINT32 length specifier first, +then l bytes of data. Note that the data is not encoded. +

See also readRawBytes() and writeBytes(). + +

TQDataStream & TQDataStream::readRawBytes ( char * s, uint len ) +

+Reads len bytes from the stream into s and returns a +reference to the stream. +

The buffer s must be preallocated. The data is not encoded. +

See also readBytes(), TQIODevice::readBlock(), and writeRawBytes(). + +

void TQDataStream::setByteOrder ( int bo ) +

+Sets the serialization byte order to bo. +

The bo parameter can be TQDataStream::BigEndian or TQDataStream::LittleEndian. +

The default setting is big endian. We recommend leaving this +setting unless you have special retquirements. +

See also byteOrder(). + +

void TQDataStream::setDevice ( TQIODevice * d ) +

+void TQDataStream::setDevice(TQIODevice *d ) +

Sets the IO device to d. +

See also device() and unsetDevice(). + +

void TQDataStream::setPrintableData ( bool enable ) +

+ +

If enable is TRUE, data will be output in a human readable +format. If enable is FALSE, data will be output in a binary +format. +

If enable is TRUE, the write functions will generate output +that consists of printable characters (7 bit ASCII). This output +will typically be a lot larger than the default binary output, and +consequently slower to write. +

We recommend only enabling printable data for debugging purposes. + +

void TQDataStream::setVersion ( int v ) +

+ +

Sets the version number of the data serialization format to v. +

You don't need to set a version if you are using the current +version of TQt. +

In order to accommodate new functionality, the datastream +serialization format of some TQt classes has changed in some +versions of TQt. If you want to read data that was created by an +earlier version of TQt, or write data that can be read by a program +that was compiled with an earlier version of TQt, use this function +to modify the serialization format of TQDataStream. +

+
TQt Version TQDataStream Version +
TQt 3.3 6 +
TQt 3.2 5 +
TQt 3.1 5 +
TQt 3.0 4 +
TQt 2.1.x and TQt 2.2.x 3 +
TQt 2.0.x 2 +
TQt 1.x 1 +
+

See also version(). + +

void TQDataStream::unsetDevice () +

+Unsets the IO device. This is the same as calling setDevice( 0 ). +

See also device() and setDevice(). + +

int TQDataStream::version () const +

+ +

Returns the version number of the data serialization format. In TQt +3.1, this number is 5. +

See also setVersion(). + +

TQDataStream & TQDataStream::writeBytes ( const char * s, uint len ) +

+Writes the length specifier len and the buffer s to the +stream and returns a reference to the stream. +

The len is serialized as a Q_UINT32, followed by len bytes +from s. Note that the data is not encoded. +

See also writeRawBytes() and readBytes(). + +

TQDataStream & TQDataStream::writeRawBytes ( const char * s, uint len ) +

+Writes len bytes from s to the stream and returns a +reference to the stream. The data is not encoded. +

See also writeBytes(), TQIODevice::writeBlock(), and readRawBytes(). + + +


+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/qdatatable-h.html b/doc/html/qdatatable-h.html new file mode 100644 index 00000000..d47ae226 --- /dev/null +++ b/doc/html/qdatatable-h.html @@ -0,0 +1,288 @@ + + + + + +qdatatable.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdatatable.h

+ +

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


+
+/****************************************************************************
+**
+** Definition of TQDataTable class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQDATATABLE_H
+#define TQDATATABLE_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qvariant.h"
+#include "qtable.h"
+#include "qsql.h"
+#include "qsqlcursor.h"
+#include "qsqlindex.h"
+#include "qsqleditorfactory.h"
+#include "qiconset.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL_VIEW_WIDGETS
+
+class TQPainter;
+class TQSqlField;
+class TQSqlPropertyMap;
+class TQDataTablePrivate;
+
+class TQM_EXPORT_SQL TQDataTable : public TQTable
+{
+    Q_OBJECT
+
+    Q_PROPERTY( TQString nullText READ nullText WRITE setNullText )
+    Q_PROPERTY( TQString trueText READ trueText WRITE setTrueText )
+    Q_PROPERTY( TQString falseText READ falseText WRITE setFalseText )
+    Q_PROPERTY( DateFormat dateFormat READ dateFormat WRITE setDateFormat )
+    Q_PROPERTY( bool confirmEdits READ confirmEdits WRITE setConfirmEdits )
+    Q_PROPERTY( bool confirmInsert READ confirmInsert WRITE setConfirmInsert )
+    Q_PROPERTY( bool confirmUpdate READ confirmUpdate WRITE setConfirmUpdate )
+    Q_PROPERTY( bool confirmDelete READ confirmDelete WRITE setConfirmDelete )
+    Q_PROPERTY( bool confirmCancels READ confirmCancels WRITE setConfirmCancels )
+    Q_PROPERTY( bool autoEdit READ autoEdit WRITE setAutoEdit )
+    Q_PROPERTY( TQString filter READ filter WRITE setFilter )
+    Q_PROPERTY( TQStringList sort READ sort WRITE setSort )
+    Q_PROPERTY( int numCols READ numCols )
+    Q_PROPERTY( int numRows READ numRows )
+
+public:
+    TQDataTable ( TQWidget* parent=0, const char* name=0 );
+    TQDataTable ( TQSqlCursor* cursor, bool autoPopulate = FALSE, TQWidget* parent=0, const char* name=0 );
+    ~TQDataTable();
+
+    virtual void addColumn( const TQString& fieldName,
+			    const TQString& label = TQString::null,
+			    int width = -1,
+			    const TQIconSet& iconset = TQIconSet() );
+    virtual void removeColumn( uint col );
+    virtual void setColumn( uint col, const TQString& fieldName,
+			    const TQString& label = TQString::null,
+			    int width = -1,
+			    const TQIconSet& iconset = TQIconSet() );
+
+    TQString      nullText() const;
+    TQString      trueText() const;
+    TQString      falseText() const;
+    DateFormat   dateFormat() const;
+    bool         confirmEdits() const;
+    bool         confirmInsert() const;
+    bool         confirmUpdate() const;
+    bool         confirmDelete() const;
+    bool         confirmCancels() const;
+    bool         autoDelete() const;
+    bool         autoEdit() const;
+    TQString      filter() const;
+    TQStringList  sort() const;
+
+    virtual void setSqlCursor( TQSqlCursor* cursor = 0,
+			    bool autoPopulate = FALSE, bool autoDelete = FALSE );
+    TQSqlCursor* sqlCursor() const;
+
+    virtual void setNullText( const TQString& nullText );
+    virtual void setTrueText( const TQString& trueText );
+    virtual void setFalseText( const TQString& falseText );
+    virtual void setDateFormat( const DateFormat f );
+    virtual void setConfirmEdits( bool confirm );
+    virtual void setConfirmInsert( bool confirm );
+    virtual void setConfirmUpdate( bool confirm );
+    virtual void setConfirmDelete( bool confirm );
+    virtual void setConfirmCancels( bool confirm );
+    virtual void setAutoDelete( bool enable );
+    virtual void setAutoEdit( bool autoEdit );
+    virtual void setFilter( const TQString& filter );
+    virtual void setSort( const TQStringList& sort );
+    virtual void setSort( const TQSqlIndex& sort );
+
+    enum Refresh {
+	RefreshData = 1,
+	RefreshColumns = 2,
+	RefreshAll = 3
+    };
+    void         refresh( Refresh mode );
+    void         sortColumn ( int col, bool ascending = TRUE,
+			      bool wholeRows = FALSE );
+    TQString      text ( int row, int col ) const;
+    TQVariant     value ( int row, int col ) const;
+    TQSqlRecord*  currentRecord() const;
+
+    void         installEditorFactory( TQSqlEditorFactory * f );
+    void         installPropertyMap( TQSqlPropertyMap* m );
+
+    int          numCols() const;
+    int          numRows() const;
+    void         setNumCols( int c );
+    void         setNumRows ( int r );
+    bool         findBuffer( const TQSqlIndex& idx, int atHint = 0 );
+
+    void 	 hideColumn( int col );
+    void 	 showColumn( int col );
+signals:
+    void         currentChanged( TQSqlRecord* record );
+    void         primeInsert( TQSqlRecord* buf );
+    void         primeUpdate( TQSqlRecord* buf );
+    void         primeDelete( TQSqlRecord* buf );
+    void         beforeInsert( TQSqlRecord* buf );
+    void         beforeUpdate( TQSqlRecord* buf );
+    void         beforeDelete( TQSqlRecord* buf );
+    void         cursorChanged( TQSql::Op mode );
+
+public slots:
+    virtual void find( const TQString & str, bool caseSensitive,
+			     bool backwards );
+    virtual void sortAscending( int col );
+    virtual void sortDescending( int col );
+    virtual void refresh();
+    void setColumnWidth( int col, int w );
+    void adjustColumn( int col );
+    void setColumnStretchable( int col, bool stretch );
+    void swapColumns( int col1, int col2, bool swapHeaders = FALSE );
+
+protected:
+    virtual bool insertCurrent();
+    virtual bool updateCurrent();
+    virtual bool deleteCurrent();
+
+    virtual TQSql::Confirm confirmEdit( TQSql::Op m );
+    virtual TQSql::Confirm confirmCancel( TQSql::Op m );
+
+    virtual void handleError( const TQSqlError& e );
+
+    virtual bool beginInsert();
+    virtual TQWidget* beginUpdate ( int row, int col, bool replace );
+
+    bool         eventFilter( TQObject *o, TQEvent *e );
+    void         keyPressEvent( TQKeyEvent* );
+    void         resizeEvent ( TQResizeEvent * );
+    void         contentsMousePressEvent( TQMouseEvent* e );
+    void         contentsContextMenuEvent( TQContextMenuEvent* e );
+    void         endEdit( int row, int col, bool accept, bool replace );
+    TQWidget *    createEditor( int row, int col, bool initFromCell ) const;
+    void         activateNextCell();
+    int          indexOf( uint i ) const; // ### make this public in 4.0
+    void         reset();
+    void         setSize( TQSqlCursor* sql );
+    void         repaintCell( int row, int col );
+    void         paintCell ( TQPainter * p, int row, int col, const TQRect & cr,
+			     bool selected, const TQColorGroup &cg );
+    virtual void paintField( TQPainter * p, const TQSqlField* field, const TQRect & cr,
+			     bool selected );
+    void	 drawContents( TQPainter * p, int cx, int cy, int cw, int ch );
+    virtual int  fieldAlignment( const TQSqlField* field );
+    void         columnClicked ( int col );
+    void         resizeData ( int len );
+
+    TQTableItem * item ( int row, int col ) const;
+    void         setItem ( int row, int col, TQTableItem * item );
+    void         clearCell ( int row, int col ) ;
+    void         setPixmap ( int row, int col, const TQPixmap & pix );
+    void         takeItem ( TQTableItem * i );
+
+private slots:
+    void         loadNextPage();
+    void         setCurrentSelection( int row, int col );
+    void         updateCurrentSelection();
+    void 	 sliderPressed();
+    void 	 sliderReleased();
+    void	 doInsertCurrent();
+    void	 doUpdateCurrent();
+    
+private:
+    TQString 	 fieldToString( const TQSqlField * field );
+    void         init();
+    TQWidget*     beginEdit ( int row, int col, bool replace );
+    void         updateRow( int row );
+    void         endInsert();
+    void         endUpdate();
+    TQDataTablePrivate* d;
+
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQDataTable( const TQDataTable & );
+    TQDataTable &operator=( const TQDataTable & );
+#endif
+};
+
+#endif
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatatable-members.html b/doc/html/qdatatable-members.html new file mode 100644 index 00000000..325accd1 --- /dev/null +++ b/doc/html/qdatatable-members.html @@ -0,0 +1,604 @@ + + + + + +TQDataTable Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDataTable

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatatable.html b/doc/html/qdatatable.html new file mode 100644 index 00000000..f9ad0d09 --- /dev/null +++ b/doc/html/qdatatable.html @@ -0,0 +1,809 @@ + + + + + +TQDataTable Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDataTable Class Reference
[sql module]

+ +

The TQDataTable class provides a flexible SQL table widget that supports browsing and editing. +More... +

#include <qdatatable.h> +

Inherits TQTable. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • bool autoEdit - whether the data table automatically applies edits
  • +
  • bool confirmCancels - whether the data table confirms cancel operations
  • +
  • bool confirmDelete - whether the data table confirms delete operations
  • +
  • bool confirmEdits - whether the data table confirms edit operations
  • +
  • bool confirmInsert - whether the data table confirms insert operations
  • +
  • bool confirmUpdate - whether the data table confirms update operations
  • +
  • DateFormat dateFormat - the format used for displaying date/time values
  • +
  • TQString falseText - the text used to represent false values
  • +
  • TQString filter - the data filter for the data table
  • +
  • TQString nullText - the text used to represent NULL values
  • +
  • int numCols - the number of columns in the table  (read only)
  • +
  • int numRows - the number of rows in the table  (read only)
  • +
  • TQStringList sort - the data table's sort
  • +
  • TQString trueText - the text used to represent true values
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQDataTable class provides a flexible SQL table widget that supports browsing and editing. +

+ + +

TQDataTable supports various functions for presenting and editing +SQL data from a TQSqlCursor in a table. +

If you want a to present your data in a form use TQDataBrowser, or +for read-only forms, TQDataView. +

When displaying data, TQDataTable only retrieves data for visible +rows. If the driver supports the 'query size' property the +TQDataTable will have the correct number of rows and the vertical +scrollbar will accurately reflect the number of rows displayed in +proportion to the number of rows in the dataset. If the driver +does not support the 'query size' property, rows are dynamically +fetched from the database on an as-needed basis with the scrollbar +becoming more accurate as the user scrolls down through the +records. This allows extremely large queries to be displayed as +tquickly as possible, with minimum memory usage. +

TQDataTable inherits TQTable's API and extends it with functions to +sort and filter the data and sort columns. See setSqlCursor(), +setFilter(), setSort(), setSorting(), sortColumn() and refresh(). +

When displaying editable cursors, cell editing will be enabled. +(For more information on editable cursors, see TQSqlCursor). +TQDataTable can be used to modify existing data and to add new +records. When a user makes changes to a field in the table, the +cursor's edit buffer is used. The table will not send changes in +the edit buffer to the database until the user moves to a +different record in the grid or presses Enter. Cell editing is +initiated by pressing F2 (or right clicking and then clicking the +appropriate popup menu item) and canceled by pressing Esc. If +there is a problem updating or adding data, errors are handled +automatically (see handleError() to change this behavior). Note +that if autoEdit() is FALSE navigating to another record will +cancel the insert or update. +

The user can be asked to confirm all edits with setConfirmEdits(). +For more precise control use setConfirmInsert(), +setConfirmUpdate(), setConfirmDelete() and setConfirmCancels(). +Use setAutoEdit() to control the behaviour of the table when the +user edits a record and then navigates. (Note that setAutoDelete() +is unrelated; it is used to set whether the TQSqlCursor is deleted +when the table is deleted.) +

Since the data table can perform edits, it must be able to +uniquely identify every record so that edits are correctly +applied. Because of this the underlying cursor must have a valid +primary index to ensure that a unique record is inserted, updated +or deleted within the database otherwise the database may be +changed to an inconsistent state. +

TQDataTable creates editors using the default TQSqlEditorFactory. +Different editor factories can be used by calling +installEditorFactory(). A property map is used to map between the +cell's value and the editor. You can use your own property map +with installPropertyMap(). +

The contents of a cell is available as a TQString with text() or as +a TQVariant with value(). The current record is returned by +currentRecord(). Use the find() function to search for a string in +the table. +

Editing actions can be applied programatically. For example, the +insertCurrent() function reads the fields from the current record +into the cursor and performs the insert. The updateCurrent() and +deleteCurrent() functions perform similarly to update and delete +the current record respectively. +

Columns in the table can be created automatically based on the +cursor (see setSqlCursor()). Columns can be manipulated manually +using addColumn(), removeColumn() and setColumn(). +

The table automatically copies many of the properties of the +cursor to format the display of data within cells (alignment, +visibility, etc.). The cursor can be changed with setSqlCursor(). +The filter (see setFilter()) and sort defined within the table are +used instead of the filter and sort set on the cursor. For sorting +options see setSort(), sortColumn(), sortAscending() and +sortDescending(). Note that sorting operations will not behave as +expected if you are using a TQSqlSelectCursor because it uses +user-defined SQL queries to obtain data. +

The text used to represent NULL, TRUE and FALSE values can be +changed with setNullText(), setTrueText() and setFalseText() +respectively. You can change the appearance of cells by +reimplementing paintField(). +

Whenever a new row is selected in the table the currentChanged() +signal is emitted. The primeInsert() signal is emitted when an +insert is initiated. The primeUpdate() and primeDelete() signals +are emitted when update and deletion are initiated respectively. +Just before the database is updated a signal is emitted; +beforeInsert(), beforeUpdate() or beforeDelete() as appropriate. +

See also Database Classes. + +


Member Type Documentation

+

TQDataTable::Refresh

+ +

This enum describes the refresh options. +

    +
  • TQDataTable::RefreshData - refresh the data, i.e. read it from the database +
  • TQDataTable::RefreshColumns - refresh the list of fields, e.g. the column headings +
  • TQDataTable::RefreshAll - refresh both the data and the list of fields +
+

Member Function Documentation

+

TQDataTable::TQDataTable ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a data table which is a child of parent, called +name name. + +

TQDataTable::TQDataTable ( TQSqlCursor * cursor, bool autoPopulate = FALSE, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a data table which is a child of parent, called name +name using the cursor cursor. +

If autoPopulate is TRUE (the default is FALSE), columns are +automatically created based upon the fields in the cursor +record. Note that autoPopulate only governs the creation of +columns; to load the cursor's data into the table use refresh(). +

If the cursor is read-only, the table also becomes read-only. +In addition, the table adopts the cursor's driver's definition for +representing NULL values as strings. + +

TQDataTable::~TQDataTable () +

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

void TQDataTable::addColumn ( const TQString & fieldName, const TQString & label = TQString::null, int width = -1, const TQIconSet & iconset = TQIconSet ( ) ) [virtual] +

+Adds the next column to be displayed using the field fieldName, +column label label, width width and iconset iconset. +

If label is specified, it is used as the column's header label, +otherwise the field's display label is used when setSqlCursor() is +called. The iconset is used to set the icon used by the column +header; by default there is no icon. +

See also setSqlCursor() and refresh(). + +

Examples: sql/overview/subclass1/main.cpp, sql/overview/subclass3/main.cpp, sql/overview/table2/main.cpp, and sql/sqltable/main.cpp. +

void TQDataTable::adjustColumn ( int col ) [virtual slot] +

+Resizes column col so that the column width is wide enough to +display the widest item the column contains (including the column +label). If the table's TQSqlCursor is not currently active, the +cursor will be refreshed before the column width is calculated. Be +aware that this function may be slow on tables that contain large +result sets. + +

Reimplemented from TQTable. +

bool TQDataTable::autoDelete () const +

+Returns TRUE if the table will automatically delete the cursor +specified by setSqlCursor(); otherwise returns FALSE. + +

bool TQDataTable::autoEdit () const +

Returns TRUE if the data table automatically applies edits; otherwise returns FALSE. +See the "autoEdit" property for details. +

void TQDataTable::beforeDelete ( TQSqlRecord * buf ) [signal] +

+ +

This signal is emitted just before the currently selected record +is deleted from the database. The buf parameter points to the +edit buffer being deleted. Connect to this signal to, for example, +copy some of the fields for later use. + +

void TQDataTable::beforeInsert ( TQSqlRecord * buf ) [signal] +

+ +

This signal is emitted just before the cursor's edit buffer is +inserted into the database. The buf parameter points to the +edit buffer being inserted. Connect to this signal to, for +example, populate a key field with a unique sequence number. + +

void TQDataTable::beforeUpdate ( TQSqlRecord * buf ) [signal] +

+ +

This signal is emitted just before the cursor's edit buffer is +updated in the database. The buf parameter points to the edit +buffer being updated. Connect to this signal when you want to +transform the user's data behind-the-scenes. + +

bool TQDataTable::beginInsert () [virtual protected] +

+Protected virtual function called when editing is about to begin +on a new record. If the table is read-only, or if there's no +cursor or the cursor does not allow inserts, nothing happens. +

Editing takes place using the cursor's edit buffer(see +TQSqlCursor::editBuffer()). +

When editing begins, a new row is created in the table marked with +an asterisk '*' in the row's vertical header column, i.e. at the +left of the row. + +

TQWidget * TQDataTable::beginUpdate ( int row, int col, bool replace ) [virtual protected] +

+Protected virtual function called when editing is about to begin +on an existing row. If the table is read-only, or if there's no +cursor, nothing happens. +

Editing takes place using the cursor's edit buffer (see +TQSqlCursor::editBuffer()). +

row and col refer to the row and column in the TQDataTable. +

(replace is provided for reimplementors and reflects the API of +TQTable::beginEdit().) + +

TQSql::Confirm TQDataTable::confirmCancel ( TQSql::Op m ) [virtual protected] +

+Protected virtual function which returns a confirmation for +cancelling an edit mode of m. Derived classes can reimplement +this function to provide their own cancel dialog. The default +implementation uses a message box which prompts the user to +confirm the cancel. + +

bool TQDataTable::confirmCancels () const +

Returns TRUE if the data table confirms cancel operations; otherwise returns FALSE. +See the "confirmCancels" property for details. +

bool TQDataTable::confirmDelete () const +

Returns TRUE if the data table confirms delete operations; otherwise returns FALSE. +See the "confirmDelete" property for details. +

TQSql::Confirm TQDataTable::confirmEdit ( TQSql::Op m ) [virtual protected] +

+Protected virtual function which returns a confirmation for an +edit of mode m. Derived classes can reimplement this function +to provide their own confirmation dialog. The default +implementation uses a message box which prompts the user to +confirm the edit action. + +

bool TQDataTable::confirmEdits () const +

Returns TRUE if the data table confirms edit operations; otherwise returns FALSE. +See the "confirmEdits" property for details. +

bool TQDataTable::confirmInsert () const +

Returns TRUE if the data table confirms insert operations; otherwise returns FALSE. +See the "confirmInsert" property for details. +

bool TQDataTable::confirmUpdate () const +

Returns TRUE if the data table confirms update operations; otherwise returns FALSE. +See the "confirmUpdate" property for details. +

void TQDataTable::currentChanged ( TQSqlRecord * record ) [signal] +

+ +

This signal is emitted whenever a new row is selected in the +table. The record parameter points to the contents of the newly +selected record. + +

TQSqlRecord * TQDataTable::currentRecord () const +

+Returns the currently selected record, or 0 if there is no current +selection. The table owns the pointer, so do not delete it or +otherwise modify it or the cursor it points to. + +

void TQDataTable::cursorChanged ( TQSql::Op mode ) [signal] +

+ +

This signal is emitted whenever the cursor record was changed due +to an edit. The mode parameter is the type of edit that just +took place. + +

DateFormat TQDataTable::dateFormat () const +

Returns the format used for displaying date/time values. +See the "dateFormat" property for details. +

bool TQDataTable::deleteCurrent () [virtual protected] +

+For an editable table, issues a delete on the current cursor's +primary index using the values of the currently selected row. If +there is no current cursor or there is no current selection, +nothing happens. If confirmEdits() or confirmDelete() is TRUE, +confirmEdit() is called to confirm the delete. Returns TRUE if the +delete succeeded; otherwise FALSE. +

The underlying cursor must have a valid primary index to ensure +that a unique record is deleted within the database otherwise the +database may be changed to an inconsistent state. + +

TQString TQDataTable::falseText () const +

Returns the text used to represent false values. +See the "falseText" property for details. +

int TQDataTable::fieldAlignment ( const TQSqlField * field ) [virtual protected] +

+Returns the alignment for field. + +

TQString TQDataTable::filter () const +

Returns the data filter for the data table. +See the "filter" property for details. +

void TQDataTable::find ( const TQString & str, bool caseSensitive, bool backwards ) [virtual slot] +

+Searches the current cursor for a cell containing the string str starting at the current cell and working forwards (or +backwards if backwards is TRUE). If the string is found, the +cell containing the string is set as the current cell. If caseSensitive is FALSE the case of str will be ignored. +

The search will wrap, i.e. if the first (or if backwards is TRUE, +last) cell is reached without finding str the search will +continue until it reaches the starting cell. If str is not +found the search will fail and the current cell will remain +unchanged. + +

void TQDataTable::handleError ( const TQSqlError & e ) [virtual protected] +

+Protected virtual function which is called when an error e has +occurred on the current cursor(). The default implementation +displays a warning message to the user with information about the +error. + +

int TQDataTable::indexOf ( uint i ) const [protected] +

+Returns the index of the field within the current SQL query that +is displayed in column i. + +

bool TQDataTable::insertCurrent () [virtual protected] +

+For an editable table, issues an insert on the current cursor +using the values in the cursor's edit buffer. If there is no +current cursor or there is no current "insert" row, nothing +happens. If confirmEdits() or confirmInsert() is TRUE, +confirmEdit() is called to confirm the insert. Returns TRUE if the +insert succeeded; otherwise returns FALSE. +

The underlying cursor must have a valid primary index to ensure +that a unique record is inserted within the database otherwise the +database may be changed to an inconsistent state. + +

void TQDataTable::installEditorFactory ( TQSqlEditorFactory * f ) +

+Installs a new SQL editor factory f. This enables the user to +create and instantiate their own editors for use in cell editing. +Note that TQDataTable takes ownership of this pointer, and will +delete it when it is no longer needed or when +installEditorFactory() is called again. +

See also TQSqlEditorFactory. + +

void TQDataTable::installPropertyMap ( TQSqlPropertyMap * m ) +

+Installs a new property map m. This enables the user to create +and instantiate their own property maps for use in cell editing. +Note that TQDataTable takes ownership of this pointer, and will +delete it when it is no longer needed or when installPropertMap() +is called again. +

See also TQSqlPropertyMap. + +

TQString TQDataTable::nullText () const +

Returns the text used to represent NULL values. +See the "nullText" property for details. +

int TQDataTable::numCols () const [virtual] +

Returns the number of columns in the table. +See the "numCols" property for details. +

Reimplemented from TQTable. +

int TQDataTable::numRows () const [virtual] +

Returns the number of rows in the table. +See the "numRows" property for details. +

Reimplemented from TQTable. +

void TQDataTable::paintField ( TQPainter * p, const TQSqlField * field, const TQRect & cr, bool selected ) [virtual protected] +

+Paints the field on the painter p. The painter has already +been translated to the appropriate cell's origin where the field is to be rendered. cr describes the cell coordinates in +the content coordinate system. The selected parameter is +ignored. +

If you want to draw custom field content you must reimplement +paintField() to do the custom drawing. The default implementation +renders the field value as text. If the field is NULL, +nullText() is displayed in the cell. If the field is Boolean, +trueText() or falseText() is displayed as appropriate. + +

Example: sql/overview/table4/main.cpp. +

void TQDataTable::primeDelete ( TQSqlRecord * buf ) [signal] +

+ +

This signal is emitted after the cursor is primed for delete by +the table, when a delete action is beginning on the table. The buf parameter points to the edit buffer being deleted. Connect to +this signal in order to, for example, record auditing information +on deletions. + +

void TQDataTable::primeInsert ( TQSqlRecord * buf ) [signal] +

+ +

This signal is emitted after the cursor is primed for insert by +the table, when an insert action is beginning on the table. The buf parameter points to the edit buffer being inserted. Connect to +this signal in order to, for example, prime the record buffer with +default data values. + +

void TQDataTable::primeUpdate ( TQSqlRecord * buf ) [signal] +

+ +

This signal is emitted after the cursor is primed for update by +the table, when an update action is beginning on the table. The buf parameter points to the edit buffer being updated. Connect to +this signal in order to, for example, provide some visual feedback +that the user is in 'edit mode'. + +

void TQDataTable::refresh () [virtual slot] +

+Refreshes the table. The cursor is refreshed using the current +filter, the current sort, and the currently defined columns. +Equivalent to calling refresh( TQDataTable::RefreshData ). + +

Examples: sql/overview/subclass1/main.cpp, sql/overview/table1/main.cpp, sql/overview/table2/main.cpp, and sql/sqltable/main.cpp. +

void TQDataTable::refresh ( Refresh mode ) +

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

Refreshes the table. If there is no currently defined cursor (see +setSqlCursor()), nothing happens. The mode parameter determines +which type of refresh will take place. +

See also Refresh, setSqlCursor(), and addColumn(). + +

void TQDataTable::removeColumn ( uint col ) [virtual] +

+Removes column col from the list of columns to be displayed. If +col does not exist, nothing happens. +

See also TQSqlField. + +

void TQDataTable::reset () [protected] +

+Resets the table so that it displays no data. +

See also setSqlCursor(). + +

void TQDataTable::setAutoDelete ( bool enable ) [virtual] +

+Sets the cursor auto-delete flag to enable. If enable is +TRUE, the table will automatically delete the cursor specified by +setSqlCursor(). If enable is FALSE (the default), the cursor +will not be deleted. + +

void TQDataTable::setAutoEdit ( bool autoEdit ) [virtual] +

Sets whether the data table automatically applies edits to autoEdit. +See the "autoEdit" property for details. +

void TQDataTable::setColumn ( uint col, const TQString & fieldName, const TQString & label = TQString::null, int width = -1, const TQIconSet & iconset = TQIconSet ( ) ) [virtual] +

+Sets the col column to display using the field fieldName, +column label label, width width and iconset iconset. +

If label is specified, it is used as the column's header label, +otherwise the field's display label is used when setSqlCursor() is +called. The iconset is used to set the icon used by the column +header; by default there is no icon. +

See also setSqlCursor() and refresh(). + +

void TQDataTable::setColumnWidth ( int col, int w ) [virtual slot] +

+Sets the column col to the width w. Note that unlike TQTable +the TQDataTable is not immediately redrawn, you must call +refresh(TQDataTable::RefreshColumns) +yourself. +

See also refresh(). + +

Reimplemented from TQTable. +

void TQDataTable::setConfirmCancels ( bool confirm ) [virtual] +

Sets whether the data table confirms cancel operations to confirm. +See the "confirmCancels" property for details. +

void TQDataTable::setConfirmDelete ( bool confirm ) [virtual] +

Sets whether the data table confirms delete operations to confirm. +See the "confirmDelete" property for details. +

void TQDataTable::setConfirmEdits ( bool confirm ) [virtual] +

Sets whether the data table confirms edit operations to confirm. +See the "confirmEdits" property for details. +

void TQDataTable::setConfirmInsert ( bool confirm ) [virtual] +

Sets whether the data table confirms insert operations to confirm. +See the "confirmInsert" property for details. +

void TQDataTable::setConfirmUpdate ( bool confirm ) [virtual] +

Sets whether the data table confirms update operations to confirm. +See the "confirmUpdate" property for details. +

void TQDataTable::setDateFormat ( const DateFormat f ) [virtual] +

Sets the format used for displaying date/time values to f. +See the "dateFormat" property for details. +

void TQDataTable::setFalseText ( const TQString & falseText ) [virtual] +

Sets the text used to represent false values to falseText. +See the "falseText" property for details. +

void TQDataTable::setFilter ( const TQString & filter ) [virtual] +

Sets the data filter for the data table to filter. +See the "filter" property for details. +

void TQDataTable::setNullText ( const TQString & nullText ) [virtual] +

Sets the text used to represent NULL values to nullText. +See the "nullText" property for details. +

void TQDataTable::setSize ( TQSqlCursor * sql ) [protected] +

+If the cursor's sql driver supports query sizes, the number of +rows in the table is set to the size of the query. Otherwise, the +table dynamically resizes itself as it is scrolled. If sql is +not active, it is made active by issuing a select() on the cursor +using the sql cursor's current filter and current sort. + +

void TQDataTable::setSort ( const TQStringList & sort ) [virtual] +

Sets the data table's sort to sort. +See the "sort" property for details. +

void TQDataTable::setSort ( const TQSqlIndex & sort ) [virtual] +

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

Sets the sort to be applied to the displayed data to sort. If +there is no current cursor, nothing happens. A TQSqlIndex contains +field names and their ordering (ASC or DESC); these are used to +compose the ORDER BY clause. +

See also sort. + +

void TQDataTable::setSqlCursor ( TQSqlCursor * cursor = 0, bool autoPopulate = FALSE, bool autoDelete = FALSE ) [virtual] +

+Sets cursor as the data source for the table. To force the +display of the data from cursor, use refresh(). If autoPopulate is TRUE, columns are automatically created based upon +the fields in the cursor record. If autoDelete is TRUE (the +default is FALSE), the table will take ownership of the cursor +and delete it when appropriate. If the cursor is read-only, the +table becomes read-only. The table adopts the cursor's driver's +definition for representing NULL values as strings. +

See also refresh(), readOnly, setAutoDelete(), and TQSqlDriver::nullText(). + +

void TQDataTable::setTrueText ( const TQString & trueText ) [virtual] +

Sets the text used to represent true values to trueText. +See the "trueText" property for details. +

TQStringList TQDataTable::sort () const +

Returns the data table's sort. +See the "sort" property for details. +

void TQDataTable::sortAscending ( int col ) [virtual slot] +

+Sorts column col in ascending order. +

See also sorting. + +

void TQDataTable::sortColumn ( int col, bool ascending = TRUE, bool wholeRows = FALSE ) [virtual] +

+Sorts column col in ascending order if ascending is TRUE +(the default); otherwise sorts in descending order. +

The wholeRows parameter is ignored; TQDataTable always sorts +whole rows by the specified column. + +

Reimplemented from TQTable. +

void TQDataTable::sortDescending ( int col ) [virtual slot] +

+Sorts column col in descending order. +

See also sorting. + +

TQSqlCursor * TQDataTable::sqlCursor () const +

+Returns the cursor used by the data table. + +

TQString TQDataTable::text ( int row, int col ) const [virtual] +

+Returns the text in cell row, col, or an empty string if the +cell is empty. If the cell's value is NULL then nullText() will be +returned. If the cell does not exist then TQString::null is +returned. + +

Reimplemented from TQTable. +

TQString TQDataTable::trueText () const +

Returns the text used to represent true values. +See the "trueText" property for details. +

bool TQDataTable::updateCurrent () [virtual protected] +

+For an editable table, issues an update using the cursor's edit +buffer. If there is no current cursor or there is no current +selection, nothing happens. If confirmEdits() or confirmUpdate() +is TRUE, confirmEdit() is called to confirm the update. Returns +TRUE if the update succeeded; otherwise returns FALSE. +

The underlying cursor must have a valid primary index to ensure +that a unique record is updated within the database otherwise the +database may be changed to an inconsistent state. + +

TQVariant TQDataTable::value ( int row, int col ) const +

+Returns the value in cell row, col, or an invalid value if +the cell does not exist or has no value. + +

Property Documentation

+

bool autoEdit

+

This property holds whether the data table automatically applies edits. +

The default value for this property is TRUE. When the user begins +an insert or update in the table there are two possible outcomes +when they navigate to another record: +

    +
  1. the insert or update is is performed -- this occurs if autoEdit is TRUE +
  2. the insert or update is abandoned -- this occurs if autoEdit is FALSE +
+ +

Set this property's value with setAutoEdit() and get this property's value with autoEdit(). +

bool confirmCancels

+

This property holds whether the data table confirms cancel operations. +

If the confirmCancel property is TRUE, all cancels must be +confirmed by the user through a message box (this behavior can be +changed by overriding the confirmCancel() function), otherwise all +cancels occur immediately. The default is FALSE. +

See also confirmEdits and confirmCancel(). + +

Set this property's value with setConfirmCancels() and get this property's value with confirmCancels(). +

bool confirmDelete

+

This property holds whether the data table confirms delete operations. +

If the confirmDelete property is TRUE, all deletions must be +confirmed by the user through a message box (this behaviour can be +changed by overriding the confirmEdit() function), otherwise all +delete operations occur immediately. +

See also confirmCancels, confirmEdits, confirmUpdate, and confirmInsert. + +

Set this property's value with setConfirmDelete() and get this property's value with confirmDelete(). +

bool confirmEdits

+

This property holds whether the data table confirms edit operations. +

If the confirmEdits property is TRUE, the data table confirms all +edit operations (inserts, updates and deletes). Finer control of +edit confirmation can be achieved using confirmCancels, confirmInsert, confirmUpdate and confirmDelete. +

See also confirmCancels, confirmInsert, confirmUpdate, and confirmDelete. + +

Set this property's value with setConfirmEdits() and get this property's value with confirmEdits(). +

bool confirmInsert

+

This property holds whether the data table confirms insert operations. +

If the confirmInsert property is TRUE, all insertions must be +confirmed by the user through a message box (this behaviour can be +changed by overriding the confirmEdit() function), otherwise all +insert operations occur immediately. +

See also confirmCancels, confirmEdits, confirmUpdate, and confirmDelete. + +

Set this property's value with setConfirmInsert() and get this property's value with confirmInsert(). +

bool confirmUpdate

+

This property holds whether the data table confirms update operations. +

If the confirmUpdate property is TRUE, all updates must be +confirmed by the user through a message box (this behaviour can be +changed by overriding the confirmEdit() function), otherwise all +update operations occur immediately. +

See also confirmCancels, confirmEdits, confirmInsert, and confirmDelete. + +

Set this property's value with setConfirmUpdate() and get this property's value with confirmUpdate(). +

DateFormat dateFormat

+

This property holds the format used for displaying date/time values. +

The dateFormat property is used for displaying date/time values in +the table. The default value is TQt::LocalDate. + +

Set this property's value with setDateFormat() and get this property's value with dateFormat(). +

TQString falseText

+

This property holds the text used to represent false values. +

The falseText property will be used to represent NULL values in +the table. The default value is "False". + +

Set this property's value with setFalseText() and get this property's value with falseText(). +

TQString filter

+

This property holds the data filter for the data table. +

The filter applies to the data shown in the table. To view data +with a new filter, use refresh(). A filter string is an SQL WHERE +clause without the WHERE keyword. +

There is no default filter. +

See also sort. + +

+

Set this property's value with setFilter() and get this property's value with filter(). +

TQString nullText

+

This property holds the text used to represent NULL values. +

The nullText property will be used to represent NULL values in the +table. The default value is provided by the cursor's driver. + +

Set this property's value with setNullText() and get this property's value with nullText(). +

int numCols

+

This property holds the number of columns in the table. +

+

Get this property's value with numCols(). +

int numRows

+

This property holds the number of rows in the table. +

+

Get this property's value with numRows(). +

TQStringList sort

+

This property holds the data table's sort. +

The table's sort affects the order in which data records are +displayed in the table. To apply a sort, use refresh(). +

When examining the sort property, a string list is returned with +each item having the form 'fieldname order' (e.g., 'id ASC', +'surname DESC'). +

There is no default sort. +

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

+    TQStringList list = myDataTable.sort();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also filter and refresh(). + +

Set this property's value with setSort() and get this property's value with sort(). +

TQString trueText

+

This property holds the text used to represent true values. +

The trueText property will be used to represent NULL values in the +table. The default value is "True". + +

Set this property's value with setTrueText() and get this property's value with trueText(). + +


+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/qdataview-h.html b/doc/html/qdataview-h.html new file mode 100644 index 00000000..b4dea455 --- /dev/null +++ b/doc/html/qdataview-h.html @@ -0,0 +1,134 @@ + + + + + +qdataview.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdataview.h

+ +

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


+
+/****************************************************************************
+**
+** Definition of TQDataView class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQDATAVIEW_H
+#define TQDATAVIEW_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL_VIEW_WIDGETS
+
+class TQSqlForm;
+class TQSqlRecord;
+class TQDataViewPrivate;
+
+class TQM_EXPORT_SQL TQDataView : public TQWidget
+{
+    Q_OBJECT
+
+public:
+    TQDataView( TQWidget* parent=0, const char* name=0, WFlags fl = 0 );
+    ~TQDataView();
+
+    virtual void setForm( TQSqlForm* form );
+    TQSqlForm* form();
+    virtual void setRecord( TQSqlRecord* record );
+    TQSqlRecord* record();
+
+public slots:
+    virtual void refresh( TQSqlRecord* buf );
+    virtual void readFields();
+    virtual void writeFields();
+    virtual void clearValues();
+
+private:
+    TQDataViewPrivate* d;
+
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQDataView( const TQDataView & );
+    TQDataView &operator=( const TQDataView & );
+#endif
+};
+
+
+#endif
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdataview-members.html b/doc/html/qdataview-members.html new file mode 100644 index 00000000..c2419d04 --- /dev/null +++ b/doc/html/qdataview-members.html @@ -0,0 +1,346 @@ + + + + + +TQDataView Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDataView

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdataview.html b/doc/html/qdataview.html new file mode 100644 index 00000000..eccb7e61 --- /dev/null +++ b/doc/html/qdataview.html @@ -0,0 +1,151 @@ + + + + + +TQDataView Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDataView Class Reference
[sql module]

+ +

The TQDataView class provides read-only SQL forms. +More... +

#include <qdataview.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+
    +
  • TQDataView ( TQWidget * parent = 0, const char * name = 0, WFlags fl = 0 )
  • +
  • ~TQDataView ()
  • +
  • virtual void setForm ( TQSqlForm * form )
  • +
  • TQSqlForm * form ()
  • +
  • virtual void setRecord ( TQSqlRecord * record )
  • +
  • TQSqlRecord * record ()
  • +
+

Public Slots

+ +

Detailed Description

+ + +The TQDataView class provides read-only SQL forms. +

+ + +

This class provides a form which displays SQL field data from a +record buffer. Because TQDataView does not support editing it uses +less resources than a TQDataBrowser. This class is well suited for +displaying read-only data from a SQL database. +

If you want a to present your data in an editable form use +TQDataBrowser; if you want a table-based presentation of your data +use TQDataTable. +

The form is associated with the data view with setForm() and the +record is associated with setRecord(). You can also pass a +TQSqlRecord to the refresh() function which will set the record to +the given record and read the record's fields into the form. +

See also Database Classes. + +


Member Function Documentation

+

TQDataView::TQDataView ( TQWidget * parent = 0, const char * name = 0, WFlags fl = 0 ) +

+Constructs a data view which is a child of parent, called name, and with widget flags fl. + +

TQDataView::~TQDataView () +

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

void TQDataView::clearValues () [virtual slot] +

+Clears the default form's values. If there is no default form, +nothing happens. All the values are set to their 'zero state', +e.g. 0 for numeric fields, "" for string fields. + +

TQSqlForm * TQDataView::form () +

+Returns the default form used by the data view, or 0 if there is +none. +

See also setForm(). + +

void TQDataView::readFields () [virtual slot] +

+Causes the default form to read its fields from the record buffer. +If there is no default form, or no record, nothing happens. +

See also setForm(). + +

TQSqlRecord * TQDataView::record () +

+Returns the default record used by the data view, or 0 if there is +none. +

See also setRecord(). + +

void TQDataView::refresh ( TQSqlRecord * buf ) [virtual slot] +

+Causes the default form to display the contents of buf. If +there is no default form, nothing happens.The buf also becomes +the default record for all subsequent calls to readFields() and +writefields(). This slot is equivalant to calling: +

+    myView.setRecord( record );
+    myView.readFields();
+    
+ +

See also setRecord() and readFields(). + +

void TQDataView::setForm ( TQSqlForm * form ) [virtual] +

+Sets the form used by the data view to form. If a record has +already been assigned to the data view, the form will display that +record's data. +

See also form(). + +

void TQDataView::setRecord ( TQSqlRecord * record ) [virtual] +

+Sets the record used by the data view to record. If a form has +already been assigned to the data view, the form will display the +data from record in that form. +

See also record(). + +

void TQDataView::writeFields () [virtual slot] +

+Causes the default form to write its fields to the record buffer. +If there is no default form, or no record, nothing happens. +

See also setForm(). + + +


+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/qdate-members.html b/doc/html/qdate-members.html new file mode 100644 index 00000000..d18c96e3 --- /dev/null +++ b/doc/html/qdate-members.html @@ -0,0 +1,78 @@ + + + + + +TQDate Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDate

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdate.html b/doc/html/qdate.html new file mode 100644 index 00000000..76768d11 --- /dev/null +++ b/doc/html/qdate.html @@ -0,0 +1,459 @@ + + + + + +TQDate Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDate Class Reference

+ +

The TQDate class provides date functions. +More... +

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

+

#include <qdatetime.h> +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQDate & d )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQDate & d )
  • +
+

Detailed Description

+ + + +The TQDate class provides date functions. +

+ +

A TQDate object contains a calendar date, i.e. year, month, and day +numbers, in the modern Western (Gregorian) calendar. It can read +the current date from the system clock. It provides functions for +comparing dates and for manipulating dates, e.g. by adding a +number of days or months or years. +

A TQDate object is typically created either by giving the year, +month and day numbers explicitly, or by using the static function +currentDate(), which creates a TQDate object containing the system +clock's date. An explicit date can also be set using setYMD(). The +fromString() function returns a TQDate given a string and a date +format which is used to interpret the date within the string. +

The year(), month(), and day() functions provide access to the +year, month, and day numbers. Also, dayOfWeek() and dayOfYear() +functions are provided. The same information is provided in +textual format by the toString(), shortDayName(), longDayName(), +shortMonthName() and longMonthName() functions. +

TQDate provides a full set of operators to compare two TQDate +objects where smaller means earlier and larger means later. +

You can increment (or decrement) a date by a given number of days +using addDays(). Similarly you can use addMonths() and addYears(). +The daysTo() function returns the number of days between two +dates. +

The daysInMonth() and daysInYear() functions return how many days +there are in this date's month and year, respectively. The +leapYear() function indicates whether this date is in a leap year. +

Note that TQDate should not be used for date calculations for dates +prior to the introduction of the Gregorian calendar. This calendar +was adopted by England from the 14th +September 1752 (hence this is the earliest valid TQDate), and +subsequently by most other Western countries, until 1923. +

The end of time is reached around the year 8000, by which time we +expect TQt to be obsolete. +

See also TQTime, TQDateTime, TQDateEdit, TQDateTimeEdit, and Time and Date. + +


Member Function Documentation

+

TQDate::TQDate () +

+ +

Constructs a null date. Null dates are invalid. +

See also isNull() and isValid(). + +

TQDate::TQDate ( int y, int m, int d ) +

+Constructs a date with year y, month m and day d. +

y must be in the range 1752..8000, m must be in the range +1..12, and d must be in the range 1..31. +

Warning: If y is in the range 0..99, it is interpreted as +1900..1999. +

See also isValid(). + +

TQDate TQDate::addDays ( int ndays ) const +

+Returns a TQDate object containing a date ndays later than the +date of this object (or earlier if ndays is negative). +

See also addMonths(), addYears(), and daysTo(). + +

TQDate TQDate::addMonths ( int nmonths ) const +

+Returns a TQDate object containing a date nmonths later than the +date of this object (or earlier if nmonths is negative). +

See also addDays() and addYears(). + +

TQDate TQDate::addYears ( int nyears ) const +

+Returns a TQDate object containing a date nyears later than the +date of this object (or earlier if nyears is negative). +

See also addDays() and addMonths(). + +

TQDate TQDate::currentDate ( TQt::TimeSpec ts ) [static] +

+Returns the current date, as reported by the system clock, for the +TimeSpec ts. The default TimeSpec is LocalTime. +

See also TQTime::currentTime(), TQDateTime::currentDateTime(), and TQt::TimeSpec. + +

Example: dclock/dclock.cpp. +

TQDate TQDate::currentDate () [static] +

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

Returns the current date, as reported by the system clock. +

See also TQTime::currentTime() and TQDateTime::currentDateTime(). + +

int TQDate::day () const +

+Returns the day of the month (1..31) of this date. +

See also year(), month(), and dayOfWeek(). + +

Example: dclock/dclock.cpp. +

TQString TQDate::dayName ( int weekday ) [static] +

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

Use shortDayName() instead. + +

int TQDate::dayOfWeek () const +

+Returns the weekday (Monday=1..Sunday=7) for this date. +

See also day() and dayOfYear(). + +

int TQDate::dayOfYear () const +

+Returns the day of the year (1..365) for this date. +

See also day() and dayOfWeek(). + +

int TQDate::daysInMonth () const +

+Returns the number of days in the month (28..31) for this date. +

See also day() and daysInYear(). + +

int TQDate::daysInYear () const +

+Returns the number of days in the year (365 or 366) for this date. +

See also day() and daysInMonth(). + +

int TQDate::daysTo ( const TQDate & d ) const +

+Returns the number of days from this date to d (which is +negative if d is earlier than this date). +

Example: +

+        TQDate d1( 1995, 5, 17 );  // May 17th 1995
+        TQDate d2( 1995, 5, 20 );  // May 20th 1995
+        d1.daysTo( d2 );          // returns 3
+        d2.daysTo( d1 );          // returns -3
+    
+ +

See also addDays(). + +

TQDate TQDate::fromString ( const TQString & s, TQt::DateFormat f = TQt::TextDate ) [static] +

+Returns the TQDate represented by the string s, using the format +f, or an invalid date if the string cannot be parsed. +

Note for TQt::TextDate: It is recommended that you use the +English short month names (e.g. "Jan"). Although localized month +names can also be used, they depend on the user's locale settings. +

Warning: TQt::LocalDate cannot be used here. + +

bool TQDate::isNull () const +

+ +

Returns TRUE if the date is null; otherwise returns FALSE. A null +date is invalid. +

See also isValid(). + +

bool TQDate::isValid () const +

+Returns TRUE if this date is valid; otherwise returns FALSE. +

See also isNull(). + +

bool TQDate::isValid ( int y, int m, int d ) [static] +

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

Returns TRUE if the specified date (year y, month m and day +d) is valid; otherwise returns FALSE. +

Example: +

+    TQDate::isValid( 2002, 5, 17 );  // TRUE   May 17th 2002 is valid
+    TQDate::isValid( 2002, 2, 30 );  // FALSE  Feb 30th does not exist
+    TQDate::isValid( 2004, 2, 29 );  // TRUE   2004 is a leap year
+    TQDate::isValid( 1202, 6, 6 );   // FALSE  1202 is pre-Gregorian
+    
+ +

Warning: A y value in the range 00..99 is interpreted as +1900..1999. +

See also isNull() and setYMD(). + +

bool TQDate::leapYear ( int y ) [static] +

+Returns TRUE if the specified year y is a leap year; otherwise +returns FALSE. + +

TQString TQDate::longDayName ( int weekday ) [static] +

+Returns the long name of the weekday. +

1 = "Monday", 2 = "Tuesday", ... 7 = "Sunday" +

The day names will be localized according to the system's locale +settings. +

See also toString(), shortDayName(), shortMonthName(), and longMonthName(). + +

TQString TQDate::longMonthName ( int month ) [static] +

+Returns the long name of the month. +

1 = "January", 2 = "February", ... 12 = "December" +

The month names will be localized according to the system's locale +settings. +

See also toString(), shortMonthName(), shortDayName(), and longDayName(). + +

int TQDate::month () const +

+Returns the month (January=1..December=12) of this date. +

See also year() and day(). + +

Example: dclock/dclock.cpp. +

TQString TQDate::monthName ( int month ) [static] +

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

Use shortMonthName() instead. + +

bool TQDate::operator!= ( const TQDate & d ) const +

+ +

Returns TRUE if this date is different from d; otherwise returns FALSE. + +

bool TQDate::operator< ( const TQDate & d ) const +

+ +

Returns TRUE if this date is earlier than d, otherwise returns FALSE. + +

bool TQDate::operator<= ( const TQDate & d ) const +

+ +

Returns TRUE if this date is earlier than or equal to d, +otherwise returns FALSE. + +

bool TQDate::operator== ( const TQDate & d ) const +

+ +

Returns TRUE if this date is equal to d; otherwise returns FALSE. + +

bool TQDate::operator> ( const TQDate & d ) const +

+ +

Returns TRUE if this date is later than d, otherwise returns FALSE. + +

bool TQDate::operator>= ( const TQDate & d ) const +

+ +

Returns TRUE if this date is later than or equal to d, +otherwise returns FALSE. + +

bool TQDate::setYMD ( int y, int m, int d ) +

+Sets the date's year y, month m and day d. +

y must be in the range 1752..8000, m must be in the range +1..12, and d must be in the range 1..31. +

Warning: If y is in the range 0..99, it is interpreted as +1900..1999. +

Returns TRUE if the date is valid; otherwise returns FALSE. + +

TQString TQDate::shortDayName ( int weekday ) [static] +

+Returns the name of the weekday. +

1 = "Mon", 2 = "Tue", ... 7 = "Sun" +

The day names will be localized according to the system's locale +settings. +

See also toString(), shortMonthName(), longMonthName(), and longDayName(). + +

TQString TQDate::shortMonthName ( int month ) [static] +

+Returns the name of the month. +

1 = "Jan", 2 = "Feb", ... 12 = "Dec" +

The month names will be localized according to the system's locale +settings. +

See also toString(), longMonthName(), shortDayName(), and longDayName(). + +

TQString TQDate::toString ( const TQString & format ) const +

+Returns the date as a string. The format parameter determines +the format of the result string. +

These expressions may be used: +

+
Expression Output +
d the day as number without a leading zero (1-31) +
dd the day as number with a leading zero (01-31) +
ddd +the abbreviated localized day name (e.g. 'Mon'..'Sun'). +Uses TQDate::shortDayName(). +
dddd +the long localized day name (e.g. 'Monday'..'Sunday'). +Uses TQDate::longDayName(). +
M the month as number without a leading zero (1-12) +
MM the month as number with a leading zero (01-12) +
MMM +the abbreviated localized month name (e.g. 'Jan'..'Dec'). +Uses TQDate::shortMonthName(). +
MMMM +the long localized month name (e.g. 'January'..'December'). +Uses TQDate::longMonthName(). +
yy the year as two digit number (00-99) +
yyyy the year as four digit number (1752-8000) +
+

All other input characters will be ignored. +

Example format strings (assuming that the TQDate is the +20th July 1969): +

+
Format Result +
dd.MM.yyyy 20.07.1969 +
ddd MMMM d yy Sun July 20 69 +
+

If the date is an invalid date, then TQString::null will be returned. +

See also TQDateTime::toString() and TQTime::toString(). + +

+

TQString TQDate::toString ( TQt::DateFormat f = TQt::TextDate ) const +

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

Returns the date as a string. The f parameter determines the +format of the string. +

If f is TQt::TextDate, the string format is "Sat May 20 1995" +(using the shortDayName() and shortMonthName() functions to +generate the string, so the day and month names are locale +specific). +

If f is TQt::ISODate, the string format corresponds to the +ISO 8601 specification for representations of dates, which is +YYYY-MM-DD where YYYY is the year, MM is the month of the year +(between 01 and 12), and DD is the day of the month between 01 and +31. +

If f is TQt::LocalDate, the string format depends on the +locale settings of the system. +

If the date is an invalid date, then TQString::null will be returned. +

See also shortDayName() and shortMonthName(). + +

int TQDate::weekNumber ( int * yearNumber = 0 ) const +

+Returns the week number (1 to 53), and stores the year in *yearNumber unless yearNumber is null (the default). +

Returns 0 if the date is invalid. +

In accordance with ISO 8601, weeks start on Monday and the first +Thursday of a year is always in week 1 of that year. Most years +have 52 weeks, but some have 53. +

*yearNumber is not always the same as year(). For example, 1 +January 2000 has week number 52 in the year 1999, and 31 December +2002 has week number 1 in the year 2003. +

+

Copyright (c) 1989 The Regents of the University of California. +All rights reserved. +

Redistribution and use in source and binary forms are permitted +provided that the above copyright notice and this paragraph are +duplicated in all such forms and that any documentation, +advertising materials, and other materials related to such +distribution and use acknowledge that the software was developed +by the University of California, Berkeley. The name of the +University may not be used to endorse or promote products derived +from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +

See also isValid(). + +

int TQDate::year () const +

+Returns the year (1752..8000) of this date. +

See also month() and day(). + +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQDate & d ) +

+ +

Writes the date, d, to the data stream, s. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQDate & d ) +

+ +

Reads a date from the stream s into d. +

See also Format of the TQDataStream operators. + + +


+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/qdateedit-members.html b/doc/html/qdateedit-members.html new file mode 100644 index 00000000..573e3da2 --- /dev/null +++ b/doc/html/qdateedit-members.html @@ -0,0 +1,358 @@ + + + + + +TQDateEdit Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDateEdit

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdateedit.html b/doc/html/qdateedit.html new file mode 100644 index 00000000..29ac63f6 --- /dev/null +++ b/doc/html/qdateedit.html @@ -0,0 +1,296 @@ + + + + + +TQDateEdit Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDateEdit Class Reference

+ +

The TQDateEdit class provides a date editor. +More... +

#include <qdatetimeedit.h> +

Inherits TQDateTimeEditBase. +

List of all member functions. +

Public Members

+ +

Public Slots

+
    +
  • virtual void setDate ( const TQDate & date )
  • +
+

Signals

+ +

Properties

+
    +
  • bool autoAdvance - whether the editor automatically advances to the next section
  • +
  • TQDate date - the editor's date value
  • +
  • TQDate maxValue - the editor's maximum value
  • +
  • TQDate minValue - the editor's minimum value
  • +
  • Order order - the order in which the year, month and day appear
  • +
+

Protected Members

+ +

Protected Slots

+ +

Detailed Description

+ + +The TQDateEdit class provides a date editor. +

+ + +

TQDateEdit allows the user to edit dates by using the keyboard or +the arrow keys to increase/decrease date values. The arrow keys +can be used to move from section to section within the TQDateEdit +box. Dates appear in accordance with the local date/time settings +or in year, month, day order if the system doesn't provide this +information. It is recommended that the TQDateEdit be initialised +with a date, e.g. +

+    TQDateEdit *dateEdit = new TQDateEdit( TQDate::currentDate(), this );
+    dateEdit->setRange( TQDate::currentDate().addDays( -365 ),
+                        TQDate::currentDate().addDays(  365 ) );
+    dateEdit->setOrder( TQDateEdit::MDY );
+    dateEdit->setAutoAdvance( TRUE );
+    
+ +

Here we've created a new TQDateEdit object initialised with today's +date and restricted the valid date range to today plus or minus +365 days. We've set the order to month, day, year. If the auto +advance property is TRUE (as we've set it here) when the user +completes a section of the date, e.g. enters two digits for the +month, they are automatically taken to the next section. +

The maximum and minimum values for a date value in the date editor +default to the maximum and minimum values for a TQDate. You can +change this by calling setMinValue(), setMaxValue() or setRange(). +

Terminology: A TQDateEdit widget comprises three 'sections', one +each for the year, month and day. You can change the separator +character using TQDateTimeEditor::setSeparator(), by default the +separator will be taken from the systems settings. If that is +not possible, it defaults to "-". +

Date Time Widgets
+

See also TQDate, TQTimeEdit, TQDateTimeEdit, Advanced Widgets, and Time and Date. + +


Member Type Documentation

+

TQDateEdit::Order

+ +

This enum defines the order in which the sections that comprise a +date appear. +

    +
  • TQDateEdit::MDY - month-day-year +
  • TQDateEdit::DMY - day-month-year +
  • TQDateEdit::YMD - year-month-day (the default) +
  • TQDateEdit::YDM - year-day-month (included for completeness; but should +not be used) +
+

Member Function Documentation

+

TQDateEdit::TQDateEdit ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs an empty date editor which is a child of parent and +called name name. + +

TQDateEdit::TQDateEdit ( const TQDate & date, TQWidget * parent = 0, const char * name = 0 ) +

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

Constructs a date editor with the initial value date, parent parent and called name. +

The date editor is initialized with date. + +

TQDateEdit::~TQDateEdit () +

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

bool TQDateEdit::autoAdvance () const +

Returns TRUE if the editor automatically advances to the next section; otherwise returns FALSE. +See the "autoAdvance" property for details. +

TQDate TQDateEdit::date () const +

Returns the editor's date value. +See the "date" property for details. +

void TQDateEdit::fix () [virtual protected] +

+Attempts to fix any invalid date entries. +

The rules applied are as follows: +

    +
  • If the year has four digits it is left unchanged. +
  • If the year has two digits, the year will be changed to four +digits in the range current year - 70 to current year + 29. +
  • If the year has three digits in the range 100..999, the +current millennium, i.e. 2000, will be added giving a year +in the range 2100..2999. +
  • If the day or month is 0 then it will be set to 1 or the +minimum valid day\month in the range. +
+

+

TQDate TQDateEdit::maxValue () const +

Returns the editor's maximum value. +See the "maxValue" property for details. +

TQDate TQDateEdit::minValue () const +

Returns the editor's minimum value. +See the "minValue" property for details. +

Order TQDateEdit::order () const +

Returns the order in which the year, month and day appear. +See the "order" property for details. +

TQString TQDateEdit::sectionFormattedText ( int sec ) [virtual protected] +

+Returns the formatted number for section sec. This will +correspond to either the year, month or day section, depending on +the current display order. +

See also order. + +

TQString TQDateEdit::separator () const +

+Returns the editor's separator. + +

void TQDateEdit::setAutoAdvance ( bool advance ) [virtual] +

Sets whether the editor automatically advances to the next section to advance. +See the "autoAdvance" property for details. +

void TQDateEdit::setDate ( const TQDate & date ) [virtual slot] +

Sets the editor's date value to date. +See the "date" property for details. +

void TQDateEdit::setDay ( int day ) [virtual protected] +

+Sets the day to day, which must be a valid day. The function +will ensure that the day set is valid for the month and year. + +

void TQDateEdit::setMaxValue ( const TQDate & d ) [virtual] +

Sets the editor's maximum value to d. +See the "maxValue" property for details. +

void TQDateEdit::setMinValue ( const TQDate & d ) [virtual] +

Sets the editor's minimum value to d. +See the "minValue" property for details. +

void TQDateEdit::setMonth ( int month ) [virtual protected] +

+Sets the month to month, which must be a valid month, i.e. +between 1 and 12. + +

void TQDateEdit::setOrder ( Order order ) [virtual] +

Sets the order in which the year, month and day appear to order. +See the "order" property for details. +

void TQDateEdit::setRange ( const TQDate & min, const TQDate & max ) [virtual] +

+Sets the valid input range for the editor to be from min to max inclusive. If min is invalid no minimum date will be set. +Similarly, if max is invalid no maximum date will be set. + +

void TQDateEdit::setSeparator ( const TQString & s ) [virtual] +

+Sets the separator to s. Note that currently only the first +character of s is used. + +

void TQDateEdit::setYear ( int year ) [virtual protected] +

+Sets the year to year, which must be a valid year. The range +currently supported is from 1752 to 8000. +

See also TQDate. + +

void TQDateEdit::updateButtons () [protected slot] +

+Enables/disables the push buttons according to the min/max date +for this widget. + +

void TQDateEdit::valueChanged ( const TQDate & date ) [signal] +

+ +

This signal is emitted whenever the editor's value changes. The date parameter is the new value. + +


Property Documentation

+

bool autoAdvance

+

This property holds whether the editor automatically advances to the next section. +

If autoAdvance is TRUE, the editor will automatically advance +focus to the next date section if a user has completed a section. +The default is FALSE. + +

Set this property's value with setAutoAdvance() and get this property's value with autoAdvance(). +

TQDate date

+

This property holds the editor's date value. +

If the date property is not valid, the editor displays all zeroes +and TQDateEdit::date() will return an invalid date. It is strongly +recommended that the editor is given a default date value (e.g. +currentDate()). That way, attempts to set the date property to an +invalid date will fail. +

When changing the date property, if the date is less than +minValue(), or is greater than maxValue(), nothing happens. + +

Set this property's value with setDate() and get this property's value with date(). +

TQDate maxValue

+

This property holds the editor's maximum value. +

Setting the maximum date value for the editor is equivalent to +calling TQDateEdit::setRange( minValue(), d ), where d is the +maximum date. The default maximum date is 8000-12-31. +

See also minValue and setRange(). + +

Set this property's value with setMaxValue() and get this property's value with maxValue(). +

TQDate minValue

+

This property holds the editor's minimum value. +

Setting the minimum date value is equivalent to calling +TQDateEdit::setRange( d, maxValue() ), where d is the minimum +date. The default minimum date is 1752-09-14. +

See also maxValue and setRange(). + +

Set this property's value with setMinValue() and get this property's value with minValue(). +

Order order

+

This property holds the order in which the year, month and day appear. +

The default order is locale dependent. +

See also Order. + +

Set this property's value with setOrder() and get this property's value with order(). + +


+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/qdatetime-h.html b/doc/html/qdatetime-h.html new file mode 100644 index 00000000..011f246e --- /dev/null +++ b/doc/html/qdatetime-h.html @@ -0,0 +1,298 @@ + + + + + +qdatetime.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdatetime.h

+ +

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


+
+/*************************************************************************
+** $Id: qt/qdatetime.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of date and time classes
+**
+** Created : 940124
+**
+** 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 retquirements 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 TQDATETIME_H
+#define TQDATETIME_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qnamespace.h"
+#endif // QT_H
+
+
+/*****************************************************************************
+  TQDate class
+ *****************************************************************************/
+
+class Q_EXPORT TQDate
+{
+public:
+    TQDate() { jd = 0; }
+    TQDate( int y, int m, int d );
+
+    bool isNull() const { return jd == 0; }
+    bool isValid() const;
+
+    int year() const;
+    int month() const;
+    int day() const;
+    int dayOfWeek() const;
+    int dayOfYear() const;
+    int daysInMonth() const;
+    int daysInYear() const;
+    int weekNumber( int *yearNum = 0 ) const;
+
+#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_COMPAT
+    static TQString monthName( int month ) { return shortMonthName( month ); }
+    static TQString dayName( int weekday ) { return shortDayName( weekday ); }
+#endif
+    static TQString shortMonthName( int month );
+    static TQString shortDayName( int weekday );
+    static TQString longMonthName( int month );
+    static TQString longDayName( int weekday );
+#endif //QT_NO_TEXTDATE
+#ifndef QT_NO_TEXTSTRING
+#if !defined(QT_NO_SPRINTF)
+    TQString toString( TQt::DateFormat f = TQt::TextDate ) const;
+#endif
+    TQString toString( const TQString& format ) const;
+#endif
+    bool   setYMD( int y, int m, int d );
+
+    TQDate  addDays( int days )		const;
+    TQDate  addMonths( int months )      const;
+    TQDate  addYears( int years )        const;
+    int	   daysTo( const TQDate & )	const;
+
+    bool   operator==( const TQDate &d ) const { return jd == d.jd; }
+    bool   operator!=( const TQDate &d ) const { return jd != d.jd; }
+    bool   operator<( const TQDate &d )	const { return jd < d.jd; }
+    bool   operator<=( const TQDate &d ) const { return jd <= d.jd; }
+    bool   operator>( const TQDate &d )	const { return jd > d.jd; }
+    bool   operator>=( const TQDate &d ) const { return jd >= d.jd; }
+
+    static TQDate currentDate();
+    static TQDate currentDate( TQt::TimeSpec );
+#ifndef QT_NO_DATESTRING
+    static TQDate fromString( const TQString& s, TQt::DateFormat f = TQt::TextDate );
+#endif
+    static bool	 isValid( int y, int m, int d );
+    static bool	 leapYear( int year );
+
+    static uint	 gregorianToJulian( int y, int m, int d );
+    static void	 julianToGregorian( uint jd, int &y, int &m, int &d );
+private:
+    uint	 jd;
+    friend class TQDateTime;
+#ifndef QT_NO_DATASTREAM
+    friend Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQDate & );
+    friend Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQDate & );
+#endif
+};
+
+
+/*****************************************************************************
+  TQTime class
+ *****************************************************************************/
+
+class Q_EXPORT TQTime
+{
+public:
+    TQTime() { ds=0; }				// set null time
+    TQTime( int h, int m, int s=0, int ms=0 );	// set time
+
+    bool   isNull()	 const { return ds == 0; }
+    bool   isValid()	 const;			// valid time
+
+    int	   hour()	 const;			// 0..23
+    int	   minute()	 const;			// 0..59
+    int	   second()	 const;			// 0..59
+    int	   msec()	 const;			// 0..999
+#ifndef QT_NO_DATESTRING
+#ifndef QT_NO_SPRINTF
+    TQString toString( TQt::DateFormat f = TQt::TextDate )	 const;
+#endif
+    TQString toString( const TQString& format ) const;
+#endif
+    bool   setHMS( int h, int m, int s, int ms=0 );
+
+    TQTime  addSecs( int secs )		const;
+    int	   secsTo( const TQTime & )	const;
+    TQTime  addMSecs( int ms )		const;
+    int	   msecsTo( const TQTime & )	const;
+
+    bool   operator==( const TQTime &d ) const { return ds == d.ds; }
+    bool   operator!=( const TQTime &d ) const { return ds != d.ds; }
+    bool   operator<( const TQTime &d )	const { return ds < d.ds; }
+    bool   operator<=( const TQTime &d ) const { return ds <= d.ds; }
+    bool   operator>( const TQTime &d )	const { return ds > d.ds; }
+    bool   operator>=( const TQTime &d ) const { return ds >= d.ds; }
+
+    static TQTime currentTime();
+    static TQTime currentTime( TQt::TimeSpec );
+#ifndef QT_NO_DATESTRING
+    static TQTime fromString( const TQString& s, TQt::DateFormat f = TQt::TextDate );
+#endif
+    static bool	 isValid( int h, int m, int s, int ms=0 );
+
+    void   start();
+    int	   restart();
+    int	   elapsed() const;
+
+private:
+    static bool currentTime( TQTime * );
+    static bool currentTime( TQTime *, TQt::TimeSpec );
+
+    uint   ds;
+    friend class TQDateTime;
+#ifndef QT_NO_DATASTREAM
+    friend Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQTime & );
+    friend Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQTime & );
+#endif
+};
+
+
+/*****************************************************************************
+  TQDateTime class
+ *****************************************************************************/
+
+class Q_EXPORT TQDateTime
+{
+public:
+    TQDateTime() {}				// set null date and null time
+    TQDateTime( const TQDate & );
+    TQDateTime( const TQDate &, const TQTime & );
+
+    bool   isNull()	const		{ return d.isNull() && t.isNull(); }
+    bool   isValid()	const		{ return d.isValid() && t.isValid(); }
+
+    TQDate  date()	const		{ return d; }
+    TQTime  time()	const		{ return t; }
+    uint   toTime_t()	const;
+    void   setDate( const TQDate &date ) { d = date; }
+    void   setTime( const TQTime &time ) { t = time; }
+    void   setTime_t( uint secsSince1Jan1970UTC );
+    void   setTime_t( uint secsSince1Jan1970UTC, TQt::TimeSpec );
+#ifndef QT_NO_DATESTRING
+#ifndef QT_NO_SPRINTF
+    TQString toString( TQt::DateFormat f = TQt::TextDate )	const;
+#endif
+    TQString toString( const TQString& format ) const;
+#endif
+    TQDateTime addDays( int days )	const;
+    TQDateTime addMonths( int months )   const;
+    TQDateTime addYears( int years )     const;
+    TQDateTime addSecs( int secs )	const;
+    int	   daysTo( const TQDateTime & )	const;
+    int	   secsTo( const TQDateTime & )	const;
+
+    bool   operator==( const TQDateTime &dt ) const;
+    bool   operator!=( const TQDateTime &dt ) const;
+    bool   operator<( const TQDateTime &dt )  const;
+    bool   operator<=( const TQDateTime &dt ) const;
+    bool   operator>( const TQDateTime &dt )  const;
+    bool   operator>=( const TQDateTime &dt ) const;
+
+    static TQDateTime currentDateTime();
+    static TQDateTime currentDateTime( TQt::TimeSpec );
+#ifndef QT_NO_DATESTRING
+    static TQDateTime fromString( const TQString& s, TQt::DateFormat f = TQt::TextDate );
+#endif
+private:
+    TQDate  d;
+    TQTime  t;
+#ifndef QT_NO_DATASTREAM
+    friend Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQDateTime &);
+    friend Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQDateTime & );
+#endif
+};
+
+
+/*****************************************************************************
+  Date and time stream functions
+ *****************************************************************************/
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQDate & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQDate & );
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQTime & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQTime & );
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQDateTime & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQDateTime & );
+#endif // QT_NO_DATASTREAM
+
+#endif // TQDATETIME_H
+
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatetime-members.html b/doc/html/qdatetime-members.html new file mode 100644 index 00000000..deff9220 --- /dev/null +++ b/doc/html/qdatetime-members.html @@ -0,0 +1,70 @@ + + + + + +TQDateTime Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDateTime

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatetime.html b/doc/html/qdatetime.html new file mode 100644 index 00000000..95c3fc71 --- /dev/null +++ b/doc/html/qdatetime.html @@ -0,0 +1,393 @@ + + + + + +TQDateTime Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDateTime Class Reference

+ +

The TQDateTime class provides date and time functions. +More... +

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

+

#include <qdatetime.h> +

List of all member functions. +

Public Members

+
    +
  • TQDateTime ()
  • +
  • TQDateTime ( const TQDate & date )
  • +
  • TQDateTime ( const TQDate & date, const TQTime & time )
  • +
  • bool isNull () const
  • +
  • bool isValid () const
  • +
  • TQDate date () const
  • +
  • TQTime time () const
  • +
  • uint toTime_t () const
  • +
  • void setDate ( const TQDate & date )
  • +
  • void setTime ( const TQTime & time )
  • +
  • void setTime_t ( uint secsSince1Jan1970UTC )
  • +
  • void setTime_t ( uint secsSince1Jan1970UTC, TQt::TimeSpec ts )
  • +
  • TQString toString ( TQt::DateFormat f = TQt::TextDate ) const
  • +
  • TQString toString ( const TQString & format ) const
  • +
  • TQDateTime addDays ( int ndays ) const
  • +
  • TQDateTime addMonths ( int nmonths ) const
  • +
  • TQDateTime addYears ( int nyears ) const
  • +
  • TQDateTime addSecs ( int nsecs ) const
  • +
  • int daysTo ( const TQDateTime & dt ) const
  • +
  • int secsTo ( const TQDateTime & dt ) const
  • +
  • bool operator== ( const TQDateTime & dt ) const
  • +
  • bool operator!= ( const TQDateTime & dt ) const
  • +
  • bool operator< ( const TQDateTime & dt ) const
  • +
  • bool operator<= ( const TQDateTime & dt ) const
  • +
  • bool operator> ( const TQDateTime & dt ) const
  • +
  • bool operator>= ( const TQDateTime & dt ) const
  • +
+

Static Public Members

+ +

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQDateTime & dt )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQDateTime & dt )
  • +
+

Detailed Description

+ + + +The TQDateTime class provides date and time functions. +

+ +

A TQDateTime object contains a calendar date and a clock time (a +"datetime"). It is a combination of the TQDate and TQTime classes. +It can read the current datetime from the system clock. It +provides functions for comparing datetimes and for manipulating a +datetime by adding a number of seconds, days, months or years. +

A TQDateTime object is typically created either by giving a date +and time explicitly in the constructor, or by using the static +function currentDateTime(), which returns a TQDateTime object set +to the system clock's time. The date and time can be changed with +setDate() and setTime(). A datetime can also be set using the +setTime_t() function, which takes a POSIX-standard "number of +seconds since 00:00:00 on January 1, 1970" value. The fromString() +function returns a TQDateTime given a string and a date format +which is used to interpret the date within the string. +

The date() and time() functions provide access to the date and +time parts of the datetime. The same information is provided in +textual format by the toString() function. +

TQDateTime provides a full set of operators to compare two +TQDateTime objects where smaller means earlier and larger means +later. +

You can increment (or decrement) a datetime by a given number of +seconds using addSecs() or days using addDays(). Similarly you can +use addMonths() and addYears(). The daysTo() function returns the +number of days between two datetimes, and secsTo() returns the +number of seconds between two datetimes. +

The range of a datetime object is constrained to the ranges of the +TQDate and TQTime objects which it embodies. +

See also TQDate, TQTime, TQDateTimeEdit, and Time and Date. + +


Member Function Documentation

+

TQDateTime::TQDateTime () +

+ +

Constructs a null datetime (i.e. null date and null time). A null +datetime is invalid, since the date is invalid. +

See also isValid(). + +

TQDateTime::TQDateTime ( const TQDate & date ) +

+Constructs a datetime with date date and null (but valid) time +(00:00:00.000). + +

TQDateTime::TQDateTime ( const TQDate & date, const TQTime & time ) +

+Constructs a datetime with date date and time time. + +

TQDateTime TQDateTime::addDays ( int ndays ) const +

+Returns a TQDateTime object containing a datetime ndays days +later than the datetime of this object (or earlier if ndays is +negative). +

See also daysTo(), addMonths(), addYears(), and addSecs(). + +

TQDateTime TQDateTime::addMonths ( int nmonths ) const +

+Returns a TQDateTime object containing a datetime nmonths months +later than the datetime of this object (or earlier if nmonths +is negative). +

See also daysTo(), addDays(), addYears(), and addSecs(). + +

TQDateTime TQDateTime::addSecs ( int nsecs ) const +

+Returns a TQDateTime object containing a datetime nsecs seconds +later than the datetime of this object (or earlier if nsecs is +negative). +

See also secsTo(), addDays(), addMonths(), and addYears(). + +

Example: listviews/listviews.cpp. +

TQDateTime TQDateTime::addYears ( int nyears ) const +

+Returns a TQDateTime object containing a datetime nyears years +later than the datetime of this object (or earlier if nyears is +negative). +

See also daysTo(), addDays(), addMonths(), and addSecs(). + +

TQDateTime TQDateTime::currentDateTime ( TQt::TimeSpec ts ) [static] +

+Returns the current datetime, as reported by the system clock, for the +TimeSpec ts. The default TimeSpec is LocalTime. +

See also TQDate::currentDate(), TQTime::currentTime(), and TQt::TimeSpec. + +

Example: listviews/listviews.cpp. +

TQDateTime TQDateTime::currentDateTime () [static] +

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

Returns the current datetime, as reported by the system clock. +

See also TQDate::currentDate() and TQTime::currentTime(). + +

TQDate TQDateTime::date () const +

+ +

Returns the date part of the datetime. +

See also setDate() and time(). + +

int TQDateTime::daysTo ( const TQDateTime & dt ) const +

+Returns the number of days from this datetime to dt (which is +negative if dt is earlier than this datetime). +

See also addDays() and secsTo(). + +

TQDateTime TQDateTime::fromString ( const TQString & s, TQt::DateFormat f = TQt::TextDate ) [static] +

+Returns the TQDateTime represented by the string s, using the +format f, or an invalid datetime if this is not possible. +

Note for TQt::TextDate: It is recommended that you use the +English short month names (e.g. "Jan"). Although localized month +names can also be used, they depend on the user's locale settings. +

Warning: Note that TQt::LocalDate cannot be used here. + +

bool TQDateTime::isNull () const +

+ +

Returns TRUE if both the date and the time are null; otherwise +returns FALSE. A null datetime is invalid. +

See also TQDate::isNull() and TQTime::isNull(). + +

bool TQDateTime::isValid () const +

+ +

Returns TRUE if both the date and the time are valid; otherwise +returns FALSE. +

See also TQDate::isValid() and TQTime::isValid(). + +

bool TQDateTime::operator!= ( const TQDateTime & dt ) const +

+Returns TRUE if this datetime is different from dt; otherwise +returns FALSE. +

See also operator==(). + +

bool TQDateTime::operator< ( const TQDateTime & dt ) const +

+Returns TRUE if this datetime is earlier than dt; otherwise +returns FALSE. + +

bool TQDateTime::operator<= ( const TQDateTime & dt ) const +

+Returns TRUE if this datetime is earlier than or equal to dt; +otherwise returns FALSE. + +

bool TQDateTime::operator== ( const TQDateTime & dt ) const +

+Returns TRUE if this datetime is equal to dt; otherwise returns FALSE. +

See also operator!=(). + +

bool TQDateTime::operator> ( const TQDateTime & dt ) const +

+Returns TRUE if this datetime is later than dt; otherwise +returns FALSE. + +

bool TQDateTime::operator>= ( const TQDateTime & dt ) const +

+Returns TRUE if this datetime is later than or equal to dt; +otherwise returns FALSE. + +

int TQDateTime::secsTo ( const TQDateTime & dt ) const +

+Returns the number of seconds from this datetime to dt (which +is negative if dt is earlier than this datetime). +

Example: +

+    TQDateTime dt = TQDateTime::currentDateTime();
+    TQDateTime xmas( TQDate(dt.date().year(),12,24), TQTime(17,00) );
+    qDebug( "There are %d seconds to Christmas", dt.secsTo(xmas) );
+    
+ +

See also addSecs(), daysTo(), and TQTime::secsTo(). + +

void TQDateTime::setDate ( const TQDate & date ) +

+ +

Sets the date part of this datetime to date. +

See also date() and setTime(). + +

void TQDateTime::setTime ( const TQTime & time ) +

+ +

Sets the time part of this datetime to time. +

See also time() and setDate(). + +

void TQDateTime::setTime_t ( uint secsSince1Jan1970UTC, TQt::TimeSpec ts ) +

+Sets the date and time to ts time (TQt::LocalTime or TQt::UTC) given the number of seconds that have passed since +1970-01-01T00:00:00, Coordinated Universal Time (UTC). On systems +that do not support timezones this function will behave as if +local time were UTC. +

On Windows, only a subset of secsSince1Jan1970UTC values are +supported, as Windows starts counting from 1980. +

See also toTime_t(). + +

void TQDateTime::setTime_t ( uint secsSince1Jan1970UTC ) +

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

Convenience function that sets the date and time to local time +based on the given UTC time. + +

TQTime TQDateTime::time () const +

+ +

Returns the time part of the datetime. +

See also setTime() and date(). + +

TQString TQDateTime::toString ( const TQString & format ) const +

+Returns the datetime as a string. The format parameter +determines the format of the result string. +

These expressions may be used for the date: +

+
Expression Output +
d the day as number without a leading zero (1-31) +
dd the day as number with a leading zero (01-31) +
ddd +the abbreviated localized day name (e.g. 'Mon'..'Sun'). +Uses TQDate::shortDayName(). +
dddd +the long localized day name (e.g. 'Monday'..'Sunday'). +Uses TQDate::longDayName(). +
M the month as number without a leading zero (1-12) +
MM the month as number with a leading zero (01-12) +
MMM +the abbreviated localized month name (e.g. 'Jan'..'Dec'). +Uses TQDate::shortMonthName(). +
MMMM +the long localized month name (e.g. 'January'..'December'). +Uses TQDate::longMonthName(). +
yy the year as two digit number (00-99) +
yyyy the year as four digit number (1752-8000) +
+

These expressions may be used for the time: +

+
Expression Output +
h +the hour without a leading zero (0..23 or 1..12 if AM/PM display) +
hh +the hour with a leading zero (00..23 or 01..12 if AM/PM display) +
m the minute without a leading zero (0..59) +
mm the minute with a leading zero (00..59) +
s the second whithout a leading zero (0..59) +
ss the second whith a leading zero (00..59) +
z the milliseconds without leading zeroes (0..999) +
zzz the milliseconds with leading zeroes (000..999) +
AP +use AM/PM display. AP will be replaced by either "AM" or "PM". +
ap +use am/pm display. ap will be replaced by either "am" or "pm". +
+

All other input characters will be ignored. +

Example format strings (assumed that the TQDateTime is +21st May 2001 14:13:09) +

+
Format Result +
dd.MM.yyyy 21.05.2001 +
ddd MMMM d yy Tue May 21 01 +
hh:mm:ss.zzz 14:13:09.042 +
h:m:s ap 2:13:9 pm +
+

If the datetime is an invalid datetime, then TQString::null will be returned. +

See also TQDate::toString() and TQTime::toString(). + +

TQString TQDateTime::toString ( TQt::DateFormat f = TQt::TextDate ) const +

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

Returns the datetime as a string. The f parameter determines +the format of the string. +

If f is TQt::TextDate, the string format is "Wed May 20 +03:40:13 1998" (using TQDate::shortDayName(), TQDate::shortMonthName(), +and TQTime::toString() to generate the string, so the day and month +names will have localized names). +

If f is TQt::ISODate, the string format corresponds to the +ISO 8601 extended specification for representations of dates and +times, which is YYYY-MM-DDTHH:MM:SS. +

If f is TQt::LocalDate, the string format depends on the +locale settings of the system. +

If the format f is invalid or the datetime is invalid, toString() +returns a null string. +

See also TQDate::toString() and TQTime::toString(). + +

uint TQDateTime::toTime_t () const +

+Returns the datetime as the number of seconds that have passed +since 1970-01-01T00:00:00, Coordinated Universal Time (UTC). +

On systems that do not support timezones, this function will +behave as if local time were UTC. +

See also setTime_t(). + +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQDateTime & dt ) +

+ +

Writes the datetime dt to the stream s. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQDateTime & dt ) +

+ +

Reads a datetime from the stream s into dt. +

See also Format of the TQDataStream operators. + + +


+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/qdatetimeedit-h.html b/doc/html/qdatetimeedit-h.html new file mode 100644 index 00000000..55eb0860 --- /dev/null +++ b/doc/html/qdatetimeedit-h.html @@ -0,0 +1,338 @@ + + + + + +qdatetimeedit.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdatetimeedit.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdatetimeedit.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of date and time edit classes
+**
+** Created : 001103
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQDATETIMEEDIT_H
+#define TQDATETIMEEDIT_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qstring.h"
+#include "qdatetime.h"
+#endif // QT_H
+
+#ifndef QT_NO_DATETIMEEDIT
+
+class Q_EXPORT TQDateTimeEditBase : public TQWidget
+{
+    Q_OBJECT
+public:
+    TQDateTimeEditBase( TQWidget* parent=0, const char* name=0 )
+	: TQWidget( parent, name ) {}
+    
+    virtual bool setFocusSection( int sec ) = 0;
+    virtual TQString sectionFormattedText( int sec ) = 0;
+    virtual void addNumber( int sec, int num ) = 0;
+    virtual void removeLastNumber( int sec ) = 0;
+
+public slots:
+    virtual void stepUp() = 0;
+    virtual void stepDown() = 0;
+
+private:
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQDateTimeEditBase( const TQDateTimeEditBase & );
+    TQDateTimeEditBase &operator=( const TQDateTimeEditBase & );
+#endif
+};
+
+class TQDateEditPrivate;
+
+class Q_EXPORT TQDateEdit : public TQDateTimeEditBase
+{
+    Q_OBJECT
+    Q_ENUMS( Order )
+    Q_PROPERTY( Order order READ order WRITE setOrder )
+    Q_PROPERTY( TQDate date READ date WRITE setDate )
+    Q_PROPERTY( bool autoAdvance READ autoAdvance WRITE setAutoAdvance )
+    Q_PROPERTY( TQDate maxValue READ maxValue WRITE setMaxValue )
+    Q_PROPERTY( TQDate minValue READ minValue WRITE setMinValue )
+
+public:
+    TQDateEdit( TQWidget* parent=0,  const char* name=0 );
+    TQDateEdit( const TQDate& date, TQWidget* parent=0,  const char* name=0 );
+    ~TQDateEdit();
+
+    enum Order { DMY, MDY, YMD, YDM };
+
+    TQSize sizeHint() const;
+    TQSize minimumSizeHint() const;
+
+public slots:
+    virtual void setDate( const TQDate& date );
+
+public:
+    TQDate date() const;
+    virtual void setOrder( Order order );
+    Order order() const;
+    virtual void setAutoAdvance( bool advance );
+    bool autoAdvance() const;
+
+    virtual void setMinValue( const TQDate& d ) { setRange( d, maxValue() ); }
+    TQDate minValue() const;
+    virtual void setMaxValue( const TQDate& d ) { setRange( minValue(), d ); }
+    TQDate maxValue() const;
+    virtual void setRange( const TQDate& min, const TQDate& max );
+    TQString separator() const;
+    virtual void setSeparator( const TQString& s );
+
+    // Make removeFirstNumber() virtual in TQDateTimeEditBase in 4.0
+    void removeFirstNumber( int sec );
+
+signals:
+    void valueChanged( const TQDate& date );
+
+protected:
+    bool event( TQEvent *e );
+    void timerEvent( TQTimerEvent * );
+    void resizeEvent( TQResizeEvent * );
+    void stepUp();
+    void stepDown();
+    TQString sectionFormattedText( int sec );
+    void addNumber( int sec, int num );
+    
+    void removeLastNumber( int sec );
+    bool setFocusSection( int s );
+
+    virtual void setYear( int year );
+    virtual void setMonth( int month );
+    virtual void setDay( int day );
+    virtual void fix();
+    virtual bool outOfRange( int y, int m, int d ) const;
+
+protected slots:
+    void updateButtons();    
+
+private:
+    void init();
+    int sectionOffsetEnd( int sec ) const;
+    int sectionLength( int sec ) const;
+    TQString sectionText( int sec ) const;
+    TQDateEditPrivate* d;
+
+#if defined(Q_DISABLE_COPY)
+    TQDateEdit( const TQDateEdit & );
+    TQDateEdit &operator=( const TQDateEdit & );
+#endif
+};
+
+class TQTimeEditPrivate;
+
+class Q_EXPORT TQTimeEdit : public TQDateTimeEditBase
+{
+    Q_OBJECT
+    Q_SETS( Display )
+    Q_PROPERTY( TQTime time READ time WRITE setTime )
+    Q_PROPERTY( bool autoAdvance READ autoAdvance WRITE setAutoAdvance )
+    Q_PROPERTY( TQTime maxValue READ maxValue WRITE setMaxValue )
+    Q_PROPERTY( TQTime minValue READ minValue WRITE setMinValue )
+    Q_PROPERTY( Display display READ display WRITE setDisplay )
+
+public:
+    enum Display {
+	Hours	= 0x01,
+	Minutes	= 0x02,
+	Seconds	= 0x04,
+	/*Reserved = 0x08,*/
+	AMPM	= 0x10
+    };
+
+    TQTimeEdit( TQWidget* parent=0,  const char* name=0 );
+    TQTimeEdit( const TQTime& time, TQWidget* parent=0,  const char* name=0 );
+    ~TQTimeEdit();
+
+    TQSize sizeHint() const;
+    TQSize minimumSizeHint() const;
+
+public slots:
+    virtual void setTime( const TQTime& time );
+
+public:
+    TQTime time() const;
+    virtual void setAutoAdvance( bool advance );
+    bool autoAdvance() const;
+
+    virtual void setMinValue( const TQTime& d ) { setRange( d, maxValue() ); }
+    TQTime minValue() const;
+    virtual void setMaxValue( const TQTime& d ) { setRange( minValue(), d ); }
+    TQTime maxValue() const;
+    virtual void setRange( const TQTime& min, const TQTime& max );
+    TQString separator() const;
+    virtual void setSeparator( const TQString& s );
+
+    uint display() const;
+    void setDisplay( uint disp );
+
+    // Make removeFirstNumber() virtual in TQDateTimeEditBase in 4.0
+    void removeFirstNumber( int sec );
+
+signals:
+    void valueChanged( const TQTime& time );
+
+protected:
+    bool event( TQEvent *e );
+    void timerEvent( TQTimerEvent *e );
+    void resizeEvent( TQResizeEvent * );
+    void stepUp();
+    void stepDown();
+    TQString sectionFormattedText( int sec );
+    void addNumber( int sec, int num );
+    void removeLastNumber( int sec );
+    bool setFocusSection( int s );
+    
+    virtual bool outOfRange( int h, int m, int s ) const;
+    virtual void setHour( int h );
+    virtual void setMinute( int m );
+    virtual void setSecond( int s );
+    
+protected slots:
+    void updateButtons();
+
+private:
+    void init();
+    TQString sectionText( int sec );
+    TQTimeEditPrivate* d;
+
+#if defined(Q_DISABLE_COPY)
+    TQTimeEdit( const TQTimeEdit & );
+    TQTimeEdit &operator=( const TQTimeEdit & );
+#endif
+};
+
+
+class TQDateTimeEditPrivate;
+
+class Q_EXPORT TQDateTimeEdit : public TQWidget
+{
+    Q_OBJECT
+    Q_PROPERTY( TQDateTime dateTime READ dateTime WRITE setDateTime )
+
+public:
+    TQDateTimeEdit( TQWidget* parent=0, const char* name=0 );
+    TQDateTimeEdit( const TQDateTime& datetime, TQWidget* parent=0,
+		   const char* name=0 );
+    ~TQDateTimeEdit();
+
+    TQSize sizeHint() const;
+    TQSize minimumSizeHint() const;
+
+public slots:
+    virtual void setDateTime( const TQDateTime & dt );
+
+public:
+    TQDateTime dateTime() const;
+
+    TQDateEdit* dateEdit() { return de; }
+    TQTimeEdit* timeEdit() { return te; }
+
+    virtual void setAutoAdvance( bool advance );
+    bool autoAdvance() const;
+
+signals:
+    void valueChanged( const TQDateTime& datetime );
+
+protected:
+    // ### make init() private in TQt 4.0
+    void init();
+    void resizeEvent( TQResizeEvent * );
+
+protected slots:
+    // ### make these two functions private in TQt 4.0,
+    //     and merge them into one with no parameter
+    void newValue( const TQDate& d );
+    void newValue( const TQTime& t );
+
+private:
+    TQDateEdit* de;
+    TQTimeEdit* te;
+    TQDateTimeEditPrivate* d;
+
+#if defined(Q_DISABLE_COPY)
+    TQDateTimeEdit( const TQDateTimeEdit & );
+    TQDateTimeEdit &operator=( const TQDateTimeEdit & );
+#endif
+};
+
+#endif
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatetimeedit-members.html b/doc/html/qdatetimeedit-members.html new file mode 100644 index 00000000..bf0e1d85 --- /dev/null +++ b/doc/html/qdatetimeedit-members.html @@ -0,0 +1,345 @@ + + + + + +TQDateTimeEdit Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDateTimeEdit

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatetimeedit.html b/doc/html/qdatetimeedit.html new file mode 100644 index 00000000..fbd6e533 --- /dev/null +++ b/doc/html/qdatetimeedit.html @@ -0,0 +1,169 @@ + + + + + +TQDateTimeEdit Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDateTimeEdit Class Reference

+ +

The TQDateTimeEdit class combines a TQDateEdit and TQTimeEdit +widget into a single widget for editing datetimes. +More... +

#include <qdatetimeedit.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+ +

Public Slots

+
    +
  • virtual void setDateTime ( const TQDateTime & dt )
  • +
+

Signals

+ +

Properties

+
    +
  • TQDateTime dateTime - the editor's datetime value
  • +
+

Detailed Description

+ + +The TQDateTimeEdit class combines a TQDateEdit and TQTimeEdit +widget into a single widget for editing datetimes. +

+ + +

TQDateTimeEdit consists of a TQDateEdit and TQTimeEdit widget placed +side by side and offers the functionality of both. The user can +edit the date and time by using the keyboard or the arrow keys to +increase/decrease date or time values. The Tab key can be used to +move from section to section within the TQDateTimeEdit widget, and +the user can be moved automatically when they complete a section +using setAutoAdvance(). The datetime can be set with +setDateTime(). +

The date format is read from the system's locale settings. It is +set to year, month, day order if that is not possible. See +TQDateEdit::setOrder() to change this. Times appear in the order +hours, minutes, seconds using the 24 hour clock. +

It is recommended that the TQDateTimeEdit is initialised with a +datetime, e.g. +

+    TQDateTimeEdit *dateTimeEdit = new TQDateTimeEdit( TQDateTime::currentDateTime(), this );
+    dateTimeEdit->dateEdit()->setRange( TQDateTime::currentDate(),
+                                        TQDateTime::currentDate().addDays( 7 ) );
+    
+ +Here we've created a new TQDateTimeEdit set to the current date and +time, and set the date to have a minimum date of now and a maximum +date of a week from now. +

Terminology: A TQDateEdit widget consists of three 'sections', one +each for the year, month and day. Similarly a TQTimeEdit consists +of three sections, one each for the hour, minute and second. The +character that separates each date section is specified with +setDateSeparator(); similarly setTimeSeparator() is used for the +time sections. +

Date Time Widgets
+

See also TQDateEdit, TQTimeEdit, Advanced Widgets, and Time and Date. + +


Member Function Documentation

+

TQDateTimeEdit::TQDateTimeEdit ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs an empty datetime edit with parent parent and called +name. + +

TQDateTimeEdit::TQDateTimeEdit ( const TQDateTime & datetime, TQWidget * parent = 0, const char * name = 0 ) +

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

Constructs a datetime edit with the initial value datetime, +parent parent and called name. + +

TQDateTimeEdit::~TQDateTimeEdit () +

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

bool TQDateTimeEdit::autoAdvance () const +

+Returns TRUE if auto-advance is enabled, otherwise returns FALSE. +

See also setAutoAdvance(). + +

TQDateEdit * TQDateTimeEdit::dateEdit () +

+ +

Returns the internal widget used for editing the date part of the +datetime. + +

TQDateTime TQDateTimeEdit::dateTime () const +

Returns the editor's datetime value. +See the "dateTime" property for details. +

void TQDateTimeEdit::setAutoAdvance ( bool advance ) [virtual] +

+Sets the auto advance property of the editor to advance. If set +to TRUE, the editor will automatically advance focus to the next +date or time section if the user has completed a section. + +

void TQDateTimeEdit::setDateTime ( const TQDateTime & dt ) [virtual slot] +

Sets the editor's datetime value to dt. +See the "dateTime" property for details. +

TQTimeEdit * TQDateTimeEdit::timeEdit () +

+ +

Returns the internal widget used for editing the time part of the +datetime. + +

void TQDateTimeEdit::valueChanged ( const TQDateTime & datetime ) [signal] +

+ +

This signal is emitted every time the date or time changes. The datetime argument is the new datetime. + +


Property Documentation

+

TQDateTime dateTime

+

This property holds the editor's datetime value. +

The datetime edit's datetime which may be an invalid datetime. + +

Set this property's value with setDateTime() and get this property's value with dateTime(). + +


+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/qdatetimeeditbase-members.html b/doc/html/qdatetimeeditbase-members.html new file mode 100644 index 00000000..3517e93f --- /dev/null +++ b/doc/html/qdatetimeeditbase-members.html @@ -0,0 +1,336 @@ + + + + + +TQDateTimeEditBase Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDateTimeEditBase

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdatetimeeditbase.html b/doc/html/qdatetimeeditbase.html new file mode 100644 index 00000000..86c83898 --- /dev/null +++ b/doc/html/qdatetimeeditbase.html @@ -0,0 +1,57 @@ + + + + + +TQDateTimeEditBase Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDateTimeEditBase Class Reference

+ +

The TQDateTimeEditBase class provides an abstraction for date and edit editors. +More... +

#include <qdatetimeedit.h> +

Inherits TQWidget. +

Inherited by TQDateEdit and TQTimeEdit. +

List of all member functions. +


Detailed Description

+ +The TQDateTimeEditBase class provides an abstraction for date and edit editors. +

Small abstract class that provides some functions that are common +for both TQDateEdit and TQTimeEdit. It is used internally by +TQDateTimeEditor. + + +


+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/qdeepcopy-h.html b/doc/html/qdeepcopy-h.html new file mode 100644 index 00000000..7a31b6b1 --- /dev/null +++ b/doc/html/qdeepcopy-h.html @@ -0,0 +1,125 @@ + + + + + +qdeepcopy.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdeepcopy.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdeepcopy.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQDeepCopy class
+**
+** Created : 20020613
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQDEEPCOPY_H
+#define TQDEEPCOPY_H
+
+#ifndef QT_H
+#  include "qglobal.h"
+#endif // QT_H
+
+template <class T>
+class TQDeepCopy
+{
+public:
+    inline TQDeepCopy()
+    {
+    }
+
+    inline TQDeepCopy( const T &t )
+	: deepcopy( t )
+    {
+	deepcopy.detach();
+    }
+
+    inline TQDeepCopy<T> &operator=( const T &t )
+    {
+	deepcopy = t;
+	deepcopy.detach();
+	return *this;
+    }
+
+    inline operator T ()
+    {
+	T tmp = deepcopy;
+	tmp.detach();
+	return tmp;
+    }
+
+private:
+    T deepcopy;
+};
+
+#endif // TQDEEPCOPY_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdeepcopy-members.html b/doc/html/qdeepcopy-members.html new file mode 100644 index 00000000..4b7db635 --- /dev/null +++ b/doc/html/qdeepcopy-members.html @@ -0,0 +1,49 @@ + + + + + +TQDeepCopy Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDeepCopy

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdeepcopy.html b/doc/html/qdeepcopy.html new file mode 100644 index 00000000..2d6a01c2 --- /dev/null +++ b/doc/html/qdeepcopy.html @@ -0,0 +1,168 @@ + + + + + +TQDeepCopy Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDeepCopy Class Reference

+ +

The TQDeepCopy class is a template class which ensures that +implicitly shared and explicitly shared classes reference unique +data. +More... +

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

+

#include <qdeepcopy.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQDeepCopy class is a template class which ensures that +implicitly shared and explicitly shared classes reference unique +data. +

+

+ +

Normally, shared copies reference the same data to optimize memory +use and for maximum speed. In the example below, s1, s2, s3, s4 and s5 share data. +

+    // all 5 strings share the same data
+    TQString s1 = "abcd";
+    TQString s2 = s1;
+    TQString s3 = s2;
+    TQString s4 = s3;
+    TQString s5 = s2;
+    
+ +

TQDeepCopy can be used several ways to ensure that an object +references unique, unshared data. In the example below, s1, s2 and s5 share data, while neither s3 nor s4 share data. +

+    // s1, s2 and s5 share the same data, neither s3 nor s4 are shared
+    TQString s1 = "abcd";
+    TQString s2 = s1;
+    TQDeepCopy<TQString> s3 = s2;  // s3 is a deep copy of s2
+    TQString s4 = s3;             // s4 is a deep copy of s3
+    TQString s5 = s2;
+    
+ +

In the example below, s1, s2 and s5 share data, and s3 +and s4 share data. +

+    // s1, s2 and s5 share the same data, s3 and s4 share the same data
+    TQString s1 = "abcd";
+    TQString s2 = s1;
+    TQString s3 = TQDeepCopy<TQString>( s2 );  // s3 is a deep copy of s2
+    TQString s4 = s3;                        // s4 is a shallow copy of s3
+    TQString s5 = s2;
+    
+ +

TQDeepCopy can also provide safety in multithreaded applications +that use shared classes. In the example below, the variable global_string is used safely since the data contained in global_string is always a deep copy. This ensures that all threads +get a unique copy of the data, and that any assignments to global_string will result in a deep copy. +

+    TQDeepCopy<TQString> global_string;  // global string data
+    TQMutex global_mutex;               // mutex to protext global_string
+
+    ...
+
+    void setGlobalString( const TQString &str )
+    {
+        global_mutex.lock();
+        global_string = str;           // global_string is a deep copy of str
+        global_mutex.unlock();
+    }
+
+    ...
+
+    void MyThread::run()
+    {
+        global_mutex.lock();
+        TQString str = global_string;          // str is a deep copy of global_string
+        global_mutex.unlock();
+
+        // process the string data
+        ...
+
+        // update global_string
+        setGlobalString( str );
+    }
+    
+ +

Warning: It is the application developer's responsibility to +protect the object shared across multiple threads. +

The examples above use TQString, which is an implicitly shared +class. The behavior of TQDeepCopy is the same when using explicitly +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. + +


Member Function Documentation

+

TQDeepCopy::TQDeepCopy () +

+ +

Constructs an empty instance of type T. + +

TQDeepCopy::TQDeepCopy ( const T & t ) +

+ +

Constructs a deep copy of t. + +

TQDeepCopy::operator T () +

+ +

Returns a deep copy of the encapsulated data. + +

TQDeepCopy<T> & TQDeepCopy::operator= ( const T & t ) +

+ +

Assigns a deep copy of t. + + +


+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/qdesktopwidget-h.html b/doc/html/qdesktopwidget-h.html new file mode 100644 index 00000000..a1ea27ef --- /dev/null +++ b/doc/html/qdesktopwidget-h.html @@ -0,0 +1,146 @@ + + + + + +qdesktopwidget.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdesktopwidget.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdesktopwidget.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQDesktopWidget class.
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQDESKTOPWIDGET_H
+#define TQDESKTOPWIDGET_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#endif // QT_H
+
+class TQApplication;
+class TQDesktopWidgetPrivate; /* Don't touch! */
+
+class Q_EXPORT TQDesktopWidget : public TQWidget
+{
+    Q_OBJECT
+public:
+    TQDesktopWidget();
+    ~TQDesktopWidget();
+
+    bool isVirtualDesktop() const;
+
+    int numScreens() const;
+    int primaryScreen() const;
+
+    int screenNumber( TQWidget *widget = 0 ) const; // ### 4.0: const TQWidget*
+    int screenNumber( const TQPoint & ) const;
+
+    TQWidget *screen( int screen = -1 );
+
+    const TQRect& screenGeometry( int screen = -1 ) const;
+    const TQRect& screenGeometry( TQWidget *widget ) const
+    { return screenGeometry( screenNumber( widget ) ); }
+    const TQRect& screenGeometry( const TQPoint &point ) const
+    { return screenGeometry( screenNumber( point ) ); }
+
+    const TQRect& availableGeometry( int screen = -1 ) const;
+    const TQRect& availableGeometry( TQWidget *widget ) const
+    { return availableGeometry( screenNumber( widget ) ); }
+    const TQRect& availableGeometry( const TQPoint &point ) const
+    { return availableGeometry( screenNumber( point ) ); }
+
+    void insertChild( TQObject * );
+
+signals:
+    void resized( int );
+    void workAreaResized( int );
+
+protected:
+    void resizeEvent( TQResizeEvent *e );
+
+private:
+    TQDesktopWidgetPrivate *d;
+
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQDesktopWidget( const TQDesktopWidget & );
+    TQDesktopWidget &operator=( const TQDesktopWidget & );
+#endif
+
+    friend class TQApplication;
+#ifdef Q_WS_QWS
+    friend class TQWSDisplay;
+#endif
+};
+
+#endif //TQDESKTOPWIDGET_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdesktopwidget-members.html b/doc/html/qdesktopwidget-members.html new file mode 100644 index 00000000..d2ad09b2 --- /dev/null +++ b/doc/html/qdesktopwidget-members.html @@ -0,0 +1,346 @@ + + + + + +TQDesktopWidget Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDesktopWidget

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdesktopwidget.html b/doc/html/qdesktopwidget.html new file mode 100644 index 00000000..34cfbaa8 --- /dev/null +++ b/doc/html/qdesktopwidget.html @@ -0,0 +1,202 @@ + + + + + +TQDesktopWidget Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDesktopWidget Class Reference

+ +

The TQDesktopWidget class provides access to screen information on multi-head systems. +More... +

#include <qdesktopwidget.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+ +

Signals

+ +

Detailed Description

+ + +The TQDesktopWidget class provides access to screen information on multi-head systems. +

+ +

Systems with more than one graphics card and monitor can manage the +physical screen space available either as multiple desktops, or as a +large virtual desktop, which usually has the size of the bounding +rectangle of all the screens (see isVirtualDesktop()). For an +application, one of the available screens is the primary screen, i.e. +the screen where the main widget resides (see primaryScreen()). All +windows opened in the context of the application must be +constrained to the boundaries of the primary screen; for example, +it would be inconvenient if a dialog box popped up on a different +screen, or split over two screens. +

The TQDesktopWidget provides information about the geometry of the +available screens with screenGeometry(). The number of screens +available is returned by numScreens(). The screen number that a +particular point or widget is located in is returned by +screenNumber(). +

Widgets provided by TQt use this class, for example, to place +tooltips, menus and dialog boxes according to the parent or +application widget. +

Applications can use this class to save window positions, or to place +child widgets on one screen. +

Managing Multiple Screens
+

In the illustration above, Application One's primary screen is +screen 0, and App Two's primary screen is screen 1. +

See also Advanced Widgets and Environment Classes. + +


Member Function Documentation

+

TQDesktopWidget::TQDesktopWidget () +

+Creates the desktop widget. +

If the system supports a virtual desktop, this widget will have +the size of the virtual desktop; otherwise this widget will have +the size of the primary screen. +

Instead of using TQDesktopWidget directly, use +TQApplication::desktop(). + +

TQDesktopWidget::~TQDesktopWidget () +

+Destroy the object and free allocated resources. + +

const TQRect & TQDesktopWidget::availableGeometry ( int screen = -1 ) const +

+Returns the available geometry of the screen with index screen. What +is available will be subrect of screenGeometry() based on what the +platform decides is available (for example excludes the Dock and Menubar +on Mac OS X, or the taskbar on Windows). +

See also screenNumber() and screenGeometry(). + +

const TQRect & TQDesktopWidget::availableGeometry ( TQWidget * widget ) const +

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

Returns the available geometry of the screen which contains widget. +

See also screenGeometry(). + +

const TQRect & TQDesktopWidget::availableGeometry ( const TQPoint & p ) const +

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

Returns the available geometry of the screen which contains p. +

See also screenGeometry(). + +

bool TQDesktopWidget::isVirtualDesktop () const +

+Returns TRUE if the system manages the available screens in a +virtual desktop; otherwise returns FALSE. +

For virtual desktops, screen() will always return the same widget. +The size of the virtual desktop is the size of this desktop +widget. + +

int TQDesktopWidget::numScreens () const +

+Returns the number of available screens. +

See also primaryScreen(). + +

int TQDesktopWidget::primaryScreen () const +

+Returns the index of the primary screen. +

See also numScreens(). + +

void TQDesktopWidget::resized ( int screen ) [signal] +

+This signal is emitted when the size of screen changes. + +

TQWidget * TQDesktopWidget::screen ( int screen = -1 ) +

+Returns a widget that represents the screen with index screen. +This widget can be used to draw directly on the desktop, using an +unclipped painter like this: +

+    TQPainter paint( TQApplication::desktop()->screen( 0 ), TRUE );
+    paint.draw...
+    ...
+    paint.end();
+    
+ +

If the system uses a virtual desktop, the returned widget will +have the geometry of the entire virtual desktop i.e. bounding +every screen. +

See also primaryScreen(), numScreens(), and isVirtualDesktop(). + +

const TQRect & TQDesktopWidget::screenGeometry ( int screen = -1 ) const +

+Returns the geometry of the screen with index screen. +

See also screenNumber(). + +

const TQRect & TQDesktopWidget::screenGeometry ( TQWidget * widget ) const +

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

Returns the geometry of the screen which contains widget. + +

const TQRect & TQDesktopWidget::screenGeometry ( const TQPoint & p ) const +

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

Returns the geometry of the screen which contains p. + +

int TQDesktopWidget::screenNumber ( TQWidget * widget = 0 ) const +

+Returns the index of the screen that contains the largest +part of widget, or -1 if the widget not on a screen. +

See also primaryScreen(). + +

int TQDesktopWidget::screenNumber ( const TQPoint & point ) const +

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

Returns the index of the screen that contains point, or -1 if +no screen contains the point. +

See also primaryScreen(). + + +


+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/qdesktopwidget.png b/doc/html/qdesktopwidget.png new file mode 100644 index 00000000..0729528d Binary files /dev/null and b/doc/html/qdesktopwidget.png differ diff --git a/doc/html/qdial-h.html b/doc/html/qdial-h.html new file mode 100644 index 00000000..14693fb1 --- /dev/null +++ b/doc/html/qdial-h.html @@ -0,0 +1,198 @@ + + + + + +qdial.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdial.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdial.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of the dial widget
+**
+** Created : 990104
+**
+** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQDIAL_H
+#define TQDIAL_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qrangecontrol.h"
+#endif // QT_H
+
+#ifndef QT_NO_DIAL
+
+class TQDialPrivate;
+
+class Q_EXPORT TQDial: public TQWidget, public TQRangeControl
+{
+    Q_OBJECT
+    Q_PROPERTY( bool tracking READ tracking WRITE setTracking )
+    Q_PROPERTY( bool wrapping READ wrapping WRITE setWrapping )
+    Q_PROPERTY( int notchSize READ notchSize )
+    Q_PROPERTY( double notchTarget READ notchTarget WRITE setNotchTarget )
+    Q_PROPERTY( bool notchesVisible READ notchesVisible WRITE setNotchesVisible )
+    Q_PROPERTY( int minValue READ minValue WRITE setMinValue )
+    Q_PROPERTY( int maxValue READ maxValue WRITE setMaxValue )
+    Q_PROPERTY( int lineStep READ lineStep WRITE setLineStep )
+    Q_PROPERTY( int pageStep READ pageStep WRITE setPageStep )
+    Q_PROPERTY( int value READ value WRITE setValue )
+	
+public:
+    TQDial( TQWidget* parent=0, const char* name=0, WFlags f = 0 );
+    TQDial( int minValue, int maxValue, int pageStep, int value,
+	   TQWidget* parent=0, const char* name=0 );
+    ~TQDial();
+
+    bool tracking() const;
+
+    bool wrapping() const;
+
+    int notchSize() const;
+
+    virtual void setNotchTarget( double );
+    double notchTarget() const;
+
+    bool notchesVisible() const;
+
+    TQSize sizeHint() const;
+    TQSize minimumSizeHint() const;
+
+    int	 minValue() const;
+    int	 maxValue() const;
+    void setMinValue( int );
+    void setMaxValue( int );
+    int	 lineStep() const;
+    int	 pageStep() const;
+    void setLineStep( int );
+    void setPageStep( int );
+    int  value() const;
+
+public slots:
+    virtual void setValue( int );
+    void addLine();
+    void subtractLine();
+    void addPage();
+    void subtractPage();
+    virtual void setNotchesVisible( bool b );
+    virtual void setWrapping( bool on );
+    virtual void setTracking( bool enable );
+
+signals:
+    void valueChanged( int value );
+    void dialPressed();
+    void dialMoved( int value );
+    void dialReleased();
+
+protected:
+    void resizeEvent( TQResizeEvent * );
+    void paintEvent( TQPaintEvent * );
+
+    void keyPressEvent( TQKeyEvent * );
+    void mousePressEvent( TQMouseEvent * );
+    void mouseReleaseEvent( TQMouseEvent * );
+    void mouseMoveEvent( TQMouseEvent * );
+#ifndef QT_NO_WHEELEVENT
+    void wheelEvent( TQWheelEvent * );
+#endif
+    void focusInEvent( TQFocusEvent * );
+    void focusOutEvent( TQFocusEvent * );
+
+    void valueChange();
+    void rangeChange();
+
+    virtual void repaintScreen( const TQRect *cr = 0 );
+
+private:
+    TQDialPrivate * d;
+
+    int valueFromPoint( const TQPoint & ) const;
+    double angle( const TQPoint &, const TQPoint & ) const;
+    TQPointArray calcArrow( double &a ) const;
+    TQRect calcDial() const;
+    int calcBigLineSize() const;
+    void calcLines();
+
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQDial( const TQDial & );
+    TQDial &operator=( const TQDial & );
+#endif
+
+};
+
+#endif  // QT_NO_DIAL
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdial-m.png b/doc/html/qdial-m.png new file mode 100644 index 00000000..37d90afe Binary files /dev/null and b/doc/html/qdial-m.png differ diff --git a/doc/html/qdial-members.html b/doc/html/qdial-members.html new file mode 100644 index 00000000..41d3268d --- /dev/null +++ b/doc/html/qdial-members.html @@ -0,0 +1,376 @@ + + + + + +TQDial Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDial

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdial-w.png b/doc/html/qdial-w.png new file mode 100644 index 00000000..83a1cbe4 Binary files /dev/null and b/doc/html/qdial-w.png differ diff --git a/doc/html/qdial.html b/doc/html/qdial.html new file mode 100644 index 00000000..3f31d683 --- /dev/null +++ b/doc/html/qdial.html @@ -0,0 +1,352 @@ + + + + + +TQDial Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDial Class Reference

+ +

The TQDial class provides a rounded range control (like a speedometer or potentiometer). +More... +

#include <qdial.h> +

Inherits TQWidget and TQRangeControl. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • int lineStep - the current line step
  • +
  • int maxValue - the current maximum value
  • +
  • int minValue - the current minimum value
  • +
  • int notchSize - the current notch size  (read only)
  • +
  • double notchTarget - the target number of pixels between notches
  • +
  • bool notchesVisible - whether the notches are shown
  • +
  • int pageStep - the current page step
  • +
  • bool tracking - whether tracking is enabled
  • +
  • int value - the current dial value
  • +
  • bool wrapping - whether wrapping is enabled
  • +
+

Protected Members

+ +

Detailed Description

+ + +

The TQDial class provides a rounded range control (like a speedometer or potentiometer). +

+ +

TQDial is used when the user needs to control a value within a +program-definable range, and the range either wraps around +(typically, 0..359 degrees) or the dialog layout needs a square +widget. +

Both API- and UI-wise, the dial is very similar to a slider. Indeed, when wrapping() is FALSE (the default) +there is no real difference between a slider and a dial. They +have the same signals, slots and member functions, all of which do +the same things. Which one you use depends only on your taste +and on the application. +

The dial initially emits valueChanged() signals continuously while +the slider is being moved; you can make it emit the signal less +often by calling setTracking(FALSE). dialMoved() is emitted +continuously even when tracking() is FALSE. +

The slider also emits dialPressed() and dialReleased() signals +when the mouse button is pressed and released. But note that the +dial's value can change without these signals being emitted; the +keyboard and wheel can be used to change the value. +

Unlike the slider, TQDial attempts to draw a "nice" number of +notches rather than one per lineStep(). If possible, the number +of notches drawn is one per lineStep(), but if there aren't enough +pixels to draw every one, TQDial will draw every second, third +etc., notch. notchSize() returns the number of units per notch, +hopefully a multiple of lineStep(); setNotchTarget() sets the +target distance between neighbouring notches in pixels. The +default is 3.75 pixels. +

Like the slider, the dial makes the TQRangeControl functions +setValue(), addLine(), subtractLine(), addPage() and +subtractPage() available as slots. +

The dial's keyboard interface is fairly simple: The left/up and +right/down arrow keys move by lineStep(), page up and page down by +pageStep() and Home and End to minValue() and maxValue(). +

+

See also TQScrollBar, TQSpinBox, GUI Design Handbook: Slider, and Basic Widgets. + +


Member Function Documentation

+

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

+Constructs a dial called name with parent parent. f is +propagated to the TQWidget constructor. It has the default range of +a TQRangeControl. + +

TQDial::TQDial ( int minValue, int maxValue, int pageStep, int value, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a dial called name with parent parent. The dial's +value can never be smaller than minValue or greater than maxValue. Its page step size is pageStep, and its initial value +is value. +

value is forced to be within the legal range. + +

TQDial::~TQDial () +

+Destroys the dial. + +

void TQDial::addLine () [slot] +

+Increments the dial's value() by one lineStep(). + +

void TQDial::addPage () [slot] +

+Increments the dial's value() by one pageStep() of steps. + +

void TQDial::dialMoved ( int value ) [signal] +

+ +

This signal is emitted whenever the dial value changes. The +frequency of this signal is not influenced by setTracking(). +

See also valueChanged(). + +

void TQDial::dialPressed () [signal] +

+ +

This signal is emitted when the user begins mouse interaction with +the dial. +

See also dialReleased(). + +

void TQDial::dialReleased () [signal] +

+ +

This signal is emitted when the user ends mouse interaction with +the dial. +

See also dialPressed(). + +

int TQDial::lineStep () const +

Returns the current line step. +See the "lineStep" property for details. +

int TQDial::maxValue () const +

Returns the current maximum value. +See the "maxValue" property for details. +

int TQDial::minValue () const +

Returns the current minimum value. +See the "minValue" property for details. +

int TQDial::notchSize () const +

Returns the current notch size. +See the "notchSize" property for details. +

double TQDial::notchTarget () const +

Returns the target number of pixels between notches. +See the "notchTarget" property for details. +

bool TQDial::notchesVisible () const +

Returns TRUE if the notches are shown; otherwise returns FALSE. +See the "notchesVisible" property for details. +

int TQDial::pageStep () const +

Returns the current page step. +See the "pageStep" property for details. +

void TQDial::rangeChange () [virtual protected] +

+Reimplemented to ensure tick-marks are consistent with the new range. + +

Reimplemented from TQRangeControl. +

void TQDial::repaintScreen ( const TQRect * cr = 0 ) [virtual protected] +

+Paints the dial using clip region cr. + +

void TQDial::setLineStep ( int ) +

Sets the current line step. +See the "lineStep" property for details. +

void TQDial::setMaxValue ( int ) +

Sets the current maximum value. +See the "maxValue" property for details. +

void TQDial::setMinValue ( int ) +

Sets the current minimum value. +See the "minValue" property for details. +

void TQDial::setNotchTarget ( double ) [virtual] +

Sets the target number of pixels between notches. +See the "notchTarget" property for details. +

void TQDial::setNotchesVisible ( bool b ) [virtual slot] +

Sets whether the notches are shown to b. +See the "notchesVisible" property for details. +

void TQDial::setPageStep ( int ) +

Sets the current page step. +See the "pageStep" property for details. +

void TQDial::setTracking ( bool enable ) [virtual slot] +

Sets whether tracking is enabled to enable. +See the "tracking" property for details. +

void TQDial::setValue ( int ) [virtual slot] +

Sets the current dial value. +See the "value" property for details. +

void TQDial::setWrapping ( bool on ) [virtual slot] +

Sets whether wrapping is enabled to on. +See the "wrapping" property for details. +

void TQDial::subtractLine () [slot] +

+Decrements the dial's value() by one lineStep(). + +

void TQDial::subtractPage () [slot] +

+Decrements the dial's value() by one pageStep() of steps. + +

bool TQDial::tracking () const +

Returns TRUE if tracking is enabled; otherwise returns FALSE. +See the "tracking" property for details. +

int TQDial::value () const +

Returns the current dial value. +See the "value" property for details. +

void TQDial::valueChange () [virtual protected] +

+Reimplemented to ensure the display is correct and to emit the +valueChanged(int) signal when appropriate. + +

Reimplemented from TQRangeControl. +

void TQDial::valueChanged ( int value ) [signal] +

+ +

This signal is emitted whenever the dial's value changes. The +frequency of this signal is influenced by setTracking(). + +

bool TQDial::wrapping () const +

Returns TRUE if wrapping is enabled; otherwise returns FALSE. +See the "wrapping" property for details. +


Property Documentation

+

int lineStep

+

This property holds the current line step. +

setLineStep() calls the virtual stepChange() function if the new +line step is different from the previous setting. +

See also TQRangeControl::setSteps(), pageStep, and setRange(). + +

Set this property's value with setLineStep() and get this property's value with lineStep(). +

int maxValue

+

This property holds the current maximum value. +

When setting this property, the TQDial::minValue is adjusted if +necessary to ensure that the range remains valid. +

See also setRange(). + +

Set this property's value with setMaxValue() and get this property's value with maxValue(). +

int minValue

+

This property holds the current minimum value. +

When setting this property, the TQDial::maxValue is adjusted if +necessary to ensure that the range remains valid. +

See also setRange(). + +

Set this property's value with setMinValue() and get this property's value with minValue(). +

int notchSize

+

This property holds the current notch size. +

The notch size is in range control units, not pixels, and if +possible it is a multiple of lineStep() that results in an +on-screen notch size near notchTarget(). +

See also notchTarget and lineStep. + +

Get this property's value with notchSize(). +

double notchTarget

+

This property holds the target number of pixels between notches. +

The notch target is the number of pixels TQDial attempts to put +between each notch. +

The actual size may differ from the target size. + +

Set this property's value with setNotchTarget() and get this property's value with notchTarget(). +

bool notchesVisible

+

This property holds whether the notches are shown. +

If TRUE, the notches are shown. If FALSE (the default) notches are +not shown. + +

Set this property's value with setNotchesVisible() and get this property's value with notchesVisible(). +

int pageStep

+

This property holds the current page step. +

setPageStep() calls the virtual stepChange() function if the new +page step is different from the previous setting. +

See also stepChange(). + +

Set this property's value with setPageStep() and get this property's value with pageStep(). +

bool tracking

+

This property holds whether tracking is enabled. +

If TRUE (the default), tracking is enabled. This means that the +arrow can be moved using the mouse; otherwise the arrow cannot be +moved with the mouse. + +

Set this property's value with setTracking() and get this property's value with tracking(). +

int value

+

This property holds the current dial value. +

This is guaranteed to be within the range +TQDial::minValue..TQDial::maxValue. +

See also minValue and maxValue. + +

Set this property's value with setValue() and get this property's value with value(). +

bool wrapping

+

This property holds whether wrapping is enabled. +

If TRUE, wrapping is enabled. This means that the arrow can be +turned around 360°. Otherwise there is some space at the bottom of +the dial which is skipped by the arrow. +

This property's default is FALSE. + +

Set this property's value with setWrapping() and get this property's value with wrapping(). + +


+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/qdialog-h.html b/doc/html/qdialog-h.html new file mode 100644 index 00000000..1c4925d4 --- /dev/null +++ b/doc/html/qdialog-h.html @@ -0,0 +1,186 @@ + + + + + +qdialog.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdialog.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdialog.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQDialog class
+**
+** Created : 950502
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the dialogs 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 retquirements 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 TQDIALOG_H
+#define TQDIALOG_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#endif // QT_H
+#ifndef QT_NO_DIALOG
+#if 0
+Q_OBJECT
+#endif
+
+class TQPushButton;
+class TQDialogPrivate;
+
+class Q_EXPORT TQDialog : public TQWidget
+{
+friend class TQPushButton;
+    Q_OBJECT
+    Q_PROPERTY( bool sizeGripEnabled READ isSizeGripEnabled WRITE setSizeGripEnabled )
+    Q_PROPERTY( bool modal READ isModal WRITE setModal )
+
+public:
+    Q_EXPLICIT TQDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+	     WFlags f=0 );
+    ~TQDialog();
+
+    enum DialogCode { Rejected, Accepted };
+
+    int		result() const { return rescode; }
+
+    void	show();
+    void	hide();
+    void	move( int x, int y );
+    void	move( const TQPoint &p );
+    void	resize( int w, int h );
+    void	resize( const TQSize & );
+    void	setGeometry( int x, int y, int w, int h );
+    void	setGeometry( const TQRect & );
+
+    void	setOrientation( Orientation orientation );
+    Orientation	orientation() const;
+
+    void	setExtension( TQWidget* extension );
+    TQWidget*	extension() const;
+
+    TQSize	sizeHint() const;
+    TQSize	minimumSizeHint() const;
+
+    void setSizeGripEnabled( bool );
+    bool isSizeGripEnabled() const;
+
+    void setModal( bool modal );
+    bool isModal() const;
+#ifdef Q_OS_TEMP
+    bool	event( TQEvent * );
+#endif
+
+public slots:
+    int exec();
+
+protected slots:
+    virtual void done( int );
+    virtual void accept();
+    virtual void reject();
+
+    void	showExtension( bool );
+
+protected:
+    void	setResult( int r )	{ rescode = r; }
+    void	keyPressEvent( TQKeyEvent * );
+    void	closeEvent( TQCloseEvent * );
+    void	resizeEvent( TQResizeEvent * );
+    void	contextMenuEvent( TQContextMenuEvent * );
+    bool	eventFilter( TQObject *, TQEvent * );
+    void	adjustPosition( TQWidget*);
+
+private:
+    void	setDefault( TQPushButton * );
+    void	setMainDefault( TQPushButton * );
+    void	hideDefault();
+#ifdef Q_OS_TEMP
+    void	hideSpecial();
+#endif
+
+    int		rescode;
+    uint	did_move   : 1;
+    uint	has_relpos : 1;
+    uint	did_resize : 1;
+    uint	in_loop: 1;
+    void adjustPositionInternal( TQWidget*, bool useRelPos = FALSE );
+    TQDialogPrivate* d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQDialog( const TQDialog & );
+    TQDialog &operator=( const TQDialog & );
+#endif
+};
+
+#endif // QT_NO_DIALOG
+#endif // TQDIALOG_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdialog-members.html b/doc/html/qdialog-members.html new file mode 100644 index 00000000..cf333cec --- /dev/null +++ b/doc/html/qdialog-members.html @@ -0,0 +1,352 @@ + + + + + +TQDialog Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDialog

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdialog.html b/doc/html/qdialog.html new file mode 100644 index 00000000..c23d826e --- /dev/null +++ b/doc/html/qdialog.html @@ -0,0 +1,355 @@ + + + + + +TQDialog Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDialog Class Reference

+ +

The TQDialog class is the base class of dialog windows. +More... +

#include <qdialog.h> +

Inherits TQWidget. +

Inherited by TQColorDialog, TQErrorMessage, TQFileDialog, TQFontDialog, TQInputDialog, TQMessageBox, TQMotifDialog, TQProgressDialog, TQTabDialog, and TQWizard. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Properties

+
    +
  • bool modal - whether show() should pop up the dialog as modal or modeless
  • +
  • bool sizeGripEnabled - whether the size grip is enabled
  • +
+

Protected Members

+ +

Protected Slots

+ +

Detailed Description

+ + +The TQDialog class is the base class of dialog windows. +

+ + +

A dialog window is a top-level window mostly used for short-term +tasks and brief communications with the user. TQDialogs may be +modal or modeless. TQDialogs support extensibility and can provide a return + value. They can have default + buttons. TQDialogs can also have a TQSizeGrip in their +lower-right corner, using setSizeGripEnabled(). +

Note that TQDialog uses the parent widget slightly differently from +other classes in TQt. A dialog is always a top-level widget, but if +it has a parent, its default location is centered on top of the +parent's top-level widget (if it is not top-level itself). It will +also share the parent's taskbar entry. +

+

Modal Dialogs +

+

A modal dialog is a dialog that blocks input to other +visible windows in the same application. Users must finish +interacting with the dialog and close it before they can access +any other window in the application. Dialogs that are used to +request a file name from the user or that are used to set +application preferences are usually modal. +

The most common way to display a modal dialog is to call its +exec() function. When the user closes the dialog, exec() will +provide a useful return value. Typically we +connect a default button, e.g. "OK", to the accept() slot and a +"Cancel" button to the reject() slot, to get the dialog to close +and return the appropriate value. Alternatively you can connect to +the done() slot, passing it Accepted or Rejected. +

An alternative is to call setModal(TRUE), then show(). Unlike +exec(), show() returns control to the caller immediately. Calling +setModal(TRUE) is especially useful for progress dialogs, where +the user must have the ability to interact with the dialog, e.g. +to cancel a long running operation. If you use show() and +setModal(TRUE) together you must call +TQApplication::processEvents() periodically during processing to +enable the user to interact with the dialog. (See TQProgressDialog.) +

+

Modeless Dialogs +

+

A modeless dialog is a dialog that operates +independently of other windows in the same application. Find and +replace dialogs in word-processors are often modeless to allow the +user to interact with both the application's main window and with +the dialog. +

Modeless dialogs are displayed using show(), which returns control +to the caller immediately. +

+

Default button +

+

A dialog's default button is the button that's pressed when the +user presses Enter (Return). This button is used to signify that +the user accepts the dialog's settings and wants to close the +dialog. Use TQPushButton::setDefault(), TQPushButton::isDefault() +and TQPushButton::autoDefault() to set and control the dialog's +default button. +

+

Escape Key +

+

If the user presses the Esc key in a dialog, TQDialog::reject() +will be called. This will cause the window to close: the closeEvent cannot be ignored. +

+

Extensibility +

+

Extensibility is the ability to show the dialog in two ways: a +partial dialog that shows the most commonly used options, and a +full dialog that shows all the options. Typically an extensible +dialog will initially appear as a partial dialog, but with a +"More" toggle button. If the user presses the "More" button down, +the full dialog will appear. The extension widget will be resized +to its sizeHint(). If orientation is Horizontal the extension +widget's height() will be expanded to the height() of the dialog. +If the orientation is Vertical the extension widget's width() +will be expanded to the width() of the dialog. Extensibility is +controlled with setExtension(), setOrientation() and +showExtension(). +

+

Return value (modal dialogs) +

+

Modal dialogs are often used in situations where a return value is +retquired, e.g. to indicate whether the user pressed "OK" or +"Cancel". A dialog can be closed by calling the accept() or the +reject() slots, and exec() will return Accepted or Rejected +as appropriate. The exec() call returns the result of the dialog. +The result is also available from result() if the dialog has not +been destroyed. If the WDestructiveClose flag is set, the +dialog is deleted after exec() returns. +

+

Examples +

+

A modal dialog. +

+ +

        TQFileDialog *dlg = new TQFileDialog( workingDirectory,
+                TQString::null, 0, 0, TRUE );
+        dlg->setCaption( TQFileDialog::tr( "Open" ) );
+        dlg->setMode( TQFileDialog::ExistingFile );
+        TQString result;
+        if ( dlg->exec() == TQDialog::Accepted ) {
+            result = dlg->selectedFile();
+            workingDirectory = dlg->url();
+        }
+        delete dlg;
+        return result;
+
+

A modeless dialog. After the show() call, control returns to the main +event loop. + + +

    int main( int argc, char **argv )
+    {
+        TQApplication a( argc, argv );
+
        int scale = 10;
+
        LifeDialog *life = new LifeDialog( scale );
+        a.setMainWidget( life );
+        life->setCaption("TQt Example - Life");
+        life->show();
+
        return a.exec();
+    }
+
+

See also TQTabDialog, TQWidget, TQProgressDialog, GUI Design Handbook: Dialogs, Standard, Abstract Widget Classes, and Dialog Classes. + +


Member Type Documentation

+

TQDialog::DialogCode

+

The value returned by a modal dialog. +

    +
  • TQDialog::Accepted +
  • TQDialog::Rejected +

+


Member Function Documentation

+

explicit TQDialog::TQDialog ( TQWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 ) +

+Constructs a dialog called name, with parent parent. +

A dialog is always a top-level widget, but if it has a parent, its +default location is centered on top of the parent. It will also +share the parent's taskbar entry. +

The widget flags f are passed on to the TQWidget constructor. +If, for example, you don't want a What's This button in the titlebar +of the dialog, pass WStyle_Customize | WStyle_NormalBorder | +WStyle_Title | WStyle_SysMenu in f. +

Warning: In TQt 3.2, the modal flag is obsolete. There is now a +setModal() function that can be used for obtaining a modal behavior +when calling show(). This is rarely needed, because modal dialogs +are usually invoked using exec(), which ignores the modal flag. +

See also TQWidget::setWFlags() and TQt::WidgetFlags. + +

TQDialog::~TQDialog () +

+Destroys the TQDialog, deleting all its children. + +

void TQDialog::accept () [virtual protected slot] +

+Hides the modal dialog and sets the result code to Accepted. +

See also reject() and done(). + +

Examples: chart/setdataform.cpp and distributor/distributor.ui.h. +

void TQDialog::done ( int r ) [virtual protected slot] +

Closes the dialog and sets its result code to r. If this dialog +is shown with exec(), done() causes the local event loop to finish, +and exec() to return r. +

As with TQWidget::close(), done() deletes the dialog if the WDestructiveClose flag is set. If the dialog is the application's +main widget, the application terminates. If the dialog is the +last window closed, the TQApplication::lastWindowClosed() signal is +emitted. +

See also accept(), reject(), TQApplication::mainWidget(), and TQApplication::tquit(). + +

int TQDialog::exec () [slot] +

+Shows the dialog as a modal dialog, +blocking until the user closes it. The function returns a DialogCode result. +

Users cannot interact with any other window in the same +application until they close the dialog. +

See also show() and result(). + +

Examples: chart/chartform.cpp, dialog/mainwindow.cpp, i18n/main.cpp, network/ftpclient/ftpmainwindow.ui.h, network/networkprotocol/view.cpp, qdir/qdir.cpp, and wizard/main.cpp. +

TQWidget * TQDialog::extension () const +

+Returns the dialog's extension or 0 if no extension has been +defined. +

See also setExtension(). + +

bool TQDialog::isModal () const +

Returns TRUE if show() should pop up the dialog as modal or modeless; otherwise returns FALSE. +See the "modal" property for details. +

bool TQDialog::isSizeGripEnabled () const +

Returns TRUE if the size grip is enabled; otherwise returns FALSE. +See the "sizeGripEnabled" property for details. +

Orientation TQDialog::orientation () const +

+Returns the dialog's extension orientation. +

See also setOrientation(). + +

void TQDialog::reject () [virtual protected slot] +

+Hides the modal dialog and sets the result code to Rejected. +

See also accept() and done(). + +

int TQDialog::result () const +

+ +

Returns the modal dialog's result code, Accepted or Rejected. +

Do not call this function if the dialog was constructed with the WDestructiveClose flag. + +

void TQDialog::setExtension ( TQWidget * extension ) +

+Sets the widget, extension, to be the dialog's extension, +deleting any previous extension. The dialog takes ownership of the +extension. Note that if 0 is passed any existing extension will be +deleted. +

This function must only be called while the dialog is hidden. +

See also showExtension(), setOrientation(), and extension(). + +

void TQDialog::setModal ( bool modal ) +

Sets whether show() should pop up the dialog as modal or modeless to modal. +See the "modal" property for details. +

void TQDialog::setOrientation ( Orientation orientation ) +

+If orientation is Horizontal, the extension will be displayed +to the right of the dialog's main area. If orientation is Vertical, the extension will be displayed below the dialog's main +area. +

See also orientation() and setExtension(). + +

void TQDialog::setResult ( int i ) [protected] +

+ +

Sets the modal dialog's result code to i. + +

void TQDialog::setSizeGripEnabled ( bool ) +

Sets whether the size grip is enabled. +See the "sizeGripEnabled" property for details. +

void TQDialog::show () [virtual] +

+Shows the dialog as a modeless dialog. +Control returns immediately to the calling code. +

The dialog will be modal or modeless according to the value +of the modal property. +

See also exec() and modal. + +

Examples: movies/main.cpp, regexptester/main.cpp, showimg/showimg.cpp, and sql/overview/form1/main.cpp. +

Reimplemented from TQWidget. +

void TQDialog::showExtension ( bool showIt ) [protected slot] +

+If showIt is TRUE, the dialog's extension is shown; otherwise the +extension is hidden. +

This slot is usually connected to the TQButton::toggled() signal +of a TQPushButton. +

A dialog with a visible extension is not resizeable. +

See also show(), setExtension(), and setOrientation(). + +


Property Documentation

+

bool modal

This property holds whether show() should pop up the dialog as modal or modeless. +

By default, this property is false and show() pops up the dialog as +modeless. +

exec() ignores the value of this property and always pops up the +dialog as modal. +

See also show() and exec(). + +

Set this property's value with setModal() and get this property's value with isModal(). +

bool sizeGripEnabled

+

This property holds whether the size grip is enabled. +

A TQSizeGrip is placed in the bottom right corner of the dialog when this +property is enabled. By default, the size grip is disabled. + +

Set this property's value with setSizeGripEnabled() and get this property's value with isSizeGripEnabled(). + +


+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/qdict-h.html b/doc/html/qdict-h.html new file mode 100644 index 00000000..3975ed2f --- /dev/null +++ b/doc/html/qdict-h.html @@ -0,0 +1,168 @@ + + + + + +qdict.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdict.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdict.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQDict template class
+**
+** Created : 920821
+**
+** 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 retquirements 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 TQDICT_H
+#define TQDICT_H
+
+#ifndef QT_H
+#include "qgdict.h"
+#endif // QT_H
+
+template<class type>
+class TQDict
+#ifdef Q_QDOC
+	: public TQPtrCollection
+#else
+	: public TQGDict
+#endif
+{
+public:
+    TQDict( int size = 17, bool caseSensitive = TRUE )
+	: TQGDict( size, StringKey, caseSensitive, FALSE ) { }
+    TQDict( const TQDict<type> &d ) : TQGDict( d ) { }
+    ~TQDict()				{ clear(); }
+    TQDict<type> &operator=(const TQDict<type> &d)
+			{ return (TQDict<type>&)TQGDict::operator=(d); }
+    uint  count()   const		{ return TQGDict::count(); }
+    uint  size()    const		{ return TQGDict::size(); }
+    bool  isEmpty() const		{ return TQGDict::count() == 0; }
+
+    void  insert( const TQString &k, const type *d )
+					{ TQGDict::look_string(k,(Item)d,1); }
+    void  replace( const TQString &k, const type *d )
+					{ TQGDict::look_string(k,(Item)d,2); }
+    bool  remove( const TQString &k )	{ return TQGDict::remove_string(k); }
+    type *take( const TQString &k )	{ return (type *)TQGDict::take_string(k); }
+    type *find( const TQString &k ) const
+		{ return (type *)((TQGDict*)this)->TQGDict::look_string(k,0,0); }
+    type *operator[]( const TQString &k ) const
+		{ return (type *)((TQGDict*)this)->TQGDict::look_string(k,0,0); }
+
+    void  clear()			{ TQGDict::clear(); }
+    void  resize( uint n )		{ TQGDict::resize(n); }
+    void  statistics() const		{ TQGDict::statistics(); }
+
+#ifdef Q_QDOC
+protected:
+    virtual TQDataStream& read( TQDataStream &, TQPtrCollection::Item & );
+    virtual TQDataStream& write( TQDataStream &, TQPtrCollection::Item ) const;
+#endif
+
+private:
+	void  deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void TQDict<void>::deleteItem( Item )
+{
+}
+#endif
+
+template<class type> inline void TQDict<type>::deleteItem( TQPtrCollection::Item d )
+{
+    if ( del_item ) delete (type *)d;
+}
+
+template<class type>
+class TQDictIterator : public TQGDictIterator
+{
+public:
+    TQDictIterator(const TQDict<type> &d) : TQGDictIterator((TQGDict &)d) { }
+    ~TQDictIterator()	      {}
+    uint  count()   const     { return dict->count(); }
+    bool  isEmpty() const     { return dict->count() == 0; }
+    type *toFirst()	      { return (type *)TQGDictIterator::toFirst(); }
+    operator type *() const   { return (type *)TQGDictIterator::get(); }
+    type *operator*()         { return (type *)TQGDictIterator::get(); }
+    type   *current() const   { return (type *)TQGDictIterator::get(); }
+    TQString currentKey() const{ return TQGDictIterator::getKeyString(); }
+    type *operator()()	      { return (type *)TQGDictIterator::operator()(); }
+    type *operator++()	      { return (type *)TQGDictIterator::operator++(); }
+    type *operator+=(uint j)  { return (type *)TQGDictIterator::operator+=(j); }
+};
+
+#define Q_DEFINED_QDICT
+#include "qwinexport.h"
+#endif // TQDICT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdict-members.html b/doc/html/qdict-members.html new file mode 100644 index 00000000..77b7547d --- /dev/null +++ b/doc/html/qdict-members.html @@ -0,0 +1,67 @@ + + + + + +TQDict Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDict

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdict.html b/doc/html/qdict.html new file mode 100644 index 00000000..b19e28cb --- /dev/null +++ b/doc/html/qdict.html @@ -0,0 +1,399 @@ + + + + + +TQDict Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDict Class Reference

+ +

The TQDict class is a template class that provides a +dictionary based on TQString keys. +More... +

#include <qdict.h> +

Inherits TQPtrCollection. +

List of all member functions. +

Public Members

+
    +
  • TQDict ( int size = 17, bool caseSensitive = TRUE )
  • +
  • TQDict ( const TQDict<type> & dict )
  • +
  • ~TQDict ()
  • +
  • TQDict<type> & operator= ( const TQDict<type> & dict )
  • +
  • virtual uint count () const
  • +
  • uint size () const
  • +
  • bool isEmpty () const
  • +
  • void insert ( const TQString & key, const type * item )
  • +
  • void replace ( const TQString & key, const type * item )
  • +
  • bool remove ( const TQString & key )
  • +
  • type * take ( const TQString & key )
  • +
  • type * find ( const TQString & key ) const
  • +
  • type * operator[] ( const TQString & key ) const
  • +
  • virtual void clear ()
  • +
  • void resize ( uint newsize )
  • +
  • void statistics () const
  • +
+

Important Inherited Members

+ +

Protected Members

+
    +
  • virtual TQDataStream & read ( TQDataStream & s, TQPtrCollection::Item & item )
  • +
  • virtual TQDataStream & write ( TQDataStream & s, TQPtrCollection::Item ) const
  • +
+

Detailed Description

+ + +The TQDict class is a template class that provides a +dictionary based on TQString keys. +

+ + +

+

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 *). +

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. +

If you want to use non-Unicode, plain 8-bit char* keys, use the +TQAsciiDict template. A TQDict has the same performance as a +TQAsciiDict. If you want to have a dictionary that maps TQStrings to +TQStrings use TQMap. +

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(). +

Items are inserted with insert(); 0 pointers cannot be inserted. +Items are removed with remove(). All the items in a dictionary can +be removed with clear(). The number of items in the dictionary is +returned by count(). If the dictionary contains no items isEmpty() +returns TRUE. You can change an item's value with replace(). Items +are looked up with operator[](), or with find() which return a +pointer to the value or 0 if the given key does not exist. You can +take an item out of the dictionary with take(). +

Calling setAutoDelete(TRUE) for a dictionary tells it to delete +items that are removed. The default behaviour is not to delete +items when they are removed. +

When an item is inserted, the key is converted (hashed) to an +integer index into an internal hash array. This makes lookup very +fast. +

Items with equal keys are allowed. When inserting two items with +the same key, only the last inserted item will be accessible (last +in, first out) until it is removed. +

The TQDictIterator class can traverse the dictionary, but only in +an arbitrary order. Multiple iterators may independently traverse +the same dictionary. +

When inserting an item into a dictionary, only the pointer is +copied, not the item itself, i.e. a shallow copy is made. It is +possible to make the dictionary copy all of the item's data (a +deep copy) when an item is inserted. insert() calls the virtual +function TQPtrCollection::newItem() for the item to be inserted. +Inherit a dictionary and reimplement newItem() if you want deep +copies. +

When removing a dictionary item, the virtual function +TQPtrCollection::deleteItem() is called. TQDict's default +implementation is to delete the item if auto-deletion is enabled. +

Example #1: +

+    TQDict<TQLineEdit> fields; // TQString keys, TQLineEdit* values
+    fields.insert( "forename", new TQLineEdit( this ) );
+    fields.insert( "surname", new TQLineEdit( this ) );
+
+    fields["forename"]->setText( "Homer" );
+    fields["surname"]->setText( "Simpson" );
+
+    TQDictIterator<TQLineEdit> it( fields ); // See TQDictIterator
+    for( ; it.current(); ++it )
+        cout << it.currentKey() << ": " << it.current()->text() << endl;
+    cout << endl;
+
+    if ( fields["forename"] && fields["surname"] )
+        cout << fields["forename"]->text() << " " 
+            << fields["surname"]->text() << endl;  // Prints "Homer Simpson"
+
+    fields.remove( "forename" ); // Does not delete the line edit
+    if ( ! fields["forename"] )
+        cout << "forename is not in the dictionary" << endl;
+    
+ +In this example we use a dictionary to keep track of the line +edits we're using. We insert each line edit into the dictionary +with a unique name and then access the line edits via the +dictionary. +

Example #2: +

+    TQStringList styleList = TQStyleFactory::styles();
+    styleList.sort();
+    TQDict<int> letterDict( 17, FALSE );
+    for ( TQStringList::Iterator it = styleList.begin(); it != styleList.end(); ++it ) {
+        TQString styleName = *it;
+        TQString styleAccel = styleName;
+        if ( letterDict[styleAccel.left(1)] ) {
+            for ( uint i = 0; i < styleAccel.length(); i++ ) {
+                if ( ! letterDict[styleAccel.mid( i, 1 )] ) {
+                    styleAccel = styleAccel.insert( i, '&' );
+                    letterDict.insert(styleAccel.mid( i, 1 ), (const int *)1);
+                    break;
+                }
+            }
+        } else {
+            styleAccel = "&" + styleAccel;
+            letterDict.insert(styleAccel.left(1), (const int *)1);
+        }
+        (void) new TQAction( styleName, TQIconSet(), styleAccel, parent );
+    }
+    
+ +In the example we are using the dictionary to provide fast random +access to the keys, and we don't care what the values are. The +example is used to generate a menu of TQStyles, each with a unique +accelerator key (or no accelerator if there are no unused letters +left). +

We first obtain the list of available styles, then sort them so +that the menu items will be ordered alphabetically. Next we create +a dictionary of int pointers. The keys in the dictionary are each +one character long, representing letters that have been used for +accelerators. We iterate through our list of style names. If the +first letter of the style name is in the dictionary, i.e. has been +used, we iterate over all the characters in the style name to see +if we can find a letter that hasn't been used. If we find an +unused letter we put the accelerator ampersand (&) in front of it +and add that letter to the dictionary. If we can't find an unused +letter the style will simply have no accelerator. If the first +letter of the style name is not in the dictionary we use it for +the accelerator and add it to the dictionary. Finally we create a +TQAction for each style. +

See also TQDictIterator, TQAsciiDict, TQIntDict, TQPtrDict, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQDict::TQDict ( int size = 17, bool caseSensitive = TRUE ) +

+ +

Constructs a dictionary optimized for less than size entries. +

We recommend setting size to a suitably large prime number +(e.g. a prime that's slightly larger than the expected number of +entries). This makes the hash distribution better which will lead +to faster lookup. +

If caseSensitive is TRUE (the default), keys which differ only +by case are considered different. + +

TQDict::TQDict ( const TQDict<type> & dict ) +

+ +

Constructs a copy of dict. +

Each item in dict is inserted into this dictionary. Only the +pointers are copied (shallow copy). + +

TQDict::~TQDict () +

+ +

Removes all items from the dictionary and destroys it. If +setAutoDelete() is TRUE, each value is deleted. All iterators that +access this dictionary will be reset. +

See also setAutoDelete(). + +

bool TQPtrCollection::autoDelete () const +

+ +

Returns the setting of the auto-delete option. The default is FALSE. +

See also setAutoDelete(). + +

void TQDict::clear () [virtual] +

+ +

Removes all items from the dictionary. +

The removed items are deleted if auto-deletion is enabled. +

All dictionary iterators that operate on the dictionary are reset. +

See also remove(), take(), and setAutoDelete(). + +

Reimplemented from TQPtrCollection. +

uint TQDict::count () const [virtual] +

+ +

Returns the number of items in the dictionary. +

See also isEmpty(). + +

Reimplemented from TQPtrCollection. +

type * TQDict::find ( const TQString & key ) const +

+ +

Returns the item with key key, or 0 if the key does not exist +in the dictionary. +

If there are two or more items with equal keys, then the most +recently inserted item will be found. +

Equivalent to the [] operator. +

See also operator[](). + +

void TQDict::insert ( const TQString & key, const type * item ) +

+ +

Inserts the key key with value item into the dictionary. +

Multiple items can have the same key, in which case only the last +item will be accessible using operator[](). +

item may not be 0. +

See also replace(). + +

Example: themes/themes.cpp. +

bool TQDict::isEmpty () const +

+ +

Returns TRUE if the dictionary is empty, i.e. count() == 0; +otherwise returns FALSE. +

See also count(). + +

TQDict<type> & TQDict::operator= ( const TQDict<type> & dict ) +

+ +

Assigns dict to this dictionary and returns a reference to this +dictionary. +

This dictionary is first cleared, then each item in dict is +inserted into this dictionary. Only the pointers are copied +(shallow copy), unless newItem() has been reimplemented. + +

type * TQDict::operator[] ( const TQString & key ) const +

+ +

Returns the item with key key, or 0 if the key does not +exist in the dictionary. +

If there are two or more items with equal keys, then the most +recently inserted item will be found. +

Equivalent to the find() function. +

See also find(). + +

TQDataStream & TQDict::read ( TQDataStream & s, TQPtrCollection::Item & item ) [virtual protected] +

+ +

Reads a dictionary item from the stream s and returns a +reference to the stream. +

The default implementation sets item to 0. +

See also write(). + +

bool TQDict::remove ( const TQString & key ) +

+ +

Removes the item with key from the dictionary. Returns TRUE if +successful, i.e. if the item is in the dictionary; otherwise +returns FALSE. +

If there are two or more items with equal keys, then the last item +that was inserted will be removed. +

The removed item is deleted if auto-deletion is enabled. +

All dictionary iterators that refer to the removed item will be +set to point to the next item in the dictionary's traversal order. +

See also take(), clear(), and setAutoDelete(). + +

void TQDict::replace ( const TQString & key, const type * item ) +

+ +

Replaces the value of the key, key with item. +

If the item does not already exist, it will be inserted. +

item may not be 0. +

Equivalent to: +

+        TQDict<char> dict;
+            ...
+        if ( dict.find( key ) )
+            dict.remove( key );
+        dict.insert( key, item );
+    
+ +

If there are two or more items with equal keys, then the last item +that was inserted will be replaced. +

See also insert(). + +

void TQDict::resize ( uint newsize ) +

+ +

Changes the size of the hash table to newsize. The contents of +the dictionary are preserved, but all iterators on the dictionary +become invalid. + +

void TQPtrCollection::setAutoDelete ( bool enable ) +

+ +

Sets the collection to auto-delete its contents if enable is +TRUE and to never delete them if enable is FALSE. +

If auto-deleting is turned on, all the items in a collection are +deleted when the collection itself is deleted. This is convenient +if the collection has the only pointer to the items. +

The default setting is FALSE, for safety. If you turn it on, be +careful about copying the collection - you might find yourself +with two collections deleting the same items. +

Note that the auto-delete setting may also affect other functions +in subclasses. For example, a subclass that has a remove() +function will remove the item from its data structure, and if +auto-delete is enabled, will also delete the item. +

See also autoDelete(). + +

Examples: grapher/grapher.cpp, scribble/scribble.cpp, and table/bigtable/main.cpp. +

uint TQDict::size () const +

+ +

Returns the size of the internal hash array (as specified in the +constructor). +

See also count(). + +

void TQDict::statistics () const +

+ +

Debugging-only function that prints out the dictionary +distribution using qDebug(). + +

type * TQDict::take ( const TQString & key ) +

+ +

Takes the item with key out of the dictionary without deleting +it (even if auto-deletion is enabled). +

If there are two or more items with equal keys, then the last item +that was inserted will be taken. +

Returns a pointer to the item taken out, or 0 if the key does not +exist in the dictionary. +

All dictionary iterators that refer to the taken item will be set +to point to the next item in the dictionary traversal order. +

See also remove(), clear(), and setAutoDelete(). + +

TQDataStream & TQDict::write ( TQDataStream & s, TQPtrCollection::Item ) const [virtual protected] +

+ +

Writes a dictionary item to the stream s and returns a +reference to the stream. +

See also read(). + + +


+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/qdictiterator-members.html b/doc/html/qdictiterator-members.html new file mode 100644 index 00000000..db67d98d --- /dev/null +++ b/doc/html/qdictiterator-members.html @@ -0,0 +1,56 @@ + + + + + +TQDictIterator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDictIterator

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdictiterator.html b/doc/html/qdictiterator.html new file mode 100644 index 00000000..1cee2bc5 --- /dev/null +++ b/doc/html/qdictiterator.html @@ -0,0 +1,172 @@ + + + + + +TQDictIterator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDictIterator Class Reference

+ +

The TQDictIterator class provides an iterator for TQDict collections. +More... +

#include <qdict.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQDictIterator class provides an iterator for TQDict collections. +

+ +

TQDictIterator is implemented as a template class. Define a +template instance TQDictIterator<X> to create a dictionary +iterator that operates on TQDict<X> (dictionary of X*). +

The traversal order is arbitrary; when we speak of the "first", +"last" and "next" item we are talking in terms of this arbitrary +order. +

Multiple iterators may independently traverse the same dictionary. +A TQDict knows about all the iterators that are operating on the +dictionary. When an item is removed from the dictionary, TQDict +updates all iterators that are referring to the removed item to +point to the next item in the (arbitrary) traversal order. +

Example: +

+    TQDict<TQLineEdit> fields;
+    fields.insert( "forename", new TQLineEdit( this ) );
+    fields.insert( "surname", new TQLineEdit( this ) );
+    fields.insert( "age", new TQLineEdit( this ) );
+
+    fields["forename"]->setText( "Homer" );
+    fields["surname"]->setText( "Simpson" );
+    fields["age"]->setText( "45" );
+
+    TQDictIterator<TQLineEdit> it( fields );
+    for( ; it.current(); ++it )
+        cout << it.currentKey() << ": " << it.current()->text() << endl;
+    cout << endl;
+
+    // Output (random order):
+    //  age: 45
+    //  surname: Simpson
+    //  forename: Homer
+    
+ +In the example we insert some pointers to line edits into a +dictionary, then iterate over the dictionary printing the strings +associated with the line edits. +

See also TQDict, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQDictIterator::TQDictIterator ( const TQDict<type> & dict ) +

+ +

Constructs an iterator for dict. The current iterator item is +set to point to the first item in the dictionary, dict. First +in this context means first in the arbitrary traversal order. + +

TQDictIterator::~TQDictIterator () +

+ +

Destroys the iterator. + +

uint TQDictIterator::count () const +

+ +

Returns the number of items in the dictionary over which the +iterator is operating. +

See also isEmpty(). + +

type * TQDictIterator::current () const +

+ +

Returns a pointer to the current iterator item's value. + +

TQString TQDictIterator::currentKey () const +

+ +

Returns the current iterator item's key. + +

bool TQDictIterator::isEmpty () const +

+ +

Returns TRUE if the dictionary is empty, i.e. count() == 0; +otherwise returns FALSE. +

See also count(). + +

TQDictIterator::operator type * () const +

+ +

Cast operator. Returns a pointer to the current iterator item. +Same as current(). + +

type * TQDictIterator::operator() () +

+ +

Makes the next item current and returns the original current item. +

If the current iterator item was the last item in the dictionary +or if it was 0, 0 is returned. + +

type * TQDictIterator::operator++ () +

+ +

Prefix ++ makes the next item current and returns the new current +item. +

If the current iterator item was the last item in the dictionary +or if it was 0, 0 is returned. + +

type * TQDictIterator::toFirst () +

+ +

Resets the iterator, making the first item the first current item. +First in this context means first in the arbitrary traversal +order. Returns a pointer to this item. +

If the dictionary is empty it sets the current item to 0 and +returns 0. + + +


+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/qdir-example.html b/doc/html/qdir-example.html new file mode 100644 index 00000000..df2b245f --- /dev/null +++ b/doc/html/qdir-example.html @@ -0,0 +1,409 @@ + + + + + +TQDir + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDir

+ + +

+


+

Main: +

/****************************************************************************
+** $Id: qt/qdir.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "../dirview/dirview.h"
+#include "qdir.h"
+
+#include <qapplication.h>
+#include <qtextview.h>
+#include <qfileinfo.h>
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qhbox.h>
+#include <qspinbox.h>
+#include <qlabel.h>
+#include <qmultilineedit.h>
+#include <qheader.h>
+#include <qevent.h>
+#include <qpainter.h>
+#include <qpopupmenu.h>
+#include <qpushbutton.h>
+#include <qtoolbutton.h>
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qtooltip.h>
+
+#include <stdlib.h>
+
+/* XPM */
+static const char *bookmarks[]={
+    "22 14 8 1",
+    "# c #000080",
+    "a c #585858",
+    "b c #000000",
+    "c c #ffffff",
+    "d c #ffffff",
+    "e c #ffffff",
+    "f c #000000",
+    ". c None",
+    "...bb.................",
+    "..bacb....bbb.........",
+    "..badcb.bbccbab.......",
+    "..bacccbadccbab.......",
+    "..baecdbcccdbab.......",
+    "..bacccbacccbab.......",
+    "..badcdbcecdfab.......",
+    "..bacecbacccbab.......",
+    "..baccdbcccdbab.......",
+    "...badcbacdbbab.......",
+    "....bacbcbbccab.......",
+    ".....babbaaaaab.......",
+    ".....bbabbbbbbb.......",
+    "......bb.............."
+};
+
+/* XPM */
+static const char *home[]={
+    "16 15 4 1",
+    "# c #000000",
+    "a c #ffffff",
+    "b c #c0c0c0",
+    ". c None",
+    ".......##.......",
+    "..#...####......",
+    "..#..#aabb#.....",
+    "..#.#aaaabb#....",
+    "..##aaaaaabb#...",
+    "..#aaaaaaaabb#..",
+    ".#aaaaaaaaabbb#.",
+    "###aaaaaaaabb###",
+    "..#aaaaaaaabb#..",
+    "..#aaa###aabb#..",
+    "..#aaa#.#aabb#..",
+    "..#aaa#.#aabb#..",
+    "..#aaa#.#aabb#..",
+    "..#aaa#.#aabb#..",
+    "..#####.######.."
+};
+
+// ****************************************************************************************************
+
+PixmapView::PixmapView( TQWidget *parent )
+    : TQScrollView( parent )
+{
+    viewport()->setBackgroundMode( PaletteBase );
+}
+
+void PixmapView::setPixmap( const TQPixmap &pix )
+{
+    pixmap = pix;
+    resizeContents( pixmap.size().width(), pixmap.size().height() );
+    viewport()->repaint( FALSE );
+}
+
+void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
+{
+    p->fillRect( cx, cy, cw, ch, colorGroup().brush( TQColorGroup::Base ) );
+    p->drawPixmap( 0, 0, pixmap );
+}
+
+// ****************************************************************************************************
+
+Preview::Preview( TQWidget *parent )
+    : TQWidgetStack( parent )
+{
+    normalText = new TQMultiLineEdit( this );
+    normalText->setReadOnly( TRUE );
+    html = new TQTextView( this );
+    pixmap = new PixmapView( this );
+    raiseWidget( normalText );
+}
+
+void Preview::showPreview( const TQUrl &u, int size )
+{
+    if ( u.isLocalFile() ) {
+        TQString path = u.path();
+        TQFileInfo fi( path );
+        if ( fi.isFile() && (int)fi.size() > size * 1000 ) {
+            normalText->setText( tr( "The File\n%1\nis too large, so I don't show it!" ).arg( path ) );
+            raiseWidget( normalText );
+            return;
+        }
+
+        TQPixmap pix( path );
+        if ( pix.isNull() ) {
+            if ( fi.isFile() ) {
+                TQFile f( path );
+                if ( f.open( IO_ReadOnly ) ) {
+                    TQTextStream ts( &f );
+                    TQString text = ts.read();
+                    f.close();
+                    if ( fi.extension().lower().contains( "htm" ) ) {
+                        TQString url = html->mimeSourceFactory()->makeAbsolute( path, html->context() );
+                        html->setText( text, url );
+                        raiseWidget( html );
+                        return;
+                    } else {
+                        normalText->setText( text );
+                        raiseWidget( normalText );
+                        return;
+                    }
+                }
+            }
+            normalText->setText( TQString::null );
+            raiseWidget( normalText );
+        } else {
+            pixmap->setPixmap( pix );
+            raiseWidget( pixmap );
+        }
+    } else {
+        normalText->setText( "I only show local files!" );
+        raiseWidget( normalText );
+    }
+}
+
+// ****************************************************************************************************
+
+PreviewWidget::PreviewWidget( TQWidget *parent )
+    : TQVBox( parent ), TQFilePreview()
+{
+    setSpacing( 5 );
+    setMargin( 5 );
+    TQHBox *row = new TQHBox( this );
+    row->setSpacing( 5 );
+    (void)new TQLabel( tr( "Only show files smaller than: " ), row );
+    sizeSpinBox = new TQSpinBox( 1, 10000, 1, row );
+    sizeSpinBox->setSuffix( " KB" );
+    sizeSpinBox->setValue( 64 );
+    row->setFixedHeight( 10 + sizeSpinBox->sizeHint().height() );
+    preview = new Preview( this );
+}
+
+void PreviewWidget::previewUrl( const TQUrl &u )
+{
+    preview->showPreview( u, sizeSpinBox->value() );
+}
+
+// ****************************************************************************************************
+
+CustomFileDialog::CustomFileDialog()
+    :  TQFileDialog( 0, 0, TRUE )
+{
+    setDir( "/" );
+
+    dirView = new DirectoryView( this, 0, TRUE );
+    dirView->addColumn( "" );
+    dirView->header()->hide();
+    ::Directory *root = new ::Directory( dirView, "/" );
+    root->setOpen( TRUE );
+    dirView->setFixedWidth( 150 );
+
+    addLeftWidget( dirView );
+
+    TQPushButton *p = new TQPushButton( this );
+    p->setPixmap( TQPixmap( bookmarks ) );
+    TQToolTip::add( p, tr( "Bookmarks" ) );
+
+    bookmarkMenu = new TQPopupMenu( this );
+    connect( bookmarkMenu, SIGNAL( activated( int ) ),
+             this, SLOT( bookmarkChosen( int ) ) );
+    addId = bookmarkMenu->insertItem( tr( "Add bookmark" ) );
+    bookmarkMenu->insertSeparator();
+
+    TQFile f( ".bookmarks" );
+    if ( f.open( IO_ReadOnly ) ) {
+        TQDataStream ds( &f );
+        ds >> bookmarkList;
+        f.close();
+
+        TQStringList::Iterator it = bookmarkList.begin();
+        for ( ; it != bookmarkList.end(); ++it ) {
+            bookmarkMenu->insertItem( *it );
+        }
+    }
+
+    p->setPopup( bookmarkMenu );
+
+    addToolButton( p, TRUE );
+
+    connect( dirView, SIGNAL( folderSelected( const TQString & ) ),
+             this, SLOT( setDir2( const TQString & ) ) );
+    connect( this, SIGNAL( dirEntered( const TQString & ) ),
+             dirView, SLOT( setDir( const TQString & ) ) );
+
+    TQToolButton *b = new TQToolButton( this );
+    TQToolTip::add( b, tr( "Go Home!" ) );
+    b->setPixmap( TQPixmap( home ) );
+    connect( b, SIGNAL( clicked() ),
+             this, SLOT( goHome() ) );
+
+    addToolButton( b );
+
+    resize( width() + width() / 3, height() );
+}
+
+CustomFileDialog::~CustomFileDialog()
+{
+    if ( !bookmarkList.isEmpty() ) {
+        TQFile f( ".bookmarks" );
+        if ( f.open( IO_WriteOnly ) ) {
+            TQDataStream ds( &f );
+            ds << bookmarkList;
+            f.close();
+        }
+    }
+}
+
+void CustomFileDialog::setDir2( const TQString &s )
+{
+    blockSignals( TRUE );
+    setDir( s );
+    blockSignals( FALSE );
+}
+
+void CustomFileDialog::showEvent( TQShowEvent *e )
+{
+    TQFileDialog::showEvent( e );
+    dirView->setDir( dirPath() );
+}
+
+void CustomFileDialog::bookmarkChosen( int i )
+{
+    if ( i == addId ) {
+        bookmarkList << dirPath();
+        bookmarkMenu->insertItem( dirPath() );
+    } else {
+        setDir( bookmarkMenu->text( i ) );
+    }
+}
+
+void CustomFileDialog::goHome()
+{
+    if ( getenv( "HOME" ) )
+        setDir( getenv( "HOME" ) );
+    else
+        setDir( "/" );
+}
+
+// ****************************************************************************************************
+
+int main( int argc, char ** argv )
+{
+    TQFileDialog::Mode mode = TQFileDialog::ExistingFile;
+    TQString start;
+    TQString filter;
+    TQString caption;
+    bool preview = FALSE;
+    bool custom = FALSE;
+    TQApplication a( argc, argv );
+    for (int i=1; i<argc; i++) {
+        TQString arg = argv[i];
+        if ( arg == "-any" )
+            mode = TQFileDialog::AnyFile;
+        else if ( arg == "-dir" )
+            mode = TQFileDialog::Directory;
+        else if ( arg == "-default" )
+            start = argv[++i];
+        else if ( arg == "-filter" )
+            filter = argv[++i];
+        else if ( arg == "-preview" )
+            preview = TRUE;
+        else if ( arg == "-custom" )
+            custom = TRUE;
+        else if ( arg[0] == '-' ) {
+            qDebug("Usage: qdir [-any | -dir | -custom] [-preview] [-default f] {-filter f} [caption ...]\n"
+                   "      -any         Get any filename, need not exist.\n"
+                   "      -dir         Return a directory rather than a file.\n"
+                   "      -custom      Opens a customized TQFileDialog with \n"
+                   "                   dir browser, bookmark menu, etc.\n"
+                   "      -preview     Show a preview widget.\n"
+                   "      -default f   Start from directory/file f.\n"
+                   "      -filter f    eg. '*.gif' '*.bmp'\n"
+                   "      caption ...  Caption for dialog.\n"
+                   );
+            return 1;
+        } else {
+            if ( !caption.isNull() )
+                caption += ' ';
+            caption += arg;
+        }
+    }
+
+    if ( !start )
+        start = TQDir::currentDirPath();
+
+    if ( !caption )
+        caption = mode == TQFileDialog::Directory
+                    ? "Choose directory..." : "Choose file...";
+
+    if ( !custom ) {
+        TQFileDialog fd( TQString::null, filter, 0, 0, TRUE );
+        fd.setMode( mode );
+        if ( preview ) {
+            fd.setContentsPreviewEnabled( TRUE );
+            PreviewWidget *pw = new PreviewWidget( &fd );
+            fd.setContentsPreview( pw, pw );
+            fd.setViewMode( TQFileDialog::List );
+            fd.setPreviewMode( TQFileDialog::Contents );
+        }
+        fd.setCaption( caption );
+        fd.setSelection( start );
+        if ( fd.exec() == TQDialog::Accepted ) {
+            TQString result = fd.selectedFile();
+            printf("%s\n", (const char*)result);
+            return 0;
+        } else {
+            return 1;
+        }
+    } else {
+        CustomFileDialog fd;
+        fd.exec();
+        return 1;
+    }
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdir-h.html b/doc/html/qdir-h.html new file mode 100644 index 00000000..953cccf3 --- /dev/null +++ b/doc/html/qdir-h.html @@ -0,0 +1,295 @@ + + + + + +qdir.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdir.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdir.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQDir class
+**
+** Created : 950427
+**
+** 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 retquirements 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 TQDIR_H
+#define TQDIR_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#include "qstrlist.h"
+#include "qfileinfo.h"
+#endif // QT_H
+
+
+#ifndef QT_NO_DIR
+typedef TQPtrList<TQFileInfo> TQFileInfoList;
+typedef TQPtrListIterator<TQFileInfo> TQFileInfoListIterator;
+class TQStringList;
+template <class T> class TQDeepCopy;
+
+
+class Q_EXPORT TQDir
+{
+public:
+    enum FilterSpec { Dirs	    = 0x001,
+		      Files	    = 0x002,
+		      Drives	    = 0x004,
+		      NoSymLinks    = 0x008,
+		      All	    = 0x007,
+		      TypeMask	    = 0x00F,
+
+		      Readable	    = 0x010,
+		      Writable	    = 0x020,
+		      Executable    = 0x040,
+		      RWEMask	    = 0x070,
+
+		      Modified	    = 0x080,
+		      Hidden	    = 0x100,
+		      System	    = 0x200,
+		      AccessMask    = 0x3F0,
+
+		      DefaultFilter = -1 };
+
+    enum SortSpec   { Name	    = 0x00,
+		      Time	    = 0x01,
+		      Size	    = 0x02,
+		      Unsorted	    = 0x03,
+		      SortByMask    = 0x03,
+
+		      DirsFirst	    = 0x04,
+		      Reversed	    = 0x08,
+		      IgnoreCase    = 0x10,
+                      LocaleAware   = 0x20, 
+		      DefaultSort   = -1 };
+
+    TQDir();
+    TQDir( const TQString &path, const TQString &nameFilter = TQString::null,
+	  int sortSpec = Name | IgnoreCase, int filterSpec = All );
+    TQDir( const TQDir & );
+
+    virtual ~TQDir();
+
+    TQDir       &operator=( const TQDir & );
+    TQDir       &operator=( const TQString &path );
+
+    virtual void setPath( const TQString &path );
+    virtual TQString path()		const;
+    virtual TQString absPath()	const;
+    virtual TQString canonicalPath()	const;
+
+    virtual TQString dirName() const;
+    virtual TQString filePath( const TQString &fileName,
+			      bool acceptAbsPath = TRUE ) const;
+    virtual TQString absFilePath( const TQString &fileName,
+				 bool acceptAbsPath = TRUE ) const;
+
+    static TQString convertSeparators( const TQString &pathName );
+
+    virtual bool cd( const TQString &dirName, bool acceptAbsPath = TRUE );
+    virtual bool cdUp();
+
+    TQString	nameFilter() const;
+    virtual void setNameFilter( const TQString &nameFilter );
+    FilterSpec filter() const;
+    virtual void setFilter( int filterSpec );
+    SortSpec sorting() const;
+    virtual void setSorting( int sortSpec );
+
+    bool	matchAllDirs() const;
+    virtual void setMatchAllDirs( bool );
+
+    uint count() const;
+    TQString	operator[]( int ) const;
+
+    virtual TQStrList encodedEntryList( int filterSpec = DefaultFilter,
+				       int sortSpec   = DefaultSort  ) const;
+    virtual TQStrList encodedEntryList( const TQString &nameFilter,
+				       int filterSpec = DefaultFilter,
+				       int sortSpec   = DefaultSort   ) const;
+    virtual TQStringList entryList( int filterSpec = DefaultFilter,
+				   int sortSpec   = DefaultSort  ) const;
+    virtual TQStringList entryList( const TQString &nameFilter,
+				   int filterSpec = DefaultFilter,
+				   int sortSpec   = DefaultSort   ) const;
+
+    virtual const TQFileInfoList *entryInfoList( int filterSpec = DefaultFilter,
+						int sortSpec = DefaultSort ) const;
+    virtual const TQFileInfoList *entryInfoList( const TQString &nameFilter,
+						int filterSpec = DefaultFilter,
+						int sortSpec = DefaultSort ) const;
+
+    static const TQFileInfoList *drives();
+
+    virtual bool mkdir( const TQString &dirName,
+			bool acceptAbsPath = TRUE ) const;
+    virtual bool rmdir( const TQString &dirName,
+			bool acceptAbsPath = TRUE ) const;
+
+    virtual bool isReadable() const;
+    virtual bool exists()   const;
+    virtual bool isRoot()   const;
+
+    virtual bool isRelative() const;
+    virtual void convertToAbs();
+
+    virtual bool operator==( const TQDir & ) const;
+    virtual bool operator!=( const TQDir & ) const;
+
+    virtual bool remove( const TQString &fileName,
+			 bool acceptAbsPath = TRUE );
+    virtual bool rename( const TQString &name, const TQString &newName,
+			 bool acceptAbsPaths = TRUE  );
+    virtual bool exists( const TQString &name,
+			 bool acceptAbsPath = TRUE );
+
+    static char separator();
+
+    static bool setCurrent( const TQString &path );
+    static TQDir current();
+    static TQDir home();
+    static TQDir root();
+    static TQString currentDirPath();
+    static TQString homeDirPath();
+    static TQString rootDirPath();
+
+    static bool match( const TQStringList &filters, const TQString &fileName );
+    static bool match( const TQString &filter, const TQString &fileName );
+    static TQString cleanDirPath( const TQString &dirPath );
+    static bool isRelativePath( const TQString &path );
+    void refresh() const;
+
+private:
+#ifdef Q_OS_MAC
+    typedef struct FSSpec FSSpec;
+    static FSSpec *make_spec(const TQString &);
+#endif
+    void init();
+    virtual bool readDirEntries( const TQString &nameFilter,
+				 int FilterSpec, int SortSpec  );
+
+    static void slashify( TQString & );
+
+    TQString	dPath;
+    TQStringList   *fList;
+    TQFileInfoList *fiList;
+    TQString	nameFilt;
+    FilterSpec	filtS;
+    SortSpec	sortS;
+    uint	dirty	: 1;
+    uint	allDirs : 1;
+
+    void detach();
+    friend class TQDeepCopy< TQDir >;
+};
+
+
+inline TQString TQDir::path() const
+{
+    return dPath;
+}
+
+inline TQString TQDir::nameFilter() const
+{
+    return nameFilt;
+}
+
+inline TQDir::FilterSpec TQDir::filter() const
+{
+    return filtS;
+}
+
+inline TQDir::SortSpec TQDir::sorting() const
+{
+    return sortS;
+}
+
+inline bool TQDir::matchAllDirs() const
+{
+    return allDirs;
+}
+
+inline bool TQDir::operator!=( const TQDir &d ) const
+{
+    return !(*this == d);
+}
+
+
+struct TQDirSortItem {
+    TQString filename_cache;
+    TQFileInfo* item;
+};
+
+#endif // QT_NO_DIR
+#endif // TQDIR_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdir-members.html b/doc/html/qdir-members.html new file mode 100644 index 00000000..84046032 --- /dev/null +++ b/doc/html/qdir-members.html @@ -0,0 +1,96 @@ + + + + + +TQDir Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDir

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdir.html b/doc/html/qdir.html new file mode 100644 index 00000000..a5051e92 --- /dev/null +++ b/doc/html/qdir.html @@ -0,0 +1,818 @@ + + + + + +TQDir Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDir Class Reference

+ +

The TQDir class provides access to directory structures and their contents in a platform-independent way. +More... +

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

+

#include <qdir.h> +

List of all member functions. +

Public Members

+
    +
  • enum FilterSpec { Dirs = 0x001, Files = 0x002, Drives = 0x004, NoSymLinks = 0x008, All = 0x007, TypeMask = 0x00F, Readable = 0x010, Writable = 0x020, Executable = 0x040, RWEMask = 0x070, Modified = 0x080, Hidden = 0x100, System = 0x200, AccessMask = 0x3F0, DefaultFilter = -1 }
  • +
  • enum SortSpec { Name = 0x00, Time = 0x01, Size = 0x02, Unsorted = 0x03, SortByMask = 0x03, DirsFirst = 0x04, Reversed = 0x08, IgnoreCase = 0x10, LocaleAware = 0x20, DefaultSort = -1 }
  • +
  • TQDir ()
  • +
  • TQDir ( const TQString & path, const TQString & nameFilter = TQString::null, int sortSpec = Name | IgnoreCase, int filterSpec = All )
  • +
  • TQDir ( const TQDir & d )
  • +
  • virtual ~TQDir ()
  • +
  • TQDir & operator= ( const TQDir & d )
  • +
  • TQDir & operator= ( const TQString & path )
  • +
  • virtual void setPath ( const TQString & path )
  • +
  • virtual TQString path () const
  • +
  • virtual TQString absPath () const
  • +
  • virtual TQString canonicalPath () const
  • +
  • virtual TQString dirName () const
  • +
  • virtual TQString filePath ( const TQString & fileName, bool acceptAbsPath = TRUE ) const
  • +
  • virtual TQString absFilePath ( const TQString & fileName, bool acceptAbsPath = TRUE ) const
  • +
  • virtual bool cd ( const TQString & dirName, bool acceptAbsPath = TRUE )
  • +
  • virtual bool cdUp ()
  • +
  • TQString nameFilter () const
  • +
  • virtual void setNameFilter ( const TQString & nameFilter )
  • +
  • FilterSpec filter () const
  • +
  • virtual void setFilter ( int filterSpec )
  • +
  • SortSpec sorting () const
  • +
  • virtual void setSorting ( int sortSpec )
  • +
  • bool matchAllDirs () const
  • +
  • virtual void setMatchAllDirs ( bool enable )
  • +
  • uint count () const
  • +
  • TQString operator[] ( int index ) const
  • +
  • virtual TQStrList encodedEntryList ( int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const  (obsolete)
  • +
  • virtual TQStrList encodedEntryList ( const TQString & nameFilter, int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const  (obsolete)
  • +
  • virtual TQStringList entryList ( int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const
  • +
  • virtual TQStringList entryList ( const TQString & nameFilter, int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const
  • +
  • virtual const TQFileInfoList * entryInfoList ( int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const
  • +
  • virtual const TQFileInfoList * entryInfoList ( const TQString & nameFilter, int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const
  • +
  • virtual bool mkdir ( const TQString & dirName, bool acceptAbsPath = TRUE ) const
  • +
  • virtual bool rmdir ( const TQString & dirName, bool acceptAbsPath = TRUE ) const
  • +
  • virtual bool isReadable () const
  • +
  • virtual bool exists () const
  • +
  • virtual bool isRoot () const
  • +
  • virtual bool isRelative () const
  • +
  • virtual void convertToAbs ()
  • +
  • virtual bool operator== ( const TQDir & d ) const
  • +
  • virtual bool operator!= ( const TQDir & d ) const
  • +
  • virtual bool remove ( const TQString & fileName, bool acceptAbsPath = TRUE )
  • +
  • virtual bool rename ( const TQString & oldName, const TQString & newName, bool acceptAbsPaths = TRUE )
  • +
  • virtual bool exists ( const TQString & name, bool acceptAbsPath = TRUE )
  • +
  • void refresh () const
  • +
+

Static Public Members

+ +

Detailed Description

+ + + +The TQDir class provides access to directory structures and their contents in a platform-independent way. +

+ +

A TQDir is used to manipulate path names, access information +regarding paths and files, and manipulate the underlying file +system. +

A TQDir can point to a file using either a relative or an absolute +path. Absolute paths begin with the directory separator "/" +(optionally preceded by a drive specification under Windows). If +you always use "/" as a directory separator, TQt will translate +your paths to conform to the underlying operating system. Relative +file names begin with a directory name or a file name and specify +a path relative to the current directory. +

The "current" path refers to the application's working directory. +A TQDir's own path is set and retrieved with setPath() and path(). +

An example of an absolute path is the string "/tmp/quartz", a +relative path might look like "src/fatlib". You can use the +function isRelative() to check if a TQDir is using a relative or an +absolute file path. Call convertToAbs() to convert a relative TQDir +to an absolute one. For a simplified path use cleanDirPath(). To +obtain a path which has no symbolic links or redundant ".." +elements use canonicalPath(). The path can be set with setPath(), +and changed with cd() and cdUp(). +

TQDir provides several static functions, for example, setCurrent() +to set the application's working directory and currentDirPath() to +retrieve the application's working directory. Access to some +common paths is provided with the static functions, current(), +home() and root() which return TQDir objects or currentDirPath(), +homeDirPath() and rootDirPath() which return the path as a string. +If you want to know about your application's path use +TQApplication::applicationDirPath(). +

The number of entries in a directory is returned by count(). +Obtain a string list of the names of all the files and directories +in a directory with entryList(). If you prefer a list of TQFileInfo +pointers use entryInfoList(). Both these functions can apply a +name filter, an attributes filter (e.g. read-only, files not +directories, etc.), and a sort order. The filters and sort may be +set with calls to setNameFilter(), setFilter() and setSorting(). +They may also be specified in the entryList() and +entryInfoList()'s arguments. +

Create a new directory with mkdir(), rename a directory with +rename() and remove an existing directory with rmdir(). Remove a +file with remove(). You can interrogate a directory with exists(), +isReadable() and isRoot(). +

To get a path with a filename use filePath(), and to get a +directory name use dirName(); neither of these functions checks +for the existence of the file or directory. +

The list of root directories is provided by drives(); on Unix +systems this returns a list containing one root directory, "/"; on +Windows the list will usually contain "C:/", and possibly "D:/", +etc. +

It is easiest to work with "/" separators in TQt code. If you need +to present a path to the user or need a path in a form suitable +for a function in the underlying operating system use +convertSeparators(). +

Examples: +

See if a directory exists. +

+    TQDir d( "example" );                        // "./example"
+    if ( !d.exists() )
+        qWarning( "Cannot find the example directory" );
+    
+ +

Traversing directories and reading a file. +

+    TQDir d = TQDir::root();                      // "/"
+    if ( !d.cd("tmp") ) {                       // "/tmp"
+        qWarning( "Cannot find the \"/tmp\" directory" );
+    } else {
+        TQFile f( d.filePath("ex1.txt") );       // "/tmp/ex1.txt"
+        if ( !f.open(IO_ReadWrite) )
+            qWarning( "Cannot create the file %s", f.name() );
+    }
+    
+ +

A program that lists all the files in the current directory +(excluding symbolic links), sorted by size, smallest first: +

+    #include <stdio.h>
+    #include <qdir.h>
+
+    int main( int argc, char **argv )
+    {
+        TQDir d;
+        d.setFilter( TQDir::Files | TQDir::Hidden | TQDir::NoSymLinks );
+        d.setSorting( TQDir::Size | TQDir::Reversed );
+
+        const TQFileInfoList *list = d.entryInfoList();
+        TQFileInfoListIterator it( *list );
+        TQFileInfo *fi;
+
+        printf( "     Bytes Filename\n" );
+        while ( (fi = it.current()) != 0 ) {
+            printf( "%10li %s\n", fi->size(), fi->fileName().latin1() );
+            ++it;
+        }
+        return 0;
+    }
+    
+ +

See also TQApplication::applicationDirPath() and Input/Output and Networking. + +


Member Type Documentation

+

TQDir::FilterSpec

+ +

This enum describes the filtering options available to TQDir, e.g. +for entryList() and entryInfoList(). The filter value is specified +by OR-ing together values from the following list: +

    +
  • TQDir::Dirs - List directories only. +
  • TQDir::Files - List files only. +
  • TQDir::Drives - List disk drives (ignored under Unix). +
  • TQDir::NoSymLinks - Do not list symbolic links (ignored by operating +systems that don't support symbolic links). +
  • TQDir::All - List directories, files, drives and symlinks (this does not list +broken symlinks unless you specify System). +
  • TQDir::TypeMask - A mask for the the Dirs, Files, Drives and +NoSymLinks flags. +
  • TQDir::Readable - List files for which the application has read access. +
  • TQDir::Writable - List files for which the application has write access. +
  • TQDir::Executable - List files for which the application has execute +access. Executables needs to be combined with Dirs or Files. +
  • TQDir::RWEMask - A mask for the Readable, Writable and Executable flags. +
  • TQDir::Modified - Only list files that have been modified (ignored +under Unix). +
  • TQDir::Hidden - List hidden files (on Unix, files starting with a .). +
  • TQDir::System - List system files (on Unix, FIFOs, sockets and +device files) +
  • TQDir::AccessMask - A mask for the Readable, Writable, Executable +Modified, Hidden and System flags +
  • TQDir::DefaultFilter - Internal flag. +

If you do not set any of Readable, Writable or Executable, TQDir will set all three of them. This makes the +default easy to write and at the same time useful. +

Examples: Readable|Writable means list all files for which the +application has read access, write access or both. Dirs|Drives +means list drives, directories, all files that the application can +read, write or execute, and also symlinks to such +files/directories. + +

TQDir::SortSpec

+ +

This enum describes the sort options available to TQDir, e.g. for +entryList() and entryInfoList(). The sort value is specified by +OR-ing together values from the following list: +

    +
  • TQDir::Name - Sort by name. +
  • TQDir::Time - Sort by time (modification time). +
  • TQDir::Size - Sort by file size. +
  • TQDir::Unsorted - Do not sort. +
  • TQDir::SortByMask - A mask for Name, Time and Size. +
  • TQDir::DirsFirst - Put the directories first, then the files. +
  • TQDir::Reversed - Reverse the sort order. +
  • TQDir::IgnoreCase - Sort case-insensitively. +
  • TQDir::LocaleAware - Sort names using locale aware compares +
  • TQDir::DefaultSort - Internal flag. +

You can only specify one of the first four. +

If you specify both DirsFirst and Reversed, directories are +still put first, but in reverse order; the files will be listed +after the directories, again in reverse order. + +


Member Function Documentation

+

TQDir::TQDir () +

+Constructs a TQDir pointing to the current directory ("."). +

See also currentDirPath(). + +

TQDir::TQDir ( const TQString & path, const TQString & nameFilter = TQString::null, int sortSpec = Name | IgnoreCase, int filterSpec = All ) +

+Constructs a TQDir with path path, that filters its entries by +name using nameFilter and by attributes using filterSpec. It +also sorts the names using sortSpec. +

The default nameFilter is an empty string, which excludes +nothing; the default filterSpec is All, which also means +exclude nothing. The default sortSpec is Name|IgnoreCase, +i.e. sort by name case-insensitively. +

Example that lists all the files in "/tmp": +

+    TQDir d( "/tmp" );
+    for ( int i = 0; i < d.count(); i++ )
+        printf( "%s\n", d[i] );
+    
+ +

If path is "" or TQString::null, TQDir uses "." (the current +directory). If nameFilter is "" or TQString::null, TQDir uses the +name filter "*" (all files). +

Note that path need not exist. +

See also exists(), setPath(), setNameFilter(), setFilter(), and setSorting(). + +

TQDir::TQDir ( const TQDir & d ) +

+Constructs a TQDir that is a copy of the directory d. +

See also operator=(). + +

TQDir::~TQDir () [virtual] +

+Destroys the TQDir frees up its resources. + +

TQString TQDir::absFilePath ( const TQString & fileName, bool acceptAbsPath = TRUE ) const [virtual] +

+Returns the absolute path name of a file in the directory. Does not check if the file actually exists in the directory. Redundant +multiple separators or "." and ".." directories in fileName +will not be removed (see cleanDirPath()). +

If acceptAbsPath is TRUE a fileName starting with a +separator "/" will be returned without change. If acceptAbsPath +is FALSE an absolute path will be prepended to the fileName and +the resultant string returned. +

See also filePath(). + +

TQString TQDir::absPath () const [virtual] +

+Returns the absolute path (a path that starts with "/" or with a +drive specification), which may contain symbolic links, but never +contains redundant ".", ".." or multiple separators. +

See also setPath(), canonicalPath(), exists(), cleanDirPath(), dirName(), and absFilePath(). + +

Example: fileiconview/qfileiconview.cpp. +

TQString TQDir::canonicalPath () const [virtual] +

+Returns the canonical path, i.e. a path without symbolic links or +redundant "." or ".." elements. +

On systems that do not have symbolic links this function will +always return the same string that absPath() returns. If the +canonical path does not exist (normally due to dangling symbolic +links) canonicalPath() returns TQString::null. +

See also path(), absPath(), exists(), cleanDirPath(), dirName(), absFilePath(), and TQString::isNull(). + +

bool TQDir::cd ( const TQString & dirName, bool acceptAbsPath = TRUE ) [virtual] +

+Changes the TQDir's directory to dirName. +

If acceptAbsPath is TRUE a path starting with separator "/" +will cause the function to change to the absolute directory. If acceptAbsPath is FALSE any number of separators at the beginning +of dirName will be removed and the function will descend into +dirName. +

Returns TRUE if the new directory exists and is readable; +otherwise returns FALSE. Note that the logical cd() operation is +not performed if the new directory does not exist. +

Calling cd( ".." ) is equivalent to calling cdUp(). +

See also cdUp(), isReadable(), exists(), and path(). + +

Example: fileiconview/mainwindow.cpp. +

bool TQDir::cdUp () [virtual] +

+Changes directory by moving one directory up from the TQDir's +current directory. +

Returns TRUE if the new directory exists and is readable; +otherwise returns FALSE. Note that the logical cdUp() operation is +not performed if the new directory does not exist. +

See also cd(), isReadable(), exists(), and path(). + +

TQString TQDir::cleanDirPath ( const TQString & filePath ) [static] +

+Removes all multiple directory separators "/" and resolves any +"."s or ".."s found in the path, filePath. +

Symbolic links are kept. This function does not return the +canonical path, but rather the simplest version of the input. +For example, "./local" becomes "local", "local/../bin" becomes +"bin" and "/local/usr/../bin" becomes "/local/bin". +

See also absPath() and canonicalPath(). + +

TQString TQDir::convertSeparators ( const TQString & pathName ) [static] +

+Returns pathName with the '/' separators converted to +separators that are appropriate for the underlying operating +system. +

On Windows, convertSeparators("c:/winnt/system32") returns +"c:\winnt\system32". +

The returned string may be the same as the argument on some +operating systems, for example on Unix. + +

Examples: dirview/dirview.cpp and fileiconview/qfileiconview.cpp. +

void TQDir::convertToAbs () [virtual] +

+Converts the directory path to an absolute path. If it is already +absolute nothing is done. +

See also isRelative(). + +

uint TQDir::count () const +

+Returns the total number of directories and files that were found. +

Equivalent to entryList().count(). +

See also operator[]() and entryList(). + +

TQDir TQDir::current () [static] +

+Returns the application's current directory. +

Use path() to access a TQDir object's path. +

See also currentDirPath() and TQDir::TQDir(). + +

TQString TQDir::currentDirPath () [static] +

+Returns the absolute path of the application's current directory. +

See also current(). + +

Examples: dirview/dirview.cpp, helpviewer/helpwindow.cpp, and qdir/qdir.cpp. +

TQString TQDir::dirName () const [virtual] +

+Returns the name of the directory; this is not the same as the +path, e.g. a directory with the name "mail", might have the path +"/var/spool/mail". If the directory has no name (e.g. it is the +root directory) TQString::null is returned. +

No check is made to ensure that a directory with this name +actually exists. +

See also path(), absPath(), absFilePath(), exists(), and TQString::isNull(). + +

const TQFileInfoList * TQDir::drives () [static] +

+Returns a list of the root directories on this system. On Windows +this returns a number of TQFileInfo objects containing "C:/", "D:/" +etc. On other operating systems, it returns a list containing just +one root directory (e.g. "/"). +

The returned pointer is owned by TQt. Callers should not delete +or modify it. + +

Example: dirview/main.cpp. +

TQStrList TQDir::encodedEntryList ( int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const [virtual] +

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

This function is included to easy porting from TQt 1.x to TQt 2.0, +it is the same as entryList(), but encodes the filenames as 8-bit +strings using TQFile::encodedName(). +

It is more efficient to use entryList(). + +

TQStrList TQDir::encodedEntryList ( const TQString & nameFilter, int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const [virtual] +

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

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

This function is included to easy porting from TQt 1.x to TQt 2.0, +it is the same as entryList(), but encodes the filenames as 8-bit +strings using TQFile::encodedName(). +

It is more efficient to use entryList(). + +

const TQFileInfoList * TQDir::entryInfoList ( const TQString & nameFilter, int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const [virtual] +

+Returns a list of TQFileInfo objects for all the files and +directories in the directory, ordered in accordance with +setSorting() and filtered in accordance with setFilter() and +setNameFilter(). +

The filter and sorting specifications can be overridden using the +nameFilter, filterSpec and sortSpec arguments. +

Returns 0 if the directory is unreadable or does not exist. +

The returned pointer is a const pointer to a TQFileInfoList. The +list is owned by the TQDir object and will be reused on the next +call to entryInfoList() for the same TQDir instance. If you want to +keep the entries of the list after a subsequent call to this +function you must copy them. +

Note: TQFileInfoList is really a TQPtrList. +

See also entryList(), setNameFilter(), setSorting(), and setFilter(). + +

Examples: dirview/dirview.cpp and fileiconview/qfileiconview.cpp. +

const TQFileInfoList * TQDir::entryInfoList ( int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const [virtual] +

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

Returns a list of TQFileInfo objects for all the files and +directories in the directory, ordered in accordance with +setSorting() and filtered in accordance with setFilter() and +setNameFilter(). +

The filter and sorting specifications can be overridden using the +filterSpec and sortSpec arguments. +

Returns 0 if the directory is unreadable or does not exist. +

The returned pointer is a const pointer to a TQFileInfoList. The +list is owned by the TQDir object and will be reused on the next +call to entryInfoList() for the same TQDir instance. If you want to +keep the entries of the list after a subsequent call to this +function you must copy them. +

Note: TQFileInfoList is really a TQPtrList. +

See also entryList(), setNameFilter(), setSorting(), and setFilter(). + +

TQStringList TQDir::entryList ( const TQString & nameFilter, int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const [virtual] +

+Returns a list of the names of all the files and directories in +the directory, ordered in accordance with setSorting() and +filtered in accordance with setFilter() and setNameFilter(). +

The filter and sorting specifications can be overridden using the +nameFilter, filterSpec and sortSpec arguments. +

Returns an empty list if the directory is unreadable or does not +exist. +

See also entryInfoList(), setNameFilter(), setSorting(), and setFilter(). + +

Example: table/statistics/statistics.cpp. +

TQStringList TQDir::entryList ( int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const [virtual] +

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

Returns a list of the names of all the files and directories in +the directory, ordered in accordance with setSorting() and +filtered in accordance with setFilter() and setNameFilter(). +

The filter and sorting specifications can be overridden using the +filterSpec and sortSpec arguments. +

Returns an empty list if the directory is unreadable or does not +exist. +

See also entryInfoList(), setNameFilter(), setSorting(), and setFilter(). + +

bool TQDir::exists ( const TQString & name, bool acceptAbsPath = TRUE ) [virtual] +

+Checks for the existence of the file name. +

If acceptAbsPath is TRUE a path starting with separator "/" +will check the file with the absolute path. If acceptAbsPath is +FALSE any number of separators at the beginning of name will be +removed and the resultant file name will be checked. +

Returns TRUE if the file exists; otherwise returns FALSE. +

See also TQFileInfo::exists() and TQFile::exists(). + +

bool TQDir::exists () const [virtual] +

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

Returns TRUE if the directory exists; otherwise returns FALSE. +(If a file with the same name is found this function will return +FALSE). +

See also TQFileInfo::exists() and TQFile::exists(). + +

TQString TQDir::filePath ( const TQString & fileName, bool acceptAbsPath = TRUE ) const [virtual] +

+Returns the path name of a file in the directory. Does not +check if the file actually exists in the directory. If the TQDir is +relative the returned path name will also be relative. Redundant +multiple separators or "." and ".." directories in fileName +will not be removed (see cleanDirPath()). +

If acceptAbsPath is TRUE a fileName starting with a +separator "/" will be returned without change. If acceptAbsPath +is FALSE an absolute path will be prepended to the fileName and +the resultant string returned. +

See also absFilePath(), isRelative(), and canonicalPath(). + +

FilterSpec TQDir::filter () const +

+ +

Returns the value set by setFilter() + +

TQDir TQDir::home () [static] +

+Returns the home directory. +

Under Windows the HOME environment variable is used. If this +does not exist the USERPROFILE environment variable is used. If +that does not exist the path is formed by concatenating the HOMEDRIVE and HOMEPATH environment variables. If they don't +exist the rootDirPath() is used (this uses the SystemDrive +environment variable). If none of these exist "C:\" is used. +

Under non-Windows operating systems the HOME environment +variable is used if it exists, otherwise rootDirPath() is used. +

See also homeDirPath(). + +

TQString TQDir::homeDirPath () [static] +

+ +

Returns the absolute path of the user's home directory. +

See also home(). + +

bool TQDir::isReadable () const [virtual] +

+Returns TRUE if the directory is readable and we can open files +by name; otherwise returns FALSE. +

Warning: A FALSE value from this function is not a guarantee that +files in the directory are not accessible. +

See also TQFileInfo::isReadable(). + +

Examples: dirview/dirview.cpp and fileiconview/qfileiconview.cpp. +

bool TQDir::isRelative () const [virtual] +

+Returns TRUE if the directory path is relative to the current +directory and returns FALSE if the path is absolute (e.g. under +UNIX a path is relative if it does not start with a "/"). +

See also convertToAbs(). + +

bool TQDir::isRelativePath ( const TQString & path ) [static] +

+Returns TRUE if path is relative; returns FALSE if it is +absolute. +

See also isRelative(). + +

bool TQDir::isRoot () const [virtual] +

+Returns TRUE if the directory is the root directory; otherwise +returns FALSE. +

Note: If the directory is a symbolic link to the root directory +this function returns FALSE. If you want to test for this use +canonicalPath(), e.g. +

+    TQDir d( "/tmp/root_link" );
+    d = d.canonicalPath();
+    if ( d.isRoot() )
+        qWarning( "It is a root link" );
+    
+ +

See also root() and rootDirPath(). + +

bool TQDir::match ( const TQString & filter, const TQString & fileName ) [static] +

+Returns TRUE if the fileName matches the wildcard (glob) +pattern filter; otherwise returns FALSE. The filter may +contain multiple patterns separated by spaces or semicolons. +

(See TQRegExp wildcard + matching.) +

See also TQRegExp::match(). + +

bool TQDir::match ( const TQStringList & filters, const TQString & fileName ) [static] +

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

Returns TRUE if the fileName matches any of the wildcard (glob) +patterns in the list of filters; otherwise returns FALSE. +

(See TQRegExp wildcard + matching.) +

See also TQRegExp::match(). + +

bool TQDir::matchAllDirs () const +

+ +

Returns the value set by setMatchAllDirs() +

See also setMatchAllDirs(). + +

bool TQDir::mkdir ( const TQString & dirName, bool acceptAbsPath = TRUE ) const [virtual] +

+Creates a directory. +

If acceptAbsPath is TRUE a path starting with a separator ('/') +will create the absolute directory; if acceptAbsPath is FALSE +any number of separators at the beginning of dirName will be +removed. +

Returns TRUE if successful; otherwise returns FALSE. +

See also rmdir(). + +

TQString TQDir::nameFilter () const +

+ +

Returns the string set by setNameFilter() + +

bool TQDir::operator!= ( const TQDir & d ) const [virtual] +

+ +

Returns TRUE if directory d and this directory have different +paths or different sort or filter settings; otherwise returns +FALSE. +

Example: +

+    // The current directory is "/usr/local"
+    TQDir d1( "/usr/local/bin" );
+    TQDir d2( "bin" );
+    if ( d1 != d2 )
+        qDebug( "They differ" );
+    
+ + +

TQDir & TQDir::operator= ( const TQDir & d ) +

+Makes a copy of TQDir d and assigns it to this TQDir. + +

TQDir & TQDir::operator= ( const TQString & path ) +

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

Sets the directory path to be the given path. + +

bool TQDir::operator== ( const TQDir & d ) const [virtual] +

+Returns TRUE if directory d and this directory have the same +path and their sort and filter settings are the same; otherwise +returns FALSE. +

Example: +

+    // The current directory is "/usr/local"
+    TQDir d1( "/usr/local/bin" );
+    TQDir d2( "bin" );
+    d2.convertToAbs();
+    if ( d1 == d2 )
+        qDebug( "They're the same" );
+    
+ + +

TQString TQDir::operator[] ( int index ) const +

+Returns the file name at position index in the list of file +names. Equivalent to entryList().at(index). +

Returns a TQString::null if the index is out of range or if the +entryList() function failed. +

See also count() and entryList(). + +

TQString TQDir::path () const [virtual] +

+ +

Returns the path, this may contain symbolic links, but never +contains redundant ".", ".." or multiple separators. +

The returned path can be either absolute or relative (see +setPath()). +

See also setPath(), absPath(), exists(), cleanDirPath(), dirName(), absFilePath(), and convertSeparators(). + +

void TQDir::refresh () const +

+Refreshes the directory information. + +

bool TQDir::remove ( const TQString & fileName, bool acceptAbsPath = TRUE ) [virtual] +

+Removes the file, fileName. +

If acceptAbsPath is TRUE a path starting with separator "/" +will remove the file with the absolute path. If acceptAbsPath +is FALSE any number of separators at the beginning of fileName +will be removed and the resultant file name will be removed. +

Returns TRUE if the file is removed successfully; otherwise +returns FALSE. + +

bool TQDir::rename ( const TQString & oldName, const TQString & newName, bool acceptAbsPaths = TRUE ) [virtual] +

+Renames a file or directory. +

If acceptAbsPaths is TRUE a path starting with a separator +('/') will rename the file with the absolute path; if acceptAbsPaths is FALSE any number of separators at the beginning +of the names will be removed. +

Returns TRUE if successful; otherwise returns FALSE. +

On most file systems, rename() fails only if oldName does not +exist or if newName and oldName are not on the same +partition. On Windows, rename() will fail if newName already +exists. However, there are also other reasons why rename() can +fail. For example, on at least one file system rename() fails if +newName points to an open file. + +

Example: fileiconview/qfileiconview.cpp. +

bool TQDir::rmdir ( const TQString & dirName, bool acceptAbsPath = TRUE ) const [virtual] +

+Removes a directory. +

If acceptAbsPath is TRUE a path starting with a separator ('/') +will remove the absolute directory; if acceptAbsPath is FALSE +any number of separators at the beginning of dirName will be +removed. +

The directory must be empty for rmdir() to succeed. +

Returns TRUE if successful; otherwise returns FALSE. +

See also mkdir(). + +

TQDir TQDir::root () [static] +

+Returns the root directory. +

See also rootDirPath() and drives(). + +

TQString TQDir::rootDirPath () [static] +

+Returns the absolute path for the root directory. +

For UNIX operating systems this returns "/". For Windows file +systems this normally returns "c:/". +

See also root() and drives(). + +

char TQDir::separator () [static] +

+Returns the native directory separator; "/" under UNIX (including +Mac OS X) and "\" under Windows. +

You do not need to use this function to build file paths. If you +always use "/", TQt will translate your paths to conform to the +underlying operating system. + +

bool TQDir::setCurrent ( const TQString & path ) [static] +

+Sets the application's current working directory to path. +Returns TRUE if the directory was successfully changed; otherwise +returns FALSE. + +

void TQDir::setFilter ( int filterSpec ) [virtual] +

+Sets the filter used by entryList() and entryInfoList() to filterSpec. The filter is used to specify the kind of files that +should be returned by entryList() and entryInfoList(). See +TQDir::FilterSpec. +

See also filter() and setNameFilter(). + +

void TQDir::setMatchAllDirs ( bool enable ) [virtual] +

+If enable is TRUE then all directories are included (e.g. in +entryList()), and the nameFilter() is only applied to the files. +If enable is FALSE then the nameFilter() is applied to both +directories and files. +

See also matchAllDirs(). + +

void TQDir::setNameFilter ( const TQString & nameFilter ) [virtual] +

+Sets the name filter used by entryList() and entryInfoList() to nameFilter. +

The nameFilter is a wildcard (globbing) filter that understands +"*" and "?" wildcards. (See TQRegExp wildcard matching.) You may specify several filter +entries all separated by a single space " " or by a semi-colon +";". +

For example, if you want entryList() and entryInfoList() to list +all files ending with either ".cpp" or ".h", you would use either +dir.setNameFilter("*.cpp *.h") or dir.setNameFilter("*.cpp;*.h"). +

See also nameFilter() and setFilter(). + +

void TQDir::setPath ( const TQString & path ) [virtual] +

+Sets the path of the directory to path. The path is cleaned of +redundant ".", ".." and of multiple separators. No check is made +to ensure that a directory with this path exists. +

The path can be either absolute or relative. Absolute paths begin +with the directory separator "/" (optionally preceded by a drive +specification under Windows). Relative file names begin with a +directory name or a file name and specify a path relative to the +current directory. An example of an absolute path is the string +"/tmp/quartz", a relative path might look like "src/fatlib". +

See also path(), absPath(), exists(), cleanDirPath(), dirName(), absFilePath(), isRelative(), and convertToAbs(). + +

void TQDir::setSorting ( int sortSpec ) [virtual] +

+Sets the sort order used by entryList() and entryInfoList(). +

The sortSpec is specified by OR-ing values from the enum +TQDir::SortSpec. +

See also sorting() and SortSpec. + +

SortSpec TQDir::sorting () const +

+ +

Returns the value set by setSorting() +

See also setSorting() and SortSpec. + + +


+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/qdirectpainter-members.html b/doc/html/qdirectpainter-members.html new file mode 100644 index 00000000..b21da115 --- /dev/null +++ b/doc/html/qdirectpainter-members.html @@ -0,0 +1,141 @@ + + + + + +TQDirectPainter Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDirectPainter

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdirectpainter.html b/doc/html/qdirectpainter.html new file mode 100644 index 00000000..e5689008 --- /dev/null +++ b/doc/html/qdirectpainter.html @@ -0,0 +1,201 @@ + + + + + +TQDirectPainter Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDirectPainter Class Reference

+ +

The TQDirectPainter class provides direct access to the video hardware. +More... +

#include <qdirectpainter_qws.h> +

Inherits TQPainter. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQDirectPainter class provides direct access to the video hardware. +

+

Only available in TQt/Embedded. +

When the hardware is known and well defined, as is often the case +with software for embedded devices, it may be useful to manipulate +the underlying video hardware directly. In order to do this in a +way that is co-operative with other applications, you must lock +the video hardware for exclusive use for a small time while you +write to it, and you must know the clipping region which is +allocated to a widget. +

TQDirectPainter provides this functionality. +

In the simplest case, you make a TQDirectPainter on a widget and +then, observing the clip region, perform some platform-specific +operation. For example: +

+        void MyWidget::updatePlatformGraphics()
+        {
+            TQDirectPainter dp( this );
+            for ( int i = 0; i < dp.numRects; i++ ) {
+                const TQRect& clip = dp.rect(i);
+                ... // platform specific operation
+            }
+        }
+    
+ +

The platform-specific code has access to the display, but should +only modify graphics in the rectangles specified by numRects() and +rect(). Note that these rectangles are relative to the entire +display. +

The offset() function returns the position of the widget relative +to the entire display, allowing you to offset platform-specific +operations appropriately. The xOffset() and yOffset() functions +merely return the component values of offset(). +

For simple frame-buffer hardware, the frameBuffer(), lineStep(), +and depth() functions provide basic access, though some hardware +configurations are insufficiently specified by such simple +parameters. +

Note that while a TQDirectPainter exists, the entire TQt/Embedded +window system is locked from use by other applications. Always +construct the TQDirectPainter as an auto (stack) variable, and be +very careful to write robust and stable code within its scope. +

See also Graphics Classes. + +


Member Function Documentation

+

TQDirectPainter::TQDirectPainter ( const TQWidget * w ) +

+Construct a direct painter on w. The display is locked and the +mouse cursor is hidden if it is above w. + +

TQDirectPainter::~TQDirectPainter () +

+Destroys the direct painter. The mouse cursor is revealed if +necessary and the display is unlocked. + +

int TQDirectPainter::depth () const +

+Returns the bit-depth of the display. + +

uchar * TQDirectPainter::frameBuffer () +

+Returns a pointer to the framebuffer memory if available. + +

int TQDirectPainter::height () const +

+Returns the height of the widget drawn upon. + +

int TQDirectPainter::lineStep () +

+Returns the spacing in bytes from one framebuffer line to the +next. + +

int TQDirectPainter::numRects () const +

+Returns the number of rectangles in the drawable region. +

See also rect() and region(). + +

TQPoint TQDirectPainter::offset () const +

+Returns the position of the widget relative to the entire display. + +

const TQRect & TQDirectPainter::rect ( int i ) const +

+Returns a reference to rectangle i of the drawable region. +Valid values for i are 0..numRects()-1. +

See also region(). + +

TQRegion TQDirectPainter::region () const +

+Returns the region of the framebuffer which represents the exposed +area of the widget being painted on. Note that this may be a sub-area of +the clip region, because of child widgets and overlapping cousin widgets. +

See also numRects() and rect(). + +

void TQDirectPainter::setAreaChanged ( const TQRect & r ) +

+Sets the area changed by the transaction to r. By default, the +entire widget is assumed to have changed. The area changed is only +used by some graphics drivers, so often calling this function for +a smaller area will make no difference to performance. + +

TQSize TQDirectPainter::size () const +

+Returns the size of the widget drawn upon. +

See also width() and height(). + +

int TQDirectPainter::transformOrientation () +

+Returns a number that signifies the orientation of the +framebuffer. +
+
0 no rotation +
1 90 degrees rotation +
2 180 degrees rotation +
3 270 degrees rotation +
+ +

int TQDirectPainter::width () const +

+Returns the width of the widget drawn upon. + +

int TQDirectPainter::xOffset () const +

+Returns the X-position of the widget relative to the entire +display. + +

int TQDirectPainter::yOffset () const +

+Returns the Y-position of the widget relative to the entire +display. + + +

+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/qdirectpainter_qws-h.html b/doc/html/qdirectpainter_qws-h.html new file mode 100644 index 00000000..dde44f48 --- /dev/null +++ b/doc/html/qdirectpainter_qws-h.html @@ -0,0 +1,125 @@ + + + + + +qdirectpainter_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdirectpainter_qws.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdirectpainter_qws.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQDirectPainter class
+**
+** Created : 010101
+**
+** Copyright (C) 2000-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQDIRECTPAINTER_QWS_H
+#define TQDIRECTPAINTER_QWS_H
+
+#ifndef QT_H
+#include "qpainter.h"
+#endif // QT_H
+
+#ifdef Q_WS_QWS
+#ifndef QT_NO_DIRECTPAINTER
+class Q_EXPORT TQDirectPainter : public TQPainter {
+public:
+    TQDirectPainter( const TQWidget* );
+    ~TQDirectPainter();
+
+    uchar* frameBuffer();
+    int lineStep();
+    int transformOrientation();
+
+    int numRects() const;
+    const TQRect& rect(int i) const;
+    TQRegion region() const;
+
+    int depth() const;
+    int width() const;
+    int height() const;
+    int xOffset() const;
+    int yOffset() const;
+
+    TQPoint offset() const;
+    TQSize size() const;
+
+    void setAreaChanged( const TQRect& );
+
+private:
+    class Private;
+    Private* d;
+};
+
+#endif
+#endif
+
+#endif // TQDIRECTPAINTER_QWS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdns-h.html b/doc/html/qdns-h.html new file mode 100644 index 00000000..8f57d2bd --- /dev/null +++ b/doc/html/qdns-h.html @@ -0,0 +1,215 @@ + + + + + +qdns.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdns.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdns.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQDns class.
+**
+** Created : 991122
+**
+** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the network 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 retquirements 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 TQDNS_H
+#define TQDNS_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qhostaddress.h"
+#include "qsocketnotifier.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_NETWORK ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_NETWORK )
+#define TQM_EXPORT_DNS
+#else
+#define TQM_EXPORT_DNS Q_EXPORT
+#endif
+
+#ifndef QT_NO_DNS
+
+//#define Q_DNS_SYNCHRONOUS
+
+class TQDnsPrivate;
+
+class TQM_EXPORT_DNS TQDns: public TQObject {
+    Q_OBJECT
+public:
+    enum RecordType {
+	None,
+	A, Aaaa,
+	Mx, Srv,
+	Cname,
+	Ptr,
+	Txt
+    };
+
+    TQDns();
+    TQDns( const TQString & label, RecordType rr = A );
+    TQDns( const TQHostAddress & address, RecordType rr = Ptr );
+    virtual ~TQDns();
+
+    // to set/change the query
+    virtual void setLabel( const TQString & label );
+    virtual void setLabel( const TQHostAddress & address );
+    TQString label() const { return l; }
+
+    virtual void setRecordType( RecordType rr = A );
+    RecordType recordType() const { return t; }
+
+    // whether something is happening behind the scenes
+    bool isWorking() const;
+
+    // to query for replies
+    TQValueList<TQHostAddress> addresses() const;
+
+    class TQM_EXPORT_DNS MailServer {
+    public:
+	MailServer( const TQString & n=TQString::null, Q_UINT16 p=0 )
+	    :name(n), priority(p) {}
+	TQString name;
+	Q_UINT16 priority;
+	Q_DUMMY_COMPARISON_OPERATOR(MailServer)
+    };
+    TQValueList<MailServer> mailServers() const;
+
+    class TQM_EXPORT_DNS Server {
+    public:
+	Server(const TQString & n=TQString::null, Q_UINT16 p=0, Q_UINT16 w=0, Q_UINT16 po=0 )
+	    : name(n), priority(p), weight(w), port(po) {}
+	TQString name;
+	Q_UINT16 priority;
+	Q_UINT16 weight;
+	Q_UINT16 port;
+	Q_DUMMY_COMPARISON_OPERATOR(Server)
+    };
+    TQValueList<Server> servers() const;
+
+    TQStringList hostNames() const;
+
+    TQStringList texts() const;
+
+    TQString canonicalName() const; // ### real-world but uncommon: TQStringList
+
+    TQStringList qualifiedNames() const { return n; }
+
+#if defined(Q_DNS_SYNCHRONOUS)
+protected:
+    void connectNotify( const char *signal );
+#endif
+
+signals:
+    void resultsReady();
+
+private slots:
+    void startQuery();
+
+private:
+    static void doResInit();
+    void setStartQueryTimer();
+    static TQString toInAddrArpaDomain( const TQHostAddress &address );
+#if defined(Q_DNS_SYNCHRONOUS)
+    void doSynchronousLookup();
+#endif
+
+    TQString l;
+    TQStringList n;
+    RecordType t;
+    TQDnsPrivate * d;
+
+    friend class TQDnsAnswer;
+    friend class TQDnsManager;
+};
+
+
+// TQDnsSocket are sockets that are used for DNS lookup
+
+class TQDnsSocket: public TQObject {
+    Q_OBJECT
+    // note: Private not public.  This class contains NO public API.
+protected:
+    TQDnsSocket( TQObject *, const char * );
+    virtual ~TQDnsSocket();
+
+private slots:
+    virtual void cleanCache();
+    virtual void retransmit();
+    virtual void answer();
+};
+
+#endif // QT_NO_DNS
+
+#endif // TQDNS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdns-members.html b/doc/html/qdns-members.html new file mode 100644 index 00000000..f7e1134b --- /dev/null +++ b/doc/html/qdns-members.html @@ -0,0 +1,103 @@ + + + + + +TQDns Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDns

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdns.html b/doc/html/qdns.html new file mode 100644 index 00000000..3383fd77 --- /dev/null +++ b/doc/html/qdns.html @@ -0,0 +1,334 @@ + + + + + +TQDns Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDns Class Reference
[network module]

+ +

The TQDns class provides asynchronous DNS lookups. +More... +

#include <qdns.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Signals

+ +

Detailed Description

+ + +The TQDns class provides asynchronous DNS lookups. + +

+ +

Both Windows and Unix provide synchronous DNS lookups; Windows +provides some asynchronous support too. At the time of writing +neither operating system provides asynchronous support for +anything other than hostname-to-address mapping. +

TQDns rectifies this shortcoming, by providing asynchronous caching +lookups for the record types that we expect modern GUI +applications to need in the near future. +

The class is not straightforward to use (although it is much +simpler than the native APIs); TQSocket provides much easier to use +TCP connection facilities. The aim of TQDns is to provide a correct +and small API to the DNS and nothing more. (We use "correctness" +to mean that the DNS information is correctly cached, and +correctly timed out.) +

The API comprises a constructor, functions to set the DNS node +(the domain in DNS terminology) and record type (setLabel() and +setRecordType()), the corresponding get functions, an isWorking() +function to determine whether TQDns is working or reading, a +resultsReady() signal and query functions for the result. +

There is one query function for each RecordType, namely +addresses(), mailServers(), servers(), hostNames() and texts(). +There are also two generic query functions: canonicalName() +returns the name you'll presumably end up using (the exact meaning +of this depends on the record type) and qualifiedNames() returns a +list of the fully qualified names label() maps to. +

See also TQSocket and Input/Output and Networking. + +


Member Type Documentation

+

TQDns::RecordType

+ +

This enum type defines the record types TQDns can handle. The DNS +provides many more; these are the ones we've judged to be in +current use, useful for GUI programs and important enough to +support right away: +

    +
  • TQDns::None - No information. This exists only so that TQDns can +have a default. +
  • TQDns::A - IPv4 addresses. By far the most common type. +
  • TQDns::Aaaa - IPv6 addresses. So far mostly unused. +
  • TQDns::Mx - Mail eXchanger names. Used for mail delivery. +
  • TQDns::Srv - SeRVer names. Generic record type for finding +servers. So far mostly unused. +
  • TQDns::Cname - Canonical names. Maps from nicknames to the true +name (the canonical name) for a host. +
  • TQDns::Ptr - name PoinTeRs. Maps from IPv4 or IPv6 addresses to hostnames. +
  • TQDns::Txt - arbitrary TeXT for domains. +

We expect that some support for the +RFC-2535 +extensions will be added in future versions. + +


Member Function Documentation

+

TQDns::TQDns () +

+Constructs a DNS query object with invalid settings for both the +label and the search type. + +

TQDns::TQDns ( const TQString & label, RecordType rr = A ) +

+Constructs a DNS query object that will return record type rr +information about label. +

The DNS lookup is started the next time the application enters the +event loop. When the result is found the signal resultsReady() is +emitted. +

rr defaults to A, IPv4 addresses. + +

TQDns::TQDns ( const TQHostAddress & address, RecordType rr = Ptr ) +

+Constructs a DNS query object that will return record type rr +information about host address address. The label is set to the +IN-ADDR.ARPA domain name. This is useful in combination with the +Ptr record type (e.g. if you want to look up a hostname for a +given address). +

The DNS lookup is started the next time the application enters the +event loop. When the result is found the signal resultsReady() is +emitted. +

rr defaults to Ptr, that maps addresses to hostnames. + +

TQDns::~TQDns () [virtual] +

+Destroys the DNS query object and frees its allocated resources. + +

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 +is available; otherwise returns an empty list. +

As a special case, if label() is a valid numeric IP address, this +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() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

+

TQString TQDns::canonicalName () const +

+Returns the canonical name for this DNS node. (This works +regardless of what recordType() is set to.) +

If the canonical name isn't known, this function returns a null +string. +

The canonical name of a DNS node is its full name, or the full +name of the target of its CNAME. For example, if l.trolltech.com +is a CNAME to lillian.troll.no, and the search path for TQDns is +"trolltech.com", then the canonical name for all of "lillian", +"l", "lillian.troll.no." and "l.trolltech.com" is +"lillian.troll.no.". + +

TQStringList TQDns::hostNames () const +

+Returns a list of host names if the record type is Ptr. +

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

+    TQStringList list = myDns.hostNames();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

+

bool TQDns::isWorking () const +

+Returns TRUE if TQDns is doing a lookup for this object (i.e. if it +does not already have the necessary information); otherwise +returns FALSE. +

TQDns emits the resultsReady() signal when the status changes to FALSE. + +

Example: network/mail/smtp.cpp. +

TQString TQDns::label () const +

+ +

Returns the domain name for which this object returns information. +

See also setLabel(). + +

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: +
    +
  • TQString TQDns::MailServer::name +
  • Q_UINT16 TQDns::MailServer::priority +
+

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() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

+

Example: network/mail/smtp.cpp. +

TQStringList TQDns::qualifiedNames () const +

+ +

Returns a list of the fully qualified names label() maps to. +

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

+    TQStringList list = myDns.qualifiedNames();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

+

RecordType TQDns::recordType () const +

+ +

Returns the record type of this DNS query object. +

See also setRecordType() and RecordType. + +

void TQDns::resultsReady () [signal] +

+ +

This signal is emitted when results are available for one of the +qualifiedNames(). + +

Example: network/mail/smtp.cpp. +

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: +
    +
  • TQString TQDns::Server::name +
  • Q_UINT16 TQDns::Server::priority +
  • Q_UINT16 TQDns::Server::weight +
  • Q_UINT16 TQDns::Server::port +
+

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() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ + +

void TQDns::setLabel ( const TQString & label ) [virtual] +

+Sets this DNS query object to query for information about label. +

This does not change the recordType(), but its isWorking() status +will probably change as a result. +

The DNS lookup is started the next time the application enters the +event loop. When the result is found the signal resultsReady() is +emitted. + +

void TQDns::setLabel ( const TQHostAddress & address ) [virtual] +

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

Sets this DNS query object to query for information about the host +address address. The label is set to the IN-ADDR.ARPA domain +name. This is useful in combination with the Ptr record type +(e.g. if you want to look up a hostname for a given address). + +

void TQDns::setRecordType ( RecordType rr = A ) [virtual] +

+Sets this object to query for record type rr records. +

The DNS lookup is started the next time the application enters the +event loop. When the result is found the signal resultsReady() is +emitted. +

See also RecordType. + +

TQStringList TQDns::texts () const +

+Returns a list of texts if the record type is Txt. +

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

+    TQStringList list = myDns.texts();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ + + +

+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/qdockarea-h.html b/doc/html/qdockarea-h.html new file mode 100644 index 00000000..1beab2a5 --- /dev/null +++ b/doc/html/qdockarea-h.html @@ -0,0 +1,236 @@ + + + + + +qdockarea.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdockarea.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdockarea.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of the TQDockArea class
+**
+** Created : 001010
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the workspace 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 retquirements 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 TQDOCKAREA_H
+#define TQDOCKAREA_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qptrlist.h"
+#include "qdockwindow.h"
+#include "qlayout.h"
+#include "qvaluelist.h"
+#include "qguardedptr.h"
+#include "qtextstream.h"
+#endif // QT_H
+
+#ifndef QT_NO_MAINWINDOW
+
+class TQSplitter;
+class TQBoxLayout;
+class TQDockAreaLayout;
+class TQMouseEvent;
+class TQDockWindowResizeHandle;
+class TQDockAreaPrivate;
+
+class Q_EXPORT TQDockAreaLayout : public TQLayout
+{
+    Q_OBJECT
+    friend class TQDockArea;
+
+public:
+    TQDockAreaLayout( TQWidget* parent, TQt::Orientation o, TQPtrList<TQDockWindow> *wl, int space = -1, int margin = -1, const char *name = 0 )
+	: TQLayout( parent, space, margin, name ), orient( o ), dockWindows( wl ), parentWidget( parent ) { init(); }
+    ~TQDockAreaLayout() {}
+
+    void addItem( TQLayoutItem * ) {}
+    bool hasHeightForWidth() const;
+    int heightForWidth( int ) const;
+    int widthForHeight( int ) const;
+    TQSize sizeHint() const;
+    TQSize minimumSize() const;
+    TQLayoutIterator iterator();
+    TQSizePolicy::ExpandData expanding() const { return TQSizePolicy::NoDirection; }
+    void invalidate();
+    TQt::Orientation orientation() const { return orient; }
+    TQValueList<TQRect> lineList() const { return lines; }
+    TQPtrList<TQDockWindow> lineStarts() const { return ls; }
+
+protected:
+    void setGeometry( const TQRect& );
+
+private:
+    void init();
+    int layoutItems( const TQRect&, bool testonly = FALSE );
+    TQt::Orientation orient;
+    bool dirty;
+    int cached_width, cached_height;
+    int cached_hfw, cached_wfh;
+    TQPtrList<TQDockWindow> *dockWindows;
+    TQWidget *parentWidget;
+    TQValueList<TQRect> lines;
+    TQPtrList<TQDockWindow> ls;
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQDockAreaLayout( const TQDockAreaLayout & );
+    TQDockAreaLayout &operator=( const TQDockAreaLayout & );
+#endif
+};
+
+class Q_EXPORT TQDockArea : public TQWidget
+{
+    Q_OBJECT
+    Q_ENUMS( HandlePosition )
+    Q_PROPERTY( Orientation orientation READ orientation )
+    Q_PROPERTY( int count READ count )
+    Q_PROPERTY( bool empty READ isEmpty )
+    Q_PROPERTY( HandlePosition handlePosition READ handlePosition )
+
+    friend class TQDockWindow;
+    friend class TQDockWindowResizeHandle;
+    friend class TQDockAreaLayout;
+
+public:
+    enum HandlePosition { Normal, Reverse };
+
+    TQDockArea( Orientation o, HandlePosition h = Normal, TQWidget* parent=0, const char* name=0 );
+    ~TQDockArea();
+
+    void moveDockWindow( TQDockWindow *w, const TQPoint &globalPos, const TQRect &rect, bool swap );
+    void removeDockWindow( TQDockWindow *w, bool makeFloating, bool swap, bool fixNewLines = TRUE );
+    void moveDockWindow( TQDockWindow *w, int index = -1 );
+    bool hasDockWindow( TQDockWindow *w, int *index = 0 );
+
+    void invalidNextOffset( TQDockWindow *dw );
+
+    Orientation orientation() const { return orient; }
+    HandlePosition handlePosition() const { return hPos; }
+
+    bool eventFilter( TQObject *, TQEvent * );
+    bool isEmpty() const;
+    int count() const;
+    TQPtrList<TQDockWindow> dockWindowList() const;
+
+    bool isDockWindowAccepted( TQDockWindow *dw );
+    void setAcceptDockWindow( TQDockWindow *dw, bool accept );
+
+public slots:
+    void lineUp( bool keepNewLines );
+
+private:
+    struct DockWindowData
+    {
+	int index;
+	int offset;
+	int line;
+	TQSize fixedExtent;
+	TQGuardedPtr<TQDockArea> area;
+    };
+
+    int findDockWindow( TQDockWindow *w );
+    int lineOf( int index );
+    DockWindowData *dockWindowData( TQDockWindow *w );
+    void dockWindow( TQDockWindow *dockWindow, DockWindowData *data );
+    void updateLayout();
+    void invalidateFixedSizes();
+    int maxSpace( int hint, TQDockWindow *dw );
+    void setFixedExtent( int d, TQDockWindow *dw );
+    bool isLastDockWindow( TQDockWindow *dw );
+
+private:
+    Orientation orient;
+    TQPtrList<TQDockWindow> *dockWindows;
+    TQDockAreaLayout *layout;
+    HandlePosition hPos;
+    TQPtrList<TQDockWindow> forbiddenWidgets;
+    TQDockAreaPrivate *d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQDockArea( const TQDockArea & );
+    TQDockArea& operator=( const TQDockArea & );
+#endif
+
+};
+
+#ifndef QT_NO_TEXTSTREAM
+Q_EXPORT TQTextStream &operator<<( TQTextStream &, const TQDockArea & );
+Q_EXPORT TQTextStream &operator>>( TQTextStream &, TQDockArea & );
+#endif
+
+#define Q_DEFINED_QDOCKAREA
+#include "qwinexport.h"
+#endif
+
+#endif //QT_NO_MAINWINDOW
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdockarea-members.html b/doc/html/qdockarea-members.html new file mode 100644 index 00000000..310fb607 --- /dev/null +++ b/doc/html/qdockarea-members.html @@ -0,0 +1,349 @@ + + + + + +TQDockArea Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDockArea

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdockarea.html b/doc/html/qdockarea.html new file mode 100644 index 00000000..c27333f2 --- /dev/null +++ b/doc/html/qdockarea.html @@ -0,0 +1,278 @@ + + + + + +TQDockArea Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDockArea Class Reference

+ +

The TQDockArea class manages and lays out TQDockWindows. +More... +

#include <qdockarea.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+ +

Public Slots

+
    +
  • void lineUp ( bool keepNewLines )
  • +
+

Properties

+
    +
  • int count - the number of dock windows in the dock area  (read only)
  • +
  • bool empty - whether the dock area is empty  (read only)
  • +
  • HandlePosition handlePosition - where the dock window splitter handle is placed in the dock area  (read only)
  • +
  • Orientation orientation - the dock area's orientation  (read only)
  • +
+

Related Functions

+
    +
  • TQTextStream & operator<< ( TQTextStream & ts, const TQDockArea & dockArea )
  • +
  • TQTextStream & operator>> ( TQTextStream & ts, TQDockArea & dockArea )
  • +
+

Detailed Description

+ + +The TQDockArea class manages and lays out TQDockWindows. +

+

A TQDockArea is a container which manages a list of +TQDockWindows which it lays out within its area. In cooperation +with the TQDockWindows it is responsible for the docking and +undocking of TQDockWindows and moving them inside the dock +area. TQDockAreas also handle the wrapping of TQDockWindows to +fill the available space as compactly as possible. TQDockAreas can +contain TQToolBars since TQToolBar is a TQDockWindow subclass. +

TQMainWindow contains four TQDockAreas which you can use for your +TQToolBars and TQDockWindows, so in most situations you do not need +to use the TQDockArea class directly. Although TQMainWindow contains +support for its own dock areas it isn't convenient for adding new +TQDockAreas. If you need to create your own dock areas we suggest +that you create a subclass of TQWidget and add your TQDockAreas to +your subclass. +

TQMainWindow's TQDockAreas
+

+Lines. TQDockArea uses the concept of lines. A line is a +horizontal region which may contain dock windows side-by-side. A +dock area may have room for more than one line. When dock windows +are docked into a dock area they are usually added at the right +hand side of the top-most line that has room (unless manually +placed by the user). When users move dock windows they may leave +empty lines or gaps in non-empty lines. Dock windows can be lined +up to minimize wasted space using the lineUp() function. +

The TQDockArea class maintains a position list of all its child +dock windows. Dock windows are added to a dock area from position +0 onwards. Dock windows are laid out sequentially in position +order from left to right, and in the case of multiple lines of +dock windows, from top to bottom. If a dock window is floated it +still retains its position since this is where the window will +return if the user double clicks its caption. A dock window's +position can be determined with hasDockWindow(). The position can +be changed with moveDockWindow(). +

To dock or undock a dock window use TQDockWindow::dock() and +TQDockWindow::undock() respectively. If you want to control which +dock windows can dock in a dock area use setAcceptDockWindow(). To +see if a dock area contains a particular dock window use +hasDockWindow(); to see how many dock windows a dock area +contains use count(). +

The streaming operators can write the positions of the dock +windows in the dock area to a TQTextStream. The positions can be +read back later to restore the saved positions. +

Save the positions to a TQTextStream: +

+    ts << *myDockArea;
+    
+ +

Restore the positions from a TQTextStream: +

+    ts >> *myDockArea;
+    
+ +

See also Main Window and Related Classes. + +


Member Type Documentation

+

TQDockArea::HandlePosition

+ +

A dock window has two kinds of handles, the dock window handle +used for dragging the dock window, and the splitter handle used to +resize the dock window in relation to other dock windows using a +splitter. (The splitter handle is only visible for docked +windows.) +

This enum specifies where the dock window splitter handle is +placed in the dock area. +

    +
  • TQDockArea::Normal - The splitter handles of dock windows are placed at +the right or bottom. +
  • TQDockArea::Reverse - The splitter handles of dock windows are placed at +the left or top. +
+

Member Function Documentation

+

TQDockArea::TQDockArea ( Orientation o, HandlePosition h = Normal, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a TQDockArea with orientation o, HandlePosition h, +parent parent and called name. + +

TQDockArea::~TQDockArea () +

+Destroys the dock area and all the dock windows docked in the dock +area. +

Does not affect any floating dock windows or dock windows in other +dock areas, even if they first appeared in this dock area. +Floating dock windows are effectively top level windows and are +not child windows of the dock area. When a floating dock window is +docked (dragged into a dock area) its parent becomes the dock +area. + +

int TQDockArea::count () const +

Returns the number of dock windows in the dock area. +See the "count" property for details. +

TQPtrList<TQDockWindow> TQDockArea::dockWindowList () const +

+Returns a list of the dock windows in the dock area. + +

HandlePosition TQDockArea::handlePosition () const +

Returns where the dock window splitter handle is placed in the dock area. +See the "handlePosition" property for details. +

bool TQDockArea::hasDockWindow ( TQDockWindow * w, int * index = 0 ) +

+Returns TRUE if the dock area contains the dock window w; +otherwise returns FALSE. If index is not 0 it will be set as +follows: if the dock area contains the dock window *index is +set to w's index position; otherwise *index is set to -1. + +

bool TQDockArea::isDockWindowAccepted ( TQDockWindow * dw ) +

+Returns TRUE if dock window dw could be docked into the dock +area; otherwise returns FALSE. +

See also setAcceptDockWindow(). + +

bool TQDockArea::isEmpty () const +

Returns TRUE if the dock area is empty; otherwise returns FALSE. +See the "empty" property for details. +

void TQDockArea::lineUp ( bool keepNewLines ) [slot] +

+Lines up the dock windows in this dock area to minimize wasted +space. If keepNewLines is TRUE, only space within lines is +cleaned up. If keepNewLines is FALSE the number of lines might +be changed. + +

void TQDockArea::moveDockWindow ( TQDockWindow * w, int index = -1 ) +

+Moves the TQDockWindow w within the dock area. If w is not +already docked in this area, w is docked first. If index is +-1 or larger than the number of docked widgets, w is appended +at the end, otherwise it is inserted at the position index. + +

void TQDockArea::moveDockWindow ( TQDockWindow * w, const TQPoint & p, const TQRect & r, bool swap ) +

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

Moves the dock window w inside the dock area where p is the +new position (in global screen coordinates), r is the suggested +rectangle of the dock window and swap specifies whether or not +the orientation of the docked widget needs to be changed. +

This function is used internally by TQDockWindow. You shouldn't +need to call it yourself. + +

Orientation TQDockArea::orientation () const +

Returns the dock area's orientation. +See the "orientation" property for details. +

void TQDockArea::removeDockWindow ( TQDockWindow * w, bool makeFloating, bool swap, bool fixNewLines = TRUE ) +

+Removes the dock window w from the dock area. If makeFloating is TRUE, w gets floated, and if swap is TRUE, +the orientation of w gets swapped. If fixNewLines is TRUE +(the default) newlines in the area will be fixed. +

You should never need to call this function yourself. Use +TQDockWindow::dock() and TQDockWindow::undock() instead. + +

void TQDockArea::setAcceptDockWindow ( TQDockWindow * dw, bool accept ) +

+If accept is TRUE, dock window dw can be docked in the dock +area. If accept is FALSE, dock window dw cannot be docked in +the dock area. +

See also isDockWindowAccepted(). + +


Property Documentation

+

int count

+

This property holds the number of dock windows in the dock area. +

+

Get this property's value with count(). +

bool empty

+

This property holds whether the dock area is empty. +

+

Get this property's value with isEmpty(). +

HandlePosition handlePosition

+

This property holds where the dock window splitter handle is placed in the dock area. +

The default position is Normal. + +

Get this property's value with handlePosition(). +

Orientation orientation

+

This property holds the dock area's orientation. +

There is no default value; the orientation is specified in the +constructor. + +

Get this property's value with orientation(). +


Related Functions

+

TQTextStream & operator<< ( TQTextStream & ts, const TQDockArea & dockArea ) +

+ +

Writes the layout of the dock windows in dock area dockArea to +the text stream ts. +

See also operator>>(). + +

TQTextStream & operator>> ( TQTextStream & ts, TQDockArea & dockArea ) +

+ +

Reads the layout description of the dock windows in dock area dockArea from the text stream ts and restores it. The layout +description must have been previously written by the operator<<() +function. +

See also 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/qdockwindow-h.html b/doc/html/qdockwindow-h.html new file mode 100644 index 00000000..31e3a6a1 --- /dev/null +++ b/doc/html/qdockwindow-h.html @@ -0,0 +1,282 @@ + + + + + +qdockwindow.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdockwindow.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdockwindow.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of the TQDockWindow class
+**
+** Created : 001010
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the workspace 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 retquirements 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 TQDOCKWINDOW_H
+#define TQDOCKWINDOW_H
+
+#ifndef QT_H
+#include "qframe.h"
+#endif // QT_H
+
+#ifndef QT_NO_MAINWINDOW
+
+class TQDockWindowHandle;
+class TQDockWindowTitleBar;
+class TQPainter;
+class TQDockWindowResizeHandle;
+class TQBoxLayout;
+class TQHBoxLayout;
+class TQVBoxLayout;
+class TQDockArea;
+class TQWidgetResizeHandler;
+class TQMainWindow;
+class TQDockAreaLayout;
+class TQDockWindowPrivate;
+class TQToolBar;
+class TQWindowsXPStyle;
+
+class Q_EXPORT TQDockWindow : public TQFrame
+{
+    Q_OBJECT
+    Q_ENUMS( CloseMode Place )
+    Q_PROPERTY( int closeMode READ closeMode  WRITE setCloseMode ) //### this shouldn't be of type int?!
+    Q_PROPERTY( bool resizeEnabled READ isResizeEnabled  WRITE setResizeEnabled )
+    Q_PROPERTY( bool movingEnabled READ isMovingEnabled  WRITE setMovingEnabled )
+    Q_PROPERTY( bool horizontallyStretchable READ isHorizontallyStretchable  WRITE setHorizontallyStretchable )
+    Q_PROPERTY( bool verticallyStretchable READ isVerticallyStretchable  WRITE setVerticallyStretchable )
+    Q_PROPERTY( bool stretchable READ isStretchable )
+    Q_PROPERTY( bool newLine READ newLine  WRITE setNewLine )
+    Q_PROPERTY( bool opaqueMoving READ opaqueMoving  WRITE setOpaqueMoving )
+    Q_PROPERTY( int offset READ offset  WRITE setOffset )
+    Q_PROPERTY( Place place READ place )
+
+    friend class TQDockWindowHandle;
+    friend class TQDockWindowTitleBar;
+    friend class TQDockArea;
+    friend class TQDockAreaLayout;
+    friend class TQMainWindow;
+    friend class TQCEMainWindow;
+    friend class TQToolBar;
+    friend class TQWindowsXPStyle;
+
+public:
+    enum Place { InDock, OutsideDock };
+    enum CloseMode { Never = 0, Docked = 1, Undocked = 2, Always = Docked | Undocked };
+
+    TQDockWindow( Place p = InDock, TQWidget* parent=0, const char* name=0, WFlags f = 0 );
+    TQDockWindow( TQWidget* parent, const char* name=0, WFlags f = 0 );
+    ~TQDockWindow();
+
+    virtual void setWidget( TQWidget *w );
+    TQWidget *widget() const;
+
+    Place place() const { return curPlace; }
+
+    TQDockArea *area() const;
+
+    virtual void setCloseMode( int m );
+    bool isCloseEnabled() const;
+    int closeMode() const;
+
+    virtual void setResizeEnabled( bool b );
+    virtual void setMovingEnabled( bool b );
+    bool isResizeEnabled() const;
+    bool isMovingEnabled() const;
+
+    virtual void setHorizontallyStretchable( bool b );
+    virtual void setVerticallyStretchable( bool b );
+    bool isHorizontallyStretchable() const;
+    bool isVerticallyStretchable() const;
+    void setHorizontalStretchable( bool b ) { setHorizontallyStretchable( b ); }
+    void setVerticalStretchable( bool b ) { setVerticallyStretchable( b ); }
+    bool isHorizontalStretchable() const { return isHorizontallyStretchable(); }
+    bool isVerticalStretchable() const { return isVerticallyStretchable(); }
+    bool isStretchable() const;
+
+    virtual void setOffset( int o );
+    int offset() const;
+
+    virtual void setFixedExtentWidth( int w );
+    virtual void setFixedExtentHeight( int h );
+    TQSize fixedExtent() const;
+
+    virtual void setNewLine( bool b );
+    bool newLine() const;
+
+    TQt::Orientation orientation() const;
+
+    TQSize sizeHint() const;
+    TQSize minimumSize() const;
+    TQSize minimumSizeHint() const;
+
+    TQBoxLayout *boxLayout();
+
+    virtual void setOpaqueMoving( bool b );
+    bool opaqueMoving() const;
+
+    bool eventFilter( TQObject *o, TQEvent *e );
+
+#ifdef QT_NO_WIDGET_TOPEXTRA
+    TQString caption() const;
+#endif
+
+signals:
+    void orientationChanged( Orientation o );
+    void placeChanged( TQDockWindow::Place p );
+    void visibilityChanged( bool );
+
+public slots:
+    virtual void undock( TQWidget *w );
+    virtual void undock() { undock( 0 ); }
+    virtual void dock();
+    virtual void setOrientation( Orientation o );
+    void setCaption( const TQString &s );
+
+protected:
+    void resizeEvent( TQResizeEvent *e );
+    void showEvent( TQShowEvent *e );
+    void hideEvent( TQHideEvent *e );
+    void contextMenuEvent( TQContextMenuEvent *e );
+
+    void drawFrame( TQPainter * );
+    void drawContents( TQPainter * );
+
+    bool event( TQEvent *e );
+
+private slots:
+    void toggleVisible() { if ( !isVisible() ) show(); else hide(); }
+
+private:
+    TQDockWindow( Place p, TQWidget* parent, const char* name, WFlags f, bool toolbar );
+
+    void handleMove( const TQPoint &pos, const TQPoint &gp, bool drawRect );
+    void updateGui();
+    void updateSplitterVisibility( bool visible );
+
+    void startRectDraw( const TQPoint &so, bool drawRect );
+    void endRectDraw( bool drawRect );
+    void updatePosition( const TQPoint &globalPos  );
+    TQWidget *areaAt( const TQPoint &gp );
+    void removeFromDock( bool fixNewLines = TRUE );
+    void swapRect( TQRect &r, TQt::Orientation o, const TQPoint &offset, TQDockArea *area );
+    void init();
+
+private:
+    TQDockWindowHandle *horHandle, *verHandle;
+    TQDockWindowTitleBar *titleBar;
+    TQWidget *wid;
+    TQPainter *unclippedPainter;
+    TQDockArea *dockArea, *tmpDockArea;
+    TQRect currRect;
+    Place curPlace;
+    Place state;
+    bool resizeEnabled : 1;
+    bool moveEnabled : 1;
+    bool nl : 1;
+    bool opaque : 1;
+    bool isToolbar : 1;
+    bool stretchable[ 3 ];
+    Orientation startOrientation;
+    int cMode;
+    TQPoint startOffset;
+    int offs;
+    TQSize fExtent;
+    TQDockWindowResizeHandle *hHandleTop, *hHandleBottom, *vHandleLeft, *vHandleRight;
+    TQVBoxLayout *hbox;
+    TQHBoxLayout *vbox;
+    TQBoxLayout *childBox;
+    void *dockWindowData;
+    TQPoint lastPos;
+    TQSize lastSize;
+    TQWidgetResizeHandler *widgetResizeHandler;
+    TQDockWindowPrivate *d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQDockWindow( const TQDockWindow & );
+    TQDockWindow& operator=( const TQDockWindow & );
+#endif
+};
+
+inline TQDockArea *TQDockWindow::area() const
+{
+    return dockArea;
+}
+
+#define Q_DEFINED_QDOCKWINDOW
+#include "qwinexport.h"
+#endif
+
+#endif // TQDOCKWINDOW_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdockwindow-members.html b/doc/html/qdockwindow-members.html new file mode 100644 index 00000000..15dcb21c --- /dev/null +++ b/doc/html/qdockwindow-members.html @@ -0,0 +1,393 @@ + + + + + +TQDockWindow Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDockWindow

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdockwindow.html b/doc/html/qdockwindow.html new file mode 100644 index 00000000..a22281b0 --- /dev/null +++ b/doc/html/qdockwindow.html @@ -0,0 +1,509 @@ + + + + + +TQDockWindow Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDockWindow Class Reference

+ +

The TQDockWindow class provides a widget which can be docked +inside a TQDockArea or floated as a top level window on the +desktop. +More... +

#include <qdockwindow.h> +

Inherits TQFrame. +

Inherited by TQToolBar. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • int closeMode - the close mode of a dock window
  • +
  • bool horizontallyStretchable - whether the dock window is horizontally stretchable
  • +
  • bool movingEnabled - whether the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window
  • +
  • bool newLine - whether the dock window prefers to start a new line in the dock area
  • +
  • int offset - the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas)
  • +
  • bool opaqueMoving - whether the dock window will be shown normally whilst it is being moved
  • +
  • Place place  (read only)
  • +
  • bool resizeEnabled - whether the dock window is resizeable
  • +
  • bool stretchable - whether the dock window is stretchable in the current orientation()  (read only)
  • +
  • bool verticallyStretchable - whether the dock window is vertically stretchable
  • +
+

Detailed Description

+ + +The TQDockWindow class provides a widget which can be docked +inside a TQDockArea or floated as a top level window on the +desktop. +

+ +

This class handles moving, resizing, docking and undocking dock +windows. TQToolBar is a subclass of TQDockWindow so the +functionality provided for dock windows is available with the same +API for toolbars. +

TQDockWindows in a TQDockArea

Two TQDockWindows (TQToolBars) in a TQDockArea +

+

A TQDockWindow

A Floating TQDockWindow +

+

If the user drags the dock window into the dock area the dock +window will be docked. If the user drags the dock area outside any +dock areas the dock window will be undocked (floated) and will +become a top level window. Double clicking a floating dock +window's titlebar will dock the dock window to the last dock area +it was docked in. Double clicking a docked dock window's handle +will undock (float) the dock window. + +If the user clicks the close button (which does not appear on +dock windows by default - see closeMode) the dock window will +disappear. You can control whether or not a dock window has a +close button with setCloseMode(). +

TQMainWindow provides four dock areas (top, left, right and bottom) +which can be used by dock windows. For many applications using the +dock areas provided by TQMainWindow is sufficient. (See the TQDockArea documentation if you want to create your own dock +areas.) In TQMainWindow a right-click popup menu (the dock window +menu) is available which lists dock windows and can be used to +show or hide them. (The popup menu only lists dock windows that +have a caption.) +

When you construct a dock window you must pass it a TQDockArea +or a TQMainWindow as its parent if you want it docked. Pass 0 for +the parent if you want it floated. +

+    TQToolBar *fileTools = new TQToolBar( this, "File Actions" );
+    moveDockWindow( fileTools, Left );
+    
+ +

In the example above we create a new TQToolBar in the constructor +of a TQMainWindow subclass (so that the this pointer points to +the TQMainWindow). By default the toolbar will be added to the Top dock area, but we've moved it to the Left dock area. +

A dock window is often used to contain a single widget. In these +cases the widget can be set by calling setWidget(). If you're +constructing a dock window that contains multiple widgets, e.g. a +toolbar, arrange the widgets within a box layout inside the dock +window. To do this use the boxLayout() function to get a pointer +to the dock window's box layout, then add widgets to the layout +using the box layout's TQBoxLayout::addWidget() function. The dock +window will dynamically set the orientation of the layout to be +vertical or horizontal as necessary, although you can control this +yourself with setOrientation(). +

Although a common use of dock windows is for toolbars, they can be +used with any widgets. (See the TQt + Designer and TQt + Linguist applications, for example.) When using larger +widgets it may make sense for the dock window to be resizable by +calling setResizeEnabled(). Resizable dock windows are given +splitter-like handles to allow the user to resize them within +their dock area. When resizable dock windows are undocked they +become top level windows and can be resized like any other top +level windows, e.g. by dragging a corner or edge. +

Dock windows can be docked and undocked using dock() and undock(). +A dock window's orientation can be set with setOrientation(). You +can also use TQDockArea::moveDockWindow(). If you're using a +TQMainWindow, TQMainWindow::moveDockWindow() and +TQMainWindow::removeDockWindow() are available. +

A dock window can have some preferred settings, for example, you +can set a preferred offset from the left edge (or top edge for +vertical dock areas) of the dock area using setOffset(). If you'd +prefer a dock window to start on a new line when it is docked use setNewLine(). The +setFixedExtentWidth() and setFixedExtentHeight() functions can be +used to define the dock window's preferred size, and the +setHorizontallyStretchable() and setVerticallyStretchable() +functions set whether the dock window can be stretched or not. +Dock windows can be moved by default, but this can be changed with +setMovingEnabled(). When a dock window is moved it is shown as a +rectangular outline, but it can be shown normally using +setOpaqueMoving(). +

When a dock window's visibility changes, i.e. it is shown or +hidden, the visibilityChanged() signal is emitted. When a dock +window is docked, undocked or moved inside the dock area the +placeChanged() signal is emitted. +

See also Main Window and Related Classes. + +


Member Type Documentation

+

TQDockWindow::CloseMode

+ +

This enum type specifies when (if ever) a dock window has a close +button. +

    +
  • TQDockWindow::Never - The dock window never has a close button and cannot +be closed by the user. +
  • TQDockWindow::Docked - The dock window has a close button only when +docked. +
  • TQDockWindow::Undocked - The dock window has a close button only when +floating. +
  • TQDockWindow::Always - The dock window always has a close button. + +
+

TQDockWindow::Place

+ +

This enum specifies the possible locations for a TQDockWindow: +

    +
  • TQDockWindow::InDock - Inside a TQDockArea. +
  • TQDockWindow::OutsideDock - Floating as a top level window on the desktop. +
+

Member Function Documentation

+

TQDockWindow::TQDockWindow ( Place p = InDock, TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

+Constructs a TQDockWindow with parent parent, called name and +with widget flags f. +

If p is InDock, the dock window is docked into a dock area +and parent must be a TQDockArea or a TQMainWindow. If the parent is a TQMainWindow the dock window will be docked in the main +window's Top dock area. +

If p is OutsideDock, the dock window is created as a floating +window. +

We recommend creating the dock area InDock with a TQMainWindow +as parent then calling TQMainWindow::moveDockWindow() to move the +dock window where you want it. + +

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

+Constructs a TQDockWindow with parent parent, called name and +with widget flags f. + +

TQDockArea * TQDockWindow::area () const +

+ +

Returns the dock area in which this dock window is docked, or 0 if +the dock window is floating. + +

TQBoxLayout * TQDockWindow::boxLayout () +

+Returns the layout which is used for adding widgets to the dock +window. The layout's orientation is set automatically to match the +orientation of the dock window. You can add widgets to the layout +using the box layout's TQBoxLayout::addWidget() function. +

If the dock window only needs to contain a single widget use +setWidget() instead. +

See also setWidget() and setOrientation(). + +

int TQDockWindow::closeMode () const +

Returns the close mode of a dock window. +See the "closeMode" property for details. +

void TQDockWindow::dock () [virtual slot] +

+Docks the dock window into the last dock area in which it was +docked. +

If the dock window has no last dock area (e.g. it was created as a +floating window and has never been docked), or if the last dock +area it was docked in does not exist (e.g. the dock area has been +deleted), nothing happens. +

The dock window will dock with the dock area regardless of the return value +of TQDockArea::isDockWindowAccepted(). +

See also undock(), TQDockArea::moveDockWindow(), TQDockArea::removeDockWindow(), TQMainWindow::moveDockWindow(), TQMainWindow::removeDockWindow(), and TQDockArea::isDockWindowAccepted(). + +

+

TQSize TQDockWindow::fixedExtent () const +

+Returns the dock window's preferred size (fixed extent). +

See also setFixedExtentWidth() and setFixedExtentHeight(). + +

bool TQDockWindow::isCloseEnabled () const +

+Returns TRUE if the dock window has a close button; otherwise +returns FALSE. The result depends on the dock window's Place +and its CloseMode. +

See also closeMode. + +

bool TQDockWindow::isHorizontalStretchable () const +

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

+

bool TQDockWindow::isHorizontallyStretchable () const +

Returns TRUE if the dock window is horizontally stretchable; otherwise returns FALSE. +See the "horizontallyStretchable" property for details. +

bool TQDockWindow::isMovingEnabled () const +

Returns TRUE if the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window; otherwise returns FALSE. +See the "movingEnabled" property for details. +

bool TQDockWindow::isResizeEnabled () const +

Returns TRUE if the dock window is resizeable; otherwise returns FALSE. +See the "resizeEnabled" property for details. +

bool TQDockWindow::isStretchable () const +

Returns TRUE if the dock window is stretchable in the current orientation(); otherwise returns FALSE. +See the "stretchable" property for details. +

bool TQDockWindow::isVerticalStretchable () const +

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

+

bool TQDockWindow::isVerticallyStretchable () const +

Returns TRUE if the dock window is vertically stretchable; otherwise returns FALSE. +See the "verticallyStretchable" property for details. +

bool TQDockWindow::newLine () const +

Returns TRUE if the dock window prefers to start a new line in the dock area; otherwise returns FALSE. +See the "newLine" property for details. +

int TQDockWindow::offset () const +

Returns the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas). +See the "offset" property for details. +

bool TQDockWindow::opaqueMoving () const +

Returns TRUE if the dock window will be shown normally whilst it is being moved; otherwise returns FALSE. +See the "opaqueMoving" property for details. +

TQt::Orientation TQDockWindow::orientation () const +

+Returns the orientation of the dock window. +

See also orientationChanged(). + +

void TQDockWindow::orientationChanged ( Orientation o ) [signal] +

+ +

This signal is emitted when the orientation of the dock window is +changed. The new orientation is o. + +

Place TQDockWindow::place () const +

+ +

This function returns where the dock window is placed. This is +either InDock or OutsideDock. +

See also TQDockArea::moveDockWindow(), TQDockArea::removeDockWindow(), TQMainWindow::moveDockWindow(), and TQMainWindow::removeDockWindow(). + +

void TQDockWindow::placeChanged ( TQDockWindow::Place p ) [signal] +

+ +

This signal is emitted when the dock window is docked (p is InDock), undocked (p is OutsideDock) or moved inside the +the dock area. +

See also TQDockArea::moveDockWindow(), TQDockArea::removeDockWindow(), TQMainWindow::moveDockWindow(), and TQMainWindow::removeDockWindow(). + +

void TQDockWindow::setCloseMode ( int m ) [virtual] +

Sets the close mode of a dock window to m. +See the "closeMode" property for details. +

void TQDockWindow::setFixedExtentHeight ( int h ) [virtual] +

+Sets the dock window's preferred height for its fixed extent +(size) to h. +

See also setFixedExtentWidth(). + +

void TQDockWindow::setFixedExtentWidth ( int w ) [virtual] +

+Sets the dock window's preferred width for its fixed extent (size) +to w. +

See also setFixedExtentHeight(). + +

void TQDockWindow::setHorizontalStretchable ( bool b ) +

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

+

void TQDockWindow::setHorizontallyStretchable ( bool b ) [virtual] +

Sets whether the dock window is horizontally stretchable to b. +See the "horizontallyStretchable" property for details. +

void TQDockWindow::setMovingEnabled ( bool b ) [virtual] +

Sets whether the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window to b. +See the "movingEnabled" property for details. +

void TQDockWindow::setNewLine ( bool b ) [virtual] +

Sets whether the dock window prefers to start a new line in the dock area to b. +See the "newLine" property for details. +

void TQDockWindow::setOffset ( int o ) [virtual] +

Sets the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas) to o. +See the "offset" property for details. +

void TQDockWindow::setOpaqueMoving ( bool b ) [virtual] +

Sets whether the dock window will be shown normally whilst it is being moved to b. +See the "opaqueMoving" property for details. +

void TQDockWindow::setOrientation ( Orientation o ) [virtual slot] +

+Sets the orientation of the dock window to o. The orientation +is propagated to the layout boxLayout(). +

Warning: All undocked TQToolBars will always have a horizontal orientation. + +

void TQDockWindow::setResizeEnabled ( bool b ) [virtual] +

Sets whether the dock window is resizeable to b. +See the "resizeEnabled" property for details. +

void TQDockWindow::setVerticalStretchable ( bool b ) +

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

+

void TQDockWindow::setVerticallyStretchable ( bool b ) [virtual] +

Sets whether the dock window is vertically stretchable to b. +See the "verticallyStretchable" property for details. +

void TQDockWindow::setWidget ( TQWidget * w ) [virtual] +

+Sets the dock window's main widget to w. +

See also boxLayout(). + +

void TQDockWindow::undock () [virtual slot] +

+ +

Undocks the TQDockWindow from its current dock area if it is +docked; otherwise does nothing. +

See also dock(), TQDockArea::moveDockWindow(), TQDockArea::removeDockWindow(), TQMainWindow::moveDockWindow(), and TQMainWindow::removeDockWindow(). + +

void TQDockWindow::visibilityChanged ( bool visible ) [signal] +

+ +

This signal is emitted when the visibility of the dock window +relatively to its dock area is changed. If visible is TRUE, the +TQDockWindow is now visible to the dock area, otherwise it has been +hidden. +

A dock window can be hidden if it has a close button which the +user has clicked. In the case of a TQMainWindow a dock window can +have its visibility changed (hidden or shown) by clicking its name +in the dock window menu that lists the TQMainWindow's dock windows. + +

TQWidget * TQDockWindow::widget () const +

+Returns the dock window's main widget. +

See also setWidget(). + +


Property Documentation

+

int closeMode

+

This property holds the close mode of a dock window. +

Defines when (if ever) the dock window has a close button. The +choices are Never, Docked (i.e. only when docked), Undocked (only when undocked, i.e. floated) or Always. +

The default is Never. + +

Set this property's value with setCloseMode() and get this property's value with closeMode(). +

bool horizontallyStretchable

+

This property holds whether the dock window is horizontally stretchable. +

A dock window is horizontally stretchable if you call +setHorizontallyStretchable(TRUE) or setResizeEnabled(TRUE). +

See also resizeEnabled. + +

Bugs and limitations: +

    +
  • Strecthability is broken. You must call setResizeEnabled(TRUE) to get +proper behavior and even then TQDockWindow does not limit stretchablilty. +
+

Set this property's value with setHorizontallyStretchable() and get this property's value with isHorizontallyStretchable(). +

bool movingEnabled

+

This property holds whether the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window. +

This property is TRUE by default. + +

Set this property's value with setMovingEnabled() and get this property's value with isMovingEnabled(). +

bool newLine

+

This property holds whether the dock window prefers to start a new line in the dock area. +

The default is FALSE, i.e. the dock window doesn't retquire a new +line in the dock area. + +

Set this property's value with setNewLine() and get this property's value with newLine(). +

int offset

+

This property holds the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas). +

The default is 0. + +

Set this property's value with setOffset() and get this property's value with offset(). +

bool opaqueMoving

+

This property holds whether the dock window will be shown normally whilst it is being moved. +

If this property is FALSE, (the default), the dock window will be +represented by an outline rectangle whilst it is being moved. +

Warning: Currently opaque moving has some problems and we do not +recommend using it at this time. We expect to fix these problems +in a future release. + +

Set this property's value with setOpaqueMoving() and get this property's value with opaqueMoving(). +

bool resizeEnabled

+

This property holds whether the dock window is resizeable. +

A resizeable dock window can be resized using splitter-like +handles inside a dock area and like every other top level window +when floating. +

A dock window is both horizontally and vertically stretchable if +you call setResizeEnabled(TRUE). +

This property is FALSE by default. +

See also verticallyStretchable and horizontallyStretchable. + +

Set this property's value with setResizeEnabled() and get this property's value with isResizeEnabled(). +

bool stretchable

+

This property holds whether the dock window is stretchable in the current orientation(). +

This property can be set using setHorizontallyStretchable() and +setVerticallyStretchable(), or with setResizeEnabled(). +

See also resizeEnabled. + +

Bugs and limitations: +

    +
  • Strecthability is broken. You must call setResizeEnabled(TRUE) to get +proper behavior and even then TQDockWindow does not limit stretchablilty. +
+

Get this property's value with isStretchable(). +

bool verticallyStretchable

+

This property holds whether the dock window is vertically stretchable. +

A dock window is vertically stretchable if you call +setVerticallyStretchable(TRUE) or setResizeEnabled(TRUE). +

See also resizeEnabled. + +

Bugs and limitations: +

    +
  • Strecthability is broken. You must call setResizeEnabled(TRUE) to get +proper behavior and even then TQDockWindow does not limit stretchablilty. +
+

Set this property's value with setVerticallyStretchable() and get this property's value with isVerticallyStretchable(). + +


+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/qdockwindow.png b/doc/html/qdockwindow.png new file mode 100644 index 00000000..75ccaa45 Binary files /dev/null and b/doc/html/qdockwindow.png differ diff --git a/doc/html/qdom-h.html b/doc/html/qdom-h.html new file mode 100644 index 00000000..bdd2cb8e --- /dev/null +++ b/doc/html/qdom-h.html @@ -0,0 +1,722 @@ + + + + + +qdom.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdom.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdom.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of TQDomDocument and related classes.
+**
+** Created : 000518
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the xml 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 retquirements 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 TQDOM_H
+#define TQDOM_H
+
+#ifndef QT_H
+#include "qstring.h"
+#endif // QT_H
+
+#if !defined(QT_MODULE_XML) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_XML )
+#define TQM_EXPORT_DOM
+#else
+#define TQM_EXPORT_DOM Q_EXPORT
+#endif
+
+#ifndef QT_NO_DOM
+
+class TQIODevice;
+class TQTextStream;
+
+class TQXmlInputSource;
+class TQXmlReader;
+
+class TQDomDocumentPrivate;
+class TQDomDocumentTypePrivate;
+class TQDomDocumentFragmentPrivate;
+class TQDomNodePrivate;
+class TQDomNodeListPrivate;
+class TQDomImplementationPrivate;
+class TQDomElementPrivate;
+class TQDomNotationPrivate;
+class TQDomEntityPrivate;
+class TQDomEntityReferencePrivate;
+class TQDomProcessingInstructionPrivate;
+class TQDomAttrPrivate;
+class TQDomCharacterDataPrivate;
+class TQDomTextPrivate;
+class TQDomCommentPrivate;
+class TQDomCDATASectionPrivate;
+class TQDomNamedNodeMapPrivate;
+class TQDomImplementationPrivate;
+
+class TQDomNodeList;
+class TQDomElement;
+class TQDomText;
+class TQDomComment;
+class TQDomCDATASection;
+class TQDomProcessingInstruction;
+class TQDomAttr;
+class TQDomEntityReference;
+class TQDomDocument;
+class TQDomNamedNodeMap;
+class TQDomDocument;
+class TQDomDocumentFragment;
+class TQDomDocumentType;
+class TQDomImplementation;
+class TQDomNode;
+class TQDomEntity;
+class TQDomNotation;
+class TQDomCharacterData;
+
+class TQM_EXPORT_DOM TQDomImplementation
+{
+public:
+    TQDomImplementation();
+    TQDomImplementation( const TQDomImplementation& );
+    virtual ~TQDomImplementation();
+    TQDomImplementation& operator= ( const TQDomImplementation& );
+    bool operator== ( const TQDomImplementation& ) const;
+    bool operator!= ( const TQDomImplementation& ) const;
+
+    // functions
+    virtual bool hasFeature( const TQString& feature, const TQString& version );
+    virtual TQDomDocumentType createDocumentType( const TQString& qName, const TQString& publicId, const TQString& systemId );
+    virtual TQDomDocument createDocument( const TQString& nsURI, const TQString& qName, const TQDomDocumentType& doctype );
+
+    // TQt extension
+    bool isNull();
+
+private:
+    TQDomImplementationPrivate* impl;
+    TQDomImplementation( TQDomImplementationPrivate* );
+
+    friend class TQDomDocument;
+};
+
+class TQM_EXPORT_DOM TQDomNode
+{
+public:
+    enum NodeType {
+	ElementNode               = 1,
+	AttributeNode             = 2,
+	TextNode                  = 3,
+	CDATASectionNode          = 4,
+	EntityReferenceNode       = 5,
+	EntityNode                = 6,
+	ProcessingInstructionNode = 7,
+	CommentNode               = 8,
+	DocumentNode              = 9,
+	DocumentTypeNode          = 10,
+	DocumentFragmentNode      = 11,
+	NotationNode              = 12,
+	BaseNode                  = 21,// this is not in the standard
+	CharacterDataNode         = 22 // this is not in the standard
+    };
+
+    TQDomNode();
+    TQDomNode( const TQDomNode& );
+    TQDomNode& operator= ( const TQDomNode& );
+    bool operator== ( const TQDomNode& ) const;
+    bool operator!= ( const TQDomNode& ) const;
+    virtual ~TQDomNode();
+
+    // DOM functions
+    virtual TQDomNode insertBefore( const TQDomNode& newChild, const TQDomNode& refChild );
+    virtual TQDomNode insertAfter( const TQDomNode& newChild, const TQDomNode& refChild );
+    virtual TQDomNode replaceChild( const TQDomNode& newChild, const TQDomNode& oldChild );
+    virtual TQDomNode removeChild( const TQDomNode& oldChild );
+    virtual TQDomNode appendChild( const TQDomNode& newChild );
+    virtual bool hasChildNodes() const;
+    virtual TQDomNode cloneNode( bool deep = TRUE ) const;
+    virtual void normalize();
+    virtual bool isSupported( const TQString& feature, const TQString& version ) const;
+
+    // DOM read only attributes
+    virtual TQString nodeName() const;
+    virtual TQDomNode::NodeType nodeType() const;
+    virtual TQDomNode         parentNode() const;
+    virtual TQDomNodeList     childNodes() const;
+    virtual TQDomNode         firstChild() const;
+    virtual TQDomNode         lastChild() const;
+    virtual TQDomNode         previousSibling() const;
+    virtual TQDomNode         nextSibling() const;
+    virtual TQDomNamedNodeMap attributes() const;
+    virtual TQDomDocument     ownerDocument() const;
+    virtual TQString namespaceURI() const;
+    virtual TQString localName() const;
+    virtual bool hasAttributes() const;
+
+    // DOM attributes
+    virtual TQString nodeValue() const;
+    virtual void setNodeValue( const TQString& );
+    virtual TQString prefix() const;
+    virtual void setPrefix( const TQString& pre );
+
+    // TQt extensions
+    virtual bool isAttr() const;
+    virtual bool isCDATASection() const;
+    virtual bool isDocumentFragment() const;
+    virtual bool isDocument() const;
+    virtual bool isDocumentType() const;
+    virtual bool isElement() const;
+    virtual bool isEntityReference() const;
+    virtual bool isText() const;
+    virtual bool isEntity() const;
+    virtual bool isNotation() const;
+    virtual bool isProcessingInstruction() const;
+    virtual bool isCharacterData() const;
+    virtual bool isComment() const;
+
+    /**
+     * Shortcut to avoid dealing with TQDomNodeList
+     * all the time.
+     */
+    TQDomNode namedItem( const TQString& name ) const;
+
+    bool isNull() const;
+    void clear();
+
+    TQDomAttr toAttr();
+    TQDomCDATASection toCDATASection();
+    TQDomDocumentFragment toDocumentFragment();
+    TQDomDocument toDocument();
+    TQDomDocumentType toDocumentType();
+    TQDomElement toElement();
+    TQDomEntityReference toEntityReference();
+    TQDomText toText();
+    TQDomEntity toEntity();
+    TQDomNotation toNotation();
+    TQDomProcessingInstruction toProcessingInstruction();
+    TQDomCharacterData toCharacterData();
+    TQDomComment toComment();
+
+    void save( TQTextStream&, int ) const;
+
+protected:
+    TQDomNodePrivate* impl;
+    TQDomNode( TQDomNodePrivate* );
+
+private:
+    friend class TQDomDocument;
+    friend class TQDomDocumentType;
+    friend class TQDomNodeList;
+    friend class TQDomNamedNodeMap;
+};
+
+class TQM_EXPORT_DOM TQDomNodeList
+{
+public:
+    TQDomNodeList();
+    TQDomNodeList( const TQDomNodeList& );
+    TQDomNodeList& operator= ( const TQDomNodeList& );
+    bool operator== ( const TQDomNodeList& ) const;
+    bool operator!= ( const TQDomNodeList& ) const;
+    virtual ~TQDomNodeList();
+
+    // DOM functions
+    virtual TQDomNode item( int index ) const;
+
+    // DOM read only attributes
+    virtual uint length() const;
+    uint count() const { return length(); } // TQt API consitancy
+
+private:
+    TQDomNodeListPrivate* impl;
+    TQDomNodeList( TQDomNodeListPrivate* );
+
+    friend class TQDomNode;
+    friend class TQDomElement;
+    friend class TQDomDocument;
+};
+
+class TQM_EXPORT_DOM TQDomDocumentType : public TQDomNode
+{
+public:
+    TQDomDocumentType();
+    TQDomDocumentType( const TQDomDocumentType& x );
+    TQDomDocumentType& operator= ( const TQDomDocumentType& );
+    ~TQDomDocumentType();
+
+    // DOM read only attributes
+    virtual TQString name() const;
+    virtual TQDomNamedNodeMap entities() const;
+    virtual TQDomNamedNodeMap notations() const;
+    virtual TQString publicId() const;
+    virtual TQString systemId() const;
+    virtual TQString internalSubset() const;
+
+    // Reimplemented from TQDomNode
+    TQDomNode::NodeType nodeType() const;
+    bool isDocumentType() const;
+
+private:
+    TQDomDocumentType( TQDomDocumentTypePrivate* );
+
+    friend class TQDomImplementation;
+    friend class TQDomDocument;
+    friend class TQDomNode;
+};
+
+class TQM_EXPORT_DOM TQDomDocument : public TQDomNode
+{
+public:
+    TQDomDocument();
+    Q_EXPLICIT TQDomDocument( const TQString& name );
+    Q_EXPLICIT TQDomDocument( const TQDomDocumentType& doctype );
+    TQDomDocument( const TQDomDocument& x );
+    TQDomDocument& operator= ( const TQDomDocument& );
+    ~TQDomDocument();
+
+    // DOM functions
+    TQDomElement createElement( const TQString& tagName );
+    TQDomDocumentFragment createDocumentFragment();
+    TQDomText createTextNode( const TQString& data );
+    TQDomComment createComment( const TQString& data );
+    TQDomCDATASection createCDATASection( const TQString& data );
+    TQDomProcessingInstruction createProcessingInstruction( const TQString& target, const TQString& data );
+    TQDomAttr createAttribute( const TQString& name );
+    TQDomEntityReference createEntityReference( const TQString& name );
+    TQDomNodeList elementsByTagName( const TQString& tagname ) const;
+    TQDomNode importNode( const TQDomNode& importedNode, bool deep );
+    TQDomElement createElementNS( const TQString& nsURI, const TQString& qName );
+    TQDomAttr createAttributeNS( const TQString& nsURI, const TQString& qName );
+    TQDomNodeList elementsByTagNameNS( const TQString& nsURI, const TQString& localName );
+    TQDomElement elementById( const TQString& elementId );
+
+    // DOM read only attributes
+    TQDomDocumentType doctype() const;
+    TQDomImplementation implementation() const;
+    TQDomElement documentElement() const;
+
+    // TQt extensions
+    bool setContent( const TQCString& text, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
+    bool setContent( const TQByteArray& text, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
+    bool setContent( const TQString& text, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
+    bool setContent( TQIODevice* dev, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
+    bool setContent( const TQCString& text, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
+    bool setContent( const TQByteArray& text, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
+    bool setContent( const TQString& text, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
+    bool setContent( TQIODevice* dev, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
+
+    bool setContent( TQXmlInputSource *source, TQXmlReader *reader, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
+
+    // Reimplemented from TQDomNode
+    TQDomNode::NodeType nodeType() const;
+    bool isDocument() const;
+
+    // TQt extensions
+    TQString toString() const; // ### TQt 4: merge the two overloads
+    TQString toString( int ) const;
+    TQCString toCString() const; // ### TQt 4: merge the two overloads
+    TQCString toCString( int ) const;
+
+private:
+    TQDomDocument( TQDomDocumentPrivate* );
+
+    friend class TQDomNode;
+};
+
+class TQM_EXPORT_DOM TQDomNamedNodeMap
+{
+public:
+    TQDomNamedNodeMap();
+    TQDomNamedNodeMap( const TQDomNamedNodeMap& );
+    TQDomNamedNodeMap& operator= ( const TQDomNamedNodeMap& );
+    bool operator== ( const TQDomNamedNodeMap& ) const;
+    bool operator!= ( const TQDomNamedNodeMap& ) const;
+    ~TQDomNamedNodeMap();
+
+    // DOM functions
+    TQDomNode namedItem( const TQString& name ) const;
+    TQDomNode setNamedItem( const TQDomNode& newNode );
+    TQDomNode removeNamedItem( const TQString& name );
+    TQDomNode item( int index ) const;
+    TQDomNode namedItemNS( const TQString& nsURI, const TQString& localName ) const;
+    TQDomNode setNamedItemNS( const TQDomNode& newNode );
+    TQDomNode removeNamedItemNS( const TQString& nsURI, const TQString& localName );
+
+    // DOM read only attributes
+    uint length() const;
+    uint count() const { return length(); } // TQt API consitancy
+
+    // TQt extension
+    bool contains( const TQString& name ) const;
+
+private:
+    TQDomNamedNodeMapPrivate* impl;
+    TQDomNamedNodeMap( TQDomNamedNodeMapPrivate* );
+
+    friend class TQDomNode;
+    friend class TQDomDocumentType;
+    friend class TQDomElement;
+};
+
+class TQM_EXPORT_DOM TQDomDocumentFragment : public TQDomNode
+{
+public:
+    TQDomDocumentFragment();
+    TQDomDocumentFragment( const TQDomDocumentFragment& x );
+    TQDomDocumentFragment& operator= ( const TQDomDocumentFragment& );
+    ~TQDomDocumentFragment();
+
+    // Reimplemented from TQDomNode
+    TQDomNode::NodeType nodeType() const;
+    bool isDocumentFragment() const;
+
+private:
+    TQDomDocumentFragment( TQDomDocumentFragmentPrivate* );
+
+    friend class TQDomDocument;
+    friend class TQDomNode;
+};
+
+class TQM_EXPORT_DOM TQDomCharacterData : public TQDomNode
+{
+public:
+    TQDomCharacterData();
+    TQDomCharacterData( const TQDomCharacterData& x );
+    TQDomCharacterData& operator= ( const TQDomCharacterData& );
+    ~TQDomCharacterData();
+
+    // DOM functions
+    virtual TQString substringData( unsigned long offset, unsigned long count );
+    virtual void appendData( const TQString& arg );
+    virtual void insertData( unsigned long offset, const TQString& arg );
+    virtual void deleteData( unsigned long offset, unsigned long count );
+    virtual void replaceData( unsigned long offset, unsigned long count, const TQString& arg );
+
+    // DOM read only attributes
+    virtual uint length() const;
+
+    // DOM attributes
+    virtual TQString data() const;
+    virtual void setData( const TQString& );
+
+    // Reimplemented from TQDomNode
+    TQDomNode::NodeType nodeType() const;
+    bool isCharacterData() const;
+
+private:
+    TQDomCharacterData( TQDomCharacterDataPrivate* );
+
+    friend class TQDomDocument;
+    friend class TQDomText;
+    friend class TQDomComment;
+    friend class TQDomNode;
+};
+
+class TQM_EXPORT_DOM TQDomAttr : public TQDomNode
+{
+public:
+    TQDomAttr();
+    TQDomAttr( const TQDomAttr& x );
+    TQDomAttr& operator= ( const TQDomAttr& );
+    ~TQDomAttr();
+
+    // DOM read only attributes
+    virtual TQString name() const;
+    virtual bool specified() const;
+    virtual TQDomElement ownerElement() const;
+
+    // DOM attributes
+    virtual TQString value() const;
+    virtual void setValue( const TQString& );
+
+    // Reimplemented from TQDomNode
+    TQDomNode::NodeType nodeType() const;
+    bool isAttr() const;
+
+private:
+    TQDomAttr( TQDomAttrPrivate* );
+
+    friend class TQDomDocument;
+    friend class TQDomElement;
+    friend class TQDomNode;
+};
+
+class TQM_EXPORT_DOM TQDomElement : public TQDomNode
+{
+public:
+    TQDomElement();
+    TQDomElement( const TQDomElement& x );
+    TQDomElement& operator= ( const TQDomElement& );
+    ~TQDomElement();
+
+    // DOM functions
+    TQString attribute( const TQString& name, const TQString& defValue = TQString::null ) const;
+    void setAttribute( const TQString& name, const TQString& value );
+    void setAttribute( const TQString& name, int value );
+    void setAttribute( const TQString& name, uint value );
+    void setAttribute( const TQString& name, long value );
+    void setAttribute( const TQString& name, ulong value );
+    void setAttribute( const TQString& name, double value );
+    void removeAttribute( const TQString& name );
+    TQDomAttr attributeNode( const TQString& name);
+    TQDomAttr setAttributeNode( const TQDomAttr& newAttr );
+    TQDomAttr removeAttributeNode( const TQDomAttr& oldAttr );
+    virtual TQDomNodeList elementsByTagName( const TQString& tagname ) const;
+    bool hasAttribute( const TQString& name ) const;
+
+    TQString attributeNS( const TQString nsURI, const TQString& localName, const TQString& defValue ) const;
+    void setAttributeNS( const TQString nsURI, const TQString& qName, const TQString& value );
+    void setAttributeNS( const TQString nsURI, const TQString& qName, int value );
+    void setAttributeNS( const TQString nsURI, const TQString& qName, uint value );
+    void setAttributeNS( const TQString nsURI, const TQString& qName, long value );
+    void setAttributeNS( const TQString nsURI, const TQString& qName, ulong value );
+    void setAttributeNS( const TQString nsURI, const TQString& qName, double value );
+    void removeAttributeNS( const TQString& nsURI, const TQString& localName );
+    TQDomAttr attributeNodeNS( const TQString& nsURI, const TQString& localName );
+    TQDomAttr setAttributeNodeNS( const TQDomAttr& newAttr );
+    virtual TQDomNodeList elementsByTagNameNS( const TQString& nsURI, const TQString& localName ) const;
+    bool hasAttributeNS( const TQString& nsURI, const TQString& localName ) const;
+
+    // DOM read only attributes
+    TQString tagName() const;
+    void setTagName( const TQString& name ); // TQt extension
+
+    // Reimplemented from TQDomNode
+    TQDomNamedNodeMap attributes() const;
+    TQDomNode::NodeType nodeType() const;
+    bool isElement() const;
+
+    TQString text() const;
+
+private:
+    TQDomElement( TQDomElementPrivate* );
+
+    friend class TQDomDocument;
+    friend class TQDomNode;
+    friend class TQDomAttr;
+};
+
+class TQM_EXPORT_DOM TQDomText : public TQDomCharacterData
+{
+public:
+    TQDomText();
+    TQDomText( const TQDomText& x );
+    TQDomText& operator= ( const TQDomText& );
+    ~TQDomText();
+
+    // DOM functions
+    TQDomText splitText( int offset );
+
+    // Reimplemented from TQDomNode
+    TQDomNode::NodeType nodeType() const;
+    bool isText() const;
+
+private:
+    TQDomText( TQDomTextPrivate* );
+
+    friend class TQDomCDATASection;
+    friend class TQDomDocument;
+    friend class TQDomNode;
+};
+
+class TQM_EXPORT_DOM TQDomComment : public TQDomCharacterData
+{
+public:
+    TQDomComment();
+    TQDomComment( const TQDomComment& x );
+    TQDomComment& operator= ( const TQDomComment& );
+    ~TQDomComment();
+
+    // Reimplemented from TQDomNode
+    TQDomNode::NodeType nodeType() const;
+    bool isComment() const;
+
+private:
+    TQDomComment( TQDomCommentPrivate* );
+
+    friend class TQDomDocument;
+    friend class TQDomNode;
+};
+
+class TQM_EXPORT_DOM TQDomCDATASection : public TQDomText
+{
+public:
+    TQDomCDATASection();
+    TQDomCDATASection( const TQDomCDATASection& x );
+    TQDomCDATASection& operator= ( const TQDomCDATASection& );
+    ~TQDomCDATASection();
+
+    // Reimplemented from TQDomNode
+    TQDomNode::NodeType nodeType() const;
+    bool isCDATASection() const;
+
+private:
+    TQDomCDATASection( TQDomCDATASectionPrivate* );
+
+    friend class TQDomDocument;
+    friend class TQDomNode;
+};
+
+class TQM_EXPORT_DOM TQDomNotation : public TQDomNode
+{
+public:
+    TQDomNotation();
+    TQDomNotation( const TQDomNotation& x );
+    TQDomNotation& operator= ( const TQDomNotation& );
+    ~TQDomNotation();
+
+    // DOM read only attributes
+    TQString publicId() const;
+    TQString systemId() const;
+
+    // Reimplemented from TQDomNode
+    TQDomNode::NodeType nodeType() const;
+    bool isNotation() const;
+
+private:
+    TQDomNotation( TQDomNotationPrivate* );
+
+    friend class TQDomDocument;
+    friend class TQDomNode;
+};
+
+class TQM_EXPORT_DOM TQDomEntity : public TQDomNode
+{
+public:
+    TQDomEntity();
+    TQDomEntity( const TQDomEntity& x );
+    TQDomEntity& operator= ( const TQDomEntity& );
+    ~TQDomEntity();
+
+    // DOM read only attributes
+    virtual TQString publicId() const;
+    virtual TQString systemId() const;
+    virtual TQString notationName() const;
+
+    // Reimplemented from TQDomNode
+    TQDomNode::NodeType nodeType() const;
+    bool isEntity() const;
+
+private:
+    TQDomEntity( TQDomEntityPrivate* );
+
+    friend class TQDomNode;
+};
+
+class TQM_EXPORT_DOM TQDomEntityReference : public TQDomNode
+{
+public:
+    TQDomEntityReference();
+    TQDomEntityReference( const TQDomEntityReference& x );
+    TQDomEntityReference& operator= ( const TQDomEntityReference& );
+    ~TQDomEntityReference();
+
+    // Reimplemented from TQDomNode
+    TQDomNode::NodeType nodeType() const;
+    bool isEntityReference() const;
+
+private:
+    TQDomEntityReference( TQDomEntityReferencePrivate* );
+
+    friend class TQDomDocument;
+    friend class TQDomNode;
+};
+
+class TQM_EXPORT_DOM TQDomProcessingInstruction : public TQDomNode
+{
+public:
+    TQDomProcessingInstruction();
+    TQDomProcessingInstruction( const TQDomProcessingInstruction& x );
+    TQDomProcessingInstruction& operator= ( const TQDomProcessingInstruction& );
+    ~TQDomProcessingInstruction();
+
+    // DOM read only attributes
+    virtual TQString target() const;
+
+    // DOM attributes
+    virtual TQString data() const;
+    virtual void setData( const TQString& d );
+
+    // Reimplemented from TQDomNode
+    TQDomNode::NodeType nodeType() const;
+    bool isProcessingInstruction() const;
+
+private:
+    TQDomProcessingInstruction( TQDomProcessingInstructionPrivate* );
+
+    friend class TQDomDocument;
+    friend class TQDomNode;
+};
+
+
+TQM_EXPORT_DOM TQTextStream& operator<<( TQTextStream&, const TQDomNode& );
+
+#endif //QT_NO_DOM
+#endif // TQDOM_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomattr-members.html b/doc/html/qdomattr-members.html new file mode 100644 index 00000000..53a7a358 --- /dev/null +++ b/doc/html/qdomattr-members.html @@ -0,0 +1,112 @@ + + + + + +TQDomAttr Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomAttr

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomattr.html b/doc/html/qdomattr.html new file mode 100644 index 00000000..618a4fd8 --- /dev/null +++ b/doc/html/qdomattr.html @@ -0,0 +1,165 @@ + + + + + +TQDomAttr Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomAttr Class Reference
[XML module]

+ +

The TQDomAttr class represents one attribute of a TQDomElement. +More... +

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

+

#include <qdom.h> +

Inherits TQDomNode. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDomAttr class represents one attribute of a TQDomElement. + +

+ +

For example, the following piece of XML produces an element with +no children, but two attributes: +

+    <link href="http://www.trolltech.com" color="red" />
+    
+ +

You can access the attributes of an element with code like this: +

+    TQDomElement e = //...
+    //...
+    TQDomAttr a = e.attributeNode( "href" );
+    cout << a.value() << endl;                // prints "http://www.trolltech.com"
+    a.setValue( "http://doc.trolltech.com" ); // change the node's attribute
+    TQDomAttr a2 = e.attributeNode( "href" );
+    cout << a2.value() << endl;               // prints "http://doc.trolltech.com"
+    
+ +

This example also shows that changing an attribute received from +an element changes the attribute of the element. If you do not +want to change the value of the element's attribute you must +use cloneNode() to get an independent copy of the attribute. +

TQDomAttr can return the name() and value() of an attribute. An +attribute's value is set with setValue(). If specified() returns +TRUE the value was either set in the document or set with +setValue(); otherwise the value hasn't been set. The node this +attribute is attached to (if any) is returned by ownerElement(). +

For further information about the Document Object Model see +http://www.w3.org/TR/REC-DOM-Level-1/ and +http://www.w3.org/TR/DOM-Level-2-Core/. +For a more general introduction of the DOM implementation see the +TQDomDocument documentation. +

See also XML. + +


Member Function Documentation

+

TQDomAttr::TQDomAttr () +

+Constructs an empty attribute. + +

TQDomAttr::TQDomAttr ( const TQDomAttr & x ) +

+Constructs a copy of x. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomAttr::~TQDomAttr () +

+Destroys the object and frees its resources. + +

bool TQDomAttr::isAttr () const [virtual] +

+Returns TRUE. + +

Reimplemented from TQDomNode. +

TQString TQDomAttr::name () const [virtual] +

+Returns the attribute's name. + +

TQDomNode::NodeType TQDomAttr::nodeType () const [virtual] +

+Returns AttributeNode. + +

Reimplemented from TQDomNode. +

TQDomAttr & TQDomAttr::operator= ( const TQDomAttr & x ) +

+Assigns x to this DOM attribute. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomElement TQDomAttr::ownerElement () const [virtual] +

+Returns the element node this attribute is attached to or a null node if this attribute is not +attached to any element. + +

void TQDomAttr::setValue ( const TQString & v ) [virtual] +

+Sets the attribute's value to v. +

See also value(). + +

bool TQDomAttr::specified () const [virtual] +

+Returns TRUE if the attribute has either been expicitly specified +in the XML document or was set by the user with setValue(). +Returns FALSE if the value hasn't been specified or set. +

See also setValue(). + +

TQString TQDomAttr::value () const [virtual] +

+Returns the value of the attribute or TQString::null if the +attribute has not been specified. +

See also specified() and setValue(). + + +


+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/qdomcdatasection-members.html b/doc/html/qdomcdatasection-members.html new file mode 100644 index 00000000..5df6c7be --- /dev/null +++ b/doc/html/qdomcdatasection-members.html @@ -0,0 +1,116 @@ + + + + + +TQDomCDATASection Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomCDATASection

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomcdatasection.html b/doc/html/qdomcdatasection.html new file mode 100644 index 00000000..0ddb867b --- /dev/null +++ b/doc/html/qdomcdatasection.html @@ -0,0 +1,116 @@ + + + + + +TQDomCDATASection Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomCDATASection Class Reference
[XML module]

+ +

The TQDomCDATASection class represents an XML CDATA section. +More... +

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

+

#include <qdom.h> +

Inherits TQDomText. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDomCDATASection class represents an XML CDATA section. + +

+ +

CDATA sections are used to escape blocks of text containing +characters that would otherwise be regarded as markup. The only +delimiter that is recognized in a CDATA section is the "]]>" +string that terminates the CDATA section. CDATA sections cannot be +nested. Their primary purpose is for including material such as +XML fragments, without needing to escape all the delimiters. +

Adjacent TQDomCDATASection nodes are not merged by the +TQDomNode::normalize() function. +

For further information about the Document Object Model see +http://www.w3.org/TR/REC-DOM-Level-1/ and +http://www.w3.org/TR/DOM-Level-2-Core/. +For a more general introduction of the DOM implementation see the +TQDomDocument documentation. +

See also XML. + +


Member Function Documentation

+

TQDomCDATASection::TQDomCDATASection () +

+Constructs an empty CDATA section. To create a CDATA section with +content, use the TQDomDocument::createCDATASection() function. + +

TQDomCDATASection::TQDomCDATASection ( const TQDomCDATASection & x ) +

+Constructs a copy of x. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomCDATASection::~TQDomCDATASection () +

+Destroys the object and frees its resources. + +

bool TQDomCDATASection::isCDATASection () const [virtual] +

+Returns TRUE. + +

Reimplemented from TQDomNode. +

TQDomNode::NodeType TQDomCDATASection::nodeType () const [virtual] +

+Returns CDATASection. + +

Reimplemented from TQDomText. +

TQDomCDATASection & TQDomCDATASection::operator= ( const TQDomCDATASection & x ) +

+Assigns x to this CDATA section. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + + +


+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/qdomcharacterdata-members.html b/doc/html/qdomcharacterdata-members.html new file mode 100644 index 00000000..eae08569 --- /dev/null +++ b/doc/html/qdomcharacterdata-members.html @@ -0,0 +1,115 @@ + + + + + +TQDomCharacterData Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomCharacterData

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomcharacterdata.html b/doc/html/qdomcharacterdata.html new file mode 100644 index 00000000..b9768afb --- /dev/null +++ b/doc/html/qdomcharacterdata.html @@ -0,0 +1,160 @@ + + + + + +TQDomCharacterData Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomCharacterData Class Reference
[XML module]

+ +

The TQDomCharacterData class represents a generic string in the DOM. +More... +

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

+

#include <qdom.h> +

Inherits TQDomNode. +

Inherited by TQDomText and TQDomComment. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDomCharacterData class represents a generic string in the DOM. + +

+ +

Character data as used in XML specifies a generic data string. +More specialized versions of this class are TQDomText, TQDomComment +and TQDomCDATASection. +

The data string is set with setData() and retrieved with data(). +You can retrieve a portion of the data string using +substringData(). Extra data can be appended with appendData(), or +inserted with insertData(). Portions of the data string can be +deleted with deleteData() or replaced with replaceData(). The +length of the data string is returned by length(). +

The node type of the node containing this character data is +returned by nodeType(). +

See also TQDomText, TQDomComment, TQDomCDATASection, and XML. + +


Member Function Documentation

+

TQDomCharacterData::TQDomCharacterData () +

+Constructs an empty character data object. + +

TQDomCharacterData::TQDomCharacterData ( const TQDomCharacterData & x ) +

+Constructs a copy of x. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomCharacterData::~TQDomCharacterData () +

+Destroys the object and frees its resources. + +

void TQDomCharacterData::appendData ( const TQString & arg ) [virtual] +

+Appends the string arg to the stored string. + +

TQString TQDomCharacterData::data () const [virtual] +

+Returns the string stored in this object. +

If the node is a null node, it will return +TQString::null. + +

void TQDomCharacterData::deleteData ( unsigned long offset, unsigned long count ) [virtual] +

+Deletes a substring of length count from position offset. + +

void TQDomCharacterData::insertData ( unsigned long offset, const TQString & arg ) [virtual] +

+Inserts the string arg into the stored string at position offset. + +

bool TQDomCharacterData::isCharacterData () const [virtual] +

+Returns TRUE. + +

Reimplemented from TQDomNode. +

uint TQDomCharacterData::length () const [virtual] +

+Returns the length of the stored string. + +

TQDomNode::NodeType TQDomCharacterData::nodeType () const [virtual] +

+Returns the type of node this object refers to (i.e. TextNode, +CDATASectionNode, CommentNode or CharacterDataNode). For +a null node CharacterDataNode is +returned. + +

Reimplemented from TQDomNode. +

Reimplemented in TQDomText and TQDomComment. +

TQDomCharacterData & TQDomCharacterData::operator= ( const TQDomCharacterData & x ) +

+Assigns x to this character data. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

void TQDomCharacterData::replaceData ( unsigned long offset, unsigned long count, const TQString & arg ) [virtual] +

+Replaces the substring of length count starting at position offset with the string arg. + +

void TQDomCharacterData::setData ( const TQString & v ) [virtual] +

+Sets this object's string to v. + +

TQString TQDomCharacterData::substringData ( unsigned long offset, unsigned long count ) [virtual] +

+Returns the substring of length count from position offset. + + +

+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/qdomcomment-members.html b/doc/html/qdomcomment-members.html new file mode 100644 index 00000000..562decb7 --- /dev/null +++ b/doc/html/qdomcomment-members.html @@ -0,0 +1,115 @@ + + + + + +TQDomComment Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomComment

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomcomment.html b/doc/html/qdomcomment.html new file mode 100644 index 00000000..4ba6d59e --- /dev/null +++ b/doc/html/qdomcomment.html @@ -0,0 +1,114 @@ + + + + + +TQDomComment Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomComment Class Reference
[XML module]

+ +

The TQDomComment class represents an XML comment. +More... +

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

+

#include <qdom.h> +

Inherits TQDomCharacterData. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDomComment class represents an XML comment. + +

+ +

A comment in the parsed XML such as this: +

+    <!-- this is a comment -->
+    
+ +is represented by TQDomComment objects in the parsed Dom tree. +

For further information about the Document Object Model see +http://www.w3.org/TR/REC-DOM-Level-1/ and +http://www.w3.org/TR/DOM-Level-2-Core/. +For a more general introduction of the DOM implementation see the +TQDomDocument documentation. +

See also XML. + +


Member Function Documentation

+

TQDomComment::TQDomComment () +

+Constructs an empty comment. To construct a comment with content, +use the TQDomDocument::createComment() function. + +

TQDomComment::TQDomComment ( const TQDomComment & x ) +

+Constructs a copy of x. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomComment::~TQDomComment () +

+Destroys the object and frees its resources. + +

bool TQDomComment::isComment () const [virtual] +

+Returns TRUE. + +

Reimplemented from TQDomNode. +

TQDomNode::NodeType TQDomComment::nodeType () const [virtual] +

+Returns CommentNode. + +

Reimplemented from TQDomCharacterData. +

TQDomComment & TQDomComment::operator= ( const TQDomComment & x ) +

+Assigns x to this DOM comment. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + + +


+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/qdomdocument-members.html b/doc/html/qdomdocument-members.html new file mode 100644 index 00000000..d72e6097 --- /dev/null +++ b/doc/html/qdomdocument-members.html @@ -0,0 +1,127 @@ + + + + + +TQDomDocument Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomDocument

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomdocument.html b/doc/html/qdomdocument.html new file mode 100644 index 00000000..6427a8c1 --- /dev/null +++ b/doc/html/qdomdocument.html @@ -0,0 +1,504 @@ + + + + + +TQDomDocument Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomDocument Class Reference
[XML module]

+ +

The TQDomDocument class represents an XML document. +More... +

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

+

#include <qdom.h> +

Inherits TQDomNode. +

List of all member functions. +

Public Members

+
    +
  • TQDomDocument ()
  • +
  • explicit TQDomDocument ( const TQString & name )
  • +
  • explicit TQDomDocument ( const TQDomDocumentType & doctype )
  • +
  • TQDomDocument ( const TQDomDocument & x )
  • +
  • TQDomDocument & operator= ( const TQDomDocument & x )
  • +
  • ~TQDomDocument ()
  • +
  • TQDomElement createElement ( const TQString & tagName )
  • +
  • TQDomDocumentFragment createDocumentFragment ()
  • +
  • TQDomText createTextNode ( const TQString & value )
  • +
  • TQDomComment createComment ( const TQString & value )
  • +
  • TQDomCDATASection createCDATASection ( const TQString & value )
  • +
  • TQDomProcessingInstruction createProcessingInstruction ( const TQString & target, const TQString & data )
  • +
  • TQDomAttr createAttribute ( const TQString & name )
  • +
  • TQDomEntityReference createEntityReference ( const TQString & name )
  • +
  • TQDomNodeList elementsByTagName ( const TQString & tagname ) const
  • +
  • TQDomNode importNode ( const TQDomNode & importedNode, bool deep )
  • +
  • TQDomElement createElementNS ( const TQString & nsURI, const TQString & qName )
  • +
  • TQDomAttr createAttributeNS ( const TQString & nsURI, const TQString & qName )
  • +
  • TQDomNodeList elementsByTagNameNS ( const TQString & nsURI, const TQString & localName )
  • +
  • TQDomElement elementById ( const TQString & elementId )
  • +
  • TQDomDocumentType doctype () const
  • +
  • TQDomImplementation implementation () const
  • +
  • TQDomElement documentElement () const
  • +
  • bool setContent ( const TQCString & buffer, bool namespaceProcessing, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 )
  • +
  • bool setContent ( const TQByteArray & buffer, bool namespaceProcessing, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 )
  • +
  • bool setContent ( const TQString & text, bool namespaceProcessing, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 )
  • +
  • bool setContent ( TQIODevice * dev, bool namespaceProcessing, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 )
  • +
  • bool setContent ( const TQCString & buffer, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 )
  • +
  • bool setContent ( const TQByteArray & buffer, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 )
  • +
  • bool setContent ( const TQString & text, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 )
  • +
  • bool setContent ( TQIODevice * dev, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 )
  • +
  • bool setContent ( TQXmlInputSource * source, TQXmlReader * reader, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 )
  • +
  • virtual TQDomNode::NodeType nodeType () const
  • +
  • virtual bool isDocument () const
  • +
  • TQString toString () const
  • +
  • TQString toString ( int indent ) const
  • +
  • TQCString toCString () const
  • +
  • TQCString toCString ( int indent ) const
  • +
+

Detailed Description

+ + + +The TQDomDocument class represents an XML document. + +

+ +

The TQDomDocument class represents the entire XML document. +Conceptually, it is the root of the document tree, and provides +the primary access to the document's data. +

Since elements, text nodes, comments, processing instructions, +etc., cannot exist outside the context of a document, the document +class also contains the factory functions needed to create these +objects. The node objects created have an ownerDocument() function +which associates them with the document within whose context they +were created. The DOM classes that will be used most often are +TQDomNode, TQDomDocument, TQDomElement and TQDomText. +

The parsed XML is represented internally by a tree of objects that +can be accessed using the various TQDom classes. All TQDom classes +only reference objects in the internal tree. The internal +objects in the DOM tree will get deleted once the last TQDom +object referencing them and the TQDomDocument itself are deleted. +

Creation of elements, text nodes, etc. is done using the various +factory functions provided in this class. Using the default +constructors of the TQDom classes will only result in empty +objects that cannot be manipulated or inserted into the Document. +

The TQDomDocument class has several functions for creating document +data, for example, createElement(), createTextNode(), +createComment(), createCDATASection(), +createProcessingInstruction(), createAttribute() and +createEntityReference(). Some of these functions have versions +that support namespaces, i.e. createElementNS() and +createAttributeNS(). The createDocumentFragment() function is used +to hold parts of the document; this is useful for manipulating for +complex documents. +

The entire content of the document is set with setContent(). This +function parses the string it is passed as an XML document and +creates the DOM tree that represents the document. The root +element is available using documentElement(). The textual +representation of the document can be obtained using toString(). +

It is possible to insert a node from another document into the +document using importNode(). +

You can obtain a list of all the elements that have a particular +tag with elementsByTagName() or with elementsByTagNameNS(). +

The TQDom classes are typically used as follows: +

+    TQDomDocument doc( "mydocument" );
+    TQFile file( "mydocument.xml" );
+    if ( !file.open( IO_ReadOnly ) )
+        return;
+    if ( !doc.setContent( &file ) ) {
+        file.close();
+        return;
+    }
+    file.close();
+
+    // print out the element names of all elements that are direct children
+    // of the outermost element.
+    TQDomElement docElem = doc.documentElement();
+
+    TQDomNode n = docElem.firstChild();
+    while( !n.isNull() ) {
+        TQDomElement e = n.toElement(); // try to convert the node to an element.
+        if( !e.isNull() ) {
+            cout << e.tagName() << endl; // the node really is an element.
+        }
+        n = n.nextSibling();
+    }
+
+    // Here we append a new element to the end of the document
+    TQDomElement elem = doc.createElement( "img" );
+    elem.setAttribute( "src", "myimage.png" );
+    docElem.appendChild( elem );
+    
+ +

Once doc and elem go out of scope, the whole internal tree +representing the XML document is deleted. +

To create a document using DOM use code like this: +

+    TQDomDocument doc( "MyML" );
+    TQDomElement root = doc.createElement( "MyML" );
+    doc.appendChild( root );
+
+    TQDomElement tag = doc.createElement( "Greeting" );
+    root.appendChild( tag );
+
+    TQDomText t = doc.createTextNode( "Hello World" );
+    tag.appendChild( t );
+
+    TQString xml = doc.toString();
+    
+ +

For further information about the Document Object Model see +http://www.w3.org/TR/REC-DOM-Level-1/ and +http://www.w3.org/TR/DOM-Level-2-Core/. +For a more general introduction of the DOM implementation see the +TQDomDocument documentation. +

See also XML. + +


Member Function Documentation

+

TQDomDocument::TQDomDocument () +

+Constructs an empty document. + +

explicit TQDomDocument::TQDomDocument ( const TQString & name ) +

+Creates a document and sets the name of the document type to name. + +

explicit TQDomDocument::TQDomDocument ( const TQDomDocumentType & doctype ) +

+Creates a document with the document type doctype. +

See also TQDomImplementation::createDocumentType(). + +

TQDomDocument::TQDomDocument ( const TQDomDocument & x ) +

+Constructs a copy of x. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomDocument::~TQDomDocument () +

+Destroys the object and frees its resources. + +

TQDomAttr TQDomDocument::createAttribute ( const TQString & name ) +

+Creates a new attribute called name that can be inserted into +an element, e.g. using TQDomElement::setAttributeNode(). +

See also createAttributeNS(). + +

TQDomAttr TQDomDocument::createAttributeNS ( const TQString & nsURI, const TQString & qName ) +

+Creates a new attribute with namespace support that can be +inserted into an element. The name of the attribute is qName +and the namespace URI is nsURI. This function also sets +TQDomNode::prefix() and TQDomNode::localName() to appropriate values +(depending on qName). +

See also createAttribute(). + +

TQDomCDATASection TQDomDocument::createCDATASection ( const TQString & value ) +

+Creates a new CDATA section for the string value that can be +inserted into the document, e.g. using TQDomNode::appendChild(). +

See also TQDomNode::appendChild(), TQDomNode::insertBefore(), and TQDomNode::insertAfter(). + +

TQDomComment TQDomDocument::createComment ( const TQString & value ) +

+Creates a new comment for the string value that can be inserted +into the document, e.g. using TQDomNode::appendChild(). +

See also TQDomNode::appendChild(), TQDomNode::insertBefore(), and TQDomNode::insertAfter(). + +

TQDomDocumentFragment TQDomDocument::createDocumentFragment () +

+Creates a new document fragment, that can be used to hold parts of +the document, e.g. when doing complex manipulations of the +document tree. + +

TQDomElement TQDomDocument::createElement ( const TQString & tagName ) +

+Creates a new element called tagName that can be inserted into +the DOM tree, e.g. using TQDomNode::appendChild(). +

See also createElementNS(), TQDomNode::appendChild(), TQDomNode::insertBefore(), and TQDomNode::insertAfter(). + +

TQDomElement TQDomDocument::createElementNS ( const TQString & nsURI, const TQString & qName ) +

+Creates a new element with namespace support that can be inserted +into the DOM tree. The name of the element is qName and the +namespace URI is nsURI. This function also sets +TQDomNode::prefix() and TQDomNode::localName() to appropriate values +(depending on qName). +

See also createElement(). + +

TQDomEntityReference TQDomDocument::createEntityReference ( const TQString & name ) +

+Creates a new entity reference called name that can be inserted +into the document, e.g. using TQDomNode::appendChild(). +

See also TQDomNode::appendChild(), TQDomNode::insertBefore(), and TQDomNode::insertAfter(). + +

TQDomProcessingInstruction TQDomDocument::createProcessingInstruction ( const TQString & target, const TQString & data ) +

+Creates a new processing instruction that can be inserted into the +document, e.g. using TQDomNode::appendChild(). This function sets +the target for the processing instruction to target and the +data to data. +

See also TQDomNode::appendChild(), TQDomNode::insertBefore(), and TQDomNode::insertAfter(). + +

TQDomText TQDomDocument::createTextNode ( const TQString & value ) +

+Creates a text node for the string value that can be inserted +into the document tree, e.g. using TQDomNode::appendChild(). +

Warning: All characters within an XML document must be in the range: +

#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] +

This rule also applies to characters encoded as character entities and +characters in CDATA sections. If you use this function to insert +characters outside of this range, the document will not be well-formed. +

If you want to store binary data in an XML document you must either use +your own scheme to escape illegal characters, or you must store it in +an external unparsed entity. +

See also TQDomNode::appendChild(), TQDomNode::insertBefore(), and TQDomNode::insertAfter(). + +

TQDomDocumentType TQDomDocument::doctype () const +

+Returns the document type of this document. + +

TQDomElement TQDomDocument::documentElement () const +

+Returns the root element of the document. + +

TQDomElement TQDomDocument::elementById ( const TQString & elementId ) +

+Returns the element whose ID is equal to elementId. If no +element with the ID was found, this function returns a null element. +

Since the TQDomClasses do not know which attributes are element +IDs, this function returns always a null + element. This may change in a future version. + +

TQDomNodeList TQDomDocument::elementsByTagName ( const TQString & tagname ) const +

+Returns a TQDomNodeList, that contains all the elements in the +document with the name tagname. The order of the node list is +the order they are encountered in a preorder traversal of the +element tree. +

See also elementsByTagNameNS() and TQDomElement::elementsByTagName(). + +

TQDomNodeList TQDomDocument::elementsByTagNameNS ( const TQString & nsURI, const TQString & localName ) +

+Returns a TQDomNodeList that contains all the elements in the +document with the local name localName and a namespace URI of +nsURI. The order of the node list is the order they are +encountered in a preorder traversal of the element tree. +

See also elementsByTagName() and TQDomElement::elementsByTagNameNS(). + +

TQDomImplementation TQDomDocument::implementation () const +

+Returns a TQDomImplementation object. + +

TQDomNode TQDomDocument::importNode ( const TQDomNode & importedNode, bool deep ) +

+Imports the node importedNode from another document to this +document. importedNode remains in the original document; this +function creates a copy that can be used within this document. +

This function returns the imported node that belongs to this +document. The returned node has no parent. It is not possible to +import TQDomDocument and TQDomDocumentType nodes. In those cases +this function returns a null node. +

If deep is TRUE, this function imports not only the node importedNode but its whole subtree; if it is FALSE, only the importedNode is imported. The argument deep has no effect on +TQDomAttr and TQDomEntityReference nodes, since the descendents of +TQDomAttr nodes are always imported and those of +TQDomEntityReference nodes are never imported. +

The behavior of this function is slightly different depending on +the node types: +

+
Node Type Behaviour +
TQDomAttr +The owner element is set to 0 and the specified flag is +set to TRUE in the generated attribute. The whole subtree +of importedNode is always imported for attribute nodes: +deep has no effect. +
TQDomDocument +Document nodes cannot be imported. +
TQDomDocumentFragment +If deep is TRUE, this function imports the whole +document fragment; otherwise it only generates an empty +document fragment. +
TQDomDocumentType +Document type nodes cannot be imported. +
TQDomElement +Attributes for which TQDomAttr::specified() is TRUE are +also imported, other attributes are not imported. If deep is TRUE, this function also imports the subtree of importedNode; otherwise it imports only the element node +(and some attributes, see above). +
TQDomEntity +Entity nodes can be imported, but at the moment there is +no way to use them since the document type is read-only in +DOM level 2. +
TQDomEntityReference +Descendents of entity reference nodes are never imported: +deep has no effect. +
TQDomNotation +Notation nodes can be imported, but at the moment there is +no way to use them since the document type is read-only in +DOM level 2. +
TQDomProcessingInstruction +The target and value of the processing instruction is +copied to the new node. +
TQDomText +The text is copied to the new node. +
TQDomCDATASection +The text is copied to the new node. +
TQDomComment +The text is copied to the new node. +
+

See also TQDomElement::setAttribute(), TQDomNode::insertBefore(), TQDomNode::insertAfter(), TQDomNode::replaceChild(), TQDomNode::removeChild(), and TQDomNode::appendChild(). + +

bool TQDomDocument::isDocument () const [virtual] +

+Returns TRUE. + +

Reimplemented from TQDomNode. +

TQDomNode::NodeType TQDomDocument::nodeType () const [virtual] +

+Returns DocumentNode. + +

Reimplemented from TQDomNode. +

TQDomDocument & TQDomDocument::operator= ( const TQDomDocument & x ) +

+Assigns x to this DOM document. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

bool TQDomDocument::setContent ( const TQByteArray & buffer, bool namespaceProcessing, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 ) +

+This function parses the XML document from the byte array buffer and sets it as the content of the document. It tries to +detect the encoding of the document as retquired by the XML +specification. +

If namespaceProcessing is TRUE, the parser recognizes +namespaces in the XML file and sets the prefix name, local name +and namespace URI to appropriate values. If namespaceProcessing +is FALSE, the parser does no namespace processing when it reads +the XML file. +

If a parse error occurs, the function returns FALSE; otherwise it +returns TRUE. If a parse error occurs and errorMsg, errorLine and errorColumn are not 0, the error message is +placed in *errorMsg, the line number *errorLine and the +column number in *errorColumn. +

If namespaceProcessing is TRUE, the function TQDomNode::prefix() +returns a string for all elements and attributes. It returns an +empty string if the element or attribute has no prefix. +

If namespaceProcessing is FALSE, the functions +TQDomNode::prefix(), TQDomNode::localName() and +TQDomNode::namespaceURI() return TQString::null. +

See also TQDomNode::namespaceURI(), TQDomNode::localName(), TQDomNode::prefix(), TQString::isNull(), and TQString::isEmpty(). + +

bool TQDomDocument::setContent ( const TQCString & buffer, bool namespaceProcessing, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 ) +

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

This function reads the XML document from the C string buffer. +

Warning: This function does not try to detect the encoding: +instead it assumes that the C string is UTF-8 encoded. + +

bool TQDomDocument::setContent ( const TQString & text, bool namespaceProcessing, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 ) +

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

This function reads the XML document from the string text. +Since text is already a Unicode string, no encoding detection +is done. + +

bool TQDomDocument::setContent ( TQIODevice * dev, bool namespaceProcessing, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 ) +

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

This function reads the XML document from the IO device dev. + +

bool TQDomDocument::setContent ( const TQCString & buffer, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 ) +

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

This function reads the XML document from the C string buffer. +

No namespace processing is performed. +

Warning: This function does not try to detect the encoding: +instead it assumes that the C string is UTF-8 encoded. + +

bool TQDomDocument::setContent ( const TQByteArray & buffer, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 ) +

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

This function reads the XML document from the byte array buffer. +

No namespace processing is performed. + +

bool TQDomDocument::setContent ( const TQString & text, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 ) +

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

This function reads the XML document from the string text. +Since text is already a Unicode string, no encoding detection +is performed. +

No namespace processing is performed either. + +

bool TQDomDocument::setContent ( TQIODevice * dev, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 ) +

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

This function reads the XML document from the IO device dev. +

No namespace processing is performed. + +

bool TQDomDocument::setContent ( TQXmlInputSource * source, TQXmlReader * reader, TQString * errorMsg = 0, int * errorLine = 0, int * errorColumn = 0 ) +

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

This function reads the XML document from the TQXmlInputSource source and +parses it with the TQXmlReader reader. +

This function doesn't change the features of the reader. If you want to +use certain features for parsing you can use this function to set up the +reader appropriate. +

See also TQXmlSimpleReader. + +

TQCString TQDomDocument::toCString () const +

+Converts the parsed document back to its textual representation +and returns a TQCString for that is encoded in UTF-8. +

See also toString(). + +

TQCString TQDomDocument::toCString ( int indent ) const +

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

This function uses indent as the amount of space to indent +subelements. + +

TQString TQDomDocument::toString () const +

+Converts the parsed document back to its textual representation. +

See also toCString(). + +

TQString TQDomDocument::toString ( int indent ) const +

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

This function uses indent as the amount of space to indent +subelements. + + +


+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/qdomdocumentfragment-members.html b/doc/html/qdomdocumentfragment-members.html new file mode 100644 index 00000000..067f8051 --- /dev/null +++ b/doc/html/qdomdocumentfragment-members.html @@ -0,0 +1,107 @@ + + + + + +TQDomDocumentFragment Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomDocumentFragment

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomdocumentfragment.html b/doc/html/qdomdocumentfragment.html new file mode 100644 index 00000000..1fa73076 --- /dev/null +++ b/doc/html/qdomdocumentfragment.html @@ -0,0 +1,117 @@ + + + + + +TQDomDocumentFragment Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomDocumentFragment Class Reference
[XML module]

+ +

The TQDomDocumentFragment class is a tree of TQDomNodes which is not usually a complete TQDomDocument. +More... +

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

+

#include <qdom.h> +

Inherits TQDomNode. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDomDocumentFragment class is a tree of TQDomNodes which is not usually a complete TQDomDocument. + +

+ +

If you want to do complex tree operations it is useful to have a +lightweight class to store nodes and their relations. +TQDomDocumentFragment stores a subtree of a document which does not +necessarily represent a well-formed XML document. +

TQDomDocumentFragment is also useful if you want to group several +nodes in a list and insert them all together as children of some +node. In these cases TQDomDocumentFragment can be used as a +temporary container for this list of children. +

The most important feature of TQDomDocumentFragment is that it is +treated in a special way by TQDomNode::insertAfter(), +TQDomNode::insertBefore(), TQDomNode::replaceChild() and +TQDomNode::appendChild(): instead of inserting the fragment itself, all +the fragment's children are inserted. +

See also XML. + +


Member Function Documentation

+

TQDomDocumentFragment::TQDomDocumentFragment () +

+Constructs an empty document fragment. + +

TQDomDocumentFragment::TQDomDocumentFragment ( const TQDomDocumentFragment & x ) +

+Constructs a copy of x. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomDocumentFragment::~TQDomDocumentFragment () +

+Destroys the object and frees its resources. + +

bool TQDomDocumentFragment::isDocumentFragment () const [virtual] +

+This function reimplements TQDomNode::isDocumentFragment(). +

See also nodeType() and TQDomNode::toDocumentFragment(). + +

Reimplemented from TQDomNode. +

TQDomNode::NodeType TQDomDocumentFragment::nodeType () const [virtual] +

+Returns DocumentFragment. +

See also isDocumentFragment() and TQDomNode::toDocumentFragment(). + +

Reimplemented from TQDomNode. +

TQDomDocumentFragment & TQDomDocumentFragment::operator= ( const TQDomDocumentFragment & x ) +

+Assigns x to this DOM document fragment. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + + +


+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/qdomdocumenttype-members.html b/doc/html/qdomdocumenttype-members.html new file mode 100644 index 00000000..4796e003 --- /dev/null +++ b/doc/html/qdomdocumenttype-members.html @@ -0,0 +1,113 @@ + + + + + +TQDomDocumentType Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomDocumentType

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomdocumenttype.html b/doc/html/qdomdocumenttype.html new file mode 100644 index 00000000..577b5e2e --- /dev/null +++ b/doc/html/qdomdocumenttype.html @@ -0,0 +1,150 @@ + + + + + +TQDomDocumentType Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomDocumentType Class Reference
[XML module]

+ +

The TQDomDocumentType class is the representation of the DTD +in the document tree. +More... +

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

+

#include <qdom.h> +

Inherits TQDomNode. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDomDocumentType class is the representation of the DTD +in the document tree. + +

+ +

The TQDomDocumentType class allows read-only access to some of the +data structures in the DTD: it can return a map of all entities() +and notations(). In addition the function name() returns the name +of the document type as specified in the <!DOCTYPE name> +tag. This class also provides the publicId(), systemId() and +internalSubset() functions. +

See also TQDomDocument and XML. + +


Member Function Documentation

+

TQDomDocumentType::TQDomDocumentType () +

+Creates an empty TQDomDocumentType object. + +

TQDomDocumentType::TQDomDocumentType ( const TQDomDocumentType & n ) +

+Constructs a copy of n. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomDocumentType::~TQDomDocumentType () +

+Destroys the object and frees its resources. + +

TQDomNamedNodeMap TQDomDocumentType::entities () const [virtual] +

+Returns a map of all entities described in the DTD. + +

TQString TQDomDocumentType::internalSubset () const [virtual] +

+Returns the internal subset of the document type or TQString::null +if there is no internal subset. +

See also publicId() and systemId(). + +

bool TQDomDocumentType::isDocumentType () const [virtual] +

+This function overloads TQDomNode::isDocumentType(). +

See also nodeType() and TQDomNode::toDocumentType(). + +

Reimplemented from TQDomNode. +

TQString TQDomDocumentType::name () const [virtual] +

+Returns the name of the document type as specified in the +<!DOCTYPE name> tag. +

See also nodeName(). + +

TQDomNode::NodeType TQDomDocumentType::nodeType () const [virtual] +

+Returns DocumentTypeNode. +

See also isDocumentType() and TQDomNode::toDocumentType(). + +

Reimplemented from TQDomNode. +

TQDomNamedNodeMap TQDomDocumentType::notations () const [virtual] +

+Returns a map of all notations described in the DTD. + +

TQDomDocumentType & TQDomDocumentType::operator= ( const TQDomDocumentType & n ) +

+Assigns n to this document type. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQString TQDomDocumentType::publicId () const [virtual] +

+Returns the public identifier of the external DTD subset or +TQString::null if there is no public identifier. +

See also systemId(), internalSubset(), and TQDomImplementation::createDocumentType(). + +

TQString TQDomDocumentType::systemId () const [virtual] +

+Returns the system identifier of the external DTD subset or +TQString::null if there is no system identifier. +

See also publicId(), internalSubset(), and TQDomImplementation::createDocumentType(). + + +


+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/qdomelement-members.html b/doc/html/qdomelement-members.html new file mode 100644 index 00000000..38be37f5 --- /dev/null +++ b/doc/html/qdomelement-members.html @@ -0,0 +1,125 @@ + + + + + +TQDomElement Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomElement

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomelement.html b/doc/html/qdomelement.html new file mode 100644 index 00000000..fe6fb07b --- /dev/null +++ b/doc/html/qdomelement.html @@ -0,0 +1,350 @@ + + + + + +TQDomElement Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomElement Class Reference
[XML module]

+ +

The TQDomElement class represents one element in the DOM tree. +More... +

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

+

#include <qdom.h> +

Inherits TQDomNode. +

List of all member functions. +

Public Members

+
    +
  • TQDomElement ()
  • +
  • TQDomElement ( const TQDomElement & x )
  • +
  • TQDomElement & operator= ( const TQDomElement & x )
  • +
  • ~TQDomElement ()
  • +
  • TQString attribute ( const TQString & name, const TQString & defValue = TQString::null ) const
  • +
  • void setAttribute ( const TQString & name, const TQString & value )
  • +
  • void setAttribute ( const TQString & name, int value )
  • +
  • void setAttribute ( const TQString & name, uint value )
  • +
  • void setAttribute ( const TQString & name, long value )
  • +
  • void setAttribute ( const TQString & name, ulong value )
  • +
  • void setAttribute ( const TQString & name, double value )
  • +
  • void removeAttribute ( const TQString & name )
  • +
  • TQDomAttr attributeNode ( const TQString & name )
  • +
  • TQDomAttr setAttributeNode ( const TQDomAttr & newAttr )
  • +
  • TQDomAttr removeAttributeNode ( const TQDomAttr & oldAttr )
  • +
  • virtual TQDomNodeList elementsByTagName ( const TQString & tagname ) const
  • +
  • bool hasAttribute ( const TQString & name ) const
  • +
  • TQString attributeNS ( const TQString nsURI, const TQString & localName, const TQString & defValue ) const
  • +
  • void setAttributeNS ( const TQString nsURI, const TQString & qName, const TQString & value )
  • +
  • void setAttributeNS ( const TQString nsURI, const TQString & qName, int value )
  • +
  • void setAttributeNS ( const TQString nsURI, const TQString & qName, uint value )
  • +
  • void setAttributeNS ( const TQString nsURI, const TQString & qName, long value )
  • +
  • void setAttributeNS ( const TQString nsURI, const TQString & qName, ulong value )
  • +
  • void setAttributeNS ( const TQString nsURI, const TQString & qName, double value )
  • +
  • void removeAttributeNS ( const TQString & nsURI, const TQString & localName )
  • +
  • TQDomAttr attributeNodeNS ( const TQString & nsURI, const TQString & localName )
  • +
  • TQDomAttr setAttributeNodeNS ( const TQDomAttr & newAttr )
  • +
  • virtual TQDomNodeList elementsByTagNameNS ( const TQString & nsURI, const TQString & localName ) const
  • +
  • bool hasAttributeNS ( const TQString & nsURI, const TQString & localName ) const
  • +
  • TQString tagName () const
  • +
  • void setTagName ( const TQString & name )
  • +
  • virtual TQDomNamedNodeMap attributes () const
  • +
  • virtual TQDomNode::NodeType nodeType () const
  • +
  • virtual bool isElement () const
  • +
  • TQString text () const
  • +
+

Detailed Description

+ + + +The TQDomElement class represents one element in the DOM tree. + +

+ +

Elements have a tagName() and zero or more attributes associated +with them. The tag name can be changed with setTagName(). +

Element attributes are represented by TQDomAttr objects that can +be queried using the attribute() and attributeNode() functions. +You can set attributes with the setAttribute() and +setAttributeNode() functions. Attributes can be removed with +removeAttribute(). There are namespace-aware equivalents to these +functions, i.e. setAttributeNS(), setAttributeNodeNS() and +removeAttributeNS(). +

If you want to access the text of a node use text(), e.g. +

+    TQDomElement e = //...
+    //...
+    TQString s = e.text()
+    
+ +The text() function operates recursively to find the text (since +not all elements contain text). If you want to find all the text +in all of a node's children, iterate over the children looking for +TQDomText nodes, e.g. +
+    TQString text;
+    TQDomElement element = doc.documentElement();
+    for( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+    {
+        TQDomText t = n.toText();
+        if ( !t.isNull() )
+            text += t.data();
+    }
+    
+ +Note that we attempt to convert each node to a text node and use +text() rather than using firstChild().toText().data() or +n.toText().data() directly on the node, because the node may not +be a text element. +

You can get a list of all the decendents of an element which have +a specified tag name with elementsByTagName() or +elementsByTagNameNS(). +

For further information about the Document Object Model see +http://www.w3.org/TR/REC-DOM-Level-1/ and +http://www.w3.org/TR/DOM-Level-2-Core/. +For a more general introduction of the DOM implementation see the +TQDomDocument documentation. +

See also XML. + +


Member Function Documentation

+

TQDomElement::TQDomElement () +

+Constructs an empty element. Use the TQDomDocument::createElement() +function to construct elements with content. + +

TQDomElement::TQDomElement ( const TQDomElement & x ) +

+Constructs a copy of x. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomElement::~TQDomElement () +

+Destroys the object and frees its resources. + +

TQString TQDomElement::attribute ( const TQString & name, const TQString & defValue = TQString::null ) const +

+Returns the attribute called name. If the attribute does not +exist defValue is returned. +

See also setAttribute(), attributeNode(), setAttributeNode(), and attributeNS(). + +

TQString TQDomElement::attributeNS ( const TQString nsURI, const TQString & localName, const TQString & defValue ) const +

+Returns the attribute with the local name localName and the +namespace URI nsURI. If the attribute does not exist defValue is returned. +

See also setAttributeNS(), attributeNodeNS(), setAttributeNodeNS(), and attribute(). + +

TQDomAttr TQDomElement::attributeNode ( const TQString & name ) +

+Returns the TQDomAttr object that corresponds to the attribute +called name. If no such attribute exists a null attribute is returned. +

See also setAttributeNode(), attribute(), setAttribute(), and attributeNodeNS(). + +

TQDomAttr TQDomElement::attributeNodeNS ( const TQString & nsURI, const TQString & localName ) +

+Returns the TQDomAttr object that corresponds to the attribute with +the local name localName and the namespace URI nsURI. If no +such attribute exists a null + attribute is returned. +

See also setAttributeNode(), attribute(), and setAttribute(). + +

TQDomNamedNodeMap TQDomElement::attributes () const [virtual] +

+Returns a TQDomNamedNodeMap containing all this element's attributes. +

See also attribute(), setAttribute(), attributeNode(), and setAttributeNode(). + +

Reimplemented from TQDomNode. +

TQDomNodeList TQDomElement::elementsByTagName ( const TQString & tagname ) const [virtual] +

+Returns a TQDomNodeList containing all descendent elements of this +element that are called tagname. The order they are in the node +list is the order they are encountered in a preorder traversal of +the element tree. +

See also elementsByTagNameNS() and TQDomDocument::elementsByTagName(). + +

TQDomNodeList TQDomElement::elementsByTagNameNS ( const TQString & nsURI, const TQString & localName ) const [virtual] +

+Returns a TQDomNodeList containing all the descendent elements of +this element with the local name localName and the namespace +URI nsURI. The order they are in the node list is the order +they are encountered in a preorder traversal of the element tree. +

See also elementsByTagName() and TQDomDocument::elementsByTagNameNS(). + +

bool TQDomElement::hasAttribute ( const TQString & name ) const +

+Returns TRUE if this element has an attribute called name; +otherwise returns FALSE. + +

bool TQDomElement::hasAttributeNS ( const TQString & nsURI, const TQString & localName ) const +

+Returns TRUE if this element has an attribute with the local name +localName and the namespace URI nsURI; otherwise returns +FALSE. + +

bool TQDomElement::isElement () const [virtual] +

+Returns TRUE. + +

Reimplemented from TQDomNode. +

TQDomNode::NodeType TQDomElement::nodeType () const [virtual] +

+Returns ElementNode. + +

Reimplemented from TQDomNode. +

TQDomElement & TQDomElement::operator= ( const TQDomElement & x ) +

+Assigns x to this DOM element. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

void TQDomElement::removeAttribute ( const TQString & name ) +

+Removes the attribute called name name from this element. +

See also setAttribute(), attribute(), and removeAttributeNS(). + +

void TQDomElement::removeAttributeNS ( const TQString & nsURI, const TQString & localName ) +

+Removes the attribute with the local name localName and the +namespace URI nsURI from this element. +

See also setAttributeNS(), attributeNS(), and removeAttribute(). + +

TQDomAttr TQDomElement::removeAttributeNode ( const TQDomAttr & oldAttr ) +

+Removes the attribute oldAttr from the element and returns it. +

See also attributeNode() and setAttributeNode(). + +

void TQDomElement::setAttribute ( const TQString & name, const TQString & value ) +

+Adds an attribute called name with value value. If an +attribute with the same name exists, its value is replaced by value. +

See also attribute(), setAttributeNode(), and setAttributeNS(). + +

void TQDomElement::setAttribute ( const TQString & name, int value ) +

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

+

void TQDomElement::setAttribute ( const TQString & name, uint value ) +

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

+

void TQDomElement::setAttribute ( const TQString & name, long value ) +

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

+

void TQDomElement::setAttribute ( const TQString & name, ulong value ) +

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

+

void TQDomElement::setAttribute ( const TQString & name, double value ) +

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

+

void TQDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, const TQString & value ) +

+Adds an attribute with the qualified name qName and the +namespace URI nsURI with the value value. If an attribute +with the same local name and namespace URI exists, its prefix is +replaced by the prefix of qName and its value is repaced by value. +

Although qName is the qualified name, the local name is used to +decide if an existing attribute's value should be replaced. +

See also attributeNS(), setAttributeNodeNS(), and setAttribute(). + +

void TQDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, int value ) +

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

+

void TQDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, uint value ) +

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

+

void TQDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, long value ) +

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

+

void TQDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, ulong value ) +

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

+

void TQDomElement::setAttributeNS ( const TQString nsURI, const TQString & qName, double value ) +

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

+

TQDomAttr TQDomElement::setAttributeNode ( const TQDomAttr & newAttr ) +

+Adds the attribute newAttr to this element. +

If the element has another attribute that has the same name as newAttr, this function replaces that attribute and returns it; +otherwise the function returns a null + attribute. +

See also attributeNode(), setAttribute(), and setAttributeNodeNS(). + +

TQDomAttr TQDomElement::setAttributeNodeNS ( const TQDomAttr & newAttr ) +

+Adds the attribute newAttr to this element. +

If the element has another attribute that has the same local name +and namespace URI as newAttr, this function replaces that +attribute and returns it; otherwise the function returns a null attribute. +

See also attributeNodeNS(), setAttributeNS(), and setAttributeNode(). + +

void TQDomElement::setTagName ( const TQString & name ) +

+Sets this element's tag name to name. +

See also tagName(). + +

TQString TQDomElement::tagName () const +

+Returns the tag name of this element. For an XML element like this: +
+    <img src="myimg.png">
+    
+ +the tagname would return "img". +

See also setTagName(). + +

TQString TQDomElement::text () const +

+Returns the element's text or TQString::null. +

Example: +

+    <h1>Hello <b>TQt</b> <![CDATA[<xml is cool>]]></h1>
+    
+ +

The function text() of the TQDomElement for the <h1> tag, +will return "Hello TQt <xml is cool>". +

Comments are ignored by this function. It only evaluates TQDomText +and TQDomCDATASection objects. + + +


+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/qdomentity-members.html b/doc/html/qdomentity-members.html new file mode 100644 index 00000000..ab84935f --- /dev/null +++ b/doc/html/qdomentity-members.html @@ -0,0 +1,110 @@ + + + + + +TQDomEntity Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomEntity

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomentity.html b/doc/html/qdomentity.html new file mode 100644 index 00000000..21a5ae50 --- /dev/null +++ b/doc/html/qdomentity.html @@ -0,0 +1,138 @@ + + + + + +TQDomEntity Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomEntity Class Reference
[XML module]

+ +

The TQDomEntity class represents an XML entity. +More... +

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

+

#include <qdom.h> +

Inherits TQDomNode. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDomEntity class represents an XML entity. + +

+ +

This class represents an entity in an XML document, either parsed +or unparsed. Note that this models the entity itself not the +entity declaration. +

DOM does not support editing entity nodes; if a user wants to make +changes to the contents of an entity, every related +TQDomEntityReference node must be replaced in the DOM tree by a +clone of the entity's contents, and then the desired changes must +be made to each of the clones instead. All the descendents of an +entity node are read-only. +

An entity node does not have any parent. +

You can access the entity's publicId(), systemId() and +notationName() when available. +

For further information about the Document Object Model see +http://www.w3.org/TR/REC-DOM-Level-1/ and +http://www.w3.org/TR/DOM-Level-2-Core/. +For a more general introduction of the DOM implementation see the +TQDomDocument documentation. +

See also XML. + +


Member Function Documentation

+

TQDomEntity::TQDomEntity () +

+Constructs an empty entity. + +

TQDomEntity::TQDomEntity ( const TQDomEntity & x ) +

+Constructs a copy of x. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomEntity::~TQDomEntity () +

+Destroys the object and frees its resources. + +

bool TQDomEntity::isEntity () const [virtual] +

+Returns TRUE. + +

Reimplemented from TQDomNode. +

TQDomNode::NodeType TQDomEntity::nodeType () const [virtual] +

+Returns EntityNode. + +

Reimplemented from TQDomNode. +

TQString TQDomEntity::notationName () const [virtual] +

+For unparsed entities this function returns the name of the +notation for the entity. For parsed entities this function returns +TQString::null. + +

TQDomEntity & TQDomEntity::operator= ( const TQDomEntity & x ) +

+Assigns x to this DOM entity. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQString TQDomEntity::publicId () const [virtual] +

+Returns the public identifier associated with this entity. If the +public identifier was not specified TQString::null is returned. + +

TQString TQDomEntity::systemId () const [virtual] +

+Returns the system identifier associated with this entity. If the +system identifier was not specified TQString::null is returned. + + +

+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/qdomentityreference-members.html b/doc/html/qdomentityreference-members.html new file mode 100644 index 00000000..d44ca558 --- /dev/null +++ b/doc/html/qdomentityreference-members.html @@ -0,0 +1,107 @@ + + + + + +TQDomEntityReference Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomEntityReference

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomentityreference.html b/doc/html/qdomentityreference.html new file mode 100644 index 00000000..3942bab8 --- /dev/null +++ b/doc/html/qdomentityreference.html @@ -0,0 +1,125 @@ + + + + + +TQDomEntityReference Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomEntityReference Class Reference
[XML module]

+ +

The TQDomEntityReference class represents an XML entity reference. +More... +

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

+

#include <qdom.h> +

Inherits TQDomNode. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDomEntityReference class represents an XML entity reference. + +

+ +

A TQDomEntityReference object may be inserted into the DOM tree +when an entity reference is in the source document, or when the +user wishes to insert an entity reference. +

Note that character references and references to predefined +entities are expanded by the XML processor so that characters are +represented by their Unicode equivalent rather than by an entity +reference. +

Moreover, the XML processor may completely expand references to +entities while building the DOM tree, instead of providing +TQDomEntityReference objects. +

If it does provide such objects, then for a given entity reference +node, it may be that there is no entity node representing the +referenced entity; but if such an entity exists, then the child +list of the entity reference node is the same as that of the +entity node. As with the entity node, all descendents of the +entity reference are read-only. +

For further information about the Document Object Model see +http://www.w3.org/TR/REC-DOM-Level-1/ and +http://www.w3.org/TR/DOM-Level-2-Core/. +For a more general introduction of the DOM implementation see the +TQDomDocument documentation. +

See also XML. + +


Member Function Documentation

+

TQDomEntityReference::TQDomEntityReference () +

+Constructs an empty entity reference. Use +TQDomDocument::createEntityReference() to create a entity reference +with content. + +

TQDomEntityReference::TQDomEntityReference ( const TQDomEntityReference & x ) +

+Constructs a copy of x. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomEntityReference::~TQDomEntityReference () +

+Destroys the object and frees its resources. + +

bool TQDomEntityReference::isEntityReference () const [virtual] +

+Returns TRUE. + +

Reimplemented from TQDomNode. +

TQDomNode::NodeType TQDomEntityReference::nodeType () const [virtual] +

+Returns EntityReference. + +

Reimplemented from TQDomNode. +

TQDomEntityReference & TQDomEntityReference::operator= ( const TQDomEntityReference & x ) +

+Assigns x to this entity reference. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + + +


+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/qdomimplementation-members.html b/doc/html/qdomimplementation-members.html new file mode 100644 index 00000000..5427c599 --- /dev/null +++ b/doc/html/qdomimplementation-members.html @@ -0,0 +1,55 @@ + + + + + +TQDomImplementation Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomImplementation

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomimplementation.html b/doc/html/qdomimplementation.html new file mode 100644 index 00000000..1265fbf8 --- /dev/null +++ b/doc/html/qdomimplementation.html @@ -0,0 +1,149 @@ + + + + + +TQDomImplementation Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomImplementation Class Reference
[XML module]

+ +

The TQDomImplementation class provides information about the +features of the DOM implementation. +More... +

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

+

#include <qdom.h> +

List of all member functions. +

Public Members

+
    +
  • TQDomImplementation ()
  • +
  • TQDomImplementation ( const TQDomImplementation & x )
  • +
  • virtual ~TQDomImplementation ()
  • +
  • TQDomImplementation & operator= ( const TQDomImplementation & x )
  • +
  • bool operator== ( const TQDomImplementation & x ) const
  • +
  • bool operator!= ( const TQDomImplementation & x ) const
  • +
  • virtual bool hasFeature ( const TQString & feature, const TQString & version )
  • +
  • virtual TQDomDocumentType createDocumentType ( const TQString & qName, const TQString & publicId, const TQString & systemId )
  • +
  • virtual TQDomDocument createDocument ( const TQString & nsURI, const TQString & qName, const TQDomDocumentType & doctype )
  • +
  • bool isNull ()
  • +
+

Detailed Description

+ + + +The TQDomImplementation class provides information about the +features of the DOM implementation. + +

+ +

This class describes the features that are supported by the DOM +implementation. Currently the XML subset of DOM Level 1 and DOM +Level 2 Core are supported. +

Normally you will use the function TQDomDocument::implementation() +to get the implementation object. +

You can create a new document type with createDocumentType() and a +new document with createDocument(). +

For further information about the Document Object Model see http://www.w3.org/TR/REC-DOM-Level-1/ and http://www.w3.org/TR/DOM-Level-2-Core/. For a more general +introduction of the DOM implementation see the TQDomDocument +documentation. +

See also hasFeature() and XML. + +


Member Function Documentation

+

TQDomImplementation::TQDomImplementation () +

+Constructs a TQDomImplementation object. + +

TQDomImplementation::TQDomImplementation ( const TQDomImplementation & x ) +

+Constructs a copy of x. + +

TQDomImplementation::~TQDomImplementation () [virtual] +

+Destroys the object and frees its resources. + +

TQDomDocument TQDomImplementation::createDocument ( const TQString & nsURI, const TQString & qName, const TQDomDocumentType & doctype ) [virtual] +

+Creates a DOM document with the document type doctype. This +function also adds a root element node with the qualified name qName and the namespace URI nsURI. + +

TQDomDocumentType TQDomImplementation::createDocumentType ( const TQString & qName, const TQString & publicId, const TQString & systemId ) [virtual] +

+Creates a document type node for the name qName. +

publicId specifies the public identifier of the external +subset. If you specify TQString::null as the publicId, this +means that the document type has no public identifier. +

systemId specifies the system identifier of the external +subset. If you specify TQString::null as the systemId, this +means that the document type has no system identifier. +

Since you cannot have a public identifier without a system +identifier, the public identifier is set to TQString::null if there +is no system identifier. +

DOM level 2 does not support any other document type declaration +features. +

The only way you can use a document type that was created this +way, is in combination with the createDocument() function to +create a TQDomDocument with this document type. +

See also createDocument(). + +

bool TQDomImplementation::hasFeature ( const TQString & feature, const TQString & version ) [virtual] +

+The function returns TRUE if TQDom implements the requested version of a feature; otherwise returns FALSE. +

The currently supported features and their versions: +

+
Feature Version +
XML 1.0 +
+ +

bool TQDomImplementation::isNull () +

+Returns FALSE if the object was created by +TQDomDocument::implementation(); otherwise returns TRUE. + +

bool TQDomImplementation::operator!= ( const TQDomImplementation & x ) const +

+Returns TRUE if x and this DOM implementation object were +created from different TQDomDocuments; otherwise returns FALSE. + +

TQDomImplementation & TQDomImplementation::operator= ( const TQDomImplementation & x ) +

+Assigns x to this DOM implementation. + +

bool TQDomImplementation::operator== ( const TQDomImplementation & x ) const +

+Returns TRUE if x and this DOM implementation object were +created from the same TQDomDocument; 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/qdomnamednodemap-members.html b/doc/html/qdomnamednodemap-members.html new file mode 100644 index 00000000..a3cfe0a8 --- /dev/null +++ b/doc/html/qdomnamednodemap-members.html @@ -0,0 +1,61 @@ + + + + + +TQDomNamedNodeMap Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomNamedNodeMap

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomnamednodemap.html b/doc/html/qdomnamednodemap.html new file mode 100644 index 00000000..700dab2c --- /dev/null +++ b/doc/html/qdomnamednodemap.html @@ -0,0 +1,200 @@ + + + + + +TQDomNamedNodeMap Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomNamedNodeMap Class Reference
[XML module]

+ +

The TQDomNamedNodeMap class contains a collection of nodes +that can be accessed by name. +More... +

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

+

#include <qdom.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDomNamedNodeMap class contains a collection of nodes +that can be accessed by name. + +

+ +

Note that TQDomNamedNodeMap does not inherit from TQDomNodeList. +TQDomNamedNodeMaps do not provide any specific node ordering. +Although nodes in a TQDomNamedNodeMap may be accessed by an ordinal +index, this is simply to allow a convenient enumeration of the +contents of a TQDomNamedNodeMap, and does not imply that the DOM +specifies an ordering of the nodes. +

The TQDomNamedNodeMap is used in three places: +

    +
  1. TQDomDocumentType::entities() returns a map of all entities +described in the DTD. +
  2. TQDomDocumentType::notations() returns a map of all notations +described in the DTD. +
  3. TQDomNode::attributes() returns a map of all attributes of an +element. +
+

Items in the map are identified by the name which TQDomNode::name() +returns. Nodes are retrieved using namedItem(), namedItemNS() or +item(). New nodes are inserted with setNamedItem() or +setNamedItemNS() and removed with removeNamedItem() or +removeNamedItemNS(). Use contains() to see if an item with the +given name is in the named node map. The number of items is +returned by length(). +

Terminology: in this class we use "item" and "node" +interchangeably. +

See also XML. + +


Member Function Documentation

+

TQDomNamedNodeMap::TQDomNamedNodeMap () +

+Constructs an empty named node map. + +

TQDomNamedNodeMap::TQDomNamedNodeMap ( const TQDomNamedNodeMap & n ) +

+Constructs a copy of n. + +

TQDomNamedNodeMap::~TQDomNamedNodeMap () +

+Destroys the object and frees its resources. + +

bool TQDomNamedNodeMap::contains ( const TQString & name ) const +

+Returns TRUE if the map contains a node called name; otherwise +returns FALSE. + +

uint TQDomNamedNodeMap::count () const +

+ +

Returns the number of nodes in the map. +

This function is the same as length(). + +

TQDomNode TQDomNamedNodeMap::item ( int index ) const +

+Retrieves the node at position index. +

This can be used to iterate over the map. Note that the nodes in +the map are ordered arbitrarily. +

See also length(). + +

uint TQDomNamedNodeMap::length () const +

+Returns the number of nodes in the map. +

See also item(). + +

TQDomNode TQDomNamedNodeMap::namedItem ( const TQString & name ) const +

+Returns the node called name. +

If the named node map does not contain such a node, a null node is returned. A node's name is +the name returned by TQDomNode::nodeName(). +

See also setNamedItem() and namedItemNS(). + +

TQDomNode TQDomNamedNodeMap::namedItemNS ( const TQString & nsURI, const TQString & localName ) const +

+Returns the node associated with the local name localName and +the namespace URI nsURI. +

If the map does not contain such a node, a null node is returned. +

See also setNamedItemNS() and namedItem(). + +

bool TQDomNamedNodeMap::operator!= ( const TQDomNamedNodeMap & n ) const +

+Returns TRUE if n and this named node map are not equal; +otherwise returns FALSE. + +

TQDomNamedNodeMap & TQDomNamedNodeMap::operator= ( const TQDomNamedNodeMap & n ) +

+Assigns n to this named node map. + +

bool TQDomNamedNodeMap::operator== ( const TQDomNamedNodeMap & n ) const +

+Returns TRUE if n and this named node map are equal; otherwise +returns FALSE. + +

TQDomNode TQDomNamedNodeMap::removeNamedItem ( const TQString & name ) +

+Removes the node called name from the map. +

The function returns the removed node or a null node if the map did not contain a +node called name. +

See also setNamedItem(), namedItem(), and removeNamedItemNS(). + +

TQDomNode TQDomNamedNodeMap::removeNamedItemNS ( const TQString & nsURI, const TQString & localName ) +

+Removes the node with the local name localName and the +namespace URI nsURI from the map. +

The function returns the removed node or a null node if the map did not contain a +node with the local name localName and the namespace URI nsURI. +

See also setNamedItemNS(), namedItemNS(), and removeNamedItem(). + +

TQDomNode TQDomNamedNodeMap::setNamedItem ( const TQDomNode & newNode ) +

+Inserts the node newNode into the named node map. The name used +by the map is the node name of newNode as returned by +TQDomNode::nodeName(). +

If the new node replaces an existing node, i.e. the map contains a +node with the same name, the replaced node is returned. +

See also namedItem(), removeNamedItem(), and setNamedItemNS(). + +

TQDomNode TQDomNamedNodeMap::setNamedItemNS ( const TQDomNode & newNode ) +

+Inserts the node newNode in the map. If a node with the same +namespace URI and the same local name already exists in the map, +it is replaced by newNode. If the new node replaces an existing +node, the replaced node is returned. +

See also namedItemNS(), removeNamedItemNS(), and setNamedItem(). + + +


+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/qdomnode-members.html b/doc/html/qdomnode-members.html new file mode 100644 index 00000000..fed0a20f --- /dev/null +++ b/doc/html/qdomnode-members.html @@ -0,0 +1,107 @@ + + + + + +TQDomNode Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomNode

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomnode.html b/doc/html/qdomnode.html new file mode 100644 index 00000000..cfb31d8f --- /dev/null +++ b/doc/html/qdomnode.html @@ -0,0 +1,741 @@ + + + + + +TQDomNode Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomNode Class Reference
[XML module]

+ +

The TQDomNode class is the base class for all the nodes in a DOM tree. +More... +

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

+

#include <qdom.h> +

Inherited by TQDomDocumentType, TQDomDocument, TQDomDocumentFragment, TQDomCharacterData, TQDomAttr, TQDomElement, TQDomNotation, TQDomEntity, TQDomEntityReference, and TQDomProcessingInstruction. +

List of all member functions. +

Public Members

+ +

Related Functions

+
    +
  • TQTextStream & operator<< ( TQTextStream & str, const TQDomNode & node )
  • +
+

Detailed Description

+ + + +The TQDomNode class is the base class for all the nodes in a DOM tree. + +

+ +

Many functions in the DOM return a TQDomNode. +

You can find out the type of a node using isAttr(), +isCDATASection(), isDocumentFragment(), isDocument(), +isDocumentType(), isElement(), isEntityReference(), isText(), +isEntity(), isNotation(), isProcessingInstruction(), +isCharacterData() and isComment(). +

A TQDomNode can be converted into one of its subclasses using +toAttr(), toCDATASection(), toDocumentFragment(), toDocument(), +toDocumentType(), toElement(), toEntityReference(), toText(), +toEntity(), toNotation(), toProcessingInstruction(), +toCharacterData() or toComment(). You can convert a node to a null +node with clear(). +

Copies of the TQDomNode class share their data using explicit sharing. This means that modifying one node will change all +copies. This is especially useful in combination with functions +which return a TQDomNode, e.g. firstChild(). You can make an +independent (deep) copy of the node with cloneNode(). +

Nodes are inserted with insertBefore(), insertAfter() or +appendChild(). You can replace one node with another using +replaceChild() and remove a node with removeChild(). +

To traverse nodes use firstChild() to get a node's first child (if +any), and nextSibling() to traverse. TQDomNode also provides +lastChild(), previousSibling() and parentNode(). To find the first +child node with a particular node name use namedItem(). +

To find out if a node has children use hasChildNodes() and to get +a list of all of a node's children use childNodes(). +

The node's name and value (the meaning of which varies depending +on its type) is returned by nodeName() and nodeValue() +respectively. The node's type is returned by nodeType(). The +node's value can be set with setNodeValue(). +

The document to which the node belongs is returned by +ownerDocument(). +

Adjacent TQDomText nodes can be merged into a single node with +normalize(). +

TQDomElement nodes have attributes which can be retrieved with +attributes(). +

TQDomElement and TQDomAttr nodes can have namespaces which can be +retrieved with namespaceURI(). Their local name is retrieved with +localName(), and their prefix with prefix(). The prefix can be set +with setPrefix(). +

You can write the XML representation of the node to a text stream +with save(). +

The following example looks for the first element in an XML document and +prints the names of all the elements that are its direct children. +

+    TQDomDocument d;
+    d.setContent( someXML );
+    TQDomNode n = d.firstChild();
+    while ( !n.isNull() ) {
+        if ( n.isElement() ) {
+            TQDomElement e = n.toElement();
+            cout << "Element name: " << e.tagName() << endl;
+            break;
+        }
+        n = n.nextSibling();
+    }
+    
+ +

For further information about the Document Object Model see http://www.w3.org/TR/REC-DOM-Level-1/ and http://www.w3.org/TR/DOM-Level-2-Core/. For a more general +introduction of the DOM implementation see the TQDomDocument +documentation. +

See also XML. + +


Member Type Documentation

+

TQDomNode::NodeType

+ +

This enum defines the type of the node: +

    +
  • TQDomNode::ElementNode +
  • TQDomNode::AttributeNode +
  • TQDomNode::TextNode +
  • TQDomNode::CDATASectionNode +
  • TQDomNode::EntityReferenceNode +
  • TQDomNode::EntityNode +
  • TQDomNode::ProcessingInstructionNode +
  • TQDomNode::CommentNode +
  • TQDomNode::DocumentNode +
  • TQDomNode::DocumentTypeNode +
  • TQDomNode::DocumentFragmentNode +
  • TQDomNode::NotationNode +
  • TQDomNode::BaseNode - A TQDomNode object, i.e. not a TQDomNode subclass. +
  • TQDomNode::CharacterDataNode +
+

Member Function Documentation

+

TQDomNode::TQDomNode () +

+Constructs a null node. + +

TQDomNode::TQDomNode ( const TQDomNode & n ) +

+Constructs a copy of n. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomNode::~TQDomNode () [virtual] +

+Destroys the object and frees its resources. + +

TQDomNode TQDomNode::appendChild ( const TQDomNode & newChild ) [virtual] +

+Appends newChild as the node's last child. +

If newChild is the child of another node, it is reparented to +this node. If newChild is a child of this node, then its +position in the list of children is changed. +

If newChild is a TQDomDocumentFragment, then the children of the +fragment are removed from the fragment and appended. +

Returns a new reference to newChild. +

See also insertBefore(), insertAfter(), replaceChild(), and removeChild(). + +

TQDomNamedNodeMap TQDomNode::attributes () const [virtual] +

+Returns a named node map of all attributes. Attributes are only +provided for TQDomElements. +

Changing the attributes in the map will also change the attributes +of this TQDomNode. + +

Reimplemented in TQDomElement. +

TQDomNodeList TQDomNode::childNodes () const [virtual] +

+Returns a list of all direct child nodes. +

Most often you will call this function on a TQDomElement object. +

For example, if the XML document looks like this: +

+    <body>
+    <h1>Heading</h1>
+    <p>Hello <b>you</b></p>
+    </body>
+    
+ +Then the list of child nodes for the "body"-element will contain +the node created by the <h1> tag and the node created by the +<p> tag. +

The nodes in the list are not copied; so changing the nodes in the +list will also change the children of this node. +

See also firstChild() and lastChild(). + +

void TQDomNode::clear () +

+Converts the node into a null node; if it was not a null node +before, its type and contents are deleted. +

See also isNull(). + +

TQDomNode TQDomNode::cloneNode ( bool deep = TRUE ) const [virtual] +

+Creates a deep (not shallow) copy of the TQDomNode. +

If deep is TRUE, then the cloning is done recursively which +means that all the node's children are deep copied too. If deep +is FALSE only the node itself is copied and the copy will have no +child nodes. + +

TQDomNode TQDomNode::firstChild () const [virtual] +

+Returns the first child of the node. If there is no child node, a +null node is returned. Changing the +returned node will also change the node in the document tree. +

See also lastChild() and childNodes(). + +

Example: xml/outliner/outlinetree.cpp. +

bool TQDomNode::hasAttributes () const [virtual] +

+Returns TRUE if the node has attributes; otherwise returns FALSE. +

See also attributes(). + +

bool TQDomNode::hasChildNodes () const [virtual] +

+Returns TRUE if the node has one or more children; otherwise +returns FALSE. + +

TQDomNode TQDomNode::insertAfter ( const TQDomNode & newChild, const TQDomNode & refChild ) [virtual] +

+Inserts the node newChild after the child node refChild. refChild must be a direct child of this node. If refChild is +null then newChild is appended as this +node's last child. +

If newChild is the child of another node, it is reparented to +this node. If newChild is a child of this node, then its +position in the list of children is changed. +

If newChild is a TQDomDocumentFragment, then the children of the +fragment are removed from the fragment and inserted after refChild. +

Returns a new reference to newChild on success or a null node on failure. +

See also insertBefore(), replaceChild(), removeChild(), and appendChild(). + +

TQDomNode TQDomNode::insertBefore ( const TQDomNode & newChild, const TQDomNode & refChild ) [virtual] +

+Inserts the node newChild before the child node refChild. +refChild must be a direct child of this node. If refChild is +null then newChild is inserted as the +node's first child. +

If newChild is the child of another node, it is reparented to +this node. If newChild is a child of this node, then its +position in the list of children is changed. +

If newChild is a TQDomDocumentFragment, then the children of the +fragment are removed from the fragment and inserted before refChild. +

Returns a new reference to newChild on success or a null node on failure. +

See also insertAfter(), replaceChild(), removeChild(), and appendChild(). + +

bool TQDomNode::isAttr () const [virtual] +

+Returns TRUE if the node is an attribute; otherwise returns FALSE. +

If this function returns TRUE, it does not imply that this object +is a TQDomAttribute; you can get the TQDomAttribute with +toAttribute(). +

See also toAttr(). + +

Reimplemented in TQDomAttr. +

bool TQDomNode::isCDATASection () const [virtual] +

+Returns TRUE if the node is a CDATA section; otherwise returns +FALSE. +

If this function returns TRUE, it does not imply that this object +is a TQDomCDATASection; you can get the TQDomCDATASection with +toCDATASection(). +

See also toCDATASection(). + +

Reimplemented in TQDomCDATASection. +

bool TQDomNode::isCharacterData () const [virtual] +

+Returns TRUE if the node is a character data node; otherwise +returns FALSE. +

If this function returns TRUE, it does not imply that this object +is a TQDomCharacterData; you can get the TQDomCharacterData with +toCharacterData(). +

See also toCharacterData(). + +

Reimplemented in TQDomCharacterData. +

bool TQDomNode::isComment () const [virtual] +

+Returns TRUE if the node is a comment; otherwise returns FALSE. +

If this function returns TRUE, it does not imply that this object +is a TQDomComment; you can get the TQDomComment with toComment(). +

See also toComment(). + +

Reimplemented in TQDomComment. +

bool TQDomNode::isDocument () const [virtual] +

+Returns TRUE if the node is a document; otherwise returns FALSE. +

If this function returns TRUE, it does not imply that this object +is a TQDomDocument; you can get the TQDomDocument with toDocument(). +

See also toDocument(). + +

Reimplemented in TQDomDocument. +

bool TQDomNode::isDocumentFragment () const [virtual] +

+Returns TRUE if the node is a document fragment; otherwise returns +FALSE. +

If this function returns TRUE, it does not imply that this object +is a TQDomDocumentFragment; you can get the TQDomDocumentFragment +with toDocumentFragment(). +

See also toDocumentFragment(). + +

Reimplemented in TQDomDocumentFragment. +

bool TQDomNode::isDocumentType () const [virtual] +

+Returns TRUE if the node is a document type; otherwise returns +FALSE. +

If this function returns TRUE, it does not imply that this object +is a TQDomDocumentType; you can get the TQDomDocumentType with +toDocumentType(). +

See also toDocumentType(). + +

Reimplemented in TQDomDocumentType. +

bool TQDomNode::isElement () const [virtual] +

+Returns TRUE if the node is an element; otherwise returns FALSE. +

If this function returns TRUE, it does not imply that this object +is a TQDomElement; you can get the TQDomElement with toElement(). +

See also toElement(). + +

Example: xml/outliner/outlinetree.cpp. +

Reimplemented in TQDomElement. +

bool TQDomNode::isEntity () const [virtual] +

+Returns TRUE if the node is an entity; otherwise returns FALSE. +

If this function returns TRUE, it does not imply that this object +is a TQDomEntity; you can get the TQDomEntity with toEntity(). +

See also toEntity(). + +

Reimplemented in TQDomEntity. +

bool TQDomNode::isEntityReference () const [virtual] +

+Returns TRUE if the node is an entity reference; otherwise returns +FALSE. +

If this function returns TRUE, it does not imply that this object +is a TQDomEntityReference; you can get the TQDomEntityReference with +toEntityReference(). +

See also toEntityReference(). + +

Reimplemented in TQDomEntityReference. +

bool TQDomNode::isNotation () const [virtual] +

+Returns TRUE if the node is a notation; otherwise returns FALSE. +

If this function returns TRUE, it does not imply that this object +is a TQDomNotation; you can get the TQDomNotation with toNotation(). +

See also toNotation(). + +

Reimplemented in TQDomNotation. +

bool TQDomNode::isNull () const +

+Returns TRUE if this node is null (i.e. if it has no type or +contents); otherwise returns FALSE. + +

Example: xml/outliner/outlinetree.cpp. +

bool TQDomNode::isProcessingInstruction () const [virtual] +

+Returns TRUE if the node is a processing instruction; otherwise +returns FALSE. +

If this function returns TRUE, it does not imply that this object +is a TQDomProcessingInstruction; you can get the +TQProcessingInstruction with toProcessingInstruction(). +

See also toProcessingInstruction(). + +

Reimplemented in TQDomProcessingInstruction. +

bool TQDomNode::isSupported ( const TQString & feature, const TQString & version ) const [virtual] +

+Returns TRUE if the DOM implementation implements the feature feature and this feature is supported by this node in the version +version; otherwise returns FALSE. +

See also TQDomImplementation::hasFeature(). + +

bool TQDomNode::isText () const [virtual] +

+Returns TRUE if the node is a text node; otherwise returns FALSE. +

If this function returns TRUE, it does not imply that this object +is a TQDomText; you can get the TQDomText with toText(). +

See also toText(). + +

Reimplemented in TQDomText. +

TQDomNode TQDomNode::lastChild () const [virtual] +

+Returns the last child of the node. If there is no child node, a +null node is returned. Changing the +returned node will also change the node in the document tree. +

See also firstChild() and childNodes(). + +

TQString TQDomNode::localName () const [virtual] +

+If the node uses namespaces, this function returns the local name +of the node; otherwise it returns TQString::null. +

Only nodes of type ElementNode or +AttributeNode can have +namespaces. A namespace must have been specified at creation time; +it is not possible to add a namespace afterwards. +

See also prefix(), namespaceURI(), TQDomDocument::createElementNS(), and TQDomDocument::createAttributeNS(). + +

TQDomNode TQDomNode::namedItem ( const TQString & name ) const +

+Returns the first direct child node for which nodeName() equals name. +

If no such direct child exists, a null node +is returned. +

See also nodeName(). + +

TQString TQDomNode::namespaceURI () const [virtual] +

+Returns the namespace URI of this node or TQString::null if the +node has no namespace URI. +

Only nodes of type ElementNode or +AttributeNode can have +namespaces. A namespace URI must be specified at creation time and +cannot be changed later. +

See also prefix(), localName(), TQDomDocument::createElementNS(), and TQDomDocument::createAttributeNS(). + +

TQDomNode TQDomNode::nextSibling () const [virtual] +

+Returns the next sibling in the document tree. Changing the +returned node will also change the node in the document tree. +

If you have XML like this: +

+    <h1>Heading</h1>
+    <p>The text...</p>
+    <h2>Next heading</h2>
+    
+ +and this TQDomNode represents the <p> tag, nextSibling() will +return the node representing the <h2> tag. +

See also previousSibling(). + +

Example: xml/outliner/outlinetree.cpp. +

TQString TQDomNode::nodeName () const [virtual] +

+Returns the name of the node. +

The meaning of the name depends on the subclass: +

+
Name Meaning +
TQDomAttr The name of the attribute +
TQDomCDATASection The string "#cdata-section" +
TQDomComment The string "#comment" +
TQDomDocument The string "#document" +
TQDomDocumentFragment The string "#document-fragment" +
TQDomDocumentType The name of the document type +
TQDomElement The tag name +
TQDomEntity The name of the entity +
TQDomEntityReference The name of the referenced entity +
TQDomNotation The name of the notation +
TQDomProcessingInstruction The target of the processing instruction +
TQDomText The string "#text" +
+

See also nodeValue(). + +

Example: xml/outliner/outlinetree.cpp. +

TQDomNode::NodeType TQDomNode::nodeType () const [virtual] +

+Returns the type of the node. +

See also toAttr(), toCDATASection(), toDocumentFragment(), toDocument(), toDocumentType(), toElement(), toEntityReference(), toText(), toEntity(), toNotation(), toProcessingInstruction(), toCharacterData(), and toComment(). + +

Reimplemented in TQDomDocumentType, TQDomDocument, TQDomDocumentFragment, TQDomCharacterData, TQDomAttr, TQDomElement, TQDomNotation, TQDomEntity, TQDomEntityReference, and TQDomProcessingInstruction. +

TQString TQDomNode::nodeValue () const [virtual] +

+Returns the value of the node. +

The meaning of the value depends on the subclass: +

+
Name Meaning +
TQDomAttr The attribute value +
TQDomCDATASection The content of the CDATA section +
TQDomComment The comment +
TQDomProcessingInstruction The data of the processing intruction +
TQDomText The text +
+

All the other subclasses do not have a node value and will return +TQString::null. +

See also setNodeValue() and nodeName(). + +

Example: xml/outliner/outlinetree.cpp. +

void TQDomNode::normalize () [virtual] +

+Calling normalize() on an element converts all its children into a +standard form. This means that adjacent TQDomText objects will be +merged into a single text object (TQDomCDATASection nodes are not +merged). + +

bool TQDomNode::operator!= ( const TQDomNode & n ) const +

+Returns TRUE if n and this DOM node are not equal; otherwise +returns FALSE. + +

TQDomNode & TQDomNode::operator= ( const TQDomNode & n ) +

+Assigns a copy of n to this DOM node. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

bool TQDomNode::operator== ( const TQDomNode & n ) const +

+Returns TRUE if n and this DOM node are equal; otherwise +returns FALSE. + +

TQDomDocument TQDomNode::ownerDocument () const [virtual] +

+Returns the document to which this node belongs. + +

TQDomNode TQDomNode::parentNode () const [virtual] +

+Returns the parent node. If this node has no parent, a null node +is returned (i.e. a node for which isNull() returns TRUE). + +

TQString TQDomNode::prefix () const [virtual] +

+Returns the namespace prefix of the node or TQString::null if the +node has no namespace prefix. +

Only nodes of type ElementNode or +AttributeNode can have +namespaces. A namespace prefix must be specified at creation time. +If a node was created with a namespace prefix, you can change it +later with setPrefix(). +

If you create an element or attribute with +TQDomDocument::createElement() or TQDomDocument::createAttribute(), +the prefix will be TQString::null. If you use +TQDomDocument::createElementNS() or +TQDomDocument::createAttributeNS() instead, the prefix will not be +TQString::null; but it might be an empty string if the name does +not have a prefix. +

See also setPrefix(), localName(), namespaceURI(), TQDomDocument::createElementNS(), and TQDomDocument::createAttributeNS(). + +

TQDomNode TQDomNode::previousSibling () const [virtual] +

+Returns the previous sibling in the document tree. Changing the +returned node will also change the node in the document tree. +

For example, if you have XML like this: +

+    <h1>Heading</h1>
+    <p>The text...</p>
+    <h2>Next heading</h2>
+    
+ +and this TQDomNode represents the <p> tag, previousSibling() +will return the node representing the <h1> tag. +

See also nextSibling(). + +

TQDomNode TQDomNode::removeChild ( const TQDomNode & oldChild ) [virtual] +

+Removes oldChild from the list of children. oldChild must be +a direct child of this node. +

Returns a new reference to oldChild on success or a null node on failure. +

See also insertBefore(), insertAfter(), replaceChild(), and appendChild(). + +

TQDomNode TQDomNode::replaceChild ( const TQDomNode & newChild, const TQDomNode & oldChild ) [virtual] +

+Replaces oldChild with newChild. oldChild must be a +direct child of this node. +

If newChild is the child of another node, it is reparented to +this node. If newChild is a child of this node, then its +position in the list of children is changed. +

If newChild is a TQDomDocumentFragment, then oldChild is +replaced by all of the children of the fragment. +

Returns a new reference to oldChild on success or a null node an failure. +

See also insertBefore(), insertAfter(), removeChild(), and appendChild(). + +

void TQDomNode::save ( TQTextStream & str, int indent ) const +

+Writes the XML representation of the node and all its children to +the stream str. This function uses indent as the amount of +space to indent the node. + +

void TQDomNode::setNodeValue ( const TQString & v ) [virtual] +

+Sets the node's value to v. +

See also nodeValue(). + +

void TQDomNode::setPrefix ( const TQString & pre ) [virtual] +

+If the node has a namespace prefix, this function changes the +namespace prefix of the node to pre. Otherwise this function +does nothing. +

Only nodes of type ElementNode or +AttributeNode can have +namespaces. A namespace prefix must have be specified at creation +time; it is not possible to add a namespace prefix afterwards. +

See also prefix(), localName(), namespaceURI(), TQDomDocument::createElementNS(), and TQDomDocument::createAttributeNS(). + +

TQDomAttr TQDomNode::toAttr () +

+Converts a TQDomNode into a TQDomAttr. If the node is not an +attribute, the returned object will be null. +

See also isAttr(). + +

TQDomCDATASection TQDomNode::toCDATASection () +

+Converts a TQDomNode into a TQDomCDATASection. If the node is not a +CDATA section, the returned object will be null. +

See also isCDATASection(). + +

TQDomCharacterData TQDomNode::toCharacterData () +

+Converts a TQDomNode into a TQDomCharacterData. If the node is not a +character data node the returned object will be null. +

See also isCharacterData(). + +

TQDomComment TQDomNode::toComment () +

+Converts a TQDomNode into a TQDomComment. If the node is not a +comment the returned object will be null. +

See also isComment(). + +

TQDomDocument TQDomNode::toDocument () +

+Converts a TQDomNode into a TQDomDocument. If the node is not a +document the returned object will be null. +

See also isDocument(). + +

TQDomDocumentFragment TQDomNode::toDocumentFragment () +

+Converts a TQDomNode into a TQDomDocumentFragment. If the node is +not a document fragment the returned object will be null. +

See also isDocumentFragment(). + +

TQDomDocumentType TQDomNode::toDocumentType () +

+Converts a TQDomNode into a TQDomDocumentType. If the node is not a +document type the returned object will be null. +

See also isDocumentType(). + +

TQDomElement TQDomNode::toElement () +

+Converts a TQDomNode into a TQDomElement. If the node is not an +element the returned object will be null. +

See also isElement(). + +

Example: xml/outliner/outlinetree.cpp. +

TQDomEntity TQDomNode::toEntity () +

+Converts a TQDomNode into a TQDomEntity. If the node is not an +entity the returned object will be null. +

See also isEntity(). + +

TQDomEntityReference TQDomNode::toEntityReference () +

+Converts a TQDomNode into a TQDomEntityReference. If the node is not +an entity reference, the returned object will be null. +

See also isEntityReference(). + +

TQDomNotation TQDomNode::toNotation () +

+Converts a TQDomNode into a TQDomNotation. If the node is not a +notation the returned object will be null. +

See also isNotation(). + +

TQDomProcessingInstruction TQDomNode::toProcessingInstruction () +

+Converts a TQDomNode into a TQDomProcessingInstruction. If the node +is not a processing instruction the returned object will be null. +

See also isProcessingInstruction(). + +

TQDomText TQDomNode::toText () +

+Converts a TQDomNode into a TQDomText. If the node is not a text, +the returned object will be null. +

See also isText(). + +


Related Functions

+

TQTextStream & operator<< ( TQTextStream & str, const TQDomNode & node ) +

+ +

Writes the XML representation of the node node and all its +children to the stream str. + + +


+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/qdomnodelist-members.html b/doc/html/qdomnodelist-members.html new file mode 100644 index 00000000..db10b0d5 --- /dev/null +++ b/doc/html/qdomnodelist-members.html @@ -0,0 +1,54 @@ + + + + + +TQDomNodeList Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomNodeList

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomnodelist.html b/doc/html/qdomnodelist.html new file mode 100644 index 00000000..a3050b42 --- /dev/null +++ b/doc/html/qdomnodelist.html @@ -0,0 +1,127 @@ + + + + + +TQDomNodeList Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomNodeList Class Reference
[XML module]

+ +

The TQDomNodeList class is a list of TQDomNode objects. +More... +

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

+

#include <qdom.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDomNodeList class is a list of TQDomNode objects. + +

+ +

Lists can be obtained by TQDomDocument::elementsByTagName() and +TQDomNode::childNodes(). The Document Object Model (DOM) retquires +these lists to be "live": whenever you change the underlying +document, the contents of the list will get updated. +

You can get a particular node from the list with item(). The +number of items in the list is returned by count() (and by +length()). +

For further information about the Document Object Model see http://www.w3.org/TR/REC-DOM-Level-1/ and http://www.w3.org/TR/DOM-Level-2-Core/. For a more general +introduction of the DOM implementation see the TQDomDocument +documentation. +

See also TQDomNode::childNodes(), TQDomDocument::elementsByTagName(), and XML. + +


Member Function Documentation

+

TQDomNodeList::TQDomNodeList () +

+Creates an empty node list. + +

TQDomNodeList::TQDomNodeList ( const TQDomNodeList & n ) +

+Constructs a copy of n. + +

TQDomNodeList::~TQDomNodeList () [virtual] +

+Destroys the object and frees its resources. + +

uint TQDomNodeList::count () const +

+ +

Returns the number of nodes in the list. +

This function is the same as length(). + +

TQDomNode TQDomNodeList::item ( int index ) const [virtual] +

+Returns the node at position index. +

If index is negative or if index >= length() then a null +node is returned (i.e. a node for which TQDomNode::isNull() returns +TRUE). +

See also count(). + +

uint TQDomNodeList::length () const [virtual] +

+Returns the number of nodes in the list. +

This function is the same as count(). + +

bool TQDomNodeList::operator!= ( const TQDomNodeList & n ) const +

+Returns TRUE the node list n and this node list are not equal; +otherwise returns FALSE. + +

TQDomNodeList & TQDomNodeList::operator= ( const TQDomNodeList & n ) +

+Assigns n to this node list. + +

bool TQDomNodeList::operator== ( const TQDomNodeList & n ) const +

+Returns TRUE if the node list n and this node list are equal; +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/qdomnotation-members.html b/doc/html/qdomnotation-members.html new file mode 100644 index 00000000..1c2e9bec --- /dev/null +++ b/doc/html/qdomnotation-members.html @@ -0,0 +1,109 @@ + + + + + +TQDomNotation Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomNotation

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomnotation.html b/doc/html/qdomnotation.html new file mode 100644 index 00000000..2ff72007 --- /dev/null +++ b/doc/html/qdomnotation.html @@ -0,0 +1,126 @@ + + + + + +TQDomNotation Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomNotation Class Reference
[XML module]

+ +

The TQDomNotation class represents an XML notation. +More... +

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

+

#include <qdom.h> +

Inherits TQDomNode. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDomNotation class represents an XML notation. + +

+ +

A notation either declares, by name, the format of an unparsed +entity (see section 4.7 of the XML 1.0 specification), or is used +for formal declaration of processing instruction targets (see +section 2.6 of the XML 1.0 specification). +

DOM does not support editing notation nodes; they are therefore +read-only. +

A notation node does not have any parent. +

You can retrieve the publicId() and systemId() from a notation +node. +

For further information about the Document Object Model see +http://www.w3.org/TR/REC-DOM-Level-1/ and +http://www.w3.org/TR/DOM-Level-2-Core/. +For a more general introduction of the DOM implementation see the +TQDomDocument documentation. +

See also XML. + +


Member Function Documentation

+

TQDomNotation::TQDomNotation () +

+Constructor. + +

TQDomNotation::TQDomNotation ( const TQDomNotation & x ) +

+Constructs a copy of x. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomNotation::~TQDomNotation () +

+Destroys the object and frees its resources. + +

bool TQDomNotation::isNotation () const [virtual] +

+Returns TRUE. + +

Reimplemented from TQDomNode. +

TQDomNode::NodeType TQDomNotation::nodeType () const [virtual] +

+Returns NotationNode. + +

Reimplemented from TQDomNode. +

TQDomNotation & TQDomNotation::operator= ( const TQDomNotation & x ) +

+Assigns x to this DOM notation. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQString TQDomNotation::publicId () const +

+Returns the public identifier of this notation. + +

TQString TQDomNotation::systemId () const +

+Returns the system identifier of this notation. + + +

+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/qdomprocessinginstruction-members.html b/doc/html/qdomprocessinginstruction-members.html new file mode 100644 index 00000000..7cbd81b8 --- /dev/null +++ b/doc/html/qdomprocessinginstruction-members.html @@ -0,0 +1,110 @@ + + + + + +TQDomProcessingInstruction Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomProcessingInstruction

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomprocessinginstruction.html b/doc/html/qdomprocessinginstruction.html new file mode 100644 index 00000000..17ccf639 --- /dev/null +++ b/doc/html/qdomprocessinginstruction.html @@ -0,0 +1,134 @@ + + + + + +TQDomProcessingInstruction Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomProcessingInstruction Class Reference
[XML module]

+ +

The TQDomProcessingInstruction class represents an XML processing +instruction. +More... +

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

+

#include <qdom.h> +

Inherits TQDomNode. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDomProcessingInstruction class represents an XML processing +instruction. + +

+ +

Processing instructions are used in XML to keep processor-specific +information in the text of the document. +

The content of the processing instruction is retrieved with data() +and set with setData(). The processing instruction's target is +retrieved with target(). +

For further information about the Document Object Model see +http://www.w3.org/TR/REC-DOM-Level-1/ and +http://www.w3.org/TR/DOM-Level-2-Core/. +For a more general introduction of the DOM implementation see the +TQDomDocument documentation. +

See also XML. + +


Member Function Documentation

+

TQDomProcessingInstruction::TQDomProcessingInstruction () +

+Constructs an empty processing instruction. Use +TQDomDocument::createProcessingInstruction() to create a processing +instruction with content. + +

TQDomProcessingInstruction::TQDomProcessingInstruction ( const TQDomProcessingInstruction & x ) +

+Constructs a copy of x. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomProcessingInstruction::~TQDomProcessingInstruction () +

+Destroys the object and frees its resources. + +

TQString TQDomProcessingInstruction::data () const [virtual] +

+Returns the content of this processing instruction. +

See also setData() and target(). + +

bool TQDomProcessingInstruction::isProcessingInstruction () const [virtual] +

+Returns TRUE. + +

Reimplemented from TQDomNode. +

TQDomNode::NodeType TQDomProcessingInstruction::nodeType () const [virtual] +

+Returns ProcessingInstructionNode. + +

Reimplemented from TQDomNode. +

TQDomProcessingInstruction & TQDomProcessingInstruction::operator= ( const TQDomProcessingInstruction & x ) +

+Assigns x to this processing instruction. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

void TQDomProcessingInstruction::setData ( const TQString & d ) [virtual] +

+Sets the data contained in the processing instruction to d. +

See also data(). + +

TQString TQDomProcessingInstruction::target () const [virtual] +

+Returns the target of this processing instruction. +

See also data(). + + +


+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/qdomtext-members.html b/doc/html/qdomtext-members.html new file mode 100644 index 00000000..ca1f1e40 --- /dev/null +++ b/doc/html/qdomtext-members.html @@ -0,0 +1,116 @@ + + + + + +TQDomText Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDomText

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdomtext.html b/doc/html/qdomtext.html new file mode 100644 index 00000000..4af46635 --- /dev/null +++ b/doc/html/qdomtext.html @@ -0,0 +1,122 @@ + + + + + +TQDomText Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDomText Class Reference
[XML module]

+ +

The TQDomText class represents text data in the parsed XML document. +More... +

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

+

#include <qdom.h> +

Inherits TQDomCharacterData. +

Inherited by TQDomCDATASection. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQDomText class represents text data in the parsed XML document. + +

+ +

You can split the text in a TQDomText object over two TQDomText +objecs with splitText(). +

For further information about the Document Object Model see +http://www.w3.org/TR/REC-DOM-Level-1/ and +http://www.w3.org/TR/DOM-Level-2-Core/. +For a more general introduction of the DOM implementation see the +TQDomDocument documentation. +

See also XML. + +


Member Function Documentation

+

TQDomText::TQDomText () +

+Constructs an empty TQDomText object. +

To construct a TQDomText with content, use TQDomDocument::createTextNode(). + +

TQDomText::TQDomText ( const TQDomText & x ) +

+Constructs a copy of x. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomText::~TQDomText () +

+Destroys the object and frees its resources. + +

bool TQDomText::isText () const [virtual] +

+Returns TRUE. + +

Reimplemented from TQDomNode. +

TQDomNode::NodeType TQDomText::nodeType () const [virtual] +

+Returns TextNode. + +

Reimplemented from TQDomCharacterData. +

Reimplemented in TQDomCDATASection. +

TQDomText & TQDomText::operator= ( const TQDomText & x ) +

+Assigns x to this DOM text. +

The data of the copy is shared (shallow copy): modifying one node +will also change the other. If you want to make a deep copy, use +cloneNode(). + +

TQDomText TQDomText::splitText ( int offset ) +

+Splits this DOM text object into two TQDomText objects. This object +keeps its first offset characters and the second (newly +created) object is inserted into the document tree after this +object with the remaining characters. +

The function returns the newly created object. +

See also TQDomNode::normalize(). + + +


+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/qdoublevalidator-members.html b/doc/html/qdoublevalidator-members.html new file mode 100644 index 00000000..dc7f9513 --- /dev/null +++ b/doc/html/qdoublevalidator-members.html @@ -0,0 +1,99 @@ + + + + + +TQDoubleValidator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDoubleValidator

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdoublevalidator.html b/doc/html/qdoublevalidator.html new file mode 100644 index 00000000..d9d46e24 --- /dev/null +++ b/doc/html/qdoublevalidator.html @@ -0,0 +1,151 @@ + + + + + +TQDoubleValidator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDoubleValidator Class Reference

+ +

The TQDoubleValidator class provides range checking of +floating-point numbers. +More... +

#include <qvalidator.h> +

Inherits TQValidator. +

List of all member functions. +

Public Members

+ +

Properties

+
    +
  • double bottom - the validator's minimum acceptable value
  • +
  • int decimals - the validator's maximum number of digits after the decimal point
  • +
  • double top - the validator's maximum acceptable value
  • +
+

Detailed Description

+ + +

The TQDoubleValidator class provides range checking of +floating-point numbers. +

+

TQDoubleValidator provides an upper bound, a lower bound and a +limit on the number of digits after the decimal point. It does not +provide a fixup() function. +

You can set the acceptable range in one call with setRange(), or +with setBottom() and setTop(). Set the number of decimal places +with setDecimals(). The validate() function returns the validation +state. +

See also TQIntValidator, TQRegExpValidator, and Miscellaneous Classes. + +


Member Function Documentation

+

TQDoubleValidator::TQDoubleValidator ( TQObject * parent, const char * name = 0 ) +

+Constructs a validator object with parent parent, called name, which accepts any double. + +

TQDoubleValidator::TQDoubleValidator ( double bottom, double top, int decimals, TQObject * parent, const char * name = 0 ) +

+Constructs a validator object with parent parent, called name. This validator will accept doubles from bottom to top +inclusive, with up to decimals digits after the decimal point. + +

TQDoubleValidator::~TQDoubleValidator () +

+Destroys the validator, freeing any resources used. + +

double TQDoubleValidator::bottom () const +

Returns the validator's minimum acceptable value. +See the "bottom" property for details. +

int TQDoubleValidator::decimals () const +

Returns the validator's maximum number of digits after the decimal point. +See the "decimals" property for details. +

void TQDoubleValidator::setBottom ( double ) +

Sets the validator's minimum acceptable value. +See the "bottom" property for details. +

void TQDoubleValidator::setDecimals ( int ) +

Sets the validator's maximum number of digits after the decimal point. +See the "decimals" property for details. +

void TQDoubleValidator::setRange ( double minimum, double maximum, int decimals = 0 ) [virtual] +

+Sets the validator to accept doubles from minimum to maximum +inclusive, with at most decimals digits after the decimal +point. + +

void TQDoubleValidator::setTop ( double ) +

Sets the validator's maximum acceptable value. +See the "top" property for details. +

double TQDoubleValidator::top () const +

Returns the validator's maximum acceptable value. +See the "top" property for details. +

TQValidator::State TQDoubleValidator::validate ( TQString & input, int & ) const [virtual] +

+Returns Acceptable if the string input contains a double +that is within the valid range and is in the correct format. +

Returns Intermediate if input contains a double that is +outside the range or is in the wrong format, e.g. with too many +digits after the decimal point or is empty. +

Returns Invalid if the input is not a double. +

Note: If the valid range consists of just positive doubles (e.g. 0.0 - 100.0) +and input is a negative double then Invalid is returned. + +

Reimplemented from TQValidator. +


Property Documentation

+

double bottom

+

This property holds the validator's minimum acceptable value. +

Set this property's value with setBottom() and get this property's value with bottom(). +

See also setRange(). + +

int decimals

+

This property holds the validator's maximum number of digits after the decimal point. +

Set this property's value with setDecimals() and get this property's value with decimals(). +

See also setRange(). + +

double top

+

This property holds the validator's maximum acceptable value. +

Set this property's value with setTop() and get this property's value with top(). +

See also setRange(). + + +


+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/qdragenterevent-members.html b/doc/html/qdragenterevent-members.html new file mode 100644 index 00000000..feb98803 --- /dev/null +++ b/doc/html/qdragenterevent-members.html @@ -0,0 +1,65 @@ + + + + + +TQDragEnterEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDragEnterEvent

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdragenterevent.html b/doc/html/qdragenterevent.html new file mode 100644 index 00000000..beb2faad --- /dev/null +++ b/doc/html/qdragenterevent.html @@ -0,0 +1,73 @@ + + + + + +TQDragEnterEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDragEnterEvent Class Reference

+ +

The TQDragEnterEvent class provides an event which is sent to the widget when a drag and drop first drags onto the widget. +More... +

#include <qevent.h> +

Inherits TQDragMoveEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQDragEnterEvent class provides an event which is sent to the widget when a drag and drop first drags onto the widget. +

+ +

This event is always immediately followed by a TQDragMoveEvent, so +you only need to respond to one or the other event. This class +inherits most of its functionality from TQDragMoveEvent, which in +turn inherits most of its functionality from TQDropEvent. +

See also TQDragLeaveEvent, TQDragMoveEvent, TQDropEvent, Drag And Drop Classes, and Event Classes. + +


Member Function Documentation

+

TQDragEnterEvent::TQDragEnterEvent ( const TQPoint & pos ) +

+ +

Constructs a TQDragEnterEvent entering at the given point, pos. +

Warning: Do not create a TQDragEnterEvent yourself since these +objects rely on TQt's internal state. + + +


+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/qdragleaveevent-members.html b/doc/html/qdragleaveevent-members.html new file mode 100644 index 00000000..faaabdb1 --- /dev/null +++ b/doc/html/qdragleaveevent-members.html @@ -0,0 +1,49 @@ + + + + + +TQDragLeaveEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDragLeaveEvent

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdragleaveevent.html b/doc/html/qdragleaveevent.html new file mode 100644 index 00000000..0755bf6d --- /dev/null +++ b/doc/html/qdragleaveevent.html @@ -0,0 +1,72 @@ + + + + + +TQDragLeaveEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDragLeaveEvent Class Reference

+ +

The TQDragLeaveEvent class provides an event which is sent to the widget when a drag and drop leaves the widget. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQDragLeaveEvent class provides an event which is sent to the widget when a drag and drop leaves the widget. +

+ +

This event is always preceded by a TQDragEnterEvent and a series of +TQDragMoveEvents. It is not sent if a TQDropEvent is sent +instead. +

See also TQDragEnterEvent, TQDragMoveEvent, TQDropEvent, Drag And Drop Classes, and Event Classes. + +


Member Function Documentation

+

TQDragLeaveEvent::TQDragLeaveEvent () +

+ +

Constructs a TQDragLeaveEvent. +

Warning: Do not create a TQDragLeaveEvent yourself since these +objects rely on TQt's internal state. + + +


+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/qdragmoveevent-members.html b/doc/html/qdragmoveevent-members.html new file mode 100644 index 00000000..36c12b21 --- /dev/null +++ b/doc/html/qdragmoveevent-members.html @@ -0,0 +1,65 @@ + + + + + +TQDragMoveEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDragMoveEvent

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdragmoveevent.html b/doc/html/qdragmoveevent.html new file mode 100644 index 00000000..c5cfecd2 --- /dev/null +++ b/doc/html/qdragmoveevent.html @@ -0,0 +1,105 @@ + + + + + +TQDragMoveEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDragMoveEvent Class Reference

+ +

The TQDragMoveEvent class provides an event which is sent while a drag and drop is in progress. +More... +

#include <qevent.h> +

Inherits TQDropEvent. +

Inherited by TQDragEnterEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + + +The TQDragMoveEvent class provides an event which is sent while a drag and drop is in progress. +

When a widget accepts drop + events, it will receive this event repeatedly while the +drag is within the widget's boundaries. The widget should examine +the event to see what data it provides, and accept() the drop if appropriate. +

Note that this class inherits most of its functionality from +TQDropEvent. +

See also Drag And Drop Classes and Event Classes. + +


Member Function Documentation

+

TQDragMoveEvent::TQDragMoveEvent ( const TQPoint & pos, Type type = DragMove ) +

+ +

Creates a TQDragMoveEvent for which the mouse is at point pos, +and the event is of type type. +

Warning: Do not create a TQDragMoveEvent yourself since these +objects rely on TQt's internal state. + +

void TQDragMoveEvent::accept ( const TQRect & r ) +

+ +

The same as accept(), but also notifies that future moves will +also be acceptable if they remain within the rectangle r on the +widget: this can improve performance, but may also be ignored by +the underlying system. +

If the rectangle is empty, then +drag move events will be sent continuously. This is useful if the +source is scrolling in a timer event. + +

Examples: desktop/desktop.cpp and dirview/dirview.cpp. +

TQRect TQDragMoveEvent::answerRect () const +

+ +

Returns the rectangle for which the acceptance of the move event +applies. + +

void TQDragMoveEvent::ignore ( const TQRect & r ) +

+ +

The opposite of accept(const TQRect&), i.e. says that moves within +rectangle r are not acceptable (will be ignored). + +

Example: dirview/dirview.cpp. + +


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


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdragobject-h.html b/doc/html/qdragobject-h.html new file mode 100644 index 00000000..295ef4c3 --- /dev/null +++ b/doc/html/qdragobject-h.html @@ -0,0 +1,323 @@ + + + + + +qdragobject.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdragobject.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdragobject.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQDragObject
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQDRAGOBJECT_H
+#define TQDRAGOBJECT_H
+
+class TQWidget;
+class TQTextDragPrivate;
+class TQDragObjectData;
+class TQStoredDragData;
+class TQImageDragData;
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qimage.h"
+#include "qstrlist.h"
+#include "qcolor.h"
+#endif // QT_H
+
+#ifndef QT_NO_MIME
+
+class Q_EXPORT TQDragObject: public TQObject, public TQMimeSource {
+    Q_OBJECT
+public:
+    TQDragObject( TQWidget * dragSource = 0, const char * name = 0 );
+    virtual ~TQDragObject();
+
+#ifndef QT_NO_DRAGANDDROP
+    bool drag();
+    bool dragMove();
+    void dragCopy();
+    void dragLink();
+
+    virtual void setPixmap(TQPixmap);
+    virtual void setPixmap(TQPixmap, const TQPoint& hotspot);
+    TQPixmap pixmap() const;
+    TQPoint pixmapHotSpot() const;
+#endif
+
+    TQWidget * source();
+    static TQWidget * target();
+
+    static void setTarget(TQWidget*);
+
+#ifndef QT_NO_DRAGANDDROP
+    enum DragMode { DragDefault, DragCopy, DragMove, DragLink, DragCopyOrMove };
+
+protected:
+    virtual bool drag(DragMode);
+#endif
+
+private:
+    TQDragObjectData * d;
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQDragObject( const TQDragObject & );
+    TQDragObject &operator=( const TQDragObject & );
+#endif
+};
+
+class Q_EXPORT TQStoredDrag: public TQDragObject {
+    Q_OBJECT
+    TQStoredDragData * d;
+
+public:
+    TQStoredDrag( const char * mimeType,
+		 TQWidget * dragSource = 0, const char * name = 0 );
+    ~TQStoredDrag();
+
+    virtual void setEncodedData( const TQByteArray & );
+
+    const char * format(int i) const;
+    virtual TQByteArray encodedData(const char*) const;
+
+private:
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQStoredDrag( const TQStoredDrag & );
+    TQStoredDrag &operator=( const TQStoredDrag & );
+#endif
+};
+
+class Q_EXPORT TQTextDrag: public TQDragObject {
+    Q_OBJECT
+    TQTextDragPrivate* d;
+public:
+    TQTextDrag( const TQString &,
+	       TQWidget * dragSource = 0, const char * name = 0 );
+    TQTextDrag( TQWidget * dragSource = 0, const char * name = 0 );
+    ~TQTextDrag();
+
+    virtual void setText( const TQString &);
+    virtual void setSubtype( const TQCString &);
+
+    const char * format(int i) const;
+    virtual TQByteArray encodedData(const char*) const;
+
+    static bool canDecode( const TQMimeSource* e );
+    static bool decode( const TQMimeSource* e, TQString& s );
+    static bool decode( const TQMimeSource* e, TQString& s, TQCString& subtype );
+
+private:
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQTextDrag( const TQTextDrag & );
+    TQTextDrag &operator=( const TQTextDrag & );
+#endif
+};
+
+class Q_EXPORT TQImageDrag: public TQDragObject {
+    Q_OBJECT
+    TQImage img;
+    TQStrList ofmts;
+    TQImageDragData* d;
+
+public:
+    TQImageDrag( TQImage image, TQWidget * dragSource = 0, const char * name = 0 );
+    TQImageDrag( TQWidget * dragSource = 0, const char * name = 0 );
+    ~TQImageDrag();
+
+    virtual void setImage( TQImage image );
+
+    const char * format(int i) const;
+    virtual TQByteArray encodedData(const char*) const;
+
+    static bool canDecode( const TQMimeSource* e );
+    static bool decode( const TQMimeSource* e, TQImage& i );
+    static bool decode( const TQMimeSource* e, TQPixmap& i );
+
+private:
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQImageDrag( const TQImageDrag & );
+    TQImageDrag &operator=( const TQImageDrag & );
+#endif
+};
+
+
+class Q_EXPORT TQUriDrag: public TQStoredDrag {
+    Q_OBJECT
+
+public:
+    TQUriDrag( TQStrList uris, TQWidget * dragSource = 0, const char * name = 0 );
+    TQUriDrag( TQWidget * dragSource = 0, const char * name = 0 );
+    ~TQUriDrag();
+
+    void setFilenames( const TQStringList & fnames ) { setFileNames( fnames ); }
+    void setFileNames( const TQStringList & fnames );
+    void setUnicodeUris( const TQStringList & uuris );
+    virtual void setUris( TQStrList uris );
+
+    static TQString uriToLocalFile(const char*);
+    static TQCString localFileToUri(const TQString&);
+    static TQString uriToUnicodeUri(const char*);
+    static TQCString unicodeUriToUri(const TQString&);
+    static bool canDecode( const TQMimeSource* e );
+    static bool decode( const TQMimeSource* e, TQStrList& i );
+    static bool decodeToUnicodeUris( const TQMimeSource* e, TQStringList& i );
+    static bool decodeLocalFiles( const TQMimeSource* e, TQStringList& i );
+
+private:
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQUriDrag( const TQUriDrag & );
+    TQUriDrag &operator=( const TQUriDrag & );
+#endif
+};
+
+class Q_EXPORT TQColorDrag : public TQStoredDrag
+{
+    Q_OBJECT
+    TQColor color;
+
+public:
+    TQColorDrag( const TQColor &col, TQWidget *dragsource = 0, const char *name = 0 );
+    TQColorDrag( TQWidget * dragSource = 0, const char * name = 0 );
+    void setColor( const TQColor &col );
+
+    static bool canDecode( TQMimeSource * );
+    static bool decode( TQMimeSource *, TQColor &col );
+
+private:
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQColorDrag( const TQColorDrag & );
+    TQColorDrag &operator=( const TQColorDrag & );
+#endif
+};
+
+#ifndef QT_NO_COMPAT
+typedef TQUriDrag TQUrlDrag;
+#endif
+
+#ifndef QT_NO_DRAGANDDROP
+
+// TQDragManager is not part of the public API.  It is defined in a
+// header file simply so different .cpp files can implement different
+// member functions.
+//
+
+class Q_EXPORT TQDragManager: public TQObject {
+    Q_OBJECT
+
+private:
+    TQDragManager();
+    ~TQDragManager();
+    // only friend classes can use TQDragManager.
+    friend class TQDragObject;
+    friend class TQDragMoveEvent;
+    friend class TQDropEvent;
+    friend class TQApplication;
+
+    bool eventFilter( TQObject *, TQEvent * );
+    void timerEvent( TQTimerEvent* );
+
+    bool drag( TQDragObject *, TQDragObject::DragMode );
+
+    void cancel( bool deleteSource = TRUE );
+    void move( const TQPoint & );
+    void drop();
+    void updatePixmap();
+
+private:
+    TQDragObject * object;
+    void updateMode( ButtonState newstate );
+    void updateCursor();
+#if defined(Q_WS_X11)
+    void createCursors();
+#endif
+
+    TQWidget * dragSource;
+    TQWidget * dropWidget;
+    bool beingCancelled;
+    bool restoreCursor;
+    bool willDrop;
+
+    TQPixmap *pm_cursor;
+    int n_cursor;
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQDragManager( const TQDragManager & );
+    TQDragManager &operator=( const TQDragManager & );
+#endif
+};
+
+#endif
+
+#endif // QT_NO_MIME
+
+#endif // TQDRAGOBJECT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdragobject-members.html b/doc/html/qdragobject-members.html new file mode 100644 index 00000000..8124bba0 --- /dev/null +++ b/doc/html/qdragobject-members.html @@ -0,0 +1,103 @@ + + + + + +TQDragObject Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDragObject

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdragobject.html b/doc/html/qdragobject.html new file mode 100644 index 00000000..162491a2 --- /dev/null +++ b/doc/html/qdragobject.html @@ -0,0 +1,220 @@ + + + + + +TQDragObject Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDragObject Class Reference

+ +

The TQDragObject class encapsulates MIME-based data +transfer. +More... +

#include <qdragobject.h> +

Inherits TQObject and TQMimeSource. +

Inherited by TQStoredDrag, TQTextDrag, TQImageDrag, and TQIconDrag. +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Protected Members

+
    +
  • virtual bool drag ( DragMode mode )
  • +
+

Detailed Description

+ + +

The TQDragObject class encapsulates MIME-based data +transfer. +

+

TQDragObject is the base class for all data that needs to be +transferred between and within applications, both for drag and +drop and for the clipboard. +

See the Drag-and-drop documentation for an +overview of how to provide drag and drop in your application. +

See the TQClipboard documentation for an overview of how to provide +cut-and-paste in your application. +

The drag() function is used to start a drag operation. You can +specify the DragMode in the call or use one of the convenience +functions dragCopy(), dragMove() or dragLink(). The drag source +where the data originated is retrieved with source(). If the data +was dropped on a widget within the application, target() will +return a pointer to that widget. Specify the pixmap to display +during the drag with setPixmap(). +

See also Drag And Drop Classes. + +


Member Type Documentation

+

TQDragObject::DragMode

+ +

This enum describes the possible drag modes. +

    +
  • TQDragObject::DragDefault - The mode is determined heuristically. +
  • TQDragObject::DragCopy - The data is copied, never moved. +
  • TQDragObject::DragMove - The data is moved, if dragged at all. +
  • TQDragObject::DragLink - The data is linked, if dragged at all. +
  • TQDragObject::DragCopyOrMove - The user chooses the mode by using a +control key to switch from the default. +
+

Member Function Documentation

+

TQDragObject::TQDragObject ( TQWidget * dragSource = 0, const char * name = 0 ) +

+Constructs a drag object called name, which is a child of dragSource. +

Note that the drag object will be deleted when dragSource is +deleted. + +

TQDragObject::~TQDragObject () [virtual] +

+Destroys the drag object, canceling any drag and drop operation in +which it is involved, and frees up the storage used. + +

bool TQDragObject::drag () +

+Starts a drag operation using the contents of this object, using +DragDefault mode. +

The function returns TRUE if the caller should delete the original +copy of the dragged data (but see target()); otherwise returns +FALSE. +

If the drag contains references to information (e.g. file names +in a TQUriDrag are references) then the return value should always +be ignored, as the target is expected to manipulate the +referred-to content directly. On X11 the return value should +always be correct anyway, but on Windows this is not necessarily +the case (e.g. the file manager starts a background process to +move files, so the source must not delete the files!) +

Note that on Windows the drag operation will spin a blocking modal +event loop that will not dispatch any TQTimers. + +

Example: dirview/dirview.cpp. +

bool TQDragObject::drag ( DragMode mode ) [virtual protected] +

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

Starts a drag operation using the contents of this object. +

At this point, the object becomes owned by TQt, not the +application. You should not delete the drag object or anything it +references. The actual transfer of data to the target application +will be done during future event processing - after that time the +drag object will be deleted. +

Returns TRUE if the dragged data was dragged as a move, +indicating that the caller should remove the original source of +the data (the drag object must continue to have a copy); otherwise +returns FALSE. +

The mode specifies the drag mode (see +TQDragObject::DragMode.) Normally one of the simpler drag(), +dragMove(), or dragCopy() functions would be used instead. + +

void TQDragObject::dragCopy () +

+Starts a drag operation using the contents of this object, using +DragCopy mode. Be sure to read the constraints described in +drag(). +

See also drag(), dragMove(), and dragLink(). + +

Example: iconview/simple_dd/main.cpp. +

void TQDragObject::dragLink () +

+Starts a drag operation using the contents of this object, using +DragLink mode. Be sure to read the constraints described in +drag(). +

See also drag(), dragCopy(), and dragMove(). + +

bool TQDragObject::dragMove () +

+Starts a drag operation using the contents of this object, using +DragMove mode. Be sure to read the constraints described in +drag(). +

See also drag(), dragCopy(), and dragLink(). + +

TQPixmap TQDragObject::pixmap () const +

+Returns the currently set pixmap (which isNull() if none is set). + +

TQPoint TQDragObject::pixmapHotSpot () const +

+Returns the currently set pixmap hotspot. + +

void TQDragObject::setPixmap ( TQPixmap pm, const TQPoint & hotspot ) [virtual] +

+Set the pixmap pm to display while dragging the object. The +platform-specific implementation will use this where it can - so +provide a small masked pixmap, and do not assume that the user +will actually see it. For example, cursors on Windows 95 are of +limited size. +

The hotspot is the point on (or off) the pixmap that should be +under the cursor as it is dragged. It is relative to the top-left +pixel of the pixmap. +

Warning: We have seen problems with drag cursors on different +graphics hardware and driver software on Windows. Setting the +graphics acceleration in the display settings down one tick solved +the problems in all cases. + +

Example: fileiconview/qfileiconview.cpp. +

void TQDragObject::setPixmap ( TQPixmap pm ) [virtual] +

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

Uses a hotspot that positions the pixmap below and to the right of +the mouse pointer. This allows the user to clearly see the point +on the window which they are dragging the data onto. + +

TQWidget * TQDragObject::source () +

+Returns a pointer to the drag source where this object originated. + +

TQWidget * TQDragObject::target () [static] +

+After the drag completes, this function will return the TQWidget +which received the drop, or 0 if the data was dropped on another +application. +

This can be useful for detecting the case where drag and drop is +to and from the same widget. + + +


+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/qdrawutil-h.html b/doc/html/qdrawutil-h.html new file mode 100644 index 00000000..73d8d96d --- /dev/null +++ b/doc/html/qdrawutil-h.html @@ -0,0 +1,173 @@ + + + + + +qdrawutil.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdrawutil.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdrawutil.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of draw utilities
+**
+** Created : 950920
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQDRAWUTIL_H
+#define TQDRAWUTIL_H
+
+#ifndef QT_H
+#include "qnamespace.h"
+#include "qstring.h" // char*->TQString conversion
+#endif // QT_H
+
+class TQPainter;
+class TQColorGroup;
+class TQPoint;
+class TQBrush;
+class TQRect;
+class TQPixmap;
+
+#ifndef QT_NO_DRAWUTIL
+//
+// Standard shade drawing
+//
+
+Q_EXPORT void qDrawShadeLine( TQPainter *p, int x1, int y1, int x2, int y2,
+			      const TQColorGroup &g, bool sunken = TRUE,
+			      int lineWidth = 1, int midLineWidth = 0 );
+
+Q_EXPORT void qDrawShadeLine( TQPainter *p, const TQPoint &p1, const TQPoint &p2,
+			      const TQColorGroup &g, bool sunken = TRUE,
+			      int lineWidth = 1, int midLineWidth = 0 );
+
+Q_EXPORT void qDrawShadeRect( TQPainter *p, int x, int y, int w, int h,
+			      const TQColorGroup &, bool sunken=FALSE,
+			      int lineWidth = 1, int midLineWidth = 0,
+			      const TQBrush *fill = 0 );
+
+Q_EXPORT void qDrawShadeRect( TQPainter *p, const TQRect &r,
+			      const TQColorGroup &, bool sunken=FALSE,
+			      int lineWidth = 1, int midLineWidth = 0,
+			      const TQBrush *fill = 0 );
+
+Q_EXPORT void qDrawShadePanel( TQPainter *p, int x, int y, int w, int h,
+			       const TQColorGroup &, bool sunken=FALSE,
+			       int lineWidth = 1, const TQBrush *fill = 0 );
+
+Q_EXPORT void qDrawShadePanel( TQPainter *p, const TQRect &r,
+			       const TQColorGroup &, bool sunken=FALSE,
+			       int lineWidth = 1, const TQBrush *fill = 0 );
+
+Q_EXPORT void qDrawWinButton( TQPainter *p, int x, int y, int w, int h,
+			      const TQColorGroup &g, bool sunken = FALSE,
+			      const TQBrush *fill = 0 );
+
+Q_EXPORT void qDrawWinButton( TQPainter *p, const TQRect &r,
+			      const TQColorGroup &g, bool sunken = FALSE,
+			      const TQBrush *fill = 0 );
+
+Q_EXPORT void qDrawWinPanel( TQPainter *p, int x, int y, int w, int h,
+			     const TQColorGroup &, bool sunken=FALSE,
+			     const TQBrush *fill = 0 );
+
+Q_EXPORT void qDrawWinPanel( TQPainter *p, const TQRect &r,
+			     const TQColorGroup &, bool sunken=FALSE,
+			     const TQBrush *fill = 0 );
+
+Q_EXPORT void qDrawPlainRect( TQPainter *p, int x, int y, int w, int h, const TQColor &,
+			      int lineWidth = 1, const TQBrush *fill = 0 );
+
+Q_EXPORT void qDrawPlainRect( TQPainter *p, const TQRect &r, const TQColor &,
+			      int lineWidth = 1, const TQBrush *fill = 0 );
+
+
+//
+// Other obsolete drawing functions.
+// Use TQStyle::itemRect(), TQStyle::drawItem() and TQStyle::drawArrow() instead.
+//
+Q_EXPORT TQRect qItemRect( TQPainter *p, TQt::GUIStyle gs, int x, int y, int w, int h,
+			  int flags, bool enabled,
+			  const TQPixmap *pixmap, const TQString& text, int len=-1 );
+
+Q_EXPORT void qDrawItem( TQPainter *p, TQt::GUIStyle gs, int x, int y, int w, int h,
+			 int flags, const TQColorGroup &g, bool enabled,
+			 const TQPixmap *pixmap, const TQString& text,
+			 int len=-1, const TQColor* penColor = 0 );
+
+Q_EXPORT void qDrawArrow( TQPainter *p, TQt::ArrowType type, TQt::GUIStyle style, bool down,
+			  int x, int y, int w, int h,
+			  const TQColorGroup &g, bool enabled );
+
+#endif // QT_NO_DRAWUTIL
+#endif // TQDRAWUTIL_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdropevent-members.html b/doc/html/qdropevent-members.html new file mode 100644 index 00000000..53e4aa06 --- /dev/null +++ b/doc/html/qdropevent-members.html @@ -0,0 +1,64 @@ + + + + + +TQDropEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDropEvent

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdropevent.html b/doc/html/qdropevent.html new file mode 100644 index 00000000..889e9a44 --- /dev/null +++ b/doc/html/qdropevent.html @@ -0,0 +1,225 @@ + + + + + +TQDropEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDropEvent Class Reference

+ +

The TQDropEvent class provides an event which is sent when a drag and drop is completed. +More... +

#include <qevent.h> +

Inherits TQEvent and TQMimeSource. +

Inherited by TQDragMoveEvent. +

List of all member functions. +

Public Members

+
    +
  • TQDropEvent ( const TQPoint & pos, Type typ = Drop )
  • +
  • const TQPoint & pos () const
  • +
  • bool isAccepted () const
  • +
  • void accept ( bool y = TRUE )
  • +
  • void ignore ()
  • +
  • bool isActionAccepted () const
  • +
  • void acceptAction ( bool y = TRUE )
  • +
  • enum Action { Copy, Link, Move, Private, UserAction = 100 }
  • +
  • void setAction ( Action a )
  • +
  • Action action () const
  • +
  • TQWidget * source () const
  • +
  • virtual const char * format ( int n = 0 ) const
  • +
  • virtual TQByteArray encodedData ( const char * format ) const
  • +
  • virtual bool provides ( const char * mimeType ) const
  • +
  • TQByteArray data ( const char * f ) const  (obsolete)
  • +
  • void setPoint ( const TQPoint & np )
  • +
+

Detailed Description

+ + + + +

The TQDropEvent class provides an event which is sent when a drag and drop is completed. +

When a widget accepts drop + events, it will receive this event if it has accepted the +most recent TQDragEnterEvent or TQDragMoveEvent sent to it. +

The widget should use data() to extract the data in an appropriate +format. +

See also Drag And Drop Classes and Event Classes. + +


Member Type Documentation

+

TQDropEvent::Action

+ +

This enum describes the action which a source requests that a +target perform with dropped data. +

    +
  • TQDropEvent::Copy - The default action. The source simply uses the data +provided in the operation. +
  • TQDropEvent::Link - The source should somehow create a link to the +location specified by the data. +
  • TQDropEvent::Move - The source should somehow move the object from the +location specified by the data to a new location. +
  • TQDropEvent::Private - The target has special knowledge of the MIME type, +which the source should respond to in a similar way to +a Copy. +
  • TQDropEvent::UserAction - The source and target can co-operate using +special actions. This feature is not currently +supported. +

The Link and Move actions only makes sense if the data is a +reference, for example, text/uri-list file lists (see TQUriDrag). + +


Member Function Documentation

+

TQDropEvent::TQDropEvent ( const TQPoint & pos, Type typ = Drop ) +

+ +

Constructs a drop event that drops a drop of type typ on point +pos. + +

void TQDropEvent::accept ( bool y = TRUE ) +

+ +

Call this function to indicate whether the event provided data +which your widget processed. Set y to TRUE (the default) if +your widget could process the data, otherwise set y to FALSE. +To get the data, use encodedData(), or preferably, the decode() +methods of existing TQDragObject subclasses, such as +TQTextDrag::decode(), or your own subclasses. +

See also acceptAction(). + +

Example: iconview/simple_dd/main.cpp. +

void TQDropEvent::acceptAction ( bool y = TRUE ) +

+ +

Call this to indicate that the action described by action() is +accepted (i.e. if y is TRUE, which is the default), not merely +the default copy action. If you call acceptAction(TRUE), there is +no need to also call accept(TRUE). + +

Examples: dirview/dirview.cpp and fileiconview/qfileiconview.cpp. +

Action TQDropEvent::action () const +

+ +

Returns the Action which the target is requesting to be performed +with the data. If your application understands the action and can +process the supplied data, call acceptAction(); if your +application can process the supplied data but can only perform the +Copy action, call accept(). + +

Examples: dirview/dirview.cpp and fileiconview/qfileiconview.cpp. +

TQByteArray TQDropEvent::data ( const char * f ) const +

+ +

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

Use TQDropEvent::encodedData(). + +

TQByteArray TQDropEvent::encodedData ( const char * format ) const [virtual] +

+Returns a byte array containing the drag's data, in format. +

data() normally needs to get the data from the drag source, which +is potentially very slow, so it's advisable to call this function +only if you're sure that you will need the data in format. +

The resulting data will have a size of 0 if the format was not +available. +

See also format() and TQByteArray::size(). + +

Reimplemented from TQMimeSource. +

const char * TQDropEvent::format ( int n = 0 ) const [virtual] +

+Returns a string describing one of the available data types for +this drag. Common examples are "text/plain" and "image/gif". If n is less than zero or greater than the number of available data +types, format() returns 0. +

This function is provided mainly for debugging. Most drop targets +will use provides(). +

See also data() and provides(). + +

Example: iconview/main.cpp. +

Reimplemented from TQMimeSource. +

void TQDropEvent::ignore () +

+ +

The opposite of accept(), i.e. you have ignored the drop event. + +

Example: fileiconview/qfileiconview.cpp. +

bool TQDropEvent::isAccepted () const +

+ +

Returns TRUE if the drop target accepts the event; otherwise +returns FALSE. + +

bool TQDropEvent::isActionAccepted () const +

+ +

Returns TRUE if the drop action was accepted by the drop site; +otherwise returns FALSE. + +

const TQPoint & TQDropEvent::pos () const +

+ +

Returns the position where the drop was made. + +

Example: dirview/dirview.cpp. +

bool TQDropEvent::provides ( const char * mimeType ) const [virtual] +

+Returns TRUE if this event provides format mimeType; otherwise +returns FALSE. +

See also data(). + +

Example: fileiconview/qfileiconview.cpp. +

Reimplemented from TQMimeSource. +

void TQDropEvent::setAction ( Action a ) +

+ +

Sets the action to a. This is used internally, you should not +need to call this in your code: the source decides the action, +not the target. + +

void TQDropEvent::setPoint ( const TQPoint & np ) +

+ +

Sets the drop to happen at point np. You do not normally need +to use this as it will be set internally before your widget +receives the drop event. + +

TQWidget * TQDropEvent::source () const +

+If the source of the drag operation is a widget in this +application, this function returns that source, otherwise it +returns 0. The source of the operation is the first parameter to +drag object subclasses. +

This is useful if your widget needs special behavior when dragging +to itself, etc. +

See TQDragObject::TQDragObject() and subclasses. + + +


+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/qdropsite-h.html b/doc/html/qdropsite-h.html new file mode 100644 index 00000000..43689c34 --- /dev/null +++ b/doc/html/qdropsite-h.html @@ -0,0 +1,104 @@ + + + + + +qdropsite.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qdropsite.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qdropsite.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definitation of Drag and Drop support
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQDROPSITE_H
+#define TQDROPSITE_H
+
+#ifndef QT_H
+#ifndef QT_H
+#include "qglobal.h"
+#endif // QT_H
+#endif
+
+
+class TQWidget;
+
+
+class Q_EXPORT TQDropSite {
+public:
+    TQDropSite( TQWidget* parent );
+    virtual ~TQDropSite();
+};
+
+
+#endif  // TQDROPSITE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdropsite-members.html b/doc/html/qdropsite-members.html new file mode 100644 index 00000000..1995573e --- /dev/null +++ b/doc/html/qdropsite-members.html @@ -0,0 +1,48 @@ + + + + + +TQDropSite Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQDropSite

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qdropsite.html b/doc/html/qdropsite.html new file mode 100644 index 00000000..08229f5a --- /dev/null +++ b/doc/html/qdropsite.html @@ -0,0 +1,75 @@ + + + + + +TQDropSite Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQDropSite Class Reference
[obsolete]

+ +

The TQDropSite class provides nothing and does nothing. +More... +

#include <qdropsite.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQDropSite class provides nothing and does nothing. +

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

If your code uses it, you can safely delete it. +

It was used in TQt 1.x to do some drag and drop; that has since been +folded into TQWidget. +

For detailed information about drag-and-drop, see the TQDragObject class. +

See also TQDragObject, TQTextDrag, and TQImageDrag. + +


Member Function Documentation

+

TQDropSite::TQDropSite ( TQWidget * self ) +

+Constructs a TQDropSite to handle events for the widget self. +

Pass this as the self parameter. +This enables dropping by calling TQWidget::setAcceptDrops(TRUE). + +

TQDropSite::~TQDropSite () [virtual] +

+Destroys the drop site. + + +

+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/qeditorfactory-h.html b/doc/html/qeditorfactory-h.html new file mode 100644 index 00000000..347e2eed --- /dev/null +++ b/doc/html/qeditorfactory-h.html @@ -0,0 +1,120 @@ + + + + + +qeditorfactory.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qeditorfactory.h

+ +

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


+
+/****************************************************************************
+**
+** Definition of TQEditorFactory class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQEDITORFACTORY_H
+#define TQEDITORFACTORY_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qvariant.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL_EDIT_WIDGETS
+
+class TQM_EXPORT_SQL TQEditorFactory : public TQObject
+{
+public:
+    TQEditorFactory ( TQObject * parent = 0, const char * name = 0 );
+    ~TQEditorFactory();
+    
+    virtual TQWidget * createEditor( TQWidget * parent, const TQVariant & v );
+    
+    static TQEditorFactory * defaultFactory();
+    static void installDefaultFactory( TQEditorFactory * factory);
+
+private:
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQEditorFactory( const TQEditorFactory & );
+    TQEditorFactory &operator=( const TQEditorFactory & );
+#endif
+}; 
+
+#endif // QT_NO_SQL
+#endif // TQEDITORFACTORY_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qeditorfactory-members.html b/doc/html/qeditorfactory-members.html new file mode 100644 index 00000000..f6d8c455 --- /dev/null +++ b/doc/html/qeditorfactory-members.html @@ -0,0 +1,93 @@ + + + + + +TQEditorFactory Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQEditorFactory

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qeditorfactory.html b/doc/html/qeditorfactory.html new file mode 100644 index 00000000..8bd23872 --- /dev/null +++ b/doc/html/qeditorfactory.html @@ -0,0 +1,104 @@ + + + + + +TQEditorFactory Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQEditorFactory Class Reference
[sql module]

+ +

The TQEditorFactory class is used to create editor widgets +for TQVariant data types. +More... +

#include <qeditorfactory.h> +

Inherits TQObject. +

Inherited by TQSqlEditorFactory. +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Detailed Description

+ + +The TQEditorFactory class is used to create editor widgets +for TQVariant data types. +

+ +

Each editor factory provides the createEditor() function which +given a TQVariant will create and return a TQWidget that can edit +that TQVariant. For example if you have a TQVariant::String type, a +TQLineEdit would be the default editor returned, whereas a +TQVariant::Int's default editor would be a TQSpinBox. +

If you want to create different editors for fields with the same +data type, subclass TQEditorFactory and reimplement the +createEditor() function. +

See also Database Classes. + +


Member Function Documentation

+

TQEditorFactory::TQEditorFactory ( TQObject * parent = 0, const char * name = 0 ) +

+Constructs an editor factory with parent parent, called name. + +

TQEditorFactory::~TQEditorFactory () +

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

TQWidget * TQEditorFactory::createEditor ( TQWidget * parent, const TQVariant & v ) [virtual] +

+Creates and returns the appropriate editor for the TQVariant v. +If the TQVariant is invalid, 0 is returned. The parent is passed +to the appropriate editor's constructor. + +

Reimplemented in TQSqlEditorFactory. +

TQEditorFactory * TQEditorFactory::defaultFactory () [static] +

+Returns an instance of a default editor factory. + +

void TQEditorFactory::installDefaultFactory ( TQEditorFactory * factory ) [static] +

+Replaces the default editor factory with factory. +TQEditorFactory takes ownership of factory, and destroys it when it is no longer needed. + + +

+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/qembed.html b/doc/html/qembed.html new file mode 100644 index 00000000..026e24c3 --- /dev/null +++ b/doc/html/qembed.html @@ -0,0 +1,100 @@ + + + + + +TQEmbed - File and Image Embedder + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQEmbed - File and Image Embedder

+ + + +

The TQEmbed tool, found in qt/tools/qembed, converts arbitrary files +into C++ code. This is useful for including image files and other resources +directly into your application rather than loading the data from external +files. +

TQEmbed can also generate uncompressed versions of images that can be included +directly into your application, thus avoiding both the external file and the +need to parse the image file format. This is useful for small images such as +icons for which compression is not a great gain. +

Usage +

+

+    qembed [ general-files ] [ --images image-files ]
+
+ +

    +
  • general-files +

    These files can be any type of file. +

  • --images image-files +

    These files must be in image formats supported by TQt. +

+

Output +

+

The output from TQEmbed is a C++ header file which you should +include in a C++ source file. In the source file, you should make a +wrapper function that suits your application. Two functions are +provided; your wrapper function could just call one of these, or +you can implement your own. Here's a simple example of usage for each +of the supplied functions: +

qembed_findImage() +

+

+    #include "generated_qembed_file.h"
+
+    TQImage myFindImage(const char* name)
+    {
+        return qembed_findImage(name);
+    }
+
+ +

Just call the generated function; name is the original image +filename without the extension. +

qembed_findData() +

+

+    #include "generated_qembed_file.h"
+
+    TQByteArray myFindData(const char* name)
+    {
+        return qembed_findData(name);
+    }
+
+ +

Just call the generated function; name is the original filename +with the extension +

Alternatively, look at the output from TQEmbed and write a function +tailored to your needs. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qerrormessage-h.html b/doc/html/qerrormessage-h.html new file mode 100644 index 00000000..cc6d4f02 --- /dev/null +++ b/doc/html/qerrormessage-h.html @@ -0,0 +1,134 @@ + + + + + +qerrormessage.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qerrormessage.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qerrormessage.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of a nice qInstallErrorMessage() handler
+**
+** Created : 000527, after Kalle Dalheimer's birthday
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the dialogs 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 retquirements 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 TQERRORMESSAGE_H
+#define TQERRORMESSAGE_H
+
+#ifndef QT_H
+#include "qdialog.h"
+#endif // QT_H
+
+#ifndef QT_NO_ERRORMESSAGE
+class TQPushButton;
+class TQCheckBox;
+class TQLabel;
+class TQTextView;
+class TQStringList;
+template<class type> class TQDict;
+
+
+class Q_EXPORT TQErrorMessage: public TQDialog {
+    Q_OBJECT
+public:
+    TQErrorMessage( TQWidget* parent, const char* name=0 );
+    ~TQErrorMessage();
+
+    static TQErrorMessage * qtHandler();
+
+public slots:
+    void message( const TQString & );
+
+protected:
+    void done( int );
+
+private:
+    TQPushButton * ok;
+    TQCheckBox * again;
+    TQTextView * errors;
+    TQLabel * icon;
+    TQStringList * pending;
+    TQDict<int> * doNotShow;
+
+    bool nextPending();
+
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQErrorMessage( const TQErrorMessage & );
+    TQErrorMessage &operator=( const TQErrorMessage & );
+#endif
+};
+
+#endif //QT_NO_ERRORMESSAGE
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qerrormessage-members.html b/doc/html/qerrormessage-members.html new file mode 100644 index 00000000..7df38ad0 --- /dev/null +++ b/doc/html/qerrormessage-members.html @@ -0,0 +1,354 @@ + + + + + +TQErrorMessage Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQErrorMessage

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qerrormessage.html b/doc/html/qerrormessage.html new file mode 100644 index 00000000..e4048459 --- /dev/null +++ b/doc/html/qerrormessage.html @@ -0,0 +1,105 @@ + + + + + +TQErrorMessage Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQErrorMessage Class Reference

+ +

The TQErrorMessage class provides an error message display dialog. +More... +

#include <qerrormessage.h> +

Inherits TQDialog. +

List of all member functions. +

Public Members

+ +

Public Slots

+
    +
  • void message ( const TQString & m )
  • +
+

Static Public Members

+ +

Detailed Description

+ +

The TQErrorMessage class provides an error message display dialog. +

+ +

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

There are two ways to use this class: +

    +
  1. For production applications. In this context the class can be used to +display messages which you don't need the user to see more than once. To use +TQErrorMessage like this, you create the dialog in the usual way and call the +message() slot, or connect signals to it. +

  2. For developers. In this context the static qtHandler() installs +a message handler using qInstallMsgHandler() and creates a TQErrorMessage +that displays qDebug(), qWarning() and qFatal() messages. +
+

In both cases TQErrorMessage will queue pending messages, and display +them (or not) in order, as soon as the user presses Enter or clicks OK +after seeing each message. +

+

See also TQMessageBox, TQStatusBar::message(), Dialog Classes, and Miscellaneous Classes. + +


Member Function Documentation

+

TQErrorMessage::TQErrorMessage ( TQWidget * parent, const char * name = 0 ) +

Constructs and installs an error handler window. +The parent parent and name name are passed on to the TQDialog +constructor. + +

TQErrorMessage::~TQErrorMessage () +

Destroys the object and frees any allocated resources. Notably, +the list of "do not show again" messages is deleted. +

void TQErrorMessage::message ( const TQString & m ) [slot] +

Shows message m and returns immediately. If the user has requested +that m not be shown, this function does nothing. +

Normally, m is shown at once, but if there are pending messages, +m is queued for later display. + +

TQErrorMessage * TQErrorMessage::qtHandler () [static] +

Returns a pointer to a TQErrorMessage object that outputs the +default TQt messages. This function creates such an object, if there +isn't one already. + + +

+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/qerrormessage.png b/doc/html/qerrormessage.png new file mode 100644 index 00000000..cf2418f1 Binary files /dev/null and b/doc/html/qerrormessage.png differ diff --git a/doc/html/qeucjpcodec-h.html b/doc/html/qeucjpcodec-h.html new file mode 100644 index 00000000..4f55c57e --- /dev/null +++ b/doc/html/qeucjpcodec-h.html @@ -0,0 +1,156 @@ + + + + + +qeucjpcodec.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qeucjpcodec.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qeucjpcodec.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQEucJpCodec class
+**
+** Created : 990225
+**
+** 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 retquirements 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.
+**
+**********************************************************************/
+
+// Most of the code here was originally written by Serika Kurusugawa
+// a.k.a. Junji Takagi, and is included in TQt with the author's permission,
+// and the grateful thanks of the Trolltech team.
+
+/*
+ * Copyright (C) 1999 Serika Kurusugawa, All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef TQEUCJPCODEC_H
+#define TQEUCJPCODEC_H
+
+#ifndef QT_H
+#include "qtextcodec.h"
+#include "qjpunicode.h"
+#endif // QT_H
+
+#ifndef QT_NO_BIG_CODECS
+
+#if defined(QT_PLUGIN)
+#define Q_EXPORT_CODECS_JP
+#else
+#define Q_EXPORT_CODECS_JP Q_EXPORT
+#endif
+
+class Q_EXPORT_CODECS_JP TQEucJpCodec : public TQTextCodec {
+public:
+    virtual int mibEnum() const;
+    const char* name() const;
+    const char* mimeName() const;
+
+    TQTextDecoder* makeDecoder() const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQTextCodec::fromUnicode;
+#endif
+    TQCString fromUnicode(const TQString& uc, int& lenInOut) const;
+    TQString toUnicode(const char* chars, int len) const;
+
+    int heuristicContentMatch(const char* chars, int len) const;
+    int heuristicNameMatch(const char* hint) const;
+
+    TQEucJpCodec();
+    ~TQEucJpCodec();
+
+protected:
+    const TQJpUnicodeConv *conv;
+};
+
+#endif
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qeucjpcodec-members.html b/doc/html/qeucjpcodec-members.html new file mode 100644 index 00000000..7e3ceb4c --- /dev/null +++ b/doc/html/qeucjpcodec-members.html @@ -0,0 +1,73 @@ + + + + + +TQEucJpCodec Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQEucJpCodec

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qeucjpcodec.html b/doc/html/qeucjpcodec.html new file mode 100644 index 00000000..7021cabd --- /dev/null +++ b/doc/html/qeucjpcodec.html @@ -0,0 +1,116 @@ + + + + + +TQEucJpCodec Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQEucJpCodec Class Reference

+ +

The TQEucJpCodec class provides conversion to and from EUC-JP character sets. +More... +

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

+

#include <qeucjpcodec.h> +

Inherits TQTextCodec. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +

The TQEucJpCodec class provides conversion to and from EUC-JP character sets. +

More precisely, the TQEucJpCodec class subclasses TQTextCodec to +provide support for EUC-JP, the main legacy encoding for Unix +machines in Japan. +

The environment variable UNICODEMAP_JP can be used to fine-tune +TQJisCodec, TQSjisCodec and TQEucJpCodec. The TQJisCodec +documentation describes how to use this variable. +

Most of the code here was written by Serika Kurusugawa, +a.k.a. Junji Takagi, and is included in TQt with the author's +permission and the grateful thanks of the Trolltech team. Here is +the copyright statement for that code: +

+

Copyright (C) 1999 Serika Kurusugawa. All rights reserved. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS". +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. +

See also Internationalization with TQt. + +


Member Function Documentation

+

TQEucJpCodec::TQEucJpCodec () +

+Constructs a TQEucJpCodec. + +

TQEucJpCodec::~TQEucJpCodec () +

+Destroys the codec. + +

int TQEucJpCodec::mibEnum () const [virtual] +

+Returns 18. + +

Reimplemented from TQTextCodec. +

const char * TQEucJpCodec::mimeName () const [virtual] +

+Returns the codec's mime name. + +

Reimplemented from TQTextCodec. + +


+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/qeuckrcodec-h.html b/doc/html/qeuckrcodec-h.html new file mode 100644 index 00000000..fade5071 --- /dev/null +++ b/doc/html/qeuckrcodec-h.html @@ -0,0 +1,145 @@ + + + + + +qeuckrcodec.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qeuckrcodec.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qeuckrcodec.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQEucKrCodec class
+**
+** Created : 990303
+**
+** Copyright (C) 2000-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 retquirements 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.
+**
+**********************************************************************/
+
+/*
+ * Copyright (C) 1999-2000 Mizi Research Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef TQEUCKRCODEC_H
+#define TQEUCKRCODEC_H
+
+#ifndef QT_H
+#include "qtextcodec.h"
+#endif // QT_H
+
+#ifndef QT_NO_BIG_CODECS
+
+#if defined(QT_PLUGIN)
+#define Q_EXPORT_CODECS_KR
+#else
+#define Q_EXPORT_CODECS_KR Q_EXPORT
+#endif
+
+class Q_EXPORT_CODECS_KR TQEucKrCodec : public TQTextCodec {
+public:
+    virtual int mibEnum() const;
+    const char* name() const;
+    const char* mimeName() const;
+
+    TQTextDecoder* makeDecoder() const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQTextCodec::fromUnicode;
+#endif
+    TQCString fromUnicode(const TQString& uc, int& lenInOut) const;
+    TQString toUnicode(const char* chars, int len) const;
+
+    int heuristicContentMatch(const char* chars, int len) const;
+    int heuristicNameMatch(const char* hint) const;
+};
+
+#endif
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qeuckrcodec-members.html b/doc/html/qeuckrcodec-members.html new file mode 100644 index 00000000..3b107c2c --- /dev/null +++ b/doc/html/qeuckrcodec-members.html @@ -0,0 +1,71 @@ + + + + + +TQEucKrCodec Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQEucKrCodec

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qeuckrcodec.html b/doc/html/qeuckrcodec.html new file mode 100644 index 00000000..00377bcf --- /dev/null +++ b/doc/html/qeuckrcodec.html @@ -0,0 +1,95 @@ + + + + + +TQEucKrCodec Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQEucKrCodec Class Reference

+ +

The TQEucKrCodec class provides conversion to and from EUC-KR character sets. +More... +

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

+

#include <qeuckrcodec.h> +

Inherits TQTextCodec. +

List of all member functions. +

Public Members

+
    +
  • virtual const char * mimeName () const
  • +
+

Detailed Description

+ + + +

The TQEucKrCodec class provides conversion to and from EUC-KR character sets. +

The TQEucKrCodec class subclasses TQTextCodec to provide support for +EUC-KR, the main legacy encoding for UNIX machines in Korea. +

It was largely written by Mizi Research Inc. Here is the copyright +statement for the code as it was at the point of contribution. +Trolltech's subsequent modifications are covered by the usual +copyright for TQt. +

+

Copyright (C) 1999-2000 Mizi Research Inc. All rights reserved. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met:

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. +

See also Internationalization with TQt. + +


Member Function Documentation

+

const char * TQEucKrCodec::mimeName () const [virtual] +

+Returns the codec's mime name. + +

Reimplemented from TQTextCodec. + +


+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/qevent-h.html b/doc/html/qevent-h.html new file mode 100644 index 00000000..af952658 --- /dev/null +++ b/doc/html/qevent-h.html @@ -0,0 +1,662 @@ + + + + + +qevent.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qevent.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qevent.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of event classes
+**
+** Created : 931029
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQEVENT_H
+#define TQEVENT_H
+
+#ifndef QT_H
+#include "qwindowdefs.h"
+#include "qregion.h"
+#include "qnamespace.h"
+#include "qmime.h"
+#include "qpair.h"
+#endif // QT_H
+
+class Q_EXPORT TQEvent: public TQt		// event base class
+{
+public:
+    enum Type {
+
+	/*
+	  If you get a strange compiler error on the line with None,
+	  it's probably because you're also including X11 headers,
+	  which #define the symbol None. Put the X11 includes after
+	  the TQt includes to solve this problem.
+	*/
+
+	None = 0,				// invalid event
+
+
+	Timer = 1,				// timer event
+	MouseButtonPress = 2,			// mouse button pressed
+	MouseButtonRelease = 3,			// mouse button released
+	MouseButtonDblClick = 4,		// mouse button double click
+	MouseMove = 5,				// mouse move
+	KeyPress = 6,				// key pressed
+	KeyRelease = 7,				// key released
+	FocusIn = 8,				// keyboard focus received
+	FocusOut = 9,				// keyboard focus lost
+	Enter = 10,				// mouse enters widget
+	Leave = 11,				// mouse leaves widget
+	Paint = 12,				// paint widget
+	Move = 13,				// move widget
+	Resize = 14,				// resize widget
+	Create = 15,				// after object creation
+	Destroy = 16,				// during object destruction
+	Show = 17,				// widget is shown
+	Hide = 18,				// widget is hidden
+	Close = 19,				// request to close widget
+	Quit = 20,				// request to tquit application
+	Reparent = 21,				// widget has been reparented
+	ShowMinimized = 22,		       	// widget is shown minimized
+	ShowNormal = 23,	       		// widget is shown normal
+	WindowActivate = 24,	       		// window was activated
+	WindowDeactivate = 25,	       		// window was deactivated
+	ShowToParent = 26,	       		// widget is shown to parent
+	HideToParent = 27,	       		// widget is hidden to parent
+	ShowMaximized = 28,		       	// widget is shown maximized
+	ShowFullScreen = 29,			// widget is shown full-screen
+	Accel = 30,				// accelerator event
+	Wheel = 31,				// wheel event
+	AccelAvailable = 32,			// accelerator available event
+	CaptionChange = 33,			// caption changed
+	IconChange = 34,			// icon changed
+	ParentFontChange = 35,			// parent font changed
+	ApplicationFontChange = 36,		// application font changed
+	ParentPaletteChange = 37,		// parent palette changed
+	ApplicationPaletteChange = 38,		// application palette changed
+	PaletteChange = 39,			// widget palette changed
+	Clipboard = 40,				// internal clipboard event
+	Speech = 42,				// reserved for speech input
+	SockAct = 50,				// socket activation
+	AccelOverride = 51,			// accelerator override event
+	DeferredDelete = 52,			// deferred delete event
+	DragEnter = 60,				// drag moves into widget
+	DragMove = 61,				// drag moves in widget
+	DragLeave = 62,				// drag leaves or is cancelled
+	Drop = 63,				// actual drop
+	DragResponse = 64,			// drag accepted/rejected
+	ChildInserted = 70,			// new child widget
+	ChildRemoved = 71,			// deleted child widget
+	LayoutHint = 72,			// child min/max size changed
+	ShowWindowRequest = 73,			// widget's window should be mapped
+	WindowBlocked = 74,			// window is about to be blocked modally
+	WindowUnblocked = 75,			// windows modal blocking has ended
+	ActivateControl = 80,			// ActiveX activation
+	DeactivateControl = 81,			// ActiveX deactivation
+	ContextMenu = 82,			// context popup menu
+	IMStart = 83,				// input method composition start
+	IMCompose = 84,				// input method composition
+	IMEnd = 85,				// input method composition end
+	Accessibility = 86,			// accessibility information is requested
+	TabletMove = 87,			// Wacom tablet event
+	LocaleChange = 88,			// the system locale changed
+	LanguageChange = 89,			// the application language changed
+	LayoutDirectionChange = 90,		// the layout direction changed
+	Style = 91,				// internal style event
+	TabletPress = 92,			// tablet press
+	TabletRelease = 93,			// tablet release
+	OkRequest = 94,				// CE (Ok) button pressed
+	HelpRequest = 95,			// CE (?)  button pressed
+	WindowStateChange = 96,			// window state has changed
+	IconDrag = 97,                          // proxy icon dragged
+	User = 1000,				// first user event id
+	MaxUser = 65535				// last user event id
+    };
+
+
+    TQEvent( Type type ) : t(type), posted(FALSE), spont(FALSE) {}
+    virtual ~TQEvent();
+    Type  type() const	{ return t; }
+    bool spontaneous() const 	{ return spont; }
+protected:
+    Type  t;
+private:
+    uint posted : 1;
+    uint spont : 1;
+
+
+    friend class TQApplication;
+    friend class TQAccelManager;
+    friend class TQBaseApplication;
+    friend class TQETWidget;
+};
+
+
+class Q_EXPORT TQTimerEvent : public TQEvent
+{
+public:
+    TQTimerEvent( int timerId )
+	: TQEvent(Timer), id(timerId) {}
+    int	  timerId()	const	{ return id; }
+protected:
+    int	  id;
+};
+
+
+class Q_EXPORT TQMouseEvent : public TQEvent
+{
+public:
+    TQMouseEvent( Type type, const TQPoint &pos, int button, int state );
+
+    TQMouseEvent( Type type, const TQPoint &pos, const TQPoint&globalPos,
+		 int button, int state )
+	: TQEvent(type), p(pos), g(globalPos), b((ushort)button),s((ushort)state),accpt(TRUE) {};
+
+    const TQPoint &pos() const	{ return p; }
+    const TQPoint &globalPos() const { return g; }
+    int	   x()		const	{ return p.x(); }
+    int	   y()		const	{ return p.y(); }
+    int	   globalX()	const	{ return g.x(); }
+    int	   globalY()	const	{ return g.y(); }
+    ButtonState button() const	{ return (ButtonState) b; }
+    ButtonState state()	const	{ return (ButtonState) s; }
+    ButtonState stateAfter() const;
+    bool   isAccepted() const	{ return accpt; }
+    void   accept()		{ accpt = TRUE; }
+    void   ignore()		{ accpt = FALSE; }
+protected:
+    TQPoint p;
+    TQPoint g;
+    ushort b;
+    ushort s;
+    uint   accpt:1;
+};
+
+
+#ifndef QT_NO_WHEELEVENT
+class Q_EXPORT TQWheelEvent : public TQEvent
+{
+public:
+    TQWheelEvent( const TQPoint &pos, int delta, int state, Orientation orient = Vertical );
+    TQWheelEvent( const TQPoint &pos, const TQPoint& globalPos, int delta, int state, Orientation orient = Vertical  )
+	: TQEvent(Wheel), p(pos), g(globalPos), d(delta), s((ushort)state),
+	  accpt(TRUE), o(orient) {}
+    int	   delta()	const	{ return d; }
+    const TQPoint &pos() const	{ return p; }
+    const TQPoint &globalPos() const	{ return g; }
+    int	   x()		const	{ return p.x(); }
+    int	   y()		const	{ return p.y(); }
+    int	   globalX()	const	{ return g.x(); }
+    int	   globalY()	const	{ return g.y(); }
+    ButtonState state()	const	{ return ButtonState(s); }
+    Orientation orientation() 	const 	{ return o; }
+    bool   isAccepted() const	{ return accpt; }
+    void   accept()		{ accpt = TRUE; }
+    void   ignore()		{ accpt = FALSE; }
+protected:
+    TQPoint p;
+    TQPoint g;
+    int d;
+    ushort s;
+    bool   accpt;
+    Orientation o;
+};
+#endif
+
+class Q_EXPORT TQTabletEvent : public TQEvent
+{
+public:
+    enum TabletDevice { NoDevice = -1, Puck, Stylus, Eraser };
+    TQTabletEvent( Type t, const TQPoint &pos, const TQPoint &globalPos, int device,
+		  int pressure, int xTilt, int yTilt, const TQPair<int,int> &uId );
+    TQTabletEvent( const TQPoint &pos, const TQPoint &globalPos, int device,
+		  int pressure, int xTilt, int yTilt, const TQPair<int,int> &uId )
+	: TQEvent( TabletMove ), mPos( pos ), mGPos( globalPos ), mDev( device ),
+	  mPress( pressure ), mXT( xTilt ), mYT( yTilt ), mType( uId.first ),
+	  mPhy( uId.second ), mbAcc(TRUE)
+    {}
+    int pressure()	const { return mPress; }
+    int xTilt()		const { return mXT; }
+    int yTilt()		const { return mYT; }
+    const TQPoint &pos()	const { return mPos; }
+    const TQPoint &globalPos() const { return mGPos; }
+    int x()		const { return mPos.x(); }
+    int y()		const { return mPos.y(); }
+    int globalX()	const { return mGPos.x(); }
+    int globalY()	const { return mGPos.y(); }
+    TabletDevice device() 	const { return TabletDevice(mDev); }
+    int isAccepted() const { return mbAcc; }
+    void accept() { mbAcc = TRUE; }
+    void ignore() { mbAcc = FALSE; }
+    TQPair<int,int> uniqueId() { return TQPair<int,int>( mType, mPhy); }
+protected:
+    TQPoint mPos;
+    TQPoint mGPos;
+    int mDev,
+	mPress,
+	mXT,
+	mYT,
+	mType,
+	mPhy;
+    bool mbAcc;
+
+};
+
+class Q_EXPORT TQKeyEvent : public TQEvent
+{
+public:
+    TQKeyEvent( Type type, int key, int ascii, int state,
+		const TQString& text=TQString::null, bool autorep=FALSE, ushort count=1 )
+	: TQEvent(type), txt(text), k((ushort)key), s((ushort)state),
+	    a((uchar)ascii), accpt(TRUE), autor(autorep), c(count)
+    {
+	if ( key >= Key_Back && key <= Key_MediaLast )
+	    accpt = FALSE;
+    }
+    int	   key()	const	{ return k; }
+    int	   ascii()	const	{ return a; }
+    ButtonState state()	const	{ return ButtonState(s); }
+    ButtonState stateAfter() const;
+    bool   isAccepted() const	{ return accpt; }
+    TQString text()      const   { return txt; }
+    bool   isAutoRepeat() const	{ return autor; }
+    int   count() const	{ return int(c); }
+    void   accept()		{ accpt = TRUE; }
+    void   ignore()		{ accpt = FALSE; }
+
+protected:
+    TQString txt;
+    ushort k, s;
+    uchar  a;
+    uint   accpt:1;
+    uint   autor:1;
+    ushort c;
+};
+
+
+class Q_EXPORT TQFocusEvent : public TQEvent
+{
+public:
+
+    TQFocusEvent( Type type )
+	: TQEvent(type) {}
+
+    bool   gotFocus()	const { return type() == FocusIn; }
+    bool   lostFocus()	const { return type() == FocusOut; }
+
+    enum Reason { Mouse, Tab, Backtab, ActiveWindow, Popup, Shortcut, Other };
+    static Reason reason();
+    static void setReason( Reason reason );
+    static void resetReason();
+
+private:
+    static Reason m_reason;
+    static Reason prev_reason;
+};
+
+
+class Q_EXPORT TQPaintEvent : public TQEvent
+{
+public:
+    TQPaintEvent( const TQRegion& paintRegion, bool erased = TRUE)
+	: TQEvent(Paint),
+	  rec(paintRegion.boundingRect()),
+	  reg(paintRegion),
+	  erase(erased){}
+    TQPaintEvent( const TQRect &paintRect, bool erased = TRUE )
+	: TQEvent(Paint),
+	  rec(paintRect),
+	  reg(paintRect),
+	  erase(erased){}
+    TQPaintEvent( const TQRegion &paintRegion, const TQRect &paintRect, bool erased = TRUE )
+	: TQEvent(Paint),
+	  rec(paintRect),
+	  reg(paintRegion),
+	  erase(erased){}
+
+    const TQRect &rect() const	  { return rec; }
+    const TQRegion &region() const { return reg; }
+    bool erased() const { return erase; }
+protected:
+    friend class TQApplication;
+    friend class TQBaseApplication;
+    TQRect rec;
+    TQRegion reg;
+    bool erase;
+};
+
+
+class Q_EXPORT TQMoveEvent : public TQEvent
+{
+public:
+    TQMoveEvent( const TQPoint &pos, const TQPoint &oldPos )
+	: TQEvent(Move), p(pos), oldp(oldPos) {}
+    const TQPoint &pos()	  const { return p; }
+    const TQPoint &oldPos()const { return oldp;}
+protected:
+    TQPoint p, oldp;
+    friend class TQApplication;
+    friend class TQBaseApplication;
+};
+
+
+class Q_EXPORT TQResizeEvent : public TQEvent
+{
+public:
+    TQResizeEvent( const TQSize &size, const TQSize &oldSize )
+	: TQEvent(Resize), s(size), olds(oldSize) {}
+    const TQSize &size()	  const { return s; }
+    const TQSize &oldSize()const { return olds;}
+protected:
+    TQSize s, olds;
+    friend class TQApplication;
+    friend class TQBaseApplication;
+};
+
+
+class Q_EXPORT TQCloseEvent : public TQEvent
+{
+public:
+    TQCloseEvent()
+	: TQEvent(Close), accpt(FALSE) {}
+    bool   isAccepted() const	{ return accpt; }
+    void   accept()		{ accpt = TRUE; }
+    void   ignore()		{ accpt = FALSE; }
+protected:
+    bool   accpt;
+};
+
+
+class Q_EXPORT TQIconDragEvent : public TQEvent
+{
+public:
+    TQIconDragEvent() 
+	: TQEvent(IconDrag), accpt(FALSE) {}
+
+    bool   isAccepted() const	{ return accpt; }
+    void   accept()		{ accpt = TRUE; }
+    void   ignore()		{ accpt = FALSE; }
+protected:
+    bool   accpt;
+};
+
+class Q_EXPORT TQShowEvent : public TQEvent
+{
+public:
+    TQShowEvent()
+	: TQEvent(Show) {}
+};
+
+
+class Q_EXPORT TQHideEvent : public TQEvent
+{
+public:
+    TQHideEvent()
+	: TQEvent(Hide) {}
+};
+
+class Q_EXPORT TQContextMenuEvent : public TQEvent
+{
+public:
+    enum Reason { Mouse, Keyboard, Other };
+    TQContextMenuEvent( Reason reason, const TQPoint &pos, const TQPoint &globalPos, int state )
+	: TQEvent( ContextMenu ), p( pos ), gp( globalPos ), accpt( TRUE ), consum( TRUE ),
+	reas( reason ), s((ushort)state) {}
+    TQContextMenuEvent( Reason reason, const TQPoint &pos, int state );
+
+    int	    x() const { return p.x(); }
+    int	    y() const { return p.y(); }
+    int	    globalX() const { return gp.x(); }
+    int	    globalY() const { return gp.y(); }
+
+    const TQPoint&   pos() const { return p; }
+    const TQPoint&   globalPos() const { return gp; }
+
+    ButtonState state()	const	{ return (ButtonState) s; }
+    bool    isAccepted() const	{ return accpt; }
+    bool    isConsumed() const	{ return consum; }
+    void    consume()		{ accpt = FALSE; consum = TRUE; }
+    void    accept()		{ accpt = TRUE; consum = TRUE; }
+    void    ignore()		{ accpt = FALSE; consum = FALSE; }
+
+    Reason  reason() const { return Reason( reas ); }
+
+protected:
+    TQPoint  p;
+    TQPoint  gp;
+    bool    accpt;
+    bool    consum;
+    uint    reas:8;
+    ushort s;
+};
+
+
+class Q_EXPORT TQIMEvent : public TQEvent
+{
+public:
+    TQIMEvent( Type type, const TQString &text, int cursorPosition )
+	: TQEvent(type), txt(text), cpos(cursorPosition), a(TRUE) {}
+    const TQString &text() const { return txt; }
+    int cursorPos() const { return cpos; }
+    bool isAccepted() const { return a; }
+    void accept() { a = TRUE; }
+    void ignore() { a = FALSE; }
+    int selectionLength() const;
+
+private:
+    TQString txt;
+    int cpos;
+    bool a;
+};
+
+class Q_EXPORT TQIMComposeEvent : public TQIMEvent
+{
+public:
+    TQIMComposeEvent( Type type, const TQString &text, int cursorPosition,
+		     int selLength )
+	: TQIMEvent( type, text, cursorPosition ), selLen( selLength ) { }
+
+private:
+    int selLen;
+
+    friend class TQIMEvent;
+};
+
+inline int TQIMEvent::selectionLength() const
+{
+    if ( type() != IMCompose ) return 0;
+    TQIMComposeEvent *that = (TQIMComposeEvent *) this;
+    return that->selLen;
+}
+
+
+#ifndef QT_NO_DRAGANDDROP
+
+// This class is rather closed at the moment.  If you need to create your
+// own DND event objects, write to qt-bugs@trolltech.com and we'll try to
+// find a way to extend it so it covers your needs.
+
+class Q_EXPORT TQDropEvent : public TQEvent, public TQMimeSource
+{
+public:
+    TQDropEvent( const TQPoint& pos, Type typ=Drop )
+	: TQEvent(typ), p(pos),
+	  act(0), accpt(0), accptact(0), resv(0),
+	  d(0)
+	{}
+    const TQPoint &pos() const	{ return p; }
+    bool isAccepted() const	{ return accpt || accptact; }
+    void accept(bool y=TRUE)	{ accpt = y; }
+    void ignore()		{ accpt = FALSE; }
+
+    bool isActionAccepted() const { return accptact; }
+    void acceptAction(bool y=TRUE) { accptact = y; }
+    enum Action { Copy, Link, Move, Private, UserAction=100 };
+    void setAction( Action a ) { act = (uint)a; }
+    Action action() const { return Action(act); }
+
+    TQWidget* source() const;
+    const char* format( int n = 0 ) const;
+    TQByteArray encodedData( const char* ) const;
+    bool provides( const char* ) const;
+
+    TQByteArray data(const char* f) const { return encodedData(f); }
+
+    void setPoint( const TQPoint& np ) { p = np; }
+
+protected:
+    TQPoint p;
+    uint act:8;
+    uint accpt:1;
+    uint accptact:1;
+    uint resv:5;
+    void * d;
+};
+
+
+
+class Q_EXPORT TQDragMoveEvent : public TQDropEvent
+{
+public:
+    TQDragMoveEvent( const TQPoint& pos, Type typ=DragMove )
+	: TQDropEvent(pos,typ),
+	  rect( pos, TQSize( 1, 1 ) ) {}
+    TQRect answerRect() const { return rect; }
+    void accept( bool y=TRUE ) { TQDropEvent::accept(y); }
+    void accept( const TQRect & r) { accpt = TRUE; rect = r; }
+    void ignore( const TQRect & r) { accpt =FALSE; rect = r; }
+    void ignore()		{ TQDropEvent::ignore(); }
+
+protected:
+    TQRect rect;
+};
+
+
+class Q_EXPORT TQDragEnterEvent : public TQDragMoveEvent
+{
+public:
+    TQDragEnterEvent( const TQPoint& pos ) :
+	TQDragMoveEvent(pos, DragEnter) { }
+};
+
+
+/* An internal class */
+class Q_EXPORT TQDragResponseEvent : public TQEvent
+{
+public:
+    TQDragResponseEvent( bool accepted )
+	: TQEvent(DragResponse), a(accepted) {}
+    bool   dragAccepted() const	{ return a; }
+protected:
+    bool a;
+};
+
+
+class Q_EXPORT TQDragLeaveEvent : public TQEvent
+{
+public:
+    TQDragLeaveEvent()
+	: TQEvent(DragLeave) {}
+};
+
+#endif // QT_NO_DRAGANDDROP
+
+class Q_EXPORT TQChildEvent : public TQEvent
+{
+public:
+    TQChildEvent( Type type, TQObject *child )
+	: TQEvent(type), c(child) {}
+    TQObject *child() const	{ return c; }
+    bool inserted() const { return t == ChildInserted; }
+    bool removed() const { return t == ChildRemoved; }
+protected:
+    TQObject *c;
+};
+
+
+class Q_EXPORT TQCustomEvent : public TQEvent
+{
+public:
+    TQCustomEvent( int type );
+    TQCustomEvent( Type type, void *data )
+	: TQEvent(type), d(data) {};
+    void       *data()	const	{ return d; }
+    void	setData( void* data )	{ d = data; }
+private:
+    void       *d;
+};
+
+#endif // TQEVENT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qevent-members.html b/doc/html/qevent-members.html new file mode 100644 index 00000000..5bdd98e1 --- /dev/null +++ b/doc/html/qevent-members.html @@ -0,0 +1,50 @@ + + + + + +TQEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQEvent

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qevent.html b/doc/html/qevent.html new file mode 100644 index 00000000..da2f00b1 --- /dev/null +++ b/doc/html/qevent.html @@ -0,0 +1,193 @@ + + + + + +TQEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQEvent Class Reference

+ +

The TQEvent class is the base class of all +event classes. Event objects contain event parameters. +More... +

#include <qevent.h> +

Inherits TQt. +

Inherited by TQTimerEvent, TQMouseEvent, TQWheelEvent, TQTabletEvent, TQKeyEvent, TQFocusEvent, TQPaintEvent, TQMoveEvent, TQResizeEvent, TQCloseEvent, TQIconDragEvent, TQShowEvent, TQHideEvent, TQContextMenuEvent, TQIMEvent, TQDropEvent, TQDragLeaveEvent, TQChildEvent, and TQCustomEvent. +

List of all member functions. +

Public Members

+
    +
  • enum Type { None = 0, Timer = 1, MouseButtonPress = 2, MouseButtonRelease = 3, MouseButtonDblClick = 4, MouseMove = 5, KeyPress = 6, KeyRelease = 7, FocusIn = 8, FocusOut = 9, Enter = 10, Leave = 11, Paint = 12, Move = 13, Resize = 14, Create = 15, Destroy = 16, Show = 17, Hide = 18, Close = 19, Quit = 20, Reparent = 21, ShowMinimized = 22, ShowNormal = 23, WindowActivate = 24, WindowDeactivate = 25, ShowToParent = 26, HideToParent = 27, ShowMaximized = 28, ShowFullScreen = 29, Accel = 30, Wheel = 31, AccelAvailable = 32, CaptionChange = 33, IconChange = 34, ParentFontChange = 35, ApplicationFontChange = 36, ParentPaletteChange = 37, ApplicationPaletteChange = 38, PaletteChange = 39, Clipboard = 40, Speech = 42, SockAct = 50, AccelOverride = 51, DeferredDelete = 52, DragEnter = 60, DragMove = 61, DragLeave = 62, Drop = 63, DragResponse = 64, ChildInserted = 70, ChildRemoved = 71, LayoutHint = 72, ShowWindowRequest = 73, WindowBlocked = 74, WindowUnblocked = 75, ActivateControl = 80, DeactivateControl = 81, ContextMenu = 82, IMStart = 83, IMCompose = 84, IMEnd = 85, Accessibility = 86, TabletMove = 87, LocaleChange = 88, LanguageChange = 89, LayoutDirectionChange = 90, Style = 91, TabletPress = 92, TabletRelease = 93, OkRequest = 94, HelpRequest = 95, WindowStateChange = 96, IconDrag = 97, User = 1000, MaxUser = 65535 }
  • +
  • TQEvent ( Type type )
  • +
  • virtual ~TQEvent ()
  • +
  • Type type () const
  • +
  • bool spontaneous () const
  • +
+

Detailed Description

+ + +The TQEvent class is the base class of all +event classes. Event objects contain event parameters. +

+ +

TQt's main event loop (TQApplication::exec()) fetches native window +system events from the event queue, translates them into TQEvents +and sends the translated events to TQObjects. +

In general, events come from the underlying window system +(spontaneous() returns TRUE) but it is also possible to manually +send events using TQApplication::sendEvent() and +TQApplication::postEvent() (spontaneous() returns FALSE). +

TQObjects receive events by having their TQObject::event() function +called. The function can be reimplemented in subclasses to +customize event handling and add additional event types; +TQWidget::event() is a notable example. By default, events are +dispatched to event handlers like TQObject::timerEvent() and +TQWidget::mouseMoveEvent(). TQObject::installEventFilter() allows an +object to intercept events destined for another object. +

The basic TQEvent contains only an event type parameter. +Subclasses of TQEvent contain additional parameters that describe +the particular event. +

See also TQObject::event(), TQObject::installEventFilter(), TQWidget::event(), TQApplication::sendEvent(), TQApplication::postEvent(), TQApplication::processEvents(), Environment Classes, and Event Classes. + +


Member Type Documentation

+

TQEvent::Type

+ +

This enum type defines the valid event types in TQt. The event +types and the specialized classes for each type are these: +

    +
  • TQEvent::None - Not an event. +
  • TQEvent::Accessibility - Accessibility information is requested +
  • TQEvent::Timer - Regular timer events, TQTimerEvent. +
  • TQEvent::MouseButtonPress - Mouse press, TQMouseEvent. +
  • TQEvent::MouseButtonRelease - Mouse release, TQMouseEvent. +
  • TQEvent::MouseButtonDblClick - Mouse press again, TQMouseEvent. +
  • TQEvent::MouseMove - Mouse move, TQMouseEvent. +
  • TQEvent::KeyPress - Key press (including Shift, for example), TQKeyEvent. +
  • TQEvent::KeyRelease - Key release, TQKeyEvent. +
  • TQEvent::IMStart - The start of input method composition, TQIMEvent. +
  • TQEvent::IMCompose - Input method composition is taking place, TQIMEvent. +
  • TQEvent::IMEnd - The end of input method composition, TQIMEvent. +
  • TQEvent::FocusIn - Widget gains keyboard focus, TQFocusEvent. +
  • TQEvent::FocusOut - Widget loses keyboard focus, TQFocusEvent. +
  • TQEvent::Enter - Mouse enters widget's boundaries. +
  • TQEvent::Leave - Mouse leaves widget's boundaries. +
  • TQEvent::Paint - Screen update necessary, TQPaintEvent. +
  • TQEvent::Move - Widget's position changed, TQMoveEvent. +
  • TQEvent::Resize - Widget's size changed, TQResizeEvent. +
  • TQEvent::Show - Widget was shown on screen, TQShowEvent. +
  • TQEvent::Hide - Widget was hidden, TQHideEvent. +
  • TQEvent::ShowToParent - A child widget has been shown. +
  • TQEvent::HideToParent - A child widget has been hidden. +
  • TQEvent::Close - Widget was closed (permanently), TQCloseEvent. +
  • TQEvent::ShowNormal - Widget should be shown normally (obsolete). +
  • TQEvent::ShowMaximized - Widget should be shown maximized (obsolete). +
  • TQEvent::ShowMinimized - Widget should be shown minimized (obsolete). +
  • TQEvent::ShowFullScreen - Widget should be shown full-screen (obsolete). +
  • TQEvent::ShowWindowRequest - Widget's window should be shown (obsolete). +
  • TQEvent::DeferredDelete - The object will be deleted after it has +cleaned up. +
  • TQEvent::Accel - Key press in child for shortcut key handling, TQKeyEvent. +
  • TQEvent::Wheel - Mouse wheel rolled, TQWheelEvent. +
  • TQEvent::ContextMenu - Context popup menu, TQContextMenuEvent +
  • TQEvent::AccelOverride - Key press in child, for overriding shortcut key handling, TQKeyEvent. +
  • TQEvent::AccelAvailable - internal. +
  • TQEvent::WindowActivate - Window was activated. +
  • TQEvent::WindowDeactivate - Window was deactivated. +
  • TQEvent::CaptionChange - Widget's caption changed. +
  • TQEvent::IconChange - Widget's icon changed. +
  • TQEvent::ParentFontChange - Font of the parent widget changed. +
  • TQEvent::ApplicationFontChange - Default application font changed. +
  • TQEvent::PaletteChange - Palette of the widget changed. +
  • TQEvent::ParentPaletteChange - Palette of the parent widget changed. +
  • TQEvent::ApplicationPaletteChange - Default application palette changed. +
  • TQEvent::Clipboard - Clipboard contents have changed. +
  • TQEvent::SockAct - Socket activated, used to implement TQSocketNotifier. +
  • TQEvent::DragEnter - A drag-and-drop enters widget, TQDragEnterEvent. +
  • TQEvent::DragMove - A drag-and-drop is in progress, TQDragMoveEvent. +
  • TQEvent::DragLeave - A drag-and-drop leaves widget, TQDragLeaveEvent. +
  • TQEvent::Drop - A drag-and-drop is completed, TQDropEvent. +
  • TQEvent::DragResponse - Internal event used by TQt on some platforms. +
  • TQEvent::ChildInserted - Object gets a child, TQChildEvent. +
  • TQEvent::ChildRemoved - Object loses a child, TQChildEvent. +
  • TQEvent::LayoutHint - Widget child has changed layout properties. +
  • TQEvent::ActivateControl - Internal event used by TQt on some platforms. +
  • TQEvent::DeactivateControl - Internal event used by TQt on some platforms. +
  • TQEvent::LanguageChange - The application translation changed, TQTranslator +
  • TQEvent::LayoutDirectionChange - The direction of layouts changed +
  • TQEvent::LocaleChange - The system locale changed +
  • TQEvent::Quit - Reserved. +
  • TQEvent::Create - Reserved. +
  • TQEvent::Destroy - Reserved. +
  • TQEvent::Reparent - Reserved. +
  • TQEvent::Speech - Reserved for speech input. +
  • TQEvent::TabletMove - A Wacom Tablet Move Event. +
  • TQEvent::Style - Internal use only +
  • TQEvent::TabletPress - A Wacom Tablet Press Event +
  • TQEvent::TabletRelease - A Wacom Tablet Release Event +
  • TQEvent::OkRequest - Internal event used by TQt on some platforms. +
  • TQEvent::HelpRequest - Internal event used by TQt on some platforms. +
  • TQEvent::IconDrag - Internal event used by TQt on some platforms when proxy icon is dragged. +
  • TQEvent::WindowStateChange - The window's state, i.e. minimized, +maximized or full-screen, has changed. See TQWidget::windowState(). +
  • TQEvent::WindowBlocked - The window is modally blocked +
  • TQEvent::WindowUnblocked - The window leaves modal blocking +
  • TQEvent::User - User defined event. +
  • TQEvent::MaxUser - Last user event id. +

User events should have values between User and MaxUser inclusive. + +


Member Function Documentation

+

TQEvent::TQEvent ( Type type ) +

+ +

Contructs an event object of type type. + +

TQEvent::~TQEvent () [virtual] +

+Destroys the event. If it was posted, +it will be removed from the list of events to be posted. + +

bool TQEvent::spontaneous () const +

+ +

Returns TRUE if the event originated outside the application, i.e. +it is a system event; otherwise returns FALSE. + +

Type TQEvent::type () const +

+ +

Returns the event type. + + +


+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/qeventloop-h.html b/doc/html/qeventloop-h.html new file mode 100644 index 00000000..b9383976 --- /dev/null +++ b/doc/html/qeventloop-h.html @@ -0,0 +1,167 @@ + + + + + +qeventloop.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qeventloop.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qeventloop.h   3.3.8   edited Jan 11 14:38 $
+**
+** Declaration of TQEventLoop class
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQEVENTLOOP_H
+#define TQEVENTLOOP_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qsocketnotifier.h"
+#endif // QT_H
+
+class TQEventLoopPrivate;
+class TQSocketNotifier;
+class TQTimer;
+#ifdef Q_WS_MAC
+struct timeval; //stdc struct
+struct TimerInfo; //internal structure (qeventloop_mac.cpp)
+#endif
+
+#if defined(QT_THREAD_SUPPORT)
+class TQMutex;
+#endif // QT_THREAD_SUPPORT
+
+
+class Q_EXPORT TQEventLoop : public TQObject
+{
+    Q_OBJECT
+
+public:
+    TQEventLoop( TQObject *parent = 0, const char *name = 0 );
+    ~TQEventLoop();
+
+    enum ProcessEvents {
+	AllEvents		= 0x00,
+	ExcludeUserInput	= 0x01,
+	ExcludeSocketNotifiers	= 0x02,
+	WaitForMore		= 0x04
+    };
+    typedef uint ProcessEventsFlags;
+
+    void processEvents( ProcessEventsFlags flags, int maxtime );
+    virtual bool processEvents( ProcessEventsFlags flags );
+
+    virtual bool hasPendingEvents() const;
+
+    virtual void registerSocketNotifier( TQSocketNotifier * );
+    virtual void unregisterSocketNotifier( TQSocketNotifier * );
+    void setSocketNotifierPending( TQSocketNotifier * );
+    int activateSocketNotifiers();
+
+    int activateTimers();
+    int timeToWait() const;
+
+    virtual int exec();
+    virtual void exit( int retcode = 0 );
+
+    virtual int enterLoop();
+    virtual void exitLoop();
+    virtual int loopLevel() const;
+
+    virtual void wakeUp();
+
+signals:
+    void awake();
+    void aboutToBlock();
+
+private:
+#if defined(Q_WS_MAC)
+    friend TQMAC_PASCAL void qt_mac_select_timer_callbk(EventLoopTimerRef, void *);
+    int macHandleSelect(timeval *);
+    void macHandleTimer(TimerInfo *);
+#endif // Q_WS_MAC
+
+    // internal initialization/cleanup - implemented in various platform specific files
+    void init();
+    void cleanup();
+    virtual void appStartingUp();
+    virtual void appClosingDown();
+
+    // data for the default implementation - other implementations should not
+    // use/need this data
+    TQEventLoopPrivate *d;
+
+    friend class TQApplication;
+};
+
+#endif // TQEVENTLOOP_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qeventloop-members.html b/doc/html/qeventloop-members.html new file mode 100644 index 00000000..4b3118a9 --- /dev/null +++ b/doc/html/qeventloop-members.html @@ -0,0 +1,106 @@ + + + + + +TQEventLoop Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQEventLoop

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qeventloop.html b/doc/html/qeventloop.html new file mode 100644 index 00000000..46e06c13 --- /dev/null +++ b/doc/html/qeventloop.html @@ -0,0 +1,280 @@ + + + + + +TQEventLoop Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQEventLoop Class Reference

+ +

The TQEventLoop class manages the event queue. +More... +

#include <qeventloop.h> +

Inherits TQObject. +

Inherited by TQMotif. +

List of all member functions. +

Public Members

+ +

Signals

+ +

Detailed Description

+ + +The TQEventLoop class manages the event queue. +

+ +

It receives events from the window system and other sources. It +then sends them to TQApplication for processing and delivery. +

TQEventLoop allows the application programmer to have more control +over event delivery. Programs that perform long operations can +call either processOneEvent() or processEvents() with various +ProcessEvent values OR'ed together to control which events should +be delivered. +

TQEventLoop also allows the integration of an external event loop +with the TQt event loop. The Motif Extension included with TQt +includes a reimplementation of TQEventLoop for merging TQt and Motif +events together. +

To use your own instance of TQEventLoop or TQEventLoop subclass create +it before you create the TQApplication object. +

See also Main Window and Related Classes and Event Classes. + +


Member Type Documentation

+

TQEventLoop::ProcessEvents

+

This enum controls the types of events processed by the +processEvents() functions. +

    +
  • TQEventLoop::AllEvents - All events are processed +
  • TQEventLoop::ExcludeUserInput - Do not process user input events. +( ButtonPress, KeyPress, etc. ) +
  • TQEventLoop::ExcludeSocketNotifiers - Do not process socket notifier +events. +
  • TQEventLoop::WaitForMore - Wait for events if no pending events +are available. +

See also processEvents(). + +

TQEventLoop::ProcessEventsFlags

+A typedef to allow various ProcessEvents values to be OR'ed together. +

See also ProcessEvents. + +


Member Function Documentation

+

TQEventLoop::TQEventLoop ( TQObject * parent = 0, const char * name = 0 ) +

+Creates a TQEventLoop object, this object becomes the global event loop object. +There can only be one event loop object. The TQEventLoop is usually constructed +by calling TQApplication::eventLoop(). To create your own event loop object create +it before you instantiate the TQApplication object. +

The parent and name arguments are passed on to the TQObject constructor. + +

TQEventLoop::~TQEventLoop () +

+Destructs the TQEventLoop object. + +

void TQEventLoop::aboutToBlock () [signal] +

+

This signal is emitted before the event loop calls a function that +could block. +

See also awake(). + +

int TQEventLoop::activateSocketNotifiers () +

+

Activates all pending socket notifiers and returns the number of +socket notifiers that were activated. + +

int TQEventLoop::activateTimers () +

+

Activates all TQt timers and returns the number of timers that were +activated. +

TQEventLoop subclasses that do their own timer handling need to +call this after the time returned by timeToWait() has elapsed. +

Note: This function is only useful on systems where select() is +used to block the eventloop. On Windows, this function always +returns 0. On MacOS X, this function always returns 0 when the +GUI is enabled. On MacOS X, this function returns the documented +value when the GUI is disabled. + +

void TQEventLoop::awake () [signal] +

+

This signal is emitted after the event loop returns from a +function that could block. +

See also wakeUp() and aboutToBlock(). + +

int TQEventLoop::enterLoop () [virtual] +

+

This function enters the main event loop (recursively). Do not call +it unless you really know what you are doing. + +

int TQEventLoop::exec () [virtual] +

+Enters the main event loop and waits until exit() is called, and +returns the value that was set to exit(). +

It is necessary to call this function to start event handling. The +main event loop receives events from the window system and +dispatches these to the application widgets. +

Generally speaking, no user interaction can take place before +calling exec(). As a special case, modal widgets like TQMessageBox +can be used before calling exec(), because modal widgets call +exec() to start a local event loop. +

To make your application perform idle processing, i.e. executing a +special function whenever there are no pending events, use a +TQTimer with 0 timeout. More advanced idle processing schemes can +be achieved using processEvents(). +

See also TQApplication::tquit(), exit(), and processEvents(). + +

void TQEventLoop::exit ( int retcode = 0 ) [virtual] +

+

Tells the event loop to exit with a return code. +

After this function has been called, the event loop returns from +the call to exec(). The exec() function returns retcode. +

By convention, a retcode of 0 means success, and any non-zero +value indicates an error. +

Note that unlike the C library function of the same name, this +function does return to the caller -- it is event processing that +stops. +

See also TQApplication::tquit() and exec(). + +

void TQEventLoop::exitLoop () [virtual] +

+

This function exits from a recursive call to the main event loop. +Do not call it unless you really know what you are doing. + +

bool TQEventLoop::hasPendingEvents () const [virtual] +

+

Returns TRUE if there is an event waiting, otherwise it returns FALSE. + +

int TQEventLoop::loopLevel () const [virtual] +

+

Returns the current loop level. + +

void TQEventLoop::processEvents ( ProcessEventsFlags flags, int maxTime ) +

+Process pending events that match flags for a maximum of maxTime milliseconds, or until there are no more events to +process, which ever is shorter. +

This function is especially useful if you have a long running +operation and want to show its progress without allowing user +input, i.e. by using the ExcludeUserInput flag. +

NOTE: This function will not process events continuously; it +returns after all available events are processed. +

NOTE: Specifying the WaitForMore flag makes no sense and will +be ignored. + +

bool TQEventLoop::processEvents ( ProcessEventsFlags flags ) [virtual] +

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

Processes pending events that match flags until there are no +more events to process. +

This function is especially useful if you have a long running +operation and want to show its progress without allowing user +input, i.e. by using the ExcludeUserInput flag. +

If the WaitForMore flag is set in flags, the behavior of +this function is as follows: +

    +

  • If events are available, this function returns after processing +them. +

  • If no events are available, this function will wait until more +are available and return after processing newly available events. +

+

If the WaitForMore flag is not set in flags, and no +events are available, this function will return immediately. +

NOTE: This function will not process events continuously; it +returns after all available events are processed. +

This function returns TRUE if an event was processed; otherwise it +returns FALSE. +

See also ProcessEvents and hasPendingEvents(). + +

void TQEventLoop::registerSocketNotifier ( TQSocketNotifier * notifier ) [virtual] +

+

Registers notifier with the event loop. Subclasses need to +reimplement this method to tie a socket notifier into another +event loop. Reimplementations MUST call the base +implementation. + +

void TQEventLoop::setSocketNotifierPending ( TQSocketNotifier * notifier ) +

+

Marks notifier as pending. The socket notifier will be +activated the next time activateSocketNotifiers() is called. + +

int TQEventLoop::timeToWait () const +

+

Returns the number of milliseconds that TQt needs to handle its +timers or -1 if there are no timers running. +

TQEventLoop subclasses that do their own timer handling need to use +this to make sure that TQt's timers continue to work. +

Note: This function is only useful on systems where select() is +used to block the eventloop. On Windows, this function always +returns -1. On MacOS X, this function always returns -1 when the +GUI is enabled. On MacOS X, this function returns the documented +value when the GUI is disabled. + +

void TQEventLoop::unregisterSocketNotifier ( TQSocketNotifier * notifier ) [virtual] +

+

Unregisters notifier from the event loop. Subclasses need to +reimplement this method to tie a socket notifier into another +event loop. Reimplementations MUST call the base +implementation. + +

void TQEventLoop::wakeUp () [virtual] +

Note: This function is thread-safe when TQt is built withthread support.

+ + +

Wakes up the event loop. +

See also awake(). + + +


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


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfd-example.html b/doc/html/qfd-example.html new file mode 100644 index 00000000..87fc9ad7 --- /dev/null +++ b/doc/html/qfd-example.html @@ -0,0 +1,295 @@ + + + + + +Font Displayer + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Font Displayer

+ + +

+This example program displays all characters of a font. +


+

Header file: +

/****************************************************************************
+** $Id: qt/fontdisplayer.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef FontDisplayer_H
+#define FontDisplayer_H
+
+#include <qframe.h>
+#include <qmainwindow.h>
+
+class TQSlider;
+
+class FontRowTable : public TQFrame {
+    Q_OBJECT
+public:
+    FontRowTable( TQWidget* parent=0, const char* name=0 );
+
+    TQSize sizeHint() const;
+
+signals:
+    void fontInformation(const TQString&);
+
+public slots:
+    void setRow(int);
+    void chooseFont();
+
+
+protected:
+    TQSize cellSize() const;
+    void paintEvent( TQPaintEvent* );
+private:
+    TQFont tablefont;
+    int row;
+};
+
+class FontDisplayer : public TQMainWindow {
+    Q_OBJECT
+public:
+    FontDisplayer( TQWidget* parent=0, const char* name=0 );
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/fontdisplayer.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "fontdisplayer.h"
+#include <qapplication.h>
+#include <qslider.h>
+#include <qspinbox.h>
+#include <qpainter.h>
+#include <qtoolbar.h>
+#include <qstatusbar.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qfontdialog.h>
+#include <stdlib.h>
+
+
+FontRowTable::FontRowTable( TQWidget* parent, const char* name ) :
+    TQFrame(parent,name)
+{
+    setBackgroundMode(PaletteBase);
+    setFrameStyle(Panel|Sunken);
+    setMargin(8);
+    setRow(0);
+    tablefont = TQApplication::font();
+}
+
+TQSize FontRowTable::sizeHint() const
+{
+    return 24*cellSize()+TQSize(2,2)*(margin()+frameWidth());
+}
+
+TQSize FontRowTable::cellSize() const
+{
+    TQFontMetrics fm = fontMetrics();
+    return TQSize( fm.maxWidth(), fm.lineSpacing()+1 );
+}
+
+void FontRowTable::paintEvent( TQPaintEvent* e )
+{
+    TQFrame::paintEvent(e);
+    TQPainter p(this);
+    p.setClipRegion(e->region());
+    TQRect r = e->rect();
+    TQFontMetrics fm = fontMetrics();
+    int ml = frameWidth()+margin() + 1 + TQMAX(0,-fm.minLeftBearing());
+    int mt = frameWidth()+margin();
+    TQSize cell((width()-15-ml)/16,(height()-15-mt)/16);
+
+    if ( !cell.width() || !cell.height() )
+        return;
+
+    int mini = r.left() / cell.width();
+    int maxi = (r.right()+cell.width()-1) / cell.width();
+    int minj = r.top() / cell.height();
+    int maxj = (r.bottom()+cell.height()-1) / cell.height();
+
+    int h = fm.height();
+
+    TQColor body(255,255,192);
+    TQColor negative(255,192,192);
+    TQColor positive(192,192,255);
+    TQColor rnegative(255,128,128);
+    TQColor rpositive(128,128,255);
+
+    for (int j = minj; j<=maxj; j++) {
+        for (int i = mini; i<=maxi; i++) {
+            if ( i < 16 && j < 16 ) {
+                int x = i*cell.width();
+                int y = j*cell.height();
+
+                TQChar ch = TQChar(j*16+i,row);
+
+                if ( fm.inFont(ch) ) {
+                    int w = fm.width(ch);
+                    int l = fm.leftBearing(ch);
+                    int r = fm.rightBearing(ch);
+
+                    x += ml;
+                    y += mt+h;
+
+                    p.fillRect(x,y,w,-h,body);
+                    if ( w ) {
+                        if ( l ) {
+                            p.fillRect(x+(l>0?0:l), y-h/2, abs(l),-h/2,
+                                       l < 0 ? negative : positive);
+                        }
+                        if ( r ) {
+                            p.fillRect(x+w-(r>0?r:0),y+2, abs(r),-h/2,
+                                       r < 0 ? rnegative : rpositive);
+                        }
+                    }
+                    TQString s;
+                    s += ch;
+                    p.setPen(TQPen(TQt::black));
+                    p.drawText(x,y,s);
+                }
+            }
+        }
+    }
+}
+
+void FontRowTable::setRow(int r)
+{
+    row = r;
+
+    TQFontMetrics fm = fontMetrics();
+    TQFontInfo fi = fontInfo();
+    TQString str = TQString("%1 %2pt%3%4 mLB=%5 mRB=%6 mW=%7")
+                    .arg(fi.family())
+                    .arg(fi.pointSize())
+                    .arg(fi.bold() ? " bold" : "")
+                    .arg(fi.italic() ? " italic" : "")
+                    .arg(fm.minLeftBearing())
+                    .arg(fm.minRightBearing())
+                    .arg(fm.maxWidth());
+
+    emit fontInformation(str);
+    update();
+}
+
+void FontRowTable::chooseFont()
+{
+    bool ok;
+    TQFont oldfont = tablefont;
+    tablefont = TQFontDialog::getFont(&ok, oldfont, this);
+
+    if (ok)
+        setFont(tablefont);
+    else
+        tablefont = oldfont;
+}
+
+FontDisplayer::FontDisplayer( TQWidget* parent, const char* name ) :
+    TQMainWindow(parent,name)
+{
+    FontRowTable* table = new FontRowTable(this);
+    TQToolBar* controls = new TQToolBar(this);
+    (void) new TQLabel(tr("Row:"), controls);
+    TQSpinBox *row = new TQSpinBox(0,255,1,controls);
+    controls->addSeparator();
+    TQPushButton *fontbutton = new TQPushButton(tr("Font..."), controls);
+
+    connect(row,SIGNAL(valueChanged(int)),table,SLOT(setRow(int)));
+    connect(fontbutton, SIGNAL(clicked()), table, SLOT(chooseFont()));
+    connect(table,SIGNAL(fontInformation(const TQString&)),
+            statusBar(),SLOT(message(const TQString&)));
+    table->setRow(0);
+    setCentralWidget(table);
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/qfd.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "fontdisplayer.h"
+
+#include <qapplication.h>
+#include <qslider.h>
+#include <qpainter.h>
+#include <qstatusbar.h>
+
+
+
+int main(int argc, char** argv)
+{
+    TQApplication app(argc,argv);
+
+    FontDisplayer m;
+    TQSize sh = m.centralWidget()->sizeHint();
+    m.resize(sh.width(),
+             sh.height()+3*m.statusBar()->height());
+    app.setMainWidget(&m);
+    m.setCaption("TQt Example - TQFD");
+    m.show();
+
+    return app.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfile-h.html b/doc/html/qfile-h.html new file mode 100644 index 00000000..12a8b0de --- /dev/null +++ b/doc/html/qfile-h.html @@ -0,0 +1,176 @@ + + + + + +qfile.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qfile.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qfile.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQFile class
+**
+** Created : 930831
+**
+** 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 retquirements 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 TQFILE_H
+#define TQFILE_H
+
+#ifndef QT_H
+#include "qiodevice.h"
+#include "qstring.h"
+#include <stdio.h>
+#endif // QT_H
+
+class TQDir;
+class TQFilePrivate;
+
+class Q_EXPORT TQFile : public TQIODevice			// file I/O device class
+{
+public:
+    TQFile();
+    TQFile( const TQString &name );
+   ~TQFile();
+
+    TQString	name()	const;
+    void	setName( const TQString &name );
+
+    typedef TQCString (*EncoderFn)( const TQString &fileName );
+    typedef TQString (*DecoderFn)( const TQCString &localfileName );
+    static TQCString encodeName( const TQString &fileName );
+    static TQString decodeName( const TQCString &localFileName );
+    static void setEncodingFunction( EncoderFn );
+    static void setDecodingFunction( DecoderFn );
+
+    bool	exists()   const;
+    static bool exists( const TQString &fileName );
+
+    bool	remove();
+    static bool remove( const TQString &fileName );
+
+    bool	open( int );
+    bool	open( int, FILE * );
+    bool	open( int, int );
+    void	close();
+    void	flush();
+
+    Offset	size() const;
+    Offset	at() const;
+    bool	at( Offset );
+    bool	atEnd() const;
+
+    Q_LONG	readBlock( char *data, Q_ULONG len );
+    Q_LONG	writeBlock( const char *data, Q_ULONG len );
+    Q_LONG	writeBlock( const TQByteArray& data )
+		      { return TQIODevice::writeBlock(data); }
+    Q_LONG	readLine( char *data, Q_ULONG maxlen );
+    Q_LONG	readLine( TQString &, Q_ULONG maxlen );
+
+    int		getch();
+    int		putch( int );
+    int		ungetch( int );
+
+    int		handle() const;
+
+    TQString	errorString() const; // ### TQt 4: move into TQIODevice
+
+protected:
+    void	setErrorString( const TQString& ); // ### TQt 4: move into TQIODevice
+    TQString	fn;
+    FILE       *fh;
+    int		fd;
+    Offset	length;
+    bool	ext_f;
+    TQFilePrivate *d; // ### TQt 4: make private
+
+private:
+    void	init();
+    void	setErrorStringErrno( int );
+    TQCString	ungetchBuffer;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQFile( const TQFile & );
+    TQFile &operator=( const TQFile & );
+#endif
+};
+
+
+inline TQString TQFile::name() const
+{ return fn; }
+
+inline TQIODevice::Offset TQFile::at() const
+{ return ioIndex; }
+
+
+#endif // TQFILE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfile-members.html b/doc/html/qfile-members.html new file mode 100644 index 00000000..7895b900 --- /dev/null +++ b/doc/html/qfile-members.html @@ -0,0 +1,96 @@ + + + + + +TQFile Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFile

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfile.html b/doc/html/qfile.html new file mode 100644 index 00000000..0ecd76d7 --- /dev/null +++ b/doc/html/qfile.html @@ -0,0 +1,503 @@ + + + + + +TQFile Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFile Class Reference

+ +

The TQFile class is an I/O device that operates on files. +More... +

Almost all the functions in this class are reentrant when TQt is built with thread support. The exceptions are setEncodingFunction(), setDecodingFunction(), and setErrorString(). +

#include <qfile.h> +

Inherits TQIODevice. +

List of all member functions. +

Public Members

+
    +
  • TQFile ()
  • +
  • TQFile ( const TQString & name )
  • +
  • ~TQFile ()
  • +
  • TQString name () const
  • +
  • void setName ( const TQString & name )
  • +
  • typedef TQCString (* EncoderFn ) ( const TQString & fileName )
  • +
  • typedef TQString (* DecoderFn ) ( const TQCString & localfileName )
  • +
  • bool exists () const
  • +
  • bool remove ()
  • +
  • virtual bool open ( int m )
  • +
  • bool open ( int m, FILE * f )
  • +
  • bool open ( int m, int f )
  • +
  • virtual void close ()
  • +
  • virtual void flush ()
  • +
  • virtual Offset size () const
  • +
  • virtual bool atEnd () const
  • +
  • virtual Q_LONG readLine ( char * p, Q_ULONG maxlen )
  • +
  • Q_LONG readLine ( TQString & s, Q_ULONG maxlen )
  • +
  • virtual int getch ()
  • +
  • virtual int putch ( int ch )
  • +
  • virtual int ungetch ( int ch )
  • +
  • int handle () const
  • +
  • TQString errorString () const
  • +
+

Static Public Members

+ +

Important Inherited Members

+ +

Protected Members

+ +

Detailed Description

+ + + +The TQFile class is an I/O device that operates on files. +

+ +

TQFile is an I/O device for reading and writing binary and text +files. A TQFile may be used by itself or more conveniently with a +TQDataStream or TQTextStream. +

The file name is usually passed in the constructor but can be +changed with setName(). You can check for a file's existence with +exists() and remove a file with remove(). +

The file is opened with open(), closed with close() and flushed +with flush(). Data is usually read and written using TQDataStream +or TQTextStream, but you can read with readBlock() and readLine() +and write with writeBlock(). TQFile also supports getch(), +ungetch() and putch(). +

The size of the file is returned by size(). You can get the +current file position or move to a new file position using the +at() functions. If you've reached the end of the file, atEnd() +returns TRUE. The file handle is returned by handle(). +

Here is a code fragment that uses TQTextStream to read a text file +line by line. It prints each line with a line number. +

+    TQStringList lines;
+    TQFile file( "file.txt" );
+    if ( file.open( IO_ReadOnly ) ) {
+        TQTextStream stream( &file );
+        TQString line;
+        int i = 1;
+        while ( !stream.atEnd() ) {
+            line = stream.readLine(); // line of text excluding '\n'
+            printf( "%3d: %s\n", i++, line.latin1() );
+            lines += line;
+        }
+        file.close();
+    }
+    
+ +

Writing text is just as easy. The following example shows how to +write the data we read into the string list from the previous +example: +

+    TQFile file( "file.txt" );
+    if ( file.open( IO_WriteOnly ) ) {
+        TQTextStream stream( &file );
+        for ( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
+            stream << *it << "\n";
+        file.close();
+    }
+    
+ +

The TQFileInfo class holds detailed information about a file, such +as access permissions, file dates and file types. +

The TQDir class manages directories and lists of file names. +

TQt uses Unicode file names. If you want to do your own I/O on Unix +systems you may want to use encodeName() (and decodeName()) to +convert the file name into the local encoding. +

+

See also TQDataStream, TQTextStream, and Input/Output and Networking. + +


Member Type Documentation

+

TQFile::DecoderFn

+ +

This is used by TQFile::setDecodingFunction(). + +

TQFile::EncoderFn

+ +

This is used by TQFile::setEncodingFunction(). + +


Member Function Documentation

+

TQFile::TQFile () +

+Constructs a TQFile with no name. + +

TQFile::TQFile ( const TQString & name ) +

+Constructs a TQFile with a file name name. +

See also setName(). + +

TQFile::~TQFile () +

+Destroys a TQFile. Calls close(). + +

bool TQFile::atEnd () const [virtual] +

+Returns TRUE if the end of file has been reached; otherwise returns FALSE. +If TQFile has not been open()'d, then the behavior is undefined. +

See also size(). + +

Example: distributor/distributor.ui.h. +

Reimplemented from TQIODevice. +

void TQFile::close () [virtual] +

+Closes an open file. +

The file is not closed if it was opened with an existing file handle. +If the existing file handle is a FILE*, the file is flushed. +If the existing file handle is an int file descriptor, nothing +is done to the file. +

Some "write-behind" filesystems may report an unspecified error on +closing the file. These errors only indicate that something may +have gone wrong since the previous open(). In such a case status() +reports IO_UnspecifiedError after close(), otherwise IO_Ok. +

See also open() and flush(). + +

Examples: chart/chartform_files.cpp, distributor/distributor.ui.h, helpviewer/helpwindow.cpp, mdi/application.cpp, qdir/qdir.cpp, qwerty/qwerty.cpp, and xml/outliner/outlinetree.cpp. +

Reimplemented from TQIODevice. +

TQString TQFile::decodeName ( const TQCString & localFileName ) [static] +

+This does the reverse of TQFile::encodeName() using localFileName. +

See also setDecodingFunction(). + +

Example: distributor/distributor.ui.h. +

TQCString TQFile::encodeName ( const TQString & fileName ) [static] +

+When you use TQFile, TQFileInfo, and TQDir to access the file system +with TQt, you can use Unicode file names. On Unix, these file names +are converted to an 8-bit encoding. If you want to do your own +file I/O on Unix, you should convert the file name using this +function. On Windows NT/2000, Unicode file names are supported +directly in the file system and this function should be avoided. +On Windows 95, non-Latin1 locales are not supported. +

By default, this function converts fileName to the local 8-bit +encoding determined by the user's locale. This is sufficient for +file names that the user chooses. File names hard-coded into the +application should only use 7-bit ASCII filename characters. +

The conversion scheme can be changed using setEncodingFunction(). +This might be useful if you wish to give the user an option to +store file names in UTF-8, etc., but be aware that such file names +would probably then be unrecognizable when seen by other programs. +

See also decodeName(). + +

Example: distributor/distributor.ui.h. +

TQString TQFile::errorString () const +

+Returns a human-readable description of the reason of an error that occurred +on the device. The error described by the string corresponds to changes of +TQIODevice::status(). If the status is reset, the error string is also reset. +

The returned strings are not translated with the TQObject::tr() or +TQApplication::translate() functions. They are marked as translatable +strings in the "TQFile" context. Before you show the string to the user you +should translate it first, for example: +

+        TQFile f( "address.dat" );
+        if ( !f.open( IO_ReadOnly ) {
+            TQMessageBox::critical(
+                this,
+                tr("Open failed"),
+                tr("Could not open file for reading: %1").arg( qApp->translate("TQFile",f.errorString()) )
+                );
+            return;
+        }
+    
+ +

See also TQIODevice::status(), TQIODevice::resetStatus(), and setErrorString(). + +

bool TQFile::exists ( const TQString & fileName ) [static] +

+Returns TRUE if the file given by fileName exists; otherwise +returns FALSE. + +

Examples: chart/chartform.cpp, dirview/dirview.cpp, and helpviewer/helpwindow.cpp. +

bool TQFile::exists () const +

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

Returns TRUE if this file exists; otherwise returns FALSE. +

See also name(). + +

void TQFile::flush () [virtual] +

+Flushes the file buffer to the disk. +

close() also flushes the file buffer. + +

Reimplemented from TQIODevice. +

int TQFile::getch () [virtual] +

+Reads a single byte/character from the file. +

Returns the byte/character read, or -1 if the end of the file has +been reached. +

See also putch() and ungetch(). + +

Reimplemented from TQIODevice. +

int TQFile::handle () const +

+Returns the file handle of the file. +

This is a small positive integer, suitable for use with C library +functions such as fdopen() and fcntl(). On systems that use file +descriptors for sockets (ie. Unix systems, but not Windows) the handle +can be used with TQSocketNotifier as well. +

If the file is not open or there is an error, handle() returns -1. +

See also TQSocketNotifier. + +

TQString TQFile::name () const +

+ +

Returns the name set by setName(). +

See also setName() and TQFileInfo::fileName(). + +

bool TQFile::open ( int m ) [virtual] +

+Opens the file specified by the file name currently set, using the +mode m. Returns TRUE if successful, otherwise FALSE. +

+

The mode parameter m must be a combination of the following flags: +

+
Flag Meaning +
IO_Raw +Raw (non-buffered) file access. +
IO_ReadOnly +Opens the file in read-only mode. +
IO_WriteOnly +Opens the file in write-only mode. If this flag is used +with another flag, e.g. IO_ReadOnly or IO_Raw or IO_Append, the file is not truncated; but if used on +its own (or with IO_Truncate), the file is truncated. +
IO_ReadWrite +Opens the file in read/write mode, equivalent to (IO_ReadOnly | IO_WriteOnly). +
IO_Append +Opens the file in append mode. (You must actually use (IO_WriteOnly | IO_Append) to make the file writable and +to go into append mode.) This mode is very useful when you +want to write something to a log file. The file index is +set to the end of the file. Note that the result is +undefined if you position the file index manually using +at() in append mode. +
IO_Truncate +Truncates the file. +
IO_Translate +Enables carriage returns and linefeed translation for text +files under Windows. +
+

The raw access mode is best when I/O is block-operated using a 4KB +block size or greater. Buffered access works better when reading +small portions of data at a time. +

Warning: When working with buffered files, data may not be written +to the file at once. Call flush() to make sure that the data is +really written. +

Warning: If you have a buffered file opened for both reading and +writing you must not perform an input operation immediately after +an output operation or vice versa. You should always call flush() +or a file positioning operation, e.g. at(), between input and +output operations, otherwise the buffer may contain garbage. +

If the file does not exist and IO_WriteOnly or IO_ReadWrite +is specified, it is created. +

Example: +

+        TQFile f1( "/tmp/data.bin" );
+        f1.open( IO_Raw | IO_ReadWrite );
+
+        TQFile f2( "readme.txt" );
+        f2.open( IO_ReadOnly | IO_Translate );
+
+        TQFile f3( "audit.log" );
+        f3.open( IO_WriteOnly | IO_Append );
+    
+ +

See also name(), close(), isOpen(), and flush(). + +

Examples: application/application.cpp, chart/chartform_files.cpp, distributor/distributor.ui.h, helpviewer/helpwindow.cpp, qdir/qdir.cpp, qwerty/qwerty.cpp, and xml/outliner/outlinetree.cpp. +

Reimplemented from TQIODevice. +

bool TQFile::open ( int m, FILE * f ) +

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

Opens a file in the mode m using an existing file handle f. +Returns TRUE if successful, otherwise FALSE. +

Example: +

+    #include <stdio.h>
+
+    void printError( const char* msg )
+    {
+        TQFile f;
+        f.open( IO_WriteOnly, stderr );
+        f.writeBlock( msg, qstrlen(msg) );      // write to stderr
+        f.close();
+    }
+  
+ +

When a TQFile is opened using this function, close() does not actually +close the file, only flushes it. +

Warning: If f is stdin, stdout, stderr, you may not +be able to seek. See TQIODevice::isSequentialAccess() for more +information. +

See also close(). + +

bool TQFile::open ( int m, int f ) +

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

Opens a file in the mode m using an existing file descriptor f. +Returns TRUE if successful, otherwise FALSE. +

When a TQFile is opened using this function, close() does not actually +close the file. +

The TQFile that is opened using this function, is automatically set to be in +raw mode; this means that the file input/output functions are slow. If you +run into performance issues, you should try to use one of the other open +functions. +

Warning: If f is one of 0 (stdin), 1 (stdout) or 2 (stderr), you may not +be able to seek. size() is set to INT_MAX (in limits.h). +

See also close(). + +

int TQFile::putch ( int ch ) [virtual] +

+Writes the character ch to the file. +

Returns ch, or -1 if some error occurred. +

See also getch() and ungetch(). + +

Reimplemented from TQIODevice. +

TQByteArray TQIODevice::readAll () [virtual] +

+This convenience function returns all of the remaining data in the +device. + +

Q_LONG TQFile::readLine ( char * p, Q_ULONG maxlen ) [virtual] +

+Reads a line of text. +

Reads bytes from the file into the char* p, until end-of-line +or maxlen bytes have been read, whichever occurs first. Returns +the number of bytes read, or -1 if there was an error. Any +terminating newline is not stripped. +

This function is only efficient for buffered files. Avoid +readLine() for files that have been opened with the IO_Raw +flag. +

See also readBlock() and TQTextStream::readLine(). + +

Reimplemented from TQIODevice. +

Q_LONG TQFile::readLine ( TQString & s, Q_ULONG maxlen ) +

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

Reads a line of text. +

Reads bytes from the file into string s, until end-of-line or +maxlen bytes have been read, whichever occurs first. Returns +the number of bytes read, or -1 if there was an error, e.g. end of +file. Any terminating newline is not stripped. +

This function is only efficient for buffered files. Avoid using +readLine() for files that have been opened with the IO_Raw +flag. +

Note that the string is read as plain Latin1 bytes, not Unicode. +

See also readBlock() and TQTextStream::readLine(). + +

bool TQFile::remove () +

+Removes the file specified by the file name currently set. Returns +TRUE if successful; otherwise returns FALSE. +

The file is closed before it is removed. + +

bool TQFile::remove ( const TQString & fileName ) [static] +

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

Removes the file fileName. +Returns TRUE if successful, otherwise FALSE. + +

void TQFile::setDecodingFunction ( DecoderFn f ) [static] +

Warning: This function is not reentrant.

+ + +

Sets the function for decoding 8-bit file names to f. The +default uses the locale-specific 8-bit encoding. +

See also encodeName() and decodeName(). + +

void TQFile::setEncodingFunction ( EncoderFn f ) [static] +

Warning: This function is not reentrant.

+ + +

Sets the function for encoding Unicode file names to f. The +default encodes in the locale-specific 8-bit encoding. +

See also encodeName(). + +

void TQFile::setErrorString ( const TQString & str ) [protected] +

Warning: This function is not reentrant.

+ + +

Sets the error string returned by the errorString() function to str. +

See also errorString() and TQIODevice::status(). + +

void TQFile::setName ( const TQString & name ) +

+Sets the name of the file to name. The name can have no path, a +relative path or an absolute absolute path. +

Do not call this function if the file has already been opened. +

If the file name has no path or a relative path, the path used +will be whatever the application's current directory path is +at the time of the open() call. +

Example: +

+        TQFile file;
+        TQDir::setCurrent( "/tmp" );
+        file.setName( "readme.txt" );
+        TQDir::setCurrent( "/home" );
+        file.open( IO_ReadOnly );      // opens "/home/readme.txt" under Unix
+    
+ +

Note that the directory separator "/" works for all operating +systems supported by TQt. +

See also name(), TQFileInfo, and TQDir. + +

Offset TQFile::size () const [virtual] +

+Returns the file size. +

See also at(). + +

Example: table/statistics/statistics.cpp. +

Reimplemented from TQIODevice. +

int TQFile::ungetch ( int ch ) [virtual] +

+Puts the character ch back into the file and decrements the +index if it is not zero. +

This function is normally called to "undo" a getch() operation. +

Returns ch, or -1 if an error occurred. +

See also getch() and putch(). + +

Reimplemented from TQIODevice. + +


+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/qfiledialog-h.html b/doc/html/qfiledialog-h.html new file mode 100644 index 00000000..52fcf5b5 --- /dev/null +++ b/doc/html/qfiledialog-h.html @@ -0,0 +1,392 @@ + + + + + +qfiledialog.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qfiledialog.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qfiledialog.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQFileDialog class
+**
+** Created : 950428
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the dialogs 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 retquirements 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 TQFILEDIALOG_H
+#define TQFILEDIALOG_H
+
+class TQPushButton;
+class TQButton;
+class TQLabel;
+class TQWidget;
+class TQFileDialog;
+class TQTimer;
+class TQNetworkOperation;
+class TQLineEdit;
+class TQListViewItem;
+class TQListBoxItem;
+class TQFileDialogPrivate;
+class TQFileDialogTQFileListView;
+
+#ifndef QT_H
+#include "qdir.h"
+#include "qdialog.h"
+#include "qurloperator.h"
+#include "qurlinfo.h"
+#endif // QT_H
+
+#if __GNUC__ - 0 > 3
+#pragma GCC system_header
+#endif
+
+#ifndef QT_NO_FILEDIALOG
+
+class Q_EXPORT TQFileIconProvider : public TQObject
+{
+    Q_OBJECT
+public:
+    TQFileIconProvider( TQObject * parent = 0, const char* name = 0 );
+    virtual const TQPixmap * pixmap( const TQFileInfo & );
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQFileIconProvider( const TQFileIconProvider & );
+    TQFileIconProvider& operator=( const TQFileIconProvider & );
+#endif
+};
+
+class Q_EXPORT TQFilePreview
+{
+public:
+    TQFilePreview();
+    virtual void previewUrl( const TQUrl &url ) = 0;
+
+};
+
+class Q_EXPORT TQFileDialog : public TQDialog
+{
+    Q_OBJECT
+    Q_ENUMS( Mode ViewMode PreviewMode )
+    // ##### Why are this read-only properties ?
+    Q_PROPERTY( TQString selectedFile READ selectedFile )
+    Q_PROPERTY( TQString selectedFilter READ selectedFilter )
+    Q_PROPERTY( TQStringList selectedFiles READ selectedFiles )
+    // #### Should not we be able to set the path ?
+    Q_PROPERTY( TQString dirPath READ dirPath )
+    Q_PROPERTY( bool showHiddenFiles READ showHiddenFiles WRITE setShowHiddenFiles )
+    Q_PROPERTY( Mode mode READ mode WRITE setMode )
+    Q_PROPERTY( ViewMode viewMode READ viewMode WRITE setViewMode )
+    Q_PROPERTY( PreviewMode previewMode READ previewMode WRITE setPreviewMode )
+    Q_PROPERTY( bool infoPreview READ isInfoPreviewEnabled WRITE setInfoPreviewEnabled )
+    Q_PROPERTY( bool contentsPreview READ isContentsPreviewEnabled WRITE setContentsPreviewEnabled )
+
+public:
+    TQFileDialog( const TQString& dirName, const TQString& filter = TQString::null,
+		 TQWidget* parent=0, const char* name=0, bool modal = FALSE );
+    TQFileDialog( TQWidget* parent=0, const char* name=0, bool modal = FALSE );
+    ~TQFileDialog();
+
+    // recommended static functions
+
+    static TQString getOpenFileName( const TQString &initially = TQString::null,
+				    const TQString &filter = TQString::null,
+				    TQWidget *parent = 0, const char* name = 0,
+				    const TQString &caption = TQString::null,
+				    TQString *selectedFilter = 0,
+				    bool resolveSymlinks = TRUE);
+    static TQString getSaveFileName( const TQString &initially = TQString::null,
+				    const TQString &filter = TQString::null,
+				    TQWidget *parent = 0, const char* name = 0,
+				    const TQString &caption = TQString::null,
+				    TQString *selectedFilter = 0,
+				    bool resolveSymlinks = TRUE);
+    static TQString getExistingDirectory( const TQString &dir = TQString::null,
+					 TQWidget *parent = 0,
+					 const char* name = 0,
+					 const TQString &caption = TQString::null,
+					 bool dirOnly = TRUE,
+					 bool resolveSymlinks = TRUE);
+    static TQStringList getOpenFileNames( const TQString &filter= TQString::null,
+					 const TQString &dir = TQString::null,
+					 TQWidget *parent = 0,
+					 const char* name = 0,
+					 const TQString &caption = TQString::null,
+					 TQString *selectedFilter = 0,
+					 bool resolveSymlinks = TRUE);
+
+    // other static functions
+
+    static void setIconProvider( TQFileIconProvider * );
+    static TQFileIconProvider * iconProvider();
+
+    // non-static function for special needs
+
+    TQString selectedFile() const;
+    TQString selectedFilter() const;
+    virtual void setSelectedFilter( const TQString& );
+    virtual void setSelectedFilter( int );
+
+    void setSelection( const TQString &);
+
+    void selectAll( bool b );
+
+    TQStringList selectedFiles() const;
+
+    TQString dirPath() const;
+
+    void setDir( const TQDir & );
+    const TQDir *dir() const;
+
+    void setShowHiddenFiles( bool s );
+    bool showHiddenFiles() const;
+
+    void rereadDir();
+    void resortDir();
+
+    enum Mode { AnyFile, ExistingFile, Directory, ExistingFiles, DirectoryOnly };
+    void setMode( Mode );
+    Mode mode() const;
+
+    enum ViewMode { Detail, List };
+    enum PreviewMode { NoPreview, Contents, Info };
+    void setViewMode( ViewMode m );
+    ViewMode viewMode() const;
+    void setPreviewMode( PreviewMode m );
+    PreviewMode previewMode() const;
+
+    bool eventFilter( TQObject *, TQEvent * );
+
+    bool isInfoPreviewEnabled() const;
+    bool isContentsPreviewEnabled() const;
+    void setInfoPreviewEnabled( bool );
+    void setContentsPreviewEnabled( bool );
+
+    void setInfoPreview( TQWidget *w, TQFilePreview *preview );
+    void setContentsPreview( TQWidget *w, TQFilePreview *preview );
+
+    TQUrl url() const;
+
+    void addFilter( const TQString &filter );
+
+public slots:
+    void done( int );
+    void setDir( const TQString& );
+    void setUrl( const TQUrlOperator &url );
+    void setFilter( const TQString& );
+    void setFilters( const TQString& );
+    void setFilters( const char ** );
+    void setFilters( const TQStringList& );
+
+protected:
+    void resizeEvent( TQResizeEvent * );
+    void keyPressEvent( TQKeyEvent * );
+
+    void addWidgets( TQLabel *, TQWidget *, TQPushButton * );
+    void addToolButton( TQButton *b, bool separator = FALSE );
+    void addLeftWidget( TQWidget *w );
+    void addRightWidget( TQWidget *w );
+
+signals:
+    void fileHighlighted( const TQString& );
+    void fileSelected( const TQString& );
+    void filesSelected( const TQStringList& );
+    void dirEntered( const TQString& );
+    void filterSelected( const TQString& );
+
+private slots:
+    void detailViewSelectionChanged();
+    void listBoxSelectionChanged();
+    void changeMode( int );
+    void fileNameEditReturnPressed();
+    void stopCopy();
+    void removeProgressDia();
+
+    void fileSelected( int );
+    void fileHighlighted( int );
+    void dirSelected( int );
+    void pathSelected( int );
+
+    void updateFileNameEdit( TQListViewItem *);
+    void selectDirectoryOrFile( TQListViewItem * );
+    void popupContextMenu( TQListViewItem *, const TQPoint &, int );
+    void popupContextMenu( TQListBoxItem *, const TQPoint & );
+    void updateFileNameEdit( TQListBoxItem *);
+    void selectDirectoryOrFile( TQListBoxItem * );
+    void fileNameEditDone();
+
+    void okClicked();
+    void filterClicked(); // not used
+    void cancelClicked();
+
+    void cdUpClicked();
+    void newFolderClicked();
+
+    void fixupNameEdit();
+
+    void doMimeTypeLookup();
+
+    void updateGeometries();
+    void modeButtonsDestroyed();
+    void urlStart( TQNetworkOperation *op );
+    void urlFinished( TQNetworkOperation *op );
+    void dataTransferProgress( int bytesDone, int bytesTotal, TQNetworkOperation * );
+    void insertEntry( const TQValueList<TQUrlInfo> &fi, TQNetworkOperation *op );
+    void removeEntry( TQNetworkOperation * );
+    void createdDirectory( const TQUrlInfo &info, TQNetworkOperation * );
+    void itemChanged( TQNetworkOperation * );
+    void goBack();
+
+private:
+    enum PopupAction {
+	PA_Open = 0,
+	PA_Delete,
+	PA_Rename,
+	PA_SortName,
+	PA_SortSize,
+	PA_SortType,
+	PA_SortDate,
+	PA_SortUnsorted,
+	PA_Cancel,
+	PA_Reload,
+	PA_Hidden
+    };
+
+    void init();
+    bool trySetSelection( bool isDir, const TQUrlOperator &, bool );
+    void deleteFile( const TQString &filename );
+    void popupContextMenu( const TQString &filename, bool withSort,
+			   PopupAction &action, const TQPoint &p );
+    void updatePreviews( const TQUrl &u );
+
+    TQDir reserved; // was cwd
+    TQString fileName;
+
+    friend class TQFileDialogTQFileListView;
+    friend class TQFileListBox;
+
+    TQFileDialogPrivate *d;
+    TQFileDialogTQFileListView  *files;
+
+    TQLineEdit  *nameEdit; // also filter
+    TQPushButton *okB;
+    TQPushButton *cancelB;
+
+#if defined(Q_WS_WIN)
+    static TQString winGetOpenFileName( const TQString &initialSelection,
+				       const TQString &filter,
+				       TQString* workingDirectory,
+				       TQWidget *parent = 0,
+				       const char* name = 0,
+				       const TQString& caption = TQString::null,
+				       TQString* selectedFilter = 0 );
+    static TQString winGetSaveFileName( const TQString &initialSelection,
+				       const TQString &filter,
+				       TQString* workingDirectory,
+				       TQWidget *parent = 0,
+				       const char* name = 0,
+				       const TQString& caption = TQString::null,
+    				       TQString* selectedFilter = 0 );
+    static TQStringList winGetOpenFileNames( const TQString &filter,
+					    TQString* workingDirectory,
+					    TQWidget *parent = 0,
+					    const char* name = 0,
+					    const TQString& caption = TQString::null,
+					    TQString* selectedFilter = 0 );
+    static TQString winGetExistingDirectory( const TQString &initialDirectory,
+					    TQWidget* parent = 0,
+					    const char* name = 0,
+					    const TQString& caption = TQString::null);
+    static TQString resolveLinkFile( const TQString& linkfile );
+#endif
+#if defined(Q_WS_MACX) || defined(Q_WS_MAC9)
+    static TQString macGetSaveFileName( const TQString &, const TQString &,
+				       TQString *, TQWidget *, const char*,
+				       const TQString&, TQString *);
+    static TQStringList macGetOpenFileNames( const TQString &, TQString*,
+					    TQWidget *, const char *,
+					    const TQString&, TQString *,
+					    bool = TRUE, bool = FALSE );
+#endif
+
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQFileDialog( const TQFileDialog & );
+    TQFileDialog &operator=( const TQFileDialog & );
+#endif
+};
+
+#endif
+
+#endif // TQFILEDIALOG_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfiledialog-members.html b/doc/html/qfiledialog-members.html new file mode 100644 index 00000000..4423c282 --- /dev/null +++ b/doc/html/qfiledialog-members.html @@ -0,0 +1,397 @@ + + + + + +TQFileDialog Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFileDialog

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfiledialog.html b/doc/html/qfiledialog.html new file mode 100644 index 00000000..c9bb992c --- /dev/null +++ b/doc/html/qfiledialog.html @@ -0,0 +1,907 @@ + + + + + +TQFileDialog Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFileDialog Class Reference

+ +

The TQFileDialog class provides dialogs that allow users to select files or directories. +More... +

#include <qfiledialog.h> +

Inherits TQDialog. +

List of all member functions. +

Public Members

+ +

Public Slots

+
    +
  • void setDir ( const TQString & pathstr )
  • +
  • void setUrl ( const TQUrlOperator & url )
  • +
  • void setFilter ( const TQString & newFilter )
  • +
  • void setFilters ( const TQString & filters )
  • +
  • void setFilters ( const char ** types )
  • +
  • void setFilters ( const TQStringList & )
  • +
+

Signals

+ +

Static Public Members

+
    +
  • TQString getOpenFileName ( const TQString & startWith = TQString::null, const TQString & filter = TQString::null, TQWidget * parent = 0, const char * name = 0, const TQString & caption = TQString::null, TQString * selectedFilter = 0, bool resolveSymlinks = TRUE )
  • +
  • TQString getSaveFileName ( const TQString & startWith = TQString::null, const TQString & filter = TQString::null, TQWidget * parent = 0, const char * name = 0, const TQString & caption = TQString::null, TQString * selectedFilter = 0, bool resolveSymlinks = TRUE )
  • +
  • TQString getExistingDirectory ( const TQString & dir = TQString::null, TQWidget * parent = 0, const char * name = 0, const TQString & caption = TQString::null, bool dirOnly = TRUE, bool resolveSymlinks = TRUE )
  • +
  • TQStringList getOpenFileNames ( const TQString & filter = TQString::null, const TQString & dir = TQString::null, TQWidget * parent = 0, const char * name = 0, const TQString & caption = TQString::null, TQString * selectedFilter = 0, bool resolveSymlinks = TRUE )
  • +
  • void setIconProvider ( TQFileIconProvider * provider )
  • +
  • TQFileIconProvider * iconProvider ()
  • +
+

Properties

+
    +
  • bool contentsPreview - whether the file dialog can provide a contents preview of the currently selected file
  • +
  • TQString dirPath - the file dialog's working directory  (read only)
  • +
  • bool infoPreview - whether the file dialog can provide preview information about the currently selected file
  • +
  • Mode mode - the file dialog's mode
  • +
  • PreviewMode previewMode - the preview mode for the file dialog
  • +
  • TQString selectedFile - the name of the selected file  (read only)
  • +
  • TQStringList selectedFiles - the list of selected files  (read only)
  • +
  • TQString selectedFilter - the filter which the user has selected in the file dialog  (read only)
  • +
  • bool showHiddenFiles - whether hidden files are shown in the file dialog
  • +
  • ViewMode viewMode - the file dialog's view mode
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQFileDialog class provides dialogs that allow users to select files or directories. + + +

The TQFileDialog class enables a user to traverse their file system in +order to select one or many files or a directory. +

The easiest way to create a TQFileDialog is to use the static +functions. On Windows, these static functions will call the native +Windows file dialog and on Mac OS X, these static function will call +the native Mac OS X file dialog. +

+    TQString s = TQFileDialog::getOpenFileName(
+                    "/home",
+                    "Images (*.png *.xpm *.jpg)",
+                    this,
+                    "open file dialog",
+                    "Choose a file" );
+  
+ +

In the above example, a modal TQFileDialog is created using a static +function. The startup directory is set to "/home". The file filter +is set to "Images (*.png *.xpm *.jpg)". The parent of the file dialog +is set to this and it is given the identification name - "open file +dialog". The caption at the top of file dialog is set to "Choose a +file". If you want to use multiple filters, separate each one with +two semi-colons, e.g. +

+  "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)"
+  
+ +

You can create your own TQFileDialog without using the static +functions. By calling setMode(), you can set what can be returned by +the TQFileDialog. +

+    TQFileDialog* fd = new TQFileDialog( this, "file dialog", TRUE );
+    fd->setMode( TQFileDialog::AnyFile );
+  
+ +

In the above example, the mode of the file dialog is set to AnyFile, meaning that the user can select any file, or even specify a +file that doesn't exist. This mode is useful for creating a "File Save +As" file dialog. Use ExistingFile if the user must select an +existing file or Directory if only a directory may be selected. +(See the TQFileDialog::Mode enum for the complete list of modes.) +

You can retrieve the dialog's mode with mode(). Use setFilter() to set +the dialog's file filter, e.g. +

+    fd->setFilter( "Images (*.png *.xpm *.jpg)" );
+  
+ +

In the above example, the filter is set to "Images (*.png *.xpm +*.jpg)", this means that only files with the extension png, xpm +or jpg will be shown in the TQFileDialog. You can apply +several filters by using setFilters() and add additional filters with +addFilter(). Use setSelectedFilter() to select one of the filters +you've given as the file dialog's default filter. Whenever the user +changes the filter the filterSelected() signal is emitted. +

The file dialog has two view modes, TQFileDialog::List which simply +lists file and directory names and TQFileDialog::Detail which +displays additional information alongside each name, e.g. file size, +modification date, etc. Set the mode with setViewMode(). +

+    fd->setViewMode( TQFileDialog::Detail );
+  
+ +

The last important function you will need to use when creating your +own file dialog is selectedFile(). +

+    TQString fileName;
+    if ( fd->exec() == TQDialog::Accepted )
+        fileName = fd->selectedFile();
+  
+ +

In the above example, a modal file dialog is created and shown. If +the user clicked OK, then the file they selected is put in fileName. +

If you are using the ExistingFiles mode then you will need to use +selectedFiles() which will return the selected files in a TQStringList. +

The dialog's working directory can be set with setDir(). The display +of hidden files is controlled with setShowHiddenFiles(). The dialog +can be forced to re-read the directory with rereadDir() and re-sort +the directory with resortDir(). All the files in the current directory +can be selected with selectAll(). +

Creating and using preview widgets +

+

There are two kinds of preview widgets that can be used with +TQFileDialogs: content preview widgets and information preview +widgets. They are created and used in the same way except that the +function names differ, e.g. setContentsPreview() and setInfoPreview(). +

A preview widget is a widget that is placed inside a TQFileDialog so +that the user can see either the contents of the file, or information +about the file. +

+    class Preview : public TQLabel, public TQFilePreview
+    {
+    public:
+        Preview( TQWidget *parent=0 ) : TQLabel( parent ) {}
+
+        void previewUrl( const TQUrl &u )
+        {
+            TQString path = u.path();
+            TQPixmap pix( path );
+            if ( pix.isNull() )
+                setText( "This is not a pixmap" );
+            else
+                setPixmap( pix );
+        }
+    };
+  
+ +

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

Inside the class we reimplement TQFilePreview::previewUrl(), this is +where we determine what happens when a file is selected. In the +above example we only show a preview of the file if it is a valid +pixmap. Here's how to make a file dialog use a preview widget: +

+    Preview* p = new Preview;
+
+    TQFileDialog* fd = new TQFileDialog( this );
+    fd->setContentsPreviewEnabled( TRUE );
+    fd->setContentsPreview( p, p );
+    fd->setPreviewMode( TQFileDialog::Contents );
+    fd->show();
+  
+ +

The first line creates an instance of our preview widget. We then +create our file dialog and call setContentsPreviewEnabled( TRUE ), +this tell the file dialog to preview the contents of the currently +selected file. We then call setContentsPreview() -- note that we pass +the same preview widget twice. Finally, before showing the file +dialog, we call setPreviewMode() setting the mode to Contents which +will show the contents preview of the file that the user has selected. +

If you create another preview widget that is used for displaying +information about a file, create it in the same way as the contents +preview widget and call setInfoPreviewEnabled(), and +setInfoPreview(). Then the user will be able to switch between the +two preview modes. +

For more information about creating a TQFilePreview widget see +TQFilePreview. +

+

See also Dialog Classes. + +


Member Type Documentation

+

TQFileDialog::Mode

+

This enum is used to indicate what the user may select in the file +dialog, i.e. what the dialog will return if the user clicks OK. +

    +
  • TQFileDialog::AnyFile - The name of a file, whether it exists or not. +
  • TQFileDialog::ExistingFile - The name of a single existing file. +
  • TQFileDialog::Directory - The name of a directory. Both files and directories +are displayed. +
  • TQFileDialog::DirectoryOnly - The name of a directory. The file dialog will only display directories. +
  • TQFileDialog::ExistingFiles - The names of zero or more existing files. +

See setMode(). + +

TQFileDialog::PreviewMode

+ +

This enum describes the preview mode of the file dialog. +

    +
  • TQFileDialog::NoPreview - No preview is shown at all. +
  • TQFileDialog::Contents - Show a preview of the contents of the current file +using the contents preview widget. +
  • TQFileDialog::Info - Show information about the current file using the +info preview widget. +

See setPreviewMode(), setContentsPreview() and setInfoPreview(). + +

TQFileDialog::ViewMode

+ +

This enum describes the view mode of the file dialog, i.e. what +information about each file will be displayed. +

    +
  • TQFileDialog::List - Display file and directory names with icons. +
  • TQFileDialog::Detail - Display file and directory names with icons plus +additional information, such as file size and modification date. +

See setViewMode(). + +


Member Function Documentation

+

TQFileDialog::TQFileDialog ( const TQString & dirName, const TQString & filter = TQString::null, TQWidget * parent = 0, const char * name = 0, bool modal = FALSE ) +

+Constructs a file dialog called name with the parent, parent. +If modal is TRUE then the file dialog is modal; otherwise it is +modeless. +

If dirName is specified then it will be used as the dialog's +working directory, i.e. it will be the directory that is shown when +the dialog appears. If filter is specified it will be used as the +dialog's file filter. +

+

TQFileDialog::TQFileDialog ( TQWidget * parent = 0, const char * name = 0, bool modal = FALSE ) +

+Constructs a file dialog called name, with the parent, parent. +If modal is TRUE then the file dialog is modal; otherwise it is +modeless. + +

TQFileDialog::~TQFileDialog () +

+Destroys the file dialog. + +

void TQFileDialog::addFilter ( const TQString & filter ) +

+Adds the filter filter to the list of filters and makes it the +current filter. +

+    TQFileDialog* fd = new TQFileDialog( this );
+    fd->addFilter( "Images (*.png *.jpg *.xpm)" );
+    fd->show();
+  
+ +

In the above example, a file dialog is created, and the file filter "Images +(*.png *.jpg *.xpm)" is added and is set as the current filter. The original +filter, "All Files (*)", is still available. +

See also setFilter() and setFilters(). + +

void TQFileDialog::addLeftWidget ( TQWidget * w ) [protected] +

+Adds the widget w to the left-hand side of the file dialog. +

See also addRightWidget(), addWidgets(), and addToolButton(). + +

void TQFileDialog::addRightWidget ( TQWidget * w ) [protected] +

+Adds the widget w to the right-hand side of the file dialog. +

See also addLeftWidget(), addWidgets(), and addToolButton(). + +

void TQFileDialog::addToolButton ( TQButton * b, bool separator = FALSE ) [protected] +

+Adds the tool button b to the row of tool buttons at the top of the +file dialog. The button is appended to the right of +this row. If separator is TRUE, a small space is inserted between the +last button of the row and the new button b. +

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

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

+Adds the specified widgets to the bottom of the file dialog. The +label l is placed underneath the "file name" and the "file types" +labels. The widget w is placed underneath the file types combobox. +The button b is placed underneath the Cancel pushbutton. +

+    MyFileDialog::MyFileDialog( TQWidget* parent, const char* name ) :
+        TQFileDialog( parent, name )
+    {
+        TQLabel* label = new TQLabel( "Added widgets", this );
+        TQLineEdit* lineedit = new TQLineEdit( this );
+        TQPushButton* pushbutton = new TQPushButton( this );
+
+        addWidgets( label, lineedit, pushbutton );
+    }
+  
+ +

If you don't want to have one of the widgets added, pass 0 in that +widget's position. +

Every time you call this function, a new row of widgets will be added +to the bottom of the file dialog. +

See also addToolButton(), addLeftWidget(), and addRightWidget(). + +

const TQDir * TQFileDialog::dir () const +

+Returns the current directory shown in the file dialog. +

The ownership of the TQDir pointer is transferred to the caller, so +it must be deleted by the caller when no longer retquired. +

See also setDir(). + +

void TQFileDialog::dirEntered ( const TQString & ) [signal] +

+ +

This signal is emitted when the user enters a directory. +

See also dir(). + +

TQString TQFileDialog::dirPath () const +

Returns the file dialog's working directory. +See the "dirPath" property for details. +

void TQFileDialog::fileHighlighted ( const TQString & ) [signal] +

+ +

This signal is emitted when the user highlights a file, i.e. makes +it the current file. +

See also fileSelected() and filesSelected(). + +

void TQFileDialog::fileSelected ( const TQString & ) [signal] +

+ +

This signal is emitted when the user selects a file. +

See also filesSelected(), fileHighlighted(), and selectedFile. + +

void TQFileDialog::filesSelected ( const TQStringList & ) [signal] +

+ +

This signal is emitted when the user selects one or more files in ExistingFiles mode. +

See also fileSelected(), fileHighlighted(), and selectedFiles. + +

void TQFileDialog::filterSelected ( const TQString & ) [signal] +

+ +

This signal is emitted when the user selects a filter. +

See also selectedFilter. + +

TQString TQFileDialog::getExistingDirectory ( const TQString & dir = TQString::null, TQWidget * parent = 0, const char * name = 0, const TQString & caption = TQString::null, bool dirOnly = TRUE, bool resolveSymlinks = TRUE ) [static] +

+This is a convenience static function that will return an existing directory +selected by the user. +

+    TQString s = TQFileDialog::getExistingDirectory(
+                    "/home",
+                    this,
+                    "get existing directory",
+                    "Choose a directory",
+                    TRUE );
+  
+ +

This function creates a modal file dialog called name, with +parent, parent. If parent is not 0, the dialog will be shown +centered over the parent. +

The dialog's working directory is set to dir, and the caption is +set to caption. Either of these may be TQString::null in which case +the current directory and a default caption will be used respectively. +

Note on Windows that if dir is TQString::null then the dialog's working +directory will be set to the user's My Documents directory. +

If dirOnly is TRUE, then only directories will be shown in +the file dialog; otherwise both directories and files will be shown. +

Under Unix/X11, the normal behavior of the file dialog is to resolve +and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, +the file dialog will change to /var/tmp after entering /usr/tmp. +If resolveSymlinks is FALSE, the file dialog will treat +symlinks as regular directories. +

Under Windows and Mac OS X, this static function will use the native +file dialog and not a TQFileDialog, unless the style of the application +is set to something other than the native style. (Note that on Windows the +dialog will spin a blocking modal event loop that will not dispatch any +TQTimers and if parent is not 0 then it will position the dialog just under +the parent's titlebar). +

See also getOpenFileName(), getOpenFileNames(), and getSaveFileName(). + +

TQString TQFileDialog::getOpenFileName ( const TQString & startWith = TQString::null, const TQString & filter = TQString::null, TQWidget * parent = 0, const char * name = 0, const TQString & caption = TQString::null, TQString * selectedFilter = 0, bool resolveSymlinks = TRUE ) [static] +

+This is a convenience static function that returns an existing file +selected by the user. If the user pressed Cancel, it returns a null +string. +

+    TQString s = TQFileDialog::getOpenFileName(
+                    "/home",
+                    "Images (*.png *.xpm *.jpg)",
+                    this,
+                    "open file dialog",
+                    "Choose a file to open" );
+  
+ +

The function creates a modal file dialog called name, with +parent, parent. If a parent is not 0, the dialog will be shown +centered over the parent. +

The file dialog's working directory will be set to startWith. If startWith includes a file name, the file will be selected. The filter +is set to filter so that only those files which match the filter +are shown. The filter selected is set to selectedFilter. The parameters +startWith, selectedFilter and filter may be TQString::null. +

The dialog's caption is set to caption. If caption is not +specified then a default caption will be used. +

Under Windows and Mac OS X, this static function will use the native +file dialog and not a TQFileDialog, unless the style of the application +is set to something other than the native style (Note that on Windows the +dialog will spin a blocking modal event loop that will not dispatch any +TQTimers and if parent is not 0 then it will position the dialog just under +the parent's titlebar). +

Under Unix/X11, the normal behavior of the file dialog is to resolve +and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, +the file dialog will change to /var/tmp after entering /usr/tmp. +If resolveSymlinks is FALSE, the file dialog will treat +symlinks as regular directories. +

See also getOpenFileNames(), getSaveFileName(), and getExistingDirectory(). + +

Examples: action/application.cpp, addressbook/mainwindow.cpp, application/application.cpp, distributor/distributor.ui.h, network/ftpclient/ftpmainwindow.ui.h, qwerty/qwerty.cpp, and showimg/showimg.cpp. +

TQStringList TQFileDialog::getOpenFileNames ( const TQString & filter = TQString::null, const TQString & dir = TQString::null, TQWidget * parent = 0, const char * name = 0, const TQString & caption = TQString::null, TQString * selectedFilter = 0, bool resolveSymlinks = TRUE ) [static] +

+This is a convenience static function that will return one or more +existing files selected by the user. +

+    TQStringList files = TQFileDialog::getOpenFileNames(
+                            "Images (*.png *.xpm *.jpg)",
+                            "/home",
+                            this,
+                            "open files dialog",
+                            "Select one or more files to open" );
+  
+ +

This function creates a modal file dialog called name, with +parent parent. If parent is not 0, the dialog will be shown +centered over the parent. +

The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. The filter +is set to filter so that only those files which match the filter +are shown. The filter selected is set to selectedFilter. The parameters +dir, selectedFilter and filter may be TQString::null. +

The dialog's caption is set to caption. If caption is not +specified then a default caption will be used. +

Under Windows and Mac OS X, this static function will use the native +file dialog and not a TQFileDialog, unless the style of the application +is set to something other than the native style. (Note that on Windows the +dialog will spin a blocking modal event loop that will not dispatch any +TQTimers and if parent is not 0 then it will position the dialog just under +the parent's titlebar). +

Under Unix/X11, the normal behavior of the file dialog is to resolve +and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, +the file dialog will change to /var/tmp after entering /usr/tmp. +If resolveSymlinks is FALSE, the file dialog will treat +symlinks as regular directories. +

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

+    TQStringList list = files;
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also getOpenFileName(), getSaveFileName(), and getExistingDirectory(). + +

TQString TQFileDialog::getSaveFileName ( const TQString & startWith = TQString::null, const TQString & filter = TQString::null, TQWidget * parent = 0, const char * name = 0, const TQString & caption = TQString::null, TQString * selectedFilter = 0, bool resolveSymlinks = TRUE ) [static] +

+This is a convenience static function that will return a file name +selected by the user. The file does not have to exist. +

It creates a modal file dialog called name, with parent, parent. +If a parent is not 0, the dialog will be shown centered over the +parent. +

+    TQString s = TQFileDialog::getSaveFileName(
+                    "/home",
+                    "Images (*.png *.xpm *.jpg)",
+                    this,
+                    "save file dialog",
+                    "Choose a filename to save under" );
+  
+ +

The file dialog's working directory will be set to startWith. If startWith includes a file name, the file will be selected. The filter +is set to filter so that only those files which match the filter +are shown. The filter selected is set to selectedFilter. The parameters +startWith, selectedFilter and filter may be TQString::null. +

The dialog's caption is set to caption. If caption is not +specified then a default caption will be used. +

Under Windows and Mac OS X, this static function will use the native +file dialog and not a TQFileDialog, unless the style of the application +is set to something other than the native style. (Note that on Windows the +dialog will spin a blocking modal event loop that will not dispatch any +TQTimers and if parent is not 0 then it will position the dialog just under +the parent's titlebar. +

Under Unix/X11, the normal behavior of the file dialog is to resolve +and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, +the file dialog will change to /var/tmp after entering /usr/tmp. +If resolveSymlinks is FALSE, the file dialog will treat +symlinks as regular directories. +

See also getOpenFileName(), getOpenFileNames(), and getExistingDirectory(). + +

Examples: action/application.cpp, addressbook/mainwindow.cpp, application/application.cpp, network/ftpclient/ftpmainwindow.ui.h, qmag/qmag.cpp, qwerty/qwerty.cpp, and showimg/showimg.cpp. +

TQFileIconProvider * TQFileDialog::iconProvider () [static] +

+Returns a pointer to the icon provider currently set on the file dialog. +By default there is no icon provider, and this function returns 0. +

See also setIconProvider() and TQFileIconProvider. + +

bool TQFileDialog::isContentsPreviewEnabled () const +

Returns TRUE if the file dialog can provide a contents preview of the currently selected file; otherwise returns FALSE. +See the "contentsPreview" property for details. +

bool TQFileDialog::isInfoPreviewEnabled () const +

Returns TRUE if the file dialog can provide preview information about the currently selected file; otherwise returns FALSE. +See the "infoPreview" property for details. +

Mode TQFileDialog::mode () const +

Returns the file dialog's mode. +See the "mode" property for details. +

PreviewMode TQFileDialog::previewMode () const +

Returns the preview mode for the file dialog. +See the "previewMode" property for details. +

void TQFileDialog::rereadDir () +

+Rereads the current directory shown in the file dialog. +

The only time you will need to call this function is if the contents of +the directory change and you wish to refresh the file dialog to reflect +the change. +

See also resortDir(). + +

void TQFileDialog::resortDir () +

+Re-sorts the displayed directory. +

See also rereadDir(). + +

void TQFileDialog::selectAll ( bool b ) +

+If b is TRUE then all the files in the current directory are selected; +otherwise, they are deselected. + +

TQString TQFileDialog::selectedFile () const +

Returns the name of the selected file. +See the "selectedFile" property for details. +

TQStringList TQFileDialog::selectedFiles () const +

Returns the list of selected files. +See the "selectedFiles" property for details. +

TQString TQFileDialog::selectedFilter () const +

Returns the filter which the user has selected in the file dialog. +See the "selectedFilter" property for details. +

void TQFileDialog::setContentsPreview ( TQWidget * w, TQFilePreview * preview ) +

+Sets the widget to be used for displaying the contents of the file +to the widget w and a preview of those contents to the +TQFilePreview preview. +

Normally you would create a preview widget that derives from both TQWidget and +TQFilePreview, so you should pass the same widget twice. If you +don't, you must remember to delete the preview object in order to +avoid memory leaks. +

+    class Preview : public TQLabel, public TQFilePreview
+    {
+    public:
+        Preview( TQWidget *parent=0 ) : TQLabel( parent ) {}
+
+        void previewUrl( const TQUrl &u )
+        {
+            TQString path = u.path();
+            TQPixmap pix( path );
+            if ( pix.isNull() )
+                setText( "This is not a pixmap" );
+            else
+                setPixmap( pix );
+        }
+    };
+
+  //...
+
+  int main( int argc, char** argv )
+  {
+    Preview* p = new Preview;
+
+    TQFileDialog* fd = new TQFileDialog( this );
+    fd->setContentsPreviewEnabled( TRUE );
+    fd->setContentsPreview( p, p );
+    fd->setPreviewMode( TQFileDialog::Contents );
+    fd->show();
+  }
+  
+ +

See also contentsPreview, setInfoPreview(), and previewMode. + +

Example: qdir/qdir.cpp. +

void TQFileDialog::setContentsPreviewEnabled ( bool ) +

Sets whether the file dialog can provide a contents preview of the currently selected file. +See the "contentsPreview" property for details. +

void TQFileDialog::setDir ( const TQDir & dir ) +

+Sets the file dialog's working directory to dir. +

See also dir(). + +

void TQFileDialog::setDir ( const TQString & pathstr ) [slot] +

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

Sets the file dialog's working directory to pathstr. +

See also dir(). + +

void TQFileDialog::setFilter ( const TQString & newFilter ) [slot] +

+

Sets the filter used in the file dialog to newFilter. +

If newFilter contains a pair of parentheses containing one or more +of anything*something separated by spaces or by +semi-colons then only the text contained in the parentheses is used as +the filter. This means that these calls are all equivalent: +

+     fd->setFilter( "All C++ files (*.cpp *.cc *.C *.cxx *.c++)" );
+     fd->setFilter( "*.cpp *.cc *.C *.cxx *.c++" );
+     fd->setFilter( "All C++ files (*.cpp;*.cc;*.C;*.cxx;*.c++)" );
+     fd->setFilter( "*.cpp;*.cc;*.C;*.cxx;*.c++" );
+  
+ +

See also setFilters(). + +

void TQFileDialog::setFilters ( const TQString & filters ) [slot] +

+Sets the filters used in the file dialog to filters. Each group +of filters must be separated by ;; (two semi-colons). +

+    TQString types("Image files (*.png *.xpm *.jpg);;"
+                  "Text files (*.txt);;"
+                  "Any files (*)");
+    TQFileDialog fd = new TQFileDialog( this );
+    fd->setFilters( types );
+    fd->show();
+  
+ +

+

void TQFileDialog::setFilters ( const char ** types ) [slot] +

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

types must be a null-terminated list of strings. +

+

void TQFileDialog::setFilters ( const TQStringList & ) [slot] +

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

+

void TQFileDialog::setIconProvider ( TQFileIconProvider * provider ) [static] +

+Sets the TQFileIconProvider used by the file dialog to provider. +

The default is that there is no TQFileIconProvider and TQFileDialog +just draws a folder icon next to each directory and nothing next +to files. +

See also TQFileIconProvider and iconProvider(). + +

Example: showimg/main.cpp. +

void TQFileDialog::setInfoPreview ( TQWidget * w, TQFilePreview * preview ) +

+Sets the widget to be used for displaying information about the file +to the widget w and a preview of that information to the +TQFilePreview preview. +

Normally you would create a preview widget that derives from both TQWidget and +TQFilePreview, so you should pass the same widget twice. If you +don't, you must remember to delete the preview object in order to +avoid memory leaks. +

+    class Preview : public TQLabel, public TQFilePreview
+    {
+    public:
+        Preview( TQWidget *parent=0 ) : TQLabel( parent ) {}
+
+        void previewUrl( const TQUrl &u )
+        {
+            TQString path = u.path();
+            TQPixmap pix( path );
+            if ( pix.isNull() )
+                setText( "This is not a pixmap" );
+            else
+                setText( "This is a pixmap" );
+        }
+    };
+
+  //...
+
+  int main( int argc, char** argv )
+  {
+    Preview* p = new Preview;
+
+    TQFileDialog* fd = new TQFileDialog( this );
+    fd->setInfoPreviewEnabled( TRUE );
+    fd->setInfoPreview( p, p );
+    fd->setPreviewMode( TQFileDialog::Info );
+    fd->show();
+  }
+
+  
+ +

See also setContentsPreview(), infoPreview, and previewMode. + +

+

void TQFileDialog::setInfoPreviewEnabled ( bool ) +

Sets whether the file dialog can provide preview information about the currently selected file. +See the "infoPreview" property for details. +

void TQFileDialog::setMode ( Mode ) +

Sets the file dialog's mode. +See the "mode" property for details. +

void TQFileDialog::setPreviewMode ( PreviewMode m ) +

Sets the preview mode for the file dialog to m. +See the "previewMode" property for details. +

void TQFileDialog::setSelectedFilter ( const TQString & mask ) [virtual] +

+Sets the current filter selected in the file dialog to the first +one that contains the text mask. + +

void TQFileDialog::setSelectedFilter ( int n ) [virtual] +

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

Sets the current filter selected in the file dialog to the +n-th filter in the filter list. +

See also filterSelected(), selectedFilter, selectedFiles, and selectedFile. + +

void TQFileDialog::setSelection ( const TQString & filename ) +

+Sets the default selection to filename. If filename is +absolute, setDir() is also called to set the file dialog's working +directory to the filename's directory. +

+ +

Example: qdir/qdir.cpp. +

void TQFileDialog::setShowHiddenFiles ( bool s ) +

Sets whether hidden files are shown in the file dialog to s. +See the "showHiddenFiles" property for details. +

void TQFileDialog::setUrl ( const TQUrlOperator & url ) [slot] +

+Sets the file dialog's working directory to the directory specified at url. +

See also url(). + +

void TQFileDialog::setViewMode ( ViewMode m ) +

Sets the file dialog's view mode to m. +See the "viewMode" property for details. +

bool TQFileDialog::showHiddenFiles () const +

Returns TRUE if hidden files are shown in the file dialog; otherwise returns FALSE. +See the "showHiddenFiles" property for details. +

TQUrl TQFileDialog::url () const +

+Returns the URL of the current working directory in the file dialog. +

See also setUrl(). + +

Example: network/networkprotocol/view.cpp. +

ViewMode TQFileDialog::viewMode () const +

Returns the file dialog's view mode. +See the "viewMode" property for details. +


Property Documentation

+

bool contentsPreview

+

This property holds whether the file dialog can provide a contents preview of the currently selected file. +

The default is FALSE. +

See also setContentsPreview() and infoPreview. + +

Set this property's value with setContentsPreviewEnabled() and get this property's value with isContentsPreviewEnabled(). +

TQString dirPath

+

This property holds the file dialog's working directory. +

Get this property's value with dirPath(). +

See also dir() and setDir(). + +

bool infoPreview

+

This property holds whether the file dialog can provide preview information about the currently selected file. +

The default is FALSE. + +

Set this property's value with setInfoPreviewEnabled() and get this property's value with isInfoPreviewEnabled(). +

Mode mode

+

This property holds the file dialog's mode. +

The default mode is ExistingFile. + +

Set this property's value with setMode() and get this property's value with mode(). +

PreviewMode previewMode

+

This property holds the preview mode for the file dialog. +

If you set the mode to be a mode other than NoPreview, you must +use setInfoPreview() or setContentsPreview() to set the dialog's +preview widget to your preview widget and enable the preview +widget(s) with setInfoPreviewEnabled() or +setContentsPreviewEnabled(). +

See also infoPreview, contentsPreview, and viewMode. + +

Set this property's value with setPreviewMode() and get this property's value with previewMode(). +

TQString selectedFile

+

This property holds the name of the selected file. +

If a file was selected selectedFile contains the file's name including +its absolute path; otherwise selectedFile is empty. +

See also TQString::isEmpty(), selectedFiles, and selectedFilter. + +

Get this property's value with selectedFile(). +

TQStringList selectedFiles

+

This property holds the list of selected files. +

If one or more files are selected, selectedFiles contains their +names including their absolute paths. If no files are selected or +the mode isn't ExistingFiles selectedFiles is an empty list. +

It is more convenient to use selectedFile() if the mode is +ExistingFile, Directory or DirectoryOnly. +

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

+    TQStringList list = myFileDialog.selectedFiles();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

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

Get this property's value with selectedFiles(). +

TQString selectedFilter

+

This property holds the filter which the user has selected in the file dialog. +

Get this property's value with selectedFilter(). +

See also filterSelected(), selectedFiles, and selectedFile. + +

bool showHiddenFiles

+

This property holds whether hidden files are shown in the file dialog. +

The default is FALSE, i.e. don't show hidden files. + +

Set this property's value with setShowHiddenFiles() and get this property's value with showHiddenFiles(). +

ViewMode viewMode

+

This property holds the file dialog's view mode. +

If you set the view mode to be Detail (the default), then you +will see the file's details, such as the size of the file and the +date the file was last modified in addition to the file's name. +

If you set the view mode to be List, then you will just +see a list of the files and folders. +

See TQFileDialog::ViewMode + +

Set this property's value with setViewMode() and get this property's value with viewMode(). + +


+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/qfiledlg-m.png b/doc/html/qfiledlg-m.png new file mode 100644 index 00000000..0e40fdbb Binary files /dev/null and b/doc/html/qfiledlg-m.png differ diff --git a/doc/html/qfiledlg-w.png b/doc/html/qfiledlg-w.png new file mode 100644 index 00000000..8054fefe Binary files /dev/null and b/doc/html/qfiledlg-w.png differ diff --git a/doc/html/qfileiconprovider-members.html b/doc/html/qfileiconprovider-members.html new file mode 100644 index 00000000..a2040f25 --- /dev/null +++ b/doc/html/qfileiconprovider-members.html @@ -0,0 +1,90 @@ + + + + + +TQFileIconProvider Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFileIconProvider

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfileiconprovider.html b/doc/html/qfileiconprovider.html new file mode 100644 index 00000000..ea965690 --- /dev/null +++ b/doc/html/qfileiconprovider.html @@ -0,0 +1,83 @@ + + + + + +TQFileIconProvider Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFileIconProvider Class Reference

+ +

The TQFileIconProvider class provides icons for TQFileDialog to +use. +More... +

#include <qfiledialog.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • TQFileIconProvider ( TQObject * parent = 0, const char * name = 0 )
  • +
  • virtual const TQPixmap * pixmap ( const TQFileInfo & info )
  • +
+

Detailed Description

+ +

The TQFileIconProvider class provides icons for TQFileDialog to +use. +

+

By default TQFileIconProvider is not used, but any application or +library can subclass it, reimplement pixmap() to return a suitable +icon, and make all TQFileDialog objects use it by calling the static +function TQFileDialog::setIconProvider(). +

It is advisable to make all the icons that TQFileIconProvider returns be +the same size or at least the same width. This makes the list view +look much better. +

See also TQFileDialog and Miscellaneous Classes. + +


Member Function Documentation

+

TQFileIconProvider::TQFileIconProvider ( TQObject * parent = 0, const char * name = 0 ) +

Constructs an empty file icon provider called name, with the +parent parent. + +

const TQPixmap * TQFileIconProvider::pixmap ( const TQFileInfo & info ) [virtual] +

+Returns a pointer to a pixmap that should be used to +signify the file with the information info. +

If pixmap() returns 0, TQFileDialog draws the default pixmap. +

The default implementation returns particular icons for files, directories, +link-files and link-directories. It returns a blank "icon" for other types. +

If you return a pixmap here, it should measure 16x16 pixels. + + +


+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/qfileinfo-h.html b/doc/html/qfileinfo-h.html new file mode 100644 index 00000000..43f65f73 --- /dev/null +++ b/doc/html/qfileinfo-h.html @@ -0,0 +1,202 @@ + + + + + +qfileinfo.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qfileinfo.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qfileinfo.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQFileInfo class
+**
+** Created : 950628
+**
+** 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 retquirements 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 TQFILEINFO_H
+#define TQFILEINFO_H
+
+#ifndef QT_H
+#include "qfile.h"
+#include "qdatetime.h"
+#endif // QT_H
+
+
+class TQDir;
+struct TQFileInfoCache;
+template <class T> class TQDeepCopy;
+
+
+class Q_EXPORT TQFileInfo
+{
+public:
+    enum PermissionSpec {
+	ReadOwner = 04000, WriteOwner = 02000, ExeOwner = 01000,
+	ReadUser  = 00400, WriteUser  = 00200, ExeUser  = 00100,
+	ReadGroup = 00040, WriteGroup = 00020, ExeGroup = 00010,
+	ReadOther = 00004, WriteOther = 00002, ExeOther = 00001 };
+
+    TQFileInfo();
+    TQFileInfo( const TQString &file );
+    TQFileInfo( const TQFile & );
+#ifndef QT_NO_DIR
+    TQFileInfo( const TQDir &, const TQString &fileName );
+#endif
+    TQFileInfo( const TQFileInfo & );
+   ~TQFileInfo();
+
+    TQFileInfo  &operator=( const TQFileInfo & );
+
+    void	setFile( const TQString &file );
+    void	setFile( const TQFile & );
+#ifndef QT_NO_DIR
+    void	setFile( const TQDir &, const TQString &fileName );
+#endif
+    bool	exists()	const;
+    void	refresh()	const;
+    bool	caching()	const;
+    void	setCaching( bool );
+
+    TQString	filePath()	const;
+    TQString	fileName()	const;
+#ifndef QT_NO_DIR //###
+    TQString	absFilePath()	const;
+#endif
+    TQString	baseName( bool complete = FALSE ) const;
+    TQString	extension( bool complete = TRUE ) const;
+
+#ifndef QT_NO_DIR //###
+    TQString	dirPath( bool absPath = FALSE ) const;
+#endif
+#ifndef QT_NO_DIR
+    TQDir	dir( bool absPath = FALSE )	const;
+#endif
+    bool	isReadable()	const;
+    bool	isWritable()	const;
+    bool	isExecutable()	const;
+    bool 	isHidden()      const;
+
+#ifndef QT_NO_DIR //###
+    bool	isRelative()	const;
+    bool	convertToAbs();
+#endif
+
+    bool	isFile()	const;
+    bool	isDir()		const;
+    bool	isSymLink()	const;
+
+    TQString	readLink()	const;
+
+    TQString	owner()		const;
+    uint	ownerId()	const;
+    TQString	group()		const;
+    uint	groupId()	const;
+
+    bool	permission( int permissionSpec ) const;
+
+#if (QT_VERSION-0 >= 0x040000)
+#error "TQFileInfo::size() should return TQIODevice::Offset instead of uint"
+#elif defined(QT_ABI_QT4)
+    TQIODevice::Offset size()	const;
+#else
+    uint	size()		const;
+#endif
+
+    TQDateTime	created()	const;
+    TQDateTime	lastModified()	const;
+    TQDateTime	lastRead()	const;
+
+private:
+    void	doStat() const;
+    static void slashify( TQString & );
+    static void makeAbs( TQString & );
+
+    TQString	fn;
+    TQFileInfoCache *fic;
+    bool	cache;
+#if defined(Q_OS_UNIX)
+    bool        symLink;
+#endif
+
+    void detach();
+    friend class TQDeepCopy< TQFileInfo >;
+};
+
+
+inline bool TQFileInfo::caching() const
+{
+    return cache;
+}
+
+
+#endif // TQFILEINFO_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfileinfo-members.html b/doc/html/qfileinfo-members.html new file mode 100644 index 00000000..ad0feaa2 --- /dev/null +++ b/doc/html/qfileinfo-members.html @@ -0,0 +1,80 @@ + + + + + +TQFileInfo Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFileInfo

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfileinfo.html b/doc/html/qfileinfo.html new file mode 100644 index 00000000..f83f9971 --- /dev/null +++ b/doc/html/qfileinfo.html @@ -0,0 +1,503 @@ + + + + + +TQFileInfo Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFileInfo Class Reference

+ +

The TQFileInfo class provides system-independent file information. +More... +

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

+

#include <qfileinfo.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQFileInfo class provides system-independent file information. +

+

TQFileInfo provides information about a file's name and position +(path) in the file system, its access rights and whether it is a +directory or symbolic link, etc. The file's size and last +modified/read times are also available. +

A TQFileInfo can point to a file with either a relative or an +absolute file path. Absolute file paths begin with the directory +separator "/" (or with a drive specification on Windows). Relative +file names begin with a directory name or a file name and specify +a path relative to the current working directory. An example of an +absolute path is the string "/tmp/quartz". A relative path might +look like "src/fatlib". You can use the function isRelative() to +check whether a TQFileInfo is using a relative or an absolute file +path. You can call the function convertToAbs() to convert a +relative TQFileInfo's path to an absolute path. +

The file that the TQFileInfo works on is set in the constructor or +later with setFile(). Use exists() to see if the file exists and +size() to get its size. +

To speed up performance, TQFileInfo caches information about the +file. Because files can be changed by other users or programs, or +even by other parts of the same program, there is a function that +refreshes the file information: refresh(). If you want to switch +off a TQFileInfo's caching and force it to access the file system +every time you request information from it call setCaching(FALSE). +

The file's type is obtained with isFile(), isDir() and +isSymLink(). The readLink() function provides the name of the file +the symlink points to. +

Elements of the file's name can be extracted with dirPath() and +fileName(). The fileName()'s parts can be extracted with +baseName() and extension(). +

The file's dates are returned by created(), lastModified() and +lastRead(). Information about the file's access permissions is +obtained with isReadable(), isWritable() and isExecutable(). The +file's ownership is available from owner(), ownerId(), group() and +groupId(). You can examine a file's permissions and ownership in a +single statement using the permission() function. +

If you need to read and traverse directories, see the TQDir class. +

See also Input/Output and Networking. + +


Member Type Documentation

+

TQFileInfo::PermissionSpec

+ +

This enum is used by the permission() function to report the +permissions and ownership of a file. The values may be OR-ed +together to test multiple permissions and ownership values. +

    +
  • TQFileInfo::ReadOwner - The file is readable by the owner of the file. +
  • TQFileInfo::WriteOwner - The file is writable by the owner of the file. +
  • TQFileInfo::ExeOwner - The file is executable by the owner of the file. +
  • TQFileInfo::ReadUser - The file is readable by the user. +
  • TQFileInfo::WriteUser - The file is writable by the user. +
  • TQFileInfo::ExeUser - The file is executable by the user. +
  • TQFileInfo::ReadGroup - The file is readable by the group. +
  • TQFileInfo::WriteGroup - The file is writable by the group. +
  • TQFileInfo::ExeGroup - The file is executable by the group. +
  • TQFileInfo::ReadOther - The file is readable by anyone. +
  • TQFileInfo::WriteOther - The file is writable by anyone. +
  • TQFileInfo::ExeOther - The file is executable by anyone. +

Warning: The semantics of ReadUser, WriteUser and ExeUser are +unfortunately not platform independent: on Unix, the rights of the owner of +the file are returned and on Windows the rights of the current user are +returned. This behavior might change in a future TQt version. If you want to +find the rights of the owner of the file, you should use the flags ReadOwner, WriteOwner and ExeOwner. If you want to find out the +rights of the current user, you should use isReadable(), isWritable() and +isExecutable(). + +


Member Function Documentation

+

TQFileInfo::TQFileInfo () +

+Constructs a new empty TQFileInfo. + +

TQFileInfo::TQFileInfo ( const TQString & file ) +

+Constructs a new TQFileInfo that gives information about the given +file. The file can also include an absolute or relative path. +

Warning: Some functions might behave in a counter-intuitive way +if file has a trailing directory separator. +

See also setFile(), isRelative(), TQDir::setCurrent(), and TQDir::isRelativePath(). + +

TQFileInfo::TQFileInfo ( const TQFile & file ) +

+Constructs a new TQFileInfo that gives information about file file. +

If the file has a relative path, the TQFileInfo will also have a +relative path. +

See also isRelative(). + +

TQFileInfo::TQFileInfo ( const TQDir & d, const TQString & fileName ) +

+Constructs a new TQFileInfo that gives information about the file +called fileName in the directory d. +

If d has a relative path, the TQFileInfo will also have a +relative path. +

See also isRelative(). + +

TQFileInfo::TQFileInfo ( const TQFileInfo & fi ) +

+Constructs a new TQFileInfo that is a copy of fi. + +

TQFileInfo::~TQFileInfo () +

+Destroys the TQFileInfo and frees its resources. + +

TQString TQFileInfo::absFilePath () const +

+Returns the absolute path including the file name. +

The absolute path name consists of the full path and the file +name. On Unix this will always begin with the root, '/', +directory. On Windows this will always begin 'D:/' where D is a +drive letter, except for network shares that are not mapped to a +drive letter, in which case the path will begin '//sharename/'. +

This function returns the same as filePath(), unless isRelative() +is TRUE. +

If the TQFileInfo is empty it returns TQDir::currentDirPath(). +

This function can be time consuming under Unix (in the order of +milliseconds). +

See also isRelative() and filePath(). + +

Examples: biff/biff.cpp and fileiconview/qfileiconview.cpp. +

TQString TQFileInfo::baseName ( bool complete = FALSE ) const +

+Returns the base name of the file. +

If complete is FALSE (the default) the base name consists of +all characters in the file name up to (but not including) the first '.' character. +

If complete is TRUE the base name consists of all characters in +the file up to (but not including) the last '.' character. +

The path is not included in either case. +

Example: +

+        TQFileInfo fi( "/tmp/archive.tar.gz" );
+        TQString base = fi.baseName();  // base = "archive"
+        base = fi.baseName( TRUE );    // base = "archive.tar"
+    
+ +

See also fileName() and extension(). + +

bool TQFileInfo::caching () const +

+ +

Returns TRUE if caching is enabled; otherwise returns FALSE. +

See also setCaching() and refresh(). + +

bool TQFileInfo::convertToAbs () +

+Converts the file's path to an absolute path. +

If it is already absolute, nothing is done. +

See also filePath() and isRelative(). + +

TQDateTime TQFileInfo::created () const +

+Returns the date and time when the file was created. +

On platforms where this information is not available, returns the +same as lastModified(). +

See also lastModified() and lastRead(). + +

TQDir TQFileInfo::dir ( bool absPath = FALSE ) const +

+Returns the file's path as a TQDir object. +

If the TQFileInfo is relative and absPath is FALSE, the TQDir +will be relative; otherwise it will be absolute. +

See also dirPath(), filePath(), fileName(), and isRelative(). + +

Example: fileiconview/qfileiconview.cpp. +

TQString TQFileInfo::dirPath ( bool absPath = FALSE ) const +

+Returns the file's path. +

If absPath is TRUE an absolute path is returned. +

See also dir(), filePath(), fileName(), and isRelative(). + +

Example: fileiconview/qfileiconview.cpp. +

bool TQFileInfo::exists () const +

+Returns TRUE if the file exists; otherwise returns FALSE. + +

Examples: biff/biff.cpp, distributor/distributor.ui.h, and i18n/main.cpp. +

TQString TQFileInfo::extension ( bool complete = TRUE ) const +

+Returns the file's extension name. +

If complete is TRUE (the default), extension() returns the +string of all characters in the file name after (but not +including) the first '.' character. +

If complete is FALSE, extension() returns the string of all +characters in the file name after (but not including) the last '.' +character. +

Example: +

+        TQFileInfo fi( "/tmp/archive.tar.gz" );
+        TQString ext = fi.extension();  // ext = "tar.gz"
+        ext = fi.extension( FALSE );   // ext = "gz"
+    
+ +

See also fileName() and baseName(). + +

Example: qdir/qdir.cpp. +

TQString TQFileInfo::fileName () const +

+Returns the name of the file, excluding the path. +

Example: +

+        TQFileInfo fi( "/tmp/archive.tar.gz" );
+        TQString name = fi.fileName();           // name = "archive.tar.gz"
+    
+ +

See also isRelative(), filePath(), baseName(), and extension(). + +

Examples: dirview/dirview.cpp, fileiconview/qfileiconview.cpp, and network/ftpclient/ftpmainwindow.ui.h. +

TQString TQFileInfo::filePath () const +

+Returns the file name, including the path (which may be absolute +or relative). +

See also isRelative() and absFilePath(). + +

Examples: dirview/main.cpp and fileiconview/qfileiconview.cpp. +

TQString TQFileInfo::group () const +

+Returns the group of the file. On Windows, on systems where files +do not have groups, or if an error occurs, TQString::null is +returned. +

This function can be time consuming under Unix (in the order of +milliseconds). +

See also groupId(), owner(), and ownerId(). + +

uint TQFileInfo::groupId () const +

+Returns the id of the group the file belongs to. +

On Windows and on systems where files do not have groups this +function always returns (uint) -2. +

See also group(), owner(), and ownerId(). + +

bool TQFileInfo::isDir () const +

+Returns TRUE if this object points to a directory or to a symbolic +link to a directory; otherwise returns FALSE. +

See also isFile() and isSymLink(). + +

Examples: dirview/dirview.cpp and fileiconview/qfileiconview.cpp. +

bool TQFileInfo::isExecutable () const +

+Returns TRUE if the file is executable; otherwise returns FALSE. +

See also isReadable(), isWritable(), and permission(). + +

bool TQFileInfo::isFile () const +

+Returns TRUE if this object points to a file. Returns FALSE if the +object points to something which isn't a file, e.g. a directory or +a symlink. +

See also isDir() and isSymLink(). + +

Examples: dirview/dirview.cpp, distributor/distributor.ui.h, fileiconview/qfileiconview.cpp, and qdir/qdir.cpp. +

bool TQFileInfo::isHidden () const +

+Returns TRUE if the file is hidden; otherwise returns FALSE. +

On Unix-like operating systems, including Mac OS X, a file is +hidden if its name begins with ".". On Windows a file is hidden if +its hidden attribute is set. + +

bool TQFileInfo::isReadable () const +

+Returns TRUE if the file is readable; otherwise returns FALSE. +

See also isWritable(), isExecutable(), and permission(). + +

Example: distributor/distributor.ui.h. +

bool TQFileInfo::isRelative () const +

+Returns TRUE if the file path name is relative. Returns FALSE if +the path is absolute (e.g. under Unix a path is absolute if it +begins with a "/"). + +

bool TQFileInfo::isSymLink () const +

+Returns TRUE if this object points to a symbolic link (or to a +shortcut on Windows, or an alias on Mac OS X); otherwise returns +FALSE. +

See also isFile(), isDir(), and readLink(). + +

Examples: dirview/dirview.cpp, distributor/distributor.ui.h, and fileiconview/qfileiconview.cpp. +

bool TQFileInfo::isWritable () const +

+Returns TRUE if the file is writable; otherwise returns FALSE. +

See also isReadable(), isExecutable(), and permission(). + +

Example: distributor/distributor.ui.h. +

TQDateTime TQFileInfo::lastModified () const +

+Returns the date and time when the file was last modified. +

See also created() and lastRead(). + +

Example: biff/biff.cpp. +

TQDateTime TQFileInfo::lastRead () const +

+Returns the date and time when the file was last read (accessed). +

On platforms where this information is not available, returns the +same as lastModified(). +

See also created() and lastModified(). + +

Example: biff/biff.cpp. +

TQFileInfo & TQFileInfo::operator= ( const TQFileInfo & fi ) +

+Makes a copy of fi and assigns it to this TQFileInfo. + +

TQString TQFileInfo::owner () const +

+Returns the owner of the file. On systems where files +do not have owners, or if an error occurs, TQString::null is +returned. +

This function can be time consuming under Unix (in the order of +milliseconds). +

See also ownerId(), group(), and groupId(). + +

uint TQFileInfo::ownerId () const +

+Returns the id of the owner of the file. +

On Windows and on systems where files do not have owners this +function returns ((uint) -2). +

See also owner(), group(), and groupId(). + +

bool TQFileInfo::permission ( int permissionSpec ) const +

+Tests for file permissions. The permissionSpec argument can be +several flags of type PermissionSpec OR-ed together to check +for permission combinations. +

On systems where files do not have permissions this function +always returns TRUE. +

Example: +

+        TQFileInfo fi( "/tmp/archive.tar.gz" );
+        if ( fi.permission( TQFileInfo::WriteUser | TQFileInfo::ReadGroup ) )
+            qWarning( "I can change the file; my group can read the file" );
+        if ( fi.permission( TQFileInfo::WriteGroup | TQFileInfo::WriteOther ) )
+            qWarning( "The group or others can change the file" );
+    
+ +

See also isReadable(), isWritable(), and isExecutable(). + +

TQString TQFileInfo::readLink () const +

+Returns the name a symlink (or shortcut on Windows) points to, or +a TQString::null if the object isn't a symbolic link. +

This name may not represent an existing file; it is only a string. +TQFileInfo::exists() returns TRUE if the symlink points to an +existing file. +

See also exists(), isSymLink(), isDir(), and isFile(). + +

void TQFileInfo::refresh () const +

+Refreshes the information about the file, i.e. reads in information +from the file system the next time a cached property is fetched. +

See also setCaching(). + +

void TQFileInfo::setCaching ( bool enable ) +

+If enable is TRUE, enables caching of file information. If enable is FALSE caching is disabled. +

When caching is enabled, TQFileInfo reads the file information from +the file system the first time it's needed, but generally not +later. +

Caching is enabled by default. +

See also refresh() and caching(). + +

void TQFileInfo::setFile ( const TQString & file ) +

+Sets the file that the TQFileInfo provides information about to file. +

The file can also include an absolute or relative file path. +Absolute paths begin with the directory separator (e.g. "/" under +Unix) or a drive specification (under Windows). Relative file +names begin with a directory name or a file name and specify a +path relative to the current directory. +

Example: +

+    TQString absolute = "/local/bin";
+    TQString relative = "local/bin";
+    TQFileInfo absFile( absolute );
+    TQFileInfo relFile( relative );
+
+    TQDir::setCurrent( TQDir::rootDirPath() );
+    // absFile and relFile now point to the same file
+
+    TQDir::setCurrent( "/tmp" );
+    // absFile now points to "/local/bin",
+    // while relFile points to "/tmp/local/bin"
+    
+ +

See also isRelative(), TQDir::setCurrent(), and TQDir::isRelativePath(). + +

Example: biff/biff.cpp. +

void TQFileInfo::setFile ( const TQFile & file ) +

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

Sets the file that the TQFileInfo provides information about to file. +

If file includes a relative path, the TQFileInfo will also have +a relative path. +

See also isRelative(). + +

void TQFileInfo::setFile ( const TQDir & d, const TQString & fileName ) +

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

Sets the file that the TQFileInfo provides information about to fileName in directory d. +

If fileName includes a relative path, the TQFileInfo will also +have a relative path. +

See also isRelative(). + +

uint TQFileInfo::size () const +

+Returns the file size in bytes, or 0 if the file does not exist or +if the size is 0 or if the size cannot be fetched. + +

Example: qdir/qdir.cpp. + +


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


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfilepreview-members.html b/doc/html/qfilepreview-members.html new file mode 100644 index 00000000..dfa326a7 --- /dev/null +++ b/doc/html/qfilepreview-members.html @@ -0,0 +1,48 @@ + + + + + +TQFilePreview Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFilePreview

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfilepreview.html b/doc/html/qfilepreview.html new file mode 100644 index 00000000..9cd42f38 --- /dev/null +++ b/doc/html/qfilepreview.html @@ -0,0 +1,82 @@ + + + + + +TQFilePreview Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFilePreview Class Reference

+ +

The TQFilePreview class provides file previewing in TQFileDialog. +More... +

#include <qfiledialog.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQFilePreview class provides file previewing in TQFileDialog. +

This class is an abstract base class which is used to implement +widgets that can display a preview of a file in a TQFileDialog. +

You must derive the preview widget from both TQWidget and from this +class. Then you must reimplement this class's previewUrl() function, +which is called by the file dialog if the preview of a file +(specified as a URL) should be shown. +

See also TQFileDialog::setPreviewMode(), TQFileDialog::setContentsPreview(), +TQFileDialog::setInfoPreview(), TQFileDialog::setInfoPreviewEnabled(), +TQFileDialog::setContentsPreviewEnabled(). +

For an example of a preview widget see qt/examples/qdir/qdir.cpp. +

See also Miscellaneous Classes. + +


Member Function Documentation

+

TQFilePreview::TQFilePreview () +

+Constructs the TQFilePreview. + +

void TQFilePreview::previewUrl ( const TQUrl & url ) [pure virtual] +

+ +

This function is called by TQFileDialog if a preview +for the url should be shown. Reimplement this +function to provide file previewing. + + +


+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/qfocusdata-h.html b/doc/html/qfocusdata-h.html new file mode 100644 index 00000000..4296e082 --- /dev/null +++ b/doc/html/qfocusdata-h.html @@ -0,0 +1,115 @@ + + + + + +qfocusdata.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qfocusdata.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qfocusdata.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of internal TQFocusData class
+**
+** Created : 980405
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQFOCUSDATA_H
+#define TQFOCUSDATA_H
+
+#ifndef QT_H
+#include "qwidgetlist.h"
+#endif // QT_H
+
+
+class Q_EXPORT TQFocusData {
+public:
+    TQWidget* focusWidget() const { return it.current(); }
+
+    TQWidget* home();
+    TQWidget* next();
+    TQWidget* prev();
+    TQWidget* first() const;
+    TQWidget* last() const;
+    int count() const { return focusWidgets.count(); }
+
+private:
+    friend class TQWidget;
+
+    TQFocusData()
+	: it(focusWidgets) {}
+    TQWidgetList	  focusWidgets;
+    TQWidgetListIt it;
+};
+
+
+#endif // TQFOCUSDATA_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfocusdata-members.html b/doc/html/qfocusdata-members.html new file mode 100644 index 00000000..9fc5cc21 --- /dev/null +++ b/doc/html/qfocusdata-members.html @@ -0,0 +1,53 @@ + + + + + +TQFocusData Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFocusData

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfocusdata.html b/doc/html/qfocusdata.html new file mode 100644 index 00000000..78f910f2 --- /dev/null +++ b/doc/html/qfocusdata.html @@ -0,0 +1,123 @@ + + + + + +TQFocusData Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFocusData Class Reference

+ +

The TQFocusData class maintains the list of widgets in the focus +chain. +More... +

#include <qfocusdata.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQFocusData class maintains the list of widgets in the focus +chain. +

+

This read-only list always contains at least one widget (i.e. the +top-level widget). It provides a simple cursor which can be reset +to the current focus widget using home(), or moved to its +neighboring widgets using next() and prev(). You can also retrieve +the count() of the number of widgets in the list. The list is a +loop, so if you keep iterating, for example using next(), you will +never come to the end. +

Some widgets in the list may not accept focus. Widgets are added +to the list as necessary, but not removed from it. This lets +widgets change focus policy dynamically without disrupting the +focus chain the user experiences. When a widget disables and +re-enables tab focus, its position in the focus chain does not +change. +

When reimplementing TQWidget::focusNextPrevChild() to provide +special focus flow, you will usually call TQWidget::focusData() to +retrieve the focus data stored at the top-level widget. A +top-level widget's focus data contains the focus list for its +hierarchy of widgets. +

The cursor may change at any time. +

This class is not thread-safe. +

See also TQWidget::focusNextPrevChild(), TQWidget::setTabOrder(), TQWidget::focusPolicy, and Miscellaneous Classes. + +


Member Function Documentation

+

int TQFocusData::count () const +

+ +

Returns the number of widgets in the focus chain. + +

TQWidget * TQFocusData::first () const +

+Returns the first widget in the focus chain. +The cursor is not modified. + +

TQWidget * TQFocusData::focusWidget () const +

+ +

Returns the widgets in the hierarchy that are in the focus chain. + +

TQWidget * TQFocusData::home () +

+Moves the cursor to the focusWidget() and returns that widget. You +must call this before next() or prev() to iterate meaningfully. + +

TQWidget * TQFocusData::last () const +

+Returns the last widget in the focus chain. +The cursor is not modified. + +

TQWidget * TQFocusData::next () +

+Moves the cursor to the next widget in the focus chain. There is +always a next widget because the list is a loop. + +

TQWidget * TQFocusData::prev () +

+Moves the cursor to the previous widget in the focus chain. There +is always a previous widget because the list is a loop. + + +

+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/qfocusevent-members.html b/doc/html/qfocusevent-members.html new file mode 100644 index 00000000..5ff98d29 --- /dev/null +++ b/doc/html/qfocusevent-members.html @@ -0,0 +1,54 @@ + + + + + +TQFocusEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFocusEvent

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfocusevent.html b/doc/html/qfocusevent.html new file mode 100644 index 00000000..23e202ba --- /dev/null +++ b/doc/html/qfocusevent.html @@ -0,0 +1,133 @@ + + + + + +TQFocusEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFocusEvent Class Reference

+ +

The TQFocusEvent class contains event parameters for widget focus +events. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Detailed Description

+ + +The TQFocusEvent class contains event parameters for widget focus +events. +

+

Focus events are sent to widgets when the keyboard input focus +changes. Focus events occur due to mouse actions, keypresses (e.g. +Tab or Backtab), the window system, popup menus, keyboard +shortcuts or other application specific reasons. The reason for a +particular focus event is returned by reason() in the appropriate +event handler. +

The event handlers TQWidget::focusInEvent() and +TQWidget::focusOutEvent() receive focus events. +

Use setReason() to set the reason for all focus events, and +resetReason() to set the reason for all focus events to the reason +in force before the last setReason() call. +

See also TQWidget::setFocus(), TQWidget::focusPolicy, and Event Classes. + +


Member Type Documentation

+

TQFocusEvent::Reason

+ +

This enum specifies why the focus changed. +

    +
  • TQFocusEvent::Mouse - because of a mouse action. +
  • TQFocusEvent::Tab - because of a Tab press. +
  • TQFocusEvent::Backtab - because of a Backtab press +(possibly including Shift/Control, e.g. Shift+Tab). +
  • TQFocusEvent::ActiveWindow - because the window system made this window (in)active. +
  • TQFocusEvent::Popup - because the application opened/closed a popup that grabbed/released focus. +
  • TQFocusEvent::Shortcut - because of a keyboard shortcut. +
  • TQFocusEvent::Other - any other reason, usually application-specific. +

See the keyboard focus overview for more +about focus. + +


Member Function Documentation

+

TQFocusEvent::TQFocusEvent ( Type type ) +

+ +

Constructs a focus event object. +

The type parameter must be either TQEvent::FocusIn or TQEvent::FocusOut. + +

bool TQFocusEvent::gotFocus () const +

+ +

Returns TRUE if the widget received the text input focus; +otherwise returns FALSE. + +

bool TQFocusEvent::lostFocus () const +

+ +

Returns TRUE if the widget lost the text input focus; otherwise +returns FALSE. + +

Reason TQFocusEvent::reason () [static] +

+Returns the reason for this focus event. +

See also setReason(). + +

void TQFocusEvent::resetReason () [static] +

+Resets the reason for all future focus events to the value before +the last setReason() call. +

See also reason() and setReason(). + +

void TQFocusEvent::setReason ( Reason reason ) [static] +

+Sets the reason for all future focus events to reason. +

See also reason() and resetReason(). + + +


+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/qfont-examples.html b/doc/html/qfont-examples.html new file mode 100644 index 00000000..165fdf3b --- /dev/null +++ b/doc/html/qfont-examples.html @@ -0,0 +1,48 @@ + + + + + +TQFont Examples + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFont Examples

+ + +

The following example programs show how to use the +classes TQFont, TQFontMetrics, TQFontInfo, and TQFontDatabase. +

+

+
A simple demonstration of TQFont member functions +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfont-h.html b/doc/html/qfont-h.html new file mode 100644 index 00000000..af4c5a1e --- /dev/null +++ b/doc/html/qfont-h.html @@ -0,0 +1,417 @@ + + + + + +qfont.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qfont.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qfont.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQFont class
+**
+** Created : 940514
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQFONT_H
+#define TQFONT_H
+
+#ifndef QT_H
+#include "qwindowdefs.h"
+#include "qstring.h"
+#endif // QT_H
+
+
+class TQFontPrivate;                                     /* don't touch */
+class TQStringList;
+class TQTextFormatCollection;
+
+class Q_EXPORT TQFont
+{
+public:
+    enum StyleHint {
+	Helvetica,  SansSerif = Helvetica,
+	Times,      Serif = Times,
+	Courier,    TypeWriter = Courier,
+	OldEnglish, Decorative = OldEnglish,
+	System,
+	AnyStyle
+    };
+
+    enum StyleStrategy {
+	PreferDefault    = 0x0001,
+	PreferBitmap     = 0x0002,
+	PreferDevice     = 0x0004,
+	PreferOutline    = 0x0008,
+	ForceOutline     = 0x0010,
+	PreferMatch      = 0x0020,
+	PreferQuality    = 0x0040,
+	PreferAntialias  = 0x0080,
+	NoAntialias      = 0x0100,
+	OpenGLCompatible = 0x0200
+    };
+
+    enum Weight {
+	Light    = 25,
+	Normal   = 50,
+	DemiBold = 63,
+	Bold     = 75,
+	Black	 = 87
+    };
+
+    enum Stretch {
+	UltraCondensed =  50,
+	ExtraCondensed =  62,
+	Condensed      =  75,
+	SemiCondensed  =  87,
+	Unstretched    = 100,
+	SemiExpanded   = 112,
+	Expanded       = 125,
+	ExtraExpanded  = 150,
+	UltraExpanded  = 200
+    };
+
+    // default font
+    TQFont();
+    // specific font
+#ifdef Q_QDOC
+    TQFont( const TQString &family, int pointSize = 12, int weight = Normal,
+	   bool italic = FALSE );
+#else
+    TQFont( const TQString &family, int pointSize = -1, int weight = -1,
+	   bool italic = FALSE );
+#endif
+    // copy constructor
+    TQFont( const TQFont & );
+
+    ~TQFont();
+
+    TQString family() const;
+    void setFamily( const TQString &);
+
+    int pointSize() const;
+    float pointSizeFloat() const;
+    void setPointSize( int );
+    void setPointSizeFloat( float );
+
+    int pixelSize() const;
+    void setPixelSize( int );
+    void setPixelSizeFloat( float );
+
+    int weight() const;
+    void setWeight( int );
+
+    bool bold() const;
+    void setBold( bool );
+
+    bool italic() const;
+    void setItalic( bool );
+
+    bool underline() const;
+    void setUnderline( bool );
+
+    bool overline() const;
+    void setOverline( bool );
+
+    bool strikeOut() const;
+    void setStrikeOut( bool );
+
+    bool fixedPitch() const;
+    void setFixedPitch( bool );
+
+    StyleHint styleHint() const;
+    StyleStrategy styleStrategy() const;
+    void setStyleHint( StyleHint, StyleStrategy = PreferDefault );
+    void setStyleStrategy( StyleStrategy s );
+
+    int stretch() const;
+    void setStretch( int );
+
+    // is raw mode still needed?
+    bool rawMode() const;
+    void setRawMode( bool );
+
+    // dupicated from TQFontInfo
+    bool exactMatch() const;
+
+    TQFont &operator=( const TQFont & );
+    bool operator==( const TQFont & ) const;
+    bool operator!=( const TQFont & ) const;
+    bool isCopyOf( const TQFont & ) const;
+
+
+#ifdef Q_WS_WIN
+    HFONT handle() const;
+#else // !Q_WS_WIN
+    TQt::HANDLE handle() const;
+#endif // Q_WS_WIN
+
+
+    // needed for X11
+    void setRawName( const TQString & );
+    TQString rawName() const;
+
+    TQString key() const;
+
+    TQString toString() const;
+    bool fromString(const TQString &);
+
+#ifndef QT_NO_STRINGLIST
+    static TQString substitute(const TQString &);
+    static TQStringList substitutes(const TQString &);
+    static TQStringList substitutions();
+    static void insertSubstitution(const TQString&, const TQString &);
+    static void insertSubstitutions(const TQString&, const TQStringList &);
+    static void removeSubstitution(const TQString &);
+#endif //QT_NO_STRINGLIST
+    static void initialize();
+    static void cleanup();
+#ifndef Q_WS_QWS
+    static void cacheStatistics();
+#endif
+
+#if defined(Q_WS_QWS)
+    void qwsRenderToDisk(bool all=TRUE);
+#endif
+
+
+    // a copy of this lives in qunicodetables.cpp, as we can't include
+    // qfont.h it in tools/. Do not modify without changing the script
+    // enum in qunicodetable_p.h aswell.
+    enum Script {
+	// European Alphabetic Scripts
+	Latin,
+	Greek,
+	Cyrillic,
+	Armenian,
+	Georgian,
+	Runic,
+	Ogham,
+	SpacingModifiers,
+	CombiningMarks,
+
+	// Middle Eastern Scripts
+	Hebrew,
+	Arabic,
+	Syriac,
+	Thaana,
+
+	// South and Southeast Asian Scripts
+	Devanagari,
+	Bengali,
+	Gurmukhi,
+	Gujarati,
+	Oriya,
+	Tamil,
+	Telugu,
+	Kannada,
+	Malayalam,
+	Sinhala,
+	Thai,
+	Lao,
+	Tibetan,
+	Myanmar,
+	Khmer,
+
+	// East Asian Scripts
+	Han,
+	Hiragana,
+	Katakana,
+	Hangul,
+	Bopomofo,
+	Yi,
+
+	// Additional Scripts
+	Ethiopic,
+	Cherokee,
+	CanadianAboriginal,
+	Mongolian,
+
+	// Symbols
+	CurrencySymbols,
+	LetterlikeSymbols,
+	NumberForms,
+	MathematicalOperators,
+	TechnicalSymbols,
+	GeometricSymbols,
+	MiscellaneousSymbols,
+	EnclosedAndSquare,
+	Braille,
+
+	Unicode,
+
+	// some scripts added in Unicode 3.2
+	Tagalog,
+	Hanunoo,
+	Buhid,
+	Tagbanwa,
+
+	KatakanaHalfWidth,
+
+	// from Unicode 4.0
+	Limbu,
+	TaiLe,
+
+	// End
+#if !defined(Q_QDOC)
+	NScripts,
+	UnknownScript = NScripts,
+
+	NoScript,
+
+	// ----------------------------------------
+	// Dear User, you can see values > NScript,
+	// but they are internal - do not touch.
+
+	Han_Japanese,
+	Han_SimplifiedChinese,
+	Han_TraditionalChinese,
+	Han_Korean,
+
+	LastPrivateScript
+#endif
+    };
+
+    TQString defaultFamily() const;
+    TQString lastResortFamily() const;
+    TQString lastResortFont() const;
+
+#ifndef QT_NO_COMPAT
+
+    static TQFont defaultFont();
+    static void setDefaultFont( const TQFont & );
+
+#endif // QT_NO_COMPAT
+
+    TQFont resolve( const TQFont & ) const;
+
+protected:
+    // why protected?
+    bool dirty() const;
+    int deciPointSize() const;
+
+private:
+    TQFont( TQFontPrivate *, TQPaintDevice *pd );
+
+    void detach();
+
+#if defined(Q_WS_MAC)
+    void macSetFont(TQPaintDevice *);
+#elif defined(Q_WS_X11)
+    void x11SetScreen( int screen = -1 );
+    int x11Screen() const;
+#endif
+
+    friend class TQFontMetrics;
+    friend class TQFontInfo;
+    friend class TQPainter;
+    friend class TQPSPrinterFont;
+    friend class TQApplication;
+    friend class TQWidget;
+    friend class TQTextFormatCollection;
+    friend class TQTextLayout;
+    friend class TQTextItem;
+    friend class TQGLContext;
+#if defined(Q_WS_X11) && !defined(QT_NO_XFTFREETYPE)
+    friend TQt::HANDLE qt_xft_handle(const TQFont &font);
+#endif
+#ifndef QT_NO_DATASTREAM
+    friend Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQFont & );
+    friend Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQFont & );
+#endif
+
+    TQFontPrivate *d;
+};
+
+
+inline bool TQFont::bold() const
+{ return weight() > Normal; }
+
+
+inline void TQFont::setBold( bool enable )
+{ setWeight( enable ? Bold : Normal ); }
+
+
+
+
+/*****************************************************************************
+  TQFont stream functions
+ *****************************************************************************/
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQFont & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQFont & );
+#endif
+
+
+#endif // TQFONT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfont-members.html b/doc/html/qfont-members.html new file mode 100644 index 00000000..175ec9cc --- /dev/null +++ b/doc/html/qfont-members.html @@ -0,0 +1,105 @@ + + + + + +TQFont Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFont

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfont.html b/doc/html/qfont.html new file mode 100644 index 00000000..1978f6d6 --- /dev/null +++ b/doc/html/qfont.html @@ -0,0 +1,922 @@ + + + + + +TQFont Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFont Class Reference

+ +

The TQFont class specifies a font used for drawing text. +More... +

#include <qfont.h> +

List of all member functions. +

Public Members

+
    +
  • enum StyleHint { Helvetica, SansSerif = Helvetica, Times, Serif = Times, Courier, TypeWriter = Courier, OldEnglish, Decorative = OldEnglish, System, AnyStyle }
  • +
  • enum StyleStrategy { PreferDefault = 0x0001, PreferBitmap = 0x0002, PreferDevice = 0x0004, PreferOutline = 0x0008, ForceOutline = 0x0010, PreferMatch = 0x0020, PreferQuality = 0x0040, PreferAntialias = 0x0080, NoAntialias = 0x0100, OpenGLCompatible = 0x0200 }
  • +
  • enum Weight { Light = 25, Normal = 50, DemiBold = 63, Bold = 75, Black = 87 }
  • +
  • enum Stretch { UltraCondensed = 50, ExtraCondensed = 62, Condensed = 75, SemiCondensed = 87, Unstretched = 100, SemiExpanded = 112, Expanded = 125, ExtraExpanded = 150, UltraExpanded = 200 }
  • +
  • TQFont ()
  • +
  • TQFont ( const TQString & family, int pointSize = 12, int weight = Normal, bool italic = FALSE )
  • +
  • TQFont ( const TQFont & font )
  • +
  • ~TQFont ()
  • +
  • TQString family () const
  • +
  • void setFamily ( const TQString & family )
  • +
  • int pointSize () const
  • +
  • float pointSizeFloat () const
  • +
  • void setPointSize ( int pointSize )
  • +
  • void setPointSizeFloat ( float pointSize )
  • +
  • int pixelSize () const
  • +
  • void setPixelSize ( int pixelSize )
  • +
  • void setPixelSizeFloat ( float pixelSize )  (obsolete)
  • +
  • int weight () const
  • +
  • void setWeight ( int weight )
  • +
  • bool bold () const
  • +
  • void setBold ( bool enable )
  • +
  • bool italic () const
  • +
  • void setItalic ( bool enable )
  • +
  • bool underline () const
  • +
  • void setUnderline ( bool enable )
  • +
  • bool overline () const
  • +
  • void setOverline ( bool enable )
  • +
  • bool strikeOut () const
  • +
  • void setStrikeOut ( bool enable )
  • +
  • bool fixedPitch () const
  • +
  • void setFixedPitch ( bool enable )
  • +
  • StyleHint styleHint () const
  • +
  • StyleStrategy styleStrategy () const
  • +
  • void setStyleHint ( StyleHint hint, StyleStrategy strategy = PreferDefault )
  • +
  • void setStyleStrategy ( StyleStrategy s )
  • +
  • int stretch () const
  • +
  • void setStretch ( int factor )
  • +
  • bool rawMode () const
  • +
  • void setRawMode ( bool enable )
  • +
  • bool exactMatch () const
  • +
  • TQFont & operator= ( const TQFont & font )
  • +
  • bool operator== ( const TQFont & f ) const
  • +
  • bool operator!= ( const TQFont & f ) const
  • +
  • bool isCopyOf ( const TQFont & f ) const
  • +
  • HFONT handle () const
  • +
  • void setRawName ( const TQString & name )
  • +
  • TQString rawName () const
  • +
  • TQString key () const
  • +
  • TQString toString () const
  • +
  • bool fromString ( const TQString & descrip )
  • +
  • void qwsRenderToDisk ( bool all = TRUE )
  • +
  • enum Script { Latin, Greek, Cyrillic, Armenian, Georgian, Runic, Ogham, SpacingModifiers, CombiningMarks, Hebrew, Arabic, Syriac, Thaana, Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam, Sinhala, Thai, Lao, Tibetan, Myanmar, Khmer, Han, Hiragana, Katakana, Hangul, Bopomofo, Yi, Ethiopic, Cherokee, CanadianAboriginal, Mongolian, CurrencySymbols, LetterlikeSymbols, NumberForms, MathematicalOperators, TechnicalSymbols, GeometricSymbols, MiscellaneousSymbols, EnclosedAndSquare, Braille, Unicode, Tagalog, Hanunoo, Buhid, Tagbanwa, KatakanaHalfWidth, Limbu, TaiLe }
  • +
  • TQString defaultFamily () const
  • +
  • TQString lastResortFamily () const
  • +
  • TQString lastResortFont () const
  • +
  • TQFont resolve ( const TQFont & other ) const
  • +
+

Static Public Members

+
    +
  • TQString substitute ( const TQString & familyName )
  • +
  • TQStringList substitutes ( const TQString & familyName )
  • +
  • TQStringList substitutions ()
  • +
  • void insertSubstitution ( const TQString & familyName, const TQString & substituteName )
  • +
  • void insertSubstitutions ( const TQString & familyName, const TQStringList & substituteNames )
  • +
  • void removeSubstitution ( const TQString & familyName )
  • +
  • TQFont defaultFont ()  (obsolete)
  • +
  • void setDefaultFont ( const TQFont & f )  (obsolete)
  • +
+

Protected Members

+ +

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQFont & font )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQFont & font )
  • +
+

Detailed Description

+ + +The TQFont class specifies a font used for drawing text. +

+ + + +

When you create a TQFont object you specify various attributes that +you want the font to have. TQt will use the font with the specified +attributes, or if no matching font exists, TQt will use the closest +matching installed font. The attributes of the font that is +actually used are retrievable from a TQFontInfo object. If the +window system provides an exact match exactMatch() returns TRUE. +Use TQFontMetrics to get measurements, e.g. the pixel length of a +string using TQFontMetrics::width(). +

Use TQApplication::setFont() to set the application's default font. +

If a choosen X11 font does not include all the characters that +need to be displayed, TQFont will try to find the characters in the +nearest equivalent fonts. When a TQPainter draws a character from a +font the TQFont will report whether or not it has the character; if +it does not, TQPainter will draw an unfilled square. +

Create TQFonts like this: +

+    TQFont serifFont( "Times", 10, Bold );
+    TQFont sansFont( "Helvetica [Cronyx]", 12 );
+    
+ +

The attributes set in the constructor can also be set later, e.g. +setFamily(), setPointSize(), setPointSizeFloat(), setWeight() and +setItalic(). The remaining attributes must be set after +contstruction, e.g. setBold(), setUnderline(), setOverline(), +setStrikeOut() and setFixedPitch(). TQFontInfo objects should be +created after the font's attributes have been set. A TQFontInfo +object will not change, even if you change the font's +attributes. The corresponding "get" functions, e.g. family(), +pointSize(), etc., return the values that were set, even though +the values used may differ. The actual values are available from a +TQFontInfo object. +

If the requested font family is unavailable you can influence the +font matching algorithm by choosing a +particular TQFont::StyleHint and TQFont::StyleStrategy with +setStyleHint(). The default family (corresponding to the current +style hint) is returned by defaultFamily(). +

The font-matching algorithm has a lastResortFamily() and +lastResortFont() in cases where a suitable match cannot be found. +You can provide substitutions for font family names using +insertSubstitution() and insertSubstitutions(). Substitutions can +be removed with removeSubstitution(). Use substitute() to retrieve +a family's first substitute, or the family name itself if it has +no substitutes. Use substitutes() to retrieve a list of a family's +substitutes (which may be empty). +

Every TQFont has a key() which you can use, for example, as the key +in a cache or dictionary. If you want to store a user's font +preferences you could use TQSettings, writing the font information +with toString() and reading it back with fromString(). The +operator<<() and operator>>() functions are also available, but +they work on a data stream. +

It is possible to set the height of characters shown on the screen +to a specified number of pixels with setPixelSize(); however using +setPointSize() has a similar effect and provides device +independence. +

Under the X Window System you can set a font using its system +specific name with setRawName(). +

Loading fonts can be expensive, especially on X11. TQFont contains +extensive optimizations to make the copying of TQFont objects fast, +and to cache the results of the slow window system functions it +depends upon. +

+The font matching algorithm works as follows: +

    +
  1. The specified font family is searched for. +
  2. If not found, the styleHint() is used to select a replacement +family. +
  3. Each replacement font family is searched for. +
  4. If none of these are found or there was no styleHint(), "helvetica" +will be searched for. +
  5. If "helvetica" isn't found TQt will try the lastResortFamily(). +
  6. If the lastResortFamily() isn't found TQt will try the +lastResortFont() which will always return a name of some kind. +
+

Once a font is found, the remaining attributes are matched in order of +priority: +

    +
  1. fixedPitch() +
  2. pointSize() (see below) +
  3. weight() +
  4. italic() +
+

If you have a font which matches on family, even if none of the +other attributes match, this font will be chosen in preference to +a font which doesn't match on family but which does match on the +other attributes. This is because font family is the dominant +search criteria. +

The point size is defined to match if it is within 20% of the +requested point size. When several fonts match and are only +distinguished by point size, the font with the closest point size +to the one requested will be chosen. +

The actual family, font size, weight and other font attributes +used for drawing text will depend on what's available for the +chosen family under the window system. A TQFontInfo object can be +used to determine the actual values used for drawing the text. +

Examples: +

+    TQFont f("Helvetica");
+    
+ +If you had both an Adobe and a Cronyx Helvetica, you might get +either. +

+    TQFont f1( "Helvetica [Cronyx]" );  // TQt 3.x
+    TQFont f2( "Cronyx-Helvetica" );    // TQt 2.x compatibility
+    
+ +You can specify the foundry you want in the family name. Both fonts, +f1 and f2, in the above example will be set to "Helvetica +[Cronyx]". +

To determine the attributes of the font actually used in the window +system, use a TQFontInfo object, e.g. +

+    TQFontInfo info( f1 );
+    TQString family = info.family();
+    
+ +

To find out font metrics use a TQFontMetrics object, e.g. +

+    TQFontMetrics fm( f1 );
+    int pixelWidth = fm.width( "How many pixels wide is this text?" );
+    int pixelHeight = fm.height();
+    
+ +

For more general information on fonts, see the +comp.fonts FAQ. +Information on encodings can be found from +Roman Czyborra's page. +

See also TQFontMetrics, TQFontInfo, TQFontDatabase, TQApplication::setFont(), TQWidget::font, TQPainter::setFont(), TQFont::StyleHint, TQFont::Weight, Widget Appearance and Style, Graphics Classes, and Implicitly and Explicitly Shared Classes. + +


Member Type Documentation

+

TQFont::Script

+ +

This enum represents Unicode allocated +scripts. For exhaustive coverage see The + Unicode Standard Version 3.0. The following scripts are +supported: +

Modern European alphabetic scripts (left to right): +

    +
  • TQFont::Latin - consists of most alphabets based on the original Latin alphabet. +
  • TQFont::Greek - covers ancient and modern Greek and Coptic. +
  • TQFont::Cyrillic - covers the Slavic and non-Slavic languages using +cyrillic alphabets. +
  • TQFont::Armenian - contains the Armenian alphabet used with the +Armenian language. +
  • TQFont::Georgian - covers at least the language Georgian. +
  • TQFont::Runic - covers the known constituents of the Runic alphabets used +by the early and medieval societies in the Germanic, +Scandinavian, and Anglo-Saxon areas. +
  • TQFont::Ogham - is an alphabetical script used to write a very early +form of Irish. +
  • TQFont::SpacingModifiers - are small signs indicating modifications +to the preceeding letter. +
  • TQFont::CombiningMarks - consist of diacritical marks not specific to +a particular alphabet, diacritical marks used in +combination with mathematical and technical symbols, and +glyph encodings applied to multiple letterforms. +

Middle Eastern scripts (right to left): +

    +
  • TQFont::Hebrew - is used for writing Hebrew, Yiddish, and some other languages. +
  • TQFont::Arabic - covers the Arabic language as well as Persian, Urdu, +Kurdish and some others. +
  • TQFont::Syriac - is used to write the active liturgical languages and +dialects of several Middle Eastern and Southeast Indian +communities. +
  • TQFont::Thaana - is used to write the Maledivian Dhivehi language. +

South and Southeast Asian scripts (left to right with few historical exceptions): +

    +
  • TQFont::Devanagari - covers classical Sanskrit and modern Hindi as +well as several other languages. +
  • TQFont::Bengali - is a relative to Devanagari employed to write the +Bengali language used in West Bengal/India and Bangladesh +as well as several minority languages. +
  • TQFont::Gurmukhi - is another Devanagari relative used to write Punjabi. +
  • TQFont::Gujarati - is closely related to Devanagari and used to write +the Gujarati language of the Gujarat state in India. +
  • TQFont::Oriya - is used to write the Oriya language of Orissa state/India. +
  • TQFont::Tamil - is used to write the Tamil language of Tamil Nadu state/India, +Sri Lanka, Singapore and parts of Malaysia as well as some +minority languages. +
  • TQFont::Telugu - is used to write the Telugu language of Andhra +Pradesh state/India and some minority languages. +
  • TQFont::Kannada - is another South Indian script used to write the +Kannada language of Karnataka state/India and some minority +languages. +
  • TQFont::Malayalam - is used to write the Malayalam language of Kerala +state/India. +
  • TQFont::Sinhala - is used for Sri Lanka's majority language Sinhala +and is also employed to write Pali, Sanskrit, and Tamil. +
  • TQFont::Thai - is used to write Thai and other Southeast Asian languages. +
  • TQFont::Lao - is a language and script tquite similar to Thai. +
  • TQFont::Tibetan - is the script used to write Tibetan in several +countries like Tibet, the bordering Indian regions and +Nepal. It is also used in the Buddist philosophy and +liturgy of the Mongolian cultural area. +
  • TQFont::Myanmar - is mainly used to write the Burmese language of +Myanmar (former Burma). +
  • TQFont::Khmer - is the official language of Kampuchea. +

East Asian scripts (traditionally top-down, right to left, modern +often horizontal left to right): +

    +
  • TQFont::Han - consists of the CJK (Chinese, Japanese, Korean) +idiographic characters. +
  • TQFont::Hiragana - is a cursive syllabary used to indicate phonetics +and pronounciation of Japanese words. +
  • TQFont::Katakana - is a non-cursive syllabic script used to write +Japanese words with visual emphasis and non-Japanese words +in a phonetical manner. +
  • TQFont::Hangul - is a Korean script consisting of alphabetic components. +
  • TQFont::Bopomofo - is a phonetic alphabet for Chinese (mainly Mandarin). +
  • TQFont::Yi - (also called Cuan or Wei) is a syllabary used to write +the Yi language of Southwestern China, Myanmar, Laos, and Vietnam. +

Additional scripts that do not fit well into the script categories above: +

    +
  • TQFont::Ethiopic - is a syllabary used by several Central East African languages. +
  • TQFont::Cherokee - is a left-to-right syllabic script used to write +the Cherokee language. +
  • TQFont::CanadianAboriginal - consists of the syllabics used by some +Canadian aboriginal societies. +
  • TQFont::Mongolian - is the traditional (and recently reintroduced) +script used to write Mongolian. +

Symbols: +

    +
  • TQFont::CurrencySymbols - contains currency symbols not encoded in other scripts. +
  • TQFont::LetterlikeSymbols - consists of symbols derived from +ordinary letters of an alphabetical script. +
  • TQFont::NumberForms - are provided for compatibility with other +existing character sets. +
  • TQFont::MathematicalOperators - consists of encodings for operators, +relations and other symbols like arrows used in a mathematical context. +
  • TQFont::TechnicalSymbols - contains representations for control +codes, the space symbol, APL symbols and other symbols +mainly used in the context of electronic data processing. +
  • TQFont::GeometricSymbols - covers block elements and geometric shapes. +
  • TQFont::MiscellaneousSymbols - consists of a heterogeneous collection +of symbols that do not fit any other Unicode character +block, e.g. Dingbats. +
  • TQFont::EnclosedAndSquare - is provided for compatibility with some +East Asian standards. +
  • TQFont::Braille - is an international writing system used by blind +people. This script encodes the 256 eight-dot patterns with +the 64 six-dot patterns as a subset. +
  • TQFont::Tagalog +
  • TQFont::Hanunoo +
  • TQFont::Buhid +
  • TQFont::Tagbanwa +
  • TQFont::KatakanaHalfWidth +
  • TQFont::Limbu - (Unicode 4.0) +
  • TQFont::TaiLe - (Unicode 4.0) +
  • TQFont::Unicode - includes all the above scripts. +
+

TQFont::Stretch

+ +

Predefined stretch values that follow the CSS naming convention. +

    +
  • TQFont::UltraCondensed - 50 +
  • TQFont::ExtraCondensed - 62 +
  • TQFont::Condensed - 75 +
  • TQFont::SemiCondensed - 87 +
  • TQFont::Unstretched - 100 +
  • TQFont::SemiExpanded - 112 +
  • TQFont::Expanded - 125 +
  • TQFont::ExtraExpanded - 150 +
  • TQFont::UltraExpanded - 200 +

See also setStretch() and stretch(). + +

TQFont::StyleHint

+ +

Style hints are used by the font + matching algorithm to find an appropriate default family +if a selected font family is not available. +

    +
  • TQFont::AnyStyle - leaves the font matching algorithm to choose the +family. This is the default. +
  • TQFont::SansSerif - the font matcher prefer sans serif fonts. +
  • TQFont::Helvetica - is a synonym for SansSerif. +
  • TQFont::Serif - the font matcher prefers serif fonts. +
  • TQFont::Times - is a synonym for Serif. +
  • TQFont::TypeWriter - the font matcher prefers fixed pitch fonts. +
  • TQFont::Courier - a synonym for TypeWriter. +
  • TQFont::OldEnglish - the font matcher prefers decorative fonts. +
  • TQFont::Decorative - is a synonym for OldEnglish. +
  • TQFont::System - the font matcher prefers system fonts. +
+

TQFont::StyleStrategy

+ +

The style strategy tells the font + matching algorithm what type of fonts should be used to +find an appropriate default family. +

The following strategies are available: +

    +
  • TQFont::PreferDefault - the default style strategy. It does not prefer +any type of font. +
  • TQFont::PreferBitmap - prefers bitmap fonts (as opposed to outline +fonts). +
  • TQFont::PreferDevice - prefers device fonts. +
  • TQFont::PreferOutline - prefers outline fonts (as opposed to bitmap fonts). +
  • TQFont::ForceOutline - forces the use of outline fonts. +
  • TQFont::NoAntialias - don't antialias the fonts. +
  • TQFont::PreferAntialias - antialias if possible. +
  • TQFont::OpenGLCompatible - forces the use of OpenGL compatible +fonts. +

Any of these may be OR-ed with one of these flags: +

    +
  • TQFont::PreferMatch - prefer an exact match. The font matcher will try to +use the exact font size that has been specified. +
  • TQFont::PreferQuality - prefer the best quality font. The font matcher +will use the nearest standard point size that the font +supports. +
+

TQFont::Weight

+ +

TQt uses a weighting scale from 0 to 99 similar to, but not the +same as, the scales used in Windows or CSS. A weight of 0 is +ultralight, whilst 99 will be an extremely black. +

This enum contains the predefined font weights: +

    +
  • TQFont::Light - 25 +
  • TQFont::Normal - 50 +
  • TQFont::DemiBold - 63 +
  • TQFont::Bold - 75 +
  • TQFont::Black - 87 +
+

Member Function Documentation

+

TQFont::TQFont () +

+Constructs a font object that uses the application's default font. +

See also TQApplication::setFont() and TQApplication::font(). + +

TQFont::TQFont ( const TQString & family, int pointSize = 12, int weight = Normal, bool italic = FALSE ) +

+Constructs a font object with the specified family, pointSize, weight and italic settings. +

If pointSize is <= 0 it is set to 1. +

The family name may optionally also include a foundry name, +e.g. "Helvetica [Cronyx]". (The TQt 2.x syntax, i.e. +"Cronyx-Helvetica", is also supported.) If the family is +available from more than one foundry and the foundry isn't +specified, an arbitrary foundry is chosen. If the family isn't +available a family will be set using the font + matching algorithm. +

See also Weight, setFamily(), setPointSize(), setWeight(), setItalic(), setStyleHint(), and TQApplication::font(). + +

TQFont::TQFont ( const TQFont & font ) +

+Constructs a font that is a copy of font. + +

TQFont::~TQFont () +

+Destroys the font object and frees all allocated resources. + +

bool TQFont::bold () const +

+ +

Returns TRUE if weight() is a value greater than TQFont::Normal; otherwise returns FALSE. +

See also weight(), setBold(), and TQFontInfo::bold(). + +

Example: chart/optionsform.cpp. +

int TQFont::deciPointSize () const [protected] +

+Returns the point size in 1/10ths of a point. +

The returned value will be -1 if the font size has been specified +in pixels. +

See also pointSize() and pointSizeFloat(). + +

TQString TQFont::defaultFamily () const +

+Returns the family name that corresponds to the current style +hint. +

See also StyleHint, styleHint(), and setStyleHint(). + +

TQFont TQFont::defaultFont () [static] +

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

Please use TQApplication::font() instead. + +

bool TQFont::dirty () const [protected] +

+Returns TRUE if the font attributes have been changed and the font +has to be (re)loaded; otherwise returns FALSE. + +

bool TQFont::exactMatch () const +

+Returns TRUE if a window system font exactly matching the settings +of this font is available. +

See also TQFontInfo. + +

TQString TQFont::family () const +

+Returns the requested font family name, i.e. the name set in the +constructor or the last setFont() call. +

See also setFamily(), substitutes(), and substitute(). + +

Examples: chart/optionsform.cpp and fonts/simple-qfont-demo/viewer.cpp. +

bool TQFont::fixedPitch () const +

+Returns TRUE if fixed pitch has been set; otherwise returns FALSE. +

See also setFixedPitch() and TQFontInfo::fixedPitch(). + +

bool TQFont::fromString ( const TQString & descrip ) +

+Sets this font to match the description descrip. The description +is a comma-separated list of the font attributes, as returned by +toString(). +

See also toString() and operator>>(). + +

HFONT TQFont::handle () const +

+Returns the window system handle to the font, for low-level +access. Using this function is not portable. + +

void TQFont::insertSubstitution ( const TQString & familyName, const TQString & substituteName ) [static] +

+Inserts the family name substituteName into the substitution +table for familyName. +

See also insertSubstitutions(), removeSubstitution(), substitutions(), substitute(), and substitutes(). + +

Example: fonts/simple-qfont-demo/viewer.cpp. +

void TQFont::insertSubstitutions ( const TQString & familyName, const TQStringList & substituteNames ) [static] +

+Inserts the list of families substituteNames into the +substitution list for familyName. +

See also insertSubstitution(), removeSubstitution(), substitutions(), and substitute(). + +

Example: fonts/simple-qfont-demo/viewer.cpp. +

bool TQFont::isCopyOf ( const TQFont & f ) const +

+Returns TRUE if this font and f are copies of each other, i.e. +one of them was created as a copy of the other and neither has +been modified since. This is much stricter than equality. +

See also operator=() and operator==(). + +

bool TQFont::italic () const +

+Returns TRUE if italic has been set; otherwise returns FALSE. +

See also setItalic(). + +

Example: chart/optionsform.cpp. +

TQString TQFont::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. +

See also TQMap. + +

TQString TQFont::lastResortFamily () const +

+Returns the "last resort" font family name. +

The current implementation tries a wide variety of common fonts, +returning the first one it finds. Is is possible that no family is +found in which case a null string is returned. +

See also lastResortFont(). + +

TQString TQFont::lastResortFont () const +

+Returns a "last resort" font name for the font matching algorithm. +This is used if the last resort family is not available. It will +always return a name, if necessary returning something like +"fixed" or "system". +

The current implementation tries a wide variety of common fonts, +returning the first one it finds. The implementation may change +at any time, but this function will always return a string +containing something. +

It is theoretically possible that there really isn't a +lastResortFont() in which case TQt will abort with an error +message. We have not been able to identify a case where this +happens. Please report it as a bug if +it does, preferably with a list of the fonts you have installed. +

See also lastResortFamily() and rawName(). + +

bool TQFont::operator!= ( const TQFont & f ) const +

+Returns TRUE if this font is different from f; otherwise +returns FALSE. +

Two TQFonts are considered to be different if their font attributes +are different. If rawMode() is enabled for both fonts, only the +family fields are compared. +

See also operator==(). + +

TQFont & TQFont::operator= ( const TQFont & font ) +

+Assigns font to this font and returns a reference to it. + +

bool TQFont::operator== ( const TQFont & f ) const +

+Returns TRUE if this font is equal to f; otherwise returns +FALSE. +

Two TQFonts are considered equal if their font attributes are +equal. If rawMode() is enabled for both fonts, only the family +fields are compared. +

See also operator!=() and isCopyOf(). + +

bool TQFont::overline () const +

+Returns TRUE if overline has been set; otherwise returns FALSE. +

See also setOverline(). + +

int TQFont::pixelSize () const +

+Returns the pixel size of the font if it was set with +setPixelSize(). Returns -1 if the size was set with setPointSize() +or setPointSizeFloat(). +

See also setPixelSize(), pointSize(), TQFontInfo::pointSize(), and TQFontInfo::pixelSize(). + +

int TQFont::pointSize () const +

+Returns the point size of the font. Returns -1 if the font size +was specified in pixels. +

See also setPointSize(), deciPointSize(), and pointSizeFloat(). + +

Examples: chart/optionsform.cpp and fonts/simple-qfont-demo/viewer.cpp. +

float TQFont::pointSizeFloat () const +

+Returns the point size of the font. Returns -1 if the font size was +specified in pixels. +

See also pointSize(), setPointSizeFloat(), pixelSize(), TQFontInfo::pointSize(), and TQFontInfo::pixelSize(). + +

void TQFont::qwsRenderToDisk ( bool all = TRUE ) +

+Saves the glyphs in the font that have previously been accessed as +a TQPF file. If all is TRUE (the default), then before saving, +all glyphs are marked as used. +

If the font is large and you are sure that only a subset of +characters will ever be retquired on the target device, passing +FALSE for the all parameter can save a significant amount of +disk space. +

Note that this function is only applicable on TQt/Embedded. + +

bool TQFont::rawMode () const +

+Returns TRUE if raw mode is used for font name matching; otherwise +returns FALSE. +

See also setRawMode() and rawName(). + +

TQString TQFont::rawName () const +

+Returns the name of the font within the underlying window system. +

On Windows, this is usually just the family name of a TrueType +font. +

On X11, it is an XLFD (X Logical Font Description). When TQt is +build with Xft support on X11, the return value can be an Xft +pattern or an XLFD. +

Using the return value of this function is usually not portable. +

See also setRawName(). + +

void TQFont::removeSubstitution ( const TQString & familyName ) [static] +

+Removes all the substitutions for familyName. +

See also insertSubstitutions(), insertSubstitution(), substitutions(), and substitute(). + +

TQFont TQFont::resolve ( const TQFont & other ) const +

+Returns a new TQFont that has attributes copied from other. + +

void TQFont::setBold ( bool enable ) +

+ +

If enable is true sets the font's weight to TQFont::Bold; otherwise sets the weight to TQFont::Normal. +

For finer boldness control use setWeight(). +

See also bold() and setWeight(). + +

Examples: menu/menu.cpp and themes/metal.cpp. +

void TQFont::setDefaultFont ( const TQFont & f ) [static] +

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

Please use TQApplication::setFont() instead. + +

void TQFont::setFamily ( const TQString & family ) +

+Sets the family name of the font. The name is case insensitive and +may include a foundry name. +

The family name may optionally also include a foundry name, +e.g. "Helvetica [Cronyx]". (The TQt 2.x syntax, i.e. +"Cronyx-Helvetica", is also supported.) If the family is +available from more than one foundry and the foundry isn't +specified, an arbitrary foundry is chosen. If the family isn't +available a family will be set using the font + matching algorithm. +

See also family(), setStyleHint(), and TQFontInfo. + +

void TQFont::setFixedPitch ( bool enable ) +

+If enable is TRUE, sets fixed pitch on; otherwise sets fixed +pitch off. +

See also fixedPitch() and TQFontInfo. + +

void TQFont::setItalic ( bool enable ) +

+If enable is TRUE, italic is set on; otherwise italic is set +off. +

See also italic() and TQFontInfo. + +

Examples: fileiconview/qfileiconview.cpp, fonts/simple-qfont-demo/viewer.cpp, and themes/metal.cpp. +

void TQFont::setOverline ( bool enable ) +

+If enable is TRUE, sets overline on; otherwise sets overline off. +

See also overline() and TQFontInfo. + +

void TQFont::setPixelSize ( int pixelSize ) +

+Sets the font size to pixelSize pixels. +

Using this function makes the font device dependent. Use +setPointSize() or setPointSizeFloat() to set the size of the font +in a device independent manner. +

See also pixelSize(). + +

Example: qwerty/qwerty.cpp. +

void TQFont::setPixelSizeFloat ( float pixelSize ) +

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

Sets the logical pixel height of font characters when shown on +the screen to pixelSize. + +

void TQFont::setPointSize ( int pointSize ) +

+Sets the point size to pointSize. The point size must be +greater than zero. +

See also pointSize() and setPointSizeFloat(). + +

Example: fonts/simple-qfont-demo/viewer.cpp. +

void TQFont::setPointSizeFloat ( float pointSize ) +

+Sets the point size to pointSize. The point size must be +greater than zero. The requested precision may not be achieved on +all platforms. +

See also pointSizeFloat(), setPointSize(), and setPixelSize(). + +

void TQFont::setRawMode ( bool enable ) +

+If enable is TRUE, turns raw mode on; otherwise turns raw mode +off. This function only has an effect under X11. +

If raw mode is enabled, TQt will search for an X font with a +complete font name matching the family name, ignoring all other +values set for the TQFont. If the font name matches several fonts, +TQt will use the first font returned by X. TQFontInfo cannot be +used to fetch information about a TQFont using raw mode (it will +return the values set in the TQFont for all parameters, including +the family name). +

Warning: Do not use raw mode unless you really, really need it! In +most (if not all) cases, setRawName() is a much better choice. +

See also rawMode() and setRawName(). + +

void TQFont::setRawName ( const TQString & name ) +

+Sets a font by its system specific name. The function is +particularly useful under X, where system font settings (for +example X resources) are usually available in XLFD (X Logical Font +Description) form only. You can pass an XLFD as name to this +function. +

A font set with setRawName() is still a full-featured TQFont. It can +be queried (for example with italic()) or modified (for example with +setItalic()) and is therefore also suitable for rendering rich text. +

If TQt's internal font database cannot resolve the raw name, the +font becomes a raw font with name as its family. +

Note that the present implementation does not handle wildcards in +XLFDs well, and that font aliases (file fonts.alias in the font +directory on X11) are not supported. +

See also rawName(), setRawMode(), and setFamily(). + +

void TQFont::setStretch ( int factor ) +

+Sets the stretch factor for the font. +

The stretch factor changes the width of all characters in the font +by factor percent. For example, setting factor to 150 +results in all characters in the font being 1.5 times ( ie. 150% ) +wider. The default stretch factor is 100. The minimum stretch +factor is 1, and the maximum stretch factor is 4000. +

The stretch factor is only applied to outline fonts. The stretch +factor is ignored for bitmap fonts. +

NOTE: TQFont cannot stretch XLFD fonts. When loading XLFD fonts on +X11, the stretch factor is matched against a predefined set of +values for the SETWIDTH_NAME field of the XLFD. +

See also stretch() and TQFont::StyleStrategy. + +

void TQFont::setStrikeOut ( bool enable ) +

+If enable is TRUE, sets strikeout on; otherwise sets strikeout +off. +

See also strikeOut() and TQFontInfo. + +

void TQFont::setStyleHint ( StyleHint hint, StyleStrategy strategy = PreferDefault ) +

+Sets the style hint and strategy to hint and strategy, +respectively. +

If these aren't set explicitly the style hint will default to +AnyStyle and the style strategy to PreferDefault. +

TQt does not support style hints on X11 since this information +is not provided by the window system. +

See also StyleHint, styleHint(), StyleStrategy, styleStrategy(), and TQFontInfo. + +

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

void TQFont::setStyleStrategy ( StyleStrategy s ) +

+Sets the style strategy for the font to s. +

See also TQFont::StyleStrategy. + +

void TQFont::setUnderline ( bool enable ) +

+If enable is TRUE, sets underline on; otherwise sets underline +off. +

See also underline() and TQFontInfo. + +

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

void TQFont::setWeight ( int weight ) +

+Sets the weight the font to weight, which should be a value +from the TQFont::Weight enumeration. +

See also weight() and TQFontInfo. + +

Example: fonts/simple-qfont-demo/viewer.cpp. +

int TQFont::stretch () const +

+Returns the stretch factor for the font. +

See also setStretch(). + +

bool TQFont::strikeOut () const +

+Returns TRUE if strikeout has been set; otherwise returns FALSE. +

See also setStrikeOut(). + +

StyleHint TQFont::styleHint () const +

+Returns the StyleHint. +

The style hint affects the font + matching algorithm. See TQFont::StyleHint for the list +of strategies. +

See also setStyleHint(), TQFont::StyleStrategy, and TQFontInfo::styleHint(). + +

StyleStrategy TQFont::styleStrategy () const +

+Returns the StyleStrategy. +

The style strategy affects the font + matching algorithm. See TQFont::StyleStrategy for the +list of strategies. +

See also setStyleHint() and TQFont::StyleHint. + +

TQString TQFont::substitute ( const TQString & familyName ) [static] +

+Returns the first family name to be used whenever familyName is +specified. The lookup is case insensitive. +

If there is no substitution for familyName, familyName is +returned. +

To obtain a list of substitutions use substitutes(). +

See also setFamily(), insertSubstitutions(), insertSubstitution(), and removeSubstitution(). + +

TQStringList TQFont::substitutes ( const TQString & familyName ) [static] +

+Returns a list of family names to be used whenever familyName +is specified. The lookup is case insensitive. +

If there is no substitution for familyName, an empty list is +returned. +

See also substitute(), insertSubstitutions(), insertSubstitution(), and removeSubstitution(). + +

Example: fonts/simple-qfont-demo/viewer.cpp. +

TQStringList TQFont::substitutions () [static] +

+Returns a sorted list of substituted family names. +

See also insertSubstitution(), removeSubstitution(), and substitute(). + +

TQString TQFont::toString () const +

+Returns a description of the font. The description is a +comma-separated list of the attributes, perfectly suited for use +in TQSettings. +

See also fromString() and operator<<(). + +

bool TQFont::underline () const +

+Returns TRUE if underline has been set; otherwise returns FALSE. +

See also setUnderline(). + +

int TQFont::weight () const +

+Returns the weight of the font which is one of the enumerated +values from TQFont::Weight. +

See also setWeight(), Weight, and TQFontInfo. + +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQFont & font ) +

+ +

Writes the font font to the data stream s. (toString() +writes to a text stream.) +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQFont & font ) +

+ +

Reads the font font from the data stream s. (fromString() +reads from a text stream.) +

See also Format of the TQDataStream operators. + + +


+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/qfontdatabase-h.html b/doc/html/qfontdatabase-h.html new file mode 100644 index 00000000..a0e67731 --- /dev/null +++ b/doc/html/qfontdatabase-h.html @@ -0,0 +1,272 @@ + + + + + +qfontdatabase.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qfontdatabase.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qfontdatabase.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of the TQFontDatabase class
+**
+** Created : 981126
+**
+** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQFONTDATABASE_H
+#define TQFONTDATABASE_H
+
+#ifndef QT_H
+#include "qwindowdefs.h"
+#include "qstring.h"
+#include "qstringlist.h"
+#include "qfont.h"
+#include "qvaluelist.h"
+#endif // QT_H
+
+
+#ifndef QT_NO_FONTDATABASE
+
+class TQFontStylePrivate; /* Don't touch! */
+struct TQtFontStyle;
+struct TQtFontFamily;
+struct TQtFontFoundry;
+struct TQFontDef;
+class TQFontEngine;
+#ifdef Q_WS_QWS
+class TQDiskFont;
+#endif
+
+class TQFontDatabasePrivate;
+
+class Q_EXPORT TQFontDatabase
+{
+public:
+    static TQValueList<int> standardSizes();
+
+    TQFontDatabase();
+
+    TQStringList families() const;
+    TQStringList families( TQFont::Script ) const;
+    TQStringList styles( const TQString & ) const;
+    TQValueList<int> pointSizes( const TQString &, const TQString & = TQString::null);
+    TQValueList<int> smoothSizes( const TQString &, const TQString &);
+    TQString styleString( const TQFont &);
+
+    TQFont font( const TQString &, const TQString &, int);
+
+    bool isBitmapScalable( const TQString &, const TQString & = TQString::null) const;
+    bool isSmoothlyScalable( const TQString &, const TQString & = TQString::null) const;
+    bool isScalable( const TQString &, const TQString & = TQString::null) const;
+    bool isFixedPitch( const TQString &, const TQString & = TQString::null) const;
+
+    bool italic( const TQString &, const TQString &) const;
+    bool bold( const TQString &, const TQString &) const;
+    int weight( const TQString &, const TQString &) const;
+
+    static TQString scriptName(TQFont::Script);
+    static TQString scriptSample(TQFont::Script);
+
+#ifdef Q_WS_QWS
+    static void qwsAddDiskFont( TQDiskFont *qdf );
+#endif
+
+    // For source compatibility with < 3.0
+#ifndef QT_NO_COMPAT
+
+    TQStringList families(bool) const;
+    TQStringList styles( const TQString &, const TQString & ) const;
+    TQValueList<int> pointSizes( const TQString &, const TQString &, const TQString & );
+    TQValueList<int> smoothSizes( const TQString &, const TQString &, const TQString & );
+
+    TQFont font( const TQString &, const TQString &, int, const TQString &);
+
+    bool isBitmapScalable( const TQString &, const TQString &, const TQString & ) const;
+    bool isSmoothlyScalable( const TQString &, const TQString &, const TQString & ) const;
+    bool isScalable( const TQString &, const TQString &, const TQString & ) const;
+    bool isFixedPitch( const TQString &, const TQString &, const TQString & ) const;
+
+    bool italic( const TQString &, const TQString &, const TQString & ) const;
+    bool bold( const TQString &, const TQString &, const TQString & ) const;
+    int weight( const TQString &, const TQString &, const TQString & ) const;
+
+#endif // QT_NO_COMPAT
+
+private:
+#if defined(Q_WS_X11) || defined(Q_WS_WIN)
+    static TQFontEngine *findFont( TQFont::Script script, const TQFontPrivate *fp,
+				  const TQFontDef &request, int force_encoding_id = -1 );
+#endif // Q_WS_X11
+
+    static void createDatabase();
+
+    static void parseFontName(const TQString &name, TQString &foundry, TQString &family);
+
+    friend struct TQFontDef;
+    friend class TQFontPrivate;
+    friend class TQFontDialog;
+    friend class TQFontEngineLatinXLFD;
+
+    TQFontDatabasePrivate *d;
+};
+
+
+#ifndef QT_NO_COMPAT
+
+inline TQStringList TQFontDatabase::families( bool ) const
+{
+    return families();
+}
+
+inline TQStringList TQFontDatabase::styles( const TQString &family,
+					  const TQString & ) const
+{
+    return styles(family);
+}
+
+inline TQValueList<int> TQFontDatabase::pointSizes( const TQString &family,
+						  const TQString &style ,
+						  const TQString & )
+{
+    return pointSizes(family, style);
+}
+
+inline TQValueList<int> TQFontDatabase::smoothSizes( const TQString &family,
+						   const TQString &style,
+						   const TQString & )
+{
+    return smoothSizes(family, style);
+}
+
+inline TQFont TQFontDatabase::font( const TQString &familyName,
+				  const TQString &style,
+				  int pointSize,
+				  const TQString &)
+{
+    return font(familyName, style, pointSize);
+}
+
+inline bool TQFontDatabase::isBitmapScalable( const TQString &family,
+					     const TQString &style,
+					     const TQString & ) const
+{
+    return isBitmapScalable(family, style);
+}
+
+inline bool TQFontDatabase::isSmoothlyScalable( const TQString &family,
+					       const TQString &style,
+					       const TQString & ) const
+{
+    return isSmoothlyScalable(family, style);
+}
+
+inline bool TQFontDatabase::isScalable( const TQString &family,
+				       const TQString &style,
+				       const TQString & ) const
+{
+    return isScalable(family, style);
+}
+
+inline bool TQFontDatabase::isFixedPitch( const TQString &family,
+					 const TQString &style,
+					 const TQString & ) const
+{
+    return isFixedPitch(family, style);
+}
+
+inline bool TQFontDatabase::italic( const TQString &family,
+				   const TQString &style,
+				   const TQString & ) const
+{
+    return italic(family, style);
+}
+
+inline bool TQFontDatabase::bold( const TQString &family,
+				 const TQString &style,
+				 const TQString & ) const
+{
+    return bold(family, style);
+}
+
+inline int TQFontDatabase::weight( const TQString &family,
+				  const TQString &style,
+				  const TQString & ) const
+{
+    return weight(family, style);
+}
+
+#endif // QT_NO_COMPAT
+
+#endif // QT_NO_FONTDATABASE
+
+#endif // TQFONTDATABASE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfontdatabase-members.html b/doc/html/qfontdatabase-members.html new file mode 100644 index 00000000..c103570e --- /dev/null +++ b/doc/html/qfontdatabase-members.html @@ -0,0 +1,63 @@ + + + + + +TQFontDatabase Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFontDatabase

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfontdatabase.html b/doc/html/qfontdatabase.html new file mode 100644 index 00000000..5ef80be1 --- /dev/null +++ b/doc/html/qfontdatabase.html @@ -0,0 +1,322 @@ + + + + + +TQFontDatabase Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFontDatabase Class Reference

+ +

The TQFontDatabase class provides information about the fonts available in the underlying window system. +More... +

#include <qfontdatabase.h> +

List of all member functions. +

Public Members

+
    +
  • TQFontDatabase ()
  • +
  • TQStringList families () const
  • +
  • TQStringList families ( TQFont::Script script ) const
  • +
  • TQStringList styles ( const TQString & family ) const
  • +
  • TQValueList<int> pointSizes ( const TQString & family, const TQString & style = TQString::null )
  • +
  • TQValueList<int> smoothSizes ( const TQString & family, const TQString & style )
  • +
  • TQString styleString ( const TQFont & f )
  • +
  • TQFont font ( const TQString & family, const TQString & style, int pointSize )
  • +
  • bool isBitmapScalable ( const TQString & family, const TQString & style = TQString::null ) const
  • +
  • bool isSmoothlyScalable ( const TQString & family, const TQString & style = TQString::null ) const
  • +
  • bool isScalable ( const TQString & family, const TQString & style = TQString::null ) const
  • +
  • bool isFixedPitch ( const TQString & family, const TQString & style = TQString::null ) const
  • +
  • bool italic ( const TQString & family, const TQString & style ) const
  • +
  • bool bold ( const TQString & family, const TQString & style ) const
  • +
  • int weight ( const TQString & family, const TQString & style ) const
  • +
  • TQStringList families ( bool ) const  (obsolete)
  • +
  • TQStringList styles ( const TQString & family, const TQString & ) const  (obsolete)
  • +
  • TQValueList<int> pointSizes ( const TQString & family, const TQString & style, const TQString & )  (obsolete)
  • +
  • TQValueList<int> smoothSizes ( const TQString & family, const TQString & style, const TQString & )  (obsolete)
  • +
  • TQFont font ( const TQString & familyName, const TQString & style, int pointSize, const TQString & )  (obsolete)
  • +
  • bool isBitmapScalable ( const TQString & family, const TQString & style, const TQString & ) const  (obsolete)
  • +
  • bool isSmoothlyScalable ( const TQString & family, const TQString & style, const TQString & ) const  (obsolete)
  • +
  • bool isScalable ( const TQString & family, const TQString & style, const TQString & ) const  (obsolete)
  • +
  • bool isFixedPitch ( const TQString & family, const TQString & style, const TQString & ) const  (obsolete)
  • +
  • bool italic ( const TQString & family, const TQString & style, const TQString & ) const  (obsolete)
  • +
  • bool bold ( const TQString & family, const TQString & style, const TQString & ) const  (obsolete)
  • +
  • int weight ( const TQString & family, const TQString & style, const TQString & ) const  (obsolete)
  • +
+

Static Public Members

+ +

Detailed Description

+ + +The TQFontDatabase class provides information about the fonts available in the underlying window system. +

+ +

The most common uses of this class are to query the database for +the list of font families() and for the pointSizes() and styles() +that are available for each family. An alternative to pointSizes() +is smoothSizes() which returns the sizes at which a given family +and style will look attractive. +

If the font family is available from two or more foundries the +foundry name is included in the family name, e.g. "Helvetica +[Adobe]" and "Helvetica [Cronyx]". When you specify a family you +can either use the old hyphenated TQt 2.x "foundry-family" format, +e.g. "Cronyx-Helvetica", or the new bracketed TQt 3.x "family +[foundry]" format e.g. "Helvetica [Cronyx]". If the family has a +foundry it is always returned, e.g. by families(), using the +bracketed format. +

The font() function returns a TQFont given a family, style and +point size. +

A family and style combination can be checked to see if it is +italic() or bold(), and to retrieve its weight(). Similarly we can +call isBitmapScalable(), isSmoothlyScalable(), isScalable() and +isFixedPitch(). +

A text version of a style is given by styleString(). +

The TQFontDatabase class also supports some static functions, for +example, standardSizes(). You can retrieve the Unicode 3.0 +description of a script using +scriptName(), and a sample of characters in a script with +scriptSample(). +

Example: +

+#include <qapplication.h>
+#include <qfontdatabase.h>
+#include <else.h>
+
+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 ) {
+        TQString family = *f;
+        qDebug( family );
+        TQStringList styles = fdb.styles( family );
+        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 ) {
+                dstyle += TQString::number( *points ) + " ";
+            }
+            dstyle = dstyle.left( dstyle.length() - 1 ) + ")";
+            qDebug( dstyle );
+        }
+    }
+    return 0;
+}
+
+ +This example gets the list of font families, then the list of +styles for each family and the point sizes that are available for +each family/style combination. +

See also Environment Classes and Graphics Classes. + +


Member Function Documentation

+

TQFontDatabase::TQFontDatabase () +

+Creates a font database object. + +

bool TQFontDatabase::bold ( const TQString & family, const TQString & style ) const +

+Returns TRUE if the font that has family family and style style is bold; otherwise returns FALSE. +

See also italic() and weight(). + +

bool TQFontDatabase::bold ( const TQString & family, const TQString & style, const TQString & ) const +

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

+ +

TQStringList TQFontDatabase::families () const +

Returns a sorted list of the names of the available font families. +

If a family exists in several foundries, the returned name for +that font is in the form "family [foundry]". Examples: "Times +[Adobe]", "Times [Cronyx]", "Palatino". + +

TQStringList TQFontDatabase::families ( TQFont::Script script ) const +

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

Returns a sorted list of the available font families which support +the Unicode script script. +

If a family exists in several foundries, the returned name for +that font is in the form "family [foundry]". Examples: "Times +[Adobe]", "Times [Cronyx]", "Palatino". + +

TQStringList TQFontDatabase::families ( bool ) const +

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

+ +

TQFont TQFontDatabase::font ( const TQString & family, const TQString & style, int pointSize ) +

+Returns a TQFont object that has family family, style style +and point size pointSize. If no matching font could be created, +a TQFont object that uses the application's default font is +returned. + +

TQFont TQFontDatabase::font ( const TQString & familyName, const TQString & style, int pointSize, const TQString & ) +

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

+ +

bool TQFontDatabase::isBitmapScalable ( const TQString & family, const TQString & style = TQString::null ) const +

+Returns TRUE if the font that has family family and style style is a scalable bitmap font; otherwise returns FALSE. Scaling +a bitmap font usually produces an unattractive hardly readable +result, because the pixels of the font are scaled. If you need to +scale a bitmap font it is better to scale it to one of the fixed +sizes returned by smoothSizes(). +

See also isScalable() and isSmoothlyScalable(). + +

bool TQFontDatabase::isBitmapScalable ( const TQString & family, const TQString & style, const TQString & ) const +

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

+ +

bool TQFontDatabase::isFixedPitch ( const TQString & family, const TQString & style = TQString::null ) const +

+Returns TRUE if the font that has family family and style style is fixed pitch; otherwise returns FALSE. + +

bool TQFontDatabase::isFixedPitch ( const TQString & family, const TQString & style, const TQString & ) const +

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

+ +

bool TQFontDatabase::isScalable ( const TQString & family, const TQString & style = TQString::null ) const +

+Returns TRUE if the font that has family family and style style is scalable; otherwise returns FALSE. +

See also isBitmapScalable() and isSmoothlyScalable(). + +

bool TQFontDatabase::isScalable ( const TQString & family, const TQString & style, const TQString & ) const +

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

+ +

bool TQFontDatabase::isSmoothlyScalable ( const TQString & family, const TQString & style = TQString::null ) const +

+Returns TRUE if the font that has family family and style style is smoothly scalable; otherwise returns FALSE. If this +function returns TRUE, it's safe to scale this font to any size, +and the result will always look attractive. +

See also isScalable() and isBitmapScalable(). + +

bool TQFontDatabase::isSmoothlyScalable ( const TQString & family, const TQString & style, const TQString & ) const +

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

+ +

bool TQFontDatabase::italic ( const TQString & family, const TQString & style ) const +

+Returns TRUE if the font that has family family and style style is italic; otherwise returns FALSE. +

See also weight() and bold(). + +

bool TQFontDatabase::italic ( const TQString & family, const TQString & style, const TQString & ) const +

+This 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 ) +

+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 & ) +

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

+ +

TQString TQFontDatabase::scriptName ( TQFont::Script script ) [static] +

+Returns a string that gives a default description of the script +(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. +

See also TQFont::Script. + +

TQString TQFontDatabase::scriptSample ( TQFont::Script script ) [static] +

+Returns a string with sample characters from script. +

See also TQFont::Script. + +

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. +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 & ) +

+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] +

+Returns a list of standard font sizes. +

See also smoothSizes() and pointSizes(). + +

TQString TQFontDatabase::styleString ( const TQFont & f ) +

+Returns a string that describes the style of the font f. For +example, "Bold Italic", "Bold", "Italic" or "Normal". An empty +string may be returned. + +

TQStringList TQFontDatabase::styles ( const TQString & family ) const +

+Returns a list of the styles available for the font family family. Some example styles: "Light", "Light Italic", "Bold", +"Oblique", "Demi". The list may be empty. + +

TQStringList TQFontDatabase::styles ( const TQString & family, const TQString & ) const +

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

+ +

int TQFontDatabase::weight ( const TQString & family, const TQString & style ) const +

+Returns the weight of the font that has family family and style +style. If there is no such family and style combination, +returns -1. +

See also italic() and bold(). + +

int TQFontDatabase::weight ( const TQString & family, const TQString & style, const TQString & ) const +

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

+ + +


+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/qfontdialog-h.html b/doc/html/qfontdialog-h.html new file mode 100644 index 00000000..bdc2c340 --- /dev/null +++ b/doc/html/qfontdialog-h.html @@ -0,0 +1,157 @@ + + + + + +qfontdialog.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qfontdialog.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qfontdialog.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQFontDialog
+**
+** Created : 970605
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the dialogs 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 retquirements 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 TQFONTDIALOG_H
+#define TQFONTDIALOG_H
+
+#include "qwindowdefs.h"
+
+#ifndef QT_NO_FONTDIALOG
+
+//
+//  W A R N I N G
+//  -------------
+//
+//  This class is under development and has private constructors.
+//
+//  You may use the public static getFont() functions which are guaranteed
+//  to be available in the future.
+//
+
+#ifndef QT_H
+#include "qdialog.h"
+#include "qfont.h"
+#endif // QT_H
+
+class TQFontDialogPrivate;
+
+class Q_EXPORT TQFontDialog: public TQDialog
+{
+    Q_OBJECT
+
+public:
+    static TQFont getFont( bool *ok, const TQFont &def,
+			  TQWidget* parent=0, const char* name=0);
+    static TQFont getFont( bool *ok, TQWidget* parent=0, const char* name=0);
+
+private:
+    static TQFont getFont( bool *ok, const TQFont *def,
+			  TQWidget* parent=0, const char* name=0);
+
+    TQFontDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+		 WFlags f=0 );
+    ~TQFontDialog();
+
+    TQFont font() const;
+    void setFont( const TQFont &font );
+
+    bool eventFilter( TQObject *, TQEvent * );
+
+    void updateFamilies();
+    void updateStyles();
+    void updateSizes();
+
+private slots:
+    void sizeChanged( const TQString &);
+    void familyHighlighted( int );
+    void scriptHighlighted( int );
+    void styleHighlighted( int );
+    void sizeHighlighted( const TQString & );
+    void updateSample();
+
+private:
+    friend class TQFontDialogPrivate;
+    TQFontDialogPrivate * d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQFontDialog( const TQFontDialog & );
+    TQFontDialog& operator=( const TQFontDialog & );
+#endif
+};
+
+#endif
+
+#endif // TQFONTDIALOG_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfontdialog-members.html b/doc/html/qfontdialog-members.html new file mode 100644 index 00000000..a54dbb57 --- /dev/null +++ b/doc/html/qfontdialog-members.html @@ -0,0 +1,351 @@ + + + + + +TQFontDialog Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFontDialog

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfontdialog.html b/doc/html/qfontdialog.html new file mode 100644 index 00000000..990e6b5f --- /dev/null +++ b/doc/html/qfontdialog.html @@ -0,0 +1,143 @@ + + + + + +TQFontDialog Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFontDialog Class Reference

+ +

The TQFontDialog class provides a dialog widget for selecting a font. +More... +

#include <qfontdialog.h> +

Inherits TQDialog. +

List of all member functions. +

Static Public Members

+
    +
  • TQFont getFont ( bool * ok, const TQFont & initial, TQWidget * parent = 0, const char * name = 0 )
  • +
  • TQFont getFont ( bool * ok, TQWidget * parent = 0, const char * name = 0 )
  • +
+

Detailed Description

+ + + + +The TQFontDialog class provides a dialog widget for selecting a font. +

The usual way to use this class is to call one of the static convenience +functions, e.g. getFont(). +

Examples: +

+    bool ok;
+    TQFont font = TQFontDialog::getFont(
+                    &ok, TQFont( "Helvetica [Cronyx]", 10 ), this );
+    if ( ok ) {
+        // font is set to the font the user selected
+    } else {
+        // the user canceled the dialog; font is set to the initial
+        // value, in this case Helvetica [Cronyx], 10
+    }
+  
+ +

The dialog can also be used to set a widget's font directly: +

+    myWidget.setFont( TQFontDialog::getFont( 0, myWidget.font() ) );
+  
+ +If the user clicks OK the font they chose will be used for myWidget, +and if they click Cancel the original font is used. +

See also TQFont, TQFontInfo, TQFontMetrics, and Dialog Classes. + +

+ +


Member Function Documentation

+

TQFont TQFontDialog::getFont ( bool * ok, const TQFont & initial, TQWidget * parent = 0, const char * name = 0 ) [static] +

+Executes a modal font dialog and returns a font. +

If the user clicks OK, the selected font is returned. If the user +clicks Cancel, the initial font is returned. +

The dialog is called name, with the parent parent. +initial is the initially selected font. +If the ok parameter is not-null, *ok is set to TRUE if the +user clicked OK, and set to FALSE if the user clicked Cancel. +

This static function is less flexible than the full TQFontDialog +object, but is convenient and easy to use. +

Examples: +

+    bool ok;
+    TQFont font = TQFontDialog::getFont( &ok, TQFont( "Times", 12 ), this );
+    if ( ok ) {
+        // font is set to the font the user selected
+    } else {
+        // the user canceled the dialog; font is set to the initial
+        // value, in this case Times, 12.
+    }
+  
+ +

The dialog can also be used to set a widget's font directly: +

+    myWidget.setFont( TQFontDialog::getFont( 0, myWidget.font() ) );
+  
+ +In this example, if the user clicks OK the font they chose will be +used, and if they click Cancel the original font is used. + +

Examples: chart/chartform.cpp, chart/optionsform.cpp, qfd/fontdisplayer.cpp, qwerty/qwerty.cpp, and xform/xform.cpp. +

TQFont TQFontDialog::getFont ( bool * ok, TQWidget * parent = 0, const char * name = 0 ) [static] +

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

Executes a modal font dialog and returns a font. +

If the user clicks OK, the selected font is returned. If the user +clicks Cancel, the TQt default font is returned. +

The dialog is called name, with parent parent. +If the ok parameter is not-null, *ok is set to TRUE if the +user clicked OK, and FALSE if the user clicked Cancel. +

This static function is less functional than the full TQFontDialog +object, but is convenient and easy to use. +

Example: +

+    bool ok;
+    TQFont font = TQFontDialog::getFont( &ok, this );
+    if ( ok ) {
+        // font is set to the font the user selected
+    } else {
+        // the user canceled the dialog; font is set to the default
+        // application font, TQApplication::font()
+    }
+  
+ +

+ +


+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/qfontdlg-w.png b/doc/html/qfontdlg-w.png new file mode 100644 index 00000000..7e7c1bdc Binary files /dev/null and b/doc/html/qfontdlg-w.png differ diff --git a/doc/html/qfontinfo-h.html b/doc/html/qfontinfo-h.html new file mode 100644 index 00000000..4489ea9e --- /dev/null +++ b/doc/html/qfontinfo-h.html @@ -0,0 +1,136 @@ + + + + + +qfontinfo.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qfontinfo.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qfontinfo.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQFontInfo class
+**
+** Created : 950131
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQFONTINFO_H
+#define TQFONTINFO_H
+
+#ifndef QT_H
+#include "qfont.h"
+#endif // QT_H
+
+
+class Q_EXPORT TQFontInfo
+{
+public:
+    TQFontInfo( const TQFont & );
+    TQFontInfo( const TQFont &, TQFont::Script );
+    TQFontInfo( const TQFontInfo & );
+    ~TQFontInfo();
+
+    TQFontInfo	       &operator=( const TQFontInfo & );
+
+    TQString   	        family()	const;
+    int			pixelSize()	const;
+    int			pointSize()	const;
+    bool		italic()	const;
+    int			weight()	const;
+    bool		bold()		const;
+    bool		underline()	const;
+    bool                overline()      const;
+    bool		strikeOut()	const;
+    bool		fixedPitch()	const;
+    TQFont::StyleHint	styleHint()	const;
+    bool		rawMode()	const;
+
+    bool		exactMatch()	const;
+
+
+private:
+    TQFontInfo( const TQPainter * );
+
+    TQFontPrivate *d;
+    TQPainter *painter;
+    int fscript;
+
+    friend class TQWidget;
+    friend class TQPainter;
+};
+
+
+inline bool TQFontInfo::bold() const
+{ return weight() > TQFont::Normal; }
+
+
+#endif // TQFONTINFO_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfontinfo-members.html b/doc/html/qfontinfo-members.html new file mode 100644 index 00000000..a59bb139 --- /dev/null +++ b/doc/html/qfontinfo-members.html @@ -0,0 +1,59 @@ + + + + + +TQFontInfo Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFontInfo

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfontinfo.html b/doc/html/qfontinfo.html new file mode 100644 index 00000000..7fecd439 --- /dev/null +++ b/doc/html/qfontinfo.html @@ -0,0 +1,191 @@ + + + + + +TQFontInfo Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFontInfo Class Reference

+ +

The TQFontInfo class provides general information about fonts. +More... +

#include <qfontinfo.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +

The TQFontInfo class provides general information about fonts. +

+ +

The TQFontInfo class provides the same access functions as TQFont, +e.g. family(), pointSize(), italic(), weight(), fixedPitch(), +styleHint() etc. But whilst the TQFont access functions return the +values that were set, a TQFontInfo object returns the values that +apply to the font that will actually be used to draw the text. +

For example, when the program asks for a 25pt Courier font on a +machine that has a non-scalable 24pt Courier font, TQFont will +(normally) use the 24pt Courier for rendering. In this case, +TQFont::pointSize() returns 25 and TQFontInfo::pointSize() returns +24. +

There are three ways to create a TQFontInfo object. +

    +
  1. Calling the TQFontInfo constructor with a TQFont creates a font +info object for a screen-compatible font, i.e. the font cannot be +a printer font*. If the font is changed later, the font +info object is not updated. +

  2. TQWidget::fontInfo() returns the font info for a widget's font. +This is equivalent to calling TQFontInfo(widget->font()). If the +widget's font is changed later, the font info object is not +updated. +

  3. TQPainter::fontInfo() returns the font info for a painter's +current font. If the painter's font is changed later, the font +info object is not updated. +
+

* If you use a printer font the values returned may be +inaccurate. Printer fonts are not always accessible so the nearest +screen font is used if a printer font is supplied. +

See also TQFont, TQFontMetrics, TQFontDatabase, Graphics Classes, and Implicitly and Explicitly Shared Classes. + +


Member Function Documentation

+

TQFontInfo::TQFontInfo ( const TQFont & font ) +

+Constructs a font info object for font. +

The font must be screen-compatible, i.e. a font you use when +drawing text in widgets or pixmaps, not TQPicture or TQPrinter. +

The font info object holds the information for the font that is +passed in the constructor at the time it is created, and is not +updated if the font's attributes are changed later. +

Use TQPainter::fontInfo() to get the font info when painting. +This will give correct results also when painting on paint device +that is not screen-compatible. + +

TQFontInfo::TQFontInfo ( const TQFont & font, TQFont::Script script ) +

+Constructs a font info object for font using the specified script. + +

TQFontInfo::TQFontInfo ( const TQFontInfo & fi ) +

+Constructs a copy of fi. + +

TQFontInfo::~TQFontInfo () +

+Destroys the font info object. + +

bool TQFontInfo::bold () const +

+ +

Returns TRUE if weight() would return a value greater than TQFont::Normal; otherwise returns FALSE. +

See also weight() and TQFont::bold(). + +

Example: qfd/fontdisplayer.cpp. +

bool TQFontInfo::exactMatch () const +

+Returns TRUE if the matched window system font is exactly the same +as the one specified by the font; otherwise returns FALSE. +

See also TQFont::exactMatch(). + +

TQString TQFontInfo::family () const +

+Returns the family name of the matched window system font. +

See also TQFont::family(). + +

Examples: fonts/simple-qfont-demo/viewer.cpp and qfd/fontdisplayer.cpp. +

bool TQFontInfo::fixedPitch () const +

+Returns the fixed pitch value of the matched window system font. +

See also TQFont::fixedPitch(). + +

bool TQFontInfo::italic () const +

+Returns the italic value of the matched window system font. +

See also TQFont::italic(). + +

Example: qfd/fontdisplayer.cpp. +

TQFontInfo & TQFontInfo::operator= ( const TQFontInfo & fi ) +

+Assigns the font info in fi. + +

int TQFontInfo::pixelSize () const +

+Returns the pixel size of the matched window system font. +

See also TQFont::pointSize(). + +

int TQFontInfo::pointSize () const +

+Returns the point size of the matched window system font. +

See also TQFont::pointSize(). + +

Examples: fonts/simple-qfont-demo/viewer.cpp and qfd/fontdisplayer.cpp. +

bool TQFontInfo::rawMode () const +

+Returns TRUE if the font is a raw mode font; otherwise returns +FALSE. +

If it is a raw mode font, all other functions in TQFontInfo will +return the same values set in the TQFont, regardless of the font +actually used. +

See also TQFont::rawMode(). + +

TQFont::StyleHint TQFontInfo::styleHint () const +

+Returns the style of the matched window system font. +

Currently only returns the style hint set in TQFont. +

See also TQFont::styleHint() and TQFont::StyleHint. + +

int TQFontInfo::weight () const +

+Returns the weight of the matched window system font. +

See also TQFont::weight() and bold(). + + +


+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/qfontmanager-members.html b/doc/html/qfontmanager-members.html new file mode 100644 index 00000000..3b0f0a93 --- /dev/null +++ b/doc/html/qfontmanager-members.html @@ -0,0 +1,51 @@ + + + + + +TQFontManager Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFontManager

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfontmanager.html b/doc/html/qfontmanager.html new file mode 100644 index 00000000..a5dfdf8a --- /dev/null +++ b/doc/html/qfontmanager.html @@ -0,0 +1,100 @@ + + + + + +TQFontManager Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFontManager Class Reference

+ +

The TQFontManager class implements font management in TQt/Embedded. +More... +

#include <qfontmanager_qws.h> +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Detailed Description

+ + +The TQFontManager class implements font management in TQt/Embedded. + +

There is one and only one TQFontManager per TQt/Embedded +application. The qt_fontmanager global variable points to it. It +keeps a list of font factories, a cache of rendered fonts and a +list of fonts available on disk. TQFontManager is called when a new +font needs to be rendered from a Freetype-compatible or BDF font +on disk; this only happens if there isn't an appropriate TQPF font +already available. +

See also TQt/Embedded. + +


Member Function Documentation

+

TQFontManager::TQFontManager () +

+Creates a font manager. This method reads in the font definition +file from INSTALL/lib/fonts/fontdir, where INSTALL is the +directory where TQt/Embedded was installed, and creates a list of +TQDiskFonts to hold the information in the file. It also constructs +any defined font factories. + +

TQFontManager::~TQFontManager () +

+ +

Destroys the TQFontManager and sets qt_fontmanager to 0. + +

void TQFontManager::cleanup () [static] +

+Destroys the font manager + +

TQDiskFont * TQFontManager::get ( const TQFontDef & f ) +

+Returns the TQDiskFont that best matches f, based on family, +weight, italicity and font size. + +

void TQFontManager::initialize () [static] +

+Creates a new TQFontManager and points qt_fontmanager to it + + +

+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/qfontmanager_qws-h.html b/doc/html/qfontmanager_qws-h.html new file mode 100644 index 00000000..0b102e67 --- /dev/null +++ b/doc/html/qfontmanager_qws-h.html @@ -0,0 +1,296 @@ + + + + + +qfontmanager_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qfontmanager_qws.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qfontmanager_qws.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of font rendering infrastructure for Embedded TQt
+**
+** Created : 940721
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQFONTMANAGER_QWS_H
+#define TQFONTMANAGER_QWS_H
+
+#ifndef QT_H
+#include "qfont.h"
+#include "qptrlist.h"
+#include <private/qtextengine_p.h>
+#endif // QT_H
+
+// These are stored in the shared memory segment in front of their
+// data, and indexed at the start of the segment
+
+// This needs to be a multiple of 64 bits
+
+class TQFontDef;
+
+class Q_PACKED TQGlyphMetrics {
+
+public:
+    Q_UINT8 linestep;
+    Q_UINT8 width;
+    Q_UINT8 height;
+    Q_UINT8 flags;
+
+    Q_INT8 bearingx;      // Difference from pen position to glyph's left bbox
+    Q_UINT8 advance;       // Difference between pen positions
+    Q_INT8 bearingy;      // Used for putting characters on baseline
+
+    Q_INT8 reserved;      // Do not use
+
+    // Flags:
+    // RendererOwnsData - the renderer is responsible for glyph data
+    //                    memory deletion otherwise TQGlyphTree must
+    //                    delete [] the data when the glyph is deleted.
+    enum Flags { RendererOwnsData=0x01 };
+};
+
+class TQGlyph {
+public:
+    TQGlyph() { metrics=0; data=0; }
+    TQGlyph(TQGlyphMetrics* m, uchar* d) :
+	metrics(m), data(d) { }
+    ~TQGlyph() {}
+
+    TQGlyphMetrics* metrics;
+    uchar* data;
+};
+
+
+
+class TQFontFactory;
+class TQDiskFont;
+
+// This is a particular font instance at a particular resolution
+// e.g. Truetype Times, 10 point. There's only one of these though;
+// we want to share generated glyphs
+
+class TQRenderedFont {
+
+public:
+
+    // Normal font-type is monochrome; glyph data is a
+    //   bitmap, which doesn't use much memory
+
+    // Initialise for name A, renderer B, font type C, D glyphs
+
+    TQRenderedFont(TQDiskFont *,const TQFontDef&);
+    virtual ~TQRenderedFont();
+
+    TQFontDef fontDef() const;
+
+    int refcount;
+
+    int ptsize;
+
+    bool italic;
+    unsigned int weight;
+
+    void ref() { refcount++; }
+    bool deref() { refcount--; return refcount==0; }
+
+    bool match(const TQFontDef &);
+
+    TQDiskFont* diskfont;
+    int fascent,fdescent;
+    int fleftbearing,frightbearing;
+    int fmaxwidth;
+    int fleading;
+    int funderlinepos;
+    int funderlinewidth;
+    bool smooth;
+    int maxchar;
+
+    int ascent() { return fascent; }
+    int descent() { return fdescent; }
+    int width(int);
+    int width( const TQString&, int =-1 );
+    int leftBearing(int);
+    int rightBearing(int);
+
+    // Calling any of these can trigger a full-font metrics check
+    // which can be expensive
+    int minLeftBearing();
+    int minRightBearing();
+    int maxWidth();
+
+    virtual bool inFont(glyph_t g) const=0;
+    virtual TQGlyph render(glyph_t g)=0;
+
+private:
+
+};
+
+// Keeps track of available renderers and which font is which
+
+class TQDiskFontPrivate {};
+
+class TQDiskFont {
+
+public:
+    TQDiskFont(TQFontFactory *f, const TQString& n, bool i, int w, int s,
+	      const TQString &fl, const TQString& fi) :
+	factory(f), name(n), italic(i), weight(w), size(s), flags(fl), file(fi)
+    {
+	loaded=FALSE;
+	p=0;
+    }
+
+    TQRenderedFont* load(const TQFontDef &);
+
+    TQFontDef fontDef() const;
+
+    TQFontFactory *factory;
+    TQString name;
+    bool italic;
+    int weight;
+    int size;
+    TQString flags;
+    TQString file;
+    bool loaded;
+
+    TQDiskFontPrivate * p;
+};
+
+class TQCachePolicy {
+
+public:
+
+    virtual void cache(TQRenderedFont *)=0;
+    virtual void uncache(TQRenderedFont *)=0;
+
+};
+
+// Exposed here so the default policy can be reset
+
+class TQDefaultCachePolicy : public TQCachePolicy {
+
+public:
+
+    virtual void cache(TQRenderedFont *);
+    virtual void uncache(TQRenderedFont *);
+
+};
+
+class TQFontManager {
+
+public:
+
+    TQPtrList<TQFontFactory> factories;
+    TQPtrList<TQRenderedFont> cachedfonts;
+    TQPtrList<TQDiskFont> diskfonts;
+
+    TQFontManager();
+    ~TQFontManager();
+
+    // Font definition, type and color
+    TQDiskFont * get(const TQFontDef &);
+
+    static int cmpFontDef(const TQFontDef & goal, const TQFontDef & choice);
+
+    static void initialize();
+    static void cleanup();
+
+    void setPolicy(TQCachePolicy *);
+
+    void cache(TQRenderedFont * f) { policy->cache(f); }
+    void uncache(TQRenderedFont * f) { policy->uncache(f); }
+    TQRenderedFont * getCached(const TQFontDef &);
+
+private:
+
+    TQCachePolicy * policy;
+
+};
+
+class TQFontFactory {
+
+public:
+
+    TQFontFactory() {}
+    virtual ~TQFontFactory() {}
+
+    virtual TQRenderedFont * get(const TQFontDef &,TQDiskFont *)=0;
+    virtual void load(TQDiskFont *) const=0;
+    virtual void unload(TQDiskFont *) {}
+    virtual TQString name()=0;
+};
+
+void qt_init_fonts();
+
+extern TQFontManager * qt_fontmanager;
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfontmetrics-h.html b/doc/html/qfontmetrics-h.html new file mode 100644 index 00000000..78ee858d --- /dev/null +++ b/doc/html/qfontmetrics-h.html @@ -0,0 +1,162 @@ + + + + + +qfontmetrics.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qfontmetrics.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qfontmetrics.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQFontMetrics class
+**
+** Created : 940514
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQFONTMETRICS_H
+#define TQFONTMETRICS_H
+
+#ifndef QT_H
+#include "qfont.h"
+#include "qrect.h"
+#endif // QT_H
+
+#ifdef Q_WS_QWS
+class TQFontEngine;
+#endif
+
+class TQTextCodec;
+class TQTextParag;
+
+class Q_EXPORT TQFontMetrics
+{
+public:
+    TQFontMetrics( const TQFont & );
+    TQFontMetrics( const TQFont &, TQFont::Script );
+    TQFontMetrics( const TQFontMetrics & );
+    ~TQFontMetrics();
+
+    TQFontMetrics &operator=( const TQFontMetrics & );
+
+    int		ascent()	const;
+    int		descent()	const;
+    int		height()	const;
+    int		leading()	const;
+    int		lineSpacing()	const;
+    int		minLeftBearing() const;
+    int		minRightBearing() const;
+    int		maxWidth()	const;
+
+    bool	inFont(TQChar)	const;
+
+    int		leftBearing(TQChar) const;
+    int		rightBearing(TQChar) const;
+    int		width( const TQString &, int len = -1 ) const;
+
+    int		width( TQChar ) const;
+#ifndef QT_NO_COMPAT
+    int		width( char c ) const { return width( (TQChar) c ); }
+#endif
+
+    int 		charWidth( const TQString &str, int pos ) const;
+    TQRect	boundingRect( const TQString &, int len = -1 ) const;
+    TQRect	boundingRect( TQChar ) const;
+    TQRect	boundingRect( int x, int y, int w, int h, int flags,
+			      const TQString& str, int len=-1, int tabstops=0,
+			      int *tabarray=0, TQTextParag **intern=0 ) const;
+    TQSize	size( int flags,
+		      const TQString& str, int len=-1, int tabstops=0,
+		      int *tabarray=0, TQTextParag **intern=0 ) const;
+
+    int		underlinePos()	const;
+    int         overlinePos()   const;
+    int		strikeOutPos()	const;
+    int		lineWidth()	const;
+
+private:
+    TQFontMetrics( const TQPainter * );
+
+    friend class TQWidget;
+    friend class TQPainter;
+    friend class TQTextFormat;
+#if defined( Q_WS_MAC )
+    friend class TQFontPrivate;
+#endif
+
+    TQFontPrivate  *d;
+    TQPainter      *painter;
+    int		   fscript;
+};
+
+
+#endif // TQFONTMETRICS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfontmetrics-members.html b/doc/html/qfontmetrics-members.html new file mode 100644 index 00000000..dbac72ae --- /dev/null +++ b/doc/html/qfontmetrics-members.html @@ -0,0 +1,68 @@ + + + + + +TQFontMetrics Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFontMetrics

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qfontmetrics.html b/doc/html/qfontmetrics.html new file mode 100644 index 00000000..51b3d187 --- /dev/null +++ b/doc/html/qfontmetrics.html @@ -0,0 +1,419 @@ + + + + + +TQFontMetrics Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFontMetrics Class Reference

+ +

The TQFontMetrics class provides font metrics information. +More... +

#include <qfontmetrics.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQFontMetrics class provides font metrics information. +

+ +

TQFontMetrics functions calculate the size of characters and +strings for a given font. There are three ways you can create a +TQFontMetrics object: +

    +
  1. Calling the TQFontMetrics constructor with a TQFont creates a +font metrics object for a screen-compatible font, i.e. the font +cannot be a printer font*. If the font is changed +later, the font metrics object is not updated. +

  2. TQWidget::fontMetrics() returns the font metrics for a widget's +font. This is equivalent to TQFontMetrics(widget->font()). If the +widget's font is changed later, the font metrics object is not +updated. +

  3. TQPainter::fontMetrics() returns the font metrics for a +painter's current font. If the painter's font is changed later, the +font metrics object is not updated. +
+

* If you use a printer font the values returned may be +inaccurate. Printer fonts are not always accessible so the nearest +screen font is used if a printer font is supplied. +

Once created, the object provides functions to access the +individual metrics of the font, its characters, and for strings +rendered in the font. +

There are several functions that operate on the font: ascent(), +descent(), height(), leading() and lineSpacing() return the basic +size properties of the font. The underlinePos(), overlinePos(), +strikeOutPos() and lineWidth() functions, return the properties of +the line that underlines, overlines or strikes out the +characters. These functions are all fast. +

There are also some functions that operate on the set of glyphs in +the font: minLeftBearing(), minRightBearing() and maxWidth(). +These are by necessity slow, and we recommend avoiding them if +possible. +

For each character, you can get its width(), leftBearing() and +rightBearing() and find out whether it is in the font using +inFont(). You can also treat the character as a string, and use +the string functions on it. +

The string functions include width(), to return the width of a +string in pixels (or points, for a printer), boundingRect(), to +return a rectangle large enough to contain the rendered string, +and size(), to return the size of that rectangle. +

Example: +

+    TQFont font( "times", 24 );
+    TQFontMetrics fm( font );
+    int pixelsWide = fm.width( "What's the width of this text?" );
+    int pixelsHigh = fm.height();
+    
+ +

See also TQFont, TQFontInfo, TQFontDatabase, Graphics Classes, and Implicitly and Explicitly Shared Classes. + +


Member Function Documentation

+

TQFontMetrics::TQFontMetrics ( const TQFont & font ) +

+Constructs a font metrics object for font. +

The font must be screen-compatible, i.e. a font you use when +drawing text in widgets or pixmaps, not TQPicture or TQPrinter. +

The font metrics object holds the information for the font that is +passed in the constructor at the time it is created, and is not +updated if the font's attributes are changed later. +

Use TQPainter::fontMetrics() to get the font metrics when painting. +This will give correct results also when painting on paint device +that is not screen-compatible. + +

TQFontMetrics::TQFontMetrics ( const TQFont & font, TQFont::Script script ) +

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

Constructs a font metrics object for font using the given script. + +

TQFontMetrics::TQFontMetrics ( const TQFontMetrics & fm ) +

+Constructs a copy of fm. + +

TQFontMetrics::~TQFontMetrics () +

+Destroys the font metrics object and frees all allocated +resources. + +

int TQFontMetrics::ascent () const +

+Returns the ascent of the font. +

The ascent of a font is the distance from the baseline to the +highest position characters extend to. In practice, some font +designers break this rule, e.g. when they put more than one accent +on top of a character, or to accommodate an unusual character in +an exotic language, so it is possible (though rare) that this +value will be too small. +

See also descent(). + +

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

TQRect TQFontMetrics::boundingRect ( TQChar ch ) const +

+Returns the rectangle that is covered by ink if the character +specified by ch were to be drawn at the origin of the coordinate +system. +

Note that the bounding rectangle may extend to the left of (0, 0), +e.g. for italicized fonts, and that the text output may cover all pixels in the bounding rectangle. For a space character the rectangle +will usually be empty. +

Note that the rectangle usually extends both above and below the +base line. +

Warning: The width of the returned rectangle is not the advance width +of the character. Use boundingRect(const TQString &) or width() instead. +

See also width(). + +

Example: xform/xform.cpp. +

TQRect TQFontMetrics::boundingRect ( const TQString & str, int len = -1 ) const +

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

Returns the bounding rectangle that contains the first len +characters of string str. + +

TQRect TQFontMetrics::boundingRect ( int x, int y, int w, int h, int flgs, const TQString & str, int len = -1, int tabstops = 0, int * tabarray = 0, TQTextParag ** intern = 0 ) const +

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

Returns the bounding rectangle of the first len characters of +str, which is the set of pixels the text would cover if drawn +at (0, 0). The drawing, and hence the bounding rectangle, is +constrained to the rectangle (x, y, w, h). +

If len is negative (which is the default), the entire string is +used. +

The flgs argument is the bitwise OR of the following flags: +

    +
  • AlignAuto aligns to the left border for all languages except +Arabic and Hebrew where it aligns to the right. +
  • AlignLeft aligns to the left border. +
  • AlignRight aligns to the right border. +
  • AlignJustify produces justified text. +
  • AlignHCenter aligns horizontally centered. +
  • AlignTop aligns to the top border. +
  • AlignBottom aligns to the bottom border. +
  • AlignVCenter aligns vertically centered +
  • AlignCenter (== AlignHCenter | AlignVCenter) +
  • SingleLine ignores newline characters in the text. +
  • ExpandTabs expands tabs (see below) +
  • ShowPrefix interprets "&x" as "x", i.e. underlined. +
  • WordBreak breaks the text to fit the rectangle. +
+

Horizontal alignment defaults to AlignAuto and vertical +alignment defaults to AlignTop. +

If several of the horizontal or several of the vertical alignment +flags are set, the resulting alignment is undefined. +

These flags are defined in qnamespace.h. +

If ExpandTabs is set in flgs, then: if tabarray is +non-null, it specifies a 0-terminated sequence of pixel-positions +for tabs; otherwise if tabstops is non-zero, it is used as the +tab spacing (in pixels). +

Note that the bounding rectangle may extend to the left of (0, 0), +e.g. for italicized fonts, and that the text output may cover all pixels in the bounding rectangle. +

Newline characters are processed as linebreaks. +

Despite the different actual character heights, the heights of the +bounding rectangles of "Yes" and "yes" are the same. +

The bounding rectangle given by this function is somewhat larger +than that calculated by the simpler boundingRect() function. This +function uses the maximum left and +right font bearings as is +necessary for multi-line text to align correctly. Also, +fontHeight() and lineSpacing() are used to calculate the height, +rather than individual character heights. +

The intern argument should not be used. +

See also width(), TQPainter::boundingRect(), and TQt::AlignmentFlags. + +

int TQFontMetrics::charWidth ( const TQString & str, int pos ) const +

+Returns the width of the character at position pos in the +string str. +

The whole string is needed, as the glyph drawn may change +depending on the context (the letter before and after the current +one) for some languages (e.g. Arabic). +

This function also takes non spacing marks and ligatures into +account. + +

int TQFontMetrics::descent () const +

+Returns the descent of the font. +

The descent is the distance from the base line to the lowest point +characters extend to. (Note that this is different from X, which +adds 1 pixel.) In practice, some font designers break this rule, +e.g. to accommodate an unusual character in an exotic language, so +it is possible (though rare) that this value will be too small. +

See also ascent(). + +

Examples: drawdemo/drawdemo.cpp and hello/hello.cpp. +

int TQFontMetrics::height () const +

+Returns the height of the font. +

This is always equal to ascent()+descent()+1 (the 1 is for the +base line). +

See also leading() and lineSpacing(). + +

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

bool TQFontMetrics::inFont ( TQChar ch ) const +

+Returns TRUE if character ch is a valid character in the font; +otherwise returns FALSE. + +

Example: qfd/fontdisplayer.cpp. +

int TQFontMetrics::leading () const +

+Returns the leading of the font. +

This is the natural inter-line spacing. +

See also height() and lineSpacing(). + +

int TQFontMetrics::leftBearing ( TQChar ch ) const +

+Returns the left bearing of character ch in the font. +

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

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

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

Example: qfd/fontdisplayer.cpp. +

int TQFontMetrics::lineSpacing () const +

+Returns the distance from one base line to the next. +

This value is always equal to leading()+height(). +

See also height() and leading(). + +

Examples: qfd/fontdisplayer.cpp, qwerty/qwerty.cpp, and scrollview/scrollview.cpp. +

int TQFontMetrics::lineWidth () const +

+Returns the width of the underline and strikeout lines, adjusted +for the point size of the font. +

See also underlinePos(), overlinePos(), and strikeOutPos(). + +

int TQFontMetrics::maxWidth () const +

+Returns the width of the widest character in the font. + +

Example: qfd/fontdisplayer.cpp. +

int TQFontMetrics::minLeftBearing () const +

+Returns the minimum left bearing of the font. +

This is the smallest leftBearing(char) of all characters in the +font. +

Note that this function can be very slow if the font is large. +

See also minRightBearing() and leftBearing(). + +

Example: qfd/fontdisplayer.cpp. +

int TQFontMetrics::minRightBearing () const +

+Returns the minimum right bearing of the font. +

This is the smallest rightBearing(char) of all characters in the +font. +

Note that this function can be very slow if the font is large. +

See also minLeftBearing() and rightBearing(). + +

Example: qfd/fontdisplayer.cpp. +

TQFontMetrics & TQFontMetrics::operator= ( const TQFontMetrics & fm ) +

+Assigns the font metrics fm. + +

int TQFontMetrics::overlinePos () const +

+Returns the distance from the base line to where an overline +should be drawn. +

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

int TQFontMetrics::rightBearing ( TQChar ch ) const +

+Returns the right bearing of character ch in the font. +

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

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

See also leftBearing(), minRightBearing(), and width(). + +

Example: qfd/fontdisplayer.cpp. +

TQSize TQFontMetrics::size ( int flgs, const TQString & str, int len = -1, int tabstops = 0, int * tabarray = 0, TQTextParag ** intern = 0 ) const +

+Returns the size in pixels of the first len characters of str. +

If len is negative (the default), the entire string is used. +

The flgs argument is the bitwise OR of the following flags: +

    +
  • SingleLine ignores newline characters. +
  • ExpandTabs expands tabs (see below) +
  • ShowPrefix interprets "&x" as "x", i.e. underlined. +
  • WordBreak breaks the text to fit the rectangle. +
+

These flags are defined in qnamespace.h. +

If ExpandTabs is set in flgs, then: if tabarray is +non-null, it specifies a 0-terminated sequence of pixel-positions +for tabs; otherwise if tabstops is non-zero, it is used as the +tab spacing (in pixels). +

Newline characters are processed as linebreaks. +

Despite the different actual character heights, the heights of the +bounding rectangles of "Yes" and "yes" are the same. +

The intern argument should not be used. +

See also boundingRect(). + +

int TQFontMetrics::strikeOutPos () const +

+Returns the distance from the base line to where the strikeout +line should be drawn. +

See also underlinePos(), overlinePos(), and lineWidth(). + +

int TQFontMetrics::underlinePos () const +

+Returns the distance from the base line to where an underscore +should be drawn. +

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

int TQFontMetrics::width ( TQChar ch ) const +

+

+

Returns the logical width of character ch in pixels. This is a +distance appropriate for drawing a subsequent character after ch. +

Some of the metrics are described in the image to the right. The +central dark rectangles cover the logical width() of each +character. The outer pale rectangles cover the leftBearing() and +rightBearing() of each character. Notice that the bearings of "f" +in this particular font are both negative, while the bearings of +"o" are both positive. +

Warning: This function will produce incorrect results for Arabic +characters or non spacing marks in the middle of a string, as the +glyph shaping and positioning of marks that happens when +processing strings cannot be taken into account. Use charWidth() +instead if you aren't looking for the width of isolated +characters. +

See also boundingRect() and charWidth(). + +

Examples: drawdemo/drawdemo.cpp, hello/hello.cpp, movies/main.cpp, qfd/fontdisplayer.cpp, and scrollview/scrollview.cpp. +

int TQFontMetrics::width ( const TQString & str, int len = -1 ) const +

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

Returns the width of the first len characters of string str. + +

int TQFontMetrics::width ( char c ) const +

+

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

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

Provided to aid porting from TQt 1.x. + + +


+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/qframe-h.html b/doc/html/qframe-h.html new file mode 100644 index 00000000..3edc3110 --- /dev/null +++ b/doc/html/qframe-h.html @@ -0,0 +1,216 @@ + + + + + +qframe.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qframe.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qframe.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQFrame widget class
+**
+** Created : 950201
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQFRAME_H
+#define TQFRAME_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#endif // QT_H
+
+#ifndef QT_NO_FRAME
+
+class Q_EXPORT TQFrame : public TQWidget
+{
+    Q_OBJECT
+    Q_ENUMS( Shape Shadow )
+    Q_PROPERTY( int frameWidth READ frameWidth )
+    Q_PROPERTY( TQRect contentsRect READ contentsRect )
+    Q_PROPERTY( Shape frameShape READ frameShape WRITE setFrameShape )
+    Q_PROPERTY( Shadow frameShadow READ frameShadow WRITE setFrameShadow )
+    Q_PROPERTY( int lineWidth READ lineWidth WRITE setLineWidth )
+    Q_PROPERTY( int margin READ margin WRITE setMargin )
+    Q_PROPERTY( int midLineWidth READ midLineWidth WRITE setMidLineWidth )
+    Q_PROPERTY( TQRect frameRect READ frameRect WRITE setFrameRect DESIGNABLE false )
+
+public:
+    TQFrame( TQWidget* parent=0, const char* name=0, WFlags f=0 );
+
+    int         frameStyle()    const;
+    virtual void setFrameStyle( int );
+
+    int         frameWidth()    const;
+    TQRect       contentsRect()  const;
+
+#ifndef Q_QDOC
+    bool        lineShapesOk()  const { return TRUE; }
+#endif
+
+    TQSize       sizeHint() const;
+
+    enum Shape { NoFrame  = 0,                  // no frame
+                 Box      = 0x0001,             // rectangular box
+                 Panel    = 0x0002,             // rectangular panel
+                 WinPanel = 0x0003,             // rectangular panel (Windows)
+                 HLine    = 0x0004,             // horizontal line
+                 VLine    = 0x0005,             // vertical line
+                 StyledPanel = 0x0006,          // rectangular panel depending on the GUI style
+                 PopupPanel = 0x0007,           // rectangular panel depending on the GUI style
+                 MenuBarPanel = 0x0008,
+                 ToolBarPanel = 0x0009,
+		 LineEditPanel = 0x000a,
+		 TabWidgetPanel = 0x000b,
+		 GroupBoxPanel = 0x000c,
+                 MShape   = 0x000f              // mask for the shape
+    };
+    enum Shadow { Plain    = 0x0010,            // plain line
+                  Raised   = 0x0020,            // raised shadow effect
+                  Sunken   = 0x0030,            // sunken shadow effect
+                  MShadow  = 0x00f0 };          // mask for the shadow
+
+    Shape       frameShape()    const;
+    void        setFrameShape( Shape );
+    Shadow      frameShadow()   const;
+    void        setFrameShadow( Shadow );
+
+    int         lineWidth()     const;
+    virtual void setLineWidth( int );
+
+    int         margin()        const;
+    virtual void setMargin( int );
+
+    int         midLineWidth()  const;
+    virtual void setMidLineWidth( int );
+
+    TQRect       frameRect()     const;
+    virtual void setFrameRect( const TQRect & );
+
+protected:
+    void        paintEvent( TQPaintEvent * );
+    void        resizeEvent( TQResizeEvent * );
+    virtual void drawFrame( TQPainter * );
+    virtual void drawContents( TQPainter * );
+    virtual void frameChanged();
+    void        styleChange( TQStyle& );
+
+private:
+    void        updateFrameWidth(bool=FALSE);
+    TQRect       frect;
+    int         fstyle;
+    short       lwidth;
+    short       mwidth;
+    short       mlwidth;
+    short       fwidth;
+
+    void * d;
+private:        // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQFrame( const TQFrame & );
+    TQFrame &operator=( const TQFrame & );
+#endif
+};
+
+
+inline int TQFrame::frameStyle() const
+{ return fstyle; }
+
+inline TQFrame::Shape TQFrame::frameShape() const
+{ return (Shape) ( fstyle & MShape ); }
+
+inline TQFrame::Shadow TQFrame::frameShadow() const
+{ return (Shadow) ( fstyle & MShadow ); }
+
+inline void TQFrame::setFrameShape( TQFrame::Shape s )
+{ setFrameStyle( ( fstyle & MShadow ) | s ); }
+
+inline void TQFrame::setFrameShadow( TQFrame::Shadow s )
+{ setFrameStyle( ( fstyle & MShape ) | s ); }
+
+inline int TQFrame::lineWidth() const
+{ return lwidth; }
+
+inline int TQFrame::midLineWidth() const
+{ return mlwidth; }
+
+inline int TQFrame::margin() const
+{ return mwidth; }
+
+inline int TQFrame::frameWidth() const
+{ return fwidth; }
+
+
+#endif // QT_NO_FRAME
+
+#endif // TQFRAME_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qframe-members.html b/doc/html/qframe-members.html new file mode 100644 index 00000000..5667a951 --- /dev/null +++ b/doc/html/qframe-members.html @@ -0,0 +1,356 @@ + + + + + +TQFrame Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFrame

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qframe.html b/doc/html/qframe.html new file mode 100644 index 00000000..524843b6 --- /dev/null +++ b/doc/html/qframe.html @@ -0,0 +1,370 @@ + + + + + +TQFrame Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFrame Class Reference

+ +

The TQFrame class is the base class of widgets that can have a frame. +More... +

#include <qframe.h> +

Inherits TQWidget. +

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

List of all member functions. +

Public Members

+ +

Properties

+
    +
  • TQRect contentsRect - the rectangle inside the frame  (read only)
  • +
  • TQRect frameRect - the frame rectangle
  • +
  • Shadow frameShadow - the frame shadow value from the frame style
  • +
  • Shape frameShape - the frame shape value from the frame style
  • +
  • int frameWidth - the width of the frame that is drawn  (read only)
  • +
  • int lineWidth - the line width
  • +
  • int margin - the width of the margin
  • +
  • int midLineWidth - the width of the mid-line
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQFrame class is the base class of widgets that can have a frame. +

+

It draws a frame and calls a virtual function, drawContents(), to +fill in the frame. This function is reimplemented by subclasses. +There are also two other less useful functions: drawFrame() and +frameChanged(). +

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

+    TQLabel label(...);
+    label.setFrameStyle( TQFrame::Panel | TQFrame::Raised );
+    label.setLineWidth( 2 );
+
+    TQProgressBar pbar(...);
+    label.setFrameStyle( TQFrame::NoFrame );
+    
+ +

The TQFrame class can also be used directly for creating simple +frames without any contents, although usually you would use a +TQHBox or TQVBox because they automatically lay out the widgets you +put inside the frame. +

A frame widget has four attributes: frameStyle(), lineWidth(), +midLineWidth(), and margin(). +

The frame style is specified by a frame + shape and a shadow style. The +frame shapes are NoFrame, Box, Panel, StyledPanel, PopupPanel, WinPanel, ToolBarPanel, MenuBarPanel, HLine and VLine; the shadow styles are Plain, Raised and +Sunken. +

The line width is the width of the frame border. +

The mid-line width specifies the width of an extra line in the +middle of the frame, which uses a third color to obtain a special +3D effect. Notice that a mid-line is only drawn for Box, HLine and VLine frames that are raised or sunken. +

The margin is the gap between the frame and the contents of the +frame. +

+This table shows the most useful combinations of styles and widths +(and some rather useless ones): +

Table of frame styles

See also Abstract Widget Classes. + +


Member Type Documentation

+

TQFrame::Shadow

+ +

This enum type defines the 3D effect used for TQFrame's frame. +

    +
  • TQFrame::Plain - the frame and contents appear level with the +surroundings; draws using the palette foreground color (without +any 3D effect) +
  • TQFrame::Raised - the frame and contents appear raised; draws a 3D +raised line using the light and dark colors of the current color +group +
  • TQFrame::Sunken - the frame and contents appear sunken; draws a 3D +sunken line using the light and dark colors of the current color +group +
  • TQFrame::MShadow - internal; mask for the shadow +

Shadow interacts with TQFrame::Shape, the lineWidth() and the +midLineWidth(). See the picture of the frames +in the class description. +

See also TQFrame::Shape, lineWidth, and midLineWidth. + +

TQFrame::Shape

+ +

This enum type defines the shapes of a TQFrame's frame. +

    +
  • TQFrame::NoFrame - TQFrame draws nothing +
  • TQFrame::Box - TQFrame draws a box around its contents +
  • TQFrame::Panel - TQFrame draws a panel to make the contents appear +raised or sunken +
  • TQFrame::StyledPanel - draws a rectangular panel with a look that +depends on the current GUI style. It can be raised or sunken. +
  • TQFrame::HLine - TQFrame draws a horizontal line that frames nothing +(useful as separator) +
  • TQFrame::VLine - TQFrame draws a vertical line that frames nothing +(useful as separator) +
  • TQFrame::GroupBoxPanel - draws a rectangular panel +
  • TQFrame::WinPanel - draws a rectangular panel that can be raised or +sunken like those in Windows 95. Specifying this shape sets +the line width to 2 pixels. WinPanel is provided for compatibility. +For GUI style independence we recommend using StyledPanel instead. +
  • TQFrame::ToolBarPanel +
  • TQFrame::MenuBarPanel +
  • TQFrame::PopupPanel +
  • TQFrame::LineEditPanel - is used to draw a frame suitable for line edits. The +look depends upon the current GUI style. +
  • TQFrame::TabWidgetPanel - is used to draw a frame suitable for tab widgets. The +look depends upon the current GUI style. +
  • TQFrame::MShape - internal mask +

When it does not call TQStyle, Shape interacts with TQFrame::Shadow, +the lineWidth() and the midLineWidth() to create the total result. +See the picture of the frames in the class +description. +

See also TQFrame::Shadow, TQFrame::style(), and TQStyle::drawPrimitive(). + +


Member Function Documentation

+

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

+Constructs a frame widget with frame style NoFrame and a +1-pixel frame width. +

The parent, name and f arguments are passed to the +TQWidget constructor. + +

TQRect TQFrame::contentsRect () const +

Returns the rectangle inside the frame. +See the "contentsRect" property for details. +

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

+Virtual function that draws the contents of the frame. +

The TQPainter is already open when you get it, and you must leave +it open. Painter transformations are switched off on entry. If you +transform the painter, remember to take the frame into account and +reset transformation before +returning. +

This function is reimplemented by subclasses that draw something +inside the frame. It should only draw inside contentsRect(). The +default function does nothing. +

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

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

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

+Draws the frame using the painter p and the current frame +attributes and color group. The rectangle inside the frame is not +affected. +

This function is virtual, but in general you do not need to +reimplement it. If you do, note that the TQPainter is already open +and must remain open. +

See also frameRect, contentsRect, drawContents(), frameStyle(), and palette. + +

void TQFrame::frameChanged () [virtual protected] +

+Virtual function that is called when the frame style, line width +or mid-line width changes. +

This function can be reimplemented by subclasses that need to know +when the frame attributes change. +

The default implementation calls update(). + +

TQRect TQFrame::frameRect () const +

Returns the frame rectangle. +See the "frameRect" property for details. +

Shadow TQFrame::frameShadow () const +

Returns the frame shadow value from the frame style. +See the "frameShadow" property for details. +

Shape TQFrame::frameShape () const +

Returns the frame shape value from the frame style. +See the "frameShape" property for details. +

int TQFrame::frameStyle () const +

+ +

Returns the frame style. +

The default value is TQFrame::NoFrame. +

See also setFrameStyle(), frameShape, and frameShadow. + +

Example: scrollview/scrollview.cpp. +

int TQFrame::frameWidth () const +

Returns the width of the frame that is drawn. +See the "frameWidth" property for details. +

int TQFrame::lineWidth () const +

Returns the line width. +See the "lineWidth" property for details. +

int TQFrame::margin () const +

Returns the width of the margin. +See the "margin" property for details. +

int TQFrame::midLineWidth () const +

Returns the width of the mid-line. +See the "midLineWidth" property for details. +

void TQFrame::paintEvent ( TQPaintEvent * event ) [virtual protected] +

+Processes the paint event event. +

Paints the frame and the contents. +

Opens the painter on the frame and calls drawFrame(), then +drawContents(). + +

Examples: life/life.cpp and qfd/fontdisplayer.cpp. +

Reimplemented from TQWidget. +

void TQFrame::resizeEvent ( TQResizeEvent * e ) [virtual protected] +

+Processes the resize event e. +

Adjusts the frame rectangle for the resized widget. The frame +rectangle is elastic, and the surrounding area is static. +

The resulting frame rectangle may be null or invalid. You can use +setMinimumSize() to avoid those possibilities. +

Nothing is done if the frame rectangle is a null rectangle already. + +

Example: life/life.cpp. +

Reimplemented from TQWidget. +

void TQFrame::setFrameRect ( const TQRect & ) [virtual] +

Sets the frame rectangle. +See the "frameRect" property for details. +

void TQFrame::setFrameShadow ( Shadow ) +

Sets the frame shadow value from the frame style. +See the "frameShadow" property for details. +

void TQFrame::setFrameShape ( Shape ) +

Sets the frame shape value from the frame style. +See the "frameShape" property for details. +

void TQFrame::setFrameStyle ( int style ) [virtual] +

+Sets the frame style to style. +

The style is the bitwise OR between a frame shape and a frame +shadow style. See the illustration in the +class documentation. +

The frame shapes are given in TQFrame::Shape and the shadow +styles in TQFrame::Shadow. +

If a mid-line width greater than 0 is specified, an additional +line is drawn for Raised or Sunken Box, HLine, and VLine frames. The mid-color of the current color group is used for +drawing middle lines. +

See also Illustration, frameStyle(), colorGroup, and TQColorGroup. + +

Examples: cursor/cursor.cpp, layout/layout.cpp, listboxcombo/listboxcombo.cpp, rangecontrols/rangecontrols.cpp, scrollview/scrollview.cpp, tabdialog/tabdialog.cpp, and tictac/tictac.cpp. +

void TQFrame::setLineWidth ( int ) [virtual] +

Sets the line width. +See the "lineWidth" property for details. +

void TQFrame::setMargin ( int ) [virtual] +

Sets the width of the margin. +See the "margin" property for details. +

void TQFrame::setMidLineWidth ( int ) [virtual] +

Sets the width of the mid-line. +See the "midLineWidth" property for details. +


Property Documentation

+

TQRect contentsRect

+

This property holds the rectangle inside the frame. +

Get this property's value with contentsRect(). +

See also frameRect and drawContents(). + +

TQRect frameRect

+

This property holds the frame rectangle. +

The frame rectangle is the rectangle the frame is drawn in. By +default, this is the entire widget. Setting this property does not cause a widget update. +

If this property is set to a null rectangle (for example +TQRect(0, 0, 0, 0)), then the frame rectangle is equivalent to +the widget rectangle. +

See also contentsRect. + +

Set this property's value with setFrameRect() and get this property's value with frameRect(). +

Shadow frameShadow

+

This property holds the frame shadow value from the frame style. +

Set this property's value with setFrameShadow() and get this property's value with frameShadow(). +

See also frameStyle() and frameShape. + +

Shape frameShape

+

This property holds the frame shape value from the frame style. +

Set this property's value with setFrameShape() and get this property's value with frameShape(). +

See also frameStyle() and frameShadow. + +

int frameWidth

+

This property holds the width of the frame that is drawn. +

Note that the frame width depends on the frame style, not only the line +width and the mid-line width. For example, the style NoFrame +always has a frame width of 0, whereas the style Panel has a +frame width equivalent to the line width. The frame width also +includes the margin. +

See also lineWidth, midLineWidth, frameStyle(), and margin. + +

Get this property's value with frameWidth(). +

int lineWidth

+

This property holds the line width. +

Note that the total line width for HLine and VLine is +given by frameWidth(), not lineWidth(). +

The default value is 1. +

See also midLineWidth and frameWidth. + +

Set this property's value with setLineWidth() and get this property's value with lineWidth(). +

int margin

+

This property holds the width of the margin. +

The margin is the distance between the innermost pixel of the +frame and the outermost pixel of contentsRect(). It is included in +frameWidth(). +

The margin is filled according to backgroundMode(). +

The default value is 0. +

See also margin, lineWidth, and frameWidth. + +

Set this property's value with setMargin() and get this property's value with margin(). +

int midLineWidth

+

This property holds the width of the mid-line. +

The default value is 0. +

See also lineWidth and frameWidth. + +

Set this property's value with setMidLineWidth() and get this property's value with midLineWidth(). + +


+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/qftp-h.html b/doc/html/qftp-h.html new file mode 100644 index 00000000..b1aa13fa --- /dev/null +++ b/doc/html/qftp-h.html @@ -0,0 +1,247 @@ + + + + + +qftp.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qftp.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qftp.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQFtp class.
+**
+** Created : 970521
+**
+** Copyright (C) 1997-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the network 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 retquirements 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 TQFTP_H
+#define TQFTP_H
+
+#ifndef QT_H
+#include "qstring.h" // char*->TQString conversion
+#include "qurlinfo.h"
+#include "qnetworkprotocol.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_NETWORK ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_NETWORK )
+#define TQM_EXPORT_FTP
+#else
+#define TQM_EXPORT_FTP Q_EXPORT
+#endif
+
+#ifndef QT_NO_NETWORKPROTOCOL_FTP
+
+
+class TQSocket;
+class TQFtpCommand;
+
+class TQM_EXPORT_FTP TQFtp : public TQNetworkProtocol
+{
+    Q_OBJECT
+
+public:
+    TQFtp(); // ### TQt 4.0: get rid of this overload
+    TQFtp( TQObject *parent, const char *name=0 );
+    virtual ~TQFtp();
+
+    int supportedOperations() const;
+
+    // non-TQNetworkProtocol functions:
+    enum State {
+	Unconnected,
+	HostLookup,
+	Connecting,
+	Connected,
+	LoggedIn,
+	Closing
+    };
+    enum Error {
+	NoError,
+	UnknownError,
+	HostNotFound,
+	ConnectionRefused,
+	NotConnected
+    };
+    enum Command {
+	None,
+	ConnectToHost,
+	Login,
+	Close,
+	List,
+	Cd,
+	Get,
+	Put,
+	Remove,
+	Mkdir,
+	Rmdir,
+	Rename,
+	RawCommand
+    };
+
+    int connectToHost( const TQString &host, Q_UINT16 port=21 );
+    int login( const TQString &user=TQString::null, const TQString &password=TQString::null );
+    int close();
+    int list( const TQString &dir=TQString::null );
+    int cd( const TQString &dir );
+    int get( const TQString &file, TQIODevice *dev=0 );
+    int put( const TQByteArray &data, const TQString &file );
+    int put( TQIODevice *dev, const TQString &file );
+    int remove( const TQString &file );
+    int mkdir( const TQString &dir );
+    int rmdir( const TQString &dir );
+    int rename( const TQString &oldname, const TQString &newname );
+
+    int rawCommand( const TQString &command );
+
+    Q_ULONG bytesAvailable() const;
+    Q_LONG readBlock( char *data, Q_ULONG maxlen );
+    TQByteArray readAll();
+
+    int currentId() const;
+    TQIODevice* currentDevice() const;
+    Command currentCommand() const;
+    bool hasPendingCommands() const;
+    void clearPendingCommands();
+
+    State state() const;
+
+    Error error() const;
+    TQString errorString() const;
+
+public slots:
+    void abort();
+
+signals:
+    void stateChanged( int );
+    void listInfo( const TQUrlInfo& );
+    void readyRead();
+    void dataTransferProgress( int, int );
+    void rawCommandReply( int, const TQString& );
+
+    void commandStarted( int );
+    void commandFinished( int, bool );
+    void done( bool );
+
+protected:
+    void parseDir( const TQString &buffer, TQUrlInfo &info ); // ### TQt 4.0: delete this? (not public API)
+    void operationListChildren( TQNetworkOperation *op );
+    void operationMkDir( TQNetworkOperation *op );
+    void operationRemove( TQNetworkOperation *op );
+    void operationRename( TQNetworkOperation *op );
+    void operationGet( TQNetworkOperation *op );
+    void operationPut( TQNetworkOperation *op );
+
+    // ### TQt 4.0: delete these
+    // unused variables:
+    TQSocket *commandSocket, *dataSocket;
+    bool connectionReady, passiveMode;
+    int getTotalSize, getDoneSize;
+    bool startGetOnFail;
+    int putToWrite, putWritten;
+    bool errorInListChildren;
+
+private:
+    void init();
+    int addCommand( TQFtpCommand * );
+
+    bool checkConnection( TQNetworkOperation *op );
+
+private slots:
+    void startNextCommand();
+    void piFinished( const TQString& );
+    void piError( int, const TQString& );
+    void piConnectState( int );
+    void piFtpReply( int, const TQString& );
+
+private slots:
+    void npListInfo( const TQUrlInfo & );
+    void npDone( bool );
+    void npStateChanged( int );
+    void npDataTransferProgress( int, int );
+    void npReadyRead();
+
+protected slots:
+    // ### TQt 4.0: delete these
+    void hostFound();
+    void connected();
+    void closed();
+    void dataHostFound();
+    void dataConnected();
+    void dataClosed();
+    void dataReadyRead();
+    void dataBytesWritten( int nbytes );
+    void error( int );
+};
+
+#endif // QT_NO_NETWORKPROTOCOL_FTP
+
+#endif // TQFTP_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qftp-members.html b/doc/html/qftp-members.html new file mode 100644 index 00000000..89402850 --- /dev/null +++ b/doc/html/qftp-members.html @@ -0,0 +1,150 @@ + + + + + +TQFtp Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQFtp

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qftp.html b/doc/html/qftp.html new file mode 100644 index 00000000..8b2ce2b4 --- /dev/null +++ b/doc/html/qftp.html @@ -0,0 +1,693 @@ + + + + + +TQFtp Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQFtp Class Reference
[network module]

+ +

The TQFtp class provides an implementation of the FTP protocol. +More... +

#include <qftp.h> +

Inherits TQNetworkProtocol. +

List of all member functions. +

Public Members

+
    +
  • TQFtp ()
  • +
  • TQFtp ( TQObject * parent, const char * name = 0 )
  • +
  • virtual ~TQFtp ()
  • +
  • enum State { Unconnected, HostLookup, Connecting, Connected, LoggedIn, Closing }
  • +
  • enum Error { NoError, UnknownError, HostNotFound, ConnectionRefused, NotConnected }
  • +
  • enum Command { None, ConnectToHost, Login, Close, List, Cd, Get, Put, Remove, Mkdir, Rmdir, Rename, RawCommand }
  • +
  • int connectToHost ( const TQString & host, Q_UINT16 port = 21 )
  • +
  • int login ( const TQString & user = TQString::null, const TQString & password = TQString::null )
  • +
  • int close ()
  • +
  • int list ( const TQString & dir = TQString::null )
  • +
  • int cd ( const TQString & dir )
  • +
  • int get ( const TQString & file, TQIODevice * dev = 0 )
  • +
  • int put ( const TQByteArray & data, const TQString & file )
  • +
  • int put ( TQIODevice * dev, const TQString & file )
  • +
  • int remove ( const TQString & file )
  • +
  • int mkdir ( const TQString & dir )
  • +
  • int rmdir ( const TQString & dir )
  • +
  • int rename ( const TQString & oldname, const TQString & newname )
  • +
  • int rawCommand ( const TQString & command )
  • +
  • Q_ULONG bytesAvailable () const
  • +
  • Q_LONG readBlock ( char * data, Q_ULONG maxlen )
  • +
  • TQByteArray readAll ()
  • +
  • int currentId () const
  • +
  • TQIODevice * currentDevice () const
  • +
  • Command currentCommand () const
  • +
  • bool hasPendingCommands () const
  • +
  • void clearPendingCommands ()
  • +
  • State state () const
  • +
  • Error error () const
  • +
  • TQString errorString () const
  • +
+

Public Slots

+ +

Signals

+ +

Detailed Description

+ + +The TQFtp class provides an implementation of the FTP protocol. + +

+ +

This class provides two different interfaces: one is the +TQNetworkProtocol interface that allows you to use FTP through the +TQUrlOperator abstraction. The other is a direct interface to FTP +that gives you lower-level access to the FTP protocol for finer +control. Using the direct interface you can also execute arbitrary +FTP commands. +

Don't mix the two interfaces, since the behavior is not +well-defined. +

If you want to use TQFtp with the TQNetworkProtocol interface, you +do not use it directly, but rather through a TQUrlOperator, for +example: +

+    TQUrlOperator op( "ftp://ftp.trolltech.com" );
+    op.listChildren(); // Asks the server to provide a directory listing
+    
+ +

This code will only work if the TQFtp class is registered; to +register the class, you must call qInitNetworkProtocols() before +using a TQUrlOperator with TQFtp. +

The rest of this descrption describes the direct interface to FTP. +

The class works asynchronously, so there are no blocking +functions. If an operation cannot be executed immediately, the +function will still return straight away and the operation will be +scheduled for later execution. The results of scheduled operations +are reported via signals. This approach depends on the event loop +being in operation. +

The operations that can be scheduled (they are called "commands" +in the rest of the documentation) are the following: +connectToHost(), login(), close(), list(), cd(), get(), put(), +remove(), mkdir(), rmdir(), rename() and rawCommand(). +

All of these commands return a unique identifier that allows you +to keep track of the command that is currently being executed. +When the execution of a command starts, the commandStarted() +signal with the command's identifier is emitted. When the command +is finished, the commandFinished() signal is emitted with the +command's identifier and a bool that indicates whether the command +finished with an error. +

In some cases, you might want to execute a sequence of commands, +e.g. if you want to connect and login to a FTP server. This is +simply achieved: +

+    TQFtp *ftp = new TQFtp( this ); // this is an optional TQObject parent
+    ftp->connectToHost( "ftp.trolltech.com" );
+    ftp->login();
+    
+ +

In this case two FTP commands have been scheduled. When the last +scheduled command has finished, a done() signal is emitted with +a bool argument that tells you whether the sequence finished with +an error. +

If an error occurs during the execution of one of the commands in +a sequence of commands, all the pending commands (i.e. scheduled, +but not yet executed commands) are cleared and no signals are +emitted for them. +

Some commands, e.g. list(), emit additional signals to report +their results. +

Example: If you want to download the INSTALL file from Trolltech's +FTP server, you would write this: +

+    ftp->connectToHost( "ftp.trolltech.com" );  // id == 1
+    ftp->login();                               // id == 2
+    ftp->cd( "qt" );                            // id == 3
+    ftp->get( "INSTALL" );                      // id == 4
+    ftp->close();                               // id == 5
+    
+ +

For this example the following sequence of signals is emitted +(with small variations, depending on network traffic, etc.): +

+    start( 1 )
+    stateChanged( HostLookup )
+    stateChanged( Connecting )
+    stateChanged( Connected )
+    finished( 1, FALSE )
+
+    start( 2 )
+    stateChanged( LoggedIn )
+    finished( 2, FALSE )
+
+    start( 3 )
+    finished( 3, FALSE )
+
+    start( 4 )
+    dataTransferProgress( 0, 3798 )
+    dataTransferProgress( 2896, 3798 )
+    readyRead()
+    dataTransferProgress( 3798, 3798 )
+    readyRead()
+    finished( 4, FALSE )
+
+    start( 5 )
+    stateChanged( Closing )
+    stateChanged( Unconnected )
+    finished( 5, FALSE )
+
+    done( FALSE )
+    
+ +

The dataTransferProgress() signal in the above example is useful +if you want to show a progressbar to +inform the user about the progress of the download. The +readyRead() signal tells you that there is data ready to be read. +The amount of data can be queried then with the bytesAvailable() +function and it can be read with the readBlock() or readAll() +function. +

If the login fails for the above example, the signals would look +like this: +

+    start( 1 )
+    stateChanged( HostLookup )
+    stateChanged( Connecting )
+    stateChanged( Connected )
+    finished( 1, FALSE )
+
+    start( 2 )
+    finished( 2, TRUE )
+
+    done( TRUE )
+    
+ +

You can then get details about the error with the error() and +errorString() functions. +

The functions currentId() and currentCommand() provide more +information about the currently executing command. +

The functions hasPendingCommands() and clearPendingCommands() +allow you to query and clear the list of pending commands. +

The safest and easiest way to use the FTP protocol is to use +TQUrlOperator() or the FTP commands described above. If you are an +experienced network programmer and want to have complete control +you can use rawCommand() to execute arbitrary FTP commands. +

See also TQt Network Documentation, TQNetworkProtocol, TQUrlOperator, TQHttp, and Input/Output and Networking. + +


Member Type Documentation

+

TQFtp::Command

+ +

This enum is used as the return value for the currentCommand() function. +This allows you to perform specific actions for particular +commands, e.g. in a FTP client, you might want to clear the +directory view when a list() command is started; in this case you +can simply check in the slot connected to the start() signal if +the currentCommand() is List. +

    +
  • TQFtp::None - No command is being executed. +
  • TQFtp::ConnectToHost - connectToHost() is being executed. +
  • TQFtp::Login - login() is being executed. +
  • TQFtp::Close - close() is being executed. +
  • TQFtp::List - list() is being executed. +
  • TQFtp::Cd - cd() is being executed. +
  • TQFtp::Get - get() is being executed. +
  • TQFtp::Put - put() is being executed. +
  • TQFtp::Remove - remove() is being executed. +
  • TQFtp::Mkdir - mkdir() is being executed. +
  • TQFtp::Rmdir - rmdir() is being executed. +
  • TQFtp::Rename - rename() is being executed. +
  • TQFtp::RawCommand - rawCommand() is being executed. +

See also currentCommand(). + +

TQFtp::Error

+ +

This enum identifies the error that occurred. +

    +
  • TQFtp::NoError - No error occurred. +
  • TQFtp::HostNotFound - The host name lookup failed. +
  • TQFtp::ConnectionRefused - The server refused the connection. +
  • TQFtp::NotConnected - Tried to send a command, but there is no connection to +a server. +
  • TQFtp::UnknownError - An error other than those specified above +occurred. +

See also error(). + +

TQFtp::State

+ +

This enum defines the connection state: +

    +
  • TQFtp::Unconnected - There is no connection to the host. +
  • TQFtp::HostLookup - A host name lookup is in progress. +
  • TQFtp::Connecting - An attempt to connect to the host is in progress. +
  • TQFtp::Connected - Connection to the host has been achieved. +
  • TQFtp::LoggedIn - Connection and user login have been achieved. +
  • TQFtp::Closing - The connection is closing down, but it is not yet +closed. (The state will be Unconnected when the connection is +closed.) +

See also stateChanged() and state(). + +


Member Function Documentation

+

TQFtp::TQFtp () +

+Constructs a TQFtp object. + +

TQFtp::TQFtp ( TQObject * parent, const char * name = 0 ) +

+Constructs a TQFtp object. The parent and name parameters +are passed to the TQObject constructor. + +

TQFtp::~TQFtp () [virtual] +

+Destructor. + +

void TQFtp::abort () [slot] +

+Aborts the current command and deletes all scheduled commands. +

If there is an unfinished command (i.e. a command for which the +commandStarted() signal has been emitted, but for which the +commandFinished() signal has not been emitted), this function +sends an ABORT command to the server. When the server replies +that the command is aborted, the commandFinished() signal with the +error argument set to TRUE is emitted for the command. Due +to timing issues, it is possible that the command had already +finished before the abort request reached the server, in which +case, the commandFinished() signal is emitted with the error +argument set to FALSE. +

For all other commands that are affected by the abort(), no +signals are emitted. +

If you don't start further FTP commands directly after the +abort(), there won't be any scheduled commands and the done() +signal is emitted. +

Warning: Some FTP servers, for example the BSD FTP daemon (version +0.3), wrongly return a positive reply even when an abort has +occurred. For these servers the commandFinished() signal has its +error flag set to FALSE, even though the command did not +complete successfully. +

See also clearPendingCommands(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

Q_ULONG TQFtp::bytesAvailable () const +

+Returns the number of bytes that can be read from the data socket +at the moment. +

See also get(), readyRead(), readBlock(), and readAll(). + +

int TQFtp::cd ( const TQString & dir ) +

+Changes the working directory of the server to dir. +

The function does not block and returns immediately. The command +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +commandStarted() and commandFinished(). +

When the command is started the commandStarted() signal is +emitted. When it is finished the commandFinished() signal is +emitted. +

See also commandStarted() and commandFinished(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

void TQFtp::clearPendingCommands () +

+Deletes all pending commands from the list of scheduled commands. +This does not affect the command that is being executed. If you +want to stop this this as well, use abort(). +

See also hasPendingCommands() and abort(). + +

int TQFtp::close () +

+Closes the connection to the FTP server. +

The stateChanged() signal is emitted when the state of the +connecting process changes, e.g. to Closing, then Unconnected. +

The function does not block and returns immediately. The command +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +commandStarted() and commandFinished(). +

When the command is started the commandStarted() signal is +emitted. When it is finished the commandFinished() signal is +emitted. +

See also stateChanged(), commandStarted(), and commandFinished(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

void TQFtp::commandFinished ( int id, bool error ) [signal] +

+ +

This signal is emitted when processing the command identified by +id has finished. error is TRUE if an error occurred during +the processing; otherwise error is FALSE. +

See also commandStarted(), done(), error(), and errorString(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

void TQFtp::commandStarted ( int id ) [signal] +

+ +

This signal is emitted when processing the command identified by +id starts. +

See also commandFinished() and done(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

int TQFtp::connectToHost ( const TQString & host, Q_UINT16 port = 21 ) +

+Connects to the FTP server host using port port. +

The stateChanged() signal is emitted when the state of the +connecting process changes, e.g. to HostLookup, then Connecting, then Connected. +

The function does not block and returns immediately. The command +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +commandStarted() and commandFinished(). +

When the command is started the commandStarted() signal is +emitted. When it is finished the commandFinished() signal is +emitted. +

See also stateChanged(), commandStarted(), and commandFinished(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

Command TQFtp::currentCommand () const +

+Returns the command type of the FTP command being executed or None if there is no command being executed. +

See also currentId(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

TQIODevice * TQFtp::currentDevice () const +

+Returns the TQIODevice pointer that is used by the FTP command to read data +from or store data to. If there is no current FTP command being executed or +if the command does not use an IO device, this function returns 0. +

This function can be used to delete the TQIODevice in the slot connected to +the commandFinished() signal. +

See also get() and put(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

int TQFtp::currentId () const +

+Returns the identifier of the FTP command that is being executed +or 0 if there is no command being executed. +

See also currentCommand(). + +

void TQFtp::dataTransferProgress ( int done, int total ) [signal] +

+ +

This signal is emitted in response to a get() or put() request to +indicate the current progress of the download or upload. +

done is the amount of data that has already been transferred +and total is the total amount of data to be read or written. It +is possible that the TQFtp class is not able to determine the total +amount of data that should be transferred, in which case total +is 0. (If you connect this signal to a TQProgressBar, the progress +bar shows a busy indicator if the total is 0). +

Warning: done and total are not necessarily the size in +bytes, since for large files these values might need to be +"scaled" to avoid overflow. +

See also get(), put(), and TQProgressBar::progress. + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

void TQFtp::done ( bool error ) [signal] +

+ +

This signal is emitted when the last pending command has finished; +(it is emitted after the last command's commandFinished() signal). +error is TRUE if an error occurred during the processing; +otherwise error is FALSE. +

See also commandFinished(), error(), and errorString(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

Error TQFtp::error () const +

+Returns the last error that occurred. This is useful to find out +what when wrong when receiving a commandFinished() or a done() +signal with the error argument set to TRUE. +

If you start a new command, the error status is reset to NoError. + +

TQString TQFtp::errorString () const +

+Returns a human-readable description of the last error that +occurred. This is useful for presenting a error message to the +user when receiving a commandFinished() or a done() signal with +the error argument set to TRUE. +

The error string is often (but not always) the reply from the +server, so it is not always possible to translate the string. If +the message comes from TQt, the string has already passed through +tr(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

int TQFtp::get ( const TQString & file, TQIODevice * dev = 0 ) +

+Downloads the file file from the server. +

If dev is 0, then the readyRead() signal is emitted when there +is data available to read. You can then read the data with the +readBlock() or readAll() functions. +

If dev is not 0, the data is written directly to the device dev. Make sure that the dev pointer is valid for the duration +of the operation (it is safe to delete it when the +commandFinished() signal is emitted). In this case the readyRead() +signal is not emitted and you cannot read data with the +readBlock() or readAll() functions. +

If you don't read the data immediately it becomes available, i.e. +when the readyRead() signal is emitted, it is still available +until the next command is started. +

For example, if you want to present the data to the user as soon +as there is something available, connect to the readyRead() signal +and read the data immediately. On the other hand, if you only want +to work with the complete data, you can connect to the +commandFinished() signal and read the data when the get() command +is finished. +

The function does not block and returns immediately. The command +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +commandStarted() and commandFinished(). +

When the command is started the commandStarted() signal is +emitted. When it is finished the commandFinished() signal is +emitted. +

See also readyRead(), dataTransferProgress(), commandStarted(), and commandFinished(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

bool TQFtp::hasPendingCommands () const +

+Returns TRUE if there are any commands scheduled that have not yet +been executed; otherwise returns FALSE. +

The command that is being executed is not considered as a +scheduled command. +

See also clearPendingCommands(), currentId(), and currentCommand(). + +

int TQFtp::list ( const TQString & dir = TQString::null ) +

+Lists the contents of directory dir on the FTP server. If dir is empty, it lists the contents of the current directory. +

The listInfo() signal is emitted for each directory entry found. +

The function does not block and returns immediately. The command +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +commandStarted() and commandFinished(). +

When the command is started the commandStarted() signal is +emitted. When it is finished the commandFinished() signal is +emitted. +

See also listInfo(), commandStarted(), and commandFinished(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

void TQFtp::listInfo ( const TQUrlInfo & i ) [signal] +

+ +

This signal is emitted for each directory entry the list() command +finds. The details of the entry are stored in i. +

See also list(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

int TQFtp::login ( const TQString & user = TQString::null, const TQString & password = TQString::null ) +

+Logs in to the FTP server with the username user and the +password password. +

The stateChanged() signal is emitted when the state of the +connecting process changes, e.g. to LoggedIn. +

The function does not block and returns immediately. The command +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +commandStarted() and commandFinished(). +

When the command is started the commandStarted() signal is +emitted. When it is finished the commandFinished() signal is +emitted. +

See also commandStarted() and commandFinished(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

int TQFtp::mkdir ( const TQString & dir ) +

+Creates a directory called dir on the server. +

The function does not block and returns immediately. The command +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +commandStarted() and commandFinished(). +

When the command is started the commandStarted() signal is +emitted. When it is finished the commandFinished() signal is +emitted. +

See also commandStarted() and commandFinished(). + +

int TQFtp::put ( TQIODevice * dev, const TQString & file ) +

+Reads the data from the IO device dev, and writes it to the +file called file on the server. The data is read in chunks from +the IO device, so this overload allows you to transmit large +amounts of data without the need to read all the data into memory +at once. +

Make sure that the dev pointer is valid for the duration of the +operation (it is safe to delete it when the commandFinished() is +emitted). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

int TQFtp::put ( const TQByteArray & data, const TQString & file ) +

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

Writes the data data to the file called file on the server. +The progress of the upload is reported by the +dataTransferProgress() signal. +

The function does not block and returns immediately. The command +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +commandStarted() and commandFinished(). +

When the command is started the commandStarted() signal is +emitted. When it is finished the commandFinished() signal is +emitted. +

See also dataTransferProgress(), commandStarted(), and commandFinished(). + +

int TQFtp::rawCommand ( const TQString & command ) +

+Sends the raw FTP command command to the FTP server. This is +useful for low-level FTP access. If the operation you wish to +perform has an equivalent TQFtp function, we recommend using the +function instead of raw FTP commands since the functions are +easier and safer. +

The function does not block and returns immediately. The command +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +commandStarted() and commandFinished(). +

When the command is started the commandStarted() signal is +emitted. When it is finished the commandFinished() signal is +emitted. +

See also rawCommandReply(), commandStarted(), and commandFinished(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

void TQFtp::rawCommandReply ( int replyCode, const TQString & detail ) [signal] +

+ +

This signal is emitted in response to the rawCommand() function. +replyCode is the 3 digit reply code and detail is the text +that follows the reply code. +

See also rawCommand(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

TQByteArray TQFtp::readAll () +

+Reads all the bytes available from the data socket and returns +them. +

See also get(), readyRead(), bytesAvailable(), and readBlock(). + +

Q_LONG TQFtp::readBlock ( char * data, Q_ULONG maxlen ) +

+Reads maxlen bytes from the data socket into data and +returns the number of bytes read. Returns -1 if an error occurred. +

See also get(), readyRead(), bytesAvailable(), and readAll(). + +

void TQFtp::readyRead () [signal] +

+ +

This signal is emitted in response to a get() command when there +is new data to read. +

If you specify a device as the second argument in the get() +command, this signal is not emitted; instead the data is +written directly to the device. +

You can read the data with the readAll() or readBlock() functions. +

This signal is useful if you want to process the data in chunks as +soon as it becomes available. If you are only interested in the +complete data, just connect to the commandFinished() signal and +read the data then instead. +

See also get(), readBlock(), readAll(), and bytesAvailable(). + +

int TQFtp::remove ( const TQString & file ) +

+Deletes the file called file from the server. +

The function does not block and returns immediately. The command +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +commandStarted() and commandFinished(). +

When the command is started the commandStarted() signal is +emitted. When it is finished the commandFinished() signal is +emitted. +

See also commandStarted() and commandFinished(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

int TQFtp::rename ( const TQString & oldname, const TQString & newname ) +

+Renames the file called oldname to newname on the server. +

The function does not block and returns immediately. The command +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +commandStarted() and commandFinished(). +

When the command is started the commandStarted() signal is +emitted. When it is finished the commandFinished() signal is +emitted. +

See also commandStarted() and commandFinished(). + +

int TQFtp::rmdir ( const TQString & dir ) +

+Removes the directory called dir from the server. +

The function does not block and returns immediately. The command +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +commandStarted() and commandFinished(). +

When the command is started the commandStarted() signal is +emitted. When it is finished the commandFinished() signal is +emitted. +

See also commandStarted() and commandFinished(). + +

State TQFtp::state () const +

+Returns the current state of the object. When the state changes, +the stateChanged() signal is emitted. +

See also State and stateChanged(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

void TQFtp::stateChanged ( int state ) [signal] +

+ +

This signal is emitted when the state of the connection changes. +The argument state is the new state of the connection; it is +one of the State values. +

It is usually emitted in response to a connectToHost() or close() +command, but it can also be emitted "spontaneously", e.g. when the +server closes the connection unexpectedly. +

See also connectToHost(), close(), state(), and State. + +

Example: network/ftpclient/ftpmainwindow.ui.h. + +


+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/qgb18030codec-h.html b/doc/html/qgb18030codec-h.html new file mode 100644 index 00000000..635e2458 --- /dev/null +++ b/doc/html/qgb18030codec-h.html @@ -0,0 +1,160 @@ + + + + + +qgb18030codec.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qgb18030codec.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qgb18030codec.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQGb18030Codec 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 retquirements 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.
+**
+**********************************************************************/
+
+// Contributed by James Su <suzhe@gnuchina.org>
+
+#ifndef TQGB18030CODEC_H
+#define TQGB18030CODEC_H
+
+#ifndef QT_H
+#include "qtextcodec.h"
+#endif // QT_H
+
+
+#ifndef QT_NO_BIG_CODECS
+
+#if defined(QT_PLUGIN)
+#define Q_EXPORT_CODECS_CN
+#else
+#define Q_EXPORT_CODECS_CN Q_EXPORT
+#endif
+
+class Q_EXPORT_CODECS_CN TQGb18030Codec : public TQTextCodec {
+public:
+    TQGb18030Codec();
+
+    int mibEnum() const;
+    const char* name() const;
+
+    TQTextDecoder* makeDecoder() const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQTextCodec::fromUnicode;
+#endif
+    TQCString fromUnicode(const TQString& uc, int& lenInOut) const;
+    TQString toUnicode(const char* chars, int len) const;
+
+    int heuristicContentMatch(const char* chars, int len) const;
+    int heuristicNameMatch(const char* hint) const;
+};
+
+class Q_EXPORT_CODECS_CN TQGbkCodec : public TQGb18030Codec {
+public:
+    TQGbkCodec();
+
+    int mibEnum() const;
+    const char* name() const;
+
+    TQTextDecoder* makeDecoder() const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQGb18030Codec::fromUnicode;
+#endif
+    TQCString fromUnicode(const TQString& uc, int& lenInOut) const;
+    TQString toUnicode(const char* chars, int len) const;
+
+    int heuristicContentMatch(const char* chars, int len) const;
+    int heuristicNameMatch(const char* hint) const;
+};
+
+class Q_EXPORT_CODECS_CN TQGb2312Codec : public TQGb18030Codec {
+public:
+    TQGb2312Codec();
+
+    int mibEnum() const;
+    const char* name() const;
+
+    TQTextDecoder* makeDecoder() const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQGb18030Codec::fromUnicode;
+#endif
+    TQCString fromUnicode(const TQString& uc, int& lenInOut) const;
+    TQString toUnicode(const char* chars, int len) const;
+
+    int heuristicContentMatch(const char* chars, int len) const;
+    int heuristicNameMatch(const char* hint) const;
+};
+
+#endif
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgb18030codec-members.html b/doc/html/qgb18030codec-members.html new file mode 100644 index 00000000..266f3b20 --- /dev/null +++ b/doc/html/qgb18030codec-members.html @@ -0,0 +1,71 @@ + + + + + +TQGb18030Codec Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGb18030Codec

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgb18030codec.html b/doc/html/qgb18030codec.html new file mode 100644 index 00000000..986c9417 --- /dev/null +++ b/doc/html/qgb18030codec.html @@ -0,0 +1,119 @@ + + + + + +TQGb18030Codec Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGb18030Codec Class Reference

+ +

The TQGb18030Codec class provides conversion to and from the Chinese +GB18030/GBK/GB2312 encoding. +More... +

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

+

#include <qgb18030codec.h> +

Inherits TQTextCodec. +

Inherited by TQGbkCodec and TQGb2312Codec. +

List of all member functions. +


Detailed Description

+ + + +

The TQGb18030Codec class provides conversion to and from the Chinese +GB18030/GBK/GB2312 encoding. +

+

GBK, formally the Chinese Internal Code Specification, is a commonly +used extension of GB 2312-80. Microsoft Windows uses it under the +name codepage 936. +

GBK has been superceded by the new Chinese national standard +GB 18030-2000, which added a 4-byte encoding while remaining +compatible with GB2312 and GBK. The new GB 18030-2000 may be described +as a special encoding of Unicode 3.x and ISO-10646-1. +

Special thanks to charset gurus Markus Scherer (IBM), +Dirk Meyer (Adobe Systems) and Ken Lunde (Adobe Systems) for publishing +an excellent GB 18030-2000 summary and specification on the Internet. +Some must-read documents are: +

+

The GBK codec was contributed to TQt by +Justin Yu <justiny@turbolinux.com.cn> and +Sean Chen <seanc@turbolinux.com.cn>. They may also be reached at +Yu Mingjian <yumj@sun.ihep.ac.cn>, <yumingjian@china.com> +Chen Xiangyang <chenxy@sun.ihep.ac.cn> +

The GB18030 codec TQt functions were contributed to TQt by +James Su <suzhe@gnuchina.org>, <suzhe@turbolinux.com.cn> +who pioneered much of GB18030 development on GNU/Linux systems. +

The GB18030 codec was contributed to TQt by +Anthony Fok <anthony@thizlinux.com>, <foka@debian.org> +using a Perl script to generate C++ tables from gb-18030-2000.xml +while merging contributions from James Su, Justin Yu and Sean Chen. +A copy of the source Perl script is available at: +

http://people.debian.org/~foka/gb18030/gen-qgb18030codec.pl +

The copyright notice for their code follows: +

+

Copyright (C) 2000 TurboLinux, Inc. Written by Justin Yu and Sean Chen. +Copyright (C) 2001, 2002 Turbolinux, Inc. Written by James Su. +Copyright (C) 2001, 2002 ThizLinux Laboratory Ltd. Written by Anthony Fok. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. +

See also Internationalization with TQt. + + +


+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/qgb2312codec-members.html b/doc/html/qgb2312codec-members.html new file mode 100644 index 00000000..e84b9292 --- /dev/null +++ b/doc/html/qgb2312codec-members.html @@ -0,0 +1,71 @@ + + + + + +TQGb2312Codec Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGb2312Codec

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgb2312codec.html b/doc/html/qgb2312codec.html new file mode 100644 index 00000000..8d8377fb --- /dev/null +++ b/doc/html/qgb2312codec.html @@ -0,0 +1,62 @@ + + + + + +TQGb2312Codec Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGb2312Codec Class Reference

+ +

The TQGb2312Codec class provides conversion to and from the Chinese +GB2312 encoding. +More... +

#include <qgb18030codec.h> +

Inherits TQGb18030Codec. +

List of all member functions. +


Detailed Description

+ + +

The TQGb2312Codec class provides conversion to and from the Chinese +GB2312 encoding. +

The GB2312 encoding has been superceded by the GB18030 encoding and +GB18030 is backward compatible to GB2312. For this reason the TQGb2312Codec +class is implemented in terms of the GB18030 codec and uses its +0xA1A1-0xFEFE subset for conversion from and to Unicode. +

The TQGb2312Codec is kept mainly for compatibility reasons with older software. +

See also Internationalization with TQt. + + +


+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/qgbkcodec-members.html b/doc/html/qgbkcodec-members.html new file mode 100644 index 00000000..1b600d0f --- /dev/null +++ b/doc/html/qgbkcodec-members.html @@ -0,0 +1,71 @@ + + + + + +TQGbkCodec Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGbkCodec

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgbkcodec.html b/doc/html/qgbkcodec.html new file mode 100644 index 00000000..068a5b6b --- /dev/null +++ b/doc/html/qgbkcodec.html @@ -0,0 +1,67 @@ + + + + + +TQGbkCodec Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGbkCodec Class Reference

+ +

The TQGbkCodec class provides conversion to and from the Chinese +GBK encoding. +More... +

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

+

#include <qgb18030codec.h> +

Inherits TQGb18030Codec. +

List of all member functions. +


Detailed Description

+ + + +

The TQGbkCodec class provides conversion to and from the Chinese +GBK encoding. +

GBK, formally the Chinese Internal Code Specification, is a commonly +used extension of GB 2312-80. Microsoft Windows uses it under the +name code page 936. +

The GBK encoding has been superceded by the GB18030 encoding and +GB18030 is backward compatible to GBK. For this reason the TQGbkCodec class +is implemented in terms of the GB18030 codec and uses its 1-byte and +2-byte portion for conversion from and to Unicode. +

The TQGbkCodec is kept mainly for compatibility reasons with older software. +

See also Internationalization with TQt. + + +


+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/qgfx_qws-h.html b/doc/html/qgfx_qws-h.html new file mode 100644 index 00000000..4551ca62 --- /dev/null +++ b/doc/html/qgfx_qws-h.html @@ -0,0 +1,493 @@ + + + + + +qgfx_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qgfx_qws.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qgfx_qws.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQGfx (graphics context) class
+**
+** Created : 940721
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQGFX_QWS_H
+#define TQGFX_QWS_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qnamespace.h"
+#include "qimage.h"
+#include "qfontmanager_qws.h"
+#include "qmemorymanager_qws.h"
+#include "qpoint.h"
+#endif // QT_H
+
+#include <private/qtextengine_p.h>
+
+class TQScreenCursor;
+
+#if !defined( QT_NO_IMAGE_16_BIT ) || !defined( QT_NO_QWS_DEPTH_16 )
+# ifndef QT_QWS_DEPTH16_RGB
+#  define QT_QWS_DEPTH16_RGB 565
+# endif
+static const int qt_rbits = (QT_QWS_DEPTH16_RGB/100);
+static const int qt_gbits = (QT_QWS_DEPTH16_RGB/10%10);
+static const int qt_bbits = (QT_QWS_DEPTH16_RGB%10);
+static const int qt_red_shift = qt_bbits+qt_gbits-(8-qt_rbits);
+static const int qt_green_shift = qt_bbits-(8-qt_gbits);
+static const int qt_neg_blue_shift = 8-qt_bbits;
+static const int qt_blue_mask = (1<<qt_bbits)-1;
+static const int qt_green_mask = (1<<(qt_gbits+qt_bbits))-((1<<qt_bbits)-1);
+static const int qt_red_mask = (1<<(qt_rbits+qt_gbits+qt_bbits))-(1<<(qt_gbits+qt_bbits));
+
+inline ushort qt_convRgbTo16( const int r, const int g, const int b )
+{
+    const int tr = r << qt_red_shift;
+    const int tg = g << qt_green_shift;
+    const int tb = b >> qt_neg_blue_shift;
+
+    return (tb & qt_blue_mask) | (tg & qt_green_mask) | (tr & qt_red_mask);
+}
+
+inline ushort qt_convRgbTo16( TQRgb c )
+{
+    const int tr = qRed(c) << qt_red_shift;
+    const int tg = qGreen(c) << qt_green_shift;
+    const int tb = qBlue(c) >> qt_neg_blue_shift;
+
+    return (tb & qt_blue_mask) | (tg & qt_green_mask) | (tr & qt_red_mask);
+}
+
+inline TQRgb qt_conv16ToRgb( ushort c )
+{
+    const int r=(c & qt_red_mask);
+    const int g=(c & qt_green_mask);
+    const int b=(c & qt_blue_mask);
+    const int tr = r >> qt_red_shift;
+    const int tg = g >> qt_green_shift;
+    const int tb = b << qt_neg_blue_shift;
+
+    return qRgb(tr,tg,tb);
+}
+
+inline void qt_conv16ToRgb( ushort c, int& r, int& g, int& b )
+{
+    const int tr=(c & qt_red_mask);
+    const int tg=(c & qt_green_mask);
+    const int tb=(c & qt_blue_mask);
+    r = tr >> qt_red_shift;
+    g = tg >> qt_green_shift;
+    b = tb << qt_neg_blue_shift;
+}
+#endif
+
+
+const int SourceSolid=0;
+const int SourcePixmap=1;
+
+#ifndef QT_NO_QWS_CURSOR
+
+extern bool qt_sw_cursor;
+
+class TQGfxRasterBase;
+
+#define SW_CURSOR_DATA_SIZE	4096  // 64x64 8-bit cursor
+
+struct SWCursorData {
+    unsigned char cursor[SW_CURSOR_DATA_SIZE];
+    unsigned char under[SW_CURSOR_DATA_SIZE*4]; // room for 32bpp display
+    TQRgb clut[256];
+    unsigned char translut[256];
+    int colors;
+    int width;
+    int height;
+    int x;
+    int y;
+    int hotx;
+    int hoty;
+    bool enable;
+    TQRect bound;
+};
+
+
+class TQScreenCursor
+{
+public:
+    TQScreenCursor( );
+    virtual ~TQScreenCursor();
+
+    virtual void init(SWCursorData *da, bool init = FALSE);
+
+    virtual void set( const TQImage &image, int hotx, int hoty );
+    virtual void move( int x, int y );
+    virtual void show();
+    virtual void hide();
+
+    virtual bool restoreUnder( const TQRect &r, TQGfxRasterBase *g = 0 );
+    virtual void saveUnder();
+    virtual void drawCursor();
+    //void draw();
+    virtual bool supportsAlphaCursor();
+
+    static bool enabled() { return qt_sw_cursor; }
+
+protected:
+    TQGfxRasterBase *gfx;
+    TQGfxRasterBase *gfxunder;
+
+    TQImage *imgunder;
+    TQImage *cursor;
+
+    uchar *fb_start;
+    uchar *fb_end;
+    bool save_under;
+    SWCursorData *data;
+
+    int clipWidth;
+    int clipHeight;
+    int myoffset;
+
+};
+
+extern TQScreenCursor * qt_screencursor;
+
+#endif // QT_NO_QWS_CURSOR
+
+struct fb_cmap;
+
+// A (used) chunk of offscreen memory
+
+class TQPoolEntry
+{
+public:
+    unsigned int start;
+    unsigned int end;
+    int clientId;
+};
+
+class TQScreen;
+typedef void(*ClearCacheFunc)(TQScreen *obj, int);
+
+class TQScreen {
+
+public:
+
+    TQScreen( int display_id );
+    virtual ~TQScreen();
+    virtual bool initDevice() = 0;
+    virtual bool connect( const TQString &displaySpec ) = 0;
+    virtual void disconnect() = 0;
+    virtual int initCursor(void *, bool=FALSE);
+    virtual void shutdownDevice();
+    virtual void setMode(int,int,int) = 0;
+    virtual bool supportsDepth(int) const;
+    virtual TQGfx * createGfx(unsigned char *,int,int,int,int);
+    virtual TQGfx * screenGfx();
+    virtual void save();
+    virtual void restore();
+    virtual void blank(bool on);
+
+    virtual int pixmapOffsetAlignment() { return 64; }
+    virtual int pixmapLinestepAlignment() { return 64; }
+    virtual int sharedRamSize(void *) { return 0; }
+
+    virtual bool onCard(unsigned char *) const;
+    virtual bool onCard(unsigned char *, ulong& out_offset) const;
+
+    // sets a single color in the colormap
+    virtual void set(unsigned int,unsigned int,unsigned int,unsigned int);
+    // allocates a color
+    virtual int alloc(unsigned int,unsigned int,unsigned int);
+
+    int width() const { return w; }
+    int height() const { return h; }
+    int depth() const { return d; }
+    virtual int pixmapDepth() const;
+    int pixelType() const { return pixeltype; }
+    int linestep() const { return lstep; }
+    int deviceWidth() const { return dw; }
+    int deviceHeight() const { return dh; }
+    uchar * base() const { return data; }
+    // Ask for memory from card cache with alignment
+    virtual uchar * cache(int,int) { return 0; }
+    virtual void uncache(uchar *) {}
+
+    int screenSize() const { return size; }
+    int totalSize() const { return mapsize; }
+
+    TQRgb * clut() { return screenclut; }
+    int numCols() { return screencols; }
+
+    virtual TQSize mapToDevice( const TQSize & ) const;
+    virtual TQSize mapFromDevice( const TQSize & ) const;
+    virtual TQPoint mapToDevice( const TQPoint &, const TQSize & ) const;
+    virtual TQPoint mapFromDevice( const TQPoint &, const TQSize & ) const;
+    virtual TQRect mapToDevice( const TQRect &, const TQSize & ) const;
+    virtual TQRect mapFromDevice( const TQRect &, const TQSize & ) const;
+    virtual TQImage mapToDevice( const TQImage & ) const;
+    virtual TQImage mapFromDevice( const TQImage & ) const;
+    virtual TQRegion mapToDevice( const TQRegion &, const TQSize & ) const;
+    virtual TQRegion mapFromDevice( const TQRegion &, const TQSize & ) const;
+    virtual int transformOrientation() const;
+    virtual bool isTransformed() const;
+    virtual bool isInterlaced() const;
+
+    virtual void setDirty( const TQRect& );
+
+    virtual int memoryNeeded(const TQString&);
+
+    int * opType() { return screen_optype; }
+    int * lastOp() { return screen_lastop; }
+
+    virtual void haltUpdates();
+    virtual void resumeUpdates();
+
+protected:
+
+    // Only used without QT_NO_QWS_REPEATER, but included so that
+    // it's binary compatible regardless.
+    int * screen_optype;
+    int * screen_lastop;
+
+    TQRgb screenclut[256];
+    int screencols;
+
+    bool initted;
+
+    uchar * data;
+
+    // Table of allocated lumps, kept in sorted highest-to-lowest order
+    // The table itself is allocated at the bottom of offscreen memory
+    // i.e. it's similar to having a stack (the table) and a heap
+    // (the allocated blocks). Freed space is implicitly described
+    // by the gaps between the allocated lumps (this saves entries and
+    // means we don't need to worry about coalescing freed lumps)
+
+    TQPoolEntry * entries;
+    int * entryp;
+    unsigned int * lowest;
+
+    int w;
+    int lstep;
+    int h;
+    int d;
+    int pixeltype;
+    bool grayscale;
+
+    int dw;
+    int dh;
+
+    int hotx;
+    int hoty;
+    TQImage cursor;
+
+    int size;	       // Screen size
+    int mapsize;       // Total mapped memory
+
+    int displayId;
+
+    friend class TQWSServer;
+    static ClearCacheFunc clearCacheFunc;
+};
+
+extern TQScreen * qt_screen;
+
+class Q_EXPORT TQGfx : public TQt {
+public:
+    // With loadable drivers, do probe here
+    static TQGfx *createGfx( int depth, unsigned char *buffer,
+			    int w, int h, int linestep );
+
+    virtual ~TQGfx() {}
+
+    virtual void setPen( const TQPen & )=0;
+    virtual void setBrush( const TQBrush & )=0;
+    virtual void setBrushPixmap( const TQPixmap * )=0;
+    virtual void setBrushOffset( int, int ) = 0;
+    virtual void setClipRect( int,int,int,int )=0;
+    virtual void setClipRegion( const TQRegion & )=0;
+    virtual void setClipDeviceRegion( const TQRegion & )=0;
+    virtual void setClipping (bool)=0;
+    // These will be called from qwidget_qws or qwidget_mac
+    // to update the drawing area when a widget is moved
+    virtual void setOffset( int,int )=0;
+    virtual void setWidgetRect( int,int,int,int )=0;
+    virtual void setWidgetRegion( const TQRegion & )=0;
+    virtual void setWidgetDeviceRegion( const TQRegion & )=0;
+    virtual void setSourceWidgetOffset(int x, int y) = 0;
+    virtual void setGlobalRegionIndex( int idx ) = 0;
+
+    virtual void setDashedLines(bool d) = 0;
+    virtual void setDashes(char *, int) = 0;
+
+    virtual void setOpaqueBackground(bool b)=0;
+    virtual void setBackgroundColor(TQColor c)=0;
+
+    // Drawing operations
+    virtual void drawPoint( int,int )=0;
+    virtual void drawPoints( const TQPointArray &,int,int )=0;
+    virtual void moveTo( int,int )=0;
+    virtual void lineTo( int,int )=0;
+    virtual void drawLine( int,int,int,int )=0;
+    virtual void drawPolyline( const TQPointArray &,int,int )=0;
+
+    // current position
+    virtual TQPoint pos() const = 0;
+
+    // Fill operations - these use the current source (pixmap,
+    // color, etc), and draws outline
+    virtual void fillRect( int,int,int,int )=0;
+    virtual void drawPolygon( const TQPointArray &,bool,int,int )=0;
+
+    virtual void setLineStep(int)=0;
+
+    // Special case of rect-with-pixmap-fill for speed/hardware acceleration
+    virtual void blt( int,int,int,int,int,int )=0;
+    virtual void scroll( int,int,int,int,int,int )=0;
+
+#if !defined(QT_NO_MOVIE) || !defined(QT_NO_TRANSFORMATIONS) || !defined(QT_NO_PIXMAP_TRANSFORMATION)
+    virtual void stretchBlt( int,int,int,int,int,int )=0;
+#endif
+    virtual void tiledBlt( int,int,int,int )=0;
+
+    enum SourceType { SourcePen, SourceImage, SourceAccel };
+    enum PixelType { NormalPixel, BGRPixel };
+
+    // Setting up source data - can be solid color or pixmap data
+    virtual void setSource(const TQPaintDevice *)=0;
+    virtual void setSource(const TQImage *)=0;
+    virtual void setSource(unsigned char *,int,int,int,int,TQRgb *,int);
+    // This one is pen
+    virtual void setSourcePen()=0;
+
+    virtual void drawAlpha(int,int,int,int,int,int,int,int) {}
+
+    virtual void hsync(int) {}
+
+    // These apply only to blt's. For alpha values for general
+    // drawing operations we should probably have a separate TQGfx
+    // class. It's not a high priority though.
+
+    // Enum values: Ignore alpha information, alpha information encoded in
+    // 32-bit rgba along with colors, alpha information in 8bpp
+    // format in alphabits
+
+    enum AlphaType { IgnoreAlpha, InlineAlpha, SeparateAlpha,
+                     LittleEndianMask, BigEndianMask, SolidAlpha };
+
+    // Can be no alpha, inline (32bit data), separate (for images),
+    // LittleEndianMask/BigEndianMask 1bpp masks, constant alpha
+    // value
+    virtual void setAlphaType(AlphaType)=0;
+    // Pointer to data, linestep
+    virtual void setAlphaSource(unsigned char *,int)=0;
+    virtual void setAlphaSource(int,int=-1,int=-1,int=-1)=0;
+
+    virtual void drawGlyphs( TQMemoryManager::FontID font, glyph_t *glyphs, TQPoint *positions, int num_glyphs ) = 0;
+
+    virtual void setClut(TQRgb *,int)=0;
+
+    // Save and restore pen and brush state - necessary when setting
+    // up a bitBlt for example
+    virtual void save()=0;
+    virtual void restore()=0;
+
+    virtual void setRop(RasterOp)=0;
+    virtual void setScreen(TQScreen *,TQScreenCursor *,bool,int *,int *);
+    void setShared(void * v) { shared_data=v; }
+    bool isScreenGfx() { return is_screen_gfx; } //for cursor..
+
+protected:
+    bool is_screen_gfx;
+    void * shared_data;
+
+};
+
+
+// This lives in loadable modules
+
+#ifndef QT_LOADABLE_MODULES
+extern "C" TQScreen * qt_get_screen( int display_id, const char* spec );
+#endif
+
+// This is in main lib, loads the right module, calls qt_get_screen
+// In non-loadable cases just aliases to qt_get_screen
+
+const unsigned char * qt_probe_bus();
+
+#endif // TQGFX_QWS_H
+
+
+
+
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgfxdriverfactory-members.html b/doc/html/qgfxdriverfactory-members.html new file mode 100644 index 00000000..3805891a --- /dev/null +++ b/doc/html/qgfxdriverfactory-members.html @@ -0,0 +1,48 @@ + + + + + +TQGfxDriverFactory Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGfxDriverFactory

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgfxdriverfactory.html b/doc/html/qgfxdriverfactory.html new file mode 100644 index 00000000..68a0072c --- /dev/null +++ b/doc/html/qgfxdriverfactory.html @@ -0,0 +1,78 @@ + + + + + +TQGfxDriverFactory Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGfxDriverFactory Class Reference

+ +

The TQGfxDriverFactory class creates TQScreen objects for TQt/Embedded. +More... +

#include <qgfxdriverfactory_qws.h> +

List of all member functions. +

Static Public Members

+
    +
  • TQStringList keys ()
  • +
  • TQScreen * create ( const TQString & key, int displayId )
  • +
+

Detailed Description

+ + +The TQGfxDriverFactory class creates TQScreen objects for TQt/Embedded. +

The graphics driver factory creates a TQScreen object for a given +key with TQGfxDriverFactory::create(key). +

The drivers are either built-in or dynamically loaded from a +driver plugin (see TQGfxDriverPlugin). +

TQGfxDriverFactory::keys() returns a list of valid keys. TQt +currently ships with "LinuxFb". +

This class is only available in TQt/Embedded. + +


Member Function Documentation

+

TQScreen * TQGfxDriverFactory::create ( const TQString & key, int displayId ) [static] +

+Creates a TQScreen object of a type that matches key, and with +the ID, displayId. The TQScreen object returned may be from a +built-in driver, or from a driver plugin. +

See also keys(). + +

TQStringList TQGfxDriverFactory::keys () [static] +

+Returns the list of keys this factory can create drivers for. +

See also create(). + + +


+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/qgfxdriverfactory_qws-h.html b/doc/html/qgfxdriverfactory_qws-h.html new file mode 100644 index 00000000..66f2e1a7 --- /dev/null +++ b/doc/html/qgfxdriverfactory_qws-h.html @@ -0,0 +1,101 @@ + + + + + +qgfxdriverfactory_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qgfxdriverfactory_qws.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qgfxdriverfactory_qws.h   3.3.8   edited Jan 11 14:46 $
+**
+** ...
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQGFXDRIVERFACTORY_QWS_H
+#define TQGFXDRIVERFACTORY_QWS_H
+
+#ifndef QT_H
+#include "qstringlist.h"
+#endif // QT_H
+
+class TQString;
+class TQScreen;
+
+class Q_EXPORT TQGfxDriverFactory
+{
+public:
+#ifndef QT_NO_STRINGLIST
+    static TQStringList keys();
+#endif
+    static TQScreen *create( const TQString&, int );
+};
+
+#endif //TQGFXDRIVERFACTORY_QWS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgfxdriverplugin-members.html b/doc/html/qgfxdriverplugin-members.html new file mode 100644 index 00000000..aa34f976 --- /dev/null +++ b/doc/html/qgfxdriverplugin-members.html @@ -0,0 +1,50 @@ + + + + + +TQGfxDriverPlugin Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGfxDriverPlugin

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgfxdriverplugin.html b/doc/html/qgfxdriverplugin.html new file mode 100644 index 00000000..ead7bb17 --- /dev/null +++ b/doc/html/qgfxdriverplugin.html @@ -0,0 +1,97 @@ + + + + + +TQGfxDriverPlugin Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGfxDriverPlugin Class Reference

+ +

The TQGfxDriverPlugin class provides an abstract base for +TQt/Embedded graphics driver plugins. +More... +

#include <qgfxdriverplugin_qws.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQGfxDriverPlugin class provides an abstract base for +TQt/Embedded graphics driver plugins. +

+

The graphics driver plugin is a simple plugin interface that makes +it easy to create custom graphics drivers. +

Writing a graphics driver plugin is achieved by subclassing this +base class, reimplementing the pure virtual functions keys() and +create(), and exporting the class with the Q_EXPORT_PLUGIN +macro. See the Plugins + documentation for details. +

This class is only available in TQt/Embedded. +

See also Plugins. + +


Member Function Documentation

+

TQGfxDriverPlugin::TQGfxDriverPlugin () +

+Constructs a graphics driver plugin. This is invoked automatically +by the Q_EXPORT_PLUGIN macro. + +

TQGfxDriverPlugin::~TQGfxDriverPlugin () +

+Destroys the graphics driver plugin. +

You never have to call this explicitly. TQt destroys a plugin +automatically when it is no longer used. + +

TQScreen * TQGfxDriverPlugin::create ( const TQString & driver, int displayId ) [pure virtual] +

+ +

Creates a driver matching the type specified by driver, that +will use display displayId. +

See also keys(). + +

TQStringList TQGfxDriverPlugin::keys () const [pure virtual] +

+ +

Returns the list of graphics drivers this plugin supports. +

See also create(). + + +


+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/qgfxdriverplugin_qws-h.html b/doc/html/qgfxdriverplugin_qws-h.html new file mode 100644 index 00000000..9c3db4f4 --- /dev/null +++ b/doc/html/qgfxdriverplugin_qws-h.html @@ -0,0 +1,115 @@ + + + + + +qgfxdriverplugin_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qgfxdriverplugin_qws.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qgfxdriverplugin_qws.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQGfxDriverPlugin
+**
+** Created : 20020212
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQGFXDRIVERPLUGIN_QWS_H
+#define TQGFXDRIVERPLUGIN_QWS_H
+
+#ifndef QT_H
+#include "qgplugin.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_COMPONENT
+
+class TQScreen;
+class TQGfxDriverPluginPrivate;
+
+class Q_EXPORT TQGfxDriverPlugin : public TQGPlugin
+{
+    Q_OBJECT
+public:
+    TQGfxDriverPlugin();
+    ~TQGfxDriverPlugin();
+
+#ifndef QT_NO_STRINGLIST
+    virtual TQStringList keys() const = 0;
+#endif
+    virtual TQScreen* create( const TQString& driver, int displayId ) = 0;
+
+private:
+    TQGfxDriverPluginPrivate *d;
+};
+
+#endif // QT_NO_COMPONENT
+
+#endif // TQGFXDRIVERPLUGIN_QWS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgl-h.html b/doc/html/qgl-h.html new file mode 100644 index 00000000..2459aab6 --- /dev/null +++ b/doc/html/qgl-h.html @@ -0,0 +1,586 @@ + + + + + +qgl.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qgl.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qgl.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of OpenGL classes for TQt
+**
+** Created : 970112
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the opengl 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 retquirements 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 TQGL_H
+#define TQGL_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qglcolormap.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_OPENGL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_OPENGL
+#else
+#define TQM_EXPORT_OPENGL Q_EXPORT
+#endif
+
+#ifndef QT_NO_COMPAT
+#define TQGL_VERSION	450
+#define TQGL_VERSION_STR	"4.5"
+TQM_EXPORT_OPENGL inline const char *qGLVersion() {
+    qObsolete( 0, "qGLVersion", "qVersion" );
+    return TQGL_VERSION_STR;
+}
+#endif
+
+#if defined(Q_WS_WIN)
+# include "qt_windows.h"
+#endif
+
+#if defined(Q_WS_MAC)
+#if !defined( TQMAC_OPENGL_DOUBLEBUFFER )
+/* This macro is different now. If the macro is not defined TQGLWidget will
+ * try to determine when you need double buffering.  If set to 0 it will
+ * never double buffer and *can* be acclerated. If set to 1 (the default)
+ * it will always double buffer. Unlike before the value of this macro does
+ * not upset binary compatability either. */
+#if QT_MACOSX_VERSION >= 0x1020
+# define TQMAC_OPENGL_DOUBLEBUFFER 0
+#endif
+#endif
+# include <OpenGL/gl.h>
+# include <OpenGL/glu.h>
+#else
+# include <GL/gl.h>
+# include <GL/glu.h>
+#endif
+
+#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
+class TQGLCmap;
+#endif
+
+class TQPixmap;
+#if defined(Q_WS_X11)
+class TQGLOverlayWidget;
+#endif
+
+// Namespace class:
+class TQM_EXPORT_OPENGL TQGL
+{
+public:
+    enum FormatOption {
+	DoubleBuffer		= 0x0001,
+	DepthBuffer		= 0x0002,
+	Rgba			= 0x0004,
+	AlphaChannel		= 0x0008,
+	AccumBuffer		= 0x0010,
+	StencilBuffer		= 0x0020,
+	StereoBuffers		= 0x0040,
+	DirectRendering		= 0x0080,
+	HasOverlay		= 0x0100,
+	SingleBuffer            = DoubleBuffer  << 16,
+	NoDepthBuffer           = DepthBuffer   << 16,
+	ColorIndex              = Rgba          << 16,
+	NoAlphaChannel          = AlphaChannel  << 16,
+	NoAccumBuffer           = AccumBuffer   << 16,
+	NoStencilBuffer         = StencilBuffer << 16,
+	NoStereoBuffers         = StereoBuffers << 16,
+	IndirectRendering       = DirectRendering << 16,
+	NoOverlay		= HasOverlay << 16
+    };
+};
+
+
+
+class TQM_EXPORT_OPENGL TQGLFormat : public TQGL
+{
+public:
+    TQGLFormat();
+    TQGLFormat( int options, int plane = 0 );
+
+    bool doubleBuffer() const;
+    void setDoubleBuffer( bool enable );
+    bool depth() const;
+    void setDepth( bool enable );
+    bool rgba() const;
+    void setRgba( bool enable );
+    bool alpha() const;
+    void setAlpha( bool enable );
+    bool accum() const;
+    void setAccum( bool enable );
+    bool stencil() const;
+    void setStencil( bool enable );
+    bool stereo() const;
+    void setStereo( bool enable );
+    bool directRendering() const;
+    void setDirectRendering( bool enable );
+    bool hasOverlay() const;
+    void setOverlay( bool enable );
+
+    int plane() const;
+    void setPlane( int plane );
+
+    void setOption( FormatOption opt );
+    bool testOption( FormatOption opt ) const;
+
+    static TQGLFormat defaultFormat();
+    static void setDefaultFormat( const TQGLFormat& f );
+
+    static TQGLFormat defaultOverlayFormat();
+    static void setDefaultOverlayFormat( const TQGLFormat& f );
+
+    static bool hasOpenGL();
+    static bool hasOpenGLOverlays();
+
+    friend TQM_EXPORT_OPENGL bool operator==( const TQGLFormat&,
+					     const TQGLFormat& );
+    friend TQM_EXPORT_OPENGL bool operator!=( const TQGLFormat&,
+					     const TQGLFormat& );
+private:
+    uint opts;
+    int pln;
+};
+
+
+TQM_EXPORT_OPENGL bool operator==( const TQGLFormat&, const TQGLFormat& );
+TQM_EXPORT_OPENGL bool operator!=( const TQGLFormat&, const TQGLFormat& );
+
+class TQM_EXPORT_OPENGL TQGLContext : public TQGL
+{
+public:
+    TQGLContext( const TQGLFormat& format, TQPaintDevice* device );
+    TQGLContext( const TQGLFormat& format );
+    virtual ~TQGLContext();
+
+    virtual bool create( const TQGLContext* shareContext = 0 );
+    bool isValid() const;
+    bool isSharing() const;
+    virtual void reset();
+
+    TQGLFormat format() const;
+    TQGLFormat requestedFormat() const;
+    virtual void setFormat( const TQGLFormat& format );
+
+    virtual void makeCurrent();
+    virtual void swapBuffers() const;
+
+    TQPaintDevice* device() const;
+
+    TQColor overlayTransparentColor() const;
+
+    static const TQGLContext* currentContext();
+
+protected:
+    virtual bool chooseContext( const TQGLContext* shareContext = 0 );
+    virtual void doneCurrent(); // ### 4.0: make this public - needed for multithreading stuff
+
+#if defined(Q_WS_WIN)
+    virtual int choosePixelFormat( void* pfd, HDC pdc );
+#endif
+#if defined(Q_WS_X11)
+    virtual void* tryVisual( const TQGLFormat& f, int bufDepth = 1 );
+    virtual void* chooseVisual();
+#endif
+#if defined(Q_WS_MAC)
+    virtual void* chooseMacVisual(GDHandle);
+#endif
+
+    bool deviceIsPixmap() const;
+    bool windowCreated() const;
+    void setWindowCreated( bool on );
+    bool initialized() const;
+    void setInitialized( bool on );
+    void generateFontDisplayLists( const TQFont & fnt, int listBase );
+
+    uint colorIndex( const TQColor& c ) const;
+    void setValid( bool valid );
+    void setDevice( TQPaintDevice *pDev );
+
+protected:
+#if  defined(Q_WS_WIN)
+    HGLRC rc;
+    HDC dc;
+    WId	win;
+    int pixelFormatId;
+    TQGLCmap* cmap;
+#elif defined(Q_WS_X11) || defined(Q_WS_MAC)
+    void* vi;
+    void* cx;
+#if defined(Q_WS_X11)
+    Q_UINT32 gpm;
+#endif
+#endif
+    TQGLFormat glFormat;
+    TQGLFormat reqFormat;
+    static TQGLContext*	currentCtx;
+
+private:
+    void init( TQPaintDevice *dev = 0 );
+    class Private {
+    public:
+	bool valid;
+	bool sharing;
+	bool initDone;
+	bool crWin;
+	TQPaintDevice* paintDevice;
+	TQColor transpColor;
+#ifdef Q_WS_MAC
+	TQRect oldR;
+#endif
+    };
+    Private* d;
+
+    friend class TQGLWidget;
+#ifdef Q_WS_MAC
+    void fixBufferRect();
+#endif
+
+private:	// Disabled copy constructor and operator=
+    TQGLContext() {}
+    TQGLContext( const TQGLContext& ) {}
+    TQGLContext& operator=( const TQGLContext& ) { return *this; }
+};
+
+
+
+
+class TQM_EXPORT_OPENGL TQGLWidget : public TQWidget, public TQGL
+{
+    Q_OBJECT
+public:
+    TQGLWidget( TQWidget* parent=0, const char* name=0,
+	       const TQGLWidget* shareWidget = 0, WFlags f=0 );
+    TQGLWidget( TQGLContext *context, TQWidget* parent, const char* name=0,
+	       const TQGLWidget* shareWidget = 0, WFlags f=0 );
+    TQGLWidget( const TQGLFormat& format, TQWidget* parent=0, const char* name=0,
+	       const TQGLWidget* shareWidget = 0, WFlags f=0 );
+    ~TQGLWidget();
+
+    void qglColor( const TQColor& c ) const;
+    void qglClearColor( const TQColor& c ) const;
+
+    bool isValid() const;
+    bool isSharing() const;
+    virtual void makeCurrent();
+    void doneCurrent();
+    
+    bool doubleBuffer() const;
+    virtual void swapBuffers();
+
+    TQGLFormat format() const;
+#ifndef Q_QDOC
+    virtual void setFormat( const TQGLFormat& format );
+#endif
+
+    const TQGLContext* context() const;
+#ifndef Q_QDOC
+    virtual void setContext( TQGLContext* context,
+			     const TQGLContext* shareContext = 0,
+			     bool deleteOldContext = TRUE );
+#endif
+
+    virtual TQPixmap renderPixmap( int w = 0, int h = 0,
+				  bool useContext = FALSE );
+    virtual TQImage grabFrameBuffer( bool withAlpha = FALSE );
+
+    virtual void makeOverlayCurrent();
+    const TQGLContext* overlayContext() const;
+
+    static TQImage convertToGLFormat( const TQImage& img );
+
+    void setMouseTracking( bool enable );
+    virtual void  reparent( TQWidget* parent, WFlags f, const TQPoint& p,
+			    bool showIt = FALSE );
+
+    const TQGLColormap & colormap() const;
+    void  setColormap( const TQGLColormap & map );
+
+    void renderText( int x, int y, const TQString & str,
+		     const TQFont & fnt = TQFont(), int listBase = 2000 );
+    void renderText( double x, double y, double z, const TQString & str,
+		     const TQFont & fnt = TQFont(), int listBase = 2000 );
+public slots:
+    virtual void updateGL();
+    virtual void updateOverlayGL();
+
+protected:
+    virtual void initializeGL();
+    virtual void resizeGL( int w, int h );
+    virtual void paintGL();
+
+    virtual void initializeOverlayGL();
+    virtual void resizeOverlayGL( int w, int h );
+    virtual void paintOverlayGL();
+
+    void setAutoBufferSwap( bool on );
+    bool autoBufferSwap() const;
+
+    void paintEvent( TQPaintEvent* );
+    void resizeEvent( TQResizeEvent* );
+
+    virtual void glInit();
+    virtual void glDraw();
+
+private:
+    int displayListBase( const TQFont & fnt, int listBase );
+    void cleanupColormaps();
+    void init( TQGLContext *context, const TQGLWidget* shareWidget );
+    bool renderCxPm( TQPixmap* pm );
+    TQGLContext* glcx;
+    bool autoSwap;
+
+    TQGLColormap cmap;
+
+#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
+    TQGLContext* olcx;
+#elif defined(Q_WS_X11)
+    TQGLOverlayWidget*	olw;
+    friend class TQGLOverlayWidget;
+#endif
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQGLWidget( const TQGLWidget& );
+    TQGLWidget& operator=( const TQGLWidget& );
+#endif
+
+#if defined(Q_WS_MAC)
+private:
+    const TQGLContext *slcx;
+    uint pending_fix : 1,
+	 glcx_dblbuf : 2,
+	 dblbuf : 1,
+	 clp_serial : 15;
+    TQPixmap *gl_pix;
+    TQGLFormat req_format;
+
+    void macInternalRecreateContext( TQGLContext *ctx,
+				     const TQGLContext* = NULL,
+				     bool update = TRUE );
+    bool macInternalDoubleBuffer( bool fix = TRUE );
+    virtual void setRegionDirty( bool );
+    virtual void macWidgetChangedWindow();
+#endif
+private slots:
+    void macInternalFixBufferRect();
+};
+
+
+//
+// TQGLFormat inline functions
+//
+
+inline bool TQGLFormat::doubleBuffer() const
+{
+    return testOption( DoubleBuffer );
+}
+
+inline bool TQGLFormat::depth() const
+{
+    return testOption( DepthBuffer );
+}
+
+inline bool TQGLFormat::rgba() const
+{
+    return testOption( Rgba );
+}
+
+inline bool TQGLFormat::alpha() const
+{
+    return testOption( AlphaChannel );
+}
+
+inline bool TQGLFormat::accum() const
+{
+    return testOption( AccumBuffer );
+}
+
+inline bool TQGLFormat::stencil() const
+{
+    return testOption( StencilBuffer );
+}
+
+inline bool TQGLFormat::stereo() const
+{
+    return testOption( StereoBuffers );
+}
+
+inline bool TQGLFormat::directRendering() const
+{
+    return testOption( DirectRendering );
+}
+
+inline bool TQGLFormat::hasOverlay() const
+{
+    return testOption( HasOverlay );
+}
+
+//
+// TQGLContext inline functions
+//
+
+inline bool TQGLContext::isValid() const
+{
+    return d->valid;
+}
+
+inline void TQGLContext::setValid( bool valid )
+{
+    d->valid = valid;
+}
+
+inline bool TQGLContext::isSharing() const
+{
+    return d->sharing;
+}
+
+inline TQGLFormat TQGLContext::format() const
+{
+    return glFormat;
+}
+
+inline TQGLFormat TQGLContext::requestedFormat() const
+{
+    return reqFormat;
+}
+
+inline TQPaintDevice* TQGLContext::device() const
+{
+    return d->paintDevice;
+}
+
+inline bool TQGLContext::deviceIsPixmap() const
+{
+    return d->paintDevice->devType() == TQInternal::Pixmap;
+}
+
+
+inline bool TQGLContext::windowCreated() const
+{
+    return d->crWin;
+}
+
+
+inline void TQGLContext::setWindowCreated( bool on )
+{
+    d->crWin = on;
+}
+
+inline bool TQGLContext::initialized() const
+{
+    return d->initDone;
+}
+
+inline void TQGLContext::setInitialized( bool on )
+{
+    d->initDone = on;
+}
+
+inline const TQGLContext* TQGLContext::currentContext()
+{
+    return currentCtx;
+}
+
+//
+// TQGLWidget inline functions
+//
+
+inline TQGLFormat TQGLWidget::format() const
+{
+    return glcx->format();
+}
+
+inline const TQGLContext *TQGLWidget::context() const
+{
+    return glcx;
+}
+
+inline bool TQGLWidget::doubleBuffer() const
+{
+    return glcx->format().doubleBuffer();
+}
+
+inline void TQGLWidget::setAutoBufferSwap( bool on )
+{
+    autoSwap = on;
+}
+
+inline bool TQGLWidget::autoBufferSwap() const
+{
+    return autoSwap;
+}
+
+#endif
+
+ +


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

Complete Member List for TQGL

+ +

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

    +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgl.html b/doc/html/qgl.html new file mode 100644 index 00000000..d64f10ea --- /dev/null +++ b/doc/html/qgl.html @@ -0,0 +1,98 @@ + + + + + +TQGL Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGL Class Reference
[OpenGL module]

+ +

The TQGL class is a namespace for miscellaneous identifiers +in the TQt OpenGL module. +More... +

#include <qgl.h> +

Inherited by TQGLFormat, TQGLContext, and TQGLWidget. +

List of all member functions. +

Public Members

+
    +
  • enum FormatOption { DoubleBuffer = 0x0001, DepthBuffer = 0x0002, Rgba = 0x0004, AlphaChannel = 0x0008, AccumBuffer = 0x0010, StencilBuffer = 0x0020, StereoBuffers = 0x0040, DirectRendering = 0x0080, HasOverlay = 0x0100, SingleBuffer = DoubleBuffer<<16, NoDepthBuffer = DepthBuffer<<16, ColorIndex = Rgba<<16, NoAlphaChannel = AlphaChannel<<16, NoAccumBuffer = AccumBuffer<<16, NoStencilBuffer = StencilBuffer<<16, NoStereoBuffers = StereoBuffers<<16, IndirectRendering = DirectRendering<<16, NoOverlay = HasOverlay<<16 }
  • +
+

Detailed Description

+ + +The TQGL class is a namespace for miscellaneous identifiers +in the TQt OpenGL module. + +

+ + +

Normally you can ignore this class. TQGLWidget and the other +OpenGL* module classes inherit it, so when you make your +own TQGLWidget subclass you can use the identifiers in the TQGL +namespace without qualification. +

However, you may occasionally find yourself in situations where you +need to refer to these identifiers from outside the TQGL namespace's +scope, e.g. in static functions. In such cases, simply write e.g. TQGL::DoubleBuffer instead of just DoubleBuffer. +

* OpenGL is a trademark of Silicon Graphics, Inc. in the +United States and other countries. +

See also Graphics Classes and Image Processing Classes. + +


Member Type Documentation

+

TQGL::FormatOption

+ +

This enum specifies the format options. +

    +
  • TQGL::DoubleBuffer +
  • TQGL::DepthBuffer +
  • TQGL::Rgba +
  • TQGL::AlphaChannel +
  • TQGL::AccumBuffer +
  • TQGL::StencilBuffer +
  • TQGL::StereoBuffers +
  • TQGL::DirectRendering +
  • TQGL::HasOverlay +
  • TQGL::SingleBuffer +
  • TQGL::NoDepthBuffer +
  • TQGL::ColorIndex +
  • TQGL::NoAlphaChannel +
  • TQGL::NoAccumBuffer +
  • TQGL::NoStencilBuffer +
  • TQGL::NoStereoBuffers +
  • TQGL::IndirectRendering +
  • TQGL::NoOverlay +
+ +

+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/qglayoutiterator-members.html b/doc/html/qglayoutiterator-members.html new file mode 100644 index 00000000..1d4328fe --- /dev/null +++ b/doc/html/qglayoutiterator-members.html @@ -0,0 +1,50 @@ + + + + + +TQGLayoutIterator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGLayoutIterator

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qglayoutiterator.html b/doc/html/qglayoutiterator.html new file mode 100644 index 00000000..d8501a0f --- /dev/null +++ b/doc/html/qglayoutiterator.html @@ -0,0 +1,98 @@ + + + + + +TQGLayoutIterator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGLayoutIterator Class Reference

+ +

The TQGLayoutIterator class is an abstract base class of internal layout iterators. +More... +

#include <qlayout.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQGLayoutIterator class is an abstract base class of internal layout iterators. +

+ +

(This class is not OpenGL related, it just happens to start with +the letters TQGL...) +

Subclass this class to create a custom layout. The functions that +must be implemented are next(), current(), and takeCurrent(). +

The TQGLayoutIterator implements the functionality of +TQLayoutIterator. Each subclass of TQLayout needs a +TQGLayoutIterator subclass. +

See also Widget Appearance and Style and Layout Management. + +


Member Function Documentation

+

TQGLayoutIterator::~TQGLayoutIterator () [virtual] +

+Destroys the iterator + +

TQLayoutItem * TQGLayoutIterator::current () [pure virtual] +

+ +

Implemented in subclasses to return the current item, or 0 if +there is no current item. + +

Examples: customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp. +

TQLayoutItem * TQGLayoutIterator::next () [pure virtual] +

+ +

Implemented in subclasses to move the iterator to the next item +and return that item, or 0 if there is no next item. + +

Examples: customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp. +

TQLayoutItem * TQGLayoutIterator::takeCurrent () [pure virtual] +

+ +

Implemented in subclasses. The function must remove the current +item from the layout without deleting it, move the iterator to the +next item and return the removed item, or 0 if no item was +removed. + +

Examples: customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp. + +


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


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qglcolormap-h.html b/doc/html/qglcolormap-h.html new file mode 100644 index 00000000..dde9d0af --- /dev/null +++ b/doc/html/qglcolormap-h.html @@ -0,0 +1,144 @@ + + + + + +qglcolormap.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qglcolormap.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qglcolormap.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQGLColormap class
+**
+** Created : 20010326
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the opengl 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 retquirements 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 TQGLCOLORMAP_H
+#define TQGLCOLORMAP_H
+
+#ifndef QT_H
+#include "qcolor.h"
+#include "qmemarray.h"
+#include "qshared.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_OPENGL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_OPENGL
+#else
+#define TQM_EXPORT_OPENGL Q_EXPORT
+#endif
+
+class TQWidget;
+class TQM_EXPORT_OPENGL TQGLColormap
+{
+public:
+    TQGLColormap();
+    TQGLColormap( const TQGLColormap & );
+    ~TQGLColormap();
+    
+    TQGLColormap &operator=( const TQGLColormap & );
+    
+    bool   isEmpty() const;
+    int    size() const;
+    void   detach();
+
+    void   setEntries( int count, const TQRgb * colors, int base = 0 );
+    void   setEntry( int idx, TQRgb color );
+    void   setEntry( int idx, const TQColor & color );
+    TQRgb   entryRgb( int idx ) const;
+    TQColor entryColor( int idx ) const;
+    int    find( TQRgb color ) const;
+    int    findNearest( TQRgb color ) const;
+    
+private:
+    class Private : public TQShared
+    {
+    public:
+	Private() {
+	    cells.resize( 256 ); // ### hardcoded to 256 entries for now
+	    cmapHandle = 0;
+	}
+
+	~Private() {
+	}
+
+	TQMemArray<TQRgb> cells;
+	TQt::HANDLE      cmapHandle;
+    };
+    
+    Private * d;
+
+    friend class TQGLWidget;
+};
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qglcolormap-members.html b/doc/html/qglcolormap-members.html new file mode 100644 index 00000000..5c36c583 --- /dev/null +++ b/doc/html/qglcolormap-members.html @@ -0,0 +1,58 @@ + + + + + +TQGLColormap Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGLColormap

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qglcolormap.html b/doc/html/qglcolormap.html new file mode 100644 index 00000000..1759da26 --- /dev/null +++ b/doc/html/qglcolormap.html @@ -0,0 +1,179 @@ + + + + + +TQGLColormap Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGLColormap Class Reference
[OpenGL module]

+ +

The TQGLColormap class is used for installing custom colormaps into +TQGLWidgets. +More... +

#include <qglcolormap.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQGLColormap class is used for installing custom colormaps into +TQGLWidgets. + +

+ + +

TQGLColormap provides a platform independent way of specifying and +installing indexed colormaps into TQGLWidgets. TQGLColormap is +especially useful when using the OpenGL +color-index mode. +

Under X11 you must use an X server that supports either a PseudoColor or DirectColor visual class. If your X server +currently only provides a GrayScale, TrueColor, StaticColor or StaticGray visual, you will not be able to +allocate colorcells for writing. If this is the case, try setting +your X server to 8 bit mode. It should then provide you with at +least a PseudoColor visual. Note that you may experience +colormap flashing if your X server is running in 8 bit mode. +

Under Windows the size of the colormap is always set to 256 +colors. Note that under Windows you can also install colormaps +in child widgets. +

This class uses explicit sharing (see Shared + Classes). +

Example of use: +

+    #include <qapplication.h>
+    #include <qglcolormap.h>
+
+    int main()
+    {
+        TQApplication a( argc, argv );
+
+        MySuperGLWidget widget( 0 ); // A TQGLWidget in color-index mode
+        TQGLColormap colormap;
+
+        // This will fill the colormap with colors ranging from
+        // black to white.
+        for ( int i = 0; i < colormap.size(); i++ )
+            colormap.setEntry( i, qRgb( i, i, i ) );
+
+        widget.setColormap( colormap );
+        widget.show();
+        return a.exec();
+    }
+    
+ +

See also TQGLWidget::setColormap(), TQGLWidget::colormap(), Graphics Classes, and Image Processing Classes. + +


Member Function Documentation

+

TQGLColormap::TQGLColormap () +

+Construct a TQGLColormap. + +

TQGLColormap::TQGLColormap ( const TQGLColormap & map ) +

+Construct a shallow copy of map. + +

TQGLColormap::~TQGLColormap () +

+Dereferences the TQGLColormap and deletes it if this was the last +reference to it. + +

void TQGLColormap::detach () +

+Detaches this TQGLColormap from the shared block. + +

TQColor TQGLColormap::entryColor ( int idx ) const +

+Returns the TQRgb value in the colorcell with index idx. + +

TQRgb TQGLColormap::entryRgb ( int idx ) const +

+Returns the TQRgb value in the colorcell with index idx. + +

int TQGLColormap::find ( TQRgb color ) const +

+Returns the index of the color color. If color is not in the +map, -1 is returned. + +

int TQGLColormap::findNearest ( TQRgb color ) const +

+Returns the index of the color that is the closest match to color +color. + +

bool TQGLColormap::isEmpty () const +

+Returns TRUE if the colormap is empty; otherwise returns FALSE. A +colormap with no color values set is considered to be empty. + +

TQGLColormap & TQGLColormap::operator= ( const TQGLColormap & map ) +

+Assign a shallow copy of map to this TQGLColormap. + +

void TQGLColormap::setEntries ( int count, const TQRgb * colors, int base = 0 ) +

+Set an array of cells in this colormap. count is the number of +colors that should be set, colors is the array of colors, and +base is the starting index. + +

void TQGLColormap::setEntry ( int idx, TQRgb color ) +

+Set cell at index idx in the colormap to color color. + +

void TQGLColormap::setEntry ( int idx, const TQColor & color ) +

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

Set the cell with index idx in the colormap to color color. + +

int TQGLColormap::size () const +

+Returns the number of colorcells in the colormap. + + +

+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/qglcontext-members.html b/doc/html/qglcontext-members.html new file mode 100644 index 00000000..ec83e7a5 --- /dev/null +++ b/doc/html/qglcontext-members.html @@ -0,0 +1,71 @@ + + + + + +TQGLContext Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGLContext

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qglcontext.html b/doc/html/qglcontext.html new file mode 100644 index 00000000..aa1ec72e --- /dev/null +++ b/doc/html/qglcontext.html @@ -0,0 +1,344 @@ + + + + + +TQGLContext Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGLContext Class Reference
[OpenGL module]

+ +

The TQGLContext class encapsulates an OpenGL rendering context. +More... +

#include <qgl.h> +

Inherits TQGL. +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Protected Members

+ +

Detailed Description

+ + +The TQGLContext class encapsulates an OpenGL rendering context. + +

+ + +

An OpenGL* rendering context is a complete set of +OpenGL state variables. +

The context's format is set in the +constructor or later with setFormat(). The format options that are +actually set are returned by format(); the options you asked for +are returned by requestedFormat(). Note that after a TQGLContext +object has been constructed, the actual OpenGL context must be +created by explicitly calling the create() +function. The makeCurrent() function makes this context the +current rendering context. You can make no context current +using doneCurrent(). The reset() function will reset the context +and make it invalid. +

You can examine properties of the context with, e.g. isValid(), +isSharing(), initialized(), windowCreated() and +overlayTransparentColor(). +

If you're using double buffering you can swap the screen contents +with the off-screen buffer using swapBuffers(). +

Please note that TQGLContext is not thread safe. +

* OpenGL is a trademark of Silicon Graphics, Inc. in the +United States and other countries. +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

TQGLContext::TQGLContext ( const TQGLFormat & format, TQPaintDevice * device ) +

+Constructs an OpenGL context for the paint device device, which +can be a widget or a pixmap. The format specifies several +display options for the context. +

If the underlying OpenGL/Window system cannot satisfy all the +features requested in format, the nearest subset of features +will be used. After creation, the format() method will return the +actual format obtained. +

Note that after a TQGLContext object has been constructed, create() must be called explicitly to create +the actual OpenGL context. The context will be invalid if it was not possible to obtain a GL context at +all. +

See also format() and isValid(). + +

TQGLContext::~TQGLContext () [virtual] +

+Destroys the OpenGL context and frees its resources. + +

bool TQGLContext::chooseContext ( const TQGLContext * shareContext = 0 ) [virtual protected] +

+ +

This semi-internal function is called by create(). It creates a +system-dependent OpenGL handle that matches the format() of shareContext as closely as possible. +

On Windows, it calls the virtual function choosePixelFormat(), +which finds a matching pixel format identifier. On X11, it calls +the virtual function chooseVisual() which finds an appropriate X +visual. On other platforms it may work differently. + +

void * TQGLContext::chooseMacVisual ( GDHandle device ) [virtual protected] +

+ +

Mac only: This virtual function tries to find a +visual that matches the format using the given device handle, +reducing the demands if the original request cannot be met. +

The algorithm for reducing the demands of the format is tquite +simple-minded, so override this method in your subclass if your +application has specific retquirements on visual selection. +

See also chooseContext(). + +

int TQGLContext::choosePixelFormat ( void * dummyPfd, HDC pdc ) [virtual protected] +

+Win32 only This virtual function chooses a pixel +format that matches the OpenGL format. +Reimplement this function in a subclass if you need a custom +context. +

Warning: The dummyPfd pointer and pdc are used as a PIXELFORMATDESCRIPTOR*. We use void to avoid using +Windows-specific types in our header files. +

See also chooseContext(). + +

void * TQGLContext::chooseVisual () [virtual protected] +

+X11 only: This virtual function tries to find a +visual that matches the format, reducing the demands if the original +request cannot be met. +

The algorithm for reducing the demands of the format is tquite +simple-minded, so override this method in your subclass if your +application has spcific retquirements on visual selection. +

See also chooseContext(). + +

bool TQGLContext::create ( const TQGLContext * shareContext = 0 ) [virtual] +

+Creates the GL context. Returns TRUE if it was successful in +creating a valid GL rendering context on the paint device +specified in the constructor; otherwise returns FALSE (i.e. the +context is invalid). +

After successful creation, format() returns the set of features of +the created GL rendering context. +

If shareContext points to a valid TQGLContext, this method will +try to establish OpenGL display list sharing between this context +and the shareContext. Note that this may fail if the two +contexts have different formats. Use isSharing() to see if sharing +succeeded. +

Warning: Implementation note: initialization of C++ class +members usually takes place in the class constructor. TQGLContext +is an exception because it must be simple to customize. The +virtual functions chooseContext() (and chooseVisual() for X11) can +be reimplemented in a subclass to select a particular context. The +problem is that virtual functions are not properly called during +construction (even though this is correct C++) because C++ +constructs class hierarchies from the bottom up. For this reason +we need a create() function. +

See also chooseContext(), format(), and isValid(). + +

const TQGLContext * TQGLContext::currentContext () [static] +

+ +

Returns the current context, i.e. the context to which any OpenGL +commands will currently be directed. Returns 0 if no context is +current. +

See also makeCurrent(). + +

TQPaintDevice * TQGLContext::device () const +

+ +

Returns the paint device set for this context. +

See also TQGLContext::TQGLContext(). + +

bool TQGLContext::deviceIsPixmap () const [protected] +

+ +

Returns TRUE if the paint device of this context is a pixmap; +otherwise returns FALSE. + +

void TQGLContext::doneCurrent () [virtual protected] +

+ +

Makes no GL context the current context. Normally, you do not need +to call this function; TQGLContext calls it as necessary. + +

TQGLFormat TQGLContext::format () const +

+ +

Returns the frame buffer format that was obtained (this may be a +subset of what was requested). +

See also requestedFormat(). + +

void TQGLContext::generateFontDisplayLists ( const TQFont & font, int listBase ) [protected] +

+ +

Generates a set of 256 display lists for the 256 first characters +in the font font. The first list will start at index listBase. +

See also TQGLWidget::renderText(). + +

bool TQGLContext::initialized () const [protected] +

+ +

Returns TRUE if this context has been initialized, i.e. if +TQGLWidget::initializeGL() has been performed on it; otherwise +returns FALSE. +

See also setInitialized(). + +

bool TQGLContext::isSharing () const +

+ +

Returns TRUE if display list sharing with another context was +requested in the create() call and the GL system was able to +fulfill this request; otherwise returns FALSE. Note that display +list sharing might not be supported between contexts with +different formats. + +

bool TQGLContext::isValid () const +

+ +

Returns TRUE if a GL rendering context has been successfully +created; otherwise returns FALSE. + +

void TQGLContext::makeCurrent () [virtual] +

+ +

Makes this context the current OpenGL rendering context. All GL +functions you call operate on this context until another context +is made current. +

In some very rare cases the underlying call may fail. If this +occurs an error message is output to stderr. + +

TQColor TQGLContext::overlayTransparentColor () const +

+ +

If this context is a valid context in an overlay plane, returns +the plane's transparent color. Otherwise returns an invalid color. +

The returned color's pixel value is +the index of the transparent color in the colormap of the overlay +plane. (Naturally, the color's RGB values are meaningless.) +

The returned TQColor object will generally work as expected only +when passed as the argument to TQGLWidget::qglColor() or +TQGLWidget::qglClearColor(). Under certain circumstances it can +also be used to draw transparent graphics with a TQPainter. See the +examples/opengl/overlay_x11 example for details. + +

TQGLFormat TQGLContext::requestedFormat () const +

+ +

Returns the frame buffer format that was originally requested in +the constructor or setFormat(). +

See also format(). + +

void TQGLContext::reset () [virtual] +

+ +

Resets the context and makes it invalid. +

See also create() and isValid(). + +

void TQGLContext::setFormat ( const TQGLFormat & format ) [virtual] +

+Sets a format for this context. The context is reset. +

Call create() to create a new GL context that tries to match the +new format. +

+    TQGLContext *cx;
+    //  ...
+    TQGLFormat f;
+    f.setStereo( TRUE );
+    cx->setFormat( f );
+    if ( !cx->create() )
+        exit(); // no OpenGL support, or cannot render on the specified paintdevice
+    if ( !cx->format().stereo() )
+        exit(); // could not create stereo context
+    
+ +

See also format(), reset(), and create(). + +

void TQGLContext::setInitialized ( bool on ) [protected] +

+ +

If on is TRUE the context has been initialized, i.e. +TQGLContext::setInitialized() has been called on it. If on is +FALSE the context has not been initialized. +

See also initialized(). + +

void TQGLContext::setWindowCreated ( bool on ) [protected] +

+ +

If on is TRUE the context has had a window created for it. If +on is FALSE no window has been created for the context. +

See also windowCreated(). + +

void TQGLContext::swapBuffers () const [virtual] +

+ +

Swaps the screen contents with an off-screen buffer. Only works if +the context is in double buffer mode. +

See also TQGLFormat::setDoubleBuffer(). + +

bool TQGLContext::windowCreated () const [protected] +

+ +

Returns TRUE if a window has been created for this context; +otherwise returns FALSE. +

See also setWindowCreated(). + + +


+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/qglformat-members.html b/doc/html/qglformat-members.html new file mode 100644 index 00000000..51bc588b --- /dev/null +++ b/doc/html/qglformat-members.html @@ -0,0 +1,75 @@ + + + + + +TQGLFormat Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGLFormat

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qglformat.html b/doc/html/qglformat.html new file mode 100644 index 00000000..76ebe9c3 --- /dev/null +++ b/doc/html/qglformat.html @@ -0,0 +1,474 @@ + + + + + +TQGLFormat Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGLFormat Class Reference
[OpenGL module]

+ +

The TQGLFormat class specifies the display format of an OpenGL +rendering context. +More... +

#include <qgl.h> +

Inherits TQGL. +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Detailed Description

+ + +The TQGLFormat class specifies the display format of an OpenGL +rendering context. + +

+ + +

A display format has several characteristics: +

+

You create and tell a TQGLFormat object what rendering options you +want from an OpenGL* rendering context. +

OpenGL drivers or accelerated hardware may or may not support +advanced features such as alpha channel or stereographic viewing. +If you request some features that the driver/hardware does not +provide when you create a TQGLWidget, you will get a rendering +context with the nearest subset of features. +

There are different ways to define the display characteristics of +a rendering context. One is to create a TQGLFormat and make it the +default for the entire application: +

+    TQGLFormat f;
+    f.setAlpha( TRUE );
+    f.setStereo( TRUE );
+    TQGLFormat::setDefaultFormat( f );
+    
+ +

Or you can specify the desired format when creating an object of +your TQGLWidget subclass: +

+    TQGLFormat f;
+    f.setDoubleBuffer( FALSE );                 // single buffer
+    f.setDirectRendering( FALSE );              // software rendering
+    MyGLWidget* myWidget = new MyGLWidget( f, ... );
+    
+ +

After the widget has been created, you can find out which of the +requested features the system was able to provide: +

+    TQGLFormat f;
+    f.setOverlay( TRUE );
+    f.setStereo( TRUE );
+    MyGLWidget* myWidget = new MyGLWidget( f, ... );
+    if ( !w->format().stereo() ) {
+        // ok, goggles off
+        if ( !w->format().hasOverlay() ) {
+            qFatal( "Cool hardware retquired" );
+        }
+    }
+    
+ +

* OpenGL is a trademark of Silicon Graphics, Inc. in the +United States and other countries. +

See also TQGLContext, TQGLWidget, Graphics Classes, and Image Processing Classes. + +


Member Function Documentation

+

TQGLFormat::TQGLFormat () +

+Constructs a TQGLFormat object with the factory default settings: + + +

TQGLFormat::TQGLFormat ( int options, int plane = 0 ) +

+Creates a TQGLFormat object that is a copy of the current application default format. +

If options is not 0, this copy is modified by these format +options. The options parameter should be FormatOption values +OR'ed together. +

This constructor makes it easy to specify a certain desired format +in classes derived from TQGLWidget, for example: +

+    // The rendering in MyGLWidget depends on using
+    // stencil buffer and alpha channel
+    MyGLWidget::MyGLWidget( TQWidget* parent, const char* name )
+        : TQGLWidget( TQGLFormat( StencilBuffer | AlphaChannel ), parent, name )
+    {
+        if ( !format().stencil() )
+            qWarning( "Could not get stencil buffer; results will be suboptimal" );
+        if ( !format().alphaChannel() )
+            qWarning( "Could not get alpha channel; results will be suboptimal" );
+        ...
+    }
+    
+ +

Note that there are FormatOption values to turn format settings +both on and off, e.g. DepthBuffer and NoDepthBuffer, +DirectRendering and IndirectRendering, etc. +

The plane parameter defaults to 0 and is the plane which this +format should be associated with. Not all OpenGL implmentations +supports overlay/underlay rendering planes. +

See also defaultFormat() and setOption(). + +

bool TQGLFormat::accum () const +

+ +

Returns TRUE if the accumulation buffer is enabled; otherwise +returns FALSE. The accumulation buffer is disabled by default. +

See also setAccum(). + +

bool TQGLFormat::alpha () const +

+ +

Returns TRUE if the alpha channel of the framebuffer is enabled; +otherwise returns FALSE. The alpha channel is disabled by default. +

See also setAlpha(). + +

TQGLFormat TQGLFormat::defaultFormat () [static] +

+Returns the default TQGLFormat for the application. All TQGLWidgets +that are created use this format unless another format is +specified, e.g. when they are constructed. +

If no special default format has been set using +setDefaultFormat(), the default format is the same as that created +with TQGLFormat(). +

See also setDefaultFormat(). + +

TQGLFormat TQGLFormat::defaultOverlayFormat () [static] +

+Returns the default TQGLFormat for overlay contexts. +

The factory default overlay format is: +

+

See also setDefaultFormat(). + +

bool TQGLFormat::depth () const +

+ +

Returns TRUE if the depth buffer is enabled; otherwise returns +FALSE. The depth buffer is enabled by default. +

See also setDepth(). + +

bool TQGLFormat::directRendering () const +

+ +

Returns TRUE if direct rendering is enabled; otherwise returns +FALSE. +

Direct rendering is enabled by default. +

See also setDirectRendering(). + +

bool TQGLFormat::doubleBuffer () const +

+ +

Returns TRUE if double buffering is enabled; otherwise returns +FALSE. Double buffering is enabled by default. +

See also setDoubleBuffer(). + +

bool TQGLFormat::hasOpenGL () [static] +

+ +

Returns TRUE if the window system has any OpenGL support; +otherwise returns FALSE. +

Warning: This function must not be called until the TQApplication +object has been created. + +

bool TQGLFormat::hasOpenGLOverlays () [static] +

+ +

Returns TRUE if the window system supports OpenGL overlays; +otherwise returns FALSE. +

Warning: This function must not be called until the TQApplication +object has been created. + +

bool TQGLFormat::hasOverlay () const +

+ +

Returns TRUE if overlay plane is enabled; otherwise returns FALSE. +

Overlay is disabled by default. +

See also setOverlay(). + +

int TQGLFormat::plane () const +

+Returns the plane of this format. The default for normal formats +is 0, which means the normal plane. The default for overlay +formats is 1, which is the first overlay plane. +

See also setPlane(). + +

bool TQGLFormat::rgba () const +

+ +

Returns TRUE if RGBA color mode is set. Returns FALSE if color +index mode is set. The default color mode is RGBA. +

See also setRgba(). + +

void TQGLFormat::setAccum ( bool enable ) +

+If enable is TRUE enables the accumulation buffer; otherwise +disables the accumulation buffer. +

The accumulation buffer is disabled by default. +

The accumulation buffer is used to create blur effects and +multiple exposures. +

See also accum(). + +

void TQGLFormat::setAlpha ( bool enable ) +

+If enable is TRUE enables the alpha channel; otherwise disables +the alpha channel. +

The alpha buffer is disabled by default. +

The alpha channel is typically used for implementing transparency +or translucency. The A in RGBA specifies the transparency of a +pixel. +

See also alpha(). + +

void TQGLFormat::setDefaultFormat ( const TQGLFormat & f ) [static] +

+Sets a new default TQGLFormat for the application to f. For +example, to set single buffering as the default instead of double +buffering, your main() might contain code like this: +
+    TQApplication a(argc, argv);
+    TQGLFormat f;
+    f.setDoubleBuffer( FALSE );
+    TQGLFormat::setDefaultFormat( f );
+    
+ +

See also defaultFormat(). + +

void TQGLFormat::setDefaultOverlayFormat ( const TQGLFormat & f ) [static] +

+Sets a new default TQGLFormat for overlay contexts to f. This +format is used whenever a TQGLWidget is created with a format that +hasOverlay() enabled. +

For example, to get a double buffered overlay context (if +available), use code like this: +

+    TQGLFormat f = TQGLFormat::defaultOverlayFormat();
+    f.setDoubleBuffer( TRUE );
+    TQGLFormat::setDefaultOverlayFormat( f );
+    
+ +

As usual, you can find out after widget creation whether the +underlying OpenGL system was able to provide the requested +specification: +

+    // ...continued from above
+    MyGLWidget* myWidget = new MyGLWidget( TQGLFormat( TQGL::HasOverlay ), ... );
+    if ( myWidget->format().hasOverlay() ) {
+        // Yes, we got an overlay, let's check _its_ format:
+        TQGLContext* olContext = myWidget->overlayContext();
+        if ( olContext->format().doubleBuffer() )
+            ; // yes, we got a double buffered overlay
+        else
+            ; // no, only single buffered overlays are available
+    }
+    
+ +

See also defaultOverlayFormat(). + +

void TQGLFormat::setDepth ( bool enable ) +

+If enable is TRUE enables the depth buffer; otherwise disables +the depth buffer. +

The depth buffer is enabled by default. +

The purpose of a depth buffer (or Z-buffering) is to remove hidden +surfaces. Pixels are assigned Z values based on the distance to +the viewer. A pixel with a high Z value is closer to the viewer +than a pixel with a low Z value. This information is used to +decide whether to draw a pixel or not. +

See also depth(). + +

void TQGLFormat::setDirectRendering ( bool enable ) +

+If enable is TRUE enables direct rendering; otherwise disables +direct rendering. +

Direct rendering is enabled by default. +

Enabling this option will make OpenGL bypass the underlying window +system and render directly from hardware to the screen, if this is +supported by the system. +

See also directRendering(). + +

void TQGLFormat::setDoubleBuffer ( bool enable ) +

+If enable is TRUE sets double buffering; otherwise sets single +buffering. +

Double buffering is enabled by default. +

Double buffering is a technique where graphics are rendered on an +off-screen buffer and not directly to the screen. When the drawing +has been completed, the program calls a swapBuffers() function to +exchange the screen contents with the buffer. The result is +flicker-free drawing and often better performance. +

See also doubleBuffer(), TQGLContext::swapBuffers(), and TQGLWidget::swapBuffers(). + +

void TQGLFormat::setOption ( FormatOption opt ) +

+Sets the format option to opt. +

See also testOption(). + +

void TQGLFormat::setOverlay ( bool enable ) +

+If enable is TRUE enables an overlay plane; otherwise disables +the overlay plane. +

Enabling the overlay plane will cause TQGLWidget to create an +additional context in an overlay plane. See the TQGLWidget +documentation for further information. +

See also hasOverlay(). + +

void TQGLFormat::setPlane ( int plane ) +

+Sets the requested plane to plane. 0 is the normal plane, 1 is +the first overlay plane, 2 is the second overlay plane, etc.; -1, +-2, etc. are underlay planes. +

Note that in contrast to other format specifications, the plane +specifications will be matched exactly. This means that if you +specify a plane that the underlying OpenGL system cannot provide, +an invalid TQGLWidget will be +created. +

See also plane(). + +

void TQGLFormat::setRgba ( bool enable ) +

+If enable is TRUE sets RGBA mode. If enable is FALSE sets +color index mode. +

The default color mode is RGBA. +

RGBA is the preferred mode for most OpenGL applications. In RGBA +color mode you specify colors as red + green + blue + alpha +quadruplets. +

In color index mode you specify an index into a color lookup +table. +

See also rgba(). + +

void TQGLFormat::setStencil ( bool enable ) +

+If enable is TRUE enables the stencil buffer; otherwise +disables the stencil buffer. +

The stencil buffer is disabled by default. +

The stencil buffer masks certain parts of the drawing area so that +masked parts are not drawn on. +

See also stencil(). + +

void TQGLFormat::setStereo ( bool enable ) +

+If enable is TRUE enables stereo buffering; otherwise disables +stereo buffering. +

Stereo buffering is disabled by default. +

Stereo buffering provides extra color buffers to generate left-eye +and right-eye images. +

See also stereo(). + +

bool TQGLFormat::stencil () const +

+ +

Returns TRUE if the stencil buffer is enabled; otherwise returns +FALSE. The stencil buffer is disabled by default. +

See also setStencil(). + +

bool TQGLFormat::stereo () const +

+ +

Returns TRUE if stereo buffering is enabled; otherwise returns +FALSE. Stereo buffering is disabled by default. +

See also setStereo(). + +

bool TQGLFormat::testOption ( FormatOption opt ) const +

+Returns TRUE if format option opt is set; otherwise returns FALSE. +

See also setOption(). + + +


+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/qglobal-h.html b/doc/html/qglobal-h.html new file mode 100644 index 00000000..6616fb61 --- /dev/null +++ b/doc/html/qglobal-h.html @@ -0,0 +1,1178 @@ + + + + + +qglobal.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qglobal.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qglobal.h   3.3.8   edited Feb 2 15:00 $
+**
+** Global type declarations and definitions
+**
+** Created : 920529
+**
+** 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 retquirements 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 TQGLOBAL_H
+#define TQGLOBAL_H
+
+#define QT_VERSION_STR   "3.3.8"
+/*
+   QT_VERSION is (major << 16) + (minor << 8) + patch.
+ */
+#define QT_VERSION 0x030308
+
+/*
+   The operating system, must be one of: (Q_OS_x)
+
+     MACX	- Mac OS X
+     MAC9	- Mac OS 9
+     DARWIN     - Darwin OS (Without Mac OS X)
+     MSDOS	- MS-DOS and Windows
+     OS2	- OS/2
+     OS2EMX	- XFree86 on OS/2 (not PM)
+     WIN32	- Win32 (Windows 95/98/ME and Windows NT/2000/XP)
+     CYGWIN	- Cygwin
+     SOLARIS	- Sun Solaris
+     HPUX	- HP-UX
+     ULTRIX	- DEC Ultrix
+     LINUX	- Linux
+     FREEBSD	- FreeBSD
+     NETBSD	- NetBSD
+     OPENBSD	- OpenBSD
+     BSDI	- BSD/OS
+     IRIX	- SGI Irix
+     OSF	- HP Tru64 UNIX
+     SCO	- SCO OpenServer 5
+     UNIXWARE	- UnixWare 7, Open UNIX 8
+     AIX	- AIX
+     HURD	- GNU Hurd
+     DGUX	- DG/UX
+     RELIANT	- Reliant UNIX
+     DYNIX	- DYNIX/ptx
+     TQNX	- TQNX
+     TQNX6	- TQNX RTP 6.1
+     LYNX	- LynxOS
+     BSD4	- Any BSD 4.4 system
+     UNIX	- Any UNIX BSD/SYSV system
+*/
+
+#if defined(__DARWIN_X11__)
+#  define Q_OS_DARWIN
+#elif defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__))
+#  define Q_OS_MACX
+#elif defined(__MACOSX__)
+#  define Q_OS_MACX
+#elif defined(macintosh)
+#  define Q_OS_MAC9
+#elif defined(__CYGWIN__)
+#  define Q_OS_CYGWIN
+#elif defined(MSDOS) || defined(_MSDOS)
+#  define Q_OS_MSDOS
+#elif defined(__OS2__)
+#  if defined(__EMX__)
+#    define Q_OS_OS2EMX
+#  else
+#    define Q_OS_OS2
+#  endif
+#elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
+#  define Q_OS_WIN32
+#  define Q_OS_WIN64
+#elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
+#  define Q_OS_WIN32
+#elif defined(__MWERKS__) && defined(__INTEL__)
+#  define Q_OS_WIN32
+#elif defined(__sun) || defined(sun)
+#  define Q_OS_SOLARIS
+#elif defined(hpux) || defined(__hpux)
+#  define Q_OS_HPUX
+#elif defined(__ultrix) || defined(ultrix)
+#  define Q_OS_ULTRIX
+#elif defined(sinix)
+#  define Q_OS_RELIANT
+#elif defined(__linux__) || defined(__linux) || defined(__GNU__) || defined(__GLIBC__)
+#  define Q_OS_LINUX
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
+#  define Q_OS_FREEBSD
+#  define Q_OS_BSD4
+#elif defined(__NetBSD__)
+#  define Q_OS_NETBSD
+#  define Q_OS_BSD4
+#elif defined(__OpenBSD__)
+#  define Q_OS_OPENBSD
+#  define Q_OS_BSD4
+#elif defined(__bsdi__)
+#  define Q_OS_BSDI
+#  define Q_OS_BSD4
+#elif defined(__sgi)
+#  define Q_OS_IRIX
+#elif defined(__osf__)
+#  define Q_OS_OSF
+#elif defined(_AIX)
+#  define Q_OS_AIX
+#elif defined(__Lynx__)
+#  define Q_OS_LYNX
+#elif defined(__DGUX__)
+#  define Q_OS_DGUX
+#elif defined(__QNXNTO__)
+#  define Q_OS_QNX6
+#elif defined(__QNX__)
+#  define Q_OS_QNX
+#elif defined(_SETQUENT_)
+#  define Q_OS_DYNIX
+#elif defined(_SCO_DS)                   /* SCO OpenServer 5 + GCC */
+#  define Q_OS_SCO
+#elif defined(__USLC__)                  /* all SCO platforms + UDK or OUDK */
+#  define Q_OS_UNIXWARE
+#  define Q_OS_UNIXWARE7
+#elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */
+#  define Q_OS_UNIXWARE
+#  define Q_OS_UNIXWARE7
+#elif defined(__MAKEDEPEND__)
+#else
+#  error "TQt has not been ported to this OS - talk to qt-bugs@trolltech.com"
+#endif
+
+#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
+#  define Q_OS_WIN
+#endif
+
+#if defined(Q_OS_MAC9) || defined(Q_OS_MACX)
+#  define Q_OS_MAC
+#endif
+
+#if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN)
+#  undef Q_OS_UNIX
+#elif !defined(Q_OS_UNIX)
+#  define Q_OS_UNIX
+#endif
+
+#if defined(Q_OS_MACX)
+#  ifdef MAC_OS_X_VERSION_MIN_RETQUIRED
+#    undef MAC_OS_X_VERSION_MIN_RETQUIRED
+#  endif
+#  define MAC_OS_X_VERSION_MIN_RETQUIRED MAC_OS_X_VERSION_10_2
+#  include <AvailabilityMacros.h>
+#  if !defined(MAC_OS_X_VERSION_10_3)
+#     define MAC_OS_X_VERSION_10_3 MAC_OS_X_VERSION_10_2 + 1
+#  endif
+#  if !defined(MAC_OS_X_VERSION_10_4)
+#       define MAC_OS_X_VERSION_10_4 MAC_OS_X_VERSION_10_3 + 1
+#  endif
+#  if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4)
+#    error "This version of Mac OS X is unsupported"
+#  endif
+#endif
+
+
+/*
+   The compiler, must be one of: (Q_CC_x)
+
+     SYM	- Symantec C++ for both PC and Macintosh
+     MPW	- MPW C++
+     MWERKS	- Metrowerks CodeWarrior
+     MSVC	- Microsoft Visual C/C++, Intel C++ for Windows
+     BOR	- Borland/Turbo C++
+     WAT	- Watcom C++
+     GNU	- GNU C++
+     COMEAU	- Comeau C++
+     EDG	- Edison Design Group C++
+     OC		- CenterLine C++
+     SUN	- Sun WorkShop, Forte Developer, or Sun ONE Studio C++
+     MIPS	- MIPSpro C++
+     DEC	- DEC C++
+     HP		- HPUX C++
+     HPACC	- HPUX ANSI C++
+     USLC	- SCO OUDK, UDK, and UnixWare 2.X C++
+     CDS	- Reliant C++
+     KAI	- KAI C++
+     INTEL	- Intel C++ for Linux, Intel C++ for Windows
+     HIGHC	- MetaWare High C/C++
+     PGI	- Portland Group C++
+     GHS	- Green Hills Optimizing C++ Compilers
+
+   Should be sorted most to least authoritative.
+*/
+
+/* Symantec C++ is now Digital Mars */
+#if defined(__DMC__) || defined(__SC__)
+#  define Q_CC_SYM
+/* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */
+#  if defined(__SC__) && __SC__ < 0x750
+#    define Q_NO_EXPLICIT_KEYWORD
+#  endif
+#  define Q_NO_USING_KEYWORD
+#  if !defined(_CPPUNWIND)
+#    define Q_NO_EXCEPTIONS
+#  endif
+
+#elif defined(applec)
+#  define Q_CC_MPW
+#  define Q_NO_BOOL_TYPE
+#  define Q_NO_EXPLICIT_KEYWORD
+#  define Q_NO_USING_KEYWORD
+
+#elif defined(__MWERKS__)
+#  define Q_CC_MWERKS
+/* "explicit" recognized since 4.0d1 */
+#  define TQMAC_PASCAL pascal
+
+#elif defined(_MSC_VER)
+#  define Q_CC_MSVC
+/* proper support of bool for _MSC_VER >= 1100 */
+#  define Q_CANNOT_DELETE_CONSTANT
+#  define Q_INLINE_TEMPLATES inline
+/* Visual C++.Net issues for _MSC_VER >= 1300 */
+#  if _MSC_VER >= 1300
+#    define Q_CC_MSVC_NET
+#    if _MSC_VER < 1310 || (defined(Q_OS_WIN64) && defined(_M_IA64))
+#      define Q_TYPENAME
+#    endif
+#  endif
+/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */
+#  if defined(__INTEL_COMPILER)
+#    define Q_CC_INTEL
+#    if !defined(__EXCEPTIONS)
+#      define Q_NO_EXCEPTIONS
+#    endif
+#  else
+#    define Q_NO_USING_KEYWORD /* ### check "using" status */
+#  endif
+
+#elif defined(__BORLANDC__) || defined(__TURBOC__)
+#  define Q_CC_BOR
+#  if __BORLANDC__ < 0x502
+#    define Q_NO_BOOL_TYPE
+#    define Q_NO_EXPLICIT_KEYWORD
+#  endif
+#  define Q_NO_USING_KEYWORD /* ### check "using" status */
+
+#elif defined(__WATCOMC__)
+#  define Q_CC_WAT
+#  if defined(Q_OS_QNX4)
+/* compiler flags */
+#    define Q_TYPENAME
+#    define Q_NO_BOOL_TYPE
+#    define Q_CANNOT_DELETE_CONSTANT
+#    define mutable
+/* ??? */
+#    define Q_BROKEN_TEMPLATE_SPECIALIZATION
+/* no template classes in TQVariant */
+#    define QT_NO_TEMPLATE_VARIANT
+/* Wcc does not fill in functions needed by valuelists, maps, and
+   valuestacks implicitly */
+#    define Q_FULL_TEMPLATE_INSTANTIATION
+/* can we just compare the structures? */
+#    define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP
+/* these are not useful to our customers */
+#    define QT_QWS_NO_SHM
+#    define QT_NO_QWS_MULTIPROCESS
+#    define QT_NO_SQL
+#    define QT_NO_QWS_CURSOR
+#  endif
+
+#elif defined(__GNUC__)
+#  define Q_CC_GNU
+#  define Q_C_CALLBACKS
+#  if __GNUC__ == 2 && __GNUC_MINOR__ <= 7
+#    define Q_FULL_TEMPLATE_INSTANTIATION
+#  endif
+/* GCC 2.95 knows "using" but does not support it correctly */
+#  if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
+#    define Q_NO_USING_KEYWORD
+#  endif
+/* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */
+#  if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1
+#    define Q_WRONG_SB_CTYPE_MACROS
+#  endif
+
+/* ARM gcc pads structs to 32 bits, even when they contain a single
+   char, or short.  We tell gcc to pack TQChars to 16 bits, to avoid
+   TQString bloat. However, gcc 3.4 doesn't allow us to create references to
+   members of a packed struct. (Pointers are OK, because then you
+   supposedly know what you are doing.) */
+#  if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
+#    define Q_PACKED __attribute__ ((packed))
+#    if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
+#      define Q_NO_PACKED_REFERENCE
+#    endif
+#  endif
+#  if !defined(__EXCEPTIONS)
+#    define Q_NO_EXCEPTIONS
+#  endif
+
+/* IBM compiler versions are a bit messy. There are actually two products:
+   the C product, and the C++ product. The C++ compiler is always packaged
+   with the latest version of the C compiler. Version numbers do not always
+   match. This little table (I'm not sure it's accurate) should be helpful:
+
+   C++ product                C product
+
+            C Set 3.1         C Compiler 3.0
+                  ...         ...
+   C++ Compiler 3.6.6         C Compiler 4.3
+                  ...         ...
+   Visual Age C++ 4.0         ...
+                  ...         ...
+   Visual Age C++ 5.0         C Compiler 5.0
+                  ...         ...
+   Visual Age C++ 6.0         C Compiler 6.0
+
+   Now:
+   __xlC__    is the version of the C compiler in hexadecimal notation
+              is only an approximation of the C++ compiler version
+   __IBMCPP__ is the version of the C++ compiler in decimal notation
+              but it is not defined on older compilers like C Set 3.1 */
+#elif defined(__xlC__)
+#  define Q_CC_XLC
+#  define Q_FULL_TEMPLATE_INSTANTIATION
+#  if __xlC__ < 0x400
+#    define Q_NO_BOOL_TYPE
+#    define Q_NO_EXPLICIT_KEYWORD
+#    define Q_NO_USING_KEYWORD
+#    define Q_TYPENAME
+#    define Q_INLINE_TEMPLATES inline
+#    define Q_BROKEN_TEMPLATE_SPECIALIZATION
+#    define Q_CANNOT_DELETE_CONSTANT
+#  endif
+
+/* Older versions of DEC C++ do not define __EDG__ or __EDG - observed
+   on DEC C++ V5.5-004. New versions do define  __EDG__ - observed on
+   Compaq C++ V6.3-002.
+   This compiler is different enough from other EDG compilers to handle
+   it separately anyway. */
+#elif defined(__DECCXX) || defined(__DECC)
+#  define Q_CC_DEC
+/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older
+   DEC C++ V5 compilers. */
+#  if defined(__EDG__)
+#    define Q_CC_EDG
+#  endif
+/* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead
+   - observed on Compaq C++ V6.3-002.
+   In any case versions prior to Compaq C++ V6.0-005 do not have bool. */
+#  if !defined(_BOOL_EXISTS)
+#    define Q_NO_BOOL_TYPE
+#  endif
+/* Spurious (?) error messages observed on Compaq C++ V6.5-014. */
+#  define Q_NO_USING_KEYWORD
+/* Apply to all versions prior to Compaq C++ V6.0-000 - observed on
+   DEC C++ V5.5-004. */
+#  if __DECCXX_VER < 60060000
+#    define Q_TYPENAME
+#    define Q_BROKEN_TEMPLATE_SPECIALIZATION
+#    define Q_CANNOT_DELETE_CONSTANT
+#  endif
+/* avoid undefined symbol problems with out-of-line template members */
+#  define Q_INLINE_TEMPLATES inline
+
+/* Compilers with EDG front end are similar. To detect them we test:
+   __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b
+   __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */
+#elif defined(__EDG) || defined(__EDG__)
+#  define Q_CC_EDG
+/* From the EDG documentation (does not seem to apply to Compaq C++):
+   _BOOL
+    	Defined in C++ mode when bool is a keyword. The name of this
+	predefined macro is specified by a configuration flag. _BOOL
+	is the default.
+   __BOOL_DEFINED
+   	Defined in Microsoft C++ mode when bool is a keyword. */
+#  if !defined(_BOOL) && !defined(__BOOL_DEFINED)
+#    define Q_NO_BOOL_TYPE
+#  endif
+
+/* The Comeau compiler is based on EDG and does define __EDG__ */
+#  if defined(__COMO__)
+#    define Q_CC_COMEAU
+#    define Q_C_CALLBACKS
+
+/* The `using' keyword was introduced to avoid KAI C++ warnings
+   but it's now causing KAI C++ errors instead. The standard is
+   unclear about the use of this keyword, and in practice every
+   compiler is using its own set of rules. Forget it. */
+#  elif defined(__KCC)
+#    define Q_CC_KAI
+#    if !defined(_EXCEPTIONS)
+#      define Q_NO_EXCEPTIONS
+#    endif
+#    define Q_NO_USING_KEYWORD
+
+/* Using the `using' keyword avoids Intel C++ for Linux warnings */
+#  elif defined(__INTEL_COMPILER)
+#    define Q_CC_INTEL
+#    if !defined(__EXCEPTIONS)
+#      define Q_NO_EXCEPTIONS
+#    endif
+
+/* The Portland Group compiler is based on EDG and does define __EDG__ */
+#  elif defined(__PGI)
+#    define Q_CC_PGI
+#    if !defined(__EXCEPTIONS)
+#      define Q_NO_EXCEPTIONS
+#    endif
+
+/* Never tested! */
+#  elif defined(__ghs)
+#    define Q_CC_GHS
+
+/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */
+#  elif defined(__USLC__) && defined(__SCO_VERSION__)
+#    define Q_CC_USLC
+/* The latest UDK 7.1.1b does not need this, but previous versions do */
+#    if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010)
+#      define Q_INLINE_TEMPLATES inline
+#    endif
+#    define Q_NO_USING_KEYWORD /* ### check "using" status */
+
+/* Never tested! */
+#  elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER)
+#    define Q_CC_OC
+#    define Q_NO_USING_KEYWORD
+
+/* CDS++ defines __EDG__ although this is not documented in the Reliant
+   documentation. It also follows conventions like _BOOL and this documented */
+#  elif defined(sinix)
+#    define Q_CC_CDS
+#    define Q_NO_USING_KEYWORD
+#    if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */
+#      define Q_NO_EXCEPTIONS
+#    endif
+
+/* The MIPSpro compiler in o32 mode is based on EDG but disables features
+   such as template specialization nevertheless */
+#  elif defined(__sgi)
+#    define Q_CC_MIPS
+#    if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */
+#      define Q_TYPENAME
+#      define Q_BROKEN_TEMPLATE_SPECIALIZATION
+#      define Q_NO_EXPLICIT_KEYWORD
+#      define Q_INLINE_TEMPLATES inline
+#    elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */
+#      define Q_TYPENAME
+#      define Q_BROKEN_TEMPLATE_SPECIALIZATION
+#    endif
+#    define Q_NO_USING_KEYWORD /* ### check "using" status */
+#    if defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 740)
+#      pragma set woff 3624,3625, 3649 /* turn off some harmless warnings */
+#    endif
+#  endif
+
+/* The older UnixWare 2.X compiler? */
+#elif defined(__USLC__)
+#  define Q_CC_USLC
+#  define Q_TYPENAME
+#  define Q_NO_BOOL_TYPE
+#  define Q_NO_EXPLICIT_KEYWORD
+#  define Q_NO_USING_KEYWORD
+#  define Q_INLINE_TEMPLATES inline
+
+/* Never tested! */
+#elif defined(__HIGHC__)
+#  define Q_CC_HIGHC
+
+#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C)
+#  define Q_CC_SUN
+/* 5.0 compiler or better
+    'bool' is enabled by default but can be disabled using -features=nobool
+    in which case _BOOL is not defined
+        this is the default in 4.2 compatibility mode triggered by -compat=4 */
+#  if __SUNPRO_CC >= 0x500
+#    if !defined(_BOOL)
+#      define Q_NO_BOOL_TYPE
+#    endif
+#    if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4)
+#      define Q_NO_USING_KEYWORD
+#    endif
+#    define Q_C_CALLBACKS
+/* 4.2 compiler or older */
+#  else
+#    define Q_NO_BOOL_TYPE
+#    define Q_NO_EXPLICIT_KEYWORD
+#    define Q_NO_USING_KEYWORD
+#  endif
+
+/* CDS++ does not seem to define __EDG__ or __EDG according to Reliant
+   documentation but nevertheless uses EDG conventions like _BOOL */
+#elif defined(sinix)
+#  define Q_CC_EDG
+#  define Q_CC_CDS
+#  if !defined(_BOOL)
+#    define Q_NO_BOOL_TYPE
+#  endif
+#  define Q_BROKEN_TEMPLATE_SPECIALIZATION
+
+#elif defined(Q_OS_HPUX)
+/* __HP_aCC was not defined in first aCC releases */
+#  if defined(__HP_aCC) || __cplusplus >= 199707L
+#    define Q_CC_HPACC
+#  else
+#    define Q_CC_HP
+#    define Q_NO_BOOL_TYPE
+#    define Q_FULL_TEMPLATE_INSTANTIATION
+#    define Q_BROKEN_TEMPLATE_SPECIALIZATION
+#    define Q_NO_EXPLICIT_KEYWORD
+#  endif
+#  define Q_NO_USING_KEYWORD /* ### check "using" status */
+
+#else
+#  error "TQt has not been tested with this compiler - talk to qt-bugs@trolltech.com"
+#endif
+
+#ifndef Q_PACKED
+#  define Q_PACKED
+#endif
+
+
+/*
+   The window system, must be one of: (Q_WS_x)
+
+     MACX	- Mac OS X
+     MAC9	- Mac OS 9
+     TQWS	- TQt/Embedded
+     WIN32	- Windows
+     X11	- X Window System
+     PM		- unsupported
+     WIN16	- unsupported
+*/
+
+#if defined(Q_OS_MAC9)
+#  define Q_WS_MAC9
+#elif defined(Q_OS_MSDOS)
+#  define Q_WS_WIN16
+#  error "TQt retquires Win32 and does not work with Windows 3.x"
+#elif defined(_WIN32_X11_)
+#  define Q_WS_X11
+#elif defined(Q_OS_WIN32)
+#  define Q_WS_WIN32
+#  if defined(Q_OS_WIN64)
+#    define Q_WS_WIN64
+#  endif
+#elif defined(Q_OS_OS2)
+#  define Q_WS_PM
+#  error "TQt does not work with OS/2 Presentation Manager or Workplace Shell"
+#elif defined(Q_OS_UNIX)
+#  if defined(TQWS)
+#    define Q_WS_QWS
+#    define QT_NO_QWS_IM
+#  elif defined(Q_OS_MACX)
+#    define Q_WS_MACX
+#  else
+#    define Q_WS_X11
+#  endif
+#endif
+#if defined(Q_OS_MAC) && !defined(TQMAC_PASCAL)
+#  define TQMAC_PASCAL
+#endif
+
+#if defined(Q_WS_WIN16) || defined(Q_WS_WIN32)
+#  define Q_WS_WIN
+#endif
+
+#if (defined(Q_WS_MAC9) || defined(Q_WS_MACX)) && !defined(Q_WS_QWS) && !defined(Q_WS_X11)
+#  define Q_WS_MAC
+#endif
+
+
+/*
+   Some classes do not permit copies to be made of an object.
+   These classes contains a private copy constructor and operator=
+   to disable copying (the compiler gives an error message).
+   Undefine Q_DISABLE_COPY to turn off this checking.
+*/
+
+#define Q_DISABLE_COPY
+
+#if defined(__cplusplus)
+
+
+//
+// Useful type definitions for TQt
+//
+
+#if defined(Q_NO_BOOL_TYPE)
+#if defined(Q_CC_HP)
+// bool is an unsupported reserved keyword in later versions
+#define bool int
+#else
+typedef int bool;
+#endif
+#endif
+
+typedef unsigned char   uchar;
+typedef unsigned short  ushort;
+typedef unsigned	uint;
+typedef unsigned long   ulong;
+typedef char	       *pchar;
+typedef uchar	       *puchar;
+typedef const char     *pcchar;
+
+
+//
+// Constant bool values
+//
+
+#ifndef TRUE
+const bool FALSE = 0;
+const bool TRUE = !0;
+#endif
+#if defined(__WATCOMC__)
+#  if defined(Q_OS_QNX4)
+const bool false = FALSE;
+const bool true = TRUE;
+#  endif
+#endif
+
+//
+// Proper for-scoping
+// ### turn on in 4.0
+
+#if 0 && defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
+#  define for if(0){}else for
+#endif
+
+//
+// Use the "explicit" keyword on platforms that support it.
+//
+
+#if !defined(Q_NO_EXPLICIT_KEYWORD)
+#  define Q_EXPLICIT explicit
+#else
+#  define Q_EXPLICIT
+#endif
+
+
+//
+// Workaround for static const members on MSVC++.
+//
+
+#if defined(Q_CC_MSVC)
+#  define QT_STATIC_CONST static
+#  define QT_STATIC_CONST_IMPL
+#else
+#  define QT_STATIC_CONST static const
+#  define QT_STATIC_CONST_IMPL const
+#endif
+
+
+//
+// Utility macros and inline functions
+//
+
+#define TQMAX(a, b)	((b) < (a) ? (a) : (b))
+#define TQMIN(a, b)	((a) < (b) ? (a) : (b))
+#define TQABS(a)	((a) >= 0  ? (a) : -(a))
+
+inline int qRound( double d )
+{
+    return d >= 0.0 ? int(d + 0.5) : int( d - ((int)d-1) + 0.5 ) + ((int)d-1);
+}
+
+
+//
+// Size-dependent types (architechture-dependent byte order)
+//
+
+#if !defined(QT_CLEAN_NAMESPACE)
+// source compatibility with TQt 1.x
+typedef signed char		INT8;		// 8 bit signed
+typedef unsigned char		UINT8;		// 8 bit unsigned
+typedef short			INT16;		// 16 bit signed
+typedef unsigned short		UINT16;		// 16 bit unsigned
+typedef int			INT32;		// 32 bit signed
+typedef unsigned int		UINT32;		// 32 bit unsigned
+#endif
+
+typedef signed char		Q_INT8;		// 8 bit signed
+typedef unsigned char		Q_UINT8;	// 8 bit unsigned
+typedef short			Q_INT16;	// 16 bit signed
+typedef unsigned short		Q_UINT16;	// 16 bit unsigned
+typedef int			Q_INT32;	// 32 bit signed
+typedef unsigned int		Q_UINT32;	// 32 bit unsigned
+#if defined(Q_OS_WIN64)
+typedef __int64			Q_LONG;		// word up to 64 bit signed
+typedef unsigned __int64	Q_ULONG;	// word up to 64 bit unsigned
+#else
+typedef long			Q_LONG;		// word up to 64 bit signed
+typedef unsigned long		Q_ULONG;	// word up to 64 bit unsigned
+#endif
+#if defined(Q_OS_WIN) && !defined(Q_CC_GNU)
+#  define Q_INT64_C(c) 		c ## i64	// signed 64 bit constant
+#  define Q_UINT64_C(c)		c ## ui64	// unsigned 64 bit constant
+typedef __int64			Q_INT64;	// 64 bit signed
+typedef unsigned __int64	Q_UINT64;	// 64 bit unsigned
+#else
+#  define Q_INT64_C(c) 		c ## LL		// signed 64 bit constant
+#  define Q_UINT64_C(c)		c ## ULL	// unsigned 64 bit constant
+typedef long long		Q_INT64;	// 64 bit signed
+typedef unsigned long long	Q_UINT64;	// 64 bit unsigned
+#endif
+typedef Q_INT64			Q_LLONG;	// signed long long
+typedef Q_UINT64		Q_ULLONG;	// unsigned long long
+
+#if defined(Q_OS_MACX) && !defined(QT_LARGEFILE_SUPPORT)
+#  define QT_LARGEFILE_SUPPORT 64
+#endif
+#if defined(QT_LARGEFILE_SUPPORT)
+    typedef Q_ULLONG TQtOffset;
+#else
+    typedef Q_ULONG TQtOffset;
+#endif
+
+
+//
+// Data stream functions is provided by many classes (defined in qdatastream.h)
+//
+
+class TQDataStream;
+
+
+//
+// Feature subsetting
+//
+// Note that disabling some features will produce a libqt that is not
+// compatible with other libqt builds. Such modifications are only
+// supported on TQt/Embedded where reducing the library size is important
+// and where the application-suite is often a fixed set.
+//
+
+#if !defined(QT_MOC)
+#if defined(TQCONFIG_LOCAL)
+#include "qconfig-local.h"
+#elif defined(TQCONFIG_MINIMAL)
+#include "qconfig-minimal.h"
+#elif defined(TQCONFIG_SMALL)
+#include "qconfig-small.h"
+#elif defined(TQCONFIG_MEDIUM)
+#include "qconfig-medium.h"
+#elif defined(TQCONFIG_LARGE)
+#include "qconfig-large.h"
+#else // everything...
+#include "qconfig.h"
+#endif
+#endif
+
+
+#ifndef QT_BUILD_KEY
+#define QT_BUILD_KEY "unspecified"
+#endif
+
+// prune to local config
+#include "qmodules.h"
+#ifndef QT_MODULE_DIALOGS
+# define QT_NO_DIALOG
+#endif
+#ifndef QT_MODULE_ICONVIEW
+# define QT_NO_ICONVIEW
+#endif
+#ifndef QT_MODULE_WORKSPACE
+# define QT_NO_WORKSPACE
+#endif
+#ifndef QT_MODULE_NETWORK
+#define QT_NO_NETWORK
+#endif
+#ifndef QT_MODULE_CANVAS
+# define QT_NO_CANVAS
+#endif
+#ifndef QT_MODULE_TABLE
+#define QT_NO_TABLE
+#endif
+#ifndef QT_MODULE_XML
+# define QT_NO_XML
+#endif
+#ifndef QT_MODULE_OPENGL
+# define QT_NO_OPENGL
+#endif
+#if !defined(QT_MODULE_SQL)
+# define QT_NO_SQL
+#endif
+
+#if defined(Q_WS_MAC9)
+//No need for menu merging
+#  ifndef TQMAC_QMENUBAR_NO_MERGE
+#    define TQMAC_QMENUBAR_NO_MERGE
+#  endif
+//Mac9 does not use quartz
+#  ifndef TQMAC_NO_QUARTZ
+#    define TQMAC_NO_QUARTZ
+#  endif
+#  ifndef TQMAC_QMENUBAR_NO_EVENT
+#    define TQMAC_QMENUBAR_NO_EVENT
+#  endif
+#endif
+#if defined(Q_WS_MACX) //for no nobody uses quartz, just putting in first level hooks
+#  ifndef TQMAC_NO_QUARTZ
+#    define TQMAC_NO_QUARTZ
+#  endif
+#  ifndef TQMAC_QMENUBAR_NO_EVENT
+#    define TQMAC_QMENUBAR_NO_EVENT
+#  endif
+#endif
+
+#if !defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#  define QT_NO_COP
+#endif
+
+#ifndef QT_H
+#include "qfeatures.h"
+#endif /* QT_H */
+
+
+//
+// Create TQt DLL if QT_DLL is defined (Windows only)
+// or QT_SHARED is defined (Kylix only)
+//
+
+#if defined(Q_OS_WIN)
+#  if defined(QT_NODLL)
+#    undef QT_MAKEDLL
+#    undef QT_DLL
+#  elif defined(QT_MAKEDLL)	/* create a TQt DLL library */
+#    if defined(QT_DLL)
+#      undef QT_DLL
+#    endif
+#    define Q_EXPORT  __declspec(dllexport)
+#    define Q_TEMPLATEDLL
+#    define Q_TEMPLATE_EXTERN
+#    undef  Q_DISABLE_COPY	/* avoid unresolved externals */
+#  elif defined(QT_DLL)		/* use a TQt DLL library */
+#    define Q_EXPORT  __declspec(dllimport)
+#    define Q_TEMPLATEDLL
+#    ifndef Q_TEMPLATE_EXTERN
+#      if defined(Q_CC_MSVC_NET)
+#        define Q_TEMPLATE_EXTERN extern
+#      else
+#        define Q_TEMPLATE_EXTERN
+#      endif
+#    endif
+#    undef  Q_DISABLE_COPY	/* avoid unresolved externals */
+#  endif
+#elif defined(Q_OS_LINUX) && defined(Q_CC_BOR)
+#  if defined(QT_SHARED)	/* create a TQt shared library */
+#    define Q_EXPORT  __declspec(dllexport)
+#    define Q_TEMPLATEDLL
+#    define Q_TEMPLATE_EXTERN
+#    undef  Q_DISABLE_COPY	/* avoid unresolved externals */
+#  else
+#    define Q_TEMPLATEDLL
+#    define Q_TEMPLATE_EXTERN
+#    undef  Q_DISABLE_COPY 	/* avoid unresolved externals */
+#  endif
+#else
+#  undef QT_MAKEDLL		/* ignore these for other platforms */
+#  undef QT_DLL
+#endif
+
+#ifndef Q_EXPORT
+#  define Q_EXPORT
+#endif
+
+
+//
+// Some platform specific stuff
+//
+
+#if defined(Q_WS_WIN)
+extern Q_EXPORT bool qt_winunicode;
+#endif
+
+
+//
+// System information
+//
+
+Q_EXPORT const char *qVersion();
+Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian );
+Q_EXPORT bool qSharedBuild();
+#if defined(Q_OS_MAC)
+int qMacVersion();
+#elif defined(Q_WS_WIN)
+Q_EXPORT int qWinVersion();
+#if defined(UNICODE)
+#define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi }
+#define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi )
+#else
+#define QT_WA( uni, ansi ) ansi
+#define QT_WA_INLINE( uni, ansi ) ansi
+#endif
+#endif
+
+#ifdef Q_OS_TEMP
+#ifdef QT_WA
+#undef QT_WA
+#undef QT_WA_INLINE
+#endif
+#define QT_WA( uni, ansi ) uni
+#define QT_WA_INLINE( uni, ansi ) ( uni )
+#endif
+
+#ifndef Q_INLINE_TEMPLATES
+#  define Q_INLINE_TEMPLATES
+#endif
+
+#ifndef Q_TYPENAME
+#  define Q_TYPENAME typename
+#endif
+
+//
+// Use to avoid "unused parameter" warnings
+//
+#define Q_UNUSED(x) (void)x;
+
+//
+// Debugging and error handling
+//
+
+#if !defined(QT_NO_CHECK)
+#  define QT_CHECK_STATE			// check state of objects etc.
+#  define QT_CHECK_RANGE			// check range of indexes etc.
+#  define QT_CHECK_NULL				// check null pointers
+#  define QT_CHECK_MATH				// check math functions
+#endif
+
+#if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG)
+#  define QT_DEBUG				// display debug messages
+#  if !defined(QT_NO_COMPAT)			// compatibility with TQt 2
+#    if !defined(NO_DEBUG) && !defined(DEBUG)
+#      if !defined(Q_OS_MACX)			// clash with MacOS X headers
+#        define DEBUG
+#      endif
+#    endif
+#  endif
+#endif
+
+
+Q_EXPORT void qDebug( const char *, ... )	// print debug message
+#if defined(Q_CC_GNU) && !defined(__INSURE__)
+    __attribute__ ((format (printf, 1, 2)))
+#endif
+;
+
+Q_EXPORT void qWarning( const char *, ... )	// print warning message
+#if defined(Q_CC_GNU) && !defined(__INSURE__)
+    __attribute__ ((format (printf, 1, 2)))
+#endif
+;
+
+Q_EXPORT void qFatal( const char *, ... )	// print fatal message and exit
+#if defined(Q_CC_GNU)
+    __attribute__ ((format (printf, 1, 2)))
+#endif
+;
+
+Q_EXPORT void qSystemWarning( const char *, int code = -1 );
+
+#if !defined(QT_CLEAN_NAMESPACE) 		// compatibility with TQt 1
+
+Q_EXPORT void debug( const char *, ... )	// print debug message
+#if defined(Q_CC_GNU) && !defined(__INSURE__)
+    __attribute__ ((format (printf, 1, 2)))
+#endif
+;
+
+Q_EXPORT void warning( const char *, ... )	// print warning message
+#if defined(Q_CC_GNU) && !defined(__INSURE__)
+    __attribute__ ((format (printf, 1, 2)))
+#endif
+;
+
+Q_EXPORT void fatal( const char *, ... )	// print fatal message and exit
+#if defined(Q_CC_GNU) && !defined(__INSURE__)
+    __attribute__ ((format (printf, 1, 2)))
+#endif
+;
+
+#endif // QT_CLEAN_NAMESPACE
+
+
+#if !defined(Q_ASSERT)
+#  if defined(QT_CHECK_STATE)
+#    if defined(QT_FATAL_ASSERT)
+#      define Q_ASSERT(x)  ((x) ? (void)0 : qFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
+#    else
+#      define Q_ASSERT(x)  ((x) ? (void)0 : qWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
+#    endif
+#  else
+#    define Q_ASSERT(x)
+#  endif
+#endif
+
+#if !defined(QT_NO_COMPAT)			// compatibility with TQt 2
+#  if !defined(ASSERT)
+#    if !defined(Q_OS_TEMP)
+#      define ASSERT(x) Q_ASSERT(x)
+#    endif
+#  endif
+#endif // QT_NO_COMPAT
+
+
+Q_EXPORT bool qt_check_pointer( bool c, const char *, int );
+
+#if defined(QT_CHECK_NULL)
+#  define Q_CHECK_PTR(p) (qt_check_pointer((p)==0,__FILE__,__LINE__))
+#else
+#  define Q_CHECK_PTR(p)
+#endif
+
+#if !defined(QT_NO_COMPAT)			// compatibility with TQt 2
+#  if !defined(CHECK_PTR)
+#    define CHECK_PTR(x) Q_CHECK_PTR(x)
+#  endif
+#endif // QT_NO_COMPAT
+
+enum TQtMsgType { TQtDebugMsg, TQtWarningMsg, TQtFatalMsg };
+
+typedef void (*TQtMsgHandler)(TQtMsgType, const char *);
+Q_EXPORT TQtMsgHandler qInstallMsgHandler( TQtMsgHandler );
+
+#if !defined(QT_NO_COMPAT)			// compatibility with TQt 2
+typedef TQtMsgHandler msg_handler;
+#endif // QT_NO_COMPAT
+
+Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE );
+
+Q_EXPORT void qObsolete( const char *obj, const char *oldfunc,
+		   const char *newfunc );
+Q_EXPORT void qObsolete( const char *obj, const char *oldfunc );
+Q_EXPORT void qObsolete( const char *message );
+
+
+//
+// Install paths from configure
+//
+
+Q_EXPORT const char *qInstallPath();
+Q_EXPORT const char *qInstallPathDocs();
+Q_EXPORT const char *qInstallPathHeaders();
+Q_EXPORT const char *qInstallPathLibs();
+Q_EXPORT const char *qInstallPathBins();
+Q_EXPORT const char *qInstallPathPlugins();
+Q_EXPORT const char *qInstallPathData();
+Q_EXPORT const char *qInstallPathTranslations();
+Q_EXPORT const char *qInstallPathSysconf();
+
+#endif /* __cplusplus */
+
+/*
+ compilers which follow outdated template instantiation rules
+ retquire a class to have a comparison operator to exist when
+ a TQValueList of this type is instantiated. It's not actually
+ used in the list, though. Hence the dummy implementation.
+ Just in case other code relies on it we better trigger a warning
+ mandating a real implementation.
+*/
+#ifdef Q_FULL_TEMPLATE_INSTANTIATION
+#  define Q_DUMMY_COMPARISON_OPERATOR(C) \
+    bool operator==( const C& ) const { \
+        qWarning( #C"::operator==( const "#C"& ) got called." ); \
+        return FALSE; \
+    }
+#else
+#  define Q_DUMMY_COMPARISON_OPERATOR(C)
+#endif
+
+#endif /* TQGLOBAL_H */
+
+/*
+ Avoid some particularly useless warnings from some stupid compilers.
+ To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out
+ the line "#define QT_NO_WARNINGS"
+*/
+
+#if !defined(QT_CC_WARNINGS)
+#  define QT_NO_WARNINGS
+#endif
+#if defined(QT_NO_WARNINGS)
+#  if defined(Q_CC_MSVC)
+#    pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data
+#    pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier'
+#    pragma warning(disable: 4514) // unreferenced inline/local function has been removed
+#    pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning)
+#    pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2'
+#    pragma warning(disable: 4706) // assignment within conditional expression
+#    pragma warning(disable: 4786) // truncating debug info after 255 characters
+#    pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated
+#    pragma warning(disable: 4355) // 'this' : used in base member initializer list
+#    pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation
+#    pragma warning(disable: 4710) // function not inlined
+#  elif defined(Q_CC_BOR)
+#    pragma option -w-inl
+#    pragma option -w-aus
+#    pragma warn -inl
+#    pragma warn -pia
+#    pragma warn -ccc
+#    pragma warn -rch
+#    pragma warn -sig
+#  endif
+#endif
+
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qglwidget-members.html b/doc/html/qglwidget-members.html new file mode 100644 index 00000000..00f28cf4 --- /dev/null +++ b/doc/html/qglwidget-members.html @@ -0,0 +1,368 @@ + + + + + +TQGLWidget Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGLWidget

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qglwidget.html b/doc/html/qglwidget.html new file mode 100644 index 00000000..a9fa0e7e --- /dev/null +++ b/doc/html/qglwidget.html @@ -0,0 +1,583 @@ + + + + + +TQGLWidget Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGLWidget Class Reference
[OpenGL module]

+ +

The TQGLWidget class is a widget for rendering OpenGL graphics. +More... +

#include <qgl.h> +

Inherits TQWidget and TQGL. +

List of all member functions. +

Public Members

+
    +
  • TQGLWidget ( TQWidget * parent = 0, const char * name = 0, const TQGLWidget * shareWidget = 0, WFlags f = 0 )
  • +
  • TQGLWidget ( TQGLContext * context, TQWidget * parent, const char * name = 0, const TQGLWidget * shareWidget = 0, WFlags f = 0 )
  • +
  • TQGLWidget ( const TQGLFormat & format, TQWidget * parent = 0, const char * name = 0, const TQGLWidget * shareWidget = 0, WFlags f = 0 )
  • +
  • ~TQGLWidget ()
  • +
  • void qglColor ( const TQColor & c ) const
  • +
  • void qglClearColor ( const TQColor & c ) const
  • +
  • bool isValid () const
  • +
  • bool isSharing () const
  • +
  • virtual void makeCurrent ()
  • +
  • void doneCurrent ()
  • +
  • bool doubleBuffer () const
  • +
  • virtual void swapBuffers ()
  • +
  • TQGLFormat format () const
  • +
  • const TQGLContext * context () const
  • +
  • virtual TQPixmap renderPixmap ( int w = 0, int h = 0, bool useContext = FALSE )
  • +
  • virtual TQImage grabFrameBuffer ( bool withAlpha = FALSE )
  • +
  • virtual void makeOverlayCurrent ()
  • +
  • const TQGLContext * overlayContext () const
  • +
  • const TQGLColormap & colormap () const
  • +
  • void setColormap ( const TQGLColormap & cmap )
  • +
  • void renderText ( int x, int y, const TQString & str, const TQFont & fnt = TQFont ( ), int listBase = 2000 )
  • +
  • void renderText ( double x, double y, double z, const TQString & str, const TQFont & fnt = TQFont ( ), int listBase = 2000 )
  • +
+

Public Slots

+ +

Static Public Members

+ +

Protected Members

+ +

Detailed Description

+ + +The TQGLWidget class is a widget for rendering OpenGL graphics. + +

+ + + +

TQGLWidget provides functionality for displaying OpenGL* +graphics integrated into a TQt application. It is very simple to +use. You inherit from it and use the subclass like any other +TQWidget, except that instead of drawing the widget's contents +using TQPainter etc. you use the standard OpenGL rendering +commands. +

TQGLWidget provides three convenient virtual functions that you can +reimplement in your subclass to perform the typical OpenGL tasks: +

    +
  • paintGL() - Renders the OpenGL scene. Gets called whenever the widget +needs to be updated. +
  • resizeGL() - Sets up the OpenGL viewport, projection, etc. Gets +called whenever the the widget has been resized (and also when it +is shown for the first time because all newly created widgets get a +resize event automatically). +
  • initializeGL() - Sets up the OpenGL rendering context, defines display +lists, etc. Gets called once before the first time resizeGL() or +paintGL() is called. +
+

Here is a rough outline of how a TQGLWidget subclass might look: +

+    class MyGLDrawer : public TQGLWidget
+    {
+        Q_OBJECT        // must include this if you use TQt signals/slots
+
+    public:
+        MyGLDrawer( TQWidget *parent, const char *name )
+            : TQGLWidget(parent, name) {}
+
+    protected:
+
+        void initializeGL()
+        {
+            // Set up the rendering context, define display lists etc.:
+            ...
+            glClearColor( 0.0, 0.0, 0.0, 0.0 );
+            glEnable(GL_DEPTH_TEST);
+            ...
+        }
+
+        void resizeGL( int w, int h )
+        {
+            // setup viewport, projection etc.:
+            glViewport( 0, 0, (GLint)w, (GLint)h );
+            ...
+            glFrustum( ... );
+            ...
+        }
+
+        void paintGL()
+        {
+            // draw the scene:
+            ...
+            glRotatef( ... );
+            glMaterialfv( ... );
+            glBegin( GL_QUADS );
+            glVertex3f( ... );
+            glVertex3f( ... );
+            ...
+            glEnd();
+            ...
+        }
+
+    };
+    
+ +

If you need to trigger a repaint from places other than paintGL() +(a typical example is when using timers to +animate scenes), you should call the widget's updateGL() function. +

Your widget's OpenGL rendering context is made current when +paintGL(), resizeGL(), or initializeGL() is called. If you need to +call the standard OpenGL API functions from other places (e.g. in +your widget's constructor or in your own paint functions), you +must call makeCurrent() first. +

TQGLWidget provides functions for requesting a new display format and you can also create widgets with +customized rendering contexts. +

You can also share OpenGL display lists between TQGLWidgets (see +the documentation of the TQGLWidget constructors for details). +

Overlays +

+

The TQGLWidget creates a GL overlay context in addition to the +normal context if overlays are supported by the underlying system. +

If you want to use overlays, you specify it in the format. (Note: Overlay must be requested in the format +passed to the TQGLWidget constructor.) Your GL widget should also +implement some or all of these virtual methods: +

+

These methods work in the same way as the normal paintGL() etc. +functions, except that they will be called when the overlay +context is made current. You can explicitly make the overlay +context current by using makeOverlayCurrent(), and you can access +the overlay context directly (e.g. to ask for its transparent +color) by calling overlayContext(). +

On X servers in which the default visual is in an overlay plane, +non-GL TQt windows can also be used for overlays. See the +examples/opengl/overlay_x11 example program for details. +

* OpenGL is a trademark of Silicon Graphics, Inc. in the +United States and other countries. +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

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

+Constructs an OpenGL widget with a parent widget and a name. +

The default format is +used. The widget will be invalid if the +system has no OpenGL support. +

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

If the shareWidget parameter points to a valid TQGLWidget, this +widget will share OpenGL display lists with shareWidget. If +this widget and shareWidget have different formats, display list sharing may fail. You can check +whether display list sharing succeeded by calling isSharing(). +

The initialization of OpenGL rendering state, etc. should be done +by overriding the initializeGL() function, rather than in the +constructor of your TQGLWidget subclass. +

See also TQGLFormat::defaultFormat(). + +

TQGLWidget::TQGLWidget ( TQGLContext * context, TQWidget * parent, const char * name = 0, const TQGLWidget * shareWidget = 0, WFlags f = 0 ) +

+Constructs an OpenGL widget with parent parent, called name. +

The context argument is a pointer to the TQGLContext that +you wish to be bound to this widget. This allows you to pass in +your own TQGLContext sub-classes. +

The widget will be invalid if the system +has no OpenGL support. +

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

If the shareWidget parameter points to a valid TQGLWidget, this +widget will share OpenGL display lists with shareWidget. If +this widget and shareWidget have different formats, display list sharing may fail. You can check +whether display list sharing succeeded by calling isSharing(). +

The initialization of OpenGL rendering state, etc. should be done +by overriding the initializeGL() function, rather than in the +constructor of your TQGLWidget subclass. +

See also TQGLFormat::defaultFormat() and isValid(). + +

TQGLWidget::TQGLWidget ( const TQGLFormat & format, TQWidget * parent = 0, const char * name = 0, const TQGLWidget * shareWidget = 0, WFlags f = 0 ) +

+Constructs an OpenGL widget with parent parent, called name. +

The format argument specifies the desired rendering options. If the underlying OpenGL/Window system +cannot satisfy all the features requested in format, the +nearest subset of features will be used. After creation, the +format() method will return the actual format obtained. +

The widget will be invalid if the system +has no OpenGL support. +

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

If the shareWidget parameter points to a valid TQGLWidget, this +widget will share OpenGL display lists with shareWidget. If +this widget and shareWidget have different formats, display list sharing may fail. You can check +whether display list sharing succeeded by calling isSharing(). +

The initialization of OpenGL rendering state, etc. should be done +by overriding the initializeGL() function, rather than in the +constructor of your TQGLWidget subclass. +

See also TQGLFormat::defaultFormat() and isValid(). + +

TQGLWidget::~TQGLWidget () +

+Destroys the widget. + +

bool TQGLWidget::autoBufferSwap () const [protected] +

+ +

Returns TRUE if the widget is doing automatic GL buffer swapping; +otherwise returns FALSE. +

See also setAutoBufferSwap(). + +

const TQGLColormap & TQGLWidget::colormap () const +

+ +

Returns the colormap for this widget. +

Usually it is only top-level widgets that can have different +colormaps installed. Asking for the colormap of a child widget +will return the colormap for the child's top-level widget. +

If no colormap has been set for this widget, the TQColormap +returned will be empty. +

See also setColormap(). + +

const TQGLContext * TQGLWidget::context () const +

+ +

Returns the context of this widget. +

It is possible that the context is not valid (see isValid()), for +example, if the underlying hardware does not support the format +attributes that were requested. + +

TQImage TQGLWidget::convertToGLFormat ( const TQImage & img ) [static] +

+Converts the image img into the unnamed format expected by +OpenGL functions such as glTexImage2D(). The returned image is not +usable as a TQImage, but TQImage::width(), TQImage::height() and +TQImage::bits() may be used with OpenGL. The following few lines +are from the texture example. Most of the code is irrelevant, so +we just quote the relevant bits: +

+ +

        TQImage tex1, tex2, buf;
+        if ( !buf.load( "gllogo.bmp" ) ) {  // Load first image from file
+
+

We create tex1 (and another variable) for OpenGL, and load a real +image into buf. +

        tex1 = TQGLWidget::convertToGLFormat( buf );  // flipped 32bit RGBA
+
+

A few lines later, we convert buf into OpenGL format and store it +in tex1. +

        glTexImage2D( GL_TEXTURE_2D, 0, 3, tex1.width(), tex1.height(), 0,
+                      GL_RGBA, GL_UNSIGNED_BYTE, tex1.bits() );
+
+

Note the dimension restrictions for texture images as described in +the glTexImage2D() documentation. The width must be 2^m + 2*border +and the height 2^n + 2*border where m and n are integers and +border is either 0 or 1. +

Another function in the same example uses tex1 with OpenGL. + +

Example: opengl/texture/gltexobj.cpp. +

void TQGLWidget::doneCurrent () +

+ +

Makes no GL context the current context. Normally, you do not need +to call this function; TQGLContext calls it as necessary. However, +it may be useful in multithreaded environments. + +

bool TQGLWidget::doubleBuffer () const +

+ +

Returns TRUE if the contained GL rendering context has double +buffering; otherwise returns FALSE. +

See also TQGLFormat::doubleBuffer(). + +

TQGLFormat TQGLWidget::format () const +

+ +

Returns the format of the contained GL rendering context. + +

void TQGLWidget::glDraw () [virtual protected] +

+Executes the virtual function paintGL(). +

The widget's rendering context will become the current context and +initializeGL() will be called if it hasn't already been called. + +

void TQGLWidget::glInit () [virtual protected] +

+Initializes OpenGL for this widget's context. Calls the virtual +function initializeGL(). + +

TQImage TQGLWidget::grabFrameBuffer ( bool withAlpha = FALSE ) [virtual] +

+Returns an image of the frame buffer. If withAlpha is TRUE the +alpha channel is included. +

Depending on your hardware, you can explicitly select which color +buffer to grab with a glReadBuffer() call before calling this +function. + +

void TQGLWidget::initializeGL () [virtual protected] +

+This virtual function is called once before the first call to +paintGL() or resizeGL(), and then once whenever the widget has +been assigned a new TQGLContext. Reimplement it in a subclass. +

This function should set up any retquired OpenGL context rendering +flags, defining display lists, etc. +

There is no need to call makeCurrent() because this has already +been done when this function is called. + +

void TQGLWidget::initializeOverlayGL () [virtual protected] +

+This virtual function is used in the same manner as initializeGL() +except that it operates on the widget's overlay context instead of +the widget's main context. This means that initializeOverlayGL() +is called once before the first call to paintOverlayGL() or +resizeOverlayGL(). Reimplement it in a subclass. +

This function should set up any retquired OpenGL context rendering +flags, defining display lists, etc. for the overlay context. +

There is no need to call makeOverlayCurrent() because this has +already been done when this function is called. + +

bool TQGLWidget::isSharing () const +

+ +

Returns TRUE if display list sharing with another TQGLWidget was +requested in the constructor, and the GL system was able to +provide it; otherwise returns FALSE. The GL system may fail to +provide display list sharing if the two TQGLWidgets use different +formats. +

See also format(). + +

bool TQGLWidget::isValid () const +

+ +

Returns TRUE if the widget has a valid GL rendering context; +otherwise returns FALSE. A widget will be invalid if the system +has no OpenGL support. + +

void TQGLWidget::makeCurrent () [virtual] +

+ +

Makes this widget the current widget for OpenGL operations, i.e. +makes the widget's rendering context the current OpenGL rendering +context. + +

void TQGLWidget::makeOverlayCurrent () [virtual] +

+ +

Makes the overlay context of this widget current. Use this if you +need to issue OpenGL commands to the overlay context outside of +initializeOverlayGL(), resizeOverlayGL(), and paintOverlayGL(). +

Does nothing if this widget has no overlay. +

See also makeCurrent(). + +

const TQGLContext * TQGLWidget::overlayContext () const +

+ +

Returns the overlay context of this widget, or 0 if this widget +has no overlay. +

See also context(). + +

void TQGLWidget::paintEvent ( TQPaintEvent * ) [virtual protected] +

+Handles paint events. Will cause the virtual paintGL() function to +be called. +

The widget's rendering context will become the current context and +initializeGL() will be called if it hasn't already been called. + +

Reimplemented from TQWidget. +

void TQGLWidget::paintGL () [virtual protected] +

+This virtual function is called whenever the widget needs to be +painted. Reimplement it in a subclass. +

There is no need to call makeCurrent() because this has already +been done when this function is called. + +

void TQGLWidget::paintOverlayGL () [virtual protected] +

+This virtual function is used in the same manner as paintGL() +except that it operates on the widget's overlay context instead of +the widget's main context. This means that paintOverlayGL() is +called whenever the widget's overlay needs to be painted. +Reimplement it in a subclass. +

There is no need to call makeOverlayCurrent() because this has +already been done when this function is called. + +

void TQGLWidget::qglClearColor ( const TQColor & c ) const +

+Convenience function for specifying the clearing color to OpenGL. +Calls glClearColor (in RGBA mode) or glClearIndex (in color-index +mode) with the color c. Applies to the current GL context. +

See also qglColor(), TQGLContext::currentContext(), and TQColor. + +

void TQGLWidget::qglColor ( const TQColor & c ) const +

+Convenience function for specifying a drawing color to OpenGL. +Calls glColor3 (in RGBA mode) or glIndex (in color-index mode) +with the color c. Applies to the current GL context. +

See also qglClearColor(), TQGLContext::currentContext(), and TQColor. + +

TQPixmap TQGLWidget::renderPixmap ( int w = 0, int h = 0, bool useContext = FALSE ) [virtual] +

+Renders the current scene on a pixmap and returns the pixmap. +

You can use this method on both visible and invisible TQGLWidgets. +

This method will create a pixmap and a temporary TQGLContext to +render on the pixmap. It will then call initializeGL(), +resizeGL(), and paintGL() on this context. Finally, the widget's +original GL context is restored. +

The size of the pixmap will be w pixels wide and h pixels +high unless one of these parameters is 0 (the default), in which +case the pixmap will have the same size as the widget. +

If useContext is TRUE, this method will try to be more +efficient by using the existing GL context to render the pixmap. +The default is FALSE. Only use TRUE if you understand the risks. +

Overlays are not rendered onto the pixmap. +

If the GL rendering context and the desktop have different bit +depths, the result will most likely look surprising. +

Note that the creation of display lists, modifications of the view +frustum etc. should be done from within initializeGL(). If this is +not done, the temporary TQGLContext will not be initialized +properly, and the rendered pixmap may be incomplete/corrupted. + +

void TQGLWidget::renderText ( int x, int y, const TQString & str, const TQFont & fnt = TQFont ( ), int listBase = 2000 ) +

+Renders the string str into the GL context of this widget. +

x and y are specified in window coordinates, with the origin +in the upper left-hand corner of the window. If fnt is not +specified, the currently set application font will be used to +render the string. To change the color of the rendered text you can +use the glColor() call (or the qglColor() convenience function), +just before the renderText() call. Note that if you have +GL_LIGHTING enabled, the string will not appear in the color you +want. You should therefore switch lighting off before using +renderText(). +

listBase specifies the index of the first display list that is +generated by this function. The default value is 2000. 256 display +lists will be generated, one for each of the first 256 characters +in the font that is used to render the string. If several fonts are +used in the same widget, the display lists for these fonts will +follow the last generated list. You would normally not have to +change this value unless you are using lists in the same range. The +lists are deleted when the widget is destroyed. +

Note: This function only works reliably with ASCII strings. + +

void TQGLWidget::renderText ( double x, double y, double z, const TQString & str, const TQFont & fnt = TQFont ( ), int listBase = 2000 ) +

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

x, y and z are specified in scene or object coordinates +relative to the currently set projection and model matrices. This +can be useful if you want to annotate models with text labels and +have the labels move with the model as it is rotated etc. + +

void TQGLWidget::resizeEvent ( TQResizeEvent * ) [virtual protected] +

+ +

Handles resize events. Calls the virtual function resizeGL(). + +

Reimplemented from TQWidget. +

void TQGLWidget::resizeGL ( int width, int height ) [virtual protected] +

+ +

This virtual function is called whenever the widget has been +resized. The new size is passed in width and height. +Reimplement it in a subclass. +

There is no need to call makeCurrent() because this has already +been done when this function is called. + +

void TQGLWidget::resizeOverlayGL ( int width, int height ) [virtual protected] +

+ +

This virtual function is used in the same manner as paintGL() +except that it operates on the widget's overlay context instead of +the widget's main context. This means that resizeOverlayGL() is +called whenever the widget has been resized. The new size is +passed in width and height. Reimplement it in a subclass. +

There is no need to call makeOverlayCurrent() because this has +already been done when this function is called. + +

void TQGLWidget::setAutoBufferSwap ( bool on ) [protected] +

+ +

If on is TRUE automatic GL buffer swapping is switched on; +otherwise it is switched off. +

If on is TRUE and the widget is using a double-buffered format, +the background and foreground GL buffers will automatically be +swapped after each paintGL() call. +

The buffer auto-swapping is on by default. +

See also autoBufferSwap(), doubleBuffer(), and swapBuffers(). + +

void TQGLWidget::setColormap ( const TQGLColormap & cmap ) +

+ +

Set the colormap for this widget to cmap. Usually it is only +top-level widgets that can have colormaps installed. +

See also colormap(). + +

void TQGLWidget::swapBuffers () [virtual] +

+ +

Swaps the screen contents with an off-screen buffer. This only +works if the widget's format specifies double buffer mode. +

Normally, there is no need to explicitly call this function +because it is done automatically after each widget repaint, i.e. +each time after paintGL() has been executed. +

See also doubleBuffer(), setAutoBufferSwap(), and TQGLFormat::setDoubleBuffer(). + +

void TQGLWidget::updateGL () [virtual slot] +

+ +

Updates the widget by calling glDraw(). + +

void TQGLWidget::updateOverlayGL () [virtual slot] +

+ +

Updates the widget's overlay (if any). Will cause the virtual +function paintOverlayGL() to be executed. +

The widget's rendering context will become the current context and +initializeGL() will be called if it hasn't already been called. + + +


+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/qgrid-h.html b/doc/html/qgrid-h.html new file mode 100644 index 00000000..3f9bf0d7 --- /dev/null +++ b/doc/html/qgrid-h.html @@ -0,0 +1,122 @@ + + + + + +qgrid.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qgrid.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qgrid.h   3.3.8   edited Jan 11 14:38 $
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQGRID_H
+#define TQGRID_H
+
+#ifndef QT_H
+#include "qframe.h"
+#endif // QT_H
+
+#ifndef QT_NO_GRID
+
+class TQGridLayout;
+
+class Q_EXPORT TQGrid : public TQFrame
+{
+    Q_OBJECT
+public:
+    TQGrid( int n, TQWidget* parent=0, const char* name=0, WFlags f = 0 );
+    TQGrid( int n, Orientation orient, TQWidget* parent=0, const char* name=0,
+	   WFlags f = 0 );
+
+    void setSpacing( int );
+    TQSize sizeHint() const;
+
+#ifndef QT_NO_COMPAT
+    typedef Orientation Direction;
+#endif
+
+protected:
+    void frameChanged();
+
+private:
+    TQGridLayout *lay;
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQGrid( const TQGrid & );
+    TQGrid& operator=( const TQGrid & );
+#endif
+};
+
+#endif // QT_NO_GRID
+
+#endif // TQGRID_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgrid-m.png b/doc/html/qgrid-m.png new file mode 100644 index 00000000..555c6dfc Binary files /dev/null and b/doc/html/qgrid-m.png differ diff --git a/doc/html/qgrid-members.html b/doc/html/qgrid-members.html new file mode 100644 index 00000000..3effaba3 --- /dev/null +++ b/doc/html/qgrid-members.html @@ -0,0 +1,357 @@ + + + + + +TQGrid Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGrid

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgrid.html b/doc/html/qgrid.html new file mode 100644 index 00000000..5b387263 --- /dev/null +++ b/doc/html/qgrid.html @@ -0,0 +1,89 @@ + + + + + +TQGrid Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGrid Class Reference

+ +

The TQGrid widget provides simple geometry management of its children. +More... +

#include <qgrid.h> +

Inherits TQFrame. +

List of all member functions. +

Public Members

+
    +
  • TQGrid ( int n, TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )
  • +
  • TQGrid ( int n, Orientation orient, TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )
  • +
  • void setSpacing ( int space )
  • +
+

Detailed Description

+ + +The TQGrid widget provides simple geometry management of its children. +

+ +

The grid places its widgets either in columns or in rows depending +on its orientation. +

The number of rows or columns is defined in the constructor. +All the grid's children will be placed and sized in accordance +with their sizeHint() and sizePolicy(). +

Use setMargin() to add space around the grid itself, and +setSpacing() to add space between the widgets. +

TQGrid
+

See also TQVBox, TQHBox, TQGridLayout, Widget Appearance and Style, and Layout Management. + +


Member Function Documentation

+

TQGrid::TQGrid ( int n, TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

+Constructs a grid widget with parent parent, called name. +n specifies the number of columns. The widget flags f are +passed to the TQFrame constructor. + +

TQGrid::TQGrid ( int n, Orientation orient, TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

+Constructs a grid widget with parent parent, called name. +If orient is Horizontal, n specifies the number of +columns. If orient is Vertical, n specifies the number of +rows. The widget flags f are passed to the TQFrame constructor. + +

void TQGrid::setSpacing ( int space ) +

+Sets the spacing between the child widgets to space. + + +

+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/qgridlayout-members.html b/doc/html/qgridlayout-members.html new file mode 100644 index 00000000..c54fe7a6 --- /dev/null +++ b/doc/html/qgridlayout-members.html @@ -0,0 +1,152 @@ + + + + + +TQGridLayout Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGridLayout

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgridlayout.html b/doc/html/qgridlayout.html new file mode 100644 index 00000000..98233c48 --- /dev/null +++ b/doc/html/qgridlayout.html @@ -0,0 +1,424 @@ + + + + + +TQGridLayout Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGridLayout Class Reference

+ +

The TQGridLayout class lays out widgets in a grid. +More... +

#include <qlayout.h> +

Inherits TQLayout. +

List of all member functions. +

Public Members

+
    +
  • TQGridLayout ( TQWidget * parent, int nRows = 1, int nCols = 1, int margin = 0, int space = -1, const char * name = 0 )
  • +
  • TQGridLayout ( int nRows = 1, int nCols = 1, int spacing = -1, const char * name = 0 )
  • +
  • TQGridLayout ( TQLayout * parentLayout, int nRows = 1, int nCols = 1, int spacing = -1, const char * name = 0 )
  • +
  • ~TQGridLayout ()
  • +
  • virtual TQSize sizeHint () const
  • +
  • virtual TQSize minimumSize () const
  • +
  • virtual TQSize maximumSize () const
  • +
  • virtual void setRowStretch ( int row, int stretch )
  • +
  • virtual void setColStretch ( int col, int stretch )
  • +
  • int rowStretch ( int row ) const
  • +
  • int colStretch ( int col ) const
  • +
  • void setRowSpacing ( int row, int minSize )
  • +
  • void setColSpacing ( int col, int minSize )
  • +
  • int rowSpacing ( int row ) const
  • +
  • int colSpacing ( int col ) const
  • +
  • int numRows () const
  • +
  • int numCols () const
  • +
  • TQRect cellGeometry ( int row, int col ) const
  • +
  • virtual bool hasHeightForWidth () const
  • +
  • virtual int heightForWidth ( int w ) const
  • +
  • virtual TQSizePolicy::ExpandData expanding () const
  • +
  • virtual void invalidate ()
  • +
  • virtual void addItem ( TQLayoutItem * item )
  • +
  • void addItem ( TQLayoutItem * item, int row, int col )
  • +
  • void addMultiCell ( TQLayoutItem * item, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 )
  • +
  • void addWidget ( TQWidget * w, int row, int col, int alignment = 0 )
  • +
  • void addMultiCellWidget ( TQWidget * w, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 )
  • +
  • void addLayout ( TQLayout * layout, int row, int col )
  • +
  • void addMultiCellLayout ( TQLayout * layout, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 )
  • +
  • void addRowSpacing ( int row, int minsize )  (obsolete)
  • +
  • void addColSpacing ( int col, int minsize )  (obsolete)
  • +
  • void expand ( int nRows, int nCols )
  • +
  • enum Corner { TopLeft, TopRight, BottomLeft, BottomRight }
  • +
  • void setOrigin ( Corner c )
  • +
  • Corner origin () const
  • +
  • virtual void setGeometry ( const TQRect & r )
  • +
+

Protected Members

+
    +
  • bool findWidget ( TQWidget * w, int * row, int * col )
  • +
  • void add ( TQLayoutItem * item, int row, int col )
  • +
+

Detailed Description

+ + +

The TQGridLayout class lays out widgets in a grid. +

+ + +

TQGridLayout takes the space made available to it (by its parent +layout or by the mainWidget()), divides it up into rows and +columns, and puts each widget it manages into the correct cell. +

Columns and rows behave identically; we will discuss columns, but +there are equivalent functions for rows. +

Each column has a minimum width and a stretch factor. The minimum +width is the greatest of that set using addColSpacing() and the +minimum width of each widget in that column. The stretch factor is +set using setColStretch() and determines how much of the available +space the column will get over and above its necessary minimum. +

Normally, each managed widget or layout is put into a cell of its +own using addWidget(), addLayout() or by the auto-add facility. It is also +possible for a widget to occupy multiple cells using +addMultiCellWidget(). If you do this, TQGridLayout will guess how +to distribute the size over the columns/rows (based on the stretch +factors). +

To remove a widget from a layout, call remove(). Calling +TQWidget::hide() on a widget also effectively removes the widget +from the layout until TQWidget::show() is called. +

This illustration shows a fragment of a dialog with a five-column, +three-row grid (the grid is shown overlaid in magenta): +

+

Columns 0, 2 and 4 in this dialog fragment are made up of a +TQLabel, a TQLineEdit, and a TQListBox. Columns 1 and 3 are +placeholders made with addColSpacing(). Row 0 consists of three +TQLabel objects, row 1 of three TQLineEdit objects and row 2 of +three TQListBox objects. We used placeholder columns (1 and 3) to +get the right amount of space between the columns. +

Note that the columns and rows are not equally wide or tall. If +you want two columns to have the same width, you must set their +minimum widths and stretch factors to be the same yourself. You do +this using addColSpacing() and setColStretch(). +

If the TQGridLayout is not the top-level layout (i.e. does not +manage all of the widget's area and children), you must add it to +its parent layout when you create it, but before you do anything +with it. The normal way to add a layout is by calling +parentLayout->addLayout(). +

Once you have added your layout you can start putting widgets and +other layouts into the cells of your grid layout using +addWidget(), addLayout() and addMultiCellWidget(). +

TQGridLayout also includes two margin widths: the border and the +spacing. The border is the width of the reserved space along each +of the TQGridLayout's four sides. The spacing is the width of the +automatically allocated spacing between neighboring boxes. +

Both the border and the spacing are parameters of the constructor +and default to 0. +

See also TQGrid, Layout Overview, Widget Appearance and Style, and Layout Management. + +


Member Type Documentation

+

TQGridLayout::Corner

+ +

This enum identifies which corner is the origin (0, 0) of the +layout. +

    +
  • TQGridLayout::TopLeft - the top-left corner +
  • TQGridLayout::TopRight - the top-right corner +
  • TQGridLayout::BottomLeft - the bottom-left corner +
  • TQGridLayout::BottomRight - the bottom-right corner +
+

Member Function Documentation

+

TQGridLayout::TQGridLayout ( TQWidget * parent, int nRows = 1, int nCols = 1, int margin = 0, int space = -1, const char * name = 0 ) +

+Constructs a new TQGridLayout with nRows rows, nCols columns +and parent widget, parent. parent may not be 0. The grid +layout is called name. +

margin is the number of pixels between the edge of the widget +and its managed children. space is the default number of pixels +between cells. If space is -1, the value of margin is used. + +

TQGridLayout::TQGridLayout ( int nRows = 1, int nCols = 1, int spacing = -1, const char * name = 0 ) +

+Constructs a new grid with nRows rows and nCols columns. If +spacing is -1, this TQGridLayout inherits its parent's +spacing(); otherwise spacing is used. The grid layout is called +name. +

You must insert this grid into another layout. You can insert +widgets and layouts into this layout at any time, but laying out +will not be performed before this is inserted into another layout. + +

TQGridLayout::TQGridLayout ( TQLayout * parentLayout, int nRows = 1, int nCols = 1, int spacing = -1, const char * name = 0 ) +

+Constructs a new grid that is placed inside parentLayout with +nRows rows and nCols columns. If spacing is -1, this +TQGridLayout inherits its parent's spacing(); otherwise spacing +is used. The grid layout is called name. +

This grid is placed according to parentLayout's default +placement rules. + +

TQGridLayout::~TQGridLayout () +

+Destroys the grid layout. Geometry management is terminated if +this is a top-level grid. +

The layout's widgets aren't destroyed. + +

void TQGridLayout::add ( TQLayoutItem * item, int row, int col ) [protected] +

+Adds item at position row, col. The layout takes +ownership of the item. + +

void TQGridLayout::addColSpacing ( int col, int minsize ) +

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

Sets the minimum width of column col to minsize pixels. +

Use setColSpacing() instead. + +

void TQGridLayout::addItem ( TQLayoutItem * item, int row, int col ) +

+Adds item at position row, col. The layout takes +ownership of the item. + +

void TQGridLayout::addItem ( TQLayoutItem * item ) [virtual] +

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

Adds item to the next free position of this layout. + +

Reimplemented from TQLayout. +

void TQGridLayout::addLayout ( TQLayout * layout, int row, int col ) +

+Places the layout at position (row, col) in the grid. The +top-left position is (0, 0). +

layout becomes a child of the grid layout. +

When a layout is constructed with another layout as its parent, +you don't need to call addLayout(); the child layout is +automatically added to the parent layout as it is constructed. +

See also addMultiCellLayout(). + +

Examples: listbox/listbox.cpp, progressbar/progressbar.cpp, t10/main.cpp, and t13/gamebrd.cpp. +

void TQGridLayout::addMultiCell ( TQLayoutItem * item, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 ) +

+Adds the item to the cell grid, spanning multiple rows/columns. +

The cell will span from fromRow, fromCol to toRow, toCol. Alignment is specified by alignment, which is a bitwise +OR of TQt::AlignmentFlags values. The default alignment is 0, +which means that the widget fills the entire cell. + +

void TQGridLayout::addMultiCellLayout ( TQLayout * layout, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 ) +

+Adds the layout layout to the cell grid, spanning multiple +rows/columns. The cell will span from fromRow, fromCol to toRow, toCol. +

Alignment is specified by alignment, which is a bitwise OR of +TQt::AlignmentFlags values. The default alignment is 0, which +means that the widget fills the entire cell. +

A non-zero alignment indicates that the layout should not grow to +fill the available space but should be sized according to +sizeHint(). +

layout becomes a child of the grid layout. +

See also addLayout(). + +

void TQGridLayout::addMultiCellWidget ( TQWidget * w, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 ) +

+Adds the widget w to the cell grid, spanning multiple +rows/columns. The cell will span from fromRow, fromCol to toRow, toCol. +

Alignment is specified by alignment, which is a bitwise OR of +TQt::AlignmentFlags values. The default alignment is 0, which +means that the widget fills the entire cell. +

A non-zero alignment indicates that the widget should not grow to +fill the available space but should be sized according to +sizeHint(). +

See also addWidget(). + +

Examples: cursor/cursor.cpp, layout/layout.cpp, and progressbar/progressbar.cpp. +

void TQGridLayout::addRowSpacing ( int row, int minsize ) +

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

Sets the minimum height of row row to minsize pixels. +

Use setRowSpacing() instead. + +

void TQGridLayout::addWidget ( TQWidget * w, int row, int col, int alignment = 0 ) +

+Adds the widget w to the cell grid at row, col. The +top-left position is (0, 0) by default. +

Alignment is specified by alignment, which is a bitwise OR of +TQt::AlignmentFlags values. The default alignment is 0, which +means that the widget fills the entire cell. +

    +
  • You should not call this if you have enabled the +auto-add facility of the layout. +

  • From TQt 3.0, the alignment parameter is interpreted more +aggressively than in previous versions of TQt. A non-default +alignment now indicates that the widget should not grow to fill +the available space, but should be sized according to sizeHint(). +
+

See also addMultiCellWidget(). + +

Examples: addressbook/centralwidget.cpp, layout/layout.cpp, rot13/rot13.cpp, sql/overview/form1/main.cpp, sql/overview/form2/main.cpp, t14/gamebrd.cpp, and t8/main.cpp. +

TQRect TQGridLayout::cellGeometry ( int row, int col ) const +

+Returns the geometry of the cell with row row and column col +in the grid. Returns an invalid rectangle if row or col is +outside the grid. +

Warning: in the current version of TQt this function does not +return valid results until setGeometry() has been called, i.e. +after the mainWidget() is visible. + +

int TQGridLayout::colSpacing ( int col ) const +

+Returns the column spacing for column col. +

See also setColSpacing(). + +

int TQGridLayout::colStretch ( int col ) const +

+Returns the stretch factor for column col. +

See also setColStretch(). + +

void TQGridLayout::expand ( int nRows, int nCols ) +

+Expands this grid so that it will have nRows rows and nCols +columns. Will not shrink the grid. You should not need to call +this function because TQGridLayout expands automatically as new +items are inserted. + +

TQSizePolicy::ExpandData TQGridLayout::expanding () const [virtual] +

+Returns whether this layout can make use of more space than +sizeHint(). A value of Vertical or Horizontal means that it wants +to grow in only one dimension, whereas BothDirections means that +it wants to grow in both dimensions. + +

Reimplemented from TQLayout. +

bool TQGridLayout::findWidget ( TQWidget * w, int * row, int * col ) [protected] +

+Searches for widget w in this layout (not including child +layouts). If w is found, it sets <em>row</em> and <em>col</em> to +the row and column and returns TRUE; otherwise returns FALSE. +

Note: if a widget spans multiple rows/columns, the top-left cell +is returned. + +

bool TQGridLayout::hasHeightForWidth () const [virtual] +

+Returns TRUE if this layout's preferred height depends on its +width; otherwise returns FALSE. + +

Reimplemented from TQLayoutItem. +

int TQGridLayout::heightForWidth ( int w ) const [virtual] +

+Returns the layout's preferred height when it is w pixels wide. + +

Reimplemented from TQLayoutItem. +

void TQGridLayout::invalidate () [virtual] +

+Resets cached information. + +

Reimplemented from TQLayout. +

TQSize TQGridLayout::maximumSize () const [virtual] +

+Returns the maximum size needed by this grid. + +

Reimplemented from TQLayout. +

TQSize TQGridLayout::minimumSize () const [virtual] +

+Returns the minimum size needed by this grid. + +

Reimplemented from TQLayout. +

int TQGridLayout::numCols () const +

+Returns the number of columns in this grid. + +

int TQGridLayout::numRows () const +

+Returns the number of rows in this grid. + +

Corner TQGridLayout::origin () const +

+Returns the corner that's used for the grid's origin, i.e. for +position (0, 0). + +

int TQGridLayout::rowSpacing ( int row ) const +

+Returns the row spacing for row row. +

See also setRowSpacing(). + +

int TQGridLayout::rowStretch ( int row ) const +

+Returns the stretch factor for row row. +

See also setRowStretch(). + +

void TQGridLayout::setColSpacing ( int col, int minSize ) +

+Sets the minimum width of column col to minSize pixels. +

See also colSpacing() and setRowSpacing(). + +

void TQGridLayout::setColStretch ( int col, int stretch ) [virtual] +

+Sets the stretch factor of column col to stretch. The first +column is number 0. +

The stretch factor is relative to the other columns in this grid. +Columns with a higher stretch factor take more of the available +space. +

The default stretch factor is 0. If the stretch factor is 0 and no +other column in this table can grow at all, the column may still +grow. +

See also colStretch(), addColSpacing(), and setRowStretch(). + +

Examples: layout/layout.cpp, t14/gamebrd.cpp, and t8/main.cpp. +

void TQGridLayout::setGeometry ( const TQRect & r ) [virtual] +

+Resizes managed widgets within the rectangle r. + +

Reimplemented from TQLayout. +

void TQGridLayout::setOrigin ( Corner c ) +

+Sets the grid's origin corner, i.e. position (0, 0), to c. + +

void TQGridLayout::setRowSpacing ( int row, int minSize ) +

+Sets the minimum height of row row to minSize pixels. +

See also rowSpacing() and setColSpacing(). + +

void TQGridLayout::setRowStretch ( int row, int stretch ) [virtual] +

+Sets the stretch factor of row row to stretch. The first row +is number 0. +

The stretch factor is relative to the other rows in this grid. +Rows with a higher stretch factor take more of the available +space. +

The default stretch factor is 0. If the stretch factor is 0 and no +other row in this table can grow at all, the row may still grow. +

See also rowStretch(), setRowSpacing(), and setColStretch(). + +

Examples: addressbook/centralwidget.cpp and qutlook/centralwidget.cpp. +

TQSize TQGridLayout::sizeHint () const [virtual] +

+Returns the preferred size of this grid. + +

Reimplemented from TQLayoutItem. + +


+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/qgridview-h.html b/doc/html/qgridview-h.html new file mode 100644 index 00000000..0d699493 --- /dev/null +++ b/doc/html/qgridview-h.html @@ -0,0 +1,184 @@ + + + + + +qgridview.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qgridview.h

+ +

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


+
+/**********************************************************************
+** $Id: qt/qgridview.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQGridView class
+**
+** Created : 010523
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQGRIDVIEW_H
+#define TQGRIDVIEW_H
+
+#ifndef QT_H
+#include "qscrollview.h"
+#endif // QT_H
+
+#ifndef QT_NO_GRIDVIEW
+
+class TQGridViewPrivate;
+
+class Q_EXPORT TQGridView : public TQScrollView
+{
+    Q_OBJECT
+    Q_PROPERTY( int numRows READ numRows WRITE setNumRows )
+    Q_PROPERTY( int numCols READ numCols WRITE setNumCols )
+    Q_PROPERTY( int cellWidth READ cellWidth WRITE setCellWidth )
+    Q_PROPERTY( int cellHeight READ cellHeight WRITE setCellHeight )
+public:
+
+    TQGridView( TQWidget *parent=0, const char *name=0, WFlags f=0 );
+   ~TQGridView();
+
+    int numRows() const;
+    virtual void setNumRows( int );
+    int numCols() const;
+    virtual void setNumCols( int );
+
+    int cellWidth() const;
+    virtual void setCellWidth( int );
+    int cellHeight() const;
+    virtual void setCellHeight( int );
+    
+    TQRect cellRect() const;
+    TQRect cellGeometry( int row, int column );
+    TQSize gridSize() const;
+
+    int rowAt( int y ) const;
+    int columnAt( int x ) const;
+
+    void repaintCell( int row, int column, bool erase=TRUE );
+    void updateCell( int row, int column );
+    void ensureCellVisible( int row, int column );
+
+protected:
+    virtual void paintCell( TQPainter *, int row, int col ) = 0;
+    virtual void paintEmptyArea( TQPainter *p, int cx, int cy, int cw, int ch );
+
+    void drawContents( TQPainter *p, int cx, int cy, int cw, int ch );
+
+    virtual void dimensionChange( int, int );
+
+private:
+    void drawContents( TQPainter* );
+    void updateGrid();
+
+    int nrows;
+    int ncols;
+    int cellw;
+    int cellh;
+    TQGridViewPrivate* d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQGridView( const TQGridView & );
+    TQGridView &operator=( const TQGridView & );
+#endif
+};
+
+inline int TQGridView::cellWidth() const 
+{ return cellw; }
+
+inline int TQGridView::cellHeight() const 
+{ return cellh; }
+
+inline int TQGridView::rowAt( int y ) const 
+{ return y / cellh; }
+
+inline int TQGridView::columnAt( int x ) const 
+{ return x / cellw; }
+
+inline int TQGridView::numRows() const 
+{ return nrows; }
+
+inline int TQGridView::numCols() const 
+{return ncols; }
+
+inline TQRect TQGridView::cellRect() const
+{ return TQRect( 0, 0, cellw, cellh ); }
+
+inline TQSize TQGridView::gridSize() const 
+{ return TQSize( ncols * cellw, nrows * cellh ); }
+
+
+
+#endif // QT_NO_GRIDVIEW
+
+
+#endif // TQTABLEVIEW_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgridview-members.html b/doc/html/qgridview-members.html new file mode 100644 index 00000000..4f5722f5 --- /dev/null +++ b/doc/html/qgridview-members.html @@ -0,0 +1,443 @@ + + + + + +TQGridView Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGridView

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgridview.html b/doc/html/qgridview.html new file mode 100644 index 00000000..2dee3fb0 --- /dev/null +++ b/doc/html/qgridview.html @@ -0,0 +1,261 @@ + + + + + +TQGridView Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGridView Class Reference

+ +

The TQGridView class provides an abstract base for +fixed-size grids. +More... +

#include <qgridview.h> +

Inherits TQScrollView. +

List of all member functions. +

Public Members

+ +

Properties

+
    +
  • int cellHeight - the height of a grid row
  • +
  • int cellWidth - the width of a grid column
  • +
  • int numCols - the number of columns in the grid
  • +
  • int numRows - the number of rows in the grid
  • +
+

Protected Members

+
    +
  • virtual void paintCell ( TQPainter * p, int row, int col ) = 0
  • +
  • virtual void paintEmptyArea ( TQPainter * p, int cx, int cy, int cw, int ch )
  • +
  • virtual void dimensionChange ( int oldNumRows, int oldNumCols )
  • +
+

Detailed Description

+ + +The TQGridView class provides an abstract base for +fixed-size grids. +

+

A grid view consists of a number of abstract cells organized in +rows and columns. The cells have a fixed size and are identified +with a row index and a column index. The top-left cell is in row +0, column 0. The bottom-right cell is in row numRows()-1, column +numCols()-1. +

You can define numRows, numCols, cellWidth and cellHeight. Reimplement the pure virtual function paintCell() to +draw the contents of a cell. +

With ensureCellVisible(), you can ensure a certain cell is +visible. With rowAt() and columnAt() you can find a cell based on +the given x- and y-coordinates. +

If you need to monitor changes to the grid's dimensions (i.e. when +numRows or numCols is changed), reimplement the dimensionChange() +change handler. +

Note: the row and column indices are always given in the order, +row (vertical offset) then column (horizontal offset). This order +is the opposite of all pixel operations, which are given in the +order x (horizontal offset), y (vertical offset). +

TQGridView is a very simple abstract class based on TQScrollView. It +is designed to simplify the task of drawing many cells of the same +size in a potentially scrollable canvas. If you need rows and +columns with different sizes, use a TQTable instead. If you need a +simple list of items, use a TQListBox. If you need to present +hierachical data use a TQListView, and if you need random objects +at random positions, consider using either a TQIconView or a +TQCanvas. +

See also Abstract Widget Classes. + +


Member Function Documentation

+

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

+Constructs a grid view. +

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

TQGridView::~TQGridView () +

+Destroys the grid view. + +

TQRect TQGridView::cellGeometry ( int row, int column ) +

+Returns the geometry of cell (row, column) in the content +coordinate system. +

See also cellRect(). + +

int TQGridView::cellHeight () const +

Returns the height of a grid row. +See the "cellHeight" property for details. +

TQRect TQGridView::cellRect () const +

+ +

Returns the geometry of a cell in a cell's coordinate system. This +is a convenience function useful in paintCell(). It is equivalent +to TQRect( 0, 0, cellWidth(), cellHeight() ). +

See also cellGeometry(). + +

+

int TQGridView::cellWidth () const +

Returns the width of a grid column. +See the "cellWidth" property for details. +

int TQGridView::columnAt ( int x ) const +

+ +

Returns the number of the column at position x. x must be +given in content coordinates. +

See also rowAt(). + +

void TQGridView::dimensionChange ( int oldNumRows, int oldNumCols ) [virtual protected] +

+ +

This change handler is called whenever any of the grid's +dimensions change. oldNumRows and oldNumCols contain the +old dimensions, numRows() and numCols() contain the new +dimensions. + +

void TQGridView::ensureCellVisible ( int row, int column ) +

+Ensures cell (row, column) is visible, scrolling the grid +view if necessary. + +

TQSize TQGridView::gridSize () const +

+ +

Returns the size of the grid in pixels. +

+

int TQGridView::numCols () const +

Returns the number of columns in the grid. +See the "numCols" property for details. +

int TQGridView::numRows () const +

Returns the number of rows in the grid. +See the "numRows" property for details. +

void TQGridView::paintCell ( TQPainter * p, int row, int col ) [pure virtual protected] +

+ +

This pure virtual function is called to paint the single cell at +(row, col) using painter p. The painter must be open when +paintCell() is called and must remain open. +

The coordinate system is translated so that the origin is at the top-left corner of the cell +to be painted, i.e. cell coordinates. Do not scale or shear +the coordinate system (or if you do, restore the transformation matrix before you return). +

The painter is not clipped by default in order to get maximum +efficiency. If you want clipping, use +

+    p->setClipRect( cellRect(), TQPainter::CoordPainter );
+    //... your drawing code
+    p->setClipping( FALSE );
+
+    
+ + +

void TQGridView::paintEmptyArea ( TQPainter * p, int cx, int cy, int cw, int ch ) [virtual protected] +

+This function fills the cw pixels wide and ch pixels high +rectangle starting at position (cx, cy) with the background +color using the painter p. +

paintEmptyArea() is invoked by drawContents() to erase or fill +unused areas. + +

void TQGridView::repaintCell ( int row, int column, bool erase = TRUE ) +

+Repaints cell (row, column). +

If erase is TRUE, TQt erases the area of the cell before the +paintCell() call; otherwise no erasing takes place. +

See also TQWidget::repaint(). + +

int TQGridView::rowAt ( int y ) const +

+ +

Returns the number of the row at position y. y must be given +in content coordinates. +

See also columnAt(). + +

void TQGridView::setCellHeight ( int ) [virtual] +

Sets the height of a grid row. +See the "cellHeight" property for details. +

void TQGridView::setCellWidth ( int ) [virtual] +

Sets the width of a grid column. +See the "cellWidth" property for details. +

void TQGridView::setNumCols ( int ) [virtual] +

Sets the number of columns in the grid. +See the "numCols" property for details. +

void TQGridView::setNumRows ( int ) [virtual] +

Sets the number of rows in the grid. +See the "numRows" property for details. +

void TQGridView::updateCell ( int row, int column ) +

+Updates cell (row, column). +

See also TQWidget::update(). + +


Property Documentation

+

int cellHeight

+

This property holds the height of a grid row. +

All rows in a grid view have the same height. +

See also cellWidth. + +

Set this property's value with setCellHeight() and get this property's value with cellHeight(). +

int cellWidth

+

This property holds the width of a grid column. +

All columns in a grid view have the same width. +

See also cellHeight. + +

Set this property's value with setCellWidth() and get this property's value with cellWidth(). +

int numCols

+

This property holds the number of columns in the grid. +

Set this property's value with setNumCols() and get this property's value with numCols(). +

See also numRows. + +

int numRows

+

This property holds the number of rows in the grid. +

Set this property's value with setNumRows() and get this property's value with numRows(). +

See also numCols. + + +


+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/qgroupbox-h.html b/doc/html/qgroupbox-h.html new file mode 100644 index 00000000..a943c0e6 --- /dev/null +++ b/doc/html/qgroupbox-h.html @@ -0,0 +1,210 @@ + + + + + +qgroupbox.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qgroupbox.h

+ +

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


+
+/**********************************************************************
+** $Id: qt/qgroupbox.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQGroupBox widget class
+**
+** Created : 950203
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQGROUPBOX_H
+#define TQGROUPBOX_H
+
+#ifndef QT_H
+#include "qframe.h"
+#endif // QT_H
+
+#ifndef QT_NO_GROUPBOX
+
+
+class TQAccel;
+class TQGroupBoxPrivate;
+class TQVBoxLayout;
+class TQGridLayout;
+class TQSpacerItem;
+
+class Q_EXPORT TQGroupBox : public TQFrame
+{
+    Q_OBJECT
+    Q_PROPERTY( TQString title READ title WRITE setTitle )
+    Q_PROPERTY( Alignment alignment READ alignment WRITE setAlignment )
+    Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation DESIGNABLE false )
+    Q_PROPERTY( int columns READ columns WRITE setColumns DESIGNABLE false )
+    Q_PROPERTY( bool flat READ isFlat WRITE setFlat )
+#ifndef QT_NO_CHECKBOX
+    Q_PROPERTY( bool checkable READ isCheckable WRITE setCheckable )
+    Q_PROPERTY( bool checked READ isChecked WRITE setChecked )
+#endif
+public:
+    TQGroupBox( TQWidget* parent=0, const char* name=0 );
+    TQGroupBox( const TQString &title,
+	       TQWidget* parent=0, const char* name=0 );
+    TQGroupBox( int strips, Orientation o,
+	       TQWidget* parent=0, const char* name=0 );
+    TQGroupBox( int strips, Orientation o, const TQString &title,
+	       TQWidget* parent=0, const char* name=0 );
+    ~TQGroupBox();
+
+    virtual void setColumnLayout(int strips, Orientation o);
+
+    TQString title() const { return str; }
+    virtual void setTitle( const TQString &);
+
+    int alignment() const { return align; }
+    virtual void setAlignment( int );
+
+    int columns() const;
+    void setColumns( int );
+
+    Orientation orientation() const { return dir; }
+    void setOrientation( Orientation );
+
+    int insideMargin() const;
+    int insideSpacing() const;
+    void setInsideMargin( int m );
+    void setInsideSpacing( int s );
+
+    void addSpace( int );
+    TQSize sizeHint() const;
+
+    bool isFlat() const;
+    void setFlat( bool b );
+    bool isCheckable() const;
+#ifndef QT_NO_CHECKBOX
+    void setCheckable( bool b );
+#endif
+    bool isChecked() const;
+    void setEnabled(bool on);
+
+#ifndef QT_NO_CHECKBOX
+public slots:
+    void setChecked( bool b );
+
+signals:
+    void toggled( bool );
+#endif
+protected:
+    bool event( TQEvent * );
+    void childEvent( TQChildEvent * );
+    void resizeEvent( TQResizeEvent * );
+    void paintEvent( TQPaintEvent * );
+    void focusInEvent( TQFocusEvent * );
+    void fontChange( const TQFont & );
+
+private slots:
+    void fixFocus();
+    void setChildrenEnabled( bool b );
+
+private:
+    void skip();
+    void init();
+    void calculateFrame();
+    void insertWid( TQWidget* );
+    void setTextSpacer();
+#ifndef QT_NO_CHECKBOX
+    void updateCheckBoxGeometry();
+#endif
+    TQString str;
+    int align;
+    int lenvisible;
+#ifndef QT_NO_ACCEL
+    TQAccel * accel;
+#endif
+    TQGroupBoxPrivate * d;
+
+    TQVBoxLayout *vbox;
+    TQGridLayout *grid;
+    int row;
+    int col : 30;
+    uint bFlat : 1;
+    int nRows, nCols;
+    Orientation dir;
+    int spac, marg;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQGroupBox( const TQGroupBox & );
+    TQGroupBox &operator=( const TQGroupBox & );
+#endif
+};
+
+
+#endif // QT_NO_GROUPBOX
+
+#endif // TQGROUPBOX_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgroupbox-members.html b/doc/html/qgroupbox-members.html new file mode 100644 index 00000000..23aea05d --- /dev/null +++ b/doc/html/qgroupbox-members.html @@ -0,0 +1,378 @@ + + + + + +TQGroupBox Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGroupBox

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qgroupbox.html b/doc/html/qgroupbox.html new file mode 100644 index 00000000..87622dbf --- /dev/null +++ b/doc/html/qgroupbox.html @@ -0,0 +1,330 @@ + + + + + +TQGroupBox Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGroupBox Class Reference

+ +

The TQGroupBox widget provides a group box frame with a title. +More... +

#include <qgroupbox.h> +

Inherits TQFrame. +

Inherited by TQButtonGroup, TQHGroupBox, and TQVGroupBox. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • Alignment alignment - the alignment of the group box title
  • +
  • bool checkable - whether the group box has a checkbox in its title
  • +
  • bool checked - whether the group box's checkbox is checked
  • +
  • int columns - the number of columns or rows (depending on \l TQGroupBox::orientation) in the group box
  • +
  • bool flat - whether the group box is painted flat or has a frame
  • +
  • Orientation orientation - the group box's orientation
  • +
  • TQString title - the group box title text
  • +
+

Detailed Description

+ + +The TQGroupBox widget provides a group box frame with a title. +

+ + + +

A group box provides a frame, a title and a keyboard shortcut, and +displays various other widgets inside itself. The title is on top, +the keyboard shortcut moves keyboard focus to one of the group +box's child widgets, and the child widgets are usually laid out +horizontally (or vertically) inside the frame. +

The simplest way to use it is to create a group box with the +desired number of columns (or rows) and orientation, and then just +create widgets with the group box as parent. +

It is also possible to change the orientation() and number of +columns() after construction, or to ignore all the automatic +layout support and manage the layout yourself. You can add 'empty' +spaces to the group box with addSpace(). +

TQGroupBox also lets you set the title() (normally set in the +constructor) and the title's alignment(). +

You can change the spacing used by the group box with +setInsideMargin() and setInsideSpacing(). To minimize space +consumption, you can remove the right, left and bottom edges of +the frame with setFlat(). +

+

See also TQButtonGroup, Widget Appearance and Style, Layout Management, and Organizers. + +


Member Function Documentation

+

TQGroupBox::TQGroupBox ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a group box widget with no title. +

The parent and name arguments are passed to the TQWidget +constructor. +

This constructor does not do automatic layout. + +

TQGroupBox::TQGroupBox ( const TQString & title, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a group box with the title title. +

The parent and name arguments are passed to the TQWidget +constructor. +

This constructor does not do automatic layout. + +

TQGroupBox::TQGroupBox ( int strips, Orientation orientation, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a group box with no title. Child widgets will be +arranged in strips rows or columns (depending on orientation). +

The parent and name arguments are passed to the TQWidget +constructor. + +

TQGroupBox::TQGroupBox ( int strips, Orientation orientation, const TQString & title, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a group box titled title. Child widgets will be +arranged in strips rows or columns (depending on orientation). +

The parent and name arguments are passed to the TQWidget +constructor. + +

TQGroupBox::~TQGroupBox () +

+Destroys the group box. + +

void TQGroupBox::addSpace ( int size ) +

+Adds an empty cell at the next free position. If size is +greater than 0, the empty cell takes size to be its fixed width +(if orientation() is Horizontal) or height (if orientation() is +Vertical). +

Use this method to separate the widgets in the group box or to +skip the next free cell. For performance reasons, call this method +after calling setColumnLayout() or by changing the TQGroupBox::columns or TQGroupBox::orientation properties. It is +generally a good idea to call these methods first (if needed at +all), and insert the widgets and spaces afterwards. + +

int TQGroupBox::alignment () const +

Returns the alignment of the group box title. +See the "alignment" property for details. +

int TQGroupBox::columns () const +

Returns the number of columns or rows (depending on TQGroupBox::orientation) in the group box. +See the "columns" property for details. +

int TQGroupBox::insideMargin () const +

+Returns the width of the empty space between the items in the +group and the frame of the group. +

Only applies if the group box has a defined orientation. +

The default is usually 11, by may vary depending on the platform +and style. +

See also setInsideMargin() and orientation. + +

int TQGroupBox::insideSpacing () const +

+Returns the width of the empty space between each of the items +in the group. +

Only applies if the group box has a defined orientation. +

The default is usually 5, by may vary depending on the platform +and style. +

See also setInsideSpacing() and orientation. + +

bool TQGroupBox::isCheckable () const +

Returns TRUE if the group box has a checkbox in its title; otherwise returns FALSE. +See the "checkable" property for details. +

bool TQGroupBox::isChecked () const +

Returns TRUE if the group box's checkbox is checked; otherwise returns FALSE. +See the "checked" property for details. +

bool TQGroupBox::isFlat () const +

Returns TRUE if the group box is painted flat or has a frame; otherwise returns FALSE. +See the "flat" property for details. +

Orientation TQGroupBox::orientation () const +

Returns the group box's orientation. +See the "orientation" property for details. +

void TQGroupBox::setAlignment ( int ) [virtual] +

Sets the alignment of the group box title. +See the "alignment" property for details. +

void TQGroupBox::setCheckable ( bool b ) +

Sets whether the group box has a checkbox in its title to b. +See the "checkable" property for details. +

void TQGroupBox::setChecked ( bool b ) [slot] +

Sets whether the group box's checkbox is checked to b. +See the "checked" property for details. +

void TQGroupBox::setColumnLayout ( int strips, Orientation direction ) [virtual] +

+Changes the layout of the group box. This function is only useful +in combination with the default constructor that does not take any +layout information. This function will put all existing children +in the new layout. It is not good TQt programming style to call +this function after children have been inserted. Sets the number +of columns or rows to be strips, depending on direction. +

See also orientation and columns. + +

Example: chart/optionsform.cpp. +

void TQGroupBox::setColumns ( int ) +

Sets the number of columns or rows (depending on TQGroupBox::orientation) in the group box. +See the "columns" property for details. +

void TQGroupBox::setFlat ( bool b ) +

Sets whether the group box is painted flat or has a frame to b. +See the "flat" property for details. +

void TQGroupBox::setInsideMargin ( int m ) +

+Sets the the width of the inside margin to m pixels. +

See also insideMargin(). + +

void TQGroupBox::setInsideSpacing ( int s ) +

+Sets the width of the empty space between each of the items in +the group to s pixels. +

See also insideSpacing(). + +

void TQGroupBox::setOrientation ( Orientation ) +

Sets the group box's orientation. +See the "orientation" property for details. +

void TQGroupBox::setTitle ( const TQString & ) [virtual] +

Sets the group box title text. +See the "title" property for details. +

TQString TQGroupBox::title () const +

Returns the group box title text. +See the "title" property for details. +

void TQGroupBox::toggled ( bool on ) [signal] +

+ +

If the group box has a check box (see isCheckable()) this signal +is emitted when the check box is toggled. on is TRUE if the check +box is checked; otherwise it is FALSE. + +


Property Documentation

+

Alignment alignment

+

This property holds the alignment of the group box title. +

The title is always placed on the upper frame line. The horizontal +alignment can be specified by the alignment parameter. +

The alignment is one of the following flags: +

    +
  • AlignAuto aligns the title according to the language, +usually to the left. +
  • AlignLeft aligns the title text to the left. +
  • AlignRight aligns the title text to the right. +
  • AlignHCenter aligns the title text centered. +
+

The default alignment is AlignAuto. +

See also TQt::AlignmentFlags. + +

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

bool checkable

+

This property holds whether the group box has a checkbox in its title. +

If this property is TRUE, the group box has a checkbox. If the +checkbox is checked (which is the default), the group box's +children are enabled. +

setCheckable() controls whether or not the group box has a +checkbox, and isCheckable() controls whether the checkbox is +checked or not. + +

Set this property's value with setCheckable() and get this property's value with isCheckable(). +

bool checked

+

This property holds whether the group box's checkbox is checked. +

If the group box has a check box (see isCheckable()), and the +check box is checked (see isChecked()), the group box's children +are enabled. If the checkbox is unchecked the children are +disabled. + +

Set this property's value with setChecked() and get this property's value with isChecked(). +

int columns

+

This property holds the number of columns or rows (depending on TQGroupBox::orientation) in the group box. +

Usually it is not a good idea to set this property because it is +slow (it does a complete layout). It is best to set the number +of columns directly in the constructor. + +

Set this property's value with setColumns() and get this property's value with columns(). +

bool flat

+

This property holds whether the group box is painted flat or has a frame. +

By default a group box has a surrounding frame, with the title +being placed on the upper frame line. In flat mode the right, left +and bottom frame lines are omitted, and only the thin line at the +top is drawn. +

See also title. + +

Set this property's value with setFlat() and get this property's value with isFlat(). +

Orientation orientation

+

This property holds the group box's orientation. +

A horizontal group box arranges it's children in columns, while a +vertical group box arranges them in rows. +

Usually it is not a good idea to set this property because it is +slow (it does a complete layout). It is better to set the +orientation directly in the constructor. + +

Set this property's value with setOrientation() and get this property's value with orientation(). +

TQString title

+

This property holds the group box title text. +

The group box title text will have a focus-change keyboard +accelerator if the title contains &, followed by a letter. +

+        g->setTitle( "&User information" );
+    
+ +This produces "User information"; Alt+U moves the keyboard focus to the group box. +

There is no default title text. + +

Set this property's value with setTitle() and get this property's value with title(). + +


+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/qgroupboxes.png b/doc/html/qgroupboxes.png new file mode 100644 index 00000000..ec237666 Binary files /dev/null and b/doc/html/qgroupboxes.png differ diff --git a/doc/html/qgrpbox-w.png b/doc/html/qgrpbox-w.png new file mode 100644 index 00000000..733c3fc4 Binary files /dev/null and b/doc/html/qgrpbox-w.png differ diff --git a/doc/html/qguardedptr-h.html b/doc/html/qguardedptr-h.html new file mode 100644 index 00000000..311a16e3 --- /dev/null +++ b/doc/html/qguardedptr-h.html @@ -0,0 +1,189 @@ + + + + + +qguardedptr.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qguardedptr.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qguardedptr.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQGuardedPtr class
+**
+** Created : 990929
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQGUARDEDPTR_H
+#define TQGUARDEDPTR_H
+
+#ifndef QT_H
+#include "qobject.h"
+#endif // QT_H
+
+// ### 4.0: rename to something without Private in it. Not really internal.
+class Q_EXPORT TQGuardedPtrPrivate : public TQObject, public TQShared
+{
+    Q_OBJECT
+public:
+    TQGuardedPtrPrivate( TQObject* );
+    ~TQGuardedPtrPrivate();
+
+    TQObject* object() const;
+    void reconnect( TQObject* );
+
+private slots:
+    void objectDestroyed();
+
+private:
+    TQObject* obj;
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQGuardedPtrPrivate( const TQGuardedPtrPrivate & );
+    TQGuardedPtrPrivate &operator=( const TQGuardedPtrPrivate & );
+#endif
+};
+
+template <class T>
+class TQGuardedPtr
+{
+public:
+    TQGuardedPtr() : priv( new TQGuardedPtrPrivate( 0 ) ) {}
+
+    TQGuardedPtr( T* o) {
+	priv = new TQGuardedPtrPrivate( (TQObject*)o );
+    }
+
+    TQGuardedPtr(const TQGuardedPtr<T> &p) {
+	priv = p.priv;
+	ref();
+    }
+
+    ~TQGuardedPtr() { deref(); }
+
+    TQGuardedPtr<T> &operator=(const TQGuardedPtr<T> &p) {
+	if ( priv != p.priv ) {
+	    deref();
+	    priv = p.priv;
+	    ref();
+	}
+	return *this;
+    }
+
+    TQGuardedPtr<T> &operator=(T* o) {
+	if ( priv && priv->count == 1 ) {
+	    priv->reconnect( (TQObject*)o );
+	} else {
+	    deref();
+	    priv = new TQGuardedPtrPrivate( (TQObject*)o );
+	}
+	return *this;
+    }
+
+    bool operator==( const TQGuardedPtr<T> &p ) const {
+	return (T*)(*this) == (T*) p;
+    }
+
+    bool operator!= ( const TQGuardedPtr<T>& p ) const {
+	return !( *this == p );
+    }
+
+    bool isNull() const { return !priv || !priv->object(); }
+
+    T* operator->() const { return (T*)(priv?priv->object():0); }
+
+    T& operator*() const { return *((T*)(priv?priv->object():0)); }
+
+    operator T*() const { return (T*)(priv?priv->object():0); }
+
+private:
+
+    void ref() { if (priv) priv->ref(); }
+
+    void deref() {
+	if ( priv && priv->deref() )
+	    delete priv;
+    }
+
+    TQGuardedPtrPrivate* priv;
+};
+
+
+
+
+inline TQObject* TQGuardedPtrPrivate::object() const
+{
+    return obj;
+}
+
+#define Q_DEFINED_QGUARDEDPTR
+#include "qwinexport.h"
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qguardedptr-members.html b/doc/html/qguardedptr-members.html new file mode 100644 index 00000000..9da77141 --- /dev/null +++ b/doc/html/qguardedptr-members.html @@ -0,0 +1,55 @@ + + + + + +TQGuardedPtr Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQGuardedPtr

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qguardedptr.html b/doc/html/qguardedptr.html new file mode 100644 index 00000000..b62e9586 --- /dev/null +++ b/doc/html/qguardedptr.html @@ -0,0 +1,194 @@ + + + + + +TQGuardedPtr Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQGuardedPtr Class Reference

+ +

The TQGuardedPtr class is a template class that provides guarded pointers to TQObjects. +More... +

#include <qguardedptr.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQGuardedPtr class is a template class that provides guarded pointers to TQObjects. +

+ +

A guarded pointer, TQGuardedPtr<X>, behaves like a normal C++ +pointer X*, except that it is automatically set to 0 when +the referenced object is destroyed (unlike normal C++ pointers, +which become "dangling pointers" in such cases). X must be a +subclass of TQObject. +

Guarded pointers are useful whenever you need to store a pointer +to a TQObject that is owned by someone else and therefore might be +destroyed while you still hold a reference to it. You can safely +test the pointer for validity. +

Example: +

+        TQGuardedPtr<TQLabel> label = new TQLabel( 0, "label" );
+        label->setText( "I like guarded pointers" );
+
+        delete (TQLabel*) label; // simulate somebody destroying the label
+
+        if ( label)
+            label->show();
+        else
+            qDebug("The label has been destroyed");
+    
+ +

The program will output The label has been destroyed rather +than dereferencing an invalid address in label->show(). +

The functions and operators available with a TQGuardedPtr are the +same as those available with a normal unguarded pointer, except +the pointer arithmetic operators (++, --, -, and +), which are +normally used only with arrays of objects. Use them like normal +pointers and you will not need to read this class documentation. +

For creating guarded pointers, you can construct or assign to them +from an X* or from another guarded pointer of the same type. You +can compare them with each other using operator==() and +operator!=(), or test for 0 with isNull(). And you can dereference +them using either the *x or the x->member notation. +

A guarded pointer will automatically cast to an X*, so you can +freely mix guarded and unguarded pointers. This means that if you +have a TQGuardedPtr, you can pass it to a function that +retquires a TQWidget*. For this reason, it is of little value to +declare functions to take a TQGuardedPtr as a parameter; just use +normal pointers. Use a TQGuardedPtr when you are storing a pointer +over time. +

Note again that class X must inherit TQObject, or a compilation +or link error will result. +

See also Object Model. + +


Member Function Documentation

+

TQGuardedPtr::TQGuardedPtr () +

+ +

Constructs a 0 guarded pointer. +

See also isNull(). + +

TQGuardedPtr::TQGuardedPtr ( T * p ) +

+ +

Constructs a guarded pointer that points to same object as p +points to. + +

TQGuardedPtr::TQGuardedPtr ( const TQGuardedPtr<T> & p ) +

+ +

Copy one guarded pointer from another. The constructed guarded +pointer points to the same object that p points to (which may +be 0). + +

TQGuardedPtr::~TQGuardedPtr () +

+ +

Destroys the guarded pointer. Just like a normal pointer, +destroying a guarded pointer does not destroy the object being +pointed to. + +

bool TQGuardedPtr::isNull () const +

+ +

Returns TRUE if the referenced object has been destroyed or if +there is no referenced object; otherwise returns FALSE. + +

TQGuardedPtr::operator T * () const +

+ +

Cast operator; implements pointer semantics. Because of this +function you can pass a TQGuardedPtr<X> to a function where an X* +is retquired. + +

bool TQGuardedPtr::operator!= ( const TQGuardedPtr<T> & p ) const +

+ +

Inequality operator; implements pointer semantics, the negation of +operator==(). Returns TRUE if p and this guarded pointer are +not pointing to the same object; otherwise returns FALSE. + +

T & TQGuardedPtr::operator* () const +

+ +

Dereference operator; implements pointer semantics. Just use this +operator as you would with a normal C++ pointer. + +

T * TQGuardedPtr::operator-> () const +

+ +

Overloaded arrow operator; implements pointer semantics. Just use +this operator as you would with a normal C++ pointer. + +

TQGuardedPtr<T> & TQGuardedPtr::operator= ( const TQGuardedPtr<T> & p ) +

+ +

Assignment operator. This guarded pointer then points to the same +object as p points to. + +

TQGuardedPtr<T> & TQGuardedPtr::operator= ( T * p ) +

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

Assignment operator. This guarded pointer then points to the same +object as p points to. + +

bool TQGuardedPtr::operator== ( const TQGuardedPtr<T> & p ) const +

+ +

Equality operator; implements traditional pointer semantics. +Returns TRUE if both p and this guarded pointer are 0, or if +both p and this pointer point to the same object; otherwise +returns FALSE. +

See also 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/qhbox-h.html b/doc/html/qhbox-h.html new file mode 100644 index 00000000..0fde00b4 --- /dev/null +++ b/doc/html/qhbox-h.html @@ -0,0 +1,121 @@ + + + + + +qhbox.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qhbox.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qhbox.h   3.3.8   edited Jan 11 14:38 $
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQHBOX_H
+#define TQHBOX_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#endif // QT_H
+
+#ifndef QT_NO_HBOX
+
+#include "qframe.h"
+
+class TQBoxLayout;
+
+class Q_EXPORT TQHBox : public TQFrame
+{
+    Q_OBJECT
+public:
+    TQHBox( TQWidget* parent=0, const char* name=0, WFlags f=0 );
+
+    void setSpacing( int );
+    bool setStretchFactor( TQWidget*, int stretch );
+    TQSize sizeHint() const;
+
+protected:
+    TQHBox( bool horizontal, TQWidget* parent, const char* name, WFlags f = 0 );
+    void frameChanged();
+
+private:
+    TQBoxLayout *lay;
+
+#if defined(Q_DISABLE_COPY)
+    TQHBox( const TQHBox & );
+    TQHBox &operator=( const TQHBox & );
+#endif
+};
+
+#endif // QT_NO_HBOX
+
+#endif // TQHBOX_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhbox-m.png b/doc/html/qhbox-m.png new file mode 100644 index 00000000..bb02a1b5 Binary files /dev/null and b/doc/html/qhbox-m.png differ diff --git a/doc/html/qhbox-members.html b/doc/html/qhbox-members.html new file mode 100644 index 00000000..a37b55dd --- /dev/null +++ b/doc/html/qhbox-members.html @@ -0,0 +1,358 @@ + + + + + +TQHBox Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQHBox

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhbox.html b/doc/html/qhbox.html new file mode 100644 index 00000000..6396a73b --- /dev/null +++ b/doc/html/qhbox.html @@ -0,0 +1,105 @@ + + + + + +TQHBox Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQHBox Class Reference

+ +

The TQHBox widget provides horizontal geometry management +for its child widgets. +More... +

#include <qhbox.h> +

Inherits TQFrame. +

Inherited by TQVBox. +

List of all member functions. +

Public Members

+
    +
  • TQHBox ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )
  • +
  • void setSpacing ( int space )
  • +
  • bool setStretchFactor ( TQWidget * w, int stretch )
  • +
+

Protected Members

+
    +
  • TQHBox ( bool horizontal, TQWidget * parent, const char * name, WFlags f = 0 )
  • +
+

Detailed Description

+ + +The TQHBox widget provides horizontal geometry management +for its child widgets. +

+ + +

All the horizontal box's child widgets will be placed alongside +each other and sized according to their sizeHint()s. +

Use setMargin() to add space around the edges, and use +setSpacing() to add space between the widgets. Use +setStretchFactor() if you want the widgets to be different sizes +in proportion to one another. (See Layouts for more information on stretch factors.) +

TQHBox
+

See also TQHBoxLayout, TQVBox, TQGrid, Widget Appearance and Style, Layout Management, and Organizers. + +


Member Function Documentation

+

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

+Constructs an hbox widget with parent parent, called name. +The parent, name and widget flags, f, are passed to the TQFrame +constructor. + +

TQHBox::TQHBox ( bool horizontal, TQWidget * parent, const char * name, WFlags f = 0 ) [protected] +

+Constructs a horizontal hbox if horizontal is TRUE, otherwise +constructs a vertical hbox (also known as a vbox). +

This constructor is provided for the TQVBox class. You should never +need to use it directly. +

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

void TQHBox::setSpacing ( int space ) +

+Sets the spacing between the child widgets to space. + +

Examples: i18n/mywidget.cpp, listboxcombo/listboxcombo.cpp, qdir/qdir.cpp, tabdialog/tabdialog.cpp, wizard/wizard.cpp, and xform/xform.cpp. +

bool TQHBox::setStretchFactor ( TQWidget * w, int stretch ) +

+Sets the stretch factor of widget w to stretch. Returns TRUE if +w is found. Otherwise returns FALSE. +

See also TQBoxLayout::setStretchFactor() and Layouts. + + +


+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/qhboxlayout-members.html b/doc/html/qhboxlayout-members.html new file mode 100644 index 00000000..0d0ee415 --- /dev/null +++ b/doc/html/qhboxlayout-members.html @@ -0,0 +1,144 @@ + + + + + +TQHBoxLayout Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQHBoxLayout

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhboxlayout.html b/doc/html/qhboxlayout.html new file mode 100644 index 00000000..3b1b9d69 --- /dev/null +++ b/doc/html/qhboxlayout.html @@ -0,0 +1,115 @@ + + + + + +TQHBoxLayout Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQHBoxLayout Class Reference

+ +

The TQHBoxLayout class lines up widgets horizontally. +More... +

#include <qlayout.h> +

Inherits TQBoxLayout. +

List of all member functions. +

Public Members

+
    +
  • TQHBoxLayout ( TQWidget * parent, int margin = 0, int spacing = -1, const char * name = 0 )
  • +
  • TQHBoxLayout ( TQLayout * parentLayout, int spacing = -1, const char * name = 0 )
  • +
  • TQHBoxLayout ( int spacing = -1, const char * name = 0 )
  • +
  • ~TQHBoxLayout ()
  • +
+

Detailed Description

+ + +The TQHBoxLayout class lines up widgets horizontally. +

+ + +

This class is used to construct horizontal box layout objects. See +TQBoxLayout for more details. +

The simplest use of the class is like this: +

+        TQBoxLayout * l = new TQHBoxLayout( widget );
+        l->setAutoAdd( TRUE );
+        new TQSomeWidget( widget );
+        new TQSomeOtherWidget( widget );
+        new TQAnotherWidget( widget );
+    
+ +

or like this: +

+        TQBoxLayout * l = new TQHBoxLayout( widget );
+        l->addWidget( existingChildOfWidget );
+        l->addWidget( anotherChildOfWidget );
+    
+ +

TQHBox
+

See also TQVBoxLayout, TQGridLayout, the Layout overview, Widget Appearance and Style, and Layout Management. + +


Member Function Documentation

+

TQHBoxLayout::TQHBoxLayout ( TQWidget * parent, int margin = 0, int spacing = -1, const char * name = 0 ) +

+Constructs a new top-level horizontal box called name, with +parent parent. +

The margin is the number of pixels between the edge of the +widget and its managed children. The spacing is the default +number of pixels between neighboring children. If spacing is -1 +the value of margin is used for spacing. + +

TQHBoxLayout::TQHBoxLayout ( TQLayout * parentLayout, int spacing = -1, const char * name = 0 ) +

+Constructs a new horizontal box called name name and adds it to +parentLayout. +

The spacing is the default number of pixels between neighboring +children. If spacing is -1, this TQHBoxLayout will inherit its +parent's spacing(). + +

TQHBoxLayout::TQHBoxLayout ( int spacing = -1, const char * name = 0 ) +

+Constructs a new horizontal box called name name. You must add +it to another layout. +

The spacing is the default number of pixels between neighboring +children. If spacing is -1, this TQHBoxLayout will inherit its +parent's spacing(). + +

TQHBoxLayout::~TQHBoxLayout () +

+Destroys this box layout. +

The layout's widgets aren't destroyed. + + +


+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/qhboxlayout.png b/doc/html/qhboxlayout.png new file mode 100644 index 00000000..01caae13 Binary files /dev/null and b/doc/html/qhboxlayout.png differ diff --git a/doc/html/qhbuttongroup-h.html b/doc/html/qhbuttongroup-h.html new file mode 100644 index 00000000..863c7cb0 --- /dev/null +++ b/doc/html/qhbuttongroup-h.html @@ -0,0 +1,113 @@ + + + + + +qhbuttongroup.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qhbuttongroup.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qhbuttongroup.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQHButtonGroup class
+**
+** Created : 990602
+**
+** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQHBUTTONGROUP_H
+#define TQHBUTTONGROUP_H
+
+#ifndef QT_H
+#include "qbuttongroup.h"
+#endif // QT_H
+
+#ifndef QT_NO_HBUTTONGROUP
+
+class Q_EXPORT TQHButtonGroup : public TQButtonGroup
+{
+    Q_OBJECT
+public:
+    TQHButtonGroup( TQWidget* parent=0, const char* name=0 );
+    TQHButtonGroup( const TQString &title, TQWidget* parent=0, const char* name=0 );
+    ~TQHButtonGroup();
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQHButtonGroup( const TQHButtonGroup & );
+    TQHButtonGroup &operator=( const TQHButtonGroup & );
+#endif
+};
+
+
+#endif // QT_NO_HBUTTONGROUP
+
+#endif // TQHBUTTONGROUP_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhbuttongroup-members.html b/doc/html/qhbuttongroup-members.html new file mode 100644 index 00000000..5a02405c --- /dev/null +++ b/doc/html/qhbuttongroup-members.html @@ -0,0 +1,393 @@ + + + + + +TQHButtonGroup Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQHButtonGroup

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhbuttongroup.html b/doc/html/qhbuttongroup.html new file mode 100644 index 00000000..9e4780fd --- /dev/null +++ b/doc/html/qhbuttongroup.html @@ -0,0 +1,89 @@ + + + + + +TQHButtonGroup Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQHButtonGroup Class Reference

+ +

The TQHButtonGroup widget organizes TQButton widgets in a +group with one horizontal row. +More... +

#include <qhbuttongroup.h> +

Inherits TQButtonGroup. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQHButtonGroup widget organizes TQButton widgets in a +group with one horizontal row. +

+ + +

TQHButtonGroup is a convenience class that offers a thin layer on +top of TQButtonGroup. From a layout point of view it is effectively +a TQHBox that offers a frame with a title and is specifically +designed for buttons. From a functionality point of view it is a +TQButtonGroup. +

TQButtonGroup
+

See also TQVButtonGroup, Widget Appearance and Style, Layout Management, and Organizers. + +


Member Function Documentation

+

TQHButtonGroup::TQHButtonGroup ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a horizontal button group with no title. +

The parent and name arguments are passed to the TQWidget +constructor. + +

TQHButtonGroup::TQHButtonGroup ( const TQString & title, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a horizontal button group with the title title. +

The parent and name arguments are passed to the TQWidget +constructor. + +

TQHButtonGroup::~TQHButtonGroup () +

+Destroys the horizontal button group, deleting its child widgets. + + +

+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/qheader-h.html b/doc/html/qheader-h.html new file mode 100644 index 00000000..f6cb9137 --- /dev/null +++ b/doc/html/qheader-h.html @@ -0,0 +1,264 @@ + + + + + +qheader.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qheader.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qheader.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQHeader widget class (table header)
+**
+** Created : 961105
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQHEADER_H
+#define TQHEADER_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qstring.h"
+#include "qiconset.h" // conversion TQPixmap->TQIconset
+#endif // QT_H
+
+#ifndef QT_NO_HEADER
+
+class TQShowEvent;
+class TQHeaderData;
+class TQTable;
+
+class Q_EXPORT TQHeader : public TQWidget
+{
+    friend class TQTable;
+    friend class TQTableHeader;
+    friend class TQListView;
+
+    Q_OBJECT
+    Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
+    Q_PROPERTY( bool tracking READ tracking WRITE setTracking )
+    Q_PROPERTY( int count READ count )
+    Q_PROPERTY( int offset READ offset WRITE setOffset )
+    Q_PROPERTY( bool moving READ isMovingEnabled WRITE setMovingEnabled )
+    Q_PROPERTY( bool stretching READ isStretchEnabled WRITE setStretchEnabled )
+
+public:
+    TQHeader( TQWidget* parent=0, const char* name=0 );
+    TQHeader( int, TQWidget* parent=0, const char* name=0 );
+    ~TQHeader();
+
+    int		addLabel( const TQString &, int size = -1 );
+    int		addLabel( const TQIconSet&, const TQString &, int size = -1 );
+    void 	removeLabel( int section );
+    virtual void setLabel( int, const TQString &, int size = -1 );
+    virtual void setLabel( int, const TQIconSet&, const TQString &, int size = -1 );
+    TQString 	label( int section ) const;
+    TQIconSet* 	iconSet( int section ) const;
+
+    virtual void setOrientation( Orientation );
+    Orientation orientation() const;
+    virtual void setTracking( bool enable );
+    bool	tracking() const;
+
+    virtual void setClickEnabled( bool, int section = -1 );
+    virtual void setResizeEnabled( bool, int section = -1 );
+    virtual void setMovingEnabled( bool );
+    virtual void setStretchEnabled( bool b, int section );
+    void 	setStretchEnabled( bool b ) { setStretchEnabled( b, -1 ); }
+    bool 	isClickEnabled( int section = -1 ) const;
+    bool 	isResizeEnabled( int section = -1 ) const;
+    bool 	isMovingEnabled() const;
+    bool 	isStretchEnabled() const;
+    bool 	isStretchEnabled( int section ) const;
+
+    void 	resizeSection( int section, int s );
+    int		sectionSize( int section ) const;
+    int		sectionPos( int section ) const;
+    int		sectionAt( int pos ) const;
+    int		count() const;
+    int 	headerWidth() const;
+    TQRect	sectionRect( int section ) const;
+
+    virtual void setCellSize( int , int ); // obsolete, do not use
+    int		cellSize( int i ) const { return sectionSize( mapToSection(i) ); } // obsolete, do not use
+    int		cellPos( int ) const; // obsolete, do not use
+    int		cellAt( int pos ) const { return mapToIndex( sectionAt(pos + offset()) ); } // obsolete, do not use
+
+    int 	offset() const;
+
+    TQSize	sizeHint() const;
+
+    int		mapToSection( int index ) const;
+    int		mapToIndex( int section ) const;
+    int		mapToLogical( int ) const; // obsolete, do not use
+    int		mapToActual( int ) const; // obsolete, do not use
+
+    void 	moveSection( int section, int toIndex );
+    virtual void moveCell( int, int); // obsolete, do not use
+
+    void 	setSortIndicator( int section, bool ascending = TRUE ); // obsolete, do not use
+    inline void setSortIndicator( int section, SortOrder order )
+	{ setSortIndicator( section, (order == Ascending) ); }
+    int		sortIndicatorSection() const;
+    SortOrder	sortIndicatorOrder() const;
+
+    void        adjustHeaderSize() { adjustHeaderSize( -1 ); }
+
+public slots:
+    void 	setUpdatesEnabled( bool enable );
+    virtual void setOffset( int pos );
+
+signals:
+    void	clicked( int section );
+    void	pressed( int section );
+    void	released( int section );
+    void	sizeChange( int section, int oldSize, int newSize );
+    void	indexChange( int section, int fromIndex, int toIndex );
+    void	sectionClicked( int ); // obsolete, do not use
+    void	moved( int, int ); // obsolete, do not use
+    void	sectionHandleDoubleClicked( int section );
+
+protected:
+    void	paintEvent( TQPaintEvent * );
+    void	showEvent( TQShowEvent *e );
+    void 	resizeEvent( TQResizeEvent *e );
+    TQRect	sRect( int index );
+
+    virtual void paintSection( TQPainter *p, int index, const TQRect& fr);
+    virtual void paintSectionLabel( TQPainter* p, int index, const TQRect& fr );
+
+    void 	fontChange( const TQFont & );
+
+    void	mousePressEvent( TQMouseEvent * );
+    void	mouseReleaseEvent( TQMouseEvent * );
+    void	mouseMoveEvent( TQMouseEvent * );
+    void	mouseDoubleClickEvent( TQMouseEvent * );
+
+    void	keyPressEvent( TQKeyEvent * );
+    void	keyReleaseEvent( TQKeyEvent * );
+
+private:
+    void	handleColumnMove( int fromIdx, int toIdx );
+    void 	adjustHeaderSize( int diff );
+    void	init( int );
+
+    void	paintRect( int p, int s );
+    void	markLine( int idx );
+    void	unMarkLine( int idx );
+    int		pPos( int i ) const;
+    int		pSize( int i ) const;
+    int 	findLine( int );
+    int		handleAt( int p );
+    bool 	reverse() const;
+    void 	calculatePositions( bool onlyVisible = FALSE, int start = 0 );
+    void	handleColumnResize(int, int, bool, bool = TRUE );
+    TQSize	sectionSizeHint( int section, const TQFontMetrics& fm ) const;
+    void	setSectionSizeAndHeight( int section, int size );
+
+    void 	resizeArrays( int size );
+    void 	setIsATableHeader( bool b );
+    int		offs;
+    int		handleIdx;
+    int		oldHIdxSize;
+    int		moveToIdx;
+    enum State { Idle, Sliding, Pressed, Moving, Blocked };
+    State	state;
+    TQCOORD	clickPos;
+    bool	trackingIsOn;
+    int oldHandleIdx;
+    int	cachedPos; // not used
+    Orientation orient;
+
+    TQHeaderData *d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQHeader( const TQHeader & );
+    TQHeader &operator=( const TQHeader & );
+#endif
+};
+
+
+inline TQHeader::Orientation TQHeader::orientation() const
+{
+    return orient;
+}
+
+inline void TQHeader::setTracking( bool enable ) { trackingIsOn = enable; }
+inline bool TQHeader::tracking() const { return trackingIsOn; }
+
+extern Q_EXPORT bool qt_qheader_label_return_null_strings; // needed for professional edition
+
+#endif // QT_NO_HEADER
+
+#endif // TQHEADER_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qheader-m.png b/doc/html/qheader-m.png new file mode 100644 index 00000000..16b264d3 Binary files /dev/null and b/doc/html/qheader-m.png differ diff --git a/doc/html/qheader-members.html b/doc/html/qheader-members.html new file mode 100644 index 00000000..1f086440 --- /dev/null +++ b/doc/html/qheader-members.html @@ -0,0 +1,389 @@ + + + + + +TQHeader Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQHeader

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qheader-w.png b/doc/html/qheader-w.png new file mode 100644 index 00000000..b0bc45b7 Binary files /dev/null and b/doc/html/qheader-w.png differ diff --git a/doc/html/qheader.html b/doc/html/qheader.html new file mode 100644 index 00000000..cef03b96 --- /dev/null +++ b/doc/html/qheader.html @@ -0,0 +1,607 @@ + + + + + +TQHeader Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQHeader Class Reference

+ +

The TQHeader class provides a header row or column, e.g. for +tables and listviews. +More... +

#include <qheader.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+
    +
  • void clicked ( int section )
  • +
  • void pressed ( int section )
  • +
  • void released ( int section )
  • +
  • void sizeChange ( int section, int oldSize, int newSize )
  • +
  • void indexChange ( int section, int fromIndex, int toIndex )
  • +
  • void sectionClicked ( int index )  (obsolete)
  • +
  • void moved ( int fromIndex, int toIndex )  (obsolete)
  • +
  • void sectionHandleDoubleClicked ( int section )
  • +
+

Properties

+
    +
  • int count - the number of sections in the header  (read only)
  • +
  • bool moving - whether the header sections can be moved
  • +
  • int offset - the header's left-most (or top-most) visible pixel
  • +
  • Orientation orientation - the header's orientation
  • +
  • bool stretching - whether the header sections always take up the full width (or height) of the header
  • +
  • bool tracking - whether the sizeChange() signal is emitted continuously
  • +
+

Protected Members

+
    +
  • TQRect sRect ( int index )
  • +
  • virtual void paintSection ( TQPainter * p, int index, const TQRect & fr )
  • +
  • virtual void paintSectionLabel ( TQPainter * p, int index, const TQRect & fr )
  • +
+

Detailed Description

+ + +The TQHeader class provides a header row or column, e.g. for +tables and listviews. +

+

This class provides a header, e.g. a vertical header to display +row labels, or a horizontal header to display column labels. It is +used by TQTable and TQListView for example. +

A header is composed of one or more sections, each of which can +display a text label and an iconset. A sort +indicator (an arrow) can also be displayed using +setSortIndicator(). +

Sections are added with addLabel() and removed with removeLabel(). +The label and iconset are set in addLabel() and can be changed +later with setLabel(). Use count() to retrieve the number of +sections in the header. +

The orientation of the header is set with setOrientation(). If +setStretchEnabled() is TRUE, the sections will expand to take up +the full width (height for vertical headers) of the header. The +user can resize the sections manually if setResizeEnabled() is +TRUE. Call adjustHeaderSize() to have the sections resize to +occupy the full width (or height). +

A section can be moved with moveSection(). If setMovingEnabled() +is TRUE (the default)the user may drag a section from one position +to another. If a section is moved, the index positions at which +sections were added (with addLabel()), may not be the same after the +move. You don't have to worry about this in practice because the +TQHeader API works in terms of section numbers, so it doesn't matter +where a particular section has been moved to. +

If you want the current index position of a section call +mapToIndex() giving it the section number. (This is the number +returned by the addLabel() call which created the section.) If you +want to get the section number of a section at a particular index +position call mapToSection() giving it the index number. +

Here's an example to clarify mapToSection() and mapToIndex(): +

+
Index positions +
0 1 2 3 +
Original section ordering +
Sect 0 Sect 1 Sect 2 Sect 3 +
Ordering after the user moves a section +
Sect 0 Sect 2 Sect 3 Sect 1 +
+

+
k mapToSection(k) mapToIndex(k) +
0 0 0 +
1 2 3 +
2 3 1 +
3 1 2 +
+

In the example above, if we wanted to find out which section is at +index position 3 we'd call mapToSection(3) and get a section +number of 1 since section 1 was moved. Similarly, if we wanted to +know which index position section 2 occupied we'd call +mapToIndex(2) and get an index of 1. +

TQHeader provides the clicked(), pressed() and released() signals. +If the user changes the size of a section, the sizeChange() signal +is emitted. If you want to have a sizeChange() signal emitted +continuously whilst the user is resizing (rather than just after +the resizing is finished), use setTracking(). If the user moves a +section the indexChange() signal is emitted. +

+

See also TQListView, TQTable, and Advanced Widgets. + +


Member Function Documentation

+

TQHeader::TQHeader ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a horizontal header called name, with parent parent. + +

TQHeader::TQHeader ( int n, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a horizontal header called name, with n sections +and parent parent. + +

TQHeader::~TQHeader () +

+Destroys the header and all its sections. + +

int TQHeader::addLabel ( const TQString & s, int size = -1 ) +

+Adds a new section with label text s. Returns the index +position where the section was added (at the right for horizontal +headers, at the bottom for vertical headers). The section's width +is set to size. If size < 0, an appropriate size for the +text s is chosen. + +

int TQHeader::addLabel ( const TQIconSet & iconset, const TQString & s, int size = -1 ) +

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

Adds a new section with iconset iconset and label text s. +Returns the index position where the section was added (at the +right for horizontal headers, at the bottom for vertical headers). +The section's width is set to size, unless size is negative in +which case the size is calculated taking account of the size of +the text. + +

void TQHeader::adjustHeaderSize () +

+ +

Adjusts the size of the sections to fit the size of the header as +completely as possible. Only sections for which isStretchEnabled() +is TRUE will be resized. + +

int TQHeader::cellAt ( int pos ) const +

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

Use sectionAt() instead. +

Returns the index at which the section is displayed, which contains +pos in widget coordinates, or -1 if pos is outside the header +sections. + +

int TQHeader::cellPos ( int i ) const +

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

Use sectionPos() instead. +

Returns the position in pixels of the section that is displayed at the +index i. The position is measured from the start of the header. + +

int TQHeader::cellSize ( int i ) const +

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

Use sectionSize() instead. +

Returns the size in pixels of the section that is displayed at +the index i. + +

void TQHeader::clicked ( int section ) [signal] +

+ +

If isClickEnabled() is TRUE, this signal is emitted when the user +clicks section section. +

See also pressed() and released(). + +

int TQHeader::count () const +

Returns the number of sections in the header. +See the "count" property for details. +

int TQHeader::headerWidth () const +

+Returns the total width of all the header columns. + +

TQIconSet * TQHeader::iconSet ( int section ) const +

+Returns the icon set for section section. If the section does +not exist, 0 is returned. + +

void TQHeader::indexChange ( int section, int fromIndex, int toIndex ) [signal] +

+ +

This signal is emitted when the user moves section section from +index position fromIndex, to index position toIndex. + +

bool TQHeader::isClickEnabled ( int section = -1 ) const +

+Returns TRUE if section section is clickable; otherwise returns +FALSE. +

If section is out of range (negative or larger than count() - +1): returns TRUE if all sections are clickable; otherwise returns +FALSE. +

See also setClickEnabled(). + +

bool TQHeader::isMovingEnabled () const +

Returns TRUE if the header sections can be moved; otherwise returns FALSE. +See the "moving" property for details. +

bool TQHeader::isResizeEnabled ( int section = -1 ) const +

+Returns TRUE if section section is resizeable; otherwise +returns FALSE. +

If section is -1 then this function applies to all sections, +i.e. returns TRUE if all sections are resizeable; otherwise +returns FALSE. +

See also setResizeEnabled(). + +

bool TQHeader::isStretchEnabled () const +

Returns TRUE if the header sections always take up the full width (or height) of the header; otherwise returns FALSE. +See the "stretching" property for details. +

bool TQHeader::isStretchEnabled ( int section ) const +

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

Returns TRUE if section section will resize to take up the full +width (or height) of the header; otherwise returns FALSE. If at +least one section has stretch enabled the sections will always +take up the full width of the header. +

See also setStretchEnabled(). + +

TQString TQHeader::label ( int section ) const +

+Returns the text for section section. If the section does not +exist, a TQString::null is returned. + +

Example: helpsystem/tooltip.cpp. +

int TQHeader::mapToActual ( int l ) const +

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

Use mapToIndex() instead. +

Translates from logical index l to actual index (index at which the section l is displayed) . +Returns -1 if l is outside the legal range. +

See also mapToLogical(). + +

int TQHeader::mapToIndex ( int section ) const +

+Returns the index position corresponding to the specified section number. +

Warning: If TQTable is used to move header sections as a result of user +interaction, the mapping exposed by this function will not reflect the +order of the headers in the table; i.e., TQTable does not call moveSection() +to move sections but handles move operations internally. +

See also mapToSection(). + +

int TQHeader::mapToLogical ( int a ) const +

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

Use mapToSection() instead. +

Translates from actual index a (index at which the section is displayed) to +logical index of the section. Returns -1 if a is outside the legal range. +

See also mapToActual(). + +

int TQHeader::mapToSection ( int index ) const +

+Returns the number of the section that corresponds to the specified index. +

Warning: If TQTable is used to move header sections as a result of user +interaction, the mapping exposed by this function will not reflect the +order of the headers in the table; i.e., TQTable does not call moveSection() +to move sections but handles move operations internally. +

See also mapToIndex(). + +

void TQHeader::moveCell ( int fromIdx, int toIdx ) [virtual] +

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

Use moveSection() instead. +

Moves the section that is currently displayed at index fromIdx +to index toIdx. + +

void TQHeader::moveSection ( int section, int toIndex ) +

+Moves section section to index position toIndex. + +

void TQHeader::moved ( int fromIndex, int toIndex ) [signal] +

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

Use indexChange() instead. +

This signal is emitted when the user has moved the section which +is displayed at the index fromIndex to the index toIndex. + +

int TQHeader::offset () const +

Returns the header's left-most (or top-most) visible pixel. +See the "offset" property for details. +

Orientation TQHeader::orientation () const +

Returns the header's orientation. +See the "orientation" property for details. +

void TQHeader::paintSection ( TQPainter * p, int index, const TQRect & fr ) [virtual protected] +

+Paints the section at position index, inside rectangle fr +(which uses widget coordinates) using painter p. +

Calls paintSectionLabel(). + +

void TQHeader::paintSectionLabel ( TQPainter * p, int index, const TQRect & fr ) [virtual protected] +

+Paints the label of the section at position index, inside +rectangle fr (which uses widget coordinates) using painter p. +

Called by paintSection() + +

void TQHeader::pressed ( int section ) [signal] +

+ +

This signal is emitted when the user presses section section +down. +

See also released(). + +

void TQHeader::released ( int section ) [signal] +

+ +

This signal is emitted when section section is released. +

See also pressed(). + +

void TQHeader::removeLabel ( int section ) +

+Removes section section. If the section does not exist, nothing +happens. + +

void TQHeader::resizeSection ( int section, int s ) +

+Resizes section section to s pixels wide (or high). + +

TQRect TQHeader::sRect ( int index ) [protected] +

+Returns the rectangle covered by the section at index index. + +

int TQHeader::sectionAt ( int pos ) const +

+Returns the index of the section which contains the position pos given in pixels from the left (or top). +

See also offset. + +

Example: helpsystem/tooltip.cpp. +

void TQHeader::sectionClicked ( int index ) [signal] +

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

Use clicked() instead. +

This signal is emitted when a part of the header is clicked. index is the index at which the section is displayed. +

In a list view this signal would typically be connected to a slot +that sorts the specified column (or row). + +

void TQHeader::sectionHandleDoubleClicked ( int section ) [signal] +

+ +

This signal is emitted when the user doubleclicks on the edge +(handle) of section section. + +

int TQHeader::sectionPos ( int section ) const +

+Returns the position (in pixels) at which the section starts. +

See also offset. + +

TQRect TQHeader::sectionRect ( int section ) const +

+Returns the rectangle covered by section section. + +

Example: helpsystem/tooltip.cpp. +

int TQHeader::sectionSize ( int section ) const +

+Returns the width (or height) of the section in pixels. + +

void TQHeader::setCellSize ( int section, int s ) [virtual] +

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

Use resizeSection() instead. +

Sets the size of the section section to s pixels. +

Warning: does not repaint or send out signals + +

void TQHeader::setClickEnabled ( bool enable, int section = -1 ) [virtual] +

+If enable is TRUE, any clicks on section section will result +in clicked() signals being emitted; otherwise the section will +ignore clicks. +

If section is -1 (the default) then the enable value is set +for all existing sections and will be applied to any new sections +that are added. +

See also moving and setResizeEnabled(). + +

void TQHeader::setLabel ( int section, const TQString & s, int size = -1 ) [virtual] +

+Sets the text of section section to s. The section's width +is set to size if size >= 0; otherwise it is left +unchanged. Any icon set that has been set for this section remains +unchanged. +

If the section does not exist, nothing happens. + +

Examples: chart/setdataform.cpp and table/small-table-demo/main.cpp. +

void TQHeader::setLabel ( int section, const TQIconSet & iconset, const TQString & s, int size = -1 ) [virtual] +

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

Sets the icon for section section to iconset and the text to +s. The section's width is set to size if size >= 0; +otherwise it is left unchanged. +

If the section does not exist, nothing happens. + +

void TQHeader::setMovingEnabled ( bool ) [virtual] +

Sets whether the header sections can be moved. +See the "moving" property for details. +

void TQHeader::setOffset ( int pos ) [virtual slot] +

Sets the header's left-most (or top-most) visible pixel to pos. +See the "offset" property for details. +

void TQHeader::setOrientation ( Orientation ) [virtual] +

Sets the header's orientation. +See the "orientation" property for details. +

void TQHeader::setResizeEnabled ( bool enable, int section = -1 ) [virtual] +

+If enable is TRUE the user may resize section section; +otherwise the section may not be manually resized. +

If section is negative (the default) then the enable value +is set for all existing sections and will be applied to any new +sections that are added. +Example: +

+    // Allow resizing of all current and future sections
+    header->setResizeEnabled(TRUE);
+    // Disable resizing of section 3, (the fourth section added)
+    header->setResizeEnabled(FALSE, 3);
+    
+ +

If the user resizes a section, a sizeChange() signal is emitted. +

See also moving, setClickEnabled(), and tracking. + +

void TQHeader::setSortIndicator ( int section, SortOrder order ) +

+ +

Sets a sort indicator onto the specified section. The indicator's +order is either Ascending or Descending. +

Only one section can show a sort indicator at any one time. If you +don't want any section to show a sort indicator pass a section +number of -1. +

See also sortIndicatorSection() and sortIndicatorOrder(). + +

void TQHeader::setSortIndicator ( int section, bool ascending = TRUE ) +

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

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

Use the other overload instead. + +

void TQHeader::setStretchEnabled ( bool b, int section ) [virtual] +

+If b is TRUE, section section will be resized when the +header is resized, so that the sections take up the full width (or +height for vertical headers) of the header; otherwise section section will be set to be unstretchable and will not resize when +the header is resized. +

If section is -1, and if b is TRUE, then all sections will +be resized equally when the header is resized so that they take up +the full width (or height for vertical headers) of the header; +otherwise all the sections will be set to be unstretchable and +will not resize when the header is resized. +

See also adjustHeaderSize(). + +

void TQHeader::setStretchEnabled ( bool b ) +

Sets whether the header sections always take up the full width (or height) of the header to b. +See the "stretching" property for details. +

void TQHeader::setTracking ( bool enable ) [virtual] +

Sets whether the sizeChange() signal is emitted continuously to enable. +See the "tracking" property for details. +

void TQHeader::sizeChange ( int section, int oldSize, int newSize ) [signal] +

+ +

This signal is emitted when the user has changed the size of a section from oldSize to newSize. This signal is typically +connected to a slot that repaints the table or list that contains +the header. + +

SortOrder TQHeader::sortIndicatorOrder () const +

+Returns the implied sort order of the TQHeaders sort indicator. +

See also setSortIndicator() and sortIndicatorSection(). + +

int TQHeader::sortIndicatorSection () const +

+Returns the section showing the sort indicator or -1 if there is no sort indicator. +

See also setSortIndicator() and sortIndicatorOrder(). + +

bool TQHeader::tracking () const +

Returns TRUE if the sizeChange() signal is emitted continuously; otherwise returns FALSE. +See the "tracking" property for details. +


Property Documentation

+

int count

+

This property holds the number of sections in the header. +

+

Get this property's value with count(). +

bool moving

+

This property holds whether the header sections can be moved. +

If this property is TRUE (the default) the user can move sections. +If the user moves a section the indexChange() signal is emitted. +

See also setClickEnabled() and setResizeEnabled(). + +

Set this property's value with setMovingEnabled() and get this property's value with isMovingEnabled(). +

int offset

+

This property holds the header's left-most (or top-most) visible pixel. +

Setting this property will scroll the header so that offset +becomes the left-most (or top-most for vertical headers) visible +pixel. + +

Set this property's value with setOffset() and get this property's value with offset(). +

Orientation orientation

+

This property holds the header's orientation. +

The orientation is either Vertical or Horizontal (the +default). +

Call setOrientation() before adding labels if you don't provide a +size parameter otherwise the sizes will be incorrect. + +

Set this property's value with setOrientation() and get this property's value with orientation(). +

bool stretching

+

This property holds whether the header sections always take up the full width (or height) of the header. +

+

Set this property's value with setStretchEnabled() and get this property's value with isStretchEnabled(). +

bool tracking

+

This property holds whether the sizeChange() signal is emitted continuously. +

If tracking is on, the sizeChange() signal is emitted continuously +while the mouse is moved (i.e. when the header is resized), +otherwise it is only emitted when the mouse button is released at +the end of resizing. +

Tracking defaults to FALSE. + +

Set this property's value with setTracking() and get this property's value with tracking(). + +


+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/qhebrewcodec-members.html b/doc/html/qhebrewcodec-members.html new file mode 100644 index 00000000..bb8dcf5c --- /dev/null +++ b/doc/html/qhebrewcodec-members.html @@ -0,0 +1,71 @@ + + + + + +TQHebrewCodec Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQHebrewCodec

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhebrewcodec.html b/doc/html/qhebrewcodec.html new file mode 100644 index 00000000..2c5b9498 --- /dev/null +++ b/doc/html/qhebrewcodec.html @@ -0,0 +1,114 @@ + + + + + +TQHebrewCodec Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQHebrewCodec Class Reference

+ +

The TQHebrewCodec class provides conversion to and from +visually ordered Hebrew. +More... +

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

+

#include <qrtlcodec.h> +

Inherits TQTextCodec. +

List of all member functions. +

Public Members

+
    +
  • virtual const char * mimeName () const
  • +
  • virtual TQCString fromUnicode ( const TQString & uc, int & lenInOut ) const
  • +
+

Detailed Description

+ + + + +

The TQHebrewCodec class provides conversion to and from +visually ordered Hebrew. +

Hebrew as a semitic language is written from right to left. +Because older computer systems couldn't handle reordering a string +so that the first letter appears on the right, many older +documents were encoded in visual order, so that the first letter +of a line is the rightmost one in the string. +

In contrast to this, Unicode defines characters to be in logical +order (the order you would read the string). This codec tries to +convert visually ordered Hebrew (8859-8) to Unicode. This might +not always work perfectly, because reversing the bidi +(bi-directional) algorithm that transforms from logical to visual +order is non-trivial. +

Transformation from Unicode to visual Hebrew (8859-8) is done +using the bidi algorithm in TQt, and will produce correct results, +so long as the codec is given the text a whole paragraph at a +time. Places where newlines are supposed to go can be indicated by +a newline character ('\n'). Note that these newline characters +change the reordering behaviour of the algorithm, since the bidi +reordering only takes place within one line of text, whereas +line breaks are determined in visual order. +

Visually ordered Hebrew is still used tquite often in some places, +mainly in email communication (since most email programs still +don't understand logically ordered Hebrew) and on web pages. The +use on web pages is rapidly decreasing, due to the availability of +browsers that correctly support logically ordered Hebrew. +

This codec has the name "iso8859-8". If you don't want any bidi +reordering to happen during conversion, use the "iso8859-8-i" +codec, which assumes logical order for the 8-bit string. +

See also Internationalization with TQt. + +


Member Function Documentation

+

TQCString TQHebrewCodec::fromUnicode ( const TQString & uc, int & lenInOut ) const [virtual] +

+Transforms the logically ordered TQString, uc, into a visually +ordered string in the 8859-8 encoding. TQt's bidi algorithm is used +to perform this task. Note that newline characters affect the +reordering, since reordering is done on a line by line basis. +

The algorithm is designed to work on whole paragraphs of text, so +processing a line at a time may produce incorrect results. This +approach is taken because the reordering of the contents of a +particular line in a paragraph may depend on the previous line in +the same paragraph. +

Some encodings (for example Japanese or UTF-8) are multibyte (so +one input character is mapped to two output characters). The lenInOut argument specifies the number of TQChars that should be +converted and is set to the number of characters returned. + +

Reimplemented from TQTextCodec. +

const char * TQHebrewCodec::mimeName () const [virtual] +

+Returns the codec's mime name. + +

Reimplemented from TQTextCodec. + +


+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/qhgroupbox-h.html b/doc/html/qhgroupbox-h.html new file mode 100644 index 00000000..e05cf2a0 --- /dev/null +++ b/doc/html/qhgroupbox-h.html @@ -0,0 +1,112 @@ + + + + + +qhgroupbox.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qhgroupbox.h

+ +

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


+
+/**********************************************************************
+** $Id: qt/qhgroupbox.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQHGroupBox widget class
+**
+** Created : 990602
+**
+** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQHGROUPBOX_H
+#define TQHGROUPBOX_H
+
+#ifndef QT_H
+#include "qgroupbox.h"
+#endif // QT_H
+
+#ifndef QT_NO_HGROUPBOX
+
+class Q_EXPORT TQHGroupBox : public TQGroupBox
+{
+    Q_OBJECT
+public:
+    TQHGroupBox( TQWidget* parent=0, const char* name=0 );
+    TQHGroupBox( const TQString &title, TQWidget* parent=0, const char* name=0 );
+    ~TQHGroupBox();
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQHGroupBox( const TQHGroupBox & );
+    TQHGroupBox &operator=( const TQHGroupBox & );
+#endif
+};
+
+#endif // QT_NO_HGROUPBOX
+
+#endif // TQHGROUPBOX_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhgroupbox-members.html b/doc/html/qhgroupbox-members.html new file mode 100644 index 00000000..95fda4c1 --- /dev/null +++ b/doc/html/qhgroupbox-members.html @@ -0,0 +1,378 @@ + + + + + +TQHGroupBox Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQHGroupBox

+ +

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

+ +


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

TQHGroupBox Class Reference

+ +

The TQHGroupBox widget organizes widgets in a group with one +horizontal row. +More... +

#include <qhgroupbox.h> +

Inherits TQGroupBox. +

List of all member functions. +

Public Members

+
    +
  • TQHGroupBox ( TQWidget * parent = 0, const char * name = 0 )
  • +
  • TQHGroupBox ( const TQString & title, TQWidget * parent = 0, const char * name = 0 )
  • +
  • ~TQHGroupBox ()
  • +
+

Detailed Description

+ + +

The TQHGroupBox widget organizes widgets in a group with one +horizontal row. +

+ + +

TQHGroupBox is a convenience class that offers a thin layer on top +of TQGroupBox. Think of it as a TQHBox that offers a frame with a +title. +

Group Boxes
+

See also TQVGroupBox, Widget Appearance and Style, Layout Management, and Organizers. + +


Member Function Documentation

+

TQHGroupBox::TQHGroupBox ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a horizontal group box with no title. +

The parent and name arguments are passed to the TQWidget +constructor. + +

TQHGroupBox::TQHGroupBox ( const TQString & title, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a horizontal group box with the title title. +

The parent and name arguments are passed to the TQWidget +constructor. + +

TQHGroupBox::~TQHGroupBox () +

+Destroys the horizontal group box, deleting its child widgets. + + +

+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/qhideevent-members.html b/doc/html/qhideevent-members.html new file mode 100644 index 00000000..05fa8400 --- /dev/null +++ b/doc/html/qhideevent-members.html @@ -0,0 +1,49 @@ + + + + + +TQHideEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQHideEvent

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhideevent.html b/doc/html/qhideevent.html new file mode 100644 index 00000000..288d37ec --- /dev/null +++ b/doc/html/qhideevent.html @@ -0,0 +1,74 @@ + + + + + +TQHideEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQHideEvent Class Reference

+ +

The TQHideEvent class provides an event which is sent after a widget is hidden. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQHideEvent class provides an event which is sent after a widget is hidden. +

+

This event is sent just before TQWidget::hide() returns, and also +when a top-level window has been hidden (iconified) by the user. +

If spontaneous() is TRUE the event originated outside the +application, i.e. the user hid the window using the window manager +controls, either by iconifying the window or by switching to +another virtual desktop where the window isn't visible. The window +will become hidden but not withdrawn. If the window was iconified, +TQWidget::isMinimized() returns TRUE. +

See also TQShowEvent and Event Classes. + +


Member Function Documentation

+

TQHideEvent::TQHideEvent () +

+ +

Constructs a TQHideEvent. + + +


+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/qhostaddress-h.html b/doc/html/qhostaddress-h.html new file mode 100644 index 00000000..97788675 --- /dev/null +++ b/doc/html/qhostaddress-h.html @@ -0,0 +1,146 @@ + + + + + +qhostaddress.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qhostaddress.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qhostaddress.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQHostAddress class.
+**
+** Created : 979899
+**
+** Copyright (C) 1997-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the network 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 retquirements 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 TQHOSTADDRESS_H
+#define TQHOSTADDRESS_H
+
+#ifndef QT_H
+#include "qstring.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_NETWORK ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_NETWORK )
+#define TQM_EXPORT_NETWORK
+#else
+#define TQM_EXPORT_NETWORK Q_EXPORT
+#endif
+
+#ifndef QT_NO_NETWORK
+class TQHostAddressPrivate;
+
+typedef struct {
+    Q_UINT8 c[16];
+} Q_IPV6ADDR;
+
+class TQM_EXPORT_NETWORK TQHostAddress
+{
+public:
+    TQHostAddress();
+    TQHostAddress( Q_UINT32 ip4Addr );
+    TQHostAddress( Q_UINT8 *ip6Addr );
+    TQHostAddress(const Q_IPV6ADDR &ip6Addr);
+#ifndef QT_NO_STRINGLIST
+    TQHostAddress(const TQString &address);
+#endif
+    TQHostAddress( const TQHostAddress & );
+    virtual ~TQHostAddress();
+
+    TQHostAddress & operator=( const TQHostAddress & );
+
+    void setAddress( Q_UINT32 ip4Addr );
+    void setAddress( Q_UINT8 *ip6Addr );
+#ifndef QT_NO_STRINGLIST
+    bool setAddress( const TQString& address );
+#endif
+    bool	 isIp4Addr()	 const; // obsolete
+    Q_UINT32	 ip4Addr()	 const; // obsolete
+
+    bool	 isIPv4Address() const;
+    Q_UINT32	 toIPv4Address() const;
+    bool	 isIPv6Address() const;
+    Q_IPV6ADDR	 toIPv6Address() const;
+
+#ifndef QT_NO_SPRINTF
+    TQString	 toString() const;
+#endif
+
+    bool	 operator==( const TQHostAddress & ) const;
+    bool	 isNull() const;
+
+private:
+    TQHostAddressPrivate* d;
+};
+
+#endif //QT_NO_NETWORK
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhostaddress-members.html b/doc/html/qhostaddress-members.html new file mode 100644 index 00000000..b93b7df7 --- /dev/null +++ b/doc/html/qhostaddress-members.html @@ -0,0 +1,59 @@ + + + + + +TQHostAddress Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQHostAddress

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhostaddress.html b/doc/html/qhostaddress.html new file mode 100644 index 00000000..1d9fcdae --- /dev/null +++ b/doc/html/qhostaddress.html @@ -0,0 +1,200 @@ + + + + + +TQHostAddress Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQHostAddress Class Reference
[network module]

+ +

The TQHostAddress class provides an IP address. +More... +

#include <qhostaddress.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQHostAddress class provides an IP address. + +

+ +

This class contains an IP address in a platform and protocol +independent manner. It stores both IPv4 and IPv6 addresses in a +way that you can easily access on any platform. +

TQHostAddress is normally used with the classes TQSocket, +TQServerSocket and TQSocketDevice to set up a server or to connect +to a host. +

Host addresses may be set with setAddress() and retrieved with +ip4Addr() or toString(). +

See also TQSocket, TQServerSocket, TQSocketDevice, and Input/Output and Networking. + +


Member Function Documentation

+

TQHostAddress::TQHostAddress () +

+Creates a host address object with the IP address 0.0.0.0. + +

TQHostAddress::TQHostAddress ( Q_UINT32 ip4Addr ) +

+Creates a host address object for the IPv4 address ip4Addr. + +

TQHostAddress::TQHostAddress ( Q_UINT8 * ip6Addr ) +

+Creates a host address object with the specified IPv6 address. +

ip6Addr must be a 16 byte array in network byte order +(high-order byte first). + +

TQHostAddress::TQHostAddress ( const Q_IPV6ADDR & ip6Addr ) +

+Creates a host address object with the IPv6 address, ip6Addr. + +

TQHostAddress::TQHostAddress ( const TQHostAddress & address ) +

+Creates a copy of address. + +

TQHostAddress::~TQHostAddress () [virtual] +

+Destroys the host address object. + +

Q_UINT32 TQHostAddress::ip4Addr () const +

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

Use toIPv4Address() instead. + +

bool TQHostAddress::isIPv4Address () const +

+Returns TRUE if the host address represents an IPv4 address; +otherwise returns FALSE. + +

bool TQHostAddress::isIPv6Address () const +

+Returns TRUE if the host address represents an IPv6 address; +otherwise returns FALSE. + +

bool TQHostAddress::isIp4Addr () const +

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

Use isIPv4Address() instead. + +

bool TQHostAddress::isNull () const +

+Returns TRUE if this host address is null (INADDR_ANY or in6addr_any). The +default constructor creates a null address, and that address isn't valid +for any particular host or interface. + +

TQHostAddress & TQHostAddress::operator= ( const TQHostAddress & address ) +

+Assigns another host address object address to this object and +returns a reference to this object. + +

bool TQHostAddress::operator== ( const TQHostAddress & other ) const +

+Returns TRUE if this host address is the same as other; +otherwise returns FALSE. + +

void TQHostAddress::setAddress ( Q_UINT32 ip4Addr ) +

+Set the IPv4 address specified by ip4Addr. + +

void TQHostAddress::setAddress ( Q_UINT8 * ip6Addr ) +

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

Set the IPv6 address specified by ip6Addr. +

ip6Addr must be a 16 byte array in network byte order +(high-order byte first). + +

bool TQHostAddress::setAddress ( const TQString & address ) +

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

Sets the IPv4 or IPv6 address specified by the string +representation address (e.g. "127.0.0.1"). Returns TRUE and +sets the address if the address was successfully parsed; otherwise +returns FALSE and leaves the address unchanged. + +

Q_UINT32 TQHostAddress::toIPv4Address () const +

+Returns the IPv4 address as a number. +

For example, if the address is 127.0.0.1, the returned value is +2130706433 (i.e. 0x7f000001). +

This value is only valid when isIp4Addr() returns TRUE. +

See also toString(). + +

Q_IPV6ADDR TQHostAddress::toIPv6Address () const +

+Returns the IPv6 address as a Q_IPV6ADDR structure. The structure +consists of 16 unsigned characters. +

+        Q_IPV6ADDR addr = hostAddr.ip6Addr();
+        // addr.c[] contains 16 unsigned characters
+
+        for (int i = 0; i < 16; ++i) {
+            // process addr.c[i]
+        }
+    
+ +

This value is only valid when isIPv6Address() returns TRUE. +

See also toString(). + +

TQString TQHostAddress::toString () const +

+Returns the address as a string. +

For example, if the address is the IPv4 address 127.0.0.1, the +returned string is "127.0.0.1". +

See also ip4Addr(). + + +


+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/qhttp-h.html b/doc/html/qhttp-h.html new file mode 100644 index 00000000..e25d9527 --- /dev/null +++ b/doc/html/qhttp-h.html @@ -0,0 +1,322 @@ + + + + + +qhttp.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qhttp.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qhttp.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQHttp and related classes.
+**
+** Created : 970521
+**
+** Copyright (C) 1997-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the network 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 retquirements 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 TQHTTP_H
+#define TQHTTP_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qnetworkprotocol.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_NETWORK ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_NETWORK )
+#define TQM_EXPORT_HTTP
+#define TQM_TEMPLATE_EXTERN_HTTP
+#else
+#define TQM_EXPORT_HTTP Q_EXPORT
+#define TQM_TEMPLATE_EXTERN_HTTP Q_TEMPLATE_EXTERN
+#endif
+
+#ifndef QT_NO_NETWORKPROTOCOL_HTTP
+
+class TQSocket;
+class TQTimerEvent;
+class TQTextStream;
+class TQIODevice;
+
+class TQHttpPrivate;
+class TQHttpRequest;
+
+class TQM_EXPORT_HTTP TQHttpHeader
+{
+public:
+    TQHttpHeader();
+    TQHttpHeader( const TQHttpHeader& header );
+    TQHttpHeader( const TQString& str );
+    virtual ~TQHttpHeader();
+
+    TQHttpHeader& operator=( const TQHttpHeader& h );
+
+    TQString value( const TQString& key ) const;
+    void setValue( const TQString& key, const TQString& value );
+    void removeValue( const TQString& key );
+
+    TQStringList keys() const;
+    bool hasKey( const TQString& key ) const;
+
+    bool hasContentLength() const;
+    uint contentLength() const;
+    void setContentLength( int len );
+
+    bool hasContentType() const;
+    TQString contentType() const;
+    void setContentType( const TQString& type );
+
+    virtual TQString toString() const;
+    bool isValid() const;
+
+    virtual int majorVersion() const = 0;
+    virtual int minorVersion() const = 0;
+
+protected:
+    virtual bool parseLine( const TQString& line, int number );
+    bool parse( const TQString& str );
+    void setValid( bool );
+
+private:
+    TQMap<TQString,TQString> values;
+    bool valid;
+};
+
+class TQM_EXPORT_HTTP TQHttpResponseHeader : public TQHttpHeader
+{
+private:
+    TQHttpResponseHeader( int code, const TQString& text = TQString::null, int majorVer = 1, int minorVer = 1 );
+    TQHttpResponseHeader( const TQString& str );
+
+    void setStatusLine( int code, const TQString& text = TQString::null, int majorVer = 1, int minorVer = 1 );
+
+public:
+    TQHttpResponseHeader();
+    TQHttpResponseHeader( const TQHttpResponseHeader& header );
+
+    int statusCode() const;
+    TQString reasonPhrase() const;
+
+    int majorVersion() const;
+    int minorVersion() const;
+
+    TQString toString() const;
+
+protected:
+    bool parseLine( const TQString& line, int number );
+
+private:
+    int statCode;
+    TQString reasonPhr;
+    int majVer;
+    int minVer;
+
+    friend class TQHttp;
+};
+
+class TQM_EXPORT_HTTP TQHttpRequestHeader : public TQHttpHeader
+{
+public:
+    TQHttpRequestHeader();
+    TQHttpRequestHeader( const TQString& method, const TQString& path, int majorVer = 1, int minorVer = 1 );
+    TQHttpRequestHeader( const TQHttpRequestHeader& header );
+    TQHttpRequestHeader( const TQString& str );
+
+    void setRequest( const TQString& method, const TQString& path, int majorVer = 1, int minorVer = 1 );
+
+    TQString method() const;
+    TQString path() const;
+
+    int majorVersion() const;
+    int minorVersion() const;
+
+    TQString toString() const;
+
+protected:
+    bool parseLine( const TQString& line, int number );
+
+private:
+    TQString m;
+    TQString p;
+    int majVer;
+    int minVer;
+};
+
+class TQM_EXPORT_HTTP TQHttp : public TQNetworkProtocol
+{
+    Q_OBJECT
+
+public:
+    TQHttp();
+    TQHttp( TQObject* parent, const char* name = 0 ); // ### TQt 4.0: make parent=0 and get rid of the TQHttp() constructor
+    TQHttp( const TQString &hostname, Q_UINT16 port=80, TQObject* parent=0, const char* name = 0 );
+    virtual ~TQHttp();
+
+    int supportedOperations() const;
+
+    enum State { Unconnected, HostLookup, Connecting, Sending, Reading, Connected, Closing };
+    enum Error {
+	NoError,
+	UnknownError,
+	HostNotFound,
+	ConnectionRefused,
+	UnexpectedClose,
+	InvalidResponseHeader,
+	WrongContentLength,
+	Aborted
+    };
+
+    int setHost(const TQString &hostname, Q_UINT16 port=80 );
+
+    int get( const TQString& path, TQIODevice* to=0 );
+    int post( const TQString& path, TQIODevice* data, TQIODevice* to=0  );
+    int post( const TQString& path, const TQByteArray& data, TQIODevice* to=0 );
+    int head( const TQString& path );
+    int request( const TQHttpRequestHeader &header, TQIODevice *device=0, TQIODevice *to=0 );
+    int request( const TQHttpRequestHeader &header, const TQByteArray &data, TQIODevice *to=0 );
+
+    int closeConnection();
+
+    Q_ULONG bytesAvailable() const;
+    Q_LONG readBlock( char *data, Q_ULONG maxlen );
+    TQByteArray readAll();
+
+    int currentId() const;
+    TQIODevice* currentSourceDevice() const;
+    TQIODevice* currentDestinationDevice() const;
+    TQHttpRequestHeader currentRequest() const;
+    bool hasPendingRequests() const;
+    void clearPendingRequests();
+
+    State state() const;
+
+    Error error() const;
+    TQString errorString() const;
+
+public slots:
+    void abort();
+
+signals:
+    void stateChanged( int );
+    void responseHeaderReceived( const TQHttpResponseHeader& resp );
+    void readyRead( const TQHttpResponseHeader& resp );
+    void dataSendProgress( int, int );
+    void dataReadProgress( int, int );
+
+    void requestStarted( int );
+    void requestFinished( int, bool );
+    void done( bool );
+
+protected:
+    void operationGet( TQNetworkOperation *op );
+    void operationPut( TQNetworkOperation *op );
+
+    void timerEvent( TQTimerEvent * );
+
+private slots:
+    void clientReply( const TQHttpResponseHeader &rep );
+    void clientDone( bool );
+    void clientStateChanged( int );
+
+    void startNextRequest();
+    void slotReadyRead();
+    void slotConnected();
+    void slotError( int );
+    void slotClosed();
+    void slotBytesWritten( int );
+
+private:
+    TQHttpPrivate *d;
+    void *unused; // ### TQt 4.0: remove this (in for binary compatibility)
+    int bytesRead;
+
+    int addRequest( TQHttpRequest * );
+    void sendRequest();
+    void finishedWithSuccess();
+    void finishedWithError( const TQString& detail, int errorCode );
+
+    void killIdleTimer();
+
+    void init();
+    void setState( int );
+    void close();
+
+    friend class TQHttpNormalRequest;
+    friend class TQHttpSetHostRequest;
+    friend class TQHttpCloseRequest;
+    friend class TQHttpPGHRequest;
+};
+
+#define Q_DEFINED_QHTTP
+#include "qwinexport.h"
+#endif
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhttp-members.html b/doc/html/qhttp-members.html new file mode 100644 index 00000000..7fa8d7be --- /dev/null +++ b/doc/html/qhttp-members.html @@ -0,0 +1,146 @@ + + + + + +TQHttp Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQHttp

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhttp.html b/doc/html/qhttp.html new file mode 100644 index 00000000..9d830fc9 --- /dev/null +++ b/doc/html/qhttp.html @@ -0,0 +1,593 @@ + + + + + +TQHttp Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQHttp Class Reference
[network module]

+ +

The TQHttp class provides an implementation of the HTTP protocol. +More... +

#include <qhttp.h> +

Inherits TQNetworkProtocol. +

List of all member functions. +

Public Members

+
    +
  • TQHttp ()
  • +
  • TQHttp ( TQObject * parent, const char * name = 0 )
  • +
  • TQHttp ( const TQString & hostname, Q_UINT16 port = 80, TQObject * parent = 0, const char * name = 0 )
  • +
  • virtual ~TQHttp ()
  • +
  • enum State { Unconnected, HostLookup, Connecting, Sending, Reading, Connected, Closing }
  • +
  • enum Error { NoError, UnknownError, HostNotFound, ConnectionRefused, UnexpectedClose, InvalidResponseHeader, WrongContentLength, Aborted }
  • +
  • int setHost ( const TQString & hostname, Q_UINT16 port = 80 )
  • +
  • int get ( const TQString & path, TQIODevice * to = 0 )
  • +
  • int post ( const TQString & path, TQIODevice * data, TQIODevice * to = 0 )
  • +
  • int post ( const TQString & path, const TQByteArray & data, TQIODevice * to = 0 )
  • +
  • int head ( const TQString & path )
  • +
  • int request ( const TQHttpRequestHeader & header, TQIODevice * data = 0, TQIODevice * to = 0 )
  • +
  • int request ( const TQHttpRequestHeader & header, const TQByteArray & data, TQIODevice * to = 0 )
  • +
  • int closeConnection ()
  • +
  • Q_ULONG bytesAvailable () const
  • +
  • Q_LONG readBlock ( char * data, Q_ULONG maxlen )
  • +
  • TQByteArray readAll ()
  • +
  • int currentId () const
  • +
  • TQIODevice * currentSourceDevice () const
  • +
  • TQIODevice * currentDestinationDevice () const
  • +
  • TQHttpRequestHeader currentRequest () const
  • +
  • bool hasPendingRequests () const
  • +
  • void clearPendingRequests ()
  • +
  • State state () const
  • +
  • Error error () const
  • +
  • TQString errorString () const
  • +
+

Public Slots

+ +

Signals

+ +

Detailed Description

+ + +The TQHttp class provides an implementation of the HTTP protocol. + +

+ +

This class provides two different interfaces: one is the +TQNetworkProtocol interface that allows you to use HTTP through the +TQUrlOperator abstraction. The other is a direct interface to HTTP +that allows you to have more control over the requests and that +allows you to access the response header fields. +

Don't mix the two interfaces, since the behavior is not +well-defined. +

If you want to use TQHttp with the TQNetworkProtocol interface, you +do not use it directly, but rather through a TQUrlOperator, for +example: +

+    TQUrlOperator op( "http://www.trolltech.com" );
+    op.get( "index.html" );
+    
+ +

This code will only work if the TQHttp class is registered; to +register the class, you must call qInitNetworkProtocols() before +using a TQUrlOperator with HTTP. +

The TQNetworkProtocol interface for HTTP only supports the +operations operationGet() and operationPut(), i.e. +TQUrlOperator::get() and TQUrlOperator::put(), if you use it with a +TQUrlOperator. +

The rest of this descrption describes the direct interface to +HTTP. +

The class works asynchronously, so there are no blocking +functions. If an operation cannot be executed immediately, the +function will still return straight away and the operation will be +scheduled for later execution. The results of scheduled operations +are reported via signals. This approach depends on the event loop +being in operation. +

The operations that can be scheduled (they are called "requests" +in the rest of the documentation) are the following: setHost(), +get(), post(), head() and request(). +

All of these requests return a unique identifier that allows you +to keep track of the request that is currently executed. When the +execution of a request starts, the requestStarted() signal with +the identifier is emitted and when the request is finished, the +requestFinished() signal is emitted with the identifier and a bool +that indicates if the request finished with an error. +

To make an HTTP request you must set up suitable HTTP headers. The +following example demonstrates, how to request the main HTML page +from the Trolltech home page (i.e. the URL +http://www.trolltech.com/index.html): +

+    TQHttpRequestHeader header( "GET", "/index.html" );
+    header.setValue( "Host", "www.trolltech.com" );
+    http->setHost( "www.trolltech.com" );
+    http->request( header );
+    
+ +

For the common HTTP requests GET, POST and HEAD, TQHttp +provides the convenience functions get(), post() and head(). They +already use a reasonable header and if you don't have to set +special header fields, they are easier to use. The above example +can also be written as: +

+    http->setHost( "www.trolltech.com" ); // id == 1
+    http->get( "/index.html" );           // id == 2
+    
+ +

For this example the following sequence of signals is emitted +(with small variations, depending on network traffic, etc.): +

+    requestStarted( 1 )
+    requestFinished( 1, FALSE )
+
+    requestStarted( 2 )
+    stateChanged( Connecting )
+    stateChanged( Sending )
+    dataSendProgress( 77, 77 )
+    stateChanged( Reading )
+    responseHeaderReceived( responseheader )
+    dataReadProgress( 5388, 0 )
+    readyRead( responseheader )
+    dataReadProgress( 18300, 0 )
+    readyRead( responseheader )
+    stateChanged( Connected )
+    requestFinished( 2, FALSE )
+
+    done( FALSE )
+
+    stateChanged( Closing )
+    stateChanged( Unconnected )
+    
+ +

The dataSendProgress() and dataReadProgress() signals in the above +example are useful if you want to show a progressbar to inform the user about the progress of the +download. The second argument is the total size of data. In +certain cases it is not possible to know the total amount in +advance, in which case the second argument is 0. (If you connect +to a TQProgressBar a total of 0 results in a busy indicator.) +

When the response header is read, it is reported with the +responseHeaderReceived() signal. +

The readyRead() signal tells you that there is data ready to be +read. The amount of data can then be queried with the +bytesAvailable() function and it can be read with the readBlock() +or readAll() functions. +

If an error occurs during the execution of one of the commands in +a sequence of commands, all the pending commands (i.e. scheduled, +but not yet executed commands) are cleared and no signals are +emitted for them. +

For example, if you have the following sequence of reqeusts +

+    http->setHost( "www.foo.bar" );       // id == 1
+    http->get( "/index.html" );           // id == 2
+    http->post( "register.html", data );  // id == 3
+    
+ +

and the get() request fails because the host lookup fails, then +the post() request is never executed and the signals would look +like this: +

+    requestStarted( 1 )
+    requestFinished( 1, FALSE )
+
+    requestStarted( 2 )
+    stateChanged( HostLookup )
+    requestFinished( 2, TRUE )
+
+    done( TRUE )
+
+    stateChanged( Unconnected )
+    
+ +

You can then get details about the error with the error() and +errorString() functions. Note that only unexpected behaviour, like +network failure is considered as an error. If the server response +contains an error status, like a 404 response, this is reported as +a normal response case. So you should always check the status code of the +response header. +

The functions currentId() and currentRequest() provide more +information about the currently executing request. +

The functions hasPendingRequests() and clearPendingRequests() +allow you to query and clear the list of pending requests. +

See also TQt Network Documentation, TQNetworkProtocol, TQUrlOperator, TQFtp, and Input/Output and Networking. + +


Member Type Documentation

+

TQHttp::Error

+

This enum identifies the error that occurred. +

    +
  • TQHttp::NoError - No error occurred. +
  • TQHttp::HostNotFound - The host name lookup failed. +
  • TQHttp::ConnectionRefused - The server refused the connection. +
  • TQHttp::UnexpectedClose - The server closed the connection unexpectedly. +
  • TQHttp::InvalidResponseHeader - The server sent an invalid response header. +
  • TQHttp::WrongContentLength - The client could not read the content correctly +because an error with respect to the content length occurred. +
  • TQHttp::Aborted - The request was aborted with abort(). +
  • TQHttp::UnknownError - An error other than those specified above +occurred. +

See also error(). + +

TQHttp::State

+ +

This enum is used to specify the state the client is in: +

    +
  • TQHttp::Unconnected - There is no connection to the host. +
  • TQHttp::HostLookup - A host name lookup is in progress. +
  • TQHttp::Connecting - An attempt to connect to the host is in progress. +
  • TQHttp::Sending - The client is sending its request to the server. +
  • TQHttp::Reading - The client's request has been sent and the client +is reading the server's response. +
  • TQHttp::Connected - The connection to the host is open, but the client is +neither sending a request, nor waiting for a response. +
  • TQHttp::Closing - The connection is closing down, but is not yet +closed. (The state will be Unconnected when the connection is +closed.) +

See also stateChanged() and state(). + +


Member Function Documentation

+

TQHttp::TQHttp () +

+Constructs a TQHttp object. + +

TQHttp::TQHttp ( TQObject * parent, const char * name = 0 ) +

+Constructs a TQHttp object. The parameters parent and name +are passed on to the TQObject constructor. + +

TQHttp::TQHttp ( const TQString & hostname, Q_UINT16 port = 80, TQObject * parent = 0, const char * name = 0 ) +

+Constructs a TQHttp object. Subsequent requests are done by +connecting to the server hostname on port port. The +parameters parent and name are passed on to the TQObject +constructor. +

See also setHost(). + +

TQHttp::~TQHttp () [virtual] +

+Destroys the TQHttp object. If there is an open connection, it is +closed. + +

void TQHttp::abort () [slot] +

+Aborts the current request and deletes all scheduled requests. +

For the current request, the requestFinished() signal with the error argument TRUE is emitted. For all other requests that are +affected by the abort(), no signals are emitted. +

Since this slot also deletes the scheduled requests, there are no +requests left and the done() signal is emitted (with the error +argument TRUE). +

See also clearPendingRequests(). + +

Q_ULONG TQHttp::bytesAvailable () const +

+Returns the number of bytes that can be read from the response +content at the moment. +

See also get(), post(), request(), readyRead(), readBlock(), and readAll(). + +

void TQHttp::clearPendingRequests () +

+Deletes all pending requests from the list of scheduled requests. +This does not affect the request that is being executed. If +you want to stop this this as well, use abort(). +

See also hasPendingRequests() and abort(). + +

int TQHttp::closeConnection () +

+Closes the connection; this is useful if you have a keep-alive +connection and want to close it. +

For the requests issued with get(), post() and head(), TQHttp sets +the connection to be keep-alive. You can also do this using the +header you pass to the request() function. TQHttp only closes the +connection to the HTTP server if the response header retquires it +to do so. +

The function does not block and returns immediately. The request +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +requestStarted() and requestFinished(). +

When the request is started the requestStarted() signal is +emitted. When it is finished the requestFinished() signal is +emitted. +

If you want to close the connection immediately, you have to use +abort() instead. +

See also stateChanged(), abort(), requestStarted(), requestFinished(), and done(). + +

TQIODevice * TQHttp::currentDestinationDevice () const +

+Returns the TQIODevice pointer that is used as to store the data of the HTTP +request being executed. If there is no current request or if the request +does not store the data to an IO device, this function returns 0. +

This function can be used to delete the TQIODevice in the slot connected to +the requestFinished() signal. +

See also get(), post(), and request(). + +

int TQHttp::currentId () const +

+Returns the identifier of the HTTP request being executed or 0 if +there is no request being executed (i.e. they've all finished). +

See also currentRequest(). + +

TQHttpRequestHeader TQHttp::currentRequest () const +

+Returns the request header of the HTTP request being executed. If +the request is one issued by setHost() or closeConnection(), it +returns an invalid request header, i.e. +TQHttpRequestHeader::isValid() returns FALSE. +

See also currentId(). + +

TQIODevice * TQHttp::currentSourceDevice () const +

+Returns the TQIODevice pointer that is used as the data source of the HTTP +request being executed. If there is no current request or if the request +does not use an IO device as the data source, this function returns 0. +

This function can be used to delete the TQIODevice in the slot connected to +the requestFinished() signal. +

See also currentDestinationDevice(), post(), and request(). + +

void TQHttp::dataReadProgress ( int done, int total ) [signal] +

+ +

This signal is emitted when this object reads data from a HTTP +server to indicate the current progress of the download. +

done is the amount of data that has already arrived and total is the total amount of data. It is possible that the total +amount of data that should be transferred cannot be determined, in +which case total is 0.(If you connect to a TQProgressBar, the +progress bar shows a busy indicator if the total is 0). +

Warning: done and total are not necessarily the size in +bytes, since for large files these values might need to be +"scaled" to avoid overflow. +

See also dataSendProgress(), get(), post(), request(), and TQProgressBar::progress. + +

void TQHttp::dataSendProgress ( int done, int total ) [signal] +

+ +

This signal is emitted when this object sends data to a HTTP +server to inform it about the progress of the upload. +

done is the amount of data that has already arrived and total is the total amount of data. It is possible that the total +amount of data that should be transferred cannot be determined, in +which case total is 0.(If you connect to a TQProgressBar, the +progress bar shows a busy indicator if the total is 0). +

Warning: done and total are not necessarily the size in +bytes, since for large files these values might need to be +"scaled" to avoid overflow. +

See also dataReadProgress(), post(), request(), and TQProgressBar::progress. + +

void TQHttp::done ( bool error ) [signal] +

+ +

This signal is emitted when the last pending request has finished; +(it is emitted after the last request's requestFinished() signal). +error is TRUE if an error occurred during the processing; +otherwise error is FALSE. +

See also requestFinished(), error(), and errorString(). + +

Error TQHttp::error () const +

+Returns the last error that occurred. This is useful to find out +what happened when receiving a requestFinished() or a done() +signal with the error argument TRUE. +

If you start a new request, the error status is reset to NoError. + +

TQString TQHttp::errorString () const +

+Returns a human-readable description of the last error that +occurred. This is useful to present a error message to the user +when receiving a requestFinished() or a done() signal with the error argument TRUE. + +

int TQHttp::get ( const TQString & path, TQIODevice * to = 0 ) +

+Sends a get request for path to the server set by setHost() or +as specified in the constructor. +

path must be an absolute path like /index.html or an +absolute URI like http://www.trolltech.com/index.html. +

If the IO device to is 0 the readyRead() signal is emitted +every time new content data is available to read. +

If the IO device to is not 0, the content data of the response +is written directly to the device. Make sure that the to +pointer is valid for the duration of the operation (it is safe to +delete it when the requestFinished() signal is emitted). +

The function does not block and returns immediately. The request +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +requestStarted() and requestFinished(). +

When the request is started the requestStarted() signal is +emitted. When it is finished the requestFinished() signal is +emitted. +

See also setHost(), post(), head(), request(), requestStarted(), requestFinished(), and done(). + +

bool TQHttp::hasPendingRequests () const +

+Returns TRUE if there are any requests scheduled that have not yet +been executed; otherwise returns FALSE. +

The request that is being executed is not considered as a +scheduled request. +

See also clearPendingRequests(), currentId(), and currentRequest(). + +

int TQHttp::head ( const TQString & path ) +

+Sends a header request for path to the server set by setHost() +or as specified in the constructor. +

path must be an absolute path like /index.html or an +absolute URI like http://www.trolltech.com/index.html. +

The function does not block and returns immediately. The request +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +requestStarted() and requestFinished(). +

When the request is started the requestStarted() signal is +emitted. When it is finished the requestFinished() signal is +emitted. +

See also setHost(), get(), post(), request(), requestStarted(), requestFinished(), and done(). + +

int TQHttp::post ( const TQString & path, TQIODevice * data, TQIODevice * to = 0 ) +

+Sends a post request for path to the server set by setHost() or +as specified in the constructor. +

path must be an absolute path like /index.html or an +absolute URI like http://www.trolltech.com/index.html. +

The incoming data comes via the data IO device. +

If the IO device to is 0 the readyRead() signal is emitted +every time new content data is available to read. +

If the IO device to is not 0, the content data of the response +is written directly to the device. Make sure that the to +pointer is valid for the duration of the operation (it is safe to +delete it when the requestFinished() signal is emitted). +

The function does not block and returns immediately. The request +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +requestStarted() and requestFinished(). +

When the request is started the requestStarted() signal is +emitted. When it is finished the requestFinished() signal is +emitted. +

See also setHost(), get(), head(), request(), requestStarted(), requestFinished(), and done(). + +

int TQHttp::post ( const TQString & path, const TQByteArray & data, TQIODevice * to = 0 ) +

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

data is used as the content data of the HTTP request. + +

TQByteArray TQHttp::readAll () +

+Reads all the bytes from the response content and returns them. +

See also get(), post(), request(), readyRead(), bytesAvailable(), and readBlock(). + +

Q_LONG TQHttp::readBlock ( char * data, Q_ULONG maxlen ) +

+Reads maxlen bytes from the response content into data and +returns the number of bytes read. Returns -1 if an error occurred. +

See also get(), post(), request(), readyRead(), bytesAvailable(), and readAll(). + +

void TQHttp::readyRead ( const TQHttpResponseHeader & resp ) [signal] +

+ +

This signal is emitted when there is new response data to read. +

If you specified a device in the request where the data should be +written to, then this signal is not emitted; instead the data +is written directly to the device. +

The response header is passed in resp. +

You can read the data with the readAll() or readBlock() functions +

This signal is useful if you want to process the data in chunks as +soon as it becomes available. If you are only interested in the +complete data, just connect to the requestFinished() signal and +read the data then instead. +

See also get(), post(), request(), readAll(), readBlock(), and bytesAvailable(). + +

int TQHttp::request ( const TQHttpRequestHeader & header, TQIODevice * data = 0, TQIODevice * to = 0 ) +

+Sends a request to the server set by setHost() or as specified in +the constructor. Uses the header as the HTTP request header. +You are responsible for setting up a header that is appropriate +for your request. +

The incoming data comes via the data IO device. +

If the IO device to is 0 the readyRead() signal is emitted +every time new content data is available to read. +

If the IO device to is not 0, the content data of the response +is written directly to the device. Make sure that the to +pointer is valid for the duration of the operation (it is safe to +delete it when the requestFinished() signal is emitted). +

The function does not block and returns immediately. The request +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +requestStarted() and requestFinished(). +

When the request is started the requestStarted() signal is +emitted. When it is finished the requestFinished() signal is +emitted. +

See also setHost(), get(), post(), head(), requestStarted(), requestFinished(), and done(). + +

int TQHttp::request ( const TQHttpRequestHeader & header, const TQByteArray & data, TQIODevice * to = 0 ) +

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

data is used as the content data of the HTTP request. + +

void TQHttp::requestFinished ( int id, bool error ) [signal] +

+ +

This signal is emitted when processing the request identified by +id has finished. error is TRUE if an error occurred during +the processing; otherwise error is FALSE. +

See also requestStarted(), done(), error(), and errorString(). + +

void TQHttp::requestStarted ( int id ) [signal] +

+ +

This signal is emitted when processing the request identified by +id starts. +

See also requestFinished() and done(). + +

void TQHttp::responseHeaderReceived ( const TQHttpResponseHeader & resp ) [signal] +

+ +

This signal is emitted when the HTTP header of a server response +is available. The header is passed in resp. +

See also get(), post(), head(), request(), and readyRead(). + +

int TQHttp::setHost ( const TQString & hostname, Q_UINT16 port = 80 ) +

+Sets the HTTP server that is used for requests to hostname on +port port. +

The function does not block and returns immediately. The request +is scheduled, and its execution is performed asynchronously. The +function returns a unique identifier which is passed by +requestStarted() and requestFinished(). +

When the request is started the requestStarted() signal is +emitted. When it is finished the requestFinished() signal is +emitted. +

See also get(), post(), head(), request(), requestStarted(), requestFinished(), and done(). + +

State TQHttp::state () const +

+Returns the current state of the object. When the state changes, +the stateChanged() signal is emitted. +

See also State and stateChanged(). + +

void TQHttp::stateChanged ( int state ) [signal] +

+ +

This signal is emitted when the state of the TQHttp object changes. +The argument state is the new state of the connection; it is +one of the State values. +

This usually happens when a request is started, but it can also +happen when the server closes the connection or when a call to +closeConnection() succeeded. +

See also get(), post(), head(), request(), closeConnection(), state(), and State. + + +


+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/qhttpheader-members.html b/doc/html/qhttpheader-members.html new file mode 100644 index 00000000..72793eca --- /dev/null +++ b/doc/html/qhttpheader-members.html @@ -0,0 +1,64 @@ + + + + + +TQHttpHeader Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQHttpHeader

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhttpheader.html b/doc/html/qhttpheader.html new file mode 100644 index 00000000..fde3250f --- /dev/null +++ b/doc/html/qhttpheader.html @@ -0,0 +1,221 @@ + + + + + +TQHttpHeader Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQHttpHeader Class Reference
[network module]

+ +

The TQHttpHeader class contains header information for HTTP. +More... +

#include <qhttp.h> +

Inherited by TQHttpResponseHeader and TQHttpRequestHeader. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQHttpHeader class contains header information for HTTP. + +

+ +

In most cases you should use the more specialized derivatives of +this class, TQHttpResponseHeader and TQHttpRequestHeader, rather +than directly using TQHttpHeader. +

TQHttpHeader provides the HTTP header fields. A HTTP header field +consists of a name followed by a colon, a single space, and the +field value. (See RFC 1945.) Field names are case-insensitive. A +typical header field looks like this: +

+    content-type: text/html
+    
+ +

In the API the header field name is called the "key" and the +content is called the "value". You can get and set a header +field's value by using its key with value() and setValue(), e.g. +

+    header.setValue( "content-type", "text/html" );
+    TQString contentType = header.value( "content-type" );
+    
+ +

Some fields are so common that getters and setters are provided +for them as a convenient alternative to using value() and +setValue(), e.g. contentLength() and contentType(), +setContentLength() and setContentType(). +

Each header key has a single value associated with it. If you +set the value for a key which already exists the previous value +will be discarded. +

See also TQHttpRequestHeader, TQHttpResponseHeader, and Input/Output and Networking. + +


Member Function Documentation

+

TQHttpHeader::TQHttpHeader () +

+Constructs an empty HTTP header. + +

TQHttpHeader::TQHttpHeader ( const TQHttpHeader & header ) +

+Constructs a copy of header. + +

TQHttpHeader::TQHttpHeader ( const TQString & str ) +

+Constructs a HTTP header for str. +

This constructor parses the string str for header fields and +adds this information. The str should consist of one or more +"\r\n" delimited lines; each of these lines should have the format +key, colon, space, value. + +

TQHttpHeader::~TQHttpHeader () [virtual] +

+Destructor. + +

uint TQHttpHeader::contentLength () const +

+Returns the value of the special HTTP header field content-length. +

See also setContentLength() and hasContentLength(). + +

TQString TQHttpHeader::contentType () const +

+Returns the value of the special HTTP header field content-type. +

See also setContentType() and hasContentType(). + +

bool TQHttpHeader::hasContentLength () const +

+Returns TRUE if the header has an entry for the special HTTP +header field content-length; otherwise returns FALSE. +

See also contentLength() and setContentLength(). + +

bool TQHttpHeader::hasContentType () const +

+Returns TRUE if the header has an entry for the the special HTTP +header field content-type; otherwise returns FALSE. +

See also contentType() and setContentType(). + +

bool TQHttpHeader::hasKey ( const TQString & key ) const +

+Returns TRUE if the HTTP header has an entry with the given key; otherwise returns FALSE. +

See also value(), setValue(), and keys(). + +

bool TQHttpHeader::isValid () const +

+Returns TRUE if the HTTP header is valid; otherwise returns FALSE. +

A TQHttpHeader is invalid if it was created by parsing a malformed string. + +

TQStringList TQHttpHeader::keys () const +

+Returns a list of the keys in the HTTP header. +

See also hasKey(). + +

int TQHttpHeader::majorVersion () const [pure virtual] +

+ +

Returns the major protocol-version of the HTTP header. + +

Reimplemented in TQHttpResponseHeader and TQHttpRequestHeader. +

int TQHttpHeader::minorVersion () const [pure virtual] +

+ +

Returns the minor protocol-version of the HTTP header. + +

Reimplemented in TQHttpResponseHeader and TQHttpRequestHeader. +

TQHttpHeader & TQHttpHeader::operator= ( const TQHttpHeader & h ) +

+Assigns h and returns a reference to this http header. + +

void TQHttpHeader::removeValue ( const TQString & key ) +

+Removes the entry with the key key from the HTTP header. +

See also value() and setValue(). + +

void TQHttpHeader::setContentLength ( int len ) +

+Sets the value of the special HTTP header field content-length +to len. +

See also contentLength() and hasContentLength(). + +

void TQHttpHeader::setContentType ( const TQString & type ) +

+Sets the value of the special HTTP header field content-type to +type. +

See also contentType() and hasContentType(). + +

Example: network/archivesearch/archivedialog.ui.h. +

void TQHttpHeader::setValue ( const TQString & key, const TQString & value ) +

+Sets the value of the entry with the key to value. +

If no entry with key exists, a new entry with the given key +and value is created. If an entry with the key already +exists, its value is discarded and replaced with the given value. +

See also value(), hasKey(), and removeValue(). + +

Example: network/archivesearch/archivedialog.ui.h. +

TQString TQHttpHeader::toString () const [virtual] +

+Returns a string representation of the HTTP header. +

The string is suitable for use by the constructor that takes a +TQString. It consists of lines with the format: key, colon, space, +value, "\r\n". + +

TQString TQHttpHeader::value ( const TQString & key ) const +

+Returns the value for the entry with the given key. If no entry +has this key, an empty string is returned. +

See also setValue(), removeValue(), hasKey(), and keys(). + + +


+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/qhttprequestheader-members.html b/doc/html/qhttprequestheader-members.html new file mode 100644 index 00000000..7536b9d1 --- /dev/null +++ b/doc/html/qhttprequestheader-members.html @@ -0,0 +1,66 @@ + + + + + +TQHttpRequestHeader Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQHttpRequestHeader

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhttprequestheader.html b/doc/html/qhttprequestheader.html new file mode 100644 index 00000000..fcb2ab3a --- /dev/null +++ b/doc/html/qhttprequestheader.html @@ -0,0 +1,157 @@ + + + + + +TQHttpRequestHeader Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQHttpRequestHeader Class Reference
[network module]

+ +

The TQHttpRequestHeader class contains request header information for + +HTTP. +More... +

#include <qhttp.h> +

Inherits TQHttpHeader. +

List of all member functions. +

Public Members

+ +

Important Inherited Members

+
    +
  • TQString value ( const TQString & key ) const
  • +
  • void setValue ( const TQString & key, const TQString & value )
  • +
+

Detailed Description

+ + +The TQHttpRequestHeader class contains request header information for + +HTTP. + +

+ +

This class is used in the TQHttp class to report the header +information if the client requests something from the server. +

HTTP requests have a method which describes the request's action. +The most common requests are "GET" and "POST". In addition to the +request method the header also includes a request-URI to specify +the location for the method to use. +

The method, request-URI and protocol-version can be set using a +constructor or later using setRequest(). The values can be +obtained using method(), path(), majorVersion() and +minorVersion(). +

This class is a TQHttpHeader subclass so that class's functions, +e.g. setValue(), value(), etc. are also available. +

See also TQHttpResponseHeader, TQHttp, and Input/Output and Networking. + +

+


Member Function Documentation

+

TQHttpRequestHeader::TQHttpRequestHeader () +

+Constructs an empty HTTP request header. + +

TQHttpRequestHeader::TQHttpRequestHeader ( const TQString & method, const TQString & path, int majorVer = 1, int minorVer = 1 ) +

+Constructs a HTTP request header for the method method, the +request-URI path and the protocol-version majorVer and minorVer. + +

TQHttpRequestHeader::TQHttpRequestHeader ( const TQHttpRequestHeader & header ) +

+Constructs a copy of header. + +

TQHttpRequestHeader::TQHttpRequestHeader ( const TQString & str ) +

+Constructs a HTTP request header from the string str. The str should consist of one or more "\r\n" delimited lines; the first line +should be the request-line (format: method, space, request-URI, space +HTTP-version); each of the remaining lines should have the format key, +colon, space, value. + +

int TQHttpRequestHeader::majorVersion () const [virtual] +

+Returns the major protocol-version of the HTTP request header. +

See also minorVersion(), method(), path(), and setRequest(). + +

Reimplemented from TQHttpHeader. +

TQString TQHttpRequestHeader::method () const +

+Returns the method of the HTTP request header. +

See also path(), majorVersion(), minorVersion(), and setRequest(). + +

int TQHttpRequestHeader::minorVersion () const [virtual] +

+Returns the minor protocol-version of the HTTP request header. +

See also majorVersion(), method(), path(), and setRequest(). + +

Reimplemented from TQHttpHeader. +

TQString TQHttpRequestHeader::path () const +

+Returns the request-URI of the HTTP request header. +

See also method(), majorVersion(), minorVersion(), and setRequest(). + +

void TQHttpRequestHeader::setRequest ( const TQString & method, const TQString & path, int majorVer = 1, int minorVer = 1 ) +

+This function sets the request method to method, the +request-URI to path and the protocol-version to majorVer and +minorVer. +

See also method(), path(), majorVersion(), and minorVersion(). + +

void TQHttpHeader::setValue ( const TQString & key, const TQString & value ) +

+Sets the value of the entry with the key to value. +

If no entry with key exists, a new entry with the given key +and value is created. If an entry with the key already +exists, its value is discarded and replaced with the given value. +

See also value(), hasKey(), and removeValue(). + +

Example: network/archivesearch/archivedialog.ui.h. +

TQString TQHttpHeader::value ( const TQString & key ) const +

+Returns the value for the entry with the given key. If no entry +has this key, an empty string is returned. +

See also setValue(), removeValue(), hasKey(), and keys(). + + +


+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/qhttpresponseheader-members.html b/doc/html/qhttpresponseheader-members.html new file mode 100644 index 00000000..0f2669f7 --- /dev/null +++ b/doc/html/qhttpresponseheader-members.html @@ -0,0 +1,64 @@ + + + + + +TQHttpResponseHeader Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQHttpResponseHeader

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qhttpresponseheader.html b/doc/html/qhttpresponseheader.html new file mode 100644 index 00000000..34baacee --- /dev/null +++ b/doc/html/qhttpresponseheader.html @@ -0,0 +1,106 @@ + + + + + +TQHttpResponseHeader Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQHttpResponseHeader Class Reference
[network module]

+ +

The TQHttpResponseHeader class contains response header information for HTTP. +More... +

#include <qhttp.h> +

Inherits TQHttpHeader. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQHttpResponseHeader class contains response header information for HTTP. + +

+ +

This class is used by the TQHttp class to report the header +information that the client received from the server. +

HTTP responses have a status code that indicates the status of the +response. This code is a 3-digit integer result code (for details +see to RFC 1945). In addition to the status code, you can also +specify a human-readable text that describes the reason for the +code ("reason phrase"). This class allows you to get the status +code and the reason phrase. +

See also TQHttpRequestHeader, TQHttp, and Input/Output and Networking. + +


Member Function Documentation

+

TQHttpResponseHeader::TQHttpResponseHeader () +

+Constructs an empty HTTP response header. + +

TQHttpResponseHeader::TQHttpResponseHeader ( const TQHttpResponseHeader & header ) +

+Constructs a copy of header. + +

int TQHttpResponseHeader::majorVersion () const [virtual] +

+Returns the major protocol-version of the HTTP response header. +

See also minorVersion(), statusCode(), and reasonPhrase(). + +

Reimplemented from TQHttpHeader. +

int TQHttpResponseHeader::minorVersion () const [virtual] +

+Returns the minor protocol-version of the HTTP response header. +

See also majorVersion(), statusCode(), and reasonPhrase(). + +

Reimplemented from TQHttpHeader. +

TQString TQHttpResponseHeader::reasonPhrase () const +

+Returns the reason phrase of the HTTP response header. +

See also statusCode(), majorVersion(), and minorVersion(). + +

int TQHttpResponseHeader::statusCode () const +

+Returns the status code of the HTTP response header. +

See also reasonPhrase(), majorVersion(), and minorVersion(). + + +


+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/qicondrag-members.html b/doc/html/qicondrag-members.html new file mode 100644 index 00000000..758d5613 --- /dev/null +++ b/doc/html/qicondrag-members.html @@ -0,0 +1,105 @@ + + + + + +TQIconDrag Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIconDrag

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qicondrag.html b/doc/html/qicondrag.html new file mode 100644 index 00000000..d15e6f74 --- /dev/null +++ b/doc/html/qicondrag.html @@ -0,0 +1,124 @@ + + + + + +TQIconDrag Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIconDrag Class Reference
[iconview module]

+ +

The TQIconDrag class supports drag and drop operations +within a TQIconView. +More... +

#include <qiconview.h> +

Inherits TQDragObject. +

List of all member functions. +

Public Members

+
    +
  • TQIconDrag ( TQWidget * dragSource, const char * name = 0 )
  • +
  • virtual ~TQIconDrag ()
  • +
  • void append ( const TQIconDragItem & i, const TQRect & pr, const TQRect & tr )
  • +
  • virtual TQByteArray encodedData ( const char * mime ) const
  • +
+

Static Public Members

+ +

Detailed Description

+ + +

The TQIconDrag class supports drag and drop operations +within a TQIconView. +

+ +

A TQIconDrag object is used to maintain information about the +positions of dragged items and the data associated with the +dragged items. TQIconViews are able to use this information to +paint the dragged items in the correct positions. Internally +TQIconDrag stores the data associated with drag items in +TQIconDragItem objects. +

If you want to use the extended drag-and-drop functionality of +TQIconView, create a TQIconDrag object in a reimplementation of +TQIconView::dragObject(). Then create a TQIconDragItem for each item +which should be dragged, set the data it represents with +TQIconDragItem::setData(), and add each TQIconDragItem to the drag +object using append(). +

The data in TQIconDragItems is stored in a TQByteArray and is +mime-typed (see TQMimeSource and the +Drag and Drop +overview). If you want to use your own mime-types derive a class +from TQIconDrag and reimplement format(), encodedData() and +canDecode(). +

The fileiconview example program demonstrates the use of the +TQIconDrag class including subclassing and reimplementing +dragObject(), format(), encodedData() and canDecode(). See the files +qt/examples/fileiconview/qfileiconview.h and +qt/examples/fileiconview/qfileiconview.cpp. +

See also TQMimeSource::format() and Drag And Drop Classes. + +


Member Function Documentation

+

TQIconDrag::TQIconDrag ( TQWidget * dragSource, const char * name = 0 ) +

+Constructs a drag object called name, which is a child of dragSource. +

Note that the drag object will be deleted when dragSource is deleted. + +

TQIconDrag::~TQIconDrag () [virtual] +

+Destructor. + +

void TQIconDrag::append ( const TQIconDragItem & i, const TQRect & pr, const TQRect & tr ) +

+Append the TQIconDragItem, i, to the TQIconDrag object's list of +items. You must also supply the geometry of the pixmap, pr, and +the textual caption, tr. +

See also TQIconDragItem. + +

Example: fileiconview/qfileiconview.cpp. +

bool TQIconDrag::canDecode ( TQMimeSource * e ) [static] +

+Returns TRUE if e can be decoded by the TQIconDrag, otherwise +return FALSE. + +

Example: fileiconview/qfileiconview.cpp. +

TQByteArray TQIconDrag::encodedData ( const char * mime ) const [virtual] +

+Returns the encoded data of the drag object if mime is +application/x-qiconlist. + +

Example: fileiconview/qfileiconview.cpp. +

Reimplemented from TQMimeSource. + +


+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/qicondragevent-members.html b/doc/html/qicondragevent-members.html new file mode 100644 index 00000000..60598be3 --- /dev/null +++ b/doc/html/qicondragevent-members.html @@ -0,0 +1,52 @@ + + + + + +TQIconDragEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIconDragEvent

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qicondragevent.html b/doc/html/qicondragevent.html new file mode 100644 index 00000000..117a605f --- /dev/null +++ b/doc/html/qicondragevent.html @@ -0,0 +1,99 @@ + + + + + +TQIconDragEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIconDragEvent Class Reference

+ +

The TQIconDragEvent class signals that a main icon drag has begun. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQIconDragEvent class signals that a main icon drag has begun. +

+

Icon drag events are sent to widgets when the main icon of a window has been dragged away. +On Mac OS X this is fired when the proxy icon of a window is dragged off titlebar, in response to +this event is is normal to begin using drag and drop. +

See also Event Classes. + +


Member Function Documentation

+

TQIconDragEvent::TQIconDragEvent () +

+ +

Constructs an icon drag event object with the accept parameter +flag set to FALSE. +

See also accept(). + +

void TQIconDragEvent::accept () +

+ +

Sets the accept flag of the icon drag event object. +

Setting the accept flag indicates that the receiver of this event +has started a drag and drop oeration. +

The accept flag is not set by default. +

See also ignore() and TQWidget::hide(). + +

void TQIconDragEvent::ignore () +

+ +

Clears the accept flag of the icon drag object. +

Clearing the accept flag indicates that the receiver of this event +has not handled the icon drag as a result other events can be sent. +

The icon drag event is constructed with the accept flag cleared. +

See also accept(). + +

bool TQIconDragEvent::isAccepted () const +

+ +

Returns TRUE if the receiver of the event has started a drag and +drop operation; otherwise returns FALSE. +

See also accept() and ignore(). + + +


+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/qicondragitem-members.html b/doc/html/qicondragitem-members.html new file mode 100644 index 00000000..151120e8 --- /dev/null +++ b/doc/html/qicondragitem-members.html @@ -0,0 +1,50 @@ + + + + + +TQIconDragItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIconDragItem

+ +

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

+ +


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

TQIconDragItem Class Reference
[iconview module]

+ +

The TQIconDragItem class encapsulates a drag item. +More... +

#include <qiconview.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +

The TQIconDragItem class encapsulates a drag item. +

+

The TQIconDrag class uses a list of TQIconDragItems to support drag +and drop operations. +

In practice a TQIconDragItem object (or an object of a class derived +from TQIconDragItem) is created for each icon view item which is +dragged. Each of these TQIconDragItems is stored in a TQIconDrag +object. +

See TQIconView::dragObject() for more information. +

See the fileiconview/qfileiconview.cpp and +iconview/simple_dd/main.cpp examples. +

See also Drag And Drop Classes. + +


Member Function Documentation

+

TQIconDragItem::TQIconDragItem () +

+Constructs a TQIconDragItem with no data. + +

TQIconDragItem::~TQIconDragItem () [virtual] +

+Destructor. + +

TQByteArray TQIconDragItem::data () const [virtual] +

+Returns the data contained in the TQIconDragItem. + +

void TQIconDragItem::setData ( const TQByteArray & d ) [virtual] +

+Sets the data for the TQIconDragItem to the data stored in the +TQByteArray d. + +

Example: fileiconview/qfileiconview.cpp. + +


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


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qiconfactory-members.html b/doc/html/qiconfactory-members.html new file mode 100644 index 00000000..ff657774 --- /dev/null +++ b/doc/html/qiconfactory-members.html @@ -0,0 +1,53 @@ + + + + + +TQIconFactory Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIconFactory

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qiconfactory.html b/doc/html/qiconfactory.html new file mode 100644 index 00000000..d8ac8d85 --- /dev/null +++ b/doc/html/qiconfactory.html @@ -0,0 +1,112 @@ + + + + + +TQIconFactory Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIconFactory Class Reference

+ +

The TQIconFactory class is used to create pixmaps for a TQIconSet. +More... +

#include <qiconset.h> +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Detailed Description

+ + +The TQIconFactory class is used to create pixmaps for a TQIconSet. +

By reimplementing createPixmap(), you can override TQIconSet's +default algorithm for computing pixmaps not supplied by the user. +

Call setAutoDelete(TRUE) if you want the factory to automatically +delete itself when it is no longer needed by TQIconSet. +

See also TQIconSet and Advanced Widgets. + +


Member Function Documentation

+

TQIconFactory::TQIconFactory () +

+Constructs an icon factory. + +

TQIconFactory::~TQIconFactory () [virtual] +

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

bool TQIconFactory::autoDelete () const +

+ +

Returns TRUE if auto-deletion is enabled; otherwise returns FALSE. +

See also setAutoDelete(). + +

TQPixmap * TQIconFactory::createPixmap ( const TQIconSet & iconSet, TQIconSet::Size size, TQIconSet::Mode mode, TQIconSet::State state ) [virtual] +

+Ceates a pixmap for iconSet with a certain size, mode, and +state. Returns 0 if the default TQIconSet algorithm should be +used to create a pixmap that wasn't supplied by the user. +

It is the caller's responsibility to delete the returned pixmap. +

The default implementation always returns 0. + +

TQIconFactory * TQIconFactory::defaultFactory () [static] +

+Returns the default icon factory. +

See also installDefaultFactory(). + +

void TQIconFactory::installDefaultFactory ( TQIconFactory * factory ) [static] +

+Replaces the default icon factory with factory. + +

void TQIconFactory::setAutoDelete ( bool autoDelete ) +

+ +

If autoDelete is TRUE, sets the icon factory to automatically +delete itself when it is no longer referenced by any TQIconSet and +isn't the default factory. If autoDelete is FALSE (the default) +auto-deletion is disabled. +

See also autoDelete() and defaultFactory(). + + +


+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/qiconset-h.html b/doc/html/qiconset-h.html new file mode 100644 index 00000000..6fb45c52 --- /dev/null +++ b/doc/html/qiconset-h.html @@ -0,0 +1,177 @@ + + + + + +qiconset.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qiconset.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qiconset.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQIconSet class
+**
+** Created : 980318
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQICONSET_H
+#define TQICONSET_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qpixmap.h"
+#endif // QT_H
+
+#ifndef QT_NO_ICONSET
+
+class TQIconFactory;
+class TQIconSetPrivate;
+
+// ### Remove all 'virtual' functions in TQIconSet (but not TQIconFactory) in TQt 4.0
+class Q_EXPORT TQIconSet
+{
+public:
+    // the implementation makes assumptions about the value of these
+    enum Size { Automatic, Small, Large };
+    enum Mode { Normal, Disabled, Active };
+    enum State { On, Off };
+
+    TQIconSet();
+    TQIconSet( const TQPixmap& pixmap, Size size = Automatic );
+    TQIconSet( const TQPixmap& smallPix, const TQPixmap& largePix );
+    TQIconSet( const TQIconSet& other );
+    virtual ~TQIconSet();
+
+    void reset( const TQPixmap& pixmap, Size size );
+
+    virtual void setPixmap( const TQPixmap& pixmap, Size size,
+			    Mode mode = Normal, State state = Off );
+    virtual void setPixmap( const TQString& fileName, Size size,
+			    Mode mode = Normal, State state = Off );
+    TQPixmap pixmap( Size size, Mode mode, State state = Off ) const;
+    TQPixmap pixmap( Size size, bool enabled, State state = Off ) const;
+    TQPixmap pixmap() const;
+    bool isGenerated( Size size, Mode mode, State state = Off ) const;
+    void clearGenerated();
+    void installIconFactory( TQIconFactory *factory );
+
+    bool isNull() const;
+
+    void detach();
+
+    TQIconSet& operator=( const TQIconSet& other );
+
+    // static functions
+    static void setIconSize( Size which, const TQSize& size );
+    static const TQSize& iconSize( Size which );
+
+#ifndef Q_QDOC
+    Q_DUMMY_COMPARISON_OPERATOR(TQIconSet)
+#endif
+
+private:
+    void normalize( Size& which, const TQSize& pixSize );
+    TQPixmap *createScaled( Size size, const TQPixmap *suppliedPix ) const;
+    TQPixmap *createDisabled( Size size, State state ) const;
+
+    TQIconSetPrivate *d;
+};
+
+class Q_EXPORT TQIconFactory : private TQShared
+{
+public:
+    TQIconFactory();
+    virtual ~TQIconFactory();
+
+    virtual TQPixmap *createPixmap( const TQIconSet& iconSet, TQIconSet::Size size,
+				   TQIconSet::Mode mode, TQIconSet::State state );
+    void setAutoDelete( bool autoDelete ) { autoDel = autoDelete; }
+    bool autoDelete() const { return autoDel; }
+
+    static TQIconFactory *defaultFactory();
+    static void installDefaultFactory( TQIconFactory *factory );
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQIconFactory( const TQIconFactory & );
+    TQIconFactory &operator=( const TQIconFactory & );
+#endif
+
+    friend class TQIconSet;
+    friend class TQIconSetPrivate;
+
+    uint autoDel : 1;
+    uint unused : 31;
+};
+
+#endif // QT_NO_ICONSET
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qiconset-members.html b/doc/html/qiconset-members.html new file mode 100644 index 00000000..03fee4c9 --- /dev/null +++ b/doc/html/qiconset-members.html @@ -0,0 +1,59 @@ + + + + + +TQIconSet Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIconSet

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qiconset.html b/doc/html/qiconset.html new file mode 100644 index 00000000..2389f062 --- /dev/null +++ b/doc/html/qiconset.html @@ -0,0 +1,328 @@ + + + + + +TQIconSet Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIconSet Class Reference

+ +

The TQIconSet class provides a set of icons with different +styles and sizes. +More... +

#include <qiconset.h> +

List of all member functions. +

Public Members

+
    +
  • enum Size { Automatic, Small, Large }
  • +
  • enum Mode { Normal, Disabled, Active }
  • +
  • enum State { On, Off }
  • +
  • TQIconSet ()
  • +
  • TQIconSet ( const TQPixmap & pixmap, Size size = Automatic )
  • +
  • TQIconSet ( const TQPixmap & smallPix, const TQPixmap & largePix )
  • +
  • TQIconSet ( const TQIconSet & other )
  • +
  • virtual ~TQIconSet ()
  • +
  • void reset ( const TQPixmap & pixmap, Size size )
  • +
  • virtual void setPixmap ( const TQPixmap & pixmap, Size size, Mode mode = Normal, State state = Off )
  • +
  • virtual void setPixmap ( const TQString & fileName, Size size, Mode mode = Normal, State state = Off )
  • +
  • TQPixmap pixmap ( Size size, Mode mode, State state = Off ) const
  • +
  • TQPixmap pixmap ( Size size, bool enabled, State state = Off ) const  (obsolete)
  • +
  • TQPixmap pixmap () const
  • +
  • bool isGenerated ( Size size, Mode mode, State state = Off ) const
  • +
  • void clearGenerated ()
  • +
  • void installIconFactory ( TQIconFactory * factory )
  • +
  • bool isNull () const
  • +
  • void detach ()
  • +
  • TQIconSet & operator= ( const TQIconSet & other )
  • +
+

Static Public Members

+
    +
  • void setIconSize ( Size which, const TQSize & size )
  • +
  • const TQSize & iconSize ( Size which )
  • +
+

Detailed Description

+ +

The TQIconSet class provides a set of icons with different +styles and sizes. +

+ + + +

A TQIconSet can generate smaller, larger, active, and disabled pixmaps +from the set of icons it is given. Such pixmaps are used by +TQToolButton, TQHeader, TQPopupMenu, etc. to show an icon representing a +particular action. +

The simplest use of TQIconSet is to create one from a TQPixmap and then +use it, allowing TQt to work out all the retquired icon styles and +sizes. For example: +

+    TQToolButton *but = new TQToolButton( TQIconSet( TQPixmap("open.xpm") ), ... );
+  
+ +

Using whichever pixmaps you specify as a base, TQIconSet provides a +set of six icons, each with a Size and a Mode: Small Normal, +Small Disabled, Small Active, Large Normal, Large Disabled, and +Large Active. +

An additional set of six icons can be provided for widgets that have +an "On" or "Off" state, like checkable menu items or toggleable +toolbuttons. If you provide pixmaps for the "On" state, but not for +the "Off" state, the TQIconSet will provide the "Off" pixmaps. You may +specify icons for both states in you wish. +

You can set any of the icons using setPixmap(). +

When you retrieve a pixmap using pixmap(Size, Mode, State), +TQIconSet will return the icon that has been set or previously +generated for that size, mode and state combination. If none is +available, TQIconSet will ask the icon factory. If the icon factory +cannot provide any (the default), TQIconSet generates a pixmap based +on the pixmaps it has been given and returns it. +

The Disabled appearance is computed using an algorithm that +produces results very similar to those used in Microsoft Windows +95. The Active appearance is identical to the Normal +appearance unless you use setPixmap() to set it to something +special. +

When scaling icons, TQIconSet uses smooth scaling, which can partially blend the color component +of pixmaps. If the results look poor, the best solution +is to supply pixmaps in both large and small sizes. +

You can use the static function setIconSize() to set the preferred +size of the generated large/small icons. The default small size is +22 x 22, while the default large size is 32 x 32. These sizes only +affect generated icons. +

The isGenerated() function returns TRUE if an icon was generated by +TQIconSet or by a factory; clearGenerated() clears all cached +pixmaps. +

Making Classes that Use TQIconSet +

+

If you write your own widgets that have an option to set a small +pixmap, consider allowing a TQIconSet to be set for that pixmap. The +TQt class TQToolButton is an example of such a widget. +

Provide a method to set a TQIconSet, and when you draw the icon, choose +whichever icon is appropriate for the current state of your widget. +For example: +

+    void MyWidget::drawIcon( TQPainter* p, TQPoint pos )
+    {
+        p->drawPixmap( pos, icons->pixmap(
+                                TQIconSet::Small,
+                                isEnabled() ? TQIconSet::Normal :
+                                              TQIconSet::Disabled,
+                                isEnabled() ? TQIconSet::On :
+                                              TQIconSet::Off));
+    }
+  
+ +

You might also make use of the Active mode, perhaps making your +widget Active when the mouse is over the widget (see TQWidget::enterEvent()), while the mouse is pressed pending the +release that will activate the function, or when it is the currently +selected item. If the widget can be toggled, the "On" mode might be +used to draw a different icon. +

TQIconSet
+

See also TQIconFactory, TQPixmap, TQMainWindow::usesBigPixmaps, GUI Design Handbook: Iconic Label, Graphics Classes, Image Processing Classes, and Implicitly and Explicitly Shared Classes. + +


Member Type Documentation

+

TQIconSet::Mode

+ +

This enum type describes the mode for which a pixmap is intended to be +used. +The currently defined modes are: +

    +
  • TQIconSet::Normal - +Display the pixmap when the user is +not interacting with the icon, but the +functionality represented by the icon is available. +
  • TQIconSet::Disabled - +Display the pixmap when the +functionality represented by the icon is not available. +
  • TQIconSet::Active - +Display the pixmap when the +functionality represented by the icon is available and +the user is interacting with the icon, for example, moving the +mouse over it or clicking it. +
+

TQIconSet::Size

+ +

This enum type describes the size at which a pixmap is intended to be +used. +The currently defined sizes are: +

    +
  • TQIconSet::Automatic - The size of the pixmap is determined from its +pixel size. This is a useful default. +
  • TQIconSet::Small - The pixmap is the smaller of two. +
  • TQIconSet::Large - The pixmap is the larger of two. +

If a Small pixmap is not set by TQIconSet::setPixmap(), the Large +pixmap will be automatically scaled down to the size of a small pixmap +to generate the Small pixmap when retquired. Similarly, a Small pixmap +will be automatically scaled up to generate a Large pixmap. The +preferred sizes for large/small generated icons can be set using +setIconSize(). +

See also setIconSize(), iconSize(), setPixmap(), pixmap(), and TQMainWindow::usesBigPixmaps. + +

TQIconSet::State

+ +

This enum describes the state for which a pixmap is intended to be +used. The state can be: +

    +
  • TQIconSet::Off - Display the pixmap when the widget is in an "off" state +
  • TQIconSet::On - Display the pixmap when the widget is in an "on" state +

See also setPixmap() and pixmap(). + +


Member Function Documentation

+

TQIconSet::TQIconSet () +

+Constructs a null icon set. +

See also setPixmap() and reset(). + +

TQIconSet::TQIconSet ( const TQPixmap & pixmap, Size size = Automatic ) +

+Constructs an icon set for which the Normal pixmap is pixmap, +which is assumed to be of size size. +

The default for size is Automatic, which means that TQIconSet +will determine whether the pixmap is Small or Large from its pixel +size. Pixmaps less than the width of a small generated icon are +considered to be Small. You can use setIconSize() to set the +preferred size of a generated icon. +

See also setIconSize() and reset(). + +

TQIconSet::TQIconSet ( const TQPixmap & smallPix, const TQPixmap & largePix ) +

Creates an iconset which uses the pixmap smallPix for for +displaying a small icon, and the pixmap largePix for displaying a +large icon. + +

TQIconSet::TQIconSet ( const TQIconSet & other ) +

+Constructs a copy of other. This is very fast. + +

TQIconSet::~TQIconSet () [virtual] +

+Destroys the icon set and frees any allocated resources. + +

void TQIconSet::clearGenerated () +

+Clears all cached pixmaps, including those obtained from an +eventual TQIconFactory. + +

void TQIconSet::detach () +

+Detaches this icon set from others with which it may share data. +

You will never need to call this function; other TQIconSet functions +call it as necessary. + +

const TQSize & TQIconSet::iconSize ( Size which ) [static] +

+If which is Small, returns the preferred size of a small +generated icon; if which is Large, returns the preferred size +of a large generated icon. +

See also setIconSize(). + +

void TQIconSet::installIconFactory ( TQIconFactory * factory ) +

+Installs factory as the icon factory for this iconset. The +icon factory is used to generates pixmaps not set by the user. +

If no icon factory is installed, TQIconFactory::defaultFactory() +is used. + +

bool TQIconSet::isGenerated ( Size size, Mode mode, State state = Off ) const +

+Returns TRUE if the pixmap with size size, mode mode and +state state is generated from other pixmaps; otherwise returns +FALSE. +

A pixmap obtained from a TQIconFactory is considered non-generated. + +

bool TQIconSet::isNull () const +

+Returns TRUE if the icon set is empty; otherwise returns FALSE. + +

TQIconSet & TQIconSet::operator= ( const TQIconSet & other ) +

+Assigns other to this icon set and returns a reference to this +icon set. +

See also detach(). + +

TQPixmap TQIconSet::pixmap ( Size size, Mode mode, State state = Off ) const +

+Returns a pixmap with size size, mode mode and state state, generating one if necessary. Generated pixmaps are cached. + +

TQPixmap TQIconSet::pixmap ( Size size, bool enabled, State state = Off ) const +

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

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

This is the same as pixmap(size, enabled, state). + +

TQPixmap TQIconSet::pixmap () const +

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

Returns the pixmap originally provided to the constructor or to +reset(). This is the Normal pixmap of unspecified Size. +

See also reset(). + +

void TQIconSet::reset ( const TQPixmap & pixmap, Size size ) +

+Sets this icon set to use pixmap pixmap for the Normal pixmap, +assuming it to be of size size. +

This is equivalent to assigning TQIconSet(pixmap, size) to this +icon set. +

This function does nothing if pixmap is a null pixmap. + +

void TQIconSet::setIconSize ( Size which, const TQSize & size ) [static] +

+Set the preferred size for all small or large icons that are +generated after this call. If which is Small, sets the preferred +size of small generated icons to size. Similarly, if which is +Large, sets the preferred size of large generated icons to size. +

Note that cached icons will not be regenerated, so it is recommended +that you set the preferred icon sizes before generating any icon sets. +Also note that the preferred icon sizes will be ignored for icon sets +that have been created using both small and large pixmaps. +

See also iconSize(). + +

void TQIconSet::setPixmap ( const TQPixmap & pixmap, Size size, Mode mode = Normal, State state = Off ) [virtual] +

+Sets this icon set to provide pixmap pixmap for size size, mode mode and state state. The icon set may also use pixmap for +generating other pixmaps if they are not explicitly set. +

The size can be one of Automatic, Large or Small. If Automatic is +used, TQIconSet will determine if the pixmap is Small or Large from its +pixel size. +

Pixmaps less than the width of a small generated icon are +considered to be Small. You can use setIconSize() to set the preferred +size of a generated icon. +

This function does nothing if pixmap is a null pixmap. +

See also reset(). + +

void TQIconSet::setPixmap ( const TQString & fileName, Size size, Mode mode = Normal, State state = Off ) [virtual] +

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

The pixmap is loaded from fileName when it becomes necessary. + + +


+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/qiconview-h.html b/doc/html/qiconview-h.html new file mode 100644 index 00000000..5dc5eb20 --- /dev/null +++ b/doc/html/qiconview-h.html @@ -0,0 +1,559 @@ + + + + + +qiconview.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qiconview.h

+ +

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


+
+/****************************************************************************
+** $Id: qt/qiconview.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQIconView widget class
+**
+** Created : 990707
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the iconview 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 retquirements 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 TQICONVIEW_H
+#define TQICONVIEW_H
+
+#ifndef QT_H
+#include "qscrollview.h"
+#include "qstring.h"
+#include "qrect.h"
+#include "qpoint.h"
+#include "qsize.h"
+#include "qfont.h" // TQString->TQFont conversion
+#include "qdragobject.h"
+#include "qbitmap.h"
+#include "qpicture.h"
+#endif // QT_H
+
+#ifndef QT_NO_ICONVIEW
+
+#if !defined( QT_MODULE_ICONVIEW ) || defined( QT_INTERNAL_ICONVIEW )
+#define TQM_EXPORT_ICONVIEW
+#else
+#define TQM_EXPORT_ICONVIEW Q_EXPORT
+#endif
+
+class TQIconView;
+class TQPainter;
+class TQMimeSource;
+class TQMouseEvent;
+class TQDragEnterEvent;
+class TQDragMoveEvent;
+class TQDragLeaveEvent;
+class TQKeyEvent;
+class TQFocusEvent;
+class TQShowEvent;
+class TQIconViewItem;
+class TQIconViewItemLineEdit;
+class TQStringList;
+class TQIconDragPrivate;
+
+#ifndef QT_NO_DRAGANDDROP
+
+class TQM_EXPORT_ICONVIEW TQIconDragItem
+{
+public:
+    TQIconDragItem();
+    virtual ~TQIconDragItem();
+    virtual TQByteArray data() const;
+    virtual void setData( const TQByteArray &d );
+    bool operator== ( const TQIconDragItem& ) const;
+
+private:
+    TQByteArray ba;
+
+};
+
+class TQM_EXPORT_ICONVIEW TQIconDrag : public TQDragObject
+{
+    Q_OBJECT
+public:
+    TQIconDrag( TQWidget * dragSource, const char* name = 0 );
+    virtual ~TQIconDrag();
+
+    void append( const TQIconDragItem &item, const TQRect &pr, const TQRect &tr );
+
+    virtual const char* format( int i ) const;
+    static bool canDecode( TQMimeSource* e );
+    virtual TQByteArray encodedData( const char* mime ) const;
+
+private:
+    TQIconDragPrivate *d;
+    TQChar endMark;
+
+    friend class TQIconView;
+    friend class TQIconViewPrivate;
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQIconDrag( const TQIconDrag & );
+    TQIconDrag &operator=( const TQIconDrag & );
+#endif
+};
+
+#endif
+
+class TQIconViewToolTip;
+class TQIconViewItemPrivate;
+
+class TQM_EXPORT_ICONVIEW TQIconViewItem : public TQt
+{
+    friend class TQIconView;
+    friend class TQIconViewToolTip;
+    friend class TQIconViewItemLineEdit;
+
+public:
+    TQIconViewItem( TQIconView *parent );
+    TQIconViewItem( TQIconView *parent, TQIconViewItem *after );
+    TQIconViewItem( TQIconView *parent, const TQString &text );
+    TQIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text );
+    TQIconViewItem( TQIconView *parent, const TQString &text, const TQPixmap &icon );
+    TQIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text, const TQPixmap &icon );
+#ifndef QT_NO_PICTURE
+    TQIconViewItem( TQIconView *parent, const TQString &text, const TQPicture &picture );
+    TQIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text, const TQPicture &picture );
+#endif
+    virtual ~TQIconViewItem();
+
+    virtual void setRenameEnabled( bool allow );
+    virtual void setDragEnabled( bool allow );
+    virtual void setDropEnabled( bool allow );
+
+    virtual TQString text() const;
+    virtual TQPixmap *pixmap() const;
+#ifndef QT_NO_PICTURE
+    virtual TQPicture *picture() const;
+#endif
+    virtual TQString key() const;
+
+    bool renameEnabled() const;
+    bool dragEnabled() const;
+    bool dropEnabled() const;
+
+    TQIconView *iconView() const;
+    TQIconViewItem *prevItem() const;
+    TQIconViewItem *nextItem() const;
+
+    int index() const;
+
+    virtual void setSelected( bool s, bool cb );
+    virtual void setSelected( bool s );
+    virtual void setSelectable( bool s );
+
+    bool isSelected() const;
+    bool isSelectable() const;
+
+    virtual void repaint();
+
+    virtual bool move( int x, int y );
+    virtual void moveBy( int dx, int dy );
+    virtual bool move( const TQPoint &pnt );
+    virtual void moveBy( const TQPoint &pnt );
+
+    TQRect rect() const;
+    int x() const;
+    int y() const;
+    int width() const;
+    int height() const;
+    TQSize size() const;
+    TQPoint pos() const;
+    TQRect textRect( bool relative = TRUE ) const;
+    TQRect pixmapRect( bool relative = TRUE ) const;
+    bool contains( const TQPoint& pnt ) const;
+    bool intersects( const TQRect& r ) const;
+
+    virtual bool acceptDrop( const TQMimeSource *mime ) const;
+
+#ifndef QT_NO_TEXTEDIT
+    void rename();
+#endif
+
+    virtual int compare( TQIconViewItem *i ) const;
+
+    virtual void setText( const TQString &text );
+    virtual void setPixmap( const TQPixmap &icon );
+#ifndef QT_NO_PICTURE
+    virtual void setPicture( const TQPicture &icon );
+#endif
+    virtual void setText( const TQString &text, bool recalc, bool redraw = TRUE );
+    virtual void setPixmap( const TQPixmap &icon, bool recalc, bool redraw = TRUE );
+    virtual void setKey( const TQString &k );
+
+    virtual int rtti() const;
+    static int RTTI;
+
+protected:
+#ifndef QT_NO_TEXTEDIT
+    virtual void removeRenameBox();
+#endif
+    virtual void calcRect( const TQString &text_ = TQString::null );
+    virtual void paintItem( TQPainter *p, const TQColorGroup &cg );
+    virtual void paintFocus( TQPainter *p, const TQColorGroup &cg );
+#ifndef QT_NO_DRAGANDDROP
+    virtual void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> &lst );
+#endif
+    virtual void dragEntered();
+    virtual void dragLeft();
+    void setItemRect( const TQRect &r );
+    void setTextRect( const TQRect &r );
+    void setPixmapRect( const TQRect &r );
+    void calcTmpText();
+    TQString tempText() const;
+
+private:
+    void init( TQIconViewItem *after = 0
+#ifndef QT_NO_PICTURE
+	       , TQPicture *pic = 0
+#endif
+	       );
+#ifndef QT_NO_TEXTEDIT
+    void renameItem();
+    void cancelRenameItem();
+#endif
+    void checkRect();
+
+    TQIconView *view;
+    TQString itemText, itemKey;
+    TQString tmpText;
+    TQPixmap *itemIcon;
+#ifndef QT_NO_PICTURE
+    TQPicture *itemPic;
+#endif
+    TQIconViewItem *prev, *next;
+    uint allow_rename : 1;
+    uint allow_drag : 1;
+    uint allow_drop : 1;
+    uint selected : 1;
+    uint selectable : 1;
+    uint dirty : 1;
+    uint wordWrapDirty : 1;
+    TQRect itemRect, itemTextRect, itemIconRect;
+#ifndef QT_NO_TEXTEDIT
+    TQIconViewItemLineEdit *renameBox;
+#endif
+    TQRect oldRect;
+
+    TQIconViewItemPrivate *d;
+
+};
+
+class TQIconViewPrivate;          /* don't touch */
+
+class TQM_EXPORT_ICONVIEW TQIconView : public TQScrollView
+{
+    friend class TQIconViewItem;
+    friend class TQIconViewPrivate;
+    friend class TQIconViewToolTip;
+
+    Q_OBJECT
+    // #### sorting and sort direction do not work
+    Q_ENUMS( SelectionMode ItemTextPos Arrangement ResizeMode )
+    Q_PROPERTY( bool sorting READ sorting )
+    Q_PROPERTY( bool sortDirection READ sortDirection )
+    Q_PROPERTY( SelectionMode selectionMode READ selectionMode WRITE setSelectionMode )
+    Q_PROPERTY( int gridX READ gridX WRITE setGridX )
+    Q_PROPERTY( int gridY READ gridY WRITE setGridY )
+    Q_PROPERTY( int spacing READ spacing WRITE setSpacing )
+    Q_PROPERTY( ItemTextPos itemTextPos READ itemTextPos WRITE setItemTextPos )
+    Q_PROPERTY( TQBrush itemTextBackground READ itemTextBackground WRITE setItemTextBackground )
+    Q_PROPERTY( Arrangement arrangement READ arrangement WRITE setArrangement )
+    Q_PROPERTY( ResizeMode resizeMode READ resizeMode WRITE setResizeMode )
+    Q_PROPERTY( int maxItemWidth READ maxItemWidth WRITE setMaxItemWidth )
+    Q_PROPERTY( int maxItemTextLength READ maxItemTextLength WRITE setMaxItemTextLength )
+    Q_PROPERTY( bool autoArrange READ autoArrange WRITE setAutoArrange )
+    Q_PROPERTY( bool itemsMovable READ itemsMovable WRITE setItemsMovable )
+    Q_PROPERTY( bool wordWrapIconText READ wordWrapIconText WRITE setWordWrapIconText )
+    Q_PROPERTY( bool showToolTips READ showToolTips WRITE setShowToolTips )
+    Q_PROPERTY( uint count READ count )
+
+public:
+    enum SelectionMode {
+	Single = 0,
+	Multi,
+	Extended,
+	NoSelection
+    };
+    enum Arrangement {
+	LeftToRight = 0,
+	TopToBottom
+    };
+    enum ResizeMode {
+	Fixed = 0,
+	Adjust
+    };
+    enum ItemTextPos {
+	Bottom = 0,
+	Right
+    };
+
+    TQIconView( TQWidget* parent=0, const char* name=0, WFlags f = 0 );
+    virtual ~TQIconView();
+
+    virtual void insertItem( TQIconViewItem *item, TQIconViewItem *after = 0L );
+    virtual void takeItem( TQIconViewItem *item );
+
+    int index( const TQIconViewItem *item ) const;
+
+    TQIconViewItem *firstItem() const;
+    TQIconViewItem *lastItem() const;
+    TQIconViewItem *currentItem() const;
+    virtual void setCurrentItem( TQIconViewItem *item );
+    virtual void setSelected( TQIconViewItem *item, bool s, bool cb = FALSE );
+
+    uint count() const;
+
+public:
+    virtual void showEvent( TQShowEvent * );
+
+    virtual void setSelectionMode( SelectionMode m );
+    SelectionMode selectionMode() const;
+
+    TQIconViewItem *findItem( const TQPoint &pos ) const;
+    TQIconViewItem *findItem( const TQString &text, ComparisonFlags compare = BeginsWith ) const;
+    virtual void selectAll( bool select );
+    virtual void clearSelection();
+    virtual void invertSelection();
+
+    virtual void repaintItem( TQIconViewItem *item );
+    void repaintSelectedItems();
+
+    void ensureItemVisible( TQIconViewItem *item );
+    TQIconViewItem* findFirstVisibleItem( const TQRect &r ) const;
+    TQIconViewItem* findLastVisibleItem( const TQRect &r ) const;
+
+    virtual void clear();
+
+    virtual void setGridX( int rx );
+    virtual void setGridY( int ry );
+    int gridX() const;
+    int gridY() const;
+    virtual void setSpacing( int sp );
+    int spacing() const;
+    virtual void setItemTextPos( ItemTextPos pos );
+    ItemTextPos itemTextPos() const;
+    virtual void setItemTextBackground( const TQBrush &b );
+    TQBrush itemTextBackground() const;
+    virtual void setArrangement( Arrangement am );
+    Arrangement arrangement() const;
+    virtual void setResizeMode( ResizeMode am );
+    ResizeMode resizeMode() const;
+    virtual void setMaxItemWidth( int w );
+    int maxItemWidth() const;
+    virtual void setMaxItemTextLength( int w );
+    int maxItemTextLength() const;
+    virtual void setAutoArrange( bool b );
+    bool autoArrange() const;
+    virtual void setShowToolTips( bool b );
+    bool showToolTips() const;
+
+    void setSorting( bool sort, bool ascending = TRUE );
+    bool sorting() const;
+    bool sortDirection() const;
+
+    virtual void setItemsMovable( bool b );
+    bool itemsMovable() const;
+    virtual void setWordWrapIconText( bool b );
+    bool wordWrapIconText() const;
+
+    bool eventFilter( TQObject * o, TQEvent * );
+
+    TQSize minimumSizeHint() const;
+    TQSize sizeHint() const;
+
+    virtual void sort( bool ascending = TRUE );
+
+    virtual void setFont( const TQFont & );
+    virtual void setPalette( const TQPalette & );
+
+    bool isRenaming() const;
+
+public slots:
+    virtual void arrangeItemsInGrid( const TQSize &grid, bool update = TRUE );
+    virtual void arrangeItemsInGrid( bool update = TRUE );
+    virtual void setContentsPos( int x, int y );
+    virtual void updateContents();
+
+signals:
+    void selectionChanged();
+    void selectionChanged( TQIconViewItem *item );
+    void currentChanged( TQIconViewItem *item );
+    void clicked( TQIconViewItem * );
+    void clicked( TQIconViewItem *, const TQPoint & );
+    void pressed( TQIconViewItem * );
+    void pressed( TQIconViewItem *, const TQPoint & );
+
+    void doubleClicked( TQIconViewItem *item );
+    void returnPressed( TQIconViewItem *item );
+    void rightButtonClicked( TQIconViewItem* item, const TQPoint& pos );
+    void rightButtonPressed( TQIconViewItem* item, const TQPoint& pos );
+    void mouseButtonPressed( int button, TQIconViewItem* item, const TQPoint& pos );
+    void mouseButtonClicked( int button, TQIconViewItem* item, const TQPoint& pos );
+    void contextMenuRequested( TQIconViewItem* item, const TQPoint &pos );
+
+#ifndef QT_NO_DRAGANDDROP
+    void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> &lst );
+#endif
+    void moved();
+    void onItem( TQIconViewItem *item );
+    void onViewport();
+    void itemRenamed( TQIconViewItem *item, const TQString & );
+    void itemRenamed( TQIconViewItem *item );
+
+protected slots:
+    virtual void doAutoScroll();
+    virtual void adjustItems();
+    virtual void slotUpdate();
+
+private slots:
+    void movedContents( int dx, int dy );
+
+protected:
+    void drawContents( TQPainter *p, int cx, int cy, int cw, int ch );
+    void contentsMousePressEvent( TQMouseEvent *e );
+    void contentsMouseReleaseEvent( TQMouseEvent *e );
+    void contentsMouseMoveEvent( TQMouseEvent *e );
+    void contentsMouseDoubleClickEvent( TQMouseEvent *e );
+    void contentsContextMenuEvent( TQContextMenuEvent *e );
+
+#ifndef QT_NO_DRAGANDDROP
+    void contentsDragEnterEvent( TQDragEnterEvent *e );
+    void contentsDragMoveEvent( TQDragMoveEvent *e );
+    void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+    void contentsDropEvent( TQDropEvent *e );
+#endif
+
+    void resizeEvent( TQResizeEvent* e );
+    void keyPressEvent( TQKeyEvent *e );
+    void focusInEvent( TQFocusEvent *e );
+    void focusOutEvent( TQFocusEvent *e );
+    void enterEvent( TQEvent *e );
+
+    virtual void drawRubber( TQPainter *p );
+#ifndef QT_NO_DRAGANDDROP
+    virtual TQDragObject *dragObject();
+    virtual void startDrag();
+#endif
+    virtual void insertInGrid( TQIconViewItem *item );
+    virtual void drawBackground( TQPainter *p, const TQRect &r );
+
+    void emitSelectionChanged( TQIconViewItem * i = 0 );
+    void emitRenamed( TQIconViewItem *item );
+
+    TQIconViewItem *makeRowLayout( TQIconViewItem *begin, int &y, bool &changed );
+
+    void styleChange( TQStyle& );
+    void windowActivationChange( bool );
+
+private:
+    void contentsMousePressEventEx( TQMouseEvent *e );
+    virtual void drawDragShapes( const TQPoint &pnt );
+#ifndef QT_NO_DRAGANDDROP
+    virtual void initDragEnter( TQDropEvent *e );
+#endif
+    void drawContents( TQPainter* );
+    TQIconViewItem* findItemByName( TQIconViewItem *start );
+    void handleItemChange( TQIconViewItem *old, bool shift,
+			   bool control, bool homeend = FALSE);
+
+    int calcGridNum( int w, int x ) const;
+    TQIconViewItem *rowBegin( TQIconViewItem *item ) const;
+    void updateItemContainer( TQIconViewItem *item );
+    void appendItemContainer();
+    void rebuildContainers();
+    enum Direction {
+	DirUp = 0,
+	DirDown,
+	DirLeft,
+	DirRight
+    };
+    TQIconViewItem* findItem( Direction dir,
+			     const TQPoint &relativeTo,
+			     const TQRect &searchRect ) const;
+    bool neighbourItem( Direction dir,
+			const TQPoint &relativeTo,
+			const TQIconViewItem *item ) const;
+    TQBitmap mask( TQPixmap *pix ) const;
+
+    TQIconViewPrivate *d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQIconView( const TQIconView & );
+    TQIconView& operator=( const TQIconView & );
+#endif
+};
+
+#endif // QT_NO_ICONVIEW
+
+#endif // TQICONVIEW_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qiconview-m.png b/doc/html/qiconview-m.png new file mode 100644 index 00000000..e6382dac Binary files /dev/null and b/doc/html/qiconview-m.png differ diff --git a/doc/html/qiconview-members.html b/doc/html/qiconview-members.html new file mode 100644 index 00000000..c1bd6a4b --- /dev/null +++ b/doc/html/qiconview-members.html @@ -0,0 +1,503 @@ + + + + + +TQIconView Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIconView

+ +

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

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qiconview-w.png b/doc/html/qiconview-w.png new file mode 100644 index 00000000..f26462bd Binary files /dev/null and b/doc/html/qiconview-w.png differ diff --git a/doc/html/qiconview.html b/doc/html/qiconview.html new file mode 100644 index 00000000..6fa63b32 --- /dev/null +++ b/doc/html/qiconview.html @@ -0,0 +1,1009 @@ + + + + + +TQIconView Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIconView Class Reference
[iconview module]

+ +

The TQIconView class provides an area with movable labelled icons. +More... +

#include <qiconview.h> +

Inherits TQScrollView. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • Arrangement arrangement - the arrangement mode of the icon view
  • +
  • bool autoArrange - whether the icon view rearranges its items when a new item is inserted
  • +
  • uint count - the number of items in the icon view  (read only)
  • +
  • int gridX - the horizontal grid of the icon view
  • +
  • int gridY - the vertical grid of the icon view
  • +
  • TQBrush itemTextBackground - the brush to use when drawing the background of an item's text
  • +
  • ItemTextPos itemTextPos - the position where the text of each item is drawn
  • +
  • bool itemsMovable - whether the user is allowed to move items around in the icon view
  • +
  • int maxItemTextLength - the maximum length (in characters) that an item's text may have
  • +
  • int maxItemWidth - the maximum width that an item may have
  • +
  • ResizeMode resizeMode - the resize mode of the icon view
  • +
  • SelectionMode selectionMode - the selection mode of the icon view
  • +
  • bool showToolTips - whether the icon view will display a tool tip with the complete text for any truncated item text
  • +
  • bool sortDirection - whether the sort direction for inserting new items is ascending;  (read only)
  • +
  • bool sorting - whether the icon view sorts on insertion  (read only)
  • +
  • int spacing - the space in pixels between icon view items
  • +
  • bool wordWrapIconText - whether the item text will be word-wrapped if it is too long
  • +
+

Protected Members

+ +

Protected Slots

+ +

Detailed Description

+ + +The TQIconView class provides an area with movable labelled icons. +

+ + +

A TQIconView can display and manage a grid or other 2D layout of +labelled icons. Each labelled icon is a TQIconViewItem. Items +(TQIconViewItems) can be added or deleted at any time; items can be +moved within the TQIconView. Single or multiple items can be +selected. Items can be renamed in-place. TQIconView also supports +drag and drop. +

Each item contains a label string, a pixmap or picture (the icon +itself) and optionally a sort key. The sort key is used for +sorting the items and defaults to the label string. The label +string can be displayed below or to the right of the icon (see ItemTextPos). +

The simplest way to create a TQIconView is to create a TQIconView +object and create some TQIconViewItems with the TQIconView as their +parent, set the icon view's geometry and show it. +For example: +

+    TQIconView *iv = new TQIconView( this );
+    TQDir dir( path, "*.xpm" );
+    for ( uint i = 0; i < dir.count(); i++ ) {
+        (void) new TQIconViewItem( iv, dir[i], TQPixmap( path + dir[i] ) );
+    }
+    iv->resize( 600, 400 );
+    iv->show();
+    
+ +

The TQIconViewItem call passes a pointer to the TQIconView we wish to +populate, along with the label text and a TQPixmap. +

When an item is inserted the TQIconView allocates a position for it. +Existing items are rearranged if autoArrange() is TRUE. The +default arrangement is LeftToRight -- the TQIconView fills up +the left-most column from top to bottom, then moves one column +right and fills that from top to bottom and so on. The +arrangement can be modified with any of the following approaches: +

    +
  • Call setArrangement(), e.g. with TopToBottom which will fill +the top-most row from left to right, then moves one row down +and fills that row from left to right and so on. +
  • Construct each TQIconViewItem using a constructor which allows +you to specify which item the new one is to follow. +
  • Call setSorting() or sort() to sort the items. +
+

The spacing between items is set with setSpacing(). Items can be +laid out using a fixed grid using setGridX() and setGridY(); by +default the TQIconView calculates a grid dynamically. The position +of items' label text is set with setItemTextPos(). The text's +background can be set with setItemTextBackground(). The maximum +width of an item and of its text are set with setMaxItemWidth() +and setMaxItemTextLength(). The label text will be word-wrapped if +it is too long; this is controlled by setWordWrapIconText(). If +the label text is truncated, the user can still see the entire +text in a tool tip if they hover the mouse over the item. This is +controlled with setShowToolTips(). +

Items which are selectable may be selected depending on the SelectionMode; +the default is Single. Because TQIconView offers multiple +selection it must display keyboard focus and selection state +separately. Therefore there are functions to set the selection +state of an item (setSelected()) and to select which item displays +keyboard focus (setCurrentItem()). When multiple items may be +selected the icon view provides a rubberband, too. +

When in-place renaming is enabled (it is disabled by default), the +user may change the item's label. They do this by selecting the item +(single clicking it or navigating to it with the arrow keys), then +single clicking it (or pressing F2), and entering their text. If no +key has been set with TQIconViewItem::setKey() the new text will also +serve as the key. (See TQIconViewItem::setRenameEnabled().) +

You can control whether users can move items themselves with +setItemsMovable(). +

Because the internal structure used to store the icon view items is +linear, no iterator class is needed to iterate over all the items. +Instead we iterate by getting the first item from the icon view +and then each subsequent (TQIconViewItem::nextItem()) from each +item in turn: +

+        for ( TQIconViewItem *item = iv->firstItem(); item; item = item->nextItem() )
+            do_something( item );
+    
+ +TQIconView also provides currentItem(). You can search for an item +using findItem() (searching by position or for label text) and +with findFirstVisibleItem() and findLastVisibleItem(). The number +of items is returned by count(). An item can be removed from an +icon view using takeItem(); to delete an item use delete. All +the items can be deleted with clear(). +

The TQIconView emits a wide range of useful signals, including +selectionChanged(), currentChanged(), clicked(), moved() and +itemRenamed(). +

+

Drag and Drop +

+

TQIconView supports the drag and drop of items within the TQIconView +itself. It also supports the drag and drop of items out of or into +the TQIconView and drag and drop onto items themselves. The drag and +drop of items outside the TQIconView can be achieved in a simple way +with basic functionality, or in a more sophisticated way which +provides more power and control. +

The simple approach to dragging items out of the icon view is to +subclass TQIconView and reimplement TQIconView::dragObject(). +

+    TQDragObject *MyIconView::dragObject()
+    {
+        return new TQTextDrag( currentItem()->text(), this );
+    }
+    
+ +

In this example we create a TQTextDrag object, (derived from +TQDragObject), containing the item's label and return it as the drag +object. We could just as easily have created a TQImageDrag from the +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 +make a TQIconViewItem into a drop target subclass TQIconViewItem and +reimplement TQIconViewItem::acceptDrop() and +TQIconViewItem::dropped(). +

+    bool MyIconViewItem::acceptDrop( const TQMimeSource *mime ) const
+    {
+        if ( mime->provides( "text/plain" ) )
+            return TRUE;
+        return FALSE;
+    }
+
+    void MyIconViewItem::dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& )
+    {
+        TQString label;
+        if ( TQTextDrag::decode( evt, label ) )
+            setText( label );
+    }
+    
+ +

See iconview/simple_dd/main.h and iconview/simple_dd/main.cpp for a simple drag and drop example +which demonstrates drag and drop between a TQIconView and a +TQListBox. +

If you want to use extended drag-and-drop or have drag shapes drawn +you must take a more sophisticated approach. +

The first part is starting drags -- you should use a TQIconDrag (or a +class derived from it) for the drag object. In dragObject() create the +drag object, populate it with TQIconDragItems 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 TQIconDragItem for +each selected item, and append these items with TQIconDrag::append() to +the TQIconDrag object. You can use TQIconDragItem::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 +TQIconDrag, which implements additional encoding and decoding +functions. +

When a drag enters the icon view, there is little to do. Simply +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 +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). +

See also TQIconViewItem::setDragEnabled(), TQIconViewItem::setDropEnabled(), TQIconViewItem::acceptDrop(), TQIconViewItem::dropped(), and Advanced Widgets. + +

+ +


Member Type Documentation

+

TQIconView::Arrangement

+ +

This enum type determines in which direction the items flow when +the view runs out of space. +

    +
  • TQIconView::LeftToRight - Items which don't fit into the view cause the +viewport to extend vertically (you get a vertical scrollbar). +
  • TQIconView::TopToBottom - Items which don't fit into the view cause the +viewport to extend horizontally (you get a horizontal scrollbar). +
+

TQIconView::ItemTextPos

+ +

This enum type specifies the position of the item text in relation +to the icon. +

    +
  • TQIconView::Bottom - The text is drawn below the icon. +
  • TQIconView::Right - The text is drawn to the right of the icon. +
+

TQIconView::ResizeMode

+

This enum type is used to tell TQIconView how it should treat the +positions of its icons when the widget is resized. The modes are: +

    +
  • TQIconView::Fixed - The icons' positions are not changed. +
  • TQIconView::Adjust - The icons' positions are adjusted to be within the +new geometry, if possible. +
+

TQIconView::SelectionMode

+ +

This enumerated type is used by TQIconView to indicate how it +reacts to selection by the user. It has four values: +

    +
  • TQIconView::Single - When the user selects an item, any already-selected +item becomes unselected and the user cannot unselect the selected +item. This means that the user can never clear the selection. (The +application programmer can, using TQIconView::clearSelection().) +
  • TQIconView::Multi - When the user selects an item, e.g. by navigating +to it with the keyboard arrow keys or by clicking it, the +selection status of that item is toggled and the other items are +left alone. Also, multiple items can be selected by dragging the +mouse while the left mouse button stays pressed. +
  • TQIconView::Extended - When the user selects an item the selection is +cleared and the new item selected. However, if the user presses +the Ctrl key when clicking on an item, the clicked item gets +toggled and all other items are left untouched. If the user +presses the Shift key while clicking on an item, all items between +the current item and the clicked item get selected or unselected, +depending on the state of the clicked item. Also, multiple items +can be selected by dragging the mouse while the left mouse button +stays pressed. +
  • TQIconView::NoSelection - Items cannot be selected. +

To summarise: Single is a real single-selection icon view; Multi a real multi-selection icon view; Extended is an icon +view in which users can select multiple items but usually want to +select either just one or a range of contiguous items; and NoSelection mode is for an icon view where the user can look but +not touch. + +


Member Function Documentation

+

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

+Constructs an empty icon view called name, with parent parent and using the widget flags f. + +

TQIconView::~TQIconView () [virtual] +

+Destroys the icon view and deletes all items. + +

void TQIconView::adjustItems () [virtual protected slot] +

+Adjusts the positions of the items to the geometry of the icon +view. + +

void TQIconView::arrangeItemsInGrid ( const TQSize & grid, bool update = TRUE ) [virtual slot] +

+This variant uses grid instead of (gridX(), gridY()). If grid is invalid (see TQSize::isValid()), arrangeItemsInGrid() +calculates a valid grid itself and uses that. +

If update is TRUE (the default) the viewport is repainted. + +

Example: fileiconview/qfileiconview.h. +

void TQIconView::arrangeItemsInGrid ( bool update = TRUE ) [virtual slot] +

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

Arranges all the items in the grid given by gridX() and gridY(). +

Even if sorting() is enabled, the items are not sorted by this +function. If you want to sort or rearrange the items, use +iconview->sort(iconview->sortDirection()). +

If update is TRUE (the default), the viewport is repainted as +well. +

See also TQIconView::gridX, TQIconView::gridY, and TQIconView::sort(). + +

Arrangement TQIconView::arrangement () const +

Returns the arrangement mode of the icon view. +See the "arrangement" property for details. +

bool TQIconView::autoArrange () const +

Returns TRUE if the icon view rearranges its items when a new item is inserted; otherwise returns FALSE. +See the "autoArrange" property for details. +

void TQIconView::clear () [virtual] +

+Clears the icon view. All items are deleted. + +

void TQIconView::clearSelection () [virtual] +

+Unselects all the items. + +

void TQIconView::clicked ( TQIconViewItem * item ) [signal] +

+ +

This signal is emitted when the user clicks any mouse button. If +item is non-null, the cursor is on item. If item is null, +the mouse cursor isn't on any item. +

See also mouseButtonClicked(), rightButtonClicked(), and pressed(). + +

void TQIconView::clicked ( TQIconViewItem * item, const TQPoint & pos ) [signal] +

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

This signal is emitted when the user clicks any mouse button on an +icon view item. item is a pointer to the item that has been +clicked. +

pos is the position of the mouse cursor in the global coordinate +system (TQMouseEvent::globalPos()). (If the click's press and release +differ by a pixel or two, pos is the position at release time.) +

See also mouseButtonClicked(), rightButtonClicked(), and pressed(). + +

void TQIconView::contextMenuRequested ( TQIconViewItem * item, const TQPoint & pos ) [signal] +

+ +

This signal is emitted when the user invokes a context menu with +the right mouse button or with special system keys, with item +being the item under the mouse cursor or the current item, +respectively. +

pos is the position for the context menu in the global +coordinate system. + +

uint TQIconView::count () const +

Returns the number of items in the icon view. +See the "count" property for details. +

void TQIconView::currentChanged ( TQIconViewItem * item ) [signal] +

+ +

This signal is emitted when a new item becomes current. item is +the new current item (or 0 if no item is now current). +

See also currentItem(). + +

TQIconViewItem * TQIconView::currentItem () const +

+Returns a pointer to the current item of the icon view, or 0 if no +item is current. +

See also setCurrentItem(), firstItem(), and lastItem(). + +

void TQIconView::doAutoScroll () [virtual protected slot] +

+Performs autoscrolling when selecting multiple icons with the +rubber band. + +

void TQIconView::doubleClicked ( TQIconViewItem * item ) [signal] +

+ +

This signal is emitted when the user double-clicks on item. + +

TQDragObject * TQIconView::dragObject () [virtual protected] +

+Returns the TQDragObject that should be used for drag-and-drop. +This function is called by the icon view when starting a drag to +get the dragobject that should be used for the drag. Subclasses +may reimplement this. +

See also TQIconDrag. + +

Examples: fileiconview/qfileiconview.cpp and iconview/simple_dd/main.cpp. +

void TQIconView::drawBackground ( TQPainter * p, const TQRect & r ) [virtual protected] +

+This function is called to draw the rectangle r of the +background using the painter p. +

The default implementation fills r with the viewport's +backgroundBrush(). Subclasses may reimplement this to draw custom +backgrounds. +

See also contentsX, contentsY, and drawContents(). + +

void TQIconView::drawRubber ( TQPainter * p ) [virtual protected] +

+Draws the rubber band using the painter p. + +

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

+ +

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. +

e provides all the information about the drop. If the drag +object of the drop was a TQIconDrag, lst contains the list of +the dropped items. You can get the data using +TQIconDragItem::data() on each item. If the lst is empty, i.e. +the drag was not a TQIconDrag, you have to decode the data in e +and work with that. +

Note TQIconViewItems may be drop targets; if a drop event occurs on +an item the item handles the drop. + +

Examples: iconview/main.cpp and iconview/simple_dd/main.cpp. +

void TQIconView::emitSelectionChanged ( TQIconViewItem * i = 0 ) [protected] +

+Emits a signal to indicate selection changes. i is the +TQIconViewItem that was selected or de-selected. +

You should never need to call this function. + +

void TQIconView::ensureItemVisible ( TQIconViewItem * item ) +

+Makes sure that item is entirely visible. If necessary, +ensureItemVisible() scrolls the icon view. +

See also ensureVisible(). + +

TQIconViewItem * TQIconView::findFirstVisibleItem ( const TQRect & r ) const +

+Finds the first item whose bounding rectangle overlaps r and +returns a pointer to that item. r is given in content +coordinates. Returns 0 if no item overlaps r. +

If you want to find all items that touch r, you will need to +use this function and nextItem() in a loop ending at +findLastVisibleItem() and test TQIconViewItem::rect() for each of +these items. +

See also findLastVisibleItem() and TQIconViewItem::rect(). + +

TQIconViewItem * TQIconView::findItem ( const TQPoint & pos ) const +

+Returns a pointer to the item that contains point pos, which is +given in contents coordinates, or 0 if no item contains point pos. + +

TQIconViewItem * TQIconView::findItem ( const TQString & text, ComparisonFlags compare = BeginsWith ) const +

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

Returns a pointer to the first item whose text begins with text, or 0 if no such item could be found. Use the compare flag +to control the comparison behaviour. (See TQt::StringComparisonMode.) + +

TQIconViewItem * TQIconView::findLastVisibleItem ( const TQRect & r ) const +

+Finds the last item whose bounding rectangle overlaps r and +returns a pointer to that item. r is given in content +coordinates. Returns 0 if no item overlaps r. +

See also findFirstVisibleItem(). + +

TQIconViewItem * TQIconView::firstItem () const +

+Returns a pointer to the first item of the icon view, or 0 if +there are no items in the icon view. +

See also lastItem() and currentItem(). + +

int TQIconView::gridX () const +

Returns the horizontal grid of the icon view. +See the "gridX" property for details. +

int TQIconView::gridY () const +

Returns the vertical grid of the icon view. +See the "gridY" property for details. +

int TQIconView::index ( const TQIconViewItem * item ) const +

+Returns the index of item, or -1 if item doesn't exist in +this icon view. + +

void TQIconView::insertInGrid ( TQIconViewItem * item ) [virtual protected] +

+Inserts the TQIconViewItem item in the icon view's grid. You should never need to call this function. Instead, insert +TQIconViewItems by creating them with a pointer to the TQIconView +that they are to be inserted into. + +

void TQIconView::insertItem ( TQIconViewItem * item, TQIconViewItem * after = 0L ) [virtual] +

+Inserts the icon view item item after after. If after is +0, item is appended after the last item. +

You should never need to call this function. Instead create +TQIconViewItem's and associate them with your icon view like this: +

+        (void) new TQIconViewItem( myIconview, "The text of the item", aPixmap );
+    
+ + +

void TQIconView::invertSelection () [virtual] +

+Inverts the selection. Works only in Multi and Extended selection +mode. + +

bool TQIconView::isRenaming () const +

+Returns TRUE if an iconview item is being renamed; otherwise +returns FALSE. + +

void TQIconView::itemRenamed ( TQIconViewItem * item, const TQString & name ) [signal] +

+ +

This signal is emitted when item has been renamed to name, +usually by in-place renaming. +

See also TQIconViewItem::setRenameEnabled() and TQIconViewItem::rename(). + +

void TQIconView::itemRenamed ( TQIconViewItem * item ) [signal] +

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

This signal is emitted when item has been renamed, usually by +in-place renaming. +

See also TQIconViewItem::setRenameEnabled() and TQIconViewItem::rename(). + +

TQBrush TQIconView::itemTextBackground () const +

Returns the brush to use when drawing the background of an item's text. +See the "itemTextBackground" property for details. +

ItemTextPos TQIconView::itemTextPos () const +

Returns the position where the text of each item is drawn. +See the "itemTextPos" property for details. +

bool TQIconView::itemsMovable () const +

Returns TRUE if the user is allowed to move items around in the icon view; otherwise returns FALSE. +See the "itemsMovable" property for details. +

TQIconViewItem * TQIconView::lastItem () const +

+Returns a pointer to the last item of the icon view, or 0 if there +are no items in the icon view. +

See also firstItem() and currentItem(). + +

TQIconViewItem * TQIconView::makeRowLayout ( TQIconViewItem * begin, int & y, bool & changed ) [protected] +

+Lays out a row of icons (if Arrangement == TopToBottom this is +a column). Starts laying out with the item begin. y is the +starting coordinate. Returns the last item of the row (column) and +sets the new starting coordinate to y. The changed parameter +is used internally. +

Warning: This function may be made private in a future version of +TQt. We do not recommend calling it. + +

int TQIconView::maxItemTextLength () const +

Returns the maximum length (in characters) that an item's text may have. +See the "maxItemTextLength" property for details. +

int TQIconView::maxItemWidth () const +

Returns the maximum width that an item may have. +See the "maxItemWidth" property for details. +

void TQIconView::mouseButtonClicked ( int button, TQIconViewItem * item, const TQPoint & pos ) [signal] +

+ +

This signal is emitted when the user clicks mouse button button. If item is non-null, the cursor is on item. If item is null, the mouse cursor isn't on any item. +

pos is the position of the mouse cursor in the global +coordinate system (TQMouseEvent::globalPos()). (If the click's +press and release differ by a pixel or two, pos is the +position at release time.) +

See also mouseButtonPressed(), rightButtonClicked(), and clicked(). + +

void TQIconView::mouseButtonPressed ( int button, TQIconViewItem * item, const TQPoint & pos ) [signal] +

+ +

This signal is emitted when the user presses mouse button button. If item is non-null, the cursor is on item. If item is null, the mouse cursor isn't on any item. +

pos is the position of the mouse cursor in the global +coordinate system (TQMouseEvent::globalPos()). +

See also rightButtonClicked() and pressed(). + +

void TQIconView::moved () [signal] +

+ +

This signal is emitted after successfully dropping one (or more) +items of the icon view. If the items should be removed, it's best +to do so in a slot connected to this signal. + +

Example: iconview/main.cpp. +

void TQIconView::onItem ( TQIconViewItem * item ) [signal] +

+ +

This signal is emitted when the user moves the mouse cursor onto +an item, similar to the TQWidget::enterEvent() function. + +

void TQIconView::onViewport () [signal] +

+ +

This signal is emitted when the user moves the mouse cursor from +an item to an empty part of the icon view. +

See also onItem(). + +

void TQIconView::pressed ( TQIconViewItem * item ) [signal] +

+ +

This signal is emitted when the user presses any mouse button. If +item is non-null, the cursor is on item. If item is null, +the mouse cursor isn't on any item. +

See also mouseButtonPressed(), rightButtonPressed(), and clicked(). + +

void TQIconView::pressed ( TQIconViewItem * item, const TQPoint & pos ) [signal] +

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

This signal is emitted when the user presses any mouse button. If +item is non-null, the cursor is on item. If item is null, +the mouse cursor isn't on any item. +

pos is the position of the mouse cursor in the global +coordinate system (TQMouseEvent::globalPos()). (If the click's +press and release differ by a pixel or two, pos is the +position at release time.) +

See also mouseButtonPressed(), rightButtonPressed(), and clicked(). + +

void TQIconView::repaintItem ( TQIconViewItem * item ) [virtual] +

+Repaints the item. + +

void TQIconView::repaintSelectedItems () +

+Repaints the selected items. + +

ResizeMode TQIconView::resizeMode () const +

Returns the resize mode of the icon view. +See the "resizeMode" property for details. +

void TQIconView::returnPressed ( TQIconViewItem * item ) [signal] +

+ +

This signal is emitted if the user presses the Return or Enter +key. item is the currentItem() at the time of the keypress. + +

void TQIconView::rightButtonClicked ( TQIconViewItem * item, const TQPoint & pos ) [signal] +

+ +

This signal is emitted when the user clicks the right mouse +button. If item is non-null, the cursor is on item. If item is null, the mouse cursor isn't on any item. +

pos is the position of the mouse cursor in the global +coordinate system (TQMouseEvent::globalPos()). (If the click's +press and release differ by a pixel or two, pos is the +position at release time.) +

See also rightButtonPressed(), mouseButtonClicked(), and clicked(). + +

void TQIconView::rightButtonPressed ( TQIconViewItem * item, const TQPoint & pos ) [signal] +

+ +

This signal is emitted when the user presses the right mouse +button. If item is non-null, the cursor is on item. If item is null, the mouse cursor isn't on any item. +

pos is the position of the mouse cursor in the global +coordinate system (TQMouseEvent::globalPos()). + +

void TQIconView::selectAll ( bool select ) [virtual] +

+In Multi and Extended modes, this function sets all items to be +selected if select is TRUE, and to be unselected if select +is FALSE. +

In Single and NoSelection modes, this function only changes the +selection status of currentItem(). + +

void TQIconView::selectionChanged () [signal] +

+ +

This signal is emitted when the selection has been changed. It's +emitted in each selection mode. + +

void TQIconView::selectionChanged ( TQIconViewItem * item ) [signal] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted when the selection changes. item is the +newly selected item. This signal is emitted only in single +selection mode. + +

SelectionMode TQIconView::selectionMode () const +

Returns the selection mode of the icon view. +See the "selectionMode" property for details. +

void TQIconView::setArrangement ( Arrangement am ) [virtual] +

Sets the arrangement mode of the icon view to am. +See the "arrangement" property for details. +

void TQIconView::setAutoArrange ( bool b ) [virtual] +

Sets whether the icon view rearranges its items when a new item is inserted to b. +See the "autoArrange" property for details. +

void TQIconView::setCurrentItem ( TQIconViewItem * item ) [virtual] +

+Makes item the new current item of the icon view. + +

void TQIconView::setGridX ( int rx ) [virtual] +

Sets the horizontal grid of the icon view to rx. +See the "gridX" property for details. +

void TQIconView::setGridY ( int ry ) [virtual] +

Sets the vertical grid of the icon view to ry. +See the "gridY" property for details. +

void TQIconView::setItemTextBackground ( const TQBrush & b ) [virtual] +

Sets the brush to use when drawing the background of an item's text to b. +See the "itemTextBackground" property for details. +

void TQIconView::setItemTextPos ( ItemTextPos pos ) [virtual] +

Sets the position where the text of each item is drawn to pos. +See the "itemTextPos" property for details. +

void TQIconView::setItemsMovable ( bool b ) [virtual] +

Sets whether the user is allowed to move items around in the icon view to b. +See the "itemsMovable" property for details. +

void TQIconView::setMaxItemTextLength ( int w ) [virtual] +

Sets the maximum length (in characters) that an item's text may have to w. +See the "maxItemTextLength" property for details. +

void TQIconView::setMaxItemWidth ( int w ) [virtual] +

Sets the maximum width that an item may have to w. +See the "maxItemWidth" property for details. +

void TQIconView::setResizeMode ( ResizeMode am ) [virtual] +

Sets the resize mode of the icon view to am. +See the "resizeMode" property for details. +

void TQIconView::setSelected ( TQIconViewItem * item, bool s, bool cb = FALSE ) [virtual] +

+Selects or unselects item depending on s, and may also +unselect other items, depending on TQIconView::selectionMode() and +cb. +

If s is FALSE, item is unselected. +

If s is TRUE and TQIconView::selectionMode() is Single, item is selected, and the item which was selected is unselected. +

If s is TRUE and TQIconView::selectionMode() is Extended, item is selected. If cb is TRUE, the selection state of the +icon view's other items is left unchanged. If cb is FALSE (the +default) all other items are unselected. +

If s is TRUE and TQIconView::selectionMode() is Multi item +is selected. +

Note that cb is used only if TQIconView::selectionMode() is Extended. cb defaults to FALSE. +

All items whose selection status is changed repaint themselves. + +

void TQIconView::setSelectionMode ( SelectionMode m ) [virtual] +

Sets the selection mode of the icon view to m. +See the "selectionMode" property for details. +

void TQIconView::setShowToolTips ( bool b ) [virtual] +

Sets whether the icon view will display a tool tip with the complete text for any truncated item text to b. +See the "showToolTips" property for details. +

void TQIconView::setSorting ( bool sort, bool ascending = TRUE ) +

+If sort is TRUE, this function sets the icon view to sort items +when a new item is inserted. If sort is FALSE, the icon view +will not be sorted. +

Note that autoArrange() must be TRUE for sorting to take place. +

If ascending is TRUE (the default), items are sorted in +ascending order. If ascending is FALSE, items are sorted in +descending order. +

TQIconViewItem::compare() is used to compare pairs of items. The +sorting is based on the items' keys; these default to the items' +text unless specifically set to something else. +

See also TQIconView::autoArrange, TQIconView::autoArrange, sortDirection, sort(), and TQIconViewItem::setKey(). + +

void TQIconView::setSpacing ( int sp ) [virtual] +

Sets the space in pixels between icon view items to sp. +See the "spacing" property for details. +

void TQIconView::setWordWrapIconText ( bool b ) [virtual] +

Sets whether the item text will be word-wrapped if it is too long to b. +See the "wordWrapIconText" property for details. +

bool TQIconView::showToolTips () const +

Returns TRUE if the icon view will display a tool tip with the complete text for any truncated item text; otherwise returns FALSE. +See the "showToolTips" property for details. +

void TQIconView::slotUpdate () [virtual protected slot] +

+This slot is used for a slightly-delayed update. +

The icon view is not redrawn immediately after inserting a new item +but after a very small delay using a TQTimer. This means that when +many items are inserted in a loop the icon view is probably redrawn +only once at the end of the loop. This makes the insertions both +flicker-free and faster. + +

void TQIconView::sort ( bool ascending = TRUE ) [virtual] +

+Sorts and rearranges all the items in the icon view. If ascending is TRUE, the items are sorted in increasing order, +otherwise they are sorted in decreasing order. +

TQIconViewItem::compare() is used to compare pairs of items. The +sorting is based on the items' keys; these default to the items' +text unless specifically set to something else. +

Note that this function sets the sort order to ascending. +

See also TQIconViewItem::key(), TQIconViewItem::setKey(), TQIconViewItem::compare(), TQIconView::setSorting(), and TQIconView::sortDirection. + +

bool TQIconView::sortDirection () const +

Returns TRUE if the sort direction for inserting new items is ascending;; otherwise returns FALSE. +See the "sortDirection" property for details. +

bool TQIconView::sorting () const +

Returns TRUE if the icon view sorts on insertion; otherwise returns FALSE. +See the "sorting" property for details. +

int TQIconView::spacing () const +

Returns the space in pixels between icon view items. +See the "spacing" property for details. +

void TQIconView::startDrag () [virtual protected] +

+Starts a drag. + +

void TQIconView::takeItem ( TQIconViewItem * item ) [virtual] +

+Takes the icon view item item out of the icon view and causes +an update of the screen display. The item is not deleted. You +should normally not need to call this function because +TQIconViewItem::~TQIconViewItem() calls it. The normal way to delete +an item is to delete it. + +

bool TQIconView::wordWrapIconText () const +

Returns TRUE if the item text will be word-wrapped if it is too long; otherwise returns FALSE. +See the "wordWrapIconText" property for details. +


Property Documentation

+

Arrangement arrangement

+

This property holds the arrangement mode of the icon view. +

This can be LeftToRight or TopToBottom. The default is LeftToRight. + +

Set this property's value with setArrangement() and get this property's value with arrangement(). +

bool autoArrange

+

This property holds whether the icon view rearranges its items when a new item is inserted. +

The default is TRUE. +

Note that if the icon view is not visible at the time of +insertion, TQIconView defers all position-related work until it is +shown and then calls arrangeItemsInGrid(). + +

Set this property's value with setAutoArrange() and get this property's value with autoArrange(). +

uint count

+

This property holds the number of items in the icon view. +

+

Get this property's value with count(). +

int gridX

+

This property holds the horizontal grid of the icon view. +

If the value is -1, (the default), TQIconView computes suitable +column widths based on the icon view's contents. +

Note that setting a grid width overrides setMaxItemWidth(). + +

Set this property's value with setGridX() and get this property's value with gridX(). +

int gridY

+

This property holds the vertical grid of the icon view. +

If the value is -1, (the default), TQIconView computes suitable +column heights based on the icon view's contents. + +

Set this property's value with setGridY() and get this property's value with gridY(). +

TQBrush itemTextBackground

+

This property holds the brush to use when drawing the background of an item's text. +

By default this brush is set to NoBrush, meaning that only the +normal icon view background is used. + +

Set this property's value with setItemTextBackground() and get this property's value with itemTextBackground(). +

ItemTextPos itemTextPos

+

This property holds the position where the text of each item is drawn. +

Valid values are Bottom or Right. The default is Bottom. + +

Set this property's value with setItemTextPos() and get this property's value with itemTextPos(). +

bool itemsMovable

+

This property holds whether the user is allowed to move items around in the icon view. +

The default is TRUE. + +

Set this property's value with setItemsMovable() and get this property's value with itemsMovable(). +

int maxItemTextLength

+

This property holds the maximum length (in characters) that an item's text may have. +

The default is 255 characters. + +

Set this property's value with setMaxItemTextLength() and get this property's value with maxItemTextLength(). +

int maxItemWidth

+

This property holds the maximum width that an item may have. +

The default is 100 pixels. +

Note that if the gridX() value is set TQIconView will ignore +this property. + +

Set this property's value with setMaxItemWidth() and get this property's value with maxItemWidth(). +

ResizeMode resizeMode

+

This property holds the resize mode of the icon view. +

This can be Fixed or Adjust. The default is Fixed. +See ResizeMode. + +

Set this property's value with setResizeMode() and get this property's value with resizeMode(). +

SelectionMode selectionMode

+

This property holds the selection mode of the icon view. +

This can be Single (the default), Extended, Multi or NoSelection. + +

Set this property's value with setSelectionMode() and get this property's value with selectionMode(). +

bool showToolTips

+

This property holds whether the icon view will display a tool tip with the complete text for any truncated item text. +

The default is TRUE. Note that this has no effect if +setWordWrapIconText() is TRUE, as it is by default. + +

Set this property's value with setShowToolTips() and get this property's value with showToolTips(). +

bool sortDirection

+

This property holds whether the sort direction for inserting new items is ascending;. +

The default is TRUE (i.e. ascending). This sort direction is only +meaningful if both sorting() and autoArrange() are TRUE. +

To set the sort direction, use setSorting() + +

Get this property's value with sortDirection(). +

bool sorting

+

This property holds whether the icon view sorts on insertion. +

The default is FALSE, i.e. no sorting on insertion. +

To set the sorting, use setSorting(). + +

Get this property's value with sorting(). +

int spacing

+

This property holds the space in pixels between icon view items. +

The default is 5 pixels. +

Negative values for spacing are illegal. + +

Set this property's value with setSpacing() and get this property's value with spacing(). +

bool wordWrapIconText

+

This property holds whether the item text will be word-wrapped if it is too long. +

The default is TRUE. +

If this property is FALSE, icon text that is too long is +truncated, and an ellipsis (...) appended to indicate that +truncation has occurred. The full text can still be seen by the +user if they hover the mouse because the full text is shown in a +tooltip; see setShowToolTips(). + +

Set this property's value with setWordWrapIconText() and get this property's value with wordWrapIconText(). + +


+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/qiconviewitem-members.html b/doc/html/qiconviewitem-members.html new file mode 100644 index 00000000..0e1f9623 --- /dev/null +++ b/doc/html/qiconviewitem-members.html @@ -0,0 +1,98 @@ + + + + + +TQIconViewItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIconViewItem

+ +

This is the complete list of member functions for +TQIconViewItem, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qiconviewitem.html b/doc/html/qiconviewitem.html new file mode 100644 index 00000000..924c01cd --- /dev/null +++ b/doc/html/qiconviewitem.html @@ -0,0 +1,626 @@ + + + + + +TQIconViewItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIconViewItem Class Reference
[iconview module]

+ +

The TQIconViewItem class provides a single item in a TQIconView. +More... +

#include <qiconview.h> +

Inherits TQt. +

List of all member functions. +

Public Members

+
    +
  • TQIconViewItem ( TQIconView * parent )
  • +
  • TQIconViewItem ( TQIconView * parent, TQIconViewItem * after )
  • +
  • TQIconViewItem ( TQIconView * parent, const TQString & text )
  • +
  • TQIconViewItem ( TQIconView * parent, TQIconViewItem * after, const TQString & text )
  • +
  • TQIconViewItem ( TQIconView * parent, const TQString & text, const TQPixmap & icon )
  • +
  • TQIconViewItem ( TQIconView * parent, TQIconViewItem * after, const TQString & text, const TQPixmap & icon )
  • +
  • TQIconViewItem ( TQIconView * parent, const TQString & text, const TQPicture & picture )
  • +
  • TQIconViewItem ( TQIconView * parent, TQIconViewItem * after, const TQString & text, const TQPicture & picture )
  • +
  • virtual ~TQIconViewItem ()
  • +
  • virtual void setRenameEnabled ( bool allow )
  • +
  • virtual void setDragEnabled ( bool allow )
  • +
  • virtual void setDropEnabled ( bool allow )
  • +
  • virtual TQString text () const
  • +
  • virtual TQPixmap * pixmap () const
  • +
  • virtual TQPicture * picture () const
  • +
  • virtual TQString key () const
  • +
  • bool renameEnabled () const
  • +
  • bool dragEnabled () const
  • +
  • bool dropEnabled () const
  • +
  • TQIconView * iconView () const
  • +
  • TQIconViewItem * prevItem () const
  • +
  • TQIconViewItem * nextItem () const
  • +
  • int index () const
  • +
  • virtual void setSelected ( bool s, bool cb )
  • +
  • virtual void setSelected ( bool s )
  • +
  • virtual void setSelectable ( bool enable )
  • +
  • bool isSelected () const
  • +
  • bool isSelectable () const
  • +
  • virtual void repaint ()
  • +
  • virtual bool move ( int x, int y )
  • +
  • virtual void moveBy ( int dx, int dy )
  • +
  • virtual bool move ( const TQPoint & pnt )
  • +
  • virtual void moveBy ( const TQPoint & pnt )
  • +
  • TQRect rect () const
  • +
  • int x () const
  • +
  • int y () const
  • +
  • int width () const
  • +
  • int height () const
  • +
  • TQSize size () const
  • +
  • TQPoint pos () const
  • +
  • TQRect textRect ( bool relative = TRUE ) const
  • +
  • TQRect pixmapRect ( bool relative = TRUE ) const
  • +
  • bool contains ( const TQPoint & pnt ) const
  • +
  • bool intersects ( const TQRect & r ) const
  • +
  • virtual bool acceptDrop ( const TQMimeSource * mime ) const
  • +
  • void rename ()
  • +
  • virtual int compare ( TQIconViewItem * i ) const
  • +
  • virtual void setText ( const TQString & text )
  • +
  • virtual void setPixmap ( const TQPixmap & icon )
  • +
  • virtual void setPicture ( const TQPicture & icon )
  • +
  • virtual void setText ( const TQString & text, bool recalc, bool redraw = TRUE )
  • +
  • virtual void setPixmap ( const TQPixmap & icon, bool recalc, bool redraw = TRUE )
  • +
  • virtual void setKey ( const TQString & k )
  • +
  • virtual int rtti () const
  • +
+

Protected Members

+
    +
  • virtual void removeRenameBox ()
  • +
  • virtual void calcRect ( const TQString & text_ = TQString::null )
  • +
  • virtual void paintItem ( TQPainter * p, const TQColorGroup & cg )
  • +
  • virtual void paintFocus ( TQPainter * p, const TQColorGroup & cg )
  • +
  • virtual void dropped ( TQDropEvent * e, const TQValueList<TQIconDragItem> & lst )
  • +
  • virtual void dragEntered ()
  • +
  • virtual void dragLeft ()
  • +
  • void setItemRect ( const TQRect & r )
  • +
  • void setTextRect ( const TQRect & r )
  • +
  • void setPixmapRect ( const TQRect & r )
  • +
+

Detailed Description

+ + +The TQIconViewItem class provides a single item in a TQIconView. +

+ +

A TQIconViewItem contains an icon, a string and optionally a sort +key, and can display itself in a TQIconView. +The class is designed to be very similar to TQListView and TQListBox +in use, both via instantiation and subclassing. +

The simplest way to create a TQIconViewItem and insert it into a +TQIconView is to construct the item passing the constructor a +pointer to the icon view, a string and an icon: +

+    (void) new TQIconViewItem(
+                    iconView,   // A pointer to a TQIconView
+                    "This is the text of the item",
+                    aPixmap );
+    
+ +

By default the text of an icon view item may not be edited by the +user but calling setRenameEnabled(TRUE) will allow the user to +perform in-place editing of the item's text. +

When the icon view is deleted all items in it are deleted +automatically. +

The TQIconView::firstItem() and TQIconViewItem::nextItem() functions +provide a means of iterating over all the items in a TQIconView: +

+    TQIconViewItem *item;
+    for ( item = iconView->firstItem(); item; item = item->nextItem() )
+        do_something_with( item );
+    
+ +

The item's icon view is available from iconView(), and its +position in the icon view from index(). +

The item's selection status is available from isSelected() and is +set and controlled by setSelected() and isSelectable(). +

The text and icon can be set with setText() and setPixmap() and +retrieved with text() and pixmap(). The item's sort key defaults +to text() but may be set with setKey() and retrieved with key(). +The comparison function, compare() uses key(). +

Items may be repositioned with move() and moveBy(). An item's +geometry is available from rect(), x(), y(), width(), height(), +size(), pos(), textRect() and pixmapRect(). You can also test +against the position of a point with contains() and intersects(). +

To remove an item from an icon view, just delete the item. The +TQIconViewItem destructor removes it cleanly from its icon view. +

Because the icon view is designed to use drag-and-drop, the icon +view item also has functions for drag-and-drop which may be +reimplemented. +

+Note: Pixmaps with individual dimensions larger than 300 pixels may +not be displayed properly, depending on the arrangement in use. For example, pixmaps wider than 300 pixels +will not be arranged correctly if the icon view uses a +TQIconView::TopToBottom arrangement, and pixmaps taller than 300 pixels +will not be arranged correctly if the icon view uses a +TQIconView::LeftToRight arrangement. +

See also Advanced Widgets. + +


Member Function Documentation

+

TQIconViewItem::TQIconViewItem ( TQIconView * parent ) +

+Constructs a TQIconViewItem and inserts it into icon view parent +with no text and a default icon. + +

TQIconViewItem::TQIconViewItem ( TQIconView * parent, TQIconViewItem * after ) +

+Constructs a TQIconViewItem and inserts it into the icon view parent with no text and a default icon, after the icon view item +after. + +

TQIconViewItem::TQIconViewItem ( TQIconView * parent, const TQString & text ) +

+Constructs an icon view item and inserts it into the icon view parent using text as the text and a default icon. + +

TQIconViewItem::TQIconViewItem ( TQIconView * parent, TQIconViewItem * after, const TQString & text ) +

+Constructs an icon view item and inserts it into the icon view parent using text as the text and a default icon, after the +icon view item after. + +

TQIconViewItem::TQIconViewItem ( TQIconView * parent, const TQString & text, const TQPixmap & icon ) +

+Constructs an icon view item and inserts it into the icon view parent using text as the text and icon as the icon. + +

TQIconViewItem::TQIconViewItem ( TQIconView * parent, TQIconViewItem * after, const TQString & text, const TQPixmap & icon ) +

+Constructs an icon view item and inserts it into the icon view parent using text as the text and icon as the icon, after +the icon view item after. +

See also setPixmap(). + +

TQIconViewItem::TQIconViewItem ( TQIconView * parent, const TQString & text, const TQPicture & picture ) +

+Constructs an icon view item and inserts it into the icon view parent using text as the text and picture as the icon. + +

TQIconViewItem::TQIconViewItem ( TQIconView * parent, TQIconViewItem * after, const TQString & text, const TQPicture & picture ) +

+Constructs an icon view item and inserts it into the icon view parent using text as the text and picture as the icon, after +the icon view item after. + +

TQIconViewItem::~TQIconViewItem () [virtual] +

+Destroys the icon view item and tells the parent icon view that +the item has been destroyed. + +

bool TQIconViewItem::acceptDrop ( const TQMimeSource * mime ) const [virtual] +

+ +

Returns TRUE if you can drop things with a TQMimeSource of mime +onto this item; otherwise returns FALSE. +

The default implementation always returns FALSE. You must subclass +TQIconViewItem and reimplement acceptDrop() to accept drops. + +

Examples: fileiconview/qfileiconview.cpp and iconview/simple_dd/main.cpp. +

void TQIconViewItem::calcRect ( const TQString & text_ = TQString::null ) [virtual protected] +

+This virtual function is responsible for calculating the +rectangles returned by rect(), textRect() and pixmapRect(). +setRect(), setTextRect() and setPixmapRect() are provided mainly +for reimplementations of this function. +

text_ is an internal parameter which defaults to TQString::null. + +

int TQIconViewItem::compare ( TQIconViewItem * i ) const [virtual] +

+Compares this icon view item to i. Returns -1 if this item is +less than i, 0 if they are equal, and 1 if this icon view item +is greater than i. +

The default implementation compares the item keys (key()) using +TQString::localeAwareCompare(). A reimplementation may use +different values and a different comparison function. Here is a +reimplementation that uses plain Unicode comparison: +

+        int MyIconViewItem::compare( TQIconViewItem *i ) const
+        {
+            return key().compare( i->key() );
+        }
+    
+ +

See also key(), TQString::localeAwareCompare(), and TQString::compare(). + +

bool TQIconViewItem::contains ( const TQPoint & pnt ) const +

+Returns TRUE if the item contains the point pnt (in contents +coordinates); otherwise returns FALSE. + +

bool TQIconViewItem::dragEnabled () const +

+Returns TRUE if the user is allowed to drag the icon view item; +otherwise returns FALSE. +

See also setDragEnabled(). + +

void TQIconViewItem::dragEntered () [virtual protected] +

+This function is called when a drag enters the item's bounding +rectangle. +

The default implementation does nothing; subclasses may +reimplement this function. + +

Example: fileiconview/qfileiconview.cpp. +

void TQIconViewItem::dragLeft () [virtual protected] +

+This function is called when a drag leaves the item's bounding +rectangle. +

The default implementation does nothing; subclasses may +reimplement this function. + +

Example: fileiconview/qfileiconview.cpp. +

bool TQIconViewItem::dropEnabled () const +

+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] +

+ +

This function is called when something is dropped on the item. e provides all the information about the drop. If the drag object +of the drop was a TQIconDrag, lst contains the list of the +dropped items. You can get the data by calling +TQIconDragItem::data() on each item. If the lst is empty, i.e. +the drag was not a TQIconDrag, you must decode the data in e and +work with that. +

The default implementation does nothing; subclasses may +reimplement this function. + +

Examples: fileiconview/qfileiconview.cpp and iconview/simple_dd/main.cpp. +

int TQIconViewItem::height () const +

+Returns the height of the item. + +

TQIconView * TQIconViewItem::iconView () const +

+Returns a pointer to this item's icon view parent. + +

int TQIconViewItem::index () const +

+Returns the index of this item in the icon view, or -1 if an error +occurred. + +

bool TQIconViewItem::intersects ( const TQRect & r ) const +

+Returns TRUE if the item intersects the rectangle r (in +contents coordinates); otherwise returns FALSE. + +

bool TQIconViewItem::isSelectable () const +

+Returns TRUE if the item is selectable; otherwise returns FALSE. +

See also setSelectable(). + +

bool TQIconViewItem::isSelected () const +

+Returns TRUE if the item is selected; otherwise returns FALSE. +

See also setSelected(). + +

Example: fileiconview/qfileiconview.cpp. +

TQString TQIconViewItem::key () const [virtual] +

+Returns the key of the icon view item or text() if no key has been +explicitly set. +

See also setKey() and compare(). + +

bool TQIconViewItem::move ( int x, int y ) [virtual] +

+Moves the item to position (x, y) in the icon view (these +are contents coordinates). + +

bool TQIconViewItem::move ( const TQPoint & pnt ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Moves the item to the point pnt. + +

void TQIconViewItem::moveBy ( int dx, int dy ) [virtual] +

+Moves the item dx pixels in the x-direction and dy pixels in +the y-direction. + +

void TQIconViewItem::moveBy ( const TQPoint & pnt ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Moves the item by the x, y values in point pnt. + +

TQIconViewItem * TQIconViewItem::nextItem () const +

+Returns a pointer to the next item, or 0 if this is the last item +in the icon view. +

To find the first item use TQIconView::firstItem(). +

Example: +

+    TQIconViewItem *item;
+    for ( item = iconView->firstItem(); item; item = item->nextItem() )
+        do_something_with( item );
+    
+ +

See also prevItem(). + +

Example: fileiconview/qfileiconview.cpp. +

void TQIconViewItem::paintFocus ( TQPainter * p, const TQColorGroup & cg ) [virtual protected] +

+Paints the focus rectangle of the item using the painter p and +the color group cg. + +

void TQIconViewItem::paintItem ( TQPainter * p, const TQColorGroup & cg ) [virtual protected] +

+Paints the item using the painter p and the color group cg. +If you want the item to be drawn with a different font or color, +reimplement this function, change the values of the color group or +the painter's font, and then call the TQIconViewItem::paintItem() +with the changed values. + +

Example: fileiconview/qfileiconview.cpp. +

TQPicture * TQIconViewItem::picture () const [virtual] +

+Returns the icon of the icon view item if it is a picture, or 0 if +it is a pixmap. In the latter case use pixmap() instead. Normally +you set the picture of the item with setPicture(), but sometimes +it's inconvenient to call setPicture() for every item. So you can +subclass TQIconViewItem, reimplement this function and return a +pointer to the item's picture. If you do this, you must call +calcRect() manually each time the size of this picture changes. +

See also setPicture(). + +

TQPixmap * TQIconViewItem::pixmap () const [virtual] +

+Returns the icon of the icon view item if it is a pixmap, or 0 if +it is a picture. In the latter case use picture() instead. +Normally you set the pixmap of the item with setPixmap(), but +sometimes it's inconvenient to call setPixmap() for every item. So +you can subclass TQIconViewItem, reimplement this function and +return a pointer to the item's pixmap. If you do this, you must +call calcRect() manually each time the size of this pixmap +changes. +

See also setPixmap(). + +

Example: fileiconview/qfileiconview.cpp. +

TQRect TQIconViewItem::pixmapRect ( bool relative = TRUE ) const +

+Returns the bounding rectangle of the item's icon. +

If relative is TRUE, (the default), the rectangle is relative to +the origin of the item's rectangle. If relative is FALSE, the +returned rectangle is relative to the origin of the icon view's +contents coordinate system. + +

Example: fileiconview/qfileiconview.cpp. +

TQPoint TQIconViewItem::pos () const +

+Returns the position of the item (in contents coordinates). + +

TQIconViewItem * TQIconViewItem::prevItem () const +

+Returns a pointer to the previous item, or 0 if this is the first +item in the icon view. +

See also nextItem() and TQIconView::firstItem(). + +

TQRect TQIconViewItem::rect () const +

+Returns the bounding rectangle of the item (in contents +coordinates). + +

void TQIconViewItem::removeRenameBox () [virtual protected] +

+Removes the editbox that is used for in-place renaming. + +

void TQIconViewItem::rename () +

+Starts in-place renaming of an icon, if allowed. +

This function sets up the icon view so that the user can edit the +item text, and then returns. When the user is done, setText() will +be called and TQIconView::itemRenamed() will be emitted (unless the +user canceled, e.g. by pressing the Escape key). +

See also setRenameEnabled(). + +

Example: fileiconview/qfileiconview.cpp. +

bool TQIconViewItem::renameEnabled () const +

+Returns TRUE if the item can be renamed by the user with in-place +renaming; otherwise returns FALSE. +

See also setRenameEnabled(). + +

Example: fileiconview/qfileiconview.cpp. +

void TQIconViewItem::repaint () [virtual] +

+Repaints the item. + +

int TQIconViewItem::rtti () const [virtual] +

+Returns 0. +

Make your derived classes return their own values for rtti(), so +that you can distinguish between icon view item types. You should +use values greater than 1000, preferably a large random number, to +allow for extensions to this class. + +

void TQIconViewItem::setDragEnabled ( bool allow ) [virtual] +

+If allow is TRUE, the icon view permits the user to drag the +icon view item either to another position within the icon view or +to somewhere outside of it. If allow is FALSE, the item cannot +be dragged. + +

void TQIconViewItem::setDropEnabled ( bool allow ) [virtual] +

+If allow is TRUE, the icon view lets the user drop something on +this icon view item. + +

void TQIconViewItem::setItemRect ( const TQRect & r ) [protected] +

+Sets the bounding rectangle of the whole item to r. This +function is provided for subclasses which reimplement calcRect(), +so that they can set the calculated rectangle. Any other use is discouraged. +

See also calcRect(), textRect(), setTextRect(), pixmapRect(), and setPixmapRect(). + +

void TQIconViewItem::setKey ( const TQString & k ) [virtual] +

+Sets k as the sort key of the icon view item. By default +text() is used for sorting. +

See also compare(). + +

Example: fileiconview/qfileiconview.cpp. +

void TQIconViewItem::setPicture ( const TQPicture & icon ) [virtual] +

+Sets icon as the item's icon in the icon view. This function +might be a no-op if you reimplement picture(). +

See also picture(). + +

void TQIconViewItem::setPixmap ( const TQPixmap & icon ) [virtual] +

+Sets icon as the item's icon in the icon view. This function +might be a no-op if you reimplement pixmap(). +

Note: Pixmaps with individual dimensions larger than 300 pixels may +not be displayed properly, depending on the arrangement in use. See the main class + documentation for details. +

See also pixmap(). + +

void TQIconViewItem::setPixmap ( const TQPixmap & icon, bool recalc, bool redraw = TRUE ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets icon as the item's icon in the icon view. If recalc is +TRUE, the icon view's layout is recalculated. If redraw is TRUE +(the default), the icon view is repainted. +

Note: Pixmaps with individual dimensions larger than 300 pixels may +not be displayed properly, depending on the arrangement in use. See the main class + documentation for details. +

See also pixmap(). + +

void TQIconViewItem::setPixmapRect ( const TQRect & r ) [protected] +

+Sets the bounding rectangle of the item's icon to r. This +function is provided for subclasses which reimplement calcRect(), +so that they can set the calculated rectangle. Any other use is discouraged. +

See also calcRect(), pixmapRect(), setItemRect(), and setTextRect(). + +

void TQIconViewItem::setRenameEnabled ( bool allow ) [virtual] +

+If allow is TRUE, the user can rename the icon view item by +clicking on the text (or pressing F2) while the item is selected +(in-place renaming). If allow is FALSE, in-place renaming is +not possible. + +

Examples: fileiconview/qfileiconview.cpp, iconview/main.cpp, and iconview/simple_dd/main.cpp. +

void TQIconViewItem::setSelectable ( bool enable ) [virtual] +

+Sets this item to be selectable if enable is TRUE (the default) +or unselectable if enable is FALSE. +

The user is unable to select a non-selectable item using either +the keyboard or the mouse. (The application programmer can select +an item in code regardless of this setting.) +

See also isSelectable(). + +

void TQIconViewItem::setSelected ( bool s, bool cb ) [virtual] +

+Selects or unselects the item, depending on s; it may also +unselect other items, depending on TQIconView::selectionMode() and +cb. +

If s is FALSE, the item is unselected. +

If s is TRUE and TQIconView::selectionMode() is Single, the +item is selected and the item previously selected is unselected. +

If s is TRUE and TQIconView::selectionMode() is Extended, the +item is selected. If cb is TRUE, the selection state of the +other items is left unchanged. If cb is FALSE (the default) all +other items are unselected. +

If s is TRUE and TQIconView::selectionMode() is Multi, the +item is selected. +

Note that cb is used only if TQIconView::selectionMode() is Extended; cb defaults to FALSE. +

All items whose selection status changes repaint themselves. + +

Example: fileiconview/qfileiconview.cpp. +

void TQIconViewItem::setSelected ( bool s ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This variant is equivalent to calling the other variant with cb +set to FALSE. + +

void TQIconViewItem::setText ( const TQString & text ) [virtual] +

+Sets text as the text of the icon view item. This function +might be a no-op if you reimplement text(). +

See also text(). + +

Example: fileiconview/qfileiconview.cpp. +

void TQIconViewItem::setText ( const TQString & text, bool recalc, bool redraw = TRUE ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets text as the text of the icon view item. If recalc is +TRUE, the icon view's layout is recalculated. If redraw is TRUE +(the default), the icon view is repainted. +

See also text(). + +

void TQIconViewItem::setTextRect ( const TQRect & r ) [protected] +

+Sets the bounding rectangle of the item's text to r. This +function is provided for subclasses which reimplement calcRect(), +so that they can set the calculated rectangle. Any other use is discouraged. +

See also calcRect(), textRect(), setItemRect(), and setPixmapRect(). + +

TQSize TQIconViewItem::size () const +

+Returns the size of the item. + +

TQString TQIconViewItem::text () const [virtual] +

+Returns the text of the icon view item. Normally you set the text +of the item with setText(), but sometimes it's inconvenient to +call setText() for every item; so you can subclass TQIconViewItem, +reimplement this function, and return the text of the item. If you +do this, you must call calcRect() manually each time the text +(and therefore its size) changes. +

See also setText(). + +

Example: fileiconview/qfileiconview.cpp. +

TQRect TQIconViewItem::textRect ( bool relative = TRUE ) const +

+Returns the bounding rectangle of the item's text. +

If relative is TRUE, (the default), the returned rectangle is +relative to the origin of the item's rectangle. If relative is +FALSE, the returned rectangle is relative to the origin of the +icon view's contents coordinate system. + +

Example: fileiconview/qfileiconview.cpp. +

int TQIconViewItem::width () const +

+Returns the width of the item. + +

int TQIconViewItem::x () const +

+Returns the x-coordinate of the item (in contents coordinates). + +

int TQIconViewItem::y () const +

+Returns the y-coordinate of the item (in contents coordinates). + + +

+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/qimage-h.html b/doc/html/qimage-h.html new file mode 100644 index 00000000..0892e74d --- /dev/null +++ b/doc/html/qimage-h.html @@ -0,0 +1,470 @@ + + + + + +qimage.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qimage.h

+ +

This is the verbatim text of the qimage.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qimage.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQImage and TQImageIO classes
+**
+** Created : 950207
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQIMAGE_H
+#define TQIMAGE_H
+
+#ifndef QT_H
+#include "qpixmap.h"
+#include "qstrlist.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+class TQImageDataMisc; // internal
+#ifndef QT_NO_IMAGE_TEXT
+class Q_EXPORT TQImageTextKeyLang {
+public:
+    TQImageTextKeyLang(const char* k, const char* l) : key(k), lang(l) { }
+    TQImageTextKeyLang() { }
+
+    TQCString key;
+    TQCString lang;
+
+    bool operator< (const TQImageTextKeyLang& other) const
+	{ return key < other.key || key==other.key && lang < other.lang; }
+    bool operator== (const TQImageTextKeyLang& other) const
+	{ return key==other.key && lang==other.lang; }
+};
+#endif //QT_NO_IMAGE_TEXT
+
+
+class Q_EXPORT TQImage
+{
+public:
+    enum Endian { IgnoreEndian, BigEndian, LittleEndian };
+
+    TQImage();
+    TQImage( int width, int height, int depth, int numColors=0,
+	    Endian bitOrder=IgnoreEndian );
+    TQImage( const TQSize&, int depth, int numColors=0,
+	    Endian bitOrder=IgnoreEndian );
+#ifndef QT_NO_IMAGEIO
+    TQImage( const TQString &fileName, const char* format=0 );
+    TQImage( const char * const xpm[] );
+    TQImage( const TQByteArray &data );
+#endif
+    TQImage( uchar* data, int w, int h, int depth,
+		TQRgb* colortable, int numColors,
+		Endian bitOrder );
+#ifdef Q_WS_QWS
+    TQImage( uchar* data, int w, int h, int depth, int pbl,
+		TQRgb* colortable, int numColors,
+		Endian bitOrder );
+#endif
+    TQImage( const TQImage & );
+   ~TQImage();
+
+    TQImage     &operator=( const TQImage & );
+    TQImage     &operator=( const TQPixmap & );
+    bool	operator==( const TQImage & ) const;
+    bool	operator!=( const TQImage & ) const;
+    void	detach();
+    TQImage	copy()		const;
+    TQImage	copy(int x, int y, int w, int h, int conversion_flags=0) const;
+    TQImage	copy(const TQRect&)	const;
+#ifndef QT_NO_MIME
+    static TQImage fromMimeSource( const TQString& abs_name );
+#endif
+    bool	isNull()	const	{ return data->bits == 0; }
+
+    int		width()		const	{ return data->w; }
+    int		height()	const	{ return data->h; }
+    TQSize	size()		const	{ return TQSize(data->w,data->h); }
+    TQRect	rect()		const	{ return TQRect(0,0,data->w,data->h); }
+    int		depth()		const	{ return data->d; }
+    int		numColors()	const	{ return data->ncols; }
+    Endian	bitOrder()	const	{ return (Endian) data->bitordr; }
+
+    TQRgb	color( int i )	const;
+    void	setColor( int i, TQRgb c );
+    void	setNumColors( int );
+
+    bool	hasAlphaBuffer() const;
+    void	setAlphaBuffer( bool );
+
+    bool	allGray() const;
+    bool        isGrayscale() const;
+
+    uchar      *bits()		const;
+    uchar      *scanLine( int ) const;
+    uchar     **jumpTable()	const;
+    TQRgb       *colorTable()	const;
+    int		numBytes()	const;
+    int		bytesPerLine()	const;
+
+#ifdef Q_WS_QWS
+    TQGfx * graphicsContext();
+#endif
+
+    bool	create( int width, int height, int depth, int numColors=0,
+			Endian bitOrder=IgnoreEndian );
+    bool	create( const TQSize&, int depth, int numColors=0,
+			Endian bitOrder=IgnoreEndian );
+    void	reset();
+
+    void	fill( uint pixel );
+    void	invertPixels( bool invertAlpha = TRUE );
+
+    TQImage	convertDepth( int ) const;
+#ifndef QT_NO_IMAGE_TRUECOLOR
+    TQImage	convertDepthWithPalette( int, TQRgb* p, int pc, int cf=0 ) const;
+#endif
+    TQImage	convertDepth( int, int conversion_flags ) const;
+    TQImage	convertBitOrder( Endian ) const;
+
+    enum ScaleMode {
+	ScaleFree,
+	ScaleMin,
+	ScaleMax
+    };
+#ifndef QT_NO_IMAGE_SMOOTHSCALE
+    TQImage smoothScale( int w, int h, ScaleMode mode=ScaleFree ) const;
+    TQImage smoothScale( const TQSize& s, ScaleMode mode=ScaleFree ) const;
+#endif
+#ifndef QT_NO_IMAGE_TRANSFORMATION
+    TQImage scale( int w, int h, ScaleMode mode=ScaleFree ) const;
+    TQImage scale( const TQSize& s, ScaleMode mode=ScaleFree ) const;
+    TQImage scaleWidth( int w ) const;
+    TQImage scaleHeight( int h ) const;
+    TQImage xForm( const TQWMatrix &matrix ) const;
+#endif
+
+#ifndef QT_NO_IMAGE_DITHER_TO_1
+    TQImage	createAlphaMask( int conversion_flags=0 ) const;
+#endif
+#ifndef QT_NO_IMAGE_HEURISTIC_MASK
+    TQImage	createHeuristicMask( bool clipTight=TRUE ) const;
+#endif
+#ifndef QT_NO_IMAGE_MIRROR
+    TQImage	mirror() const;
+    TQImage	mirror(bool horizontally, bool vertically) const;
+#endif
+    TQImage	swapRGB() const;
+
+    static Endian systemBitOrder();
+    static Endian systemByteOrder();
+
+#ifndef QT_NO_IMAGEIO
+    static const char* imageFormat( const TQString &fileName );
+    static TQStrList inputFormats();
+    static TQStrList outputFormats();
+#ifndef QT_NO_STRINGLIST
+    static TQStringList inputFormatList();
+    static TQStringList outputFormatList();
+#endif
+    bool	load( const TQString &fileName, const char* format=0 );
+    bool	loadFromData( const uchar *buf, uint len,
+			      const char *format=0 );
+    bool	loadFromData( TQByteArray data, const char* format=0 );
+    bool	save( const TQString &fileName, const char* format,
+		      int quality=-1 ) const;
+    bool	save( TQIODevice * device, const char* format,
+		      int quality=-1 ) const;
+#endif //QT_NO_IMAGEIO
+
+    bool	valid( int x, int y ) const;
+    int		pixelIndex( int x, int y ) const;
+    TQRgb	pixel( int x, int y ) const;
+    void	setPixel( int x, int y, uint index_or_rgb );
+
+    // Auxiliary data
+    int dotsPerMeterX() const;
+    int dotsPerMeterY() const;
+    void setDotsPerMeterX(int);
+    void setDotsPerMeterY(int);
+    TQPoint offset() const;
+    void setOffset(const TQPoint&);
+#ifndef QT_NO_IMAGE_TEXT
+    TQValueList<TQImageTextKeyLang> textList() const;
+    TQStringList textLanguages() const;
+    TQStringList textKeys() const;
+    TQString text(const char* key, const char* lang=0) const;
+    TQString text(const TQImageTextKeyLang&) const;
+    void setText(const char* key, const char* lang, const TQString&);
+#endif
+private:
+    void	init();
+    void	reinit();
+    void	freeBits();
+    static void	warningIndexRange( const char *, int );
+
+    struct TQImageData : public TQShared {	// internal image data
+	int	w;				// image width
+	int	h;				// image height
+	int	d;				// image depth
+	int	ncols;				// number of colors
+	int	nbytes;				// number of bytes data
+	int	bitordr;			// bit order (1 bit depth)
+	TQRgb   *ctbl;				// color table
+	uchar **bits;				// image data
+	bool	alpha;				// alpha buffer
+	int	dpmx;				// dots per meter X (or 0)
+	int	dpmy;				// dots per meter Y (or 0)
+	TQPoint	offset;				// offset in pixels
+#ifndef QT_NO_IMAGE_TEXT
+	TQImageDataMisc* misc;			// less common stuff
+#endif
+	bool    ctbl_mine;			// this allocated ctbl
+    } *data;
+#ifndef QT_NO_IMAGE_TEXT
+    TQImageDataMisc& misc() const;
+#endif
+#ifndef QT_NO_IMAGEIO
+    bool doImageIO( TQImageIO* io, int quality ) const;
+#endif
+    friend Q_EXPORT void bitBlt( TQImage* dst, int dx, int dy,
+				 const TQImage* src, int sx, int sy,
+				 int sw, int sh, int conversion_flags );
+};
+
+
+// TQImage stream functions
+
+#if !defined(QT_NO_DATASTREAM) && !defined(QT_NO_IMAGEIO)
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQImage & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQImage & );
+#endif
+
+#ifndef QT_NO_IMAGEIO
+class TQIODevice;
+typedef void (*image_io_handler)( TQImageIO * ); // image IO handler
+
+
+struct TQImageIOData;
+
+
+class Q_EXPORT TQImageIO
+{
+public:
+    TQImageIO();
+    TQImageIO( TQIODevice	 *ioDevice, const char *format );
+    TQImageIO( const TQString &fileName, const char* format );
+   ~TQImageIO();
+
+
+    const TQImage &image()	const	{ return im; }
+    int		status()	const	{ return iostat; }
+    const char *format()	const	{ return frmt; }
+    TQIODevice  *ioDevice()	const	{ return iodev; }
+    TQString	fileName()	const	{ return fname; }
+    int		quality()	const;
+    TQString	description()	const	{ return descr; }
+    const char *parameters()	const;
+    float gamma() const;
+
+    void	setImage( const TQImage & );
+    void	setStatus( int );
+    void	setFormat( const char * );
+    void	setIODevice( TQIODevice * );
+    void	setFileName( const TQString & );
+    void	setQuality( int );
+    void	setDescription( const TQString & );
+    void	setParameters( const char * );
+    void	setGamma( float );
+
+    bool	read();
+    bool	write();
+
+    static const char* imageFormat( const TQString &fileName );
+    static const char *imageFormat( TQIODevice * );
+    static TQStrList inputFormats();
+    static TQStrList outputFormats();
+
+    static void defineIOHandler( const char *format,
+				 const char *header,
+				 const char *flags,
+				 image_io_handler read_image,
+				 image_io_handler write_image );
+
+private:
+    void	init();
+
+    TQImage	im;				// image
+    int		iostat;				// IO status
+    TQCString	frmt;				// image format
+    TQIODevice  *iodev;				// IO device
+    TQString	fname;				// file name
+    char       *params;				// image parameters //### change to TQImageIOData *d in 3.0
+    TQString     descr;				// image description
+    TQImageIOData *d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQImageIO( const TQImageIO & );
+    TQImageIO &operator=( const TQImageIO & );
+#endif
+};
+
+#endif //QT_NO_IMAGEIO
+
+Q_EXPORT void bitBlt( TQImage* dst, int dx, int dy, const TQImage* src,
+		      int sx=0, int sy=0, int sw=-1, int sh=-1,
+		      int conversion_flags=0 );
+
+
+/*****************************************************************************
+  TQImage member functions
+ *****************************************************************************/
+
+inline bool TQImage::hasAlphaBuffer() const
+{
+    return data->alpha;
+}
+
+inline uchar *TQImage::bits() const
+{
+    return data->bits ? data->bits[0] : 0;
+}
+
+inline uchar **TQImage::jumpTable() const
+{
+    return data->bits;
+}
+
+inline TQRgb *TQImage::colorTable() const
+{
+    return data->ctbl;
+}
+
+inline int TQImage::numBytes() const
+{
+    return data->nbytes;
+}
+
+inline int TQImage::bytesPerLine() const
+{
+    return data->h ? data->nbytes/data->h : 0;
+}
+
+inline TQImage TQImage::copy(const TQRect& r) const
+{
+    return copy(r.x(), r.y(), r.width(), r.height());
+}
+
+inline TQRgb TQImage::color( int i ) const
+{
+#if defined(QT_CHECK_RANGE)
+    if ( i >= data->ncols )
+	warningIndexRange( "color", i );
+#endif
+    return data->ctbl ? data->ctbl[i] : (TQRgb)-1;
+}
+
+inline void TQImage::setColor( int i, TQRgb c )
+{
+#if defined(QT_CHECK_RANGE)
+    if ( i >= data->ncols )
+	warningIndexRange( "setColor", i );
+#endif
+    if ( data->ctbl )
+	data->ctbl[i] = c;
+}
+
+inline uchar *TQImage::scanLine( int i ) const
+{
+#if defined(QT_CHECK_RANGE)
+    if ( i >= data->h )
+	warningIndexRange( "scanLine", i );
+#endif
+    return data->bits ? data->bits[i] : 0;
+}
+
+inline int TQImage::dotsPerMeterX() const
+{
+    return data->dpmx;
+}
+
+inline int TQImage::dotsPerMeterY() const
+{
+    return data->dpmy;
+}
+
+inline TQPoint TQImage::offset() const
+{
+    return data->offset;
+}
+
+
+#endif // TQIMAGE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qimage-members.html b/doc/html/qimage-members.html new file mode 100644 index 00000000..409bbc51 --- /dev/null +++ b/doc/html/qimage-members.html @@ -0,0 +1,116 @@ + + + + + +TQImage Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQImage

+ +

This is the complete list of member functions for +TQImage, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qimage.html b/doc/html/qimage.html new file mode 100644 index 00000000..a050b5b3 --- /dev/null +++ b/doc/html/qimage.html @@ -0,0 +1,1117 @@ + + + + + +TQImage Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQImage Class Reference

+ +

The TQImage class provides a hardware-independent pixmap +representation with direct access to the pixel data. +More... +

#include <qimage.h> +

List of all member functions. +

Public Members

+
    +
  • enum Endian { IgnoreEndian, BigEndian, LittleEndian }
  • +
  • TQImage ()
  • +
  • TQImage ( int w, int h, int depth, int numColors = 0, Endian bitOrder = IgnoreEndian )
  • +
  • TQImage ( const TQSize & size, int depth, int numColors = 0, Endian bitOrder = IgnoreEndian )
  • +
  • TQImage ( const TQString & fileName, const char * format = 0 )
  • +
  • TQImage ( const char * const xpm[] )
  • +
  • TQImage ( const TQByteArray & array )
  • +
  • TQImage ( uchar * yourdata, int w, int h, int depth, TQRgb * colortable, int numColors, Endian bitOrder )
  • +
  • TQImage ( uchar * yourdata, int w, int h, int depth, int bpl, TQRgb * colortable, int numColors, Endian bitOrder )
  • +
  • TQImage ( const TQImage & image )
  • +
  • ~TQImage ()
  • +
  • TQImage & operator= ( const TQImage & image )
  • +
  • TQImage & operator= ( const TQPixmap & pixmap )
  • +
  • bool operator== ( const TQImage & i ) const
  • +
  • bool operator!= ( const TQImage & i ) const
  • +
  • void detach ()
  • +
  • TQImage copy () const
  • +
  • TQImage copy ( int x, int y, int w, int h, int conversion_flags = 0 ) const
  • +
  • TQImage copy ( const TQRect & r ) const
  • +
  • bool isNull () const
  • +
  • int width () const
  • +
  • int height () const
  • +
  • TQSize size () const
  • +
  • TQRect rect () const
  • +
  • int depth () const
  • +
  • int numColors () const
  • +
  • Endian bitOrder () const
  • +
  • TQRgb color ( int i ) const
  • +
  • void setColor ( int i, TQRgb c )
  • +
  • void setNumColors ( int numColors )
  • +
  • bool hasAlphaBuffer () const
  • +
  • void setAlphaBuffer ( bool enable )
  • +
  • bool allGray () const
  • +
  • bool isGrayscale () const
  • +
  • uchar * bits () const
  • +
  • uchar * scanLine ( int i ) const
  • +
  • uchar ** jumpTable () const
  • +
  • TQRgb * colorTable () const
  • +
  • int numBytes () const
  • +
  • int bytesPerLine () const
  • +
  • bool create ( int width, int height, int depth, int numColors = 0, Endian bitOrder = IgnoreEndian )
  • +
  • bool create ( const TQSize &, int depth, int numColors = 0, Endian bitOrder = IgnoreEndian )
  • +
  • void reset ()
  • +
  • void fill ( uint pixel )
  • +
  • void invertPixels ( bool invertAlpha = TRUE )
  • +
  • TQImage convertDepth ( int depth ) const
  • +
  • TQImage convertDepthWithPalette ( int d, TQRgb * palette, int palette_count, int conversion_flags = 0 ) const
  • +
  • TQImage convertDepth ( int depth, int conversion_flags ) const
  • +
  • TQImage convertBitOrder ( Endian bitOrder ) const
  • +
  • enum ScaleMode { ScaleFree, ScaleMin, ScaleMax }
  • +
  • TQImage smoothScale ( int w, int h, ScaleMode mode = ScaleFree ) const
  • +
  • TQImage smoothScale ( const TQSize & s, ScaleMode mode = ScaleFree ) const
  • +
  • TQImage scale ( int w, int h, ScaleMode mode = ScaleFree ) const
  • +
  • TQImage scale ( const TQSize & s, ScaleMode mode = ScaleFree ) const
  • +
  • TQImage scaleWidth ( int w ) const
  • +
  • TQImage scaleHeight ( int h ) const
  • +
  • TQImage xForm ( const TQWMatrix & matrix ) const
  • +
  • TQImage createAlphaMask ( int conversion_flags = 0 ) const
  • +
  • TQImage createHeuristicMask ( bool clipTight = TRUE ) const
  • +
  • TQImage mirror () const
  • +
  • TQImage mirror ( bool horizontal, bool vertical ) const
  • +
  • TQImage swapRGB () const
  • +
  • bool load ( const TQString & fileName, const char * format = 0 )
  • +
  • bool loadFromData ( const uchar * buf, uint len, const char * format = 0 )
  • +
  • bool loadFromData ( TQByteArray buf, const char * format = 0 )
  • +
  • bool save ( const TQString & fileName, const char * format, int quality = -1 ) const
  • +
  • bool save ( TQIODevice * device, const char * format, int quality = -1 ) const
  • +
  • bool valid ( int x, int y ) const
  • +
  • int pixelIndex ( int x, int y ) const
  • +
  • TQRgb pixel ( int x, int y ) const
  • +
  • void setPixel ( int x, int y, uint index_or_rgb )
  • +
  • int dotsPerMeterX () const
  • +
  • int dotsPerMeterY () const
  • +
  • void setDotsPerMeterX ( int x )
  • +
  • void setDotsPerMeterY ( int y )
  • +
  • TQPoint offset () const
  • +
  • void setOffset ( const TQPoint & p )
  • +
  • TQValueList<TQImageTextKeyLang> textList () const
  • +
  • TQStringList textLanguages () const
  • +
  • TQStringList textKeys () const
  • +
  • TQString text ( const char * key, const char * lang = 0 ) const
  • +
  • TQString text ( const TQImageTextKeyLang & kl ) const
  • +
  • void setText ( const char * key, const char * lang, const TQString & s )
  • +
+

Static Public Members

+ +

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQImage & image )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQImage & image )
  • +
  • void bitBlt ( TQImage * dst, int dx, int dy, const TQImage * src, int sx, int sy, int sw, int sh, int conversion_flags )
  • +
+

Detailed Description

+ + +The TQImage class provides a hardware-independent pixmap +representation with direct access to the pixel data. +

+ + + +

It is one of the two classes TQt provides for dealing with images, +the other being TQPixmap. TQImage is designed and optimized for I/O +and for direct pixel access/manipulation. TQPixmap is designed and +optimized for drawing. There are (slow) functions to convert +between TQImage and TQPixmap: TQPixmap::convertToImage() and +TQPixmap::convertFromImage(). +

An image has the parameters width, height and depth (bits per +pixel, bpp), a color table and the actual pixels. TQImage supports 1-bpp, 8-bpp and 32-bpp image +data. 1-bpp and 8-bpp images use a color lookup table; the pixel +value is a color table index. +

32-bpp images encode an RGB value in 24 bits and ignore the color +table. The most significant byte is used for the alpha buffer. +

An entry in the color table is an RGB triplet encoded as a uint. Use the qRed(), qGreen() and qBlue() functions (qcolor.h) to access the components, and qRgb to make an RGB triplet (see the TQColor class +documentation). +

1-bpp (monochrome) images have a color table with a most two +colors. There are two different formats: big endian (MSB first) or +little endian (LSB first) bit order. To access a single bit you +will must do some bit shifts: +

+    TQImage image;
+    // sets bit at (x,y) to 1
+    if ( image.bitOrder() == TQImage::LittleEndian )
+        *(image.scanLine(y) + (x >> 3)) |= 1 << (x & 7);
+    else
+        *(image.scanLine(y) + (x >> 3)) |= 1 << (7 - (x & 7));
+    
+ +

If this looks complicated, it might be a good idea to convert the +1-bpp image to an 8-bpp image using convertDepth(). +

8-bpp images are much easier to work with than 1-bpp images +because they have a single byte per pixel: +

+    TQImage image;
+    // set entry 19 in the color table to yellow
+    image.setColor( 19, qRgb(255,255,0) );
+    // set 8 bit pixel at (x,y) to value yellow (in color table)
+    *(image.scanLine(y) + x) = 19;
+    
+ +

32-bpp images ignore the color table; instead, each pixel contains +the RGB triplet. 24 bits contain the RGB value; the most +significant byte is reserved for the alpha buffer. +

+    TQImage image;
+    // sets 32 bit pixel at (x,y) to yellow.
+    uint *p = (uint *)image.scanLine(y) + x;
+    *p = qRgb(255,255,0);
+    
+ +

On TQt/Embedded, scanlines are aligned to the pixel depth and may +be padded to any degree, while on all other platforms, the +scanlines are 32-bit aligned for all depths. The constructor +taking a uchar* argument always expects 32-bit aligned data. +On TQt/Embedded, an additional constructor allows the number of +bytes-per-line to be specified. +

TQImage supports a variety of methods for getting information about +the image, for example, colorTable(), allGray(), isGrayscale(), +bitOrder(), bytesPerLine(), depth(), dotsPerMeterX() and +dotsPerMeterY(), hasAlphaBuffer(), numBytes(), numColors(), and +width() and height(). +

Pixel colors are retrieved with pixel() and set with setPixel(). +

TQImage also supports a number of functions for creating a new +image that is a transformed version of the original. For example, +copy(), convertBitOrder(), convertDepth(), createAlphaMask(), +createHeuristicMask(), mirror(), scale(), smoothScale(), swapRGB() +and xForm(). There are also functions for changing attributes of +an image in-place, for example, setAlphaBuffer(), setColor(), +setDotsPerMeterX() and setDotsPerMeterY() and setNumColors(). +

Images can be loaded and saved in the supported formats. Images +are saved to a file with save(). Images are loaded from a file +with load() (or in the constructor) or from an array of data with +loadFromData(). The lists of supported formats are available from +inputFormatList() and outputFormatList(). +

Strings of text may be added to images using setText(). +

The TQImage class uses explicit sharing, +similar to that used by TQMemArray. +

New image formats can be added as plugins. +

See also TQImageIO, TQPixmap, Shared Classes, Graphics Classes, Image Processing Classes, and Implicitly and Explicitly Shared Classes. + +


Member Type Documentation

+

TQImage::Endian

+ +

This enum type is used to describe the endianness of the CPU and +graphics hardware. +

    +
  • TQImage::IgnoreEndian - Endianness does not matter. Useful for some +operations that are independent of endianness. +
  • TQImage::BigEndian - Network byte order, as on SPARC and Motorola CPUs. +
  • TQImage::LittleEndian - PC/Alpha byte order. +
+

TQImage::ScaleMode

+ +

The functions scale() and smoothScale() use different modes for +scaling the image. The purpose of these modes is to retain the +ratio of the image if this is retquired. +

+
    +
  • TQImage::ScaleFree - The image is scaled freely: the resulting image +fits exactly into the specified size; the ratio will not +necessarily be preserved. +
  • TQImage::ScaleMin - The ratio of the image is preserved and the +resulting image is guaranteed to fit into the specified size +(it is as large as possible within these constraints) - the +image might be smaller than the requested size. +
  • TQImage::ScaleMax - The ratio of the image is preserved and the +resulting image fills the whole specified rectangle (it is as +small as possible within these constraints) - the image might +be larger than the requested size. +
+

Member Function Documentation

+

TQImage::TQImage () +

+Constructs a null image. +

See also isNull(). + +

TQImage::TQImage ( int w, int h, int depth, int numColors = 0, Endian bitOrder = IgnoreEndian ) +

+Constructs an image with w width, h height, depth bits +per pixel, numColors colors and bit order bitOrder. +

Using this constructor is the same as first constructing a null +image and then calling the create() function. +

See also create(). + +

TQImage::TQImage ( const TQSize & size, int depth, int numColors = 0, Endian bitOrder = IgnoreEndian ) +

+Constructs an image with size size pixels, depth depth bits, +numColors and bitOrder endianness. +

Using this constructor is the same as first constructing a null +image and then calling the create() function. +

See also create(). + +

TQImage::TQImage ( const TQString & fileName, const char * format = 0 ) +

+Constructs an image and tries to load the image from the file fileName. +

If format is specified, the loader attempts to read the image +using the specified format. If format is not specified (which +is the default), the loader reads a few bytes from the header to +guess the file format. +

If the loading of the image failed, this object is a null image. +

The TQImageIO documentation lists the supported image formats and +explains how to add extra formats. +

See also load(), isNull(), and TQImageIO. + +

TQImage::TQImage ( const char * const xpm[] ) +

+Constructs an image from xpm, which must be a valid XPM image. +

Errors are silently ignored. +

Note that it's possible to squeeze the XPM variable a little bit +by using an unusual declaration: +

+        static const char * const start_xpm[]={
+            "16 15 8 1",
+            "a c #cec6bd",
+        ....
+    
+ +

The extra const makes the entire definition read-only, which is +slightly more efficient (e.g. when the code is in a shared +library) and ROMable when the application is to be stored in ROM. + +

TQImage::TQImage ( const TQByteArray & array ) +

+Constructs an image from the binary data array. It tries to +guess the file format. +

If the loading of the image failed, this object is a null image. +

See also loadFromData(), isNull(), and imageFormat(). + +

TQImage::TQImage ( uchar * yourdata, int w, int h, int depth, TQRgb * colortable, int numColors, Endian bitOrder ) +

+Constructs an image w pixels wide, h pixels high with a +color depth of depth, that uses an existing memory buffer, yourdata. The buffer must remain valid throughout the life of the +TQImage. The image does not delete the buffer at destruction. +

If colortable is 0, a color table sufficient for numColors +will be allocated (and destructed later). +

Note that yourdata must be 32-bit aligned. +

The endianness is given in bitOrder. + +

TQImage::TQImage ( uchar * yourdata, int w, int h, int depth, int bpl, TQRgb * colortable, int numColors, Endian bitOrder ) +

+Constructs an image that uses an existing memory buffer. The +buffer must remain valid for the life of the TQImage. The image +does not delete the buffer at destruction. The buffer is passed as +yourdata. The image's width is w and its height is h. The +color depth is depth. bpl specifies the number of bytes per +line. +

If colortable is 0, a color table sufficient for numColors +will be allocated (and destructed later). +

The endianness is specified by bitOrder. +

Warning: This constructor is only available on TQt/Embedded. + +

TQImage::TQImage ( const TQImage & image ) +

+Constructs a shallow copy of image. + +

TQImage::~TQImage () +

+Destroys the image and cleans up. + +

bool TQImage::allGray () const +

+Returns TRUE if all the colors in the image are shades of gray +(i.e. their red, green and blue components are equal); otherwise +returns FALSE. +

This function is slow for large 16-bit (TQt/Embedded only) and 32-bit images. +

See also isGrayscale(). + +

Endian TQImage::bitOrder () const +

+ +

Returns the bit order for the image. +

If it is a 1-bpp image, this function returns either +TQImage::BigEndian or TQImage::LittleEndian. +

If it is not a 1-bpp image, this function returns +TQImage::IgnoreEndian. +

See also depth(). + +

uchar * TQImage::bits () const +

+ +

Returns a pointer to the first pixel data. This is equivalent to +scanLine(0). +

See also numBytes(), scanLine(), and jumpTable(). + +

Example: opengl/texture/gltexobj.cpp. +

int TQImage::bytesPerLine () const +

+ +

Returns the number of bytes per image scanline. This is equivalent +to numBytes()/height(). +

See also numBytes() and scanLine(). + +

TQRgb TQImage::color ( int i ) const +

+ +

Returns the color in the color table at index i. The first +color is at index 0. +

A color value is an RGB triplet. Use the qRed(), qGreen() and qBlue() functions (defined in qcolor.h) to +get the color value components. +

See also setColor(), numColors(), and TQColor. + +

Example: themes/wood.cpp. +

TQRgb * TQImage::colorTable () const +

+ +

Returns a pointer to the color table. +

See also numColors(). + +

TQImage TQImage::convertBitOrder ( Endian bitOrder ) const +

+Converts the bit order of the image to bitOrder and returns the +converted image. The original image is not changed. +

Returns *this if the bitOrder is equal to the image bit +order, or a null image if this image cannot +be converted. +

See also bitOrder(), systemBitOrder(), and isNull(). + +

TQImage TQImage::convertDepth ( int depth, int conversion_flags ) const +

+Converts the depth (bpp) of the image to depth and returns the +converted image. The original image is not changed. +

The depth argument must be 1, 8, 16 (TQt/Embedded only) or 32. +

Returns *this if depth is equal to the image depth, or a +null image if this image cannot be +converted. +

If the image needs to be modified to fit in a lower-resolution +result (e.g. converting from 32-bit to 8-bit), use the conversion_flags to specify how you'd prefer this to happen. +

See also TQt::ImageConversionFlags, depth(), and isNull(). + +

TQImage TQImage::convertDepth ( int depth ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

TQImage TQImage::convertDepthWithPalette ( int d, TQRgb * palette, int palette_count, int conversion_flags = 0 ) const +

+Returns an image with depth d, using the palette_count +colors pointed to by palette. If d is 1 or 8, the returned +image will have its color table ordered the same as palette. +

If the image needs to be modified to fit in a lower-resolution +result (e.g. converting from 32-bit to 8-bit), use the conversion_flags to specify how you'd prefer this to happen. +

Note: currently no closest-color search is made. If colors are +found that are not in the palette, the palette may not be used at +all. This result should not be considered valid because it may +change in future implementations. +

Currently inefficient for non-32-bit images. +

See also TQt::ImageConversionFlags. + +

TQImage TQImage::copy () const +

+Returns a deep copy of the image. +

See also detach(). + +

TQImage TQImage::copy ( int x, int y, int w, int h, int conversion_flags = 0 ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a deep copy of a sub-area of +the image. +

The returned image is always w by h pixels in size, and is +copied from position x, y in this image. In areas beyond +this image pixels are filled with pixel 0. +

If the image needs to be modified to fit in a lower-resolution +result (e.g. converting from 32-bit to 8-bit), use the conversion_flags to specify how you'd prefer this to happen. +

See also bitBlt() and TQt::ImageConversionFlags. + +

TQImage TQImage::copy ( const TQRect & r ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a deep copy of a sub-area of +the image. +

The returned image always has the size of the rectangle r. In +areas beyond this image pixels are filled with pixel 0. + +

bool TQImage::create ( int width, int height, int depth, int numColors = 0, Endian bitOrder = IgnoreEndian ) +

+Sets the image width, height, depth, its number of colors +(in numColors), and bit order. Returns TRUE if successful, or +FALSE if the parameters are incorrect or if memory cannot be +allocated. +

The width and height is limited to 32767. depth must be +1, 8, or 32. If depth is 1, bitOrder must be set to +either TQImage::LittleEndian or TQImage::BigEndian. For other depths +bitOrder must be TQImage::IgnoreEndian. +

This function allocates a color table and a buffer for the image +data. The image data is not initialized. +

The image buffer is allocated as a single block that consists of a +table of scanline pointers (jumpTable()) +and the image data (bits()). +

See also fill(), width(), height(), depth(), numColors(), bitOrder(), jumpTable(), scanLine(), bits(), bytesPerLine(), and numBytes(). + +

bool TQImage::create ( const TQSize &, int depth, int numColors = 0, Endian bitOrder = IgnoreEndian ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

TQImage TQImage::createAlphaMask ( int conversion_flags = 0 ) const +

+Builds and returns a 1-bpp mask from the alpha buffer in this +image. Returns a null image if alpha buffer mode is disabled. +

See TQPixmap::convertFromImage() for a description of the conversion_flags argument. +

The returned image has little-endian bit order, which you can +convert to big-endianness using convertBitOrder(). +

See also createHeuristicMask(), hasAlphaBuffer(), and setAlphaBuffer(). + +

TQImage TQImage::createHeuristicMask ( bool clipTight = TRUE ) const +

+Creates and returns a 1-bpp heuristic mask for this image. It +works by selecting a color from one of the corners, then chipping +away pixels of that color starting at all the edges. +

The four corners vote for which color is to be masked away. In +case of a draw (this generally means that this function is not +applicable to the image), the result is arbitrary. +

The returned image has little-endian bit order, which you can +convert to big-endianness using convertBitOrder(). +

If clipTight is TRUE the mask is just large enough to cover the +pixels; otherwise, the mask is larger than the data pixels. +

This function disregards the alpha buffer. +

See also createAlphaMask(). + +

int TQImage::depth () const +

+ +

Returns the depth of the image. +

The image depth is the number of bits used to encode a single +pixel, also called bits per pixel (bpp) or bit planes of an image. +

The supported depths are 1, 8, 16 (TQt/Embedded only) and 32. +

See also convertDepth(). + +

void TQImage::detach () +

+Detaches from shared image data and makes sure that this image is +the only one referring to the data. +

If multiple images share common data, this image makes a copy of +the data and detaches itself from the sharing mechanism. +Nothing is done if there is just a single reference. +

See also copy(). + +

Example: themes/wood.cpp. +

int TQImage::dotsPerMeterX () const +

+ +

Returns the number of pixels that fit horizontally in a physical +meter. This and dotsPerMeterY() define the intended scale and +aspect ratio of the image. +

See also setDotsPerMeterX(). + +

int TQImage::dotsPerMeterY () const +

+ +

Returns the number of pixels that fit vertically in a physical +meter. This and dotsPerMeterX() define the intended scale and +aspect ratio of the image. +

See also setDotsPerMeterY(). + +

void TQImage::fill ( uint pixel ) +

+Fills the entire image with the pixel value pixel. +

If the depth of this image is 1, only the +lowest bit is used. If you say fill(0), fill(2), etc., the image +is filled with 0s. If you say fill(1), fill(3), etc., the image is +filled with 1s. If the depth is 8, the lowest 8 bits are used. +

If the depth is 32 and the image has no alpha buffer, the pixel +value is written to each pixel in the image. If the image has an +alpha buffer, only the 24 RGB bits are set and the upper 8 bits +(alpha value) are left unchanged. +

Note: TQImage::pixel() returns the color of the pixel at the given +coordinates; TQColor::pixel() returns the pixel value of the +underlying window system (essentially an index value), so normally +you will want to use TQImage::pixel() to use a color from an +existing image or TQColor::rgb() to use a specific color. +

See also invertPixels(), depth(), hasAlphaBuffer(), and create(). + +

TQImage TQImage::fromMimeSource ( const TQString & abs_name ) [static] +

Convenience function. Gets the data associated with the absolute +name abs_name from the default mime source factory and decodes it +to an image. +

See also TQMimeSourceFactory, TQImage::fromMimeSource(), and TQImageDrag::decode(). + +

bool TQImage::hasAlphaBuffer () const +

+ +

Returns TRUE if alpha buffer mode is enabled; otherwise returns +FALSE. +

See also setAlphaBuffer(). + +

int TQImage::height () const +

+ +

Returns the height of the image. +

See also width(), size(), and rect(). + +

Examples: canvas/canvas.cpp and opengl/texture/gltexobj.cpp. +

const char * TQImage::imageFormat ( const TQString & fileName ) [static] +

+Returns a string that specifies the image format of the file fileName, or 0 if the file cannot be read or if the format is not +recognized. +

The TQImageIO documentation lists the guaranteed supported image +formats, or use TQImage::inputFormats() and TQImage::outputFormats() +to get lists that include the installed formats. +

See also load() and save(). + +

TQStringList TQImage::inputFormatList () [static] +

+Returns a list of image formats that are supported for image +input. +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+    TQStringList list = myImage.inputFormatList();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also outputFormatList(), inputFormats(), and TQImageIO. + +

Example: showimg/showimg.cpp. +

TQStrList TQImage::inputFormats () [static] +

+Returns a list of image formats that are supported for image +input. +

See also outputFormats(), inputFormatList(), and TQImageIO. + +

void TQImage::invertPixels ( bool invertAlpha = TRUE ) +

+Inverts all pixel values in the image. +

If the depth is 32: if invertAlpha is TRUE, the alpha bits are +also inverted, otherwise they are left unchanged. +

If the depth is not 32, the argument invertAlpha has no +meaning. +

Note that inverting an 8-bit image means to replace all pixels +using color index i with a pixel using color index 255 minus i. Similarly for a 1-bit image. The color table is not changed. +

See also fill(), depth(), and hasAlphaBuffer(). + +

bool TQImage::isGrayscale () const +

+For 16-bit (TQt/Embedded only) and 32-bit images, this function is +equivalent to allGray(). +

For 8-bpp images, this function returns TRUE if color(i) is +TQRgb(i,i,i) for all indices of the color table; otherwise returns +FALSE. +

See also allGray() and depth(). + +

bool TQImage::isNull () const +

+ +

Returns TRUE if it is a null image; otherwise returns FALSE. +

A null image has all parameters set to zero and no allocated data. + +

Example: showimg/showimg.cpp. +

uchar ** TQImage::jumpTable () const +

+ +

Returns a pointer to the scanline pointer table. +

This is the beginning of the data block for the image. +

See also bits() and scanLine(). + +

bool TQImage::load ( const TQString & fileName, const char * format = 0 ) +

+Loads an image from the file fileName. Returns TRUE if the +image was successfully loaded; otherwise returns FALSE. +

If format is specified, the loader attempts to read the image +using the specified format. If format is not specified (which +is the default), the loader reads a few bytes from the header to +guess the file format. +

The TQImageIO documentation lists the supported image formats and +explains how to add extra formats. +

See also loadFromData(), save(), imageFormat(), TQPixmap::load(), and TQImageIO. + +

bool TQImage::loadFromData ( const uchar * buf, uint len, const char * format = 0 ) +

+Loads an image from the first len bytes of binary data in buf. Returns TRUE if the image was successfully loaded; otherwise +returns FALSE. +

If format is specified, the loader attempts to read the image +using the specified format. If format is not specified (which +is the default), the loader reads a few bytes from the header to +guess the file format. +

The TQImageIO documentation lists the supported image formats and +explains how to add extra formats. +

See also load(), save(), imageFormat(), TQPixmap::loadFromData(), and TQImageIO. + +

bool TQImage::loadFromData ( TQByteArray buf, const char * format = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Loads an image from the TQByteArray buf. + +

TQImage TQImage::mirror () const +

+Returns a TQImage which is a vertically mirrored copy of this +image. The original TQImage is not changed. + +

TQImage TQImage::mirror ( bool horizontal, bool vertical ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a mirror of the image, mirrored in the horizontal and/or +the vertical direction depending on whether horizontal and vertical are set to TRUE or FALSE. The original image is not +changed. +

See also smoothScale(). + +

int TQImage::numBytes () const +

+ +

Returns the number of bytes occupied by the image data. +

See also bytesPerLine() and bits(). + +

int TQImage::numColors () const +

+ +

Returns the size of the color table for the image. +

Notice that numColors() returns 0 for 16-bpp (TQt/Embedded only) +and 32-bpp images because these images do not use color tables, +but instead encode pixel values as RGB triplets. +

See also setNumColors() and colorTable(). + +

Example: themes/wood.cpp. +

TQPoint TQImage::offset () const +

+ +

Returns the number of pixels by which the image is intended to be +offset by when positioning relative to other images. + +

bool TQImage::operator!= ( const TQImage & i ) const +

+Returns TRUE if this image and image i have different contents; +otherwise returns FALSE. The comparison can be slow, unless there +is some obvious difference, such as different widths, in which +case the function will return tquickly. +

See also operator=(). + +

TQImage & TQImage::operator= ( const TQImage & image ) +

+Assigns a shallow copy of image to +this image and returns a reference to this image. +

See also copy(). + +

TQImage & TQImage::operator= ( const TQPixmap & pixmap ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the image bits to the pixmap contents and returns a +reference to the image. +

If the image shares data with other images, it will first +dereference the shared data. +

Makes a call to TQPixmap::convertToImage(). + +

bool TQImage::operator== ( const TQImage & i ) const +

+Returns TRUE if this image and image i have the same contents; +otherwise returns FALSE. The comparison can be slow, unless there +is some obvious difference, such as different widths, in which +case the function will return tquickly. +

See also operator=(). + +

TQStringList TQImage::outputFormatList () [static] +

+Returns a list of image formats that are supported for image +output. +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+    TQStringList list = myImage.outputFormatList();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also inputFormatList(), outputFormats(), and TQImageIO. + +

TQStrList TQImage::outputFormats () [static] +

+Returns a list of image formats that are supported for image +output. +

See also inputFormats(), outputFormatList(), and TQImageIO. + +

Example: showimg/showimg.cpp. +

TQRgb TQImage::pixel ( int x, int y ) const +

+Returns the color of the pixel at the coordinates (x, y). +

If (x, y) is not on the image, the +results are undefined. +

See also setPixel(), qRed(), qGreen(), qBlue(), and valid(). + +

Examples: canvas/canvas.cpp and qmag/qmag.cpp. +

int TQImage::pixelIndex ( int x, int y ) const +

+Returns the pixel index at the given coordinates. +

If (x, y) is not valid, or if the +image is not a paletted image (depth() > 8), the results are +undefined. +

See also valid() and depth(). + +

TQRect TQImage::rect () const +

+ +

Returns the enclosing rectangle (0, 0, width(), height()) of the +image. +

See also width(), height(), and size(). + +

void TQImage::reset () +

+Resets all image parameters and deallocates the image data. + +

bool TQImage::save ( const TQString & fileName, const char * format, int quality = -1 ) const +

+Saves the image to the file fileName, using the image file +format format and a quality factor of quality. quality +must be in the range 0..100 or -1. Specify 0 to obtain small +compressed files, 100 for large uncompressed files, and -1 (the +default) to use the default settings. +

Returns TRUE if the image was successfully saved; otherwise +returns FALSE. +

See also load(), loadFromData(), imageFormat(), TQPixmap::save(), and TQImageIO. + +

bool TQImage::save ( TQIODevice * device, const char * format, int quality = -1 ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function writes a TQImage to the TQIODevice, device. This +can be used, for example, to save an image directly into a +TQByteArray: +

+    TQImage image;
+    TQByteArray ba;
+    TQBuffer buffer( ba );
+    buffer.open( IO_WriteOnly );
+    image.save( &buffer, "PNG" ); // writes image into ba in PNG format
+    
+ + +

TQImage TQImage::scale ( int w, int h, ScaleMode mode = ScaleFree ) const +

+Returns a copy of the image scaled to a rectangle of width w +and height h according to the ScaleMode mode. +

    +
  • If mode is ScaleFree, the image is scaled to (w, +h). +
  • If mode is ScaleMin, the image is scaled to a rectangle +as large as possible inside (w, h), preserving the aspect +ratio. +
  • If mode is ScaleMax, the image is scaled to a rectangle +as small as possible outside (w, h), preserving the aspect +ratio. +
+

If either the width w or the height h is 0 or negative, this +function returns a null image. +

This function uses a simple, fast algorithm. If you need better +quality, use smoothScale() instead. +

See also scaleWidth(), scaleHeight(), smoothScale(), and xForm(). + +

TQImage TQImage::scale ( const TQSize & s, ScaleMode mode = ScaleFree ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

The requested size of the image is s. + +

TQImage TQImage::scaleHeight ( int h ) const +

+Returns a scaled copy of the image. The returned image has a +height of h pixels. This function automatically calculates the +width of the image so that the ratio of the image is preserved. +

If h is 0 or negative a null image is +returned. +

See also scale(), scaleWidth(), smoothScale(), and xForm(). + +

Example: table/small-table-demo/main.cpp. +

TQImage TQImage::scaleWidth ( int w ) const +

+Returns a scaled copy of the image. The returned image has a width +of w pixels. This function automatically calculates the height +of the image so that the ratio of the image is preserved. +

If w is 0 or negative a null image is +returned. +

See also scale(), scaleHeight(), smoothScale(), and xForm(). + +

uchar * TQImage::scanLine ( int i ) const +

+ +

Returns a pointer to the pixel data at the scanline with index i. The first scanline is at index 0. +

The scanline data is aligned on a 32-bit boundary. +

Warning: If you are accessing 32-bpp image data, cast the returned +pointer to TQRgb* (TQRgb has a 32-bit size) and use it to +read/write the pixel value. You cannot use the uchar* pointer +directly, because the pixel format depends on the byte order on +the underlying platform. Hint: use qRed(), +qGreen() and qBlue(), etc. (qcolor.h) to access the pixels. +

Warning: If you are accessing 16-bpp image data, you must handle +endianness yourself. (TQt/Embedded only) +

See also bytesPerLine(), bits(), and jumpTable(). + +

Example: desktop/desktop.cpp. +

void TQImage::setAlphaBuffer ( bool enable ) +

+Enables alpha buffer mode if enable is TRUE, otherwise disables +it. The default setting is disabled. +

An 8-bpp image has 8-bit pixels. A pixel is an index into the +color table, which contains 32-bit color +values. In a 32-bpp image, the 32-bit pixels are the color values. +

This 32-bit value is encoded as follows: The lower 24 bits are +used for the red, green, and blue components. The upper 8 bits +contain the alpha component. +

The alpha component specifies the transparency of a pixel. 0 means +completely transparent and 255 means opaque. The alpha component +is ignored if you do not enable alpha buffer mode. +

The alpha buffer is used to set a mask when a TQImage is translated +to a TQPixmap. +

See also hasAlphaBuffer() and createAlphaMask(). + +

void TQImage::setColor ( int i, TQRgb c ) +

+ +

Sets a color in the color table at index i to c. +

A color value is an RGB triplet. Use the qRgb() function (defined in qcolor.h) to make RGB +triplets. +

See also color(), setNumColors(), and numColors(). + +

Examples: desktop/desktop.cpp and themes/wood.cpp. +

void TQImage::setDotsPerMeterX ( int x ) +

+Sets the value returned by dotsPerMeterX() to x. + +

void TQImage::setDotsPerMeterY ( int y ) +

+Sets the value returned by dotsPerMeterY() to y. + +

void TQImage::setNumColors ( int numColors ) +

+Resizes the color table to numColors colors. +

If the color table is expanded all the extra colors will be set to +black (RGB 0,0,0). +

See also numColors(), color(), setColor(), and colorTable(). + +

void TQImage::setOffset ( const TQPoint & p ) +

+Sets the value returned by offset() to p. + +

void TQImage::setPixel ( int x, int y, uint index_or_rgb ) +

+Sets the pixel index or color at the coordinates (x, y) to +index_or_rgb. +

If (x, y) is not valid, the result is +undefined. +

If the image is a paletted image (depth() <= 8) and index_or_rgb >= numColors(), the result is undefined. +

See also pixelIndex(), pixel(), qRgb(), qRgba(), and valid(). + +

void TQImage::setText ( const char * key, const char * lang, const TQString & s ) +

+Records string s for the keyword key. The key should be a +portable keyword recognizable by other software - some suggested +values can be found in the PNG specification. s can be any text. lang +should specify the language code (see +RFC 1766) or 0. + +

TQSize TQImage::size () const +

+ +

Returns the size of the image, i.e. its width and height. +

See also width(), height(), and rect(). + +

TQImage TQImage::smoothScale ( int w, int h, ScaleMode mode = ScaleFree ) const +

+Returns a smoothly scaled copy of the image. The returned image +has a size of width w by height h pixels if mode is ScaleFree. The modes ScaleMin and ScaleMax may be used to +preserve the ratio of the image: if mode is ScaleMin, the +returned image is guaranteed to fit into the rectangle specified +by w and h (it is as large as possible within the +constraints); if mode is ScaleMax, the returned image fits +at least into the specified rectangle (it is a small as possible +within the constraints). +

For 32-bpp images and 1-bpp/8-bpp color images the result will be +32-bpp, whereas all-gray images +(including black-and-white 1-bpp) will produce 8-bit grayscale images with the palette spanning +256 grays from black to white. +

This function uses code based on pnmscale.c by Jef Poskanzer. +

pnmscale.c - read a portable anymap and scale it +

+

Copyright (C) 1989, 1991 by Jef Poskanzer. +

Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that copyright notice and this permission +notice appear in supporting documentation. This software is +provided "as is" without express or implied warranty. +

See also scale() and mirror(). + +

TQImage TQImage::smoothScale ( const TQSize & s, ScaleMode mode = ScaleFree ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

The requested size of the image is s. + +

TQImage TQImage::swapRGB () const +

+Returns a TQImage in which the values of the red and blue +components of all pixels have been swapped, effectively converting +an RGB image to a BGR image. The original TQImage is not changed. + +

Endian TQImage::systemBitOrder () [static] +

+Determines the bit order of the display hardware. Returns +TQImage::LittleEndian (LSB first) or TQImage::BigEndian (MSB first). +

See also systemByteOrder(). + +

Endian TQImage::systemByteOrder () [static] +

+Determines the host computer byte order. Returns +TQImage::LittleEndian (LSB first) or TQImage::BigEndian (MSB first). +

See also systemBitOrder(). + +

TQString TQImage::text ( const char * key, const char * lang = 0 ) const +

+Returns the string recorded for the keyword key in language lang, or in a default language if lang is 0. + +

TQString TQImage::text ( const TQImageTextKeyLang & kl ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the string recorded for the keyword and language kl. + +

TQStringList TQImage::textKeys () const +

+Returns the keywords for which some texts are recorded. +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+    TQStringList list = myImage.textKeys();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also textList(), text(), setText(), and textLanguages(). + +

TQStringList TQImage::textLanguages () const +

+Returns the language identifiers for which some texts are +recorded. +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+    TQStringList list = myImage.textLanguages();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also textList(), text(), setText(), and textKeys(). + +

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() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ + +

bool TQImage::valid ( int x, int y ) const +

+Returns TRUE if ( x, y ) is a valid coordinate in the image; +otherwise returns FALSE. +

See also width(), height(), and pixelIndex(). + +

Examples: canvas/canvas.cpp and qmag/qmag.cpp. +

int TQImage::width () const +

+ +

Returns the width of the image. +

See also height(), size(), and rect(). + +

Examples: canvas/canvas.cpp and opengl/texture/gltexobj.cpp. +

TQImage TQImage::xForm ( const TQWMatrix & matrix ) const +

+Returns a copy of the image that is transformed using the +transformation matrix, matrix. +

The transformation matrix is internally adjusted to compensate +for unwanted translation, i.e. xForm() returns the smallest image +that contains all the transformed points of the original image. +

See also scale(), TQPixmap::xForm(), TQPixmap::trueMatrix(), and TQWMatrix. + +


Related Functions

+

void bitBlt ( TQImage * dst, int dx, int dy, const TQImage * src, int sx, int sy, int sw, int sh, int conversion_flags ) +

+ +

Copies a block of pixels from src to dst. The pixels +copied from source (src) are converted according to +conversion_flags if it is incompatible with the destination +(dst). +

sx, sy is the top-left pixel in src, dx, dy +is the top-left position in dst and sw, \sh is the +size of the copied block. +

The copying is clipped if areas outside src or dst are +specified. +

If sw is -1, it is adjusted to src->width(). Similarly, if sh is -1, it is adjusted to src->height(). +

Currently inefficient for non 32-bit images. + +

TQDataStream & operator<< ( TQDataStream & s, const TQImage & image ) +

+ +

Writes the image image to the stream s as a PNG image, or as a +BMP image if the stream's version is 1. +

Note that writing the stream to a file will not produce a valid image file. +

See also TQImage::save() and Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQImage & image ) +

+ +

Reads an image from the stream s and stores it in image. +

See also TQImage::load() and Format of the TQDataStream operators. + + +


+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/qimageconsumer-members.html b/doc/html/qimageconsumer-members.html new file mode 100644 index 00000000..9ebdf555 --- /dev/null +++ b/doc/html/qimageconsumer-members.html @@ -0,0 +1,52 @@ + + + + + +TQImageConsumer Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQImageConsumer

+ +

This is the complete list of member functions for +TQImageConsumer, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qimageconsumer.html b/doc/html/qimageconsumer.html new file mode 100644 index 00000000..4d06fb95 --- /dev/null +++ b/doc/html/qimageconsumer.html @@ -0,0 +1,142 @@ + + + + + +TQImageConsumer Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQImageConsumer Class Reference

+ +

The TQImageConsumer class is an abstraction used by TQImageDecoder. +More... +

#include <qasyncimageio.h> +

List of all member functions. +

Public Members

+
    +
  • virtual void end () = 0
  • +
  • virtual void changed ( const TQRect & ) = 0
  • +
  • virtual void frameDone () = 0
  • +
  • virtual void frameDone ( const TQPoint & offset, const TQRect & rect ) = 0
  • +
  • virtual void setLooping ( int n ) = 0
  • +
  • virtual void setFramePeriod ( int milliseconds ) = 0
  • +
  • virtual void setSize ( int, int ) = 0
  • +
+

Detailed Description

+ + +The TQImageConsumer class is an abstraction used by TQImageDecoder. +

+ + +

The TQMovie class, or TQLabel::setMovie(), are easy to use and for +most situations do what you want with regards animated images. +

A TQImageConsumer consumes information about changes to the TQImage +maintained by a TQImageDecoder. Think of the TQImage as the model or +source of the image data, with the TQImageConsumer as a view of +that data and the TQImageDecoder being the controller that +orchestrates the relationship between the model and the view. +

You'd use the TQImageConsumer class, for example, if you were +implementing a web browser with your own image loaders. +

See also TQImageDecoder, Graphics Classes, Image Processing Classes, and Multimedia Classes. + +


Member Function Documentation

+

void TQImageConsumer::changed ( const TQRect & ) [pure virtual] +

+ +

Called when the given area of the image has changed. + +

void TQImageConsumer::end () [pure virtual] +

+ +

Called when all the data from all the frames has been decoded and +revealed as changed(). + +

void TQImageConsumer::frameDone () [pure virtual] +

+ +

One of the two frameDone() functions will be called when a frame +of an animated image has ended and been revealed as changed(). +

When this function is called, the current image should be +displayed. +

The decoder will not make any further changes to the image until +the next call to TQImageFormat::decode(). + +

void TQImageConsumer::frameDone ( const TQPoint & offset, const TQRect & rect ) [pure virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

One of the two frameDone() functions will be called when a frame +of an animated image has ended and been revealed as changed(). +

When this function is called, the area rect in the current +image should be moved by offset and displayed. +

The decoder will not make any further changes to the image until +the next call to TQImageFormat::decode(). + +

void TQImageConsumer::setFramePeriod ( int milliseconds ) [pure virtual] +

+ +

Notes that the frame about to be decoded should not be displayed +until the given number of milliseconds after the time that this +function is called. Of course, the image may not have been +decoded by then, in which case the frame should not be displayed +until it is complete. A value of -1 (the assumed default) +indicates that the image should be displayed even while it is only +partially loaded. + +

void TQImageConsumer::setLooping ( int n ) [pure virtual] +

+ +

Called to indicate that the sequence of frames in the image +should be repeated n times, including the sequence during +decoding. +

    +
  • 0 = Forever +
  • 1 = Only display frames the first time through +
  • 2 = Repeat once after first pass through images +
  • etc. +
+

To make the TQImageDecoder do this, just delete it and pass the +information to it again for decoding (setLooping() will be called +again, of course, but that can be ignored), or keep copies of the +changed areas at the ends of frames. + +

void TQImageConsumer::setSize ( int, int ) [pure virtual] +

+ +

This function is called as soon as the size of the image has been +determined. + + +


+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/qimagedecoder-members.html b/doc/html/qimagedecoder-members.html new file mode 100644 index 00000000..40ecc618 --- /dev/null +++ b/doc/html/qimagedecoder-members.html @@ -0,0 +1,55 @@ + + + + + +TQImageDecoder Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQImageDecoder

+ +

This is the complete list of member functions for +TQImageDecoder, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qimagedecoder.html b/doc/html/qimagedecoder.html new file mode 100644 index 00000000..b52c490d --- /dev/null +++ b/doc/html/qimagedecoder.html @@ -0,0 +1,154 @@ + + + + + +TQImageDecoder Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQImageDecoder Class Reference

+ +

The TQImageDecoder class is an incremental image decoder for all supported image formats. +More... +

#include <qasyncimageio.h> +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Detailed Description

+ + +The TQImageDecoder class is an incremental image decoder for all supported image formats. +

+ + +

New formats are installed by creating objects of class +TQImageFormatType; the TQMovie class can be used for all installed +incremental image formats. TQImageDecoder is only useful for +creating new ways of feeding data to an TQImageConsumer. +

A TQImageDecoder is a machine that decodes images. It takes encoded +image data via its decode() method and expresses its decoding by +supplying information to a TQImageConsumer. It implements its +decoding by using a TQImageFormat created by one of the +currently-existing TQImageFormatType factory objects. +

TQImageFormatType and TQImageFormat are the classes that you might +need to implement support for additional image formats. +

+

TQt supports GIF reading if it is configured that way during +installation (see qgif.h). If it is, we are retquired to state that +"The Graphics Interchange Format(c) is the Copyright property of +CompuServe Incorporated. GIF(sm) is a Service Mark property of +CompuServe Incorporated." +

Warning: If you are in a country that recognizes software patents +and in which Unisys holds a patent on LZW compression and/or +decompression and you want to use GIF, Unisys may retquire you to +license that technology. Such countries include Canada, Japan, +the USA, France, Germany, Italy and the UK. +

GIF support may be removed completely in a future version of TQt. +We recommend using the MNG or PNG format. +

See also Graphics Classes, Image Processing Classes, and Multimedia Classes. + +


Member Function Documentation

+

TQImageDecoder::TQImageDecoder ( TQImageConsumer * c ) +

+Constructs a TQImageDecoder that will send change information to +the TQImageConsumer c. + +

TQImageDecoder::~TQImageDecoder () +

+Destroys a TQImageDecoder. The image it built is destroyed. The +decoder built by the factory for the file format is destroyed. The +consumer for which it decoded the image is not destroyed. + +

int TQImageDecoder::decode ( const uchar * buffer, int length ) +

+Call this function to decode some data into image changes. The +data in buffer will be decoded, sending change information to +the TQImageConsumer of this TQImageDecoder until one of the change +functions of the consumer returns FALSE. The length of the data is +given in length. +

Returns the number of bytes consumed: 0 if consumption is +complete, and -1 if decoding fails due to invalid data. + +

TQImageFormatType * TQImageDecoder::format ( const char * name ) [static] +

+Returns a TQImageFormatType by name. This might be used when the +user needs to force data to be interpreted as being in a certain +format. name is one of the formats listed by +TQImageDecoder::inputFormats(). Note that you will still need to +supply decodable data to result->decoderFor() before you can begin +decoding the data. + +

const char * TQImageDecoder::formatName ( const uchar * buffer, int length ) [static] +

+Call this function to find the name of the format of the given +header. The returned string is statically allocated. The function +will look at the first length characters in the buffer. +

Returns 0 if the format is not recognized. + +

const TQImage & TQImageDecoder::image () +

+ +

Returns the image currently being decoded. + +

TQStrList TQImageDecoder::inputFormats () [static] +

+Returns a sorted list of formats for which asynchronous loading is +supported. + +

void TQImageDecoder::registerDecoderFactory ( TQImageFormatType * f ) [static] +

+Registers the new TQImageFormatType f. This is not needed in +application code because factories call this themselves. + +

void TQImageDecoder::unregisterDecoderFactory ( TQImageFormatType * f ) [static] +

+Unregisters the TQImageFormatType f. This is not needed in +application code because factories call this themselves. + + +

+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/qimagedrag-members.html b/doc/html/qimagedrag-members.html new file mode 100644 index 00000000..4183c9f8 --- /dev/null +++ b/doc/html/qimagedrag-members.html @@ -0,0 +1,106 @@ + + + + + +TQImageDrag Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQImageDrag

+ +

This is the complete list of member functions for +TQImageDrag, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qimagedrag.html b/doc/html/qimagedrag.html new file mode 100644 index 00000000..c150b93c --- /dev/null +++ b/doc/html/qimagedrag.html @@ -0,0 +1,120 @@ + + + + + +TQImageDrag Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQImageDrag Class Reference

+ +

The TQImageDrag class provides a drag and drop object for +transferring images. +More... +

#include <qdragobject.h> +

Inherits TQDragObject. +

List of all member functions. +

Public Members

+
    +
  • TQImageDrag ( TQImage image, TQWidget * dragSource = 0, const char * name = 0 )
  • +
  • TQImageDrag ( TQWidget * dragSource = 0, const char * name = 0 )
  • +
  • ~TQImageDrag ()
  • +
  • virtual void setImage ( TQImage image )
  • +
+

Static Public Members

+
    +
  • bool canDecode ( const TQMimeSource * e )
  • +
  • bool decode ( const TQMimeSource * e, TQImage & img )
  • +
  • bool decode ( const TQMimeSource * e, TQPixmap & pm )
  • +
+

Detailed Description

+ + +

The TQImageDrag class provides a drag and drop object for +transferring images. +

+

Images are offered to the receiving application in multiple +formats, determined by TQt's output + formats. +

For more information about drag and drop, see the TQDragObject +class and the drag and drop documentation. +

See also Drag And Drop Classes. + +


Member Function Documentation

+

TQImageDrag::TQImageDrag ( TQImage image, TQWidget * dragSource = 0, const char * name = 0 ) +

+Constructs an image drag object and sets its data to image. dragSource must be the drag source; name is the object name. + +

TQImageDrag::TQImageDrag ( TQWidget * dragSource = 0, const char * name = 0 ) +

+Constructs a default image drag object. dragSource must be the +drag source; name is the object name. + +

TQImageDrag::~TQImageDrag () +

+Destroys the image drag object and frees up all allocated +resources. + +

bool TQImageDrag::canDecode ( const TQMimeSource * e ) [static] +

+Returns TRUE if the information in mime source e can be decoded +into an image; otherwise returns FALSE. +

See also decode(). + +

Example: desktop/desktop.cpp. +

bool TQImageDrag::decode ( const TQMimeSource * e, TQImage & img ) [static] +

+Attempts to decode the dropped information in mime source e +into img. Returns TRUE if successful; otherwise returns FALSE. +

See also canDecode(). + +

Example: desktop/desktop.cpp. +

bool TQImageDrag::decode ( const TQMimeSource * e, TQPixmap & pm ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Attempts to decode the dropped information in mime source e +into pixmap pm. Returns TRUE if successful; otherwise returns +FALSE. +

This is a convenience function that converts to a TQPixmap via a +TQImage. +

See also canDecode(). + +

void TQImageDrag::setImage ( TQImage image ) [virtual] +

+Sets the image to be dragged to image. You will need to call +this if you did not pass the image during construction. + + +

+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qimageformat-members.html b/doc/html/qimageformat-members.html new file mode 100644 index 00000000..74778078 --- /dev/null +++ b/doc/html/qimageformat-members.html @@ -0,0 +1,47 @@ + + + + + +TQImageFormat Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQImageFormat

+ +

This is the complete list of member functions for +TQImageFormat, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qimageformat.html b/doc/html/qimageformat.html new file mode 100644 index 00000000..0cb57c85 --- /dev/null +++ b/doc/html/qimageformat.html @@ -0,0 +1,87 @@ + + + + + +TQImageFormat Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQImageFormat Class Reference

+ +

The TQImageFormat class is an incremental image decoder for a specific image format. +More... +

#include <qasyncimageio.h> +

List of all member functions. +

Public Members

+
    +
  • virtual int decode ( TQImage & img, TQImageConsumer * consumer, const uchar * buffer, int length ) = 0
  • +
+

Detailed Description

+ + +The TQImageFormat class is an incremental image decoder for a specific image format. +

+ + +

By making a derived class of TQImageFormatType, which in turn +creates objects that are a subclass of TQImageFormat, you can add +support for more incremental image formats, allowing such formats +to be sources for a TQMovie or for the first frame of the image +stream to be loaded as a TQImage or TQPixmap. +

Your new subclass must reimplement the decode() function in order +to process your new format. +

New TQImageFormat objects are generated by new TQImageFormatType +factories. +

See also Graphics Classes, Image Processing Classes, and Multimedia Classes. + +


Member Function Documentation

+

int TQImageFormat::decode ( TQImage & img, TQImageConsumer * consumer, const uchar * buffer, int length ) [pure virtual] +

+ +

New subclasses must reimplement this method. +

It should decode some or all of the bytes from buffer into img, calling the methods of consumer as the decoding proceeds +to inform that consumer of changes to the image. The length of the +data is given in length. The consumer may be 0, in which case +the function should just process the data into img without +telling any consumer about the changes. Note that the decoder must +store enough state to be able to continue in subsequent calls to +this method - this is the essence of the incremental image +loading. +

The function should return without processing all the data if it +reaches the end of a frame in the input. +

The function must return the number of bytes it has processed. + + +


+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/qimageformatplugin-h.html b/doc/html/qimageformatplugin-h.html new file mode 100644 index 00000000..9b4ce8bb --- /dev/null +++ b/doc/html/qimageformatplugin-h.html @@ -0,0 +1,112 @@ + + + + + +qimageformatplugin.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qimageformatplugin.h

+ +

This is the verbatim text of the qimageformatplugin.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qimageformatplugin.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of ???
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQIMAGEFORMATPLUGIN_H
+#define TQIMAGEFORMATPLUGIN_H
+
+#ifndef QT_H
+#include "qgplugin.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_IMAGEFORMATPLUGIN
+class TQImageFormat;
+class TQImageFormatPluginPrivate;
+
+class Q_EXPORT TQImageFormatPlugin : public TQGPlugin
+{
+    Q_OBJECT
+public:
+    TQImageFormatPlugin();
+    ~TQImageFormatPlugin();
+
+    virtual TQStringList keys() const = 0;
+    virtual bool loadImage( const TQString &format, const TQString &filename, TQImage *image );
+    virtual bool saveImage( const TQString &format, const TQString &filename, const TQImage &image );
+    virtual bool installIOHandler( const TQString &format ) = 0;
+
+private:
+    TQImageFormatPluginPrivate *d;
+};
+#endif // QT_NO_IMAGEFORMATPLUGIN
+#endif // TQIMAGEFORMATPLUGIN_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qimageformatplugin-members.html b/doc/html/qimageformatplugin-members.html new file mode 100644 index 00000000..66d3e165 --- /dev/null +++ b/doc/html/qimageformatplugin-members.html @@ -0,0 +1,50 @@ + + + + + +TQImageFormatPlugin Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQImageFormatPlugin

+ +

This is the complete list of member functions for +TQImageFormatPlugin, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qimageformatplugin.html b/doc/html/qimageformatplugin.html new file mode 100644 index 00000000..99238079 --- /dev/null +++ b/doc/html/qimageformatplugin.html @@ -0,0 +1,94 @@ + + + + + +TQImageFormatPlugin Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQImageFormatPlugin Class Reference

+ +

The TQImageFormatPlugin class provides an abstract base for custom image format plugins. +More... +

#include <qimageformatplugin.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQImageFormatPlugin class provides an abstract base for custom image format plugins. +

+

The image format plugin is a simple plugin interface that makes +it easy to create custom image formats that can be used +transparently by applications. +

Writing an image format plugin is achieved by subclassing this +base class, reimplementing the pure virtual functions keys() and +installIOHandler(), and exporting the class with the +Q_EXPORT_PLUGIN macro. See the Plugins + documentation for details. +

See also Plugins. + +


Member Function Documentation

+

TQImageFormatPlugin::TQImageFormatPlugin () +

+Constructs an image format plugin. This is invoked automatically +by the Q_EXPORT_PLUGIN macro. + +

TQImageFormatPlugin::~TQImageFormatPlugin () +

+Destroys the image format plugin. +

You never have to call this explicitly. TQt destroys a plugin +automatically when it is no longer used. + +

bool TQImageFormatPlugin::installIOHandler ( const TQString & format ) [pure virtual] +

+ +

Installs a TQImageIO image I/O handler for the image format format. +

See also keys(). + +

TQStringList TQImageFormatPlugin::keys () const [pure virtual] +

+ +

Returns the list of image formats this plugin supports. +

See also installIOHandler(). + + +


+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/qimageformattype-members.html b/doc/html/qimageformattype-members.html new file mode 100644 index 00000000..dd20e6ca --- /dev/null +++ b/doc/html/qimageformattype-members.html @@ -0,0 +1,50 @@ + + + + + +TQImageFormatType Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQImageFormatType

+ +

This is the complete list of member functions for +TQImageFormatType, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qimageformattype.html b/doc/html/qimageformattype.html new file mode 100644 index 00000000..0f11ed88 --- /dev/null +++ b/doc/html/qimageformattype.html @@ -0,0 +1,108 @@ + + + + + +TQImageFormatType Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQImageFormatType Class Reference

+ +

The TQImageFormatType class is a factory that makes TQImageFormat objects. +More... +

#include <qasyncimageio.h> +

List of all member functions. +

Public Members

+ +

Protected Members

+ +

Detailed Description

+ + +The TQImageFormatType class is a factory that makes TQImageFormat objects. +

+ + +

Whereas the TQImageIO class allows for complete loading of +images, TQImageFormatType allows for incremental loading of +images. +

New image file formats are installed by creating objects of +derived classes of TQImageFormatType. They must implement +decoderFor() and formatName(). +

TQImageFormatType is a very simple class. Its only task is to +recognize image data in some format and make a new object, +subclassed from TQImageFormat, which can decode that format. +

The factories for formats built into TQt are automatically defined +before any other factory is initialized. If two factories would +recognize an image format, the factory created last will override +the earlier one; you can thus override current and future built-in +formats. +

See also Graphics Classes, Image Processing Classes, and Multimedia Classes. + +


Member Function Documentation

+

TQImageFormatType::TQImageFormatType () [protected] +

+Constructs a factory. It automatically registers itself with +TQImageDecoder. + +

TQImageFormatType::~TQImageFormatType () [virtual] +

+Destroys a factory. It automatically unregisters itself from +TQImageDecoder. + +

TQImageFormat * TQImageFormatType::decoderFor ( const uchar * buffer, int length ) [pure virtual] +

+ +

Returns a decoder for decoding an image that starts with the bytes +in buffer. The length of the data is given in length. This +function should only return a decoder if it is certain that the +decoder applies to data with the given header. Returns 0 if there +is insufficient data in the header to make a positive +identification or if the data is not recognized. + +

const char * TQImageFormatType::formatName () const [pure virtual] +

+ +

Returns the name of the format supported by decoders from this +factory. The string is statically allocated. + + +


+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/qimageio-members.html b/doc/html/qimageio-members.html new file mode 100644 index 00000000..0176887f --- /dev/null +++ b/doc/html/qimageio-members.html @@ -0,0 +1,72 @@ + + + + + +TQImageIO Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQImageIO

+ +

This is the complete list of member functions for +TQImageIO, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qimageio.html b/doc/html/qimageio.html new file mode 100644 index 00000000..52e2ad68 --- /dev/null +++ b/doc/html/qimageio.html @@ -0,0 +1,372 @@ + + + + + +TQImageIO Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQImageIO Class Reference

+ +

The TQImageIO class contains parameters for loading and +saving images. +More... +

#include <qimage.h> +

List of all member functions. +

Public Members

+ +

Static Public Members

+
    +
  • const char * imageFormat ( const TQString & fileName )
  • +
  • const char * imageFormat ( TQIODevice * d )
  • +
  • TQStrList inputFormats ()
  • +
  • TQStrList outputFormats ()
  • +
  • void defineIOHandler ( const char * format, const char * header, const char * flags, image_io_handler readImage, image_io_handler writeImage )
  • +
+

Detailed Description

+ + +

The TQImageIO class contains parameters for loading and +saving images. +

+ + +

TQImageIO contains a TQIODevice object that is used for image data +I/O. The programmer can install new image file formats in addition +to those that TQt provides. +

TQt currently supports the following image file formats: PNG, BMP, +XBM, XPM and PNM. It may also support JPEG, MNG and GIF, if +specially configured during compilation. The different PNM formats +are: PBM (P1 or P4), PGM (P2 or P5), and PPM (P3 or P6). +

You don't normally need to use this class; TQPixmap::load(), +TQPixmap::save(), and TQImage contain sufficient functionality. +

For image files that contain sequences of images, only the first +is read. See TQMovie for loading multiple images. +

PBM, PGM, and PPM format output is always in the more condensed +raw format. PPM and PGM files with more than 256 levels of +intensity are scaled down when reading. +

Warning: If you are in a country which recognizes software patents +and in which Unisys holds a patent on LZW compression and/or +decompression and you want to use GIF, Unisys may retquire you to +license the technology. Such countries include Canada, Japan, the +USA, France, Germany, Italy and the UK. +

GIF support may be removed completely in a future version of TQt. +We recommend using the PNG format. +

See also TQImage, TQPixmap, TQFile, TQMovie, Graphics Classes, Image Processing Classes, and Input/Output and Networking. + +


Member Function Documentation

+

TQImageIO::TQImageIO () +

+Constructs a TQImageIO object with all parameters set to zero. + +

TQImageIO::TQImageIO ( TQIODevice * ioDevice, const char * format ) +

+Constructs a TQImageIO object with the I/O device ioDevice and a +format tag. + +

TQImageIO::TQImageIO ( const TQString & fileName, const char * format ) +

+Constructs a TQImageIO object with the file name fileName and a +format tag. + +

TQImageIO::~TQImageIO () +

+Destroys the object and all related data. + +

void TQImageIO::defineIOHandler ( const char * format, const char * header, const char * flags, image_io_handler readImage, image_io_handler writeImage ) [static] +

+Defines an image I/O handler for the image format called format, which is recognized using the regular expression header, read using readImage and +written using writeImage. +

flags is a string of single-character flags for this format. +The only flag defined currently is T (upper case), so the only +legal value for flags are "T" and the empty string. The "T" +flag means that the image file is a text file, and TQt should treat +all newline conventions as equivalent. (XPM files and some PPM +files are text files for example.) +

format is used to select a handler to write a TQImage; header +is used to select a handler to read an image file. +

If readImage is a null pointer, the TQImageIO will not be able +to read images in format. If writeImage is a null pointer, +the TQImageIO will not be able to write images in format. If +both are null, the TQImageIO object is valid but useless. +

Example: +

+        void readGIF( TQImageIO *image )
+        {
+        // read the image using the image->ioDevice()
+        }
+
+        void writeGIF( TQImageIO *image )
+        {
+        // write the image using the image->ioDevice()
+        }
+
+        // add the GIF image handler
+
+        TQImageIO::defineIOHandler( "GIF",
+                                   "^GIF[0-9][0-9][a-z]",
+                                   0,
+                                   readGIF,
+                                   writeGIF );
+    
+ +

Before the regex test, all the 0 bytes in the file header are +converted to 1 bytes. This is done because when TQt was +ASCII-based, TQRegExp could not handle 0 bytes in strings. +

The regexp is only applied on the first 14 bytes of the file. +

Note that TQt assumes that there is only one handler per format; if +two handlers support the same format, TQt will choose one +arbitrarily. It is not possible to have one handler support +reading, and another support writing. + +

TQString TQImageIO::description () const +

+ +

Returns the image description string. +

See also setDescription(). + +

TQString TQImageIO::fileName () const +

+ +

Returns the file name currently set. +

See also setFileName(). + +

const char * TQImageIO::format () const +

+ +

Returns the image format string or 0 if no format has been +explicitly set. + +

float TQImageIO::gamma () const +

+Returns the gamma value at which the image will be viewed. +

See also setGamma(). + +

const TQImage & TQImageIO::image () const +

+ +

Returns the image currently set. +

See also setImage(). + +

const char * TQImageIO::imageFormat ( const TQString & fileName ) [static] +

+Returns a string that specifies the image format of the file fileName, or null if the file cannot be read or if the format is +not recognized. + +

const char * TQImageIO::imageFormat ( TQIODevice * d ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a string that specifies the image format of the image read +from IO device d, or 0 if the device cannot be read or if the +format is not recognized. +

Make sure that d is at the right position in the device (for +example, at the beginning of the file). +

See also TQIODevice::at(). + +

TQStrList TQImageIO::inputFormats () [static] +

+Returns a sorted list of image formats that are supported for +image input. + +

TQIODevice * TQImageIO::ioDevice () const +

+ +

Returns the IO device currently set. +

See also setIODevice(). + +

TQStrList TQImageIO::outputFormats () [static] +

+Returns a sorted list of image formats that are supported for +image output. + +

Example: scribble/scribble.cpp. +

const char * TQImageIO::parameters () const +

+Returns the image's parameters string. +

See also setParameters(). + +

int TQImageIO::quality () const +

+Returns the quality of the written image, related to the +compression ratio. +

See also setQuality() and TQImage::save(). + +

bool TQImageIO::read () +

+Reads an image into memory and returns TRUE if the image was +successfully read; otherwise returns FALSE. +

Before reading an image you must set an IO device or a file name. +If both an IO device and a file name have been set, the IO device +will be used. +

Setting the image file format string is optional. +

Note that this function does not set the format used to read the image. If you need that +information, use the imageFormat() static functions. +

Example: +

+        TQImageIO iio;
+        TQPixmap  pixmap;
+        iio.setFileName( "vegeburger.bmp" );
+        if ( image.read() )        // ok
+            pixmap = iio.image();  // convert to pixmap
+    
+ +

See also setIODevice(), setFileName(), setFormat(), write(), and TQPixmap::load(). + +

void TQImageIO::setDescription ( const TQString & description ) +

+Sets the image description string for image handlers that support +image descriptions to description. +

Currently, no image format supported by TQt uses the description +string. + +

void TQImageIO::setFileName ( const TQString & fileName ) +

+Sets the name of the file to read or write an image from to fileName. +

See also setIODevice(). + +

void TQImageIO::setFormat ( const char * format ) +

+Sets the image format to format for the image to be read or +written. +

It is necessary to specify a format before writing an image, but +it is not necessary to specify a format before reading an image. +

If no format has been set, TQt guesses the image format before +reading it. If a format is set the image will only be read if it +has that format. +

See also read(), write(), and format(). + +

void TQImageIO::setGamma ( float gamma ) +

+Sets the gamma value at which the image will be viewed to gamma. If the image format stores a gamma value for which the +image is intended to be used, then this setting will be used to +modify the image. Setting to 0.0 will disable gamma correction +(i.e. any specification in the file will be ignored). +

The default value is 0.0. +

See also gamma(). + +

void TQImageIO::setIODevice ( TQIODevice * ioDevice ) +

+Sets the IO device to be used for reading or writing an image. +

Setting the IO device allows images to be read/written to any +block-oriented TQIODevice. +

If ioDevice is not null, this IO device will override file name +settings. +

See also setFileName(). + +

void TQImageIO::setImage ( const TQImage & image ) +

+Sets the image to image. +

See also image(). + +

void TQImageIO::setParameters ( const char * parameters ) +

+Sets the image's parameter string to parameters. This is for +image handlers that retquire special parameters. +

Although the current image formats supported by TQt ignore the +parameters string, it may be used in future extensions or by +contributions (for example, JPEG). +

See also parameters(). + +

void TQImageIO::setQuality ( int q ) +

+Sets the quality of the written image to q, related to the +compression ratio. +

q must be in the range -1..100. Specify 0 to obtain small +compressed files, 100 for large uncompressed files. (-1 signifies +the default compression.) +

See also quality() and TQImage::save(). + +

void TQImageIO::setStatus ( int status ) +

+Sets the image IO status to status. A non-zero value indicates +an error, whereas 0 means that the IO operation was successful. +

See also status(). + +

int TQImageIO::status () const +

+ +

Returns the image's IO status. A non-zero value indicates an +error, whereas 0 means that the IO operation was successful. +

See also setStatus(). + +

bool TQImageIO::write () +

+Writes an image to an IO device and returns TRUE if the image was +successfully written; otherwise returns FALSE. +

Before writing an image you must set an IO device or a file name. +If both an IO device and a file name have been set, the IO device +will be used. +

The image will be written using the specified image format. +

Example: +

+        TQImageIO iio;
+        TQImage   im;
+        im = pixmap; // convert to image
+        iio.setImage( im );
+        iio.setFileName( "vegeburger.bmp" );
+        iio.setFormat( "BMP" );
+        if ( iio.write() )
+            // returned TRUE if written successfully
+    
+ +

See also setIODevice(), setFileName(), setFormat(), read(), and TQPixmap::save(). + + +


+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/qimevent-members.html b/doc/html/qimevent-members.html new file mode 100644 index 00000000..b0f78384 --- /dev/null +++ b/doc/html/qimevent-members.html @@ -0,0 +1,55 @@ + + + + + +TQIMEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIMEvent

+ +

This is the complete list of member functions for +TQIMEvent, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qimevent.html b/doc/html/qimevent.html new file mode 100644 index 00000000..1b0cfcba --- /dev/null +++ b/doc/html/qimevent.html @@ -0,0 +1,173 @@ + + + + + +TQIMEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIMEvent Class Reference

+ +

The TQIMEvent class provides parameters for input method events. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQIMEvent class provides parameters for input method events. +

+

Input method events are sent to widgets when an input method is +used to enter text into a widget. Input methods are widely used to +enter text in Asian and other complex languages. +

The events are of interest to widgets that accept keyboard input +and want to be able to correctly handle complex languages. Text +input in such languages is usually a three step process. +

    +
  1. Starting to Compose
    +When the user presses the first key on a keyboard an input context +is created. This input context will contain a string with the +typed characters. +

  2. Composing
    +With every new key pressed, the input method will try to create a +matching string for the text typed so far. While the input context +is active, the user can only move the cursor inside the string +belonging to this input context. +

  3. Completing
    +At some point, e.g. when the user presses the Spacebar, they get +to this stage, where they can choose from a number of strings that +match the text they have typed so far. The user can press Enter to +confirm their choice or Escape to cancel the input; in either case +the input context will be closed. +
+

Note that the particular key presses used for a given input +context may differ from those we've mentioned here, i.e. they may +not be Spacebar, Enter and Escape. +

These three stages are represented by three different types of +events. The IMStartEvent, IMComposeEvent and IMEndEvent. When a +new input context is created, an IMStartEvent will be sent to the +widget and delivered to the TQWidget::imStartEvent() function. +The widget can then update internal data structures to reflect +this. +

After this, an IMComposeEvent will be sent to the widget for +every key the user presses. It will contain the current +composition string the widget has to show and the current cursor +position within the composition string. This string is temporary +and can change with every key the user types, so the widget will +need to store the state before the composition started (the state +it had when it received the IMStartEvent). IMComposeEvents will be +delivered to the TQWidget::imComposeEvent() function. +

Usually, widgets try to mark the part of the text that is part of +the current composition in a way that is visible to the user. A +commonly used visual cue is to use a dotted underline. +

After the user has selected the final string, an IMEndEvent will +be sent to the widget. The event contains the final string the +user selected, and could be empty if they canceled the +composition. This string should be accepted as the final text the +user entered, and the intermediate composition string should be +cleared. These events are delivered to TQWidget::imEndEvent(). +

If the user clicks another widget, taking the focus out of the +widget where the composition is taking place the IMEndEvent will +be sent and the string it holds will be the result of the +composition up to that point (which may be an empty string). +

See also Event Classes. + +


Member Function Documentation

+

TQIMEvent::TQIMEvent ( Type type, const TQString & text, int cursorPosition ) +

+ +

Constructs a new TQIMEvent with the accept flag set to FALSE. type can be one of TQEvent::IMStartEvent, TQEvent::IMComposeEvent +or TQEvent::IMEndEvent. text contains the current compostion +string and cursorPosition the current position of the cursor +inside text. + +

void TQIMEvent::accept () +

+ +

Sets the accept flag of the input method event object. +

Setting the accept parameter indicates that the receiver of the +event processed the input method event. +

The accept flag is not set by default. +

See also ignore(). + +

int TQIMEvent::cursorPos () const +

+ +

Returns the current cursor position inside the composition string. +Will return -1 for IMStartEvent and IMEndEvent. + +

void TQIMEvent::ignore () +

+ +

Clears the accept flag parameter of the input method event object. +

Clearing the accept parameter indicates that the event receiver +does not want the input method event. +

The accept flag is cleared by default. +

See also accept(). + +

bool TQIMEvent::isAccepted () const +

+ +

Returns TRUE if the receiver of the event processed the event; +otherwise returns FALSE. + +

int TQIMEvent::selectionLength () const +

+ +

Returns the number of characters in the composition string ( +starting at cursorPos() ) that should be marked as selected by the +input widget receiving the event. +Will return 0 for IMStartEvent and IMEndEvent. + +

const TQString & TQIMEvent::text () const +

+ +

Returns the composition text. This is a null string for an +IMStartEvent, and contains the final accepted string (which may be +empty) in the IMEndEvent. + + +


+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/qinputdialog-h.html b/doc/html/qinputdialog-h.html new file mode 100644 index 00000000..03829cfc --- /dev/null +++ b/doc/html/qinputdialog-h.html @@ -0,0 +1,152 @@ + + + + + +qinputdialog.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qinputdialog.h

+ +

This is the verbatim text of the qinputdialog.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qinputdialog.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQInputDialog class
+**
+** Created : 991212
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the dialogs 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 retquirements 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 TQINPUTDIALOG_H
+#define TQINPUTDIALOG_H
+
+#ifndef QT_H
+#include "qdialog.h"
+#include "qstring.h"
+#include "qlineedit.h"
+#endif // QT_H
+
+#ifndef QT_NO_INPUTDIALOG
+
+class TQSpinBox;
+class TQComboBox;
+class TQInputDialogPrivate;
+
+class Q_EXPORT TQInputDialog : public TQDialog
+{
+    Q_OBJECT
+
+private:
+    enum Type { LineEdit, SpinBox, ComboBox, EditableComboBox };
+
+    TQInputDialog( const TQString &label, TQWidget* parent=0, const char* name=0,
+		 bool modal = TRUE, Type type = LineEdit ); //### 4.0: widget flag!
+    ~TQInputDialog();
+
+    TQLineEdit *lineEdit() const;
+    TQSpinBox *spinBox() const;
+    TQComboBox *comboBox() const;
+    TQComboBox *editableComboBox() const;
+
+    void setType( Type t );
+    Type type() const;
+
+public:
+    //### 4.0: widget flag!
+    static TQString getText( const TQString &caption, const TQString &label, TQLineEdit::EchoMode echo = TQLineEdit::Normal,
+			    const TQString &text = TQString::null, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 );
+    static int getInteger( const TQString &caption, const TQString &label, int value = 0, int minValue = -2147483647,
+			   int maxValue = 2147483647,
+			   int step = 1, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 );
+    static double getDouble( const TQString &caption, const TQString &label, double value = 0,
+			     double minValue = -2147483647, double maxValue = 2147483647,
+			     int decimals = 1, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 );
+    static TQString getItem( const TQString &caption, const TQString &label, const TQStringList &list,
+			    int current = 0, bool editable = TRUE,
+			    bool *ok = 0, TQWidget *parent = 0, const char *name = 0 );
+
+private slots:
+    void textChanged( const TQString &s );
+    void tryAccept();
+
+private:
+    TQInputDialogPrivate *d;
+    friend class TQInputDialogPrivate; /* to avoid 'has no friends' warnings... */
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQInputDialog( const TQInputDialog & );
+    TQInputDialog &operator=( const TQInputDialog & );
+#endif
+};
+
+#endif // QT_NO_INPUTDIALOG
+
+#endif // TQINPUTDIALOG_H
+
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qinputdialog-members.html b/doc/html/qinputdialog-members.html new file mode 100644 index 00000000..89ad1841 --- /dev/null +++ b/doc/html/qinputdialog-members.html @@ -0,0 +1,354 @@ + + + + + +TQInputDialog Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQInputDialog

+ +

This is the complete list of member functions for +TQInputDialog, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qinputdialog.html b/doc/html/qinputdialog.html new file mode 100644 index 00000000..6214c534 --- /dev/null +++ b/doc/html/qinputdialog.html @@ -0,0 +1,196 @@ + + + + + +TQInputDialog Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQInputDialog Class Reference

+ +

The TQInputDialog class provides a simple convenience dialog to get a single value from the user. +More... +

#include <qinputdialog.h> +

Inherits TQDialog. +

List of all member functions. +

Static Public Members

+
    +
  • TQString getText ( const TQString & caption, const TQString & label, TQLineEdit::EchoMode mode = TQLineEdit::Normal, const TQString & text = TQString::null, bool * ok = 0, TQWidget * parent = 0, const char * name = 0 )
  • +
  • int getInteger ( const TQString & caption, const TQString & label, int value = 0, int minValue = -2147483647, int maxValue = 2147483647, int step = 1, bool * ok = 0, TQWidget * parent = 0, const char * name = 0 )
  • +
  • double getDouble ( const TQString & caption, const TQString & label, double value = 0, double minValue = -2147483647, double maxValue = 2147483647, int decimals = 1, bool * ok = 0, TQWidget * parent = 0, const char * name = 0 )
  • +
  • TQString getItem ( const TQString & caption, const TQString & label, const TQStringList & list, int current = 0, bool editable = TRUE, bool * ok = 0, TQWidget * parent = 0, const char * name = 0 )
  • +
+

Detailed Description

+ + +The TQInputDialog class provides a simple convenience dialog to get a single value from the user. + + +

The input value can be a string, a number or an item from a list. A +label must be set to tell the user what they should enter. +

Four static convenience functions are provided: +getText(), getInteger(), getDouble() and getItem(). All the +functions can be used in a similar way, for example: +

+    bool ok;
+    TQString text = TQInputDialog::getText(
+            "MyApp 3000", "Enter your name:", TQLineEdit::Normal,
+            TQString::null, &ok, this );
+    if ( ok && !text.isEmpty() ) {
+        // user entered something and pressed OK
+    } else {
+        // user entered nothing or pressed Cancel
+    }
+    
+ +

Input Dialogs

See also Dialog Classes. + +


Member Function Documentation

+

double TQInputDialog::getDouble ( const TQString & caption, const TQString & label, double value = 0, double minValue = -2147483647, double maxValue = 2147483647, int decimals = 1, bool * ok = 0, TQWidget * parent = 0, const char * name = 0 ) [static] +

+Static convenience function to get a floating point number from +the user. caption is the text which is displayed in the title +bar of the dialog. label is the text which is shown to the user +(it should say what should be entered). value is the default +floating point number that the line edit will be set to. minValue and maxValue are the minimum and maximum values the +user may choose, and decimals is the maximum number of decimal +places the number may have. +

If ok is not-null *ok will be set to TRUE if the user +pressed OK and to FALSE if the user pressed Cancel. The dialog's +parent is parent; the dialog is called name. The dialog will +be modal. +

This function returns the floating point number which has been +entered by the user. +

Use this static function like this: +

+    bool ok;
+    double res = TQInputDialog::getDouble(
+            "MyApp 3000", "Enter a decimal number:", 33.7, 0,
+            1000, 2, &ok, this );
+    if ( ok ) {
+        // user entered something and pressed OK
+    } else {
+        // user pressed Cancel
+    }
+    
+ + +

int TQInputDialog::getInteger ( const TQString & caption, const TQString & label, int value = 0, int minValue = -2147483647, int maxValue = 2147483647, int step = 1, bool * ok = 0, TQWidget * parent = 0, const char * name = 0 ) [static] +

+Static convenience function to get an integer input from the +user. caption is the text which is displayed in the title bar +of the dialog. label is the text which is shown to the user +(it should say what should be entered). value is the default +integer which the spinbox will be set to. minValue and maxValue are the minimum and maximum values the user may choose, +and step is the amount by which the values change as the user +presses the arrow buttons to increment or decrement the value. +

If ok is not-null *ok will be set to TRUE if the user +pressed OK and to FALSE if the user pressed Cancel. The dialog's +parent is parent; the dialog is called name. The dialog will +be modal. +

This function returns the integer which has been entered by the user. +

Use this static function like this: +

+    bool ok;
+    int res = TQInputDialog::getInteger(
+            "MyApp 3000", "Enter a number:", 22, 0, 1000, 2,
+            &ok, this );
+    if ( ok ) {
+        // user entered something and pressed OK
+    } else {
+        // user pressed Cancel
+    }
+    
+ + +

TQString TQInputDialog::getItem ( const TQString & caption, const TQString & label, const TQStringList & list, int current = 0, bool editable = TRUE, bool * ok = 0, TQWidget * parent = 0, const char * name = 0 ) [static] +

+Static convenience function to let the user select an item from a +string list. caption is the text which is displayed in the title +bar of the dialog. label is the text which is shown to the user (it +should say what should be entered). list is the +string list which is inserted into the combobox, and current is the number +of the item which should be the current item. If editable is TRUE +the user can enter their own text; if editable is FALSE the user +may only select one of the existing items. +

If ok is not-null *ok will be set to TRUE if the user +pressed OK and to FALSE if the user pressed Cancel. The dialog's +parent is parent; the dialog is called name. The dialog will +be modal. +

This function returns the text of the current item, or if editable is TRUE, the current text of the combobox. +

Use this static function like this: +

+    TQStringList lst;
+    lst << "First" << "Second" << "Third" << "Fourth" << "Fifth";
+    bool ok;
+    TQString res = TQInputDialog::getItem(
+            "MyApp 3000", "Select an item:", lst, 1, TRUE, &ok,
+            this );
+    if ( ok ) {
+        // user selected an item and pressed OK
+    } else {
+        // user pressed Cancel
+    }
+    
+ + +

TQString TQInputDialog::getText ( const TQString & caption, const TQString & label, TQLineEdit::EchoMode mode = TQLineEdit::Normal, const TQString & text = TQString::null, bool * ok = 0, TQWidget * parent = 0, const char * name = 0 ) [static] +

+Static convenience function to get a string from the user. caption is the text which is displayed in the title bar of the +dialog. label is the text which is shown to the user (it should +say what should be entered). text is the default text which is +placed in the line edit. The mode is the echo mode the line edit +will use. If ok is not-null *ok will be set to TRUE if the +user pressed OK and to FALSE if the user pressed Cancel. The +dialog's parent is parent; the dialog is called name. The +dialog will be modal. +

This function returns the text which has been entered in the line +edit. It will not return an empty string. +

Use this static function like this: +

+    bool ok;
+    TQString text = TQInputDialog::getText(
+            "MyApp 3000", "Enter your name:", TQLineEdit::Normal,
+            TQString::null, &ok, this );
+    if ( ok && !text.isEmpty() ) {
+        // user entered something and pressed OK
+    } else {
+        // user entered nothing or pressed Cancel
+    }
+    
+ + + +

+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/qintcache-h.html b/doc/html/qintcache-h.html new file mode 100644 index 00000000..8f041560 --- /dev/null +++ b/doc/html/qintcache-h.html @@ -0,0 +1,169 @@ + + + + + +qintcache.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qintcache.h

+ +

This is the verbatim text of the qintcache.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qintcache.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQIntCache template class
+**
+** Created : 950209
+**
+** 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 retquirements 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 TQINTCACHE_H
+#define TQINTCACHE_H
+
+#ifndef QT_H
+#include "qgcache.h"
+#endif // QT_H
+
+
+template<class type> 
+class TQIntCache
+#ifdef Q_QDOC
+	: public TQPtrCollection
+#else
+	: public TQGCache
+#endif
+{
+public:
+    TQIntCache( const TQIntCache<type> &c ) : TQGCache(c) {}
+    TQIntCache( int maxCost=100, int size=17 )
+	: TQGCache( maxCost, size, IntKey, FALSE, FALSE ) {}
+   ~TQIntCache()		{ clear(); }
+    TQIntCache<type> &operator=( const TQIntCache<type> &c )
+			{ return (TQIntCache<type>&)TQGCache::operator=(c); }
+    int	  maxCost()   const	{ return TQGCache::maxCost(); }
+    int	  totalCost() const	{ return TQGCache::totalCost(); }
+    void  setMaxCost( int m)	{ TQGCache::setMaxCost(m); }
+    uint  count()     const	{ return TQGCache::count(); }
+    uint  size()      const	{ return TQGCache::size(); }
+    bool  isEmpty()   const	{ return TQGCache::count() == 0; }
+    bool  insert( long k, const type *d, int c=1, int p=0 )
+		{ return TQGCache::insert_other((const char*)k,(Item)d,c,p); }
+    bool  remove( long k )
+		{ return TQGCache::remove_other((const char*)k); }
+    type *take( long k )
+		{ return (type *)TQGCache::take_other((const char*)k);}
+    void  clear()		{ TQGCache::clear(); }
+    type *find( long k, bool ref=TRUE ) const
+		{ return (type *)TQGCache::find_other( (const char*)k,ref);}
+    type *operator[]( long k ) const
+		{ return (type *)TQGCache::find_other( (const char*)k); }
+    void  statistics() const { TQGCache::statistics(); }
+private:
+	void  deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void TQIntCache<void>::deleteItem( TQPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void TQIntCache<type>::deleteItem( TQPtrCollection::Item d )
+{
+    if ( del_item ) delete (type *)d;
+}
+
+template<class type> 
+class TQIntCacheIterator : public TQGCacheIterator
+{
+public:
+    TQIntCacheIterator( const TQIntCache<type> &c )
+	: TQGCacheIterator( (TQGCache &)c ) {}
+    TQIntCacheIterator( const TQIntCacheIterator<type> &ci )
+			      : TQGCacheIterator((TQGCacheIterator &)ci) {}
+    TQIntCacheIterator<type> &operator=( const TQIntCacheIterator<type>&ci )
+	{ return ( TQIntCacheIterator<type>&)TQGCacheIterator::operator=( ci );}
+    uint  count()   const     { return TQGCacheIterator::count(); }
+    bool  isEmpty() const     { return TQGCacheIterator::count() == 0; }
+    bool  atFirst() const     { return TQGCacheIterator::atFirst(); }
+    bool  atLast()  const     { return TQGCacheIterator::atLast(); }
+    type *toFirst()	      { return (type *)TQGCacheIterator::toFirst(); }
+    type *toLast()	      { return (type *)TQGCacheIterator::toLast(); }
+    operator type *()  const  { return (type *)TQGCacheIterator::get(); }
+    type *current()    const  { return (type *)TQGCacheIterator::get(); }
+    long  currentKey() const  { return (long)TQGCacheIterator::getKeyInt();}
+    type *operator()()	      { return (type *)TQGCacheIterator::operator()();}
+    type *operator++()	      { return (type *)TQGCacheIterator::operator++(); }
+    type *operator+=(uint j)  { return (type *)TQGCacheIterator::operator+=(j);}
+    type *operator--()	      { return (type *)TQGCacheIterator::operator--(); }
+    type *operator-=(uint j)  { return (type *)TQGCacheIterator::operator-=(j);}
+};
+
+
+#endif // TQINTCACHE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qintcache-members.html b/doc/html/qintcache-members.html new file mode 100644 index 00000000..43fdd584 --- /dev/null +++ b/doc/html/qintcache-members.html @@ -0,0 +1,64 @@ + + + + + +TQIntCache Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIntCache

+ +

This is the complete list of member functions for +TQIntCache, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qintcache.html b/doc/html/qintcache.html new file mode 100644 index 00000000..95e8c634 --- /dev/null +++ b/doc/html/qintcache.html @@ -0,0 +1,242 @@ + + + + + +TQIntCache Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIntCache Class Reference

+ +

The TQIntCache class is a template class that provides a cache based on long keys. +More... +

#include <qintcache.h> +

Inherits TQPtrCollection. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQIntCache class is a template class that provides a cache based on long keys. +

+ +

TQIntCache is implemented as a template class. Define a template +instance TQIntCache<X> to create a cache that operates on +pointers to X, or X*. +

A cache is a least recently used (LRU) list of cache items, +accessed via long keys. Each cache item has a cost. The sum +of item costs, totalCost(), will not exceed the maximum cache +cost, maxCost(). If inserting a new item would cause the total +cost to exceed the maximum cost, the least recently used items in +the cache are removed. +

Apart from insert(), by far the most important function is find() +(which also exists as operator[]). This function looks up an +item, returns it, and by default marks it as being the most +recently used item. +

There are also methods to remove() or take() an object from the +cache. Calling setAutoDelete(TRUE) for a cache tells it to delete +items that are removed. The default is to not delete items when +they are removed (i.e. remove() and take() are equivalent). +

When inserting an item into the cache, only the pointer is copied, +not the item itself. This is called a shallow copy. It is possible +to make the cache copy all of the item's data (known as a deep copy) when an item is inserted. insert() calls the virtual +function TQPtrCollection::newItem() for the item to be inserted. +Inherit a dictionary and reimplement newItem() if you want deep +copies. +

When removing a cache item, the item will be automatically +deleted if auto-deletion is enabled. +

There is a TQIntCacheIterator which may be used to traverse the +items in the cache in arbitrary order. +

See also TQIntCacheIterator, TQCache, TQAsciiCache, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQIntCache::TQIntCache ( int maxCost = 100, int size = 17 ) +

+ +

Constructs a cache whose contents will never have a total cost +greater than maxCost and which is expected to contain less than +size items. +

size is actually the size of an internal hash array; it's +usually best to make it prime and at least 50% bigger than the +largest expected number of items in the cache. +

Each inserted item is associated with a cost. When inserting a new +item, if the total cost of all items in the cache will exceed maxCost, the cache will start throwing out the older (least +recently used) items until there is enough room for the new item +to be inserted. + +

TQIntCache::~TQIntCache () +

+ +

Removes all items from the cache and then destroys the int cache. +If auto-deletion is enabled the cache's items are deleted. All +iterators that access this cache will be reset. + +

void TQIntCache::clear () [virtual] +

+ +

Removes all items from the cache, and deletes them if +auto-deletion has been enabled. +

All cache iterators that operate this on cache are reset. +

See also remove() and take(). + +

Reimplemented from TQPtrCollection. +

uint TQIntCache::count () const [virtual] +

+ +

Returns the number of items in the cache. +

See also totalCost(). + +

Reimplemented from TQPtrCollection. +

type * TQIntCache::find ( long k, bool ref = TRUE ) const +

+ +

Returns the item associated with k, or 0 if the key does not +exist in the cache. If ref is TRUE (the default), the item is +moved to the front of the least recently used list. +

If there are two or more items with equal keys, the one that was +inserted most recently is returned. + +

bool TQIntCache::insert ( long k, const type * d, int c = 1, int p = 0 ) +

+ +

Inserts the item d into the cache with key k and assigns it +a cost of c (default 1). Returns TRUE if it succeeds; otherwise +returns FALSE. +

The cache's size is limited, and if the total cost is too high, +TQIntCache will remove old, least-used items until there is room +for this new item. +

The parameter p is internal and should be left at the default +value (0). +

Warning: If this function returns FALSE (for example, the cost , +exceeds maxCost()), you must delete d yourself. Additionally, +be very careful about using d after calling this function. Any +other insertions into the cache, from anywhere in the application +or within TQt itself, could cause the object to be discarded from +the cache and the pointer to become invalid. + +

bool TQIntCache::isEmpty () const +

+ +

Returns TRUE if the cache is empty; otherwise returns FALSE. + +

int TQIntCache::maxCost () const +

+ +

Returns the maximum allowed total cost of the cache. +

See also setMaxCost() and totalCost(). + +

type * TQIntCache::operator[] ( long k ) const +

+ +

Returns the item associated with k, or 0 if k does not exist +in the cache, and moves the item to the front of the least +recently used list. +

If there are two or more items with equal keys, the one that was +inserted most recently is returned. +

This is the same as find( k, TRUE ). +

See also find(). + +

bool TQIntCache::remove ( long k ) +

+ +

Removes the item associated with k, and returns TRUE if the +item was present in the cache; otherwise returns FALSE. +

The item is deleted if auto-deletion has been enabled, i.e. if you +have called setAutoDelete(TRUE). +

If there are two or more items with equal keys, the one that was +inserted most recently is removed. +

All iterators that refer to the removed item are set to point to +the next item in the cache's traversal order. +

See also take() and clear(). + +

void TQIntCache::setMaxCost ( int m ) +

+ +

Sets the maximum allowed total cost of the cache to m. If the +current total cost is greater than m, some items are removed +immediately. +

See also maxCost() and totalCost(). + +

uint TQIntCache::size () const +

+ +

Returns the size of the hash array used to implement the cache. +This should be a bit larger than count() is likely to be. + +

void TQIntCache::statistics () const +

+ +

A debug-only utility function. Prints out cache usage, hit/miss, +and distribution information using qDebug(). This function does +nothing in the release library. + +

type * TQIntCache::take ( long k ) +

+ +

Takes the item associated with k out of the cache without +deleting it, and returns a pointer to the item taken out or 0 if +the key does not exist in the cache. +

If there are two or more items with equal keys, the one that was +inserted most recently is taken. +

All iterators that refer to the taken item are set to point to the +next item in the cache's traversal order. +

See also remove() and clear(). + +

int TQIntCache::totalCost () const +

+ +

Returns the total cost of the items in the cache. This is an +integer in the range 0 to maxCost(). +

See also setMaxCost(). + + +


+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/qintcacheiterator-members.html b/doc/html/qintcacheiterator-members.html new file mode 100644 index 00000000..a021ffce --- /dev/null +++ b/doc/html/qintcacheiterator-members.html @@ -0,0 +1,62 @@ + + + + + +TQIntCacheIterator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIntCacheIterator

+ +

This is the complete list of member functions for +TQIntCacheIterator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qintcacheiterator.html b/doc/html/qintcacheiterator.html new file mode 100644 index 00000000..0af1bfa5 --- /dev/null +++ b/doc/html/qintcacheiterator.html @@ -0,0 +1,211 @@ + + + + + +TQIntCacheIterator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIntCacheIterator Class Reference

+ +

The TQIntCacheIterator class provides an iterator for TQIntCache collections. +More... +

#include <qintcache.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQIntCacheIterator class provides an iterator for TQIntCache collections. +

+ +

Note that the traversal order is arbitrary; you are not guaranteed +any particular order. If new objects are inserted into the cache +while the iterator is active, the iterator may or may not see +them. +

Multiple iterators are completely independent, even when they +operate on the same TQIntCache. TQIntCache updates all iterators +that refer an item when that item is removed. +

TQIntCacheIterator provides an operator++(), and an operator+=() to +traverse the cache; current() and currentKey() to access the +current cache item and its key; atFirst() atLast(), which return +TRUE if the iterator points to the first/last item in the cache; +isEmpty(), which returns TRUE if the cache is empty; and count(), +which returns the number of items in the cache. +

Note that atFirst() and atLast() refer to the iterator's arbitrary +ordering, not to the cache's internal least recently used list. +

See also TQIntCache, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQIntCacheIterator::TQIntCacheIterator ( const TQIntCache<type> & cache ) +

+ +

Constructs an iterator for cache. The current iterator item is +set to point to the first item in the cache (or rather, the +first item is defined to be the item at which this constructor +sets the iterator to point). + +

TQIntCacheIterator::TQIntCacheIterator ( const TQIntCacheIterator<type> & ci ) +

+ +

Constructs an iterator for the same cache as ci. The new +iterator starts at the same item as ci.current(), but moves +independently from there on. + +

bool TQIntCacheIterator::atFirst () const +

+ +

Returns TRUE if the iterator points to the first item in the +cache; otherwise returns FALSE. Note that this refers to the +iterator's arbitrary ordering, not to the cache's internal least +recently used list. +

See also toFirst() and atLast(). + +

bool TQIntCacheIterator::atLast () const +

+ +

Returns TRUE if the iterator points to the last item in the cache; +otherwise returns FALSE. Note that this refers to the iterator's +arbitrary ordering, not to the cache's internal least recently +used list. +

See also toLast() and atFirst(). + +

uint TQIntCacheIterator::count () const +

+ +

Returns the number of items in the cache on which this iterator +operates. +

See also isEmpty(). + +

type * TQIntCacheIterator::current () const +

+ +

Returns a pointer to the current iterator item. + +

long TQIntCacheIterator::currentKey () const +

+ +

Returns the key for the current iterator item. + +

bool TQIntCacheIterator::isEmpty () const +

+ +

Returns TRUE if the cache is empty; otherwise returns FALSE. +

See also count(). + +

TQIntCacheIterator::operator type * () const +

+ +

Cast operator. Returns a pointer to the current iterator item. +Same as current(). + +

type * TQIntCacheIterator::operator() () +

+ +

Makes the succeeding item current and returns the original current +item. +

If the current iterator item was the last item in the cache or if +it was 0, 0 is returned. + +

type * TQIntCacheIterator::operator++ () +

+ +

Prefix ++ makes the iterator point to the item just after +current(), and makes it the new current item for the iterator. If +current() was the last item, operator--() returns 0. + +

type * TQIntCacheIterator::operator+= ( uint jump ) +

+ +

Returns the item jump positions after the current item, or 0 if +it is beyond the last item. Makes this the current item. + +

type * TQIntCacheIterator::operator-- () +

+ +

Prefix -- makes the iterator point to the item just before +current(), and makes it the new current item for the iterator. If +current() was the first item, operator--() returns 0. + +

type * TQIntCacheIterator::operator-= ( uint jump ) +

+ +

Returns the item jump positions before the current item, or 0 +if it is beyond the first item. Makes this the current item. + +

TQIntCacheIterator<type> & TQIntCacheIterator::operator= ( const TQIntCacheIterator<type> & ci ) +

+ +

Makes this an iterator for the same cache as ci. The new +iterator starts at the same item as ci.current(), but moves +independently thereafter. + +

type * TQIntCacheIterator::toFirst () +

+ +

Sets the iterator to point to the first item in the cache and +returns a pointer to the item. +

Sets the iterator to 0, and returns 0, if the cache is empty. +

See also toLast() and isEmpty(). + +

type * TQIntCacheIterator::toLast () +

+ +

Sets the iterator to point to the last item in the cache and +returns a pointer to the item. +

Sets the iterator to 0, and returns 0, if the cache is empty. +

See also toFirst() and isEmpty(). + + +


+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/qintdict-h.html b/doc/html/qintdict-h.html new file mode 100644 index 00000000..ef63a2b2 --- /dev/null +++ b/doc/html/qintdict-h.html @@ -0,0 +1,164 @@ + + + + + +qintdict.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qintdict.h

+ +

This is the verbatim text of the qintdict.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qintdict.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQIntDict template class
+**
+** Created : 940624
+**
+** 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 retquirements 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 TQINTDICT_H
+#define TQINTDICT_H
+
+#ifndef QT_H
+#include "qgdict.h"
+#endif // QT_H
+
+template<class type>
+class TQIntDict
+#ifdef Q_QDOC
+	: public TQPtrCollection
+#else
+	: public TQGDict
+#endif
+{
+public:
+    TQIntDict(int size=17) : TQGDict(size,IntKey,0,0) {}
+    TQIntDict( const TQIntDict<type> &d ) : TQGDict(d) {}
+   ~TQIntDict()				{ clear(); }
+    TQIntDict<type> &operator=(const TQIntDict<type> &d)
+			{ return (TQIntDict<type>&)TQGDict::operator=(d); }
+    uint  count()   const		{ return TQGDict::count(); }
+    uint  size()    const		{ return TQGDict::size(); }
+    bool  isEmpty() const		{ return TQGDict::count() == 0; }
+    void  insert( long k, const type *d )
+					{ TQGDict::look_int(k,(Item)d,1); }
+    void  replace( long k, const type *d )
+					{ TQGDict::look_int(k,(Item)d,2); }
+    bool  remove( long k )		{ return TQGDict::remove_int(k); }
+    type *take( long k )		{ return (type*)TQGDict::take_int(k); }
+    type *find( long k ) const
+		{ return (type *)((TQGDict*)this)->TQGDict::look_int(k,0,0); }
+    type *operator[]( long k ) const
+		{ return (type *)((TQGDict*)this)->TQGDict::look_int(k,0,0); }
+    void  clear()			{ TQGDict::clear(); }
+    void  resize( uint n )		{ TQGDict::resize(n); }
+    void  statistics() const		{ TQGDict::statistics(); }
+
+#ifdef Q_QDOC
+protected:
+    virtual TQDataStream& read( TQDataStream &, TQPtrCollection::Item & );
+    virtual TQDataStream& write( TQDataStream &, TQPtrCollection::Item ) const;
+#endif
+
+private:
+    void  deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void TQIntDict<void>::deleteItem( TQPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void TQIntDict<type>::deleteItem( TQPtrCollection::Item d )
+{
+    if ( del_item ) delete (type*)d;
+}
+
+template<class type> 
+class TQIntDictIterator : public TQGDictIterator
+{
+public:
+    TQIntDictIterator(const TQIntDict<type> &d) :TQGDictIterator((TQGDict &)d) {}
+   ~TQIntDictIterator()	      {}
+    uint  count()   const     { return dict->count(); }
+    bool  isEmpty() const     { return dict->count() == 0; }
+    type *toFirst()	      { return (type *)TQGDictIterator::toFirst(); }
+    operator type *()  const  { return (type *)TQGDictIterator::get(); }
+    type *current()    const  { return (type *)TQGDictIterator::get(); }
+    long  currentKey() const  { return TQGDictIterator::getKeyInt(); }
+    type *operator()()	      { return (type *)TQGDictIterator::operator()(); }
+    type *operator++()	      { return (type *)TQGDictIterator::operator++(); }
+    type *operator+=(uint j)  { return (type *)TQGDictIterator::operator+=(j);}
+};
+
+#define Q_DEFINED_QINTDICT
+#include "qwinexport.h"
+#endif // TQINTDICT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qintdict-members.html b/doc/html/qintdict-members.html new file mode 100644 index 00000000..51d45437 --- /dev/null +++ b/doc/html/qintdict-members.html @@ -0,0 +1,67 @@ + + + + + +TQIntDict Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIntDict

+ +

This is the complete list of member functions for +TQIntDict, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qintdict.html b/doc/html/qintdict.html new file mode 100644 index 00000000..03a7079b --- /dev/null +++ b/doc/html/qintdict.html @@ -0,0 +1,313 @@ + + + + + +TQIntDict Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIntDict Class Reference

+ +

The TQIntDict class is a template class that provides a dictionary based on long keys. +More... +

#include <qintdict.h> +

Inherits TQPtrCollection. +

List of all member functions. +

Public Members

+ +

Important Inherited Members

+ +

Protected Members

+
    +
  • virtual TQDataStream & read ( TQDataStream & s, TQPtrCollection::Item & item )
  • +
  • virtual TQDataStream & write ( TQDataStream & s, TQPtrCollection::Item ) const
  • +
+

Detailed Description

+ + +The TQIntDict class is a template class that provides a dictionary based on long keys. +

+ +

+

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*). +

A dictionary is a collection of key-value pairs. The key is an long used for insertion, removal and lookup. The value is a +pointer. Dictionaries provide very fast insertion and lookup. +

Example: +

+    TQIntDict<TQLineEdit> fields; // long int keys, TQLineEdit* values
+    for ( int i = 0; i < 3; i++ )
+        fields.insert( i, new TQLineEdit( this ) );
+
+    fields[0]->setText( "Homer" );
+    fields[1]->setText( "Simpson" );
+    fields[2]->setText( "45" );
+
+    TQIntDictIterator<TQLineEdit> it( fields );
+    for ( ; it.current(); ++it )
+        cout << it.currentKey() << ": " << it.current()->text() << endl;
+
+    for ( int i = 0; i < 3; i++ )
+        cout << fields[i]->text() << " "; // Prints "Homer Simpson 45"
+    cout << endl;
+
+    fields.remove( 1 ); // Does not delete the line edit
+    for ( int i = 0; i < 3; i++ )
+        if ( fields[i] )
+            cout << fields[i]->text() << " "; // Prints "Homer 45"
+    
+ +

See TQDict for full details, including the choice of dictionary +size, and how deletions are handled. +

See also TQIntDictIterator, TQDict, TQAsciiDict, TQPtrDict, Collection Classes, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQIntDict::TQIntDict ( int size = 17 ) +

+ +

Constructs a dictionary using an internal hash array of size size. +

Setting size to a suitably large prime number (equal to or +greater than the expected number of entries) makes the hash +distribution better which leads to faster lookup. + +

TQIntDict::TQIntDict ( const TQIntDict<type> & dict ) +

+ +

Constructs a copy of dict. +

Each item in dict is inserted into this dictionary. Only the +pointers are copied (shallow copy). + +

TQIntDict::~TQIntDict () +

+ +

Removes all items from the dictionary and destroys it. +

All iterators that access this dictionary will be reset. +

See also setAutoDelete(). + +

bool TQPtrCollection::autoDelete () const +

+ +

Returns the setting of the auto-delete option. The default is FALSE. +

See also setAutoDelete(). + +

void TQIntDict::clear () [virtual] +

+ +

Removes all items from the dictionary. +

The removed items are deleted if auto-deletion is enabled. +

All dictionary iterators that access this dictionary will be reset. +

See also remove(), take(), and setAutoDelete(). + +

Reimplemented from TQPtrCollection. +

uint TQIntDict::count () const [virtual] +

+ +

Returns the number of items in the dictionary. +

See also isEmpty(). + +

Reimplemented from TQPtrCollection. +

type * TQIntDict::find ( long key ) const +

+ +

Returns the item associated with key, or 0 if the key does not +exist in the dictionary. +

If there are two or more items with equal keys, then the most +recently inserted item will be found. +

Equivalent to operator[]. +

See also operator[](). + +

Example: table/bigtable/main.cpp. +

void TQIntDict::insert ( long key, const type * item ) +

+ +

Insert item item into the dictionary using key key. +

Multiple items can have the same key, in which case only the last +item will be accessible using operator[](). +

item may not be 0. +

See also replace(). + +

Example: scribble/scribble.cpp. +

bool TQIntDict::isEmpty () const +

+ +

Returns TRUE if the dictionary is empty; otherwise returns FALSE. +

See also count(). + +

TQIntDict<type> & TQIntDict::operator= ( const TQIntDict<type> & dict ) +

+ +

Assigns dict to this dictionary and returns a reference to this +dictionary. +

This dictionary is first cleared and then each item in dict is +inserted into this dictionary. Only the pointers are copied +(shallow copy), unless newItem() has been reimplemented. + +

type * TQIntDict::operator[] ( long key ) const +

+ +

Returns the item associated with key, or 0 if the key does not +exist in the dictionary. +

If there are two or more items with equal keys, then the most +recently inserted item will be found. +

Equivalent to the find() function. +

See also find(). + +

TQDataStream & TQIntDict::read ( TQDataStream & s, TQPtrCollection::Item & item ) [virtual protected] +

+ +

Reads a dictionary item from the stream s and returns a +reference to the stream. +

The default implementation sets item to 0. +

See also write(). + +

bool TQIntDict::remove ( long key ) +

+ +

Removes the item associated with key from the dictionary. +Returns TRUE if successful, i.e. if the key is in the +dictionary; otherwise returns FALSE. +

If there are two or more items with equal keys, then the most +recently inserted item will be removed. +

The removed item is deleted if auto-deletion is enabled. +

All dictionary iterators that refer to the removed item will be +set to point to the next item in the dictionary's traversal +order. +

See also take(), clear(), and setAutoDelete(). + +

Example: table/bigtable/main.cpp. +

void TQIntDict::replace ( long key, const type * item ) +

+ +

If the dictionary has key key, this key's item is replaced with +item. If the dictionary doesn't contain key key, item is +inserted into the dictionary using key key. +

item may not be 0. +

Equivalent to: +

+        TQIntDict<char> dict;
+        //      ...
+        if ( dict.find(key) )
+            dict.remove( key );
+        dict.insert( key, item );
+    
+ +

If there are two or more items with equal keys, then the most +recently inserted item will be replaced. +

See also insert(). + +

Example: table/bigtable/main.cpp. +

void TQIntDict::resize ( uint newsize ) +

+ +

Changes the size of the hashtable to newsize. The contents of +the dictionary are preserved, but all iterators on the dictionary +become invalid. + +

void TQPtrCollection::setAutoDelete ( bool enable ) +

+ +

Sets the collection to auto-delete its contents if enable is +TRUE and to never delete them if enable is FALSE. +

If auto-deleting is turned on, all the items in a collection are +deleted when the collection itself is deleted. This is convenient +if the collection has the only pointer to the items. +

The default setting is FALSE, for safety. If you turn it on, be +careful about copying the collection - you might find yourself +with two collections deleting the same items. +

Note that the auto-delete setting may also affect other functions +in subclasses. For example, a subclass that has a remove() +function will remove the item from its data structure, and if +auto-delete is enabled, will also delete the item. +

See also autoDelete(). + +

Examples: grapher/grapher.cpp, scribble/scribble.cpp, and table/bigtable/main.cpp. +

uint TQIntDict::size () const +

+ +

Returns the size of the internal hash array (as specified in the +constructor). +

See also count(). + +

void TQIntDict::statistics () const +

+ +

Debugging-only function that prints out the dictionary +distribution using qDebug(). + +

type * TQIntDict::take ( long key ) +

+ +

Takes the item associated with key out of the dictionary +without deleting it (even if auto-deletion is enabled). +

If there are two or more items with equal keys, then the most +recently inserted item will be taken. +

Returns a pointer to the item taken out, or 0 if the key does not +exist in the dictionary. +

All dictionary iterators that refer to the taken item will be set +to point to the next item in the dictionary's traversing order. +

See also remove(), clear(), and setAutoDelete(). + +

Example: table/bigtable/main.cpp. +

TQDataStream & TQIntDict::write ( TQDataStream & s, TQPtrCollection::Item ) const [virtual protected] +

+ +

Writes a dictionary item to the stream s and returns a +reference to the stream. +

See also read(). + + +


+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/qintdictiterator-members.html b/doc/html/qintdictiterator-members.html new file mode 100644 index 00000000..8241ef28 --- /dev/null +++ b/doc/html/qintdictiterator-members.html @@ -0,0 +1,57 @@ + + + + + +TQIntDictIterator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIntDictIterator

+ +

This is the complete list of member functions for +TQIntDictIterator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qintdictiterator.html b/doc/html/qintdictiterator.html new file mode 100644 index 00000000..e54682b7 --- /dev/null +++ b/doc/html/qintdictiterator.html @@ -0,0 +1,176 @@ + + + + + +TQIntDictIterator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIntDictIterator Class Reference

+ +

The TQIntDictIterator class provides an iterator for TQIntDict collections. +More... +

#include <qintdict.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQIntDictIterator class provides an iterator for TQIntDict collections. +

+ +

TQIntDictIterator is implemented as a template class. Define a +template instance TQIntDictIterator<X> to create a dictionary +iterator that operates on TQIntDict<X> (dictionary of X*). +

Example: +

+    TQIntDict<TQLineEdit> fields;
+    for ( int i = 0; i < 3; i++ )
+        fields.insert( i, new TQLineEdit( this ) );
+
+    fields[0]->setText( "Homer" );
+    fields[1]->setText( "Simpson" );
+    fields[2]->setText( "45" );
+
+    TQIntDictIterator<TQLineEdit> it( fields ); 
+    for ( ; it.current(); ++it )
+        cout << it.currentKey() << ": " << it.current()->text() << endl;
+
+    // Output (random order):
+    //  0: Homer
+    //  1: Simpson
+    //  2: 45
+    
+ +

Note that the traversal order is arbitrary; you are not guaranteed the +order shown above. +

Multiple iterators may independently traverse the same dictionary. +A TQIntDict knows about all the iterators that are operating on the +dictionary. When an item is removed from the dictionary, TQIntDict +updates all iterators that refer the removed item to point to the +next item in the traversal order. +

See also TQIntDict, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQIntDictIterator::TQIntDictIterator ( const TQIntDict<type> & dict ) +

+ +

Constructs an iterator for dict. The current iterator item is +set to point to the 'first' item in the dict. The first item +refers to the first item in the dictionary's arbitrary internal +ordering. + +

TQIntDictIterator::~TQIntDictIterator () +

+ +

Destroys the iterator. + +

uint TQIntDictIterator::count () const +

+ +

Returns the number of items in the dictionary this iterator +operates over. +

See also isEmpty(). + +

type * TQIntDictIterator::current () const +

+ +

Returns a pointer to the current iterator item. + +

long TQIntDictIterator::currentKey () const +

+ +

Returns the key for the current iterator item. + +

bool TQIntDictIterator::isEmpty () const +

+ +

Returns TRUE if the dictionary is empty; otherwise eturns FALSE. +

See also count(). + +

TQIntDictIterator::operator type * () const +

+ +

Cast operator. Returns a pointer to the current iterator item. +Same as current(). + +

type * TQIntDictIterator::operator() () +

+ +

Makes the succeeding item current and returns the original current +item. +

If the current iterator item was the last item in the dictionary +or if it was 0, 0 is returned. + +

type * TQIntDictIterator::operator++ () +

+ +

Prefix ++ makes the succeeding item current and returns the new +current item. +

If the current iterator item was the last item in the dictionary +or if it was 0, 0 is returned. + +

type * TQIntDictIterator::operator+= ( uint jump ) +

+ +

Sets the current item to the item jump positions after the +current item, and returns a pointer to that item. +

If that item is beyond the last item or if the dictionary is +empty, it sets the current item to 0 and returns 0. + +

type * TQIntDictIterator::toFirst () +

+ +

Sets the current iterator item to point to the first item in the +dictionary and returns a pointer to the item. The first item +refers to the first item in the dictionary's arbitrary internal +ordering. If the dictionary is empty it sets the current item to +0 and returns 0. + + +


+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/qintvalidator-members.html b/doc/html/qintvalidator-members.html new file mode 100644 index 00000000..6cf7f885 --- /dev/null +++ b/doc/html/qintvalidator-members.html @@ -0,0 +1,97 @@ + + + + + +TQIntValidator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIntValidator

+ +

This is the complete list of member functions for +TQIntValidator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qintvalidator.html b/doc/html/qintvalidator.html new file mode 100644 index 00000000..a9a716eb --- /dev/null +++ b/doc/html/qintvalidator.html @@ -0,0 +1,176 @@ + + + + + +TQIntValidator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIntValidator Class Reference

+ +

The TQIntValidator class provides a validator which ensures +that a string contains a valid integer within a specified range. +More... +

#include <qvalidator.h> +

Inherits TQValidator. +

List of all member functions. +

Public Members

+ +

Properties

+
    +
  • int bottom - the validator's lowest acceptable value
  • +
  • int top - the validator's highest acceptable value
  • +
+

Detailed Description

+ + +The TQIntValidator class provides a validator which ensures +that a string contains a valid integer within a specified range. +

+

Example of use: +

+    TQValidator* validator = new TQIntValidator( 100, 999, this );
+    TQLineEdit* edit = new TQLineEdit( this );
+
+    // the edit lineedit will only accept integers between 100 and 999
+    edit->setValidator( validator );
+    
+ +

Below we present some examples of validators. In practice they would +normally be associated with a widget as in the example above. +

+    TQString str;
+    int pos = 0;
+    TQIntValidator v( 100, 999, this );
+
+    str = "1";
+    v.validate( str, pos );     // returns Intermediate
+    str = "12";
+    v.validate( str, pos );     // returns Intermediate
+
+    str = "123";
+    v.validate( str, pos );     // returns Acceptable
+    str = "678";
+    v.validate( str, pos );     // returns Acceptable
+
+    str = "1234";
+    v.validate( str, pos );     // returns Invalid
+    str = "-123";
+    v.validate( str, pos );     // returns Invalid
+    str = "abc";
+    v.validate( str, pos );     // returns Invalid
+    str = "12cm";
+    v.validate( str, pos );     // returns Invalid
+    
+ +

The minimum and maximum values are set in one call with setRange() +or individually with setBottom() and setTop(). +

See also TQDoubleValidator, TQRegExpValidator, and Miscellaneous Classes. + +


Member Function Documentation

+

TQIntValidator::TQIntValidator ( TQObject * parent, const char * name = 0 ) +

+Constructs a validator called name with parent parent, that +accepts all integers. + +

TQIntValidator::TQIntValidator ( int minimum, int maximum, TQObject * parent, const char * name = 0 ) +

+Constructs a validator called name with parent parent, that +accepts integers from minimum to maximum inclusive. + +

TQIntValidator::~TQIntValidator () +

+Destroys the validator, freeing any resources allocated. + +

int TQIntValidator::bottom () const +

Returns the validator's lowest acceptable value. +See the "bottom" property for details. +

void TQIntValidator::setBottom ( int ) +

Sets the validator's lowest acceptable value. +See the "bottom" property for details. +

void TQIntValidator::setRange ( int bottom, int top ) [virtual] +

+Sets the range of the validator to only accept integers between bottom and top inclusive. + +

void TQIntValidator::setTop ( int ) +

Sets the validator's highest acceptable value. +See the "top" property for details. +

int TQIntValidator::top () const +

Returns the validator's highest acceptable value. +See the "top" property for details. +

TQValidator::State TQIntValidator::validate ( TQString & input, int & ) const [virtual] +

+Returns Acceptable if the input is an integer within the +valid range, Intermediate if the input is an integer outside +the valid range and Invalid if the input is not an integer. +

Note: If the valid range consists of just positive integers (e.g. 32 - 100) +and input is a negative integer then Invalid is returned. +

+    int pos = 0;
+    s = "abc";
+    v.validate( s, pos ); // returns Invalid
+
+    s = "5";
+    v.validate( s, pos ); // returns Intermediate
+
+    s = "50";
+    v.validate( s, pos ); // returns Valid
+    
+ + +

Reimplemented from TQValidator. +


Property Documentation

+

int bottom

+

This property holds the validator's lowest acceptable value. +

Set this property's value with setBottom() and get this property's value with bottom(). +

See also setRange(). + +

int top

+

This property holds the validator's highest acceptable value. +

Set this property's value with setTop() and get this property's value with top(). +

See also setRange(). + + +


+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/qiodevice-h.html b/doc/html/qiodevice-h.html new file mode 100644 index 00000000..dbeb2a43 --- /dev/null +++ b/doc/html/qiodevice-h.html @@ -0,0 +1,209 @@ + + + + + +qiodevice.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qiodevice.h

+ +

This is the verbatim text of the qiodevice.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qiodevice.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQIODevice class
+**
+** Created : 940913
+**
+** 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 retquirements 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 TQIODEVICE_H
+#define TQIODEVICE_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#include "qcstring.h"
+#endif // QT_H
+
+
+// IO device access types
+
+#define IO_Direct		0x0100		// direct access device
+#define IO_Sequential		0x0200		// sequential access device
+#define IO_Combined		0x0300		// combined direct/sequential
+#define IO_TypeMask		0x0f00
+
+// IO handling modes
+
+#define IO_Raw			0x0040		// raw access (not buffered)
+#define IO_Async		0x0080		// asynchronous mode
+
+// IO device open modes
+
+#define IO_ReadOnly		0x0001		// readable device
+#define IO_WriteOnly		0x0002		// writable device
+#define IO_ReadWrite		0x0003		// read+write device
+#define IO_Append		0x0004		// append
+#define IO_Truncate		0x0008		// truncate device
+#define IO_Translate		0x0010		// translate CR+LF
+#define IO_ModeMask		0x00ff
+
+// IO device state
+
+#define IO_Open			0x1000		// device is open
+#define IO_StateMask		0xf000
+
+// IO device status
+
+#define IO_Ok			0
+#define IO_ReadError		1		// read error
+#define IO_WriteError		2		// write error
+#define IO_FatalError		3		// fatal unrecoverable error
+#define IO_ResourceError	4		// resource limitation
+#define IO_OpenError		5		// cannot open device
+#define IO_ConnectError		5		// cannot connect to device
+#define IO_AbortError		6		// abort error
+#define IO_TimeOutError		7		// time out
+#define IO_UnspecifiedError	8		// unspecified error
+
+
+class Q_EXPORT TQIODevice
+{
+public:
+#if defined(QT_ABI_QT4)
+    typedef Q_LLONG Offset;
+#else
+    typedef Q_ULONG Offset;
+#endif
+
+    TQIODevice();
+    virtual ~TQIODevice();
+
+    int		 flags()  const { return ioMode; }
+    int		 mode()	  const { return ioMode & IO_ModeMask; }
+    int		 state()  const { return ioMode & IO_StateMask; }
+
+    bool	 isDirectAccess()     const { return ((ioMode & IO_Direct)     == IO_Direct); }
+    bool	 isSequentialAccess() const { return ((ioMode & IO_Sequential) == IO_Sequential); }
+    bool	 isCombinedAccess()   const { return ((ioMode & IO_Combined)   == IO_Combined); }
+    bool	 isBuffered()	      const { return ((ioMode & IO_Raw)        != IO_Raw); }
+    bool	 isRaw()	      const { return ((ioMode & IO_Raw)        == IO_Raw); }
+    bool	 isSynchronous()      const { return ((ioMode & IO_Async)      != IO_Async); }
+    bool	 isAsynchronous()     const { return ((ioMode & IO_Async)      == IO_Async); }
+    bool	 isTranslated()	      const { return ((ioMode & IO_Translate)  == IO_Translate); }
+    bool	 isReadable()	      const { return ((ioMode & IO_ReadOnly)   == IO_ReadOnly); }
+    bool	 isWritable()	      const { return ((ioMode & IO_WriteOnly)  == IO_WriteOnly); }
+    bool	 isReadWrite()	      const { return ((ioMode & IO_ReadWrite)  == IO_ReadWrite); }
+    bool	 isInactive()	      const { return state() == 0; }
+    bool	 isOpen()	      const { return state() == IO_Open; }
+
+    int		 status() const { return ioSt; }
+    void	 resetStatus()	{ ioSt = IO_Ok; }
+
+    virtual bool open( int mode ) = 0;
+    virtual void close() = 0;
+    virtual void flush() = 0;
+
+    virtual Offset size()  const = 0;
+    virtual Offset at()  const;
+    virtual bool at( Offset );
+    virtual bool atEnd()  const;
+    bool	 reset() { return at(0); }
+
+    virtual Q_LONG readBlock( char *data, Q_ULONG maxlen ) = 0;
+    virtual Q_LONG writeBlock( const char *data, Q_ULONG len ) = 0;
+    virtual Q_LONG readLine( char *data, Q_ULONG maxlen );
+    Q_LONG writeBlock( const TQByteArray& data );
+    virtual TQByteArray readAll();
+
+    virtual int	 getch() = 0;
+    virtual int	 putch( int ) = 0;
+    virtual int	 ungetch( int ) = 0;
+
+protected:
+    void	 setFlags( int f ) { ioMode = f; }
+    void	 setType( int );
+    void	 setMode( int );
+    void	 setState( int );
+    void	 setStatus( int );
+    Offset	 ioIndex;
+
+private:
+    int		 ioMode;
+    int		 ioSt;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQIODevice( const TQIODevice & );
+    TQIODevice &operator=( const TQIODevice & );
+#endif
+};
+
+
+#endif // TQIODEVICE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qiodevice-members.html b/doc/html/qiodevice-members.html new file mode 100644 index 00000000..4f992b5f --- /dev/null +++ b/doc/html/qiodevice-members.html @@ -0,0 +1,85 @@ + + + + + +TQIODevice Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIODevice

+ +

This is the complete list of member functions for +TQIODevice, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qiodevice.html b/doc/html/qiodevice.html new file mode 100644 index 00000000..865519a8 --- /dev/null +++ b/doc/html/qiodevice.html @@ -0,0 +1,553 @@ + + + + + +TQIODevice Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIODevice Class Reference

+ +

The TQIODevice class is the base class of I/O devices. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qiodevice.h> +

Inherited by TQBuffer, TQFile, TQSocket, and TQSocketDevice. +

List of all member functions. +

Public Members

+ +

Protected Members

+ +

Detailed Description

+ + + +

The TQIODevice class is the base class of I/O devices. +

+

An I/O device represents a medium that one can read bytes from +and/or write bytes to. The TQIODevice class is the abstract +superclass of all such devices; classes such as TQFile, TQBuffer and +TQSocket inherit TQIODevice and implement virtual functions such as +write() appropriately. +

Although applications sometimes use TQIODevice directly, it is +usually better to use TQTextStream and TQDataStream, which provide +stream operations on any TQIODevice subclass. TQTextStream provides +text-oriented stream functionality (for human-readable ASCII +files, for example), whereas TQDataStream deals with binary data in +a totally platform-independent manner. +

The public member functions in TQIODevice roughly fall into two +groups: the action functions and the state access functions. The +most important action functions are: +

    +

  • open() opens a device for reading and/or writing, depending on +the mode argument. +

  • close() closes the device and tidies up (e.g. flushes buffered +data) +

  • readBlock() reads a block of data from the device. +

  • writeBlock() writes a block of data to the device. +

  • readLine() reads a line (of text, usually) from the device. +

  • flush() ensures that all buffered data are written to the real device. +

+

There are also some other, less used, action functions: +

    +

  • getch() reads a single character. +

  • ungetch() forgets the last call to getch(), if possible. +

  • putch() writes a single character. +

  • size() returns the size of the device, if there is one. +

  • at() returns the current read/write pointer's position, if there +is one for this device, or it moves the pointer if given an offset. +

  • atEnd() indicates whether there is more to read, if this is +meaningful for this device. +

  • reset() moves the read/write pointer to the start of the +device, if that is possible for this device. +

+

The state access are all "get" functions. The TQIODevice subclass +calls setState() to update the state, and simple access functions +tell the user of the device what the device's state is. Here are +the settings, and their associated access functions: +

    +

  • Access type. Some devices are direct access (it is possible +to read/write anywhere), whereas others are sequential. TQIODevice +provides the access functions (isDirectAccess(), +isSequentialAccess(), and isCombinedAccess()) to tell users what a +given I/O device supports. +

  • Buffering. Some devices are accessed in raw mode, whereas +others are buffered. Buffering usually provides greater +efficiency, particularly for small read/write operations. +isBuffered() tells the user whether a given device is buffered. +(This can often be set by the application in the call to open().) +

  • Synchronicity. Synchronous devices work immediately (for +example, files). When you read from a file, the file delivers its +data straight away. Other kinds of device, such as a socket +connected to a HTTP server, may not deliver the data until seconds +after you ask to read it. isSynchronous() and isAsynchronous() +tell the user how this device operates. +

  • CR/LF translation. For simplicity, applications often like to +see just a single CR/LF style, and TQIODevice subclasses can +provide this. isTranslated() returns TRUE if this object +translates CR/LF to just LF. (This can often be set by the +application in the call to open().) +

  • Permissions. Some files cannot be written. For example, +isReadable(), isWritable() and isReadWrite() tell the application +whether it can read from and write to a given device. (This can +often be set by the application in the call to open().) +

  • Finally, isOpen() returns TRUE if the device is open, i.e. +after an open() call. +

+

TQIODevice provides numerous pure virtual functions that you need +to implement when subclassing it. Here is a skeleton subclass with +all the members you are sure to need and some that you will +probably need: +

+    class MyDevice : public TQIODevice
+    {
+    public:
+        MyDevice();
+        ~MyDevice();
+
+        bool open( int mode );
+        void close();
+        void flush();
+
+        uint size() const;
+        int  at() const;        // non-pure virtual
+        bool at( int );         // non-pure virtual
+        bool atEnd() const;     // non-pure virtual
+
+        int readBlock( char *data, uint maxlen );
+        int writeBlock( const char *data, uint len );
+        int readLine( char *data, uint maxlen );
+
+        int getch();
+        int putch( int );
+        int ungetch( int );
+    };
+    
+ +

The three non-pure virtual functions need not be reimplemented for +sequential devices. +

See also TQDataStream, TQTextStream, and Input/Output and Networking. + +


Member Type Documentation

+

TQIODevice::Offset

+ +

The offset within the device. + +


Member Function Documentation

+

TQIODevice::TQIODevice () +

+Constructs an I/O device. + +

TQIODevice::~TQIODevice () [virtual] +

+Destroys the I/O device. + +

Offset TQIODevice::at () const [virtual] +

+Virtual function that returns the current I/O device position. +

This is the position of the data read/write head of the I/O +device. +

See also size(). + +

Example: distributor/distributor.ui.h. +

Reimplemented in TQSocket. +

bool TQIODevice::at ( Offset pos ) [virtual] +

+Virtual function that sets the I/O device position to pos. +Returns TRUE if the position was successfully set, i.e. pos is +within range and the seek was successful; otherwise returns FALSE. +

See also size(). + +

Reimplemented in TQSocket. +

bool TQIODevice::atEnd () const [virtual] +

+Virtual function that returns TRUE if the I/O device position is +at the end of the input; otherwise returns FALSE. + +

Reimplemented in TQFile and TQSocket. +

void TQIODevice::close () [pure virtual] +

+ +

Closes the I/O device. +

This virtual function must be reimplemented by all subclasses. +

See also open(). + +

Example: grapher/grapher.cpp. +

Reimplemented in TQFile and TQSocket. +

int TQIODevice::flags () const +

+ +

Returns the current I/O device flags setting. +

Flags consists of mode flags and state flags. +

See also mode() and state(). + +

void TQIODevice::flush () [pure virtual] +

+ +

Flushes an open I/O device. +

This virtual function must be reimplemented by all subclasses. + +

Reimplemented in TQFile and TQSocket. +

int TQIODevice::getch () [pure virtual] +

+ +

Reads a single byte/character from the I/O device. +

Returns the byte/character read, or -1 if the end of the I/O +device has been reached. +

This virtual function must be reimplemented by all subclasses. +

See also putch() and ungetch(). + +

Reimplemented in TQFile and TQSocket. +

bool TQIODevice::isAsynchronous () const +

+ +

Returns TRUE if the device is an asynchronous device; otherwise +returns FALSE, i.e. if the device is a synchronous device. +

This mode is currently not in use. +

See also isSynchronous(). + +

bool TQIODevice::isBuffered () const +

+ +

Returns TRUE if the I/O device is a buffered device; otherwise +returns FALSE, i.e. the device is a raw device. +

See also isRaw(). + +

bool TQIODevice::isCombinedAccess () const +

+ +

Returns TRUE if the I/O device is a combined access (both direct +and sequential) device; otherwise returns FALSE. +

This access method is currently not in use. + +

bool TQIODevice::isDirectAccess () const +

+ +

Returns TRUE if the I/O device is a direct access device; +otherwise returns FALSE, i.e. if the device is a sequential access +device. +

See also isSequentialAccess(). + +

bool TQIODevice::isInactive () const +

+ +

Returns TRUE if the I/O device state is 0, i.e. the device is not +open; otherwise returns FALSE. +

See also isOpen(). + +

bool TQIODevice::isOpen () const +

+ +

Returns TRUE if the I/O device has been opened; otherwise returns +FALSE. +

See also isInactive(). + +

Example: network/networkprotocol/nntp.cpp. +

bool TQIODevice::isRaw () const +

+ +

Returns TRUE if the device is a raw device; otherwise returns +FALSE, i.e. if the device is a buffered device. +

See also isBuffered(). + +

bool TQIODevice::isReadWrite () const +

+ +

Returns TRUE if the I/O device was opened using IO_ReadWrite +mode; otherwise returns FALSE. +

See also isReadable() and isWritable(). + +

bool TQIODevice::isReadable () const +

+ +

Returns TRUE if the I/O device was opened using IO_ReadOnly or +IO_ReadWrite mode; otherwise returns FALSE. +

See also isWritable() and isReadWrite(). + +

bool TQIODevice::isSequentialAccess () const +

+ +

Returns TRUE if the device is a sequential access device; +otherwise returns FALSE, i.e. if the device is a direct access +device. +

Operations involving size() and at(int) are not valid on +sequential devices. +

See also isDirectAccess(). + +

bool TQIODevice::isSynchronous () const +

+ +

Returns TRUE if the I/O device is a synchronous device; otherwise +returns FALSE, i.e. the device is an asynchronous device. +

See also isAsynchronous(). + +

bool TQIODevice::isTranslated () const +

+ +

Returns TRUE if the I/O device translates carriage-return and +linefeed characters; otherwise returns FALSE. +

A TQFile is translated if it is opened with the IO_Translate +mode flag. + +

bool TQIODevice::isWritable () const +

+ +

Returns TRUE if the I/O device was opened using IO_WriteOnly or +IO_ReadWrite mode; otherwise returns FALSE. +

See also isReadable() and isReadWrite(). + +

int TQIODevice::mode () const +

+ +

Returns bits OR'ed together that specify the current operation +mode. +

These are the flags that were given to the open() function. +

The flags are IO_ReadOnly, IO_WriteOnly, IO_ReadWrite, +IO_Append, IO_Truncate and IO_Translate. + +

bool TQIODevice::open ( int mode ) [pure virtual] +

+ +

Opens the I/O device using the specified mode. Returns TRUE if +the device was successfully opened; otherwise returns FALSE. +

The mode parameter mode must be an OR'ed combination of the +following flags. +

+
Mode flags Meaning +
IO_Raw specifies raw (unbuffered) file access. +
IO_ReadOnly opens a file in read-only mode. +
IO_WriteOnly opens a file in write-only mode. +
IO_ReadWrite opens a file in read/write mode. +
IO_Append sets the file index to the end of the file. +
IO_Truncate truncates the file. +
IO_Translate enables carriage returns and linefeed +translation for text files under MS-DOS, Windows and Macintosh. On +Unix systems this flag has no effect. Use with caution as it will +also transform every linefeed written to the file into a CRLF +pair. This is likely to corrupt your file if you write write +binary data. Cannot be combined with IO_Raw. +
+

This virtual function must be reimplemented by all subclasses. +

See also close(). + +

Example: grapher/grapher.cpp. +

Reimplemented in TQFile and TQSocket. +

int TQIODevice::putch ( int ch ) [pure virtual] +

+ +

Writes the character ch to the I/O device. +

Returns ch, or -1 if an error occurred. +

This virtual function must be reimplemented by all subclasses. +

See also getch() and ungetch(). + +

Example: grapher/grapher.cpp. +

Reimplemented in TQFile and TQSocket. +

TQByteArray TQIODevice::readAll () [virtual] +

+This convenience function returns all of the remaining data in the +device. + +

Q_LONG TQIODevice::readBlock ( char * data, Q_ULONG maxlen ) [pure virtual] +

+ +

Reads at most maxlen bytes from the I/O device into data and +returns the number of bytes actually read. +

This function should return -1 if a fatal error occurs and should +return 0 if there are no bytes to read. +

The device must be opened for reading, and data must not be 0. +

This virtual function must be reimplemented by all subclasses. +

See also writeBlock(), isOpen(), and isReadable(). + +

Example: distributor/distributor.ui.h. +

Reimplemented in TQSocket and TQSocketDevice. +

Q_LONG TQIODevice::readLine ( char * data, Q_ULONG maxlen ) [virtual] +

+Reads a line of text, (or up to maxlen bytes if a newline isn't +encountered) plus a terminating '\0' into data. If there is a +newline at the end if the line, it is not stripped. +

Returns the number of bytes read including the terminating '\0', +or -1 if an error occurred. +

This virtual function can be reimplemented much more efficiently +by the most subclasses. +

See also readBlock() and TQTextStream::readLine(). + +

Reimplemented in TQFile. +

bool TQIODevice::reset () +

+ +

Sets the device index position to 0. +

See also at(). + +

void TQIODevice::resetStatus () +

+ +

Sets the I/O device status to IO_Ok. +

See also status(). + +

void TQIODevice::setFlags ( int flags ) [protected] +

+ +

Used by subclasses to set the device flags to the flags specified. + +

void TQIODevice::setMode ( int mode ) [protected] +

+ +

Used by subclasses to set the device mode to the mode specified. + +

void TQIODevice::setState ( int state ) [protected] +

+ +

Used by subclasses to set the device state to the state specified. + +

void TQIODevice::setStatus ( int s ) [protected] +

+Used by subclasses to set the device status (not state) to s. + +

void TQIODevice::setType ( int type ) [protected] +

+ +

Used by subclasses to set the device type to the type specified. + +

Offset TQIODevice::size () const [pure virtual] +

+ +

Virtual function that returns the size of the I/O device. +

See also at(). + +

Reimplemented in TQFile and TQSocket. +

int TQIODevice::state () const +

+ +

Returns bits OR'ed together that specify the current state. +

The flags are: IO_Open. +

Subclasses may define additional flags. + +

int TQIODevice::status () const +

+ +

Returns the I/O device status. +

The I/O device status returns an error code. If open() returns +FALSE or readBlock() or writeBlock() return -1, this function can +be called to find out the reason why the operation failed. +

+

The status codes are: +

+
Status code Meaning +
IO_Ok The operation was successful. +
IO_ReadError Could not read from the device. +
IO_WriteError Could not write to the device. +
IO_FatalError A fatal unrecoverable error occurred. +
IO_OpenError Could not open the device. +
IO_ConnectError Could not connect to the device. +
IO_AbortError The operation was unexpectedly aborted. +
IO_TimeOutError The operation timed out. +
IO_UnspecifiedError An unspecified error happened on close. +
+

See also resetStatus(). + +

int TQIODevice::ungetch ( int ch ) [pure virtual] +

+ +

Puts the character ch back into the I/O device and decrements +the index position if it is not zero. +

This function is normally called to "undo" a getch() operation. +

Returns ch, or -1 if an error occurred. +

This virtual function must be reimplemented by all subclasses. +

See also getch() and putch(). + +

Reimplemented in TQFile and TQSocket. +

Q_LONG TQIODevice::writeBlock ( const char * data, Q_ULONG len ) [pure virtual] +

+ +

Writes len bytes from data to the I/O device and returns the +number of bytes actually written. +

This function should return -1 if a fatal error occurs. +

This virtual function must be reimplemented by all subclasses. +

See also readBlock(). + +

Example: distributor/distributor.ui.h. +

Reimplemented in TQBuffer, TQSocket, and TQSocketDevice. +

Q_LONG TQIODevice::writeBlock ( const TQByteArray & data ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This convenience function is the same as calling writeBlock( +data.data(), data.size() ). + + +


+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/qiodevicesource-members.html b/doc/html/qiodevicesource-members.html new file mode 100644 index 00000000..4d1f8d0e --- /dev/null +++ b/doc/html/qiodevicesource-members.html @@ -0,0 +1,56 @@ + + + + + +TQIODeviceSource Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQIODeviceSource

+ +

This is the complete list of member functions for +TQIODeviceSource, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qiodevicesource.html b/doc/html/qiodevicesource.html new file mode 100644 index 00000000..a5d6eef5 --- /dev/null +++ b/doc/html/qiodevicesource.html @@ -0,0 +1,108 @@ + + + + + +TQIODeviceSource Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQIODeviceSource Class Reference
[obsolete]

+ +

The TQIODeviceSource class is a TQDataSource that draws data from a TQIODevice. +More... +

#include <qasyncio.h> +

Inherits TQDataSource. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +This class is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

The TQIODeviceSource class is a TQDataSource that draws data from a TQIODevice. +

This class encapsulates retrieving data from a TQIODevice (such as a TQFile). + +


Member Function Documentation

+

TQIODeviceSource::TQIODeviceSource ( TQIODevice * device, int buffer_size = 4096 ) +

+Constructs a TQIODeviceSource from the TQIODevice device. The TQIODevice +must be dynamically allocated, becomes owned by the TQIODeviceSource, +and will be deleted when the TQIODeviceSource is destroyed. buffer_size +determines the size of buffering to use between asynchronous operations. +The higher the buffer_size, the more efficient, but the less interleaved +the operation will be with other processing. + +

TQIODeviceSource::~TQIODeviceSource () +

+Destroys the TQIODeviceSource, deleting the TQIODevice from which it was +constructed. + +

void TQIODeviceSource::enableRewind ( bool on ) [virtual] +

+If on is set to TRUE then rewinding is enabled. +No special action is taken. If on is set to +FALSE then rewinding is disabled. + +

Reimplemented from TQDataSource. +

int TQIODeviceSource::readyToSend () [virtual] +

+Ready until end-of-file. + +

Reimplemented from TQDataSource. +

void TQIODeviceSource::rewind () [virtual] +

+Calls reset() on the TQIODevice. + +

Reimplemented from TQDataSource. +

bool TQIODeviceSource::rewindable () const [virtual] +

+All TQIODeviceSource's are rewindable. + +

Reimplemented from TQDataSource. +

void TQIODeviceSource::sendTo ( TQDataSink * sink, int n ) [virtual] +

+Reads a block of data and sends up to n bytes to the sink. + +

Reimplemented from TQDataSource. + +


+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/qjiscodec-h.html b/doc/html/qjiscodec-h.html new file mode 100644 index 00000000..1a5ec0c7 --- /dev/null +++ b/doc/html/qjiscodec-h.html @@ -0,0 +1,156 @@ + + + + + +qjiscodec.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qjiscodec.h

+ +

This is the verbatim text of the qjiscodec.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qjiscodec.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQJisCodec class
+**
+** Created : 990225
+**
+** 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 retquirements 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.
+**
+**********************************************************************/
+
+// Most of the code here was originally written by Serika Kurusugawa
+// a.k.a. Junji Takagi, and is included in TQt with the author's permission,
+// and the grateful thanks of the Trolltech team.
+
+/*
+ * Copyright (C) 1999 Serika Kurusugawa, All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef TQJISCODEC_H
+#define TQJISCODEC_H
+
+#ifndef QT_H
+#include "qtextcodec.h"
+#include "qjpunicode.h"
+#endif // QT_H
+
+#ifndef QT_NO_BIG_CODECS
+
+#if defined(QT_PLUGIN)
+#define Q_EXPORT_CODECS_JP
+#else
+#define Q_EXPORT_CODECS_JP Q_EXPORT
+#endif
+
+class Q_EXPORT_CODECS_JP TQJisCodec : public TQTextCodec {
+public:
+    virtual int mibEnum() const;
+    const char* name() const;
+    const char* mimeName() const;
+
+    TQTextDecoder* makeDecoder() const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQTextCodec::fromUnicode;
+#endif
+    TQCString fromUnicode(const TQString& uc, int& lenInOut) const;
+    TQString toUnicode(const char* chars, int len) const;
+
+    int heuristicContentMatch(const char* chars, int len) const;
+    int heuristicNameMatch(const char* hint) const;
+
+    TQJisCodec();
+    ~TQJisCodec();
+
+protected:
+    const TQJpUnicodeConv *conv;
+};
+
+#endif
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qjiscodec-members.html b/doc/html/qjiscodec-members.html new file mode 100644 index 00000000..b6f1e83b --- /dev/null +++ b/doc/html/qjiscodec-members.html @@ -0,0 +1,71 @@ + + + + + +TQJisCodec Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQJisCodec

+ +

This is the complete list of member functions for +TQJisCodec, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qjiscodec.html b/doc/html/qjiscodec.html new file mode 100644 index 00000000..dbe75bd8 --- /dev/null +++ b/doc/html/qjiscodec.html @@ -0,0 +1,132 @@ + + + + + +TQJisCodec Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQJisCodec Class Reference

+ +

The TQJisCodec class provides conversion to and from JIS character sets. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qjiscodec.h> +

Inherits TQTextCodec. +

List of all member functions. +

Public Members

+
    +
  • virtual const char * mimeName () const
  • +
+

Detailed Description

+ + + +

The TQJisCodec class provides conversion to and from JIS character sets. +

More precisely, the TQJisCodec class subclasses TQTextCodec to +provide support for JIS X 0201 Latin, JIS X 0201 Kana, JIS X 0208 +and JIS X 0212. +

The environment variable UNICODEMAP_JP can be used to fine-tune +TQJisCodec, TQSjisCodec and TQEucJpCodec. The mapping names are as for +the Japanese XML working group's XML + Japanese Profile, because it names and explains all the +widely used mappings. Here are brief descriptions, written by +Serika Kurusugawa: +

    +

  • "unicode-0.9" or "unicode-0201" for Unicode style. This assumes +JISX0201 for 0x00-0x7f. (0.9 is a table version of jisx02xx mapping +used for Uniocde spec version 1.1.) +

  • "unicode-ascii" This assumes US-ASCII for 0x00-0x7f; some +chars (JISX0208 0x2140 and JISX0212 0x2237) are different from +Unicode 1.1 to avoid conflict. +

  • "open-19970715-0201" ("open-0201" for convenience) or +"jisx0221-1995" for JISX0221-JISX0201 style. JIS X 0221 is JIS +version of Unicode, but a few chars (0x5c, 0x7e, 0x2140, 0x216f, +0x2131) are different from Unicode 1.1. This is used when 0x5c is +treated as YEN SIGN. +

  • "open-19970715-ascii" ("open-ascii" for convenience) for +JISX0221-ASCII style. This is used when 0x5c is treated as REVERSE +SOLIDUS. +

  • "open-19970715-ms" ("open-ms" for convenience) or "cp932" for +Microsoft Windows style. Windows Code Page 932. Some chars (0x2140, +0x2141, 0x2142, 0x215d, 0x2171, 0x2172) are different from Unicode +1.1. +

  • "jdk1.1.7" for Sun's JDK style. Same as Unicode 1.1, except that +JIS 0x2140 is mapped to UFF3C. Either ASCII or JISX0201 can be used +for 0x00-0x7f. +

+

In addition, the extensions "nec-vdc", "ibm-vdc" and "udc" are +supported. +

For example, if you want to use Unicode style conversion but with +NEC's extension, set UNICODEMAP_JP to +unicode-0.9, nec-vdc. (You will probably +need to quote that in a shell command.) +

Most of the code here was written by Serika Kurusugawa, +a.k.a. Junji Takagi, and is included in TQt with the author's +permission and the grateful thanks of the Trolltech team. Here is +the copyright statement for that code: +

+

Copyright (C) 1999 Serika Kurusugawa. All rights reserved. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS". +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. +

See also Internationalization with TQt. + +


Member Function Documentation

+

const char * TQJisCodec::mimeName () const [virtual] +

+Returns the codec's mime name. + +

Reimplemented from TQTextCodec. + +


+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/qkbddriverfactory-members.html b/doc/html/qkbddriverfactory-members.html new file mode 100644 index 00000000..801b88bd --- /dev/null +++ b/doc/html/qkbddriverfactory-members.html @@ -0,0 +1,48 @@ + + + + + +TQKbdDriverFactory Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQKbdDriverFactory

+ +

This is the complete list of member functions for +TQKbdDriverFactory, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qkbddriverfactory.html b/doc/html/qkbddriverfactory.html new file mode 100644 index 00000000..df4fff29 --- /dev/null +++ b/doc/html/qkbddriverfactory.html @@ -0,0 +1,79 @@ + + + + + +TQKbdDriverFactory Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQKbdDriverFactory Class Reference

+ +

The TQKbdDriverFactory class creates TQWSKeyboardHandler objects +for TQt/Embedded. +More... +

#include <qkbddriverfactory_qws.h> +

List of all member functions. +

Static Public Members

+
    +
  • TQStringList keys ()
  • +
  • TQWSKeyboardHandler * create ( const TQString & key, const TQString & device )
  • +
+

Detailed Description

+ + +The TQKbdDriverFactory class creates TQWSKeyboardHandler objects +for TQt/Embedded. +

The graphics driver factory creates a TQWSKeyboardHandler object +for a given key with TQKbdDriverFactory::create(key). +

The drivers are either built-in or dynamically loaded from a +driver plugin (see TQKbdDriverPlugin). +

This class is only available in TQt/Embedded. +

TQKbdDriverFactory::keys() returns a list of valid keys. + +


Member Function Documentation

+

TQWSKeyboardHandler * TQKbdDriverFactory::create ( const TQString & key, const TQString & device ) [static] +

+Creates a TQWSKeyboardHandler object that matches key for device +device. This is either a built-in driver, or a driver from a +driver plugin. +

See also keys(). + +

TQStringList TQKbdDriverFactory::keys () [static] +

+Returns the list of keys this factory can create drivers for. +

See also create(). + + +


+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/qkbddriverfactory_qws-h.html b/doc/html/qkbddriverfactory_qws-h.html new file mode 100644 index 00000000..9ad15141 --- /dev/null +++ b/doc/html/qkbddriverfactory_qws-h.html @@ -0,0 +1,101 @@ + + + + + +qkbddriverfactory_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qkbddriverfactory_qws.h

+ +

This is the verbatim text of the qkbddriverfactory_qws.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qkbddriverfactory_qws.h   3.3.8   edited Jan 11 14:46 $
+**
+** ...
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQKBDDRIVERFACTORY_QWS_H
+#define TQKBDDRIVERFACTORY_QWS_H
+
+#ifndef QT_H
+#include "qstringlist.h"
+#endif // QT_H
+
+class TQString;
+class TQWSKeyboardHandler;
+
+class Q_EXPORT TQKbdDriverFactory
+{
+public:
+#ifndef QT_NO_STRINGLIST
+    static TQStringList keys();
+#endif
+    static TQWSKeyboardHandler *create( const TQString&, const TQString& );
+};
+
+#endif //TQKBDDRIVERFACTORY_QWS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qkbddriverplugin-members.html b/doc/html/qkbddriverplugin-members.html new file mode 100644 index 00000000..80ef48a0 --- /dev/null +++ b/doc/html/qkbddriverplugin-members.html @@ -0,0 +1,50 @@ + + + + + +TQKbdDriverPlugin Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQKbdDriverPlugin

+ +

This is the complete list of member functions for +TQKbdDriverPlugin, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qkbddriverplugin.html b/doc/html/qkbddriverplugin.html new file mode 100644 index 00000000..9771b19b --- /dev/null +++ b/doc/html/qkbddriverplugin.html @@ -0,0 +1,96 @@ + + + + + +TQKbdDriverPlugin Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQKbdDriverPlugin Class Reference

+ +

The TQKbdDriverPlugin class provides an abstract base for +TQt/Embedded keyboard driver plugins. +More... +

#include <qkbddriverplugin_qws.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQKbdDriverPlugin class provides an abstract base for +TQt/Embedded keyboard driver plugins. +

+

The keyboard driver plugin is a simple plugin interface that makes +it easy to create custom keyboard drivers. +

Writing a keyboard driver plugin is achieved by subclassing this +base class, reimplementing the pure virtual functions keys() and +create(), and exporting the class with the Q_EXPORT_PLUGIN +macro. See the Plugins + documentation for details. +

This class is only available in TQt/Embedded. +

See also Plugins. + +


Member Function Documentation

+

TQKbdDriverPlugin::TQKbdDriverPlugin () +

+Constructs a keyboard driver plugin. This is invoked automatically +by the Q_EXPORT_PLUGIN macro. + +

TQKbdDriverPlugin::~TQKbdDriverPlugin () +

+Destroys the keyboard driver plugin. +

You never have to call this explicitly. TQt destroys a plugin +automatically when it is no longer used. + +

TQWSKeyboardHandler * TQKbdDriverPlugin::create ( const TQString & driver, const TQString & device ) [pure virtual] +

+ +

Creates a driver matching the type specified by driver and device. +

See also keys(). + +

TQStringList TQKbdDriverPlugin::keys () const [pure virtual] +

+ +

Returns the list of keyboard drivers this plugin supports. +

See also create(). + + +


+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/qkbddriverplugin_qws-h.html b/doc/html/qkbddriverplugin_qws-h.html new file mode 100644 index 00000000..326192a6 --- /dev/null +++ b/doc/html/qkbddriverplugin_qws-h.html @@ -0,0 +1,115 @@ + + + + + +qkbddriverplugin_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qkbddriverplugin_qws.h

+ +

This is the verbatim text of the qkbddriverplugin_qws.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qkbddriverplugin_qws.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQKbdDriverPlugin
+**
+** Created : 20020218
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQKBDDRIVERPLUGIN_QWS_H
+#define TQKBDDRIVERPLUGIN_QWS_H
+
+#ifndef QT_H
+#include "qgplugin.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_COMPONENT
+
+class TQWSKeyboardHandler;
+class TQKbdDriverPluginPrivate;
+
+class Q_EXPORT TQKbdDriverPlugin : public TQGPlugin
+{
+    Q_OBJECT
+public:
+    TQKbdDriverPlugin();
+    ~TQKbdDriverPlugin();
+
+#ifndef QT_NO_STRINGLIST
+    virtual TQStringList keys() const = 0;
+#endif
+    virtual TQWSKeyboardHandler* create( const TQString& driver, const TQString &device ) = 0;
+
+private:
+    TQKbdDriverPluginPrivate *d;
+};
+
+#endif // QT_NO_COMPONENT
+
+#endif // TQKBDDRIVERPLUGIN_QWS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qkeyboard_qws-h.html b/doc/html/qkeyboard_qws-h.html new file mode 100644 index 00000000..bd3a38e9 --- /dev/null +++ b/doc/html/qkeyboard_qws-h.html @@ -0,0 +1,104 @@ + + + + + +qkeyboard_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qkeyboard_qws.h

+ +

This is the verbatim text of the qkeyboard_qws.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qkeyboard_qws.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQt/Embedded keyboards
+**
+** Created : 991025
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQKEYBOARD_QWS_H
+#define TQKEYBOARD_QWS_H
+
+#ifndef QT_H
+#include "qobject.h"
+#endif // QT_H
+
+#ifndef QT_NO_QWS_KEYBOARD
+class TQWSKeyboardHandler : public TQObject {
+    Q_OBJECT
+public:
+    TQWSKeyboardHandler();
+    virtual ~TQWSKeyboardHandler();
+
+protected:
+    virtual void processKeyEvent(int unicode, int keycode, int modifiers,
+			    bool isPress, bool autoRepeat);
+};
+#endif
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qkeyevent-members.html b/doc/html/qkeyevent-members.html new file mode 100644 index 00000000..fccc8b86 --- /dev/null +++ b/doc/html/qkeyevent-members.html @@ -0,0 +1,59 @@ + + + + + +TQKeyEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQKeyEvent

+ +

This is the complete list of member functions for +TQKeyEvent, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qkeyevent.html b/doc/html/qkeyevent.html new file mode 100644 index 00000000..af844331 --- /dev/null +++ b/doc/html/qkeyevent.html @@ -0,0 +1,185 @@ + + + + + +TQKeyEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQKeyEvent Class Reference

+ +

The TQKeyEvent class contains describes a key event. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQKeyEvent class contains describes a key event. +

+

Key events occur when a key is pressed or released when a widget +has keyboard input focus. +

A key event contains a special accept flag that indicates whether the +receiver wants the key event. You should call TQKeyEvent::ignore() if the +key press or release event is not handled by your widget. A key event is +propagated up the parent widget chain until a widget accepts it with +TQKeyEvent::accept() or an event filter consumes it. +Key events for multi media keys are ignored by default. You should call +TQKeyEvent::accept() if your widget handles those events. +

The TQWidget::setEnable() function can be used to enable or disable +mouse and keyboard events for a widget. +

The event handlers TQWidget::keyPressEvent() and +TQWidget::keyReleaseEvent() receive key events. +

See also TQFocusEvent, TQWidget::grabKeyboard(), and Event Classes. + +


Member Function Documentation

+

TQKeyEvent::TQKeyEvent ( Type type, int key, int ascii, int state, const TQString & text = TQString::null, bool autorep = FALSE, ushort count = 1 ) +

+ +

Constructs a key event object. +

The type parameter must be TQEvent::KeyPress or TQEvent::KeyRelease. If key is 0 the event is not a result of a +known key (e.g. it may be the result of a compose sequence or +keyboard macro). ascii is the ASCII code of the key that was +pressed or released. state holds the keyboard modifiers. text is the Unicode text that the key generated. If autorep is +TRUE, isAutoRepeat() will be TRUE. count is the number of +single keys. +

The accept flag is set to TRUE. + +

void TQKeyEvent::accept () +

+ +

Sets the accept flag of the key event object. +

Setting the accept parameter indicates that the receiver of the +event wants the key event. Unwanted key events are sent to the +parent widget. +

The accept flag is set by default. +

See also ignore(). + +

int TQKeyEvent::ascii () const +

+ +

Returns the ASCII code of the key that was pressed or released. We +recommend using text() instead. +

See also text(). + +

Example: picture/picture.cpp. +

int TQKeyEvent::count () const +

+ +

Returns the number of single keys for this event. If text() is not +empty, this is simply the length of the string. +

See also TQWidget::setKeyCompression(). + +

void TQKeyEvent::ignore () +

+ +

Clears the accept flag parameter of the key event object. +

Clearing the accept parameter indicates that the event receiver +does not want the key event. Unwanted key events are sent to the +parent widget. +

The accept flag is set by default. +

See also accept(). + +

bool TQKeyEvent::isAccepted () const +

+ +

Returns TRUE if the receiver of the event wants to keep the key; +otherwise returns FALSE + +

bool TQKeyEvent::isAutoRepeat () const +

+ +

Returns TRUE if this event comes from an auto-repeating key and +FALSE if it comes from an initial key press. +

Note that if the event is a multiple-key compressed event that is +partly due to auto-repeat, this function could return either TRUE +or FALSE indeterminately. + +

int TQKeyEvent::key () const +

+ +

Returns the code of the key that was pressed or released. +

See TQt::Key for the list of keyboard codes. These codes are +independent of the underlying window system. +

A value of either 0 or Key_unknown means that the event is not +the result of a known key (e.g. it may be the result of a compose +sequence or a keyboard macro, or due to key event compression). +

See also TQWidget::setKeyCompression(). + +

Example: fileiconview/qfileiconview.cpp. +

ButtonState TQKeyEvent::state () const +

+ +

Returns the keyboard modifier flags that existed immediately +before the event occurred. +

The returned value is ShiftButton, ControlButton, AltButton +and MetaButton OR'ed together. +

See also stateAfter(). + +

Example: fileiconview/qfileiconview.cpp. +

ButtonState TQKeyEvent::stateAfter () const +

+ +

Returns the keyboard modifier flags that existed immediately after +the event occurred. +

Warning: This function cannot be trusted. +

See also state(). + +

TQString TQKeyEvent::text () const +

+ +

Returns the Unicode text that this key generated. The text returned +migth be empty, which is the case when pressing or +releasing modifying keys as Shift, Control, Alt and Meta. In these +cases key() will contain a valid value. +

See also TQWidget::setKeyCompression(). + + +


+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/qkeysequence-h.html b/doc/html/qkeysequence-h.html new file mode 100644 index 00000000..e2df6fc5 --- /dev/null +++ b/doc/html/qkeysequence-h.html @@ -0,0 +1,154 @@ + + + + + +qkeysequence.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qkeysequence.h

+ +

This is the verbatim text of the qkeysequence.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qkeysequence.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQKeySequence class
+**
+** Created : 0108007
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQKEYSETQUENCE_H
+#define TQKEYSETQUENCE_H
+
+#ifndef QT_H
+#ifndef QT_H
+#include "qnamespace.h"
+#include "qstring.h"
+#endif // QT_H
+#endif
+
+#ifndef QT_NO_ACCEL
+
+/*****************************************************************************
+  TQKeySequence stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+class TQKeySequence;
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQKeySequence & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQKeySequence & );
+#endif
+
+class TQKeySequencePrivate;
+
+class Q_EXPORT TQKeySequence : public TQt
+{
+public:
+    TQKeySequence();
+    TQKeySequence( const TQString& key );
+    TQKeySequence( int key );
+    TQKeySequence( int k1, int k2, int k3 = 0, int k4 = 0 );
+    TQKeySequence( const TQKeySequence & );
+    ~TQKeySequence();
+
+    uint count() const;
+    bool isEmpty() const;
+    TQt::SequenceMatch matches( const TQKeySequence & ) const;
+
+    operator TQString() const;
+    operator int () const;
+    int operator[]( uint ) const;
+    TQKeySequence &operator=( const TQKeySequence & );
+    bool operator==( const TQKeySequence& ) const;
+    bool operator!= ( const TQKeySequence& ) const;
+
+private:
+    static int decodeString( const TQString & );
+    static TQString encodeString( int );
+    int assign( TQString );
+    void setKey( int key, int index );
+
+    TQKeySequencePrivate* d;
+
+    friend Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQKeySequence & );
+    friend Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQKeySequence & );
+    friend class TQAccelManager;
+};
+
+#else
+
+class Q_EXPORT TQKeySequence : public TQt
+{
+public:
+    TQKeySequence() {}
+    TQKeySequence( int ) {}
+};
+
+#endif //QT_NO_ACCEL
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qkeysequence-members.html b/doc/html/qkeysequence-members.html new file mode 100644 index 00000000..07a0c0f1 --- /dev/null +++ b/doc/html/qkeysequence-members.html @@ -0,0 +1,57 @@ + + + + + +TQKeySequence Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQKeySequence

+ +

This is the complete list of member functions for +TQKeySequence, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qkeysequence.html b/doc/html/qkeysequence.html new file mode 100644 index 00000000..4a7b93d5 --- /dev/null +++ b/doc/html/qkeysequence.html @@ -0,0 +1,206 @@ + + + + + +TQKeySequence Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQKeySequence Class Reference

+ +

The TQKeySequence class encapsulates a key sequence as used +by accelerators. +More... +

#include <qkeysequence.h> +

Inherits TQt. +

List of all member functions. +

Public Members

+ +

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQKeySequence & keysequence )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQKeySequence & keysequence )
  • +
+

Detailed Description

+ + +The TQKeySequence class encapsulates a key sequence as used +by accelerators. +

+

A key sequence consists of up to four keyboard codes, each +optionally combined with modifiers, e.g. SHIFT, CTRL, ALT, META, or UNICODE_ACCEL. For example, CTRL + Key_P +might be a sequence used as a shortcut for printing a document. +The key codes are listed in qnamespace.h. As an alternative, +use UNICODE_ACCEL with the unicode code point of the character. +For example, UNICODE_ACCEL + 'A' gives the same key sequence +as Key_A. +

Key sequences can be constructed either from an integer key code, +or from a human readable translatable string such as +"Ctrl+X,Alt+Space". A key sequence can be cast to a TQString to +obtain a human readable translated version of the sequence. +Translations are done in the "TQAccel" context. +

See also TQAccel and Miscellaneous Classes. + +


Member Function Documentation

+

TQKeySequence::TQKeySequence () +

+Constructs an empty key sequence. + +

TQKeySequence::TQKeySequence ( const TQString & key ) +

+Creates a key sequence from the string key. For example +"Ctrl+O" gives CTRL+UNICODE_ACCEL+'O'. The strings "Ctrl", +"Shift", "Alt" and "Meta" are recognized, as well as their +translated equivalents in the "TQAccel" context (using +TQObject::tr()). +

Multiple key codes (up to four) may be entered by separating them +with commas, e.g. "Alt+X,Ctrl+S,Q". +

This contructor is typically used with tr(), so that accelerator keys can be replaced in +translations: +

+        TQPopupMenu *file = new TQPopupMenu( this );
+        file->insertItem( tr("&Open..."), this, SLOT(open()),
+                          TQKeySequence( tr("Ctrl+O", "File|Open") ) );
+    
+ +

Note the "File|Open" translator comment. It is by no means +necessary, but it provides some context for the human translator. + +

TQKeySequence::TQKeySequence ( int key ) +

+Constructs a key sequence that has a single key. +

The key codes are listed in qnamespace.h and can be +combined with modifiers, e.g. with SHIFT, CTRL, ALT, META or UNICODE_ACCEL. + +

TQKeySequence::TQKeySequence ( int k1, int k2, int k3 = 0, int k4 = 0 ) +

+Constructs a key sequence with up to 4 keys k1, k2, +k3 and k4. +

The key codes are listed in qnamespace.h and can be +combined with modifiers, e.g. with SHIFT, CTRL, ALT, META or UNICODE_ACCEL. + +

TQKeySequence::TQKeySequence ( const TQKeySequence & keysequence ) +

+Copy constructor. Makes a copy of keysequence. + +

TQKeySequence::~TQKeySequence () +

+Destroys the key sequence. + +

uint TQKeySequence::count () const +

+Returns the number of keys in the key sequence. +The maximum is 4. + +

bool TQKeySequence::isEmpty () const +

+Returns TRUE if the key sequence is empty; otherwise returns +FALSE. + +

TQt::SequenceMatch TQKeySequence::matches ( const TQKeySequence & seq ) const +

+Matches the sequence with seq. Returns TQt::Identical if +successful, TQt::PartialMatch for matching but incomplete seq, +and TQt::NoMatch if the sequences have nothing in common. +Returns TQt::NoMatch if seq is shorter. + +

TQKeySequence::operator TQString () const +

+Creates an accelerator string for the key sequence. +For instance CTRL+Key_O gives "Ctrl+O". If the key sequence has +multiple key codes they are returned comma-separated, e.g. +"Alt+X, Ctrl+Y, Z". The strings, "Ctrl", "Shift", etc. are +translated (using TQObject::tr()) in the "TQAccel" scope. If the key +sequence has no keys, TQString::null is returned. +

On Mac OS X, the string returned resembles the sequence that is shown in +the menubar. + +

TQKeySequence::operator int () const +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

For backward compatibility: returns the first keycode +as integer. If the key sequence is empty, 0 is returned. + +

bool TQKeySequence::operator!= ( const TQKeySequence & keysequence ) const +

+Returns TRUE if keysequence is not equal to this key sequence; +otherwise returns FALSE. + +

TQKeySequence & TQKeySequence::operator= ( const TQKeySequence & keysequence ) +

+Assignment operator. Assigns keysequence to this +object. + +

bool TQKeySequence::operator== ( const TQKeySequence & keysequence ) const +

+Returns TRUE if keysequence is equal to this key +sequence; otherwise returns FALSE. + +

int TQKeySequence::operator[] ( uint index ) const +

+Returns a reference to the element at position index in the key +sequence. This can only be used to read an element. + +

Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQKeySequence & keysequence ) +

+ +

Writes the key sequence keysequence to the stream s. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQKeySequence & keysequence ) +

+ +

Reads a key sequence from the stream s into the key sequence keysequence. +

See also Format of the TQDataStream operators. + + +


+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/qlabel-h.html b/doc/html/qlabel-h.html new file mode 100644 index 00000000..9ec87949 --- /dev/null +++ b/doc/html/qlabel-h.html @@ -0,0 +1,219 @@ + + + + + +qlabel.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qlabel.h

+ +

This is the verbatim text of the qlabel.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/**********************************************************************
+** $Id: qt/qlabel.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQLabel widget class
+**
+** Created : 941215
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements will be met:
+** http://trolltech.com/products/qt/licenses/licensing/opensource/.
+** If you are unsure which license is appropriate for your use, please
+** review the following information:
+** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
+** or contact the sales department at sales@trolltech.com.
+**
+** This file may be used under the terms of the Q Public License as
+** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
+** included in the packaging of this file.  Licensees holding valid TQt
+** Commercial licenses may use this file in accordance with the TQt
+** Commercial License Agreement provided with the Software.
+**
+** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
+** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
+** herein.
+**
+**********************************************************************/
+
+#ifndef TQLABEL_H
+#define TQLABEL_H
+
+#ifndef QT_H
+#include "qframe.h"
+#endif // QT_H
+
+#ifndef QT_NO_LABEL
+
+class TQSimpleRichText;
+class TQLabelPrivate;
+
+class Q_EXPORT TQLabel : public TQFrame
+{
+    Q_OBJECT
+    Q_PROPERTY( TQString text READ text WRITE setText )
+    Q_PROPERTY( TextFormat textFormat READ textFormat WRITE setTextFormat )
+    Q_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap )
+    Q_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents )
+    Q_PROPERTY( Alignment alignment READ alignment WRITE setAlignment )
+    Q_PROPERTY( int indent READ indent WRITE setIndent )
+    Q_OVERRIDE( BackgroundMode backgroundMode DESIGNABLE true)
+
+public:
+    TQLabel( TQWidget *parent, const char* name=0, WFlags f=0 );
+    TQLabel( const TQString &text, TQWidget *parent, const char* name=0,
+	    WFlags f=0 );
+    TQLabel( TQWidget *buddy, const TQString &,
+	    TQWidget *parent, const char* name=0, WFlags f=0 );
+    ~TQLabel();
+
+    TQString	 text()		const	{ return ltext; }
+    TQPixmap     *pixmap()	const	{ return lpixmap; }
+#ifndef QT_NO_PICTURE
+    TQPicture    *picture()	const	{ return lpicture; }
+#endif
+#ifndef QT_NO_MOVIE
+    TQMovie      *movie()		const;
+#endif
+
+    TextFormat textFormat() const;
+    void 	 setTextFormat( TextFormat );
+
+    int		 alignment() const	{ return align; }
+    virtual void setAlignment( int );
+    int		 indent() const		{ return extraMargin; }
+    void 	 setIndent( int );
+
+    bool 	 autoResize() const	{ return autoresize; }
+    virtual void setAutoResize( bool );
+#ifndef QT_NO_IMAGE_SMOOTHSCALE
+    bool 	hasScaledContents() const;
+    void 	setScaledContents( bool );
+#endif
+    TQSize	 sizeHint() const;
+    TQSize	 minimumSizeHint() const;
+#ifndef QT_NO_ACCEL
+    virtual void setBuddy( TQWidget * );
+    TQWidget     *buddy() const;
+#endif
+    int		 heightForWidth(int) const;
+
+    void setFont( const TQFont &f );
+
+public slots:
+    virtual void setText( const TQString &);
+    virtual void setPixmap( const TQPixmap & );
+#ifndef QT_NO_PICTURE
+    virtual void setPicture( const TQPicture & );
+#endif
+#ifndef QT_NO_MOVIE
+    virtual void setMovie( const TQMovie & );
+#endif
+    virtual void setNum( int );
+    virtual void setNum( double );
+    void	 clear();
+
+protected:
+    void	 drawContents( TQPainter * );
+    void	 fontChange( const TQFont & );
+    void	 resizeEvent( TQResizeEvent* );
+
+private slots:
+#ifndef QT_NO_ACCEL
+    void	 acceleratorSlot();
+    void	 buddyDied();
+#endif
+#ifndef QT_NO_MOVIE
+    void	 movieUpdated(const TQRect&);
+    void	 movieResized(const TQSize&);
+#endif
+
+private:
+    void	init();
+    void	clearContents();
+    void	updateLabel( TQSize oldSizeHint );
+    TQSize	sizeForWidth( int w ) const;
+    TQString	ltext;
+    TQPixmap    *lpixmap;
+#ifndef QT_NO_PICTURE
+    TQPicture   *lpicture;
+#endif
+#ifndef QT_NO_MOVIE
+    TQMovie *	lmovie;
+#endif
+#ifndef QT_NO_ACCEL
+    TQWidget *	lbuddy;
+#endif
+    ushort	align;
+    short	extraMargin;
+    uint	autoresize:1;
+    uint	scaledcontents :1;
+    TextFormat textformat;
+#ifndef QT_NO_RICHTEXT
+    TQSimpleRichText* doc;
+#endif
+#ifndef QT_NO_ACCEL
+    TQAccel *	accel;
+#endif
+    TQLabelPrivate* d;
+
+    friend class TQTipLabel;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQLabel( const TQLabel & );
+    TQLabel &operator=( const TQLabel & );
+#endif
+};
+
+
+#endif // QT_NO_LABEL
+
+#endif // TQLABEL_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlabel-m.png b/doc/html/qlabel-m.png new file mode 100644 index 00000000..9747821a Binary files /dev/null and b/doc/html/qlabel-m.png differ diff --git a/doc/html/qlabel-members.html b/doc/html/qlabel-members.html new file mode 100644 index 00000000..c037e6ca --- /dev/null +++ b/doc/html/qlabel-members.html @@ -0,0 +1,379 @@ + + + + + +TQLabel Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQLabel

+ +

This is the complete list of member functions for +TQLabel, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlabel-w.png b/doc/html/qlabel-w.png new file mode 100644 index 00000000..9747821a Binary files /dev/null and b/doc/html/qlabel-w.png differ diff --git a/doc/html/qlabel.html b/doc/html/qlabel.html new file mode 100644 index 00000000..ea7e2ee8 --- /dev/null +++ b/doc/html/qlabel.html @@ -0,0 +1,420 @@ + + + + + +TQLabel Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQLabel Class Reference

+ +

The TQLabel widget provides a text or image display. +More... +

#include <qlabel.h> +

Inherits TQFrame. +

List of all member functions. +

Public Members

+
    +
  • TQLabel ( TQWidget * parent, const char * name = 0, WFlags f = 0 )
  • +
  • TQLabel ( const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )
  • +
  • TQLabel ( TQWidget * buddy, const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )
  • +
  • ~TQLabel ()
  • +
  • TQString text () const
  • +
  • TQPixmap * pixmap () const
  • +
  • TQPicture * picture () const
  • +
  • TQMovie * movie () const
  • +
  • TextFormat textFormat () const
  • +
  • void setTextFormat ( TextFormat )
  • +
  • int alignment () const
  • +
  • virtual void setAlignment ( int )
  • +
  • int indent () const
  • +
  • void setIndent ( int )
  • +
  • bool autoResize () const  (obsolete)
  • +
  • virtual void setAutoResize ( bool enable )  (obsolete)
  • +
  • bool hasScaledContents () const
  • +
  • void setScaledContents ( bool )
  • +
  • virtual void setBuddy ( TQWidget * buddy )
  • +
  • TQWidget * buddy () const
  • +
  • virtual void setFont ( const TQFont & f )
  • +
+

Public Slots

+
    +
  • virtual void setText ( const TQString & )
  • +
  • virtual void setPixmap ( const TQPixmap & )
  • +
  • virtual void setPicture ( const TQPicture & picture )
  • +
  • virtual void setMovie ( const TQMovie & movie )
  • +
  • virtual void setNum ( int num )
  • +
  • virtual void setNum ( double num )
  • +
  • void clear ()
  • +
+

Properties

+
    +
  • Alignment alignment - the alignment of the label's contents
  • +
  • BackgroundMode backgroundMode - the label's background mode  (read only)
  • +
  • int indent - the label's text indent in pixels
  • +
  • TQPixmap pixmap - the label's pixmap
  • +
  • bool scaledContents - whether the label will scale its contents to fill all available space
  • +
  • TQString text - the label's text
  • +
  • TextFormat textFormat - the label's text format
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQLabel widget provides a text or image display. +

+ + +

TQLabel is used for displaying text or an image. No user +interaction functionality is provided. The visual appearance of +the label can be configured in various ways, and it can be used +for specifying a focus accelerator key for another widget. +

A TQLabel can contain any of the following content types: +

+
Content Setting +
Plain text +Pass a TQString to setText(). +
Rich text +Pass a TQString that contains rich text to setText(). +
A pixmap +Pass a TQPixmap to setPixmap(). +
A movie +Pass a TQMovie to setMovie(). +
A number +Pass an int or a double to setNum(), which converts +the number to plain text. +
Nothing +The same as an empty plain text. This is the default. Set +by clear(). +
+

When the content is changed using any of these functions, any +previous content is cleared. +

The look of a TQLabel can be tuned in several ways. All the +settings of TQFrame are available for specifying a widget frame. +The positioning of the content within the TQLabel widget area can +be tuned with setAlignment() and setIndent(). For example, this +code sets up a sunken panel with a two-line text in the bottom +right corner (both lines being flush with the right side of the +label): +

+    TQLabel *label = new TQLabel( this );
+    label->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+    label->setText( "first line\nsecond line" );
+    label->setAlignment( AlignBottom | AlignRight );
+    
+ +

A TQLabel is often used as a label for an interactive widget. For +this use TQLabel provides a useful mechanism for adding an +accelerator key (see TQAccel) that will set the keyboard focus to +the other widget (called the TQLabel's "buddy"). For example: +

+    TQLineEdit* phoneEdit = new TQLineEdit( this, "phoneEdit" );
+    TQLabel* phoneLabel = new TQLabel( phoneEdit, "&Phone:", this, "phoneLabel" );
+    
+ +

In this example, keyboard focus is transferred to the label's +buddy (the TQLineEdit) when the user presses Alt+P. You can +also use the setBuddy() function to accomplish the same thing. +

+

See also TQLineEdit, TQTextEdit, TQPixmap, TQMovie, GUI Design Handbook: Label, Basic Widgets, and Text Related Classes. + +


Member Function Documentation

+

TQLabel::TQLabel ( TQWidget * parent, const char * name = 0, WFlags f = 0 ) +

+Constructs an empty label. +

The parent, name and widget flag f, arguments are passed +to the TQFrame constructor. +

See also alignment, setFrameStyle(), and indent. + +

TQLabel::TQLabel ( const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 ) +

+Constructs a label that displays the text, text. +

The parent, name and widget flag f, arguments are passed +to the TQFrame constructor. +

See also text, alignment, setFrameStyle(), and indent. + +

TQLabel::TQLabel ( TQWidget * buddy, const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 ) +

+Constructs a label that displays the text text. The label has a +buddy widget, buddy. +

If the text contains an underlined letter (a letter preceded by +an ampersand, &), and the text is in plain text format, when the +user presses Alt+ the underlined letter, focus is passed to the +buddy widget. +

The parent, name and widget flag, f, arguments are passed +to the TQFrame constructor. +

See also text, setBuddy(), alignment, setFrameStyle(), and indent. + +

TQLabel::~TQLabel () +

+Destroys the label. + +

int TQLabel::alignment () const +

Returns the alignment of the label's contents. +See the "alignment" property for details. +

bool TQLabel::autoResize () const +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing +is disabled. +

Auto-resizing is disabled by default. +

See also setAutoResize(). + +

TQWidget * TQLabel::buddy () const +

+Returns this label's buddy, or 0 if no buddy is currently set. +

See also setBuddy(). + +

void TQLabel::clear () [slot] +

+Clears any label contents. Equivalent to setText( "" ). + +

void TQLabel::drawContents ( TQPainter * p ) [virtual protected] +

+Draws the label contents using the painter p. + +

Reimplemented from TQFrame. +

bool TQLabel::hasScaledContents () const +

Returns TRUE if the label will scale its contents to fill all available space; otherwise returns FALSE. +See the "scaledContents" property for details. +

int TQLabel::indent () const +

Returns the label's text indent in pixels. +See the "indent" property for details. +

TQMovie * TQLabel::movie () const +

+Returns a pointer to the label's movie, or 0 if no movie has been +set. +

See also setMovie(). + +

TQPicture * TQLabel::picture () const +

+ +

Returns the label's picture or 0 if the label doesn't have a +picture. + +

TQPixmap * TQLabel::pixmap () const +

Returns the label's pixmap. +See the "pixmap" property for details. +

void TQLabel::setAlignment ( int ) [virtual] +

Sets the alignment of the label's contents. +See the "alignment" property for details. +

void TQLabel::setAutoResize ( bool enable ) [virtual] +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Enables auto-resizing if enable is TRUE, or disables it if enable is FALSE. +

When auto-resizing is enabled the label will resize itself to fit +the contents whenever the contents change. The top-left corner is +not moved. This is useful for TQLabel widgets that are not managed by +a TQLayout (e.g., top-level widgets). +

Auto-resizing is disabled by default. +

See also autoResize(), adjustSize(), and sizeHint. + +

void TQLabel::setBuddy ( TQWidget * buddy ) [virtual] +

+Sets this label's buddy to buddy. +

When the user presses the accelerator key indicated by this label, +the keyboard focus is transferred to the label's buddy widget. +

The buddy mechanism is only available for TQLabels that contain +plain text in which one letter is prefixed with an ampersand, &. +This letter is set as the accelerator key. The letter is displayed +underlined, and the '&' is not displayed (i.e. the ShowPrefix +alignment flag is turned on; see setAlignment()). +

In a dialog, you might create two data entry widgets and a label +for each, and set up the geometry layout so each label is just to +the left of its data entry widget (its "buddy"), for example: +

+    TQLineEdit *nameEd  = new TQLineEdit( this );
+    TQLabel    *nameLb  = new TQLabel( "&Name:", this );
+    nameLb->setBuddy( nameEd );
+    TQLineEdit *phoneEd = new TQLineEdit( this );
+    TQLabel    *phoneLb = new TQLabel( "&Phone:", this );
+    phoneLb->setBuddy( phoneEd );
+    // ( layout setup not shown )
+    
+ +

With the code above, the focus jumps to the Name field when the +user presses Alt+N, and to the Phone field when the user presses +Alt+P. +

To unset a previously set buddy, call this function with buddy +set to 0. +

See also buddy(), text, TQAccel, and alignment. + +

Examples: addressbook/centralwidget.cpp, chart/optionsform.cpp, and regexptester/regexptester.cpp. +

void TQLabel::setFont ( const TQFont & f ) [virtual] +

+Sets the font used on the TQLabel to font f. + +

Example: menu/menu.cpp. +

Reimplemented from TQWidget. +

void TQLabel::setIndent ( int ) +

Sets the label's text indent in pixels. +See the "indent" property for details. +

void TQLabel::setMovie ( const TQMovie & movie ) [virtual slot] +

+Sets the label contents to movie. Any previous content is +cleared. +

The buddy accelerator, if any, is disabled. +

The label resizes itself if auto-resizing is enabled. +

See also movie() and setBuddy(). + +

void TQLabel::setNum ( int num ) [virtual slot] +

+Sets the label contents to plain text containing the textual +representation of integer num. Any previous content is cleared. +Does nothing if the integer's string representation is the same as +the current contents of the label. +

The buddy accelerator, if any, is disabled. +

The label resizes itself if auto-resizing is enabled. +

See also text, TQString::setNum(), and setBuddy(). + +

void TQLabel::setNum ( double num ) [virtual slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the label contents to plain text containing the textual +representation of double num. Any previous content is cleared. +Does nothing if the double's string representation is the same as +the current contents of the label. +

The buddy accelerator, if any, is disabled. +

The label resizes itself if auto-resizing is enabled. +

See also text, TQString::setNum(), and setBuddy(). + +

void TQLabel::setPicture ( const TQPicture & picture ) [virtual slot] +

+Sets the label contents to picture. Any previous content is +cleared. +

The buddy accelerator, if any, is disabled. +

See also picture() and setBuddy(). + +

void TQLabel::setPixmap ( const TQPixmap & ) [virtual slot] +

Sets the label's pixmap. +See the "pixmap" property for details. +

void TQLabel::setScaledContents ( bool ) +

Sets whether the label will scale its contents to fill all available space. +See the "scaledContents" property for details. +

void TQLabel::setText ( const TQString & ) [virtual slot] +

Sets the label's text. +See the "text" property for details. +

void TQLabel::setTextFormat ( TextFormat ) +

Sets the label's text format. +See the "textFormat" property for details. +

TQString TQLabel::text () const +

Returns the label's text. +See the "text" property for details. +

TextFormat TQLabel::textFormat () const +

Returns the label's text format. +See the "textFormat" property for details. +


Property Documentation

+

Alignment alignment

+

This property holds the alignment of the label's contents. +

The alignment is a bitwise OR of TQt::AlignmentFlags and TQt::TextFlags values. The ExpandTabs, SingleLine and ShowPrefix flags apply only if the label contains plain text; +otherwise they are ignored. The DontClip flag is always +ignored. WordBreak applies to both rich text and plain text +labels. The BreakAnywhere flag is not supported in TQLabel. +

If the label has a buddy, the ShowPrefix flag is forced to +TRUE. +

The default alignment is AlignAuto | AlignVCenter | ExpandTabs +if the label doesn't have a buddy and AlignAuto | AlignVCenter | ExpandTabs | ShowPrefix if the label has a buddy. If the label +contains rich text, additionally WordBreak is turned on. +

See also TQt::AlignmentFlags, setBuddy(), and text. + +

Set this property's value with setAlignment() and get this property's value with alignment(). +

BackgroundMode backgroundMode

+

This property holds the label's background mode. +

Get this property with backgroundMode(). +

See also TQWidget::backgroundMode. + +

int indent

+

This property holds the label's text indent in pixels. +

If a label displays text, the indent applies to the left edge if +alignment() is AlignLeft, to the right edge if alignment() is +AlignRight, to the top edge if alignment() is AlignTop, and +to to the bottom edge if alignment() is AlignBottom. +

If indent is negative, or if no indent has been set, the label +computes the effective indent as follows: If frameWidth() is 0, +the effective indent becomes 0. If frameWidth() is greater than 0, +the effective indent becomes half the width of the "x" character +of the widget's current font(). +

See also alignment, frameWidth, and font. + +

Set this property's value with setIndent() and get this property's value with indent(). +

TQPixmap pixmap

+

This property holds the label's pixmap. +

If no pixmap has been set this will return an invalid pixmap. +

Setting the pixmap clears any previous content, and resizes the +label if TQLabel::autoResize() is TRUE. The buddy accelerator, +if any, is disabled. + +

Set this property's value with setPixmap() and get this property's value with pixmap(). +

bool scaledContents

+

This property holds whether the label will scale its contents to fill all available space. +

When enabled and the label shows a pixmap, it will scale the +pixmap to fill the available space. +

This property's default is FALSE. +

See also scaledContents. + +

Set this property's value with setScaledContents() and get this property's value with hasScaledContents(). +

TQString text

+

This property holds the label's text. +

If no text has been set this will return an empty string. Setting +the text clears any previous content, unless they are the same. +

The text will be interpreted either as a plain text or as a rich +text, depending on the text format setting; see setTextFormat(). +The default setting is AutoText, i.e. TQLabel will try to +auto-detect the format of the text set. +

If the text is interpreted as a plain text and a buddy has been +set, the buddy accelerator key is updated from the new text. +

The label resizes itself if auto-resizing is enabled. +

Note that Qlabel is well-suited to display small rich text +documents, i.e. those small documents that get their document +specific settings (font, text color, link color) from the label's +palette and font properties. For large documents, use TQTextEdit +in read-only mode instead. TQTextEdit will flicker less on resize +and can also provide a scrollbar when necessary. +

See also textFormat, setBuddy(), and alignment. + +

Set this property's value with setText() and get this property's value with text(). +

TextFormat textFormat

+

This property holds the label's text format. +

See the TQt::TextFormat enum for an explanation of the possible +options. +

The default format is AutoText. +

See also text. + +

Set this property's value with setTextFormat() and get this property's value with textFormat(). + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlayout-h.html b/doc/html/qlayout-h.html new file mode 100644 index 00000000..94a65108 --- /dev/null +++ b/doc/html/qlayout-h.html @@ -0,0 +1,518 @@ + + + + + +qlayout.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qlayout.h

+ +

This is the verbatim text of the qlayout.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qlayout.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of layout classes
+**
+** Created : 960416
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQLAYOUT_H
+#define TQLAYOUT_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qsizepolicy.h"
+#include "qwidget.h"
+#endif // QT_H
+
+#include <limits.h>
+
+#ifndef QT_NO_LAYOUT
+
+#if 0
+Q_OBJECT
+#endif
+
+static const int TQLAYOUTSIZE_MAX = INT_MAX/256/16;
+
+class TQGridLayoutBox;
+class TQGridLayoutData;
+class TQLayout;
+class TQLayoutItem;
+struct TQLayoutData;
+class TQMenuBar;
+class TQSpacerItem;
+class TQWidget;
+
+class Q_EXPORT TQGLayoutIterator : public TQShared
+{
+public:
+    virtual ~TQGLayoutIterator();
+    virtual TQLayoutItem *next() = 0;
+    virtual TQLayoutItem *current() = 0;
+    virtual TQLayoutItem *takeCurrent() = 0;
+};
+
+class Q_EXPORT TQLayoutIterator
+{
+public:
+    TQLayoutIterator( TQGLayoutIterator *i ) : it( i ) { }
+    TQLayoutIterator( const TQLayoutIterator &i ) : it( i.it ) {
+	if ( it )
+	    it->ref();
+    }
+    ~TQLayoutIterator() { if ( it && it->deref() ) delete it; }
+    TQLayoutIterator &operator=( const TQLayoutIterator &i ) {
+	if ( i.it )
+	    i.it->ref();
+	if ( it && it->deref() )
+	    delete it;
+	it = i.it;
+	return *this;
+    }
+    TQLayoutItem *operator++() { return it ? it->next() : 0; }
+    TQLayoutItem *current() { return it ? it->current() : 0; }
+    TQLayoutItem *takeCurrent() { return it ? it->takeCurrent() : 0; }
+    void deleteCurrent();
+
+private:
+    TQGLayoutIterator *it;
+};
+
+class Q_EXPORT TQLayoutItem
+{
+public:
+    TQLayoutItem( int alignment = 0 ) : align( alignment ) { }
+    virtual ~TQLayoutItem();
+    virtual TQSize sizeHint() const = 0;
+    virtual TQSize minimumSize() const = 0;
+    virtual TQSize maximumSize() const = 0;
+    virtual TQSizePolicy::ExpandData expanding() const = 0;
+    virtual void setGeometry( const TQRect& ) = 0;
+    virtual TQRect geometry() const = 0;
+    virtual bool isEmpty() const = 0;
+    virtual bool hasHeightForWidth() const;
+    virtual int heightForWidth( int ) const;
+    // ### add minimumHeightForWidth( int ) in TQt 4.0
+    virtual void invalidate();
+
+    virtual TQWidget *widget();
+    virtual TQLayoutIterator iterator();
+    virtual TQLayout *layout();
+    virtual TQSpacerItem *spacerItem();
+
+    int alignment() const { return align; }
+    virtual void setAlignment( int a );
+
+protected:
+    int align;
+};
+
+class Q_EXPORT TQSpacerItem : public TQLayoutItem
+{
+public:
+    TQSpacerItem( int w, int h,
+		 TQSizePolicy::SizeType hData = TQSizePolicy::Minimum,
+		 TQSizePolicy::SizeType vData = TQSizePolicy::Minimum )
+	: width( w ), height( h ), sizeP( hData, vData ) { }
+    void changeSize( int w, int h,
+		     TQSizePolicy::SizeType hData = TQSizePolicy::Minimum,
+		     TQSizePolicy::SizeType vData = TQSizePolicy::Minimum );
+    TQSize sizeHint() const;
+    TQSize minimumSize() const;
+    TQSize maximumSize() const;
+    TQSizePolicy::ExpandData expanding() const;
+    bool isEmpty() const;
+    void setGeometry( const TQRect& );
+    TQRect geometry() const;
+    TQSpacerItem *spacerItem();
+
+private:
+    int width;
+    int height;
+    TQSizePolicy sizeP;
+    TQRect rect;
+};
+
+class Q_EXPORT TQWidgetItem : public TQLayoutItem
+{
+public:
+    TQWidgetItem( TQWidget *w ) : wid( w ) { }
+    TQSize sizeHint() const;
+    TQSize minimumSize() const;
+    TQSize maximumSize() const;
+    TQSizePolicy::ExpandData expanding() const;
+    bool isEmpty() const;
+    void setGeometry( const TQRect& );
+    TQRect geometry() const;
+    virtual TQWidget *widget();
+
+    bool hasHeightForWidth() const;
+    int heightForWidth( int ) const;
+
+private:
+    TQWidget *wid;
+};
+
+class Q_EXPORT TQLayout : public TQObject, public TQLayoutItem
+{
+    Q_OBJECT
+    Q_ENUMS( ResizeMode )
+    Q_PROPERTY( int margin READ margin WRITE setMargin )
+    Q_PROPERTY( int spacing READ spacing WRITE setSpacing )
+    Q_PROPERTY( ResizeMode resizeMode READ resizeMode WRITE setResizeMode )
+
+public:
+    // ### TQt 4.0: put 'Auto' first in enum
+    enum ResizeMode { FreeResize, Minimum, Fixed, Auto };
+
+    TQLayout( TQWidget *parent, int margin = 0, int spacing = -1,
+	     const char *name = 0 );
+    TQLayout( TQLayout *parentLayout, int spacing = -1, const char *name = 0 );
+    TQLayout( int spacing = -1, const char *name = 0 );
+    ~TQLayout();
+
+    int margin() const { return outsideBorder; }
+    int spacing() const { return insideSpacing; }
+
+    virtual void setMargin( int );
+    virtual void setSpacing( int );
+
+    int defaultBorder() const { return insideSpacing; }
+    void freeze( int w, int h );
+    void freeze() { setResizeMode( Fixed ); }
+
+    void setResizeMode( ResizeMode );
+    ResizeMode resizeMode() const;
+
+#ifndef QT_NO_MENUBAR
+    virtual void setMenuBar( TQMenuBar *w );
+    TQMenuBar *menuBar() const { return menubar; }
+#endif
+
+    TQWidget *mainWidget();
+    bool isTopLevel() const { return topLevel; }
+
+    virtual void setAutoAdd( bool );
+    bool autoAdd() const { return autoNewChild; }
+
+    void invalidate();
+    TQRect geometry() const;
+    bool activate();
+
+    void add( TQWidget *w ) { addItem( new TQWidgetItem(w) ); }
+    virtual void addItem( TQLayoutItem * ) = 0;
+
+    void remove( TQWidget *w );
+    void removeItem( TQLayoutItem * );
+
+    TQSizePolicy::ExpandData expanding() const;
+    TQSize minimumSize() const;
+    TQSize maximumSize() const;
+    void setGeometry( const TQRect& ) = 0;
+    TQLayoutIterator iterator() = 0;
+    bool isEmpty() const;
+
+    int totalHeightForWidth( int w ) const;
+    TQSize totalMinimumSize() const;
+    TQSize totalMaximumSize() const;
+    TQSize totalSizeHint() const;
+    TQLayout *layout();
+
+    bool supportsMargin() const { return marginImpl; }
+
+    void setEnabled( bool );
+    bool isEnabled() const;
+
+protected:
+    bool eventFilter( TQObject *, TQEvent * );
+    void childEvent( TQChildEvent *e );
+    void addChildLayout( TQLayout *l );
+    void deleteAllItems();
+
+    void setSupportsMargin( bool );
+    TQRect alignmentRect( const TQRect& ) const;
+
+private:
+    void setWidgetLayout( TQWidget *, TQLayout * );
+    void init();
+    int insideSpacing;
+    int outsideBorder;
+    uint topLevel : 1;
+    uint enabled : 1;
+    uint autoNewChild : 1;
+    uint frozen : 1;
+    uint activated : 1;
+    uint marginImpl : 1;
+    uint autoMinimum : 1;
+    uint autoResizeMode : 1;
+    TQRect rect;
+    TQLayoutData *extraData;
+#ifndef QT_NO_MENUBAR
+    TQMenuBar *menubar;
+#endif
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQLayout( const TQLayout & );
+    TQLayout &operator=( const TQLayout & );
+#endif
+
+    static void propagateSpacing( TQLayout *layout );
+};
+
+inline void TQLayoutIterator::deleteCurrent()
+{
+    delete takeCurrent();
+}
+
+class Q_EXPORT TQGridLayout : public TQLayout
+{
+    Q_OBJECT
+public:
+    TQGridLayout( TQWidget *parent, int nRows = 1, int nCols = 1, int border = 0,
+		 int spacing = -1, const char *name = 0 );
+    TQGridLayout( int nRows = 1, int nCols = 1, int spacing = -1,
+		 const char *name = 0 );
+    TQGridLayout( TQLayout *parentLayout, int nRows = 1, int nCols = 1,
+		 int spacing = -1, const char *name = 0 );
+    ~TQGridLayout();
+
+    TQSize sizeHint() const;
+    TQSize minimumSize() const;
+    TQSize maximumSize() const;
+
+    // ### remove 'virtual' in 4.0 (or add 'virtual' to set{Row,Col}Spacing())
+    virtual void setRowStretch( int row, int stretch );
+    virtual void setColStretch( int col, int stretch );
+    int rowStretch( int row ) const;
+    int colStretch( int col ) const;
+
+    void setRowSpacing( int row, int minSize );
+    void setColSpacing( int col, int minSize );
+    int rowSpacing( int row ) const;
+    int colSpacing( int col ) const;
+
+    int numRows() const;
+    int numCols() const;
+    TQRect cellGeometry( int row, int col ) const;
+
+    bool hasHeightForWidth() const;
+    int heightForWidth( int ) const;
+    int minimumHeightForWidth( int ) const;
+
+    TQSizePolicy::ExpandData expanding() const;
+    void invalidate();
+
+    void addItem( TQLayoutItem * );
+    void addItem( TQLayoutItem *item, int row, int col );
+    void addMultiCell( TQLayoutItem *, int fromRow, int toRow,
+			       int fromCol, int toCol, int align = 0 );
+
+    void addWidget( TQWidget *, int row, int col, int align = 0 );
+    void addMultiCellWidget( TQWidget *, int fromRow, int toRow,
+			     int fromCol, int toCol, int align = 0 );
+    void addLayout( TQLayout *layout, int row, int col);
+    void addMultiCellLayout( TQLayout *layout, int fromRow, int toRow,
+			     int fromCol, int toCol, int align = 0 );
+    void addRowSpacing( int row, int minsize );
+    void addColSpacing( int col, int minsize );
+
+    void expand( int rows, int cols );
+
+    enum Corner { TopLeft, TopRight, BottomLeft, BottomRight };
+    void setOrigin( Corner );
+    Corner origin() const;
+    TQLayoutIterator iterator();
+    void setGeometry( const TQRect& );
+
+protected:
+    bool findWidget( TQWidget* w, int *r, int *c );
+    void add( TQLayoutItem*, int row, int col );
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQGridLayout( const TQGridLayout & );
+    TQGridLayout &operator=( const TQGridLayout & );
+#endif
+
+    void init( int rows, int cols );
+    TQGridLayoutData *data;
+};
+
+class TQBoxLayoutData;
+class TQDockWindow;
+
+class Q_EXPORT TQBoxLayout : public TQLayout
+{
+    Q_OBJECT
+public:
+    enum Direction { LeftToRight, RightToLeft, TopToBottom, BottomToTop,
+		     Down = TopToBottom, Up = BottomToTop };
+
+    TQBoxLayout( TQWidget *parent, Direction, int border = 0, int spacing = -1,
+		const char *name = 0 );
+    TQBoxLayout( TQLayout *parentLayout, Direction, int spacing = -1,
+		const char *name = 0 );
+    TQBoxLayout( Direction, int spacing = -1, const char *name = 0 );
+    ~TQBoxLayout();
+
+    void addItem( TQLayoutItem * );
+
+    Direction direction() const { return dir; }
+    void setDirection( Direction );
+
+    void addSpacing( int size );
+    void addStretch( int stretch = 0 );
+    void addWidget( TQWidget *, int stretch = 0, int alignment = 0 );
+    void addLayout( TQLayout *layout, int stretch = 0 );
+    void addStrut( int );
+
+    void insertSpacing( int index, int size );
+    void insertStretch( int index, int stretch = 0 );
+    void insertWidget( int index, TQWidget *widget, int stretch = 0,
+		       int alignment = 0 );
+    void insertLayout( int index, TQLayout *layout, int stretch = 0 );
+
+    bool setStretchFactor( TQWidget*, int stretch );
+    bool setStretchFactor( TQLayout *l, int stretch );
+
+    TQSize sizeHint() const;
+    TQSize minimumSize() const;
+    TQSize maximumSize() const;
+
+    bool hasHeightForWidth() const;
+    int heightForWidth( int ) const;
+    int minimumHeightForWidth( int ) const;
+
+    TQSizePolicy::ExpandData expanding() const;
+    void invalidate();
+    TQLayoutIterator iterator();
+    void setGeometry( const TQRect& );
+
+    int findWidget( TQWidget* w );
+
+protected:
+    void insertItem( int index, TQLayoutItem * );
+
+private:
+    friend class TQDockWindow;
+#if defined(Q_DISABLE_COPY)
+    TQBoxLayout( const TQBoxLayout & );
+    TQBoxLayout &operator=( const TQBoxLayout & );
+#endif
+
+    void setupGeom();
+    void calcHfw( int );
+    TQBoxLayoutData *data;
+    Direction dir;
+    TQBoxLayout *createTmpCopy();
+};
+
+class Q_EXPORT TQHBoxLayout : public TQBoxLayout
+{
+    Q_OBJECT
+public:
+    TQHBoxLayout( TQWidget *parent, int border = 0,
+		 int spacing = -1, const char *name = 0 );
+    TQHBoxLayout( TQLayout *parentLayout,
+		 int spacing = -1, const char *name = 0 );
+    TQHBoxLayout( int spacing = -1, const char *name = 0 );
+
+    ~TQHBoxLayout();
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQHBoxLayout( const TQHBoxLayout & );
+    TQHBoxLayout &operator=( const TQHBoxLayout & );
+#endif
+};
+
+class Q_EXPORT TQVBoxLayout : public TQBoxLayout
+{
+    Q_OBJECT
+public:
+    TQVBoxLayout( TQWidget *parent, int border = 0,
+		 int spacing = -1, const char *name = 0 );
+    TQVBoxLayout( TQLayout *parentLayout,
+		 int spacing = -1, const char *name = 0 );
+    TQVBoxLayout( int spacing = -1, const char *name = 0 );
+
+    ~TQVBoxLayout();
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQVBoxLayout( const TQVBoxLayout & );
+    TQVBoxLayout &operator=( const TQVBoxLayout & );
+#endif
+};
+
+#endif // QT_NO_LAYOUT
+#endif // TQLAYOUT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlayout-members.html b/doc/html/qlayout-members.html new file mode 100644 index 00000000..f6e270b9 --- /dev/null +++ b/doc/html/qlayout-members.html @@ -0,0 +1,129 @@ + + + + + +TQLayout Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQLayout

+ +

This is the complete list of member functions for +TQLayout, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlayout.html b/doc/html/qlayout.html new file mode 100644 index 00000000..912154e2 --- /dev/null +++ b/doc/html/qlayout.html @@ -0,0 +1,414 @@ + + + + + +TQLayout Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQLayout Class Reference

+ +

The TQLayout class is the base class of geometry managers. +More... +

#include <qlayout.h> +

Inherits TQObject and TQLayoutItem. +

Inherited by TQGridLayout and TQBoxLayout. +

List of all member functions. +

Public Members

+ +

Properties

+
    +
  • int margin - the width of the outside border of the layout
  • +
  • ResizeMode resizeMode - the resize mode of the layout
  • +
  • int spacing - the spacing between widgets inside the layout
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQLayout class is the base class of geometry managers. +

+ +

This is an abstract base class inherited by the concrete classes, +TQBoxLayout and TQGridLayout. +

For users of TQLayout subclasses or of TQMainWindow there is seldom +any need to use the basic functions provided by TQLayout, such as +setResizeMode() or setMenuBar(). See the layout + overview page for more information. +

To make your own layout manager, subclass TQGLayoutIterator and +implement the functions addItem(), sizeHint(), setGeometry(), and +iterator(). You should also implement minimumSize() to ensure your +layout isn't resized to zero size if there is too little space. To +support children whose heights depend on their widths, implement +hasHeightForWidth() and heightForWidth(). See the custom layout page for an in-depth +description. +

Geometry management stops when the layout manager is deleted. +

See also Widget Appearance and Style and Layout Management. + +


Member Type Documentation

+

TQLayout::ResizeMode

+ +

The possible values are: +

    +
  • TQLayout::Auto - If the main widget is a top-level widget with no +height-for-width (hasHeightForWidth()), this is +the same as Minimium; otherwise, this is the +same as FreeResize. +
  • TQLayout::Fixed - The main widget's size is set to sizeHint(); it +cannot be resized at all. +
  • TQLayout::Minimum - The main widget's minimum size is set to +minimumSize(); it cannot be smaller. +
  • TQLayout::FreeResize - The widget is not constrained. +
+

Member Function Documentation

+

TQLayout::TQLayout ( TQWidget * parent, int margin = 0, int spacing = -1, const char * name = 0 ) +

+Constructs a new top-level TQLayout called name, with main +widget parent. parent may not be 0. +

The margin is the number of pixels between the edge of the +widget and the managed children. The spacing sets the value of +spacing(), which gives the spacing between the managed widgets. If +spacing is -1 (the default), spacing is set to the value of margin. +

There can be only one top-level layout for a widget. It is +returned by TQWidget::layout() + +

TQLayout::TQLayout ( TQLayout * parentLayout, int spacing = -1, const char * name = 0 ) +

+Constructs a new child TQLayout called name, and places it +inside parentLayout by using the default placement defined by +addItem(). +

If spacing is -1, this TQLayout inherits parentLayout's +spacing(), otherwise the value of spacing is used. + +

TQLayout::TQLayout ( int spacing = -1, const char * name = 0 ) +

+Constructs a new child TQLayout called name. If spacing is +-1, this TQLayout inherits its parent's spacing(); otherwise the +value of spacing is used. +

This layout has to be inserted into another layout before geometry +management will work. + +

bool TQLayout::activate () +

+Redoes the layout for mainWidget(). You should generally not need +to call this because it is automatically called at the most +appropriate times. +

However, if you set up a TQLayout for a visible widget without +resizing that widget, you will need to call this function in order +to lay it out. +

See also TQWidget::updateGeometry(). + +

Examples: layout/layout.cpp, popup/popup.cpp, scrollview/scrollview.cpp, and sql/overview/form1/main.cpp. +

void TQLayout::add ( TQWidget * w ) +

+ +

Adds widget w to this layout in a manner specific to the +layout. This function uses addItem(). + +

Examples: customlayout/border.cpp and customlayout/main.cpp. +

void TQLayout::addChildLayout ( TQLayout * l ) [protected] +

+This function is called from addLayout() functions in subclasses +to add layout l as a sub-layout. + +

void TQLayout::addItem ( TQLayoutItem * item ) [pure virtual] +

+ +

Implemented in subclasses to add an item. How it is added is +specific to each subclass. +

The ownership of item is transferred to the layout, and it's +the layout's responsibility to delete it. + +

Examples: customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp. +

Reimplemented in TQGridLayout and TQBoxLayout. +

TQRect TQLayout::alignmentRect ( const TQRect & r ) const [protected] +

+Returns the rectangle that should be covered when the geometry of +this layout is set to r, provided that this layout supports +setAlignment(). +

The result is derived from sizeHint() and expanding(). It is never +larger than r. + +

bool TQLayout::autoAdd () const +

+ +

Returns TRUE if this layout automatically grabs all new +mainWidget()'s new children and adds them as defined by addItem(); +otherwise returns FALSE. This has effect only for top-level +layouts, i.e. layouts that are direct children of their +mainWidget(). +

autoAdd() is disabled by default. +

Note that a top-level layout is not necessarily associated with +the top-level widget. +

See also setAutoAdd(). + +

void TQLayout::deleteAllItems () [protected] +

+Removes and deletes all items in this layout. + +

TQSizePolicy::ExpandData TQLayout::expanding () const [virtual] +

+Returns whether this layout can make use of more space than +sizeHint(). A value of Vertical or Horizontal means that it wants +to grow in only one dimension, whereas BothDirections means that +it wants to grow in both dimensions. +

The default implementation returns BothDirections. + +

Examples: customlayout/border.cpp and customlayout/flow.cpp. +

Reimplemented from TQLayoutItem. +

Reimplemented in TQGridLayout and TQBoxLayout. +

void TQLayout::invalidate () [virtual] +

+Invalidates cached information. Reimplementations must call this. + +

Reimplemented from TQLayoutItem. +

Reimplemented in TQGridLayout and TQBoxLayout. +

bool TQLayout::isEmpty () const [virtual] +

+Returns TRUE if this layout is empty. The default implementation +returns FALSE. + +

Reimplemented from TQLayoutItem. +

bool TQLayout::isEnabled () const +

+Returns TRUE if the layout is enabled; otherwise returns FALSE. +

See also setEnabled(). + +

bool TQLayout::isTopLevel () const +

+ +

Returns TRUE if this layout is a top-level layout, i.e. not a +child of another layout; otherwise returns FALSE. + +

TQLayoutIterator TQLayout::iterator () [pure virtual] +

+ +

Implemented in subclasses to return an iterator that iterates over +this layout's children. +

A typical implementation will be: +

+        TQLayoutIterator MyLayout::iterator()
+        {
+            TQGLayoutIterator *i = new MyLayoutIterator( internal_data );
+            return TQLayoutIterator( i );
+        }
+    
+ +where MyLayoutIterator is a subclass of TQGLayoutIterator. + +

Examples: customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp. +

Reimplemented from TQLayoutItem. +

TQWidget * TQLayout::mainWidget () +

+Returns the main widget (parent widget) of this layout, or 0 if +this layout is a sub-layout that is not yet inserted. + +

int TQLayout::margin () const +

Returns the width of the outside border of the layout. +See the "margin" property for details. +

TQSize TQLayout::maximumSize () const [virtual] +

+Returns the maximum size of this layout. This is the largest size +that the layout can have while still respecting the +specifications. Does not include what's needed by margin() or +menuBar(). +

The default implementation allows unlimited resizing. + +

Reimplemented from TQLayoutItem. +

Reimplemented in TQGridLayout and TQBoxLayout. +

TQMenuBar * TQLayout::menuBar () const +

+ +

Returns the menu bar set for this layout, or 0 if no menu bar is +set. + +

TQSize TQLayout::minimumSize () const [virtual] +

+Returns the minimum size of this layout. This is the smallest size +that the layout can have while still respecting the +specifications. Does not include what's needed by margin() or +menuBar(). +

The default implementation allows unlimited resizing. + +

Examples: customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp. +

Reimplemented from TQLayoutItem. +

Reimplemented in TQGridLayout and TQBoxLayout. +

void TQLayout::remove ( TQWidget * widget ) +

+Removes the widget widget from the layout. After this call, it +is the caller's responsibility to give the widget a reasonable +geometry or to put the widget back into a layout. +

See also removeItem(), TQWidget::geometry, and add(). + +

void TQLayout::removeItem ( TQLayoutItem * item ) +

+Removes the layout item item from the layout. It is the +caller's responsibility to delete the item. +

Notice that item can be a layout (since TQLayout inherits +TQLayoutItem). +

See also remove() and addItem(). + +

ResizeMode TQLayout::resizeMode () const +

Returns the resize mode of the layout. +See the "resizeMode" property for details. +

void TQLayout::setAutoAdd ( bool b ) [virtual] +

+If b is TRUE, auto-add is enabled; otherwise auto-add is +disabled. +

Warning: If auto-add is enabled, you cannot set stretch factors +on the child widgets until the widgets are actually inserted in +the layout (after control returned to the event loop). We +therefore recommend that you avoid the auto-add feature in new +programs. +

See also autoAdd(). + +

Examples: hierarchy/objects.cpp and i18n/main.cpp. +

void TQLayout::setEnabled ( bool enable ) +

+Enables this layout if enable is TRUE, otherwise disables it. +

An enabled layout adjusts dynamically to changes; a disabled +layout acts as if it did not exist. +

By default all layouts are enabled. +

See also isEnabled(). + +

void TQLayout::setGeometry ( const TQRect & r ) [pure virtual] +

+This function is reimplemented in subclasses to perform layout. +

The default implementation maintains the geometry() information +given by rect r. Reimplementors must call this function. + +

Examples: customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp. +

Reimplemented from TQLayoutItem. +

Reimplemented in TQGridLayout and TQBoxLayout. +

void TQLayout::setMargin ( int ) [virtual] +

Sets the width of the outside border of the layout. +See the "margin" property for details. +

void TQLayout::setMenuBar ( TQMenuBar * w ) [virtual] +

+Makes the geometry manager take account of the menu bar w. All +child widgets are placed below the bottom edge of the menu bar. +

A menu bar does its own geometry management: never do addWidget() +on a TQMenuBar. + +

Examples: layout/layout.cpp and scrollview/scrollview.cpp. +

void TQLayout::setResizeMode ( ResizeMode ) +

Sets the resize mode of the layout. +See the "resizeMode" property for details. +

void TQLayout::setSpacing ( int ) [virtual] +

Sets the spacing between widgets inside the layout. +See the "spacing" property for details. +

void TQLayout::setSupportsMargin ( bool b ) [protected] +

+Sets the value returned by supportsMargin(). If b is TRUE, +margin() handling is implemented by the subclass. If b is +FALSE (the default), TQLayout will add margin() around top-level +layouts. +

If b is TRUE, margin handling needs to be implemented in +setGeometry(), maximumSize(), minimumSize(), sizeHint() and +heightForWidth(). +

See also supportsMargin(). + +

int TQLayout::spacing () const +

Returns the spacing between widgets inside the layout. +See the "spacing" property for details. +

bool TQLayout::supportsMargin () const +

+ +

Returns TRUE if this layout supports TQLayout::margin on +non-top-level layouts; otherwise returns FALSE. +

See also margin. + +


Property Documentation

+

int margin

+

This property holds the width of the outside border of the layout. +

For some layout classes this property has an effect only on +top-level layouts; TQBoxLayout and TQGridLayout support margins for +child layouts. The default value is 0. +

See also spacing. + +

Set this property's value with setMargin() and get this property's value with margin(). +

ResizeMode resizeMode

+

This property holds the resize mode of the layout. +

The default mode is Auto. +

See also TQLayout::ResizeMode. + +

Set this property's value with setResizeMode() and get this property's value with resizeMode(). +

int spacing

+

This property holds the spacing between widgets inside the layout. +

The default value is -1, which signifies that the layout's spacing +should not override the widget's spacing. +

See also margin. + +

Set this property's value with setSpacing() and get this property's value with spacing(). + +


+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/qlayoutitem-members.html b/doc/html/qlayoutitem-members.html new file mode 100644 index 00000000..d65975ec --- /dev/null +++ b/doc/html/qlayoutitem-members.html @@ -0,0 +1,64 @@ + + + + + +TQLayoutItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQLayoutItem

+ +

This is the complete list of member functions for +TQLayoutItem, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlayoutitem.html b/doc/html/qlayoutitem.html new file mode 100644 index 00000000..7b76e1cd --- /dev/null +++ b/doc/html/qlayoutitem.html @@ -0,0 +1,230 @@ + + + + + +TQLayoutItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQLayoutItem Class Reference

+ +

The TQLayoutItem class provides an abstract item that a +TQLayout manipulates. +More... +

#include <qlayout.h> +

Inherited by TQLayout, TQSpacerItem, and TQWidgetItem. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + + +The TQLayoutItem class provides an abstract item that a +TQLayout manipulates. +

This is used by custom layouts. +

Pure virtual functions are provided to return information about +the layout, including, sizeHint(), minimumSize(), maximumSize() +and expanding(). +

The layout's geometry can be set and retrieved with setGeometry() +and geometry(), and its alignment with setAlignment() and +alignment(). +

isEmpty() returns whether the layout is empty. iterator() returns +an iterator for the layout's children. If the concrete item is a +TQWidget, it can be retrieved using widget(). Similarly for +layout() and spacerItem(). +

See also TQLayout, Widget Appearance and Style, and Layout Management. + +


Member Function Documentation

+

TQLayoutItem::TQLayoutItem ( int alignment = 0 ) +

+ +

Constructs a layout item with an alignment that is a bitwise OR +of the TQt::AlignmentFlags. Not all subclasses support +alignment. + +

TQLayoutItem::~TQLayoutItem () [virtual] +

+Destroys the TQLayoutItem. + +

int TQLayoutItem::alignment () const +

+ +

Returns the alignment of this item. + +

TQSizePolicy::ExpandData TQLayoutItem::expanding () const [pure virtual] +

+ +

Implemented in subclasses to return the direction(s) this item +"wants" to expand in (if any). + +

Reimplemented in TQLayout, TQSpacerItem, and TQWidgetItem. +

TQRect TQLayoutItem::geometry () const [pure virtual] +

+ +

Returns the rectangle covered by this layout item. + +

Example: customlayout/border.cpp. +

bool TQLayoutItem::hasHeightForWidth () const [virtual] +

+Returns TRUE if this layout's preferred height depends on its +width; otherwise returns FALSE. The default implementation returns +FALSE. +

Reimplement this function in layout managers that support height +for width. +

See also heightForWidth() and TQWidget::heightForWidth(). + +

Examples: customlayout/border.cpp and customlayout/flow.cpp. +

Reimplemented in TQGridLayout and TQBoxLayout. +

int TQLayoutItem::heightForWidth ( int w ) const [virtual] +

+Returns the preferred height for this layout item, given the width +w. +

The default implementation returns -1, indicating that the +preferred height is independent of the width of the item. Using +the function hasHeightForWidth() will typically be much faster +than calling this function and testing for -1. +

Reimplement this function in layout managers that support height +for width. A typical implementation will look like this: +

+        int MyLayout::heightForWidth( int w ) const
+        {
+            if ( cache_dirty || cached_width != w ) {
+                // not all C++ compilers support "mutable"
+                MyLayout *that = (MyLayout*)this;
+                int h = calculateHeightForWidth( w );
+                that->cached_hfw = h;
+                return h;
+            }
+            return cached_hfw;
+        }
+    
+ +

Caching is strongly recommended; without it layout will take +exponential time. +

See also hasHeightForWidth(). + +

Example: customlayout/flow.cpp. +

Reimplemented in TQGridLayout and TQBoxLayout. +

void TQLayoutItem::invalidate () [virtual] +

+Invalidates any cached information in this layout item. + +

Reimplemented in TQLayout. +

bool TQLayoutItem::isEmpty () const [pure virtual] +

+ +

Implemented in subclasses to return whether this item is empty, +i.e. whether it contains any widgets. + +

Reimplemented in TQLayout, TQSpacerItem, and TQWidgetItem. +

TQLayoutIterator TQLayoutItem::iterator () [virtual] +

+Returns an iterator over this item's TQLayoutItem children. The +default implementation returns an empty iterator. +

Reimplement this function in subclasses that can have children. + +

Reimplemented in TQLayout. +

TQLayout * TQLayoutItem::layout () [virtual] +

+If this item is a TQLayout, it is returned as a TQLayout; otherwise +0 is returned. This function provides type-safe casting. + +

TQSize TQLayoutItem::maximumSize () const [pure virtual] +

+ +

Implemented in subclasses to return the maximum size of this item. + +

Reimplemented in TQLayout, TQSpacerItem, and TQWidgetItem. +

TQSize TQLayoutItem::minimumSize () const [pure virtual] +

+ +

Implemented in subclasses to return the minimum size of this item. + +

Examples: customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp. +

Reimplemented in TQLayout, TQSpacerItem, and TQWidgetItem. +

void TQLayoutItem::setAlignment ( int a ) [virtual] +

+Sets the alignment of this item to a, which is a bitwise OR of +the TQt::AlignmentFlags. Not all subclasses support alignment. + +

Example: chart/optionsform.cpp. +

void TQLayoutItem::setGeometry ( const TQRect & r ) [pure virtual] +

+ +

Implemented in subclasses to set this item's geometry to r. + +

Examples: customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp. +

Reimplemented in TQLayout, TQSpacerItem, and TQWidgetItem. +

TQSize TQLayoutItem::sizeHint () const [pure virtual] +

+ +

Implemented in subclasses to return the preferred size of this item. + +

Examples: customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp. +

Reimplemented in TQSpacerItem, TQWidgetItem, TQGridLayout, and TQBoxLayout. +

TQSpacerItem * TQLayoutItem::spacerItem () [virtual] +

+If this item is a TQSpacerItem, it is returned as a TQSpacerItem; +otherwise 0 is returned. This function provides type-safe casting. + +

TQWidget * TQLayoutItem::widget () [virtual] +

+If this item is a TQWidget, it is returned as a TQWidget; otherwise +0 is returned. This function provides type-safe casting. + +

Reimplemented in TQWidgetItem. + +


+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/qlayoutiterator-members.html b/doc/html/qlayoutiterator-members.html new file mode 100644 index 00000000..87142f07 --- /dev/null +++ b/doc/html/qlayoutiterator-members.html @@ -0,0 +1,53 @@ + + + + + +TQLayoutIterator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQLayoutIterator

+ +

This is the complete list of member functions for +TQLayoutIterator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlayoutiterator.html b/doc/html/qlayoutiterator.html new file mode 100644 index 00000000..d60423df --- /dev/null +++ b/doc/html/qlayoutiterator.html @@ -0,0 +1,158 @@ + + + + + +TQLayoutIterator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQLayoutIterator Class Reference

+ +

The TQLayoutIterator class provides iterators over TQLayoutItem. +More... +

#include <qlayout.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQLayoutIterator class provides iterators over TQLayoutItem. +

+ +

Use TQLayoutItem::iterator() to create an iterator over a layout. +

TQLayoutIterator uses explicit sharing with a reference count. +If an iterator is copied and one of the copies is modified, both +iterators will be modified. +

A TQLayoutIterator is not protected against changes in its layout. If +the layout is modified or deleted the iterator will become invalid. +It is not possible to test for validity. It is safe to delete an +invalid layout; any other access may lead to an illegal memory +reference and the abnormal termination of the program. +

Calling takeCurrent() or deleteCurrent() leaves the iterator in a +valid state, but may invalidate any other iterators that access the +same layout. +

The following code will draw a rectangle for each layout item in +the layout structure of the widget. +

+    static void paintLayout( TQPainter *p, TQLayoutItem *lay )
+    {
+        TQLayoutIterator it = lay->iterator();
+        TQLayoutItem *child;
+        while ( (child = it.current()) != 0 ) {
+            paintLayout( p, child );
+            ++it;
+        }
+        p->drawRect( lay->geometry() );
+    }
+    void ExampleWidget::paintEvent( TQPaintEvent * )
+    {
+        TQPainter p( this );
+        if ( layout() )
+            paintLayout( &p, layout() );
+    }
+    
+ +

All the functionality of TQLayoutIterator is implemented by +subclasses of TQGLayoutIterator. TQLayoutIterator itself is not +designed to be subclassed. +

See also Widget Appearance and Style and Layout Management. + +


Member Function Documentation

+

TQLayoutIterator::TQLayoutIterator ( TQGLayoutIterator * gi ) +

+ +

Constructs an iterator based on gi. The constructed iterator +takes ownership of gi and will delete it. +

This constructor is provided for layout implementors. Application +programmers should use TQLayoutItem::iterator() to create an +iterator over a layout. + +

TQLayoutIterator::TQLayoutIterator ( const TQLayoutIterator & i ) +

+ +

Creates a shallow copy of i, i.e. if the copy is modified, then +the original will also be modified. + +

TQLayoutIterator::~TQLayoutIterator () +

+ +

Destroys the iterator. + +

TQLayoutItem * TQLayoutIterator::current () +

+ +

Returns the current item, or 0 if there is no current item. + +

void TQLayoutIterator::deleteCurrent () +

+ +

Removes and deletes the current child item from the layout and +moves the iterator to the next item. This iterator will still be +valid, but any other iterator over the same layout may become +invalid. + +

TQLayoutItem * TQLayoutIterator::operator++ () +

+ +

Moves the iterator to the next child item and returns that item, +or 0 if there is no such item. + +

TQLayoutIterator & TQLayoutIterator::operator= ( const TQLayoutIterator & i ) +

+ +

Assigns i to this iterator and returns a reference to this +iterator. + +

TQLayoutItem * TQLayoutIterator::takeCurrent () +

+ +

Removes the current child item from the layout without deleting +it, and moves the iterator to the next item. Returns the removed +item, or 0 if there was no item to be removed. This iterator will +still be valid, but any other iterator over the same layout may +become invalid. + + +


+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/qlcdnum-m.png b/doc/html/qlcdnum-m.png new file mode 100644 index 00000000..cc9a5ab2 Binary files /dev/null and b/doc/html/qlcdnum-m.png differ diff --git a/doc/html/qlcdnum-w.png b/doc/html/qlcdnum-w.png new file mode 100644 index 00000000..06fb5096 Binary files /dev/null and b/doc/html/qlcdnum-w.png differ diff --git a/doc/html/qlcdnumber-h.html b/doc/html/qlcdnumber-h.html new file mode 100644 index 00000000..d04b6dbb --- /dev/null +++ b/doc/html/qlcdnumber-h.html @@ -0,0 +1,191 @@ + + + + + +qlcdnumber.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qlcdnumber.h

+ +

This is the verbatim text of the qlcdnumber.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qlcdnumber.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQLCDNumber class
+**
+** Created : 940518
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQLCDNUMBER_H
+#define TQLCDNUMBER_H
+
+#ifndef QT_H
+#include "qframe.h"
+#include "qbitarray.h"
+#endif // QT_H
+
+#ifndef QT_NO_LCDNUMBER
+
+
+class TQLCDNumberPrivate;
+
+class Q_EXPORT TQLCDNumber : public TQFrame		// LCD number widget
+{
+    Q_OBJECT
+    Q_ENUMS( Mode SegmentStyle )
+    Q_PROPERTY( bool smallDecimalPoint READ smallDecimalPoint WRITE setSmallDecimalPoint )
+    Q_PROPERTY( int numDigits READ numDigits WRITE setNumDigits )
+    Q_PROPERTY( Mode mode READ mode WRITE setMode )
+    Q_PROPERTY( SegmentStyle segmentStyle READ segmentStyle WRITE setSegmentStyle )
+    Q_PROPERTY( double value READ value WRITE display )
+    Q_PROPERTY( int intValue READ intValue WRITE display )
+
+public:
+    TQLCDNumber( TQWidget* parent=0, const char* name=0 );
+    TQLCDNumber( uint numDigits, TQWidget* parent=0, const char* name=0 );
+    ~TQLCDNumber();
+
+    enum Mode { Hex, Dec, Oct, Bin, HEX = Hex, DEC = Dec, OCT = Oct,
+		BIN = Bin };
+    enum SegmentStyle { Outline, Filled, Flat };
+
+    bool    smallDecimalPoint() const;
+
+    int	    numDigits() const;
+    virtual void setNumDigits( int nDigits );
+
+    bool    checkOverflow( double num ) const;
+    bool    checkOverflow( int	  num ) const;
+
+    Mode mode() const;
+    virtual void setMode( Mode );
+
+    SegmentStyle segmentStyle() const;
+    virtual void setSegmentStyle( SegmentStyle );
+
+    double  value() const;
+    int	    intValue() const;
+
+    TQSize sizeHint() const;
+
+public slots:
+    void    display( const TQString &str );
+    void    display( int num );
+    void    display( double num );
+    virtual void setHexMode();
+    virtual void setDecMode();
+    virtual void setOctMode();
+    virtual void setBinMode();
+    virtual void setSmallDecimalPoint( bool );
+
+signals:
+    void    overflow();
+
+protected:
+    void    drawContents( TQPainter * );
+
+private:
+    void    init();
+    void    internalDisplay( const TQString &);
+    void    internalSetString( const TQString& s );
+    void    drawString( const TQString& s, TQPainter &, TQBitArray * = 0,
+			bool = TRUE );
+    //void    drawString( const TQString &, TQPainter &, TQBitArray * = 0 ) const;
+    void    drawDigit( const TQPoint &, TQPainter &, int, char,
+		       char = ' ' );
+    void    drawSegment( const TQPoint &, char, TQPainter &, int, bool = FALSE );
+
+    int	    ndigits;
+    double  val;
+    uint    base	: 2;
+    uint    smallPoint	: 1;
+    uint    fill	: 1;
+    uint    shadow	: 1;
+    TQString digitStr;
+    TQBitArray points;
+    TQLCDNumberPrivate * d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQLCDNumber( const TQLCDNumber & );
+    TQLCDNumber &operator=( const TQLCDNumber & );
+#endif
+};
+
+inline bool TQLCDNumber::smallDecimalPoint() const
+{ return (bool)smallPoint; }
+
+inline int TQLCDNumber::numDigits() const
+{ return ndigits; }
+
+
+#endif // QT_NO_LCDNUMBER
+
+#endif // TQLCDNUMBER_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlcdnumber-members.html b/doc/html/qlcdnumber-members.html new file mode 100644 index 00000000..738b48be --- /dev/null +++ b/doc/html/qlcdnumber-members.html @@ -0,0 +1,374 @@ + + + + + +TQLCDNumber Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQLCDNumber

+ +

This is the complete list of member functions for +TQLCDNumber, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlcdnumber.html b/doc/html/qlcdnumber.html new file mode 100644 index 00000000..9776df44 --- /dev/null +++ b/doc/html/qlcdnumber.html @@ -0,0 +1,332 @@ + + + + + +TQLCDNumber Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQLCDNumber Class Reference

+ +

The TQLCDNumber widget displays a number with LCD-like digits. +More... +

#include <qlcdnumber.h> +

Inherits TQFrame. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • int intValue - the displayed value rounded to the nearest integer
  • +
  • Mode mode - the current display mode (number base)
  • +
  • int numDigits - the current number of digits displayed
  • +
  • SegmentStyle segmentStyle - the style of the LCDNumber
  • +
  • bool smallDecimalPoint - the style of the decimal point
  • +
  • double value - the displayed value
  • +
+

Protected Members

+ +

Detailed Description

+ + +

The TQLCDNumber widget displays a number with LCD-like digits. +

+ +

It can display a number in just about any size. It can display +decimal, hexadecimal, octal or binary numbers. It is easy to +connect to data sources using the display() slot, which is +overloaded to take any of five argument types. +

There are also slots to change the base with setMode() and the +decimal point with setSmallDecimalPoint(). +

TQLCDNumber emits the overflow() signal when it is asked to display +something beyond its range. The range is set by setNumDigits(), +but setSmallDecimalPoint() also influences it. If the display is +set to hexadecimal, octal or binary, the integer equivalent of the +value is displayed. +

These digits and other symbols can be shown: 0/O, 1, 2, 3, 4, 5/S, +6, 7, 8, 9/g, minus, decimal point, A, B, C, D, E, F, h, H, L, o, +P, r, u, U, Y, colon, degree sign (which is specified as single +quote in the string) and space. TQLCDNumber substitutes spaces for +illegal characters. +

It is not possible to retrieve the contents of a TQLCDNumber +object, although you can retrieve the numeric value with value(). +If you really need the text, we recommend that you connect the +signals that feed the display() slot to another slot as well and +store the value there. +

Incidentally, TQLCDNumber is the very oldest part of TQt, tracing +back to a BASIC program on the Sinclair Spectrum. +

+

See also TQLabel, TQFrame, and Basic Widgets. + +


Member Type Documentation

+

TQLCDNumber::Mode

+ +

This type determines how numbers are shown. +

    +
  • TQLCDNumber::Hex - Hexadecimal +
  • TQLCDNumber::Dec - Decimal +
  • TQLCDNumber::Oct - Octal +
  • TQLCDNumber::Bin - Binary +

If the display is set to hexadecimal, octal or binary, the integer +equivalent of the value is displayed. + +

TQLCDNumber::SegmentStyle

+ +

This type determines the visual appearance of the TQLCDNumber +widget. +

    +
  • TQLCDNumber::Outline - gives raised segments filled with the background brush. +
  • TQLCDNumber::Filled - gives raised segments filled with the foreground brush. +
  • TQLCDNumber::Flat - gives flat segments filled with the foreground brush. +
+

Member Function Documentation

+

TQLCDNumber::TQLCDNumber ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs an LCD number, sets the number of digits to 5, the base +to decimal, the decimal point mode to 'small' and the frame style +to a raised box. The segmentStyle() is set to Outline. +

The parent and name arguments are passed to the TQFrame +constructor. +

See also numDigits and smallDecimalPoint. + +

TQLCDNumber::TQLCDNumber ( uint numDigits, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs an LCD number, sets the number of digits to numDigits, the base to decimal, the decimal point mode to 'small' +and the frame style to a raised box. The segmentStyle() is set to +Outline. +

The parent and name arguments are passed to the TQFrame +constructor. +

See also numDigits and smallDecimalPoint. + +

TQLCDNumber::~TQLCDNumber () +

+Destroys the LCD number. + +

bool TQLCDNumber::checkOverflow ( double num ) const +

+Returns TRUE if num is too big to be displayed in its entirety; +otherwise returns FALSE. +

See also display(), numDigits, and smallDecimalPoint. + +

bool TQLCDNumber::checkOverflow ( int num ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if num is too big to be displayed in its entirety; +otherwise returns FALSE. +

See also display(), numDigits, and smallDecimalPoint. + +

void TQLCDNumber::display ( const TQString & s ) [slot] +

+Displays the number represented by the string s. +

This version of the function disregards mode() and +smallDecimalPoint(). +

These digits and other symbols can be shown: 0/O, 1, 2, 3, 4, 5/S, +6, 7, 8, 9/g, minus, decimal point, A, B, C, D, E, F, h, H, L, o, +P, r, u, U, Y, colon, degree sign (which is specified as single +quote in the string) and space. TQLCDNumber substitutes spaces for +illegal characters. + +

Examples: rangecontrols/rangecontrols.cpp, t12/lcdrange.cpp, t13/gamebrd.cpp, t5/main.cpp, t6/main.cpp, t7/lcdrange.cpp, and xform/xform.cpp. +

void TQLCDNumber::display ( int num ) [slot] +

Sets the displayed value rounded to the nearest integer to num. +See the "intValue" property for details. +

void TQLCDNumber::display ( double num ) [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Displays the number num. + +

void TQLCDNumber::drawContents ( TQPainter * p ) [virtual protected] +

+Draws the LCD number using painter p. This function is called +from TQFrame::paintEvent(). + +

Reimplemented from TQFrame. +

int TQLCDNumber::intValue () const +

Returns the displayed value rounded to the nearest integer. +See the "intValue" property for details. +

Mode TQLCDNumber::mode () const +

Returns the current display mode (number base). +See the "mode" property for details. +

int TQLCDNumber::numDigits () const +

Returns the current number of digits displayed. +See the "numDigits" property for details. +

void TQLCDNumber::overflow () [signal] +

+ +

This signal is emitted whenever the TQLCDNumber is asked to display +a too-large number or a too-long string. +

It is never emitted by setNumDigits(). + +

SegmentStyle TQLCDNumber::segmentStyle () const +

Returns the style of the LCDNumber. +See the "segmentStyle" property for details. +

void TQLCDNumber::setBinMode () [virtual slot] +

+Calls setMode( BIN ). Provided for convenience (e.g. for +connecting buttons to it). +

See also mode, setHexMode(), setDecMode(), setOctMode(), and mode. + +

void TQLCDNumber::setDecMode () [virtual slot] +

+Calls setMode( DEC ). Provided for convenience (e.g. for +connecting buttons to it). +

See also mode, setHexMode(), setOctMode(), setBinMode(), and mode. + +

void TQLCDNumber::setHexMode () [virtual slot] +

+Calls setMode( HEX ). Provided for convenience (e.g. for +connecting buttons to it). +

See also mode, setDecMode(), setOctMode(), setBinMode(), and mode. + +

void TQLCDNumber::setMode ( Mode ) [virtual] +

Sets the current display mode (number base). +See the "mode" property for details. +

void TQLCDNumber::setNumDigits ( int nDigits ) [virtual] +

Sets the current number of digits displayed to nDigits. +See the "numDigits" property for details. +

void TQLCDNumber::setOctMode () [virtual slot] +

+Calls setMode( OCT ). Provided for convenience (e.g. for +connecting buttons to it). +

See also mode, setHexMode(), setDecMode(), setBinMode(), and mode. + +

void TQLCDNumber::setSegmentStyle ( SegmentStyle ) [virtual] +

Sets the style of the LCDNumber. +See the "segmentStyle" property for details. +

void TQLCDNumber::setSmallDecimalPoint ( bool ) [virtual slot] +

Sets the style of the decimal point. +See the "smallDecimalPoint" property for details. +

bool TQLCDNumber::smallDecimalPoint () const +

Returns the style of the decimal point. +See the "smallDecimalPoint" property for details. +

double TQLCDNumber::value () const +

Returns the displayed value. +See the "value" property for details. +


Property Documentation

+

int intValue

+

This property holds the displayed value rounded to the nearest integer. +

This property corresponds to the nearest integer to the current +value displayed by the LCDNumber. This is the value used for +hexadecimal, octal and binary modes. +

If the displayed value is not a number, the property has a value +of 0. + +

Set this property's value with display() and get this property's value with intValue(). +

Mode mode

+

This property holds the current display mode (number base). +

Corresponds to the current display mode, which is one of BIN, +OCT, DEC (the default) and HEX. DEC mode can display +floating point values, the other modes display the integer +equivalent. +

See also smallDecimalPoint, setHexMode(), setDecMode(), setOctMode(), and setBinMode(). + +

Set this property's value with setMode() and get this property's value with mode(). +

int numDigits

+

This property holds the current number of digits displayed. +

Corresponds to the current number of digits. If TQLCDNumber::smallDecimalPoint is FALSE, the decimal point occupies +one digit position. +

See also smallDecimalPoint. + +

Set this property's value with setNumDigits() and get this property's value with numDigits(). +

SegmentStyle segmentStyle

+

This property holds the style of the LCDNumber. +

+
Style Result +
Outline +Produces raised segments filled with the background color +(this is the default). +
Filled +Produces raised segments filled with the foreground color. +
Flat +Produces flat segments filled with the foreground color. +
+

Outline and Filled will additionally use +TQColorGroup::light() and TQColorGroup::dark() for shadow effects. + +

Set this property's value with setSegmentStyle() and get this property's value with segmentStyle(). +

bool smallDecimalPoint

+

This property holds the style of the decimal point. +

If TRUE the decimal point is drawn between two digit positions. +Otherwise it occupies a digit position of its own, i.e. is drawn +in a digit position. The default is FALSE. +

The inter-digit space is made slightly wider when the decimal +point is drawn between the digits. +

See also mode. + +

Set this property's value with setSmallDecimalPoint() and get this property's value with smallDecimalPoint(). +

double value

+

This property holds the displayed value. +

This property corresponds to the current value displayed by the +LCDNumber. +

If the displayed value is not a number, the property has a value +of 0. + +

Set this property's value with display() and get this property's value with value(). + +


+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/qlibrary-h.html b/doc/html/qlibrary-h.html new file mode 100644 index 00000000..c85c12c3 --- /dev/null +++ b/doc/html/qlibrary-h.html @@ -0,0 +1,131 @@ + + + + + +qlibrary.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qlibrary.h

+ +

This is the verbatim text of the qlibrary.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qlibrary.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQLibrary class
+**
+** Created : 000101
+**
+** Copyright (C) 2000-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 retquirements 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 TQLIBRARY_H
+#define TQLIBRARY_H
+
+#ifndef QT_H
+#include "qstring.h"
+#endif // QT_H
+
+#ifndef QT_NO_LIBRARY
+
+class TQLibraryPrivate;
+
+class Q_EXPORT TQLibrary
+{
+public:
+    TQLibrary( const TQString& filename );
+    virtual ~TQLibrary();
+
+    void *resolve( const char* );
+    static void *resolve( const TQString &filename, const char * );
+
+    bool load();
+    virtual bool unload();
+    bool isLoaded() const;
+
+    bool autoUnload() const;
+    void setAutoUnload( bool enable );
+
+    TQString library() const;
+
+private:
+    TQLibraryPrivate *d;
+
+    TQString libfile;
+    uint aunload : 1;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQLibrary( const TQLibrary & );
+    TQLibrary &operator=( const TQLibrary & );
+#endif
+};
+
+#define Q_DEFINED_QLIBRARY
+#include "qwinexport.h"
+#endif //QT_NO_LIBRARY
+#endif //TQLIBRARY_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlibrary-members.html b/doc/html/qlibrary-members.html new file mode 100644 index 00000000..a62a721e --- /dev/null +++ b/doc/html/qlibrary-members.html @@ -0,0 +1,55 @@ + + + + + +TQLibrary Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQLibrary

+ +

This is the complete list of member functions for +TQLibrary, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlibrary.html b/doc/html/qlibrary.html new file mode 100644 index 00000000..be75bd85 --- /dev/null +++ b/doc/html/qlibrary.html @@ -0,0 +1,290 @@ + + + + + +TQLibrary Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQLibrary Class Reference

+ +

The TQLibrary class provides a wrapper for handling shared libraries. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qlibrary.h> +

List of all member functions. +

Public Members

+ +

Static Public Members

+
    +
  • void * resolve ( const TQString & filename, const char * symb )
  • +
+

Detailed Description

+ + + +The TQLibrary class provides a wrapper for handling shared libraries. +

+ +

An instance of a TQLibrary object can handle a single shared +library and provide access to the functionality in the library in +a platform independent way. If the library is a component server, +TQLibrary provides access to the exported component and can +directly query this component for interfaces. +

TQLibrary ensures that the shared library is loaded and stays in +memory whilst it is in use. TQLibrary can also unload the library +on destruction and release unused resources. +

A typical use of TQLibrary is to resolve an exported symbol in a +shared object, and to call the function that this symbol +represents. This is called "explicit linking" in contrast to +"implicit linking", which is done by the link step in the build +process when linking an executable against a library. +

The following code snippet loads a library, resolves the symbol +"mysymbol", and calls the function if everything succeeded. If +something went wrong, e.g. the library file does not exist or the +symbol is not defined, the function pointer will be 0 and won't be +called. When the TQLibrary object is destroyed the library will be +unloaded, making all references to memory allocated in the library +invalid. +

+    typedef void (*MyPrototype)();
+    MyPrototype myFunction;
+
+    TQLibrary myLib( "mylib" );
+    myFunction = (MyPrototype) myLib.resolve( "mysymbol" );
+    if ( myFunction ) {
+        myFunction();
+    }
+    
+ +

See also Plugins. + +


Member Function Documentation

+

TQLibrary::TQLibrary ( const TQString & filename ) +

+Creates a TQLibrary object for the shared library filename. The +library will be unloaded in the destructor. +

Note that filename does not need to include the (platform specific) +file extension, so calling +

+    TQLibrary lib( "mylib" );
+    
+ +is equivalent to calling +
+    TQLibrary lib( "mylib.dll" );
+    
+ +on Windows, and +
+    TQLibrary lib( "libmylib.so" );
+    
+ +on Unix. Specifying the extension is not recommended, since +doing so introduces a platform dependency. +

If filename does not include a path, the library loader will +look for the file in the platform specific search paths. +

See also load(), unload(), and setAutoUnload(). + +

TQLibrary::~TQLibrary () [virtual] +

+Deletes the TQLibrary object. +

The library will be unloaded if autoUnload() is TRUE (the +default), otherwise it stays in memory until the application +exits. +

See also unload() and setAutoUnload(). + +

bool TQLibrary::autoUnload () const +

+Returns TRUE if the library will be automatically unloaded when +this wrapper object is destructed; otherwise returns FALSE. The +default is TRUE. +

See also setAutoUnload(). + +

bool TQLibrary::isLoaded () const +

+Returns TRUE if the library is loaded; otherwise returns FALSE. +

See also unload(). + +

TQString TQLibrary::library () const +

+Returns the filename of the shared library this TQLibrary object +handles, including the platform specific file extension. +

For example: +

+    TQLibrary lib( "mylib" );
+    TQString str = lib.library();
+    
+ +will set str to "mylib.dll" on Windows, and "libmylib.so" on Linux. + +

bool TQLibrary::load () +

+Loads the library. Since resolve() always calls this function +before resolving any symbols it is not necessary to call it +explicitly. In some situations you might want the library loaded +in advance, in which case you would use this function. +

On Darwin and Mac OS X this function uses code from dlcompat, part of the +OpenDarwin project. +

+

Copyright (c) 2002 Jorge Acereda and Peter O'Gorman +

Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: +

The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. +

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +

void * TQLibrary::resolve ( const char * symb ) +

+Returns the address of the exported symbol symb. The library is +loaded if necessary. The function returns 0 if the symbol could +not be resolved or the library could not be loaded. +

+    typedef int (*avgProc)( int, int );
+
+    avgProc avg = (avgProc) library->resolve( "avg" );
+    if ( avg )
+        return avg( 5, 8 );
+    else
+        return -1;
+    
+ +

The symbol must be exported as a C-function from the library. This +retquires the extern "C" notation if the library is compiled +with a C++ compiler. On Windows you also have to explicitly export +the function from the DLL using the __declspec(dllexport) +compiler directive. +

+    extern "C" MY_EXPORT_MACRO int avg(int a, int b)
+    {
+        return (a + b) / 2;
+    }
+    
+ +

with MY_EXPORT defined as +

+    #ifdef Q_WS_WIN
+    # define MY_EXPORT __declspec(dllexport)
+    #else
+    # define MY_EXPORT
+    #endif
+    
+ +

On Darwin and Mac OS X this function uses code from dlcompat, part of the +OpenDarwin project. +

+

Copyright (c) 2002 Jorge Acereda and Peter O'Gorman +

Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: +

The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. +

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +

void * TQLibrary::resolve ( const TQString & filename, const char * symb ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Loads the library filename and returns the address of the +exported symbol symb. Note that like the constructor, filename does not need to include the (platform specific) file +extension. The library remains loaded until the process exits. +

The function returns 0 if the symbol could not be resolved or the +library could not be loaded. +

This function is useful only if you want to resolve a single +symbol, e.g. a function pointer from a specific library once: +

+    typedef void (*FunctionType)();
+    static FunctionType *ptrFunction = 0;
+    static bool triedResolve = FALSE;
+    if ( !ptrFunction && !triedResolve )
+        ptrFunction = TQLibrary::resolve( "mylib", "mysymb" );
+
+    if ( ptrFunction )
+        ptrFunction();
+    else
+        ...
+    
+ +

If you want to resolve multiple symbols, use a TQLibrary object and +call the non-static version of resolve(). +

See also +

void TQLibrary::setAutoUnload ( bool enabled ) +

+If enabled is TRUE (the default), the wrapper object is set to +automatically unload the library upon destruction. If enabled +is FALSE, the wrapper object is not unloaded unless you explicitly +call unload(). +

See also autoUnload(). + +

bool TQLibrary::unload () [virtual] +

+Unloads the library and returns TRUE if the library could be +unloaded; otherwise returns FALSE. +

This function is called by the destructor if autoUnload() is +enabled. +

See also resolve(). + + +


+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/qlined-m.png b/doc/html/qlined-m.png new file mode 100644 index 00000000..3a70a4eb Binary files /dev/null and b/doc/html/qlined-m.png differ diff --git a/doc/html/qlined-w.png b/doc/html/qlined-w.png new file mode 100644 index 00000000..d622370f Binary files /dev/null and b/doc/html/qlined-w.png differ diff --git a/doc/html/qlineedit-h.html b/doc/html/qlineedit-h.html new file mode 100644 index 00000000..fe6743c9 --- /dev/null +++ b/doc/html/qlineedit-h.html @@ -0,0 +1,276 @@ + + + + + +qlineedit.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qlineedit.h

+ +

This is the verbatim text of the qlineedit.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/**********************************************************************
+** $Id: qt/qlineedit.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQLineEdit widget class
+**
+** Created : 941011
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQLINEEDIT_H
+#define TQLINEEDIT_H
+
+struct TQLineEditPrivate;
+
+class TQValidator;
+class TQPopupMenu;
+
+#ifndef QT_H
+#include "qframe.h"
+#include "qstring.h"
+#endif // QT_H
+
+#ifndef QT_NO_LINEEDIT
+
+class TQTextParagraph;
+class TQTextCursor;
+
+class Q_EXPORT TQLineEdit : public TQFrame
+{
+    Q_OBJECT
+    Q_ENUMS( EchoMode )
+    Q_PROPERTY( TQString text READ text WRITE setText )
+    Q_PROPERTY( int maxLength READ maxLength WRITE setMaxLength )
+    Q_PROPERTY( bool frame READ frame WRITE setFrame )
+    Q_PROPERTY( EchoMode echoMode READ echoMode WRITE setEchoMode )
+    Q_PROPERTY( TQString displayText READ displayText )
+    Q_PROPERTY( int cursorPosition READ cursorPosition WRITE setCursorPosition )
+    Q_PROPERTY( Alignment alignment READ alignment WRITE setAlignment )
+    Q_PROPERTY( bool edited READ edited WRITE setEdited DESIGNABLE false )
+    Q_PROPERTY( bool modified READ isModified )
+    Q_PROPERTY( bool hasMarkedText READ hasMarkedText DESIGNABLE false )
+    Q_PROPERTY( bool hasSelectedText READ hasSelectedText )
+    Q_PROPERTY( TQString markedText READ markedText DESIGNABLE false )
+    Q_PROPERTY( TQString selectedText READ selectedText )
+    Q_PROPERTY( bool dragEnabled READ dragEnabled WRITE setDragEnabled )
+    Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
+    Q_PROPERTY( bool undoAvailable READ isUndoAvailable )
+    Q_PROPERTY( bool redoAvailable READ isRedoAvailable )
+    Q_PROPERTY( TQString inputMask READ inputMask WRITE setInputMask )
+    Q_PROPERTY( bool acceptableInput READ hasAcceptableInput )
+
+public:
+    TQLineEdit( TQWidget* parent, const char* name=0 );
+    TQLineEdit( const TQString &, TQWidget* parent, const char* name=0 );
+    TQLineEdit( const TQString &, const TQString &, TQWidget* parent, const char* name=0 );
+    ~TQLineEdit();
+
+    TQString text() const;
+
+    TQString displayText() const;
+
+    int maxLength() const;
+
+    bool frame() const;
+
+    enum EchoMode { Normal, NoEcho, Password };
+    EchoMode echoMode() const;
+
+    bool isReadOnly() const;
+
+    const TQValidator * validator() const;
+
+    TQSize sizeHint() const;
+    TQSize minimumSizeHint() const;
+
+    int cursorPosition() const;
+    bool validateAndSet( const TQString &, int, int, int ); // obsolete
+
+    int alignment() const;
+
+#ifndef QT_NO_COMPAT
+    void cursorLeft( bool mark, int steps = 1 ) { cursorForward( mark, -steps ); }
+    void cursorRight( bool mark, int steps = 1 ) { cursorForward( mark, steps ); }
+#endif
+    void cursorForward( bool mark, int steps = 1 );
+    void cursorBackward( bool mark, int steps = 1 );
+    void cursorWordForward( bool mark );
+    void cursorWordBackward( bool mark );
+    void backspace();
+    void del();
+    void home( bool mark );
+    void end( bool mark );
+
+    bool isModified() const;
+    void clearModified();
+
+    bool edited() const; // obsolete, use isModified()
+    void setEdited( bool ); // obsolete, use clearModified()
+
+    bool hasSelectedText() const;
+    TQString selectedText() const;
+    int selectionStart() const;
+
+    bool isUndoAvailable() const;
+    bool isRedoAvailable() const;
+
+#ifndef QT_NO_COMPAT
+    bool hasMarkedText() const { return hasSelectedText(); }
+    TQString markedText() const { return selectedText(); }
+#endif
+
+    bool dragEnabled() const;
+
+    TQString inputMask() const;
+    void setInputMask( const TQString &inputMask );
+    bool hasAcceptableInput() const;
+
+public slots:
+    virtual void setText( const TQString &);
+    virtual void selectAll();
+    virtual void deselect();
+    virtual void clearValidator();
+    virtual void insert( const TQString &);
+    virtual void clear();
+    virtual void undo();
+    virtual void redo();
+    virtual void setMaxLength( int );
+    virtual void setFrame( bool );
+    virtual void setEchoMode( EchoMode );
+    virtual void setReadOnly( bool );
+    virtual void setValidator( const TQValidator * );
+    virtual void setFont( const TQFont & );
+    virtual void setPalette( const TQPalette & );
+    virtual void setSelection( int, int );
+    virtual void setCursorPosition( int );
+    virtual void setAlignment( int flag );
+#ifndef QT_NO_CLIPBOARD
+    virtual void cut();
+    virtual void copy() const;
+    virtual void paste();
+#endif
+    virtual void setDragEnabled( bool b );
+
+signals:
+    void textChanged( const TQString &);
+    void returnPressed();
+    void lostFocus();
+    void selectionChanged();
+
+protected:
+    bool event( TQEvent * );
+    void mousePressEvent( TQMouseEvent * );
+    void mouseMoveEvent( TQMouseEvent * );
+    void mouseReleaseEvent( TQMouseEvent * );
+    void mouseDoubleClickEvent( TQMouseEvent * );
+    void keyPressEvent( TQKeyEvent * );
+    void imStartEvent( TQIMEvent * );
+    void imComposeEvent( TQIMEvent * );
+    void imEndEvent( TQIMEvent * );
+    void focusInEvent( TQFocusEvent * );
+    void focusOutEvent( TQFocusEvent * );
+    void resizeEvent( TQResizeEvent * );
+    void drawContents( TQPainter * );
+#ifndef QT_NO_DRAGANDDROP
+    void dragEnterEvent( TQDragEnterEvent * );
+    void dragMoveEvent( TQDragMoveEvent *e );
+    void dragLeaveEvent( TQDragLeaveEvent *e );
+    void dropEvent( TQDropEvent * );
+#endif
+    void contextMenuEvent( TQContextMenuEvent * );
+    virtual TQPopupMenu *createPopupMenu();
+    void windowActivationChange( bool );
+#ifndef QT_NO_COMPAT
+    void repaintArea( int, int ) { update(); }
+#endif
+
+private slots:
+    void clipboardChanged();
+
+public:
+    void setPasswordChar( TQChar c ); // internal obsolete
+    TQChar passwordChar() const; // obsolete internal
+    int characterAt( int, TQChar* ) const; // obsolete
+    bool getSelection( int *, int * ); // obsolete
+
+private:
+    friend struct TQLineEditPrivate;
+    TQLineEditPrivate * d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQLineEdit( const TQLineEdit & );
+    TQLineEdit &operator=( const TQLineEdit & );
+#endif
+};
+
+
+#endif // QT_NO_LINEEDIT
+
+#endif // TQLINEEDIT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlineedit-members.html b/doc/html/qlineedit-members.html new file mode 100644 index 00000000..20662f1f --- /dev/null +++ b/doc/html/qlineedit-members.html @@ -0,0 +1,420 @@ + + + + + +TQLineEdit Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQLineEdit

+ +

This is the complete list of member functions for +TQLineEdit, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlineedit.html b/doc/html/qlineedit.html new file mode 100644 index 00000000..cb7840ed --- /dev/null +++ b/doc/html/qlineedit.html @@ -0,0 +1,773 @@ + + + + + +TQLineEdit Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQLineEdit Class Reference

+ +

The TQLineEdit widget is a one-line text editor. +More... +

#include <qlineedit.h> +

Inherits TQFrame. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • bool acceptableInput - whether the input satisfies the inputMask and the validator  (read only)
  • +
  • Alignment alignment - the alignment of the line edit
  • +
  • int cursorPosition - the current cursor position for this line edit
  • +
  • TQString displayText - the displayed text  (read only)
  • +
  • bool dragEnabled - whether the lineedit starts a drag if the user presses and moves the mouse on some selected text
  • +
  • EchoMode echoMode - the line edit's echo mode
  • +
  • bool edited - whether the line edit has been edited. Use modified instead  (obsolete)
  • +
  • bool frame - whether the line edit draws itself with a frame
  • +
  • bool hasMarkedText - whether part of the text has been selected by the user. Use hasSelectedText instead  (read only)  (obsolete)
  • +
  • bool hasSelectedText - whether there is any text selected  (read only)
  • +
  • TQString inputMask - the validation input mask
  • +
  • TQString markedText - the text selected by the user. Use selectedText instead  (read only)  (obsolete)
  • +
  • int maxLength - the maximum permitted length of the text
  • +
  • bool modified - whether the line edit's contents has been modified by the user  (read only)
  • +
  • bool readOnly - whether the line edit is read only
  • +
  • bool redoAvailable - whether redo is available  (read only)
  • +
  • TQString selectedText - the selected text  (read only)
  • +
  • TQString text - the line edit's text
  • +
  • bool undoAvailable - whether undo is available  (read only)
  • +
+

Protected Members

+
    +
  • virtual void keyPressEvent ( TQKeyEvent * e )
  • +
  • virtual TQPopupMenu * createPopupMenu ()
  • +
  • void repaintArea ( int from, int to )  (obsolete)
  • +
+

Detailed Description

+ + +The TQLineEdit widget is a one-line text editor. +

+ +

A line edit allows the user to enter and edit a single line of +plain text with a useful collection of editing functions, +including undo and redo, cut and paste, and drag and drop. +

By changing the echoMode() of a line edit, it can also be used as +a "write-only" field, for inputs such as passwords. +

The length of the text can be constrained to maxLength(). The text +can be arbitrarily constrained using a validator() or an +inputMask(), or both. +

A related class is TQTextEdit which allows multi-line, rich-text +editing. +

You can change the text with setText() or insert(). The text is +retrieved with text(); the displayed text (which may be different, +see EchoMode) is retrieved with displayText(). Text can be +selected with setSelection() or selectAll(), and the selection can +be cut(), copy()ied and paste()d. The text can be aligned with +setAlignment(). +

When the text changes the textChanged() signal is emitted; when +the Return or Enter key is pressed the returnPressed() signal is +emitted. Note that if there is a validator set on the line edit, +the returnPressed() signal will only be emitted if the validator +returns Acceptable. +

By default, TQLineEdits have a frame as specified by the Windows +and Motif style guides; you can turn it off by calling +setFrame(FALSE). +

The default key bindings are described below. The line edit also +provides a context menu (usually invoked by a right mouse click) +that presents some of these editing options. + +

+
Keypress Action +
Left Arrow Moves the cursor one character to the left. +
Shift+Left Arrow Moves and selects text one character to the left. +
Right Arrow Moves the cursor one character to the right. +
Shift+Right Arrow Moves and selects text one character to the right. +
Home Moves the cursor to the beginning of the line. +
End Moves the cursor to the end of the line. +
Backspace Deletes the character to the left of the cursor. +
Ctrl+Backspace Deletes the word to the left of the cursor. +
Delete Deletes the character to the right of the cursor. +
Ctrl+Delete Deletes the word to the right of the cursor. +
Ctrl+A Moves the cursor to the beginning of the line. +
Ctrl+B Moves the cursor one character to the left. +
Ctrl+C Copies the selected text to the clipboard. +(Windows also supports Ctrl+Insert for this operation.) +
Ctrl+D Deletes the character to the right of the cursor. +
Ctrl+E Moves the cursor to the end of the line. +
Ctrl+F Moves the cursor one character to the right. +
Ctrl+H Deletes the character to the left of the cursor. +
Ctrl+K Deletes to the end of the line. +
Ctrl+V Pastes the clipboard text into line edit. +(Windows also supports Shift+Insert for this operation.) +
Ctrl+X Deletes the selected text and copies it to the clipboard. +(Windows also supports Shift+Delete for this operation.) +
Ctrl+Z Undoes the last operation. +
Ctrl+Y Redoes the last undone operation. +
+

Any other key sequence that represents a valid character, will +cause the character to be inserted into the line edit. +

+

See also TQTextEdit, TQLabel, TQComboBox, GUI Design Handbook: Field, Entry, and Basic Widgets. + +


Member Type Documentation

+

TQLineEdit::EchoMode

+ +

This enum type describes how a line edit should display its +contents. +

    +
  • TQLineEdit::Normal - Display characters as they are entered. This is the +default. +
  • TQLineEdit::NoEcho - Do not display anything. This may be appropriate +for passwords where even the length of the +password should be kept secret. +
  • TQLineEdit::Password - Display asterisks instead of the characters +actually entered. +

See also echoMode and echoMode. + +


Member Function Documentation

+

TQLineEdit::TQLineEdit ( TQWidget * parent, const char * name = 0 ) +

+Constructs a line edit with no text. +

The maximum text length is set to 32767 characters. +

The parent and name arguments are sent to the TQWidget constructor. +

See also text and maxLength. + +

TQLineEdit::TQLineEdit ( const TQString & contents, TQWidget * parent, const char * name = 0 ) +

+Constructs a line edit containing the text contents. +

The cursor position is set to the end of the line and the maximum +text length to 32767 characters. +

The parent and name arguments are sent to the TQWidget +constructor. +

See also text and maxLength. + +

TQLineEdit::TQLineEdit ( const TQString & contents, const TQString & inputMask, TQWidget * parent, const char * name = 0 ) +

+Constructs a line edit with an input inputMask and the text contents. +

The cursor position is set to the end of the line and the maximum +text length is set to the length of the mask (the number of mask +characters and separators). +

The parent and name arguments are sent to the TQWidget +constructor. +

See also setMask() and text. + +

TQLineEdit::~TQLineEdit () +

+Destroys the line edit. + +

int TQLineEdit::alignment () const +

Returns the alignment of the line edit. +See the "alignment" property for details. +

void TQLineEdit::backspace () +

+If no text is selected, deletes the character to the left of the +text cursor and moves the cursor one position to the left. If any +text is selected, the cursor is moved to the beginning of the +selected text and the selected text is deleted. +

See also del(). + +

int TQLineEdit::characterAt ( int xpos, TQChar * chr ) const +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

void TQLineEdit::clear () [virtual slot] +

+Clears the contents of the line edit. + +

void TQLineEdit::clearModified () +

+Resets the modified flag to FALSE. +

See also modified. + +

void TQLineEdit::clearValidator () [virtual slot] +

+This slot is equivalent to setValidator(0). + +

void TQLineEdit::copy () const [virtual slot] +

+Copies the selected text to the clipboard, if there is any, and if +echoMode() is Normal. +

See also cut() and paste(). + +

TQPopupMenu * TQLineEdit::createPopupMenu () [virtual protected] +

+This function is called to create the popup menu which is shown +when the user clicks on the line edit with the right mouse button. +If you want to create a custom popup menu, reimplement this +function and return the popup menu you create. The popup menu's +ownership is transferred to the caller. + +

void TQLineEdit::cursorBackward ( bool mark, int steps = 1 ) +

+Moves the cursor back steps characters. If mark is TRUE each +character moved over is added to the selection; if mark is +FALSE the selection is cleared. +

See also cursorForward(). + +

void TQLineEdit::cursorForward ( bool mark, int steps = 1 ) +

+Moves the cursor forward steps characters. If mark is TRUE +each character moved over is added to the selection; if mark is +FALSE the selection is cleared. +

See also cursorBackward(). + +

void TQLineEdit::cursorLeft ( bool mark, int steps = 1 ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+For compatibilty with older applications only. Use cursorBackward() +instead. +

See also cursorBackward(). + +

int TQLineEdit::cursorPosition () const +

Returns the current cursor position for this line edit. +See the "cursorPosition" property for details. +

void TQLineEdit::cursorRight ( bool mark, int steps = 1 ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

Use cursorForward() instead. +

See also cursorForward(). + +

void TQLineEdit::cursorWordBackward ( bool mark ) +

+Moves the cursor one word backward. If mark is TRUE, the word +is also selected. +

See also cursorWordForward(). + +

void TQLineEdit::cursorWordForward ( bool mark ) +

+Moves the cursor one word forward. If mark is TRUE, the word is +also selected. +

See also cursorWordBackward(). + +

void TQLineEdit::cut () [virtual slot] +

+Copies the selected text to the clipboard and deletes it, if there +is any, and if echoMode() is Normal. +

If the current validator disallows deleting the selected text, +cut() will copy without deleting. +

See also copy(), paste(), and setValidator(). + +

void TQLineEdit::del () +

+If no text is selected, deletes the character to the right of the +text cursor. If any text is selected, the cursor is moved to the +beginning of the selected text and the selected text is deleted. +

See also backspace(). + +

void TQLineEdit::deselect () [virtual slot] +

+Deselects any selected text. +

See also setSelection() and selectAll(). + +

TQString TQLineEdit::displayText () const +

Returns the displayed text. +See the "displayText" property for details. +

bool TQLineEdit::dragEnabled () const +

Returns TRUE if the lineedit starts a drag if the user presses and moves the mouse on some selected text; otherwise returns FALSE. +See the "dragEnabled" property for details. +

EchoMode TQLineEdit::echoMode () const +

Returns the line edit's echo mode. +See the "echoMode" property for details. +

bool TQLineEdit::edited () const +

Returns TRUE if the line edit has been edited. Use modified instead; otherwise returns FALSE. +See the "edited" property for details. +

void TQLineEdit::end ( bool mark ) +

+Moves the text cursor to the end of the line unless it is already +there. If mark is TRUE, text is selected towards the last +position; otherwise, any selected text is unselected if the cursor +is moved. +

See also home(). + +

bool TQLineEdit::frame () const +

Returns TRUE if the line edit draws itself with a frame; otherwise returns FALSE. +See the "frame" property for details. +

bool TQLineEdit::getSelection ( int * start, int * end ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +use selectedText(), selectionStart() +

bool TQLineEdit::hasAcceptableInput () const +

Returns TRUE if the input satisfies the inputMask and the validator; otherwise returns FALSE. +See the "acceptableInput" property for details. +

bool TQLineEdit::hasMarkedText () const +

Returns TRUE if part of the text has been selected by the user. Use hasSelectedText instead; otherwise returns FALSE. +See the "hasMarkedText" property for details. +

bool TQLineEdit::hasSelectedText () const +

Returns TRUE if there is any text selected; otherwise returns FALSE. +See the "hasSelectedText" property for details. +

void TQLineEdit::home ( bool mark ) +

+Moves the text cursor to the beginning of the line unless it is +already there. If mark is TRUE, text is selected towards the +first position; otherwise, any selected text is unselected if the +cursor is moved. +

See also end(). + +

TQString TQLineEdit::inputMask () const +

Returns the validation input mask. +See the "inputMask" property for details. +

void TQLineEdit::insert ( const TQString & newText ) [virtual slot] +

+Deletes any selected text, inserts newText, and validates the +result. If it is valid, it sets it as the new contents of the line +edit. + +

bool TQLineEdit::isModified () const +

Returns TRUE if the line edit's contents has been modified by the user; otherwise returns FALSE. +See the "modified" property for details. +

bool TQLineEdit::isReadOnly () const +

Returns TRUE if the line edit is read only; otherwise returns FALSE. +See the "readOnly" property for details. +

bool TQLineEdit::isRedoAvailable () const +

Returns TRUE if redo is available; otherwise returns FALSE. +See the "redoAvailable" property for details. +

bool TQLineEdit::isUndoAvailable () const +

Returns TRUE if undo is available; otherwise returns FALSE. +See the "undoAvailable" property for details. +

void TQLineEdit::keyPressEvent ( TQKeyEvent * e ) [virtual protected] +

+Converts key press event e into a line edit action. +

If Return or Enter is pressed and the current text is valid (or +can be made valid by the +validator), the signal returnPressed() is emitted. +

The default key bindings are listed in the detailed + description. + +

Reimplemented from TQWidget. +

void TQLineEdit::lostFocus () [signal] +

+ +

This signal is emitted when the line edit has lost focus. +

See also focus, TQWidget::focusInEvent(), and TQWidget::focusOutEvent(). + +

TQString TQLineEdit::markedText () const +

Returns the text selected by the user. Use selectedText instead. +See the "markedText" property for details. +

int TQLineEdit::maxLength () const +

Returns the maximum permitted length of the text. +See the "maxLength" property for details. +

TQSize TQLineEdit::minimumSizeHint () const [virtual] +

+Returns a minimum size for the line edit. +

The width returned is enough for at least one character. + +

Reimplemented from TQWidget. +

void TQLineEdit::paste () [virtual slot] +

+Inserts the clipboard's text at the cursor position, deleting any +selected text, providing the line edit is not read-only. +

If the end result would not be acceptable to the current +validator, nothing happens. +

See also copy() and cut(). + +

void TQLineEdit::redo () [virtual slot] +

+Redoes the last operation if redo is available. + +

void TQLineEdit::repaintArea ( int from, int to ) [protected] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+Repaints all characters from from to to. If cursorPos is +between from and to, ensures that cursorPos is visible. + +

void TQLineEdit::returnPressed () [signal] +

+ +

This signal is emitted when the Return or Enter key is pressed. +Note that if there is a validator() or inputMask() set on the line +edit, the returnPressed() signal will only be emitted if the input +follows the inputMask() and the validator() returns Acceptable. + +

Example: popup/popup.cpp. +

void TQLineEdit::selectAll () [virtual slot] +

+Selects all the text (i.e. highlights it) and moves the cursor to +the end. This is useful when a default value has been inserted +because if the user types before clicking on the widget, the +selected text will be deleted. +

See also setSelection() and deselect(). + +

TQString TQLineEdit::selectedText () const +

Returns the selected text. +See the "selectedText" property for details. +

void TQLineEdit::selectionChanged () [signal] +

+ +

This signal is emitted whenever the selection changes. +

See also hasSelectedText and selectedText. + +

int TQLineEdit::selectionStart () const +

+selectionStart() returns the index of the first selected character in the +line edit or -1 if no text is selected. +

See also selectedText. + +

void TQLineEdit::setAlignment ( int flag ) [virtual slot] +

Sets the alignment of the line edit to flag. +See the "alignment" property for details. +

void TQLineEdit::setCursorPosition ( int ) [virtual slot] +

Sets the current cursor position for this line edit. +See the "cursorPosition" property for details. +

void TQLineEdit::setDragEnabled ( bool b ) [virtual slot] +

Sets whether the lineedit starts a drag if the user presses and moves the mouse on some selected text to b. +See the "dragEnabled" property for details. +

void TQLineEdit::setEchoMode ( EchoMode ) [virtual slot] +

Sets the line edit's echo mode. +See the "echoMode" property for details. +

void TQLineEdit::setEdited ( bool ) +

Sets whether the line edit has been edited. Use modified instead. +See the "edited" property for details. +

void TQLineEdit::setFrame ( bool ) [virtual slot] +

Sets whether the line edit draws itself with a frame. +See the "frame" property for details. +

void TQLineEdit::setInputMask ( const TQString & inputMask ) +

Sets the validation input mask to inputMask. +See the "inputMask" property for details. +

void TQLineEdit::setMaxLength ( int ) [virtual slot] +

Sets the maximum permitted length of the text. +See the "maxLength" property for details. +

void TQLineEdit::setReadOnly ( bool ) [virtual slot] +

Sets whether the line edit is read only. +See the "readOnly" property for details. +

void TQLineEdit::setSelection ( int start, int length ) [virtual slot] +

+Selects text from position start and for length characters. +

Note that this function sets the cursor's position to the end of +the selection regardless of its current position. +

See also deselect(), selectAll(), getSelection(), cursorForward(), and cursorBackward(). + +

void TQLineEdit::setText ( const TQString & ) [virtual slot] +

Sets the line edit's text. +See the "text" property for details. +

void TQLineEdit::setValidator ( const TQValidator * v ) [virtual slot] +

+Sets this line edit to only accept input that the validator, v, +will accept. This allows you to place any arbitrary constraints on +the text which may be entered. +

If v == 0, setValidator() removes the current input validator. +The initial setting is to have no input validator (i.e. any input +is accepted up to maxLength()). +

See also validator(), TQIntValidator, TQDoubleValidator, and TQRegExpValidator. + +

Examples: lineedits/lineedits.cpp and wizard/wizard.cpp. +

TQSize TQLineEdit::sizeHint () const [virtual] +

+Returns a recommended size for the widget. +

The width returned, in pixels, is usually enough for about 15 to +20 characters. + +

Example: addressbook/centralwidget.cpp. +

TQString TQLineEdit::text () const +

Returns the line edit's text. +See the "text" property for details. +

void TQLineEdit::textChanged ( const TQString & ) [signal] +

+ +

This signal is emitted whenever the text changes. The argument is +the new text. + +

Examples: simple/main.cpp, wizard/wizard.cpp, and xform/xform.cpp. +

void TQLineEdit::undo () [virtual slot] +

+Undoes the last operation if undo is available. Deselects any current +selection, and updates the selection start to the current cursor +position. + +

bool TQLineEdit::validateAndSet ( const TQString & newText, int newPos, int newMarkAnchor, int newMarkDrag ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +Use setText(), setCursorPosition() and setSelection() instead. + +

const TQValidator * TQLineEdit::validator () const +

+Returns a pointer to the current input validator, or 0 if no +validator has been set. +

See also setValidator(). + +

Example: wizard/wizard.cpp. +


Property Documentation

+

bool acceptableInput

+

This property holds whether the input satisfies the inputMask and the validator. +

Get this property's value with hasAcceptableInput(). +

See also inputMask and setValidator(). + +

Alignment alignment

+

This property holds the alignment of the line edit. +

Possible Values are TQt::AlignAuto, TQt::AlignLeft, TQt::AlignRight and TQt::AlignHCenter. +

Attempting to set the alignment to an illegal flag combination +does nothing. +

See also TQt::AlignmentFlags. + +

Set this property's value with setAlignment() and get this property's value with alignment(). +

int cursorPosition

+

This property holds the current cursor position for this line edit. +

Setting the cursor position causes a repaint when appropriate. + +

Set this property's value with setCursorPosition() and get this property's value with cursorPosition(). +

TQString displayText

+

This property holds the displayed text. +

If EchoMode is Normal this returns the same as text(); if +EchoMode is Password it returns a string of asterisks +text().length() characters long, e.g. "******"; if EchoMode is +NoEcho returns an empty string, "". +

See also echoMode, text, and EchoMode. + +

Get this property's value with displayText(). +

bool dragEnabled

+

This property holds whether the lineedit starts a drag if the user presses and moves the mouse on some selected text. +

+

Set this property's value with setDragEnabled() and get this property's value with dragEnabled(). +

EchoMode echoMode

+

This property holds the line edit's echo mode. +

The initial setting is Normal, but TQLineEdit also supports NoEcho and Password modes. +

The widget's display and the ability to copy or drag the text is +affected by this setting. +

See also EchoMode and displayText. + +

Set this property's value with setEchoMode() and get this property's value with echoMode(). +

bool edited

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This property holds whether the line edit has been edited. Use modified instead. +

+

Set this property's value with setEdited() and get this property's value with edited(). +

bool frame

+

This property holds whether the line edit draws itself with a frame. +

If enabled (the default) the line edit draws itself inside a +two-pixel frame, otherwise the line edit draws itself without any +frame. + +

Set this property's value with setFrame() and get this property's value with frame(). +

bool hasMarkedText

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This property holds whether part of the text has been selected by the user. Use hasSelectedText instead. +

+

Get this property's value with hasMarkedText(). +

bool hasSelectedText

+

This property holds whether there is any text selected. +

hasSelectedText() returns TRUE if some or all of the text has been +selected by the user; otherwise returns FALSE. +

See also selectedText. + +

Get this property's value with hasSelectedText(). +

TQString inputMask

+

This property holds the validation input mask. +

If no mask is set, inputMask() returns TQString::null. +

Sets the TQLineEdit's validation mask. Validators can be used +instead of, or in conjunction with masks; see setValidator(). +

Unset the mask and return to normal TQLineEdit operation by passing +an empty string ("") or just calling setInputMask() with no +arguments. +

The mask format understands these mask characters: +

+
Character Meaning +
A ASCII alphabetic character retquired. A-Z, a-z. +
a ASCII alphabetic character permitted but not retquired. +
N ASCII alphanumeric character retquired. A-Z, a-z, 0-9. +
n ASCII alphanumeric character permitted but not retquired. +
X Any character retquired. +
x Any character permitted but not retquired. +
9 ASCII digit retquired. 0-9. +
0 ASCII digit permitted but not retquired. +
D ASCII digit retquired. 1-9. +
d ASCII digit permitted but not retquired (1-9). +
# ASCII digit or plus/minus sign permitted but not retquired. +
> All following alphabetic characters are uppercased. +
< All following alphabetic characters are lowercased. +
! Switch off case conversion. +
\ Use \ to escape the special +characters listed above to use them as +separators. +
+

The mask consists of a string of mask characters and separators, +optionally followed by a semi-colon and the character used for +blanks: the blank characters are always removed from the text +after editing. The default blank character is space. +

Examples: +

+
Mask Notes +
000.000.000.000;_ IP address; blanks are _. +
0000-00-00 ISO Date; blanks are space +
>AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;# License number; +blanks are - and all (alphabetic) characters are converted to +uppercase. +
+

To get range control (e.g. for an IP address) use masks together +with validators. +

See also maxLength. + +

Set this property's value with setInputMask() and get this property's value with inputMask(). +

TQString markedText

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This property holds the text selected by the user. Use selectedText instead. +

+

Get this property's value with markedText(). +

int maxLength

+

This property holds the maximum permitted length of the text. +

If the text is too long, it is truncated at the limit. +

If truncation occurs any selected text will be unselected, the +cursor position is set to 0 and the first part of the string is +shown. +

If the line edit has an input mask, the mask defines the maximum +string length. +

See also inputMask. + +

Set this property's value with setMaxLength() and get this property's value with maxLength(). +

bool modified

+

This property holds whether the line edit's contents has been modified by the user. +

The modified flag is never read by TQLineEdit; it has a default value +of FALSE and is changed to TRUE whenever the user changes the line +edit's contents. +

This is useful for things that need to provide a default value but +do not start out knowing what the default should be (perhaps it +depends on other fields on the form). Start the line edit without +the best default, and when the default is known, if modified() +returns FALSE (the user hasn't entered any text), insert the +default value. +

Calling clearModified() or setText() resets the modified flag to +FALSE. + +

Get this property's value with isModified(). +

bool readOnly

+

This property holds whether the line edit is read only. +

In read-only mode, the user can still copy the text to the +clipboard or drag-and-drop the text (if echoMode() is Normal), +but cannot edit it. +

TQLineEdit does not show a cursor in read-only mode. +

See also enabled. + +

Set this property's value with setReadOnly() and get this property's value with isReadOnly(). +

bool redoAvailable

+

This property holds whether redo is available. +

+

Get this property's value with isRedoAvailable(). +

TQString selectedText

+

This property holds the selected text. +

If there is no selected text this property's value is +TQString::null. +

See also hasSelectedText. + +

Get this property's value with selectedText(). +

TQString text

+

This property holds the line edit's text. +

Note that setting this property clears the selection, clears the +undo/redo history, moves the cursor to the end of the line and +resets the modified property to FALSE. The text is not +validated when inserted with setText(). +

The text is truncated to maxLength() length. +

See also insert(). + +

Set this property's value with setText() and get this property's value with text(). +

bool undoAvailable

+

This property holds whether undo is available. +

+

Get this property's value with isUndoAvailable(). + +


+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/qlist.html b/doc/html/qlist.html new file mode 100644 index 00000000..4ea5c3e2 --- /dev/null +++ b/doc/html/qlist.html @@ -0,0 +1,47 @@ + + + + + +TQList Class Reference (obsolete) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQList Class Reference (obsolete)

+ + +

+#include <qlist.h>
+ +

The TQList class has been renamed TQPtrList in TQt 3.0. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlistbox-h.html b/doc/html/qlistbox-h.html new file mode 100644 index 00000000..744d273f --- /dev/null +++ b/doc/html/qlistbox-h.html @@ -0,0 +1,480 @@ + + + + + +qlistbox.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qlistbox.h

+ +

This is the verbatim text of the qlistbox.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/**********************************************************************
+** $Id: qt/qlistbox.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQListBox widget class
+**
+** Created : 941121
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQLISTBOX_H
+#define TQLISTBOX_H
+
+#ifndef QT_H
+#include "qscrollview.h"
+#include "qpixmap.h"
+#endif // QT_H
+
+#ifndef QT_NO_LISTBOX
+
+
+class TQListBoxPrivate;
+class TQListBoxItem;
+class TQString;
+class TQStrList;
+class TQStringList;
+
+
+class Q_EXPORT TQListBox : public TQScrollView
+{
+    friend class TQListBoxItem;
+    friend class TQListBoxPrivate;
+
+    Q_OBJECT
+    Q_ENUMS( SelectionMode LayoutMode )
+    Q_PROPERTY( uint count READ count )
+    Q_PROPERTY( int numItemsVisible READ numItemsVisible )
+    Q_PROPERTY( int currentItem READ currentItem WRITE setCurrentItem )
+    Q_PROPERTY( TQString currentText READ currentText )
+    Q_PROPERTY( int topItem READ topItem WRITE setTopItem DESIGNABLE false )
+    Q_PROPERTY( SelectionMode selectionMode READ selectionMode WRITE setSelectionMode )
+    Q_PROPERTY( bool multiSelection READ isMultiSelection WRITE setMultiSelection DESIGNABLE false )
+    Q_PROPERTY( LayoutMode columnMode READ columnMode WRITE setColumnMode )
+    Q_PROPERTY( LayoutMode rowMode READ rowMode WRITE setRowMode )
+    Q_PROPERTY( int numColumns READ numColumns )
+    Q_PROPERTY( int numRows READ numRows )
+    Q_PROPERTY( bool variableWidth READ variableWidth WRITE setVariableWidth )
+    Q_PROPERTY( bool variableHeight READ variableHeight WRITE setVariableHeight )
+
+public:
+    TQListBox( TQWidget* parent=0, const char* name=0, WFlags f=0  );
+    ~TQListBox();
+
+    virtual void setFont( const TQFont & );
+
+    uint count() const;
+
+    void insertStringList( const TQStringList&, int index=-1 );
+    void insertStrList( const TQStrList *, int index=-1 );
+    void insertStrList( const TQStrList &, int index=-1 );
+    void insertStrList( const char **,
+			int numStrings=-1, int index=-1 );
+
+    void insertItem( const TQListBoxItem *, int index=-1 );
+    void insertItem( const TQListBoxItem *, const TQListBoxItem *after );
+    void insertItem( const TQString &text, int index=-1 );
+    void insertItem( const TQPixmap &pixmap, int index=-1 );
+    void insertItem( const TQPixmap &pixmap, const TQString &text, int index=-1 );
+
+    void removeItem( int index );
+
+    TQString text( int index )	const;
+    const TQPixmap *pixmap( int index )	const;
+
+    void changeItem( const TQListBoxItem *, int index );
+    void changeItem( const TQString &text, int index );
+    void changeItem( const TQPixmap &pixmap, int index );
+    void changeItem( const TQPixmap &pixmap, const TQString &text, int index );
+
+    void takeItem( const TQListBoxItem * );
+
+    int numItemsVisible() const;
+
+    int currentItem() const;
+    TQString currentText() const { return text(currentItem()); }
+    virtual void setCurrentItem( int index );
+    virtual void setCurrentItem( TQListBoxItem * );
+    void centerCurrentItem() { ensureCurrentVisible(); }
+    int topItem() const;
+    virtual void setTopItem( int index );
+    virtual void setBottomItem( int index );
+
+    long maxItemWidth() const;
+
+    enum SelectionMode { Single, Multi, Extended, NoSelection };
+    virtual void setSelectionMode( SelectionMode );
+    SelectionMode selectionMode() const;
+
+    void setMultiSelection( bool multi );
+    bool isMultiSelection() const;
+
+    virtual void setSelected( TQListBoxItem *, bool );
+    void setSelected( int, bool );
+    bool isSelected( int ) const;
+    bool isSelected( const TQListBoxItem * ) const;
+    TQListBoxItem* selectedItem() const;
+
+    TQSize sizeHint() const;
+    TQSize	minimumSizeHint() const;
+
+    TQListBoxItem *item( int index ) const;
+    int index( const TQListBoxItem * ) const;
+    TQListBoxItem *findItem( const TQString &text, ComparisonFlags compare = BeginsWith ) const;
+
+    void triggerUpdate( bool doLayout );
+
+    bool itemVisible( int index );
+    bool itemVisible( const TQListBoxItem * );
+
+    enum LayoutMode { FixedNumber,
+		      FitToWidth, FitToHeight = FitToWidth,
+		      Variable };
+    virtual void setColumnMode( LayoutMode );
+    virtual void setColumnMode( int );
+    virtual void setRowMode( LayoutMode );
+    virtual void setRowMode( int );
+
+    LayoutMode columnMode() const;
+    LayoutMode rowMode() const;
+
+    int numColumns() const;
+    int numRows() const;
+
+    bool variableWidth() const;
+    virtual void setVariableWidth( bool );
+
+    bool variableHeight() const;
+    virtual void setVariableHeight( bool );
+
+    void viewportPaintEvent( TQPaintEvent * );
+
+#ifndef QT_NO_COMPAT
+    bool dragSelect() const { return TRUE; }
+    void setDragSelect( bool ) {}
+    bool autoScroll() const { return TRUE; }
+    void setAutoScroll( bool ) {}
+    bool autoScrollBar() const { return vScrollBarMode() == Auto; }
+    void setAutoScrollBar( bool enable ) { setVScrollBarMode( enable ? Auto : AlwaysOff ); }
+    bool scrollBar() const { return vScrollBarMode() != AlwaysOff; }
+    void setScrollBar( bool enable ) { setVScrollBarMode( enable ? AlwaysOn : AlwaysOff ); }
+    bool autoBottomScrollBar() const { return hScrollBarMode() == Auto; }
+    void setAutoBottomScrollBar( bool enable ) { setHScrollBarMode( enable ? Auto : AlwaysOff ); }
+    bool bottomScrollBar() const { return hScrollBarMode() != AlwaysOff; }
+    void setBottomScrollBar( bool enable ) { setHScrollBarMode( enable ? AlwaysOn : AlwaysOff ); }
+    bool smoothScrolling() const { return FALSE; }
+    void setSmoothScrolling( bool ) {}
+    bool autoUpdate() const { return TRUE; }
+    void setAutoUpdate( bool ) {}
+    void setFixedVisibleLines( int lines ) { setRowMode( lines ); }
+    int inSort( const TQListBoxItem * );
+    int inSort( const TQString& text );
+    int cellHeight( int i ) const { return itemHeight(i); }
+    int cellHeight() const { return itemHeight(); }
+    int cellWidth() const { return maxItemWidth(); }
+    int cellWidth(int i) const { Q_ASSERT(i==0); Q_UNUSED(i) return maxItemWidth(); }
+    int	numCols() const { return numColumns(); }
+#endif
+
+    int itemHeight( int index = 0 ) const;
+    TQListBoxItem * itemAt( const TQPoint & ) const;
+
+    TQRect itemRect( TQListBoxItem *item ) const;
+
+    TQListBoxItem *firstItem() const;
+
+    void sort( bool ascending = TRUE );
+
+public slots:
+    void clear();
+    virtual void ensureCurrentVisible();
+    virtual void clearSelection();
+    virtual void selectAll( bool select );
+    virtual void invertSelection();
+
+signals:
+    void highlighted( int index );
+    void selected( int index );
+    void highlighted( const TQString &);
+    void selected( const TQString &);
+    void highlighted( TQListBoxItem * );
+    void selected( TQListBoxItem * );
+
+    void selectionChanged();
+    void selectionChanged( TQListBoxItem * );
+    void currentChanged( TQListBoxItem * );
+    void clicked( TQListBoxItem * );
+    void clicked( TQListBoxItem *, const TQPoint & );
+    void pressed( TQListBoxItem * );
+    void pressed( TQListBoxItem *, const TQPoint & );
+
+    void doubleClicked( TQListBoxItem * );
+    void returnPressed( TQListBoxItem * );
+    void rightButtonClicked( TQListBoxItem *, const TQPoint & );
+    void rightButtonPressed( TQListBoxItem *, const TQPoint & );
+    void mouseButtonPressed( int, TQListBoxItem*, const TQPoint& );
+    void mouseButtonClicked( int, TQListBoxItem*, const TQPoint& );
+
+    void contextMenuRequested( TQListBoxItem *, const TQPoint & );
+
+    void onItem( TQListBoxItem *item );
+    void onViewport();
+
+protected:
+    void mousePressEvent( TQMouseEvent * );
+    void mouseReleaseEvent( TQMouseEvent * );
+    void mouseDoubleClickEvent( TQMouseEvent * );
+    void mouseMoveEvent( TQMouseEvent * );
+    void contentsContextMenuEvent( TQContextMenuEvent * );
+
+    void keyPressEvent( TQKeyEvent *e );
+    void focusInEvent( TQFocusEvent *e );
+    void focusOutEvent( TQFocusEvent *e );
+    void resizeEvent( TQResizeEvent * );
+    void showEvent( TQShowEvent * );
+
+    bool eventFilter( TQObject *o, TQEvent *e );
+
+    void updateItem( int index );
+    void updateItem( TQListBoxItem * );
+
+#ifndef QT_NO_COMPAT
+    void updateCellWidth() { }
+    int totalWidth() const { return contentsWidth(); }
+    int totalHeight() const { return contentsHeight(); }
+#endif
+
+    virtual void paintCell( TQPainter *, int row, int col );
+
+    void toggleCurrentItem();
+    bool isRubberSelecting() const;
+
+    void doLayout() const;
+
+    void windowActivationChange( bool );
+
+#ifndef QT_NO_COMPAT
+    bool itemYPos( int index, int *yPos ) const;
+    int findItem( int yPos ) const { return index(itemAt(TQPoint(0,yPos)) ); }
+#endif
+
+protected slots:
+    void clearInputString();
+
+private slots:
+    void refreshSlot();
+    void doAutoScroll();
+    void adjustItems();
+
+private:
+    void mousePressEventEx( TQMouseEvent * );
+    void tryGeometry( int, int ) const;
+    int currentRow() const;
+    int currentColumn() const;
+    void updateSelection();
+    void repaintSelection();
+    void drawRubber();
+    void doRubberSelection( const TQRect &old, const TQRect &rubber );
+    void handleItemChange( TQListBoxItem *old, bool shift, bool control );
+    void selectRange( TQListBoxItem *from, TQListBoxItem *to, bool invert, bool includeFirst, bool clearSel = FALSE );
+
+    void emitChangedSignal( bool );
+
+    int columnAt( int ) const;
+    int rowAt( int ) const;
+
+    TQListBoxPrivate * d;
+
+    static TQListBox * changedListBox;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQListBox( const TQListBox & );
+    TQListBox &operator=( const TQListBox & );
+#endif
+};
+
+
+class Q_EXPORT TQListBoxItem
+{
+public:
+    TQListBoxItem( TQListBox* listbox = 0 );
+    TQListBoxItem( TQListBox* listbox, TQListBoxItem *after );
+    virtual ~TQListBoxItem();
+
+    virtual TQString text() const;
+    virtual const TQPixmap *pixmap() const;
+
+    virtual int	 height( const TQListBox * ) const;
+    virtual int	 width( const TQListBox * )  const;
+
+    bool isSelected() const { return s; }
+    bool isCurrent() const;
+
+#ifndef QT_NO_COMPAT
+    bool selected() const { return isSelected(); }
+    bool current() const { return isCurrent(); }
+#endif
+
+    TQListBox *listBox() const;
+
+    void setSelectable( bool b );
+    bool isSelectable() const;
+
+    TQListBoxItem *next() const;
+    TQListBoxItem *prev() const;
+
+    virtual int rtti() const;
+    static int RTTI;
+
+protected:
+    virtual void paint( TQPainter * ) = 0;
+    virtual void setText( const TQString &text ) { txt = text; }
+    void setCustomHighlighting( bool );
+
+private:
+    TQString txt;
+    uint s:1;
+    uint dirty:1;
+    uint custom_highlight : 1;
+    int x, y;
+    TQListBoxItem * p, * n;
+    TQListBox* lbox;
+    friend class TQListBox;
+    friend class TQListBoxPrivate;
+    friend class TQComboBox;
+    friend class TQComboBoxPopupItem;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQListBoxItem( const TQListBoxItem & );
+    TQListBoxItem &operator=( const TQListBoxItem & );
+#endif
+};
+
+
+class Q_EXPORT TQListBoxText : public TQListBoxItem
+{
+public:
+    TQListBoxText( TQListBox* listbox, const TQString & text=TQString::null );
+    TQListBoxText( const TQString & text=TQString::null );
+    TQListBoxText( TQListBox* listbox, const TQString & text, TQListBoxItem *after );
+   ~TQListBoxText();
+
+    int	 height( const TQListBox * ) const;
+    int	 width( const TQListBox * )  const;
+
+    int rtti() const;
+    static int RTTI;
+
+protected:
+    void  paint( TQPainter * );
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQListBoxText( const TQListBoxText & );
+    TQListBoxText &operator=( const TQListBoxText & );
+#endif
+};
+
+
+class Q_EXPORT TQListBoxPixmap : public TQListBoxItem
+{
+public:
+    TQListBoxPixmap( TQListBox* listbox, const TQPixmap & );
+    TQListBoxPixmap( const TQPixmap & );
+    TQListBoxPixmap( TQListBox* listbox, const TQPixmap & pix, TQListBoxItem *after );
+    TQListBoxPixmap( TQListBox* listbox, const TQPixmap &, const TQString& );
+    TQListBoxPixmap( const TQPixmap &, const TQString& );
+    TQListBoxPixmap( TQListBox* listbox, const TQPixmap & pix, const TQString&, TQListBoxItem *after );
+   ~TQListBoxPixmap();
+
+    const TQPixmap *pixmap() const { return &pm; }
+
+    int	 height( const TQListBox * ) const;
+    int	 width( const TQListBox * )  const;
+
+    int rtti() const;
+    static int RTTI;
+
+protected:
+    void paint( TQPainter * );
+
+private:
+    TQPixmap pm;
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQListBoxPixmap( const TQListBoxPixmap & );
+    TQListBoxPixmap &operator=( const TQListBoxPixmap & );
+#endif
+};
+
+
+#endif // QT_NO_LISTBOX
+
+#endif // TQLISTBOX_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlistbox-m.png b/doc/html/qlistbox-m.png new file mode 100644 index 00000000..41a9a4c0 Binary files /dev/null and b/doc/html/qlistbox-m.png differ diff --git a/doc/html/qlistbox-members.html b/doc/html/qlistbox-members.html new file mode 100644 index 00000000..8658c549 --- /dev/null +++ b/doc/html/qlistbox-members.html @@ -0,0 +1,509 @@ + + + + + +TQListBox Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQListBox

+ +

This is the complete list of member functions for +TQListBox, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlistbox-w.png b/doc/html/qlistbox-w.png new file mode 100644 index 00000000..8463dc95 Binary files /dev/null and b/doc/html/qlistbox-w.png differ diff --git a/doc/html/qlistbox.html b/doc/html/qlistbox.html new file mode 100644 index 00000000..c1996433 --- /dev/null +++ b/doc/html/qlistbox.html @@ -0,0 +1,1163 @@ + + + + + +TQListBox Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQListBox Class Reference

+ +

The TQListBox widget provides a list of selectable, read-only items. +More... +

#include <qlistbox.h> +

Inherits TQScrollView. +

List of all member functions. +

Public Members

+
    +
  • TQListBox ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )
  • +
  • ~TQListBox ()
  • +
  • uint count () const
  • +
  • void insertStringList ( const TQStringList & list, int index = -1 )
  • +
  • void insertStrList ( const TQStrList * list, int index = -1 )
  • +
  • void insertStrList ( const TQStrList & list, int index = -1 )
  • +
  • void insertStrList ( const char ** strings, int numStrings = -1, int index = -1 )
  • +
  • void insertItem ( const TQListBoxItem * lbi, int index = -1 )
  • +
  • void insertItem ( const TQListBoxItem * lbi, const TQListBoxItem * after )
  • +
  • void insertItem ( const TQString & text, int index = -1 )
  • +
  • void insertItem ( const TQPixmap & pixmap, int index = -1 )
  • +
  • void insertItem ( const TQPixmap & pixmap, const TQString & text, int index = -1 )
  • +
  • void removeItem ( int index )
  • +
  • TQString text ( int index ) const
  • +
  • const TQPixmap * pixmap ( int index ) const
  • +
  • void changeItem ( const TQListBoxItem * lbi, int index )
  • +
  • void changeItem ( const TQString & text, int index )
  • +
  • void changeItem ( const TQPixmap & pixmap, int index )
  • +
  • void changeItem ( const TQPixmap & pixmap, const TQString & text, int index )
  • +
  • void takeItem ( const TQListBoxItem * item )
  • +
  • int numItemsVisible () const
  • +
  • int currentItem () const
  • +
  • TQString currentText () const
  • +
  • virtual void setCurrentItem ( int index )
  • +
  • virtual void setCurrentItem ( TQListBoxItem * i )
  • +
  • void centerCurrentItem ()  (obsolete)
  • +
  • int topItem () const
  • +
  • virtual void setTopItem ( int index )
  • +
  • virtual void setBottomItem ( int index )
  • +
  • long maxItemWidth () const
  • +
  • enum SelectionMode { Single, Multi, Extended, NoSelection }
  • +
  • virtual void setSelectionMode ( SelectionMode )
  • +
  • SelectionMode selectionMode () const
  • +
  • void setMultiSelection ( bool multi )  (obsolete)
  • +
  • bool isMultiSelection () const  (obsolete)
  • +
  • virtual void setSelected ( TQListBoxItem * item, bool select )
  • +
  • void setSelected ( int index, bool select )
  • +
  • bool isSelected ( int i ) const
  • +
  • bool isSelected ( const TQListBoxItem * i ) const
  • +
  • TQListBoxItem * selectedItem () const
  • +
  • TQListBoxItem * item ( int index ) const
  • +
  • int index ( const TQListBoxItem * lbi ) const
  • +
  • TQListBoxItem * findItem ( const TQString & text, ComparisonFlags compare = BeginsWith ) const
  • +
  • void triggerUpdate ( bool doLayout )
  • +
  • bool itemVisible ( int index )
  • +
  • bool itemVisible ( const TQListBoxItem * item )
  • +
  • enum LayoutMode { FixedNumber, FitToWidth, FitToHeight = FitToWidth, Variable }
  • +
  • virtual void setColumnMode ( LayoutMode )
  • +
  • virtual void setColumnMode ( int )
  • +
  • virtual void setRowMode ( LayoutMode )
  • +
  • virtual void setRowMode ( int )
  • +
  • LayoutMode columnMode () const
  • +
  • LayoutMode rowMode () const
  • +
  • int numColumns () const
  • +
  • int numRows () const
  • +
  • bool variableWidth () const
  • +
  • virtual void setVariableWidth ( bool )
  • +
  • bool variableHeight () const
  • +
  • virtual void setVariableHeight ( bool )
  • +
  • bool autoScrollBar () const  (obsolete)
  • +
  • void setAutoScrollBar ( bool enable )  (obsolete)
  • +
  • bool scrollBar () const  (obsolete)
  • +
  • void setScrollBar ( bool enable )  (obsolete)
  • +
  • bool autoBottomScrollBar () const  (obsolete)
  • +
  • void setAutoBottomScrollBar ( bool enable )  (obsolete)
  • +
  • bool bottomScrollBar () const  (obsolete)
  • +
  • void setBottomScrollBar ( bool enable )  (obsolete)
  • +
  • int inSort ( const TQListBoxItem * lbi )  (obsolete)
  • +
  • int inSort ( const TQString & text )  (obsolete)
  • +
  • int cellHeight ( int i ) const  (obsolete)
  • +
  • int cellHeight () const  (obsolete)
  • +
  • int cellWidth () const  (obsolete)
  • +
  • int numCols () const  (obsolete)
  • +
  • int itemHeight ( int index = 0 ) const
  • +
  • TQListBoxItem * itemAt ( const TQPoint & p ) const
  • +
  • TQRect itemRect ( TQListBoxItem * item ) const
  • +
  • TQListBoxItem * firstItem () const
  • +
  • void sort ( bool ascending = TRUE )
  • +
+

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • LayoutMode columnMode - the column layout mode for this list box
  • +
  • uint count - the number of items in the list box  (read only)
  • +
  • int currentItem - the current highlighted item
  • +
  • TQString currentText - the text of the current item  (read only)
  • +
  • bool multiSelection - whether or not the list box is in Multi selection mode  (obsolete)
  • +
  • int numColumns - the number of columns in the list box  (read only)
  • +
  • int numItemsVisible - the number of visible items  (read only)
  • +
  • int numRows - the number of rows in the list box  (read only)
  • +
  • LayoutMode rowMode - the row layout mode for this list box
  • +
  • SelectionMode selectionMode - the selection mode of the list box
  • +
  • int topItem - the index of an item at the top of the screen
  • +
  • bool variableHeight - whether this list box has variable-height rows
  • +
  • bool variableWidth - whether this list box has variable-width columns
  • +
+

Protected Members

+
    +
  • void updateItem ( int index )
  • +
  • void updateItem ( TQListBoxItem * i )
  • +
  • int totalWidth () const  (obsolete)
  • +
  • int totalHeight () const  (obsolete)
  • +
  • virtual void paintCell ( TQPainter * p, int row, int col )
  • +
  • void toggleCurrentItem ()
  • +
  • bool isRubberSelecting () const
  • +
  • void doLayout () const
  • +
  • bool itemYPos ( int index, int * yPos ) const  (obsolete)
  • +
  • int findItem ( int yPos ) const  (obsolete)
  • +
+

Detailed Description

+ + +The TQListBox widget provides a list of selectable, read-only items. +

+ +

This is typically a single-column list in which either no item or +one item is selected, but it can also be used in many other ways. +

TQListBox will add scroll bars as necessary, but it isn't intended +for really big lists. If you want more than a few thousand +items, it's probably better to use a different widget mainly +because the scroll bars won't provide very good navigation, but +also because TQListBox may become slow with huge lists. (See +TQListView and TQTable for possible alternatives.) +

There are a variety of selection modes described in the +TQListBox::SelectionMode documentation. The default is Single +selection mode, but you can change it using setSelectionMode(). +(setMultiSelection() is still provided for compatibility with TQt +1.x. We recommend using setSelectionMode() in all code.) +

Because TQListBox offers multiple selection it must display +keyboard focus and selection state separately. Therefore there are +functions both to set the selection state of an item, i.e. +setSelected(), and to set which item displays keyboard focus, i.e. +setCurrentItem(). +

The list box normally arranges its items in a single column and +adds a vertical scroll bar if retquired. It is possible to have a +different fixed number of columns (setColumnMode()), or as many +columns as will fit in the list box's assigned screen space +(setColumnMode(FitToWidth)), or to have a fixed number of rows +(setRowMode()) or as many rows as will fit in the list box's +assigned screen space (setRowMode(FitToHeight)). In all these +cases TQListBox will add scroll bars, as appropriate, in at least +one direction. +

If multiple rows are used, each row can be as high as necessary +(the normal setting), or you can request that all items will have +the same height by calling setVariableHeight(FALSE). The same +applies to a column's width, see setVariableWidth(). +

The TQListBox's items are TQListBoxItem objects. TQListBox provides +methods to insert new items as strings, as pixmaps, and as +TQListBoxItem * (insertItem() with various arguments), and to +replace an existing item with a new string, pixmap or TQListBoxItem +(changeItem() with various arguments). You can also remove items +singly with removeItem() or clear() the entire list box. Note that +if you create a TQListBoxItem yourself and insert it, TQListBox +takes ownership of the item. +

You can also create a TQListBoxItem, such as TQListBoxText or +TQListBoxPixmap, with the list box as first parameter. The item +will then append itself. When you delete an item it is +automatically removed from the list box. +

The list of items can be arbitrarily large; TQListBox will add +scroll bars if necessary. TQListBox can display a single-column +(the common case) or multiple-columns, and offers both single and +multiple selection. TQListBox does not support multiple-column +items (but TQListView and TQTable do), or tree hierarchies (but +TQListView does). +

The list box items can be accessed both as TQListBoxItem objects +(recommended) and using integer indexes (the original TQListBox +implementation used an array of strings internally, and the API +still supports this mode of operation). Everything can be done +using the new objects, and most things can be done using indexes. +

Each item in a TQListBox contains a TQListBoxItem. One of the items +can be the current item. The currentChanged() signal and the +highlighted() signal are emitted when a new item becomes current, +e.g. because the user clicks on it or TQListBox::setCurrentItem() +is called. The selected() signal is emitted when the user +double-clicks on an item or presses Enter on the current item. +

If the user does not select anything, no signals are emitted and +currentItem() returns -1. +

A list box has WheelFocus as a default focusPolicy(), i.e. it +can get keyboard focus by tabbing, clicking and through the use of +the mouse wheel. +

New items can be inserted using insertItem(), insertStrList() or +insertStringList(). inSort() is obsolete because this method is +tquite inefficient. It's preferable to insert the items normally +and call sort() afterwards, or to insert a sorted TQStringList(). +

By default, vertical and horizontal scroll bars are added and +removed as necessary. setHScrollBarMode() and setVScrollBarMode() +can be used to change this policy. +

If you need to insert types other than strings and pixmaps, you +must define new classes which inherit TQListBoxItem. +

Warning: The list box assumes ownership of all list box items and +will delete them when it does not need them any more. +

+

See also TQListView, TQComboBox, TQButtonGroup, GUI Design Handbook: List Box (two + sections), and Advanced Widgets. + +


Member Type Documentation

+

TQListBox::LayoutMode

+ +

This enum type is used to specify how TQListBox lays out its rows +and columns. +

    +
  • TQListBox::FixedNumber - There is a fixed number of rows (or columns). +
  • TQListBox::FitToWidth - There are as many columns as will fit +on-screen. +
  • TQListBox::FitToHeight - There are as many rows as will fit on-screen. +
  • TQListBox::Variable - There are as many rows as are retquired by the +column mode. (Or as many columns as retquired by the row mode.) +

Example: When you call setRowMode( FitToHeight ), columnMode() +automatically becomes Variable to accommodate the row mode +you've set. + +

TQListBox::SelectionMode

+ +

This enumerated type is used by TQListBox to indicate how it reacts +to selection by the user. +

    +
  • TQListBox::Single - When the user selects an item, any already-selected +item becomes unselected and the user cannot unselect the selected +item. This means that the user can never clear the selection, even +though the selection may be cleared by the application programmer +using TQListBox::clearSelection(). +
  • TQListBox::Multi - When the user selects an item the selection status +of that item is toggled and the other items are left alone. Also, +multiple items can be selected by dragging the mouse while the +left mouse button is kept pressed. +
  • TQListBox::Extended - When the user selects an item the selection is +cleared and the new item selected. However, if the user presses +the Ctrl key when clicking on an item, the clicked item gets +toggled and all other items are left untouched. And if the user +presses the Shift key while clicking on an item, all items between +the current item and the clicked item get selected or unselected, +depending on the state of the clicked item. Also, multiple items +can be selected by dragging the mouse while the left mouse button +is kept pressed. +
  • TQListBox::NoSelection - Items cannot be selected. +

In other words, Single is a real single-selection list box, Multi is a real multi-selection list box, Extended is a list +box in which users can select multiple items but usually want to +select either just one or a range of contiguous items, and NoSelection is for a list box where the user can look but not +touch. + +


Member Function Documentation

+

TQListBox::TQListBox ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

+Constructs a new empty list box called name and with parent parent. +

Performance is boosted by modifying the widget flags f so that +only part of the TQListBoxItem children is redrawn. This may be +unsuitable for custom TQListBoxItem classes, in which case WStaticContents and WNoAutoErase should be cleared +immediately after construction. +

See also TQWidget::clearWFlags() and TQt::WidgetFlags. + +

TQListBox::~TQListBox () +

+Destroys the list box. Deletes all list box items. + +

bool TQListBox::autoBottomScrollBar () const +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns TRUE if hScrollBarMode() is Auto; otherwise returns +FALSE. + +

bool TQListBox::autoScrollBar () const +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns TRUE if vScrollBarMode() is Auto; otherwise returns +FALSE. + +

bool TQListBox::bottomScrollBar () const +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns FALSE if vScrollBarMode() is AlwaysOff; otherwise +returns TRUE. + +

int TQListBox::cellHeight ( int i ) const +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+Returns the item height of item i. +

See also itemHeight(). + +

int TQListBox::cellHeight () const +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the item height of the first item, item 0. +

See also itemHeight(). + +

int TQListBox::cellWidth () const +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+Returns the maximum item width. +

See also maxItemWidth(). + +

void TQListBox::centerCurrentItem () +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This function does exactly the same as ensureCurrentVisible() +

See also TQListBox::ensureCurrentVisible(). + +

void TQListBox::changeItem ( const TQListBoxItem * lbi, int index ) +

+Replaces the item at position index with lbi. If index is +negative or too large, changeItem() does nothing. +

The item that has been changed will become selected. +

See also insertItem() and removeItem(). + +

void TQListBox::changeItem ( const TQString & text, int index ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Replaces the item at position index with a new list box text +item with text text. +

The operation is ignored if index is out of range. +

See also insertItem() and removeItem(). + +

void TQListBox::changeItem ( const TQPixmap & pixmap, int index ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Replaces the item at position index with a new list box pixmap +item with pixmap pixmap. +

The operation is ignored if index is out of range. +

See also insertItem() and removeItem(). + +

void TQListBox::changeItem ( const TQPixmap & pixmap, const TQString & text, int index ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Replaces the item at position index with a new list box pixmap +item with pixmap pixmap and text text. +

The operation is ignored if index is out of range. +

See also insertItem() and removeItem(). + +

void TQListBox::clear () [slot] +

+Deletes all the items in the list. +

See also removeItem(). + +

void TQListBox::clearSelection () [virtual slot] +

+Deselects all items, if possible. +

Note that a Single selection list box will automatically select +an item if it has keyboard focus. + +

Example: listbox/listbox.cpp. +

void TQListBox::clicked ( TQListBoxItem * item ) [signal] +

+ +

This signal is emitted when the user clicks any mouse button. If +item is not 0, the cursor is on item. If item is 0, the +mouse cursor isn't on any item. +

Note that you must not delete any TQListBoxItem objects in slots +connected to this signal. + +

void TQListBox::clicked ( TQListBoxItem * item, const TQPoint & pnt ) [signal] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted when the user clicks any mouse button. If +item is not 0, the cursor is on item. If item is 0, the +mouse cursor isn't on any item. +

pnt is the position of the mouse cursor in the global +coordinate system (TQMouseEvent::globalPos()). (If the click's +press and release differs by a pixel or two, pnt is the +position at release time.) +

Note that you must not delete any TQListBoxItem objects in slots +connected to this signal. + +

LayoutMode TQListBox::columnMode () const +

Returns the column layout mode for this list box. +See the "columnMode" property for details. +

void TQListBox::contextMenuRequested ( TQListBoxItem * item, const TQPoint & pos ) [signal] +

+ +

This signal is emitted when the user invokes a context menu with +the right mouse button or with special system keys, with item +being the item under the mouse cursor or the current item, +respectively. +

pos is the position for the context menu in the global +coordinate system. + +

uint TQListBox::count () const +

Returns the number of items in the list box. +See the "count" property for details. +

void TQListBox::currentChanged ( TQListBoxItem * item ) [signal] +

+ +

This signal is emitted when the user makes a new item the current +item. item is the new current list box item. +

See also currentItem and currentItem. + +

int TQListBox::currentItem () const +

Returns the current highlighted item. +See the "currentItem" property for details. +

TQString TQListBox::currentText () const +

Returns the text of the current item. +See the "currentText" property for details. +

void TQListBox::doLayout () const [protected] +

+This function does the hard layout work. You should never need to +call it. + +

void TQListBox::doubleClicked ( TQListBoxItem * item ) [signal] +

+ +

This signal is emitted whenever an item is double-clicked. It's +emitted on the second button press, not the second button release. +If item is not 0, the cursor is on item. If item is 0, +the mouse cursor isn't on any item. + +

void TQListBox::ensureCurrentVisible () [virtual slot] +

+Ensures that the current item is visible. + +

TQListBoxItem * TQListBox::findItem ( const TQString & text, ComparisonFlags compare = BeginsWith ) const +

+Finds the first list box item that has the text text and +returns it, or returns 0 of no such item could be found. +The search starts from the current item if the current item exists, +otherwise it starts from the first list box item. +If ComparisonFlags are specified in compare then these flags +are used, otherwise the default is a case-insensitive, "begins +with" search. +

See also TQt::StringComparisonMode. + +

int TQListBox::findItem ( int yPos ) const [protected] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+Returns the index of the item a point (0, yPos). +

See also index() and itemAt(). + +

TQListBoxItem * TQListBox::firstItem () const +

+Returns the first item in this list box. If the list box is empty, +returns 0. + +

void TQListBox::highlighted ( int index ) [signal] +

+ +

This signal is emitted when the user makes a new item the current +item. index is the index of the new current item. +

See also currentChanged(), selected(), currentItem, and selectionChanged(). + +

void TQListBox::highlighted ( const TQString & ) [signal] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted when the user makes a new item the current +item and the item is (or has) a string. The argument is the text +of the new current item. +

See also currentChanged(), selected(), currentItem, and selectionChanged(). + +

void TQListBox::highlighted ( TQListBoxItem * ) [signal] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted when the user makes a new item the current +item. The argument is a pointer to the new current item. +

See also currentChanged(), selected(), currentItem, and selectionChanged(). + +

int TQListBox::inSort ( const TQListBoxItem * lbi ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Using this method is tquite inefficient. We suggest to use insertItem() +for inserting and sort() afterwards. +

Inserts lbi at its sorted position in the list box and returns the +position. +

All items must be inserted with inSort() to maintain the sorting +order. inSort() treats any pixmap (or user-defined type) as +lexicographically less than any string. +

See also insertItem() and sort(). + +

int TQListBox::inSort ( const TQString & text ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Using this method is tquite inefficient. We suggest to use insertItem() +for inserting and sort() afterwards. +

Inserts a new item of text at its sorted position in the list box and +returns the position. +

All items must be inserted with inSort() to maintain the sorting +order. inSort() treats any pixmap (or user-defined type) as +lexicographically less than any string. +

See also insertItem() and sort(). + +

int TQListBox::index ( const TQListBoxItem * lbi ) const +

+Returns the index of lbi, or -1 if the item is not in this list +box or lbi is 0. +

See also item(). + +

void TQListBox::insertItem ( const TQListBoxItem * lbi, int index = -1 ) +

+Inserts the item lbi into the list at position index. +

If index is negative or larger than the number of items in the +list box, lbi is inserted at the end of the list. +

See also insertStrList(). + +

Examples: i18n/mywidget.cpp, listbox/listbox.cpp, listboxcombo/listboxcombo.cpp, and tabdialog/tabdialog.cpp. +

void TQListBox::insertItem ( const TQListBoxItem * lbi, const TQListBoxItem * after ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts the item lbi into the list after the item after, or +at the beginning if after is 0. +

See also insertStrList(). + +

void TQListBox::insertItem ( const TQString & text, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a new list box text item with the text text into the +list at position index. +

If index is negative, text is inserted at the end of the +list. +

See also insertStrList(). + +

void TQListBox::insertItem ( const TQPixmap & pixmap, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a new list box pixmap item with the pixmap pixmap into +the list at position index. +

If index is negative, pixmap is inserted at the end of the +list. +

See also insertStrList(). + +

void TQListBox::insertItem ( const TQPixmap & pixmap, const TQString & text, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a new list box pixmap item with the pixmap pixmap and +the text text into the list at position index. +

If index is negative, pixmap is inserted at the end of the +list. +

See also insertStrList(). + +

void TQListBox::insertStrList ( const TQStrList * list, int index = -1 ) +

+Inserts the string list list into the list at position index. +

If index is negative, list is inserted at the end of the +list. If index is too large, the operation is ignored. +

Warning: This function uses const char * rather than TQString, +so we recommend against using it. It is provided so that legacy +code will continue to work, and so that programs that certainly +will not need to handle code outside a single 8-bit locale can use +it. See insertStringList() which uses real TQStrings. +

Warning: This function is never significantly faster than a loop +around insertItem(). +

See also insertItem() and insertStringList(). + +

void TQListBox::insertStrList ( const TQStrList & list, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts the string list list into the list at position index. +

If index is negative, list is inserted at the end of the +list. If index is too large, the operation is ignored. +

Warning: This function uses const char * rather than TQString, +so we recommend against using it. It is provided so that legacy +code will continue to work, and so that programs that certainly +will not need to handle code outside a single 8-bit locale can use +it. See insertStringList() which uses real TQStrings. +

Warning: This function is never significantly faster than a loop +around insertItem(). +

See also insertItem() and insertStringList(). + +

void TQListBox::insertStrList ( const char ** strings, int numStrings = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts the numStrings strings of the array strings into the +list at position index. +

If index is negative, insertStrList() inserts strings at the +end of the list. If index is too large, the operation is +ignored. +

Warning: This function uses const char * rather than TQString, +so we recommend against using it. It is provided so that legacy +code will continue to work, and so that programs that certainly +will not need to handle code outside a single 8-bit locale can use +it. See insertStringList() which uses real TQStrings. +

Warning: This function is never significantly faster than a loop +around insertItem(). +

See also insertItem() and insertStringList(). + +

void TQListBox::insertStringList ( const TQStringList & list, int index = -1 ) +

+Inserts the string list list into the list at position index. +

If index is negative, list is inserted at the end of the +list. If index is too large, the operation is ignored. +

Warning: This function is never significantly faster than a loop +around insertItem(). +

See also insertItem() and insertStrList(). + +

void TQListBox::invertSelection () [virtual slot] +

+Inverts the selection. Only works in Multi and Extended +selection mode. + +

bool TQListBox::isMultiSelection () const +

Returns TRUE if or not the list box is in Multi selection mode; otherwise returns FALSE. +See the "multiSelection" property for details. +

bool TQListBox::isRubberSelecting () const [protected] +

+Returns TRUE if the user is selecting items using a rubber band +rectangle; otherwise returns FALSE. + +

bool TQListBox::isSelected ( int i ) const +

+Returns TRUE if item i is selected; otherwise returns FALSE. + +

bool TQListBox::isSelected ( const TQListBoxItem * i ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if item i is selected; otherwise returns FALSE. + +

TQListBoxItem * TQListBox::item ( int index ) const +

+Returns a pointer to the item at position index, or 0 if index is out of bounds. +

See also index(). + +

Example: listboxcombo/listboxcombo.cpp. +

TQListBoxItem * TQListBox::itemAt ( const TQPoint & p ) const +

+Returns the item at point p, specified in viewport coordinates, +or a 0 if there is no item at p. +

Use contentsToViewport() to convert between widget coordinates and +viewport coordinates. + +

int TQListBox::itemHeight ( int index = 0 ) const +

+Returns the height in pixels of the item with index index. index defaults to 0. +

If index is too large, this function returns 0. + +

TQRect TQListBox::itemRect ( TQListBoxItem * item ) const +

+Returns the rectangle on the screen that item occupies in +viewport()'s coordinates, or an invalid rectangle if item is 0 +or is not currently visible. + +

bool TQListBox::itemVisible ( int index ) +

+Returns TRUE if the item at position index is at least partly +visible; otherwise returns FALSE. + +

bool TQListBox::itemVisible ( const TQListBoxItem * item ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if item is at least partly visible; otherwise +returns FALSE. + +

bool TQListBox::itemYPos ( int index, int * yPos ) const [protected] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns the vertical pixel-coordinate in *yPos, of the list box +item at position index in the list. Returns FALSE if the item is +outside the visible area. + +

long TQListBox::maxItemWidth () const +

+Returns the width of the widest item in the list box. + +

void TQListBox::mouseButtonClicked ( int button, TQListBoxItem * item, const TQPoint & pos ) [signal] +

+ +

This signal is emitted when the user clicks mouse button button. If item is not 0, the cursor is on item. If item +is 0, the mouse cursor isn't on any item. +

pos is the position of the mouse cursor in the global +coordinate system (TQMouseEvent::globalPos()). (If the click's +press and release differs by a pixel or two, pos is the +position at release time.) +

Note that you must not delete any TQListBoxItem objects in slots +connected to this signal. + +

void TQListBox::mouseButtonPressed ( int button, TQListBoxItem * item, const TQPoint & pos ) [signal] +

+ +

This signal is emitted when the user presses mouse button button. If item is not 0, the cursor is on item. If item +is 0, the mouse cursor isn't on any item. +

pos is the position of the mouse cursor in the global +coordinate system (TQMouseEvent::globalPos()). +

Note that you must not delete any TQListBoxItem objects in slots +connected to this signal. + +

int TQListBox::numCols () const +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+Returns the number of columns. +

See also numColumns. + +

int TQListBox::numColumns () const +

Returns the number of columns in the list box. +See the "numColumns" property for details. +

int TQListBox::numItemsVisible () const +

Returns the number of visible items. +See the "numItemsVisible" property for details. +

int TQListBox::numRows () const +

Returns the number of rows in the list box. +See the "numRows" property for details. +

void TQListBox::onItem ( TQListBoxItem * i ) [signal] +

+ +

This signal is emitted when the user moves the mouse cursor onto +an item, similar to the TQWidget::enterEvent() function. i is +the TQListBoxItem that the mouse has moved on. + +

void TQListBox::onViewport () [signal] +

+ +

This signal is emitted when the user moves the mouse cursor from +an item to an empty part of the list box. + +

void TQListBox::paintCell ( TQPainter * p, int row, int col ) [virtual protected] +

+Provided for compatibility with the old TQListBox. We recommend +using TQListBoxItem::paint() instead. +

Repaints the cell at row, col using painter p. + +

const TQPixmap * TQListBox::pixmap ( int index ) const +

+Returns a pointer to the pixmap at position index, or 0 if +there is no pixmap there. +

See also text(). + +

void TQListBox::pressed ( TQListBoxItem * item ) [signal] +

+ +

This signal is emitted when the user presses any mouse button. If +item is not 0, the cursor is on item. If item is 0, the +mouse cursor isn't on any item. +

Note that you must not delete any TQListBoxItem objects in slots +connected to this signal. + +

void TQListBox::pressed ( TQListBoxItem * item, const TQPoint & pnt ) [signal] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted when the user presses any mouse button. If +item is not 0, the cursor is on item. If item is 0, the +mouse cursor isn't on any item. +

pnt is the position of the mouse cursor in the global +coordinate system (TQMouseEvent::globalPos()). +

Note that you must not delete any TQListBoxItem objects in slots +connected to this signal. +

See also mouseButtonPressed(), rightButtonPressed(), and clicked(). + +

void TQListBox::removeItem ( int index ) +

+Removes and deletes the item at position index. If index is +equal to currentItem(), a new item becomes current and the +currentChanged() and highlighted() signals are emitted. +

See also insertItem() and clear(). + +

void TQListBox::returnPressed ( TQListBoxItem * ) [signal] +

+ +

This signal is emitted when Enter or Return is pressed. The +argument is currentItem(). + +

void TQListBox::rightButtonClicked ( TQListBoxItem *, const TQPoint & ) [signal] +

+ +

This signal is emitted when the right button is clicked (i.e. when +it's released at the same point where it was pressed). The +arguments are the relevant TQListBoxItem (may be 0) and the point +in global coordinates. + +

void TQListBox::rightButtonPressed ( TQListBoxItem *, const TQPoint & ) [signal] +

+ +

This signal is emitted when the right button is pressed. The +arguments are the relevant TQListBoxItem (may be 0) and the point +in global coordinates. + +

LayoutMode TQListBox::rowMode () const +

Returns the row layout mode for this list box. +See the "rowMode" property for details. +

bool TQListBox::scrollBar () const +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns FALSE if vScrollBarMode() is AlwaysOff; otherwise +returns TRUE. + +

void TQListBox::selectAll ( bool select ) [virtual slot] +

+In Multi and Extended modes, this function sets all items to +be selected if select is TRUE, and to be unselected if select is FALSE. +

In Single and NoSelection modes, this function only changes +the selection status of currentItem(). + +

void TQListBox::selected ( int index ) [signal] +

+ +

This signal is emitted when the user double-clicks on an item or +presses Enter on the current item. index is the index of the +selected item. +

See also currentChanged(), highlighted(), and selectionChanged(). + +

void TQListBox::selected ( const TQString & ) [signal] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted when the user double-clicks on an item or +presses Enter on the current item, and the item is (or has) a +string. The argument is the text of the selected item. +

See also currentChanged(), highlighted(), and selectionChanged(). + +

void TQListBox::selected ( TQListBoxItem * ) [signal] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted when the user double-clicks on an item or +presses Enter on the current item. The argument is a pointer to +the new selected item. +

See also currentChanged(), highlighted(), and selectionChanged(). + +

TQListBoxItem * TQListBox::selectedItem () const +

Returns the selected item if the list box is in +single-selection mode and an item is selected. +

If no items are selected or the list box is in another selection mode +this function returns 0. +

See also setSelected() and multiSelection. + +

void TQListBox::selectionChanged () [signal] +

+ +

This signal is emitted when the selection set of a list box +changes. This signal is emitted in each selection mode. If the +user selects five items by drag-selecting, TQListBox tries to emit +just one selectionChanged() signal so the signal can be connected +to computationally expensive slots. +

See also selected() and currentItem. + +

void TQListBox::selectionChanged ( TQListBoxItem * item ) [signal] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted when the selection in a Single selection +list box changes. item is the newly selected list box item. +

See also selected() and currentItem. + +

SelectionMode TQListBox::selectionMode () const +

Returns the selection mode of the list box. +See the "selectionMode" property for details. +

void TQListBox::setAutoBottomScrollBar ( bool enable ) +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

If enable is TRUE sets setHScrollBarMode() to AlwaysOn; +otherwise sets setHScrollBarMode() to AlwaysOff. + +

void TQListBox::setAutoScrollBar ( bool enable ) +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

If enable is TRUE sets setVScrollBarMode() to AlwaysOn; +otherwise sets setVScrollBarMode() to AlwaysOff. + +

void TQListBox::setBottomItem ( int index ) [virtual] +

+Scrolls the list box so the item at position index in the list +is displayed in the bottom row of the list box. +

See also topItem. + +

void TQListBox::setBottomScrollBar ( bool enable ) +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

If enable is TRUE sets setHScrollBarMode() to AlwaysOn; +otherwise sets setHScrollBarMode() to AlwaysOff. + +

void TQListBox::setColumnMode ( LayoutMode ) [virtual] +

Sets the column layout mode for this list box. +See the "columnMode" property for details. +

void TQListBox::setColumnMode ( int ) [virtual] +

Sets the column layout mode for this list box. +See the "columnMode" property for details. +

void TQListBox::setCurrentItem ( int index ) [virtual] +

Sets the current highlighted item to index. +See the "currentItem" property for details. +

void TQListBox::setCurrentItem ( TQListBoxItem * i ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the current item to the TQListBoxItem i. + +

void TQListBox::setMultiSelection ( bool multi ) +

Sets whether or not the list box is in Multi selection mode to multi. +See the "multiSelection" property for details. +

void TQListBox::setRowMode ( LayoutMode ) [virtual] +

Sets the row layout mode for this list box. +See the "rowMode" property for details. +

void TQListBox::setRowMode ( int ) [virtual] +

Sets the row layout mode for this list box. +See the "rowMode" property for details. +

void TQListBox::setScrollBar ( bool enable ) +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

If enable is TRUE sets setVScrollBarMode() to AlwaysOn; +otherwise sets setVScrollBarMode() to AlwaysOff. + +

void TQListBox::setSelected ( TQListBoxItem * item, bool select ) [virtual] +

+Selects item if select is TRUE or unselects it if select +is FALSE, and repaints the item appropriately. +

If the list box is a Single selection list box and select is +TRUE, setSelected() calls setCurrentItem(). +

If the list box is a Single selection list box, select is +FALSE, setSelected() calls clearSelection(). +

See also multiSelection, currentItem, clearSelection(), and currentItem. + +

void TQListBox::setSelected ( int index, bool select ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

If select is TRUE the item at position index is selected; +otherwise the item is deselected. + +

void TQListBox::setSelectionMode ( SelectionMode ) [virtual] +

Sets the selection mode of the list box. +See the "selectionMode" property for details. +

void TQListBox::setTopItem ( int index ) [virtual] +

Sets the index of an item at the top of the screen to index. +See the "topItem" property for details. +

void TQListBox::setVariableHeight ( bool ) [virtual] +

Sets whether this list box has variable-height rows. +See the "variableHeight" property for details. +

void TQListBox::setVariableWidth ( bool ) [virtual] +

Sets whether this list box has variable-width columns. +See the "variableWidth" property for details. +

void TQListBox::sort ( bool ascending = TRUE ) +

+If ascending is TRUE sorts the items in ascending order; +otherwise sorts in descending order. +

To compare the items, the text (TQListBoxItem::text()) of the items +is used. + +

Example: listbox/listbox.cpp. +

void TQListBox::takeItem ( const TQListBoxItem * item ) +

+Removes item from the list box and causes an update of the +screen display. The item is not deleted. You should normally not +need to call this function because TQListBoxItem::~TQListBoxItem() +calls it. The normal way to delete an item is with delete. +

See also TQListBox::insertItem(). + +

TQString TQListBox::text ( int index ) const +

+Returns the text at position index, or TQString::null if there +is no text at that position. +

See also pixmap(). + +

void TQListBox::toggleCurrentItem () [protected] +

+Toggles the selection status of currentItem() and repaints if the +list box is a Multi selection list box. +

See also multiSelection. + +

int TQListBox::topItem () const +

Returns the index of an item at the top of the screen. +See the "topItem" property for details. +

int TQListBox::totalHeight () const [protected] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+Returns contentsHeight(). + +

int TQListBox::totalWidth () const [protected] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+Returns contentsWidth(). + +

void TQListBox::triggerUpdate ( bool doLayout ) +

+Ensures that a single paint event will occur at the end of the +current event loop iteration. If doLayout is TRUE, the layout +is also redone. + +

void TQListBox::updateItem ( int index ) [protected] +

+Repaints the item at position index in the list. + +

void TQListBox::updateItem ( TQListBoxItem * i ) [protected] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Repaints the TQListBoxItem i. + +

bool TQListBox::variableHeight () const +

Returns TRUE if this list box has variable-height rows; otherwise returns FALSE. +See the "variableHeight" property for details. +

bool TQListBox::variableWidth () const +

Returns TRUE if this list box has variable-width columns; otherwise returns FALSE. +See the "variableWidth" property for details. +


Property Documentation

+

LayoutMode columnMode

+

This property holds the column layout mode for this list box. +

setColumnMode() sets the layout mode and adjusts the number of +displayed columns. The row layout mode automatically becomes Variable, unless the column mode is Variable. +

See also rowMode, rowMode, and numColumns. + +

Set this property's value with setColumnMode() and get this property's value with columnMode(). +

uint count

+

This property holds the number of items in the list box. +

+

Get this property's value with count(). +

int currentItem

+

This property holds the current highlighted item. +

When setting this property, the highlighting is moved to the item +and the list box scrolled as necessary. +

If no item is current, currentItem() returns -1. + +

Set this property's value with setCurrentItem() and get this property's value with currentItem(). +

TQString currentText

+

This property holds the text of the current item. +

This is equivalent to text(currentItem()). + +

Get this property's value with currentText(). +

bool multiSelection

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This property holds whether or not the list box is in Multi selection mode. +

Consider using the TQListBox::selectionMode property instead of +this property. +

When setting this property, Multi selection mode is used if set to TRUE and +to Single selection mode if set to FALSE. +

When getting this property, TRUE is returned if the list box is in +Multi selection mode or Extended selection mode, and FALSE if it is +in Single selection mode or NoSelection mode. +

See also selectionMode. + +

Set this property's value with setMultiSelection() and get this property's value with isMultiSelection(). +

int numColumns

+

This property holds the number of columns in the list box. +

This is normally 1, but can be different if TQListBox::columnMode or TQListBox::rowMode has been set. +

See also columnMode, rowMode, and numRows. + +

Get this property's value with numColumns(). +

int numItemsVisible

+

This property holds the number of visible items. +

Both partially and entirely visible items are counted. + +

Get this property's value with numItemsVisible(). +

int numRows

+

This property holds the number of rows in the list box. +

This is equal to the number of items in the default single-column +layout, but can be different. +

See also columnMode, rowMode, and numColumns. + +

Get this property's value with numRows(). +

LayoutMode rowMode

+

This property holds the row layout mode for this list box. +

This property is normally Variable. +

setRowMode() sets the layout mode and adjusts the number of +displayed rows. The column layout mode automatically becomes Variable, unless the row mode is Variable. +

See also columnMode. + +

Set this property's value with setRowMode() and get this property's value with rowMode(). +

SelectionMode selectionMode

+

This property holds the selection mode of the list box. +

Sets the list box's selection mode, which may be one of Single +(the default), Extended, Multi or NoSelection. +

See also SelectionMode. + +

Set this property's value with setSelectionMode() and get this property's value with selectionMode(). +

int topItem

+

This property holds the index of an item at the top of the screen. +

When getting this property and the listbox has multiple columns, +an arbitrary item is selected and returned. +

When setting this property, the list box is scrolled so the item +at position index in the list is displayed in the top row of +the list box. + +

Set this property's value with setTopItem() and get this property's value with topItem(). +

bool variableHeight

+

This property holds whether this list box has variable-height rows. +

When the list box has variable-height rows (the default), each row +is as high as the highest item in that row. When it has same-sized +rows, all rows are as high as the highest item in the list box. +

See also variableWidth. + +

Set this property's value with setVariableHeight() and get this property's value with variableHeight(). +

bool variableWidth

+

This property holds whether this list box has variable-width columns. +

When the list box has variable-width columns, each column is as +wide as the widest item in that column. When it has same-sized +columns (the default), all columns are as wide as the widest item +in the list box. +

See also variableHeight. + +

Set this property's value with setVariableWidth() and get this property's value with variableWidth(). + +


+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/qlistboxitem-members.html b/doc/html/qlistboxitem-members.html new file mode 100644 index 00000000..350a752c --- /dev/null +++ b/doc/html/qlistboxitem-members.html @@ -0,0 +1,65 @@ + + + + + +TQListBoxItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQListBoxItem

+ +

This is the complete list of member functions for +TQListBoxItem, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlistboxitem.html b/doc/html/qlistboxitem.html new file mode 100644 index 00000000..b4213ab4 --- /dev/null +++ b/doc/html/qlistboxitem.html @@ -0,0 +1,217 @@ + + + + + +TQListBoxItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQListBoxItem Class Reference

+ +

The TQListBoxItem class is the base class of all list box items. +More... +

#include <qlistbox.h> +

Inherited by TQListBoxText and TQListBoxPixmap. +

List of all member functions. +

Public Members

+
    +
  • TQListBoxItem ( TQListBox * listbox = 0 )
  • +
  • TQListBoxItem ( TQListBox * listbox, TQListBoxItem * after )
  • +
  • virtual ~TQListBoxItem ()
  • +
  • virtual TQString text () const
  • +
  • virtual const TQPixmap * pixmap () const
  • +
  • virtual int height ( const TQListBox * lb ) const
  • +
  • virtual int width ( const TQListBox * lb ) const
  • +
  • bool isSelected () const
  • +
  • bool isCurrent () const
  • +
  • bool selected () const  (obsolete)
  • +
  • bool current () const  (obsolete)
  • +
  • TQListBox * listBox () const
  • +
  • void setSelectable ( bool b )
  • +
  • bool isSelectable () const
  • +
  • TQListBoxItem * next () const
  • +
  • TQListBoxItem * prev () const
  • +
  • virtual int rtti () const
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQListBoxItem class is the base class of all list box items. +

This class is an abstract base class used for all list box items. +If you need to insert customized items into a TQListBox you must +inherit this class and reimplement paint(), height() and width(). +

See also TQListBox. + +


Member Function Documentation

+

TQListBoxItem::TQListBoxItem ( TQListBox * listbox = 0 ) +

+Constructs an empty list box item in the list box listbox. + +

TQListBoxItem::TQListBoxItem ( TQListBox * listbox, TQListBoxItem * after ) +

+Constructs an empty list box item in the list box listbox and +inserts it after the item after or at the beginning if after +is 0. + +

TQListBoxItem::~TQListBoxItem () [virtual] +

+Destroys the list box item. + +

bool TQListBoxItem::current () const +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

int TQListBoxItem::height ( const TQListBox * lb ) const [virtual] +

+ +

Implement this function to return the height of your item. The lb parameter is the same as listBox() and is provided for +convenience and compatibility. +

The default implementation returns +TQApplication::globalStrut()'s height. +

See also paint() and width(). + +

Reimplemented in TQListBoxText and TQListBoxPixmap. +

bool TQListBoxItem::isCurrent () const +

+Returns TRUE if the item is the current item; otherwise returns +FALSE. +

See also TQListBox::currentItem, TQListBox::item(), and isSelected(). + +

bool TQListBoxItem::isSelectable () const +

+Returns TRUE if this item is selectable (the default); otherwise +returns FALSE. +

See also setSelectable(). + +

bool TQListBoxItem::isSelected () const +

+ +

Returns TRUE if the item is selected; otherwise returns FALSE. +

See also TQListBox::isSelected() and isCurrent(). + +

Example: listboxcombo/listboxcombo.cpp. +

TQListBox * TQListBoxItem::listBox () const +

+Returns a pointer to the list box containing this item. + +

TQListBoxItem * TQListBoxItem::next () const +

+Returns the item that comes after this in the list box. If this is +the last item, 0 is returned. +

See also prev(). + +

void TQListBoxItem::paint ( TQPainter * p ) [pure virtual protected] +

+ +

Implement this function to draw your item. The painter, p, is +already open for painting. +

See also height() and width(). + +

Example: listboxcombo/listboxcombo.cpp. +

Reimplemented in TQListBoxText and TQListBoxPixmap. +

const TQPixmap * TQListBoxItem::pixmap () const [virtual] +

+Returns the pixmap associated with the item, or 0 if there isn't +one. +

The default implementation returns 0. + +

Example: listboxcombo/listboxcombo.cpp. +

Reimplemented in TQListBoxPixmap. +

TQListBoxItem * TQListBoxItem::prev () const +

+Returns the item which comes before this in the list box. If this +is the first item, 0 is returned. +

See also next(). + +

int TQListBoxItem::rtti () const [virtual] +

+Returns 0. +

Make your derived classes return their own values for rtti(), and +you can distinguish between listbox items. You should use values +greater than 1000 preferably a large random number, to allow for +extensions to this class. + +

bool TQListBoxItem::selected () const +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

void TQListBoxItem::setCustomHighlighting ( bool b ) [protected] +

+Defines whether the list box item is responsible for drawing +itself in a highlighted state when being selected. +

If b is FALSE (the default), the list box will draw some +default highlight indicator before calling paint(). +

See also selected() and paint(). + +

void TQListBoxItem::setSelectable ( bool b ) +

+If b is TRUE (the default) then this item can be selected by +the user; otherwise this item cannot be selected by the user. +

See also isSelectable(). + +

void TQListBoxItem::setText ( const TQString & text ) [virtual protected] +

+ +

Sets the text of the TQListBoxItem to text. This text is also +used for sorting. The text is not shown unless explicitly drawn in +paint(). +

See also text(). + +

TQString TQListBoxItem::text () const [virtual] +

+Returns the text of the item. This text is also used for sorting. +

See also setText(). + +

Example: listboxcombo/listboxcombo.cpp. +

int TQListBoxItem::width ( const TQListBox * lb ) const [virtual] +

+ +

Reimplement this function to return the width of your item. The lb parameter is the same as listBox() and is provided for +convenience and compatibility. +

The default implementation returns +TQApplication::globalStrut()'s width. +

See also paint() and height(). + +

Reimplemented in TQListBoxText and TQListBoxPixmap. + +


+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/qlistboxpixmap-members.html b/doc/html/qlistboxpixmap-members.html new file mode 100644 index 00000000..272d759b --- /dev/null +++ b/doc/html/qlistboxpixmap-members.html @@ -0,0 +1,65 @@ + + + + + +TQListBoxPixmap Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQListBoxPixmap

+ +

This is the complete list of member functions for +TQListBoxPixmap, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlistboxpixmap.html b/doc/html/qlistboxpixmap.html new file mode 100644 index 00000000..f1115b44 --- /dev/null +++ b/doc/html/qlistboxpixmap.html @@ -0,0 +1,136 @@ + + + + + +TQListBoxPixmap Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQListBoxPixmap Class Reference

+ +

The TQListBoxPixmap class provides list box items with a +pixmap and optional text. +More... +

#include <qlistbox.h> +

Inherits TQListBoxItem. +

List of all member functions. +

Public Members

+
    +
  • TQListBoxPixmap ( TQListBox * listbox, const TQPixmap & pixmap )
  • +
  • TQListBoxPixmap ( const TQPixmap & pixmap )
  • +
  • TQListBoxPixmap ( TQListBox * listbox, const TQPixmap & pixmap, TQListBoxItem * after )
  • +
  • TQListBoxPixmap ( TQListBox * listbox, const TQPixmap & pix, const TQString & text )
  • +
  • TQListBoxPixmap ( const TQPixmap & pix, const TQString & text )
  • +
  • TQListBoxPixmap ( TQListBox * listbox, const TQPixmap & pix, const TQString & text, TQListBoxItem * after )
  • +
  • ~TQListBoxPixmap ()
  • +
  • virtual const TQPixmap * pixmap () const
  • +
  • virtual int height ( const TQListBox * lb ) const
  • +
  • virtual int width ( const TQListBox * lb ) const
  • +
+

Protected Members

+
    +
  • virtual void paint ( TQPainter * painter )
  • +
+

Detailed Description

+ + +The TQListBoxPixmap class provides list box items with a +pixmap and optional text. +

+

Items of this class are drawn with the pixmap on the left with the +optional text to the right of the pixmap. +

See also TQListBox, TQListBoxItem, and Advanced Widgets. + +


Member Function Documentation

+

TQListBoxPixmap::TQListBoxPixmap ( TQListBox * listbox, const TQPixmap & pixmap ) +

+Constructs a new list box item in list box listbox showing the +pixmap pixmap. + +

TQListBoxPixmap::TQListBoxPixmap ( const TQPixmap & pixmap ) +

+Constructs a new list box item showing the pixmap pixmap. + +

TQListBoxPixmap::TQListBoxPixmap ( TQListBox * listbox, const TQPixmap & pixmap, TQListBoxItem * after ) +

+Constructs a new list box item in list box listbox showing the +pixmap pixmap. The item gets inserted after the item after, +or at the beginning if after is 0. + +

TQListBoxPixmap::TQListBoxPixmap ( TQListBox * listbox, const TQPixmap & pix, const TQString & text ) +

+Constructs a new list box item in list box listbox showing the +pixmap pix and the text text. + +

TQListBoxPixmap::TQListBoxPixmap ( const TQPixmap & pix, const TQString & text ) +

+Constructs a new list box item showing the pixmap pix and the +text to text. + +

TQListBoxPixmap::TQListBoxPixmap ( TQListBox * listbox, const TQPixmap & pix, const TQString & text, TQListBoxItem * after ) +

+Constructs a new list box item in list box listbox showing the +pixmap pix and the string text. The item gets inserted after +the item after, or at the beginning if after is 0. + +

TQListBoxPixmap::~TQListBoxPixmap () +

+Destroys the item. + +

int TQListBoxPixmap::height ( const TQListBox * lb ) const [virtual] +

+Returns the height of the pixmap in list box lb. +

See also paint() and width(). + +

Reimplemented from TQListBoxItem. +

void TQListBoxPixmap::paint ( TQPainter * painter ) [virtual protected] +

+Draws the pixmap using painter. + +

Reimplemented from TQListBoxItem. +

const TQPixmap * TQListBoxPixmap::pixmap () const [virtual] +

+ +

Returns the pixmap associated with the item. + +

Reimplemented from TQListBoxItem. +

int TQListBoxPixmap::width ( const TQListBox * lb ) const [virtual] +

+Returns the width of the pixmap plus some margin in list box lb. +

See also paint() and height(). + +

Reimplemented from TQListBoxItem. + +


+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/qlistboxtext-members.html b/doc/html/qlistboxtext-members.html new file mode 100644 index 00000000..eb4ee88d --- /dev/null +++ b/doc/html/qlistboxtext-members.html @@ -0,0 +1,65 @@ + + + + + +TQListBoxText Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQListBoxText

+ +

This is the complete list of member functions for +TQListBoxText, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlistboxtext.html b/doc/html/qlistboxtext.html new file mode 100644 index 00000000..e4efeb56 --- /dev/null +++ b/doc/html/qlistboxtext.html @@ -0,0 +1,109 @@ + + + + + +TQListBoxText Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQListBoxText Class Reference

+ +

The TQListBoxText class provides list box items that display text. +More... +

#include <qlistbox.h> +

Inherits TQListBoxItem. +

List of all member functions. +

Public Members

+
    +
  • TQListBoxText ( TQListBox * listbox, const TQString & text = TQString::null )
  • +
  • TQListBoxText ( const TQString & text = TQString::null )
  • +
  • TQListBoxText ( TQListBox * listbox, const TQString & text, TQListBoxItem * after )
  • +
  • ~TQListBoxText ()
  • +
  • virtual int height ( const TQListBox * lb ) const
  • +
  • virtual int width ( const TQListBox * lb ) const
  • +
+

Protected Members

+
    +
  • virtual void paint ( TQPainter * painter )
  • +
+

Detailed Description

+ + +The TQListBoxText class provides list box items that display text. +

+

The text is drawn in the widget's current font. If you need +several different fonts, you must implement your own subclass of +TQListBoxItem. +

See also TQListBox, TQListBoxItem, and Advanced Widgets. + +


Member Function Documentation

+

TQListBoxText::TQListBoxText ( TQListBox * listbox, const TQString & text = TQString::null ) +

+Constructs a list box item in list box listbox showing the text +text. + +

TQListBoxText::TQListBoxText ( const TQString & text = TQString::null ) +

+Constructs a list box item showing the text text. + +

TQListBoxText::TQListBoxText ( TQListBox * listbox, const TQString & text, TQListBoxItem * after ) +

+Constructs a list box item in list box listbox showing the text +text. The item is inserted after the item after, or at the +beginning if after is 0. + +

TQListBoxText::~TQListBoxText () +

+Destroys the item. + +

int TQListBoxText::height ( const TQListBox * lb ) const [virtual] +

+Returns the height of a line of text in list box lb. +

See also paint() and width(). + +

Reimplemented from TQListBoxItem. +

void TQListBoxText::paint ( TQPainter * painter ) [virtual protected] +

+Draws the text using painter. + +

Reimplemented from TQListBoxItem. +

int TQListBoxText::width ( const TQListBox * lb ) const [virtual] +

+Returns the width of this line in list box lb. +

See also paint() and height(). + +

Reimplemented from TQListBoxItem. + +


+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/qlistiterator.html b/doc/html/qlistiterator.html new file mode 100644 index 00000000..ae63793a --- /dev/null +++ b/doc/html/qlistiterator.html @@ -0,0 +1,48 @@ + + + + + +TQListIterator Class Reference (obsolete) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQListIterator Class Reference (obsolete)

+ + +

+#include <qlist.h>
+ +

The TQListIterator class has been renamed TQPtrListIterator in +TQt 3.0. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlistview-h.html b/doc/html/qlistview-h.html new file mode 100644 index 00000000..c5d0b544 --- /dev/null +++ b/doc/html/qlistview-h.html @@ -0,0 +1,650 @@ + + + + + +qlistview.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qlistview.h

+ +

This is the verbatim text of the qlistview.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qlistview.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQListView widget class
+**
+** Created : 970809
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQLISTVIEW_H
+#define TQLISTVIEW_H
+
+#ifndef QT_H
+#include "qscrollview.h"
+#endif // QT_H
+
+#ifndef QT_NO_LISTVIEW
+
+
+class TQPixmap;
+class TQFont;
+class TQHeader;
+class TQIconSet;
+
+class TQListView;
+struct TQListViewPrivate;
+struct TQCheckListItemPrivate;
+class TQListViewItemIterator;
+struct TQListViewItemIteratorPrivate;
+class TQDragObject;
+class TQMimeSource;
+class TQLineEdit;
+class TQListViewToolTip;
+
+class Q_EXPORT TQListViewItem : public TQt
+{
+    friend class TQListViewItemIterator;
+    friend class TQListViewToolTip;
+
+public:
+    TQListViewItem( TQListView * parent );
+    TQListViewItem( TQListViewItem * parent );
+    TQListViewItem( TQListView * parent, TQListViewItem * after );
+    TQListViewItem( TQListViewItem * parent, TQListViewItem * after );
+
+    TQListViewItem( TQListView * parent,
+		   TQString,     TQString = TQString::null,
+		   TQString = TQString::null, TQString = TQString::null,
+		   TQString = TQString::null, TQString = TQString::null,
+		   TQString = TQString::null, TQString = TQString::null );
+    TQListViewItem( TQListViewItem * parent,
+		   TQString,     TQString = TQString::null,
+		   TQString = TQString::null, TQString = TQString::null,
+		   TQString = TQString::null, TQString = TQString::null,
+		   TQString = TQString::null, TQString = TQString::null );
+
+    TQListViewItem( TQListView * parent, TQListViewItem * after,
+		   TQString,     TQString = TQString::null,
+		   TQString = TQString::null, TQString = TQString::null,
+		   TQString = TQString::null, TQString = TQString::null,
+		   TQString = TQString::null, TQString = TQString::null );
+    TQListViewItem( TQListViewItem * parent, TQListViewItem * after,
+		   TQString,     TQString = TQString::null,
+		   TQString = TQString::null, TQString = TQString::null,
+		   TQString = TQString::null, TQString = TQString::null,
+		   TQString = TQString::null, TQString = TQString::null );
+    virtual ~TQListViewItem();
+
+    virtual void insertItem( TQListViewItem * );
+    virtual void takeItem( TQListViewItem * );
+    virtual void removeItem( TQListViewItem *item ) { takeItem( item ); } //obsolete, use takeItem instead
+
+    int height() const;
+    virtual void invalidateHeight();
+    int totalHeight() const;
+    virtual int width( const TQFontMetrics&,
+		       const TQListView*, int column) const;
+    void widthChanged(int column=-1) const;
+    int depth() const;
+
+    virtual void setText( int, const TQString &);
+    virtual TQString text( int ) const;
+
+    virtual void setPixmap( int, const TQPixmap & );
+    virtual const TQPixmap * pixmap( int ) const;
+
+    virtual TQString key( int, bool ) const;
+    virtual int compare( TQListViewItem *i, int col, bool ) const;
+    virtual void sortChildItems( int, bool );
+
+    int childCount() const { return nChildren; }
+
+    bool isOpen() const { return open; }
+    virtual void setOpen( bool );
+    virtual void setup();
+
+    virtual void setSelected( bool );
+    bool isSelected() const { return selected; }
+
+    virtual void paintCell( TQPainter *, const TQColorGroup & cg,
+			    int column, int width, int alignment );
+    virtual void paintBranches( TQPainter * p, const TQColorGroup & cg,
+				int w, int y, int h );
+    virtual void paintFocus( TQPainter *, const TQColorGroup & cg,
+			     const TQRect & r );
+
+    TQListViewItem * firstChild() const;
+    TQListViewItem * nextSibling() const { return siblingItem; }
+    TQListViewItem * parent() const;
+
+    TQListViewItem * itemAbove();
+    TQListViewItem * itemBelow();
+
+    int itemPos() const;
+
+    TQListView *listView() const;
+
+    virtual void setSelectable( bool enable );
+    bool isSelectable() const { return selectable && enabled; }
+
+    virtual void setExpandable( bool );
+    bool isExpandable() const { return expandable; }
+
+    void repaint() const;
+
+    virtual void sort();
+    void moveItem( TQListViewItem *after );
+
+    virtual void setDragEnabled( bool allow );
+    virtual void setDropEnabled( bool allow );
+    bool dragEnabled() const;
+    bool dropEnabled() const;
+    virtual bool acceptDrop( const TQMimeSource *mime ) const;
+
+    void setVisible( bool b );
+    bool isVisible() const;
+
+    virtual void setRenameEnabled( int col, bool b );
+    bool renameEnabled( int col ) const;
+    virtual void startRename( int col );
+
+    virtual void setEnabled( bool b );
+    bool isEnabled() const;
+
+    virtual int rtti() const;
+    // ### TQt 4: make const or better use an enum
+    static int RTTI;
+
+    virtual void setMultiLinesEnabled( bool b );
+    bool multiLinesEnabled() const;
+
+protected:
+    virtual void enforceSortOrder() const;
+    virtual void setHeight( int );
+    virtual void activate();
+
+    bool activatedPos( TQPoint & );
+#ifndef QT_NO_DRAGANDDROP
+    virtual void dropped( TQDropEvent *e );
+#endif
+    virtual void dragEntered();
+    virtual void dragLeft();
+    virtual void okRename( int col );
+    virtual void cancelRename( int col );
+
+    void ignoreDoubleClick();
+
+private:
+    void init();
+    void moveToJustAfter( TQListViewItem * );
+    void enforceSortOrderBackToRoot();
+    void removeRenameBox();
+
+    int ownHeight;
+    int maybeTotalHeight;
+    int nChildren;
+
+    uint lsc: 14;
+    uint lso: 1;
+    uint open : 1;
+    uint selected : 1;
+    uint selectable: 1;
+    uint configured: 1;
+    uint expandable: 1;
+    uint is_root: 1;
+    uint allow_drag : 1;
+    uint allow_drop : 1;
+    uint visible : 1;
+    uint enabled : 1;
+    uint mlenabled : 1;
+
+    TQListViewItem * parentItem;
+    TQListViewItem * siblingItem;
+    TQListViewItem * childItem;
+    TQLineEdit *renameBox;
+    int renameCol;
+
+    void * columns;
+
+    friend class TQListView;
+};
+
+class TQCheckListItem;
+
+class Q_EXPORT TQListView: public TQScrollView
+{
+    friend class TQListViewItemIterator;
+    friend class TQListViewItem;
+    friend class TQCheckListItem;
+    friend class TQListViewToolTip;
+
+    Q_OBJECT
+    Q_ENUMS( SelectionMode ResizeMode RenameAction )
+    Q_PROPERTY( int columns READ columns )
+    Q_PROPERTY( bool multiSelection READ isMultiSelection WRITE setMultiSelection DESIGNABLE false )
+    Q_PROPERTY( SelectionMode selectionMode READ selectionMode WRITE setSelectionMode )
+    Q_PROPERTY( int childCount READ childCount )
+    Q_PROPERTY( bool allColumnsShowFocus READ allColumnsShowFocus WRITE setAllColumnsShowFocus )
+    Q_PROPERTY( bool showSortIndicator READ showSortIndicator WRITE setShowSortIndicator )
+    Q_PROPERTY( int itemMargin READ itemMargin WRITE setItemMargin )
+    Q_PROPERTY( bool rootIsDecorated READ rootIsDecorated WRITE setRootIsDecorated )
+    Q_PROPERTY( bool showToolTips READ showToolTips WRITE setShowToolTips )
+    Q_PROPERTY( ResizeMode resizeMode READ resizeMode WRITE setResizeMode )
+    Q_PROPERTY( int treeStepSize READ treeStepSize WRITE setTreeStepSize )
+    Q_PROPERTY( RenameAction defaultRenameAction READ defaultRenameAction WRITE setDefaultRenameAction )
+
+public:
+    TQListView( TQWidget* parent=0, const char* name=0, WFlags f = 0 );
+    ~TQListView();
+
+    int treeStepSize() const;
+    virtual void setTreeStepSize( int );
+
+    virtual void insertItem( TQListViewItem * );
+    virtual void takeItem( TQListViewItem * );
+    virtual void removeItem( TQListViewItem *item ) { takeItem( item ); } // obsolete, use takeItem instead
+
+    TQHeader * header() const;
+
+    virtual int addColumn( const TQString &label, int size = -1);
+    virtual int addColumn( const TQIconSet& iconset, const TQString &label, int size = -1);
+    virtual void removeColumn( int index );
+    virtual void setColumnText( int column, const TQString &label );
+    virtual void setColumnText( int column, const TQIconSet& iconset, const TQString &label );
+    TQString columnText( int column ) const;
+    virtual void setColumnWidth( int column, int width );
+    int columnWidth( int column ) const;
+    enum WidthMode { Manual, Maximum };
+    virtual void setColumnWidthMode( int column, WidthMode );
+    WidthMode columnWidthMode( int column ) const;
+    int columns() const;
+
+    virtual void setColumnAlignment( int, int );
+    int columnAlignment( int ) const;
+
+    void show();
+
+    TQListViewItem * itemAt( const TQPoint & screenPos ) const;
+    TQRect itemRect( const TQListViewItem * ) const;
+    int itemPos( const TQListViewItem * );
+
+    void ensureItemVisible( const TQListViewItem * );
+
+    void repaintItem( const TQListViewItem * ) const;
+
+    virtual void setMultiSelection( bool enable );
+    bool isMultiSelection() const;
+
+    enum SelectionMode { Single, Multi, Extended, NoSelection  };
+    void setSelectionMode( SelectionMode mode );
+    SelectionMode selectionMode() const;
+
+    virtual void clearSelection();
+    virtual void setSelected( TQListViewItem *, bool );
+    void setSelectionAnchor( TQListViewItem * );
+    bool isSelected( const TQListViewItem * ) const;
+    TQListViewItem * selectedItem() const;
+    virtual void setOpen( TQListViewItem *, bool );
+    bool isOpen( const TQListViewItem * ) const;
+
+    virtual void setCurrentItem( TQListViewItem * );
+    TQListViewItem * currentItem() const;
+
+    TQListViewItem * firstChild() const;
+    TQListViewItem * lastItem() const;
+
+    int childCount() const;
+
+    virtual void setAllColumnsShowFocus( bool );
+    bool allColumnsShowFocus() const;
+
+    virtual void setItemMargin( int );
+    int itemMargin() const;
+
+    virtual void setRootIsDecorated( bool );
+    bool rootIsDecorated() const;
+
+    virtual void setSorting( int column, bool ascending = TRUE );
+    int sortColumn() const;
+    void setSortColumn( int column );
+    SortOrder sortOrder() const;
+    void setSortOrder( SortOrder order );
+    virtual void sort();
+
+    virtual void setFont( const TQFont & );
+    virtual void setPalette( const TQPalette & );
+
+    bool eventFilter( TQObject * o, TQEvent * );
+
+    TQSize sizeHint() const;
+    TQSize minimumSizeHint() const;
+
+    virtual void setShowSortIndicator( bool show );
+    bool showSortIndicator() const;
+    virtual void setShowToolTips( bool b );
+    bool showToolTips() const;
+
+    enum ResizeMode { NoColumn, AllColumns, LastColumn };
+    virtual void setResizeMode( ResizeMode m );
+    ResizeMode resizeMode() const;
+
+    TQListViewItem * findItem( const TQString& text, int column, ComparisonFlags compare = ExactMatch | CaseSensitive ) const;
+
+    enum RenameAction { Accept, Reject };
+    virtual void setDefaultRenameAction( RenameAction a );
+    RenameAction defaultRenameAction() const;
+    bool isRenaming() const;
+
+    void hideColumn( int column );
+
+public slots:
+    virtual void clear();
+    virtual void invertSelection();
+    virtual void selectAll( bool select );
+    void triggerUpdate();
+    void setContentsPos( int x, int y );
+    void adjustColumn( int col );
+
+signals:
+    void selectionChanged();
+    void selectionChanged( TQListViewItem * );
+    void currentChanged( TQListViewItem * );
+    void clicked( TQListViewItem * );
+    void clicked( TQListViewItem *, const TQPoint &, int );
+    void pressed( TQListViewItem * );
+    void pressed( TQListViewItem *, const TQPoint &, int );
+
+    void doubleClicked( TQListViewItem * );
+    void doubleClicked( TQListViewItem *, const TQPoint&, int );
+    void returnPressed( TQListViewItem * );
+    void spacePressed( TQListViewItem * );
+    void rightButtonClicked( TQListViewItem *, const TQPoint&, int );
+    void rightButtonPressed( TQListViewItem *, const TQPoint&, int );
+    void mouseButtonPressed( int, TQListViewItem *, const TQPoint& , int );
+    void mouseButtonClicked( int, TQListViewItem *,  const TQPoint&, int );
+
+    void contextMenuRequested( TQListViewItem *, const TQPoint &, int );
+
+    void onItem( TQListViewItem *item );
+    void onViewport();
+
+    void expanded( TQListViewItem *item );
+    void collapsed( TQListViewItem *item );
+#ifndef QT_NO_DRAGANDDROP
+    void dropped( TQDropEvent *e );
+#endif
+    void itemRenamed( TQListViewItem *item, int col, const TQString & );
+    void itemRenamed( TQListViewItem *item, int col  );
+
+protected:
+    void contentsMousePressEvent( TQMouseEvent * e );
+    void contentsMouseReleaseEvent( TQMouseEvent * e );
+    void contentsMouseMoveEvent( TQMouseEvent * e );
+    void contentsMouseDoubleClickEvent( TQMouseEvent * e );
+    void contentsContextMenuEvent( TQContextMenuEvent * e );
+#ifndef QT_NO_DRAGANDDROP
+    void contentsDragEnterEvent( TQDragEnterEvent *e );
+    void contentsDragMoveEvent( TQDragMoveEvent *e );
+    void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+    void contentsDropEvent( TQDropEvent *e );
+    virtual TQDragObject *dragObject();
+    virtual void startDrag();
+#endif
+
+    void focusInEvent( TQFocusEvent * e );
+    void focusOutEvent( TQFocusEvent * e );
+
+    void keyPressEvent( TQKeyEvent *e );
+
+    void resizeEvent( TQResizeEvent *e );
+    void viewportResizeEvent( TQResizeEvent *e );
+
+    void showEvent( TQShowEvent * );
+
+    void drawContentsOffset( TQPainter *, int ox, int oy,
+			     int cx, int cy, int cw, int ch );
+
+    virtual void paintEmptyArea( TQPainter *, const TQRect & );
+    void styleChange( TQStyle& );
+    void windowActivationChange( bool );
+
+protected slots:
+    void updateContents();
+    void doAutoScroll();
+
+private slots:
+    void changeSortColumn( int );
+    void handleIndexChange();
+    void updateDirtyItems();
+    void makeVisible();
+    void handleSizeChange( int, int, int );
+    void startRename();
+    void openFocusItem();
+
+private:
+    void contentsMousePressEventEx( TQMouseEvent * e );
+    void contentsMouseReleaseEventEx( TQMouseEvent * e );
+    void init();
+    void updateGeometries();
+    void buildDrawableList() const;
+    void reconfigureItems();
+    void widthChanged(const TQListViewItem*, int c);
+    void handleItemChange( TQListViewItem *old, bool shift, bool control );
+    void selectRange( TQListViewItem *from, TQListViewItem *to, bool invert, bool includeFirst, bool clearSel = FALSE );
+    bool selectRange( TQListViewItem *newItem, TQListViewItem *oldItem, TQListViewItem *anchorItem );
+    bool clearRange( TQListViewItem *from, TQListViewItem *to, bool includeFirst = TRUE );
+    void doAutoScroll( const TQPoint &cursorPos );
+
+    TQListViewPrivate * d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQListView( const TQListView & );
+    TQListView &operator=( const TQListView & );
+#endif
+};
+
+
+class Q_EXPORT TQCheckListItem : public TQListViewItem
+{
+public:
+    enum Type { RadioButton,
+		CheckBox,
+		Controller,
+		RadioButtonController=Controller,
+		CheckBoxController };
+    // ### should be integrated with qbutton in ver4 perhaps
+    enum ToggleState { Off, NoChange, On };
+
+    TQCheckListItem( TQCheckListItem *parent, const TQString &text,
+		    Type = RadioButtonController );
+    TQCheckListItem( TQCheckListItem *parent, TQListViewItem *after,
+ 		    const TQString &text, Type = RadioButtonController );
+    TQCheckListItem( TQListViewItem *parent, const TQString &text,
+		    Type = RadioButtonController );
+    TQCheckListItem( TQListViewItem *parent, TQListViewItem *after,
+ 		    const TQString &text, Type = RadioButtonController );
+    TQCheckListItem( TQListView *parent, const TQString &text,
+		    Type = RadioButtonController );
+    TQCheckListItem( TQListView *parent, TQListViewItem *after,
+ 		    const TQString &text, Type = RadioButtonController );
+    TQCheckListItem( TQListViewItem *parent, const TQString &text,
+		    const TQPixmap & );
+    TQCheckListItem( TQListView *parent, const TQString &text,
+		    const TQPixmap & );
+    ~TQCheckListItem();
+
+    void paintCell( TQPainter *,  const TQColorGroup & cg,
+		    int column, int width, int alignment );
+    virtual void paintFocus( TQPainter *, const TQColorGroup & cg,
+			     const TQRect & r );
+    int width( const TQFontMetrics&, const TQListView*, int column) const;
+    void setup();
+
+    virtual void setOn( bool ); // ### should be replaced by setChecked in ver4
+    bool isOn() const { return on; }
+    Type type() const { return myType; }
+    TQString text() const { return TQListViewItem::text( 0 ); }
+    TQString text( int n ) const { return TQListViewItem::text( n ); }
+
+    void setTristate( bool );
+    bool isTristate() const;
+    ToggleState state() const;
+    void setState( ToggleState s);
+
+    int rtti() const;
+    static int RTTI;
+
+protected:
+    void activate();
+    void turnOffChild();
+    virtual void stateChange( bool );
+
+private:
+    void init();
+    ToggleState internalState() const;
+    void setStoredState( ToggleState newState, void *key );
+    ToggleState storedState( void *key ) const;
+    void stateChange( ToggleState s );
+    void restoreState( void *key, int depth = 0 );
+    void updateController( bool update = TRUE , bool store = FALSE );
+    void updateStoredState( void *key );
+    void setState( ToggleState s, bool update, bool store );
+    void setCurrentState( ToggleState s );
+
+    Type myType;
+    bool on; // ### remove in ver4
+    TQCheckListItemPrivate *d;
+};
+
+class Q_EXPORT TQListViewItemIterator
+{
+    friend struct TQListViewPrivate;
+    friend class TQListView;
+    friend class TQListViewItem;
+
+public:
+    enum IteratorFlag {
+	Visible = 		0x00000001,
+	Invisible = 		0x00000002,
+	Selected =		0x00000004,
+	Unselected = 		0x00000008,
+	Selectable =		0x00000010,
+	NotSelectable =		0x00000020,
+	DragEnabled =		0x00000040,
+	DragDisabled =		0x00000080,
+	DropEnabled =		0x00000100,
+	DropDisabled =		0x00000200,
+	Expandable =		0x00000400,
+	NotExpandable =		0x00000800,
+	Checked =		0x00001000,
+	NotChecked =		0x00002000
+    };
+
+    TQListViewItemIterator();
+    TQListViewItemIterator( TQListViewItem *item );
+    TQListViewItemIterator( TQListViewItem *item, int iteratorFlags );
+
+    TQListViewItemIterator( const TQListViewItemIterator &it );
+    TQListViewItemIterator( TQListView *lv );
+    TQListViewItemIterator( TQListView *lv, int iteratorFlags );
+
+    TQListViewItemIterator &operator=( const TQListViewItemIterator &it );
+
+    ~TQListViewItemIterator();
+
+    TQListViewItemIterator &operator++();
+    const TQListViewItemIterator operator++( int );
+    TQListViewItemIterator &operator+=( int j );
+
+    TQListViewItemIterator &operator--();
+    const TQListViewItemIterator operator--( int );
+    TQListViewItemIterator &operator-=( int j );
+
+    TQListViewItem* operator*();
+    TQListViewItem *current() const;
+
+protected:
+    TQListViewItem *curr;
+    TQListView *listView;
+
+private:
+    TQListViewItemIteratorPrivate* d() const;
+    void init( int flags );
+    void addToListView();
+    void currentRemoved();
+    bool matchesFlags( const TQListViewItem* ) const;
+    bool testPair( TQListViewItemIterator::IteratorFlag, TQListViewItemIterator::IteratorFlag, bool ) const;
+    bool isChecked( const TQListViewItem* ) const;
+};
+
+#endif // QT_NO_LISTVIEW
+
+#endif // TQLISTVIEW_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlistview-m.png b/doc/html/qlistview-m.png new file mode 100644 index 00000000..0671cb07 Binary files /dev/null and b/doc/html/qlistview-m.png differ diff --git a/doc/html/qlistview-members.html b/doc/html/qlistview-members.html new file mode 100644 index 00000000..9e95fc21 --- /dev/null +++ b/doc/html/qlistview-members.html @@ -0,0 +1,512 @@ + + + + + +TQListView Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQListView

+ +

This is the complete list of member functions for +TQListView, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlistview-w.png b/doc/html/qlistview-w.png new file mode 100644 index 00000000..98b4d202 Binary files /dev/null and b/doc/html/qlistview-w.png differ diff --git a/doc/html/qlistview.html b/doc/html/qlistview.html new file mode 100644 index 00000000..35e7d359 --- /dev/null +++ b/doc/html/qlistview.html @@ -0,0 +1,1231 @@ + + + + + +TQListView Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQListView Class Reference

+ +

The TQListView class implements a list/tree view. +More... +

#include <qlistview.h> +

Inherits TQScrollView. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • bool allColumnsShowFocus - whether items should show keyboard focus using all columns
  • +
  • int childCount - the number of parentless (top-level) TQListViewItem objects in this TQListView  (read only)
  • +
  • int columns - the number of columns in this list view  (read only)
  • +
  • RenameAction defaultRenameAction - what action to perform when the editor loses focus during renaming
  • +
  • int itemMargin - the advisory item margin that list items may use
  • +
  • bool multiSelection - whether the list view is in multi-selection or extended-selection mode  (obsolete)
  • +
  • ResizeMode resizeMode - whether all, none or the only the last column should be resized
  • +
  • bool rootIsDecorated - whether the list view shows open/close signs on root items
  • +
  • SelectionMode selectionMode - the list view's selection mode
  • +
  • bool showSortIndicator - whether the list view header should display a sort indicator
  • +
  • bool showToolTips - whether this list view should show tooltips for truncated column texts
  • +
  • int treeStepSize - the number of pixels a child is offset from its parent
  • +
+

Protected Members

+ +

Protected Slots

+ +

Detailed Description

+ + +The TQListView class implements a list/tree view. +

+ +

It can display and control a hierarchy of multi-column items, and +provides the ability to add new items at any time. The user may +select one or many items (depending on the SelectionMode) and +sort the list in increasing or decreasing order by any column. +

The simplest pattern of use is to create a TQListView, add some +column headers using addColumn() and create one or more +TQListViewItem or TQCheckListItem objects with the TQListView as +parent: +

+ +

        TQListView * table;
+
+ +
        table->addColumn( "Qualified name" );
+        table->addColumn( "Namespace" );
+
            element = new TQListViewItem( table, qName, namespaceURI );
+
+

Further nodes can be added to the list view object (the root of the +tree) or as child nodes to TQListViewItems: +

            for ( int i = 0 ; i < attributes.length(); i++ ) {
+                new TQListViewItem( element, attributes.qName(i), attributes.uri(i) );
+            }
+
+

(From xml/tagreader-with-features/structureparser.cpp) +

The main setup functions are: +

+
Function Action +
addColumn() +Adds a column with a text label and perhaps width. Columns +are counted from the left starting with column 0. +
setColumnWidthMode() +Sets the column to be resized automatically or not. +
setAllColumnsShowFocus() +Sets whether items should show keyboard focus using all +columns or just column 0. The default is to show focus +just using column 0. +
setRootIsDecorated() +Sets whether root items should show open/close decoration to their left. +The default is FALSE. +
setTreeStepSize() +Sets how many pixels an item's children are indented +relative to their parent. The default is 20. This is +mostly a matter of taste. +
setSorting() +Sets whether the items should be sorted, whether it should +be in ascending or descending order, and by what column +they should be sorted. By default the list view is sorted +by the first column; to switch this off call setSorting(-1). +
+

To handle events such as mouse presses on the list view, derived +classes can reimplement the TQScrollView functions: +contentsMousePressEvent, +contentsMouseReleaseEvent, +contentsMouseDoubleClickEvent, +contentsMouseMoveEvent, +contentsDragEnterEvent, +contentsDragMoveEvent, +contentsDragLeaveEvent, +contentsDropEvent, and +contentsWheelEvent. +

There are also several functions for mapping between items and +coordinates. itemAt() returns the item at a position on-screen, +itemRect() returns the rectangle an item occupies on the screen, +and itemPos() returns the position of any item (whether it is +on-screen or not). firstChild() returns the list view's first item +(not necessarily visible on-screen). +

You can iterate over visible items using +TQListViewItem::itemBelow(); over a list view's top-level items +using TQListViewItem::firstChild() and +TQListViewItem::nextSibling(); or every item using a +TQListViewItemIterator. See +the TQListViewItem documentation for examples of traversal. +

An item can be moved amongst its siblings using +TQListViewItem::moveItem(). To move an item in the hierarchy use +takeItem() and insertItem(). Item's (and all their child items) +are deleted with delete; to delete all the list view's items +use clear(). +

There are a variety of selection modes described in the +TQListView::SelectionMode documentation. The default is Single +selection, which you can change using setSelectionMode(). +

Because TQListView offers multiple selection it must display +keyboard focus and selection state separately. Therefore there are +functions both to set the selection state of an item +(setSelected()) and to set which item displays keyboard focus +(setCurrentItem()). +

TQListView emits two groups of signals; one group signals changes +in selection/focus state and one indicates selection. The first +group consists of selectionChanged() (applicable to all list +views), selectionChanged(TQListViewItem*) (applicable only to a +Single selection list view), and currentChanged(TQListViewItem*). +The second group consists of doubleClicked(TQListViewItem*), +returnPressed(TQListViewItem*), +rightButtonClicked(TQListViewItem*, const TQPoint&, int), etc. +

Note that changing the state of the list view in a slot connected +to a list view signal may cause unexpected side effects. If you +need to change the list view's state in response to a signal, use +a single shot timer with a +time out of 0, and connect this timer to a slot that modifies the +list view's state. +

In Motif style, TQListView deviates fairly strongly from the look +and feel of the Motif hierarchical tree view. This is done mostly +to provide a usable keyboard interface and to make the list view +look better with a white background. +

If selectionMode() is Single (the default) the user can select +one item at a time, e.g. by clicking an item with the mouse, see +TQListView::SelectionMode for details. +

The list view can be navigated either using the mouse or the +keyboard. Clicking a - icon closes an item (hides its +children) and clicking a + icon opens an item (shows its +children). The keyboard controls are these: +

+
Keypress Action +
Home +Make the first item current and visible. +
End +Make the last item current and visible. +
Page Up +Make the item above the top visible item current and visible. +
Page Down +Make the item below the bottom visible item current and visible. +
Up Arrow +Make the item above the current item current and visible. +
Down Arrow +Make the item below the current item current and visible. +
Left Arrow +If the current item is closed (+ icon) or has no +children, make its parent item current and visible. If the +current item is open (- icon) close it, i.e. hide its +children. Exception: if the current item is the first item +and is closed and the horizontal scrollbar is offset to +the right the list view will be scrolled left. +
Right Arrow +If the current item is closed (+ icon) and has +children, the item is opened. If the current item is +opened (- icon) and has children the item's first +child is made current and visible. If the current item has +no children the list view is scrolled right. +
+

If the user starts typing letters with the focus in the list view +an incremental search will occur. For example if the user types +'d' the current item will change to the first item that begins +with the letter 'd'; if they then type 'a', the current item will +change to the first item that begins with 'da', and so on. If no +item begins with the letters they type the current item doesn't +change. +

Warning: The list view assumes ownership of all list view items +and will delete them when it does not need them any more. +

+

See also TQListViewItem, TQCheckListItem, and Advanced Widgets. + +


Member Type Documentation

+

TQListView::RenameAction

+ +

This enum describes whether a rename operation is accepted if the +rename editor loses focus without the user pressing Enter. +

    +
  • TQListView::Accept - Rename if Enter is pressed or focus is lost. +
  • TQListView::Reject - Discard the rename operation if focus is lost (and +Enter has not been pressed). +
+

TQListView::ResizeMode

+ +

This enum describes how the list view's header adjusts to resize +events which affect the width of the list view. +

    +
  • TQListView::NoColumn - The columns do not get resized in resize events. +
  • TQListView::AllColumns - All columns are resized equally to fit the width +of the list view. +
  • TQListView::LastColumn - The last column is resized to fit the width of +the list view. +
+

TQListView::SelectionMode

+ +

This enumerated type is used by TQListView to indicate how it +reacts to selection by the user. +

    +
  • TQListView::Single - When the user selects an item, any already-selected +item becomes unselected. The user can unselect the selected +item by clicking on some empty space within the view. +
  • TQListView::Multi - When the user selects an item in the usual way, the +selection status of that item is toggled and the other items are +left alone. Also, multiple items can be selected by dragging the +mouse while the left mouse button stays pressed. +
  • TQListView::Extended - When the user selects an item in the usual way, +the selection is cleared and the new item selected. However, if +the user presses the Ctrl key when clicking on an item, the +clicked item gets toggled and all other items are left untouched. +And if the user presses the Shift key while clicking on an item, +all items between the current item and the clicked item get +selected or unselected, depending on the state of the clicked +item. Also, multiple items can be selected by dragging the mouse +over them. +
  • TQListView::NoSelection - Items cannot be selected. +

In other words, Single is a real single-selection list view, Multi a real multi-selection list view, Extended is a list view +where users can select multiple items but usually want to select +either just one or a range of contiguous items, and NoSelection +is a list view where the user can look but not touch. + +

TQListView::WidthMode

+ +

This enum type describes how the width of a column in the view +changes. +

    +
  • TQListView::Manual - the column width does not change automatically. +
  • TQListView::Maximum - the column is automatically sized according to the +widths of all items in the column. (Note: The column never shrinks +in this case.) This means that the column is always resized to the +width of the item with the largest width in the column. +

See also setColumnWidth(), setColumnWidthMode(), and columnWidth(). + +


Member Function Documentation

+

TQListView::TQListView ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

+Constructs a new empty list view called name with parent parent. +

Performance is boosted by modifying the widget flags f so that +only part of the TQListViewItem children is redrawn. This may be +unsuitable for custom TQListViewItem classes, in which case WStaticContents and WNoAutoErase should be cleared. +

See also TQWidget::clearWFlags() and TQt::WidgetFlags. + +

TQListView::~TQListView () +

+Destroys the list view, deleting all its items, and frees up all +allocated resources. + +

int TQListView::addColumn ( const TQString & label, int width = -1 ) [virtual] +

+Adds a width pixels wide column with the column header label +to the list view, and returns the index of the new column. +

All columns apart from the first one are inserted to the right of +the existing ones. +

If width is negative, the new column's WidthMode is set to +Maximum instead of Manual. +

See also setColumnText(), setColumnWidth(), and setColumnWidthMode(). + +

Examples: addressbook/centralwidget.cpp, checklists/checklists.cpp, dirview/main.cpp, fileiconview/mainwindow.cpp, listviews/listviews.cpp, and qdir/qdir.cpp. +

int TQListView::addColumn ( const TQIconSet & iconset, const TQString & label, int width = -1 ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Adds a width pixels wide new column with the header label +and the iconset to the list view, and returns the index of the +column. +

If width is negative, the new column's WidthMode is set to +Maximum, and to Manual otherwise. +

See also setColumnText(), setColumnWidth(), and setColumnWidthMode(). + +

void TQListView::adjustColumn ( int col ) [slot] +

Adjusts the column col to its preferred width +

bool TQListView::allColumnsShowFocus () const +

Returns TRUE if items should show keyboard focus using all columns; otherwise returns FALSE. +See the "allColumnsShowFocus" property for details. +

int TQListView::childCount () const +

Returns the number of parentless (top-level) TQListViewItem objects in this TQListView. +See the "childCount" property for details. +

void TQListView::clear () [virtual slot] +

+Removes and deletes all the items in this list view and triggers +an update. +

Note that the currentChanged() signal is not emitted when this slot is invoked. +

See also triggerUpdate(). + +

Examples: addressbook/centralwidget.cpp, checklists/checklists.cpp, listviews/listviews.cpp, and qutlook/centralwidget.cpp. +

void TQListView::clearSelection () [virtual] +

+Sets all the items to be not selected, updates the list view as +necessary, and emits the selectionChanged() signals. Note that for +Multi selection list views this function needs to iterate over +all items. +

See also setSelected() and multiSelection. + +

Example: addressbook/centralwidget.cpp. +

void TQListView::clicked ( TQListViewItem * item ) [signal] +

+ +

This signal is emitted whenever the user clicks (mouse pressed and mouse released) in the list view. item is the clicked list +view item, or 0 if the user didn't click on an item. +

Warning: Do not delete any TQListViewItem objects in slots +connected to this signal. + +

Example: addressbook/centralwidget.cpp. +

void TQListView::clicked ( TQListViewItem * item, const TQPoint & pnt, int c ) [signal] +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted whenever the user clicks (mouse pressed and mouse released) in the list view. item is the clicked list +view item, or 0 if the user didn't click on an item. pnt is the +position where the user has clicked in global coordinates. If item is not 0, c is the list view column into which the user +pressed; if item is 0 c's value is undefined. +

Warning: Do not delete any TQListViewItem objects in slots +connected to this signal. + +

void TQListView::collapsed ( TQListViewItem * item ) [signal] +

+ +

This signal is emitted when the item has been collapsed, i.e. +when the children of item are hidden. +

See also setOpen() and expanded(). + +

int TQListView::columnAlignment ( int column ) const +

+Returns the alignment of column column. The default is AlignAuto. +

See also TQt::AlignmentFlags. + +

TQString TQListView::columnText ( int c ) const +

+Returns the text of column c. +

See also setColumnText(). + +

int TQListView::columnWidth ( int c ) const +

+Returns the width of column c. +

See also setColumnWidth(). + +

WidthMode TQListView::columnWidthMode ( int c ) const +

+Returns the WidthMode for column c. +

See also setColumnWidthMode(). + +

int TQListView::columns () const +

Returns the number of columns in this list view. +See the "columns" property for details. +

void TQListView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) [virtual protected] +

+Processes the mouse double-click event e on behalf of the viewed widget. + +

Reimplemented from TQScrollView. +

void TQListView::contentsMouseMoveEvent ( TQMouseEvent * e ) [virtual protected] +

+Processes the mouse move event e on behalf of the viewed widget. + +

Example: dirview/dirview.cpp. +

Reimplemented from TQScrollView. +

void TQListView::contentsMousePressEvent ( TQMouseEvent * e ) [virtual protected] +

+Processes the mouse press event e on behalf of the viewed widget. + +

Example: dirview/dirview.cpp. +

Reimplemented from TQScrollView. +

void TQListView::contentsMouseReleaseEvent ( TQMouseEvent * e ) [virtual protected] +

+Processes the mouse release event e on behalf of the viewed widget. + +

Example: dirview/dirview.cpp. +

Reimplemented from TQScrollView. +

void TQListView::contextMenuRequested ( TQListViewItem * item, const TQPoint & pos, int col ) [signal] +

+ +

This signal is emitted when the user invokes a context menu with +the right mouse button or with special system keys. If the +keyboard was used item is the current item; if the mouse was +used, item is the item under the mouse pointer or 0 if there is +no item under the mouse pointer. If no item is clicked, the column +index emitted is -1. +

pos is the position for the context menu in the global +coordinate system. +

col is the column on which the user pressed, or -1 if the +signal was triggered by a key event. + +

Example: listviews/listviews.cpp. +

void TQListView::currentChanged ( TQListViewItem * ) [signal] +

+ +

This signal is emitted whenever the current item has changed +(normally after the screen update). The current item is the item +responsible for indicating keyboard focus. +

The argument is the newly current item, or 0 if the change made no +item current. This can happen, for example, if all items in the +list view are deleted. +

Warning: Do not delete any TQListViewItem objects in slots +connected to this signal. +

See also setCurrentItem() and currentItem(). + +

Example: listviews/listviews.cpp. +

TQListViewItem * TQListView::currentItem () const +

+Returns the current item, or 0 if there isn't one. +

See also setCurrentItem(). + +

Examples: addressbook/centralwidget.cpp, listviews/listviews.cpp, and qutlook/centralwidget.cpp. +

RenameAction TQListView::defaultRenameAction () const +

Returns what action to perform when the editor loses focus during renaming. +See the "defaultRenameAction" property for details. +

void TQListView::doAutoScroll () [protected slot] +

+This slot handles auto-scrolling when the mouse button is pressed +and the mouse is outside the widget. + +

void TQListView::doubleClicked ( TQListViewItem *, const TQPoint &, int ) [signal] +

+ +

This signal is emitted whenever an item is double-clicked. It's +emitted on the second button press, not the second button release. +The arguments are the relevant TQListViewItem (may be 0), the point +in global coordinates and the relevant column (or -1 if the click +was outside the list). +

Warning: Do not delete any TQListViewItem objects in slots +connected to this signal. + +

void TQListView::doubleClicked ( TQListViewItem * item ) [signal] +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +(use doubleClicked( TQListViewItem *, const TQPoint&, int )) +

This signal is emitted whenever an item is double-clicked. It's +emitted on the second button press, not the second button release. +item is the list view item on which the user did the +double-click. + +

TQDragObject * TQListView::dragObject () [virtual protected] +

+If the user presses the mouse on an item and starts moving the +mouse, and the item allow dragging (see +TQListViewItem::setDragEnabled()), this function is called to get a +drag object and a drag is started unless dragObject() returns 0. +

By default this function returns 0. You should reimplement it and +create a TQDragObject depending on the selected items. + +

void TQListView::drawContentsOffset ( TQPainter * p, int ox, int oy, int cx, int cy, int cw, int ch ) [virtual protected] +

+Calls TQListViewItem::paintCell() and +TQListViewItem::paintBranches() as necessary for all list view +items that retquire repainting in the cw pixels wide and ch +pixels high bounding rectangle starting at position cx, cy +with offset ox, oy. Uses the painter p. + +

Reimplemented from TQScrollView. +

void TQListView::dropped ( TQDropEvent * e ) [signal] +

+ +

This signal is emitted, when a drop event occurred on the +viewport (not onto an item). +

e provides all the information about the drop. + +

void TQListView::ensureItemVisible ( const TQListViewItem * i ) +

+Ensures that item i is visible, scrolling the list view +vertically if necessary and opening (expanding) any parent items +if this is retquired to show the item. +

See also itemRect() and TQScrollView::ensureVisible(). + +

bool TQListView::eventFilter ( TQObject * o, TQEvent * e ) [virtual] +

+Redirects the event e relating to object o, for the viewport +to mousePressEvent(), keyPressEvent() and friends. + +

Reimplemented from TQScrollView. +

void TQListView::expanded ( TQListViewItem * item ) [signal] +

+ +

This signal is emitted when item has been expanded, i.e. when +the children of item are shown. +

See also setOpen() and collapsed(). + +

TQListViewItem * TQListView::findItem ( const TQString & text, int column, ComparisonFlags compare = ExactMatch | CaseSensitive ) const +

+Finds the first list view item in column column, that matches +text and returns the item, or returns 0 of no such item could +be found. +The search starts from the current item if the current item exists, +otherwise it starts from the first list view item. After reaching +the last item the search continues from the first item. +Pass OR-ed together TQt::StringComparisonMode values +in the compare flag, to control how the matching is performed. +The default comparison mode is case-sensitive, exact match. + +

TQListViewItem * TQListView::firstChild () const +

+Returns the first item in this TQListView. Returns 0 if there is no +first item. +

A list view's items can be traversed using firstChild() +and nextSibling() or using a TQListViewItemIterator. +

See also itemAt(), TQListViewItem::itemBelow(), and TQListViewItem::itemAbove(). + +

Examples: addressbook/centralwidget.cpp and listviews/listviews.cpp. +

TQHeader * TQListView::header () const +

+Returns the TQHeader object that manages this list view's columns. +Please don't modify the header behind the list view's back. +

You may safely call TQHeader::setClickEnabled(), +TQHeader::setResizeEnabled(), TQHeader::setMovingEnabled(), +TQHeader::hide() and all the const TQHeader functions. + +

Examples: listviews/listviews.cpp and qdir/qdir.cpp. +

void TQListView::hideColumn ( int column ) +

+Hides the column specified at column. This is a convenience +function that calls setColumnWidth( column, 0 ). +

Note: The user may still be able to resize the hidden column using +the header handles. To prevent this, call setResizeEnabled(FALSE, +column) on the list views header. +

See also setColumnWidth(). + +

void TQListView::insertItem ( TQListViewItem * i ) [virtual] +

+Inserts item i into the list view as a top-level item. You do +not need to call this unless you've called takeItem(i) or +TQListViewItem::takeItem(i) and need to reinsert i elsewhere. +

See also TQListViewItem::takeItem() and takeItem(). + +

void TQListView::invertSelection () [virtual slot] +

+Inverts the selection. Only works in Multi and Extended +selection modes. + +

bool TQListView::isMultiSelection () const +

Returns TRUE if the list view is in multi-selection or extended-selection mode; otherwise returns FALSE. +See the "multiSelection" property for details. +

bool TQListView::isOpen ( const TQListViewItem * item ) const +

+Identical to item->isOpen(). Provided for completeness. +

See also setOpen(). + +

bool TQListView::isRenaming () const +

+Returns TRUE if an item is being renamed; otherwise returns FALSE. + +

bool TQListView::isSelected ( const TQListViewItem * i ) const +

+Returns TRUE if the list view item i is selected; otherwise +returns FALSE. +

See also TQListViewItem::isSelected(). + +

TQListViewItem * TQListView::itemAt ( const TQPoint & viewPos ) const +

+Returns the list view item at viewPos. Note that viewPos is +in the viewport()'s coordinate system, not in the list view's own, +much larger, coordinate system. +

itemAt() returns 0 if there is no such item. +

Note that you also get the pointer to the item if viewPos +points to the root decoration (see setRootIsDecorated()) of the +item. To check whether or not viewPos is on the root decoration +of the item, you can do something like this: +

+    TQListViewItem *i = itemAt( p );
+    if ( i ) {
+        if ( p.x() > header()->sectionPos( header()->mapToIndex( 0 ) ) +
+                treeStepSize() * ( i->depth() + ( rootIsDecorated() ? 1 : 0) ) + itemMargin() ||
+                p.x() < header()->sectionPos( header()->mapToIndex( 0 ) ) ) {
+            ; // p is not on root decoration
+        else
+            ; // p is on the root decoration
+    }
+    
+ +

This might be interesting if you use this function to find out +where the user clicked and if you want to start a drag (which you +do not want to do if the user clicked onto the root decoration of +an item). +

See also itemPos(), itemRect(), and viewportToContents(). + +

int TQListView::itemMargin () const +

Returns the advisory item margin that list items may use. +See the "itemMargin" property for details. +

int TQListView::itemPos ( const TQListViewItem * item ) +

+Returns the y-coordinate of item in the list view's coordinate +system. This function is normally much slower than itemAt() but it +works for all items, whereas itemAt() normally works only for +items on the screen. +

This is a thin wrapper around TQListViewItem::itemPos(). +

See also itemAt() and itemRect(). + +

TQRect TQListView::itemRect ( const TQListViewItem * i ) const +

+Returns the rectangle on the screen that item i occupies in +viewport()'s coordinates, or an invalid rectangle if i is 0 or +is not currently visible. +

The rectangle returned does not include any children of the +rectangle (i.e. it uses TQListViewItem::height(), rather than +TQListViewItem::totalHeight()). If you want the rectangle to +include children you can use something like this: +

+    TQRect r( listView->itemRect( item ) );
+    r.setHeight( (TQCOORD)(TQMIN( item->totalHeight(),
+                                listView->viewport->height() - r.y() ) ) )
+    
+ +

Note the way it avoids too-high rectangles. totalHeight() can be +much larger than the window system's coordinate system allows. +

itemRect() is comparatively slow. It's best to call it only for +items that are probably on-screen. + +

void TQListView::itemRenamed ( TQListViewItem * item, int col, const TQString & text ) [signal] +

+ +

This signal is emitted when item has been renamed to text, +e.g. by in in-place renaming, in column col. +

See also TQListViewItem::setRenameEnabled(). + +

void TQListView::itemRenamed ( TQListViewItem * item, int col ) [signal] +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted when item has been renamed, e.g. by +in-place renaming, in column col. +

See also TQListViewItem::setRenameEnabled(). + +

TQListViewItem * TQListView::lastItem () const +

+Returns the last item in the list view tree. Returns 0 if there +are no items in the TQListView. +

This function is slow because it traverses the entire tree to find +the last item. + +

void TQListView::mouseButtonClicked ( int button, TQListViewItem * item, const TQPoint & pos, int c ) [signal] +

+ +

This signal is emitted whenever the user clicks (mouse pressed and mouse released) in the list view at position pos. button +is the mouse button that the user pressed, item is the clicked +list view item or 0 if the user didn't click on an item. If item is not 0, c is the list view column into which the user +pressed; if item is 0 c's value is undefined. +

Warning: Do not delete any TQListViewItem objects in slots +connected to this signal. + +

void TQListView::mouseButtonPressed ( int button, TQListViewItem * item, const TQPoint & pos, int c ) [signal] +

+ +

This signal is emitted whenever the user pressed the mouse button +in the list view at position pos. button is the mouse button +which the user pressed, item is the pressed list view item or 0 +if the user didn't press on an item. If item is not 0, c is +the list view column into which the user pressed; if item is 0 +c's value is undefined. +

Warning: Do not delete any TQListViewItem objects in slots +connected to this signal. + +

void TQListView::onItem ( TQListViewItem * i ) [signal] +

+ +

This signal is emitted when the user moves the mouse cursor onto +item i, similar to the TQWidget::enterEvent() function. + +

void TQListView::onViewport () [signal] +

+ +

This signal is emitted when the user moves the mouse cursor from +an item to an empty part of the list view. + +

void TQListView::paintEmptyArea ( TQPainter * p, const TQRect & rect ) [virtual protected] +

+Paints rect so that it looks like empty background using +painter p. rect is in widget coordinates, ready to be fed to +p. +

The default function fills rect with the +viewport()->backgroundBrush(). + +

void TQListView::pressed ( TQListViewItem * item ) [signal] +

+ +

This signal is emitted whenever the user presses the mouse button +in a list view. item is the list view item on which the user +pressed the mouse button, or 0 if the user didn't press the mouse +on an item. +

Warning: Do not delete any TQListViewItem objects in slots +connected to this signal. + +

void TQListView::pressed ( TQListViewItem * item, const TQPoint & pnt, int c ) [signal] +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted whenever the user presses the mouse button +in a list view. item is the list view item on which the user +pressed the mouse button, or 0 if the user didn't press the mouse +on an item. pnt is the position of the mouse cursor in global +coordinates, and c is the column where the mouse cursor was +when the user pressed the mouse button. +

Warning: Do not delete any TQListViewItem objects in slots +connected to this signal. + +

void TQListView::removeColumn ( int index ) [virtual] +

+Removes the column at position index. +

If no columns remain after the column is removed, the +list view will be cleared. +

See also clear(). + +

void TQListView::removeItem ( TQListViewItem * item ) [virtual] +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This function has been renamed takeItem(). + +

void TQListView::repaintItem ( const TQListViewItem * item ) const +

+Repaints item on the screen if item is currently visible. +Takes care to avoid multiple repaints. + +

void TQListView::resizeEvent ( TQResizeEvent * e ) [virtual protected] +

+Ensures that the header is correctly sized and positioned when the +resize event e occurs. + +

ResizeMode TQListView::resizeMode () const +

Returns TRUE if all, none or the only the last column should be resized; otherwise returns FALSE. +See the "resizeMode" property for details. +

void TQListView::returnPressed ( TQListViewItem * ) [signal] +

+ +

This signal is emitted when Enter or Return is pressed. The +argument is the currentItem(). + +

void TQListView::rightButtonClicked ( TQListViewItem *, const TQPoint &, int ) [signal] +

+ +

This signal is emitted when the right button is clicked (i.e. when +it's released). The arguments are the relevant TQListViewItem (may +be 0), the point in global coordinates and the relevant column (or +-1 if the click was outside the list). + +

void TQListView::rightButtonPressed ( TQListViewItem *, const TQPoint &, int ) [signal] +

+ +

This signal is emitted when the right button is pressed. The +arguments are the relevant TQListViewItem (may be 0), the point in +global coordinates and the relevant column (or -1 if the click was +outside the list). + +

bool TQListView::rootIsDecorated () const +

Returns TRUE if the list view shows open/close signs on root items; otherwise returns FALSE. +See the "rootIsDecorated" property for details. +

void TQListView::selectAll ( bool select ) [virtual slot] +

+If select is TRUE, all the items get selected; otherwise all +the items get unselected. This only works in the selection modes Multi and Extended. In Single and NoSelection mode the +selection of the current item is just set to select. + +

TQListViewItem * TQListView::selectedItem () const +

+Returns the selected item if the list view is in Single +selection mode and an item is selected. +

If no items are selected or the list view is not in Single +selection mode this function returns 0. +

See also setSelected() and multiSelection. + +

void TQListView::selectionChanged () [signal] +

+ +

This signal is emitted whenever the set of selected items has +changed (normally before the screen update). It is available in +Single, Multi, and Extended selection modes, but is most +useful in Multi selection mode. +

Warning: Do not delete any TQListViewItem objects in slots +connected to this signal. +

See also setSelected() and TQListViewItem::setSelected(). + +

Example: listviews/listviews.cpp. +

void TQListView::selectionChanged ( TQListViewItem * ) [signal] +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted whenever the selected item has changed in +Single selection mode (normally after the screen update). The +argument is the newly selected item. If the selection is cleared +(when, for example, the user clicks in the unused area of the list +view) then this signal will not be emitted. +

In Multi selection mode, use the no argument overload of this +signal. +

Warning: Do not delete any TQListViewItem objects in slots +connected to this signal. +

See also setSelected(), TQListViewItem::setSelected(), and currentChanged(). + +

SelectionMode TQListView::selectionMode () const +

Returns the list view's selection mode. +See the "selectionMode" property for details. +

void TQListView::setAllColumnsShowFocus ( bool ) [virtual] +

Sets whether items should show keyboard focus using all columns. +See the "allColumnsShowFocus" property for details. +

void TQListView::setColumnAlignment ( int column, int align ) [virtual] +

+Sets column column's alignment to align. The alignment is +ultimately passed to TQListViewItem::paintCell() for each item in +the list view. For horizontally aligned text with TQt::AlignLeft or +TQt::AlignHCenter the ellipsis (...) will be to the right, for +TQt::AlignRight the ellipsis will be to the left. +

See also TQt::AlignmentFlags. + +

Example: listviews/listviews.cpp. +

void TQListView::setColumnText ( int column, const TQString & label ) [virtual] +

+Sets the heading of column column to label. +

See also columnText(). + +

void TQListView::setColumnText ( int column, const TQIconSet & iconset, const TQString & label ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the heading of column column to iconset and label. +

See also columnText(). + +

void TQListView::setColumnWidth ( int column, int w ) [virtual] +

+Sets the width of column column to w pixels. Note that if +the column has a WidthMode other than Manual, this width +setting may be subsequently overridden. +

See also columnWidth(). + +

void TQListView::setColumnWidthMode ( int c, WidthMode mode ) [virtual] +

+Sets column c's width mode to mode. The default depends on +the original width argument to addColumn(). +

See also TQListViewItem::width(). + +

void TQListView::setCurrentItem ( TQListViewItem * i ) [virtual] +

+Sets item i to be the current item and repaints appropriately +(i.e. highlights the item). The current item is used for keyboard +navigation and focus indication; it is independent of any selected +items, although a selected item can also be the current item. +

This function does not set the selection anchor. Use +setSelectionAnchor() instead. +

See also currentItem() and setSelected(). + +

Example: listviews/listviews.cpp. +

void TQListView::setDefaultRenameAction ( RenameAction a ) [virtual] +

Sets what action to perform when the editor loses focus during renaming to a. +See the "defaultRenameAction" property for details. +

void TQListView::setItemMargin ( int ) [virtual] +

Sets the advisory item margin that list items may use. +See the "itemMargin" property for details. +

void TQListView::setMultiSelection ( bool enable ) [virtual] +

Sets whether the list view is in multi-selection or extended-selection mode to enable. +See the "multiSelection" property for details. +

void TQListView::setOpen ( TQListViewItem * item, bool open ) [virtual] +

+Sets item to be open if open is TRUE and item is +expandable, and to be closed if open is FALSE. Repaints +accordingly. +

See also TQListViewItem::setOpen() and TQListViewItem::setExpandable(). + +

void TQListView::setResizeMode ( ResizeMode m ) [virtual] +

Sets whether all, none or the only the last column should be resized to m. +See the "resizeMode" property for details. +

void TQListView::setRootIsDecorated ( bool ) [virtual] +

Sets whether the list view shows open/close signs on root items. +See the "rootIsDecorated" property for details. +

void TQListView::setSelected ( TQListViewItem * item, bool selected ) [virtual] +

+If selected is TRUE the item is selected; otherwise it is +unselected. +

If the list view is in Single selection mode and selected is +TRUE, the currently selected item is unselected and item is +made current. Unlike TQListViewItem::setSelected(), this function +updates the list view as necessary and emits the +selectionChanged() signals. +

See also isSelected(), multiSelection, multiSelection, setCurrentItem(), and setSelectionAnchor(). + +

Example: listviews/listviews.cpp. +

void TQListView::setSelectionAnchor ( TQListViewItem * item ) +

+Sets the selection anchor to item, if item is selectable. +

The selection anchor is the item that remains selected when +Shift-selecting with either mouse or keyboard in Extended +selection mode. +

See also setSelected(). + +

void TQListView::setSelectionMode ( SelectionMode mode ) +

Sets the list view's selection mode to mode. +See the "selectionMode" property for details. +

void TQListView::setShowSortIndicator ( bool show ) [virtual] +

Sets whether the list view header should display a sort indicator to show. +See the "showSortIndicator" property for details. +

void TQListView::setShowToolTips ( bool b ) [virtual] +

Sets whether this list view should show tooltips for truncated column texts to b. +See the "showToolTips" property for details. +

void TQListView::setSortColumn ( int column ) +

+Sets the sorting column for the list view. +

If column is -1, sorting is disabled and the user cannot sort +columns by clicking on the column headers. If column is larger +than the number of columns the user must click on a column header +to sort the list view. +

See also setSorting(). + +

void TQListView::setSortOrder ( SortOrder order ) +

+Sets the sort order for the items in the list view to order. +

See also setSorting(). + +

void TQListView::setSorting ( int column, bool ascending = TRUE ) [virtual] +

+Sets the list view to be sorted by column column in ascending +order if ascending is TRUE or descending order if it is FALSE. +

If column is -1, sorting is disabled and the user cannot sort +columns by clicking on the column headers. If column is larger +than the number of columns the user must click on a column +header to sort the list view. + +

void TQListView::setTreeStepSize ( int ) [virtual] +

Sets the number of pixels a child is offset from its parent. +See the "treeStepSize" property for details. +

bool TQListView::showSortIndicator () const +

Returns TRUE if the list view header should display a sort indicator; otherwise returns FALSE. +See the "showSortIndicator" property for details. +

bool TQListView::showToolTips () const +

Returns TRUE if this list view should show tooltips for truncated column texts; otherwise returns FALSE. +See the "showToolTips" property for details. +

void TQListView::sort () [virtual] +

+Sorts the list view using the last sorting configuration (sort +column and ascending/descending). + +

int TQListView::sortColumn () const +

+Returns the column by which the list view is sorted, or -1 if +sorting is disabled. +

See also sortOrder(). + +

SortOrder TQListView::sortOrder () const +

+Returns the sorting order of the list view items. +

See also sortColumn(). + +

void TQListView::spacePressed ( TQListViewItem * ) [signal] +

+ +

This signal is emitted when Space is pressed. The argument is +the currentItem(). + +

void TQListView::startDrag () [virtual protected] +

+Starts a drag. + +

void TQListView::takeItem ( TQListViewItem * i ) [virtual] +

+Removes item i from the list view; i must be a top-level +item. The warnings regarding TQListViewItem::takeItem() apply to +this function, too. +

See also insertItem(). + +

int TQListView::treeStepSize () const +

Returns the number of pixels a child is offset from its parent. +See the "treeStepSize" property for details. +

void TQListView::triggerUpdate () [slot] +

+Triggers a size, geometry and content update during the next +iteration of the event loop. Ensures that there'll be just one +update to avoid flicker. + +

void TQListView::updateContents () [protected slot] +

+Updates the sizes of the viewport, header, scroll bars and so on. +

Warning: Don't call this directly; call triggerUpdate() instead. + +


Property Documentation

+

bool allColumnsShowFocus

+

This property holds whether items should show keyboard focus using all columns. +

If this property is TRUE all columns will show focus and selection +states, otherwise only column 0 will show focus. +

The default is FALSE. +

Setting this to TRUE if it's not necessary may cause noticeable +flicker. + +

Set this property's value with setAllColumnsShowFocus() and get this property's value with allColumnsShowFocus(). +

int childCount

+

This property holds the number of parentless (top-level) TQListViewItem objects in this TQListView. +

Holds the current number of parentless (top-level) TQListViewItem +objects in this TQListView. +

See also TQListViewItem::childCount(). + +

Get this property's value with childCount(). +

int columns

+

This property holds the number of columns in this list view. +

Get this property's value with columns(). +

See also addColumn() and removeColumn(). + +

RenameAction defaultRenameAction

+

This property holds what action to perform when the editor loses focus during renaming. +

If this property is Accept, and the user renames an item and +the editor loses focus (without the user pressing Enter), the +item will still be renamed. If the property's value is Reject, +the item will not be renamed unless the user presses Enter. The +default is Reject. + +

Set this property's value with setDefaultRenameAction() and get this property's value with defaultRenameAction(). +

int itemMargin

+

This property holds the advisory item margin that list items may use. +

The item margin defaults to one pixel and is the margin between +the item's edges and the area where it draws its contents. +TQListViewItem::paintFocus() draws in the margin. +

See also TQListViewItem::paintCell(). + +

Set this property's value with setItemMargin() and get this property's value with itemMargin(). +

bool multiSelection

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This property holds whether the list view is in multi-selection or extended-selection mode. +

If you enable multi-selection, Multi, mode, it is possible to +specify whether or not this mode should be extended. Extended +means that the user can select multiple items only when pressing +the Shift or Ctrl key at the same time. +

The default selection mode is Single. +

See also selectionMode. + +

Set this property's value with setMultiSelection() and get this property's value with isMultiSelection(). +

ResizeMode resizeMode

+

This property holds whether all, none or the only the last column should be resized. +

Specifies whether all, none or only the last column should be +resized to fit the full width of the list view. The values for this +property can be one of: NoColumn (the default), AllColumns +or LastColumn. +

Warning: Setting the resize mode should be done after all necessary +columns have been added to the list view, otherwise the behavior is +undefined. +

See also TQHeader and header(). + +

Set this property's value with setResizeMode() and get this property's value with resizeMode(). +

bool rootIsDecorated

+

This property holds whether the list view shows open/close signs on root items. +

Open/close signs are small + or - symbols in windows +style, or arrows in Motif style. The default is FALSE. + +

Set this property's value with setRootIsDecorated() and get this property's value with rootIsDecorated(). +

SelectionMode selectionMode

+

This property holds the list view's selection mode. +

The mode can be Single (the default), Extended, Multi or +NoSelection. +

See also multiSelection. + +

Set this property's value with setSelectionMode() and get this property's value with selectionMode(). +

bool showSortIndicator

+

This property holds whether the list view header should display a sort indicator. +

If this property is TRUE, an arrow is drawn in the header of the +list view to indicate the sort order of the list view contents. +The arrow will be drawn in the correct column and will point up or +down, depending on the current sort direction. The default is +FALSE (don't show an indicator). +

See also TQHeader::setSortIndicator(). + +

Set this property's value with setShowSortIndicator() and get this property's value with showSortIndicator(). +

bool showToolTips

+

This property holds whether this list view should show tooltips for truncated column texts. +

The default is TRUE. + +

Set this property's value with setShowToolTips() and get this property's value with showToolTips(). +

int treeStepSize

+

This property holds the number of pixels a child is offset from its parent. +

The default is 20 pixels. +

Of course, this property is only meaningful for hierarchical list +views. + +

Set this property's value with setTreeStepSize() and get this property's value with treeStepSize(). + +


+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/qlistviewitem-members.html b/doc/html/qlistviewitem-members.html new file mode 100644 index 00000000..200dd12e --- /dev/null +++ b/doc/html/qlistviewitem-members.html @@ -0,0 +1,111 @@ + + + + + +TQListViewItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQListViewItem

+ +

This is the complete list of member functions for +TQListViewItem, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlistviewitem.html b/doc/html/qlistviewitem.html new file mode 100644 index 00000000..ff41f292 --- /dev/null +++ b/doc/html/qlistviewitem.html @@ -0,0 +1,809 @@ + + + + + +TQListViewItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQListViewItem Class Reference

+ +

The TQListViewItem class implements a list view item. +More... +

#include <qlistview.h> +

Inherits TQt. +

Inherited by TQCheckListItem. +

List of all member functions. +

Public Members

+
    +
  • TQListViewItem ( TQListView * parent )
  • +
  • TQListViewItem ( TQListViewItem * parent )
  • +
  • TQListViewItem ( TQListView * parent, TQListViewItem * after )
  • +
  • TQListViewItem ( TQListViewItem * parent, TQListViewItem * after )
  • +
  • TQListViewItem ( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null )
  • +
  • TQListViewItem ( TQListViewItem * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null )
  • +
  • TQListViewItem ( TQListView * parent, TQListViewItem * after, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null )
  • +
  • TQListViewItem ( TQListViewItem * parent, TQListViewItem * after, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null )
  • +
  • virtual ~TQListViewItem ()
  • +
  • virtual void insertItem ( TQListViewItem * newChild )
  • +
  • virtual void takeItem ( TQListViewItem * item )
  • +
  • virtual void removeItem ( TQListViewItem * item )  (obsolete)
  • +
  • int height () const
  • +
  • virtual void invalidateHeight ()
  • +
  • int totalHeight () const
  • +
  • virtual int width ( const TQFontMetrics & fm, const TQListView * lv, int c ) const
  • +
  • void widthChanged ( int c = -1 ) const
  • +
  • int depth () const
  • +
  • virtual void setText ( int column, const TQString & text )
  • +
  • virtual TQString text ( int column ) const
  • +
  • virtual void setPixmap ( int column, const TQPixmap & pm )
  • +
  • virtual const TQPixmap * pixmap ( int column ) const
  • +
  • virtual TQString key ( int column, bool ascending ) const
  • +
  • virtual int compare ( TQListViewItem * i, int col, bool ascending ) const
  • +
  • virtual void sortChildItems ( int column, bool ascending )
  • +
  • int childCount () const
  • +
  • bool isOpen () const
  • +
  • virtual void setOpen ( bool o )
  • +
  • virtual void setup ()
  • +
  • virtual void setSelected ( bool s )
  • +
  • bool isSelected () const
  • +
  • virtual void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
  • +
  • virtual void paintBranches ( TQPainter * p, const TQColorGroup & cg, int w, int y, int h )
  • +
  • virtual void paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r )
  • +
  • TQListViewItem * firstChild () const
  • +
  • TQListViewItem * nextSibling () const
  • +
  • TQListViewItem * parent () const
  • +
  • TQListViewItem * itemAbove ()
  • +
  • TQListViewItem * itemBelow ()
  • +
  • int itemPos () const
  • +
  • TQListView * listView () const
  • +
  • virtual void setSelectable ( bool enable )
  • +
  • bool isSelectable () const
  • +
  • virtual void setExpandable ( bool enable )
  • +
  • bool isExpandable () const
  • +
  • void repaint () const
  • +
  • virtual void sort ()
  • +
  • void moveItem ( TQListViewItem * after )
  • +
  • virtual void setDragEnabled ( bool allow )
  • +
  • virtual void setDropEnabled ( bool allow )
  • +
  • bool dragEnabled () const
  • +
  • bool dropEnabled () const
  • +
  • virtual bool acceptDrop ( const TQMimeSource * mime ) const
  • +
  • void setVisible ( bool b )
  • +
  • bool isVisible () const
  • +
  • virtual void setRenameEnabled ( int col, bool b )
  • +
  • bool renameEnabled ( int col ) const
  • +
  • virtual void startRename ( int col )
  • +
  • virtual void setEnabled ( bool b )
  • +
  • bool isEnabled () const
  • +
  • virtual int rtti () const
  • +
  • virtual void setMultiLinesEnabled ( bool b )
  • +
  • bool multiLinesEnabled () const
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQListViewItem class implements a list view item. +

+

A list view item is a multi-column object capable of displaying +itself in a TQListView. +

The easiest way to use TQListViewItem is to construct one with a +few constant strings, and either a TQListView or another +TQListViewItem as parent. +

+        (void) new TQListViewItem( listView, "Column 1", "Column 2" );
+        (void) new TQListViewItem( listView->firstChild(), "A", "B", "C" );
+    
+ +We've discarded the pointers to the items since we can still access +them via their parent listView. By default, TQListView sorts its +items; this can be switched off with TQListView::setSorting(-1). +

The parent must be another TQListViewItem or a TQListView. If the +parent is a TQListView, the item becomes a top-level item within +that TQListView. If the parent is another TQListViewItem, the item +becomes a child of that list view item. +

If you keep the pointer, you can set or change the texts using +setText(), add pixmaps using setPixmap(), change its mode using +setSelectable(), setSelected(), setOpen() and setExpandable(). +You'll also be able to change its height using setHeight(), and +traverse its sub-items. You don't have to keep the pointer since +you can get a pointer to any TQListViewItem in a TQListView using +TQListView::selectedItem(), TQListView::currentItem(), +TQListView::firstChild(), TQListView::lastItem() and +TQListView::findItem(). +

If you call delete on a list view item, it will be deleted as +expected, and as usual for TQObjects, if it has any child items +(to any depth), all these will be deleted too. +

TQCheckListItems are list view items that have a checkbox or +radio button and can be used in place of plain TQListViewItems. +

You can traverse the tree as if it were a doubly-linked list using +itemAbove() and itemBelow(); they return pointers to the items +directly above and below this item on the screen (even if none of +them are actually visible at the moment). +

Here's how to traverse all of an item's children (but not its +children's children, etc.): +Example: +

+        TQListViewItem * myChild = myItem->firstChild();
+        while( myChild ) {
+            doSomething( myChild );
+            myChild = myChild->nextSibling();
+        }
+    
+ +

If you want to iterate over every item, to any level of depth use +an iterator. To iterate over the entire tree, initialize the +iterator with the list view itself; to iterate starting from a +particular item, initialize the iterator with the item: +

+        TQListViewItemIterator it( listview );
+        while ( it.current() ) {
+            TQListViewItem *item = it.current();
+            doSomething( item );
+            ++it;
+        }
+    
+ +

Note that the order of the children will change when the sorting +order changes and is undefined if the items are not visible. You +can, however, call enforceSortOrder() at any time; TQListView will +always call it before it needs to show an item. +

Many programs will need to reimplement TQListViewItem. The most +commonly reimplemented functions are: +

+
Function Description +
text() +Returns the text in a column. Many subclasses will compute +this on the fly. +
key() +Used for sorting. The default key() simply calls +text(), but judicious use of key() can give you fine +control over sorting; for example, TQFileDialog +reimplements key() to sort by date. +
setup() +Called before showing the item and whenever the list +view's font changes, for example. +
activate() +Called whenever the user clicks on the item or presses +Space when the item is the current item. +
+

Some subclasses call setExpandable(TRUE) even when they have no +children, and populate themselves when setup() or setOpen(TRUE) is +called. The dirview/dirview.cpp example program uses this +technique to start up tquickly: The files and subdirectories in a +directory aren't inserted into the tree until they're actually +needed. +

List View Items
+

See also TQCheckListItem, TQListView, and Advanced Widgets. + +


Member Function Documentation

+

TQListViewItem::TQListViewItem ( TQListView * parent ) +

+Constructs a new top-level list view item in the TQListView parent. + +

TQListViewItem::TQListViewItem ( TQListViewItem * parent ) +

+Constructs a new list view item that is a child of parent and +first in the parent's list of children. + +

TQListViewItem::TQListViewItem ( TQListView * parent, TQListViewItem * after ) +

+Constructs an empty list view item that is a child of parent +and is after item after in the parent's list of children. Since +parent is a TQListView the item will be a top-level item. + +

TQListViewItem::TQListViewItem ( TQListViewItem * parent, TQListViewItem * after ) +

+Constructs an empty list view item that is a child of parent +and is after item after in the parent's list of children. + +

TQListViewItem::TQListViewItem ( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) +

+Constructs a new top-level list view item in the TQListView parent, with up to eight constant strings, label1, label2, label3, label4, label5, label6, label7 and label8 +defining its columns' contents. +

See also setText(). + +

TQListViewItem::TQListViewItem ( TQListViewItem * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) +

+Constructs a new list view item as a child of the TQListViewItem parent with up to eight constant strings, label1, label2, label3, label4, label5, label6, label7 and label8 +as columns' contents. +

See also setText(). + +

TQListViewItem::TQListViewItem ( TQListView * parent, TQListViewItem * after, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) +

+Constructs a new list view item in the TQListView parent that is +included after item after and that has up to eight column +texts, label1, label2, label3, label4, label5, label6, label7 andlabel8. +

Note that the order is changed according to TQListViewItem::key() +unless the list view's sorting is disabled using +TQListView::setSorting(-1). +

See also setText(). + +

TQListViewItem::TQListViewItem ( TQListViewItem * parent, TQListViewItem * after, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) +

+Constructs a new list view item as a child of the TQListViewItem parent. It is inserted after item after and may contain up to +eight strings, label1, label2, label3, label4, label5, label6, label7 and label8 as column entries. +

Note that the order is changed according to TQListViewItem::key() +unless the list view's sorting is disabled using +TQListView::setSorting(-1). +

See also setText(). + +

TQListViewItem::~TQListViewItem () [virtual] +

+Destroys the item, deleting all its children and freeing up all +allocated resources. + +

bool TQListViewItem::acceptDrop ( const TQMimeSource * mime ) const [virtual] +

+Returns TRUE if the item can accept drops of type TQMimeSource mime; otherwise returns FALSE. +

The default implementation does nothing and returns FALSE. A +subclass must reimplement this to accept drops. + +

void TQListViewItem::activate () [virtual protected] +

+This virtual function is called whenever the user presses the mouse +on this item or presses Space on it. +

See also activatedPos(). + +

Reimplemented in TQCheckListItem. +

bool TQListViewItem::activatedPos ( TQPoint & pos ) [protected] +

+When called from a reimplementation of activate(), this function +gives information on how the item was activated. Otherwise the +behavior is undefined. +

If activate() was caused by a mouse press, the function sets pos to where the user clicked and returns TRUE; otherwise it +returns FALSE and does not change pos. +

pos is relative to the top-left corner of this item. +

Warning: We recommend that you ignore this function; it is +scheduled to become obsolete. +

See also activate(). + +

void TQListViewItem::cancelRename ( int col ) [virtual protected] +

+This function is called if the user cancels in-place renaming of +this item in column col (e.g. by pressing Esc). +

See also okRename(). + +

int TQListViewItem::childCount () const +

+ +

Returns how many children this item has. The count only includes +the item's immediate children. + +

int TQListViewItem::compare ( TQListViewItem * i, int col, bool ascending ) const [virtual] +

+Compares this list view item to i using the column col in ascending order. Returns < 0 if this item is less than i, 0 if +they are equal and > 0 if this item is greater than i. +

This function is used for sorting. +

The default implementation compares the item keys (key()) using +TQString::localeAwareCompare(). A reimplementation can use +different values and a different comparison function. Here is a +reimplementation that uses plain Unicode comparison: +

+    int MyListViewItem::compare( TQListViewItem *i, int col,
+                                 bool ascending ) const
+    {
+        return key( col, ascending ).compare( i->key( col, ascending) );
+    }
+    
+ +We don't recommend using ascending so your code can safely +ignore it. +

See also key(), TQString::localeAwareCompare(), and TQString::compare(). + +

int TQListViewItem::depth () const +

+Returns the depth of this item. + +

Example: dirview/dirview.cpp. +

bool TQListViewItem::dragEnabled () const +

+Returns TRUE if this item can be dragged; otherwise returns FALSE. +

See also setDragEnabled(). + +

void TQListViewItem::dragEntered () [virtual protected] +

+This function is called when a drag enters the item's bounding +rectangle. +

The default implementation does nothing, subclasses may need to +reimplement this function. + +

void TQListViewItem::dragLeft () [virtual protected] +

+This function is called when a drag leaves the item's bounding +rectangle. +

The default implementation does nothing, subclasses may need to +reimplement this function. + +

bool TQListViewItem::dropEnabled () const +

+Returns TRUE if this item accepts drops; otherwise returns FALSE. +

See also setDropEnabled() and acceptDrop(). + +

void TQListViewItem::dropped ( TQDropEvent * e ) [virtual protected] +

+This function is called when something was dropped on the item. e +contains all the information about the drop. +

The default implementation does nothing, subclasses may need to +reimplement this function. + +

void TQListViewItem::enforceSortOrder () const [virtual protected] +

+Makes sure that this object's children are sorted appropriately. +

This only works if every item from the root item down to this item +is already sorted. +

See also sortChildItems(). + +

TQListViewItem * TQListViewItem::firstChild () const +

+Returns the first (top) child of this item, or 0 if this item has +no children. +

Note that the children are not guaranteed to be sorted properly. +TQListView and TQListViewItem try to postpone or avoid sorting to +the greatest degree possible, in order to keep the user interface +snappy. +

See also nextSibling() and sortChildItems(). + +

Example: checklists/checklists.cpp. +

int TQListViewItem::height () const +

+Returns the height of this item in pixels. This does not include +the height of any children; totalHeight() returns that. + +

void TQListViewItem::insertItem ( TQListViewItem * newChild ) [virtual] +

+Inserts newChild into this list view item's list of children. +You should not need to call this function; it is called +automatically by the constructor of newChild. +

Warning: If you are using Single selection mode, then you +should only insert unselected items. + +

void TQListViewItem::invalidateHeight () [virtual] +

+Invalidates the cached total height of this item, including all +open children. +

See also setHeight(), height(), and totalHeight(). + +

bool TQListViewItem::isEnabled () const +

+Returns TRUE if this item is enabled; otherwise returns FALSE. +

See also setEnabled(). + +

bool TQListViewItem::isExpandable () const +

+ +

Returns TRUE if this item is expandable even when it has no +children; otherwise returns FALSE. + +

bool TQListViewItem::isOpen () const +

+ +

Returns TRUE if this list view item has children and they are +not explicitly hidden; otherwise returns FALSE. +

See also setOpen(). + +

bool TQListViewItem::isSelectable () const +

+ +

Returns TRUE if the item is selectable (as it is by default); +otherwise returns FALSE +

See also setSelectable(). + +

bool TQListViewItem::isSelected () const +

+ +

Returns TRUE if this item is selected; otherwise returns FALSE. +

See also setSelected(), TQListView::setSelected(), and TQListView::selectionChanged(). + +

Example: listviews/listviews.cpp. +

bool TQListViewItem::isVisible () const +

+Returns TRUE if the item is visible; otherwise returns FALSE. +

See also setVisible(). + +

TQListViewItem * TQListViewItem::itemAbove () +

+Returns a pointer to the item immediately above this item on the +screen. This is usually the item's closest older sibling, but it +may also be its parent or its next older sibling's youngest child, +or something else if anyoftheabove->height() returns 0. Returns 0 +if there is no item immediately above this item. +

This function assumes that all parents of this item are open (i.e. +that this item is visible, or can be made visible by scrolling). +

This function might be relatively slow because of the tree +traversions needed to find the correct item. +

See also itemBelow() and TQListView::itemRect(). + +

TQListViewItem * TQListViewItem::itemBelow () +

+Returns a pointer to the item immediately below this item on the +screen. This is usually the item's eldest child, but it may also +be its next younger sibling, its parent's next younger sibling, +grandparent's, etc., or something else if anyoftheabove->height() +returns 0. Returns 0 if there is no item immediately below this +item. +

This function assumes that all parents of this item are open (i.e. +that this item is visible or can be made visible by scrolling). +

See also itemAbove() and TQListView::itemRect(). + +

Example: dirview/dirview.cpp. +

int TQListViewItem::itemPos () const +

+Returns the y coordinate of this item in the list view's +coordinate system. This function is normally much slower than +TQListView::itemAt(), but it works for all items whereas +TQListView::itemAt() normally only works for items on the screen. +

See also TQListView::itemAt(), TQListView::itemRect(), and TQListView::itemPos(). + +

TQString TQListViewItem::key ( int column, bool ascending ) const [virtual] +

+ +

Returns a key that can be used for sorting by column column. +The default implementation returns text(). Derived classes may +also incorporate the order indicated by ascending into this +key, although this is not recommended. +

If you want to sort on non-alphabetical data, e.g. dates, numbers, +etc., it is more efficient to reimplement compare(). +

See also compare() and sortChildItems(). + +

TQListView * TQListViewItem::listView () const +

+Returns a pointer to the list view containing this item. +

Note that this function traverses the items to the root to find the +listview. This function will return 0 for taken items - see +TQListViewItem::takeItem() + +

void TQListViewItem::moveItem ( TQListViewItem * after ) +

+Move the item to be after item after, which must be one of the +item's siblings. To move an item in the hierarchy, use takeItem() +and insertItem(). +

Note that this function will have no effect if sorting is enabled +in the list view. + +

bool TQListViewItem::multiLinesEnabled () const +

+Returns TRUE if the item can display multiple lines of text in its +columns; otherwise returns FALSE. + +

TQListViewItem * TQListViewItem::nextSibling () const +

+ +

Returns the sibling item below this item, or 0 if there is no +sibling item after this item. +

Note that the siblings are not guaranteed to be sorted properly. +TQListView and TQListViewItem try to postpone or avoid sorting to +the greatest degree possible, in order to keep the user interface +snappy. +

See also firstChild() and sortChildItems(). + +

Example: xml/tagreader-with-features/structureparser.cpp. +

void TQListViewItem::okRename ( int col ) [virtual protected] +

+This function is called if the user presses Enter during in-place +renaming of the item in column col. +

See also cancelRename(). + +

void TQListViewItem::paintBranches ( TQPainter * p, const TQColorGroup & cg, int w, int y, int h ) [virtual] +

+Paints a set of branches from this item to (some of) its children. +

Painter p is set up with clipping and translation so that you +can only draw in the rectangle that needs redrawing; cg is the +color group to use; the update rectangle is at (0, 0) and has size +width w by height h. The top of the rectangle you own is at +y (which is never greater than 0 but can be outside the window +system's allowed coordinate range). +

The update rectangle is in an undefined state when this function +is called; this function must draw on all of the pixels. +

See also paintCell() and TQListView::drawContentsOffset(). + +

void TQListViewItem::paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) [virtual] +

+This virtual function paints the contents of one column of an item +and aligns it as described by align. +

p is a TQPainter open on the relevant paint device. p is +translated so (0, 0) is the top-left pixel in the cell and width-1, height()-1 is the bottom-right pixel in the cell. The +other properties of p (pen, brush, etc) are undefined. cg is +the color group to use. column is the logical column number +within the item that is to be painted; 0 is the column which may +contain a tree. +

This function may use TQListView::itemMargin() for readability +spacing on the left and right sides of data such as text, and +should honor isSelected() and TQListView::allColumnsShowFocus(). +

If you reimplement this function, you should also reimplement +width(). +

The rectangle to be painted is in an undefined state when this +function is called, so you must draw on all the pixels. The +painter p has the right font on entry. +

See also paintBranches() and TQListView::drawContentsOffset(). + +

Example: listviews/listviews.cpp. +

Reimplemented in TQCheckListItem. +

void TQListViewItem::paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r ) [virtual] +

+Paints a focus indicator on the rectangle r using painter p +and colors cg. +

p is already clipped. +

See also paintCell(), paintBranches(), and TQListView::allColumnsShowFocus. + +

Reimplemented in TQCheckListItem. +

TQListViewItem * TQListViewItem::parent () const +

+Returns the parent of this item, or 0 if this item has no parent. +

See also firstChild() and nextSibling(). + +

Examples: dirview/dirview.cpp and qutlook/centralwidget.cpp. +

const TQPixmap * TQListViewItem::pixmap ( int column ) const [virtual] +

+Returns the pixmap for column, or 0 if there is no pixmap for +column. +

See also setText() and setPixmap(). + +

Example: dirview/dirview.cpp. +

void TQListViewItem::removeItem ( TQListViewItem * item ) [virtual] +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This function has been renamed takeItem(). + +

bool TQListViewItem::renameEnabled ( int col ) const +

+Returns TRUE if this item can be in-place renamed in column col; otherwise returns FALSE. + +

void TQListViewItem::repaint () const +

+Repaints this item on the screen if it is currently visible. + +

Example: addressbook/centralwidget.cpp. +

int TQListViewItem::rtti () const [virtual] +

+Returns 0. +

Make your derived classes return their own values for rtti(), so +that you can distinguish between different kinds of list view +items. You should use values greater than 1000 to allow for +extensions to this class. + +

Reimplemented in TQCheckListItem. +

void TQListViewItem::setDragEnabled ( bool allow ) [virtual] +

+If allow is TRUE, the list view starts a drag (see +TQListView::dragObject()) when the user presses and moves the mouse +on this item. + +

void TQListViewItem::setDropEnabled ( bool allow ) [virtual] +

+If allow is TRUE, the list view accepts drops onto the item; +otherwise drops are not allowed. + +

void TQListViewItem::setEnabled ( bool b ) [virtual] +

+If b is TRUE the item is enabled; otherwise it is disabled. +Disabled items are drawn differently (e.g. grayed-out) and are not +accessible by the user. + +

void TQListViewItem::setExpandable ( bool enable ) [virtual] +

+Sets this item to be expandable even if it has no children if enable is TRUE, and to be expandable only if it has children if enable is FALSE (the default). +

The dirview example uses this in the canonical fashion. It checks +whether the directory is empty in setup() and calls +setExpandable(TRUE) if not; in setOpen() it reads the contents of +the directory and inserts items accordingly. This strategy means +that dirview can display the entire file system without reading +very much at startup. +

Note that root items are not expandable by the user unless +TQListView::setRootIsDecorated() is set to TRUE. +

See also setSelectable(). + +

void TQListViewItem::setHeight ( int height ) [virtual protected] +

+Sets this item's height to height pixels. This implicitly +changes totalHeight(), too. +

Note that a font change causes this height to be overwritten +unless you reimplement setup(). +

For best results in Windows style we suggest using an even number +of pixels. +

See also height(), totalHeight(), and isOpen(). + +

void TQListViewItem::setMultiLinesEnabled ( bool b ) [virtual] +

+If b is TRUE each of the item's columns may contain multiple +lines of text; otherwise each of them may only contain a single +line. + +

void TQListViewItem::setOpen ( bool o ) [virtual] +

+Opens or closes an item, i.e. shows or hides an item's children. +

If o is TRUE all child items are shown initially. The user can +hide them by clicking the - icon to the left of the item. +If o is FALSE, the children of this item are initially hidden. +The user can show them by clicking the + icon to the left +of the item. +

See also height(), totalHeight(), and isOpen(). + +

Examples: checklists/checklists.cpp, dirview/dirview.cpp, dirview/main.cpp, fileiconview/mainwindow.cpp, and xml/tagreader-with-features/structureparser.cpp. +

void TQListViewItem::setPixmap ( int column, const TQPixmap & pm ) [virtual] +

+Sets the pixmap in column column to pm, if pm is non-null +and different from the current pixmap, and if column is +non-negative. +

See also pixmap() and setText(). + +

Example: dirview/dirview.cpp. +

void TQListViewItem::setRenameEnabled ( int col, bool b ) [virtual] +

+If b is TRUE, this item can be in-place renamed in the column +col by the user; otherwise it cannot be renamed in-place. + +

void TQListViewItem::setSelectable ( bool enable ) [virtual] +

+Sets this item to be selectable if enable is TRUE (the +default) or not to be selectable if enable is FALSE. +

The user is not able to select a non-selectable item using either +the keyboard or the mouse. This also applies for the application +programmer (e.g. setSelected() respects this value). +

See also isSelectable(). + +

void TQListViewItem::setSelected ( bool s ) [virtual] +

+If s is TRUE this item is selected; otherwise it is deselected. +

This function does not maintain any invariants or repaint anything +-- TQListView::setSelected() does that. +

See also height() and totalHeight(). + +

Example: addressbook/centralwidget.cpp. +

void TQListViewItem::setText ( int column, const TQString & text ) [virtual] +

+Sets the text in column column to text, if column is a +valid column number and text is different from the existing +text. +

If text() has been reimplemented, this function may be a no-op. +

See also text() and key(). + +

Examples: addressbook/centralwidget.cpp, qutlook/centralwidget.cpp, and xml/outliner/outlinetree.cpp. +

void TQListViewItem::setVisible ( bool b ) +

+If b is TRUE, the item is made visible; otherwise it is hidden. +

If the item is not visible, itemAbove() and itemBelow() will never +return this item, although you still can reach it by using e.g. +TQListViewItemIterator. + +

void TQListViewItem::setup () [virtual] +

+This virtual function is called before the first time TQListView +needs to know the height or any other graphical attribute of this +object, and whenever the font, GUI style, or colors of the list +view change. +

The default calls widthChanged() and sets the item's height to the +height of a single line of text in the list view's font. (If you +use icons, multi-line text, etc., you will probably need to call +setHeight() yourself or reimplement it.) + +

Example: dirview/dirview.cpp. +

void TQListViewItem::sort () [virtual] +

+Sorts all this item's child items using the current sorting +configuration (sort column and direction). +

See also enforceSortOrder(). + +

void TQListViewItem::sortChildItems ( int column, bool ascending ) [virtual] +

+Sorts this item's children using column column. This is done in +ascending order if ascending is TRUE and in descending order if +ascending is FALSE. +

Asks some of the children to sort their children. (TQListView and +TQListViewItem ensure that all on-screen objects are properly +sorted but may avoid or defer sorting other objects in order to be +more responsive.) +

See also key() and compare(). + +

void TQListViewItem::startRename ( int col ) [virtual] +

+If in-place renaming of this item is enabled (see +renameEnabled()), this function starts renaming the item in column +col, by creating and initializing an edit box. + +

void TQListViewItem::takeItem ( TQListViewItem * item ) [virtual] +

+Removes item from this object's list of children and causes an +update of the screen display. The item is not deleted. You should +not normally need to call this function because +TQListViewItem::~TQListViewItem() calls it. +

The normal way to delete an item is to use delete. +

If you need to move an item from one place in the hierarchy to +another you can use takeItem() to remove the item from the list +view and then insertItem() to put the item back in its new +position. +

If a taken item is part of a selection in Single selection +mode, it is unselected and selectionChanged() is emitted. If a +taken item is part of a selection in Multi or Extended +selection mode, it remains selected. +

Warning: This function leaves item and its children in a state +where most member functions are unsafe. Only a few functions work +correctly on an item in this state, most notably insertItem(). The +functions that work on taken items are explicitly documented as +such. +

See also TQListViewItem::insertItem(). + +

TQString TQListViewItem::text ( int column ) const [virtual] +

+Returns the text in column column, or TQString::null if there is +no text in that column. +

See also key() and paintCell(). + +

Examples: addressbook/centralwidget.cpp, dirview/dirview.cpp, network/archivesearch/archivedialog.ui.h, and network/ftpclient/ftpmainwindow.ui.h. +

int TQListViewItem::totalHeight () const +

+Returns the total height of this object, including any visible +children. This height is recomputed lazily and cached for as long +as possible. +

Functions which can affect the total height are, setHeight() which +is used to set an item's height, setOpen() to show or hide an +item's children, and invalidateHeight() to invalidate the cached +height. +

See also height(). + +

int TQListViewItem::width ( const TQFontMetrics & fm, const TQListView * lv, int c ) const [virtual] +

+Returns the number of pixels of width retquired to draw column c +of list view lv, using the metrics fm without cropping. The +list view containing this item may use this information depending +on the TQListView::WidthMode settings for the column. +

The default implementation returns the width of the bounding +rectangle of the text of column c. +

See also listView(), widthChanged(), TQListView::setColumnWidthMode(), and TQListView::itemMargin. + +

void TQListViewItem::widthChanged ( int c = -1 ) const +

+Call this function when the value of width() may have changed for +column c. Normally, you should call this if text(c) changes. +Passing -1 for c indicates that all columns may have changed. +It is more efficient to pass -1 if two or more columns have +changed than to call widthChanged() separately for each one. +

See also width(). + + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlistviewitemiterator-members.html b/doc/html/qlistviewitemiterator-members.html new file mode 100644 index 00000000..2b58a6fb --- /dev/null +++ b/doc/html/qlistviewitemiterator-members.html @@ -0,0 +1,55 @@ + + + + + +TQListViewItemIterator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQListViewItemIterator

+ +

This is the complete list of member functions for +TQListViewItemIterator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlistviewitemiterator.html b/doc/html/qlistviewitemiterator.html new file mode 100644 index 00000000..33c5f742 --- /dev/null +++ b/doc/html/qlistviewitemiterator.html @@ -0,0 +1,226 @@ + + + + + +TQListViewItemIterator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQListViewItemIterator Class Reference

+ +

The TQListViewItemIterator class provides an iterator for collections of TQListViewItems. +More... +

#include <qlistview.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQListViewItemIterator class provides an iterator for collections of TQListViewItems. +

+

Construct an instance of a TQListViewItemIterator, with either a +TQListView* or a TQListViewItem* as argument, to operate on the tree +of TQListViewItems, starting from the argument. +

A TQListViewItemIterator iterates over all the items from its +starting point. This means that it always makes the first child of +the current item the new current item. If there is no child, the +next sibling becomes the new current item; and if there is no next +sibling, the next sibling of the parent becomes current. +

The following example creates a list of all the items that have +been selected by the user, storing pointers to the items in a +TQPtrList: +

+    TQPtrList<TQListViewItem> lst;
+    TQListViewItemIterator it( myListView );
+    while ( it.current() ) {
+        if ( it.current()->isSelected() )
+            lst.append( it.current() );
+        ++it;
+    }
+    
+ +

An alternative approach is to use an IteratorFlag: +

+    TQPtrList<TQListViewItem> lst;
+    TQListViewItemIterator it( myListView, TQListViewItemIterator::Selected );
+    while ( it.current() ) {
+        lst.append( it.current() );
+        ++it;
+    }
+    
+ +

A TQListViewItemIterator provides a convenient and easy way to +traverse a hierarchical TQListView. +

Multiple TQListViewItemIterators can operate on the tree of +TQListViewItems. A TQListView knows about all iterators operating on +its TQListViewItems. So when a TQListViewItem gets removed all +iterators that point to this item are updated and point to the +following item if possible, otherwise to a valid item before the +current one or to 0. Note however that deleting the parent item of +an item that an iterator points to is not safe. +

See also TQListView, TQListViewItem, and Advanced Widgets. + +


Member Type Documentation

+

TQListViewItemIterator::IteratorFlag

+ +

These flags can be passed to a TQListViewItemIterator constructor +(OR-ed together if more than one is used), so that the iterator +will only iterate over items that match the given flags. +

    +
  • TQListViewItemIterator::Visible +
  • TQListViewItemIterator::Invisible +
  • TQListViewItemIterator::Selected +
  • TQListViewItemIterator::Unselected +
  • TQListViewItemIterator::Selectable +
  • TQListViewItemIterator::NotSelectable +
  • TQListViewItemIterator::DragEnabled +
  • TQListViewItemIterator::DragDisabled +
  • TQListViewItemIterator::DropEnabled +
  • TQListViewItemIterator::DropDisabled +
  • TQListViewItemIterator::Expandable +
  • TQListViewItemIterator::NotExpandable +
  • TQListViewItemIterator::Checked +
  • TQListViewItemIterator::NotChecked +
+

Member Function Documentation

+

TQListViewItemIterator::TQListViewItemIterator () +

+Constructs an empty iterator. + +

TQListViewItemIterator::TQListViewItemIterator ( TQListViewItem * item ) +

+Constructs an iterator for the TQListView that contains the item. The current iterator item is set to point to the item. + +

TQListViewItemIterator::TQListViewItemIterator ( TQListViewItem * item, int iteratorFlags ) +

+Constructs an iterator for the TQListView that contains the item +using the flags iteratorFlags. The current iterator item is set +to point to item or the next matching item if item doesn't +match the flags. +

See also TQListViewItemIterator::IteratorFlag. + +

TQListViewItemIterator::TQListViewItemIterator ( const TQListViewItemIterator & it ) +

+Constructs an iterator for the same TQListView as it. The +current iterator item is set to point on the current item of it. + +

TQListViewItemIterator::TQListViewItemIterator ( TQListView * lv ) +

+Constructs an iterator for the TQListView lv. The current +iterator item is set to point on the first child (TQListViewItem) +of lv. + +

TQListViewItemIterator::TQListViewItemIterator ( TQListView * lv, int iteratorFlags ) +

+Constructs an iterator for the TQListView lv with the flags iteratorFlags. The current iterator item is set to point on the +first child (TQListViewItem) of lv that matches the flags. +

See also TQListViewItemIterator::IteratorFlag. + +

TQListViewItemIterator::~TQListViewItemIterator () +

+Destroys the iterator. + +

TQListViewItem * TQListViewItemIterator::current () const +

+Returns iterator's current item. + +

Examples: addressbook/centralwidget.cpp, checklists/checklists.cpp, and dirview/dirview.cpp. +

TQListViewItem * TQListViewItemIterator::operator* () +

+Dereference operator. Returns a reference to the current item. The +same as current(). + +

TQListViewItemIterator & TQListViewItemIterator::operator++ () +

+Prefix ++. Makes the next item the new current item and returns +it. Returns 0 if the current item is the last item or the +TQListView is 0. + +

const TQListViewItemIterator TQListViewItemIterator::operator++ ( int ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Postfix ++. Makes the next item the new current item and returns +the item that was the current item. + +

TQListViewItemIterator & TQListViewItemIterator::operator+= ( int j ) +

+Sets the current item to the item j positions after the current +item. If that item is beyond the last item, the current item is +set to 0. Returns the current item. + +

TQListViewItemIterator & TQListViewItemIterator::operator-- () +

+Prefix --. Makes the previous item the new current item and +returns it. Returns 0 if the current item is the first item or the +TQListView is 0. + +

const TQListViewItemIterator TQListViewItemIterator::operator-- ( int ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Postfix --. Makes the previous item the new current item and +returns the item that was the current item. + +

TQListViewItemIterator & TQListViewItemIterator::operator-= ( int j ) +

+Sets the current item to the item j positions before the +current item. If that item is before the first item, the current +item is set to 0. Returns the current item. + +

TQListViewItemIterator & TQListViewItemIterator::operator= ( const TQListViewItemIterator & it ) +

+Assignment. Makes a copy of it and returns a reference to its +iterator. + + +

+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/qlistviewitems.png b/doc/html/qlistviewitems.png new file mode 100644 index 00000000..fe862c70 Binary files /dev/null and b/doc/html/qlistviewitems.png differ diff --git a/doc/html/qlocale-h.html b/doc/html/qlocale-h.html new file mode 100644 index 00000000..2ab807e2 --- /dev/null +++ b/doc/html/qlocale-h.html @@ -0,0 +1,539 @@ + + + + + +qlocale.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qlocale.h

+ +

This is the verbatim text of the qlocale.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qlocale.h   3.3.8   edited Jan 11 14:38 $
+**
+** Declaration of the TQLocale class
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the tools module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements will be met:
+** http://trolltech.com/products/qt/licenses/licensing/opensource/.
+** If you are unsure which license is appropriate for your use, please
+** review the following information:
+** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
+** or contact the sales department at sales@trolltech.com.
+**
+** This file may be used under the terms of the Q Public License as
+** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
+** included in the packaging of this file.  Licensees holding valid TQt
+** Commercial licenses may use this file in accordance with the TQt
+** Commercial License Agreement provided with the Software.
+**
+** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
+** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
+** herein.
+**
+**********************************************************************/
+
+#ifndef TQLOCALE_H
+#define TQLOCALE_H
+
+#include "qstring.h"
+
+struct TQLocalePrivate;
+
+class Q_EXPORT TQLocale
+{
+    friend class TQString;
+
+public:
+    enum Language {
+        C = 1,
+        Abkhazian = 2,
+        Afan = 3,
+        Afar = 4,
+        Afrikaans = 5,
+        Albanian = 6,
+        Amharic = 7,
+        Arabic = 8,
+        Armenian = 9,
+        Assamese = 10,
+        Aymara = 11,
+        Azerbaijani = 12,
+        Bashkir = 13,
+        Basque = 14,
+        Bengali = 15,
+        Bhutani = 16,
+        Bihari = 17,
+        Bislama = 18,
+        Breton = 19,
+        Bulgarian = 20,
+        Burmese = 21,
+        Byelorussian = 22,
+        Cambodian = 23,
+        Catalan = 24,
+        Chinese = 25,
+        Corsican = 26,
+        Croatian = 27,
+        Czech = 28,
+        Danish = 29,
+        Dutch = 30,
+        English = 31,
+        Esperanto = 32,
+        Estonian = 33,
+        Faroese = 34,
+        FijiLanguage = 35,
+        Finnish = 36,
+        French = 37,
+        Frisian = 38,
+        Gaelic = 39,
+        Galician = 40,
+        Georgian = 41,
+        German = 42,
+        Greek = 43,
+        Greenlandic = 44,
+        Guarani = 45,
+        Gujarati = 46,
+        Hausa = 47,
+        Hebrew = 48,
+        Hindi = 49,
+        Hungarian = 50,
+        Icelandic = 51,
+        Indonesian = 52,
+        Interlingua = 53,
+        Interlingue = 54,
+        Inuktitut = 55,
+        Inupiak = 56,
+        Irish = 57,
+        Italian = 58,
+        Japanese = 59,
+        Javanese = 60,
+        Kannada = 61,
+        Kashmiri = 62,
+        Kazakh = 63,
+        Kinyarwanda = 64,
+        Kirghiz = 65,
+        Korean = 66,
+        Kurdish = 67,
+        Kurundi = 68,
+        Laothian = 69,
+        Latin = 70,
+        Latvian = 71,
+        Lingala = 72,
+        Lithuanian = 73,
+        Macedonian = 74,
+        Malagasy = 75,
+        Malay = 76,
+        Malayalam = 77,
+        Maltese = 78,
+        Maori = 79,
+        Marathi = 80,
+        Moldavian = 81,
+        Mongolian = 82,
+        NauruLanguage = 83,
+        Nepali = 84,
+        Norwegian = 85,
+        Occitan = 86,
+        Oriya = 87,
+        Pashto = 88,
+        Persian = 89,
+        Polish = 90,
+        Portuguese = 91,
+        Punjabi = 92,
+        Quechua = 93,
+        RhaetoRomance = 94,
+        Romanian = 95,
+        Russian = 96,
+        Samoan = 97,
+        Sangho = 98,
+        Sanskrit = 99,
+        Serbian = 100,
+        SerboCroatian = 101,
+        Sesotho = 102,
+        Setswana = 103,
+        Shona = 104,
+        Sindhi = 105,
+        Singhalese = 106,
+        Siswati = 107,
+        Slovak = 108,
+        Slovenian = 109,
+        Somali = 110,
+        Spanish = 111,
+        Sundanese = 112,
+        Swahili = 113,
+        Swedish = 114,
+        Tagalog = 115,
+        Tajik = 116,
+        Tamil = 117,
+        Tatar = 118,
+        Telugu = 119,
+        Thai = 120,
+        Tibetan = 121,
+        Tigrinya = 122,
+        TongaLanguage = 123,
+        Tsonga = 124,
+        Turkish = 125,
+        Turkmen = 126,
+        Twi = 127,
+        Uigur = 128,
+        Ukrainian = 129,
+        Urdu = 130,
+        Uzbek = 131,
+        Vietnamese = 132,
+        Volapuk = 133,
+        Welsh = 134,
+        Wolof = 135,
+        Xhosa = 136,
+        Yiddish = 137,
+        Yoruba = 138,
+        Zhuang = 139,
+        Zulu = 140,
+        LastLanguage = Zulu
+    };
+
+    enum Country {
+        AnyCountry = 0,
+        Afghanistan = 1,
+        Albania = 2,
+        Algeria = 3,
+        AmericanSamoa = 4,
+        Andorra = 5,
+        Angola = 6,
+        Anguilla = 7,
+        Antarctica = 8,
+        AntiguaAndBarbuda = 9,
+        Argentina = 10,
+        Armenia = 11,
+        Aruba = 12,
+        Australia = 13,
+        Austria = 14,
+        Azerbaijan = 15,
+        Bahamas = 16,
+        Bahrain = 17,
+        Bangladesh = 18,
+        Barbados = 19,
+        Belarus = 20,
+        Belgium = 21,
+        Belize = 22,
+        Benin = 23,
+        Bermuda = 24,
+        Bhutan = 25,
+        Bolivia = 26,
+        BosniaAndHerzegowina = 27,
+        Botswana = 28,
+        BouvetIsland = 29,
+        Brazil = 30,
+        BritishIndianOceanTerritory = 31,
+        BruneiDarussalam = 32,
+        Bulgaria = 33,
+        BurkinaFaso = 34,
+        Burundi = 35,
+        Cambodia = 36,
+        Cameroon = 37,
+        Canada = 38,
+        CapeVerde = 39,
+        CaymanIslands = 40,
+        CentralAfricanRepublic = 41,
+        Chad = 42,
+        Chile = 43,
+        China = 44,
+        ChristmasIsland = 45,
+        CocosIslands = 46,
+        Colombia = 47,
+        Comoros = 48,
+        DemocraticRepublicOfCongo = 49,
+        PeoplesRepublicOfCongo = 50,
+        CookIslands = 51,
+        CostaRica = 52,
+        IvoryCoast = 53,
+        Croatia = 54,
+        Cuba = 55,
+        Cyprus = 56,
+        CzechRepublic = 57,
+        Denmark = 58,
+        Djibouti = 59,
+        Dominica = 60,
+        DominicanRepublic = 61,
+        EastTimor = 62,
+        Ecuador = 63,
+        Egypt = 64,
+        ElSalvador = 65,
+        EquatorialGuinea = 66,
+        Eritrea = 67,
+        Estonia = 68,
+        Ethiopia = 69,
+        FalklandIslands = 70,
+        FaroeIslands = 71,
+        FijiCountry = 72,
+        Finland = 73,
+        France = 74,
+        MetropolitanFrance = 75,
+        FrenchGuiana = 76,
+        FrenchPolynesia = 77,
+        FrenchSouthernTerritories = 78,
+        Gabon = 79,
+        Gambia = 80,
+        Georgia = 81,
+        Germany = 82,
+        Ghana = 83,
+        Gibraltar = 84,
+        Greece = 85,
+        Greenland = 86,
+        Grenada = 87,
+        Guadeloupe = 88,
+        Guam = 89,
+        Guatemala = 90,
+        Guinea = 91,
+        GuineaBissau = 92,
+        Guyana = 93,
+        Haiti = 94,
+        HeardAndMcDonaldIslands = 95,
+        Honduras = 96,
+        HongKong = 97,
+        Hungary = 98,
+        Iceland = 99,
+        India = 100,
+        Indonesia = 101,
+        Iran = 102,
+        Iraq = 103,
+        Ireland = 104,
+        Israel = 105,
+        Italy = 106,
+        Jamaica = 107,
+        Japan = 108,
+        Jordan = 109,
+        Kazakhstan = 110,
+        Kenya = 111,
+        Kiribati = 112,
+        DemocraticRepublicOfKorea = 113,
+        RepublicOfKorea = 114,
+        Kuwait = 115,
+        Kyrgyzstan = 116,
+        Lao = 117,
+        Latvia = 118,
+        Lebanon = 119,
+        Lesotho = 120,
+        Liberia = 121,
+        LibyanArabJamahiriya = 122,
+        Liechtenstein = 123,
+        Lithuania = 124,
+        Luxembourg = 125,
+        Macau = 126,
+        Macedonia = 127,
+        Madagascar = 128,
+        Malawi = 129,
+        Malaysia = 130,
+        Maldives = 131,
+        Mali = 132,
+        Malta = 133,
+        MarshallIslands = 134,
+        Martinique = 135,
+        Mauritania = 136,
+        Mauritius = 137,
+        Mayotte = 138,
+        Mexico = 139,
+        Micronesia = 140,
+        Moldova = 141,
+        Monaco = 142,
+        Mongolia = 143,
+        Montserrat = 144,
+        Morocco = 145,
+        Mozambique = 146,
+        Myanmar = 147,
+        Namibia = 148,
+        NauruCountry = 149,
+        Nepal = 150,
+        Netherlands = 151,
+        NetherlandsAntilles = 152,
+        NewCaledonia = 153,
+        NewZealand = 154,
+        Nicaragua = 155,
+        Niger = 156,
+        Nigeria = 157,
+        Niue = 158,
+        NorfolkIsland = 159,
+        NorthernMarianaIslands = 160,
+        Norway = 161,
+        Oman = 162,
+        Pakistan = 163,
+        Palau = 164,
+        PalestinianTerritory = 165,
+        Panama = 166,
+        PapuaNewGuinea = 167,
+        Paraguay = 168,
+        Peru = 169,
+        Philippines = 170,
+        Pitcairn = 171,
+        Poland = 172,
+        Portugal = 173,
+        PuertoRico = 174,
+        Qatar = 175,
+        Reunion = 176,
+        Romania = 177,
+        RussianFederation = 178,
+        Rwanda = 179,
+        SaintKittsAndNevis = 180,
+        StLucia = 181,
+        StVincentAndTheGrenadines = 182,
+        Samoa = 183,
+        SanMarino = 184,
+        SaoTomeAndPrincipe = 185,
+        SaudiArabia = 186,
+        Senegal = 187,
+        Seychelles = 188,
+        SierraLeone = 189,
+        Singapore = 190,
+        Slovakia = 191,
+        Slovenia = 192,
+        SolomonIslands = 193,
+        Somalia = 194,
+        SouthAfrica = 195,
+        SouthGeorgiaAndTheSouthSandwichIslands = 196,
+        Spain = 197,
+        SriLanka = 198,
+        StHelena = 199,
+        StPierreAndMiquelon = 200,
+        Sudan = 201,
+        Suriname = 202,
+        SvalbardAndJanMayenIslands = 203,
+        Swaziland = 204,
+        Sweden = 205,
+        Switzerland = 206,
+        SyrianArabRepublic = 207,
+        Taiwan = 208,
+        Tajikistan = 209,
+        Tanzania = 210,
+        Thailand = 211,
+        Togo = 212,
+        Tokelau = 213,
+        TongaCountry = 214,
+        TrinidadAndTobago = 215,
+        Tunisia = 216,
+        Turkey = 217,
+        Turkmenistan = 218,
+        TurksAndCaicosIslands = 219,
+        Tuvalu = 220,
+        Uganda = 221,
+        Ukraine = 222,
+        UnitedArabEmirates = 223,
+        UnitedKingdom = 224,
+        UnitedStates = 225,
+        UnitedStatesMinorOutlyingIslands = 226,
+        Uruguay = 227,
+        Uzbekistan = 228,
+        Vanuatu = 229,
+        VaticanCityState = 230,
+        Venezuela = 231,
+        VietNam = 232,
+        BritishVirginIslands = 233,
+        USVirginIslands = 234,
+        WallisAndFutunaIslands = 235,
+        WesternSahara = 236,
+        Yemen = 237,
+        Yugoslavia = 238,
+        Zambia = 239,
+        Zimbabwe = 240,
+        LastCountry = Zimbabwe
+    };
+
+    TQLocale();
+    TQLocale(const TQString &name);
+    TQLocale(Language language, Country country = AnyCountry);
+    TQLocale(const TQLocale &other);
+
+    TQLocale &operator=(const TQLocale &other);
+
+    Language language() const;
+    Country country() const;
+    TQString name() const;
+
+    short toShort(const TQString &s, bool *ok = 0) const;
+    ushort toUShort(const TQString &s, bool *ok = 0) const;
+    int toInt(const TQString &s, bool *ok = 0) const;
+    uint toUInt(const TQString &s, bool *ok = 0) const;
+    Q_LONG toLong(const TQString &s, bool *ok = 0) const;
+    Q_ULONG toULong(const TQString &s, bool *ok = 0) const;
+    Q_LLONG toLongLong(const TQString &s, bool *ok = 0) const;
+    Q_ULLONG toULongLong(const TQString &s, bool *ok = 0) const;
+    float toFloat(const TQString &s, bool *ok = 0) const;
+    double toDouble(const TQString &s, bool *ok = 0) const;
+
+    TQString toString(short i) const
+    { return toString((Q_LLONG)i); }
+    TQString toString(ushort i) const
+    { return toString((Q_ULLONG)i); }
+    TQString toString(int i) const
+    { return toString((Q_LLONG)i); }
+    TQString toString(uint i) const
+    { return toString((Q_ULLONG)i); }
+#if !defined(Q_OS_WIN64)
+    TQString toString(Q_LONG i) const
+    { return toString((Q_LLONG)i); }
+    TQString toString(Q_ULONG i) const
+    { return toString((Q_ULLONG)i); }
+#endif
+    TQString toString(Q_LLONG i) const;
+    TQString toString(Q_ULLONG i) const;
+    TQString toString(float i, char f = 'g', int prec = 6) const
+    { return toString((double) i, f, prec); }
+    TQString toString(double i, char f = 'g', int prec = 6) const;
+
+    static TQString languageToString(Language language);
+    static TQString countryToString(Country country);
+    static void setDefault(const TQLocale &locale);
+
+    static TQLocale c() { return TQLocale(C); }
+    static TQLocale system();
+
+private:
+    const TQLocalePrivate *d;
+    static const TQLocalePrivate *default_d;
+};
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlocale-members.html b/doc/html/qlocale-members.html new file mode 100644 index 00000000..7545e74c --- /dev/null +++ b/doc/html/qlocale-members.html @@ -0,0 +1,67 @@ + + + + + +TQLocale Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQLocale

+ +

This is the complete list of member functions for +TQLocale, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlocale.html b/doc/html/qlocale.html new file mode 100644 index 00000000..2c6ca6e2 --- /dev/null +++ b/doc/html/qlocale.html @@ -0,0 +1,852 @@ + + + + + +TQLocale Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQLocale Class Reference

+ +

The TQLocale class converts between numbers and their +string representations in various languages. +More... +

Almost all the functions in this class are reentrant when TQt is built with thread support. The exception is setDefault(). +

#include <qlocale.h> +

List of all member functions. +

Public Members

+
    +
  • enum Language { C = 1, Abkhazian = 2, Afan = 3, Afar = 4, Afrikaans = 5, Albanian = 6, Amharic = 7, Arabic = 8, Armenian = 9, Assamese = 10, Aymara = 11, Azerbaijani = 12, Bashkir = 13, Basque = 14, Bengali = 15, Bhutani = 16, Bihari = 17, Bislama = 18, Breton = 19, Bulgarian = 20, Burmese = 21, Byelorussian = 22, Cambodian = 23, Catalan = 24, Chinese = 25, Corsican = 26, Croatian = 27, Czech = 28, Danish = 29, Dutch = 30, English = 31, Esperanto = 32, Estonian = 33, Faroese = 34, FijiLanguage = 35, Finnish = 36, French = 37, Frisian = 38, Gaelic = 39, Galician = 40, Georgian = 41, German = 42, Greek = 43, Greenlandic = 44, Guarani = 45, Gujarati = 46, Hausa = 47, Hebrew = 48, Hindi = 49, Hungarian = 50, Icelandic = 51, Indonesian = 52, Interlingua = 53, Interlingue = 54, Inuktitut = 55, Inupiak = 56, Irish = 57, Italian = 58, Japanese = 59, Javanese = 60, Kannada = 61, Kashmiri = 62, Kazakh = 63, Kinyarwanda = 64, Kirghiz = 65, Korean = 66, Kurdish = 67, Kurundi = 68, Laothian = 69, Latin = 70, Latvian = 71, Lingala = 72, Lithuanian = 73, Macedonian = 74, Malagasy = 75, Malay = 76, Malayalam = 77, Maltese = 78, Maori = 79, Marathi = 80, Moldavian = 81, Mongolian = 82, NauruLanguage = 83, Nepali = 84, Norwegian = 85, Occitan = 86, Oriya = 87, Pashto = 88, Persian = 89, Polish = 90, Portuguese = 91, Punjabi = 92, Quechua = 93, RhaetoRomance = 94, Romanian = 95, Russian = 96, Samoan = 97, Sangho = 98, Sanskrit = 99, Serbian = 100, SerboCroatian = 101, Sesotho = 102, Setswana = 103, Shona = 104, Sindhi = 105, Singhalese = 106, Siswati = 107, Slovak = 108, Slovenian = 109, Somali = 110, Spanish = 111, Sundanese = 112, Swahili = 113, Swedish = 114, Tagalog = 115, Tajik = 116, Tamil = 117, Tatar = 118, Telugu = 119, Thai = 120, Tibetan = 121, Tigrinya = 122, TongaLanguage = 123, Tsonga = 124, Turkish = 125, Turkmen = 126, Twi = 127, Uigur = 128, Ukrainian = 129, Urdu = 130, Uzbek = 131, Vietnamese = 132, Volapuk = 133, Welsh = 134, Wolof = 135, Xhosa = 136, Yiddish = 137, Yoruba = 138, Zhuang = 139, Zulu = 140, LastLanguage = Zulu }
  • +
  • enum Country { AnyCountry = 0, Afghanistan = 1, Albania = 2, Algeria = 3, AmericanSamoa = 4, Andorra = 5, Angola = 6, Anguilla = 7, Antarctica = 8, AntiguaAndBarbuda = 9, Argentina = 10, Armenia = 11, Aruba = 12, Australia = 13, Austria = 14, Azerbaijan = 15, Bahamas = 16, Bahrain = 17, Bangladesh = 18, Barbados = 19, Belarus = 20, Belgium = 21, Belize = 22, Benin = 23, Bermuda = 24, Bhutan = 25, Bolivia = 26, BosniaAndHerzegowina = 27, Botswana = 28, BouvetIsland = 29, Brazil = 30, BritishIndianOceanTerritory = 31, BruneiDarussalam = 32, Bulgaria = 33, BurkinaFaso = 34, Burundi = 35, Cambodia = 36, Cameroon = 37, Canada = 38, CapeVerde = 39, CaymanIslands = 40, CentralAfricanRepublic = 41, Chad = 42, Chile = 43, China = 44, ChristmasIsland = 45, CocosIslands = 46, Colombia = 47, Comoros = 48, DemocraticRepublicOfCongo = 49, PeoplesRepublicOfCongo = 50, CookIslands = 51, CostaRica = 52, IvoryCoast = 53, Croatia = 54, Cuba = 55, Cyprus = 56, CzechRepublic = 57, Denmark = 58, Djibouti = 59, Dominica = 60, DominicanRepublic = 61, EastTimor = 62, Ecuador = 63, Egypt = 64, ElSalvador = 65, EquatorialGuinea = 66, Eritrea = 67, Estonia = 68, Ethiopia = 69, FalklandIslands = 70, FaroeIslands = 71, FijiCountry = 72, Finland = 73, France = 74, MetropolitanFrance = 75, FrenchGuiana = 76, FrenchPolynesia = 77, FrenchSouthernTerritories = 78, Gabon = 79, Gambia = 80, Georgia = 81, Germany = 82, Ghana = 83, Gibraltar = 84, Greece = 85, Greenland = 86, Grenada = 87, Guadeloupe = 88, Guam = 89, Guatemala = 90, Guinea = 91, GuineaBissau = 92, Guyana = 93, Haiti = 94, HeardAndMcDonaldIslands = 95, Honduras = 96, HongKong = 97, Hungary = 98, Iceland = 99, India = 100, Indonesia = 101, Iran = 102, Iraq = 103, Ireland = 104, Israel = 105, Italy = 106, Jamaica = 107, Japan = 108, Jordan = 109, Kazakhstan = 110, Kenya = 111, Kiribati = 112, DemocraticRepublicOfKorea = 113, RepublicOfKorea = 114, Kuwait = 115, Kyrgyzstan = 116, Lao = 117, Latvia = 118, Lebanon = 119, Lesotho = 120, Liberia = 121, LibyanArabJamahiriya = 122, Liechtenstein = 123, Lithuania = 124, Luxembourg = 125, Macau = 126, Macedonia = 127, Madagascar = 128, Malawi = 129, Malaysia = 130, Maldives = 131, Mali = 132, Malta = 133, MarshallIslands = 134, Martinique = 135, Mauritania = 136, Mauritius = 137, Mayotte = 138, Mexico = 139, Micronesia = 140, Moldova = 141, Monaco = 142, Mongolia = 143, Montserrat = 144, Morocco = 145, Mozambique = 146, Myanmar = 147, Namibia = 148, NauruCountry = 149, Nepal = 150, Netherlands = 151, NetherlandsAntilles = 152, NewCaledonia = 153, NewZealand = 154, Nicaragua = 155, Niger = 156, Nigeria = 157, Niue = 158, NorfolkIsland = 159, NorthernMarianaIslands = 160, Norway = 161, Oman = 162, Pakistan = 163, Palau = 164, PalestinianTerritory = 165, Panama = 166, PapuaNewGuinea = 167, Paraguay = 168, Peru = 169, Philippines = 170, Pitcairn = 171, Poland = 172, Portugal = 173, PuertoRico = 174, Qatar = 175, Reunion = 176, Romania = 177, RussianFederation = 178, Rwanda = 179, SaintKittsAndNevis = 180, StLucia = 181, StVincentAndTheGrenadines = 182, Samoa = 183, SanMarino = 184, SaoTomeAndPrincipe = 185, SaudiArabia = 186, Senegal = 187, Seychelles = 188, SierraLeone = 189, Singapore = 190, Slovakia = 191, Slovenia = 192, SolomonIslands = 193, Somalia = 194, SouthAfrica = 195, SouthGeorgiaAndTheSouthSandwichIslands = 196, Spain = 197, SriLanka = 198, StHelena = 199, StPierreAndMiquelon = 200, Sudan = 201, Suriname = 202, SvalbardAndJanMayenIslands = 203, Swaziland = 204, Sweden = 205, Switzerland = 206, SyrianArabRepublic = 207, Taiwan = 208, Tajikistan = 209, Tanzania = 210, Thailand = 211, Togo = 212, Tokelau = 213, TongaCountry = 214, TrinidadAndTobago = 215, Tunisia = 216, Turkey = 217, Turkmenistan = 218, TurksAndCaicosIslands = 219, Tuvalu = 220, Uganda = 221, Ukraine = 222, UnitedArabEmirates = 223, UnitedKingdom = 224, UnitedStates = 225, UnitedStatesMinorOutlyingIslands = 226, Uruguay = 227, Uzbekistan = 228, Vanuatu = 229, VaticanCityState = 230, Venezuela = 231, VietNam = 232, BritishVirginIslands = 233, USVirginIslands = 234, WallisAndFutunaIslands = 235, WesternSahara = 236, Yemen = 237, Yugoslavia = 238, Zambia = 239, Zimbabwe = 240, LastCountry = Zimbabwe }
  • +
  • TQLocale ()
  • +
  • TQLocale ( const TQString & name )
  • +
  • TQLocale ( Language language, Country country = AnyCountry )
  • +
  • TQLocale ( const TQLocale & other )
  • +
  • TQLocale & operator= ( const TQLocale & other )
  • +
  • Language language () const
  • +
  • Country country () const
  • +
  • TQString name () const
  • +
  • short toShort ( const TQString & s, bool * ok = 0 ) const
  • +
  • ushort toUShort ( const TQString & s, bool * ok = 0 ) const
  • +
  • int toInt ( const TQString & s, bool * ok = 0 ) const
  • +
  • uint toUInt ( const TQString & s, bool * ok = 0 ) const
  • +
  • Q_LONG toLong ( const TQString & s, bool * ok = 0 ) const
  • +
  • Q_ULONG toULong ( const TQString & s, bool * ok = 0 ) const
  • +
  • Q_LLONG toLongLong ( const TQString & s, bool * ok = 0 ) const
  • +
  • Q_ULLONG toULongLong ( const TQString & s, bool * ok = 0 ) const
  • +
  • float toFloat ( const TQString & s, bool * ok = 0 ) const
  • +
  • double toDouble ( const TQString & s, bool * ok = 0 ) const
  • +
  • TQString toString ( short i ) const
  • +
  • TQString toString ( ushort i ) const
  • +
  • TQString toString ( int i ) const
  • +
  • TQString toString ( uint i ) const
  • +
  • TQString toString ( Q_LONG i ) const
  • +
  • TQString toString ( Q_ULONG i ) const
  • +
  • TQString toString ( Q_LLONG i ) const
  • +
  • TQString toString ( Q_ULLONG i ) const
  • +
  • TQString toString ( float i, char f = 'g', int prec = 6 ) const
  • +
  • TQString toString ( double i, char f = 'g', int prec = 6 ) const
  • +
+

Static Public Members

+ +

Detailed Description

+ + +The TQLocale class converts between numbers and their +string representations in various languages. +

+ +

It is initialized with a country/language pair in its constructor +and offers number-to-string and string-to-number conversion +functions simmilar to those in TQString. +

+    TQLocale egyptian(TQLocale::Arabic, TQLocale::Egypt);
+    TQString s1 = egyptian.toString(1.571429E+07, 'e');
+    TQString s2 = egyptian.toString(10);
+
+    double d = egyptian.toDouble(s1);
+    int s2 = egyptian.toInt(s2);
+    
+ +

TQLocale supports the concept of a default locale, which is +determined from the system's locale settings at application +startup. The default locale can be changed by calling the +static member setDefault(). The default locale has the +following effects: +

    +
  • If a TQLocale object is constructed with the default constructor, +it will use the default locale's settings. +
  • TQString::toDouble() interprets the string according to the default +locale. If this fails, it falls back on the "C" locale. +
  • TQString::arg() uses the default locale to format a number when +its position specifier in the format string contains an 'L', +e.g. "%L1". +
+

+    TQLocale::setDefault(TQLocale(TQLocale::Hebrew, TQLocale::Israel));
+    TQLocale hebrew; // Constructs a default TQLocale
+    TQString s1 = hebrew.toString(15714.3, 'e');
+
+    bool ok;
+    double d;
+
+    TQLocale::setDefault(TQLocale::C);
+    d = TQString( "1234,56" ).toDouble(&ok); // ok == false
+    d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
+
+    TQLocale::setDefault(TQLocale::German);
+    d = TQString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56
+    d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
+
+    TQLocale::setDefault(TQLocale(TQLocale::English, TQLocale::UnitedStates));
+    str = TQString( "%1 %L2 %L3" )
+            .arg( 12345 )
+            .arg( 12345 )
+            .arg( 12345, 0, 16 );
+    // str == "12345 12,345 3039"
+    
+ +

When a language/country pair is specified in the constructor, one +of three things can happen: +

    +
  • If the language/country pair is found in the database, it is used. +
  • If the language is found but the country is not, or if the country +is AnyCountry, the language is used with the most +appropriate available country (for example, Germany for German), +
  • If neither the language nor the country are found, TQLocale +defaults to the default locale (see setDefault()). +
+

The "C" locale is identical to English/UnitedStates. +

Use language() and country() to determine the actual language and +country values used. +

An alternative method for constructing a TQLocale object is by +specifying the locale name. +

+    TQLocale korean("ko");
+    TQLocale swiss("de_CH");
+    
+ +

This constructor converts the locale name to a language/country +pair; it does not use the system locale database. +

All the methods in TQLocale, with the exception of setDefault(), +are reentrant. +

See also TQString::toDouble(), TQString::arg(), and Text Related Classes. + +

The double-to-string and string-to-double conversion functions are +covered by the following licenses: +

+

Copyright (c) 1991 by AT&T. +

Permission to use, copy, modify, and distribute this software for any +purpose without fee is hereby granted, provided that this entire notice +is included in all copies of any software which is or includes a copy +or modification of this software and in all copies of the supporting +documentation for such software. +

THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED +WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY +REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY +OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. +

This product includes software developed by the University of +California, Berkeley and its contributors. + +


Member Type Documentation

+

TQLocale::Country

+ +

This enumerated type is used to specify a country. +

    +
  • TQLocale::AnyCountry +
  • TQLocale::Afghanistan +
  • TQLocale::Albania +
  • TQLocale::Algeria +
  • TQLocale::AmericanSamoa +
  • TQLocale::Andorra +
  • TQLocale::Angola +
  • TQLocale::Anguilla +
  • TQLocale::Antarctica +
  • TQLocale::AntiguaAndBarbuda +
  • TQLocale::Argentina +
  • TQLocale::Armenia +
  • TQLocale::Aruba +
  • TQLocale::Australia +
  • TQLocale::Austria +
  • TQLocale::Azerbaijan +
  • TQLocale::Bahamas +
  • TQLocale::Bahrain +
  • TQLocale::Bangladesh +
  • TQLocale::Barbados +
  • TQLocale::Belarus +
  • TQLocale::Belgium +
  • TQLocale::Belize +
  • TQLocale::Benin +
  • TQLocale::Bermuda +
  • TQLocale::Bhutan +
  • TQLocale::Bolivia +
  • TQLocale::BosniaAndHerzegowina +
  • TQLocale::Botswana +
  • TQLocale::BouvetIsland +
  • TQLocale::Brazil +
  • TQLocale::BritishIndianOceanTerritory +
  • TQLocale::BruneiDarussalam +
  • TQLocale::Bulgaria +
  • TQLocale::BurkinaFaso +
  • TQLocale::Burundi +
  • TQLocale::Cambodia +
  • TQLocale::Cameroon +
  • TQLocale::Canada +
  • TQLocale::CapeVerde +
  • TQLocale::CaymanIslands +
  • TQLocale::CentralAfricanRepublic +
  • TQLocale::Chad +
  • TQLocale::Chile +
  • TQLocale::China +
  • TQLocale::ChristmasIsland +
  • TQLocale::CocosIslands +
  • TQLocale::Colombia +
  • TQLocale::Comoros +
  • TQLocale::DemocraticRepublicOfCongo +
  • TQLocale::PeoplesRepublicOfCongo +
  • TQLocale::CookIslands +
  • TQLocale::CostaRica +
  • TQLocale::IvoryCoast +
  • TQLocale::Croatia +
  • TQLocale::Cuba +
  • TQLocale::Cyprus +
  • TQLocale::CzechRepublic +
  • TQLocale::Denmark +
  • TQLocale::Djibouti +
  • TQLocale::Dominica +
  • TQLocale::DominicanRepublic +
  • TQLocale::EastTimor +
  • TQLocale::Ecuador +
  • TQLocale::Egypt +
  • TQLocale::ElSalvador +
  • TQLocale::EquatorialGuinea +
  • TQLocale::Eritrea +
  • TQLocale::Estonia +
  • TQLocale::Ethiopia +
  • TQLocale::FalklandIslands +
  • TQLocale::FaroeIslands +
  • TQLocale::FijiCountry +
  • TQLocale::Finland +
  • TQLocale::France +
  • TQLocale::MetropolitanFrance +
  • TQLocale::FrenchGuiana +
  • TQLocale::FrenchPolynesia +
  • TQLocale::FrenchSouthernTerritories +
  • TQLocale::Gabon +
  • TQLocale::Gambia +
  • TQLocale::Georgia +
  • TQLocale::Germany +
  • TQLocale::Ghana +
  • TQLocale::Gibraltar +
  • TQLocale::Greece +
  • TQLocale::Greenland +
  • TQLocale::Grenada +
  • TQLocale::Guadeloupe +
  • TQLocale::Guam +
  • TQLocale::Guatemala +
  • TQLocale::Guinea +
  • TQLocale::GuineaBissau +
  • TQLocale::Guyana +
  • TQLocale::Haiti +
  • TQLocale::HeardAndMcDonaldIslands +
  • TQLocale::Honduras +
  • TQLocale::HongKong +
  • TQLocale::Hungary +
  • TQLocale::Iceland +
  • TQLocale::India +
  • TQLocale::Indonesia +
  • TQLocale::Iran +
  • TQLocale::Iraq +
  • TQLocale::Ireland +
  • TQLocale::Israel +
  • TQLocale::Italy +
  • TQLocale::Jamaica +
  • TQLocale::Japan +
  • TQLocale::Jordan +
  • TQLocale::Kazakhstan +
  • TQLocale::Kenya +
  • TQLocale::Kiribati +
  • TQLocale::DemocraticRepublicOfKorea +
  • TQLocale::RepublicOfKorea +
  • TQLocale::Kuwait +
  • TQLocale::Kyrgyzstan +
  • TQLocale::Lao +
  • TQLocale::Latvia +
  • TQLocale::Lebanon +
  • TQLocale::Lesotho +
  • TQLocale::Liberia +
  • TQLocale::LibyanArabJamahiriya +
  • TQLocale::Liechtenstein +
  • TQLocale::Lithuania +
  • TQLocale::Luxembourg +
  • TQLocale::Macau +
  • TQLocale::Macedonia +
  • TQLocale::Madagascar +
  • TQLocale::Malawi +
  • TQLocale::Malaysia +
  • TQLocale::Maldives +
  • TQLocale::Mali +
  • TQLocale::Malta +
  • TQLocale::MarshallIslands +
  • TQLocale::Martinique +
  • TQLocale::Mauritania +
  • TQLocale::Mauritius +
  • TQLocale::Mayotte +
  • TQLocale::Mexico +
  • TQLocale::Micronesia +
  • TQLocale::Moldova +
  • TQLocale::Monaco +
  • TQLocale::Mongolia +
  • TQLocale::Montserrat +
  • TQLocale::Morocco +
  • TQLocale::Mozambique +
  • TQLocale::Myanmar +
  • TQLocale::Namibia +
  • TQLocale::NauruCountry +
  • TQLocale::Nepal +
  • TQLocale::Netherlands +
  • TQLocale::NetherlandsAntilles +
  • TQLocale::NewCaledonia +
  • TQLocale::NewZealand +
  • TQLocale::Nicaragua +
  • TQLocale::Niger +
  • TQLocale::Nigeria +
  • TQLocale::Niue +
  • TQLocale::NorfolkIsland +
  • TQLocale::NorthernMarianaIslands +
  • TQLocale::Norway +
  • TQLocale::Oman +
  • TQLocale::Pakistan +
  • TQLocale::Palau +
  • TQLocale::PalestinianTerritory +
  • TQLocale::Panama +
  • TQLocale::PapuaNewGuinea +
  • TQLocale::Paraguay +
  • TQLocale::Peru +
  • TQLocale::Philippines +
  • TQLocale::Pitcairn +
  • TQLocale::Poland +
  • TQLocale::Portugal +
  • TQLocale::PuertoRico +
  • TQLocale::Qatar +
  • TQLocale::Reunion +
  • TQLocale::Romania +
  • TQLocale::RussianFederation +
  • TQLocale::Rwanda +
  • TQLocale::SaintKittsAndNevis +
  • TQLocale::StLucia +
  • TQLocale::StVincentAndTheGrenadines +
  • TQLocale::Samoa +
  • TQLocale::SanMarino +
  • TQLocale::SaoTomeAndPrincipe +
  • TQLocale::SaudiArabia +
  • TQLocale::Senegal +
  • TQLocale::Seychelles +
  • TQLocale::SierraLeone +
  • TQLocale::Singapore +
  • TQLocale::Slovakia +
  • TQLocale::Slovenia +
  • TQLocale::SolomonIslands +
  • TQLocale::Somalia +
  • TQLocale::SouthAfrica +
  • TQLocale::SouthGeorgiaAndTheSouthSandwichIslands +
  • TQLocale::Spain +
  • TQLocale::SriLanka +
  • TQLocale::StHelena +
  • TQLocale::StPierreAndMiquelon +
  • TQLocale::Sudan +
  • TQLocale::Suriname +
  • TQLocale::SvalbardAndJanMayenIslands +
  • TQLocale::Swaziland +
  • TQLocale::Sweden +
  • TQLocale::Switzerland +
  • TQLocale::SyrianArabRepublic +
  • TQLocale::Taiwan +
  • TQLocale::Tajikistan +
  • TQLocale::Tanzania +
  • TQLocale::Thailand +
  • TQLocale::Togo +
  • TQLocale::Tokelau +
  • TQLocale::TongaCountry +
  • TQLocale::TrinidadAndTobago +
  • TQLocale::Tunisia +
  • TQLocale::Turkey +
  • TQLocale::Turkmenistan +
  • TQLocale::TurksAndCaicosIslands +
  • TQLocale::Tuvalu +
  • TQLocale::Uganda +
  • TQLocale::Ukraine +
  • TQLocale::UnitedArabEmirates +
  • TQLocale::UnitedKingdom +
  • TQLocale::UnitedStates +
  • TQLocale::UnitedStatesMinorOutlyingIslands +
  • TQLocale::Uruguay +
  • TQLocale::Uzbekistan +
  • TQLocale::Vanuatu +
  • TQLocale::VaticanCityState +
  • TQLocale::Venezuela +
  • TQLocale::VietNam +
  • TQLocale::BritishVirginIslands +
  • TQLocale::USVirginIslands +
  • TQLocale::WallisAndFutunaIslands +
  • TQLocale::WesternSahara +
  • TQLocale::Yemen +
  • TQLocale::Yugoslavia +
  • TQLocale::Zambia +
  • TQLocale::Zimbabwe +
+

TQLocale::Language

+ +

This enumerated type is used to specify a language. +

    +
  • TQLocale::C - Identical to English/UnitedStates +
  • TQLocale::Abkhazian +
  • TQLocale::Afan +
  • TQLocale::Afar +
  • TQLocale::Afrikaans +
  • TQLocale::Albanian +
  • TQLocale::Amharic +
  • TQLocale::Arabic +
  • TQLocale::Armenian +
  • TQLocale::Assamese +
  • TQLocale::Aymara +
  • TQLocale::Azerbaijani +
  • TQLocale::Bashkir +
  • TQLocale::Basque +
  • TQLocale::Bengali +
  • TQLocale::Bhutani +
  • TQLocale::Bihari +
  • TQLocale::Bislama +
  • TQLocale::Breton +
  • TQLocale::Bulgarian +
  • TQLocale::Burmese +
  • TQLocale::Byelorussian +
  • TQLocale::Cambodian +
  • TQLocale::Catalan +
  • TQLocale::Chinese +
  • TQLocale::Corsican +
  • TQLocale::Croatian +
  • TQLocale::Czech +
  • TQLocale::Danish +
  • TQLocale::Dutch +
  • TQLocale::English +
  • TQLocale::Esperanto +
  • TQLocale::Estonian +
  • TQLocale::Faroese +
  • TQLocale::FijiLanguage +
  • TQLocale::Finnish +
  • TQLocale::French +
  • TQLocale::Frisian +
  • TQLocale::Gaelic +
  • TQLocale::Galician +
  • TQLocale::Georgian +
  • TQLocale::German +
  • TQLocale::Greek +
  • TQLocale::Greenlandic +
  • TQLocale::Guarani +
  • TQLocale::Gujarati +
  • TQLocale::Hausa +
  • TQLocale::Hebrew +
  • TQLocale::Hindi +
  • TQLocale::Hungarian +
  • TQLocale::Icelandic +
  • TQLocale::Indonesian +
  • TQLocale::Interlingua +
  • TQLocale::Interlingue +
  • TQLocale::Inuktitut +
  • TQLocale::Inupiak +
  • TQLocale::Irish +
  • TQLocale::Italian +
  • TQLocale::Japanese +
  • TQLocale::Javanese +
  • TQLocale::Kannada +
  • TQLocale::Kashmiri +
  • TQLocale::Kazakh +
  • TQLocale::Kinyarwanda +
  • TQLocale::Kirghiz +
  • TQLocale::Korean +
  • TQLocale::Kurdish +
  • TQLocale::Kurundi +
  • TQLocale::Laothian +
  • TQLocale::Latin +
  • TQLocale::Latvian +
  • TQLocale::Lingala +
  • TQLocale::Lithuanian +
  • TQLocale::Macedonian +
  • TQLocale::Malagasy +
  • TQLocale::Malay +
  • TQLocale::Malayalam +
  • TQLocale::Maltese +
  • TQLocale::Maori +
  • TQLocale::Marathi +
  • TQLocale::Moldavian +
  • TQLocale::Mongolian +
  • TQLocale::NauruLanguage +
  • TQLocale::Nepali +
  • TQLocale::Norwegian +
  • TQLocale::Occitan +
  • TQLocale::Oriya +
  • TQLocale::Pashto +
  • TQLocale::Persian +
  • TQLocale::Polish +
  • TQLocale::Portuguese +
  • TQLocale::Punjabi +
  • TQLocale::Quechua +
  • TQLocale::RhaetoRomance +
  • TQLocale::Romanian +
  • TQLocale::Russian +
  • TQLocale::Samoan +
  • TQLocale::Sangho +
  • TQLocale::Sanskrit +
  • TQLocale::Serbian +
  • TQLocale::SerboCroatian +
  • TQLocale::Sesotho +
  • TQLocale::Setswana +
  • TQLocale::Shona +
  • TQLocale::Sindhi +
  • TQLocale::Singhalese +
  • TQLocale::Siswati +
  • TQLocale::Slovak +
  • TQLocale::Slovenian +
  • TQLocale::Somali +
  • TQLocale::Spanish +
  • TQLocale::Sundanese +
  • TQLocale::Swahili +
  • TQLocale::Swedish +
  • TQLocale::Tagalog +
  • TQLocale::Tajik +
  • TQLocale::Tamil +
  • TQLocale::Tatar +
  • TQLocale::Telugu +
  • TQLocale::Thai +
  • TQLocale::Tibetan +
  • TQLocale::Tigrinya +
  • TQLocale::TongaLanguage +
  • TQLocale::Tsonga +
  • TQLocale::Turkish +
  • TQLocale::Turkmen +
  • TQLocale::Twi +
  • TQLocale::Uigur +
  • TQLocale::Ukrainian +
  • TQLocale::Urdu +
  • TQLocale::Uzbek +
  • TQLocale::Vietnamese +
  • TQLocale::Volapuk +
  • TQLocale::Welsh +
  • TQLocale::Wolof +
  • TQLocale::Xhosa +
  • TQLocale::Yiddish +
  • TQLocale::Yoruba +
  • TQLocale::Zhuang +
  • TQLocale::Zulu +
+

Member Function Documentation

+

TQLocale::TQLocale () +

+Constructs a TQLocale object initialized with the default locale. +

See also setDefault(). + +

TQLocale::TQLocale ( const TQString & name ) +

+Constructs a TQLocale object with the specified name, +which has the format +"language[_country][.codeset][@modifier]" or "C", where: +

    +
  • language is a lowercase, two-letter, ISO 639 language code, +
  • territory is an uppercase, two-letter, ISO 3166 country code, +
  • and codeset and modifier are ignored. +
+

If the string violates the locale format, or language is not +a valid ISO 369 code, the "C" locale is used instead. If country +is not present, or is not a valid ISO 3166 code, the most +appropriate country is chosen for the specified language. +

The language and country codes are converted to their respective +Language and Country enums. After this conversion is +performed the constructor behaves exactly like TQLocale(Country, +Language). +

This constructor is much slower than TQLocale(Country, Language). +

See also name(). + +

TQLocale::TQLocale ( Language language, Country country = AnyCountry ) +

+Constructs a TQLocale object with the specified language and country. +

    +
  • If the language/country pair is found in the database, it is used. +
  • If the language is found but the country is not, or if the country +is AnyCountry, the language is used with the most +appropriate available country (for example, Germany for German), +
  • If neither the language nor the country are found, TQLocale +defaults to the default locale (see setDefault()). +
+

The language and country that are actually used can be queried +using language() and country(). +

See also setDefault(), language(), and country(). + +

TQLocale::TQLocale ( const TQLocale & other ) +

+Constructs a TQLocale object as a copy of other. + +

TQLocale TQLocale::c () [static] +

+ +

Returns a TQLocale object initialized to the "C" locale. +

See also system(). + +

Country TQLocale::country () const +

+Returns the country of this locale. +

See also TQLocale(). + +

TQString TQLocale::countryToString ( Country country ) [static] +

+Returns a TQString containing the name of country. + +

Language TQLocale::language () const +

+Returns the language of this locale. +

See also TQLocale(). + +

TQString TQLocale::languageToString ( Language language ) [static] +

+Returns a TQString containing the name of language. + +

TQString TQLocale::name () const +

+Returns the language and country of this locale as a +string of the form "language_country", where +language is a lowercase, two-letter ISO 639 language code, +and country is an uppercase, two-letter ISO 3166 country code. +

See also TQLocale(). + +

TQLocale & TQLocale::operator= ( const TQLocale & other ) +

+Assigns other to this TQLocale object and returns a reference +to this TQLocale object. + +

void TQLocale::setDefault ( const TQLocale & locale ) [static] +

Warning: This function is not reentrant.

+ + +

Sets the global default locale to locale. These +values are used when a TQLocale object is constructed with +no arguments. If this function is not called, the system's +locale is used. +

Warning: In a multithreaded application, the default locale +should be set at application startup, before any non-GUI threads +are created. +

See also system() and c(). + +

TQLocale TQLocale::system () [static] +

+Returns a TQLocale object initialized to the system locale. + +

double TQLocale::toDouble ( const TQString & s, bool * ok = 0 ) const +

+Returns the double represented by the localized string s, or +0.0 if the conversion failed. +

If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

Unlike TQString::toDouble(), this function does not fall back to +the "C" locale if the string cannot be interpreted in this +locale. +

+        bool ok;
+        double d;
+
+        TQLocale c(TQLocale::C);
+        d = c.toDouble( "1234.56", &ok );  // ok == true, d == 1234.56
+        d = c.toDouble( "1,234.56", &ok ); // ok == true, d == 1234.56
+        d = c.toDouble( "1234,56", &ok );  // ok == false
+
+        TQLocale german(TQLocale::German);
+        d = german.toDouble( "1234,56", &ok );  // ok == true, d == 1234.56
+        d = german.toDouble( "1.234,56", &ok ); // ok == true, d == 1234.56
+        d = german.toDouble( "1234.56", &ok );  // ok == false
+
+        d = german.toDouble( "1.234", &ok );    // ok == true, d == 1234.0
+    
+ +

Notice that the last conversion returns 1234.0, because '.' is the +thousands group separator in the German locale. +

This function ignores leading and trailing whitespace. +

See also toString() and TQString::toDouble(). + +

float TQLocale::toFloat ( const TQString & s, bool * ok = 0 ) const +

+Returns the float represented by the localized string s, or 0.0 +if the conversion failed. +

If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

This function ignores leading and trailing whitespace. +

See also toString(). + +

int TQLocale::toInt ( const TQString & s, bool * ok = 0 ) const +

+Returns the int represented by the localized string s, or 0 if +the conversion failed. +

If ok is not 0, reports failure by setting *ok to false and +success by setting *ok to true. +

This function ignores leading and trailing whitespace. +

See also toString(). + +

Q_LONG TQLocale::toLong ( const TQString & s, bool * ok = 0 ) const +

+Returns the long int represented by the localized string s, or +0 if the conversion failed. +

If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

This function ignores leading and trailing whitespace. +

See also toString(). + +

Q_LLONG TQLocale::toLongLong ( const TQString & s, bool * ok = 0 ) const +

+Returns the long long int represented by the localized string s, or 0 if the conversion failed. +

If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

This function ignores leading and trailing whitespace. +

See also toString(). + +

short TQLocale::toShort ( const TQString & s, bool * ok = 0 ) const +

+Returns the short int represented by the localized string s, or +0 if the conversion failed. +

If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

This function ignores leading and trailing whitespace. +

See also toString(). + +

TQString TQLocale::toString ( Q_LLONG i ) const +

+Returns a localized string representation of i. +

See also toLongLong(). + +

TQString TQLocale::toString ( short i ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

See also toShort(). + +

TQString TQLocale::toString ( ushort i ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

See also toUShort(). + +

TQString TQLocale::toString ( int i ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

See also toInt(). + +

TQString TQLocale::toString ( uint i ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

See also toUInt(). + +

TQString TQLocale::toString ( Q_LONG i ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

See also toLong(). + +

TQString TQLocale::toString ( Q_ULONG i ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

See also toULong(). + +

TQString TQLocale::toString ( Q_ULLONG i ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

See also toULongLong(). + +

TQString TQLocale::toString ( float i, char f = 'g', int prec = 6 ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

f and prec have the same meaning as in TQString::number(double, char, int). +

See also toDouble(). + +

TQString TQLocale::toString ( double i, char f = 'g', int prec = 6 ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

f and prec have the same meaning as in TQString::number(double, char, int). +

See also toDouble(). + +

uint TQLocale::toUInt ( const TQString & s, bool * ok = 0 ) const +

+Returns the unsigned int represented by the localized string s, +or 0 if the conversion failed. +

If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

This function ignores leading and trailing whitespace. +

See also toString(). + +

Q_ULONG TQLocale::toULong ( const TQString & s, bool * ok = 0 ) const +

+Returns the unsigned long int represented by the localized string +s, or 0 if the conversion failed. +

If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

This function ignores leading and trailing whitespace. +

See also toString(). + +

Q_ULLONG TQLocale::toULongLong ( const TQString & s, bool * ok = 0 ) const +

+Returns the unsigned long long int represented by the localized +string s, or 0 if the conversion failed. +

If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

This function ignores leading and trailing whitespace. +

See also toString(). + +

ushort TQLocale::toUShort ( const TQString & s, bool * ok = 0 ) const +

+Returns the unsigned short int represented by the localized string +s, or 0 if the conversion failed. +

If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

This function ignores leading and trailing whitespace. +

See also toString(). + + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlocalfs-h.html b/doc/html/qlocalfs-h.html new file mode 100644 index 00000000..49680ab0 --- /dev/null +++ b/doc/html/qlocalfs-h.html @@ -0,0 +1,120 @@ + + + + + +qlocalfs.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qlocalfs.h

+ +

This is the verbatim text of the qlocalfs.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qlocalfs.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQLocalFs class
+**
+** Created : 950429
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQLOCALFS_H
+#define TQLOCALFS_H
+
+#ifndef QT_H
+#include "qnetworkprotocol.h"
+#include "qdir.h"
+#endif // QT_H
+
+#ifndef QT_NO_NETWORKPROTOCOL
+
+class Q_EXPORT TQLocalFs : public TQNetworkProtocol
+{
+    Q_OBJECT
+
+public:
+    TQLocalFs();
+    virtual int supportedOperations() const;
+
+protected:
+    virtual void operationListChildren( TQNetworkOperation *op );
+    virtual void operationMkDir( TQNetworkOperation *op );
+    virtual void operationRemove( TQNetworkOperation *op );
+    virtual void operationRename( TQNetworkOperation *op );
+    virtual void operationGet( TQNetworkOperation *op );
+    virtual void operationPut( TQNetworkOperation *op );
+
+private:
+    int calcBlockSize( int totalSize ) const;
+    TQDir dir;
+
+};
+
+#endif // QT_NO_NETWORKPROTOCOL
+
+#endif // TQLOCALFS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlocalfs-members.html b/doc/html/qlocalfs-members.html new file mode 100644 index 00000000..bc7911ea --- /dev/null +++ b/doc/html/qlocalfs-members.html @@ -0,0 +1,118 @@ + + + + + +TQLocalFs Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQLocalFs

+ +

This is the complete list of member functions for +TQLocalFs, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qlocalfs.html b/doc/html/qlocalfs.html new file mode 100644 index 00000000..59ad8031 --- /dev/null +++ b/doc/html/qlocalfs.html @@ -0,0 +1,82 @@ + + + + + +TQLocalFs Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQLocalFs Class Reference
[network module]

+ +

The TQLocalFs class is an implementation of a +TQNetworkProtocol that works on the local file system. +More... +

#include <qlocalfs.h> +

Inherits TQNetworkProtocol. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQLocalFs class is an implementation of a +TQNetworkProtocol that works on the local file system. + +

+

+

This class is derived from TQNetworkProtocol. TQLocalFs is not +normally used directly, but rather through a TQUrlOperator, for +example: +

+    TQUrlOperator op( "file:///tmp" );
+    op.listChildren(); // Asks the server to provide a directory listing
+    
+ +

This code will only work if the TQLocalFs class is registered; to +register the class, you must call qInitNetworkProtocols() before +using a TQUrlOperator with TQLocalFs. +

If you really need to use TQLocalFs directly, don't forget +to set its TQUrlOperator with setUrl(). +

See also TQt Network Documentation, TQNetworkProtocol, TQUrlOperator, and Input/Output and Networking. + +


Member Function Documentation

+

TQLocalFs::TQLocalFs () +

+Constructor. + + +

+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/qmacmime-members.html b/doc/html/qmacmime-members.html new file mode 100644 index 00000000..5de581a0 --- /dev/null +++ b/doc/html/qmacmime-members.html @@ -0,0 +1,59 @@ + + + + + +TQMacMime Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMacMime

+ +

This is the complete list of member functions for +TQMacMime, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmacmime.html b/doc/html/qmacmime.html new file mode 100644 index 00000000..11d484af --- /dev/null +++ b/doc/html/qmacmime.html @@ -0,0 +1,181 @@ + + + + + +TQMacMime Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMacMime Class Reference

+ +

The TQMacMime class maps open-standard MIME to Mac flavors. +More... +

#include <qmime.h> +

List of all member functions. +

Public Members

+
    +
  • TQMacMime ( char t )
  • +
  • virtual ~TQMacMime ()
  • +
  • virtual const char * convertorName () = 0
  • +
  • virtual int countFlavors () = 0
  • +
  • virtual int flavor ( int index ) = 0
  • +
  • virtual bool canConvert ( const char * mime, int flav ) = 0
  • +
  • virtual const char * mimeFor ( int flav ) = 0
  • +
  • virtual int flavorFor ( const char * mime ) = 0
  • +
  • virtual TQByteArray convertToMime ( TQValueList<TQByteArray> data, const char * mime, int flav ) = 0
  • +
  • virtual TQValueList<TQByteArray> convertFromMime ( TQByteArray data, const char * mime, int flav ) = 0
  • +
+

Static Public Members

+
    +
  • TQPtrList<TQMacMime> all ( TQMacMimeType t )
  • +
  • TQMacMime * convertor ( TQMacMimeType t, const char * mime, int flav )
  • +
  • const char * flavorToMime ( TQMacMimeType t, int flav )
  • +
+

Detailed Description

+ + +The TQMacMime class maps open-standard MIME to Mac flavors. + + + +

TQt's drag-and-drop and clipboard facilities use the MIME standard. +On X11, this maps trivially to the Xdnd protocol, but on Mac +although some applications use MIME types to describe clipboard +formats, others use arbitrary non-standardized naming conventions, +or unnamed built-in Mac formats. +

By instantiating subclasses of TQMacMime that provide conversions +between Mac flavors and MIME formats, you can convert proprietary +clipboard formats to MIME formats. +

TQt has predefined support for the following Mac flavors: +

    +
  • kScrapFlavorTypeUnicode - converted to "text/plain;charset=ISO-10646-UCS-2" +and supported by TQTextDrag. +
  • kScrapFlavorTypeText - converted to "text/plain;charset=system" or "text/plain" +and supported by TQTextDrag. +
  • kScrapFlavorTypePicture - converted to "image/format", where format is +a TQt image format, +and supported by TQImageDrag. +
  • kDragFlavorTypeHFS - converted to "text/uri-list", +and supported by TQUriDrag. +
+

You can check if a MIME type is convertible using canConvert() and +can perform conversions with convertToMime() and convertFromMime(). +

See also Drag And Drop Classes, Input/Output and Networking, and Miscellaneous Classes. + +


Member Function Documentation

+

TQMacMime::TQMacMime ( char t ) +

+Constructs a new conversion object of type t, adding it to the +globally accessed list of available convertors. + +

TQMacMime::~TQMacMime () [virtual] +

+Destroys a conversion object, removing it from the global +list of available convertors. + +

TQPtrList<TQMacMime> TQMacMime::all ( TQMacMimeType t ) [static] +

+Returns a list of all currently defined TQMacMime objects of type t. + +

bool TQMacMime::canConvert ( const char * mime, int flav ) [pure virtual] +

+ +

Returns TRUE if the convertor can convert (both ways) between +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] +

+ +

Returns data converted from MIME type mime +to Mac flavor flav. +

Note that Mac flavors must all be self-terminating. The return +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] +

+ +

Returns data converted from Mac flavor flav to MIME type mime. +

Note that Mac flavors must all be self-terminating. The input data may contain trailing data. +

All subclasses must reimplement this pure virtual function. + +

TQMacMime * TQMacMime::convertor ( TQMacMimeType t, const char * mime, int flav ) [static] +

+Returns the most-recently created TQMacMime of type t that can convert +between the mime and flav formats. Returns 0 if no such convertor +exists. + +

const char * TQMacMime::convertorName () [pure virtual] +

+ +

Returns a name for the convertor. +

All subclasses must reimplement this pure virtual function. + +

int TQMacMime::countFlavors () [pure virtual] +

+ +

Returns the number of Mac flavors supported by this convertor. +

All subclasses must reimplement this pure virtual function. + +

int TQMacMime::flavor ( int index ) [pure virtual] +

+ +

Returns the Mac flavor supported by this convertor that is +ordinarily at position index. This means that flavor(0) returns +the first Mac flavor supported, and flavor(countFlavors()-1) returns +the last. If index is out of range the return value is undefined. +

All subclasses must reimplement this pure virtual function. + +

int TQMacMime::flavorFor ( const char * mime ) [pure virtual] +

+ +

Returns the Mac flavor used for MIME type mime, or 0 if this +convertor does not support mime. +

All subclasses must reimplement this pure virtual function. + +

const char * TQMacMime::flavorToMime ( TQMacMimeType t, int flav ) [static] +

+Returns a MIME type of type t for flav, or 0 if none exists. + +

const char * TQMacMime::mimeFor ( int flav ) [pure virtual] +

+ +

Returns the MIME type used for Mac flavor flav, or 0 if this +convertor does not support flav. +

All subclasses must reimplement this pure virtual function. + + +


+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/qmacstyle-members.html b/doc/html/qmacstyle-members.html new file mode 100644 index 00000000..85d96f62 --- /dev/null +++ b/doc/html/qmacstyle-members.html @@ -0,0 +1,115 @@ + + + + + +TQMacStyle Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMacStyle

+ +

This is the complete list of member functions for +TQMacStyle, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmacstyle.html b/doc/html/qmacstyle.html new file mode 100644 index 00000000..93ecffbb --- /dev/null +++ b/doc/html/qmacstyle.html @@ -0,0 +1,160 @@ + + + + + +TQMacStyle Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMacStyle Class Reference

+ +

The TQMacStyle class implements an Appearance Manager style. +More... +

#include <qmacstyle_mac.h> +

Inherits TQWindowsStyle. +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Detailed Description

+ + +The TQMacStyle class implements an Appearance Manager style. +

+

This class is implemented as a wrapper to the Apple Appearance +Manager. This allows your application to be styled by whatever +theme your Macintosh is using. This is done by having primitives +in TQStyle implemented in terms of what the Macintosh would +normally theme (i.e. the Finder). +

There are additional issues that should be taken +into consideration to make an application compatible with the +Aqua Style Guidelines. Some of these issues are outlined +below. +

    +

  • Layout - The restrictions on window layout are such that some +aspects of layout that are style-dependent cannot be achieved +using TQLayout. Changes are being considered (and feedback would be +appreciated) to make layouts TQStyle-able. Some of the restrictions +involve horizontal and vertical widget alignment and widget size +(covered below). +

  • Widget size - Aqua allows widgets to have specific fixed sizes. TQt +does not fully implement this behaviour so as to maintain multiplatform +compatibility. As a result some widgets sizes may be inappropriate (and +subsequently not rendered correctly by the Appearance Manager).The +TQWidget::sizeHint() will return the appropriate size for many +managed widgets (widgets enumerated in TQStyle::ContentsType). +

  • Effects - TQMacStyle (in contrast to TQAquaStyle) is not emulating +(except where Appearance Manager does not provide certain +capabilities), for example TQPushButton pulsing effects. In this case a +near matching emulation has been implemented, but naturally this will +not be identical to the similar functionality built into the Appearance +Manager. Please report any issues you see in effects or non-standard +widgets. +

+

There are other issues that need to be considered in the feel of +your application (including the general color scheme to match the +Aqua colors). The Guidelines mentioned above will remain current +with new advances and design suggestions for Mac OS X. +

Note that the functions provided by TQMacStyle are +reimplementations of TQStyle functions; see TQStyle for their +documentation. +

See also Widget Appearance and Style. + +


Member Type Documentation

+

TQMacStyle::FocusRectPolicy

+ +

This type is used to signify a widget's focus rectangle policy. +

    +
  • TQMacStyle::FocusEnabled - show a focus rectangle when the widget has focus. +
  • TQMacStyle::FocusDisabled - never show a focus rectangle for the widget. +
  • TQMacStyle::FocusDefault - show a focus rectangle when the widget has +focus and the widget is a TQSpinWidget, TQDateTimeEdit, TQLineEdit, +TQListBox, TQListView, editable TQTextEdit, or one of their +subclasses. +
+

TQMacStyle::WidgetSizePolicy

+ +
    +
  • TQMacStyle::SizeSmall +
  • TQMacStyle::SizeLarge +
  • TQMacStyle::SizeNone +
  • TQMacStyle::SizeDefault +
+

Member Function Documentation

+

TQMacStyle::TQMacStyle () +

+Constructs a TQMacStyle object. + +

TQMacStyle::~TQMacStyle () [virtual] +

+Destructs a TQMacStyle object. + +

FocusRectPolicy TQMacStyle::focusRectPolicy ( TQWidget * w ) [static] +

+Returns the focus rectangle policy for the widget w. +

The focus rectangle policy can be one of TQMacStyle::FocusRectPolicy. +

See also setFocusRectPolicy(). + +

void TQMacStyle::setFocusRectPolicy ( TQWidget * w, FocusRectPolicy policy ) [static] +

+Sets the focus rectangle policy of w. The policy can be one of +TQMacStyle::FocusRectPolicy. +

See also focusRectPolicy(). + +

void TQMacStyle::setWidgetSizePolicy ( TQWidget * w, WidgetSizePolicy policy ) [static] +

+Sets the widget size policy of w. The policy can be one of +TQMacStyle::WidgetSizePolicy. +

See also widgetSizePolicy(). + +

WidgetSizePolicy TQMacStyle::widgetSizePolicy ( TQWidget * w ) [static] +

+Returns the widget size policy for the widget w. +

The widget size policy can be one of TQMacStyle::WidgetSizePolicy. +

See also setWidgetSizePolicy(). + + +


+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/qmacstyle_mac-h.html b/doc/html/qmacstyle_mac-h.html new file mode 100644 index 00000000..02f33eda --- /dev/null +++ b/doc/html/qmacstyle_mac-h.html @@ -0,0 +1,194 @@ + + + + + +qmacstyle_mac.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmacstyle_mac.h

+ +

This is the verbatim text of the qmacstyle_mac.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmacstyle_mac.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of ...
+**
+** Created : 981231
+**
+** Copyright (C) 1998-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQMACSTYLE_MAC_H
+#define TQMACSTYLE_MAC_H
+
+#ifndef QT_H
+#include "qwindowsstyle.h"
+#endif // QT_H
+
+#if defined( Q_WS_MAC ) && !defined( QT_NO_STYLE_MAC ) 
+
+class TQPalette;
+
+#if defined(QT_PLUGIN)
+#define Q_EXPORT_STYLE_MAC
+#else
+#define Q_EXPORT_STYLE_MAC Q_EXPORT
+#endif
+
+class TQMacStylePrivate;
+
+class Q_EXPORT_STYLE_MAC TQMacStyle : public TQWindowsStyle
+{
+    Q_OBJECT
+public:
+    TQMacStyle( );
+    virtual ~TQMacStyle();
+
+    void polish( TQWidget * w );
+    void unPolish( TQWidget * w );
+    void polish( TQApplication* );
+
+    void drawItem( TQPainter *p, const TQRect &r,
+		   int flags, const TQColorGroup &g, bool enabled,
+		   const TQPixmap *pixmap, const TQString &text,
+		   int len = -1, const TQColor *penColor = 0 ) const;
+
+    void drawPrimitive( PrimitiveElement pe,
+			TQPainter *p,
+			const TQRect &r,
+			const TQColorGroup &cg,
+			SFlags flags = Style_Default,
+			const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawControl( ControlElement element,
+		      TQPainter *p,
+		      const TQWidget *widget,
+		      const TQRect &r,
+		      const TQColorGroup &cg,
+		      SFlags how = Style_Default,
+		      const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawComplexControl( ComplexControl control,
+			     TQPainter* p,
+			     const TQWidget* w,
+			     const TQRect& r,
+			     const TQColorGroup& cg,
+			     SFlags flags = Style_Default,
+			     SCFlags sub = SC_None,
+			     SCFlags subActive = SC_None,
+			     const TQStyleOption& = TQStyleOption::Default ) const;
+
+
+    int pixelMetric( PixelMetric metric,
+		     const TQWidget *widget = 0 ) const;
+
+
+    virtual TQRect querySubControlMetrics( ComplexControl control,
+					  const TQWidget *w,
+					  SubControl sc,
+					  const TQStyleOption& = TQStyleOption::Default ) const;
+
+    virtual TQRect subRect( SubRect, const TQWidget *w ) const;
+
+    SubControl querySubControl( ComplexControl control,
+				const TQWidget *widget,
+				const TQPoint &pos,
+				const TQStyleOption& = TQStyleOption::Default ) const;
+
+    virtual int styleHint(StyleHint sh, const TQWidget *, const TQStyleOption &, 
+			  TQStyleHintReturn *) const;
+
+    TQSize sizeFromContents( ContentsType contents,
+			    const TQWidget *w,
+			    const TQSize &contentsSize,
+			    const TQStyleOption& = TQStyleOption::Default ) const;
+
+    enum FocusRectPolicy { FocusEnabled, FocusDisabled, FocusDefault };
+    static void setFocusRectPolicy( TQWidget *w, FocusRectPolicy policy);
+    static FocusRectPolicy focusRectPolicy( TQWidget *w );
+
+    enum WidgetSizePolicy { SizeSmall, SizeLarge, SizeNone, SizeDefault };
+    static void setWidgetSizePolicy( TQWidget *w, WidgetSizePolicy policy);
+    static WidgetSizePolicy widgetSizePolicy( TQWidget *w );
+
+protected:
+    bool event(TQEvent *);
+
+private:        // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQMacStyle( const TQMacStyle & );
+    TQMacStyle& operator=( const TQMacStyle & );
+#endif
+
+protected:
+    TQMacStylePrivate *d;
+};
+
+#endif // Q_WS_MAC
+
+#endif // TQMACSTYLE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmag-example.html b/doc/html/qmag-example.html new file mode 100644 index 00000000..978475e7 --- /dev/null +++ b/doc/html/qmag-example.html @@ -0,0 +1,446 @@ + + + + + +TQMag + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMag

+ + +

+This is a simple magnifier-type program. It shows how one can do +some tquite low-level operations in a portable way using TQt. +

Run it, click in the magnifier window, then click where you want to +magnify or drag out a rectangle. Two combo boxes let you select +amplification and refresh frequency, a text label tells you the color +of the pixel the cursor is on, and a button lets you save the +magnified area as a .bmp file. +


+

Implementation: +

/****************************************************************************
+** $Id: qt/qmag.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qcombobox.h>
+#include <qpushbutton.h>
+#include <qpixmap.h>
+#include <qimage.h>
+#include <qlabel.h>
+#include <qfiledialog.h>
+#include <qregexp.h>
+
+#include <qapplication.h>
+#include <qpainter.h>
+#include <qwmatrix.h>
+
+
+class MagWidget : public TQWidget
+{
+    Q_OBJECT
+public:
+    MagWidget( TQWidget *parent=0, const char *name=0 );
+
+public slots:
+    void        setZoom( int );
+    void        setRefresh( int );
+    void        save();
+    void        multiSave();
+
+protected:
+    void        paintEvent( TQPaintEvent * );
+    void        mousePressEvent( TQMouseEvent * );
+    void        mouseReleaseEvent( TQMouseEvent * );
+    void        mouseMoveEvent( TQMouseEvent * );
+    void        focusOutEvent( TQFocusEvent * );
+    void        timerEvent( TQTimerEvent * );
+    void        resizeEvent( TQResizeEvent * );
+
+private:
+    void        grabAround(TQPoint pos);
+    void        grab();
+
+    TQComboBox   *zoom;
+    TQComboBox   *refresh;
+    TQPushButton *saveButton;
+    TQPushButton *multiSaveButton;
+    TQPushButton *tquitButton;
+    TQPixmap     pm;             // pixmap, magnified
+    TQPixmap     p;              // pixmap
+    TQImage      image;          // image of pixmap (for RGB)
+    TQLabel      *rgb;
+    int         yoffset;        // pixels in addition to the actual picture
+    int         z;              // magnification factor
+    int         r;              // autorefresh rate (index into refreshrates)
+    bool        grabbing;       // TRUE if qmag is currently grabbing
+    int         grabx, graby;
+    TQString     multifn;        // filename for multisave
+};
+
+
+#ifdef COMPLEX_GUI
+static const char *zoomfactors[] = {
+    "100%", "200%", "300%", "400%", "500%",
+    "600%", "700%", "800%", "1600%", 0 };
+
+static const char *refreshrates[] = {
+    "No autorefresh", "50 per second", "4 per second", "3 per second", "2 per second",
+    "Every second", "Every two seconds", "Every three seconds",
+    "Every five seconds", "Every ten seconds", 0 };
+#endif
+
+static const int timer[] = {
+    0, 20, 250, 333, 500, 1000, 2000, 3000, 5000, 10000 };
+
+
+MagWidget::MagWidget( TQWidget *parent, const char *name )
+    : TQWidget( parent, name)
+{
+    z = 1;                      // default zoom (100%)
+    r = 0;                      // default refresh (none)
+
+#ifdef COMPLEX_GUI
+    int w=0, x=0, n;
+
+    zoom = new TQComboBox( FALSE, this );
+    Q_CHECK_PTR(zoom);
+    zoom->insertStrList( zoomfactors, 9 );
+    connect( zoom, SIGNAL(activated(int)), SLOT(setZoom(int)) );
+
+    refresh = new TQComboBox( FALSE, this );
+    Q_CHECK_PTR(refresh);
+    refresh->insertStrList( refreshrates, 9 );
+    connect( refresh, SIGNAL(activated(int)), SLOT(setRefresh(int)) );
+
+    for( n=0; n<9; n++) {
+        int w2 = zoom->fontMetrics().width( zoomfactors[n] );
+        w = TQMAX(w2, w);
+    }
+    zoom->setGeometry( 2, 2, w+30, 20 );
+
+    x = w+34;
+    w = 0;
+    for( n=0; n<9; n++) {
+        int w2 = refresh->fontMetrics().width( refreshrates[n] );
+        w = TQMAX(w2, w);
+    }
+    refresh->setGeometry( x, 2, w+30, 20 );
+
+    saveButton = new TQPushButton( this );
+    Q_CHECK_PTR(saveButton);
+    connect( saveButton, SIGNAL(clicked()), this, SLOT(save()) );
+    saveButton->setText( "Save" );
+    saveButton->setGeometry( x+w+30+2, 2,
+                             10+saveButton->fontMetrics().width("Save"), 20 );
+
+    multiSaveButton = new TQPushButton( this );
+    multiSaveButton->setToggleButton(TRUE);
+    Q_CHECK_PTR(multiSaveButton);
+    connect( multiSaveButton, SIGNAL(clicked()), this, SLOT(multiSave()) );
+    multiSaveButton->setText( "MultiSave" );
+    multiSaveButton->setGeometry( saveButton->geometry().right() + 2, 2,
+                             10+multiSaveButton->fontMetrics().width("MultiSave"), 20 );
+
+    tquitButton = new TQPushButton( this );
+    Q_CHECK_PTR(tquitButton);
+    connect( tquitButton, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+    tquitButton->setText( "Quit" );
+    tquitButton->setGeometry( multiSaveButton->geometry().right() + 2, 2,
+                             10+tquitButton->fontMetrics().width("Quit"), 20 );
+#else
+    zoom = 0;
+    multiSaveButton = 0;
+#endif
+
+    setRefresh(1);
+    setZoom(5);
+
+    rgb = new TQLabel( this );
+    Q_CHECK_PTR( rgb );
+    rgb->setText( "" );
+    rgb->setAlignment( AlignVCenter );
+    rgb->resize( width(), rgb->fontMetrics().height() + 4 );
+
+#ifdef COMPLEX_GUI
+    yoffset = zoom->height()    // top buttons
+        + 4                     // space around top buttons
+        + rgb->height();        // color-value text height
+    setMinimumSize( tquitButton->pos().x(), yoffset+20 );
+    resize( tquitButton->geometry().topRight().x() + 2, yoffset+60 );
+#else
+    yoffset = 0;
+    resize(350,350);
+#endif
+
+    grabx = graby = -1;
+    grabbing = FALSE;
+
+    setMouseTracking( TRUE );   // and do let me know what pixel I'm at, eh?
+
+    grabAround( TQPoint(grabx=qApp->desktop()->width()/2, graby=qApp->desktop()->height()/2) );
+}
+
+
+void MagWidget::setZoom( int index )
+{
+    if (index == 8)
+        z = 16;
+    else
+        z = index+1;
+    grab();
+}
+
+
+void MagWidget::setRefresh( int index )
+{
+    r = index;
+    killTimers();
+    if (index && !grabbing)
+        startTimer( timer[r] );
+}
+
+
+void MagWidget::save()
+{
+    if ( !p.isNull() ) {
+        killTimers();
+        TQString fn = TQFileDialog::getSaveFileName();
+        if ( !fn.isEmpty() )
+            p.save( fn, "BMP" );
+        if ( r )
+            startTimer( timer[r] );
+    }
+}
+
+void MagWidget::multiSave()
+{
+    if ( !p.isNull() ) {
+        multifn = ""; // stops saving
+        multifn = TQFileDialog::getSaveFileName();
+        if ( multifn.isEmpty() )
+            multiSaveButton->setOn(FALSE);
+        if ( !r )
+            p.save( multifn, "BMP" );
+    } else {
+        multiSaveButton->setOn(FALSE);
+    }
+}
+
+
+void MagWidget::grab()
+{
+    if ( !isVisible() )
+        return;                 // don't eat resources when iconified
+
+    if ( grabx < 0 || graby < 0 )
+        return;                 // don't grab until the user has said to
+
+    int x,y, w,h;
+
+    w = (width()+z-1)/z;
+    h = (height()+z-1-yoffset)/z;
+    if ( w<1 || h<1 )
+        return;                 // don't ask too much from the window system :)
+
+    x = grabx-w/2;              // find a suitable position to grab from
+    y = graby-h/2;
+    if ( x + w > TQApplication::desktop()->width() )
+        x = TQApplication::desktop()->width()-w;
+    else if ( x < 0 )
+        x = 0;
+    if ( y + h > TQApplication::desktop()->height() )
+        y = TQApplication::desktop()->height()-h;
+    else if ( y < 0 )
+        y = 0;
+
+    p = TQPixmap::grabWindow( TQApplication::desktop()->winId(),  x, y, w, h );
+    image = p.convertToImage();
+    TQWMatrix m;                 // after getting it, scale it
+    m.scale( (double)z, (double)z );
+    pm = p.xForm( m );
+
+    if ( !multiSaveButton || !multiSaveButton->isOn() )
+        repaint( FALSE );               // and finally repaint, flicker-free
+}
+
+
+void MagWidget::paintEvent( TQPaintEvent * )
+{
+    if ( !pm.isNull() ) {
+        TQPainter paint( this );
+        paint.drawPixmap( 0, zoom ? zoom->height()+4 : 0, pm,
+                              0,0, width(), height()-yoffset );
+    }
+}
+
+
+void MagWidget::mousePressEvent( TQMouseEvent *e )
+{
+    if ( !grabbing ) {          // prepare to grab...
+        grabbing = TRUE;
+        killTimers();
+        grabMouse( crossCursor );
+        grabx = -1;
+        graby = -1;
+    } else {                    // REALLY prepare to grab
+        grabx = mapToGlobal(e->pos()).x();
+        graby = mapToGlobal(e->pos()).y();
+    }
+}
+
+
+
+void MagWidget::mouseReleaseEvent( TQMouseEvent * e )
+{
+    if ( grabbing && grabx >= 0 && graby >= 0 ) {
+        grabbing = FALSE;
+        grabAround(e->pos());
+        releaseMouse();
+    }
+}
+
+void MagWidget::grabAround(TQPoint pos)
+{
+    int rx, ry;
+    rx = mapToGlobal(pos).x();
+    ry = mapToGlobal(pos).y();
+    int w = TQABS(rx-grabx);
+    int h = TQABS(ry-graby);
+    if ( w > 10 && h > 10 ) {
+        int pz;
+        pz = 1;
+        while ( w*pz*h*pz < width()*(height()-yoffset) &&
+                w*pz < TQApplication::desktop()->width() &&
+                h*pz < TQApplication::desktop()->height() )
+            pz++;
+        if ( (w*pz*h*pz - width()*(height()-yoffset)) >
+             (width()*(height()-yoffset) - w*(pz-1)*h*(pz-1)) )
+            pz--;
+        if ( pz < 1 )
+            pz = 1;
+        if ( pz > 8 )
+            pz = 8;
+        if ( zoom )
+            zoom->setCurrentItem( pz-1 );
+
+        z = pz;
+        grabx = TQMIN(rx, grabx) + w/2;
+        graby = TQMIN(ry, graby) + h/2;
+        resize( w*z, h*z+yoffset );
+    }
+    grab();
+    if ( r )
+        startTimer( timer[r] );
+}
+
+
+void MagWidget::mouseMoveEvent( TQMouseEvent *e )
+{
+    if ( grabbing || pm.isNull() ||
+         e->pos().y() > height() - (zoom ? zoom->fontMetrics().height() - 4 : 0) ||
+         e->pos().y() < (zoom ? zoom->height()+4 : 4) ) {
+        rgb->setText( "" );
+    } else {
+        int x,y;
+        x = e->pos().x() / z;
+        y = (e->pos().y() - ( zoom ? zoom->height() : 0 ) - 4) / z;
+        TQString pixelinfo;
+        if ( image.valid(x,y) )
+        {
+            TQRgb px = image.pixel(x,y);
+            pixelinfo.sprintf(" %3d,%3d,%3d  #%02x%02x%02x",
+                qRed(px), qGreen(px), qBlue(px),
+                qRed(px), qGreen(px), qBlue(px));
+        }
+        TQString label;
+        label.sprintf( "x=%d, y=%d %s",
+            x+grabx, y+graby, (const char*)pixelinfo );
+        rgb->setText( label );
+    }
+}
+
+
+void MagWidget::focusOutEvent( TQFocusEvent * )
+{
+    rgb->setText( "" );
+}
+
+
+void MagWidget::timerEvent( TQTimerEvent * )
+{
+    grab();
+/*
+    if ( multiSaveButton->isOn() && !multifn.isEmpty() ) {
+        TQRegExp num("[0-9][0-9]*");
+        int start;
+        int len;
+        if ((start=num.match(multifn,0,&len))>=0)
+            multifn.replace(num,
+                TQString().setNum(multifn.mid(start,len).toInt()+1)
+            );
+        p.save( multifn, "BMP" );
+    }
+*/
+}
+
+
+void MagWidget::resizeEvent( TQResizeEvent * )
+{
+    rgb->setGeometry( 0, height() - rgb->height(), width(), rgb->height() );
+    grab();
+}
+
+
+#include "qmag.moc"
+
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+    MagWidget m;
+    a.setMainWidget( &m );
+    m.show();
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmainwindow-h.html b/doc/html/qmainwindow-h.html new file mode 100644 index 00000000..f2c72d01 --- /dev/null +++ b/doc/html/qmainwindow-h.html @@ -0,0 +1,306 @@ + + + + + +qmainwindow.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmainwindow.h

+ +

This is the verbatim text of the qmainwindow.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmainwindow.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQMainWindow class
+**
+** Created : 980316
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQMAINWINDOW_H
+#define TQMAINWINDOW_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qtoolbar.h"
+#include "qptrlist.h"
+#include "qtextstream.h"
+#endif // QT_H
+
+#ifndef QT_NO_MAINWINDOW
+
+class TQMenuBar;
+class TQStatusBar;
+class TQToolTipGroup;
+class TQMainWindowPrivate;
+class TQMainWindowLayout;
+class TQPopupMenu;
+
+class Q_EXPORT TQMainWindow: public TQWidget
+{
+    Q_OBJECT
+    Q_PROPERTY( bool rightJustification READ rightJustification WRITE setRightJustification DESIGNABLE false )
+    Q_PROPERTY( bool usesBigPixmaps READ usesBigPixmaps WRITE setUsesBigPixmaps )
+    Q_PROPERTY( bool usesTextLabel READ usesTextLabel WRITE setUsesTextLabel )
+    Q_PROPERTY( bool dockWindowsMovable READ dockWindowsMovable WRITE setDockWindowsMovable )
+    Q_PROPERTY( bool opaqueMoving READ opaqueMoving WRITE setOpaqueMoving )
+
+public:
+    TQMainWindow( TQWidget* parent=0, const char* name=0, WFlags f = WType_TopLevel );
+    ~TQMainWindow();
+
+#ifndef QT_NO_MENUBAR
+    TQMenuBar * menuBar() const;
+#endif
+    TQStatusBar * statusBar() const;
+#ifndef QT_NO_TOOLTIP
+    TQToolTipGroup * toolTipGroup() const;
+#endif
+
+    virtual void setCentralWidget( TQWidget * );
+    TQWidget * centralWidget() const;
+
+    virtual void setDockEnabled( Dock dock, bool enable );
+    bool isDockEnabled( Dock dock ) const;
+    bool isDockEnabled( TQDockArea *area ) const;
+    virtual void setDockEnabled( TQDockWindow *tb, Dock dock, bool enable );
+    bool isDockEnabled( TQDockWindow *tb, Dock dock ) const;
+    bool isDockEnabled( TQDockWindow *tb, TQDockArea *area ) const;
+
+    virtual void addDockWindow( TQDockWindow *, Dock = DockTop, bool newLine = FALSE );
+    virtual void addDockWindow( TQDockWindow *, const TQString &label,
+				Dock = DockTop, bool newLine = FALSE );
+    virtual void moveDockWindow( TQDockWindow *, Dock = DockTop );
+    virtual void moveDockWindow( TQDockWindow *, Dock, bool nl, int index, int extraOffset = -1 );
+    virtual void removeDockWindow( TQDockWindow * );
+
+    void show();
+    void hide();
+    TQSize sizeHint() const;
+    TQSize minimumSizeHint() const;
+
+    bool rightJustification() const;
+    bool usesBigPixmaps() const;
+    bool usesTextLabel() const;
+    bool dockWindowsMovable() const;
+    bool opaqueMoving() const;
+
+    bool eventFilter( TQObject*, TQEvent* );
+
+    bool getLocation( TQDockWindow *tb, Dock &dock, int &index, bool &nl, int &extraOffset ) const;
+
+    TQPtrList<TQDockWindow> dockWindows( Dock dock ) const;
+    TQPtrList<TQDockWindow> dockWindows() const;
+    void lineUpDockWindows( bool keepNewLines = FALSE );
+
+    bool isDockMenuEnabled() const;
+
+    // compatibility stuff
+    bool hasDockWindow( TQDockWindow *dw );
+#ifndef QT_NO_TOOLBAR
+    void addToolBar( TQDockWindow *, Dock = DockTop, bool newLine = FALSE );
+    void addToolBar( TQDockWindow *, const TQString &label,
+		     Dock = DockTop, bool newLine = FALSE );
+    void moveToolBar( TQDockWindow *, Dock = DockTop );
+    void moveToolBar( TQDockWindow *, Dock, bool nl, int index, int extraOffset = -1 );
+    void removeToolBar( TQDockWindow * );
+
+    bool toolBarsMovable() const;
+    TQPtrList<TQToolBar> toolBars( Dock dock ) const;
+    void lineUpToolBars( bool keepNewLines = FALSE );
+#endif
+
+    virtual TQDockArea *dockingArea( const TQPoint &p );
+    TQDockArea *leftDock() const;
+    TQDockArea *rightDock() const;
+    TQDockArea *topDock() const;
+    TQDockArea *bottomDock() const;
+
+    virtual bool isCustomizable() const;
+
+    bool appropriate( TQDockWindow *dw ) const;
+
+    enum DockWindows { OnlyToolBars, NoToolBars, AllDockWindows };
+    TQPopupMenu *createDockWindowMenu( DockWindows dockWindows = AllDockWindows ) const;
+
+public slots:
+    virtual void setRightJustification( bool );
+    virtual void setUsesBigPixmaps( bool );
+    virtual void setUsesTextLabel( bool );
+    virtual void setDockWindowsMovable( bool );
+    virtual void setOpaqueMoving( bool );
+    virtual void setDockMenuEnabled( bool );
+    virtual void whatsThis();
+    virtual void setAppropriate( TQDockWindow *dw, bool a );
+    virtual void customize();
+
+    // compatibility stuff
+    void setToolBarsMovable( bool );
+
+signals:
+    void pixmapSizeChanged( bool );
+    void usesTextLabelChanged( bool );
+    void dockWindowPositionChanged( TQDockWindow * );
+
+#ifndef QT_NO_TOOLBAR
+    // compatibility stuff
+    void toolBarPositionChanged( TQToolBar * );
+#endif
+
+protected slots:
+    virtual void setUpLayout();
+    virtual bool showDockMenu( const TQPoint &globalPos );
+    void menuAboutToShow();
+
+protected:
+    void paintEvent( TQPaintEvent * );
+    void childEvent( TQChildEvent * );
+    bool event( TQEvent * );
+    void styleChange( TQStyle& );
+
+private slots:
+    void slotPlaceChanged();
+    void doLineUp() { lineUpDockWindows( TRUE ); }
+
+private:
+    TQMainWindowPrivate * d;
+    void triggerLayout( bool deleteLayout = TRUE);
+    bool dockMainWindow( TQObject *dock );
+
+#ifndef QT_NO_MENUBAR
+    virtual void setMenuBar( TQMenuBar * );
+#endif
+    virtual void setStatusBar( TQStatusBar * );
+#ifndef QT_NO_TOOLTIP
+    virtual void setToolTipGroup( TQToolTipGroup * );
+#endif
+
+    friend class TQDockWindow;
+    friend class TQMenuBar;
+    friend class TQHideDock;
+    friend class TQToolBar;
+    friend class TQMainWindowLayout;
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQMainWindow( const TQMainWindow & );
+    TQMainWindow& operator=( const TQMainWindow & );
+#endif
+};
+
+#ifndef QT_NO_TOOLBAR
+inline void TQMainWindow::addToolBar( TQDockWindow *w, ToolBarDock dock, bool newLine )
+{
+    addDockWindow( w, dock, newLine );
+}
+
+inline void TQMainWindow::addToolBar( TQDockWindow *w, const TQString &label,
+			      ToolBarDock dock, bool newLine )
+{
+    addDockWindow( w, label, dock, newLine );
+}
+
+inline void TQMainWindow::moveToolBar( TQDockWindow *w, ToolBarDock dock )
+{
+    moveDockWindow( w, dock );
+}
+
+inline void TQMainWindow::moveToolBar( TQDockWindow *w, ToolBarDock dock, bool nl, int index, int extraOffset )
+{
+    moveDockWindow( w, dock, nl, index, extraOffset );
+}
+
+inline void TQMainWindow::removeToolBar( TQDockWindow *w )
+{
+    removeDockWindow( w );
+}
+
+inline bool TQMainWindow::toolBarsMovable() const
+{
+    return dockWindowsMovable();
+}
+
+inline void TQMainWindow::lineUpToolBars( bool keepNewLines )
+{
+    lineUpDockWindows( keepNewLines );
+}
+
+inline void TQMainWindow::setToolBarsMovable( bool b )
+{
+    setDockWindowsMovable( b );
+}
+#endif
+
+#ifndef QT_NO_TEXTSTREAM
+Q_EXPORT TQTextStream &operator<<( TQTextStream &, const TQMainWindow & );
+Q_EXPORT TQTextStream &operator>>( TQTextStream &, TQMainWindow & );
+#endif
+
+#endif // QT_NO_MAINWINDOW
+
+#endif // TQMAINWINDOW_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmainwindow-m.png b/doc/html/qmainwindow-m.png new file mode 100644 index 00000000..fc0d50b6 Binary files /dev/null and b/doc/html/qmainwindow-m.png differ diff --git a/doc/html/qmainwindow-members.html b/doc/html/qmainwindow-members.html new file mode 100644 index 00000000..1d708fa7 --- /dev/null +++ b/doc/html/qmainwindow-members.html @@ -0,0 +1,388 @@ + + + + + +TQMainWindow Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMainWindow

+ +

This is the complete list of member functions for +TQMainWindow, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmainwindow-qdockareas.png b/doc/html/qmainwindow-qdockareas.png new file mode 100644 index 00000000..aba8fea2 Binary files /dev/null and b/doc/html/qmainwindow-qdockareas.png differ diff --git a/doc/html/qmainwindow-w.png b/doc/html/qmainwindow-w.png new file mode 100644 index 00000000..e7e5e406 Binary files /dev/null and b/doc/html/qmainwindow-w.png differ diff --git a/doc/html/qmainwindow.html b/doc/html/qmainwindow.html new file mode 100644 index 00000000..e298dcfb --- /dev/null +++ b/doc/html/qmainwindow.html @@ -0,0 +1,956 @@ + + + + + +TQMainWindow Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMainWindow Class Reference

+ +

The TQMainWindow class provides a main application window, +with a menu bar, dock windows (e.g. for toolbars), and a status +bar. +More... +

#include <qmainwindow.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+
    +
  • TQMainWindow ( TQWidget * parent = 0, const char * name = 0, WFlags f = WType_TopLevel )
  • +
  • ~TQMainWindow ()
  • +
  • TQMenuBar * menuBar () const
  • +
  • TQStatusBar * statusBar () const
  • +
  • TQToolTipGroup * toolTipGroup () const
  • +
  • virtual void setCentralWidget ( TQWidget * w )
  • +
  • TQWidget * centralWidget () const
  • +
  • virtual void setDockEnabled ( Dock dock, bool enable )
  • +
  • bool isDockEnabled ( Dock dock ) const
  • +
  • bool isDockEnabled ( TQDockArea * area ) const
  • +
  • virtual void setDockEnabled ( TQDockWindow * dw, Dock dock, bool enable )
  • +
  • bool isDockEnabled ( TQDockWindow * tb, Dock dock ) const
  • +
  • bool isDockEnabled ( TQDockWindow * dw, TQDockArea * area ) const
  • +
  • virtual void addDockWindow ( TQDockWindow * dockWindow, Dock edge = DockTop, bool newLine = FALSE )
  • +
  • virtual void addDockWindow ( TQDockWindow * dockWindow, const TQString & label, Dock edge = DockTop, bool newLine = FALSE )
  • +
  • virtual void moveDockWindow ( TQDockWindow * dockWindow, Dock edge = DockTop )
  • +
  • virtual void moveDockWindow ( TQDockWindow * dockWindow, Dock edge, bool nl, int index, int extraOffset = -1 )
  • +
  • virtual void removeDockWindow ( TQDockWindow * dockWindow )
  • +
  • bool rightJustification () const  (obsolete)
  • +
  • bool usesBigPixmaps () const
  • +
  • bool usesTextLabel () const
  • +
  • bool dockWindowsMovable () const
  • +
  • bool opaqueMoving () const
  • +
  • bool getLocation ( TQDockWindow * dw, Dock & dock, int & index, bool & nl, int & extraOffset ) const
  • +
  • TQPtrList<TQDockWindow> dockWindows ( Dock dock ) const
  • +
  • TQPtrList<TQDockWindow> dockWindows () const
  • +
  • void lineUpDockWindows ( bool keepNewLines = FALSE )
  • +
  • bool isDockMenuEnabled () const
  • +
  • bool hasDockWindow ( TQDockWindow * dw )
  • +
  • void addToolBar ( TQDockWindow *, Dock = DockTop, bool newLine = FALSE )  (obsolete)
  • +
  • void addToolBar ( TQDockWindow *, const TQString & label, Dock = DockTop, bool newLine = FALSE )  (obsolete)
  • +
  • void moveToolBar ( TQDockWindow *, Dock = DockTop )  (obsolete)
  • +
  • void moveToolBar ( TQDockWindow *, Dock, bool nl, int index, int extraOffset = -1 )  (obsolete)
  • +
  • void removeToolBar ( TQDockWindow * )  (obsolete)
  • +
  • bool toolBarsMovable () const  (obsolete)
  • +
  • TQPtrList<TQToolBar> toolBars ( Dock dock ) const
  • +
  • void lineUpToolBars ( bool keepNewLines = FALSE )  (obsolete)
  • +
  • TQDockArea * leftDock () const
  • +
  • TQDockArea * rightDock () const
  • +
  • TQDockArea * topDock () const
  • +
  • TQDockArea * bottomDock () const
  • +
  • virtual bool isCustomizable () const
  • +
  • bool appropriate ( TQDockWindow * dw ) const
  • +
  • enum DockWindows { OnlyToolBars, NoToolBars, AllDockWindows }
  • +
  • TQPopupMenu * createDockWindowMenu ( DockWindows dockWindows = AllDockWindows ) const
  • +
+

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • bool dockWindowsMovable - whether the dock windows are movable
  • +
  • bool opaqueMoving - whether dock windows are moved opaquely
  • +
  • bool rightJustification - whether the main window right-justifies its dock windows  (obsolete)
  • +
  • bool usesBigPixmaps - whether big pixmaps are enabled
  • +
  • bool usesTextLabel - whether text labels for toolbar buttons are enabled
  • +
+

Protected Members

+
    +
  • virtual void childEvent ( TQChildEvent * e )
  • +
+

Protected Slots

+ +

Related Functions

+
    +
  • TQTextStream & operator<< ( TQTextStream & ts, const TQMainWindow & mainWindow )
  • +
  • TQTextStream & operator>> ( TQTextStream & ts, TQMainWindow & mainWindow )
  • +
+

Detailed Description

+ + +The TQMainWindow class provides a main application window, +with a menu bar, dock windows (e.g. for toolbars), and a status +bar. +

+ +

Main windows are most often used to provide menus, toolbars and a +status bar around a large central widget, such as a text edit, +drawing canvas or TQWorkspace (for MDI applications). TQMainWindow +is usually subclassed since this makes it easier to encapsulate +the central widget, menus and toolbars as well as the window's +state. Subclassing makes it possible to create the slots that are +called when the user clicks menu items or toolbar buttons. You can +also create main windows using TQt + Designer. We'll briefly review adding menu items and +toolbar buttons then describe the facilities of TQMainWindow +itself. +

+    TQMainWindow *mw = new TQMainWindow;
+    TQTextEdit *edit = new TQTextEdit( mw, "editor" );
+    edit->setFocus();
+    mw->setCaption( "Main Window" );
+    mw->setCentralWidget( edit );
+    mw->show();
+    
+ +

TQMainWindows may be created in their own right as shown above. +The central widget is set with setCentralWidget(). Popup menus can +be added to the default menu bar, widgets can be added to the +status bar, toolbars and dock windows can be added to any of the +dock areas. +

+ +

        ApplicationWindow *mw = new ApplicationWindow();
+        mw->setCaption( "TQt Example - Application" );
+        mw->show();
+
+

In the extract above ApplicationWindow is a subclass of +TQMainWindow that we must write for ourselves; this is the usual +approach to using TQMainWindow. (The source for the extracts in +this description are taken from application/main.cpp, application/application.cpp, action/main.cpp, and action/application.cpp ) +

When subclassing we add the menu items and toolbars in the +subclass's constructor. If we've created a TQMainWindow instance +directly we can add menu items and toolbars just as easily by +passing the TQMainWindow instance as the parent instead of the this pointer. +

+ +

        TQPopupMenu * help = new TQPopupMenu( this );
+        menuBar()->insertItem( "&Help", help );
+
+        help->insertItem( "&About", this, SLOT(about()), Key_F1 );
+
+

Here we've added a new menu with one menu item. The menu has been +inserted into the menu bar that TQMainWindow provides by default +and which is accessible through the menuBar() function. The slot +will be called when the menu item is clicked. +

+ +

        TQToolBar * fileTools = new TQToolBar( this, "file operations" );
+        fileTools->setLabel( "File Operations" );
+
        TQToolButton * fileOpen
+            = new TQToolButton( openIcon, "Open File", TQString::null,
+                               this, SLOT(choose()), fileTools, "open file" );
+
+

This extract shows the creation of a toolbar with one toolbar +button. TQMainWindow supplies four dock areas for toolbars. When a +toolbar is created as a child of a TQMainWindow (or derived class) +instance it will be placed in a dock area (the Top dock area by +default). The slot will be called when the toolbar button is +clicked. Any dock window can be added to a dock area either using +addDockWindow(), or by creating a dock window with the TQMainWindow +as the parent. +

+ +

        e = new TQTextEdit( this, "editor" );
+        e->setFocus();
+        setCentralWidget( e );
+        statusBar()->message( "Ready", 2000 );
+
+

Having created the menus and toolbar we create an instance of the +large central widget, give it the focus and set it as the main +window's central widget. In the example we've also set the status +bar, accessed via the statusBar() function, to an initial message +which will be displayed for two seconds. Note that you can add +additional widgets to the status bar, for example labels, to show +further status information. See the TQStatusBar documentation for +details, particularly the addWidget() function. +

Often we want to synchronize a toolbar button with a menu item. +For example, if the user clicks a 'bold' toolbar button we want +the 'bold' menu item to be checked. This synchronization can be +achieved automatically by creating actions and adding the actions +to the toolbar and menu. +

+ +

        TQAction * fileOpenAction;
+
        fileOpenAction = new TQAction( TQPixmap( fileopen ), "&Open...",
+                                      CTRL+Key_O, this, "open" );
+        connect( fileOpenAction, SIGNAL( activated() ) , this, SLOT( choose() ) );
+
+

Here we create an action with an icon which will be used in any +menu and toolbar that the action is added to. We've also given the +action a menu name, '&Open', and a keyboard shortcut. The +connection that we have made will be used when the user clicks +either the menu item or the toolbar button. +

+ +

        TQPopupMenu * file = new TQPopupMenu( this );
+        menuBar()->insertItem( "&File", file );
+
        fileOpenAction->addTo( file );
+
+

The extract above shows the creation of a popup menu. We add the +menu to the TQMainWindow's menu bar and add our action. +

+ +

        TQToolBar * fileTools = new TQToolBar( this, "file operations" );
+        fileTools->setLabel( "File Operations" );
+        fileOpenAction->addTo( fileTools );
+
+

Here we create a new toolbar as a child of the TQMainWindow and add +our action to the toolbar. +

We'll now explore the functionality offered by TQMainWindow. +

The main window will take care of the dock areas, and the geometry +of the central widget, but all other aspects of the central widget +are left to you. TQMainWindow automatically detects the creation of +a menu bar or status bar if you specify the TQMainWindow as parent, +or you can use the provided menuBar() and statusBar() functions. +The functions menuBar() and statusBar() create a suitable widget +if one doesn't exist, and update the window's layout to make +space. +

TQMainWindow provides a TQToolTipGroup connected to the status bar. +The function toolTipGroup() provides access to the default +TQToolTipGroup. It isn't possible to set a different tool tip +group. +

New dock windows and toolbars can be added to a TQMainWindow using +addDockWindow(). Dock windows can be moved using moveDockWindow() +and removed with removeDockWindow(). TQMainWindow allows default +dock window (toolbar) docking in all its dock areas (Top, Left, Right, Bottom). You can use setDockEnabled() to +enable and disable docking areas for dock windows. When adding or +moving dock windows you can specify their 'edge' (dock area). The +currently available edges are: Top, Left, Right, Bottom, Minimized (effectively a 'hidden' dock area) and TornOff (floating). See TQt::Dock for an explanation of these +areas. Note that the *ToolBar functions are included for backward +compatibility; all new code should use the *DockWindow functions. +TQToolbar is a subclass of TQDockWindow so all functions that work +with dock windows work on toolbars in the same way. +

+If the user clicks the close button, then the dock window is +hidden. A dock window can be hidden or unhidden by the user by +right clicking a dock area and clicking the name of the relevant +dock window on the pop up dock window menu. This menu lists the +names of every dock window; visible dock windows have a tick +beside their names. The dock window menu is created automatically +as retquired by createDockWindowMenu(). Since it may not always be +appropriate for a dock window to appear on this menu the +setAppropriate() function is used to inform the main window +whether or not the dock window menu should include a particular +dock window. Double clicking a dock window handle (usually on the +left-hand side of the dock window) undocks (floats) the dock +window. Double clicking a floating dock window's titlebar will +dock the floating dock window. (See also +TQMainWindow::DockWindows.) +

Some functions change the appearance of a TQMainWindow globally: +

+

The user can drag dock windows into any enabled docking area. Dock +windows can also be dragged within a docking area, for example +to rearrange the order of some toolbars. Dock windows can also be +dragged outside any docking area (undocked or 'floated'). Being +able to drag dock windows can be enabled (the default) and +disabled using setDockWindowsMovable(). +

The Minimized edge is a hidden dock area. If this dock area is +enabled the user can hide (minimize) a dock window or show (restore) +a minimized dock window by clicking the dock window handle. If the +user hovers the mouse cursor over one of the handles, the caption of +the dock window is displayed in a tool tip (see +TQDockWindow::caption() or TQToolBar::label()), so if you enable the +Minimized dock area, it is best to specify a meaningful caption +or label for each dock window. To minimize a dock window +programmatically use moveDockWindow() with an edge of Minimized. +

Dock windows are moved transparently by default, i.e. during the +drag an outline rectangle is drawn on the screen representing the +position of the dock window as it moves. If you want the dock +window to be shown normally whilst it is moved use +setOpaqueMoving(). +

The location of a dock window, i.e. its dock area and position +within the dock area, can be determined by calling getLocation(). +Movable dock windows can be lined up to minimize wasted space with +lineUpDockWindows(). Pointers to the dock areas are available from +topDock(), leftDock(), rightDock() and bottomDock(). A customize +menu item is added to the pop up dock window menu if +isCustomizable() returns TRUE; it returns FALSE by default. +Reimplement isCustomizable() and customize() if you want to offer +this extra menu item, for example, to allow the user to change +settings relating to the main window and its toolbars and dock +windows. +

The main window's menu bar is fixed (at the top) by default. If +you want a movable menu bar, create a TQMenuBar as a stretchable +widget inside its own movable dock window and restrict this dock +window to only live within the Top or Bottom dock: +

+    TQToolBar *tb = new TQToolBar( this );
+    addDockWindow( tb, tr( "Menubar" ), Top, FALSE );
+    TQMenuBar *mb = new TQMenuBar( tb );
+    mb->setFrameStyle( TQFrame::NoFrame );
+    tb->setStretchableWidget( mb );
+    setDockEnabled( tb, Left, FALSE );
+    setDockEnabled( tb, Right, FALSE );
+    
+ +

An application with multiple dock windows can choose to save the +current dock window layout in order to restore it later, e.g. in +the next session. You can do this by using the streaming operators +for TQMainWindow. +

To save the layout and positions of all the dock windows do this: +

+    TQFile file( filename );
+    if ( file.open( IO_WriteOnly ) ) {
+        TQTextStream stream( &file );
+        stream << *mainWindow;
+        file.close();
+    }
+    
+ +

To restore the dock window positions and sizes (normally when the +application is next started), do following: +

+    TQFile file( filename );
+    if ( file.open( IO_ReadOnly ) ) {
+        TQTextStream stream( &file );
+        stream >> *mainWindow;
+        file.close();
+    }
+    
+ +

The TQSettings class can be used in conjunction with the streaming +operators to store the application's settings. +

TQMainWindow's management of dock windows and toolbars is done +transparently behind-the-scenes by TQDockArea. +

For multi-document interfaces (MDI), use a TQWorkspace as the +central widget. +

Adding dock windows, e.g. toolbars, to TQMainWindow's dock areas is +straightforward. If the supplied dock areas are not sufficient for +your application we suggest that you create a TQWidget subclass and +add your own dock areas (see TQDockArea) to the subclass since +TQMainWindow provides functionality specific to the standard dock +areas it provides. +

+

See also TQToolBar, TQDockWindow, TQStatusBar, TQAction, TQMenuBar, TQPopupMenu, TQToolTipGroup, TQDialog, and Main Window and Related Classes. + +


Member Type Documentation

+

TQMainWindow::DockWindows

+ +

Right-clicking a dock area will pop-up the dock window menu +(createDockWindowMenu() is called automatically). When called in +code you can specify what items should appear on the menu with +this enum. +

    +
  • TQMainWindow::OnlyToolBars - The menu will list all the toolbars, but not +any other dock windows. +
  • TQMainWindow::NoToolBars - The menu will list dock windows but not +toolbars. +
  • TQMainWindow::AllDockWindows - The menu will list all toolbars and other +dock windows. (This is the default.) +
+

Member Function Documentation

+

TQMainWindow::TQMainWindow ( TQWidget * parent = 0, const char * name = 0, WFlags f = WType_TopLevel ) +

+Constructs an empty main window. The parent, name and widget +flags f, are passed on to the TQWidget constructor. +

By default, the widget flags are set to WType_TopLevel rather +than 0 as they are with TQWidget. If you don't want your +TQMainWindow to be a top level widget then you will need to set f to 0. + +

TQMainWindow::~TQMainWindow () +

+Destroys the object and frees any allocated resources. + +

void TQMainWindow::addDockWindow ( TQDockWindow * dockWindow, Dock edge = DockTop, bool newLine = FALSE ) [virtual] +

+Adds dockWindow to the edge dock area. +

If newLine is FALSE (the default) then the dockWindow is +added at the end of the edge. For vertical edges the end is at +the bottom, for horizontal edges (including Minimized) the end +is at the right. If newLine is TRUE a new line of dock windows +is started with dockWindow as the first (left-most and +top-most) dock window. +

If dockWindow is managed by another main window, it is first +removed from that window. + +

void TQMainWindow::addDockWindow ( TQDockWindow * dockWindow, const TQString & label, Dock edge = DockTop, bool newLine = FALSE ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Adds dockWindow to the dock area with label label. +

If newLine is FALSE (the default) the dockWindow is added at +the end of the edge. For vertical edges the end is at the +bottom, for horizontal edges (including Minimized) the end is +at the right. If newLine is TRUE a new line of dock windows is +started with dockWindow as the first (left-most and top-most) +dock window. +

If dockWindow is managed by another main window, it is first +removed from that window. + +

void TQMainWindow::addToolBar ( TQDockWindow *, Dock = DockTop, bool newLine = FALSE ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+ +

void TQMainWindow::addToolBar ( TQDockWindow *, const TQString & label, Dock = DockTop, bool newLine = FALSE ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

bool TQMainWindow::appropriate ( TQDockWindow * dw ) const +

+Returns TRUE if it is appropriate to include a menu item for the +dw dock window in the dock window menu; otherwise returns +FALSE. +

The user is able to change the state (show or hide) a dock window +that has a menu item by clicking the item. +

Call setAppropriate() to indicate whether or not a particular dock +window should appear on the popup menu. +

See also setAppropriate(). + +

TQDockArea * TQMainWindow::bottomDock () const +

+Returns a pointer the Bottom dock area +

See also topDock(), leftDock(), and rightDock(). + +

TQWidget * TQMainWindow::centralWidget () const +

+Returns a pointer to the main window's central widget. +

The central widget is surrounded by the left, top, right and +bottom dock areas. The menu bar is above the top dock area. +

See also setCentralWidget(). + +

Example: qfd/qfd.cpp. +

void TQMainWindow::childEvent ( TQChildEvent * e ) [virtual protected] +

+Monitors events, recieved in e, to ensure the layout is updated. + +

Reimplemented from TQObject. +

TQPopupMenu * TQMainWindow::createDockWindowMenu ( DockWindows dockWindows = AllDockWindows ) const +

+Creates the dock window menu which contains all toolbars (if dockWindows is OnlyToolBars ), all dock windows (if dockWindows is NoToolBars) or all toolbars and dock windows (if +dockWindows is AllDockWindows - the default). +

This function is called internally when necessary, e.g. when the +user right clicks a dock area (providing isDockMenuEnabled() +returns TRUE). + +

The menu items representing the toolbars and dock windows are +checkable. The visible dock windows are checked and the hidden +dock windows are unchecked. The user can click a menu item to +change its state (show or hide the dock window). +

The list and the state are always kept up-to-date. +

Toolbars and dock windows which are not appropriate in the current +context (see setAppropriate()) are not listed in the menu. +

The menu also has a menu item for lining up the dock windows. +

If isCustomizable() returns TRUE, a Customize menu item is added +to the menu, which if clicked will call customize(). The +isCustomizable() function we provide returns FALSE and customize() +does nothing, so they must be reimplemented in a subclass to be +useful. + +

void TQMainWindow::customize () [virtual slot] +

+This function is called when the user clicks the Customize menu +item on the dock window menu. +

The customize menu item will only appear if isCustomizable() +returns TRUE (it returns FALSE by default). +

The function is intended, for example, to provide the user with a +means of telling the application that they wish to customize the +main window, dock windows or dock areas. +

The default implementation does nothing and the Customize menu +item is not shown on the right-click menu by default. If you want +the item to appear then reimplement isCustomizable() to return +TRUE, and reimplement this function to do whatever you want. +

See also isCustomizable(). + +

void TQMainWindow::dockWindowPositionChanged ( TQDockWindow * dockWindow ) [signal] +

+ +

This signal is emitted when the dockWindow has changed its +position. A change in position occurs when a dock window is moved +within its dock area or moved to another dock area (including the +Minimized and TearOff dock areas). +

See also getLocation(). + +

TQPtrList<TQDockWindow> TQMainWindow::dockWindows ( Dock dock ) const +

+Returns a list of all the dock windows which are in the dock +dock area, regardless of their state. +

For example, the DockTornOff dock area may contain closed dock +windows but these are returned along with the visible dock +windows. + +

TQPtrList<TQDockWindow> TQMainWindow::dockWindows () const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the list of dock windows which belong to this main window, +regardless of which dock area they are in or what their state is, +(e.g. irrespective of whether they are visible or not). + +

bool TQMainWindow::dockWindowsMovable () const +

Returns TRUE if the dock windows are movable; otherwise returns FALSE. +See the "dockWindowsMovable" property for details. +

bool TQMainWindow::getLocation ( TQDockWindow * dw, Dock & dock, int & index, bool & nl, int & extraOffset ) const +

+Finds the location of the dock window dw. +

If the dw dock window is found in the main window the function +returns TRUE and populates the dock variable with the dw's dock +area and the index with the dw's position within the dock area. +It also sets nl to TRUE if the dw begins a new line +(otherwise FALSE), and extraOffset with the dock window's offset. +

If the dw dock window is not found then the function returns +FALSE and the state of dock, index, nl and extraOffset +is undefined. +

If you want to save and restore dock window positions then use +operator>>() and operator<<(). +

See also operator>>() and operator<<(). + +

bool TQMainWindow::hasDockWindow ( TQDockWindow * dw ) +

+Returns TRUE if dw is a dock window known to the main window; +otherwise returns FALSE. + +

bool TQMainWindow::isCustomizable () const [virtual] +

+Returns TRUE if the dock area dock window menu includes the +Customize menu item (which calls customize() when clicked). +Returns FALSE by default, i.e. the popup menu will not contain a +Customize menu item. You will need to reimplement this function +and set it to return TRUE if you wish the user to be able to see +the dock window menu. +

See also customize(). + +

bool TQMainWindow::isDockEnabled ( Dock dock ) const +

+Returns TRUE if the dock dock area is enabled, i.e. it can +accept user dragged dock windows; otherwise returns FALSE. +

See also setDockEnabled(). + +

bool TQMainWindow::isDockEnabled ( TQDockArea * area ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if dock area area is enabled, i.e. it can accept +user dragged dock windows; otherwise returns FALSE. +

See also setDockEnabled(). + +

bool TQMainWindow::isDockEnabled ( TQDockWindow * tb, Dock dock ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if dock area dock is enabled for the dock window +tb; otherwise returns FALSE. +

See also setDockEnabled(). + +

bool TQMainWindow::isDockEnabled ( TQDockWindow * dw, TQDockArea * area ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if dock area area is enabled for the dock window +dw; otherwise returns FALSE. +

See also setDockEnabled(). + +

bool TQMainWindow::isDockMenuEnabled () const +

+Returns TRUE, if the dock window menu is enabled; otherwise +returns FALSE. +

The menu lists the (appropriate()) dock windows (which may be +shown or hidden), and has a "Line Up Dock Windows" menu item. It +will also have a "Customize" menu item if isCustomizable() returns +TRUE. +

See also setDockEnabled(), lineUpDockWindows(), appropriate(), and setAppropriate(). + +

TQDockArea * TQMainWindow::leftDock () const +

+Returns the Left dock area +

See also rightDock(), topDock(), and bottomDock(). + +

void TQMainWindow::lineUpDockWindows ( bool keepNewLines = FALSE ) +

+This function will line up dock windows within the visible dock +areas (Top, Left, Right and Bottom) as compactly as +possible. +

If keepNewLines is TRUE, all dock windows stay on their +original lines. If keepNewLines is FALSE then newlines may be +removed to achieve the most compact layout possible. +

The method only works if dockWindowsMovable() returns TRUE. + +

void TQMainWindow::lineUpToolBars ( bool keepNewLines = FALSE ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+ +

void TQMainWindow::menuAboutToShow () [protected slot] +

+This slot is called from the aboutToShow() signal of the default +dock menu of the mainwindow. The default implementation +initializes the menu with all dock windows and toolbars in this +slot. + + +

TQMenuBar * TQMainWindow::menuBar () const +

+Returns the menu bar for this window. +

If there isn't one, then menuBar() creates an empty menu bar. +

See also statusBar(). + +

void TQMainWindow::moveDockWindow ( TQDockWindow * dockWindow, Dock edge = DockTop ) [virtual] +

+Moves dockWindow to the end of the edge. +

For vertical edges the end is at the bottom, for horizontal edges +(including Minimized) the end is at the right. +

If dockWindow is managed by another main window, it is first +removed from that window. + +

void TQMainWindow::moveDockWindow ( TQDockWindow * dockWindow, Dock edge, bool nl, int index, int extraOffset = -1 ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Moves dockWindow to position index within the edge dock +area. +

Any dock windows with positions index or higher have their +position number incremented and any of these on the same line are +moved right (down for vertical dock areas) to make room. +

If nl is TRUE, a new dock window line is created below the line +in which the moved dock window appears and the moved dock window, +with any others with higher positions on the same line, is moved +to this new line. +

The extraOffset is the space to put between the left side of +the dock area (top side for vertical dock areas) and the dock +window. (This is mostly used for restoring dock windows to the +positions the user has dragged them to.) +

If dockWindow is managed by another main window, it is first +removed from that window. + +

void TQMainWindow::moveToolBar ( TQDockWindow *, Dock = DockTop ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+ +

void TQMainWindow::moveToolBar ( TQDockWindow *, Dock, bool nl, int index, int extraOffset = -1 ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

bool TQMainWindow::opaqueMoving () const +

Returns TRUE if dock windows are moved opaquely; otherwise returns FALSE. +See the "opaqueMoving" property for details. +

void TQMainWindow::pixmapSizeChanged ( bool ) [signal] +

+ +

This signal is emitted whenever the setUsesBigPixmaps() is called +with a value different to the current setting. All widgets that +should respond to such changes, e.g. toolbar buttons, must connect +to this signal. + +

void TQMainWindow::removeDockWindow ( TQDockWindow * dockWindow ) [virtual] +

+Removes dockWindow from the main window's docking area, +provided dockWindow is non-null and managed by this main +window. + +

void TQMainWindow::removeToolBar ( TQDockWindow * ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+ +

TQDockArea * TQMainWindow::rightDock () const +

+Returns the Right dock area +

See also leftDock(), topDock(), and bottomDock(). + +

bool TQMainWindow::rightJustification () const +

Returns TRUE if the main window right-justifies its dock windows; otherwise returns FALSE. +See the "rightJustification" property for details. +

void TQMainWindow::setAppropriate ( TQDockWindow * dw, bool a ) [virtual slot] +

+Use this function to control whether or not the dw dock +window's caption should appear as a menu item on the dock window +menu that lists the dock windows. +

If a is TRUE then the dw will appear as a menu item on the +dock window menu. The user is able to change the state (show or +hide) a dock window that has a menu item by clicking the item; +depending on the state of your application, this may or may not be +appropriate. If a is FALSE the dw will not appear on the +popup menu. +

See also showDockMenu(), isCustomizable(), and customize(). + +

void TQMainWindow::setCentralWidget ( TQWidget * w ) [virtual] +

+Sets the central widget for this main window to w. +

The central widget is surrounded by the left, top, right and +bottom dock areas. The menu bar is above the top dock area. +

See also centralWidget(). + +

void TQMainWindow::setDockEnabled ( Dock dock, bool enable ) [virtual] +

+If enable is TRUE then users can dock windows in the dock +area. If enable is FALSE users cannot dock windows in the dock dock area. +

Users can dock (drag) dock windows into any enabled dock area. + +

void TQMainWindow::setDockEnabled ( TQDockWindow * dw, Dock dock, bool enable ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

If enable is TRUE then users can dock the dw dock window in +the dock area. If enable is FALSE users cannot dock the dw dock window in the dock area. +

In general users can dock (drag) dock windows into any enabled +dock area. Using this function particular dock areas can be +enabled (or disabled) as docking points for particular dock +windows. + +

void TQMainWindow::setDockMenuEnabled ( bool b ) [virtual slot] +

+If b is TRUE, then right clicking on a dock window or dock area +will pop up the dock window menu. If b is FALSE, right clicking +a dock window or dock area will not pop up the menu. +

The menu lists the (appropriate()) dock windows (which may be +shown or hidden), and has a "Line Up Dock Windows" item. It will +also have a "Customize" menu item if isCustomizable() returns +TRUE. +

See also lineUpDockWindows() and isDockMenuEnabled(). + +

void TQMainWindow::setDockWindowsMovable ( bool ) [virtual slot] +

Sets whether the dock windows are movable. +See the "dockWindowsMovable" property for details. +

void TQMainWindow::setOpaqueMoving ( bool ) [virtual slot] +

Sets whether dock windows are moved opaquely. +See the "opaqueMoving" property for details. +

void TQMainWindow::setRightJustification ( bool ) [virtual slot] +

Sets whether the main window right-justifies its dock windows. +See the "rightJustification" property for details. +

void TQMainWindow::setToolBarsMovable ( bool ) [slot] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+ +

void TQMainWindow::setUpLayout () [virtual protected slot] +

+Sets up the geometry management of the window. It is called +automatically when needed, so you shouldn't need to call it. + +

void TQMainWindow::setUsesBigPixmaps ( bool ) [virtual slot] +

Sets whether big pixmaps are enabled. +See the "usesBigPixmaps" property for details. +

void TQMainWindow::setUsesTextLabel ( bool ) [virtual slot] +

Sets whether text labels for toolbar buttons are enabled. +See the "usesTextLabel" property for details. +

bool TQMainWindow::showDockMenu ( const TQPoint & globalPos ) [virtual protected slot] +

+Shows the dock menu at the position globalPos. The menu lists +the dock windows so that they can be shown (or hidden), lined up, +and possibly customized. Returns TRUE if the menu is shown; +otherwise returns FALSE. +

If you want a custom menu, reimplement this function. You can +create the menu from scratch or call createDockWindowMenu() and +modify the result. + + +

TQStatusBar * TQMainWindow::statusBar () const +

+Returns this main window's status bar. If there isn't one, +statusBar() creates an empty status bar, and if necessary a tool +tip group too. +

See also menuBar() and toolTipGroup(). + +

Example: qfd/qfd.cpp. +

void TQMainWindow::toolBarPositionChanged ( TQToolBar * ) [signal] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+ +

TQPtrList<TQToolBar> TQMainWindow::toolBars ( Dock dock ) const +

+Returns a list of all the toolbars which are in the dock dock +area, regardless of their state. +

For example, the TornOff dock area may contain closed toolbars +but these are returned along with the visible toolbars. +

See also dockWindows(). + +

bool TQMainWindow::toolBarsMovable () const +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+ +

TQToolTipGroup * TQMainWindow::toolTipGroup () const +

+Returns this main window's tool tip group. If there isn't one, +toolTipGroup() creates an empty tool tip group. +

See also menuBar() and statusBar(). + +

TQDockArea * TQMainWindow::topDock () const +

+Returns the Top dock area +

See also bottomDock(), leftDock(), and rightDock(). + +

bool TQMainWindow::usesBigPixmaps () const +

Returns TRUE if big pixmaps are enabled; otherwise returns FALSE. +See the "usesBigPixmaps" property for details. +

bool TQMainWindow::usesTextLabel () const +

Returns TRUE if text labels for toolbar buttons are enabled; otherwise returns FALSE. +See the "usesTextLabel" property for details. +

void TQMainWindow::usesTextLabelChanged ( bool ) [signal] +

+ +

This signal is emitted whenever the setUsesTextLabel() is called +with a value different to the current setting. All widgets that +should respond to such changes, e.g. toolbar buttons, must connect +to this signal. + +

void TQMainWindow::whatsThis () [virtual slot] +

+Enters 'What's This?' mode and returns immediately. +

This is the same as TQWhatsThis::enterWhatsThisMode(), but +implemented as a main window object's slot. This way it can easily +be used for popup menus, for example: +

+    TQPopupMenu * help = new TQPopupMenu( this );
+    help->insertItem( "What's &This", this , SLOT(whatsThis()), SHIFT+Key_F1);
+    
+ +

See also TQWhatsThis::enterWhatsThisMode(). + +


Property Documentation

+

bool dockWindowsMovable

+

This property holds whether the dock windows are movable. +

If TRUE (the default), the user will be able to move movable dock +windows from one TQMainWindow dock area to another, including the +TearOff area (i.e. where the dock window floats freely as a +window in its own right), and the Minimized area (where only +the dock window's handle is shown below the menu bar). Moveable +dock windows can also be moved within TQMainWindow dock areas, i.e. +to rearrange them within a dock area. +

If FALSE the user will not be able to move any dock windows. +

By default dock windows are moved transparently (i.e. only an +outline rectangle is shown during the drag), but this setting can +be changed with setOpaqueMoving(). +

See also setDockEnabled() and opaqueMoving. + +

Set this property's value with setDockWindowsMovable() and get this property's value with dockWindowsMovable(). +

bool opaqueMoving

+

This property holds whether dock windows are moved opaquely. +

If TRUE the dock windows of the main window are shown opaquely +(i.e. it shows the toolbar as it looks when docked) whilst it is +being moved. If FALSE (the default) they are shown transparently, +(i.e. as an outline rectangle). +

Warning: Opaque moving of toolbars and dockwindows is known to +have several problems. We recommend avoiding the use of this +feature for the time being. We intend fixing the problems in a +future release. + +

Set this property's value with setOpaqueMoving() and get this property's value with opaqueMoving(). +

bool rightJustification

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This property holds whether the main window right-justifies its dock windows. +

If disabled (the default), stretchable dock windows are expanded, +and non-stretchable dock windows are given the minimum space they +need. Since most dock windows are not stretchable, this usually +results in an unjustified right edge (or unjustified bottom edge +for a vertical dock area). If enabled, the main window will +right-justify its dock windows. +

See also TQDockWindow::setVerticalStretchable() and TQDockWindow::setHorizontalStretchable(). + +

Set this property's value with setRightJustification() and get this property's value with rightJustification(). +

bool usesBigPixmaps

+

This property holds whether big pixmaps are enabled. +

If FALSE (the default), the tool buttons will use small pixmaps; +otherwise big pixmaps will be used. +

Tool buttons and other widgets that wish to respond to this +setting are responsible for reading the correct state on startup, +and for connecting to the main window's widget's +pixmapSizeChanged() signal. + +

Set this property's value with setUsesBigPixmaps() and get this property's value with usesBigPixmaps(). +

bool usesTextLabel

+

This property holds whether text labels for toolbar buttons are enabled. +

If disabled (the default), the tool buttons will not use text +labels. If enabled, text labels will be used. +

Tool buttons and other widgets that wish to respond to this +setting are responsible for reading the correct state on startup, +and for connecting to the main window's widget's +usesTextLabelChanged() signal. +

See also TQToolButton::usesTextLabel. + +

Set this property's value with setUsesTextLabel() and get this property's value with usesTextLabel(). +


Related Functions

+

TQTextStream & operator<< ( TQTextStream & ts, const TQMainWindow & mainWindow ) +

+ +

Writes the layout (sizes and positions) of the dock windows in the +dock areas of the TQMainWindow mainWindow, including Minimized and TornOff dock windows, to the text stream ts. +

This can be used, for example, in conjunction with TQSettings to +save the user's layout when the \mainWindow receives a closeEvent. +

See also operator>>() and closeEvent(). + +

TQTextStream & operator>> ( TQTextStream & ts, TQMainWindow & mainWindow ) +

+ +

Reads the layout (sizes and positions) of the dock windows in the +dock areas of the TQMainWindow mainWindow from the text stream, +ts, including Minimized and TornOff dock windows. +Restores the dock windows and dock areas to these sizes and +positions. The layout information must be in the format produced +by operator<<(). +

This can be used, for example, in conjunction with TQSettings to +restore the user's layout. +

See also 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/qmake-manual-1.html b/doc/html/qmake-manual-1.html new file mode 100644 index 00000000..ce413523 --- /dev/null +++ b/doc/html/qmake-manual-1.html @@ -0,0 +1,46 @@ + + + + + +Introduction to qmake + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Home] [Next: Installing qmake]

+

Introduction to qmake

+

Introduction to qmake

+

qmake is a tool created by Trolltech to write makefiles for different compilers and platforms.

+

Writing makefiles by hand can be difficult and error prone, especially if several makefiles are retquired for different compiler and platform combinations. With qmake, developers create a simple single 'project' file and run qmake to generate the appropriate makefiles. qmake takes care of all the compiler and platform dependencies, freeing developers to focus on their code. Trolltech uses qmake as the primary build tool for the TQt library, and for the tools supplied with TQt.

+

qmake also takes care of TQt's special retquirements, automatically including build rules for moc and uic.

+ +

[Home] [Next: Installing qmake]

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmake-manual-2.html b/doc/html/qmake-manual-2.html new file mode 100644 index 00000000..e9c0d2b1 --- /dev/null +++ b/doc/html/qmake-manual-2.html @@ -0,0 +1,55 @@ + + + + + +Installing qmake + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Prev: Introduction to qmake] [Home] [Next: The 10 minute guide to using qmake]

+

Installing qmake

+

Installing qmake

+

qmake is built by default when TQt is built.

+

This section explains how to build qmake manually. Skip ahead to The 10 minute guide to using qmake, if you already have qmake.

+

Installing qmake manually

+

Before building TQt manually the following environment variables must be set:

+
  • QMAKESPEC
    This must be set to the platform and compiler combination that you are using on your system.
    For example, if you are using Windows and Microsoft Visual Studio, you would set this environment variable to win32-msvc. If you are using Solaris and g++, you would set this environment variable to solaris-g++.

    +

    The following is a list of environment variables available to choose from when setting QMAKESPEC:

    +

    aix-64 hpux-cc irix-032 netbsd-g++ solaris-cc unixware7-g++ aix-g++ hpux-g++ linux-cxx openbsd-g++ solaris-g++ win32-borland aix-xlc hpux-n64 linux-g++ openunix-cc sunos-g++ win32-g++ bsdi-g++ hpux-o64 linux-icc qnx-g++ tru64-cxx win32-msvc dgux-g++ hurd-g++ linux-kcc reliant-64 tru64-g++ win32-watc freebsd-g++ irix-64 macx-pbuilder reliant-cds ultrix-g++ win32-visa hpux-acc irix-g++ macx-g++ sco-g++ unixware-g hpux-acc irix-n32 solaris-64 unixware7-cc

    +

    The environment variable should be set to qws/envvar where envvar is one of the following:

    +

    linux-arm-g++ linux-generic-g++ linux-mips-g++ linux-x86-g++ linux-freebsd-g++ linux-ipaq-g++ linux-solaris-g++ qnx-rtp-g++

    +
  • QTDIR
    This must be set to where TQt is (or will be) installed. For example, c:\qt and \local\qt

    +

Once the environment variables are set go into the qmake directory, $QTDIR/qmake, e.g. C:\qt\qmake. Now run make or nmake depending on your compiler.

+

When the make has completed, qmake is ready for use.

+ +

[Prev: Introduction to qmake] [Home] [Next: The 10 minute guide to using qmake]

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmake-manual-3.html b/doc/html/qmake-manual-3.html new file mode 100644 index 00000000..fcbc8221 --- /dev/null +++ b/doc/html/qmake-manual-3.html @@ -0,0 +1,94 @@ + + + + + +The 10 minute guide to using qmake + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Prev: Installing qmake] [Home] [Next: qmake Tutorial]

+

The 10 minute guide to using qmake

+

Creating a project file

+

qmake uses information stored in project (.pro) files to determine what should go in the makefiles it generates.

+

A basic project file contains information about the application, for example, which files are needed to compile the application, and which configuration settings to use.

+

Here's a simple example project file:

+
+    SOURCES = hello.cpp
+    HEADERS = hello.h
+    CONFIG += qt warn_on release
+
+

We'll provide a brief line-by-line explanation, deferring the detail until later on in the manual.

+
+    SOURCES = hello.cpp
+
+

This line specifies the source files that implement the application. In this case there is just one file, hello.cpp. Most applications retquire multiple files; this situation is dealt with by listing all the files on the same line space separated, like this:

+
+    SOURCES = hello.cpp main.cpp
+
+

Alternatively, each file can be listed on a separate line, by escaping the newlines, like this:

+
+    SOURCES = hello.cpp \
+                main.cpp
+
+

A more verbose approach is to list each file separately, like this:

+
+    SOURCES += hello.cpp
+    SOURCES += main.cpp
+
+

This approach uses "+=" rather than "=" which is safer, because it always adds a new file to the existing list rather than replacing the list.

+

The HEADERS line is used to specify the header files created for use by the application, e.g.

+
+    HEADERS += hello.h
+
+

Any of the approaches used to list source files may be used for header files.

+

The CONFIG line is used to give qmake information about the application's configuration.

+
+    CONFIG += qt warn_on release
+
+

The "+=" is used here, because we add our configuration options to any that are already present. This is safer than using "=" which replaces all options with just those specified.

+

The qt part of the CONFIG line tells qmake that the application is built using TQt. This means that qmake will link against the TQt libraries when linking and add in the neccesary include paths for compiling.

+

The warn_on part of the CONFIG line tells qmake that it should set the compiler flags so that warnings are output.

+

The release part of the CONFIG line tells qmake that the application must be built as a release application. During development, programmers may prefer to replace release with debug, which is discussed later.

+

Project files are plain text (i.e. use an editor like notepad, vim or xemacs) and must be saved with a '.pro' extension. The name of the application's executable will be the same as the project file's name, but with an extension appropriate to the platform. For example, a project file called 'hello.pro' will produce 'hello.exe' on Windows and 'hello' on Unix.

+

Generating a makefile

+

When you have created your project file it is very easy to generate a makefile, all you need to do is go to where you have created your project file and type:

+

Makefiles are generated from the '.pro' files like this:

+
+    qmake -o Makefile hello.pro 
+
+

For Visual Studio users, qmake can also generate '.dsp' files, for example:

+
+    qmake -t vcapp -o hello.dsp hello.pro
+
+ +

[Prev: Installing qmake] [Home] [Next: qmake Tutorial]

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmake-manual-4.html b/doc/html/qmake-manual-4.html new file mode 100644 index 00000000..8f656715 --- /dev/null +++ b/doc/html/qmake-manual-4.html @@ -0,0 +1,174 @@ + + + + + +qmake Tutorial + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Prev: The 10 minute guide to using qmake] [Home] [Next: qmake Concepts]

+

qmake Tutorial

+

Introduction to the qmake tutorial

+

This tutorial teaches you how to use qmake. We recommend that you read the qmake user guide after completing this tutorial.

+

Starting off simple

+

Let's assume that you have just finished a basic implementation of your application, and you have created the following files:

+
  • hello.cpp

    +
  • hello.h

    +
  • main.cpp

    +

You will find these files in qt/qmake/examples/tutorial. The only other thing you know about the setup of the application is that it's written in TQt. First, using your favorite plain text editor, create a file called hello.pro in qt/qmake/tutorial. The first thing you need to do is add the lines that tell qmake about the source and header files that are part of your development project.

+

We'll add the source files to the project file first. To do this you need to use the SOURCES variable. Just start a new line with SOURCES += and put hello.cpp after it. You should have something like:

+
+    SOURCES += hello.cpp
+
+

We repeat this for each source file in the project, until we end up with:

+
+    SOURCES += hello.cpp
+    SOURCES += main.cpp
+
+

If you prefer to use a Make-like syntax, with all the files listed in one go you can use the newline escaping like this:

+
+    SOURCES = hello.cpp \
+              main.cpp
+
+

Now that the source files are listed in the project file, the header files must be added. These are added in exactly the same way as source files, except that the variable name is HEADERS:

+

Once you have done this, your project file should look something like this:

+
+    HEADERS += hello.h
+    SOURCES += hello.cpp 
+    SOURCES += main.cpp 
+
+

The target name is set automatically; it is the same as the project file, but with the suffix appropriate to the platform. For example, if the project file is called 'hello.pro', the target will be 'hello.exe' on Windows and 'hello' on Unix. If you want to use a different name you can set it in the project file:

+
+    TARGET = helloworld
+
+

The final step is to set the CONFIG variable. Since this is a TQt application, we need to put 'qt' on the CONFIG line so that qmake will add the relevant libraries to be linked against and ensure that build lines for moc and uic are included in the makefile.

+

The finished project file should look like this:

+
+    CONFIG += qt
+    HEADERS += hello.h
+    SOURCES += hello.cpp
+    SOURCES += main.cpp 
+
+

You can now use qmake to generate a makefile for your application. On the command line, in your application directory, type:

+
+    qmake -o Makefile hello.pro
+
+

Then type make or nmake depending on the compiler you use.

+

Making an application debuggable

+

The release version of an application doesn't contain any debugging symbols or other debuggin information. During development it is useful to produce a debugging version of the application that has the relevant information. This is easily achieved by adding 'debug' to the CONFIG variable in the project file.

+

For example:

+
+    CONFIG += qt debug
+    HEADERS += hello.h
+    SOURCES += hello.cpp
+    SOURCES += main.cpp 
+
+

Use qmake as before to generate a makefile and you will be able to debug your application.

+

Adding platform specific source files

+

After a few hours of coding, you might have made a start on the platform specific part of your application, and decided to keep the platform dependent code separate. So you now have two new files to include into your project file - hellowin.cpp and hellounix.cpp. We can't just add these to the SOURCES variable since this will put both files in the makefile. So what we need to do here is to use a scope which will be processed depending on which platform qmake is run on.

+

A simple scope which will add in the platform dependent file for Windows looks like this:

+
+    win32 {
+        SOURCES += hellowin.cpp
+    }
+
+

So if qmake is run on Windows, it will add hellowin.cpp to the list of source files. If qmake is run on any other platform, it will simply ignore it. Now all that is left to be done is to create a scope for the unix dependent file.

+

When you have done that, your project file should now look something like this:

+
+    CONFIG += qt debug
+    HEADERS += hello.h
+    SOURCES += hello.cpp
+    SOURCES += main.cpp 
+    win32 {
+        SOURCES += hellowin.cpp
+    }
+    unix {
+        SOURCES += hellounix.cpp
+    }
+
+

Use qmake as before to generate a makefile.

+

Stopping qmake if a file doesn't exist

+

You may not want to create a makefile if a certain file doesn't exist. We can check if a file exists by using the exists() function. We can stop qmake from processing by using the error() function. This works in the same way as scopes. Simply replace the scope condition with the function. A check for a main.cpp file looks like this:

+
+    !exists( main.cpp ) {
+        error( "No main.cpp file found" )
+    }
+
+

The "!" is used to negate the test, i.e. exists( main.cpp ) is true if the file exists and !exists( main.cpp ) is true if the file doesn't exist.

+
+    CONFIG += qt debug
+    HEADERS += hello.h
+    SOURCES += hello.cpp
+    SOURCES += main.cpp 
+    win32 {
+        SOURCES += hellowin.cpp
+    }
+    unix {
+        SOURCES += hellounix.cpp
+    }
+    !exists( main.cpp ) {
+        error( "No main.cpp file found" )
+    }
+
+

Use qmake as before to generate a makefile. If you rename main.cpp temporarily, you will see the message and qmake will stop processing.

+

Checking for more than one condition

+

Suppose you use Windows and you want to be able to see the qDebug() statements when you run your application on the command line. Unless you build your application with the console setting, you won't see the output. We can easily put console on the CONFIG line so that on Windows the makefile will have this setting. But let's say that we only want to add the CONFIG line if we are running on Windows and when debug is already on the CONFIG line. This retquires using two nested scopes; just create one scope, then create the other inside that one. Put the settings to be processed inside the last scope, like this:

+
+    win32 {
+        debug {
+            CONFIG += console
+        }
+    }
+
+

Nested scopes can be joined together using colons, so the final project file looks like this:

+
+    CONFIG += qt debug
+    HEADERS += hello.h
+    SOURCES += hello.cpp
+    SOURCES += main.cpp 
+    win32 {
+        SOURCES += hellowin.cpp
+    }
+    unix {
+        SOURCES += hellounix.cpp
+    }
+    !exists( main.cpp ) {
+        error( "No main.cpp file found" )
+    }
+    win32:debug {
+        CONFIG += console
+    }
+
+

That's it! You have now completed the tutorial for qmake, and are ready to write project files for your development projects.

+ +

[Prev: The 10 minute guide to using qmake] [Home] [Next: qmake Concepts]

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmake-manual-5.html b/doc/html/qmake-manual-5.html new file mode 100644 index 00000000..af2e921d --- /dev/null +++ b/doc/html/qmake-manual-5.html @@ -0,0 +1,115 @@ + + + + + +qmake Concepts + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Prev: qmake Tutorial] [Home] [Next: qmake's Advanced Concepts]

+

qmake Concepts

+

Introducing qmake

+

qmake is an easy-to-use tool from Trolltech that creates makefiles for development projects across different platforms. qmake simplifies the generation of makefiles so that only a few lines of information are needed to create a makefile. qmake can be used for any software project whether it is written in TQt or not, although it also contains additional features to support TQt development.

+

qmake generates a makefile based on the information in a project file. Project files are created by the developer. Project files are usually simple, but can be tquite sophisticated if retquired. qmake can also generate projects for Microsoft Visual studio without having to change the project file.

+

qmake's Concepts

+

The QMAKESPEC environment variable

+

Before qmake can be used to build makefiles, the QMAKESPEC environment variable must be set to the platform-compiler combination that is being used on the system. The QMAKESPEC environment variable tells qmake where to look to find platform and compiler specific information. This ensures that the right libraries are used, and that the generated makefile uses the correct syntax. A list of the currently supported platform-compiler combinations can be found in qt/mkspecs. Just set your environment variable to one of the directories listed.

+

For example, if you are using Microsoft Visual Studio on Windows, then you would set the QMAKESPEC environment variable to win32-msvc. If you are using gcc on Solaris then you would set your QMAKESPEC environment variable to solaris-g++.

+

Inside each of the directories in qt/mkspecs, there is a qmake.conf file which contains the platform and compiler specific information. These settings are applied to any project that is built using qmake and should not be modified unless you're an expert. For example, if all your applications had to link against a particular library, you might add this information to the relevant qmake.conf file.

+

Project (.pro) files

+

A project file is used to tell qmake the details it needs to know about creating a makefile for the application. For instance, a list of source files and header files that should be put into the project file; any application specific configuration, such as an extra library that should be linked against, or an extra include path.

+
'#' comments
+

You can add comments to project files. Comments begin with the '#' symbol and run to the end of the line.

+

Templates

+

The template variable tells qmake what sort of makefile should be generated for the application. The following choices are available:

+
  • app - Creates a makefile that builds an application. This is the default, so if a template is not specified, this is used.

    +
  • lib - Creates a makefile that builds a library.

    +
  • vcapp - Creates a Visual Studio Project file which builds an application.

    +
  • vclib - Creates a Visual Studio Project file which builds a library.

    +
  • subdirs - This is a special template which creates a makefile which will go into the specified directories and create a makefile for the project file and call make on it.

    +
The 'app' template
+

The 'app' template tells qmake to generate a makefile that will build an application. When using this template the following qmake system variables are recognized. You should use these in your .pro file to specify information about your application.

+
  • HEADERS - A list of all the header files for the application.

    +
  • SOURCES - A list of all the source files for the application.

    +
  • FORMS - A list of all the .ui files (created using TQt Designer) for the application.

    +
  • LEXSOURCES - A list of all the lex source files for the application.

    +
  • YACCSOURCES - A list of all the yacc source files for the application.

    +
  • TARGET - Name of the executable for the application. This defaults to the name of the project file. (The extension, if any, is added automatically).

    +
  • DESTDIR - The directory in which the target executable is placed.

    +
  • DEFINES - A list of any additional pre-processor defines needed for the application.

    +
  • INCLUDEPATH - A list of any additional include paths needed for the application.

    +
  • DEPENDPATH - The dependency search path for the application.

    +
  • VPATH - The search path to find supplied files.

    +
  • DEF_FILE - Windows only: A .def file to be linked against for the application.

    +
  • RC_FILE - Windows only: A resource file for the application.

    +
  • RES_FILE - Windows only: A resource file to be linked against for the application.

    +

You only need to use the system variables that you have values for, for instance, if you don't have any extra INCLUDEPATHs then you don't need to specify any, qmake will add in the default ones needed. For instance, an example project file might look like this:

+
+TEMPLATE = app
+DESTDIR  = c:\helloapp
+HEADERS += hello.h
+SOURCES += hello.cpp 
+SOURCES += main.cpp
+DEFINES += QT_DLL
+CONFIG  += qt warn_on release
+
+

For items that are single valued, e.g. the template or the destination directory, we use "="; but for multi-valued items we use "+=" to add to the existing items of that type. Using "=" replaces the item's value with the new value, for example if we wrote DEFINES=QT_DLL, all other definitions would be deleted.

+
The 'lib' template
+

The 'lib' template tells qmake to generate a makefile that will build a library. When using this template, in addition to the system variables mentioned above for the 'app' template the VERSION variable is supported. You should use these in your .pro file to specify information about the library.

+
  • VERSION - The version number of the target library, for example, 2.3.1.

    +
The 'subdirs' template
+

The 'subdirs' template tells qmake to generate a makefile that will go into the specified subdirectories and generate a makefile for the project file in the directory and call make on it.

+

The only system variable that is recognised for this template is the SUBDIRS variable. This variable contains a list of all the subdirectories that contain project files to be processed. It is essential that the project file in the sub directory has the same name as the subdirectory, so that qmake can find it. For example, if the subdirectory is called 'myapp' then the project file in that directory should be called myapp.pro in that directory.

+

The CONFIG variable

+

The config variable specifies the options that the compiler should use and the libraries that should be linked against. Anything can be added to the config variable, but the options covered below are recognised by qmake internally.

+

The following options control what compiler flags are used:

+
  • release - The application is to be built in release mode. This is ignored if 'debug' is specified.

    +
  • debug - The application is to be built in debug mode.

    +
  • warn_on - The compiler should output as many warnings as possible. This is ignored if 'warn_off' is specified.

    +
  • warn_off - The compiler should output as few warnings as possible.

    +

The following options define the type of library/application to be built:

+
  • qt - The application is a TQt application and should link against the TQt library.

    +
  • thread - The application is a multi-threaded application.

    +
  • x11 - The application is an X11 application or library.

    +
  • windows - 'app' template only: the application is a Windows window application.

    +
  • console - 'app' template only: the application is a Windows console application.

    +
  • dll - 'lib' template only: The library is a shared library (dll).

    +
  • staticlib - 'lib' template only: The library is a static library.

    +
  • plugin - 'lib' template only: The library is a plugin; this enables the dll option.

    +

For example, if your application uses the TQt library and you want to build it as a debuggable multi-threaded application, your project file will have the following line:

+
+    CONFIG += qt thread debug
+
+

Note, that you must use "+=", not "=", or qmake will not be able to use the settings used to build TQt as a guide as what type of TQt library was built.

+ +

[Prev: qmake Tutorial] [Home] [Next: qmake's Advanced Concepts]

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmake-manual-6.html b/doc/html/qmake-manual-6.html new file mode 100644 index 00000000..d91ff29d --- /dev/null +++ b/doc/html/qmake-manual-6.html @@ -0,0 +1,242 @@ + + + + + +qmake's Advanced Concepts + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Prev: qmake Concepts] [Home] [Next: Using Precompiled Headers]

+

qmake's Advanced Concepts

+

qmake's Advanced Concepts

+

The qmake project files we've seen up to now have been very simple, just a list of name = value and name += value lines. qmake provides a lot more power, for example you can use a single project file to produce makefiles for multiple platforms.

+

Operators

+

So far, you have seen the = operator and += operator being used in a project file. There are more operators available for use; but some of these should be used carefully as they may change more than you expect them to.

+

The '=' operator

+

This operator simply assigns a value to a variable, it is used like this:

+
+    TARGET = myapp
+
+

This sets the TARGET variable to myapp. This will remove any previously set TARGET.

+

The '+=' operator

+

This operator appends a value to the list of values in a variable. It is used like this:

+
+    DEFINES += QT_DLL
+
+

This appends QT_DLL to the list of pre-processor defines to be put in the makefile.

+

The '-=' operator

+

This operator removes a value from the list of values in a variable. It is used like this:

+
+    DEFINES -= QT_DLL
+
+

This removes QT_DLL from the list of pre-processor defines to be put in the makefile.

+

The '*=' operator

+

This operator only adds a value to the list of values in a variable if it doesn't already exist. It is used like this:

+
+    DEFINES *= QT_DLL
+
+

QT_DLL will only be added to the list of pre-processor defines if it is not already defined.

+

The '~=' operator

+

This operator replaces any values that match the regexp with the specified value. It is used like this:

+
+    DEFINES ~= s/QT_[DT].+/QT
+
+

This removes any values in the list that start with QT_D or QT_T with QT.

+

Scopes

+

A scope are similar to 'if' statements, if a certain condition is true, the settings inside the scope are processed. A scope is written like this:

+
+    win32 {
+        DEFINES += QT_DLL
+    }
+
+

The above code will add the QT_DLL define to the makefile if qmake is used on a Windows platform. If qmake is used on a different platform than Windows, the define will be ignored. You may also perform single line conditionals/assignments with qmake like this:

+
+    win32:DEFINES += QT_DLL
+
+

For example, suppose we want to process something on all platforms except for Windows. We can achieve this by negating the scope like this:

+
+    !win32 {
+        DEFINES += QT_DLL
+    }
+
+

Any entry on the CONFIG line is also a scope. For example, if you write this:

+
+    CONFIG += warn_on
+
+

you will have a scope called 'warn_on'. This makes it easy to change the configuration for a project without losing all the custom settings that might be needed for a specific configuration. Since it is possible to put your own values on the CONFIG line, this provides you with a very powerful configuration tool for your makefiles. For example:

+
+    CONFIG += qt warn_on debug
+    debug {
+        TARGET = myappdebug
+    }
+    release {
+        TARGET = myapp
+    }
+
+

In the above code, two scopes are created which depend on what is put on the CONFIG line. In the example, debug is on the config line, so the TARGET variable is set to myappdebug. If release was on the config line, then the TARGET variable would be set to myapp.

+

It is also possible to check for two things before processing some settings. For instance, if you want to check if the platform is Windows and that the thread configuration is set, you would write this:

+
+    win32 {
+        thread {
+            DEFINES += QT_THREAD_SUPPORT
+        }
+    }
+
+

To save writing many nested scopes, you can nest scopes using a colon like this:

+
+    win32:thread {
+        DEFINES += QT_THREAD_SUPPORT
+    }
+
+

Once a test has been performed you may also do else/elseif operations. With this you may easily write complicated tests. This can be done with the special 'else' scope, it can be combined with other scopes (separated by colons as above) for example:

+
+    win32:thread {
+        DEFINES += QT_THREAD_SUPPORT
+    } else:debug {
+        DEFINES += QT_NOTHREAD_DEBUG
+    } else {
+        message("Unknown configuration")
+    }
+
+

Variables

+

The variables that we have encountered so far are system variables, such as DEFINES, SOURCES and HEADERS. It is possible for you to create your own variables so that you use them in scopes. It's easy to create your own variable; just name it and assign something to it. For example:

+
+    MY_VARIABLE = value
+
+

There are no restricitions on what you do to your own variables, as qmake will just ignore them unless it needs to look at them for a scope.

+

You can also assign the value of a current variable to another variable by prefixing $$ to the variable name. For example:

+
+    MY_DEFINES = $$DEFINES
+
+

Now the MY_DEFINES variable contains what is in the DEFINES variable at this point in the project file. This is also equivalent to:

+
 
+    MY_DEFINES = $${DEFINES}
+
+

The second notation allows you to adjoin the variable expansion to another value without separating by space. qmake will allow a variable to contain anything (including $(VALUE), which will be placed directly into the Makefile, and allow it to expand as appropriate, usually an environment variable). However, if you retquire an environment variable to be replaced immediately then you may use the $$() notation. For example:

+
+    MY_DEFINES = $$(ENV_DEFINES)
+
+

This will set MY_DEFINES to the value of the evironment variable ENV_DEFINES as it parses the .pro file. Additionally you may call built-in functions in variable replacing. These functions (not to be confused with Test Functions as enumerated in the next section) are listed below:

+

join( variablename, glue, before, after )

+

This will join the value of variablename with glue. If this value is non-empty it will prefix the value with before and suffix it with after. variablename is the only retquired field, the others will default to empty strings. If you need to encode spaces in glue, before, or after you must quote them.

+

prompt( question )

+

This will display question, and read from stdin as a return value.

+

member( variablename, position )

+

This will place the value in variablename in position position of the list. If the value of variablename is not long this will return an empty string. variablename is the only retquired field, if not specified position will default to the first value in the list (0).

+

find( variablename, substr )

+

This will place all the values in variablename that match substr. substr may be a regular expression as well, and will be matched accordingly.

+
+    MY_VAR = one two three four
+    MY_VAR2 = $$join(MY_VAR, " -L", -L) -Lfive
+    MY_VAR3 = $$member(MY_VAR, 2) $$find(MY_VAR, t.*)
+
+

MY_VAR2 will contain '-Lone -Ltwo -Lthree -Lfour -Lfive', and MYVAR3 will contains 'three two three'.

+

system( program_and_args )

+

This will return the stdout/stderr of the program executed, and parse it as normally expected. You can use this to interrogate information about the platform for example.

+
+    UNAME = $$system(uname -s)
+    contains( UNAME, [lL]inux ):message( This looks like Linux ($$UNAME) to me )
+
+

Test Functions

+

qmake provides built-in functions that perform simple, yet powerful tests. These tests may be used in place of scopes (as described above), in some cases it is more usefull to use the test function by itself ignoring its test value.

+

contains( variablename, value )

+

If value is in the list of values stored in the variable called variablename, then the settings inside the scope will be processed. For example:

+
+    contains( CONFIG, thread ) {
+        DEFINES += QT_THREAD_SUPPORT
+    }
+
+

If thread is in the list of values for the CONFIG variable, then QT_THREAD_SUPPORT will be added to the list of values in the DEFINES variable.

+

count( variablename, number )

+

If number matches the number of values stored in the variable called variablename, then the settings inside the scope will be processed. For example:

+
+    count( DEFINES, 5 ) {
+        CONFIG += debug
+    }
+
+

error( string )

+

This function outputs the string given and then makes qmake exit. For example:

+
+    error( "An error has occured" )
+
+

The text "An error has occured" will be displayed on the console and qmake will exit.

+

exists( filename )

+

If the specified file exists, then the settings inside the scope will be processed. For example:

+
+    exists( /local/qt/qmake/main.cpp ) {
+        SOURCES += main.cpp
+    }
+
+

If /local/qt/qmake/main.cpp exists then main.cpp is added to the list of source files.

+

Note that "/" can be used as a directory separator regardless of the platform.

+

equals( variable, value )

+

If the specified variable is equal to the value passed the scope will be processed. For example:

+
+    NUMBERS = 1 2 3
+    equals( NUMBERS, 3 4 5 ) {
+         message("The numbers are equal")
+    }
+
+

The message will not be displayed because "1 2 3" does not equal "1 2 3". As with all functions you can pass an expanded variable as the value argument (ie, $$NUMBERS).

+

include( filename )

+

The contents of filename are included at this point in the project file, so any settings in the specified file will be processed. An example of this is:

+
 
+    include( myotherapp.pro )
+
+

Any settings in the myotherapp.pro project file are now processed.

+

isEmpty( variablename )

+

This is the equivalent of using count( variablename, 0 ). If the variable called variablename has no elements, then the settings inside the scope will be processed. An example of this is:

+
+    isEmpty( CONFIG ) {
+        CONFIG += qt warn_on debug
+    }
+
+

message( string )

+

This function simply outputs a message on the console.

+
+    message( "This is a message" )
+
+

The text "This is a message" is output to the console and processing of the project file carries on.

+

system( command )

+

The specified command is performed and if it returns an exit code of 1, the settings inside the scope are processed. For example:

+
+    system( ls /bin ) {
+        SOURCES += bin/main.cpp
+        HEADERS += bin/main.h
+    }
+
+

So if the command ls /bin returns 1 then bin/main.cpp is added to the list of sources and bin/main.h is added to the list of headers.

+

infile( filename, var, val )

+

This function will succeed if the file filename (when parsed by qmake itself) contains the variable var with a value of val. You may also not pass in a third argument (val) and the function will only test if var has been assigned to in the file.

+ +

[Prev: qmake Concepts] [Home] [Next: Using Precompiled Headers]

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmake-manual-7.html b/doc/html/qmake-manual-7.html new file mode 100644 index 00000000..8c71e939 --- /dev/null +++ b/doc/html/qmake-manual-7.html @@ -0,0 +1,206 @@ + + + + + +Using Precompiled Headers + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Prev: qmake's Advanced Concepts] [Home] [Next: qmake Command Reference]

+

Using Precompiled Headers

+

About Precompiled Headers

+

Precompiled headers are a performance feature supported by some compilers to compile a stable body of code, and store the compiled state of the code in a binary file. During subsequent compilations, the compiler will load the stored state, and continue compiling the specified file. Each subsequent compilation is faster because the stable code does not need to be recompiled.

+

qmake supports the use of precompiled headers (PCH) on some platforms and build environments, including:

+
  • Windows

    +
    • nmake

      +
    • Dsp projects (VC 6.0)

      +
    • Vcproj projects (VC 7.0 & 7.1)

      +
  • Mac OS X

    +
    • Makefile

      +
    • Xcode

      +
    • GCC 3.3 and up

      +
  • Unix

    +
    • GCC 3.4 and up

      +

Adding PCH to your project

+

Contents of the precompiled header file

+

The precompiled header must contain code which is stable and static throughout your project. A typical PCH might look like this:

+
stable.h
+
+        /* Add C includes here */
+        
+        #if defined __cplusplus
+        /* Add C++ includes here */
+        #include <stdlib>
+        #include <iostream>
+        #include <vector>
+        #include <qapplication.h> // TQt includes
+        #include <qpushbutton.h>
+        #include <qlabel.h>
+        #include "thirdparty/include/libmain.h"
+        #include "my_stable_class.h"
+        ...
+        #endif
+
+

Note that a precompiled header file needs to separate C includes from CPP includes, since the precompiled header file for C files may not contain C++ code.

+

Project options

+

To make your project use PCH, the only thing you need to change in your project settings (.pro), is to include the PRECOMPILED_HEADER option:

+
+        PRECOMPILED_HEADER = stable.h
+
+

qmake will handle the rest, to ensure the creation and use of the precompiled header file. You do not need to include the precompiled header file in HEADERS, as qmake will do this if the configuration supports PCH.

+

All platforms that support precompiled headers have the configuration option precompile_header set. Using this option, you may trigger conditional blocks in your .pro file, to add settings when using PCH. For example:

+
+        precompile_header:!isEmpty(PRECOMPILED_HEADER) {
+            DEFINES += USING_PCH
+        }
+
+
+

Example project

+

You can find the following source code in the qt/qmake/examples/precompile directory:

+

mydialog.ui

+
    <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+    <class>MyDialog</class>
+    <widget class="TQDialog">
+        <property name="name">
+            <cstring>MyDialog</cstring>
+        </property>
+        <property name="caption">
+            <string>Mach 2!</string>
+        </property>
+        <vbox>
+            <widget class="TQLabel">
+                <property name="name">
+                    <cstring>aLabel</cstring>
+                </property>
+                <property name="text">
+                    <string>Join the life in the fastlane; - PCH enable your project today! -</string>
+                </property>
+            </widget>
+            <widget class="TQPushButton">
+                <property name="name">
+                    <cstring>aButton</cstring>
+                </property>
+                <property name="text">
+                    <string>&amp;Quit</string>
+                </property>
+                <property name="accel">
+                    <string>Alt+Q</string>
+                </property>
+            </widget>
+        </vbox>
+    </widget>
+    </UI>
+
+

stable.h

+
    /* Add C includes here */
+
+    #if defined __cplusplus
+    /* Add C++ includes here */
+
+    # include <iostream>
+    # include <qapplication.h>
+    # include <qpushbutton.h>
+    # include <qlabel.h>
+    #endif
+
+

myobject.h

+
    #include <qobject.h>
+
+    class MyObject : public TQObject
+    {
+    public:
+        MyObject();
+        ~MyObject();
+    };
+
+

myobject.cpp

+
    #include <iostream>
+    #include <qobject.h>
+    #include "myobject.h"
+
+    MyObject::MyObject()
+        : TQObject()
+    {
+        std::cout << "MyObject::MyObject()\n";
+    }
+
+

util.cpp

+
    void util_function_does_nothing()
+    {
+        // Nothing here...
+        int x = 0;
+        ++x;
+    }
+
+

main.cpp

+
    #include <qapplication.h>
+    #include <qpushbutton.h>
+    #include <qlabel.h>
+    #include "myobject.h"
+    #include "mydialog.h"
+
+    int main(int argc, char **argv)
+    {
+        TQApplication app(argc, argv);
+
+        MyObject obj;
+        MyDialog dia;
+        app.setMainWidget( &dia );
+        dia.connect( dia.aButton, SIGNAL(clicked()), SLOT(close()) );
+        dia.show();
+
+        return app.exec();
+    }
+
+

precompile.pro

+
    #############################################
+    #
+    # Example for using Precompiled Headers
+    #
+    #############################################
+    TEMPLATE  = app
+    LANGUAGE  = C++
+    CONFIG   += console precompile_header
+
+    # Use Precompiled headers (PCH)
+    PRECOMPILED_HEADER  = stable.h
+
+    HEADERS  += stable.h \
+                myobject.h
+    SOURCES  += main.cpp \
+                myobject.cpp \
+                util.cpp
+    FORMS     = mydialog.ui
+
+ +

[Prev: qmake's Advanced Concepts] [Home] [Next: qmake Command Reference]

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmake-manual-8.html b/doc/html/qmake-manual-8.html new file mode 100644 index 00000000..19e875d4 --- /dev/null +++ b/doc/html/qmake-manual-8.html @@ -0,0 +1,732 @@ + + + + + + qmake Command Reference + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

[Prev: Using Precompiled Headers] [Home]

+

qmake Command Reference

+

qmake Command Reference

+

About This Reference

+

This reference is a detailed index of all command line options, configurations and internal variables used by the cross-platform makefile generation utility qmake.

+

In addition to the variables and functions described in the following sections, qmake project files may also include comments. Comments begin with the '#' symbol and run to the end of the line.

+

Command Line Options

+

Syntax

+
+qmake [options] files
+
+

Options

+

The following options can be specified on the command line to qmake:

+
  • -o file
    qmake output will be directed to file. if this argument is not specified, then qmake will try to guess a suitable name. If '-' is specified, output is directed to stdout.

    +
  • -unix
    qmake will run in unix mode. In this mode, Unix file naming and path conventions will be used, additionally testing for unix (as a scope) will succeed. This is the default mode on all Unices.

    +
  • -macx
    qmake will run in Mac OS X mode. In this mode, Unix file naming and path conventions will be used, additionally testing for macx (as a scope) will succeed. This is the default mode on Mac OS X.

    +
  • -win32
    qmake will run in win32 mode. In this mode, Windows file naming and path conventions will be used, additionally testing for win32 (as a scope) will succeed. This is the default mode on Windows.

    +
  • -d
    qmake will output (hopefully) useful debugging information.

    +
  • -t tmpl
    qmake will override any set TEMPLATE variables with tmpl, but only after the .pro file has been processed.

    +
  • -tp prefix
    qmake will add the prefix to the TEMPLATE variable.

    +
  • -help
    qmake will go over these features and give some useful help.

    +

There are also warning options that can help to find problems in your project file:

+
  • -Wall
    With this qmake will turn on all known warnings.

    +
  • -Wnone
    No warning information will be generated by qmake.

    +
  • -Wparser
    qmake will only generate parser warnings, this will alert you to common pitfalls, and potential problems in the parsing of your .pro files.

    +
  • -Wlogic
    Again qmake will warn of common pitfalls, and potential problems. This can include (but not limited to) checking if a file is placed into a list of files multiple times, if a file cannot be found, etc.

    +

qmake supports two different modes of operation. The first mode, which is the default is makefile generation. In this mode, qmake will take a .pro file and turn it into a makefile. Creating makefiles is covered by this reference guide, there is another mode which generates .pro files.

+

To toggle between these modes you must specify in the first argument what mode you want to use. If no mode is specified, qmake will assume you want makefile mode. The available modes are:

+
Makefile Mode
+

In Makefile mode qmake will generate a makefile. Additionally you may supply the following arguments in this mode:

+
  • -after
    qmake will process assignments given on the commandline after the specified files.

    +
  • -nocache
    qmake will ignore the .qmake.cache file.

    +
  • -nodepend
    qmake will not generate any dependency information.

    +
  • -cache file
    qmake will use file as the cache file, ignoring any other .qmake.cache file found

    +
  • -spec spec
    qmake will use spec as a path to platform-compiler information and QMAKESPEC will be ignored.

    +

The files argument can be a list of one or more project files, separated by spaces. You may also pass qmake assignments on the command line here and they will be processed before all files specified, for example:

+

qmake -makefile -unix -o Makefile "CONFIG+=test" test.pro

+

If however you are certain you want your variables processed after the the files specified, then you may pass the -after argument. When this is specified all assignments on the commandline after the -after option will be postponed until after the specified files are parsed.

+

This will generate a Makefile, from test.pro with Unix pathnames. However many of these arguments aren't necessary as they are the default. Therefore the line can be simplified on Unix to:

+

qmake "CONFIG+=test" test.pro

+
Projectfile Mode
+

In Projectfile mode qmake will generate a project file. Additionally, you may supply the following arguments in this mode:

+
  • -r
    qmake will look through supplied directories recursively

    +
  • -nopwd
    qmake will not look in your current working directory for source code and only use the specified files

    +

The files argument can be a list of files or directories. If a directory is specified, then it will be included in the DEPENDPATH variable and relevant code from there will be included in the generated project file, if a file is given it will go into the correct variable depending on extension (i.e. .ui files go into FORMS, .cpp files go into SOURCES, etc). Here too you may pass assignments on the commandline, when doing so these assignments will be placed last in the generated .pro file.

+

System Variables

+

Frequently Used System Variables

+

The following variables are recognized by qmake and are used most frequently when creating project files.

+
CONFIG
+

The CONFIG variable specifies project configuration and compiler options. The values will be recognized internally by qmake and have special meaning. They are as follows.

+

These CONFIG values control compilation flags:

+
  • release - Compile with optimization enabled, ignored if "debug" is specified

    +
  • debug - Compile with debug options enabled

    +
  • warn_on - The compiler should emit more warnings than normally, ignored if "warn_off" is specified

    +
  • warn_off - The compiler should only emit severe warnings.

    +

These options define the application/library type:

+
  • qt - The target is a TQt application/library and retquires the TQt header files/library. The proper include and library paths for the TQt library will automatically be added to the project.

    +
  • opengl - The target retquires the OpenGL (or Mesa) headers/libraries. The proper include and library paths for these libraries will automatically be added to the project.

    +
  • thread - The target is a multi-threaded application or library. The proper defines and compiler flags will automatically be added to the project.

    +
  • x11 - The target is a X11 application or library. The proper include paths and libraries will automatically be added to the project.

    +
  • windows - The target is a Win32 window application (app only). The proper include paths,compiler flags and libraries will automatically be added to the project.

    +
  • console - The target is a Win32 console application (app only). The proper include paths, compiler flags and libraries will automatically be added to the project.

    +
  • dll - The target is a shared object/DLL.The proper include paths, compiler flags and libraries will automatically be added to the project.

    +
  • staticlib - The target is a static library (lib only). The proper compiler flags will automatically be added to the project.

    +
  • plugin - The target is a plugin (lib only). This enables dll as well.

    +

These options are used to set the compiler flags:

+
  • exceptions - Exception support is enabled

    +
  • rtti - RTTI support is enabled

    +
  • stl - STL support is enabled

    +

These options define specific things depending on the platform and/or template:

+
  • flat - When using the vcapp template this will put all the source files into the source group and the header files into the header group regardless of what directory they reside in. Turning this option off will group the files within the source/header group depending on the directory they reside. This is turned on by default.

    +

The CONFIG variable will also be checked when resolving scopes. You may assign anything to this variable.

+

For example:

+
+CONFIG += qt console newstuff
+...
+newstuff {
+        SOURCES += new.cpp
+        HEADERS += new.h
+}
+
+
DEFINES
+

qmake adds the values of this variable as compiler C preprocessor macros (-D option).

+

For example:

+
 
+DEFINES += USE_MY_STUFF QT_DLL
+
+
DEF_FILE
+

This is only used on Windows when using the 'app' template.

+

Specifies a .def file to be included in the project.

+
DESTDIR
+

Specifies where to put the target file.

+

For example:

+
 
+  DESTDIR = ../../lib
+
+
DLLDESTDIR
+

Specifies where to copy the target dll.

+
HEADERS
+

Defines the header files for the project.

+

qmake will generate dependency information (unless -nodepend is specified on the command line) for the specified headers. qmake will also automatically detect if moc is retquired by the classes in these headers, and add the appropriate dependencies and files to the project for generating and linking the moc files.

+

For example:

+
+HEADERS = myclass.h \
+          login.h \
+          mainwindow.h
+
+

See also SOURCES.

+
INCLUDEPATH
+

This variable specifies the #include directories which should be searched when compiling the project. Use ';' or a space as the directory separator.

+

For example:

+
+  INCLUDEPATH = c:\msdev\include d:\stl\include
+
+
FORMS
+

This variable specifies the .ui files (see TQt Designer) to be processed through uic before compiling. All dependencies, headers and source files retquired to build these .ui files will automatically be added to the project.

+

For example:

+
+FORMS = mydialog.ui \
+        mywidget.ui \
+        myconfig.ui
+
+

Note that forms should not be specified using the += operator because this syntax is not fully supported by TQt Designer.

+
LEXSOURCES
+

This variable contains a list of lex source files. All dependencies, headers and source files will automatically be added to the project for building these lex files.

+

For example:

+
+LEXSOURCES = lexer.l
+
+
LIBS
+

This variable contains a list of libraries to be linked into the project. If you are more comfortable with the Unix convension of -L/-l flags you are free to use them in a cross-platform manner and qmake will do the correct thing with these libraries on Windows (namely this means passing the full path of the library to the linker). The only limitation to this is the library must exist, for qmake to find which directory a -l lib lives in.

+

For example:

+
+unix:LIBS += -lmath -L/usr/local/lib
+win32:LIBS += c:\mylibs\math.lib
+
+
MOC_DIR
+

This variable specifies the directory where all intermediate moc files should be placed.

+

For example:

+
+unix:MOC_DIR = ../myproject/tmp
+win32:MOC_DIR = c:\myproject\tmp
+
+
OBJECTS_DIR
+

This variable specifies the directory where all intermediate objects should be placed.

+

For example:

+
+unix:OBJECTS_DIR = ../myproject/tmp
+win32:OBJECTS__DIR = c:\myproject\tmp
+
+
UI_DIR
+

This variable specifies the directory where all intermediate files from uic should be placed. This variable overrides both UI_SOURCES_DIR and UI_HEADERS_DIR.

+

For example:

+
+unix:UI_DIR = ../myproject/ui
+win32:UI_DIR = c:\myproject\ui
+
+
UI_HEADERS_DIR
+

This variable specifies the directory where all declaration files (as generated by uic) should be placed.

+

For example:

+
+unix:UI_HEADERS_DIR = ../myproject/ui/include
+win32:UI_HEADERS_DIR = c:\myproject\ui\include
+
+
UI_SOURCES_DIR
+

This variable specifies the directory where all implementation files (as generated by uic) should be placed.

+

For example:

+
+unix:UI_SOURCES_DIR = ../myproject/ui/src
+win32:UI_SOURCES_DIR = c:\myproject\ui\src
+
+
RETQUIRES
+

This is a special variable processed by qmake. If the contents of this variable do not appear in CONFIG by the time this variable is assigned, then a minimal makefile will be generated that states what dependencies (the values assigned to RETQUIRES) are missing.

+

This is mainly used in TQt's build system for building the examples.

+
SOURCES
+

This variable contains the name of all source files in the project.

+

For example:

+
+SOURCES = myclass.cpp \
+          login.cpp \
+          mainwindow.cpp
+
+
+

See also HEADERS

+
SUBDIRS
+

This variable, when used with the 'subdirs' TEMPLATE contains the names of all subdirectories to look for a project file.

+

For example:

+
+SUBDIRS = kernel \
+          tools
+
+
TARGET
+

This specifies the name of the target file.

+

For example:

+
+TEMPLATE = app
+TARGET = myapp
+SOURCES = main.cpp
+
+

The project file above would produce an executable named 'myapp' on unix and 'myapp.exe' on windows.

+
TEMPLATE
+

This variable contains the name of the template to use when generating the project. The allowed values are:

+
  • app - Creates a makefile for building applications (the default)

    +
  • lib - Creates a makefile for building libraries

    +
  • subdirs - Creates a makefile for building targets in subdirectories

    +
  • vcapp - win32 only Creates an application project file for Visual Studio

    +
  • vclib - win32 only Creates a library project file for Visual Studio

    +

For example:

+
+TEMPLATE = lib
+SOURCES = main.cpp
+TARGET = mylib
+
+

The template can be overridden by specifying a new template type with the -t command line option. This overrides the template type after the .pro file has been processed. With .pro files that use the template type to determine how the project is built, it is necessary to declare TEMPLATE on the command line rather than use the -t option.

+
VERSION
+

This variable contains the version number of the library if the 'lib' TEMPLATE is specified.

+

For example:

+
+VERSION = 1.2.3
+
+
DISTFILES
+

This variable contains a list of files to be included in the dist target. This feature is supported by UnixMake specs only.

+

For example:

+
+DISTFILES += ../program.txt
+
+
YACCSOURCES
+

This variable contains a list of yacc source files to be included in the project. All dependencies, headers and source files will automatically be included in the project.

+

For example:

+
+YACCSOURCES = moc.y
+
+

Rarely Used System Variables

+

The following variables are also recognized by qmake but are either internal or very rarely used.

+
DESTDIR_TARGET
+

This variable is set internally by qmake, which is basically the DESTDIR variable with the TARGET variable appened at the end. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
DSP_TEMPLATE
+

This variable is set internally by qmake, which specifies where the dsp template file for basing generated dsp files is stored. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
LEXIMPLS
+

This variable contains a list of lex implementation files. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
LEXOBJECTS
+

This variable contains the names of intermediate lex object files.The value of this variable is typically handled by qmake and rarely needs to be modified.

+
LITERAL_HASH
+

This variable is used whenever a literal hash character (#) is needed in a variable declaration, perhaps as part of a file name or in a string passed to some external application.

+

For example:

+
+# To include a literal hash character, use the $$LITERAL_HASH variable:
+urlPieces = http://doc.trolltech.com/3.3/qmake-manual-8.html LITERAL_HASH
+message($$join(urlPieces, $$LITERAL_HASH))
+
+

By using LITERAL_HASH in this way, the # character can be used to construct a URL for the message() function to print to the console.

+
MAKEFILE
+

This variable specifies the name of the makefile which qmake should use when outputting the dependency information for building a project. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
MAKEFILE_GENERATOR
+

This variable contains the name of the makefile generator to use when generating a makefile. The value of this variable is typically handled internally by qmake and rarely needs to be modified.

+
OBJECTS
+

This variable is generated from the SOURCES variable. The extension of each source file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
OBJMOC
+

This variable is set by qmake if files can be found that contain the Q_OBJECT macro. OBJMOC contains the name of all intermediate moc object files. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
PRECOMPILED_HEADER
+

This variable indicates the header file for creating a precompiled header file, to increase the compilation speed of a project. Precompiled headers are currently only supported on some platforms (Windows - all MSVC project types, Mac OS X - Xcode, Makefile, UNIX - gcc 3.3 and up).

+

On other platforms, this variable has different meaning, as noted below.

+

This variable contains a list of header files that retquire some sort of pre-compilation step (such as with moc). The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE
+

This variable contains the name of the qmake program itself and is placed in generated makefiles. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKESPEC
+

This variable contains the name of the qmake configuration to use when generating makefiles. The value of this variable is typically handled by qmake and rarely needs to be modified. Use the QMAKESPEC environment variable instead.

+
QMAKE_APP_FLAG
+

This variable is empty unless the 'app' TEMPLATE is specified. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified. Use the following instead:

+
+app {
+        #conditional code for 'app' template here
+}
+
+
QMAKE_APP_OR_DLL
+

This variable is empty unless the 'app' or 'dll' TEMPLATE is specified. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_AR_CMD
+

This is used on Unix platforms only

+

This variable contains the command for invoking the program which creates, modifies and extracts archives. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CFLAGS_DEBUG
+

This variable contains the flags for the C compiler in debug mode.The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CFLAGS_MT
+

This variable contains the compiler flags for creating a multi-threaded application or when the version of TQt that you link against is a multi-threaded statically linked library. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CFLAGS_MT_DBG
+

This variable contains the compiler flags for creating a debuggable multi-threaded application or when the version of TQt that you link against is a debuggable multi-threaded statically linked library. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CFLAGS_MT_DLL
+

This is used on Windows only

+

This variable contains the compiler flags for creating a multi-threaded dll or when the version of TQt that you link against is a multi-threaded dll. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CFLAGS_MT_DLLDBG
+

This is used on Windows only

+

This variable contains the compiler flags for creating a debuggable multi-threaded dll or when the version of TQt that you link against is a debuggable multi-threaded statically linked library. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CFLAGS_RELEASE
+

This variable contains the compiler flags for creating a non-debuggable application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CFLAGS_SHLIB
+

This is used on Unix platforms only

+

This variable contains the compiler flags for creating a shared library. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CFLAGS_THREAD
+

This variable contains the compiler flags for creating a multi-threaded application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CFLAGS_WARN_OFF
+

This variable is not empty if the warn_off TEMPLATE option is specified. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CFLAGS_WARN_ON
+

This variable is not empty if the warn_on TEMPLATE option is specified. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CLEAN
+

This variable contains any files which are not generated files (such as moc and uic generated files) and object files that should be removed when using "make clean".

+
QMAKE_CXXFLAGS_DEBUG
+

This variable contains the C++ compiler flags for creating a debuggable application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CXXFLAGS_MT
+

This variable contains the C++ compiler flags for creating a multi-threaded application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CXXFLAGS_MT_DBG
+

This variable contains the C++ compiler flags for creating a debuggable multi-threaded application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CXXFLAGS_MT_DLL
+

This is used on Windows only

+

This variable contains the C++ compiler flags for creating a multi-threaded dll. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CXXFLAGS_MT_DLLDBG
+

This is used on Windows only

+

This variable contains the C++ compiler flags for creating a multi-threaded debuggable dll. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CXXFLAGS_RELEASE
+

This variable contains the C++ compiler flags for creating an application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CXXFLAGS_SHLIB
+

This variable contains the C++ compiler flags for creating a shared library. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CXXFLAGS_THREAD
+

This variable contains the C++ compiler flags for creating a multi-threaded application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CXXFLAGS_WARN_OFF
+

This variable contains the C++ compiler flags for suppressing compiler warnings. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_CXXFLAGS_WARN_ON
+

This variable contains C++ compiler flags for generating compiler warnings. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_EXTENSION_SHLIB
+

This variable contains the extention for shared libraries. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_FAILED_RETQUIREMENTS
+

This variable contains the list of retquirements that were failed to be met when qmake was used. For example, the sql module is needed and wasn't compiled into TQt. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_FILETAGS
+

This variable contains the file tags needed to be entered into the makefile, such as SOURCES and HEADERS. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_INCDIR
+

This variable contains the location of all known header files to be added to INCLUDEPATH when building an application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
POST_TARGETDEPS
+

All libraries that the target depends on can be listed in this variable. Some backends do not support this, these include MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is support internally by these build tools, this is usefull for explicitly listing dependant static libraries.

+

This list will go after all builtin (and $$PRE_TARGETDEPS) dependencies.

+
PRE_TARGETDEPS
+

All libraries that the target depends on can be listed in this variable. Some backends do not support this, these include MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is support internally by these build tools, this is usefull for explicitly listing dependant static libraries.

+

This list will go before all builtin dependencies.

+
QMAKE_INCDIR_OPENGL
+

This variable contains the location of OpenGL header files to be added to INCLUDEPATH when building an application with OpenGL support. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_INCDIR_QT
+

This variable contains the location of all known header file paths to be added to INCLUDEPATH when building a TQt application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_INCDIR_THREAD
+

This variable contains the location of all known header file paths to be added to INCLUDEPATH when building a multi-threaded application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_INCDIR_X11
+

This is used on Unix platforms only

+

This variable contains the location of X11 header file paths to be added to INCLUDEPATH when building a X11 application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LFLAGS_CONSOLE
+

This is used on Windows only

+

This variable contains link flags when building console programs. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LFLAGS_CONSOLE_DLL
+

This is used on Windows only

+

This variable contains link flags when building console dlls. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LFLAGS_DEBUG
+

This variable contains link flags when building debuggable applications. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LFLAGS_PLUGIN
+

This variable contains link flags when building plugins. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LFLAGS_QT_DLL
+

This variable contains link flags when building programs that use the TQt library built as a dll. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LFLAGS_RELEASE
+

This variable contains link flags when building applications for release. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LFLAGS_SHAPP
+

This variable contains link flags when building applications which are using the 'app' template. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LFLAGS_SHLIB
+

This variable contains link flags when building shared libraries The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LFLAGS_SONAME
+

This variable specifies the link flags to set the name of shared objects, such as .so or .dll. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LFLAGS_THREAD
+

This variable contains link flags when building multi-threaded projects. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LFLAGS_WINDOWS
+

This is used on Windows only

+

This variable contains link flags when building windows projects. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LFLAGS_WINDOWS_DLL
+

This is used on Windows only

+

This variable contains link flags when building windows dll projects. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBDIR
+

This variable contains the location of all known library directories.The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBDIR_FLAGS
+

This is used on Unix platforms only

+

This variable contains the location of all library directory with -L prefixed. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
VPATH
+

This variable tells qmake where to search for files it cannot open. With this you may tell qmake where it may look for things like SOURCES, and if it finds an entry in SOURCES that cannot be opened it will look through the entire VPATH list to see if it can find the file on its own.

+

See also DEPENDPATH.

+
DEPENDPATH
+

This variable contains the list of all directories to look in to resolve dependencies. This will be used when crawling through 'included' files.

+
QMAKE_LIBDIR_OPENGL
+

This variable contains the location of the OpenGL library directory.The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBDIR_QT
+

This variable contains the location of the TQt library directory.The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBDIR_X11
+

This is used on Unix platforms only

+

This variable contains the location of the X11 library directory.The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS
+

This variable contains all project libraries. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS_CONSOLE
+

This is used on Windows only

+

This variable contains all project libraries that should be linked against when building a console application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS_OPENGL
+

This variable contains all OpenGL libraries. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS_OPENGL_QT
+

This variable contains all OpenGL TQt libraries.The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS_QT
+

This variable contains all TQt libraries.The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS_QT_DLL
+

This is used on Windows only

+

This variable contains all TQt libraries when TQt is built as a dll. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS_QT_OPENGL
+

This variable contains all the libraries needed to link against if OpenGL support is turned on. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS_QT_THREAD
+

This variable contains all the libraries needed to link against if thread support is turned on. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS_RT
+

This is used with Borland compilers only

+

This variable contains the runtime library needed to link against when building an application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS_RTMT
+

This is used with Borland compilers only

+

This variable contains the runtime library needed to link against when building a multi-threaded application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS_THREAD
+

This is used on Unix platforms only

+

This variable contains all libraries that need to be linked against when building a multi-threaded application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS_WINDOWS
+

This is used on Windows only

+

This variable contains all windows libraries.The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS_X11
+

This is used on Unix platforms only

+

This variable contains all X11 libraries.The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIBS_X11SM
+

This is used on Unix platforms only

+

This variable contains all X11 session management libraries. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LIB_FLAG
+

This variable is not empty if the 'lib' template is specified. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_LINK_SHLIB_CMD
+

This variable contains the command to execute when creating a shared library. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_POST_LINK
+

This variable contains the command to execute after linking the TARGET together. This variable is normally empty and therefore nothing is executed, additionally some backends will not support this - mostly only Makefile backends.

+
QMAKE_PRE_LINK
+

This variable contains the command to execute before linking the TARGET together. This variable is normally empty and therefore nothing is executed, additionally some backends will not support this - mostly only Makefile backends.

+
QMAKE_LN_SHLIB
+

This variable contains the command to execute when creating a link to a shared library. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_MAKEFILE
+

This variable contains the name of the makefile to create. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_MOC_SRC
+

This variable contains the names of all moc source files to generate and include in the project. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_QMAKE
+

This variable contains the location of qmake if it is not in the path. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_QT_DLL
+

This variable is not empty if TQt was built as a dll. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_RUN_CC
+

This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_RUN_CC_IMP
+

This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_RUN_CXX
+

This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_RUN_CXX_IMP
+

This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_TARGET
+

This variable contains the name of the project target. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
QMAKE_UIC
+

This variable contains the location of uic if it is not in the path. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+

It can be used to specify arguments to uic as well, such as additional plugin paths. For example:

+
+        QMAKE_UIC = uic -L /path/to/plugin
+
+
RC_FILE
+

This variable contains the name of the resource file for the application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
RES_FILE
+

This variable contains the name of the resource file for the application. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
SRCMOC
+

This variable is set by qmake if files can be found that contain the Q_OBJECT macro. SRCMOC contains the name of all the generated moc files. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
TARGET_EXT
+

This variable specifies the target's extension. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
TARGET_x
+

This variable specifies the target's extension with a major version number. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
TARGET_x.y.z
+

This variable specifies the target's extension with version number. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
UICIMPLS
+

This variable contains a list of the generated implementation files by UIC. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
UICOBJECTS
+

This variable is generated from the UICIMPLS variable. The extension of each file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
VER_MAJ
+

This variable contains the major version number of the library, if the 'lib' template is specified.

+
VER_MIN
+

This variable contains the minor version number of the library, if the 'lib' template is specified.

+
VER_PAT
+

This variable contains the patch version number of the library, if the 'lib' template is specified.

+
QMAKE_EXT_MOC
+

This variable changes the extention used on included moc files.

+

See also File Extensions.

+
QMAKE_EXT_UI
+

This variable changes the extention used on /e Designer UI files.

+

See also File Extensions.

+
QMAKE_EXT_PRL
+

This variable changes the extention used on created PRL files.

+

See also File Extensions, Library Dependencies.

+
QMAKE_EXT_LEX
+

This variable changes the extention used on files given to lex.

+

See also File Extensions, LEXSOURCES.

+
QMAKE_EXT_YACC This variable changes the extention used on files given to yacc.
+

See also File Extensions, YACCSOURCES.

+
QMAKE_EXT_OBJ
+

This variable changes the extention used on generated object files.

+

See also File Extensions.

+
QMAKE_EXT_CPP
+

This variable changes the interpretation of all suffixes in this list of values as files of type C++ source code.

+

See also File Extensions.

+
QMAKE_EXT_H
+

This variable changes the interpretation of all suffixes in this list of values as files of type C header files.

+

See also File Extensions.

+
YACCIMPLS
+

This variable contains a list of yacc source files. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+
YACCOBJECTS
+

This variable contains a list of yacc object files. The value of this variable is typically handled by qmake or qmake.conf and rarely needs to be modified.

+

Functions

+

qmake recognizes the following functions:

+

include( filename )

+

This function will include the contents of filename into the current project at the point where was included. The function succeeds if filename was included, otherwise it fails. You can check the return value of this function using a scope.

+

For example:

+
+include( shared.pri )
+OPTIONS = standard custom
+!include( options.pri ) {
+        message( "No custom build options specified" )
+        OPTIONS -= custom
+}
+
+

exists( file )

+

This function will test if file exists. If the file exists, then it will succeed; otherwise it will fail. You can specify a regular expression in file and it will succeed if any file matches the regular expression specified.

+

For example:

+
+exists( $(QTDIR)/lib/libtqt-mt* ) {
+      message( "Configuring for multi-threaded TQt..." )
+      CONFIG += thread
+}
+
+

contains( variablename, value )

+

This function will succeed if the variable variablename contains the value value. You can check the return value of this function using a scope.

+

For example:

+
+contains( drivers, network ) {
+        # drivers contains 'network'
+        message( "Configuring for network build..." )
+        HEADERS += network.h
+        SOURCES += network.cpp
+}
+
+

count( variablename, number )

+

This function will succeed if the variable variablename contains number elements, otherwise it will fail. You can check the return value of this function using a scope.

+

For example:

+
+MYVAR = one two three
+count( MYVAR, 3 ) {
+        # always true
+}
+
+

infile( filename, var, val )

+

This function will succeed if the file filename (when parsed by qmake itself) contains the variable var with a value of val. You may also not pass in a third argument (val) and the function will only test if var has been assigned to in the file.

+

isEmpty( variablename )

+

This function will succeed if the variable variablename is empty (same as count(variable, 0)).

+

system( command )

+

This function will execute command in a secondary shell and will succeed if the command exits with an exit status of 1. You can check the return value of this function using a scope.

+

For example:

+
+  system(ls /bin):HAS_BIN=FALSE
+
+

message( string )

+

This function will always succeed, and will display the given string to the user.

+

error( string )

+

This function will never return a value. It will display the given string to the user, and then exit qmake. This function should only be used for very fatal configurations.

+

For example:

+
+  release:debug:error(You can't have release and debug at the same time!)
+
+

Properties

+

qmake has a system of persistant information, this allows you to 'set' a variable in qmake once, and each time qmake is invoked this value can be queried. Use the following to set a property in qmake:

+
+qmake -set VARIABLE VALUE
+
+

To retrieve this information back from qmake you can do:

+
+qmake -query VARIABLE
+qmake -query #queries all current VARIABLE/VALUE pairs..
+
+

This information will be saved into a TQSettings object (meaning it will be stored in different places for different platforms). As VARIABLE is versioned as well, you can set one value in an older version of qmake, and newer versions will retrieve this value, however if you -set VARIABLE into a newer version of qmake the older version will not use this value. You can however query a specific version of a variable if you prefix that version of qmake to VARIABLE, as in:

+
+qmake -query "1.06a/VARIABLE"
+
+

qmake also has the notion of 'builtin' properties, for example you can query the installation of TQt for this version of qmake with the QT_INSTALL_PREFIX property:

+
+qmake -query "QT_INSTALL_PREFIX"
+
+

These builtin properties cannot have a version prefixed to them as they are not versioned and each qmake will have its own notion of these values. The list below outlines the builtin properties:

+
  • QT_INSTALL_PREFIX - Where the version of TQt this qmake is built for resides

    +
  • QT_INSTALL_DATA - Where data for this version of TQt resides

    +
  • QMAKE_VERSION - The current version of qmake

    +

Finally, these values can be queried in a project file with a special notation such as:

+
+QMAKE_VERS = $$[QMAKE_VERSION]
+
+

Environment Variables and Configuration

+

QMAKESPEC

+

qmake retquires a platform and compiler description file which contains many default values used to generate appropriate makefiles. The standard TQt distribution comes with many of these files, located in the 'mkspecs' subdirectory of the TQt installation.

+

The QMAKESPEC environment variable can contain any of the following:

+
  • A complete path to a directory containing a qmake.conf file. In this case qmake will open the qmake.conf file from within that directory. If the file does not exist, qmake will exit with an error.

    +
  • The name of a platform-compiler combination. In this case, qmake will search in the directory specified by the QTDIR environment variable.

    +

Note: the QMAKESPEC path will automatically be added to the INCLUDEPATH system variable.

+

INSTALLS

+

It is common on UNIX to be able to install from the same utility as you build with (e.g make install). For this qmake has introduce the concept of an install set. The notation for this is tquite simple, first you fill in an "object" in qmake for example:

+
+  documentation.path = /usr/local/program/doc
+  documentation.files = docs/*
+
+

In this way you are telling qmake several things about this install, first that you plan to install to /usr/local/program/doc (the path member), second that you plan to copy everything in the docs directory. Once this is done you may insert it in the install list:

+
+  INSTALLS += documentation
+
+

Now qmake will take over making sure the correct things are copied to the specified places. If however you retquire greater control you may use the 'extra' member of the object:

+
+  unix:documentation.extra = create_docs; mv master.doc toc.doc
+
+

Then qmake will run the things in extra (this is of course platform specific, so you may need to test for your platform first, this case we test for unix). Then it will do the normal processings of the files member. Finally if you appened a builtin install to INSTALLS qmake (and do not specify a files or extra member) will decide what needs to be copied for you, currently the only supported builtin is target:

+
+  target.path = /usr/local/myprogram
+  INSTALLS += target
+
+

With this qmake will know what you plan need copied, and do this for you.

+

Cache File

+

The cache file (mentioned above in the options) is a special file qmake will read to find settings not specified in the qmake.conf file, the .pro file, or the command line. If -nocache is not specified, qmake will try to find a file called .qmake.cache in parent directories. If it fails to find this file, it will silently ignore this step of processing.

+

Library Dependencies

+

Often when linking against a library qmake relies on the underlying platform to know what other libraries this library links against, and lets the platform pull them in. In many cases, however, this is not sufficent. For example when statically linking a library there are no libraries linked against, and therefore no dependencies to those libraries are created - however an application that later links against this library will need to know where to find the symbols that the linked in library will retquire. To help with this situation qmake will follow a library's dependencies when it feels appropriate, however this behaviour must be enabled in qmake. To enable retquires two steps. First, you must enable it in the library - to do this you must tell qmake to save information about this library:

+
+  CONFIG += create_prl
+
+

This is only relevant to the lib template, and will be ignored for all others. When this option is enabled qmake will create a file (called a .prl file) which will save some meta information about the library. This metafile is itself just a qmake project file, but with all internal variables. You are free to view this file, and if deleted qmake will know to recreate it when necesary (either when the .pro file is later read, or if a dependent library (described below) has changed). When installing this library (by using target in INSTALLS, above) qmake will automatically copy the .prl file to your install path.

+

The second step to enabling this processing is to turn on reading of the meta information created above:

+
+  CONFIG += link_prl
+
+

When this is turned on qmake will process all libraries linked to, and find their meta information. With this meta information qmake will figure out what is relevant to linking, specifically it will add to your list of DEFINES as well as LIBS. Once qmake has processed this file, it will then look through the newly introduced LIBS and find their dependent .prl files, and continue until all libraries have been resolved. At this point the makefile is created as usual, and the libraries are linked explicity against your program.

+

The internals of the .prl file are left closed so they can easily change later. It is not designed to be changed by hand however, and should only be created by qmake - these .prl files should also not be transfered from operating system to operating system as they may be platform dependent (like a makefile).

+

File Extensions

+

Under normal circumstances qmake will try to use appropriate file extensions for your platform. There may be times, however, that you would like to override the behavior of these extensions. To do this, you must modify builtin variables in your .pro file, which will in turn changes qmake's interpretation of these files. You may do this as:

+
+  QMAKE_EXT_MOC = .mymoc
+
+

The variables are as follows:

+
  • QMAKE_EXT_MOC - This modifies the extension placed on included moc files.

    +
  • QMAKE_EXT_UI - This modifies the extension used for designer UI files (usually in FORMS).

    +
  • QMAKE_EXT_PRL - This modifies the extension placed on library dependency files.

    +
  • QMAKE_EXT_LEX - This changes the suffix used in files (usually in LEXSOURCES).

    +
  • QMAKE_EXT_YACC - This changes the suffix used in files (usually in YACCSOURCES).

    +
  • QMAKE_EXT_OBJ - This changes the suffix used on generated object files.

    +

All the above accept just the first value, so you must assign to it one value that will be used through your makefile. There are two variables that accept a list of values, they are:

+
  • QMAKE_EXT_CPP - Changes interpretation all files with these suffixes to be C++ source files.

    +
  • QMAKE_EXT_H - Changes interpretation all files with these suffixes to be C header files.

    +

Customizing Makefile Output

+

qmake often tries to be all things to all build tools, this is often less than ideal when you really need to run special platform dependent commands. This can be achieved with specific instructions to the different qmake backends (currently this is only supported by the UNIX generator).

+

The interfaces to customizing the Makefile are done through "objects" as in other places in qmake. The notation for this is tquite simple, first you fill in an "object" in qmake for example:

+
+  mytarget.target = .buildfile
+  mytarget.commands = touch $$mytarget.target
+  mytarget.depends = mytarget2
+
+  mytarget2.commands = @echo Building $$mytarget.target
+
+

The information above defines a qmake target called mytarget which contains a Makefile target called .buildfile, .buildfile is generated by 'touch .buildfile', and finally that this Makefile target depends on the qmake target mytarget2. Additionally we've defined the qmake target mytarget2 which simply echo's something to stdout.

+

The final step to making use of the above is to instruct qmake that this is actually an object used by the target building parts of qmake by:

+
+QMAKE_EXTRA_UNIX_TARGETS += mytarget mytarget2
+
+

This is all you need to do to actually build custom targets in qmake, of course you may want to tie one of these targets to actually building the qmake build target. To do this, you simply need to include your Makefile target in the list of PRE_TARGETDEPS.

+

For convenience there is also a method of customizing (UNIX) projects for generic new compilers (or even preprocessors).

+
+new_moc.output  = moc_${QMAKE_FILE_BASE}.cpp
+new_moc.commands = moc ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
+new_moc.depends = g++ -E -M ${QMAKE_FILE_NAME} | sed "s,^.*: ,,"
+new_moc.input = NEW_HEADERS
+QMAKE_EXTRA_UNIX_COMPILERS += new_moc
+
+

With this you can create a new moc for qmake, the commands will be executed over all arguments given to a NEW_HEADERS variable (from the input variable), and write to output (and automatically hand this filename to the compiler to be linked into your target). Additionally qmake will execute depends to generate dependency information and place this in the project as well.

+

These commands can easily be placed into a cache file, and subsequent .pro files can give several arguments to NEW_HEADERS.

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmake-manual.html b/doc/html/qmake-manual.html new file mode 100644 index 00000000..2fde1c76 --- /dev/null +++ b/doc/html/qmake-manual.html @@ -0,0 +1,49 @@ + + + + + +qmake User Guide + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmake User Guide

+ +

Introduction to qmake

+

Installing qmake

+

The 10 minute guide to using qmake

+

qmake Tutorial

+

qmake Concepts

+

qmake's Advanced Concepts

+

Using Precompiled Headers

+

qmake Command Reference

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmake.dcf b/doc/html/qmake.dcf new file mode 100644 index 00000000..a4ac65a2 --- /dev/null +++ b/doc/html/qmake.dcf @@ -0,0 +1,11 @@ + + +
+
+
+
+
+
+
+
+ diff --git a/doc/html/qmap-h.html b/doc/html/qmap-h.html new file mode 100644 index 00000000..acc45169 --- /dev/null +++ b/doc/html/qmap-h.html @@ -0,0 +1,921 @@ + + + + + +qmap.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmap.h

+ +

This is the verbatim text of the qmap.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmap.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 retquirements 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 "qglobal.h"
+#include "qshared.h"
+#include "qdatastream.h"
+#include "qpair.h"
+#include "qvaluelist.h"
+#endif // QT_H
+
+#ifndef QT_NO_STL
+#include <iterator>
+#include <map>
+#endif
+
+//#define QT_CHECK_MAP_RANGE
+
+struct Q_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 QT_NO_STL
+    typedef std::bidirectional_iterator_tag  iterator_category;
+#endif
+    typedef T          value_type;
+#ifndef QT_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>
+Q_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>
+Q_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 QT_NO_STL
+    typedef std::bidirectional_iterator_tag  iterator_category;
+#endif
+    typedef T          value_type;
+#ifndef QT_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>
+Q_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>
+Q_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 Q_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>
+Q_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>
+Q_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>
+Q_INLINE_TEMPLATES Q_TYPENAME TQMapPrivate<Key,T>::NodePtr TQMapPrivate<Key,T>::copy( Q_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>
+Q_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>
+Q_INLINE_TEMPLATES void TQMapPrivate<Key,T>::clear( Q_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>
+Q_INLINE_TEMPLATES Q_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>
+Q_INLINE_TEMPLATES Q_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>
+Q_INLINE_TEMPLATES Q_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( QT_NO_DEBUG ) && defined( QT_CHECK_MAP_RANGE )
+#  define QT_CHECK_INVALID_MAP_ELEMENT if ( empty() ) qWarning( "TQMap: Warning invalid element" )
+#  define QT_CHECK_INVALID_MAP_ELEMENT_FATAL Q_ASSERT( !empty() );
+# else
+#  define QT_CHECK_INVALID_MAP_ELEMENT
+#  define QT_CHECK_INVALID_MAP_ELEMENT_FATAL
+# endif
+#else
+# define QT_CHECK_INVALID_MAP_ELEMENT
+# define QT_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 QT_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 QT_NO_STL
+    TQMap( const std::map<Key,T>& m )
+    {
+	sh = new TQMapPrivate<Key,T>;
+	Q_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 QT_NO_STL
+    TQMap<Key,T>& operator= ( const std::map<Key,T>& m )
+    {
+	clear();
+	Q_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
+	{ QT_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(Q_FULL_TEMPLATE_INSTANTIATION)
+    bool operator==( const TQMap<Key,T>& ) const { return FALSE; }
+#ifndef QT_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>
+Q_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>
+Q_INLINE_TEMPLATES Q_TYPENAME TQMap<Key,T>::insert_pair TQMap<Key,T>::insert( const Q_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>
+Q_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>
+Q_INLINE_TEMPLATES Q_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>
+Q_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>
+Q_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>
+Q_INLINE_TEMPLATES Q_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>
+Q_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>
+Q_INLINE_TEMPLATES void TQMap<Key,T>::detachInternal()
+{
+    sh->deref(); sh = new TQMapPrivate<Key,T>( sh );
+}
+
+
+#ifndef QT_NO_DATASTREAM
+template<class Key, class T>
+Q_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQMap<Key,T>& m ) {
+    m.clear();
+    Q_UINT32 c;
+    s >> c;
+    for( Q_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>
+Q_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQMap<Key,T>& m ) {
+    s << (Q_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 "qwinexport.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 new file mode 100644 index 00000000..32421a8c --- /dev/null +++ b/doc/html/qmap-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/qmap.html b/doc/html/qmap.html new file mode 100644 index 00000000..3f0e5b5b --- /dev/null +++ b/doc/html/qmap.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 <qmap.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 retquires 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 <qstring.h>
+    #include <qmap.h>
+    #include <qstring.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/qmapconstiterator-members.html b/doc/html/qmapconstiterator-members.html new file mode 100644 index 00000000..b2274b8b --- /dev/null +++ b/doc/html/qmapconstiterator-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/qmapconstiterator.html b/doc/html/qmapconstiterator.html new file mode 100644 index 00000000..661fd3f4 --- /dev/null +++ b/doc/html/qmapconstiterator.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 <qmap.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 new file mode 100644 index 00000000..3eae6626 --- /dev/null +++ b/doc/html/qmapiterator-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/qmapiterator.html b/doc/html/qmapiterator.html new file mode 100644 index 00000000..2c5d6c73 --- /dev/null +++ b/doc/html/qmapiterator.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 <qmap.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/qmemarray-h.html b/doc/html/qmemarray-h.html new file mode 100644 index 00000000..4cbaeecb --- /dev/null +++ b/doc/html/qmemarray-h.html @@ -0,0 +1,166 @@ + + + + + +qmemarray.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmemarray.h

+ +

This is the verbatim text of the qmemarray.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmemarray.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQMemArray template/macro class
+**
+** Created : 930906
+**
+** 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 retquirements 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 TQMEMARRAY_H
+#define TQMEMARRAY_H
+
+#ifndef QT_H
+#include "qgarray.h"
+#endif // QT_H
+
+
+template<class type>
+class TQMemArray : public TQGArray
+{
+public:
+    typedef type* Iterator;
+    typedef const type* ConstIterator;
+    typedef type ValueType;
+
+protected:
+    TQMemArray( int, int ) : TQGArray( 0, 0 ) {}
+
+public:
+    TQMemArray() {}
+    TQMemArray( int size ) : TQGArray(size*sizeof(type)) {} // ### 4.0 Q_EXPLICIT
+    TQMemArray( const TQMemArray<type> &a ) : TQGArray(a) {}
+   ~TQMemArray() {}
+    TQMemArray<type> &operator=(const TQMemArray<type> &a)
+				{ return (TQMemArray<type>&)TQGArray::assign(a); }
+    type *data()    const	{ return (type *)TQGArray::data(); }
+    uint  nrefs()   const	{ return TQGArray::nrefs(); }
+    uint  size()    const	{ return TQGArray::size()/sizeof(type); }
+    uint  count()   const	{ return size(); }
+    bool  isEmpty() const	{ return TQGArray::size() == 0; }
+    bool  isNull()  const	{ return TQGArray::data() == 0; }
+    bool  resize( uint size )	{ return TQGArray::resize(size*sizeof(type)); }
+    bool  resize( uint size, Optimization optim ) { return TQGArray::resize(size*sizeof(type), optim); }
+    bool  truncate( uint pos )	{ return TQGArray::resize(pos*sizeof(type)); }
+    bool  fill( const type &d, int size = -1 )
+	{ return TQGArray::fill((char*)&d,size,sizeof(type) ); }
+    void  detach()		{ TQGArray::detach(); }
+    TQMemArray<type>   copy() const
+	{ TQMemArray<type> tmp; return tmp.duplicate(*this); }
+    TQMemArray<type>& assign( const TQMemArray<type>& a )
+	{ return (TQMemArray<type>&)TQGArray::assign(a); }
+    TQMemArray<type>& assign( const type *a, uint n )
+	{ return (TQMemArray<type>&)TQGArray::assign((char*)a,n*sizeof(type)); }
+    TQMemArray<type>& duplicate( const TQMemArray<type>& a )
+	{ return (TQMemArray<type>&)TQGArray::duplicate(a); }
+    TQMemArray<type>& duplicate( const type *a, uint n )
+	{ return (TQMemArray<type>&)TQGArray::duplicate((char*)a,n*sizeof(type)); }
+    TQMemArray<type>& setRawData( const type *a, uint n )
+	{ return (TQMemArray<type>&)TQGArray::setRawData((char*)a,
+						     n*sizeof(type)); }
+    void resetRawData( const type *a, uint n )
+	{ TQGArray::resetRawData((char*)a,n*sizeof(type)); }
+    int	 find( const type &d, uint i=0 ) const
+	{ return TQGArray::find((char*)&d,i,sizeof(type)); }
+    int	 contains( const type &d ) const
+	{ return TQGArray::contains((char*)&d,sizeof(type)); }
+    void sort() { TQGArray::sort(sizeof(type)); }
+    int  bsearch( const type &d ) const
+	{ return TQGArray::bsearch((const char*)&d,sizeof(type)); }
+    // ### TQt 4.0: maybe provide uint overload as work-around for MSVC bug
+    type& operator[]( int i ) const
+	{ return (type &)(*(type *)TQGArray::at(i*sizeof(type))); }
+    type& at( uint i ) const
+	{ return (type &)(*(type *)TQGArray::at(i*sizeof(type))); }
+	 operator const type*() const { return (const type *)TQGArray::data(); }
+    bool operator==( const TQMemArray<type> &a ) const { return isEqual(a); }
+    bool operator!=( const TQMemArray<type> &a ) const { return !isEqual(a); }
+    Iterator begin() { return data(); }
+    Iterator end() { return data() + size(); }
+    ConstIterator begin() const { return data(); }
+    ConstIterator end() const { return data() + size(); }
+};
+
+#ifndef QT_NO_COMPAT
+#define TQArray TQMemArray
+#endif
+
+#define Q_DEFINED_QMEMARRAY
+#include "qwinexport.h"
+#endif // TQARRAY_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmemarray-members.html b/doc/html/qmemarray-members.html new file mode 100644 index 00000000..ca8a8169 --- /dev/null +++ b/doc/html/qmemarray-members.html @@ -0,0 +1,75 @@ + + + + + +TQMemArray Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMemArray

+ +

This is the complete list of member functions for +TQMemArray, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmemarray.html b/doc/html/qmemarray.html new file mode 100644 index 00000000..4fcdc305 --- /dev/null +++ b/doc/html/qmemarray.html @@ -0,0 +1,561 @@ + + + + + +TQMemArray Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMemArray Class Reference

+ +

The TQMemArray class is a template class that provides arrays of simple types. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qmemarray.h> +

Inherited by TQByteArray and TQPointArray. +

List of all member functions. +

Public Members

+
    +
  • typedef type * Iterator
  • +
  • typedef const type * ConstIterator
  • +
  • TQMemArray ()
  • +
  • TQMemArray ( int size )
  • +
  • TQMemArray ( const TQMemArray<type> & a )
  • +
  • ~TQMemArray ()
  • +
  • TQMemArray<type> & operator= ( const TQMemArray<type> & a )
  • +
  • type * data () const
  • +
  • uint nrefs () const
  • +
  • uint size () const
  • +
  • uint count () const
  • +
  • bool isEmpty () const
  • +
  • bool isNull () const
  • +
  • bool resize ( uint size )
  • +
  • bool resize ( uint size, Optimization optim )
  • +
  • bool truncate ( uint pos )
  • +
  • bool fill ( const type & v, int size = -1 )
  • +
  • virtual void detach ()
  • +
  • TQMemArray<type> copy () const
  • +
  • TQMemArray<type> & assign ( const TQMemArray<type> & a )
  • +
  • TQMemArray<type> & assign ( const type * data, uint size )
  • +
  • TQMemArray<type> & duplicate ( const TQMemArray<type> & a )
  • +
  • TQMemArray<type> & duplicate ( const type * data, uint size )
  • +
  • TQMemArray<type> & setRawData ( const type * data, uint size )
  • +
  • void resetRawData ( const type * data, uint size )
  • +
  • int find ( const type & v, uint index = 0 ) const
  • +
  • int contains ( const type & v ) const
  • +
  • void sort ()
  • +
  • int bsearch ( const type & v ) const
  • +
  • type & operator[] ( int index ) const
  • +
  • type & at ( uint index ) const
  • +
  • operator const type * () const
  • +
  • bool operator== ( const TQMemArray<type> & a ) const
  • +
  • bool operator!= ( const TQMemArray<type> & a ) const
  • +
  • Iterator begin ()
  • +
  • Iterator end ()
  • +
  • ConstIterator begin () const
  • +
  • ConstIterator end () const
  • +
+

Protected Members

+ +

Related Functions

+
    +
  • Q_UINT16 qChecksum ( const char * data, uint len )
  • +
  • TQDataStream & operator<< ( TQDataStream & s, const TQByteArray & a )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQByteArray & a )
  • +
+

Detailed Description

+ + + +The TQMemArray class is a template class that provides arrays of simple types. +

+

TQMemArray is implemented as a template class. Define a template +instance TQMemArray<X> to create an array that contains X items. +

TQMemArray stores the array elements directly in the array. It can +only deal with simple types (i.e. C++ types, structs, and classes +that have no constructors, destructors, or virtual functions). +TQMemArray uses bitwise operations to copy and compare array +elements. +

The TQPtrVector collection class is also a kind of array. Like most +collection classes, it uses pointers +to the contained items. +

TQMemArray uses explicit sharing with a +reference count. If more than one array shares common data and one +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 retquired, which results in lower memory use +and less copying of data. +

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 +implicitly shared. +

Example: +

+    #include <qmemarray.h>
+    #include <stdio.h>
+
+    TQMemArray<int> fib( int num ) // returns fibonacci array
+    {
+        Q_ASSERT( num > 2 );
+        TQMemArray<int> f( num ); // array of ints
+
+        f[0] = f[1] = 1;
+        for ( int i = 2; i < num; i++ )
+            f[i] = f[i-1] + f[i-2];
+
+        return f;
+    }
+
+    int main()
+    {
+        TQMemArray<int> a = fib( 6 ); // get first 6 fibonaccis
+        for ( int i = 0; i < a.size(); i++ )
+            qDebug( "%d: %d", i, a[i] );
+
+        qDebug( "1 is found %d times", a.contains(1) );
+        qDebug( "5 is found at index %d", a.find(5) );
+
+        return 0;
+    }
+    
+ +

Program output: +

+    0: 1
+    1: 1
+    2: 2
+    3: 3
+    4: 5
+    5: 8
+    1 is found 2 times
+    5 is found at index 4
+    
+ +

Note concerning the use of TQMemArray for manipulating structs or +classes: Compilers will often pad the size of structs of odd sizes +up to the nearest word boundary. This will then be the size +TQMemArray will use for its bitwise element comparisons. Because +the remaining bytes will typically be uninitialized, this can +cause find() etc. to fail to find the element. Example: +

+    // MyStruct may be padded to 4 or 8 bytes
+    struct MyStruct
+    {
+        short i; // 2 bytes
+        char c;  // 1 byte
+    };
+
+    TQMemArray<MyStruct> a(1);
+    a[0].i = 5;
+    a[0].c = 't';
+
+    MyStruct x;
+    x.i = '5';
+    x.c = 't';
+    int i = a.find( x ); // may return -1 if the pad bytes differ
+    
+ +

To work around this, make sure that you use a struct where +sizeof() returns the same as the sum of the sizes of the members +either by changing the types of the struct members or by adding +dummy members. +

TQMemArray data can be traversed by iterators (see begin() and +end()). The number of items is returned by count(). The array can +be resized with resize() and filled using fill(). +

You can make a shallow copy of the array with assign() (or +operator=()) and a deep copy with duplicate(). +

Search for values in the array with find() and contains(). For +sorted arrays (see sort()) you can search using bsearch(). +

You can set the data directly using setRawData() and +resetRawData(), although this retquires care. +

See also Shared Classes and Non-GUI Classes. + +


Member Type Documentation

+

TQMemArray::ConstIterator

+A const TQMemArray iterator. +

See also begin() and end(). + +

TQMemArray::Iterator

+A TQMemArray iterator. +

See also begin() and end(). + +


Member Function Documentation

+

TQMemArray::TQMemArray ( int, int ) [protected] +

+ +

Constructs an array without allocating array space. The +arguments should be (0, 0). Use at your own risk. + +

TQMemArray::TQMemArray () +

+ +

Constructs a null array. +

See also isNull(). + +

TQMemArray::TQMemArray ( int size ) +

+ +

Constructs an array with room for size elements. Makes a null +array if size == 0. +

The elements are left uninitialized. +

See also resize() and isNull(). + +

TQMemArray::TQMemArray ( const TQMemArray<type> & a ) +

+ +

Constructs a shallow copy of a. +

See also assign(). + +

TQMemArray::~TQMemArray () +

+ +

Dereferences the array data and deletes it if this was the last +reference. + +

TQMemArray<type> & TQMemArray::assign ( const TQMemArray<type> & a ) +

+ +

Shallow copy. Dereferences the current array and references the +data contained in a instead. Returns a reference to this array. +

See also operator=(). + +

TQMemArray<type> & TQMemArray::assign ( const type * data, uint size ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Shallow copy. Dereferences the current array and references the +array data data, which contains size elements. Returns a +reference to this array. +

Do not delete data later; TQMemArray will call free() on it +at the right time. + +

type & TQMemArray::at ( uint index ) const +

+ +

Returns a reference to the element at position index in the array. +

This can be used to both read and set an element. +

See also operator[](). + +

Iterator TQMemArray::begin () +

+ +

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. + +

ConstIterator TQMemArray::begin () const +

+ +

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. + +

int TQMemArray::bsearch ( const type & v ) const +

+ +

In a sorted array (as sorted by sort()), finds the first +occurrence of v by using a binary search. For a sorted +array this is generally much faster than find(), which does +a linear search. +

Returns the position of v, or -1 if v could not be found. +

See also sort() and find(). + +

int TQMemArray::contains ( const type & v ) const +

+ +

Returns the number of times v occurs in the array. +

See also find(). + +

TQMemArray<type> TQMemArray::copy () const +

+ +

Returns a deep copy of this array. +

See also detach() and duplicate(). + +

uint TQMemArray::count () const +

+ +

Returns the same as size(). +

See also size(). + +

Example: scribble/scribble.cpp. +

type * TQMemArray::data () const +

+ +

Returns a pointer to the actual array data. +

The array is a null array if data() == 0 (null pointer). +

See also isNull(). + +

Examples: fileiconview/qfileiconview.cpp and network/networkprotocol/nntp.cpp. +

void TQMemArray::detach () [virtual] +

+ +

Detaches this array from shared array data; i.e. it makes a +private, deep copy of the data. +

Copying will be performed only if the reference + count is greater than one. +

See also copy(). + +

Reimplemented in TQBitArray. +

TQMemArray<type> & TQMemArray::duplicate ( const TQMemArray<type> & a ) +

+ +

Deep copy. Dereferences the current array and obtains a copy of +the data contained in a instead. Returns a reference to this +array. +

See also copy(). + +

TQMemArray<type> & TQMemArray::duplicate ( const type * data, uint size ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Deep copy. Dereferences the current array and obtains a copy of +the array data data instead. Returns a reference to this array. +The size of the array is given by size. +

See also copy(). + +

Iterator TQMemArray::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 TQValueList and TQMap, for example. + +

ConstIterator TQMemArray::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 this +array. This iterator can be used in the same way as the iterators +of TQValueList and TQMap, for example. + +

bool TQMemArray::fill ( const type & v, int size = -1 ) +

+ +

Fills the array with the value v. If size is specified as +different from -1, then the array will be resized before being +filled. +

Returns TRUE if successful, i.e. if size is -1, or size is +!= -1 and the memory can be allocated; otherwise returns FALSE. +

See also resize(). + +

int TQMemArray::find ( const type & v, uint index = 0 ) const +

+ +

Finds the first occurrence of v, starting at position index. +

Returns the position of v, or -1 if v could not be found. +

See also contains(). + +

bool TQMemArray::isEmpty () const +

+ +

Returns TRUE if the array is empty; otherwise returns FALSE. +

isEmpty() is equivalent to isNull() for TQMemArray (unlike +TQString). + +

bool TQMemArray::isNull () const +

+ +

Returns TRUE if the array is null; otherwise returns FALSE. +

A null array has size() == 0 and data() == 0. + +

uint TQMemArray::nrefs () const +

+ +

Returns the reference count for the shared array data. This +reference count is always greater than zero. + +

TQMemArray::operator const type * () const +

+ +

Cast operator. Returns a pointer to the array. +

See also data(). + +

bool TQMemArray::operator!= ( const TQMemArray<type> & a ) const +

+ +

Returns TRUE if this array is different from a; otherwise +returns FALSE. +

The two arrays are compared bitwise. +

See also operator==(). + +

TQMemArray<type> & TQMemArray::operator= ( const TQMemArray<type> & a ) +

+ +

Assigns a shallow copy of a to this array and returns a +reference to this array. +

Equivalent to assign( a ). + +

bool TQMemArray::operator== ( const TQMemArray<type> & a ) const +

+ +

Returns TRUE if this array is equal to a; otherwise returns +FALSE. +

The two arrays are compared bitwise. +

See also operator!=(). + +

type & TQMemArray::operator[] ( int index ) const +

+ +

Returns a reference to the element at position index in the +array. +

This can be used to both read and set an element. Equivalent to +at(). +

See also at(). + +

void TQMemArray::resetRawData ( const type * data, uint size ) +

+ +

Removes internal references to the raw data that was set using +setRawData(). This means that TQMemArray no longer has access to +the data, so you are free to manipulate data as you wish. +You can now use the TQMemArray without affecting the original data, for example by calling setRawData() with a pointer to some +other data. +

The arguments must be the data and length, size, that were +passed to setRawData(). This is for consistency checking. +

See also setRawData(). + +

bool TQMemArray::resize ( uint size, Optimization optim ) +

+ +

Resizes (expands or shrinks) the array to size elements. The +array becomes a null array if size == 0. +

Returns TRUE if successful, or FALSE if the memory cannot be +allocated. +

New elements are not initialized. +

optim is either TQGArray::MemOptim (the default) or +TQGArray::SpeedOptim. +

Note: By default, SpeedOptim is not available for general +use since it is only available if TQt is built in a particular +configuration. +

See also size(). + +

Example: fileiconview/qfileiconview.cpp. +

bool TQMemArray::resize ( uint size ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Resizes (expands or shrinks) the array to size elements. The +array becomes a null array if size == 0. +

Returns TRUE if successful, i.e. if the memory can be allocated; +otherwise returns FALSE. +

New elements are not initialized. +

See also size(). + +

TQMemArray<type> & TQMemArray::setRawData ( const type * data, uint size ) +

+ +

Sets raw data and returns a reference to the array. +

Dereferences the current array and sets the new array data to data and the new array size to size. Do not attempt to resize +or re-assign the array data when raw data has been set. Call +resetRawData(data, size) to reset the array. +

Setting raw data is useful because it sets TQMemArray data without +allocating memory or copying data. +

Example I (intended use): +

+    static char bindata[] = { 231, 1, 44, ... };
+    TQByteArray  a;
+    a.setRawData( bindata, sizeof(bindata) );   // a points to bindata
+    TQDataStream s( a, IO_ReadOnly );            // open on a's data
+    s >> <something>;                           // read raw bindata
+    a.resetRawData( bindata, sizeof(bindata) ); // finished
+    
+ +

Example II (you don't want to do this): +

+    static char bindata[] = { 231, 1, 44, ... };
+    TQByteArray  a, b;
+    a.setRawData( bindata, sizeof(bindata) );   // a points to bindata
+    a.resize( 8 );                              // will crash
+    b = a;                                      // will crash
+    a[2] = 123;                                 // might crash
+    // forget to resetRawData: will crash
+    
+ +

Warning: If you do not call resetRawData(), TQMemArray will attempt +to deallocate or reallocate the raw data, which might not be too +good. Be careful. +

See also resetRawData(). + +

uint TQMemArray::size () const +

+ +

Returns the size of the array (maximum number of elements). +

The array is a null array if size() == 0. +

See also isNull() and resize(). + +

void TQMemArray::sort () +

+ +

Sorts the array elements in ascending order, using bitwise +comparison (memcmp()). +

See also bsearch(). + +

bool TQMemArray::truncate ( uint pos ) +

+ +

Truncates the array at position pos. +

Returns TRUE if successful, i.e. if the memory can be allocated; +otherwise returns FALSE. +

Equivalent to resize(pos). +

See also resize(). + +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQByteArray & a ) +

+ +

Writes byte array a to the stream s and returns a reference +to the stream. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQByteArray & a ) +

+ +

Reads a byte array into a from the stream s and returns a +reference to the stream. +

See also Format of the TQDataStream operators. + +

Q_UINT16 qChecksum ( const char * data, uint len ) +

+ +

Returns the CRC-16 checksum of len bytes starting at data. +

The checksum is independent of the byte order (endianness). + + +


+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/qmenubar-h.html b/doc/html/qmenubar-h.html new file mode 100644 index 00000000..5ed139c7 --- /dev/null +++ b/doc/html/qmenubar-h.html @@ -0,0 +1,250 @@ + + + + + +qmenubar.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmenubar.h

+ +

This is the verbatim text of the qmenubar.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmenubar.h   3.3.8   edited Jan 16 10:55 $
+**
+** Definition of TQMenuBar class
+**
+** Created : 941209
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQMENUBAR_H
+#define TQMENUBAR_H
+
+#ifndef QT_H
+#include "qpopupmenu.h" // ### remove or keep for users' convenience?
+#include "qframe.h"
+#include "qmenudata.h"
+#endif // QT_H
+
+#ifndef QT_NO_MENUBAR
+
+class TQPopupMenu;
+
+class Q_EXPORT TQMenuBar : public TQFrame, public TQMenuData
+{
+    Q_OBJECT
+    Q_ENUMS( Separator )
+    Q_PROPERTY( Separator separator READ separator WRITE setSeparator DESIGNABLE false )
+    Q_PROPERTY( bool defaultUp READ isDefaultUp WRITE setDefaultUp )
+
+public:
+    TQMenuBar( TQWidget* parent=0, const char* name=0 );
+    ~TQMenuBar();
+
+    void	updateItem( int id );
+
+    void	show();				// reimplemented show
+    void	hide();				// reimplemented hide
+
+    bool	eventFilter( TQObject *, TQEvent * );
+
+    int		heightForWidth(int) const;
+
+    enum	Separator { Never=0, InWindowsStyle=1 };
+    Separator 	separator() const;
+    virtual void	setSeparator( Separator when );
+
+    void	setDefaultUp( bool );
+    bool	isDefaultUp() const;
+
+    bool customWhatsThis() const;
+
+    TQSize sizeHint() const;
+    TQSize minimumSize() const;
+    TQSize minimumSizeHint() const;
+
+    void activateItemAt( int index );
+
+#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+    static void initialize();
+    static void cleanup();
+#endif
+
+signals:
+    void	activated( int itemId );
+    void	highlighted( int itemId );
+
+protected:
+    void	drawContents( TQPainter * );
+    void	fontChange( const TQFont & );
+    void	mousePressEvent( TQMouseEvent * );
+    void	mouseReleaseEvent( TQMouseEvent * );
+    void	mouseMoveEvent( TQMouseEvent * );
+    void	keyPressEvent( TQKeyEvent * );
+    void	focusInEvent( TQFocusEvent * );
+    void	focusOutEvent( TQFocusEvent * );
+    void	resizeEvent( TQResizeEvent * );
+    void	leaveEvent( TQEvent * );
+    void	menuContentsChanged();
+    void	menuStateChanged();
+    void 	styleChange( TQStyle& );
+    int	itemAtPos( const TQPoint & );
+    void	hidePopups();
+    TQRect	itemRect( int item );
+
+private slots:
+    void	subActivated( int itemId );
+    void	subHighlighted( int itemId );
+#ifndef QT_NO_ACCEL
+    void	accelActivated( int itemId );
+    void	accelDestroyed();
+#endif
+    void	popupDestroyed( TQObject* );
+    void 	performDelayedChanges();
+
+    void	languageChange();
+
+private:
+    void 	performDelayedContentsChanged();
+    void 	performDelayedStateChanged();
+    void	menuInsPopup( TQPopupMenu * );
+    void	menuDelPopup( TQPopupMenu * );
+    void	frameChanged();
+
+    bool	tryMouseEvent( TQPopupMenu *, TQMouseEvent * );
+    void	tryKeyEvent( TQPopupMenu *, TQKeyEvent * );
+    void	goodbye( bool cancelled = FALSE );
+    void	openActPopup();
+
+    void setActiveItem( int index, bool show = TRUE, bool activate_first_item = TRUE );
+    void setAltMode( bool );
+
+    int		calculateRects( int max_width = -1 );
+
+#ifndef QT_NO_ACCEL
+    void	setupAccelerators();
+    TQAccel     *autoaccel;
+#endif
+    TQRect      *irects;
+    int		rightSide;
+
+    uint	mseparator : 1;
+    uint	waitforalt : 1;
+    uint	popupvisible  : 1;
+    uint	hasmouse : 1;
+    uint 	defaultup : 1;
+    uint 	toggleclose : 1;
+    uint        pendingDelayedContentsChanges : 1;
+    uint        pendingDelayedStateChanges : 1;
+
+    friend class TQPopupMenu;
+
+#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+    friend class TQWidget;
+    friend class TQApplication;
+    friend void qt_mac_set_modal_state(bool, TQMenuBar *);
+
+    void macCreateNativeMenubar();
+    void macRemoveNativeMenubar();
+    void macDirtyNativeMenubar();
+
+#if !defined(TQMAC_QMENUBAR_NO_EVENT)
+    static void qt_mac_install_menubar_event(MenuRef);
+    static OSStatus qt_mac_menubar_event(EventHandlerCallRef, EventRef, void *);
+#endif
+    virtual void macWidgetChangedWindow();
+    bool syncPopups(MenuRef ret, TQPopupMenu *d);
+    MenuRef createMacPopup(TQPopupMenu *d, int id, bool =FALSE);
+    bool updateMenuBar();
+#if !defined(TQMAC_QMENUBAR_NO_MERGE)
+    uint isCommand(TQMenuItem *, bool just_check=FALSE);
+#endif
+
+    uint mac_eaten_menubar : 1;
+    class MacPrivate;
+    MacPrivate *mac_d;
+    static bool activate(MenuRef, short, bool highlight=FALSE, bool by_accel=FALSE);
+    static bool activateCommand(uint cmd);
+    static bool macUpdateMenuBar();
+    static bool macUpdatePopupVisible(MenuRef, bool);
+    static bool macUpdatePopup(MenuRef);
+#endif
+
+private:	// Disabled copy constructor and operator=
+
+#if defined(Q_DISABLE_COPY)
+    TQMenuBar( const TQMenuBar & );
+    TQMenuBar &operator=( const TQMenuBar & );
+#endif
+};
+
+
+#endif // QT_NO_MENUBAR
+
+#endif // TQMENUBAR_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmenubar-m.png b/doc/html/qmenubar-m.png new file mode 100644 index 00000000..c5e0c46a Binary files /dev/null and b/doc/html/qmenubar-m.png differ diff --git a/doc/html/qmenubar-members.html b/doc/html/qmenubar-members.html new file mode 100644 index 00000000..4894e783 --- /dev/null +++ b/doc/html/qmenubar-members.html @@ -0,0 +1,398 @@ + + + + + +TQMenuBar Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMenuBar

+ +

This is the complete list of member functions for +TQMenuBar, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmenubar-w.png b/doc/html/qmenubar-w.png new file mode 100644 index 00000000..0002338b Binary files /dev/null and b/doc/html/qmenubar-w.png differ diff --git a/doc/html/qmenubar.html b/doc/html/qmenubar.html new file mode 100644 index 00000000..fe899bda --- /dev/null +++ b/doc/html/qmenubar.html @@ -0,0 +1,593 @@ + + + + + +TQMenuBar Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMenuBar Class Reference

+ +

The TQMenuBar class provides a horizontal menu bar. +More... +

#include <qmenubar.h> +

Inherits TQFrame and TQMenuData. +

List of all member functions. +

Public Members

+
    +
  • TQMenuBar ( TQWidget * parent = 0, const char * name = 0 )
  • +
  • ~TQMenuBar ()
  • +
  • virtual void show ()
  • +
  • virtual void hide ()
  • +
  • virtual int heightForWidth ( int max_width ) const
  • +
  • enum Separator { Never = 0, InWindowsStyle = 1 }
  • +
  • Separator separator () const  (obsolete)
  • +
  • virtual void setSeparator ( Separator when )  (obsolete)
  • +
  • void setDefaultUp ( bool )
  • +
  • bool isDefaultUp () const
  • +
+

Signals

+ +

Important Inherited Members

+
    +
  • int insertItem ( const TQString & text, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQString & text, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQString & text, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQString & text, TQPopupMenu * popup, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQString & text, TQPopupMenu * popup, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQPixmap & pixmap, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQPixmap & pixmap, TQPopupMenu * popup, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, TQPopupMenu * popup, int id = -1, int index = -1 )
  • +
  • int insertItem ( TQWidget * widget, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, TQCustomMenuItem * custom, int id = -1, int index = -1 )
  • +
  • int insertItem ( TQCustomMenuItem * custom, int id = -1, int index = -1 )
  • +
  • int insertSeparator ( int index = -1 )
  • +
  • void removeItem ( int id )
  • +
  • void clear ()
  • +
  • bool isItemEnabled ( int id ) const
  • +
  • void setItemEnabled ( int id, bool enable )
  • +
  • bool isItemVisible ( int id ) const
  • +
  • void setItemVisible ( int id, bool visible )
  • +
+

Properties

+
    +
  • bool defaultUp - the popup orientation
  • +
  • Separator separator - in which cases a menubar sparator is drawn  (obsolete)
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQMenuBar class provides a horizontal menu bar. +

+ +

A menu bar consists of a list of pull-down menu items. You add +menu items with insertItem(). For example, asuming that menubar is a +pointer to a TQMenuBar and filemenu is a pointer to a +TQPopupMenu, the following statement inserts the menu into the menu +bar: +

+    menubar->insertItem( "&File", filemenu );
+    
+ +The ampersand in the menu item's text sets Alt+F as a shortcut for +this menu. (You can use "&&" to get a real ampersand in the menu +bar.) +

Items are either enabled or disabled. You toggle their state with +setItemEnabled(). +

There is no need to lay out a menu bar. It automatically sets its +own geometry to the top of the parent widget and changes it +appropriately whenever the parent is resized. +

+

Example of creating a menu bar with menu items (from menu/menu.cpp): + + +

        TQPopupMenu *file = new TQPopupMenu( this );
+
        file->insertItem( p1, "&Open",  this, SLOT(open()), CTRL+Key_O );
+        file->insertItem( p2, "&New", this, SLOT(news()), CTRL+Key_N );
+
        menu = new TQMenuBar( this );
+
        menu->insertItem( "&File", file );
+
+

In most main window style applications you would use the menuBar() +provided in TQMainWindow, adding TQPopupMenus to the menu bar +and adding TQActions to the popup menus. +

Example (from action/application.cpp): + + +

        TQPopupMenu * file = new TQPopupMenu( this );
+        menuBar()->insertItem( "&File", file );
+        fileNewAction->addTo( file );
+
+

Menu items can have text and pixmaps (or iconsets), see the +various insertItem() +overloads, as well as separators, see insertSeparator(). You can +also add custom menu items that are derived from +TQCustomMenuItem. +

Menu items may be removed with removeItem() and enabled or +disabled with setItemEnabled(). +

+

TQMenuBar on TQt/Mac +

+

TQMenuBar on TQt/Mac is a wrapper for using the system-wide menubar. +If you have multiple menubars in one dialog the outermost menubar +(normally inside a widget with widget flag WType_TopLevel) will +be used for the system-wide menubar. +

Note that arbitrary TQt widgets cannot be inserted into a +TQMenuBar on the Mac because TQt uses Mac's native menus which don't +support this functionality. This limitation does not apply to +stand-alone TQPopupMenus. +

TQt/Mac also provides a menubar merging feature to make TQMenuBar +conform more closely to accepted Mac OS X menubar layout. The +merging functionality is based on string matching the title of a +TQPopupMenu entry. These strings are translated (using +TQObject::tr()) in the "TQMenuBar" context. If an entry is moved its +slots will still fire as if it was in the original place. The +table below outlines the strings looked for and where the entry is +placed if matched: +

+
String matches Placement Notes +
about.* +Application Menu | About +If this entry is not found no About item will appear in +the Application Menu +
config, options, setup, settings or preferences +Application Menu | Preferences +If this entry is not found the Settings item will be disabled +
tquit or exit +Application Menu | Quit +If this entry is not found a default Quit item will be +created to call TQApplication::tquit() +
+

menu/menu.cpp is an example of +TQMenuBar and TQPopupMenu use. +

See also TQPopupMenu, TQAccel, TQAction, Aqua Style Guidelines, GUI Design Handbook: Menu Bar, and Main Window and Related Classes. + +


Member Type Documentation

+

TQMenuBar::Separator

+ +

This enum type is used to decide whether TQMenuBar should draw a +separator line at its bottom. +

    +
  • TQMenuBar::Never - In many applications there is already a separator, +and having two looks wrong. +
  • TQMenuBar::InWindowsStyle - In some other applications a separator looks +good in Windows style, but nowhere else. +
+

Member Function Documentation

+

TQMenuBar::TQMenuBar ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a menu bar called name with parent parent. + +

TQMenuBar::~TQMenuBar () +

+Destroys the menu bar. + +

void TQMenuBar::activated ( int id ) [signal] +

+ +

This signal is emitted when a menu item is selected; id is the +id of the selected item. +

Normally you will connect each menu item to a single slot using +TQMenuData::insertItem(), but sometimes you will want to connect +several items to a single slot (most often if the user selects +from an array). This signal is useful in such cases. +

See also highlighted() and TQMenuData::insertItem(). + +

Example: progress/progress.cpp. +

void TQMenuData::clear () +

+Removes all menu items. +

See also removeItem() and removeItemAt(). + +

Examples: mdi/application.cpp and qwerty/qwerty.cpp. +

void TQMenuBar::drawContents ( TQPainter * p ) [virtual protected] +

+Called from TQFrame::paintEvent(). Draws the menu bar contents +using painter p. + +

Reimplemented from TQFrame. +

int TQMenuBar::heightForWidth ( int max_width ) const [virtual] +

+Returns the height that the menu would resize itself to if its +parent (and hence itself) resized to the given max_width. This +can be useful for simple layout tasks in which the height of the +menu bar is needed after items have been inserted. See showimg/showimg.cpp for an example of the usage. + +

Example: showimg/showimg.cpp. +

Reimplemented from TQWidget. +

void TQMenuBar::hide () [virtual] +

+Reimplements TQWidget::hide() in order to deselect any selected +item, and calls setUpLayout() for the main window. + +

Example: grapher/grapher.cpp. +

Reimplemented from TQWidget. +

void TQMenuBar::highlighted ( int id ) [signal] +

+ +

This signal is emitted when a menu item is highlighted; id is +the id of the highlighted item. +

Normally, you will connect each menu item to a single slot using +TQMenuData::insertItem(), but sometimes you will want to connect +several items to a single slot (most often if the user selects +from an array). This signal is useful in such cases. +

See also activated() and TQMenuData::insertItem(). + +

int TQMenuData::insertItem ( const TQString & text, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 ) +

+The family of insertItem() functions inserts menu items into a +popup menu or a menu bar. +

A menu item is usually either a text string or a pixmap, both with +an optional icon or keyboard accelerator. For special cases it is +also possible to insert custom items (see TQCustomMenuItem) or +even widgets into popup menus. +

Some insertItem() members take a popup menu as an additional +argument. Use this to insert submenus into existing menus or +pulldown menus into a menu bar. +

The number of insert functions may look confusing, but they are +actually tquite simple to use. +

This default version inserts a menu item with the text text, +the accelerator key accel, an id and an optional index and +connects it to the slot member in the object receiver. +

Example: +

+        TQMenuBar   *mainMenu = new TQMenuBar;
+        TQPopupMenu *fileMenu = new TQPopupMenu;
+        fileMenu->insertItem( "New",  myView, SLOT(newFile()), CTRL+Key_N );
+        fileMenu->insertItem( "Open", myView, SLOT(open()),    CTRL+Key_O );
+        mainMenu->insertItem( "File", fileMenu );
+    
+ +

Not all insert functions take an object/slot parameter or an +accelerator key. Use connectItem() and setAccel() on those items. +

If you need to translate accelerators, use tr() with the text and +accelerator. (For translations use a string key + sequence.): +

+        fileMenu->insertItem( tr("Open"), myView, SLOT(open()),
+                              tr("Ctrl+O") );
+    
+ +

In the example above, pressing Ctrl+O or selecting "Open" from the +menu activates the myView->open() function. +

Some insert functions take a TQIconSet parameter to specify the +little menu item icon. Note that you can always pass a TQPixmap +object instead. +

The id specifies the identification number associated with the +menu item. Note that only positive values are valid, as a negative +value will make TQt select a unique id for the item. +

The index specifies the position in the menu. The menu item is +appended at the end of the list if index is negative. +

Note that keyboard accelerators in TQt are not application-global, +instead they are bound to a certain top-level window. For example, +accelerators in TQPopupMenu items only work for menus that are +associated with a certain window. This is true for popup menus +that live in a menu bar since their accelerators will then be +installed in the menu bar itself. This also applies to stand-alone +popup menus that have a top-level widget in their parentWidget() +chain. The menu will then install its accelerator object on that +top-level widget. For all other cases use an independent TQAccel +object. +

Warning: Be careful when passing a literal 0 to insertItem() +because some C++ compilers choose the wrong overloaded function. +Cast the 0 to what you mean, e.g. (TQObject*)0. +

Warning: On Mac OS X, items that connect to a slot that are inserted into a +menubar will not function as we use the native menubar that knows nothing +about signals or slots. Instead insert the items into a popup menu and +insert the popup menu into the menubar. This may be fixed in a future TQt +version. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and qnamespace.h. + +

Examples: addressbook/mainwindow.cpp, canvas/canvas.cpp, menu/menu.cpp, qwerty/qwerty.cpp, scrollview/scrollview.cpp, showimg/showimg.cpp, and sound/sound.cpp. +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, text text, accelerator +accel, optional id id, and optional index position. The +menu item is connected it to the receiver's member slot. The +icon will be displayed to the left of the text in the item. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and qnamespace.h. + +

int TQMenuData::insertItem ( const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with pixmap pixmap, accelerator accel, +optional id id, and optional index position. The menu item +is connected it to the receiver's member slot. The icon will +be displayed to the left of the text in the item. +

To look best when being highlighted as a menu item, the pixmap +should provide a mask (see TQPixmap::mask()). +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, pixmap pixmap, +accelerator accel, optional id id, and optional index +position. The icon will be displayed to the left of the pixmap in +the item. The item is connected to the member slot in the receiver object. +

To look best when being highlighted as a menu item, the pixmap +should provide a mask (see TQPixmap::mask()). +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and qnamespace.h. + +

int TQMenuData::insertItem ( const TQString & text, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with text text, optional id id, and +optional index position. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQString & text, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, text text, optional id +id, and optional index position. The icon will be displayed +to the left of the text in the item. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQString & text, TQPopupMenu * popup, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with text text, submenu popup, optional +id id, and optional index position. +

The popup must be deleted by the programmer or by its parent +widget. It is not deleted when this menu item is removed or when +the menu is deleted. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQString & text, TQPopupMenu * popup, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, text text, submenu popup, optional id id, and optional index position. The icon +will be displayed to the left of the text in the item. +

The popup must be deleted by the programmer or by its parent +widget. It is not deleted when this menu item is removed or when +the menu is deleted. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQPixmap & pixmap, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with pixmap pixmap, optional id id, and +optional index position. +

To look best when being highlighted as a menu item, the pixmap +should provide a mask (see TQPixmap::mask()). +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, pixmap pixmap, optional +id id, and optional index position. The icon will be +displayed to the left of the pixmap in the item. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQPixmap & pixmap, TQPopupMenu * popup, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with pixmap pixmap, submenu popup, +optional id id, and optional index position. +

The popup must be deleted by the programmer or by its parent +widget. It is not deleted when this menu item is removed or when +the menu is deleted. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, TQPopupMenu * popup, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, pixmap pixmap submenu popup, optional id id, and optional index position. The icon +will be displayed to the left of the pixmap in the item. +

The popup must be deleted by the programmer or by its parent +widget. It is not deleted when this menu item is removed or when +the menu is deleted. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( TQWidget * widget, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item that consists of the widget widget with +optional id id, and optional index position. +

Ownership of widget is transferred to the popup menu or to the +menu bar. +

Theoretically, any widget can be inserted into a popup menu. In +practice, this only makes sense with certain widgets. +

If a widget is not focus-enabled (see +TQWidget::isFocusEnabled()), the menu treats it as a separator; +this means that the item is not selectable and will never get +focus. In this way you can, for example, simply insert a TQLabel if +you need a popup menu with a title. +

If the widget is focus-enabled it will get focus when the user +traverses the popup menu with the arrow keys. If the widget does +not accept ArrowUp and ArrowDown in its key event handler, +the focus will move back to the menu when the respective arrow key +is hit one more time. This works with a TQLineEdit, for example. If +the widget accepts the arrow key itself, it must also provide the +possibility to put the focus back on the menu again by calling +TQWidget::focusNextPrevChild(). Futhermore, if the embedded widget +closes the menu when the user made a selection, this can be done +safely by calling: +

+        if ( isVisible() &&
+             parentWidget() &&
+             parentWidget()->inherits("TQPopupMenu") )
+            parentWidget()->close();
+    
+ +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, TQCustomMenuItem * custom, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a custom menu item custom with an icon and with +optional id id, and optional index position. +

This only works with popup menus. It is not supported for menu +bars. Ownership of custom is transferred to the popup menu. +

If you want to connect a custom item to a slot, use connectItem(). +

Returns the allocated menu identifier number (id if id >= 0). +

See also connectItem(), removeItem(), and TQCustomMenuItem. + +

int TQMenuData::insertItem ( TQCustomMenuItem * custom, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a custom menu item custom with optional id id, and +optional index position. +

This only works with popup menus. It is not supported for menu +bars. Ownership of custom is transferred to the popup menu. +

If you want to connect a custom item to a slot, use connectItem(). +

Returns the allocated menu identifier number (id if id >= 0). +

See also connectItem(), removeItem(), and TQCustomMenuItem. + +

int TQMenuData::insertSeparator ( int index = -1 ) +

+Inserts a separator at position index, and returns the menu identifier +number allocated to it. The separator becomes the last menu item if +index is negative. +

In a popup menu a separator is rendered as a horizontal line. In a +Motif menu bar a separator is spacing, so the rest of the items +(normally just "Help") are drawn right-justified. In a Windows +menu bar separators are ignored (to comply with the Windows style +guidelines). + +

Examples: addressbook/mainwindow.cpp, menu/menu.cpp, progress/progress.cpp, qwerty/qwerty.cpp, scrollview/scrollview.cpp, showimg/showimg.cpp, and sound/sound.cpp. +

bool TQMenuBar::isDefaultUp () const +

Returns the popup orientation. +See the "defaultUp" property for details. +

bool TQMenuData::isItemEnabled ( int id ) const +

+Returns TRUE if the item with identifier id is enabled; +otherwise returns FALSE +

See also setItemEnabled() and isItemVisible(). + +

bool TQMenuData::isItemVisible ( int id ) const +

+Returns TRUE if the menu item with the id id is visible; +otherwise returns FALSE. +

See also setItemVisible(). + +

void TQMenuBar::menuContentsChanged () [virtual protected] +

+Recomputes the menu bar's display data according to the new +contents. +

You should never need to call this; it is called automatically by +TQMenuData whenever it needs to be called. + +

Reimplemented from TQMenuData. +

void TQMenuBar::menuStateChanged () [virtual protected] +

+Recomputes the menu bar's display data according to the new state. +

You should never need to call this; it is called automatically by +TQMenuData whenever it needs to be called. + +

Reimplemented from TQMenuData. +

void TQMenuData::removeItem ( int id ) +

+ +

Removes the menu item that has the identifier id. +

See also removeItemAt() and clear(). + +

Example: chart/chartform.cpp. +

Separator TQMenuBar::separator () const +

Returns in which cases a menubar sparator is drawn. +See the "separator" property for details. +

void TQMenuBar::setDefaultUp ( bool ) +

Sets the popup orientation. +See the "defaultUp" property for details. +

void TQMenuData::setItemEnabled ( int id, bool enable ) +

+If enable is TRUE, enables the menu item with identifier id; +otherwise disables the menu item with identifier id. +

See also isItemEnabled(). + +

Examples: mdi/application.cpp, menu/menu.cpp, progress/progress.cpp, and showimg/showimg.cpp. +

void TQMenuData::setItemVisible ( int id, bool visible ) +

+If visible is TRUE, shows the menu item with id id; otherwise +hides the menu item with id id. +

See also isItemVisible() and isItemEnabled(). + +

void TQMenuBar::setSeparator ( Separator when ) [virtual] +

Sets in which cases a menubar sparator is drawn to when. +See the "separator" property for details. +

void TQMenuBar::show () [virtual] +

+Reimplements TQWidget::show() in order to set up the correct +keyboard accelerators and to raise itself to the top of the widget +stack. + +

Example: grapher/grapher.cpp. +

Reimplemented from TQWidget. +


Property Documentation

+

bool defaultUp

+

This property holds the popup orientation. +

The default popup orientation. By default, menus pop "down" the +screen. By setting the property to TRUE, the menu will pop "up". +You might call this for menus that are below the document to +which they refer. +

If the menu would not fit on the screen, the other direction is +used automatically. + +

Set this property's value with setDefaultUp() and get this property's value with isDefaultUp(). +

Separator separator

+

This property holds in which cases a menubar sparator is drawn. +

This property is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

Set this property's value with setSeparator() and get this property's value with separator(). + +


+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/qmenudata-h.html b/doc/html/qmenudata-h.html new file mode 100644 index 00000000..dccf9276 --- /dev/null +++ b/doc/html/qmenudata-h.html @@ -0,0 +1,331 @@ + + + + + +qmenudata.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmenudata.h

+ +

This is the verbatim text of the qmenudata.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmenudata.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQMenuData class
+**
+** Created : 941128
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQMENUDATA_H
+#define TQMENUDATA_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#include "qiconset.h" // conversion TQPixmap->TQIconset
+#include "qkeysequence.h"
+#include "qstring.h"
+#include "qsignal.h"
+#include "qfont.h"
+#endif // QT_H
+
+#ifndef QT_NO_MENUDATA
+
+class TQPopupMenu;
+class TQMenuDataData;
+class TQObject;
+
+class TQCustomMenuItem;
+class TQMenuItemData;
+
+class Q_EXPORT TQMenuItem			// internal menu item class
+{
+friend class TQMenuData;
+public:
+    TQMenuItem();
+   ~TQMenuItem();
+
+    int		id()		const	{ return ident; }
+    TQIconSet   *iconSet()	const	{ return iconset_data; }
+    TQString	text()		const	{ return text_data; }
+    TQString	whatsThis()	const	{ return whatsthis_data; }
+    TQPixmap    *pixmap()	const	{ return pixmap_data; }
+    TQPopupMenu *popup()		const	{ return popup_menu; }
+    TQWidget *widget()		const	{ return widget_item; }
+    TQCustomMenuItem *custom()	const;
+#ifndef QT_NO_ACCEL
+    TQKeySequence key()		const	{ return accel_key; }
+#endif
+    TQSignal    *signal()	const	{ return signal_data; }
+    bool	isSeparator()	const	{ return is_separator; }
+    bool	isEnabled()	const	{ return is_enabled; }
+    bool	isChecked()	const	{ return is_checked; }
+    bool	isDirty()	const	{ return is_dirty; }
+    bool	isVisible()	const	{ return is_visible; }
+    bool	isEnabledAndVisible() const { return is_enabled && is_visible; }
+
+    void	setText( const TQString &text ) { text_data = text; }
+    void	setDirty( bool dirty )	       { is_dirty = dirty; }
+    void	setVisible( bool visible )	       { is_visible = visible; }
+    void	setWhatsThis( const TQString &text ) { whatsthis_data = text; }
+
+private:
+    int		ident;				// item identifier
+    TQIconSet   *iconset_data;			// icons
+    TQString	text_data;			// item text
+    TQString	whatsthis_data;			// item Whats This help text
+    TQPixmap    *pixmap_data;			// item pixmap
+    TQPopupMenu *popup_menu;			// item popup menu
+    TQWidget    *widget_item;			// widget menu item
+#ifndef QT_NO_ACCEL
+    TQKeySequence	accel_key;		// accelerator key (state|ascii)
+#endif
+    TQSignal    *signal_data;			// connection
+    uint	is_separator : 1;		// separator flag
+    uint	is_enabled   : 1;		// disabled flag
+    uint	is_checked   : 1;		// checked flag
+    uint	is_dirty     : 1;		// dirty (update) flag
+    uint	is_visible     : 1;		// visibility flag
+    TQMenuItemData* d;
+
+    TQMenuItemData* extra();
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQMenuItem( const TQMenuItem & );
+    TQMenuItem &operator=( const TQMenuItem & );
+#endif
+};
+
+#include "qptrlist.h"
+typedef TQPtrList<TQMenuItem>	 TQMenuItemList;
+typedef TQPtrListIterator<TQMenuItem> TQMenuItemListIt;
+
+
+class Q_EXPORT TQCustomMenuItem : public TQt
+{
+public:
+    TQCustomMenuItem();
+    virtual ~TQCustomMenuItem();
+    virtual bool fullSpan() const;
+    virtual bool isSeparator() const;
+    virtual void setFont( const TQFont& font );
+    virtual void paint( TQPainter* p, const TQColorGroup& cg, bool act,
+			bool enabled, int x, int y, int w, int h ) = 0;
+    virtual TQSize sizeHint() = 0;
+};
+
+
+class Q_EXPORT TQMenuData			// menu data class
+{
+friend class TQMenuBar;
+friend class TQPopupMenu;
+public:
+    TQMenuData();
+    virtual ~TQMenuData();
+
+    uint	count() const;
+
+
+    int		insertItem( const TQString &text,
+			    const TQObject *receiver, const char* member,
+			    const TQKeySequence& accel = 0, int id = -1, int index = -1 );
+    int		insertItem( const TQIconSet& icon,
+			    const TQString &text,
+			    const TQObject *receiver, const char* member,
+			    const TQKeySequence& accel = 0, int id = -1, int index = -1 );
+    int		insertItem( const TQPixmap &pixmap,
+			    const TQObject *receiver, const char* member,
+			    const TQKeySequence& accel = 0, int id = -1, int index = -1 );
+    int		insertItem( const TQIconSet& icon,
+			    const TQPixmap &pixmap,
+			    const TQObject *receiver, const char* member,
+			    const TQKeySequence& accel = 0, int id = -1, int index = -1 );
+
+    int		insertItem( const TQString &text, int id=-1, int index=-1 );
+    int		insertItem( const TQIconSet& icon,
+			    const TQString &text, int id=-1, int index=-1 );
+
+    int		insertItem( const TQString &text, TQPopupMenu *popup,
+			    int id=-1, int index=-1 );
+    int		insertItem( const TQIconSet& icon,
+			    const TQString &text, TQPopupMenu *popup,
+			    int id=-1, int index=-1 );
+
+
+    int		insertItem( const TQPixmap &pixmap, int id=-1, int index=-1 );
+    int		insertItem( const TQIconSet& icon,
+			    const TQPixmap &pixmap, int id=-1, int index=-1 );
+    int		insertItem( const TQPixmap &pixmap, TQPopupMenu *popup,
+			    int id=-1, int index=-1 );
+    int		insertItem( const TQIconSet& icon,
+			    const TQPixmap &pixmap, TQPopupMenu *popup,
+			    int id=-1, int index=-1 );
+
+    int		insertItem( TQWidget* widget, int id=-1, int index=-1 );
+
+    int		insertItem( const TQIconSet& icon, TQCustomMenuItem* custom, int id=-1, int index=-1 );
+    int		insertItem( TQCustomMenuItem* custom, int id=-1, int index=-1 );
+
+
+    int		insertSeparator( int index=-1 );
+
+    void	removeItem( int id );
+    void	removeItemAt( int index );
+    void	clear();
+
+#ifndef QT_NO_ACCEL
+    TQKeySequence accel( int id )	const;
+    void	setAccel( const TQKeySequence& key, int id );
+#endif
+
+    TQIconSet    *iconSet( int id )	const;
+    TQString text( int id )		const;
+    TQPixmap    *pixmap( int id )	const;
+
+    void setWhatsThis( int id, const TQString& );
+    TQString whatsThis( int id ) const;
+
+
+    void	changeItem( int id, const TQString &text );
+    void	changeItem( int id, const TQPixmap &pixmap );
+    void	changeItem( int id, const TQIconSet &icon, const TQString &text );
+    void	changeItem( int id, const TQIconSet &icon, const TQPixmap &pixmap );
+
+    void	changeItem( const TQString &text, int id ) { changeItem( id, text); } // obsolete
+    void	changeItem( const TQPixmap &pixmap, int id ) { changeItem( id, pixmap ); } // obsolete
+    void	changeItem( const TQIconSet &icon, const TQString &text, int id ) {	// obsolete
+	changeItem( id, icon, text );
+    }
+
+    bool	isItemActive( int id ) const;
+
+    bool	isItemEnabled( int id ) const;
+    void	setItemEnabled( int id, bool enable );
+
+    bool	isItemChecked( int id ) const;
+    void	setItemChecked( int id, bool check );
+
+    bool	isItemVisible( int id ) const;
+    void	setItemVisible( int id, bool visible );
+
+    virtual void updateItem( int id );
+
+    int		indexOf( int id )	const;
+    int		idAt( int index )	const;
+    virtual void	setId( int index, int id );
+
+    bool	connectItem( int id,
+			     const TQObject *receiver, const char* member );
+    bool	disconnectItem( int id,
+				const TQObject *receiver, const char* member );
+
+    bool	setItemParameter( int id, int param );
+    int	itemParameter( int id ) const;
+
+    TQMenuItem  *findItem( int id )	const;
+    TQMenuItem  *findItem( int id, TQMenuData ** parent )	const;
+    TQMenuItem * findPopup( TQPopupMenu *, int *index = 0 );
+
+    virtual void activateItemAt( int index );
+
+protected:
+    int		   actItem;
+    TQMenuItemList *mitems;
+    TQMenuData	  *parentMenu;
+    uint	   isPopupMenu	: 1;
+    uint	   isMenuBar	: 1;
+    uint	   badSize	: 1;
+    uint	   mouseBtDn	: 1;
+    uint	avoid_circularity : 1;
+    uint	actItemDown : 1;
+    virtual void   menuContentsChanged();
+    virtual void   menuStateChanged();
+    virtual void   menuInsPopup( TQPopupMenu * );
+    virtual void   menuDelPopup( TQPopupMenu * );
+
+private:
+    int		insertAny( const TQString *, const TQPixmap *, TQPopupMenu *,
+			   const TQIconSet*, int, int, TQWidget* = 0, TQCustomMenuItem* = 0);
+    void	removePopup( TQPopupMenu * );
+    void	changeItemIconSet( int id, const TQIconSet &icon );
+
+    TQMenuDataData *d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQMenuData( const TQMenuData & );
+    TQMenuData &operator=( const TQMenuData & );
+#endif
+};
+
+
+#endif // QT_NO_MENUDATA
+
+#endif // TQMENUDATA_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmenudata-members.html b/doc/html/qmenudata-members.html new file mode 100644 index 00000000..dacb996b --- /dev/null +++ b/doc/html/qmenudata-members.html @@ -0,0 +1,83 @@ + + + + + +TQMenuData Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMenuData

+ +

This is the complete list of member functions for +TQMenuData, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmenudata.html b/doc/html/qmenudata.html new file mode 100644 index 00000000..80dfd8eb --- /dev/null +++ b/doc/html/qmenudata.html @@ -0,0 +1,706 @@ + + + + + +TQMenuData Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMenuData Class Reference

+ +

The TQMenuData class is a base class for TQMenuBar and TQPopupMenu. +More... +

#include <qmenudata.h> +

Inherited by TQMenuBar and TQPopupMenu. +

List of all member functions. +

Public Members

+
    +
  • TQMenuData ()
  • +
  • virtual ~TQMenuData ()
  • +
  • uint count () const
  • +
  • int insertItem ( const TQString & text, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQString & text, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQString & text, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQString & text, TQPopupMenu * popup, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQString & text, TQPopupMenu * popup, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQPixmap & pixmap, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQPixmap & pixmap, TQPopupMenu * popup, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, TQPopupMenu * popup, int id = -1, int index = -1 )
  • +
  • int insertItem ( TQWidget * widget, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, TQCustomMenuItem * custom, int id = -1, int index = -1 )
  • +
  • int insertItem ( TQCustomMenuItem * custom, int id = -1, int index = -1 )
  • +
  • int insertSeparator ( int index = -1 )
  • +
  • void removeItem ( int id )
  • +
  • void removeItemAt ( int index )
  • +
  • void clear ()
  • +
  • TQKeySequence accel ( int id ) const
  • +
  • void setAccel ( const TQKeySequence & key, int id )
  • +
  • TQIconSet * iconSet ( int id ) const
  • +
  • TQString text ( int id ) const
  • +
  • TQPixmap * pixmap ( int id ) const
  • +
  • void setWhatsThis ( int id, const TQString & text )
  • +
  • TQString whatsThis ( int id ) const
  • +
  • void changeItem ( int id, const TQString & text )
  • +
  • void changeItem ( int id, const TQPixmap & pixmap )
  • +
  • void changeItem ( int id, const TQIconSet & icon, const TQString & text )
  • +
  • void changeItem ( int id, const TQIconSet & icon, const TQPixmap & pixmap )
  • +
  • void changeItem ( const TQString & text, int id )  (obsolete)
  • +
  • void changeItem ( const TQPixmap & pixmap, int id )  (obsolete)
  • +
  • void changeItem ( const TQIconSet & icon, const TQString & text, int id )  (obsolete)
  • +
  • bool isItemActive ( int id ) const
  • +
  • bool isItemEnabled ( int id ) const
  • +
  • void setItemEnabled ( int id, bool enable )
  • +
  • bool isItemChecked ( int id ) const
  • +
  • void setItemChecked ( int id, bool check )
  • +
  • bool isItemVisible ( int id ) const
  • +
  • void setItemVisible ( int id, bool visible )
  • +
  • virtual void updateItem ( int id )
  • +
  • int indexOf ( int id ) const
  • +
  • int idAt ( int index ) const
  • +
  • virtual void setId ( int index, int id )
  • +
  • bool connectItem ( int id, const TQObject * receiver, const char * member )
  • +
  • bool disconnectItem ( int id, const TQObject * receiver, const char * member )
  • +
  • bool setItemParameter ( int id, int param )
  • +
  • int itemParameter ( int id ) const
  • +
  • TQMenuItem * findItem ( int id ) const
  • +
  • TQMenuItem * findItem ( int id, TQMenuData ** parent ) const
  • +
  • virtual void activateItemAt ( int index )
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQMenuData class is a base class for TQMenuBar and TQPopupMenu. +

+

TQMenuData has an internal list of menu items. A menu item can have +a text(), an accelerator, a pixmap(), an +iconSet(), a whatsThis() text and a popup menu (unless it is a +separator). Menu items may optionally be checked (except for separators). +

The menu item sends out an activated() signal when it is chosen and a highlighted() signal when it +receives the user input focus. +

+

Menu items are assigned the menu identifier id that is passed +in insertItem() or an automatically generated identifier if id +is < 0 (the default). The generated identifiers (negative +integers) are guaranteed to be unique within the entire +application. The identifier is used to access the menu item in +other functions. +

Menu items can be removed with removeItem() and removeItemAt(), or +changed with changeItem(). All menu items can be removed with +clear(). Accelerators can be changed or set with setAccel(). +Checkable items can be checked or unchecked with setItemChecked(). +Items can be enabled or disabled using setItemEnabled() and +connected and disconnected with connectItem() and disconnectItem() +respectively. By default, newly created menu items are visible. +They can be hidden (and shown again) with setItemVisible(). +

Menu items are stored in a list. Use findItem() to find an item by +its list position or by its menu identifier. (See also indexOf() +and idAt().) +

See also TQAccel, TQPopupMenu, TQAction, and Miscellaneous Classes. + +


Member Function Documentation

+

TQMenuData::TQMenuData () +

+Constructs an empty menu data list. + +

TQMenuData::~TQMenuData () [virtual] +

+Removes all menu items and disconnects any signals that have been +connected. + +

TQKeySequence TQMenuData::accel ( int id ) const +

+Returns the accelerator key that has been defined for the menu +item id, or 0 if it has no accelerator key or if there is no +such menu item. +

See also setAccel(), TQAccel, and qnamespace.h. + +

void TQMenuData::activateItemAt ( int index ) [virtual] +

+Activates the menu item at position index. +

If the index is invalid (for example, -1), the object itself is +deactivated. + +

void TQMenuData::changeItem ( int id, const TQString & text ) +

+Changes the text of the menu item id to text. If the item +has an icon, the icon remains unchanged. +

See also text(). + +

void TQMenuData::changeItem ( int id, const TQPixmap & pixmap ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Changes the pixmap of the menu item id to the pixmap pixmap. +If the item has an icon, the icon is unchanged. +

See also pixmap(). + +

void TQMenuData::changeItem ( int id, const TQIconSet & icon, const TQString & text ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Changes the iconset and text of the menu item id to the icon +and text respectively. +

See also pixmap(). + +

void TQMenuData::changeItem ( int id, const TQIconSet & icon, const TQPixmap & pixmap ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Changes the iconset and pixmap of the menu item id to icon +and pixmap respectively. +

See also pixmap(). + +

void TQMenuData::changeItem ( const TQString & text, int id ) +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Changes the text of the menu item id. If the item has an icon, +the icon remains unchanged. +

See also text(). + +

void TQMenuData::changeItem ( const TQPixmap & pixmap, int id ) +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Changes the pixmap of the menu item id. If the item has an icon, +the icon remains unchanged. +

See also pixmap(). + +

void TQMenuData::changeItem ( const TQIconSet & icon, const TQString & text, int id ) +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Changes the icon and text of the menu item id. +

See also pixmap(). + +

void TQMenuData::clear () +

+Removes all menu items. +

See also removeItem() and removeItemAt(). + +

Examples: mdi/application.cpp and qwerty/qwerty.cpp. +

bool TQMenuData::connectItem ( int id, const TQObject * receiver, const char * member ) +

+Connects the menu item with identifier id to receiver's member slot or signal. +

The receiver's slot (or signal) is activated when the menu item is +activated. +

See also disconnectItem() and setItemParameter(). + +

Example: menu/menu.cpp. +

uint TQMenuData::count () const +

+Returns the number of items in the menu. + +

bool TQMenuData::disconnectItem ( int id, const TQObject * receiver, const char * member ) +

+Disconnects the receiver's member from the menu item with +identifier id. +

All connections are removed when the menu data object is +destroyed. +

See also connectItem() and setItemParameter(). + +

TQMenuItem * TQMenuData::findItem ( int id ) const +

+Returns the menu item with identifier id, or 0 if there is no +item with this identifier. +

Note that TQMenuItem is an internal class, and that you should not +need to call this function. Use the higher level functions like +text(), pixmap() and changeItem() to get and modify menu item +attributes instead. +

See also indexOf(). + +

Example: chart/chartform.cpp. +

TQMenuItem * TQMenuData::findItem ( int id, TQMenuData ** parent ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the menu item with identifier id, or 0 if there is no +item with this identifier. Changes *parent to point to the +parent of the return value. +

Note that TQMenuItem is an internal class, and that you should not +need to call this function. Use the higher level functions like +text(), pixmap() and changeItem() to get and modify menu item +attributes instead. +

See also indexOf(). + +

TQIconSet * TQMenuData::iconSet ( int id ) const +

+Returns the icon set that has been set for menu item id, or 0 +if no icon set has been set. +

See also changeItem(), text(), and pixmap(). + +

int TQMenuData::idAt ( int index ) const +

+Returns the identifier of the menu item at position index in +the internal list, or -1 if index is out of range. +

See also setId() and indexOf(). + +

int TQMenuData::indexOf ( int id ) const +

+Returns the index of the menu item with identifier id, or -1 if +there is no item with this identifier. +

See also idAt() and findItem(). + +

Example: scrollview/scrollview.cpp. +

int TQMenuData::insertItem ( const TQString & text, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 ) +

+The family of insertItem() functions inserts menu items into a +popup menu or a menu bar. +

A menu item is usually either a text string or a pixmap, both with +an optional icon or keyboard accelerator. For special cases it is +also possible to insert custom items (see TQCustomMenuItem) or +even widgets into popup menus. +

Some insertItem() members take a popup menu as an additional +argument. Use this to insert submenus into existing menus or +pulldown menus into a menu bar. +

The number of insert functions may look confusing, but they are +actually tquite simple to use. +

This default version inserts a menu item with the text text, +the accelerator key accel, an id and an optional index and +connects it to the slot member in the object receiver. +

Example: +

+        TQMenuBar   *mainMenu = new TQMenuBar;
+        TQPopupMenu *fileMenu = new TQPopupMenu;
+        fileMenu->insertItem( "New",  myView, SLOT(newFile()), CTRL+Key_N );
+        fileMenu->insertItem( "Open", myView, SLOT(open()),    CTRL+Key_O );
+        mainMenu->insertItem( "File", fileMenu );
+    
+ +

Not all insert functions take an object/slot parameter or an +accelerator key. Use connectItem() and setAccel() on those items. +

If you need to translate accelerators, use tr() with the text and +accelerator. (For translations use a string key + sequence.): +

+        fileMenu->insertItem( tr("Open"), myView, SLOT(open()),
+                              tr("Ctrl+O") );
+    
+ +

In the example above, pressing Ctrl+O or selecting "Open" from the +menu activates the myView->open() function. +

Some insert functions take a TQIconSet parameter to specify the +little menu item icon. Note that you can always pass a TQPixmap +object instead. +

The id specifies the identification number associated with the +menu item. Note that only positive values are valid, as a negative +value will make TQt select a unique id for the item. +

The index specifies the position in the menu. The menu item is +appended at the end of the list if index is negative. +

Note that keyboard accelerators in TQt are not application-global, +instead they are bound to a certain top-level window. For example, +accelerators in TQPopupMenu items only work for menus that are +associated with a certain window. This is true for popup menus +that live in a menu bar since their accelerators will then be +installed in the menu bar itself. This also applies to stand-alone +popup menus that have a top-level widget in their parentWidget() +chain. The menu will then install its accelerator object on that +top-level widget. For all other cases use an independent TQAccel +object. +

Warning: Be careful when passing a literal 0 to insertItem() +because some C++ compilers choose the wrong overloaded function. +Cast the 0 to what you mean, e.g. (TQObject*)0. +

Warning: On Mac OS X, items that connect to a slot that are inserted into a +menubar will not function as we use the native menubar that knows nothing +about signals or slots. Instead insert the items into a popup menu and +insert the popup menu into the menubar. This may be fixed in a future TQt +version. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and qnamespace.h. + +

Examples: addressbook/mainwindow.cpp, canvas/canvas.cpp, menu/menu.cpp, qwerty/qwerty.cpp, scrollview/scrollview.cpp, showimg/showimg.cpp, and sound/sound.cpp. +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, text text, accelerator +accel, optional id id, and optional index position. The +menu item is connected it to the receiver's member slot. The +icon will be displayed to the left of the text in the item. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and qnamespace.h. + +

int TQMenuData::insertItem ( const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with pixmap pixmap, accelerator accel, +optional id id, and optional index position. The menu item +is connected it to the receiver's member slot. The icon will +be displayed to the left of the text in the item. +

To look best when being highlighted as a menu item, the pixmap +should provide a mask (see TQPixmap::mask()). +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, pixmap pixmap, +accelerator accel, optional id id, and optional index +position. The icon will be displayed to the left of the pixmap in +the item. The item is connected to the member slot in the receiver object. +

To look best when being highlighted as a menu item, the pixmap +should provide a mask (see TQPixmap::mask()). +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and qnamespace.h. + +

int TQMenuData::insertItem ( const TQString & text, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with text text, optional id id, and +optional index position. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQString & text, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, text text, optional id +id, and optional index position. The icon will be displayed +to the left of the text in the item. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQString & text, TQPopupMenu * popup, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with text text, submenu popup, optional +id id, and optional index position. +

The popup must be deleted by the programmer or by its parent +widget. It is not deleted when this menu item is removed or when +the menu is deleted. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQString & text, TQPopupMenu * popup, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, text text, submenu popup, optional id id, and optional index position. The icon +will be displayed to the left of the text in the item. +

The popup must be deleted by the programmer or by its parent +widget. It is not deleted when this menu item is removed or when +the menu is deleted. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQPixmap & pixmap, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with pixmap pixmap, optional id id, and +optional index position. +

To look best when being highlighted as a menu item, the pixmap +should provide a mask (see TQPixmap::mask()). +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, pixmap pixmap, optional +id id, and optional index position. The icon will be +displayed to the left of the pixmap in the item. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQPixmap & pixmap, TQPopupMenu * popup, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with pixmap pixmap, submenu popup, +optional id id, and optional index position. +

The popup must be deleted by the programmer or by its parent +widget. It is not deleted when this menu item is removed or when +the menu is deleted. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, TQPopupMenu * popup, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, pixmap pixmap submenu popup, optional id id, and optional index position. The icon +will be displayed to the left of the pixmap in the item. +

The popup must be deleted by the programmer or by its parent +widget. It is not deleted when this menu item is removed or when +the menu is deleted. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( TQWidget * widget, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item that consists of the widget widget with +optional id id, and optional index position. +

Ownership of widget is transferred to the popup menu or to the +menu bar. +

Theoretically, any widget can be inserted into a popup menu. In +practice, this only makes sense with certain widgets. +

If a widget is not focus-enabled (see +TQWidget::isFocusEnabled()), the menu treats it as a separator; +this means that the item is not selectable and will never get +focus. In this way you can, for example, simply insert a TQLabel if +you need a popup menu with a title. +

If the widget is focus-enabled it will get focus when the user +traverses the popup menu with the arrow keys. If the widget does +not accept ArrowUp and ArrowDown in its key event handler, +the focus will move back to the menu when the respective arrow key +is hit one more time. This works with a TQLineEdit, for example. If +the widget accepts the arrow key itself, it must also provide the +possibility to put the focus back on the menu again by calling +TQWidget::focusNextPrevChild(). Futhermore, if the embedded widget +closes the menu when the user made a selection, this can be done +safely by calling: +

+        if ( isVisible() &&
+             parentWidget() &&
+             parentWidget()->inherits("TQPopupMenu") )
+            parentWidget()->close();
+    
+ +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, TQCustomMenuItem * custom, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a custom menu item custom with an icon and with +optional id id, and optional index position. +

This only works with popup menus. It is not supported for menu +bars. Ownership of custom is transferred to the popup menu. +

If you want to connect a custom item to a slot, use connectItem(). +

Returns the allocated menu identifier number (id if id >= 0). +

See also connectItem(), removeItem(), and TQCustomMenuItem. + +

int TQMenuData::insertItem ( TQCustomMenuItem * custom, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a custom menu item custom with optional id id, and +optional index position. +

This only works with popup menus. It is not supported for menu +bars. Ownership of custom is transferred to the popup menu. +

If you want to connect a custom item to a slot, use connectItem(). +

Returns the allocated menu identifier number (id if id >= 0). +

See also connectItem(), removeItem(), and TQCustomMenuItem. + +

int TQMenuData::insertSeparator ( int index = -1 ) +

+Inserts a separator at position index, and returns the menu identifier +number allocated to it. The separator becomes the last menu item if +index is negative. +

In a popup menu a separator is rendered as a horizontal line. In a +Motif menu bar a separator is spacing, so the rest of the items +(normally just "Help") are drawn right-justified. In a Windows +menu bar separators are ignored (to comply with the Windows style +guidelines). + +

Examples: addressbook/mainwindow.cpp, menu/menu.cpp, progress/progress.cpp, qwerty/qwerty.cpp, scrollview/scrollview.cpp, showimg/showimg.cpp, and sound/sound.cpp. +

bool TQMenuData::isItemActive ( int id ) const +

+Returns TRUE if the menu item with the id id is currently +active; otherwise returns FALSE. + +

bool TQMenuData::isItemChecked ( int id ) const +

+Returns TRUE if the menu item with the id id has been checked; +otherwise returns FALSE. +

See also setItemChecked(). + +

Examples: canvas/canvas.cpp, progress/progress.cpp, and showimg/showimg.cpp. +

bool TQMenuData::isItemEnabled ( int id ) const +

+Returns TRUE if the item with identifier id is enabled; +otherwise returns FALSE +

See also setItemEnabled() and isItemVisible(). + +

bool TQMenuData::isItemVisible ( int id ) const +

+Returns TRUE if the menu item with the id id is visible; +otherwise returns FALSE. +

See also setItemVisible(). + +

int TQMenuData::itemParameter ( int id ) const +

+Returns the parameter of the activation signal of item id. +

If no parameter has been specified for this item with +setItemParameter(), the value defaults to id. +

See also connectItem(), disconnectItem(), and setItemParameter(). + +

void TQMenuData::menuContentsChanged () [virtual protected] +

+Virtual function; notifies subclasses that one or more items have +been inserted or removed. + +

Reimplemented in TQMenuBar. +

void TQMenuData::menuDelPopup ( TQPopupMenu * ) [virtual protected] +

+Virtual function; notifies subclasses that a popup menu item has +been removed. + +

void TQMenuData::menuInsPopup ( TQPopupMenu * ) [virtual protected] +

+Virtual function; notifies subclasses that a popup menu item has +been inserted. + +

void TQMenuData::menuStateChanged () [virtual protected] +

+Virtual function; notifies subclasses that one or more items have +changed state (enabled/disabled or checked/unchecked). + +

Reimplemented in TQMenuBar. +

TQPixmap * TQMenuData::pixmap ( int id ) const +

+Returns the pixmap that has been set for menu item id, or 0 if +no pixmap has been set. +

See also changeItem(), text(), and iconSet(). + +

void TQMenuData::removeItem ( int id ) +

+ +

Removes the menu item that has the identifier id. +

See also removeItemAt() and clear(). + +

Example: chart/chartform.cpp. +

void TQMenuData::removeItemAt ( int index ) +

+Removes the menu item at position index. +

See also removeItem() and clear(). + +

void TQMenuData::setAccel ( const TQKeySequence & key, int id ) +

+Sets the accelerator key for the menu item id to key. +

An accelerator key consists of a key code and a combination of the +modifiers SHIFT, CTRL, ALT or UNICODE_ACCEL (OR'ed or +added). The header file qnamespace.h contains a list of key +codes. +

Defining an accelerator key produces a text that is added to the +menu item; for instance, CTRL + Key_O produces "Ctrl+O". The +text is formatted differently for different platforms. +

Note that keyboard accelerators in TQt are not application-global, +instead they are bound to a certain top-level window. For example, +accelerators in TQPopupMenu items only work for menus that are +associated with a certain window. This is true for popup menus +that live in a menu bar since their accelerators will then be +installed in the menu bar itself. This also applies to stand-alone +popup menus that have a top-level widget in their parentWidget() +chain. The menu will then install its accelerator object on that +top-level widget. For all other cases use an independent TQAccel +object. +

Example: +

+        TQMenuBar *mainMenu = new TQMenuBar;
+        TQPopupMenu *fileMenu = new TQPopupMenu;       // file sub menu
+        fileMenu->insertItem( "Open Document", 67 ); // add "Open" item
+        fileMenu->setAccel( CTRL + Key_O, 67 );      // Ctrl+O to open
+        fileMenu->insertItem( "Quit", 69 );          // add "Quit" item
+        fileMenu->setAccel( CTRL + ALT + Key_Delete, 69 ); // add Alt+Del to tquit
+        mainMenu->insertItem( "File", fileMenu );    // add the file menu
+    
+ +

If you need to translate accelerators, use tr() with a string: +

+        fileMenu->setAccel( tr("Ctrl+O"), 67 );
+    
+ +

You can also specify the accelerator in the insertItem() function. +You may prefer to use TQAction to associate accelerators with menu +items. +

See also accel(), insertItem(), TQAccel, and TQAction. + +

Example: menu/menu.cpp. +

void TQMenuData::setId ( int index, int id ) [virtual] +

+Sets the menu identifier of the item at index to id. +

If index is out of range, the operation is ignored. +

See also idAt(). + +

void TQMenuData::setItemChecked ( int id, bool check ) +

+If check is TRUE, checks the menu item with id id; otherwise +unchecks the menu item with id id. Calls +TQPopupMenu::setCheckable( TRUE ) if necessary. +

See also isItemChecked(). + +

Examples: canvas/canvas.cpp, grapher/grapher.cpp, mdi/application.cpp, menu/menu.cpp, progress/progress.cpp, scrollview/scrollview.cpp, and showimg/showimg.cpp. +

void TQMenuData::setItemEnabled ( int id, bool enable ) +

+If enable is TRUE, enables the menu item with identifier id; +otherwise disables the menu item with identifier id. +

See also isItemEnabled(). + +

Examples: mdi/application.cpp, menu/menu.cpp, progress/progress.cpp, and showimg/showimg.cpp. +

bool TQMenuData::setItemParameter ( int id, int param ) +

+Sets the parameter of the activation signal of item id to param. +

If any receiver takes an integer parameter, this value is passed. +

See also connectItem(), disconnectItem(), and itemParameter(). + +

Example: mdi/application.cpp. +

void TQMenuData::setItemVisible ( int id, bool visible ) +

+If visible is TRUE, shows the menu item with id id; otherwise +hides the menu item with id id. +

See also isItemVisible() and isItemEnabled(). + +

void TQMenuData::setWhatsThis ( int id, const TQString & text ) +

+Sets text as What's This help for the menu item with identifier +id. +

See also whatsThis(). + +

Examples: application/application.cpp, helpsystem/mainwindow.cpp, and mdi/application.cpp. +

TQString TQMenuData::text ( int id ) const +

+Returns the text that has been set for menu item id, or +TQString::null if no text has been set. +

See also changeItem(), pixmap(), and iconSet(). + +

Examples: qdir/qdir.cpp and showimg/showimg.cpp. +

void TQMenuData::updateItem ( int id ) [virtual] +

+Virtual function; notifies subclasses about an item with id +that has been changed. + +

Reimplemented in TQPopupMenu. +

TQString TQMenuData::whatsThis ( int id ) const +

+Returns the What's This help text for the item with identifier id or TQString::null if no text has yet been defined. +

See also setWhatsThis(). + + +


+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/qmessagebox-crit.png b/doc/html/qmessagebox-crit.png new file mode 100644 index 00000000..7a5b212b Binary files /dev/null and b/doc/html/qmessagebox-crit.png differ diff --git a/doc/html/qmessagebox-h.html b/doc/html/qmessagebox-h.html new file mode 100644 index 00000000..90471b3a --- /dev/null +++ b/doc/html/qmessagebox-h.html @@ -0,0 +1,268 @@ + + + + + +qmessagebox.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmessagebox.h

+ +

This is the verbatim text of the qmessagebox.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmessagebox.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQMessageBox class
+**
+** Created : 950503
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the dialogs 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 retquirements 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 TQMESSAGEBOX_H
+#define TQMESSAGEBOX_H
+
+#ifndef QT_H
+#include "qdialog.h"
+#endif // QT_H
+
+#ifndef QT_NO_MESSAGEBOX
+
+class  TQLabel;
+class  TQPushButton;
+struct TQMessageBoxData;
+
+class Q_EXPORT TQMessageBox : public TQDialog
+{
+    Q_OBJECT
+    Q_ENUMS( Icon )
+    Q_PROPERTY( TQString text READ text WRITE setText )
+    Q_PROPERTY( Icon icon READ icon WRITE setIcon )
+    Q_PROPERTY( TQPixmap iconPixmap READ iconPixmap WRITE setIconPixmap )
+    Q_PROPERTY( TextFormat textFormat READ textFormat WRITE setTextFormat )
+
+public:
+    enum Icon { NoIcon = 0, Information = 1, Warning = 2, Critical = 3,
+		Question = 4 };
+
+    TQMessageBox( TQWidget* parent=0, const char* name=0 );
+    TQMessageBox( const TQString& caption, const TQString &text, Icon icon,
+		 int button0, int button1, int button2,
+		 TQWidget* parent=0, const char* name=0, bool modal=TRUE,
+		 WFlags f=WStyle_DialogBorder  );
+    ~TQMessageBox();
+
+    enum { NoButton = 0, Ok = 1, Cancel = 2, Yes = 3, No = 4, Abort = 5,
+	   Retry = 6, Ignore = 7, YesAll = 8, NoAll = 9, ButtonMask = 0xff,
+	   Default = 0x100, Escape = 0x200, FlagMask = 0x300 };
+
+    static int information( TQWidget *parent, const TQString &caption,
+			    const TQString& text,
+			    int button0, int button1=0, int button2=0 );
+    static int information( TQWidget *parent, const TQString &caption,
+			    const TQString& text,
+			    const TQString& button0Text = TQString::null,
+			    const TQString& button1Text = TQString::null,
+			    const TQString& button2Text = TQString::null,
+			    int defaultButtonNumber = 0,
+			    int escapeButtonNumber = -1 );
+
+    static int question( TQWidget *parent, const TQString &caption,
+			 const TQString& text,
+			 int button0, int button1=0, int button2=0 );
+    static int question( TQWidget *parent, const TQString &caption,
+			 const TQString& text,
+			 const TQString& button0Text = TQString::null,
+			 const TQString& button1Text = TQString::null,
+			 const TQString& button2Text = TQString::null,
+			 int defaultButtonNumber = 0,
+			 int escapeButtonNumber = -1 );
+
+    static int warning( TQWidget *parent, const TQString &caption,
+			const TQString& text,
+			int button0, int button1, int button2=0 );
+    static int warning( TQWidget *parent, const TQString &caption,
+			const TQString& text,
+			const TQString& button0Text = TQString::null,
+			const TQString& button1Text = TQString::null,
+			const TQString& button2Text = TQString::null,
+			int defaultButtonNumber = 0,
+			int escapeButtonNumber = -1 );
+
+    static int critical( TQWidget *parent, const TQString &caption,
+			 const TQString& text,
+			 int button0, int button1, int button2=0 );
+    static int critical( TQWidget *parent, const TQString &caption,
+			 const TQString& text,
+			 const TQString& button0Text = TQString::null,
+			 const TQString& button1Text = TQString::null,
+			 const TQString& button2Text = TQString::null,
+			 int defaultButtonNumber = 0,
+			 int escapeButtonNumber = -1 );
+
+    static void about( TQWidget *parent, const TQString &caption,
+		       const TQString& text );
+
+    static void aboutTQt( TQWidget *parent,
+			 const TQString& caption=TQString::null );
+
+/* OBSOLETE */
+    static int message( const TQString &caption,
+			const TQString& text,
+			const TQString& buttonText=TQString::null,
+			TQWidget *parent=0, const char * =0 ) {
+	return TQMessageBox::information( parent, caption, text,
+				     buttonText.isEmpty()
+				     ? tr("OK") : buttonText ) == 0;
+    }
+
+/* OBSOLETE */
+    static bool query( const TQString &caption,
+		       const TQString& text,
+		       const TQString& yesButtonText=TQString::null,
+		       const TQString& noButtonText=TQString::null,
+		       TQWidget *parent=0, const char * = 0 ) {
+	return TQMessageBox::information( parent, caption, text,
+				     yesButtonText.isEmpty()
+				     ? tr("OK") : yesButtonText,
+				     noButtonText ) == 0;
+    }
+
+    TQString	text() const;
+    void	setText( const TQString &);
+
+    Icon	icon() const;
+
+    void	setIcon( Icon );
+    void	setIcon( const TQPixmap & );
+
+    const TQPixmap *iconPixmap() const;
+    void	setIconPixmap( const TQPixmap & );
+
+    TQString	buttonText( int button ) const;
+    void	setButtonText( int button, const TQString &);
+
+    void	adjustSize();
+
+/* OBSOLETE */
+    static TQPixmap standardIcon( Icon icon, GUIStyle );
+
+    static TQPixmap standardIcon( Icon icon );
+
+    TextFormat textFormat() const;
+    void	 setTextFormat( TextFormat );
+
+protected:
+    void	resizeEvent( TQResizeEvent * );
+    void	showEvent( TQShowEvent * );
+    void	closeEvent( TQCloseEvent * );
+    void	keyPressEvent( TQKeyEvent * );
+    void	styleChanged( TQStyle& );
+
+private slots:
+    void	buttonClicked();
+
+private:
+    void	init( int, int, int );
+    int		indexOf( int ) const;
+    void	resizeButtons();
+    TQLabel     *label;
+    TQMessageBoxData *mbd;
+    void       *reserved1;
+    void       *reserved2;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQMessageBox( const TQMessageBox & );
+    TQMessageBox &operator=( const TQMessageBox & );
+#endif
+};
+
+/*
+*  Macro to be used at the beginning of main(), e.g.
+*
+*   #include <qapplication.h>
+*   #include <qmessagebox.h>
+*   int main( int argc, char**argv )
+*   {
+*     QT_RETQUIRE_VERSION( argc, argv, "3.0.5" )
+*     ...
+*   }
+*/
+#define QT_RETQUIRE_VERSION( argc, argv, str ) { TQString s=TQString::fromLatin1(str);\
+TQString sq=TQString::fromLatin1(qVersion()); if ( (sq.section('.',0,0).toInt()<<16)+\
+(sq.section('.',1,1).toInt()<<8)+sq.section('.',2,2).toInt()<(s.section('.',0,0).toInt()<<16)+\
+(s.section('.',1,1).toInt()<<8)+s.section('.',2,2).toInt() ){if ( !qApp){ int c=0; new \
+TQApplication(argc,argv);} TQString s = TQApplication::tr("Executable '%1' retquires TQt "\
+ "%2, found TQt %3.").arg(TQString::fromLatin1(qAppName())).arg(TQString::fromLatin1(\
+str)).arg(TQString::fromLatin1(qVersion()) ); TQMessageBox::critical( 0, TQApplication::tr(\
+"Incompatible TQt Library Error" ), s, TQMessageBox::Abort,0 ); qFatal(s.ascii()); }}
+
+
+#endif // QT_NO_MESSAGEBOX
+
+#endif // TQMESSAGEBOX_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmessagebox-info.png b/doc/html/qmessagebox-info.png new file mode 100644 index 00000000..d4d6604b Binary files /dev/null and b/doc/html/qmessagebox-info.png differ diff --git a/doc/html/qmessagebox-members.html b/doc/html/qmessagebox-members.html new file mode 100644 index 00000000..6f591f7a --- /dev/null +++ b/doc/html/qmessagebox-members.html @@ -0,0 +1,369 @@ + + + + + +TQMessageBox Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMessageBox

+ +

This is the complete list of member functions for +TQMessageBox, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmessagebox-quest.png b/doc/html/qmessagebox-quest.png new file mode 100644 index 00000000..32fdf634 Binary files /dev/null and b/doc/html/qmessagebox-quest.png differ diff --git a/doc/html/qmessagebox-warn.png b/doc/html/qmessagebox-warn.png new file mode 100644 index 00000000..828e1b4d Binary files /dev/null and b/doc/html/qmessagebox-warn.png differ diff --git a/doc/html/qmessagebox.html b/doc/html/qmessagebox.html new file mode 100644 index 00000000..3223b16e --- /dev/null +++ b/doc/html/qmessagebox.html @@ -0,0 +1,751 @@ + + + + + +TQMessageBox Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMessageBox Class Reference

+ +

The TQMessageBox class provides a modal dialog with a short message, an icon, and some buttons. +More... +

#include <qmessagebox.h> +

Inherits TQDialog. +

List of all member functions. +

Public Members

+
    +
  • enum Icon { NoIcon = 0, Information = 1, Warning = 2, Critical = 3, Question = 4 }
  • +
  • TQMessageBox ( TQWidget * parent = 0, const char * name = 0 )
  • +
  • TQMessageBox ( const TQString & caption, const TQString & text, Icon icon, int button0, int button1, int button2, TQWidget * parent = 0, const char * name = 0, bool modal = TRUE, WFlags f = WStyle_DialogBorder )
  • +
  • ~TQMessageBox ()
  • +
  • TQString text () const
  • +
  • void setText ( const TQString & )
  • +
  • Icon icon () const
  • +
  • void setIcon ( Icon )
  • +
  • const TQPixmap * iconPixmap () const
  • +
  • void setIconPixmap ( const TQPixmap & )
  • +
  • TQString buttonText ( int button ) const
  • +
  • void setButtonText ( int button, const TQString & text )
  • +
  • virtual void adjustSize ()
  • +
  • TextFormat textFormat () const
  • +
  • void setTextFormat ( TextFormat )
  • +
+

Static Public Members

+
    +
  • int information ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1 = 0, int button2 = 0 )
  • +
  • int information ( TQWidget * parent, const TQString & caption, const TQString & text, const TQString & button0Text = TQString::null, const TQString & button1Text = TQString::null, const TQString & button2Text = TQString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 )
  • +
  • int question ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1 = 0, int button2 = 0 )
  • +
  • int question ( TQWidget * parent, const TQString & caption, const TQString & text, const TQString & button0Text = TQString::null, const TQString & button1Text = TQString::null, const TQString & button2Text = TQString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 )
  • +
  • int warning ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1, int button2 = 0 )
  • +
  • int warning ( TQWidget * parent, const TQString & caption, const TQString & text, const TQString & button0Text = TQString::null, const TQString & button1Text = TQString::null, const TQString & button2Text = TQString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 )
  • +
  • int critical ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1, int button2 = 0 )
  • +
  • int critical ( TQWidget * parent, const TQString & caption, const TQString & text, const TQString & button0Text = TQString::null, const TQString & button1Text = TQString::null, const TQString & button2Text = TQString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 )
  • +
  • void about ( TQWidget * parent, const TQString & caption, const TQString & text )
  • +
  • void aboutTQt ( TQWidget * parent, const TQString & caption = TQString::null )
  • +
  • int message ( const TQString & caption, const TQString & text, const TQString & buttonText = TQString::null, TQWidget * parent = 0, const char * = 0 )  (obsolete)
  • +
  • bool query ( const TQString & caption, const TQString & text, const TQString & yesButtonText = TQString::null, const TQString & noButtonText = TQString::null, TQWidget * parent = 0, const char * = 0 )  (obsolete)
  • +
  • TQPixmap standardIcon ( Icon icon, GUIStyle style )  (obsolete)
  • +
  • TQPixmap standardIcon ( Icon icon )
  • +
+

Properties

+
    +
  • Icon icon - the message box's icon
  • +
  • TQPixmap iconPixmap - the current icon
  • +
  • TQString text - the message box text to be displayed
  • +
  • TextFormat textFormat - the format of the text displayed by the message box
  • +
+

Detailed Description

+ + +The TQMessageBox class provides a modal dialog with a short message, an icon, and some buttons. + + +

Message boxes are used to provide informative messages and to ask +simple questions. +

TQMessageBox provides a range of different messages, arranged +roughly along two axes: severity and complexity. +

Severity is +

+ + + + +
Question +For message boxes that ask a question as part of normal +operation. Some style guides recommend using Information for this +purpose. +
Information +For message boxes that are part of normal operation. +
Warning +For message boxes that tell the user about unusual errors. +
Critical +For message boxes that tell the user about critical errors. +
+

The message box has a different icon for each of the severity levels. +

Complexity is one button (OK) for simple messages, or two or even +three buttons for questions. +

There are static functions for the most common cases. +

Examples: +

If a program is unable to find a supporting file, but can do perfectly +well without it: +

+    TQMessageBox::information( this, "Application name",
+    "Unable to find the user preferences file.\n"
+    "The factory default will be used instead." );
+    
+ +

question() is useful for simple yes/no questions: +

+    if ( TQFile::exists( filename ) &&
+        TQMessageBox::question(
+            this,
+            tr("Overwrite File? -- Application Name"),
+            tr("A file called %1 already exists."
+                "Do you want to overwrite it?")
+                .arg( filename ),
+            tr("&Yes"), tr("&No"),
+            TQString::null, 0, 1 ) )
+        return false;
+    
+ +

warning() can be used to tell the user about unusual errors, or +errors which can't be easily fixed: +

+    switch( TQMessageBox::warning( this, "Application name",
+        "Could not connect to the <mumble> server.\n"
+        "This program can't function correctly "
+        "without the server.\n\n",
+        "Retry",
+        "Quit", 0, 0, 1 ) ) {
+    case 0: // The user clicked the Retry again button or pressed Enter
+        // try again
+        break;
+    case 1: // The user clicked the Quit or pressed Escape
+        // exit
+        break;
+    }
+    
+ +

The text part of all message box messages can be either rich text +or plain text. If you specify a rich text formatted string, it +will be rendered using the default stylesheet. See +TQStyleSheet::defaultSheet() for details. With certain strings that +contain XML meta characters, the auto-rich text detection may +fail, interpreting plain text incorrectly as rich text. In these +rare cases, use TQStyleSheet::convertFromPlainText() to convert +your plain text string to a visually equivalent rich text string +or set the text format explicitly with setTextFormat(). +

Note that the Microsoft Windows User Interface Guidelines +recommend using the application name as the window's caption. +

Below are more examples of how to use the static member functions. +After these examples you will find an overview of the non-static +member functions. +

Exiting a program is part of its normal operation. If there is +unsaved data the user probably should be asked if they want to +save the data. For example: +

+    switch( TQMessageBox::information( this, "Application name here",
+        "The document contains unsaved changes\n"
+        "Do you want to save the changes before exiting?",
+        "&Save", "&Discard", "Cancel",
+        0,      // Enter == button 0
+        2 ) ) { // Escape == button 2
+    case 0: // Save clicked or Alt+S pressed or Enter pressed.
+        // save
+        break;
+    case 1: // Discard clicked or Alt+D pressed
+        // don't save but exit
+        break;
+    case 2: // Cancel clicked or Escape pressed
+        // don't exit
+        break;
+    }
+    
+ +

The Escape button cancels the entire exit operation, and pressing +Enter causes the changes to be saved before the exit occurs. +

Disk full errors are unusual and they certainly can be hard to +correct. This example uses predefined buttons instead of +hard-coded button texts: +

+    switch( TQMessageBox::warning( this, "Application name here",
+        "Could not save the user preferences,\n"
+        "because the disk is full. You can delete\n"
+        "some files and press Retry, or you can\n"
+        "abort the Save Preferences operation.",
+        TQMessageBox::Retry | TQMessageBox::Default,
+        TQMessageBox::Abort | TQMessageBox::Escape )) {
+    case TQMessageBox::Retry: // Retry clicked or Enter pressed
+        // try again
+        break;
+    case TQMessageBox::Abort: // Abort clicked or Escape pressed
+        // abort
+        break;
+    }
+    
+ +

The critical() function should be reserved for critical errors. In +this example errorDetails is a TQString or const char*, and TQString +is used to concatenate several strings: +

+    TQMessageBox::critical( 0, "Application name here",
+        TQString("An internal error occurred. Please ") +
+        "call technical support at 1234-56789 and report\n"+
+        "these numbers:\n\n" + errorDetails +
+        "\n\nApplication will now exit." );
+    
+ +

In this example an OK button is displayed. +

TQMessageBox provides a very simple About box which displays an +appropriate icon and the string you provide: +

+    TQMessageBox::about( this, "About <Application>",
+        "<Application> is a <one-paragraph blurb>\n\n"
+        "Copyright 1991-2003 Such-and-such. "
+        "<License words here.>\n\n"
+        "For technical support, call 1234-56789 or see\n"
+        "http://www.such-and-such.com/Application/\n" );
+    
+ +

See about() for more information. +

If you want your users to know that the application is built using +TQt (so they know that you use high quality tools) you might like +to add an "About TQt" menu option under the Help menu to invoke +aboutTQt(). +

If none of the standard message boxes is suitable, you can create a +TQMessageBox from scratch and use custom button texts: +

+    TQMessageBox mb( "Application name here",
+        "Saving the file will overwrite the original file on the disk.\n"
+        "Do you really want to save?",
+        TQMessageBox::Information,
+        TQMessageBox::Yes | TQMessageBox::Default,
+        TQMessageBox::No,
+        TQMessageBox::Cancel | TQMessageBox::Escape );
+    mb.setButtonText( TQMessageBox::Yes, "Save" );
+    mb.setButtonText( TQMessageBox::No, "Discard" );
+    switch( mb.exec() ) {
+    case TQMessageBox::Yes:
+        // save and exit
+        break;
+    case TQMessageBox::No:
+        // exit without saving
+        break;
+    case TQMessageBox::Cancel:
+        // don't save and don't exit
+        break;
+    }
+    
+ +

TQMessageBox defines two enum types: Icon and an unnamed button type. +Icon defines the Question, Information, Warning, and Critical icons for each GUI style. It is used by the constructor +and by the static member functions question(), information(), +warning() and critical(). A function called standardIcon() gives +you access to the various icons. +

The button types are: +

    +
  • Ok - the default for single-button message boxes +
  • Cancel - note that this is not automatically Escape +
  • Yes +
  • No +
  • Abort +
  • Retry +
  • Ignore +
  • YesAll +
  • NoAll +
+

Button types can be combined with two modifiers by using OR, '|': +

    +
  • Default - makes pressing Enter equivalent to +clicking this button. Normally used with Ok, Yes or similar. +
  • Escape - makes pressing Escape equivalent to clicking this button. +Normally used with Abort, Cancel or similar. +
+

The text(), icon() and iconPixmap() functions provide access to the +current text and pixmap of the message box. The setText(), setIcon() +and setIconPixmap() let you change it. The difference between +setIcon() and setIconPixmap() is that the former accepts a +TQMessageBox::Icon and can be used to set standard icons, whereas the +latter accepts a TQPixmap and can be used to set custom icons. +

setButtonText() and buttonText() provide access to the buttons. +

TQMessageBox has no signals or slots. +

+

See also TQDialog, Isys on error messages, GUI Design Handbook: Message Box, and Dialog Classes. + +


Member Type Documentation

+

TQMessageBox::Icon

+ +

This enum has the following values: +

    +
  • TQMessageBox::NoIcon - the message box does not have any icon. +
  • TQMessageBox::Question - an icon indicating that +the message is asking a question. +
  • TQMessageBox::Information - an icon indicating that +the message is nothing out of the ordinary. +
  • TQMessageBox::Warning - an icon indicating that the +message is a warning, but can be dealt with. +
  • TQMessageBox::Critical - an icon indicating that +the message represents a critical problem. +

+


Member Function Documentation

+

TQMessageBox::TQMessageBox ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a message box with no text and a button with the label +"OK". +

If parent is 0, the message box becomes an application-global +modal dialog box. If parent is a widget, the message box +becomes modal relative to parent. +

The parent and name arguments are passed to the TQDialog +constructor. + +

TQMessageBox::TQMessageBox ( const TQString & caption, const TQString & text, Icon icon, int button0, int button1, int button2, TQWidget * parent = 0, const char * name = 0, bool modal = TRUE, WFlags f = WStyle_DialogBorder ) +

+Constructs a message box with a caption, a text, an icon, +and up to three buttons. +

The icon must be one of the following: +

    +
  • TQMessageBox::NoIcon +
  • TQMessageBox::Question +
  • TQMessageBox::Information +
  • TQMessageBox::Warning +
  • TQMessageBox::Critical +
+

Each button, button0, button1 and button2, can have one +of the following values: +

    +
  • TQMessageBox::NoButton +
  • TQMessageBox::Ok +
  • TQMessageBox::Cancel +
  • TQMessageBox::Yes +
  • TQMessageBox::No +
  • TQMessageBox::Abort +
  • TQMessageBox::Retry +
  • TQMessageBox::Ignore +
  • TQMessageBox::YesAll +
  • TQMessageBox::NoAll +
+

Use TQMessageBox::NoButton for the later parameters to have fewer +than three buttons in your message box. If you don't specify any +buttons at all, TQMessageBox will provide an Ok button. +

One of the buttons can be OR-ed with the TQMessageBox::Default +flag to make it the default button (clicked when Enter is +pressed). +

One of the buttons can be OR-ed with the TQMessageBox::Escape +flag to make it the cancel or close button (clicked when Escape is +pressed). +

Example: +

+    TQMessageBox mb( "Application Name",
+        "Hardware failure.\n\nDisk error detected\nDo you want to stop?",
+        TQMessageBox::Question,
+        TQMessageBox::Yes | TQMessageBox::Default,
+        TQMessageBox::No  | TQMessageBox::Escape,
+        TQMessageBox::NoButton );
+    if ( mb.exec() == TQMessageBox::No )
+        // try again
+    
+ +

If parent is 0, the message box becomes an application-global +modal dialog box. If parent is a widget, the message box +becomes modal relative to parent. +

If modal is TRUE the message box is modal; otherwise it +is modeless. +

The parent, name, modal, and f arguments are passed to +the TQDialog constructor. +

See also caption, text, and icon. + +

TQMessageBox::~TQMessageBox () +

+Destroys the message box. + +

void TQMessageBox::about ( TQWidget * parent, const TQString & caption, const TQString & text ) [static] +

+Displays a simple about box with caption caption and text text. The about box's parent is parent. +

about() looks for a suitable icon in four locations: +

    +
  1. It prefers parent->icon() if that exists. +
  2. If not, it tries the top-level widget containing parent. +
  3. If that fails, it tries the main widget. +
  4. As a last resort it uses the Information icon. +
+

The about box has a single button labelled "OK". +

See also TQWidget::icon and TQApplication::mainWidget(). + +

Examples: action/application.cpp, application/application.cpp, chart/chartform.cpp, helpviewer/helpwindow.cpp, mdi/application.cpp, menu/menu.cpp, and themes/themes.cpp. +

void TQMessageBox::aboutTQt ( TQWidget * parent, const TQString & caption = TQString::null ) [static] +

+Displays a simple message box about TQt, with caption caption +and centered over parent (if parent is not 0). The message +includes the version number of TQt being used by the application. +

This is useful for inclusion in the Help menu of an application. +See the examples/menu/menu.cpp example. +

TQApplication provides this functionality as a slot. +

See also TQApplication::aboutTQt(). + +

Examples: action/application.cpp, application/application.cpp, chart/chartform.cpp, helpviewer/helpwindow.cpp, menu/menu.cpp, themes/themes.cpp, and trivial/trivial.cpp. +

void TQMessageBox::adjustSize () [virtual] +

+Adjusts the size of the message box to fit the contents just before +TQDialog::exec() or TQDialog::show() is called. +

This function will not be called if the message box has been explicitly +resized before showing it. + +

Reimplemented from TQWidget. +

TQString TQMessageBox::buttonText ( int button ) const +

+Returns the text of the message box button button, or +TQString::null if the message box does not contain the button. +

See also setButtonText(). + +

int TQMessageBox::critical ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1, int button2 = 0 ) [static] +

+Opens a critical message box with the caption caption and the +text text. The dialog may have up to three buttons. Each of the +button parameters, button0, button1 and button2 may be +set to one of the following values: +

    +
  • TQMessageBox::NoButton +
  • TQMessageBox::Ok +
  • TQMessageBox::Cancel +
  • TQMessageBox::Yes +
  • TQMessageBox::No +
  • TQMessageBox::Abort +
  • TQMessageBox::Retry +
  • TQMessageBox::Ignore +
  • TQMessageBox::YesAll +
  • TQMessageBox::NoAll +
+

If you don't want all three buttons, set the last button, or last +two buttons to TQMessageBox::NoButton. +

One button can be OR-ed with TQMessageBox::Default, and one +button can be OR-ed with TQMessageBox::Escape. +

Returns the identity (TQMessageBox::Ok, or TQMessageBox::No, etc.) +of the button that was clicked. +

If parent is 0, the message box becomes an application-global +modal dialog box. If parent is a widget, the message box +becomes modal relative to parent. +

See also information(), question(), and warning(). + +

Examples: network/archivesearch/archivedialog.ui.h, network/ftpclient/ftpmainwindow.ui.h, process/process.cpp, and xml/outliner/outlinetree.cpp. +

int TQMessageBox::critical ( TQWidget * parent, const TQString & caption, const TQString & text, const TQString & button0Text = TQString::null, const TQString & button1Text = TQString::null, const TQString & button2Text = TQString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Displays a critical error message box with a caption, a text, and +1, 2 or 3 buttons. Returns the number of the button that was +clicked (0, 1 or 2). +

button0Text is the text of the first button, and is optional. +If button0Text is not supplied, "OK" (translated) will be used. +button1Text is the text of the second button, and is optional, +and button2Text is the text of the third button, and is +optional. defaultButtonNumber (0, 1 or 2) is the index of the +default button; pressing Return or Enter is the same as clicking +the default button. It defaults to 0 (the first button). escapeButtonNumber is the index of the Escape button; pressing +Escape is the same as clicking this button. It defaults to -1; +supply 0, 1, or 2 to make pressing Escape equivalent to clicking +the relevant button. +

If parent is 0, the message box becomes an application-global +modal dialog box. If parent is a widget, the message box +becomes modal relative to parent. +

See also information(), question(), and warning(). + +

Icon TQMessageBox::icon () const +

Returns the message box's icon. +See the "icon" property for details. +

const TQPixmap * TQMessageBox::iconPixmap () const +

Returns the current icon. +See the "iconPixmap" property for details. +

int TQMessageBox::information ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1 = 0, int button2 = 0 ) [static] +

+Opens an information message box with the caption caption and +the text text. The dialog may have up to three buttons. Each of +the buttons, button0, button1 and button2 may be set to +one of the following values: +

    +
  • TQMessageBox::NoButton +
  • TQMessageBox::Ok +
  • TQMessageBox::Cancel +
  • TQMessageBox::Yes +
  • TQMessageBox::No +
  • TQMessageBox::Abort +
  • TQMessageBox::Retry +
  • TQMessageBox::Ignore +
  • TQMessageBox::YesAll +
  • TQMessageBox::NoAll +
+

If you don't want all three buttons, set the last button, or last +two buttons to TQMessageBox::NoButton. +

One button can be OR-ed with TQMessageBox::Default, and one +button can be OR-ed with TQMessageBox::Escape. +

Returns the identity (TQMessageBox::Ok, or TQMessageBox::No, etc.) +of the button that was clicked. +

If parent is 0, the message box becomes an application-global +modal dialog box. If parent is a widget, the message box +becomes modal relative to parent. +

See also question(), warning(), and critical(). + +

Examples: action/application.cpp, application/application.cpp, dirview/dirview.cpp, fileiconview/qfileiconview.cpp, picture/picture.cpp, qwerty/qwerty.cpp, and simple/main.cpp. +

int TQMessageBox::information ( TQWidget * parent, const TQString & caption, const TQString & text, const TQString & button0Text = TQString::null, const TQString & button1Text = TQString::null, const TQString & button2Text = TQString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Displays an information message box with caption caption, text +text and one, two or three buttons. Returns the index of the +button that was clicked (0, 1 or 2). +

button0Text is the text of the first button, and is optional. +If button0Text is not supplied, "OK" (translated) will be used. +button1Text is the text of the second button, and is optional. +button2Text is the text of the third button, and is optional. +defaultButtonNumber (0, 1 or 2) is the index of the default +button; pressing Return or Enter is the same as clicking the +default button. It defaults to 0 (the first button). escapeButtonNumber is the index of the Escape button; pressing +Escape is the same as clicking this button. It defaults to -1; +supply 0, 1 or 2 to make pressing Escape equivalent to clicking +the relevant button. +

If parent is 0, the message box becomes an application-global +modal dialog box. If parent is a widget, the message box +becomes modal relative to parent. +

Note: If you do not specify an Escape button then if the Escape +button is pressed then -1 will be returned. It is suggested that +you specify an Escape button to prevent this from happening. +

See also question(), warning(), and critical(). + +

int TQMessageBox::message ( const TQString & caption, const TQString & text, const TQString & buttonText = TQString::null, TQWidget * parent = 0, const char * = 0 ) [static] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Opens a modal message box directly using the specified parameters. +

Please use information(), warning(), question(), or critical() instead. + +

Example: grapher/grapher.cpp. +

bool TQMessageBox::query ( const TQString & caption, const TQString & text, const TQString & yesButtonText = TQString::null, const TQString & noButtonText = TQString::null, TQWidget * parent = 0, const char * = 0 ) [static] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Queries the user using a modal message box with two buttons. +Note that caption is not always shown, it depends on the window manager. +

Please use information(), question(), warning(), or critical() instead. + +

int TQMessageBox::question ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1 = 0, int button2 = 0 ) [static] +

+Opens a question message box with the caption caption and the +text text. The dialog may have up to three buttons. Each of the +buttons, button0, button1 and button2 may be set to one +of the following values: +

    +
  • TQMessageBox::NoButton +
  • TQMessageBox::Ok +
  • TQMessageBox::Cancel +
  • TQMessageBox::Yes +
  • TQMessageBox::No +
  • TQMessageBox::Abort +
  • TQMessageBox::Retry +
  • TQMessageBox::Ignore +
  • TQMessageBox::YesAll +
  • TQMessageBox::NoAll +
+

If you don't want all three buttons, set the last button, or last +two buttons to TQMessageBox::NoButton. +

One button can be OR-ed with TQMessageBox::Default, and one +button can be OR-ed with TQMessageBox::Escape. +

Returns the identity (TQMessageBox::Yes, or TQMessageBox::No, etc.) +of the button that was clicked. +

If parent is 0, the message box becomes an application-global +modal dialog box. If parent is a widget, the message box +becomes modal relative to parent. +

See also information(), warning(), and critical(). + +

int TQMessageBox::question ( TQWidget * parent, const TQString & caption, const TQString & text, const TQString & button0Text = TQString::null, const TQString & button1Text = TQString::null, const TQString & button2Text = TQString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Displays a question message box with caption caption, text text and one, two or three buttons. Returns the index of the +button that was clicked (0, 1 or 2). +

button0Text is the text of the first button, and is optional. +If button0Text is not supplied, "OK" (translated) will be used. +button1Text is the text of the second button, and is optional. +button2Text is the text of the third button, and is optional. +defaultButtonNumber (0, 1 or 2) is the index of the default +button; pressing Return or Enter is the same as clicking the +default button. It defaults to 0 (the first button). escapeButtonNumber is the index of the Escape button; pressing +Escape is the same as clicking this button. It defaults to -1; +supply 0, 1 or 2 to make pressing Escape equivalent to clicking +the relevant button. +

If parent is 0, the message box becomes an application-global +modal dialog box. If parent is a widget, the message box +becomes modal relative to parent. +

Note: If you do not specify an Escape button then if the Escape +button is pressed then -1 will be returned. It is suggested that +you specify an Escape button to prevent this from happening. +

See also information(), warning(), and critical(). + +

void TQMessageBox::setButtonText ( int button, const TQString & text ) +

+Sets the text of the message box button button to text. +Setting the text of a button that is not in the message box is +silently ignored. +

See also buttonText(). + +

void TQMessageBox::setIcon ( Icon ) +

Sets the message box's icon. +See the "icon" property for details. +

void TQMessageBox::setIconPixmap ( const TQPixmap & ) +

Sets the current icon. +See the "iconPixmap" property for details. +

void TQMessageBox::setText ( const TQString & ) +

Sets the message box text to be displayed. +See the "text" property for details. +

void TQMessageBox::setTextFormat ( TextFormat ) +

Sets the format of the text displayed by the message box. +See the "textFormat" property for details. +

TQPixmap TQMessageBox::standardIcon ( Icon icon ) [static] +

+Returns the pixmap used for a standard icon. This allows the +pixmaps to be used in more complex message boxes. icon +specifies the retquired icon, e.g. TQMessageBox::Question, +TQMessageBox::Information, TQMessageBox::Warning or +TQMessageBox::Critical. + +

TQPixmap TQMessageBox::standardIcon ( Icon icon, GUIStyle style ) [static] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns the pixmap used for a standard icon. This +allows the pixmaps to be used in more complex message boxes. +icon specifies the retquired icon, e.g. TQMessageBox::Information, +TQMessageBox::Warning or TQMessageBox::Critical. +

style is unused. + +

TQString TQMessageBox::text () const +

Returns the message box text to be displayed. +See the "text" property for details. +

TextFormat TQMessageBox::textFormat () const +

Returns the format of the text displayed by the message box. +See the "textFormat" property for details. +

int TQMessageBox::warning ( TQWidget * parent, const TQString & caption, const TQString & text, int button0, int button1, int button2 = 0 ) [static] +

+Opens a warning message box with the caption caption and the +text text. The dialog may have up to three buttons. Each of the +button parameters, button0, button1 and button2 may be +set to one of the following values: +

    +
  • TQMessageBox::NoButton +
  • TQMessageBox::Ok +
  • TQMessageBox::Cancel +
  • TQMessageBox::Yes +
  • TQMessageBox::No +
  • TQMessageBox::Abort +
  • TQMessageBox::Retry +
  • TQMessageBox::Ignore +
  • TQMessageBox::YesAll +
  • TQMessageBox::NoAll +
+

If you don't want all three buttons, set the last button, or last +two buttons to TQMessageBox::NoButton. +

One button can be OR-ed with TQMessageBox::Default, and one +button can be OR-ed with TQMessageBox::Escape. +

Returns the identity (TQMessageBox::Ok, or TQMessageBox::No, etc.) +of the button that was clicked. +

If parent is 0, the message box becomes an application-global +modal dialog box. If parent is a widget, the message box +becomes modal relative to parent. +

See also information(), question(), and critical(). + +

Examples: chart/chartform.cpp, i18n/main.cpp, network/mail/smtp.cpp, qwerty/qwerty.cpp, showimg/showimg.cpp, and sound/sound.cpp. +

int TQMessageBox::warning ( TQWidget * parent, const TQString & caption, const TQString & text, const TQString & button0Text = TQString::null, const TQString & button1Text = TQString::null, const TQString & button2Text = TQString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Displays a warning message box with a caption, a text, and 1, 2 or +3 buttons. Returns the number of the button that was clicked (0, +1, or 2). +

button0Text is the text of the first button, and is optional. +If button0Text is not supplied, "OK" (translated) will be used. +button1Text is the text of the second button, and is optional, +and button2Text is the text of the third button, and is +optional. defaultButtonNumber (0, 1 or 2) is the index of the +default button; pressing Return or Enter is the same as clicking +the default button. It defaults to 0 (the first button). escapeButtonNumber is the index of the Escape button; pressing +Escape is the same as clicking this button. It defaults to -1; +supply 0, 1, or 2 to make pressing Escape equivalent to clicking +the relevant button. +

If parent is 0, the message box becomes an application-global +modal dialog box. If parent is a widget, the message box +becomes modal relative to parent. +

Note: If you do not specify an Escape button then if the Escape +button is pressed then -1 will be returned. It is suggested that +you specify an Escape button to prevent this from happening. +

See also information(), question(), and critical(). + +


Property Documentation

+

Icon icon

+

This property holds the message box's icon. +

The icon of the message box can be one of the following predefined +icons: +

    +
  • TQMessageBox::NoIcon +
  • TQMessageBox::Question +
  • TQMessageBox::Information +
  • TQMessageBox::Warning +
  • TQMessageBox::Critical +
+

The actual pixmap used for displaying the icon depends on the +current GUI style. You can also set +a custom pixmap icon using the TQMessageBox::iconPixmap +property. The default icon is TQMessageBox::NoIcon. +

See also iconPixmap. + +

Set this property's value with setIcon() and get this property's value with icon(). +

TQPixmap iconPixmap

+

This property holds the current icon. +

The icon currently used by the message box. Note that it's often +hard to draw one pixmap that looks appropriate in both Motif and +Windows GUI styles; you may want to draw two pixmaps. +

See also icon. + +

Set this property's value with setIconPixmap() and get this property's value with iconPixmap(). +

TQString text

+

This property holds the message box text to be displayed. +

The text will be interpreted either as a plain text or as rich +text, depending on the text format setting (TQMessageBox::textFormat). The default setting is AutoText, i.e. +the message box will try to auto-detect the format of the text. +

The default value of this property is TQString::null. +

See also textFormat. + +

Set this property's value with setText() and get this property's value with text(). +

TextFormat textFormat

+

This property holds the format of the text displayed by the message box. +

The current text format used by the message box. See the TQt::TextFormat enum for an explanation of the possible options. +

The default format is AutoText. +

See also text. + +

Set this property's value with setTextFormat() and get this property's value with textFormat(). + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmetaobject-h.html b/doc/html/qmetaobject-h.html new file mode 100644 index 00000000..67e0c95e --- /dev/null +++ b/doc/html/qmetaobject-h.html @@ -0,0 +1,331 @@ + + + + + +qmetaobject.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmetaobject.h

+ +

This is the verbatim text of the qmetaobject.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmetaobject.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQMetaObject class
+**
+** Created : 930419
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQMETAOBJECT_H
+#define TQMETAOBJECT_H
+
+#ifndef QT_H
+#include "qconnection.h"
+#include "qstrlist.h"
+#endif // QT_H
+
+#ifndef Q_MOC_OUTPUT_REVISION
+#define Q_MOC_OUTPUT_REVISION 26
+#endif
+
+class TQObject;
+struct TQUMethod;
+class TQMetaObjectPrivate;
+
+struct TQMetaData				// - member function meta data
+{						//   for signal and slots
+    const char *name;				// - member name
+    const TQUMethod* method;			// - detailed method description
+    enum Access { Private, Protected, Public };
+    Access access;				// - access permission
+};
+
+#ifndef QT_NO_PROPERTIES
+struct TQMetaEnum				// enumerator meta data
+{						//  for properties
+    const char *name;				// - enumerator name
+    uint count;					// - number of values
+    struct Item					// - a name/value pair
+    {
+	const char *key;
+	int value;
+    };
+    const Item *items;				// - the name/value pairs
+    bool set;					// whether enum has to be treated as a set
+};
+#endif
+
+#ifndef QT_NO_PROPERTIES
+
+class Q_EXPORT TQMetaProperty			// property meta data
+{
+public:
+    const char*	type() const { return t; }	// type of the property
+    const char*	name() const { return n; }	// name of the property
+
+    bool writable() const;
+    bool isValid() const;
+
+    bool isSetType() const;
+    bool isEnumType() const;
+    TQStrList enumKeys() const;			// enumeration names
+
+    int keyToValue( const char* key ) const;	// enum and set conversion functions
+    const char* valueToKey( int value ) const;
+    int keysToValue( const TQStrList& keys ) const;
+    TQStrList valueToKeys( int value ) const;
+
+    bool designable( TQObject* = 0 ) const;
+    bool scriptable( TQObject* = 0 ) const;
+    bool stored( TQObject* = 0 ) const;
+
+    bool reset( TQObject* ) const;
+
+    const char* t;			// internal
+    const char* n;			// internal
+
+    enum Flags  {
+	Invalid		= 0x00000000,
+	Readable	= 0x00000001,
+	Writable	= 0x00000002,
+	EnumOrSet	= 0x00000004,
+	UnresolvedEnum	= 0x00000008,
+	StdSet		= 0x00000100,
+	Override	= 0x00000200
+    };
+
+    uint flags; // internal
+    bool testFlags( uint f ) const;	// internal
+    bool stdSet() const; 		// internal
+    int id() const; 			// internal
+
+    TQMetaObject** meta; 		// internal
+
+    const TQMetaEnum* enumData;		// internal
+    int _id; 				// internal
+    void clear(); 			// internal
+};
+
+inline bool TQMetaProperty::testFlags( uint f ) const
+{ return (flags & (uint)f) != (uint)0; }
+
+#endif // QT_NO_PROPERTIES
+
+struct TQClassInfo				// class info meta data
+{
+    const char* name;				// - name of the info
+    const char* value;				// - value of the info
+};
+
+class Q_EXPORT TQMetaObject			// meta object class
+{
+public:
+    TQMetaObject( const char * const class_name, TQMetaObject *superclass,
+		 const TQMetaData * const slot_data, int n_slots,
+		 const TQMetaData * const signal_data, int n_signals,
+#ifndef QT_NO_PROPERTIES
+		 const TQMetaProperty *const prop_data, int n_props,
+		 const TQMetaEnum *const enum_data, int n_enums,
+#endif
+		 const TQClassInfo *const class_info, int n_info );
+
+#ifndef QT_NO_PROPERTIES
+    TQMetaObject( const char * const class_name, TQMetaObject *superclass,
+		 const TQMetaData * const slot_data, int n_slots,
+		 const TQMetaData * const signal_data, int n_signals,
+		 const TQMetaProperty *const prop_data, int n_props,
+		 const TQMetaEnum *const enum_data, int n_enums,
+		 bool (*qt_static_property)(TQObject*, int, int, TQVariant*),
+		 const TQClassInfo *const class_info, int n_info );
+#endif
+
+
+    virtual ~TQMetaObject();
+
+    const char	*className()		const { return classname; }
+    const char	*superClassName()	const { return superclassname; }
+
+    TQMetaObject *superClass()		const { return superclass; }
+
+    bool	inherits( const char* clname ) const;
+
+    int	numSlots( bool super = FALSE ) const;
+    int		numSignals( bool super = FALSE ) const;
+
+    int		findSlot( const char *, bool super = FALSE ) const;
+    int		findSignal( const char *, bool super = FALSE ) const;
+
+    const TQMetaData 	*slot( int index, bool super = FALSE ) const;
+    const TQMetaData 	*signal( int index, bool super = FALSE ) const;
+
+    TQStrList	slotNames( bool super = FALSE ) const;
+    TQStrList	signalNames( bool super = FALSE ) const;
+
+    int		slotOffset() const;
+    int		signalOffset() const;
+    int		propertyOffset() const;
+
+    int		numClassInfo( bool super = FALSE ) const;
+    const TQClassInfo	*classInfo( int index, bool super = FALSE ) const;
+    const char	*classInfo( const char* name, bool super = FALSE ) const;
+
+#ifndef QT_NO_PROPERTIES
+    const TQMetaProperty	*property( int index, bool super = FALSE ) const;
+    int findProperty( const char *name, bool super = FALSE ) const;
+    int indexOfProperty( const TQMetaProperty*, bool super = FALSE ) const;
+    const TQMetaProperty* resolveProperty( const TQMetaProperty* ) const;
+    int resolveProperty( int ) const;
+    TQStrList		propertyNames( bool super = FALSE ) const;
+    int		numProperties( bool super = FALSE ) const;
+#endif
+
+    // static wrappers around constructors, necessary to work around a
+    // Windows-DLL limitation: objects can only be deleted within a
+    // DLL if they were actually created within that DLL.
+    static TQMetaObject	*new_metaobject( const char *, TQMetaObject *,
+					const TQMetaData *const, int,
+					const TQMetaData *const, int,
+#ifndef QT_NO_PROPERTIES
+					const TQMetaProperty *const prop_data, int n_props,
+					const TQMetaEnum *const enum_data, int n_enums,
+#endif
+					const TQClassInfo *const  class_info, int n_info );
+#ifndef QT_NO_PROPERTIES
+    static TQMetaObject	*new_metaobject( const char *, TQMetaObject *,
+					const TQMetaData *const, int,
+					const TQMetaData *const, int,
+					const TQMetaProperty *const prop_data, int n_props,
+					const TQMetaEnum *const enum_data, int n_enums,
+					 bool (*qt_static_property)(TQObject*, int, int, TQVariant*),
+					const TQClassInfo *const  class_info, int n_info );
+    TQStrList		enumeratorNames( bool super = FALSE ) const;
+    int numEnumerators( bool super = FALSE ) const;
+    const TQMetaEnum		*enumerator( const char* name, bool super = FALSE ) const;
+#endif
+
+    static TQMetaObject *metaObject( const char *class_name );
+    static bool hasMetaObject( const char *class_name );
+
+private:
+    TQMemberDict		*init( const TQMetaData *, int );
+
+    const char		*classname;		// class name
+    const char		*superclassname;	// super class name
+    TQMetaObject	*superclass;			// super class meta object
+    TQMetaObjectPrivate	*d;			// private data for...
+    void	*reserved;			// ...binary compatibility
+    const TQMetaData		*slotData;	// slot meta data
+    TQMemberDict	*slotDict;			// slot dictionary
+    const TQMetaData		*signalData;	// signal meta data
+    TQMemberDict	*signalDict;			// signal dictionary
+    int signaloffset;
+    int slotoffset;
+#ifndef QT_NO_PROPERTIES
+    int propertyoffset;
+public:
+    bool qt_static_property( TQObject* o, int id, int f, TQVariant* v);
+private:
+    friend class TQMetaProperty;
+#endif
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQMetaObject( const TQMetaObject & );
+    TQMetaObject &operator=( const TQMetaObject & );
+#endif
+};
+
+inline int TQMetaObject::slotOffset() const
+{ return slotoffset; }
+
+inline int TQMetaObject::signalOffset() const
+{ return signaloffset; }
+
+#ifndef QT_NO_PROPERTIES
+inline int TQMetaObject::propertyOffset() const
+{ return propertyoffset; }
+#endif
+
+typedef TQMetaObject *(*TQtStaticMetaObjectFunction)();
+
+class Q_EXPORT TQMetaObjectCleanUp
+{
+public:
+    TQMetaObjectCleanUp( const char *mo_name, TQtStaticMetaObjectFunction );
+    TQMetaObjectCleanUp();
+    ~TQMetaObjectCleanUp();
+
+    void setMetaObject( TQMetaObject *&mo );
+
+private:
+    TQMetaObject **metaObject;
+};
+
+#endif // TQMETAOBJECT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmetaobject-members.html b/doc/html/qmetaobject-members.html new file mode 100644 index 00000000..5620d2a9 --- /dev/null +++ b/doc/html/qmetaobject-members.html @@ -0,0 +1,60 @@ + + + + + +TQMetaObject Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMetaObject

+ +

This is the complete list of member functions for +TQMetaObject, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmetaobject.html b/doc/html/qmetaobject.html new file mode 100644 index 00000000..75bc686f --- /dev/null +++ b/doc/html/qmetaobject.html @@ -0,0 +1,187 @@ + + + + + +TQMetaObject Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMetaObject Class Reference

+ +

The TQMetaObject class contains meta information about TQt objects. +More... +

#include <qmetaobject.h> +

List of all member functions. +

Public Members

+
    +
  • const char * className () const
  • +
  • const char * superClassName () const
  • +
  • TQMetaObject * superClass () const
  • +
  • bool inherits ( const char * clname ) const
  • +
  • int numSlots ( bool super = FALSE ) const
  • +
  • int numSignals ( bool super = FALSE ) const
  • +
  • TQStrList slotNames ( bool super = FALSE ) const
  • +
  • TQStrList signalNames ( bool super = FALSE ) const
  • +
  • int numClassInfo ( bool super = FALSE ) const
  • +
  • const TQClassInfo * classInfo ( int index, bool super = FALSE ) const
  • +
  • const char * classInfo ( const char * name, bool super = FALSE ) const
  • +
  • const TQMetaProperty * property ( int index, bool super = FALSE ) const
  • +
  • int findProperty ( const char * name, bool super = FALSE ) const
  • +
  • TQStrList propertyNames ( bool super = FALSE ) const
  • +
  • int numProperties ( bool super = FALSE ) const
  • +
+

Detailed Description

+ + +The TQMetaObject class contains meta information about TQt objects. +

+

The Meta Object System in TQt is responsible for the signals and +slots inter-object communication mechanism, runtime type +information and the property system. All meta information in TQt is +kept in a single instance of TQMetaObject per class. +

This class is not normally retquired for application programming. +But if you write meta applications, such as scripting engines or +GUI builders, you might find these functions useful: +

+

Classes may have a list of name-value pairs of class information. +The number of pairs is returned by numClassInfo(), and values are +returned by classInfo(). +

See also moc (Meta Object Compiler) and Object Model. + +

+


Member Function Documentation

+

const TQClassInfo * TQMetaObject::classInfo ( int index, bool super = FALSE ) const +

+Returns the class information with index index or 0 if no such +information exists. +

If super is TRUE, inherited class information is included. + +

const char * TQMetaObject::classInfo ( const char * name, bool super = FALSE ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the class information with name name or 0 if no such +information exists. +

If super is TRUE, inherited class information is included. + +

const char * TQMetaObject::className () const +

+ +

Returns the class name. +

See also TQObject::className() and superClassName(). + +

int TQMetaObject::findProperty ( const char * name, bool super = FALSE ) const +

+Returns the index for the property with name name or -1 if no +such property exists. +

If super is TRUE, inherited properties are included. +

See also property() and propertyNames(). + +

bool TQMetaObject::inherits ( const char * clname ) const +

+Returns TRUE if this class inherits clname within the meta object inheritance chain; otherwise returns FALSE. +

(A class is considered to inherit itself.) + +

int TQMetaObject::numClassInfo ( bool super = FALSE ) const +

+Returns the number of items of class information available for +this class. +

If super is TRUE, inherited class information is included. + +

int TQMetaObject::numProperties ( bool super = FALSE ) const +

+Returns the number of properties for this class. +

If super is TRUE, inherited properties are included. +

See also propertyNames(). + +

int TQMetaObject::numSignals ( bool super = FALSE ) const +

+Returns the number of signals for this class. +

If super is TRUE, inherited signals are included. +

See also signalNames(). + +

int TQMetaObject::numSlots ( bool super = FALSE ) const +

+Returns the number of slots for this class. +

If super is TRUE, inherited slots are included. +

See also slotNames(). + +

const TQMetaProperty * TQMetaObject::property ( int index, bool super = FALSE ) const +

+Returns the property meta data for the property at index index +or 0 if no such property exists. +

If super is TRUE, inherited properties are included. +

See also propertyNames(). + +

TQStrList TQMetaObject::propertyNames ( bool super = FALSE ) const +

+Returns a list with the names of all this class's properties. +

If super is TRUE, inherited properties are included. +

See also property(). + +

TQStrList TQMetaObject::signalNames ( bool super = FALSE ) const +

+Returns a list with the names of all this class's signals. +

If super is TRUE, inherited signals are included. + +

TQStrList TQMetaObject::slotNames ( bool super = FALSE ) const +

+Returns a list with the names of all this class's slots. +

If super is TRUE, inherited slots are included. +

See also numSlots(). + +

TQMetaObject * TQMetaObject::superClass () const +

+ +

Returns the meta object of the super class or 0 if there is no +such object. + +

const char * TQMetaObject::superClassName () const +

+ +

Returns the class name of the superclass or 0 if there is no +superclass in the TQObject hierachy. +

See also className(). + + +


+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/qmetaproperty-members.html b/doc/html/qmetaproperty-members.html new file mode 100644 index 00000000..7a52e87d --- /dev/null +++ b/doc/html/qmetaproperty-members.html @@ -0,0 +1,60 @@ + + + + + +TQMetaProperty Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMetaProperty

+ +

This is the complete list of member functions for +TQMetaProperty, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmetaproperty.html b/doc/html/qmetaproperty.html new file mode 100644 index 00000000..8cdf4a9d --- /dev/null +++ b/doc/html/qmetaproperty.html @@ -0,0 +1,173 @@ + + + + + +TQMetaProperty Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMetaProperty Class Reference

+ +

The TQMetaProperty class stores meta data about a property. +More... +

#include <qmetaobject.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +

The TQMetaProperty class stores meta data about a property. +

+

Property meta data includes type(), name(), and whether a property +is writable(), designable() and stored(). +

The functions isSetType(), isEnumType() and enumKeys() provide +further information about a property's type. The conversion +functions keyToValue(), valueToKey(), keysToValue() and +valueToKeys() allow conversion between the integer representation +of an enumeration or set value and its literal representation. +

Actual property values are set and received through TQObject's set +and get functions. See TQObject::setProperty() and +TQObject::property() for details. +

You receive meta property data through an object's meta object. +See TQMetaObject::property() and TQMetaObject::propertyNames() for +details. +

See also Object Model. + +


Member Function Documentation

+

bool TQMetaProperty::designable ( TQObject * o = 0 ) const +

Returns TRUE if the property is designable for object o; +otherwise returns FALSE. +

If no object o is given, the function returns a static +approximation. + +

TQStrList TQMetaProperty::enumKeys () const +

+Returns the possible enumeration keys if this property is an +enumeration type (or a set type). +

See also isEnumType(). + +

bool TQMetaProperty::isEnumType () const +

+ +

Returns TRUE if the property's type is an enumeration value; +otherwise returns FALSE. +

See also isSetType() and enumKeys(). + +

bool TQMetaProperty::isSetType () const +

+ +

Returns TRUE if the property's type is an enumeration value that +is used as set, i.e. if the enumeration values can be OR-ed +together; otherwise returns FALSE. A set type is implicitly also +an enum type. +

See also isEnumType() and enumKeys(). + +

int TQMetaProperty::keyToValue ( const char * key ) const +

+Converts the enumeration key key to its integer value. +

For set types, use keysToValue(). +

See also valueToKey(), isSetType(), and keysToValue(). + +

int TQMetaProperty::keysToValue ( const TQStrList & keys ) const +

+Converts the list of keys keys to their combined (OR-ed) +integer value. +

See also isSetType() and valueToKey(). + +

const char * TQMetaProperty::name () const +

+ +

Returns the name of the property. + +

bool TQMetaProperty::reset ( TQObject * o ) const +

+Tries to reset the property for object o with a reset method. +On success, returns TRUE; otherwise returns FALSE. +

Reset methods are optional, usually only a few properties support +them. + +

bool TQMetaProperty::scriptable ( TQObject * o = 0 ) const +

+Returns TRUE if the property is scriptable for object o; +otherwise returns FALSE. +

If no object o is given, the function returns a static +approximation. + +

bool TQMetaProperty::stored ( TQObject * o = 0 ) const +

+Returns TRUE if the property shall be stored for object o; +otherwise returns FALSE. +

If no object o is given, the function returns a static +approximation. + +

const char * TQMetaProperty::type () const +

+ +

Returns the type of the property. + +

const char * TQMetaProperty::valueToKey ( int value ) const +

+Converts the enumeration value value to its literal key. +

For set types, use valueToKeys(). +

See also isSetType() and valueToKeys(). + +

TQStrList TQMetaProperty::valueToKeys ( int value ) const +

+Converts the set value value to a list of keys. +

See also isSetType() and valueToKey(). + +

bool TQMetaProperty::writable () const +

+ +

Returns TRUE if the property is writable; 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 new file mode 100644 index 00000000..76445c0c --- /dev/null +++ b/doc/html/qmime-h.html @@ -0,0 +1,245 @@ + + + + + +qmime.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmime.h

+ +

This is the verbatim text of the qmime.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmime.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of mime classes
+**
+** Created : 981204
+**
+** Copyright (C) 1998-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQMIME_H
+#define TQMIME_H
+
+#ifndef QT_H
+#include "qwindowdefs.h"
+#include "qmap.h"
+#endif // QT_H
+
+#ifndef QT_NO_MIME
+
+class TQImageDrag;
+class TQTextDrag;
+
+class Q_EXPORT TQMimeSource
+{
+    friend class TQClipboardData;
+
+public:
+    TQMimeSource();
+    virtual ~TQMimeSource();
+    virtual const char* format( int n = 0 ) const = 0;
+    virtual bool provides( const char* ) const;
+    virtual TQByteArray encodedData( const char* ) const = 0;
+    int serialNumber() const;
+
+private:
+    int ser_no;
+    enum { NoCache, Text, Graphics } cacheType;
+    union
+    {
+	struct
+	{
+	    TQString *str;
+	    TQCString *subtype;
+	} txt;
+	struct
+	{
+	    TQImage *img;
+	    TQPixmap *pix;
+	} gfx;
+    } cache;
+    void clearCache();
+
+    // friends for caching
+    friend class TQImageDrag;
+    friend class TQTextDrag;
+
+};
+
+inline int TQMimeSource::serialNumber() const
+{ return ser_no; }
+
+class TQStringList;
+class TQMimeSourceFactoryData;
+
+class Q_EXPORT TQMimeSourceFactory {
+public:
+    TQMimeSourceFactory();
+    virtual ~TQMimeSourceFactory();
+
+    static TQMimeSourceFactory* defaultFactory();
+    static void setDefaultFactory( TQMimeSourceFactory* );
+    static TQMimeSourceFactory* takeDefaultFactory();
+    static void addFactory( TQMimeSourceFactory *f );
+    static void removeFactory( TQMimeSourceFactory *f );
+
+    virtual const TQMimeSource* data(const TQString& abs_name) const;
+    virtual TQString makeAbsolute(const TQString& abs_or_rel_name, const TQString& context) const;
+    const TQMimeSource* data(const TQString& abs_or_rel_name, const TQString& context) const;
+
+    virtual void setText( const TQString& abs_name, const TQString& text );
+    virtual void setImage( const TQString& abs_name, const TQImage& im );
+    virtual void setPixmap( const TQString& abs_name, const TQPixmap& pm );
+    virtual void setData( const TQString& abs_name, TQMimeSource* data );
+    virtual void setFilePath( const TQStringList& );
+    virtual TQStringList filePath() const;
+    void addFilePath( const TQString& );
+    virtual void setExtensionType( const TQString& ext, const char* mimetype );
+
+private:
+    TQMimeSource *dataInternal(const TQString& abs_name, const TQMap<TQString, TQString> &extensions ) const;
+    TQMimeSourceFactoryData* d;
+};
+
+#if defined(Q_WS_WIN)
+
+#ifndef QT_H
+#include "qptrlist.h" // down here for GCC 2.7.* compatibility
+#endif // QT_H
+
+/*
+  Encapsulation of conversion between MIME and Windows CLIPFORMAT.
+  Not need on X11, as the underlying protocol uses the MIME standard
+  directly.
+*/
+
+class Q_EXPORT TQWindowsMime {
+public:
+    TQWindowsMime();
+    virtual ~TQWindowsMime();
+
+    static void initialize();
+
+    static TQPtrList<TQWindowsMime> all();
+    static TQWindowsMime* convertor( const char* mime, int cf );
+    static const char* cfToMime(int cf);
+
+    static int registerMimeType(const char *mime);
+
+    virtual const char* convertorName()=0;
+    virtual int countCf()=0;
+    virtual int cf(int index)=0;
+    virtual bool canConvert( const char* mime, int cf )=0;
+    virtual const char* mimeFor(int cf)=0;
+    virtual int cfFor(const char* )=0;
+    virtual TQByteArray convertToMime( TQByteArray data, const char* mime, int cf )=0;
+    virtual TQByteArray convertFromMime( TQByteArray data, const char* mime, int cf )=0;
+};
+
+#endif
+#if defined(Q_WS_MAC)
+
+#ifndef QT_H
+#include "qptrlist.h" // down here for GCC 2.7.* compatibility
+#endif // QT_H
+
+/*
+  Encapsulation of conversion between MIME and Mac flavor.
+  Not need on X11, as the underlying protocol uses the MIME standard
+  directly.
+*/
+
+class Q_EXPORT TQMacMime {
+    char type;
+public:
+    enum TQMacMimeType { MIME_DND=0x01, MIME_CLIP=0x02, MIME_QT_CONVERTOR=0x04, MIME_ALL=MIME_DND|MIME_CLIP };
+    TQMacMime(char);
+    virtual ~TQMacMime();
+
+    static void initialize();
+
+    static TQPtrList<TQMacMime> all(TQMacMimeType);
+    static TQMacMime* convertor(TQMacMimeType, const char* mime, int flav);
+    static const char* flavorToMime(TQMacMimeType, int flav);
+
+    virtual const char* convertorName()=0;
+    virtual int countFlavors()=0;
+    virtual int flavor(int index)=0;
+    virtual bool canConvert(const char* mime, int flav)=0;
+    virtual const char* mimeFor(int flav)=0;
+    virtual int flavorFor(const char*)=0;
+    virtual TQByteArray convertToMime(TQValueList<TQByteArray> data, const char* mime, int flav)=0;
+    virtual TQValueList<TQByteArray> convertFromMime(TQByteArray data, const char* mime, int flav)=0;
+};
+
+#endif // Q_WS_MAC
+
+#endif // QT_NO_MIME
+
+#endif // TQMIME_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmimesource-members.html b/doc/html/qmimesource-members.html new file mode 100644 index 00000000..c439fc2c --- /dev/null +++ b/doc/html/qmimesource-members.html @@ -0,0 +1,52 @@ + + + + + +TQMimeSource Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMimeSource

+ +

This is the complete list of member functions for +TQMimeSource, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmimesource.html b/doc/html/qmimesource.html new file mode 100644 index 00000000..1878abab --- /dev/null +++ b/doc/html/qmimesource.html @@ -0,0 +1,109 @@ + + + + + +TQMimeSource Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMimeSource Class Reference

+ +

The TQMimeSource class is an abstraction of objects which provide formatted data of a certain MIME type. +More... +

#include <qmime.h> +

Inherited by TQDragObject and TQDropEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQMimeSource class is an abstraction of objects which provide formatted data of a certain MIME type. +

+ + +

Drag-and-drop and +clipboard use this abstraction. +

See also IANA list of MIME media types, Drag And Drop Classes, Input/Output and Networking, and Miscellaneous Classes. + +


Member Function Documentation

+

TQMimeSource::TQMimeSource () +

+Constructs a mime source and assigns a globally unique serial +number to it. +

See also serialNumber(). + +

TQMimeSource::~TQMimeSource () [virtual] +

+Provided to ensure that subclasses destroy themselves correctly. + +

TQByteArray TQMimeSource::encodedData ( const char * ) const [pure virtual] +

+ +

Returns the encoded data of this object in the specified MIME +format. +

Subclasses must reimplement this function. + +

Reimplemented in TQStoredDrag, TQDropEvent, and TQIconDrag. +

const char * TQMimeSource::format ( int i = 0 ) const [pure virtual] +

+ +

Returns the i-th supported MIME format, or 0. + +

Reimplemented in TQDropEvent. +

bool TQMimeSource::provides ( const char * mimeType ) const [virtual] +

+Returns TRUE if the object can provide the data in format mimeType; otherwise returns FALSE. +

If you inherit from TQMimeSource, for consistency reasons it is +better to implement the more abstract canDecode() functions such +as TQTextDrag::canDecode() and TQImageDrag::canDecode(). + +

Example: iconview/simple_dd/main.cpp. +

Reimplemented in TQDropEvent. +

int TQMimeSource::serialNumber () const +

+ +

Returns the mime source's globally unique serial number. + + +


+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/qmimesourcefactory-members.html b/doc/html/qmimesourcefactory-members.html new file mode 100644 index 00000000..5b76181d --- /dev/null +++ b/doc/html/qmimesourcefactory-members.html @@ -0,0 +1,63 @@ + + + + + +TQMimeSourceFactory Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMimeSourceFactory

+ +

This is the complete list of member functions for +TQMimeSourceFactory, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmimesourcefactory.html b/doc/html/qmimesourcefactory.html new file mode 100644 index 00000000..c0ee5b8a --- /dev/null +++ b/doc/html/qmimesourcefactory.html @@ -0,0 +1,277 @@ + + + + + +TQMimeSourceFactory Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMimeSourceFactory Class Reference

+ +

The TQMimeSourceFactory class is an extensible provider of mime-typed data. +More... +

#include <qmime.h> +

List of all member functions. +

Public Members

+
    +
  • TQMimeSourceFactory ()
  • +
  • virtual ~TQMimeSourceFactory ()
  • +
  • virtual const TQMimeSource * data ( const TQString & abs_name ) const
  • +
  • virtual TQString makeAbsolute ( const TQString & abs_or_rel_name, const TQString & context ) const
  • +
  • const TQMimeSource * data ( const TQString & abs_or_rel_name, const TQString & context ) const
  • +
  • virtual void setText ( const TQString & abs_name, const TQString & text )
  • +
  • virtual void setImage ( const TQString & abs_name, const TQImage & image )
  • +
  • virtual void setPixmap ( const TQString & abs_name, const TQPixmap & pixmap )
  • +
  • virtual void setData ( const TQString & abs_name, TQMimeSource * data )
  • +
  • virtual void setFilePath ( const TQStringList & path )
  • +
  • virtual TQStringList filePath () const
  • +
  • void addFilePath ( const TQString & p )
  • +
  • virtual void setExtensionType ( const TQString & ext, const char * mimetype )
  • +
+

Static Public Members

+ +

Detailed Description

+ + +The TQMimeSourceFactory class is an extensible provider of mime-typed data. +

+ +

A TQMimeSourceFactory provides an abstract interface to a +collection of information. Each piece of information is +represented by a TQMimeSource object which can be examined and +converted to concrete data types by functions such as +TQImageDrag::canDecode() and TQImageDrag::decode(). +

The base TQMimeSourceFactory can be used in two ways: as an +abstraction of a collection of files or as specifically stored +data. For it to access files, call setFilePath() before accessing +data. For stored data, call setData() for each item (there are +also convenience functions, e.g. setText(), setImage() and +setPixmap(), that simply call setData() with appropriate +parameters). +

The rich text widgets, TQTextEdit and TQTextBrowser, use +TQMimeSourceFactory to resolve references such as images or links +within rich text documents. They either access the default factory +(see defaultFactory()) or their own (see +TQTextEdit::setMimeSourceFactory()). Other classes that are +capable of displaying rich text (such as TQLabel, TQWhatsThis or +TQMessageBox) always use the default factory. +

A factory can also be used as a container to store data associated +with a name. This technique is useful whenever rich text contains +images that are stored in the program itself, not loaded from the +hard disk. Your program may, for example, define some image data +as: +

+    static const char* myimage_data[]={
+    "...",
+    ...
+    "..."};
+    
+ +

To be able to use this image within some rich text, for example +inside a TQLabel, you must create a TQImage from the raw data and +insert it into the factory with a unique name: +

+    TQMimeSourceFactory::defaultFactory()->setImage( "myimage", TQImage(myimage_data) );
+    
+ +

Now you can create a rich text TQLabel with +

+    TQLabel* label = new TQLabel(
+        "Rich text with embedded image:<img source=\"myimage\">"
+        "Isn't that <em>cute</em>?" );
+    
+ +

When no longer needed, you can clear the data from the factory: +

+    delete label;
+    TQMimeSourceFactory::defaultFactory()->setData( "myimage", 0 );
+    
+ +

See also Environment Classes and Input/Output and Networking. + +


Member Function Documentation

+

TQMimeSourceFactory::TQMimeSourceFactory () +

+Constructs a TQMimeSourceFactory that has no file path and no +stored content. + +

TQMimeSourceFactory::~TQMimeSourceFactory () [virtual] +

+Destroys the TQMimeSourceFactory, deleting all stored content. + +

void TQMimeSourceFactory::addFactory ( TQMimeSourceFactory * f ) [static] +

+Adds the TQMimeSourceFactory f to the list of available +mimesource factories. If the defaultFactory() can't resolve a +data() it iterates over the list of installed mimesource factories +until the data can be resolved. +

See also removeFactory(). + +

void TQMimeSourceFactory::addFilePath ( const TQString & p ) +

+Adds another search path, p to the existing search paths. +

See also setFilePath(). + +

const TQMimeSource * TQMimeSourceFactory::data ( const TQString & abs_name ) const [virtual] +

+Returns a reference to the data associated with abs_name. The +return value remains valid only until the next data() or setData() +call, so you should immediately decode the result. +

If there is no data associated with abs_name in the factory's +store, the factory tries to access the local filesystem. If abs_name isn't an absolute file name, the factory will search for +it in all defined paths (see setFilePath()). +

The factory understands all the image formats supported by +TQImageIO. Any other mime types are determined by the file name +extension. The default settings are +

+    setExtensionType("html", "text/html;charset=iso8859-1");
+    setExtensionType("htm", "text/html;charset=iso8859-1");
+    setExtensionType("txt", "text/plain");
+    setExtensionType("xml", "text/xml;charset=UTF-8");
+    
+ +The effect of these is that file names ending in "txt" will be +treated as text encoded in the local encoding; those ending in +"xml" will be treated as text encoded in Unicode UTF-8 encoding. +The text/html type is treated specially, since the encoding can be +specified in the html file itself. "html" or "htm" will be treated +as text encoded in the encoding specified by the html meta tag, if +none could be found, the charset of the mime type will be used. +The text subtype ("html", "plain", or "xml") does not affect the +factory, but users of the factory may behave differently. We +recommend creating "xml" files where practical. These files can be +viewed regardless of the runtime encoding and can encode any +Unicode characters without resorting to encoding definitions +inside the file. +

Any file data that is not recognized will be retrieved as a +TQMimeSource providing the "application/octet-stream" mime type, +meaning uninterpreted binary data. +

You can add further extensions or change existing ones with +subsequent calls to setExtensionType(). If the extension mechanism +is not sufficient for your problem domain, you can inherit +TQMimeSourceFactory and reimplement this function to perform some +more specialized mime-type detection. The same applies if you want +to use the mime source factory to access URL referenced data over +a network. + +

const TQMimeSource * TQMimeSourceFactory::data ( const TQString & abs_or_rel_name, const TQString & context ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

A convenience function. See data(const TQString& abs_name). The +file name is given in abs_or_rel_name and the path is in context. + +

TQMimeSourceFactory * TQMimeSourceFactory::defaultFactory () [static] +

+Returns the application-wide default mime source factory. This +factory is used by rich text rendering classes such as +TQSimpleRichText, TQWhatsThis and TQMessageBox to resolve named +references within rich text documents. It serves also as the +initial factory for the more complex render widgets, TQTextEdit and +TQTextBrowser. +

See also setDefaultFactory(). + +

Examples: action/application.cpp and application/application.cpp. +

TQStringList TQMimeSourceFactory::filePath () const [virtual] +

+Returns the currently set search paths. + +

TQString TQMimeSourceFactory::makeAbsolute ( const TQString & abs_or_rel_name, const TQString & context ) const [virtual] +

+Converts the absolute or relative data item name abs_or_rel_name to an absolute name, interpreted within the +context (path) of the data item named context (this must be an +absolute name). + +

void TQMimeSourceFactory::removeFactory ( TQMimeSourceFactory * f ) [static] +

+Removes the mimesource factory f from the list of available +mimesource factories. +

See also addFactory(). + +

void TQMimeSourceFactory::setData ( const TQString & abs_name, TQMimeSource * data ) [virtual] +

+Sets data to be the data item associated with +the absolute name abs_name. Note that the ownership of data is +transferred to the factory: do not delete or access the pointer after +passing it to this function. +

Passing 0 for data removes previously stored data. + +

void TQMimeSourceFactory::setDefaultFactory ( TQMimeSourceFactory * factory ) [static] +

+Sets the default factory, destroying any previously set mime +source provider. The ownership of the factory is transferred to +TQt. +

See also defaultFactory(). + +

void TQMimeSourceFactory::setExtensionType ( const TQString & ext, const char * mimetype ) [virtual] +

+Sets the mime-type to be associated with the file name extension, +ext to mimetype. This determines the mime-type for files +found via the paths set by setFilePath(). + +

void TQMimeSourceFactory::setFilePath ( const TQStringList & path ) [virtual] +

+Sets the list of directories that will be searched when named data +is requested to the those given in the string list path. +

See also filePath(). + +

void TQMimeSourceFactory::setImage ( const TQString & abs_name, const TQImage & image ) [virtual] +

+Sets image to be the data item associated with the absolute +name abs_name. +

Equivalent to setData(abs_name, new TQImageDrag(image)). + +

void TQMimeSourceFactory::setPixmap ( const TQString & abs_name, const TQPixmap & pixmap ) [virtual] +

+Sets pixmap to be the data item associated with the absolute +name abs_name. + +

void TQMimeSourceFactory::setText ( const TQString & abs_name, const TQString & text ) [virtual] +

+Sets text to be the data item associated with the absolute name +abs_name. +

Equivalent to setData(abs_name, new TQTextDrag(text)). + +

TQMimeSourceFactory * TQMimeSourceFactory::takeDefaultFactory () [static] +

+Sets the defaultFactory() to 0 and returns the previous one. + + +

+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/qmlined-m.png b/doc/html/qmlined-m.png new file mode 100644 index 00000000..3cd609d2 Binary files /dev/null and b/doc/html/qmlined-m.png differ diff --git a/doc/html/qmlined-w.png b/doc/html/qmlined-w.png new file mode 100644 index 00000000..13955dbc Binary files /dev/null and b/doc/html/qmlined-w.png differ diff --git a/doc/html/qmotif-h.html b/doc/html/qmotif-h.html new file mode 100644 index 00000000..b573e485 --- /dev/null +++ b/doc/html/qmotif-h.html @@ -0,0 +1,112 @@ + + + + + +qmotif.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmotif.h

+ +

This is the verbatim text of the qmotif.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmotif.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQt extension classes for Xt/Motif support.
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the TQt extension for Xt/Motif support.
+**
+** Licensees holding valid TQt Enterprise Edition licenses for X11 may use
+** this file in accordance with the TQt Commercial License Agreement provided
+** with the Software.
+**
+** This file is not available for use under any other license without
+** express written permission from the copyright holder.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about TQt Commercial License Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef TQMOTIF_H
+#define TQMOTIF_H
+
+#include <qeventloop.h>
+
+#include <X11/Intrinsic.h>
+
+class TQMotifPrivate;
+
+class TQMotif : public TQEventLoop
+{
+    Q_OBJECT
+
+public:
+    TQMotif( const char *applicationClass, XtAppContext context = NULL, XrmOptionDescRec *options = 0, int numOptions = 0);
+    ~TQMotif();
+
+    XtAppContext applicationContext() const;
+
+    void registerSocketNotifier( TQSocketNotifier * );
+    void unregisterSocketNotifier( TQSocketNotifier * );
+    void wakeUp();
+
+    static void registerWidget( TQWidget* );
+    static void unregisterWidget( TQWidget* );
+    static bool redeliverEvent( XEvent *event );
+
+    static Display *x11Display();
+    static XEvent* lastEvent();
+
+protected:
+    bool processEvents( ProcessEventsFlags flags );
+
+private:
+    void appStartingUp();
+    void appClosingDown();
+    TQMotifPrivate *d;
+};
+
+#endif // TQMOTIF_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmotif-members.html b/doc/html/qmotif-members.html new file mode 100644 index 00000000..b6648cf0 --- /dev/null +++ b/doc/html/qmotif-members.html @@ -0,0 +1,108 @@ + + + + + +TQMotif Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMotif

+ +

This is the complete list of member functions for +TQMotif, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmotif.html b/doc/html/qmotif.html new file mode 100644 index 00000000..e353b2f3 --- /dev/null +++ b/doc/html/qmotif.html @@ -0,0 +1,115 @@ + + + + + +TQMotif Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMotif Class Reference

+ +

The TQMotif class provides the basis of the Motif Extension. +More... +

This class is part of the TQt Motif Extension. +

#include <qmotif.h> +

Inherits TQEventLoop. +

List of all member functions. +

Public Members

+
    +
  • TQMotif ( const char * applicationClass, XtAppContext context = NULL, XrmOptionDescRec * options = 0, int numOptions = 0 )
  • +
  • ~TQMotif ()
  • +
  • XtAppContext applicationContext () const
  • +
+

Static Public Members

+ +

Detailed Description

+

This class is defined in the TQt Motif Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQMotif class provides the basis of the Motif Extension. + +

+

TQMotif only provides a few public functions, but it is at the +heart of the integration. TQMotif is responsible for initializing +the Xt toolkit and the Xt application context. It does not open a +connection to the X server, that is done by TQApplication. +

The only member function in TQMotif that depends on an X server +connection is TQMotif::initialize(). TQMotif must be created before +TQApplication. +

Example usage of TQMotif and TQApplication: +

+    static char *resources[] = {
+        ...
+    };
+
+    int main(int argc, char **argv)
+    {
+        TQMotif integrator( "AppClass" );
+        XtAppSetFallbackResources( integrator.applicationContext(),
+                                   resources );
+        TQApplication app( argc, argv );
+
+        ...
+
+        return app.exec();
+    }
+    
+ + +

Member Function Documentation

+

TQMotif::TQMotif ( const char * applicationClass, XtAppContext context = NULL, XrmOptionDescRec * options = 0, int numOptions = 0 ) +

+Creates TQMotif, which allows TQt and Xt/Motif integration. +

If context is 0, TQMotif creates a default application context +itself. The context is accessible through applicationContext(). +

All arguments passed to this function (applicationClass, options and numOptions) are used to call XtDisplayInitialize() +after TQApplication has been constructed. + +

TQMotif::~TQMotif () +

+Destroys TQMotif. + +

XtAppContext TQMotif::applicationContext () const +

+Returns the application context. + +

Display * TQMotif::x11Display () [static] +

+Returns the X11 display connection used by the TQt Motif Extension. + + +

+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/qmotifdialog-h.html b/doc/html/qmotifdialog-h.html new file mode 100644 index 00000000..6ea69bd4 --- /dev/null +++ b/doc/html/qmotifdialog-h.html @@ -0,0 +1,153 @@ + + + + + +qmotifdialog.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmotifdialog.h

+ +

This is the verbatim text of the qmotifdialog.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmotifdialog.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQt extension classes for Xt/Motif support.
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the TQt extension for Xt/Motif support.
+**
+** Licensees holding valid TQt Enterprise Edition licenses for X11 may use
+** this file in accordance with the TQt Commercial License Agreement provided
+** with the Software.
+**
+** This file is not available for use under any other license without
+** express written permission from the copyright holder.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about TQt Commercial License Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef TQMOTIFDIALOG_H
+#define TQMOTIFDIALOG_H
+
+#include <qdialog.h>
+
+#include <X11/Intrinsic.h>
+#include <Xm/Xm.h>
+
+class TQMotifWidget;
+class TQMotifDialogPrivate;
+
+class TQMotifDialog : public TQDialog
+{
+    Q_OBJECT
+
+public:
+    // obsolete
+    enum DialogType {
+	Prompt,
+	Selection,
+	Command,
+	FileSelection,
+	Template,
+	Error,
+	Information,
+	Message,
+	Question,
+	Warning,
+	Working
+    };
+    // obsolete
+    TQMotifDialog( DialogType dialogtype,
+		  Widget parent, ArgList args = NULL, Cardinal argcount = 0,
+		  const char *name = 0, bool modal = FALSE, WFlags flags = 0 );
+    // obsolete
+    TQMotifDialog( Widget parent, ArgList args = NULL, Cardinal argcount = 0,
+		  const char *name = 0, bool modal = FALSE, WFlags flags = 0 );
+
+    TQMotifDialog( Widget parent, const char *name = 0,
+		  bool modal = FALSE, WFlags flags = 0 );
+    TQMotifDialog( TQWidget *parent, const char *name = 0,
+		  bool modal = FALSE, WFlags flags = 0 );
+
+    virtual ~TQMotifDialog();
+
+    Widget shell() const;
+    Widget dialog() const;
+
+    void show();
+    void hide();
+
+    static void acceptCallback( Widget, XtPointer, XtPointer );
+    static void rejectCallback( Widget, XtPointer, XtPointer );
+
+public slots:
+    void accept();
+    void reject();
+
+protected:
+    bool event( TQEvent * );
+
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQObject::insertChild;
+#endif
+
+private:
+    TQMotifDialogPrivate *d;
+
+    void init( Widget parent = NULL, ArgList args = NULL, Cardinal argcount = 0);
+
+    void realize( Widget w );
+    void insertChild( Widget w );
+    void deleteChild( Widget w );
+
+    friend void qmotif_dialog_realize( Widget, XtValueMask *, XSetWindowAttributes *);
+    friend void qmotif_dialog_insert_child( Widget );
+    friend void qmotif_dialog_delete_child( Widget );
+    friend void qmotif_dialog_change_managed( Widget );
+};
+
+#endif // TQMOTIFDIALOG_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmotifdialog-members.html b/doc/html/qmotifdialog-members.html new file mode 100644 index 00000000..846ac117 --- /dev/null +++ b/doc/html/qmotifdialog-members.html @@ -0,0 +1,356 @@ + + + + + +TQMotifDialog Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMotifDialog

+ +

This is the complete list of member functions for +TQMotifDialog, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmotifdialog.html b/doc/html/qmotifdialog.html new file mode 100644 index 00000000..dff21a29 --- /dev/null +++ b/doc/html/qmotifdialog.html @@ -0,0 +1,205 @@ + + + + + +TQMotifDialog Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMotifDialog Class Reference

+ +

The TQMotifDialog class provides the TQDialog API for Motif-based dialogs. +More... +

This class is part of the TQt Motif Extension. +

#include <qmotifdialog.h> +

Inherits TQDialog. +

List of all member functions. +

Public Members

+
    +
  • enum DialogType { Prompt, Selection, Command, FileSelection, Template, Error, Information, Message, Question, Warning, Working }  (obsolete)
  • +
  • TQMotifDialog ( DialogType dialogtype, Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )  (obsolete)
  • +
  • TQMotifDialog ( Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )  (obsolete)
  • +
  • TQMotifDialog ( Widget parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )
  • +
  • TQMotifDialog ( TQWidget * parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )
  • +
  • virtual ~TQMotifDialog ()
  • +
  • Widget shell () const
  • +
  • Widget dialog () const
  • +
+

Static Public Members

+ +

Detailed Description

+

This class is defined in the TQt Motif Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQMotifDialog class provides the TQDialog API for Motif-based dialogs. + +

+

TQMotifDialog provides two separate modes of operation. The +application programmer can use TQMotifDialog with an existing +Motif-based dialog and a TQWidget parent, or the application +programmer can use TQMotifDialog with a custom TQt-based dialog and +a Motif-based parent. Modality continues to work as expected. +

Motif-based dialogs must have a Shell widget parent with a +single child, due to retquirements of the Motif toolkit. The Shell widget, which is a special subclass of XmDialogShell, is +created during construction. It can be accessed using the shell() +member function. +

The single child of the Shell can be accessed using the +dialog() member function after it has been created. +

The acceptCallback() and rejectCallback() functions provide a +convenient way to call TQDialog::accept() and TQDialog::reject() +through callbacks. A pointer to the TQMotifDialog should be passed +as the client_data argument to the callback. +

The API and behavior TQMotifDialog is identical to that of TQDialog +when using a custom TQt-based dialog with a Motif-based parent. +The only difference is that a Motif-based parent argument is +passed to the constructor, instead of a TQWidget parent. + +


Member Type Documentation

+

TQMotifDialog::DialogType

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

This enum lists the predefined Motif dialog types. +

    +
  • TQMotifDialog::Prompt +
  • TQMotifDialog::Selection +
  • TQMotifDialog::Command +
  • TQMotifDialog::FileSelection +
  • TQMotifDialog::Template +
  • TQMotifDialog::Error +
  • TQMotifDialog::Information +
  • TQMotifDialog::Message +
  • TQMotifDialog::Question +
  • TQMotifDialog::Warning +
  • TQMotifDialog::Working +
+

Member Function Documentation

+

TQMotifDialog::TQMotifDialog ( DialogType dialogtype, Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Creates a TQMotifDialog using one of the predefined Motif dialog +types. The name, modal and flags arguments are passed to +the TQDialog constructor. +

This constructor creates a Shell widget, which is a special +subclass of XmDialogShell. The parent, args and argcount +arguments are passed to XtCreatePopupShell() when creating the +subclass. You can access the Shell widget with the shell() member +function. +

This constructor also creates the dialog widget with the Shell +widget as its parent. The type of the dialog created is specified +by the dialogtype argument. See the DialogType enum for a list +of available dialog types. You can access the dialog widget with +the dialog() member function. +

Warning: TQMotifDialog takes ownership of the child widget and +destroys it during destruction. You should not destroy the dialog +widget yourself. +

See also DialogType, shell(), and dialog(). + +

TQMotifDialog::TQMotifDialog ( Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Creates a TQMotifDialog which allows the application programmer to +use the Motif-based parent for a custom TQDialog. The name, +modal and flags arguments are passed to the TQDialog +constructor. +

This constructor creates a Shell widget, which is a special +subclass of XmDialogShell. The args and argcount arguments +are passed to XtCreatePopupShell() when creating the subclass. +You can access the Shell widget with the shell() member function. +

The dialog widget is not created by the constructor. You must +create the dialog widget as a child of the the widget returned by +shell(). You can access the child widget with the dialog() member +function. +

A dialog widget is not created by this constructor. Instead, you +should create the dialog widget as a child of this +dialog. TQMotifDialog will take ownership of your custom dialog, +and you can access it with the dialog() member function. +

Warning: TQMotifDialog takes ownership of the child widget and +destroys it during destruction. You should not destroy the dialog +widget yourself. +

See also shell() and dialog(). + +

TQMotifDialog::TQMotifDialog ( Widget parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 ) +

+Creates a TQMotifDialog which allows the application programmer to +use the Motif-based parent for a custom TQDialog. The name, +modal and flags arguments are passed to the TQDialog +constructor. +

This constructor creates a Shell widget, which is a special +subclass of XmDialogShell. You can access the Shell widget +with the shell() member function. +

See also shell(). + +

TQMotifDialog::TQMotifDialog ( TQWidget * parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 ) +

+Creates a TQMotifDialog which allows the application programmer to +use a TQWidget parent for an existing Motif-based dialog. The parent, name, modal and flags arguments are passed to the +TQDialog constructor. +

This constructor creates a Shell widget, which is a special +subclass of XmDialogShell. You can access the Shell widget +with the shell() member functon. +

A dialog widget is not created by this constructor. Instead, you +should create the dialog widget as a child of this +dialog. TQMotifDialog will take ownership of your custom dialog, +and you can access it with the dialog() member function. +

Warning: TQMotifDialog takes ownership of the child widget and +destroys it during destruction. You should not destroy the dialog +widget yourself. +

See also shell() and dialog(). + +

TQMotifDialog::~TQMotifDialog () [virtual] +

+Destroys the TQDialog, dialog widget and Shell widget. + +

void TQMotifDialog::acceptCallback ( Widget, XtPointer client_data, XtPointer ) [static] +

+Convenient Xt/Motif callback to accept the TQMotifDialog. +

The data is passed in client_data. + +

Widget TQMotifDialog::dialog () const +

+Returns the Motif widget embedded in this dialog. + +

void TQMotifDialog::rejectCallback ( Widget, XtPointer client_data, XtPointer ) [static] +

+Convenient Xt/Motif callback to reject the TQMotifDialog. +

The data is passed in client_data. + +

Widget TQMotifDialog::shell () const +

+Returns the Shell widget embedded in this dialog. + +

Example: dialog/mainwindow.cpp. + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmotifplusstyle-h.html b/doc/html/qmotifplusstyle-h.html new file mode 100644 index 00000000..c18822e3 --- /dev/null +++ b/doc/html/qmotifplusstyle-h.html @@ -0,0 +1,169 @@ + + + + + +qmotifplusstyle.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmotifplusstyle.h

+ +

This is the verbatim text of the qmotifplusstyle.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmotifplusstyle.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQMotifPlusStyle class
+**
+** Created : 000727
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQMOTIFPLUSSTYLE_H
+#define TQMOTIFPLUSSTYLE_H
+
+
+#ifndef QT_H
+#include "qmotifstyle.h"
+#endif // QT_H
+
+#if !defined(QT_NO_STYLE_MOTIFPLUS) || defined(QT_PLUGIN)
+
+#if defined(QT_PLUGIN)
+#define Q_EXPORT_STYLE_MOTIFPLUS
+#else
+#define Q_EXPORT_STYLE_MOTIFPLUS Q_EXPORT
+#endif
+
+class Q_EXPORT_STYLE_MOTIFPLUS TQMotifPlusStyle : public TQMotifStyle
+{
+    Q_OBJECT
+
+public:
+    TQMotifPlusStyle(bool hoveringHighlight = TRUE);
+    virtual ~TQMotifPlusStyle();
+
+    void polish(TQPalette &pal);
+    void polish(TQWidget *widget);
+    void unPolish(TQWidget*widget);
+
+    void polish(TQApplication *app);
+    void unPolish(TQApplication *app);
+
+    void drawPrimitive( PrimitiveElement pe,
+			TQPainter *p,
+			const TQRect &r,
+			const TQColorGroup &cg,
+			SFlags flags = Style_Default,
+			const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawControl( ControlElement element,
+		      TQPainter *p,
+		      const TQWidget *widget,
+		      const TQRect &r,
+		      const TQColorGroup &cg,
+		      SFlags how = Style_Default,
+		      const TQStyleOption& = TQStyleOption::Default ) const;
+
+    TQRect subRect(SubRect r, const TQWidget *widget) const;
+
+    void drawComplexControl(ComplexControl control,
+			    TQPainter *p,
+			    const TQWidget *widget,
+			    const TQRect &r,
+			    const TQColorGroup &cg,
+			    SFlags how = Style_Default,
+#ifdef Q_QDOC
+			    SCFlags controls = SC_All,
+#else
+			    SCFlags controls = (uint)SC_All,
+#endif
+			    SCFlags active = SC_None,
+			    const TQStyleOption& = TQStyleOption::Default ) const;
+
+    TQRect querySubControlMetrics(ComplexControl control,
+				 const TQWidget *widget,
+				 SubControl subcontrol,
+				 const TQStyleOption& = TQStyleOption::Default) const;
+
+    int pixelMetric(PixelMetric metric, const TQWidget *widget = 0) const;
+
+    int styleHint(StyleHint sh, const TQWidget *, const TQStyleOption & = TQStyleOption::Default,
+		  TQStyleHintReturn* = 0) const;
+
+protected:
+    bool eventFilter(TQObject *, TQEvent *);
+
+
+private:
+    bool useHoveringHighlight;
+};
+
+
+#endif // QT_NO_STYLE_MOTIFPLUS
+
+#endif // TQMOTIFPLUSSTYLE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmotifplusstyle-members.html b/doc/html/qmotifplusstyle-members.html new file mode 100644 index 00000000..2817ef66 --- /dev/null +++ b/doc/html/qmotifplusstyle-members.html @@ -0,0 +1,112 @@ + + + + + +TQMotifPlusStyle Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMotifPlusStyle

+ +

This is the complete list of member functions for +TQMotifPlusStyle, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmotifplusstyle.html b/doc/html/qmotifplusstyle.html new file mode 100644 index 00000000..8b6dabd0 --- /dev/null +++ b/doc/html/qmotifplusstyle.html @@ -0,0 +1,71 @@ + + + + + +TQMotifPlusStyle Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMotifPlusStyle Class Reference

+ +

The TQMotifPlusStyle class provides a more sophisticated Motif-ish look and feel. +More... +

#include <qmotifplusstyle.h> +

Inherits TQMotifStyle. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQMotifPlusStyle class provides a more sophisticated Motif-ish look and feel. +

+

This class implements a Motif-ish look and feel with the more +sophisticated bevelling as used by the GIMP Toolkit (GTK+) for +Unix/X11. +

See also Widget Appearance and Style. + +


Member Function Documentation

+

TQMotifPlusStyle::TQMotifPlusStyle ( bool hoveringHighlight = TRUE ) +

+Constructs a TQMotifPlusStyle +

If hoveringHighlight is TRUE (the default), then the style will +not highlight push buttons, checkboxes, radiobuttons, comboboxes, +scrollbars or sliders. + + +


+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/qmotifstyle-h.html b/doc/html/qmotifstyle-h.html new file mode 100644 index 00000000..2421a55f --- /dev/null +++ b/doc/html/qmotifstyle-h.html @@ -0,0 +1,181 @@ + + + + + +qmotifstyle.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmotifstyle.h

+ +

This is the verbatim text of the qmotifstyle.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmotifstyle.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of Motif-like style class
+**
+** Created : 981231
+**
+** Copyright (C) 1998-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQMOTIFSTYLE_H
+#define TQMOTIFSTYLE_H
+
+#ifndef QT_H
+#include "qcommonstyle.h"
+#endif // QT_H
+
+#if !defined(QT_NO_STYLE_MOTIF) || defined(QT_PLUGIN)
+
+class TQPalette;
+
+#if defined(QT_PLUGIN)
+#define Q_EXPORT_STYLE_MOTIF
+#else
+#define Q_EXPORT_STYLE_MOTIF Q_EXPORT
+#endif
+
+
+class Q_EXPORT_STYLE_MOTIF TQMotifStyle : public TQCommonStyle
+{
+    Q_OBJECT
+public:
+    TQMotifStyle( bool useHighlightCols=FALSE );
+    virtual ~TQMotifStyle();
+
+    void setUseHighlightColors( bool );
+    bool useHighlightColors() const;
+
+    void polish( TQPalette& );
+    void polish( TQWidget* );
+    void polish( TQApplication* );
+
+    void polishPopupMenu( TQPopupMenu* );
+
+    // new style API
+    void drawPrimitive( PrimitiveElement pe,
+			TQPainter *p,
+			const TQRect &r,
+			const TQColorGroup &cg,
+			SFlags flags = Style_Default,
+			const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawControl( ControlElement element,
+		      TQPainter *p,
+		      const TQWidget *widget,
+		      const TQRect &r,
+		      const TQColorGroup &cg,
+		      SFlags how = Style_Default,
+		      const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawComplexControl( ComplexControl control,
+			     TQPainter *p,
+			     const TQWidget* widget,
+			     const TQRect& r,
+			     const TQColorGroup& cg,
+			     SFlags how = Style_Default,
+#ifdef Q_QDOC
+			     SCFlags sub = SC_All,
+#else
+			     SCFlags sub = (uint)SC_All,
+#endif
+			     SCFlags subActive = SC_None,
+			     const TQStyleOption& = TQStyleOption::Default ) const;
+
+    TQRect querySubControlMetrics( ComplexControl control,
+				  const TQWidget *widget,
+				  SubControl sc,
+				  const TQStyleOption& = TQStyleOption::Default ) const;
+
+    int pixelMetric( PixelMetric metric, const TQWidget *widget = 0 ) const;
+
+    TQSize sizeFromContents( ContentsType contents,
+			    const TQWidget *widget,
+			    const TQSize &contentsSize,
+			    const TQStyleOption& = TQStyleOption::Default ) const;
+
+    TQRect subRect( SubRect r, const TQWidget *widget ) const;
+
+    TQPixmap stylePixmap(StylePixmap, const TQWidget * = 0, const TQStyleOption& = TQStyleOption::Default) const;
+
+    int styleHint(StyleHint sh, const TQWidget *, const TQStyleOption & = TQStyleOption::Default,
+		  TQStyleHintReturn* = 0) const;
+
+private:
+    bool highlightCols;
+
+    // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQMotifStyle( const TQMotifStyle & );
+    TQMotifStyle& operator=( const TQMotifStyle & );
+#endif
+};
+
+#endif // QT_NO_STYLE_MOTIF
+
+#endif // TQMOTIFSTYLE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmotifstyle-members.html b/doc/html/qmotifstyle-members.html new file mode 100644 index 00000000..4dbf58a1 --- /dev/null +++ b/doc/html/qmotifstyle-members.html @@ -0,0 +1,112 @@ + + + + + +TQMotifStyle Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMotifStyle

+ +

This is the complete list of member functions for +TQMotifStyle, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmotifstyle.html b/doc/html/qmotifstyle.html new file mode 100644 index 00000000..bdb3ec3e --- /dev/null +++ b/doc/html/qmotifstyle.html @@ -0,0 +1,93 @@ + + + + + +TQMotifStyle Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMotifStyle Class Reference

+ +

The TQMotifStyle class provides Motif look and feel. +More... +

#include <qmotifstyle.h> +

Inherits TQCommonStyle. +

Inherited by TQCDEStyle, TQMotifPlusStyle, and TQSGIStyle. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQMotifStyle class provides Motif look and feel. +

+

This class implements the Motif look and feel. It closely +resembles the original Motif look as defined by the Open Group, +but with some minor improvements. The Motif style is TQt's default +GUI style on UNIX platforms. +

See also Widget Appearance and Style. + +


Member Function Documentation

+

TQMotifStyle::TQMotifStyle ( bool useHighlightCols = FALSE ) +

+Constructs a TQMotifStyle. +

If useHighlightCols is FALSE (the default), the style will +polish the application's color palette to emulate the Motif way of +highlighting, which is a simple inversion between the base and the +text color. + +

void TQMotifStyle::setUseHighlightColors ( bool arg ) +

+If arg is FALSE, the style will polish the application's color +palette to emulate the Motif way of highlighting, which is a +simple inversion between the base and the text color. +

The effect will show up the next time an application palette is +set via TQApplication::setPalette(). The current color palette of +the application remains unchanged. +

See also TQStyle::polish(). + +

bool TQMotifStyle::useHighlightColors () const +

+Returns TRUE if the style treats the highlight colors of the +palette in a Motif-like manner, which is a simple inversion +between the base and the text color; otherwise returns FALSE. The +default is 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/qmotifwidget-h.html b/doc/html/qmotifwidget-h.html new file mode 100644 index 00000000..bb302420 --- /dev/null +++ b/doc/html/qmotifwidget-h.html @@ -0,0 +1,115 @@ + + + + + +qmotifwidget.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmotifwidget.h

+ +

This is the verbatim text of the qmotifwidget.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmotifwidget.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQt extension classes for Xt/Motif support.
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the TQt extension for Xt/Motif support.
+**
+** Licensees holding valid TQt Enterprise Edition licenses for X11 may use
+** this file in accordance with the TQt Commercial License Agreement provided
+** with the Software.
+**
+** This file is not available for use under any other license without
+** express written permission from the copyright holder.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about TQt Commercial License Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef TQMOTIFWIDGET_H
+#define TQMOTIFWIDGET_H
+
+#include <qwidget.h>
+
+#include <X11/Intrinsic.h>
+
+class TQMotifWidgetPrivate;
+class TQKeyEvent;
+
+class TQMotifWidget : public TQWidget
+{
+    Q_OBJECT
+
+public:
+    TQMotifWidget( TQWidget *, WidgetClass, ArgList = NULL, Cardinal = 0,
+                  const char * = 0, WFlags = 0 );
+    virtual ~TQMotifWidget();
+
+    Widget motifWidget() const;
+
+    void show();
+    void hide();
+
+protected:
+    bool event( TQEvent * );
+    bool eventFilter( TQObject *object, TQEvent *event );
+    bool x11Event(XEvent *event);
+
+private:
+    TQMotifWidgetPrivate *d;
+
+    void realize( Widget );
+
+    friend void qmotif_widget_shell_destroy(Widget w);
+    friend void qmotif_widget_shell_realize( Widget, XtValueMask *,
+                                             XSetWindowAttributes *);
+    friend void qmotif_widget_shell_change_managed( Widget );
+    static bool dispatchTQEvent( TQEvent*, TQWidget*);
+    friend class TQMotifDialog;
+};
+
+#endif // TQMOTIFWIDGET_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmotifwidget-members.html b/doc/html/qmotifwidget-members.html new file mode 100644 index 00000000..2c3c7bc8 --- /dev/null +++ b/doc/html/qmotifwidget-members.html @@ -0,0 +1,339 @@ + + + + + +TQMotifWidget Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMotifWidget

+ +

This is the complete list of member functions for +TQMotifWidget, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmotifwidget.html b/doc/html/qmotifwidget.html new file mode 100644 index 00000000..ac6b8d7c --- /dev/null +++ b/doc/html/qmotifwidget.html @@ -0,0 +1,115 @@ + + + + + +TQMotifWidget Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMotifWidget Class Reference

+ +

The TQMotifWidget class provides the TQWidget API for Xt/Motif widgets. +More... +

This class is part of the TQt Motif Extension. +

#include <qmotifwidget.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+
    +
  • TQMotifWidget ( TQWidget * parent, WidgetClass widgetclass, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, WFlags flags = 0 )
  • +
  • virtual ~TQMotifWidget ()
  • +
  • Widget motifWidget () const
  • +
+

Protected Members

+
    +
  • virtual bool x11Event ( XEvent * event )
  • +
+

Detailed Description

+

This class is defined in the TQt Motif Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQMotifWidget class provides the TQWidget API for Xt/Motif widgets. + +

+

TQMotifWidget exists to provide a TQWidget that can act as a parent +for any Xt/Motif widget. Since the TQMotifWidget is a proper +TQWidget, it can be used as a top-level widget (e.g. 0 parent) or +as a child of any other TQWidget. Note: Since TQMotifWidget acts as +a parent for Xt/Motif widgets, you should not create TQWidgets with +a TQMotifWidget parent. +

An Xt/Motif widget with a top-level TQMotifWidget parent can begin +using the standard TQt dialogs and custom TQDialogs while keeping +the main Xt/Motif interface of the application. Using a +TQMotifWidget as the parent for the various TQDialogs will ensure +that modality and stacking works properly throughout the entire +application. +

Applications moving to TQt may have custom Xt/Motif widgets that +will take time to rewrite with TQt. Such applications can use +these custom widgets as TQMotifWidget with TQWidget parents. This +allows the application's interface to be replaced gradually. +

Warning: TQMotifWidget uses the X11 window ID of the Motif widget +directly, instead of creating its own. Because ot this, +TQWidget::reparent() will not work. This includes the functions +TQWidget::showFullScreen() and TQWidget::showNormal(), which use +TQWidget::reparent(). + +


Member Function Documentation

+

TQMotifWidget::TQMotifWidget ( TQWidget * parent, WidgetClass widgetclass, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, WFlags flags = 0 ) +

+Creates a TQMotifWidget of the given widgetclass as a child of +parent, with the name name and widget flags flags. +

The args and argcount arguments are passed on to +XtCreateWidget. +

The motifWidget() function returns the resulting Xt/Motif widget. +This widget can be used as a parent for any other Xt/Motif widget. +

If parent is a TQMotifWidget, the Xt/Motif widget is created as +a child of the parent's motifWidget(). If \ parent is 0 or a +normal TQWidget, the Xt/Motif widget is created as a child of a +special TopLevelShell widget. Xt/Motif widgets can use this +special TopLevelShell parent as the parent for existing +Xt/Motif dialogs or TQMotifDialogs. + +

TQMotifWidget::~TQMotifWidget () [virtual] +

+Destroys the TQMotifWidget. The special TopLevelShell is also +destroyed, if it was created during construction. + +

Widget TQMotifWidget::motifWidget () const +

+Returns the embedded Xt/Motif widget. If a Shell widget was +created by the constructor, you can access it with XtParent(). + + +

+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/qmouse_qws-h.html b/doc/html/qmouse_qws-h.html new file mode 100644 index 00000000..30bd9909 --- /dev/null +++ b/doc/html/qmouse_qws-h.html @@ -0,0 +1,146 @@ + + + + + +qmouse_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmouse_qws.h

+ +

This is the verbatim text of the qmouse_qws.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmouse_qws.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQt/Embedded mouse driver
+**
+** Created : 20020220
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQMOUSE_QWS_H
+#define TQMOUSE_QWS_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qpointarray.h"
+#endif // QT_H
+
+class TQWSPointerCalibrationData
+{
+public:
+    enum Location { TopLeft = 0, BottomLeft = 1, BottomRight = 2, TopRight = 3,
+		    Center = 4, LastLocation = Center };
+    TQPoint devPoints[5];
+    TQPoint screenPoints[5];
+};
+
+class TQWSMouseHandler
+{
+public:
+    TQWSMouseHandler( const TQString &driver = TQString::null, const TQString &device = TQString::null );
+    virtual ~TQWSMouseHandler();
+
+    virtual void clearCalibration() {}
+    virtual void calibrate( TQWSPointerCalibrationData * ) {}
+    virtual void getCalibration( TQWSPointerCalibrationData * ) {}
+
+    void limitToScreen( TQPoint &pt );
+    void mouseChanged(const TQPoint& pos, int bstate);
+    const TQPoint &pos() const { return mousePos; }
+
+protected:
+    TQPoint &mousePos;
+};
+
+
+class TQWSCalibratedMouseHandler : public TQWSMouseHandler
+{
+public:
+    TQWSCalibratedMouseHandler( const TQString &driver = TQString::null, const TQString &device = TQString::null );
+
+    virtual void clearCalibration();
+    virtual void calibrate( TQWSPointerCalibrationData * );
+    virtual void getCalibration( TQWSPointerCalibrationData * );
+
+    bool sendFiltered( const TQPoint &, int button );
+    TQPoint transform( const TQPoint & );
+
+protected:
+    void readCalibration();
+    void writeCalibration();
+    void setFilterSize( int );
+
+private:
+    int a, b, c;
+    int d, e, f;
+    int s;
+    TQPointArray samples;
+    unsigned int currSample;
+    unsigned int numSamples;
+};
+
+#endif // TQMOUSE_QWS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmousedriverfactory-members.html b/doc/html/qmousedriverfactory-members.html new file mode 100644 index 00000000..30a91a67 --- /dev/null +++ b/doc/html/qmousedriverfactory-members.html @@ -0,0 +1,48 @@ + + + + + +TQMouseDriverFactory Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMouseDriverFactory

+ +

This is the complete list of member functions for +TQMouseDriverFactory, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmousedriverfactory.html b/doc/html/qmousedriverfactory.html new file mode 100644 index 00000000..b4d70012 --- /dev/null +++ b/doc/html/qmousedriverfactory.html @@ -0,0 +1,79 @@ + + + + + +TQMouseDriverFactory Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMouseDriverFactory Class Reference

+ +

The TQMouseDriverFactory class creates TQWSMouseHandler +objects for TQt/Embedded. +More... +

#include <qmousedriverfactory_qws.h> +

List of all member functions. +

Static Public Members

+
    +
  • TQStringList keys ()
  • +
  • TQWSMouseHandler * create ( const TQString & key, const TQString & device )
  • +
+

Detailed Description

+ + +The TQMouseDriverFactory class creates TQWSMouseHandler +objects for TQt/Embedded. +

The graphics driver factory creates a TQWSMouseHandler object for a +given key with TQMouseDriverFactory::create(key). +

The drivers are either built-in or dynamically loaded from a +driver plugin (see TQMouseDriverPlugin). +

This class is only available in TQt/Embedded. +

TQMouseDriverFactory::keys() returns a list of valid keys. + +


Member Function Documentation

+

TQWSMouseHandler * TQMouseDriverFactory::create ( const TQString & key, const TQString & device ) [static] +

+Creates a TQWSMouseHandler object that matches key and uses +device device. This is either a built-in driver, or a driver +from a driver plugin. +

See also keys(). + +

TQStringList TQMouseDriverFactory::keys () [static] +

+Returns the list of keys this factory can create drivers for. +

See also create(). + + +


+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/qmousedriverfactory_qws-h.html b/doc/html/qmousedriverfactory_qws-h.html new file mode 100644 index 00000000..63aae8f2 --- /dev/null +++ b/doc/html/qmousedriverfactory_qws-h.html @@ -0,0 +1,101 @@ + + + + + +qmousedriverfactory_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmousedriverfactory_qws.h

+ +

This is the verbatim text of the qmousedriverfactory_qws.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmousedriverfactory_qws.h   3.3.8   edited Jan 11 14:46 $
+**
+** ...
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQMOUSEDRIVERFACTORY_QWS_H
+#define TQMOUSEDRIVERFACTORY_QWS_H
+
+#ifndef QT_H
+#include "qstringlist.h"
+#endif // QT_H
+
+class TQString;
+class TQWSMouseHandler;
+
+class Q_EXPORT TQMouseDriverFactory
+{
+public:
+#ifndef QT_NO_STRINGLIST
+    static TQStringList keys();
+#endif
+    static TQWSMouseHandler *create( const TQString&, const TQString & );
+};
+
+#endif //TQMOUSEDRIVERFACTORY_QWS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmousedriverplugin-members.html b/doc/html/qmousedriverplugin-members.html new file mode 100644 index 00000000..b36ecb30 --- /dev/null +++ b/doc/html/qmousedriverplugin-members.html @@ -0,0 +1,50 @@ + + + + + +TQMouseDriverPlugin Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMouseDriverPlugin

+ +

This is the complete list of member functions for +TQMouseDriverPlugin, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmousedriverplugin.html b/doc/html/qmousedriverplugin.html new file mode 100644 index 00000000..d24317d2 --- /dev/null +++ b/doc/html/qmousedriverplugin.html @@ -0,0 +1,97 @@ + + + + + +TQMouseDriverPlugin Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMouseDriverPlugin Class Reference

+ +

The TQMouseDriverPlugin class provides an abstract base for +TQt/Embedded mouse driver plugins. +More... +

#include <qmousedriverplugin_qws.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQMouseDriverPlugin class provides an abstract base for +TQt/Embedded mouse driver plugins. +

+

The mouse driver plugin is a simple plugin interface that makes it +easy to create custom mouse drivers. +

Writing a mouse driver plugin is achieved by subclassing this base +class, reimplementing the pure virtual functions keys() and +create(), and exporting the class with the Q_EXPORT_PLUGIN +macro. See the Plugins + documentation for details. +

This class is only available in TQt/Embedded. +

See also Plugins. + +


Member Function Documentation

+

TQMouseDriverPlugin::TQMouseDriverPlugin () +

+Constructs a mouse driver plugin. This is invoked automatically by +the Q_EXPORT_PLUGIN macro. + +

TQMouseDriverPlugin::~TQMouseDriverPlugin () +

+Destroys the mouse driver plugin. +

You never have to call this explicitly. TQt destroys a plugin +automatically when it is no longer used. + +

TQWSMouseHandler * TQMouseDriverPlugin::create ( const TQString & driver, const TQString & device ) [pure virtual] +

+ +

Creates a driver matching the type specified by driver and +which uses device device. +

See also keys(). + +

TQStringList TQMouseDriverPlugin::keys () const [pure virtual] +

+ +

Returns the list of mouse drivers this plugin supports. +

See also create(). + + +


+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/qmousedriverplugin_qws-h.html b/doc/html/qmousedriverplugin_qws-h.html new file mode 100644 index 00000000..a30f1bb0 --- /dev/null +++ b/doc/html/qmousedriverplugin_qws-h.html @@ -0,0 +1,115 @@ + + + + + +qmousedriverplugin_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmousedriverplugin_qws.h

+ +

This is the verbatim text of the qmousedriverplugin_qws.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmousedriverplugin_qws.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQMouseDriverPlugin
+**
+** Created : 20020220
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQMOUSEDRIVERPLUGIN_QWS_H
+#define TQMOUSEDRIVERPLUGIN_QWS_H
+
+#ifndef QT_H
+#include "qgplugin.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_COMPONENT
+
+class TQWSMouseHandler;
+class TQMouseDriverPluginPrivate;
+
+class Q_EXPORT TQMouseDriverPlugin : public TQGPlugin
+{
+    Q_OBJECT
+public:
+    TQMouseDriverPlugin();
+    ~TQMouseDriverPlugin();
+
+#ifndef QT_NO_STRINGLIST
+    virtual TQStringList keys() const = 0;
+#endif
+    virtual TQWSMouseHandler* create( const TQString& driver, const TQString &device ) = 0;
+
+private:
+    TQMouseDriverPluginPrivate *d;
+};
+
+#endif // QT_NO_COMPONENT
+
+#endif // TQMOUSEDRIVERPLUGIN_QWS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmouseevent-members.html b/doc/html/qmouseevent-members.html new file mode 100644 index 00000000..8eb2daf6 --- /dev/null +++ b/doc/html/qmouseevent-members.html @@ -0,0 +1,61 @@ + + + + + +TQMouseEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMouseEvent

+ +

This is the complete list of member functions for +TQMouseEvent, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmouseevent.html b/doc/html/qmouseevent.html new file mode 100644 index 00000000..2f076db9 --- /dev/null +++ b/doc/html/qmouseevent.html @@ -0,0 +1,233 @@ + + + + + +TQMouseEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMouseEvent Class Reference

+ +

The TQMouseEvent class contains parameters that describe a mouse event. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+
    +
  • TQMouseEvent ( Type type, const TQPoint & pos, int button, int state )
  • +
  • TQMouseEvent ( Type type, const TQPoint & pos, const TQPoint & globalPos, int button, int state )
  • +
  • const TQPoint & pos () const
  • +
  • const TQPoint & globalPos () const
  • +
  • int x () const
  • +
  • int y () const
  • +
  • int globalX () const
  • +
  • int globalY () const
  • +
  • ButtonState button () const
  • +
  • ButtonState state () const
  • +
  • ButtonState stateAfter () const
  • +
  • bool isAccepted () const
  • +
  • void accept ()
  • +
  • void ignore ()
  • +
+

Detailed Description

+ + + +

The TQMouseEvent class contains parameters that describe a mouse event. +

Mouse events occur when a mouse button is pressed or released +inside a widget or when the mouse cursor is moved. +

Mouse move events will occur only when a mouse button is pressed +down, unless mouse tracking has been enabled with +TQWidget::setMouseTracking(). +

TQt automatically grabs the mouse when a mouse button is pressed +inside a widget; the widget will continue to receive mouse events +until the last mouse button is released. +

A mouse event contains a special accept flag that indicates +whether the receiver wants the event. You should call +TQMouseEvent::ignore() if the mouse event is not handled by your +widget. A mouse event is propagated up the parent widget chain +until a widget accepts it with TQMouseEvent::accept() or an event +filter consumes it. +

The functions pos(), x() and y() give the cursor position relative +to the widget that receives the mouse event. If you move the +widget as a result of the mouse event, use the global position +returned by globalPos() to avoid a shaking motion. +

The TQWidget::setEnabled() function can be used to enable or +disable mouse and keyboard events for a widget. +

The event handlers TQWidget::mousePressEvent(), +TQWidget::mouseReleaseEvent(), TQWidget::mouseDoubleClickEvent() and +TQWidget::mouseMoveEvent() receive mouse events. +

See also TQWidget::mouseTracking, TQWidget::grabMouse(), TQCursor::pos(), and Event Classes. + +


Member Function Documentation

+

TQMouseEvent::TQMouseEvent ( Type type, const TQPoint & pos, int button, int state ) +

+ +

Constructs a mouse event object. +

The type parameter must be one of TQEvent::MouseButtonPress, +TQEvent::MouseButtonRelease, TQEvent::MouseButtonDblClick or +TQEvent::MouseMove. +

The pos parameter specifies the position relative to the +receiving widget. button specifies the button that caused the event, which should be TQt::NoButton (0), if type is MouseMove. state is the +ButtonState at the time of the +event. +

The globalPos() is initialized to TQCursor::pos(), which may not be +appropriate. Use the other constructor to specify the global +position explicitly. + +

TQMouseEvent::TQMouseEvent ( Type type, const TQPoint & pos, const TQPoint & globalPos, int button, int state ) +

+ +

Constructs a mouse event object. +

The type parameter must be TQEvent::MouseButtonPress, TQEvent::MouseButtonRelease, TQEvent::MouseButtonDblClick or TQEvent::MouseMove. +

The pos parameter specifies the position relative to the +receiving widget. globalPos is the position in absolute +coordinates. button specifies the button that caused the event, which should be TQt::NoButton (0), if type is MouseMove. state is the +ButtonState at the time of the +event. +

+

void TQMouseEvent::accept () +

+ +

Sets the accept flag of the mouse event object. +

Setting the accept parameter indicates that the receiver of the +event wants the mouse event. Unwanted mouse events are sent to the +parent widget. +

The accept flag is set by default. +

See also ignore(). + +

ButtonState TQMouseEvent::button () const +

+ +

Returns the button that caused the event. +

Possible return values are LeftButton, RightButton, MidButton and NoButton. +

Note that the returned value is always NoButton for mouse move +events. +

See also state() and TQt::ButtonState. + +

Examples: dclock/dclock.cpp, life/life.cpp, and t14/cannon.cpp. +

const TQPoint & TQMouseEvent::globalPos () const +

+ +

Returns the global position of the mouse pointer at the time of the event. This is important on asynchronous window systems +like X11. Whenever you move your widgets around in response to +mouse events, globalPos() may differ a lot from the current +pointer position TQCursor::pos(), and from TQWidget::mapToGlobal( +pos() ). +

See also globalX() and globalY(). + +

Example: aclock/aclock.cpp. +

int TQMouseEvent::globalX () const +

+ +

Returns the global x-position of the mouse pointer at the time of +the event. +

See also globalY() and globalPos(). + +

int TQMouseEvent::globalY () const +

+ +

Returns the global y-position of the mouse pointer at the time of +the event. +

See also globalX() and globalPos(). + +

void TQMouseEvent::ignore () +

+ +

Clears the accept flag parameter of the mouse event object. +

Clearing the accept parameter indicates that the event receiver +does not want the mouse event. Unwanted mouse events are sent to +the parent widget. +

The accept flag is set by default. +

See also accept(). + +

bool TQMouseEvent::isAccepted () const +

+ +

Returns TRUE if the receiver of the event wants to keep the key; +otherwise returns FALSE. + +

const TQPoint & TQMouseEvent::pos () const +

+ +

Returns the position of the mouse pointer relative to the widget +that received the event. +

If you move the widget as a result of the mouse event, use the +global position returned by globalPos() to avoid a shaking motion. +

See also x(), y(), and globalPos(). + +

Examples: chart/canvasview.cpp, drawlines/connect.cpp, life/life.cpp, popup/popup.cpp, qmag/qmag.cpp, t14/cannon.cpp, and tooltip/tooltip.cpp. +

ButtonState TQMouseEvent::state () const +

+ +

Returns the button state (a combination of mouse buttons and +keyboard modifiers), i.e. what buttons and keys were being pressed +immediately before the event was generated. +

This means that if you have a TQEvent::MouseButtonPress or a TQEvent::MouseButtonDblClick state() will not include the mouse +button that's pressed. But once the mouse button has been +released, the TQEvent::MouseButtonRelease event will have the +button() that was pressed. +

This value is mainly interesting for TQEvent::MouseMove; for the +other cases, button() is more useful. +

The returned value is LeftButton, RightButton, MidButton, +ShiftButton, ControlButton and AltButton OR'ed together. +

See also button(), stateAfter(), and TQt::ButtonState. + +

Examples: popup/popup.cpp and showimg/showimg.cpp. +

ButtonState TQMouseEvent::stateAfter () const +

+ +

Returns the state of buttons after the event. +

See also state() and TQt::ButtonState. + +

int TQMouseEvent::x () const +

+ +

Returns the x-position of the mouse pointer, relative to the +widget that received the event. +

See also y() and pos(). + +

Example: showimg/showimg.cpp. +

int TQMouseEvent::y () const +

+ +

Returns the y-position of the mouse pointer, relative to the +widget that received the event. +

See also x() and pos(). + +

Example: showimg/showimg.cpp. + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmoveevent-members.html b/doc/html/qmoveevent-members.html new file mode 100644 index 00000000..7b8c93ea --- /dev/null +++ b/doc/html/qmoveevent-members.html @@ -0,0 +1,51 @@ + + + + + +TQMoveEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMoveEvent

+ +

This is the complete list of member functions for +TQMoveEvent, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmoveevent.html b/doc/html/qmoveevent.html new file mode 100644 index 00000000..45956cce --- /dev/null +++ b/doc/html/qmoveevent.html @@ -0,0 +1,82 @@ + + + + + +TQMoveEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMoveEvent Class Reference

+ +

The TQMoveEvent class contains event parameters for move events. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+
    +
  • TQMoveEvent ( const TQPoint & pos, const TQPoint & oldPos )
  • +
  • const TQPoint & pos () const
  • +
  • const TQPoint & oldPos () const
  • +
+

Detailed Description

+ + +The TQMoveEvent class contains event parameters for move events. +

+

Move events are sent to widgets that have been moved to a new position +relative to their parent. +

The event handler TQWidget::moveEvent() receives move events. +

See also TQWidget::pos, TQWidget::geometry, and Event Classes. + +


Member Function Documentation

+

TQMoveEvent::TQMoveEvent ( const TQPoint & pos, const TQPoint & oldPos ) +

+ +

Constructs a move event with the new and old widget positions, pos and oldPos respectively. + +

const TQPoint & TQMoveEvent::oldPos () const +

+ +

Returns the old position of the widget. + +

const TQPoint & TQMoveEvent::pos () const +

+ +

Returns the new position of the widget. This excludes the window +frame for top level widgets. + + +


+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/qmovie-h.html b/doc/html/qmovie-h.html new file mode 100644 index 00000000..c05278a5 --- /dev/null +++ b/doc/html/qmovie-h.html @@ -0,0 +1,165 @@ + + + + + +qmovie.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmovie.h

+ +

This is the verbatim text of the qmovie.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmovie.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of movie classes
+**
+** Created : 970617
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQMOVIE_H
+#define TQMOVIE_H
+
+#ifndef QT_H
+#include "qpixmap.h" // ### remove or keep for users' convenience?
+#endif // QT_H
+
+#ifndef QT_NO_MOVIE
+
+class TQDataSource;
+class TQObject;
+class TQMoviePrivate;
+
+class Q_EXPORT TQMovie {
+public:
+    TQMovie();
+    TQMovie(int bufsize);
+    TQMovie(TQDataSource*, int bufsize=1024);
+    TQMovie(const TQString &fileName, int bufsize=1024);
+    TQMovie(TQByteArray data, int bufsize=1024);
+    TQMovie(const TQMovie&);
+    ~TQMovie();
+
+    TQMovie& operator=(const TQMovie&);
+
+    int pushSpace() const;
+    void pushData(const uchar* data, int length);
+
+    const TQColor& backgroundColor() const;
+    void setBackgroundColor(const TQColor&);
+
+    const TQRect& getValidRect() const;
+    const TQPixmap& framePixmap() const;
+    const TQImage& frameImage() const;
+
+    bool isNull() const;
+
+    int  frameNumber() const;
+    int  steps() const;
+    bool paused() const;
+    bool finished() const;
+    bool running() const;
+
+    void unpause();
+    void pause();
+    void step();
+    void step(int);
+    void restart();
+
+    int  speed() const;
+    void setSpeed(int);
+
+    void connectResize(TQObject* receiver, const char *member);
+    void disconnectResize(TQObject* receiver, const char *member=0);
+
+    void connectUpdate(TQObject* receiver, const char *member);
+    void disconnectUpdate(TQObject* receiver, const char *member=0);
+
+#ifdef Q_WS_QWS
+    // Temporary hack
+    void setDisplayWidget(TQWidget * w);
+#endif
+
+    enum Status { SourceEmpty=-2,
+		  UnrecognizedFormat=-1,
+		  Paused=1,
+		  EndOfFrame=2,
+		  EndOfLoop=3,
+		  EndOfMovie=4,
+		  SpeedChanged=5 };
+    void connectStatus(TQObject* receiver, const char *member);
+    void disconnectStatus(TQObject* receiver, const char *member=0);
+
+private:
+    TQMoviePrivate *d;
+};
+
+#endif	// QT_NO_MOVIE
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmovie-members.html b/doc/html/qmovie-members.html new file mode 100644 index 00000000..a545a156 --- /dev/null +++ b/doc/html/qmovie-members.html @@ -0,0 +1,74 @@ + + + + + +TQMovie Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMovie

+ +

This is the complete list of member functions for +TQMovie, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmovie.html b/doc/html/qmovie.html new file mode 100644 index 00000000..dc0b5bc7 --- /dev/null +++ b/doc/html/qmovie.html @@ -0,0 +1,388 @@ + + + + + +TQMovie Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMovie Class Reference

+ +

The TQMovie class provides incremental loading of animations or images, signalling as it progresses. +More... +

#include <qmovie.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQMovie class provides incremental loading of animations or images, signalling as it progresses. +

+ + + +

The simplest way to display a TQMovie is to use a TQLabel and +TQLabel::setMovie(). +

A TQMovie provides a TQPixmap as the framePixmap(); connections can +be made via connectResize() and connectUpdate() to receive +notification of size and pixmap changes. All decoding is driven +by the normal event-processing mechanisms. +

The movie begins playing as soon as the TQMovie is created +(actually, once control returns to the event loop). When the last +frame in the movie has been played, it may loop back to the start +if such looping is defined in the input source. +

TQMovie objects are explicitly shared. This means that a TQMovie +copied from another TQMovie will be displaying the same frame at +all times. If one shared movie pauses, all pause. To make independent movies, they must be constructed separately. +

The set of data formats supported by TQMovie is determined by the +decoder factories that have been installed; the format of the +input is determined as the input is decoded. +

The supported formats are MNG (if TQt is configured with MNG +support enabled) and GIF (if TQt is configured with GIF support +enabled, see qgif.h). +

If TQt is configured to support GIF reading, we are retquired to +state that "The Graphics Interchange Format(c) is the Copyright +property of CompuServe Incorporated. GIF(sm) is a Service Mark +property of CompuServe Incorporated. +

Warning: If you are in a country that recognizes software patents +and in which Unisys holds a patent on LZW compression and/or +decompression and you want to use GIF, Unisys may retquire you to +license that technology. Such countries include Canada, Japan, +the USA, France, Germany, Italy and the UK. +

GIF support may be removed completely in a future version of TQt. +We recommend using the MNG or PNG format. +

TQMovie
+

See also TQLabel::setMovie(), Graphics Classes, Image Processing Classes, and Multimedia Classes. + +


Member Type Documentation

+

TQMovie::Status

+ +
    +
  • TQMovie::SourceEmpty +
  • TQMovie::UnrecognizedFormat +
  • TQMovie::Paused +
  • TQMovie::EndOfFrame +
  • TQMovie::EndOfLoop +
  • TQMovie::EndOfMovie +
  • TQMovie::SpeedChanged +
+

Member Function Documentation

+

TQMovie::TQMovie () +

+Constructs a null TQMovie. The only interesting thing to do with +such a movie is to assign another movie to it. +

See also isNull(). + +

TQMovie::TQMovie ( int bufsize ) +

+Constructs a TQMovie with an external data source. You should later +call pushData() to send incoming animation data to the movie. +

The bufsize argument sets the maximum amount of data the movie +will transfer from the data source per event loop. The lower this +value, the better interleaved the movie playback will be with +other event processing, but the slower the overall processing will +be. +

See also pushData(). + +

TQMovie::TQMovie ( TQDataSource * src, int bufsize = 1024 ) +

+Constructs a TQMovie that reads an image sequence from the given +data source, src. The source must be allocated dynamically, +because TQMovie will take ownership of it and will destroy it when +the movie is destroyed. The movie starts playing as soon as event +processing continues. +

The bufsize argument sets the maximum amount of data the movie +will transfer from the data source per event loop. The lower this +value, the better interleaved the movie playback will be with +other event processing, but the slower the overall processing will +be. + +

TQMovie::TQMovie ( const TQString & fileName, int bufsize = 1024 ) +

+Constructs a TQMovie that reads an image sequence from the file, fileName. +

The bufsize argument sets the maximum amount of data the movie +will transfer from the data source per event loop. The lower this +value, the better interleaved the movie playback will be with +other event processing, but the slower the overall processing will +be. + +

TQMovie::TQMovie ( TQByteArray data, int bufsize = 1024 ) +

+Constructs a TQMovie that reads an image sequence from the byte +array, data. +

The bufsize argument sets the maximum amount of data the movie +will transfer from the data source per event loop. The lower this +value, the better interleaved the movie playback will be with +other event processing, but the slower the overall processing will +be. + +

TQMovie::TQMovie ( const TQMovie & movie ) +

+Constructs a movie that uses the same data as movie movie. +TQMovies use explicit sharing, so operations on the copy will +affect both. + +

TQMovie::~TQMovie () +

+Destroys the TQMovie. If this is the last reference to the data of +the movie, the data is deallocated. + +

const TQColor & TQMovie::backgroundColor () const +

+Returns the background color of the movie set by +setBackgroundColor(). + +

void TQMovie::connectResize ( TQObject * receiver, const char * member ) +

+Connects the receiver's member of type void member(const TQSize&) so that it is signalled when the movie changes size. +

Note that due to the explicit sharing of TQMovie objects, these +connections persist until they are explicitly disconnected with +disconnectResize() or until every shared copy of the movie is +deleted. + +

Example: movies/main.cpp. +

void TQMovie::connectStatus ( TQObject * receiver, const char * member ) +

+Connects the receiver's member, of type void member(int) so that it is signalled when the movie changes +status. The status codes are negative for errors and positive for +information. +

+
Status Code Meaning +
TQMovie::SourceEmpty +signalled if the input cannot be read. +
TQMovie::UnrecognizedFormat +signalled if the input data is unrecognized. +
TQMovie::Paused +signalled when the movie is paused by a call to paused() +or by after stepping pauses. +
TQMovie::EndOfFrame +signalled at end-of-frame after any update and Paused signals. +
TQMovie::EndOfLoop +signalled at end-of-loop, after any update signals, +EndOfFrame - but before EndOfMovie. +
TQMovie::EndOfMovie +signalled when the movie completes and is not about to loop. +
+

More status messages may be added in the future, so a general test +for errors would test for negative. +

Note that due to the explicit sharing of TQMovie objects, these +connections persist until they are explicitly disconnected with +disconnectStatus() or until every shared copy of the movie is +deleted. + +

Example: movies/main.cpp. +

void TQMovie::connectUpdate ( TQObject * receiver, const char * member ) +

+Connects the receiver's member of type void member(const TQRect&) so that it is signalled when an area of the framePixmap() +has changed since the previous frame. +

Note that due to the explicit sharing of TQMovie objects, these +connections persist until they are explicitly disconnected with +disconnectUpdate() or until every shared copy of the movie is +deleted. + +

Example: movies/main.cpp. +

void TQMovie::disconnectResize ( TQObject * receiver, const char * member = 0 ) +

+Disconnects the receiver's member (or all members if member is zero) that were previously connected by connectResize(). + +

void TQMovie::disconnectStatus ( TQObject * receiver, const char * member = 0 ) +

+Disconnects the receiver's member (or all members if member is zero) that were previously connected by connectStatus(). + +

void TQMovie::disconnectUpdate ( TQObject * receiver, const char * member = 0 ) +

+Disconnects the receiver's member (or all members if \q +member is zero) that were previously connected by connectUpdate(). + +

bool TQMovie::finished () const +

+Returns TRUE if the image is no longer playing: this happens when +all loops of all frames are complete; otherwise returns FALSE. + +

Example: movies/main.cpp. +

const TQImage & TQMovie::frameImage () const +

+Returns the current frame of the movie, as a TQImage. It is not +generally useful to keep a copy of this image. Also note that you +must not call this function if the movie is finished(), since by +then the image will not be available. +

See also framePixmap(). + +

int TQMovie::frameNumber () const +

+Returns the number of times EndOfFrame has been emitted since the +start of the current loop of the movie. Thus, before any +EndOfFrame has been emitted the value will be 0; within slots +processing the first signal, frameNumber() will be 1, and so on. + +

const TQPixmap & TQMovie::framePixmap () const +

+Returns the current frame of the movie, as a TQPixmap. It is not +generally useful to keep a copy of this pixmap. It is better to +keep a copy of the TQMovie and get the framePixmap() only when +needed for drawing. +

See also frameImage(). + +

Example: movies/main.cpp. +

const TQRect & TQMovie::getValidRect () const +

+Returns the area of the pixmap for which pixels have been +generated. + +

bool TQMovie::isNull () const +

+Returns TRUE if the movie is null; otherwise returns FALSE. + +

TQMovie & TQMovie::operator= ( const TQMovie & movie ) +

+Makes this movie use the same data as movie movie. TQMovies use +explicit sharing. + +

void TQMovie::pause () +

+Pauses the progress of the animation. +

See also unpause(). + +

Example: movies/main.cpp. +

bool TQMovie::paused () const +

+Returns TRUE if the image is paused; otherwise returns FALSE. + +

Example: movies/main.cpp. +

void TQMovie::pushData ( const uchar * data, int length ) +

+Pushes length bytes from data into the movie. length must +be no more than the amount returned by pushSpace() since the +previous call to pushData(). + +

int TQMovie::pushSpace () const +

+Returns the maximum amount of data that can currently be pushed +into the movie by a call to pushData(). This is affected by the +initial buffer size, but varies as the movie plays and data is +consumed. + +

void TQMovie::restart () +

+Rewinds the movie to the beginning. If the movie has not been +paused, it begins playing again. + +

Example: movies/main.cpp. +

bool TQMovie::running () const +

+Returns TRUE if the image is not single-stepping, not paused, and +not finished; otherwise returns FALSE. + +

void TQMovie::setBackgroundColor ( const TQColor & c ) +

+Sets the background color of the pixmap to c. If the background +color isValid(), the pixmap will never have a mask because the +background color will be used in transparent regions of the image. +

See also backgroundColor(). + +

void TQMovie::setSpeed ( int percent ) +

+Sets the movie's play speed as a percentage, to percent. This +is a percentage of the speed dictated by the input data format. +The default is 100 percent. + +

int TQMovie::speed () const +

+Returns the movie's play speed as a percentage. The default is 100 +percent. +

See also setSpeed(). + +

void TQMovie::step () +

+Steps forward 1 frame and then pauses. + +

Example: movies/main.cpp. +

void TQMovie::step ( int steps ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Steps forward, showing steps frames, and then pauses. + +

int TQMovie::steps () const +

+Returns the number of steps remaining after a call to step(). If +the movie is paused, steps() returns 0. If it's running normally +or is finished, steps() returns a negative number. + +

Example: movies/main.cpp. +

void TQMovie::unpause () +

+Unpauses the progress of the animation. +

See also pause(). + +

Example: movies/main.cpp. + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmovie.png b/doc/html/qmovie.png new file mode 100644 index 00000000..2833adfe Binary files /dev/null and b/doc/html/qmovie.png differ diff --git a/doc/html/qmsgbox-m.png b/doc/html/qmsgbox-m.png new file mode 100644 index 00000000..1684206f Binary files /dev/null and b/doc/html/qmsgbox-m.png differ diff --git a/doc/html/qmsgbox-w.png b/doc/html/qmsgbox-w.png new file mode 100644 index 00000000..8eea8387 Binary files /dev/null and b/doc/html/qmsgbox-w.png differ diff --git a/doc/html/qmultilineedit-h.html b/doc/html/qmultilineedit-h.html new file mode 100644 index 00000000..776e60b7 --- /dev/null +++ b/doc/html/qmultilineedit-h.html @@ -0,0 +1,186 @@ + + + + + +qmultilineedit.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmultilineedit.h

+ +

This is the verbatim text of the qmultilineedit.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/**********************************************************************
+** $Id: qt/qmultilineedit.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQMultiLineEdit widget class
+**
+** Created : 961005
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQMULTILINEEDIT_H
+#define TQMULTILINEEDIT_H
+
+#ifndef QT_H
+#include "qtextedit.h"
+#endif // QT_H
+
+#ifndef QT_NO_MULTILINEEDIT
+
+class TQMultiLineEditCommand;
+class TQValidator;
+class TQMultiLineEditData;
+
+class Q_EXPORT TQMultiLineEdit : public TQTextEdit
+{
+    Q_OBJECT
+    Q_PROPERTY( int numLines READ numLines )
+    Q_PROPERTY( bool atBeginning READ atBeginning )
+    Q_PROPERTY( bool atEnd READ atEnd )
+    Q_PROPERTY( Alignment alignment READ alignment WRITE setAlignment )
+    Q_PROPERTY( bool edited READ edited WRITE setEdited DESIGNABLE false )
+
+public:
+    TQMultiLineEdit( TQWidget* parent=0, const char* name=0 );
+    ~TQMultiLineEdit();
+
+    TQString textLine( int line ) const;
+    int numLines() const;
+
+    virtual void insertLine( const TQString &s, int line = -1 );
+    virtual void insertAt( const TQString &s, int line, int col ) {
+	insertAt( s, line, col, FALSE );
+    }
+    virtual void insertAt( const TQString &s, int line, int col, bool mark );
+    virtual void removeLine( int line );
+    virtual void setCursorPosition( int line, int col ) {
+	setCursorPosition( line, col, FALSE );
+    }
+    virtual void setCursorPosition( int line, int col, bool mark );
+    bool atBeginning() const;
+    bool atEnd() const;
+
+    void setAlignment( int flags );
+    int alignment() const;
+
+    void setEdited( bool );
+    bool edited() const;
+
+    bool hasMarkedText() const;
+    TQString markedText() const;
+
+    void cursorWordForward( bool mark );
+    void cursorWordBackward( bool mark );
+
+    // noops
+    bool autoUpdate() const { return TRUE; }
+    virtual void setAutoUpdate( bool ) {}
+
+    int totalWidth() const { return contentsWidth(); }
+    int totalHeight() const { return contentsHeight(); }
+
+    int maxLines() const { return TQWIDGETSIZE_MAX; }
+    void setMaxLines( int ) {}
+
+public slots:
+    void deselect() { selectAll( FALSE ); }
+
+protected:
+    TQPoint	cursorPoint() const;
+
+protected:
+    virtual void insertAndMark( const TQString&, bool mark );
+    virtual void newLine();
+    virtual void killLine();
+    virtual void pageUp( bool mark=FALSE );
+    virtual void pageDown( bool mark=FALSE );
+    virtual void cursorLeft( bool mark=FALSE, bool wrap = TRUE );
+    virtual void cursorRight( bool mark=FALSE, bool wrap = TRUE );
+    virtual void cursorUp( bool mark=FALSE );
+    virtual void cursorDown( bool mark=FALSE );
+    virtual void backspace();
+    virtual void home( bool mark=FALSE );
+    virtual void end( bool mark=FALSE );
+
+    bool getMarkedRegion( int *line1, int *col1,
+			  int *line2, int *col2 ) const;
+    int lineLength( int row ) const;
+
+private:
+    TQMultiLineEditData *d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQMultiLineEdit( const TQMultiLineEdit & );
+    TQMultiLineEdit &operator=( const TQMultiLineEdit & );
+#endif
+};
+
+#endif // QT_NO_MULTILINEEDIT
+
+#endif // TQMULTILINED_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmultilineedit-members.html b/doc/html/qmultilineedit-members.html new file mode 100644 index 00000000..12921a0e --- /dev/null +++ b/doc/html/qmultilineedit-members.html @@ -0,0 +1,578 @@ + + + + + +TQMultiLineEdit Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMultiLineEdit

+ +

This is the complete list of member functions for +TQMultiLineEdit, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmultilineedit.html b/doc/html/qmultilineedit.html new file mode 100644 index 00000000..4dc1081c --- /dev/null +++ b/doc/html/qmultilineedit.html @@ -0,0 +1,343 @@ + + + + + +TQMultiLineEdit Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMultiLineEdit Class Reference
[obsolete]

+ +

The TQMultiLineEdit widget is a simple editor for inputting text. +More... +

#include <qmultilineedit.h> +

Inherits TQTextEdit. +

List of all member functions. +

Public Members

+
    +
  • TQMultiLineEdit ( TQWidget * parent = 0, const char * name = 0 )
  • +
  • TQString textLine ( int line ) const
  • +
  • int numLines () const
  • +
  • virtual void insertLine ( const TQString & txt, int line = -1 )
  • +
  • virtual void insertAt ( const TQString & s, int line, int col, bool mark )
  • +
  • virtual void removeLine ( int paragraph )
  • +
  • virtual void setCursorPosition ( int line, int col, bool mark )
  • +
  • bool atBeginning () const
  • +
  • bool atEnd () const
  • +
  • virtual void setAlignment ( int flags )
  • +
  • int alignment () const
  • +
  • void setEdited ( bool )
  • +
  • bool edited () const
  • +
  • bool hasMarkedText () const
  • +
  • TQString markedText () const
  • +
  • void cursorWordForward ( bool mark )
  • +
  • void cursorWordBackward ( bool mark )
  • +
  • bool autoUpdate () const  (obsolete)
  • +
  • virtual void setAutoUpdate ( bool )  (obsolete)
  • +
  • int totalWidth () const  (obsolete)
  • +
  • int totalHeight () const  (obsolete)
  • +
  • int maxLines () const  (obsolete)
  • +
  • void setMaxLines ( int )  (obsolete)
  • +
+

Public Slots

+
    +
  • void deselect ()  (obsolete)
  • +
+

Properties

+
    +
  • Alignment alignment - the editor's paragraph alignment
  • +
  • bool atBeginning - whether the cursor is placed at the beginning of the text  (read only)
  • +
  • bool atEnd - whether the cursor is placed at the end of the text  (read only)
  • +
  • bool edited - whether the document has been edited by the user
  • +
  • int numLines - the number of paragraphs in the editor  (read only)
  • +
+

Protected Members

+
    +
  • TQPoint cursorPoint () const
  • +
  • virtual void insertAndMark ( const TQString & str, bool mark )
  • +
  • virtual void newLine ()
  • +
  • virtual void killLine ()
  • +
  • virtual void pageUp ( bool mark = FALSE )
  • +
  • virtual void pageDown ( bool mark = FALSE )
  • +
  • virtual void cursorLeft ( bool mark = FALSE, bool wrap = TRUE )
  • +
  • virtual void cursorRight ( bool mark = FALSE, bool wrap = TRUE )
  • +
  • virtual void cursorUp ( bool mark = FALSE )
  • +
  • virtual void cursorDown ( bool mark = FALSE )
  • +
  • virtual void backspace ()
  • +
  • virtual void home ( bool mark = FALSE )
  • +
  • virtual void end ( bool mark = FALSE )
  • +
  • bool getMarkedRegion ( int * line1, int * col1, int * line2, int * col2 ) const
  • +
  • int lineLength ( int row ) const
  • +
+

Detailed Description

+ + +This class is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

The TQMultiLineEdit widget is a simple editor for inputting text. +

+

The TQMultiLineEdit was a simple editor widget in former TQt versions. TQt +3.0 includes a new richtext engine which obsoletes TQMultiLineEdit. It is +still included for compatibility reasons. It is now a subclass of +TQTextEdit, and provides enough of the old TQMultiLineEdit API to keep old +applications working. +

If you implement something new with TQMultiLineEdit, we suggest using +TQTextEdit instead and call TQTextEdit::setTextFormat(TQt::PlainText). +

Although most of the old TQMultiLineEdit API is still available, there is +a few difference. The old TQMultiLineEdit operated on lines, not on +paragraphs. As lines change all the time during wordwrap, the new +richtext engine uses paragraphs as basic elements in the data structure. +All functions (numLines(), textLine(), etc.) that operated on lines, now +operate on paragraphs. Further, getString() has been removed completely. +It revealed too much of the internal data structure. +

Applications which made normal and reasonable use of TQMultiLineEdit +should still work without problems. Some odd usage will retquire some +porting. In these cases, it may be better to use TQTextEdit now. +

+

See also TQTextEdit and Advanced Widgets. + +


Member Function Documentation

+

TQMultiLineEdit::TQMultiLineEdit ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a new, empty, TQMultiLineEdit with parent parent called +name. + +

int TQMultiLineEdit::alignment () const +

Returns the editor's paragraph alignment. +See the "alignment" property for details. +

bool TQMultiLineEdit::atBeginning () const +

Returns TRUE if the cursor is placed at the beginning of the text; otherwise returns FALSE. +See the "atBeginning" property for details. +

bool TQMultiLineEdit::atEnd () const +

Returns TRUE if the cursor is placed at the end of the text; otherwise returns FALSE. +See the "atEnd" property for details. +

bool TQMultiLineEdit::autoUpdate () const +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

void TQMultiLineEdit::backspace () [virtual protected] +

Deletes the character on the left side of the text cursor and +moves the cursor one position to the left. If a text has been selected +by the user (e.g. by clicking and dragging) the cursor is put at the +beginning of the selected text and the selected text is removed. +del() + +

void TQMultiLineEdit::cursorDown ( bool mark = FALSE ) [virtual protected] +

+Moves the cursor one line down. If mark is TRUE, the text +is selected. +

See also cursorUp(), cursorLeft(), and cursorRight(). + +

void TQMultiLineEdit::cursorLeft ( bool mark = FALSE, bool wrap = TRUE ) [virtual protected] +

Moves the cursor one character to the left. If mark is TRUE, +the text is selected. +The wrap parameter is currently ignored. +

See also cursorRight(), cursorUp(), and cursorDown(). + +

TQPoint TQMultiLineEdit::cursorPoint () const [protected] +

Returns the top center point where the cursor is drawn. + +

void TQMultiLineEdit::cursorRight ( bool mark = FALSE, bool wrap = TRUE ) [virtual protected] +

Moves the cursor one character to the right. If mark is TRUE, +the text is selected. +The wrap parameter is currently ignored. +

See also cursorLeft(), cursorUp(), and cursorDown(). + +

void TQMultiLineEdit::cursorUp ( bool mark = FALSE ) [virtual protected] +

Moves the cursor up one line. If mark is TRUE, the text is +selected. +

See also cursorDown(), cursorLeft(), and cursorRight(). + +

void TQMultiLineEdit::cursorWordBackward ( bool mark ) +

Moves the cursor one word to the left. If mark is TRUE, the +text is selected. +

See also cursorWordForward(). + +

void TQMultiLineEdit::cursorWordForward ( bool mark ) +

Moves the cursor one word to the right. If mark is TRUE, the text +is selected. +

See also cursorWordBackward(). + +

void TQMultiLineEdit::deselect () [slot] +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

bool TQMultiLineEdit::edited () const +

Returns TRUE if the document has been edited by the user; otherwise returns FALSE. +See the "edited" property for details. +

void TQMultiLineEdit::end ( bool mark = FALSE ) [virtual protected] +

Moves the text cursor to the right end of the line. If mark is +TRUE, text is selected toward the last position. If it is FALSE and the +cursor is moved, all selected text is unselected. +

See also home(). + +

bool TQMultiLineEdit::getMarkedRegion ( int * line1, int * col1, int * line2, int * col2 ) const [protected] +

+If there is selected text, sets line1, col1, line2 and col2 +to the start and end of the selected region and returns TRUE. Returns +FALSE if there is no selected text. + +

bool TQMultiLineEdit::hasMarkedText () const +

+Returns TRUE if there is selected text. + +

void TQMultiLineEdit::home ( bool mark = FALSE ) [virtual protected] +

Moves the text cursor to the left end of the line. If mark is +TRUE, text is selected toward the first position. If it is FALSE and the +cursor is moved, all selected text is unselected. +

See also end(). + +

void TQMultiLineEdit::insertAndMark ( const TQString & str, bool mark ) [virtual protected] +

Inserts str at the current cursor position and selects the +text if mark is TRUE. + +

void TQMultiLineEdit::insertAt ( const TQString & s, int line, int col, bool mark ) [virtual] +

Inserts string s at paragraph number line, after character +number col in the paragraph. If s contains newline +characters, new lines are inserted. +If mark is TRUE the inserted string will be selected. +

The cursor position is adjusted. + +

void TQMultiLineEdit::insertLine ( const TQString & txt, int line = -1 ) [virtual] +

Inserts txt at paragraph number line. If line is less +than zero, or larger than the number of paragraphs, the new text is +put at the end. If txt contains newline characters, several +paragraphs are inserted. +

The cursor position is not changed. + +

void TQMultiLineEdit::killLine () [virtual protected] +

Deletes text from the current cursor position to the end of the +line. (Note that this function still operates on lines, not paragraphs.) + +

int TQMultiLineEdit::lineLength ( int row ) const [protected] +

Returns the number of characters at paragraph number row. If +row is out of range, -1 is returned. + +

TQString TQMultiLineEdit::markedText () const +

+Returns a copy of the selected text. + +

int TQMultiLineEdit::maxLines () const +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

void TQMultiLineEdit::newLine () [virtual protected] +

Splits the paragraph at the current cursor position. + +

int TQMultiLineEdit::numLines () const +

Returns the number of paragraphs in the editor. +See the "numLines" property for details. +

void TQMultiLineEdit::pageDown ( bool mark = FALSE ) [virtual protected] +

+Moves the cursor one page down. If mark is TRUE, the text +is selected. + +

void TQMultiLineEdit::pageUp ( bool mark = FALSE ) [virtual protected] +

+Moves the cursor one page up. If mark is TRUE, the text +is selected. + +

void TQMultiLineEdit::removeLine ( int paragraph ) [virtual] +

Deletes the paragraph at paragraph number paragraph. If paragraph is less than zero or larger than the number of paragraphs, +nothing is deleted. + +

void TQMultiLineEdit::setAlignment ( int flags ) [virtual] +

Sets the editor's paragraph alignment to flags. +See the "alignment" property for details. +

Reimplemented from TQTextEdit. +

void TQMultiLineEdit::setAutoUpdate ( bool ) [virtual] +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

Example: qwerty/qwerty.cpp. +

void TQMultiLineEdit::setCursorPosition ( int line, int col, bool mark ) [virtual] +

Sets the cursor position to character number col in paragraph +number line. The parameters are adjusted to lie within the legal +range. +

If mark is FALSE, the selection is cleared. otherwise it is extended. +

+

void TQMultiLineEdit::setEdited ( bool ) +

Sets whether the document has been edited by the user. +See the "edited" property for details. +

void TQMultiLineEdit::setMaxLines ( int ) +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

TQString TQMultiLineEdit::textLine ( int line ) const +

Returns the text at line number line (possibly the empty +string), or a null string if line is invalid. + +

Example: qwerty/qwerty.cpp. +

int TQMultiLineEdit::totalHeight () const +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

int TQMultiLineEdit::totalWidth () const +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+


Property Documentation

+

Alignment alignment

This property holds the editor's paragraph alignment. +

Sets the alignment to flag, which must be AlignLeft, AlignHCenter or AlignRight. +

If flag is an illegal flag nothing happens. +

See also TQt::AlignmentFlags. + +

Set this property's value with setAlignment() and get this property's value with alignment(). +

bool atBeginning

This property holds whether the cursor is placed at the beginning of the text. +

Get this property's value with atBeginning(). +

See also atEnd. + +

bool atEnd

This property holds whether the cursor is placed at the end of the text. +

Get this property's value with atEnd(). +

See also atBeginning. + +

bool edited

This property holds whether the document has been edited by the user. +

This is the same as TQTextEdit's "modifed" property. +

See also TQTextEdit::modified. + +

Set this property's value with setEdited() and get this property's value with edited(). +

int numLines

This property holds the number of paragraphs in the editor. +

The count includes any empty paragraph at top and bottom, so for an +empty editor this method returns 1. + +

Get this property's value with numLines(). + +


+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/qmutex-h.html b/doc/html/qmutex-h.html new file mode 100644 index 00000000..3076506b --- /dev/null +++ b/doc/html/qmutex-h.html @@ -0,0 +1,159 @@ + + + + + +qmutex.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qmutex.h

+ +

This is the verbatim text of the qmutex.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qmutex.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQMutex class
+**
+** Created : 931107
+**
+** 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 retquirements 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 TQMUTEX_H
+#define TQMUTEX_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#endif // QT_H
+
+#if defined(QT_THREAD_SUPPORT)
+
+class TQMutexPrivate;
+
+const int Q_MUTEX_NORMAL = 0;
+const int Q_MUTEX_RECURSIVE = 1;
+
+class Q_EXPORT TQMutex
+{
+    friend class TQThread;
+    friend class TQWaitCondition;
+    friend class TQWaitConditionPrivate;
+
+public:
+    TQMutex(bool recursive = FALSE);
+    virtual ~TQMutex();
+
+    void lock();
+    void unlock();
+    bool locked();
+    bool tryLock();
+
+private:
+    TQMutexPrivate * d;
+
+#if defined(Q_DISABLE_COPY)
+    TQMutex( const TQMutex & );
+    TQMutex &operator=( const TQMutex & );
+#endif
+};
+
+class Q_EXPORT TQMutexLocker
+{
+public:
+    TQMutexLocker( TQMutex * );
+    ~TQMutexLocker();
+
+    TQMutex *mutex() const;
+
+private:
+    TQMutex *mtx;
+
+#if defined(Q_DISABLE_COPY)
+    TQMutexLocker( const TQMutexLocker & );
+    TQMutexLocker &operator=( const TQMutexLocker & );
+#endif
+};
+
+inline TQMutexLocker::TQMutexLocker( TQMutex *m )
+    : mtx( m )
+{
+    if ( mtx ) mtx->lock();
+}
+
+inline TQMutexLocker::~TQMutexLocker()
+{
+    if ( mtx ) mtx->unlock();
+}
+
+inline TQMutex *TQMutexLocker::mutex() const
+{
+    return mtx;
+}
+
+#endif
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmutex-members.html b/doc/html/qmutex-members.html new file mode 100644 index 00000000..454c5481 --- /dev/null +++ b/doc/html/qmutex-members.html @@ -0,0 +1,52 @@ + + + + + +TQMutex Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMutex

+ +

This is the complete list of member functions for +TQMutex, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmutex.html b/doc/html/qmutex.html new file mode 100644 index 00000000..6727c60a --- /dev/null +++ b/doc/html/qmutex.html @@ -0,0 +1,195 @@ + + + + + +TQMutex Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMutex Class Reference

+ +

The TQMutex class provides access serialization between threads. +More... +

All the functions in this class are thread-safe when TQt is built with thread support.

+

#include <qmutex.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQMutex class provides access serialization between threads. +

+ +

The purpose of a TQMutex is to protect an object, data structure or +section of code so that only one thread can access it at a time +(This is similar to the Java synchronized keyword). For +example, say there is a method which prints a message to the user +on two lines: +

+    int number = 6;
+
+    void method1()
+    {
+        number *= 5;
+        number /= 4;
+    }
+
+    void method2()
+    {
+        number *= 3;
+        number /= 2;
+    }
+    
+ +

If these two methods are called in succession, the following happens: +

+    // method1()
+    number *= 5;        // number is now 30
+    number /= 4;        // number is now 7
+
+    // method2()
+    number *= 3;        // nubmer is now 21
+    number /= 2;        // number is now 10
+    
+ +

If these two methods are called simultaneously from two threads then the +following sequence could result: +

+    // Thread 1 calls method1()
+    number *= 5;        // number is now 30
+
+    // Thread 2 calls method2().
+    //
+    // Most likely Thread 1 has been put to sleep by the operating
+    // system to allow Thread 2 to run.
+    number *= 3;        // number is now 90
+    number /= 2;        // number is now 45
+
+    // Thread 1 finishes executing.
+    number /= 4;        // number is now 11, instead of 10
+    
+ +

If we add a mutex, we should get the result we want: +

+    TQMutex mutex;
+    int number = 6;
+
+    void method1()
+    {
+        mutex.lock();
+        number *= 5;
+        number /= 4;
+        mutex.unlock();
+    }
+
+    void method2()
+    {
+        mutex.lock();
+        number *= 3;
+        number /= 2;
+        mutex.unlock();
+    }
+    
+ +

Then only one thread can modify number at any given time and +the result is correct. This is a trivial example, of course, but +applies to any other case where things need to happen in a +particular sequence. +

When you call lock() in a thread, other threads that try to call +lock() in the same place will block until the thread that got the +lock calls unlock(). A non-blocking alternative to lock() is +tryLock(). +

See also Environment Classes and Threading. + +


Member Function Documentation

+

TQMutex::TQMutex ( bool recursive = FALSE ) +

+Constructs a new mutex. The mutex is created in an unlocked state. +A recursive mutex is created if recursive is TRUE; a normal +mutex is created if recursive is FALSE (the default). With a +recursive mutex, a thread can lock the same mutex multiple times +and it will not be unlocked until a corresponding number of +unlock() calls have been made. + +

TQMutex::~TQMutex () [virtual] +

+Destroys the mutex. +

Warning: If you destroy a mutex that still holds a lock the +resultant behavior is undefined. + +

void TQMutex::lock () +

+Attempt to lock the mutex. If another thread has locked the mutex +then this call will block until that thread has unlocked it. +

See also unlock() and locked(). + +

bool TQMutex::locked () +

+Returns TRUE if the mutex is locked by another thread; otherwise +returns FALSE. +

Warning: Due to differing implementations of recursive mutexes on +various platforms, calling this function from the same thread that +previously locked the mutex will return undefined results. +

See also lock() and unlock(). + +

bool TQMutex::tryLock () +

+Attempt to lock the mutex. If the lock was obtained, this function +returns TRUE. If another thread has locked the mutex, this +function returns FALSE, instead of waiting for the mutex to become +available, i.e. it does not block. +

If the lock was obtained, the mutex must be unlocked with unlock() +before another thread can successfully lock it. +

See also lock(), unlock(), and locked(). + +

void TQMutex::unlock () +

+Unlocks the mutex. Attempting to unlock a mutex in a different +thread to the one that locked it results in an error. Unlocking a +mutex that is not locked results in undefined behaviour (varies +between different Operating Systems' thread implementations). +

See also lock() and locked(). + + +


+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/qmutexlocker-members.html b/doc/html/qmutexlocker-members.html new file mode 100644 index 00000000..67f38206 --- /dev/null +++ b/doc/html/qmutexlocker-members.html @@ -0,0 +1,49 @@ + + + + + +TQMutexLocker Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQMutexLocker

+ +

This is the complete list of member functions for +TQMutexLocker, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qmutexlocker.html b/doc/html/qmutexlocker.html new file mode 100644 index 00000000..4c550c4e --- /dev/null +++ b/doc/html/qmutexlocker.html @@ -0,0 +1,220 @@ + + + + + +TQMutexLocker Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQMutexLocker Class Reference

+ +

The TQMutexLocker class simplifies locking and unlocking TQMutexes. +More... +

All the functions in this class are thread-safe when TQt is built with thread support.

+

#include <qmutex.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQMutexLocker class simplifies locking and unlocking TQMutexes. +

+

+ +

The purpose of TQMutexLocker is to simplify TQMutex locking and +unlocking. Locking and unlocking a TQMutex in complex functions and +statements or in exception handling code is error prone and +difficult to debug. TQMutexLocker should be used in such situations +to ensure that the state of the mutex is well defined and always +locked and unlocked properly. +

TQMutexLocker should be created within a function where a TQMutex +needs to be locked. The mutex is locked when TQMutexLocker is +created, and unlocked when TQMutexLocker is destroyed. +

For example, this complex function locks a TQMutex upon entering +the function and unlocks the mutex at all the exit points: +

+    int complexFunction( int flag )
+    {
+        mutex.lock();
+
+        int return_value = 0;
+
+        switch ( flag ) {
+        case 0:
+        case 1:
+            {
+                mutex.unlock();
+                return moreComplexFunction( flag );
+            }
+
+        case 2:
+            {
+                int status = anotherFunction();
+                if ( status < 0 ) {
+                    mutex.unlock();
+                    return -2;
+                }
+                return_value = status + flag;
+                break;
+            }
+
+        default:
+            {
+                if ( flag > 10 ) {
+                    mutex.unlock();
+                    return -1;
+                }
+                break;
+            }
+        }
+
+        mutex.unlock();
+        return return_value;
+    }
+    
+ +

This example function will get more complicated as it is +developed, which increases the likelihood that errors will occur. +

Using TQMutexLocker greatly simplifies the code, and makes it more +readable: +

+    int complexFunction( int flag )
+    {
+        TQMutexLocker locker( &mutex );
+
+        int return_value = 0;
+
+        switch ( flag ) {
+        case 0:
+        case 1:
+            {
+                return moreComplexFunction( flag );
+            }
+
+        case 2:
+            {
+                int status = anotherFunction();
+                if ( status < 0 )
+                    return -2;
+                return_value = status + flag;
+                break;
+            }
+
+        default:
+            {
+                if ( flag > 10 )
+                    return -1;
+                break;
+            }
+        }
+
+        return return_value;
+    }
+    
+ +

Now, the mutex will always be unlocked when the TQMutexLocker +object is destroyed (when the function returns since locker is +an auto variable). Note that the mutex will be unlocked after +the call to moreComplexFunction() in this example, avoiding +possible bugs caused by unlocking the mutex too early, as in +the first example. +

The same principle applies to code that throws and catches +exceptions. An exception that is not caught in the function that +has locked the mutex has no way of unlocking the mutex before the +exception is passed up the stack to the calling function. +

TQMutexLocker also provides a mutex() member function that returns +the mutex on which the TQMutexLocker is operating. This is useful +for code that needs access to the mutex, such as +TQWaitCondition::wait(). For example: +

+    class SignalWaiter
+    {
+    private:
+        TQMutexLocker locker;
+
+    public:
+        SignalWaiter( TQMutex *mutex )
+            : locker( mutex )
+        {
+        }
+
+        void waitForSignal()
+        {
+            ...
+            ...
+            ...
+
+            while ( ! signalled )
+                waitcondition.wait( locker.mutex() );
+
+            ...
+            ...
+            ...
+        }
+    };
+    
+ +

See also TQMutex, TQWaitCondition, Environment Classes, and Threading. + +


Member Function Documentation

+

TQMutexLocker::TQMutexLocker ( TQMutex * mutex ) +

+ +

Constructs a TQMutexLocker and locks mutex. The mutex will be +unlocked when the TQMutexLocker is destroyed. If mutex is zero, +TQMutexLocker does nothing. +

See also TQMutex::lock(). + +

TQMutexLocker::~TQMutexLocker () +

+ +

Destroys the TQMutexLocker and unlocks the mutex which was locked +in the constructor. +

See also TQMutexLocker::TQMutexLocker() and TQMutex::unlock(). + +

TQMutex * TQMutexLocker::mutex () const +

+ +

Returns a pointer to the mutex which was locked in the +constructor. +

See also TQMutexLocker::TQMutexLocker(). + + +


+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/qnamespace-h.html b/doc/html/qnamespace-h.html new file mode 100644 index 00000000..caa96751 --- /dev/null +++ b/doc/html/qnamespace-h.html @@ -0,0 +1,965 @@ + + + + + +qnamespace.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qnamespace.h

+ +

This is the verbatim text of the qnamespace.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qnamespace.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQt namespace (as class for compiler compatibility)
+**
+** Created : 980927
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQNAMESPACE_H
+#define TQNAMESPACE_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#endif // QT_H
+
+
+class TQColor;
+class TQCursor;
+
+
+class Q_EXPORT TQt {
+public:
+    QT_STATIC_CONST TQColor & color0;
+    QT_STATIC_CONST TQColor & color1;
+    QT_STATIC_CONST TQColor & black;
+    QT_STATIC_CONST TQColor & white;
+    QT_STATIC_CONST TQColor & darkGray;
+    QT_STATIC_CONST TQColor & gray;
+    QT_STATIC_CONST TQColor & lightGray;
+    QT_STATIC_CONST TQColor & red;
+    QT_STATIC_CONST TQColor & green;
+    QT_STATIC_CONST TQColor & blue;
+    QT_STATIC_CONST TQColor & cyan;
+    QT_STATIC_CONST TQColor & magenta;
+    QT_STATIC_CONST TQColor & yellow;
+    QT_STATIC_CONST TQColor & darkRed;
+    QT_STATIC_CONST TQColor & darkGreen;
+    QT_STATIC_CONST TQColor & darkBlue;
+    QT_STATIC_CONST TQColor & darkCyan;
+    QT_STATIC_CONST TQColor & darkMagenta;
+    QT_STATIC_CONST TQColor & darkYellow;
+
+    // documented in qevent.cpp
+    enum ButtonState {				// mouse/keyboard state values
+	NoButton	= 0x0000,
+	LeftButton	= 0x0001,
+	RightButton	= 0x0002,
+	MidButton	= 0x0004,
+	MouseButtonMask = 0x0007,
+	ShiftButton	= 0x0100,
+	ControlButton   = 0x0200,
+	AltButton	= 0x0400,
+	MetaButton	= 0x0800,
+	KeyButtonMask	= 0x0f00,
+	Keypad		= 0x4000
+    };
+
+    // documented in qobject.cpp
+    // ideally would start at 1, as in TQSizePolicy, but that breaks other things
+    enum Orientation {
+        Horizontal = 0,
+	Vertical
+    };
+
+    // documented in qlistview.cpp
+    enum SortOrder {
+	Ascending,
+	Descending
+    };
+
+    // Text formatting flags for TQPainter::drawText and TQLabel
+    // the following four enums can be combined to one integer which
+    // is passed as textflag to drawText and qt_format_text.
+
+    // documented in qpainter.cpp
+    enum AlignmentFlags {
+	AlignAuto		= 0x0000, 	// text alignment
+	AlignLeft		= 0x0001,
+	AlignRight		= 0x0002,
+	AlignHCenter		= 0x0004,
+	AlignJustify		= 0x0008,
+	AlignHorizontal_Mask	= AlignLeft | AlignRight | AlignHCenter | AlignJustify,
+	AlignTop		= 0x0010,
+	AlignBottom		= 0x0020,
+	AlignVCenter		= 0x0040,
+	AlignVertical_Mask 	= AlignTop | AlignBottom | AlignVCenter,
+	AlignCenter		= AlignVCenter | AlignHCenter
+    };
+
+    // documented in qpainter.cpp
+    enum TextFlags {
+	SingleLine	= 0x0080,		// misc. flags
+	DontClip	= 0x0100,
+	ExpandTabs	= 0x0200,
+	ShowPrefix	= 0x0400,
+	WordBreak	= 0x0800,
+	BreakAnywhere = 0x1000,
+#ifndef Q_QDOC
+	DontPrint	= 0x2000,
+	Underline = 0x01000000,
+	Overline  = 0x02000000,
+	StrikeOut = 0x04000000,
+	IncludeTrailingSpaces = 0x08000000,
+#endif
+	NoAccel = 0x4000
+    };
+
+    // Widget flags; documented in qwidget.cpp
+    typedef uint WState;
+
+    // TQWidget state flags (internal, barely documented in qwidget.cpp)
+    enum WidgetState {
+	WState_Created		= 0x00000001,
+	WState_Disabled		= 0x00000002,
+	WState_Visible		= 0x00000004,
+	WState_ForceHide	= 0x00000008,
+	WState_OwnCursor	= 0x00000010,
+	WState_MouseTracking	= 0x00000020,
+	WState_CompressKeys	= 0x00000040,
+	WState_BlockUpdates	= 0x00000080,
+	WState_InPaintEvent	= 0x00000100,
+	WState_Reparented	= 0x00000200,
+	WState_ConfigPending	= 0x00000400,
+	WState_Resized		= 0x00000800,
+	WState_AutoMask		= 0x00001000,
+	WState_Polished		= 0x00002000,
+	WState_DND		= 0x00004000,
+	WState_Reserved0	= 0x00008000,
+	WState_FullScreen	= 0x00010000,
+	WState_OwnSizePolicy	= 0x00020000,
+	WState_CreatedHidden	= 0x00040000,
+	WState_Maximized	= 0x00080000,
+	WState_Minimized	= 0x00100000,
+	WState_ForceDisabled	= 0x00200000,
+	WState_Exposed		= 0x00400000,
+	WState_HasMouse		= 0x00800000
+    };
+
+    // Widget flags2; documented in qwidget.cpp
+    typedef uint WFlags;
+
+    // documented in qwidget.cpp
+    enum WidgetFlags {
+	WType_TopLevel		= 0x00000001,	// widget type flags
+	WType_Dialog		= 0x00000002,
+	WType_Popup		= 0x00000004,
+	WType_Desktop		= 0x00000008,
+	WType_Mask		= 0x0000000f,
+
+	WStyle_Customize	= 0x00000010,	// window style flags
+	WStyle_NormalBorder	= 0x00000020,
+	WStyle_DialogBorder	= 0x00000040, // MS-Windows only
+	WStyle_NoBorder		= 0x00002000,
+	WStyle_Title		= 0x00000080,
+	WStyle_SysMenu		= 0x00000100,
+	WStyle_Minimize		= 0x00000200,
+	WStyle_Maximize		= 0x00000400,
+	WStyle_MinMax		= WStyle_Minimize | WStyle_Maximize,
+	WStyle_Tool		= 0x00000800,
+	WStyle_StaysOnTop	= 0x00001000,
+	WStyle_ContextHelp	= 0x00004000,
+	WStyle_Reserved		= 0x00008000,
+	WStyle_Mask		= 0x0000fff0,
+
+	WDestructiveClose	= 0x00010000,	// misc flags
+	WPaintDesktop		= 0x00020000,
+	WPaintUnclipped		= 0x00040000,
+	WPaintClever		= 0x00080000,
+	WResizeNoErase		= 0x00100000, // OBSOLETE
+	WMouseNoMask		= 0x00200000,
+	WStaticContents		= 0x00400000,
+	WRepaintNoErase		= 0x00800000, // OBSOLETE
+#if defined(Q_WS_X11)
+	WX11BypassWM		= 0x01000000,
+	WWinOwnDC		= 0x00000000,
+	WMacNoSheet             = 0x00000000,
+        WMacDrawer              = 0x00000000,
+#elif defined(Q_WS_MAC)
+	WX11BypassWM		= 0x00000000,
+	WWinOwnDC		= 0x00000000,
+	WMacNoSheet             = 0x01000000,
+        WMacDrawer              = 0x20000000,
+#else
+	WX11BypassWM		= 0x00000000,
+	WWinOwnDC		= 0x01000000,
+	WMacNoSheet             = 0x00000000,
+        WMacDrawer              = 0x00000000,
+#endif
+	WGroupLeader		= 0x02000000,
+	WShowModal		= 0x04000000,
+	WNoMousePropagation	= 0x08000000,
+	WSubWindow              = 0x10000000,
+#if defined(Q_WS_X11)
+        WStyle_Splash           = 0x20000000,
+#else
+	WStyle_Splash           = WStyle_NoBorder | WMacNoSheet | WStyle_Tool | WWinOwnDC,
+#endif
+	WNoAutoErase		= WRepaintNoErase | WResizeNoErase
+#ifndef QT_NO_COMPAT
+	,
+	WNorthWestGravity	= WStaticContents,
+	WType_Modal		= WType_Dialog | WShowModal,
+	WStyle_Dialog		= WType_Dialog,
+	WStyle_NoBorderEx	= WStyle_NoBorder
+#endif
+    };
+
+    enum WindowState {
+	WindowNoState   = 0x00000000,
+	WindowMinimized = 0x00000001,
+	WindowMaximized = 0x00000002,
+	WindowFullScreen = 0x00000004,
+	WindowActive = 0x00000008
+    };
+
+
+    // Image conversion flags.  The unusual ordering is caused by
+    // compatibility and default retquirements.
+    // Documented in qimage.cpp
+
+    enum ImageConversionFlags {
+	ColorMode_Mask		= 0x00000003,
+	AutoColor		= 0x00000000,
+	ColorOnly		= 0x00000003,
+	MonoOnly		= 0x00000002,
+	//	  Reserved	= 0x00000001,
+
+	AlphaDither_Mask	= 0x0000000c,
+	ThresholdAlphaDither	= 0x00000000,
+	OrderedAlphaDither	= 0x00000004,
+	DiffuseAlphaDither	= 0x00000008,
+	NoAlpha			= 0x0000000c, // Not supported
+
+	Dither_Mask		= 0x00000030,
+	DiffuseDither		= 0x00000000,
+	OrderedDither		= 0x00000010,
+	ThresholdDither		= 0x00000020,
+	//	  ReservedDither= 0x00000030,
+
+	DitherMode_Mask		= 0x000000c0,
+	AutoDither		= 0x00000000,
+	PreferDither		= 0x00000040,
+	AvoidDither		= 0x00000080
+    };
+
+    // documented in qpainter.cpp
+    enum BGMode	{				// background mode
+	TransparentMode,
+	OpaqueMode
+    };
+
+#ifndef QT_NO_COMPAT
+    // documented in qpainter.cpp
+    enum PaintUnit {				// paint unit
+	PixelUnit,
+	LoMetricUnit, // OBSOLETE
+	HiMetricUnit, // OBSOLETE
+	LoEnglishUnit, // OBSOLETE
+	HiEnglishUnit, // OBSOLETE
+	TwipsUnit // OBSOLETE
+    };
+#endif
+
+    // documented in qstyle.cpp
+#ifdef QT_NO_COMPAT
+    enum GUIStyle {
+	WindowsStyle = 1,     // ### TQt 4.0: either remove the obsolete enums or clean up compat vs.
+	MotifStyle = 4        // ### QT_NO_COMPAT by reordering or combination into one enum.
+    };
+#else
+    enum GUIStyle {
+	MacStyle, // OBSOLETE
+	WindowsStyle,
+	Win3Style, // OBSOLETE
+	PMStyle, // OBSOLETE
+	MotifStyle
+    };
+#endif
+
+    // documented in qkeysequence.cpp
+    enum SequenceMatch {
+	NoMatch,
+	PartialMatch,
+	Identical
+    };
+
+    // documented in qevent.cpp
+    enum Modifier {		// accelerator modifiers
+	META          = 0x00100000,
+	SHIFT         = 0x00200000,
+	CTRL          = 0x00400000,
+	ALT           = 0x00800000,
+	MODIFIER_MASK = 0x00f00000,
+	UNICODE_ACCEL = 0x10000000,
+
+	ASCII_ACCEL = UNICODE_ACCEL // 1.x compat
+    };
+
+    // documented in qevent.cpp
+    enum Key {
+	Key_Escape = 0x1000,		// misc keys
+	Key_Tab = 0x1001,
+	Key_Backtab = 0x1002, Key_BackTab = Key_Backtab,
+	Key_Backspace = 0x1003, Key_BackSpace = Key_Backspace,
+	Key_Return = 0x1004,
+	Key_Enter = 0x1005,
+	Key_Insert = 0x1006,
+	Key_Delete = 0x1007,
+	Key_Pause = 0x1008,
+	Key_Print = 0x1009,
+	Key_SysReq = 0x100a,
+	Key_Clear = 0x100b,
+	Key_Home = 0x1010,		// cursor movement
+	Key_End = 0x1011,
+	Key_Left = 0x1012,
+	Key_Up = 0x1013,
+	Key_Right = 0x1014,
+	Key_Down = 0x1015,
+	Key_Prior = 0x1016, Key_PageUp = Key_Prior,
+	Key_Next = 0x1017, Key_PageDown = Key_Next,
+	Key_Shift = 0x1020,		// modifiers
+	Key_Control = 0x1021,
+	Key_Meta = 0x1022,
+	Key_Alt = 0x1023,
+	Key_CapsLock = 0x1024,
+	Key_NumLock = 0x1025,
+	Key_ScrollLock = 0x1026,
+	Key_F1 = 0x1030,		// function keys
+	Key_F2 = 0x1031,
+	Key_F3 = 0x1032,
+	Key_F4 = 0x1033,
+	Key_F5 = 0x1034,
+	Key_F6 = 0x1035,
+	Key_F7 = 0x1036,
+	Key_F8 = 0x1037,
+	Key_F9 = 0x1038,
+	Key_F10 = 0x1039,
+	Key_F11 = 0x103a,
+	Key_F12 = 0x103b,
+	Key_F13 = 0x103c,
+	Key_F14 = 0x103d,
+	Key_F15 = 0x103e,
+	Key_F16 = 0x103f,
+	Key_F17 = 0x1040,
+	Key_F18 = 0x1041,
+	Key_F19 = 0x1042,
+	Key_F20 = 0x1043,
+	Key_F21 = 0x1044,
+	Key_F22 = 0x1045,
+	Key_F23 = 0x1046,
+	Key_F24 = 0x1047,
+	Key_F25 = 0x1048,		// F25 .. F35 only on X11
+	Key_F26 = 0x1049,
+	Key_F27 = 0x104a,
+	Key_F28 = 0x104b,
+	Key_F29 = 0x104c,
+	Key_F30 = 0x104d,
+	Key_F31 = 0x104e,
+	Key_F32 = 0x104f,
+	Key_F33 = 0x1050,
+	Key_F34 = 0x1051,
+	Key_F35 = 0x1052,
+	Key_Super_L = 0x1053, 		// extra keys
+	Key_Super_R = 0x1054,
+	Key_Menu = 0x1055,
+	Key_Hyper_L = 0x1056,
+	Key_Hyper_R = 0x1057,
+	Key_Help = 0x1058,
+	Key_Direction_L = 0x1059,
+	Key_Direction_R = 0x1060,
+	Key_Space = 0x20,		// 7 bit printable ASCII
+	Key_Any = Key_Space,
+	Key_Exclam = 0x21,
+	Key_QuoteDbl = 0x22,
+	Key_NumberSign = 0x23,
+	Key_Dollar = 0x24,
+	Key_Percent = 0x25,
+	Key_Ampersand = 0x26,
+	Key_Apostrophe = 0x27,
+	Key_ParenLeft = 0x28,
+	Key_ParenRight = 0x29,
+	Key_Asterisk = 0x2a,
+	Key_Plus = 0x2b,
+	Key_Comma = 0x2c,
+	Key_Minus = 0x2d,
+	Key_Period = 0x2e,
+	Key_Slash = 0x2f,
+	Key_0 = 0x30,
+	Key_1 = 0x31,
+	Key_2 = 0x32,
+	Key_3 = 0x33,
+	Key_4 = 0x34,
+	Key_5 = 0x35,
+	Key_6 = 0x36,
+	Key_7 = 0x37,
+	Key_8 = 0x38,
+	Key_9 = 0x39,
+	Key_Colon = 0x3a,
+	Key_Semicolon = 0x3b,
+	Key_Less = 0x3c,
+	Key_Equal = 0x3d,
+	Key_Greater = 0x3e,
+	Key_Question = 0x3f,
+	Key_At = 0x40,
+	Key_A = 0x41,
+	Key_B = 0x42,
+	Key_C = 0x43,
+	Key_D = 0x44,
+	Key_E = 0x45,
+	Key_F = 0x46,
+	Key_G = 0x47,
+	Key_H = 0x48,
+	Key_I = 0x49,
+	Key_J = 0x4a,
+	Key_K = 0x4b,
+	Key_L = 0x4c,
+	Key_M = 0x4d,
+	Key_N = 0x4e,
+	Key_O = 0x4f,
+	Key_P = 0x50,
+	Key_Q = 0x51,
+	Key_R = 0x52,
+	Key_S = 0x53,
+	Key_T = 0x54,
+	Key_U = 0x55,
+	Key_V = 0x56,
+	Key_W = 0x57,
+	Key_X = 0x58,
+	Key_Y = 0x59,
+	Key_Z = 0x5a,
+	Key_BracketLeft = 0x5b,
+	Key_Backslash = 0x5c,
+	Key_BracketRight = 0x5d,
+	Key_AsciiCircum = 0x5e,
+	Key_Underscore = 0x5f,
+	Key_QuoteLeft = 0x60,
+	Key_BraceLeft = 0x7b,
+	Key_Bar = 0x7c,
+	Key_BraceRight = 0x7d,
+	Key_AsciiTilde = 0x7e,
+
+	// Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
+
+	Key_nobreakspace = 0x0a0,
+	Key_exclamdown = 0x0a1,
+	Key_cent = 0x0a2,
+	Key_sterling = 0x0a3,
+	Key_currency = 0x0a4,
+	Key_yen = 0x0a5,
+	Key_brokenbar = 0x0a6,
+	Key_section = 0x0a7,
+	Key_diaeresis = 0x0a8,
+	Key_copyright = 0x0a9,
+	Key_ordfeminine = 0x0aa,
+	Key_guillemotleft = 0x0ab,	// left angle quotation mark
+	Key_notsign = 0x0ac,
+	Key_hyphen = 0x0ad,
+	Key_registered = 0x0ae,
+	Key_macron = 0x0af,
+	Key_degree = 0x0b0,
+	Key_plusminus = 0x0b1,
+	Key_twosuperior = 0x0b2,
+	Key_threesuperior = 0x0b3,
+	Key_acute = 0x0b4,
+	Key_mu = 0x0b5,
+	Key_paragraph = 0x0b6,
+	Key_periodcentered = 0x0b7,
+	Key_cedilla = 0x0b8,
+	Key_onesuperior = 0x0b9,
+	Key_masculine = 0x0ba,
+	Key_guillemotright = 0x0bb,	// right angle quotation mark
+	Key_onequarter = 0x0bc,
+	Key_onehalf = 0x0bd,
+	Key_threequarters = 0x0be,
+	Key_questiondown = 0x0bf,
+	Key_Agrave = 0x0c0,
+	Key_Aacute = 0x0c1,
+	Key_Acircumflex = 0x0c2,
+	Key_Atilde = 0x0c3,
+	Key_Adiaeresis = 0x0c4,
+	Key_Aring = 0x0c5,
+	Key_AE = 0x0c6,
+	Key_Ccedilla = 0x0c7,
+	Key_Egrave = 0x0c8,
+	Key_Eacute = 0x0c9,
+	Key_Ecircumflex = 0x0ca,
+	Key_Ediaeresis = 0x0cb,
+	Key_Igrave = 0x0cc,
+	Key_Iacute = 0x0cd,
+	Key_Icircumflex = 0x0ce,
+	Key_Idiaeresis = 0x0cf,
+	Key_ETH = 0x0d0,
+	Key_Ntilde = 0x0d1,
+	Key_Ograve = 0x0d2,
+	Key_Oacute = 0x0d3,
+	Key_Ocircumflex = 0x0d4,
+	Key_Otilde = 0x0d5,
+	Key_Odiaeresis = 0x0d6,
+	Key_multiply = 0x0d7,
+	Key_Ooblique = 0x0d8,
+	Key_Ugrave = 0x0d9,
+	Key_Uacute = 0x0da,
+	Key_Ucircumflex = 0x0db,
+	Key_Udiaeresis = 0x0dc,
+	Key_Yacute = 0x0dd,
+	Key_THORN = 0x0de,
+	Key_ssharp = 0x0df,
+	Key_agrave = 0x0e0,
+	Key_aacute = 0x0e1,
+	Key_acircumflex = 0x0e2,
+	Key_atilde = 0x0e3,
+	Key_adiaeresis = 0x0e4,
+	Key_aring = 0x0e5,
+	Key_ae = 0x0e6,
+	Key_ccedilla = 0x0e7,
+	Key_egrave = 0x0e8,
+	Key_eacute = 0x0e9,
+	Key_ecircumflex = 0x0ea,
+	Key_ediaeresis = 0x0eb,
+	Key_igrave = 0x0ec,
+	Key_iacute = 0x0ed,
+	Key_icircumflex = 0x0ee,
+	Key_idiaeresis = 0x0ef,
+	Key_eth = 0x0f0,
+	Key_ntilde = 0x0f1,
+	Key_ograve = 0x0f2,
+	Key_oacute = 0x0f3,
+	Key_ocircumflex = 0x0f4,
+	Key_otilde = 0x0f5,
+	Key_odiaeresis = 0x0f6,
+	Key_division = 0x0f7,
+	Key_oslash = 0x0f8,
+	Key_ugrave = 0x0f9,
+	Key_uacute = 0x0fa,
+	Key_ucircumflex = 0x0fb,
+	Key_udiaeresis = 0x0fc,
+	Key_yacute = 0x0fd,
+	Key_thorn = 0x0fe,
+	Key_ydiaeresis = 0x0ff,
+
+	// multimedia/internet keys - ignored by default - see TQKeyEvent c'tor
+
+	Key_Back  = 0x1061,
+	Key_Forward  = 0x1062,
+	Key_Stop  = 0x1063,
+	Key_Refresh  = 0x1064,
+
+	Key_VolumeDown = 0x1070,
+	Key_VolumeMute  = 0x1071,
+	Key_VolumeUp = 0x1072,
+	Key_BassBoost = 0x1073,
+	Key_BassUp = 0x1074,
+	Key_BassDown = 0x1075,
+	Key_TrebleUp = 0x1076,
+	Key_TrebleDown = 0x1077,
+
+	Key_MediaPlay  = 0x1080,
+	Key_MediaStop  = 0x1081,
+	Key_MediaPrev  = 0x1082,
+	Key_MediaNext  = 0x1083,
+	Key_MediaRecord = 0x1084,
+
+	Key_HomePage  = 0x1090,
+	Key_Favorites  = 0x1091,
+	Key_Search  = 0x1092,
+	Key_Standby = 0x1093,
+	Key_OpenUrl = 0x1094,
+
+	Key_LaunchMail  = 0x10a0,
+	Key_LaunchMedia = 0x10a1,
+	Key_Launch0  = 0x10a2,
+	Key_Launch1  = 0x10a3,
+	Key_Launch2  = 0x10a4,
+	Key_Launch3  = 0x10a5,
+	Key_Launch4  = 0x10a6,
+	Key_Launch5  = 0x10a7,
+	Key_Launch6  = 0x10a8,
+	Key_Launch7  = 0x10a9,
+	Key_Launch8  = 0x10aa,
+	Key_Launch9  = 0x10ab,
+	Key_LaunchA  = 0x10ac,
+	Key_LaunchB  = 0x10ad,
+	Key_LaunchC  = 0x10ae,
+	Key_LaunchD  = 0x10af,
+	Key_LaunchE  = 0x10b0,
+	Key_LaunchF  = 0x10b1,
+
+	Key_MediaLast = 0x1fff,
+
+	Key_unknown = 0xffff
+    };
+
+    // documented in qcommonstyle.cpp
+    enum ArrowType {
+	UpArrow,
+	DownArrow,
+	LeftArrow,
+	RightArrow
+    };
+
+    // documented in qpainter.cpp
+    enum RasterOp { // raster op mode
+	CopyROP,
+	OrROP,
+	XorROP,
+	NotAndROP, EraseROP=NotAndROP,
+	NotCopyROP,
+	NotOrROP,
+	NotXorROP,
+	AndROP,	NotEraseROP=AndROP,
+	NotROP,
+	ClearROP,
+	SetROP,
+	NopROP,
+	AndNotROP,
+	OrNotROP,
+	NandROP,
+	NorROP,	LastROP=NorROP
+    };
+
+    // documented in qpainter.cpp
+    enum PenStyle { // pen style
+	NoPen,
+	SolidLine,
+	DashLine,
+	DotLine,
+	DashDotLine,
+	DashDotDotLine,
+	MPenStyle = 0x0f
+    };
+
+    // documented in qpainter.cpp
+    enum PenCapStyle { // line endcap style
+	FlatCap = 0x00,
+	SquareCap = 0x10,
+	RoundCap = 0x20,
+	MPenCapStyle = 0x30
+    };
+
+    // documented in qpainter.cpp
+    enum PenJoinStyle { // line join style
+	MiterJoin = 0x00,
+	BevelJoin = 0x40,
+	RoundJoin = 0x80,
+	MPenJoinStyle = 0xc0
+    };
+
+    // documented in qpainter.cpp
+    enum BrushStyle { // brush style
+	NoBrush,
+	SolidPattern,
+	Dense1Pattern,
+	Dense2Pattern,
+	Dense3Pattern,
+	Dense4Pattern,
+	Dense5Pattern,
+	Dense6Pattern,
+	Dense7Pattern,
+	HorPattern,
+	VerPattern,
+	CrossPattern,
+	BDiagPattern,
+	FDiagPattern,
+	DiagCrossPattern,
+	CustomPattern=24
+    };
+
+    // documented in qapplication_mac.cpp
+    enum MacintoshVersion {
+	//Unknown
+	MV_Unknown      = 0x0000,
+
+	//Version numbers
+	MV_9            = 0x0001,
+	MV_10_DOT_0     = 0x0002,
+	MV_10_DOT_1     = 0x0003,
+	MV_10_DOT_2     = 0x0004,
+	MV_10_DOT_3     = 0x0005,
+	MV_10_DOT_4     = 0x0006,
+
+	//Code names
+	MV_CHEETAH      = MV_10_DOT_0,
+	MV_PUMA         = MV_10_DOT_1,
+	MV_JAGUAR       = MV_10_DOT_2,
+	MV_PANTHER      = MV_10_DOT_3,
+	MV_TIGER        = MV_10_DOT_4
+    };
+
+    // documented in qapplication_win.cpp
+    enum WindowsVersion {
+	WV_32s 		= 0x0001,
+	WV_95 		= 0x0002,
+	WV_98		= 0x0003,
+	WV_Me		= 0x0004,
+	WV_DOS_based	= 0x000f,
+
+	WV_NT 		= 0x0010,
+	WV_2000 	= 0x0020,
+	WV_XP		= 0x0030,
+	WV_2003		= 0x0040,
+	WV_VISTA 	= 0x0080,
+	WV_NT_based	= 0x00f0,
+
+	WV_CE           = 0x0100,
+	WV_CENET	= 0x0200,
+	WV_CE_based	= 0x0f00
+    };
+
+    // documented in qstyle.cpp
+    enum UIEffect {
+	UI_General,
+	UI_AnimateMenu,
+	UI_FadeMenu,
+	UI_AnimateCombo,
+	UI_AnimateTooltip,
+	UI_FadeTooltip,
+	UI_AnimateToolBox
+    };
+
+    // documented in qcursor.cpp
+    enum CursorShape {
+	ArrowCursor,
+	UpArrowCursor,
+	CrossCursor,
+	WaitCursor,
+	IbeamCursor,
+	SizeVerCursor,
+	SizeHorCursor,
+	SizeBDiagCursor,
+	SizeFDiagCursor,
+	SizeAllCursor,
+	BlankCursor,
+	SplitVCursor,
+	SplitHCursor,
+	PointingHandCursor,
+	ForbiddenCursor,
+	WhatsThisCursor,
+	BusyCursor,
+	LastCursor	= BusyCursor,
+	BitmapCursor	= 24
+    };
+
+    // Global cursors
+
+    QT_STATIC_CONST TQCursor & arrowCursor;	// standard arrow cursor
+    QT_STATIC_CONST TQCursor & upArrowCursor;	// upwards arrow
+    QT_STATIC_CONST TQCursor & crossCursor;	// crosshair
+    QT_STATIC_CONST TQCursor & waitCursor;	// hourglass/watch
+    QT_STATIC_CONST TQCursor & ibeamCursor;	// ibeam/text entry
+    QT_STATIC_CONST TQCursor & sizeVerCursor;	// vertical resize
+    QT_STATIC_CONST TQCursor & sizeHorCursor;	// horizontal resize
+    QT_STATIC_CONST TQCursor & sizeBDiagCursor;	// diagonal resize (/)
+    QT_STATIC_CONST TQCursor & sizeFDiagCursor;	// diagonal resize (\)
+    QT_STATIC_CONST TQCursor & sizeAllCursor;	// all directions resize
+    QT_STATIC_CONST TQCursor & blankCursor;	// blank/invisible cursor
+    QT_STATIC_CONST TQCursor & splitVCursor;	// vertical bar with left-right
+						// arrows
+    QT_STATIC_CONST TQCursor & splitHCursor;	// horizontal bar with up-down
+						// arrows
+    QT_STATIC_CONST TQCursor & pointingHandCursor;	// pointing hand
+    QT_STATIC_CONST TQCursor & forbiddenCursor;	// forbidden cursor (slashed circle)
+    QT_STATIC_CONST TQCursor & whatsThisCursor;  // arrow with a question mark
+    QT_STATIC_CONST TQCursor & busyCursor;	// arrow with hourglass
+
+
+    enum TextFormat {
+	PlainText,
+	RichText,
+	AutoText,
+	LogText
+    };
+
+    // Documented in qtextedit.cpp
+    enum AnchorAttribute {
+	AnchorName,
+	AnchorHref
+    };
+
+    // Documented in qmainwindow.cpp
+    enum Dock {
+	DockUnmanaged,
+	DockTornOff,
+	DockTop,
+	DockBottom,
+	DockRight,
+	DockLeft,
+	DockMinimized
+#ifndef QT_NO_COMPAT
+        ,
+	Unmanaged = DockUnmanaged,
+	TornOff = DockTornOff,
+	Top = DockTop,
+	Bottom = DockBottom,
+	Right = DockRight,
+	Left = DockLeft,
+	Minimized = DockMinimized
+#endif
+    };
+    // compatibility
+    typedef Dock ToolBarDock;
+
+    // documented in qdatetime.cpp
+    enum DateFormat {
+	TextDate,      // default TQt
+	ISODate,       // ISO 8601
+	LocalDate      // locale dependent
+    };
+
+    // documented in qdatetime.cpp
+    enum TimeSpec {
+	LocalTime,
+	UTC
+    };
+
+    // documented in qwidget.cpp
+    enum BackgroundMode {
+	FixedColor,
+	FixedPixmap,
+	NoBackground,
+	PaletteForeground,
+	PaletteButton,
+	PaletteLight,
+	PaletteMidlight,
+	PaletteDark,
+	PaletteMid,
+	PaletteText,
+	PaletteBrightText,
+	PaletteBase,
+	PaletteBackground,
+	PaletteShadow,
+	PaletteHighlight,
+	PaletteHighlightedText,
+	PaletteButtonText,
+	PaletteLink,
+	PaletteLinkVisited,
+	X11ParentRelative
+    };
+
+    typedef uint ComparisonFlags;
+
+    // Documented in qstring.cpp
+    enum StringComparisonMode {
+        CaseSensitive   = 0x00001, // 0 0001
+        BeginsWith      = 0x00002, // 0 0010
+        EndsWith        = 0x00004, // 0 0100
+        Contains        = 0x00008, // 0 1000
+        ExactMatch      = 0x00010  // 1 0000
+    };
+
+    // Documented in qtabwidget.cpp
+    enum Corner {
+	TopLeft     = 0x00000,
+	TopRight    = 0x00001,
+	BottomLeft  = 0x00002,
+	BottomRight = 0x00003
+    };
+
+    // "handle" type for system objects. Documented as \internal in
+    // qapplication.cpp
+#if defined(Q_WS_MAC)
+    typedef void * HANDLE;
+#elif defined(Q_WS_WIN)
+    typedef void *HANDLE;
+#elif defined(Q_WS_X11)
+    typedef unsigned long HANDLE;
+#elif defined(Q_WS_QWS)
+    typedef void * HANDLE;
+#endif
+};
+
+
+class Q_EXPORT TQInternal {
+public:
+    enum PaintDeviceFlags {
+	UndefinedDevice = 0x00,
+	Widget = 0x01,
+	Pixmap = 0x02,
+	Printer = 0x03,
+	Picture = 0x04,
+	System = 0x05,
+	DeviceTypeMask = 0x0f,
+	ExternalDevice = 0x10,
+	// used to emulate some of the behaviour different between TQt2 and TQt3 (mainly for printing)
+	CompatibilityMode = 0x20
+    };
+};
+
+#endif // TQNAMESPACE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qnetwork-h.html b/doc/html/qnetwork-h.html new file mode 100644 index 00000000..c9f8cc86 --- /dev/null +++ b/doc/html/qnetwork-h.html @@ -0,0 +1,42 @@ + + + + + +qnetwork.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qnetwork.h Example File

+ + +

+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qnetworkoperation-members.html b/doc/html/qnetworkoperation-members.html new file mode 100644 index 00000000..226c0008 --- /dev/null +++ b/doc/html/qnetworkoperation-members.html @@ -0,0 +1,102 @@ + + + + + +TQNetworkOperation Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQNetworkOperation

+ +

This is the complete list of member functions for +TQNetworkOperation, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qnetworkoperation.html b/doc/html/qnetworkoperation.html new file mode 100644 index 00000000..d3510b22 --- /dev/null +++ b/doc/html/qnetworkoperation.html @@ -0,0 +1,169 @@ + + + + + +TQNetworkOperation Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQNetworkOperation Class Reference
[network module]

+ +

The TQNetworkOperation class provides common operations for network protocols. +More... +

#include <qnetworkprotocol.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • TQNetworkOperation ( TQNetworkProtocol::Operation operation, const TQString & arg0, const TQString & arg1, const TQString & arg2 )
  • +
  • TQNetworkOperation ( TQNetworkProtocol::Operation operation, const TQByteArray & arg0, const TQByteArray & arg1, const TQByteArray & arg2 )
  • +
  • ~TQNetworkOperation ()
  • +
  • void setState ( TQNetworkProtocol::State state )
  • +
  • void setProtocolDetail ( const TQString & detail )
  • +
  • void setErrorCode ( int ec )
  • +
  • void setArg ( int num, const TQString & arg )
  • +
  • void setRawArg ( int num, const TQByteArray & arg )
  • +
  • TQNetworkProtocol::Operation operation () const
  • +
  • TQNetworkProtocol::State state () const
  • +
  • TQString arg ( int num ) const
  • +
  • TQByteArray rawArg ( int num ) const
  • +
  • TQString protocolDetail () const
  • +
  • int errorCode () const
  • +
  • void free ()
  • +
+

Detailed Description

+ + +

The TQNetworkOperation class provides common operations for network protocols. + +

+ +

An object is created to describe the operation and the current +state for each operation that a network protocol should process. +

For a detailed description of the TQt Network Architecture and how +to implement and use network protocols in TQt, see the TQt Network Documentation. +

See also TQNetworkProtocol and Input/Output and Networking. + +


Member Function Documentation

+

TQNetworkOperation::TQNetworkOperation ( TQNetworkProtocol::Operation operation, const TQString & arg0, const TQString & arg1, const TQString & arg2 ) +

+Constructs a network operation object. operation is the type of +the operation, and arg0, arg1 and arg2 are the first +three arguments of the operation. The state is initialized to +TQNetworkProtocol::StWaiting. +

See also TQNetworkProtocol::Operation and TQNetworkProtocol::State. + +

TQNetworkOperation::TQNetworkOperation ( TQNetworkProtocol::Operation operation, const TQByteArray & arg0, const TQByteArray & arg1, const TQByteArray & arg2 ) +

+Constructs a network operation object. operation is the type of +the operation, and arg0, arg1 and arg2 are the first +three raw data arguments of the operation. The state is +initialized to TQNetworkProtocol::StWaiting. +

See also TQNetworkProtocol::Operation and TQNetworkProtocol::State. + +

TQNetworkOperation::~TQNetworkOperation () +

+Destructor. + +

TQString TQNetworkOperation::arg ( int num ) const +

+Returns the operation's num-th argument. If this argument was +not already set, an empty string is returned. + +

Example: network/networkprotocol/nntp.cpp. +

int TQNetworkOperation::errorCode () const +

+Returns the error code for the last error that occurred. + +

void TQNetworkOperation::free () +

+Sets this object to delete itself when it hasn't been used for one +second. +

Because TQNetworkOperation pointers are passed around a lot the +TQNetworkProtocol generally does not have enough knowledge to +delete these at the correct time. If a TQNetworkProtocol doesn't +need an operation any more it will call this function instead. +

Note: you should never need to call the method yourself. + +

TQNetworkProtocol::Operation TQNetworkOperation::operation () const +

+Returns the type of the operation. + +

TQString TQNetworkOperation::protocolDetail () const +

+Returns a detailed error message for the last error. This must +have been set using setProtocolDetail(). + +

TQByteArray TQNetworkOperation::rawArg ( int num ) const +

+Returns the operation's num-th raw data argument. If this +argument was not already set, an empty bytearray is returned. + +

void TQNetworkOperation::setArg ( int num, const TQString & arg ) +

+Sets the network operation's num-th argument to arg. + +

void TQNetworkOperation::setErrorCode ( int ec ) +

+Sets the error code to ec. +

If the operation failed, the protocol should set an error code to +describe the error in more detail. If possible, one of the error +codes defined in TQNetworkProtocol should be used. +

See also setProtocolDetail() and TQNetworkProtocol::Error. + +

void TQNetworkOperation::setProtocolDetail ( const TQString & detail ) +

+If the operation failed, the error message can be specified as detail. + +

void TQNetworkOperation::setRawArg ( int num, const TQByteArray & arg ) +

+Sets the network operation's num-th raw data argument to arg. + +

void TQNetworkOperation::setState ( TQNetworkProtocol::State state ) +

+Sets the state of the operation object. This should be done by +the network protocol during processing; at the end it should be +set to TQNetworkProtocol::StDone or TQNetworkProtocol::StFailed, +depending on success or failure. +

See also TQNetworkProtocol::State. + +

TQNetworkProtocol::State TQNetworkOperation::state () const +

+Returns the state of the operation. You can determine whether an +operation is still waiting to be processed, is being processed, +has been processed successfully, or failed. + + +

+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/qnetworkprotocol-h.html b/doc/html/qnetworkprotocol-h.html new file mode 100644 index 00000000..5be5680e --- /dev/null +++ b/doc/html/qnetworkprotocol-h.html @@ -0,0 +1,289 @@ + + + + + +qnetworkprotocol.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qnetworkprotocol.h

+ +

This is the verbatim text of the qnetworkprotocol.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qnetworkprotocol.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQNetworkProtocol class
+**
+** Created : 950429
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQNETWORKPROTOCOL_H
+#define TQNETWORKPROTOCOL_H
+
+#ifndef QT_H
+#include "qurlinfo.h"
+#include "qstring.h"
+#include "qdict.h"
+#include "qobject.h"
+#endif // QT_H
+
+#ifndef QT_NO_NETWORKPROTOCOL
+
+#if __GNUC__ - 0 > 3
+#pragma GCC system_header
+#endif
+
+class TQNetworkProtocol;
+class TQNetworkOperation;
+class TQTimer;
+class TQUrlOperator;
+class TQNetworkProtocolPrivate;
+template <class T> class TQValueList;
+
+class Q_EXPORT TQNetworkProtocolFactoryBase
+{
+public:
+   virtual TQNetworkProtocol *createObject() = 0;
+
+};
+
+template< class T >
+class TQNetworkProtocolFactory : public TQNetworkProtocolFactoryBase
+{
+public:
+    TQNetworkProtocol *createObject() {
+	return new T;
+    }
+
+};
+
+typedef TQDict< TQNetworkProtocolFactoryBase > TQNetworkProtocolDict;
+
+class Q_EXPORT TQNetworkProtocol : public TQObject
+{
+    Q_OBJECT
+
+public:
+    enum State {
+	StWaiting = 0,
+	StInProgress,
+	StDone,
+	StFailed,
+	StStopped
+    };
+
+    enum Operation {
+	OpListChildren = 1,
+	OpMkDir = 2,
+	OpMkdir = OpMkDir, // ### remove in 4.0
+	OpRemove = 4,
+	OpRename = 8,
+	OpGet = 32,
+	OpPut = 64
+    };
+
+    enum ConnectionState {
+	ConHostFound,
+	ConConnected,
+	ConClosed
+    };
+
+    enum Error {
+	// no error
+	NoError = 0,
+	// general errors
+	ErrValid,
+	ErrUnknownProtocol,
+	ErrUnsupported,
+	ErrParse,
+	// errors on connect
+	ErrLoginIncorrect,
+	ErrHostNotFound,
+	// protocol errors
+	ErrListChildren,
+	ErrListChlidren = ErrListChildren, // ### remove in 4.0
+	ErrMkDir,
+	ErrMkdir = ErrMkDir, // ### remove in 4.0
+	ErrRemove,
+	ErrRename,
+	ErrGet,
+	ErrPut,
+	ErrFileNotExisting,
+	ErrPermissionDenied
+    };
+
+    TQNetworkProtocol();
+    virtual ~TQNetworkProtocol();
+
+    virtual void setUrl( TQUrlOperator *u );
+
+    virtual void setAutoDelete( bool b, int i = 10000 );
+    bool autoDelete() const;
+
+    static void registerNetworkProtocol( const TQString &protocol,
+					 TQNetworkProtocolFactoryBase *protocolFactory );
+    static TQNetworkProtocol *getNetworkProtocol( const TQString &protocol );
+    static bool hasOnlyLocalFileSystem();
+
+    virtual int supportedOperations() const;
+    virtual void addOperation( TQNetworkOperation *op );
+
+    TQUrlOperator *url() const;
+    TQNetworkOperation *operationInProgress() const;
+    virtual void clearOperationQueue();
+    virtual void stop();
+
+signals:
+    void data( const TQByteArray &, TQNetworkOperation *res );
+    void connectionStateChanged( int state, const TQString &data );
+    void finished( TQNetworkOperation *res );
+    void start( TQNetworkOperation *res );
+    void newChildren( const TQValueList<TQUrlInfo> &, TQNetworkOperation *res );
+    void newChild( const TQUrlInfo &, TQNetworkOperation *res );
+    void createdDirectory( const TQUrlInfo &, TQNetworkOperation *res );
+    void removed( TQNetworkOperation *res );
+    void itemChanged( TQNetworkOperation *res );
+    void dataTransferProgress( int bytesDone, int bytesTotal, TQNetworkOperation *res );
+
+protected:
+    virtual void processOperation( TQNetworkOperation *op );
+    virtual void operationListChildren( TQNetworkOperation *op );
+    virtual void operationMkDir( TQNetworkOperation *op );
+    virtual void operationRemove( TQNetworkOperation *op );
+    virtual void operationRename( TQNetworkOperation *op );
+    virtual void operationGet( TQNetworkOperation *op );
+    virtual void operationPut( TQNetworkOperation *op );
+    virtual void operationPutChunk( TQNetworkOperation *op );
+    virtual bool checkConnection( TQNetworkOperation *op );
+
+private:
+    TQNetworkProtocolPrivate *d;
+
+private slots:
+    void processNextOperation( TQNetworkOperation *old );
+    void startOps();
+    void emitNewChildren( const TQUrlInfo &i, TQNetworkOperation *op );
+
+    void removeMe();
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQNetworkProtocol( const TQNetworkProtocol & );
+    TQNetworkProtocol &operator=( const TQNetworkProtocol & );
+#endif
+};
+
+class TQNetworkOperationPrivate;
+
+class Q_EXPORT TQNetworkOperation : public TQObject
+{
+    Q_OBJECT
+    friend class TQUrlOperator;
+
+public:
+    TQNetworkOperation( TQNetworkProtocol::Operation operation,
+		    const TQString &arg0, const TQString &arg1,
+		    const TQString &arg2 );
+    TQNetworkOperation( TQNetworkProtocol::Operation operation,
+		    const TQByteArray &arg0, const TQByteArray &arg1,
+		    const TQByteArray &arg2 );
+    ~TQNetworkOperation();
+
+    void setState( TQNetworkProtocol::State state );
+    void setProtocolDetail( const TQString &detail );
+    void setErrorCode( int ec );
+    void setArg( int num, const TQString &arg );
+    void setRawArg( int num, const TQByteArray &arg );
+
+    TQNetworkProtocol::Operation operation() const;
+    TQNetworkProtocol::State state() const;
+    TQString arg( int num ) const;
+    TQByteArray rawArg( int num ) const;
+    TQString protocolDetail() const;
+    int errorCode() const;
+
+    void free();
+
+private slots:
+    void deleteMe();
+
+private:
+    TQByteArray &raw( int num ) const;
+    TQNetworkOperationPrivate *d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQNetworkOperation( const TQNetworkOperation & );
+    TQNetworkOperation &operator=( const TQNetworkOperation & );
+#endif
+};
+
+#endif // QT_NO_NETWORKPROTOCOL
+
+#endif // TQNETWORKPROTOCOL_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qnetworkprotocol-members.html b/doc/html/qnetworkprotocol-members.html new file mode 100644 index 00000000..587a8fd9 --- /dev/null +++ b/doc/html/qnetworkprotocol-members.html @@ -0,0 +1,119 @@ + + + + + +TQNetworkProtocol Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQNetworkProtocol

+ +

This is the complete list of member functions for +TQNetworkProtocol, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qnetworkprotocol.html b/doc/html/qnetworkprotocol.html new file mode 100644 index 00000000..6aac280c --- /dev/null +++ b/doc/html/qnetworkprotocol.html @@ -0,0 +1,532 @@ + + + + + +TQNetworkProtocol Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQNetworkProtocol Class Reference
[network module]

+ +

The TQNetworkProtocol class provides a common API for network protocols. +More... +

#include <qnetworkprotocol.h> +

Inherits TQObject. +

Inherited by TQFtp, TQHttp, and TQLocalFs. +

List of all member functions. +

Public Members

+
    +
  • enum State { StWaiting = 0, StInProgress, StDone, StFailed, StStopped }
  • +
  • enum Operation { OpListChildren = 1, OpMkDir = 2, OpMkdir = OpMkDir, OpRemove = 4, OpRename = 8, OpGet = 32, OpPut = 64 }
  • +
  • enum ConnectionState { ConHostFound, ConConnected, ConClosed }
  • +
  • enum Error { NoError = 0, ErrValid, ErrUnknownProtocol, ErrUnsupported, ErrParse, ErrLoginIncorrect, ErrHostNotFound, ErrListChildren, ErrListChlidren = ErrListChildren, ErrMkDir, ErrMkdir = ErrMkDir, ErrRemove, ErrRename, ErrGet, ErrPut, ErrFileNotExisting, ErrPermissionDenied }
  • +
  • TQNetworkProtocol ()
  • +
  • virtual ~TQNetworkProtocol ()
  • +
  • virtual void setUrl ( TQUrlOperator * u )
  • +
  • virtual void setAutoDelete ( bool b, int i = 10000 )
  • +
  • bool autoDelete () const
  • +
  • virtual int supportedOperations () const
  • +
  • virtual void addOperation ( TQNetworkOperation * op )
  • +
  • TQUrlOperator * url () const
  • +
  • TQNetworkOperation * operationInProgress () const
  • +
  • virtual void clearOperationQueue ()
  • +
  • virtual void stop ()
  • +
+

Signals

+
    +
  • void data ( const TQByteArray & data, TQNetworkOperation * op )
  • +
  • void connectionStateChanged ( int state, const TQString & data )
  • +
  • void finished ( TQNetworkOperation * op )
  • +
  • void start ( TQNetworkOperation * op )
  • +
  • void newChildren ( const TQValueList<TQUrlInfo> & i, TQNetworkOperation * op )
  • +
  • void newChild ( const TQUrlInfo & i, TQNetworkOperation * op )
  • +
  • void createdDirectory ( const TQUrlInfo & i, TQNetworkOperation * op )
  • +
  • void removed ( TQNetworkOperation * op )
  • +
  • void itemChanged ( TQNetworkOperation * op )
  • +
  • void dataTransferProgress ( int bytesDone, int bytesTotal, TQNetworkOperation * op )
  • +
+

Static Public Members

+ +

Protected Members

+ +

Detailed Description

+ + +The TQNetworkProtocol class provides a common API for network protocols. + +

+ + + +

This is a base class which should be used for network protocols +implementations that can then be used in TQt (e.g. in the file +dialog) together with the TQUrlOperator. +

The easiest way to implement a new network protocol is to +reimplement the operation*() methods, e.g. operationGet(), etc. +Only the supported operations should be reimplemented. To specify +which operations are supported, also reimplement +supportedOperations() and return an int that is OR'd together +using the supported operations from the TQNetworkProtocol::Operation enum. +

When you implement a network protocol this way, it is important to +emit the correct signals. Also, always emit the finished() signal +when an operation is done (on success and on failure). TQt +relies on correctly emitted finished() signals. +

For a detailed description of the TQt Network Architecture and how +to implement and use network protocols in TQt, see the TQt Network Documentation. +

See also Input/Output and Networking. + +


Member Type Documentation

+

TQNetworkProtocol::ConnectionState

+ +

When the connection state of a network protocol changes it emits +the signal connectionStateChanged(). The first argument is one of +the following values: +

    +
  • TQNetworkProtocol::ConHostFound - Host has been found. +
  • TQNetworkProtocol::ConConnected - Connection to the host has been established. +
  • TQNetworkProtocol::ConClosed - Connection has been closed. +
+

TQNetworkProtocol::Error

+ +

When an operation fails (finishes unsuccessfully), the +TQNetworkOperation of the operation returns an error code which has +one of the following values: +

    +
  • TQNetworkProtocol::NoError - No error occurred. +
  • TQNetworkProtocol::ErrValid - The URL you are operating on is not valid. +
  • TQNetworkProtocol::ErrUnknownProtocol - There is no protocol implementation +available for the protocol of the URL you are operating on (e.g. +if the protocol is http and no http implementation has been +registered). +
  • TQNetworkProtocol::ErrUnsupported - The operation is not supported by the +protocol. +
  • TQNetworkProtocol::ErrParse - The URL could not be parsed correctly. +
  • TQNetworkProtocol::ErrLoginIncorrect - You needed to login but the username +or password is wrong. +
  • TQNetworkProtocol::ErrHostNotFound - The specified host (in the URL) couldn't +be found. +
  • TQNetworkProtocol::ErrListChildren - An error occurred while listing the +children (files). +
  • TQNetworkProtocol::ErrMkDir - An error occurred when creating a directory. +
  • TQNetworkProtocol::ErrRemove - An error occurred when removing a child (file). +
  • TQNetworkProtocol::ErrRename - An error occurred when renaming a child (file). +
  • TQNetworkProtocol::ErrGet - An error occurred while getting (retrieving) data. +
  • TQNetworkProtocol::ErrPut - An error occurred while putting (uploading) data. +
  • TQNetworkProtocol::ErrFileNotExisting - A file which is needed by the operation +doesn't exist. +
  • TQNetworkProtocol::ErrPermissionDenied - Permission for doing the operation has +been denied. +

You should also use these error codes when implementing custom +network protocols. If this is not possible, you can define your own +error codes by using integer values that don't conflict with any +of these values. + +

TQNetworkProtocol::Operation

+ +

This enum lists the possible operations that a network protocol +can support. supportedOperations() returns an int of these that is +OR'd together. Also, the type() of a TQNetworkOperation is always +one of these values. +

    +
  • TQNetworkProtocol::OpListChildren - List the children of a URL, e.g. of a directory. +
  • TQNetworkProtocol::OpMkDir - Create a directory. +
  • TQNetworkProtocol::OpRemove - Remove a child (e.g. a file). +
  • TQNetworkProtocol::OpRename - Rename a child (e.g. a file). +
  • TQNetworkProtocol::OpGet - Get data from a location. +
  • TQNetworkProtocol::OpPut - Put data to a location. +
+

TQNetworkProtocol::State

+ +

This enum contains the state that a TQNetworkOperation can have. +

    +
  • TQNetworkProtocol::StWaiting - The operation is in the TQNetworkProtocol's queue +waiting to be prcessed. +
  • TQNetworkProtocol::StInProgress - The operation is being processed. +
  • TQNetworkProtocol::StDone - The operation has been processed succesfully. +
  • TQNetworkProtocol::StFailed - The operation has been processed but an error occurred. +
  • TQNetworkProtocol::StStopped - The operation has been processed but has been +stopped before it finished, and is waiting to be processed. +

+


Member Function Documentation

+

TQNetworkProtocol::TQNetworkProtocol () +

+Constructor of the network protocol base class. Does some +initialization and connecting of signals and slots. + +

TQNetworkProtocol::~TQNetworkProtocol () [virtual] +

+Destructor. + +

void TQNetworkProtocol::addOperation ( TQNetworkOperation * op ) [virtual] +

+Adds the operation op to the operation queue. The operation +will be processed as soon as possible. This method returns +immediately. + +

bool TQNetworkProtocol::autoDelete () const +

+Returns TRUE if auto-deleting is enabled; otherwise returns FALSE. +

See also TQNetworkProtocol::setAutoDelete(). + +

bool TQNetworkProtocol::checkConnection ( TQNetworkOperation * op ) [virtual protected] +

+For processing operations the network protocol base class calls +this method tquite often. This should be reimplemented by new +network protocols. It should return TRUE if the connection is OK +(open); otherwise it should return FALSE. If the connection is not +open the protocol should open it. +

If the connection can't be opened (e.g. because you already tried +but the host couldn't be found), set the state of op to +TQNetworkProtocol::StFailed and emit the finished() signal with +this TQNetworkOperation as argument. +

op is the operation that needs an open connection. + +

Example: network/networkprotocol/nntp.cpp. +

void TQNetworkProtocol::clearOperationQueue () [virtual] +

+Clears the operation queue. + +

void TQNetworkProtocol::connectionStateChanged ( int state, const TQString & data ) [signal] +

+ +

This signal is emitted whenever the state of the connection of the +network protocol is changed. state describes the new state, +which is one of, ConHostFound, ConConnected or ConClosed. +data is a message text. + +

void TQNetworkProtocol::createdDirectory ( const TQUrlInfo & i, TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted when mkdir() has been succesful and the +directory has been created. i holds the information about the +new directory. op is the pointer to the operation object which +contains all the information about the operation, including the +state, etc. Using op->arg( 0 ), you can get the file name of the +new directory. +

When a protocol emits this signal, TQNetworkProtocol is smart +enough to let the TQUrlOperator, which is used by the network +protocol, emit its corresponding signal. + +

void TQNetworkProtocol::data ( const TQByteArray & data, TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted when new data has been received after +calling get() or put(). op holds the name of the file from +which data is retrieved or uploaded in its first argument, and the +(raw) data in its second argument. You can get them with +op->arg( 0 ) and op->rawArg( 1 ). op is the pointer to the +operation object, which contains all the information about the +operation, including the state, etc. +

When a protocol emits this signal, TQNetworkProtocol is smart +enough to let the TQUrlOperator (which is used by the network +protocol) emit its corresponding signal. + +

void TQNetworkProtocol::dataTransferProgress ( int bytesDone, int bytesTotal, TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted during the transfer of data (using put() or +get()). bytesDone is how many bytes of bytesTotal have been +transferred. bytesTotal may be -1, which means that the total +number of bytes is not known. op is the pointer to the +operation object which contains all the information about the +operation, including the state, etc. +

When a protocol emits this signal, TQNetworkProtocol is smart +enough to let the TQUrlOperator, which is used by the network +protocol, emit its corresponding signal. + +

void TQNetworkProtocol::finished ( TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted when an operation finishes. This signal is +always emitted, for both success and failure. op is the pointer +to the operation object which contains all the information about +the operation, including the state, etc. Check the state and error +code of the operation object to determine whether or not the +operation was successful. +

When a protocol emits this signal, TQNetworkProtocol is smart +enough to let the TQUrlOperator, which is used by the network +protocol, emit its corresponding signal. + +

TQNetworkProtocol * TQNetworkProtocol::getNetworkProtocol ( const TQString & protocol ) [static] +

+Static method to get a new instance of the network protocol protocol. For example, if you need to do some FTP operations, do +the following: +
+    TQFtp *ftp = TQNetworkProtocol::getNetworkProtocol( "ftp" );
+    
+ +This returns a pointer to a new instance of an ftp implementation +or null if no protocol for ftp was registered. The ownership of +the pointer is transferred to you, so you must delete it if you +don't need it anymore. +

Normally you should not work directly with network protocols, so +you will not need to call this method yourself. Instead, use +TQUrlOperator, which makes working with network protocols much more +convenient. +

See also TQUrlOperator. + +

bool TQNetworkProtocol::hasOnlyLocalFileSystem () [static] +

+Returns TRUE if the only protocol registered is for working on the +local filesystem; returns FALSE if other network protocols are +also registered. + +

void TQNetworkProtocol::itemChanged ( TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted whenever a file which is a child of this +URL has been changed, e.g. by successfully calling rename(). op +holds the original and the new file names in the first and second +arguments, accessible with op->arg( 0 ) and op->arg( 1 ) +respectively. op is the pointer to the operation object which +contains all the information about the operation, including the +state, etc. +

When a protocol emits this signal, TQNetworkProtocol is smart +enough to let the TQUrlOperator, which is used by the network +protocol, emit its corresponding signal. + +

void TQNetworkProtocol::newChild ( const TQUrlInfo & i, TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted if a new child (file) has been read. +TQNetworkProtocol automatically connects it to a slot which creates +a list of TQUrlInfo objects (with just one TQUrlInfo i) and emits +the newChildren() signal with this list. op is the pointer to +the operation object which contains all the information about the +operation that has finished, including the state, etc. +

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 TQUrlInfo objects. + +

void TQNetworkProtocol::newChildren ( const TQValueList<TQUrlInfo> & i, TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted after listChildren() was called and new +children (files) have been read from the list of files. i holds +the information about the new children. op is the pointer to +the operation object which contains all the information about the +operation, including the state, etc. +

When a protocol emits this signal, TQNetworkProtocol is smart +enough to let the TQUrlOperator, which is used by the network +protocol, emit its corresponding signal. +

When implementing your own network protocol and reading children, +you usually don't read one child at once, but rather a list of +them. That's why this signal takes a list of TQUrlInfo objects. If +you prefer to read just one child at a time you can use the +convenience signal newChild(), which takes a single TQUrlInfo +object. + +

void TQNetworkProtocol::operationGet ( TQNetworkOperation * op ) [virtual protected] +

+When implementing a new network protocol, this method should be +reimplemented if the protocol supports getting data; this method +should then process the TQNetworkOperation. +

When you reimplement this method it's very important that you emit +the correct signals at the correct time (especially the finished() +signal after processing an operation). Take a look at the TQt Network Documentation which describes in +detail how to reimplement this method. You may also want to look +at the example implementation in +examples/network/networkprotocol/nntp.cpp. +

op is the pointer to the operation object which contains all +the information on the operation that has finished, including the +state, etc. + +

Example: network/networkprotocol/nntp.cpp. +

TQNetworkOperation * TQNetworkProtocol::operationInProgress () const +

+Returns the operation, which is being processed, or 0 of no +operation is being processed at the moment. + +

void TQNetworkProtocol::operationListChildren ( TQNetworkOperation * op ) [virtual protected] +

+When implementing a new network protocol, this method should be +reimplemented if the protocol supports listing children (files); +this method should then process this TQNetworkOperation. +

When you reimplement this method it's very important that you emit +the correct signals at the correct time (especially the finished() +signal after processing an operation). Take a look at the TQt Network Documentation which describes in +detail how to reimplement this method. You may also want to look +at the example implementation in +examples/network/networkprotocol/nntp.cpp. +

op is the pointer to the operation object which contains all +the information on the operation that has finished, including the +state, etc. + +

Example: network/networkprotocol/nntp.cpp. +

void TQNetworkProtocol::operationMkDir ( TQNetworkOperation * op ) [virtual protected] +

+When implementing a new network protocol, this method should be +reimplemented if the protocol supports making directories; this +method should then process this TQNetworkOperation. +

When you reimplement this method it's very important that you emit +the correct signals at the correct time (especially the finished() +signal after processing an operation). Take a look at the TQt Network Documentation which describes in +detail how to reimplement this method. You may also want to look +at the example implementation in +examples/network/networkprotocol/nntp.cpp. +

op is the pointer to the operation object which contains all +the information on the operation that has finished, including the +state, etc. + +

void TQNetworkProtocol::operationPut ( TQNetworkOperation * op ) [virtual protected] +

+When implementing a new network protocol, this method should be +reimplemented if the protocol supports putting (uploading) data; +this method should then process the TQNetworkOperation. +

When you reimplement this method it's very important that you emit +the correct signals at the correct time (especially the finished() +signal after processing an operation). Take a look at the TQt Network Documentation which describes in +detail how to reimplement this method. You may also want to look +at the example implementation in +examples/network/networkprotocol/nntp.cpp. +

op is the pointer to the operation object which contains all +the information on the operation that has finished, including the +state, etc. + +

void TQNetworkProtocol::operationRemove ( TQNetworkOperation * op ) [virtual protected] +

+When implementing a new network protocol, this method should be +reimplemented if the protocol supports removing children (files); +this method should then process this TQNetworkOperation. +

When you reimplement this method it's very important that you emit +the correct signals at the correct time (especially the finished() +signal after processing an operation). Take a look at the TQt Network Documentation which is describes +in detail how to reimplement this method. You may also want to +look at the example implementation in +examples/network/networkprotocol/nntp.cpp. +

op is the pointer to the operation object which contains all +the information on the operation that has finished, including the +state, etc. + +

void TQNetworkProtocol::operationRename ( TQNetworkOperation * op ) [virtual protected] +

+When implementing a new newtork protocol, this method should be +reimplemented if the protocol supports renaming children (files); +this method should then process this TQNetworkOperation. +

When you reimplement this method it's very important that you emit +the correct signals at the correct time (especially the finished() +signal after processing an operation). Take a look at the TQt Network Documentation which describes in +detail how to reimplement this method. You may also want to look +at the example implementation in +examples/network/networkprotocol/nntp.cpp. +

op is the pointer to the operation object which contains all +the information on the operation that has finished, including the +state, etc. + +

void TQNetworkProtocol::registerNetworkProtocol ( const TQString & protocol, TQNetworkProtocolFactoryBase * protocolFactory ) [static] +

+Static method to register a network protocol for TQt. For example, +if you have an implementation of NNTP (called Nntp) which is +derived from TQNetworkProtocol, call: +
+    TQNetworkProtocol::registerNetworkProtocol( "nntp", new TQNetworkProtocolFactory<Nntp> );
+    
+ +after which your implementation is registered for future nntp +operations. +

The name of the protocol is given in protocol and a pointer to +the protocol factory is given in protocolFactory. + +

void TQNetworkProtocol::removed ( TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted when remove() has been succesful and the +file has been removed. op holds the file name of the removed +file in the first argument, accessible with op->arg( 0 ). op is +the pointer to the operation object which contains all the +information about the operation, including the state, etc. +

When a protocol emits this signal, TQNetworkProtocol is smart +enough to let the TQUrlOperator, which is used by the network +protocol, emit its corresponding signal. + +

void TQNetworkProtocol::setAutoDelete ( bool b, int i = 10000 ) [virtual] +

+Because it's sometimes hard to take care of removing network +protocol instances, TQNetworkProtocol provides an auto-delete +mechanism. If you set b to TRUE, the network protocol instance +is removed after it has been inactive for i milliseconds (i.e. +i milliseconds after the last operation has been processed). +If you set b to FALSE the auto-delete mechanism is switched +off. +

If you switch on auto-delete, the TQNetworkProtocol also deletes +its TQUrlOperator. + +

void TQNetworkProtocol::setUrl ( TQUrlOperator * u ) [virtual] +

+Sets the TQUrlOperator, on which the protocol works, to u. +

See also TQUrlOperator. + +

void TQNetworkProtocol::start ( TQNetworkOperation * op ) [signal] +

+ +

Some operations (such as listChildren()) emit this signal when +they start processing the operation. op is the pointer to the +operation object which contains all the information about the +operation, including the state, etc. +

When a protocol emits this signal, TQNetworkProtocol is smart +enough to let the TQUrlOperator, which is used by the network +protocol, emit its corresponding signal. + +

void TQNetworkProtocol::stop () [virtual] +

+Stops the current operation that is being processed and clears all +waiting operations. + +

int TQNetworkProtocol::supportedOperations () const [virtual] +

+Returns an int that is OR'd together using the enum values of +TQNetworkProtocol::Operation, which describes which operations +are supported by the network protocol. Should be reimplemented by +new network protocols. + +

Example: network/networkprotocol/nntp.cpp. +

TQUrlOperator * TQNetworkProtocol::url () const +

+Returns the TQUrlOperator on which the protocol works. + + +

+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/qnp-h.html b/doc/html/qnp-h.html new file mode 100644 index 00000000..63d0ad3b --- /dev/null +++ b/doc/html/qnp-h.html @@ -0,0 +1,231 @@ + + + + + +qnp.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qnp.h

+ +

This is the verbatim text of the qnp.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qnp.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQt extension classes for Netscape Plugin support.
+**
+** Created : 970601
+**
+** Copyright (C) 1992-2007 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 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 retquirements 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 TQNP_H
+#define TQNP_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#endif // QT_H
+
+
+struct _NPInstance;
+struct _NPStream;
+class TQNPInstance;
+
+class TQNPStream {
+public:
+    ~TQNPStream();
+
+    const char* url() const;
+    uint end() const;
+    uint lastModified() const;
+
+    const char* type() const;
+    bool seekable() const;
+    bool okay() const;
+    bool complete() const;
+
+    void requestRead(int offset, uint length);
+    int write( int len, void* buffer );
+
+    TQNPInstance* instance() { return inst; }
+    TQNPStream(TQNPInstance*,const char*,_NPStream*,bool);
+    void setOkay(bool);
+    void setComplete(bool);
+
+private:
+    TQNPInstance* inst;
+    _NPStream* stream;
+    TQString mtype;
+    int seek:1;
+    int isokay:1;
+    int iscomplete:1;
+};
+
+class TQNPWidget : public TQWidget {
+    Q_OBJECT
+public:
+    TQNPWidget();
+    ~TQNPWidget();
+    void enterEvent(TQEvent*);
+    void leaveEvent(TQEvent*);
+
+    virtual void enterInstance();
+    virtual void leaveInstance();
+
+    TQNPInstance* instance();
+
+private:
+    _NPInstance* pi;
+};
+
+class TQNPInstance : public TQObject {
+    Q_OBJECT
+public:
+    ~TQNPInstance();
+
+    // Arguments passed to EMBED
+    int argc() const;
+    const char* argn(int) const;
+    const char* argv(int) const;
+    enum Reason {
+        ReasonDone = 0,
+        ReasonBreak = 1,
+        ReasonError = 2,
+        ReasonUnknown = -1
+    };
+    const char* arg(const char* name) const;
+    enum InstanceMode { Embed=1, Full=2, Background=3 };
+    InstanceMode mode() const;
+
+    // The browser's name
+    const char* userAgent() const;
+
+    // Your window.
+    virtual TQNPWidget* newWindow();
+    TQNPWidget* widget();
+
+    // Incoming streams (SRC=... tag).
+    // Defaults ignore data.
+    enum StreamMode { Normal=1, Seek=2, AsFile=3, AsFileOnly=4 };
+    virtual bool newStreamCreated(TQNPStream*, StreamMode& smode);
+    virtual int writeReady(TQNPStream*);
+    virtual int write(TQNPStream*, int offset, int len, void* buffer);
+    virtual void streamDestroyed(TQNPStream*);
+
+    void status(const char* msg);
+    void getURLNotify(const char* url, const char* window=0, void*data=0);
+
+    void getURL(const char* url, const char* window=0);
+    void postURL(const char* url, const char* window,
+	     uint len, const char* buf, bool file);
+
+    TQNPStream* newStream(const char* mimetype, const char* window,
+	bool as_file=FALSE);
+    virtual void streamAsFile(TQNPStream*, const char* fname);
+
+    void* getJavaPeer() const;
+
+    virtual void notifyURL(const char* url, Reason r, void* notifyData);
+    virtual bool printFullPage();
+    virtual void print(TQPainter*);
+
+protected:
+    TQNPInstance();
+
+private:
+    friend class TQNPStream;
+    _NPInstance* pi;
+};
+
+
+class TQNPlugin {
+public:
+    // Write this to return your TQNPlugin derived class.
+    static TQNPlugin* create();
+
+    static TQNPlugin* actual();
+
+    virtual ~TQNPlugin();
+
+    void getVersionInfo(int& plugin_major, int& plugin_minor,
+	     int& browser_major, int& browser_minor);
+
+    virtual TQNPInstance* newInstance()=0;
+    virtual const char* getMIMEDescription() const=0;
+    virtual const char* getPluginNameString() const=0;
+    virtual const char* getPluginDescriptionString() const=0;
+
+    virtual void* getJavaClass();
+    virtual void unuseJavaClass();
+    void* getJavaEnv() const;
+
+protected:
+    TQNPlugin();
+};
+
+
+#endif  // TQNP_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qnpinstance-members.html b/doc/html/qnpinstance-members.html new file mode 100644 index 00000000..15725d23 --- /dev/null +++ b/doc/html/qnpinstance-members.html @@ -0,0 +1,112 @@ + + + + + +TQNPInstance Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQNPInstance

+ +

This is the complete list of member functions for +TQNPInstance, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qnpinstance.html b/doc/html/qnpinstance.html new file mode 100644 index 00000000..00067aea --- /dev/null +++ b/doc/html/qnpinstance.html @@ -0,0 +1,321 @@ + + + + + +TQNPInstance Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQNPInstance Class Reference

+ +

The TQNPInstance class provides a TQObject that is a web browser plugin. +More... +

This class is part of the TQt Netscape Extension. +

#include <qnp.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • ~TQNPInstance ()
  • +
  • int argc () const
  • +
  • const char * argn ( int i ) const
  • +
  • const char * argv ( int i ) const
  • +
  • enum Reason { ReasonDone = 0, ReasonBreak = 1, ReasonError = 2, ReasonUnknown = -1 }
  • +
  • const char * arg ( const char * name ) const
  • +
  • enum InstanceMode { Embed = 1, Full = 2, Background = 3 }
  • +
  • InstanceMode mode () const
  • +
  • const char * userAgent () const
  • +
  • virtual TQNPWidget * newWindow ()
  • +
  • TQNPWidget * widget ()
  • +
  • enum StreamMode { Normal = 1, Seek = 2, AsFile = 3, AsFileOnly = 4 }
  • +
  • virtual bool newStreamCreated ( TQNPStream *, StreamMode & smode )
  • +
  • virtual int writeReady ( TQNPStream * )
  • +
  • virtual int write ( TQNPStream *, int offset, int len, void * buffer )
  • +
  • virtual void streamDestroyed ( TQNPStream * )
  • +
  • void status ( const char * msg )
  • +
  • void getURLNotify ( const char * url, const char * window = 0, void * data = 0 )
  • +
  • void getURL ( const char * url, const char * window = 0 )
  • +
  • void postURL ( const char * url, const char * window, uint len, const char * buf, bool file )
  • +
  • TQNPStream * newStream ( const char * mimetype, const char * window, bool as_file = FALSE )
  • +
  • virtual void streamAsFile ( TQNPStream *, const char * fname )
  • +
  • void * getJavaPeer () const
  • +
  • virtual void notifyURL ( const char * url, Reason r, void * notifyData )
  • +
  • virtual bool printFullPage ()
  • +
  • virtual void print ( TQPainter * )
  • +
+

Protected Members

+ +

Detailed Description

+

This class is defined in the TQt Netscape Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQNPInstance class provides a TQObject that is a web browser plugin. +

+

Deriving from TQNPInstance creates an object that represents a +single <EMBED> tag in an HTML document. +

The TQNPInstance is responsible for creating an appropriate +TQNPWidget window if retquired (not all plugins have windows), and +for interacting with the input/output facilities intrinsic to +plugins. +

Note that there is absolutely no guarantee regarding the order +in which functions are called. Sometimes the browser will call +newWindow() first, at other times, newStreamCreated() will be +called first (assuming the <EMBED> tag has a SRC parameter). +

None of TQt's GUI functionality may be used until after the +first call to newWindow(). This includes any use of TQPaintDevice +(i.e. TQPixmap, TQWidget, and all subclasses), TQApplication, anything +related to TQPainter (TQBrush, etc.), fonts, TQMovie, TQToolTip, etc. +Useful classes which specifically can be used are TQImage, +TQFile, and TQBuffer. +

This restriction can easily be accommodated by structuring your +plugin so that the task of the TQNPInstance is to gather data, +while the task of the TQNPWidget is to provide a graphical +interface to that data. + +


Member Type Documentation

+

TQNPInstance::InstanceMode

+ +

This enum type provides TQt-style names for three #defines in +npapi.h: +

    +
  • TQNPInstance::Embed - corresponds to NP_EMBED +
  • TQNPInstance::Full - corresponds to NP_FULL +
  • TQNPInstance::Background - corresponds to NP_BACKGROUND +

+

TQNPInstance::Reason

+ +
    +
  • TQNPInstance::ReasonDone +
  • TQNPInstance::ReasonBreak +
  • TQNPInstance::ReasonError +
  • TQNPInstance::ReasonUnknown +
+

TQNPInstance::StreamMode

+ +
    +
  • TQNPInstance::Normal +
  • TQNPInstance::Seek +
  • TQNPInstance::AsFile +
  • TQNPInstance::AsFileOnly +
+

Member Function Documentation

+

TQNPInstance::TQNPInstance () [protected] +

+Creates a TQNPInstance. +

Can only be called from within a derived class created within +TQNPlugin::newInstance(). + +

TQNPInstance::~TQNPInstance () +

+Called when the plugin instance is about to be deleted. + +

const char * TQNPInstance::arg ( const char * name ) const +

+Returns the value of the named arguments, or 0 if no argument +called name appears in the <EMBED> tag of this instance. +If the argument appears, but has no value assigned, the empty +string is returned. In summary: +

+
Tag Result +
<EMBED ...> arg("FOO") == 0 +
<EMBED FOO ...> arg("FOO") == "" +
<EMBED FOO=BAR ...> arg("FOO") == "BAR" +
+ +

int TQNPInstance::argc () const +

+Returns the number of arguments to the instance. Note that you +should not normally rely on the ordering of arguments, and +note that the SGML specification does not permit multiple +arguments with the same name. +

See also arg() and argn(). + +

const char * TQNPInstance::argn ( int i ) const +

+Returns the name of the i-th argument. +

See also argc() and argv(). + +

const char * TQNPInstance::argv ( int i ) const +

+Returns the value of the i-th argument. +

\as argc(), arg() + +

void * TQNPInstance::getJavaPeer () const +

+Returns the Java object associated with the plugin instance, an +object of the plugin's Java + class, or 0 if the plug-in does not have a Java class, +Java is disabled, or an error occurred. +

The return value is actually a jref we use void* so as to +avoid burdening plugins which do not retquire Java. +

See also TQNPlugin::getJavaClass() and TQNPlugin::getJavaEnv(). + +

void TQNPInstance::getURL ( const char * url, const char * window = 0 ) +

+Requests that the url be retrieved and sent to the named window. See Netscape's JavaScript documentation for an explanation +of window names. + +

void TQNPInstance::getURLNotify ( const char * url, const char * window = 0, void * data = 0 ) +

+Requests that the given url be retrieved and sent to +the named window. See Netscape's JavaScript documentation for +an explanation of window names. Passes the arguments including data to NPN_GetURLNotify. +

+Netscape: NPN_GetURLNotify method + +

InstanceMode TQNPInstance::mode () const +

+Returns the mode of the plugin. + +

TQNPStream * TQNPInstance::newStream ( const char * mimetype, const char * window, bool as_file = FALSE ) +

+

This function is under development and is subject to change. +

This function is not tested. +

Requests the creation of a new data stream from the plugin. +The MIME type and window are passed in mimetype and window. +as_file holds the AsFileOnly flag. It is an interface to the +NPN_NewStream function of the Netscape Plugin API. + +

bool TQNPInstance::newStreamCreated ( TQNPStream *, StreamMode & smode ) [virtual] +

+ +

This function is called when a new stream has been created. The +instance should return TRUE if it accepts the processing of the +stream. If the instance retquires the stream as a file, it should +set smode to AsFileOnly, in which case the data will be +delivered some time later to the streamAsFile() function. +Otherwise, the data will be delivered in chunks to the write() +function, which must consume at least as much data as returned +by the most recent call to writeReady(). +

Note that the AsFileOnly method is not supported by Netscape +2.0 and MSIE 3.0. +

The default implementation accepts any stream. + +

TQNPWidget * TQNPInstance::newWindow () [virtual] +

+Called at most once, at some time after the TQNPInstance is +created. If the plugin retquires a window, this function should +return a derived class of TQNPWidget that provides the retquired +interface. + +

Example: grapher/grapher.cpp. +

void TQNPInstance::notifyURL ( const char * url, Reason r, void * notifyData ) [virtual] +

+

This function is under development and is subject to change. +

This function is not tested. +

Called whenever a url is notified after a call to +NPN_GetURLNotify with notifyData. The reason is given in r. +

It is an encapsulation of the NPP_URLNotify function of the +Netscape Plugin API. +

See also: +Netscape: NPP_URLNotify method + +

void TQNPInstance::postURL ( const char * url, const char * window, uint len, const char * buf, bool file ) +

+

This function is under development and is subject to change. +

This function is not tested. +

It is an interface to the NPN_PostURL function of the Netscape +Plugin API. +

Passes url, window, buf, len, and file to +NPN_PostURL. + +

void TQNPInstance::print ( TQPainter * ) [virtual] +

+

This function is under development and is subject to change. +

This function is not tested. +

Print the instance embedded in a page. +

It is an encapsulation of the NPP_Print function of the Netscape +Plugin API. + +

bool TQNPInstance::printFullPage () [virtual] +

+

This function is under development and is subject to change. +

This function is not tested. +

It is an encapsulation of the NPP_Print function of the Netscape +Plugin API. + +

void TQNPInstance::status ( const char * msg ) +

+Sets the status message in the browser containing this instance to +msg. + +

void TQNPInstance::streamAsFile ( TQNPStream *, const char * fname ) [virtual] +

+Called when a stream is delivered as a single file called fname +rather than as chunks. This may be simpler for a plugin to deal +with, but precludes any incremental behavior. +

Note that the AsFileOnly method is not supported by Netscape +2.0 and MSIE 3.0. +

See also newStreamCreated() and newStream(). + +

void TQNPInstance::streamDestroyed ( TQNPStream * ) [virtual] +

+Called when a stream is destroyed. At this point, the stream may +be complete() and okay(). If it is not okay(), then an error has +occurred. If it is okay(), but not complete(), then the user has +cancelled the transmission; do not give an error message in this +case. + +

const char * TQNPInstance::userAgent () const +

+Returns the user agent (browser name) containing this instance. + +

TQNPWidget * TQNPInstance::widget () +

+Returns the plugin window created by newWindow(), if any. + +

int TQNPInstance::write ( TQNPStream *, int offset, int len, void * buffer ) [virtual] +

+ +

Called when incoming data is available for processing by the +instance. The instance must consume at least the amount that it +returned in the most recent call to writeReady(), but it may +consume up to the amount given by len. buffer is the data +available for consumption. The offset argument is merely an +informational value indicating the total amount of data that has +been consumed in prior calls. +

This function should return the amount of data actually consumed. + +

Example: grapher/grapher.cpp. +

int TQNPInstance::writeReady ( TQNPStream * ) [virtual] +

+Returns the minimum amount of data the instance is willing to +receive from the given stream. +

The default returns a very large value. + + +


+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/qnplugin-members.html b/doc/html/qnplugin-members.html new file mode 100644 index 00000000..c50fabe7 --- /dev/null +++ b/doc/html/qnplugin-members.html @@ -0,0 +1,58 @@ + + + + + +TQNPlugin Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQNPlugin

+ +

This is the complete list of member functions for +TQNPlugin, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qnplugin.html b/doc/html/qnplugin.html new file mode 100644 index 00000000..77e88ba8 --- /dev/null +++ b/doc/html/qnplugin.html @@ -0,0 +1,181 @@ + + + + + +TQNPlugin Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQNPlugin Class Reference

+ +

The TQNPlugin class provides the main factory for plugin objects. +More... +

This class is part of the TQt Netscape Extension. +

#include <qnp.h> +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Protected Members

+ +

Detailed Description

+

This class is defined in the TQt Netscape Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQNPlugin class provides the main factory for plugin objects. +

+

This class is the heart of the plugin. One instance of this object +is created when the plugin is first needed, by calling +TQNPlugin::create(), which must be implemented in your plugin code +to return some derived class of TQNPlugin. The one TQNPlugin object +creates all TQNPInstance instances for a web browser running in a +single process. +

Additionally, if TQt is linked to the plugin as a dynamic library, +only one instance of TQApplication will exist across all plugins that have been made with TQt. So, your plugin should tread lightly +on global settings. Do not, for example, use +TQApplication::setFont() - that will change the font in every +widget of every TQt-based plugin currently loaded! + +


Member Function Documentation

+

TQNPlugin::TQNPlugin () [protected] +

+Creates a TQNPlugin. This may only be used by the constructor +of the class, derived from TQNPlugin, that is returned by your +plugin's implementation of the TQNPlugin::create() function. + +

TQNPlugin::~TQNPlugin () [virtual] +

+Destroys the TQNPlugin. This is called by the plugin binding code +just before the plugin is about to be unloaded from memory. If +newWindow() has been called, a TQApplication will still exist at +this time, but will be deleted shortly after, just before the plugin +is deleted. + +

TQNPlugin * TQNPlugin::actual () [static] +

+Returns the plugin most recently returned by TQNPlugin::create(). + +

TQNPlugin * TQNPlugin::create () [static] +

+ +

This function must be implemented by your plugin code. It should return a +derived class of TQNPlugin. + +

void * TQNPlugin::getJavaClass () [virtual] +

+Override this function to return a reference to the Java class that represents +the plugin. The default returns 0, indicating no class. +

If you override this class, you must also override +TQNPlugin::unuseJavaClass(). +

The return value is actually a jref; we use void* so as to +avoid burdening plugins which do not retquire Java. +

See also getJavaEnv() and TQNPInstance::getJavaPeer(). + +

void * TQNPlugin::getJavaEnv () const +

+Returns a pointer to the Java execution environment, or 0 if +either Java is disabled or an error occurred. +

The return value is actually a JRIEnv*; we use void* so as +to avoid burdening plugins which do not retquire Java. +

See also getJavaClass() and TQNPInstance::getJavaPeer(). + +

const char * TQNPlugin::getMIMEDescription () const [pure virtual] +

+ +

Override this function to return the MIME description of the data formats +supported by your plugin. The format of this string is shown by +the following example: +

+    const char* getMIMEDescription() const
+    {
+        return "image/x-png:png:PNG Image;"
+               "image/png:png:PNG Image;"
+               "image/x-portable-bitmap:pbm:PBM Image;"
+               "image/x-portable-graymap:pgm:PGM Image;"
+               "image/x-portable-pixmap:ppm:PPM Image;"
+               "image/bmp:bmp:BMP Image;"
+               "image/x-ms-bmp:bmp:BMP Image;"
+               "image/x-xpixmap:xpm:XPM Image;"
+               "image/xpm:xpm:XPM Image";
+    }
+
+ + +

const char * TQNPlugin::getPluginDescriptionString () const [pure virtual] +

+ +

Returns a pointer to the plain-text description of the plugin. + +

const char * TQNPlugin::getPluginNameString () const [pure virtual] +

+ +

Returns a pointer to the plain-text name of the plugin. + +

void TQNPlugin::getVersionInfo ( int & plugin_major, int & plugin_minor, int & browser_major, int & browser_minor ) +

+Populates *plugin_major and *plugin_minor with the +version of the plugin API and populates *browser_major and +*browser_minor with the version of the web browser. + +

TQNPInstance * TQNPlugin::newInstance () [pure virtual] +

+ +

Override this function to return an appropriate derived class of +TQNPInstance. + +

void TQNPlugin::unuseJavaClass () [virtual] +

+This function is called when the plugin is shutting down. The +function should unuse the Java class returned earlier by +getJavaClass(). + + +

+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/qnpstream-members.html b/doc/html/qnpstream-members.html new file mode 100644 index 00000000..eec1be39 --- /dev/null +++ b/doc/html/qnpstream-members.html @@ -0,0 +1,58 @@ + + + + + +TQNPStream Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQNPStream

+ +

This is the complete list of member functions for +TQNPStream, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qnpstream.html b/doc/html/qnpstream.html new file mode 100644 index 00000000..985f253d --- /dev/null +++ b/doc/html/qnpstream.html @@ -0,0 +1,130 @@ + + + + + +TQNPStream Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQNPStream Class Reference

+ +

The TQNPStream class provides a stream of data provided to a TQNPInstance by the browser. +More... +

This class is part of the TQt Netscape Extension. +

#include <qnp.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+

This class is defined in the TQt Netscape Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQNPStream class provides a stream of data provided to a TQNPInstance by the browser. +

+

Note that this is neither a TQTextStream nor a TQDataStream. +

See also TQNPInstance::write() and TQNPInstance::newStreamCreated(). + +


Member Function Documentation

+

TQNPStream::TQNPStream ( TQNPInstance * in, const char * mt, _NPStream * st, bool se ) +

+Creates a stream. Plugins should not call this; they should call +TQNPInstance::newStream() if they need a stream. +

Takes a TQNPInstance in, MIME type mt, a pointer to an +_NPStream st and a seekable flag se. + +

TQNPStream::~TQNPStream () +

+Destroys the stream. + +

bool TQNPStream::complete () const +

+Returns TRUE if the stream has received all the data from the +source; otherwise returns FALSE. + +

uint TQNPStream::end () const +

+Returns the length of the stream in bytes. The function might +return 0 for streams of unknown length. + +

TQNPInstance * TQNPStream::instance () +

+ +

Returns the TQNPInstance for which this stream was created. + +

uint TQNPStream::lastModified () const +

+Returns the time when the source of the stream was last modified. + +

bool TQNPStream::okay () const +

+Returns TRUE if no errors have occurred on the stream; otherwise +returns FALSE. + +

void TQNPStream::requestRead ( int offset, uint length ) +

+Requests the section of the stream, of length bytes from offset, be sent to the TQNPInstance::write() function of the +instance() of this stream. + +

bool TQNPStream::seekable () const +

+Returns TRUE if the stream is seekable; otherwise returns FALSE. + +

const char * TQNPStream::type () const +

+Returns the MIME type of the stream. + +

const char * TQNPStream::url () const +

+Returns the URL from which the stream was created. + +

int TQNPStream::write ( int len, void * buffer ) +

+Writes len bytes from buffer to the stream. + + +

+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/qnpwidget-members.html b/doc/html/qnpwidget-members.html new file mode 100644 index 00000000..43fd3aa4 --- /dev/null +++ b/doc/html/qnpwidget-members.html @@ -0,0 +1,341 @@ + + + + + +TQNPWidget Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQNPWidget

+ +

This is the complete list of member functions for +TQNPWidget, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qnpwidget.html b/doc/html/qnpwidget.html new file mode 100644 index 00000000..baef3681 --- /dev/null +++ b/doc/html/qnpwidget.html @@ -0,0 +1,127 @@ + + + + + +TQNPWidget Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQNPWidget Class Reference

+ +

The TQNPWidget class provides a TQWidget that is a web browser plugin window. +More... +

This class is part of the TQt Netscape Extension. +

#include <qnp.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+ +

Detailed Description

+

This class is defined in the TQt Netscape Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQNPWidget class provides a TQWidget that is a web browser plugin window. +

+

Derive from TQNPWidget to create a widget that can be used as a +web browser plugin window, or create one and add child widgets. +Instances of TQNPWidget may only be created when +TQNPInstance::newWindow() is called by the browser. +

A common way to develop a plugin widget is to develop it as a +stand-alone application window, then make it a child of a +plugin widget to use it as a browser plugin. The technique is: +

+class MyPluginWindow : public TQNPWidget
+{
+    TQWidget* child;
+public:
+    MyPluginWindow()
+    {
+        // Some widget that is normally used as a top-level widget
+        child = new MyIndependentlyDevelopedWidget();
+
+        // Use the background color of the web page
+        child->setBackgroundColor( backgroundColor() );
+
+        // Fill the plugin widget
+        child->setGeometry( 0, 0, width(), height() );
+    }
+
+    void resizeEvent(TQResizeEvent*)
+    {
+        // Fill the plugin widget
+        child->resize(size());
+    }
+};
+
+ +

The default implementation is an empty window. + +


Member Function Documentation

+

TQNPWidget::TQNPWidget () +

+Creates a TQNPWidget. + +

TQNPWidget::~TQNPWidget () +

+Destroys the window. This will be called by the plugin binding +code when the window is no longer retquired. The web browser will +delete windows when they leave the page. The bindings will change +the TQWidget::winId() of the window when the window is resized, but +this should not affect normal widget behavior. + +

void TQNPWidget::enterInstance () [virtual] +

+Called when the mouse enters the plugin window. Does nothing by +default. + +

Example: grapher/grapher.cpp. +

TQNPInstance * TQNPWidget::instance () +

+Returns the instance for which this widget is the plugin window. + +

void TQNPWidget::leaveInstance () [virtual] +

+Called when the mouse leaves the plugin window. Does nothing by +default. + +

Example: grapher/grapher.cpp. + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qobject-h.html b/doc/html/qobject-h.html new file mode 100644 index 00000000..af08b7ca --- /dev/null +++ b/doc/html/qobject-h.html @@ -0,0 +1,307 @@ + + + + + +qobject.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qobject.h

+ +

This is the verbatim text of the qobject.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qobject.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQObject class
+**
+** Created : 930418
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQOBJECT_H
+#define TQOBJECT_H
+
+#ifndef QT_H
+#include "qobjectdefs.h"
+#include "qwindowdefs.h"
+#include "qstring.h"
+#include "qevent.h"
+#include "qnamespace.h"
+#endif // QT_H
+
+#define QT_TR_NOOP(x) (x)
+#define QT_TRANSLATE_NOOP(scope,x) (x)
+
+class TQMetaObject;
+class TQVariant;
+class TQMetaProperty;
+class TQPostEventList;
+class TQSenderObjectList;
+class TQObjectPrivate;
+#ifndef QT_NO_USERDATA
+class TQObjectUserData;
+#endif
+struct TQUObject;
+
+class Q_EXPORT TQObject: public TQt
+{
+    Q_OBJECT
+    Q_PROPERTY( TQCString name READ name WRITE setName )
+
+public:
+    TQObject( TQObject *parent=0, const char *name=0 );
+    virtual ~TQObject();
+
+#ifdef Q_QDOC
+    virtual const char *className() const;
+    static TQString tr( const char *, const char * );
+    static TQString trUtf8( const char *, const char * );
+    virtual TQMetaObject *metaObject() const;
+#endif
+
+    virtual bool event( TQEvent * );
+    virtual bool eventFilter( TQObject *, TQEvent * );
+
+    bool	 isA( const char * )	 const;
+    bool	 inherits( const char * ) const;
+
+    const char  *name() const;
+    const char  *name( const char * defaultName ) const;
+
+    virtual void setName( const char *name );
+    bool	 isWidgetType()	  const { return isWidget; }
+    bool	 highPriority()	  const { return FALSE; }
+
+    bool	 signalsBlocked()  const { return blockSig; }
+    void	 blockSignals( bool b );
+
+    int		 startTimer( int interval );
+    void	 killTimer( int id );
+    void	 killTimers();
+
+    TQObject           *child( const char *objName, const char *inheritsClass = 0, bool recursiveSearch = TRUE ); //### const in 4.0
+    const TQObjectList *children() const { return childObjects; }
+
+    static const TQObjectList *objectTrees();
+
+    TQObjectList	      *queryList( const char *inheritsClass = 0,
+				  const char *objName = 0,
+				  bool regexpMatch = TRUE,
+				  bool recursiveSearch = TRUE ) const;
+
+    virtual void insertChild( TQObject * );
+    virtual void removeChild( TQObject * );
+
+    void	 installEventFilter( const TQObject * );
+    void	 removeEventFilter( const TQObject * );
+
+    static bool  connect( const TQObject *sender, const char *signal,
+			  const TQObject *receiver, const char *member );
+    bool	 connect( const TQObject *sender, const char *signal,
+			  const char *member ) const;
+    static bool  disconnect( const TQObject *sender, const char *signal,
+			     const TQObject *receiver, const char *member );
+    bool	 disconnect( const char *signal=0,
+			     const TQObject *receiver=0, const char *member=0 );
+    bool	 disconnect( const TQObject *receiver, const char *member=0 );
+    static void 	 connectInternal( const TQObject *sender, int signal_index,
+			  const TQObject *receiver, int membcode, int member_index );
+    static bool 	 disconnectInternal( const TQObject *sender, int signal_index,
+			     const TQObject *receiver, int membcode, int member_index );
+
+    void	 dumpObjectTree();
+    void	 dumpObjectInfo();
+
+#ifndef QT_NO_PROPERTIES
+    virtual bool setProperty( const char *name, const TQVariant& value );
+    virtual TQVariant property( const char *name ) const;
+#endif // QT_NO_PROPERTIES
+#ifdef QT_NO_TRANSLATION
+    static TQString tr( const char *sourceText, const char * = 0);
+#ifndef QT_NO_TEXTCODEC
+    static TQString trUtf8( const char *sourceText, const char * = 0);
+#endif
+#endif //QT_NO_TRANSLATION
+
+#ifndef QT_NO_USERDATA
+    static uint registerUserData();
+    void setUserData( uint id, TQObjectUserData* data);
+    TQObjectUserData* userData( uint id ) const;
+#endif // QT_NO_USERDATA
+
+signals:
+    void	 destroyed();
+    void	 destroyed( TQObject* obj );
+
+public:
+    TQObject	*parent() const { return parentObj; }
+
+public slots:
+    void	deleteLater();
+
+private slots:
+    void	 cleanupEventFilter( TQObject* );
+
+protected:
+    bool	activate_filters( TQEvent * );
+    TQConnectionList *receivers( const char* signal ) const;
+    TQConnectionList *receivers( int signal ) const;
+    void	activate_signal( int signal );
+    void	activate_signal( int signal, int );
+    void	activate_signal( int signal, double );
+    void	activate_signal( int signal, TQString );
+    void	activate_signal_bool( int signal, bool );
+    void 	activate_signal( TQConnectionList *clist, TQUObject *o );
+
+    const TQObject *sender();
+
+    virtual void timerEvent( TQTimerEvent * );
+    virtual void childEvent( TQChildEvent * );
+    virtual void customEvent( TQCustomEvent * );
+
+    virtual void connectNotify( const char *signal );
+    virtual void disconnectNotify( const char *signal );
+    virtual bool checkConnectArgs( const char *signal, const TQObject *receiver,
+				   const char *member );
+    static TQCString normalizeSignalSlot( const char *signalSlot );
+
+private:
+    uint	isSignal   : 1;
+    uint	isWidget   : 1;
+    uint	pendTimer  : 1;
+    uint	blockSig   : 1;
+    uint	wasDeleted : 1;
+    uint	isTree : 1;
+
+    const char	*objname;
+    TQObject	*parentObj;
+    TQObjectList *childObjects;
+    TQSignalVec *connections;
+    TQSenderObjectList *senderObjects;
+    TQObjectList *eventFilters;
+    TQPostEventList *postedEvents;
+    TQObjectPrivate* d;
+
+    static TQMetaObject* staticTQtMetaObject();
+
+    friend class TQApplication;
+    friend class TQBaseApplication;
+    friend class TQWidget;
+    friend class TQSignal;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQObject( const TQObject & );
+    TQObject &operator=( const TQObject & );
+#endif
+};
+
+
+#ifndef QT_NO_USERDATA
+class Q_EXPORT TQObjectUserData {
+public:
+    virtual ~TQObjectUserData();
+};
+#endif
+
+
+inline bool TQObject::connect( const TQObject *sender, const char *signal,
+			      const char *member ) const
+{
+    return connect( sender, signal, this, member );
+}
+
+
+inline bool TQObject::disconnect( const char *signal,
+				 const TQObject *receiver, const char *member )
+{
+    return disconnect( this, signal, receiver, member );
+}
+
+
+inline bool TQObject::disconnect( const TQObject *receiver, const char *member )
+{
+    return disconnect( this, 0, receiver, member );
+}
+
+
+#ifdef QT_NO_TRANSLATION
+inline TQString TQObject::tr( const char *sourceText, const char * ) {
+    return TQString::fromLatin1( sourceText );
+}
+#ifndef QT_NO_TEXTCODEC
+inline TQString TQObject::trUtf8( const char *sourceText, const char * ) {
+    return TQString::fromUtf8( sourceText );
+}
+#endif
+#endif //QT_NO_TRANSLATION
+
+
+#define Q_DEFINED_QOBJECT
+#include "qwinexport.h"
+#endif // TQOBJECT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qobject-members.html b/doc/html/qobject-members.html new file mode 100644 index 00000000..86ff87d5 --- /dev/null +++ b/doc/html/qobject-members.html @@ -0,0 +1,90 @@ + + + + + +TQObject Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQObject

+ +

This is the complete list of member functions for +TQObject, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qobject.html b/doc/html/qobject.html new file mode 100644 index 00000000..b84fedca --- /dev/null +++ b/doc/html/qobject.html @@ -0,0 +1,958 @@ + + + + + +TQObject Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQObject Class Reference

+ +

The TQObject class is the base class of all TQt objects. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qobject.h> +

Inherits TQt. +

Inherited by TQAccel, TQAccessibleObject, TQAction, TQApplication, TQAssistantClient, TQDataPump, TQAxObject, TQAxScript, TQAxScriptManager, TQWidget, TQCanvas, TQStyle, TQClipboard, TQCopChannel, TQDns, TQLayout, TQDragObject, TQEditorFactory, TQEventLoop, TQFileIconProvider, TQNetworkProtocol, TQWSKeyboardHandler, TQNetworkOperation, TQNPInstance, TQObjectCleanupHandler, TQProcess, TQServerSocket, TQSessionManager, TQSignal, TQSignalMapper, TQSocket, TQSocketNotifier, TQSound, TQSqlDatabase, TQSqlDriver, TQSqlForm, TQStyleSheet, TQTimer, TQToolTipGroup, TQTranslator, TQUrlOperator, and TQValidator. +

List of all member functions. +

Public Members

+
    +
  • TQObject ( TQObject * parent = 0, const char * name = 0 )
  • +
  • virtual ~TQObject ()
  • +
  • virtual const char * className () const
  • +
  • virtual TQMetaObject * metaObject () const
  • +
  • virtual bool event ( TQEvent * e )
  • +
  • virtual bool eventFilter ( TQObject * watched, TQEvent * e )
  • +
  • bool isA ( const char * clname ) const
  • +
  • bool inherits ( const char * clname ) const
  • +
  • const char * name () const
  • +
  • const char * name ( const char * defaultName ) const
  • +
  • virtual void setName ( const char * name )
  • +
  • bool isWidgetType () const
  • +
  • bool highPriority () const
  • +
  • bool signalsBlocked () const
  • +
  • void blockSignals ( bool block )
  • +
  • int startTimer ( int interval )
  • +
  • void killTimer ( int id )
  • +
  • void killTimers ()
  • +
  • TQObject * child ( const char * objName, const char * inheritsClass = 0, bool recursiveSearch = TRUE )
  • +
  • const TQObjectList * children () const
  • +
  • TQObjectList * queryList ( const char * inheritsClass = 0, const char * objName = 0, bool regexpMatch = TRUE, bool recursiveSearch = TRUE ) const
  • +
  • virtual void insertChild ( TQObject * obj )
  • +
  • virtual void removeChild ( TQObject * obj )
  • +
  • void installEventFilter ( const TQObject * filterObj )
  • +
  • void removeEventFilter ( const TQObject * obj )
  • +
  • bool connect ( const TQObject * sender, const char * signal, const char * member ) const
  • +
  • bool disconnect ( const char * signal = 0, const TQObject * receiver = 0, const char * member = 0 )
  • +
  • bool disconnect ( const TQObject * receiver, const char * member = 0 )
  • +
  • void dumpObjectTree ()
  • +
  • void dumpObjectInfo ()
  • +
  • virtual bool setProperty ( const char * name, const TQVariant & value )
  • +
  • virtual TQVariant property ( const char * name ) const
  • +
  • TQObject * parent () const
  • +
+

Public Slots

+ +

Signals

+ +

Static Public Members

+
    +
  • TQString tr ( const char * sourceText, const char * comment )
  • +
  • TQString trUtf8 ( const char * sourceText, const char * comment )
  • +
  • const TQObjectList * objectTrees ()
  • +
  • bool connect ( const TQObject * sender, const char * signal, const TQObject * receiver, const char * member )
  • +
  • bool disconnect ( const TQObject * sender, const char * signal, const TQObject * receiver, const char * member )
  • +
+

Properties

+
    +
  • TQCString name - the name of this object
  • +
+

Protected Members

+ +

Static Protected Members

+ +

Related Functions

+
    +
  • void * qt_find_obj_child ( TQObject * parent, const char * type, const char * name )
  • +
+

Detailed Description

+ + +The TQObject class is the base class of all TQt objects. +

+ + +

TQObject is the heart of the TQt object model. The central feature in this model is a very powerful +mechanism for seamless object communication called signals and slots. You can +connect a signal to a slot with connect() and destroy the +connection with disconnect(). To avoid never ending notification +loops you can temporarily block signals with blockSignals(). The +protected functions connectNotify() and disconnectNotify() make it +possible to track connections. +

TQObjects organize themselves in object trees. When you create a +TQObject with another object as parent, the object will +automatically do an insertChild() on the parent and thus show up +in the parent's children() list. The parent takes ownership of the +object i.e. it will automatically delete its children in its +destructor. You can look for an object by name and optionally type +using child() or queryList(), and get the list of tree roots using +objectTrees(). +

Every object has an object name() and can report its className() +and whether it inherits() another class in the TQObject inheritance +hierarchy. +

When an object is deleted, it emits a destroyed() signal. You can +catch this signal to avoid dangling references to TQObjects. The +TQGuardedPtr class provides an elegant way to use this feature. +

TQObjects can receive events through event() and filter the events +of other objects. See installEventFilter() and eventFilter() for +details. A convenience handler, childEvent(), can be reimplemented +to catch child events. +

Last but not least, TQObject provides the basic timer support in +TQt; see TQTimer for high-level support for timers. +

Notice that the Q_OBJECT macro is mandatory for any object that +implements signals, slots or properties. You also need to run the +moc program (Meta Object Compiler) on the +source file. We strongly recommend the use of this macro in all +subclasses of TQObject regardless of whether or not they actually +use signals, slots and properties, since failure to do so may lead +certain functions to exhibit undefined behaviour. +

All TQt widgets inherit TQObject. The convenience function +isWidgetType() returns whether an object is actually a widget. It +is much faster than inherits( "TQWidget" ). +

Some TQObject functions, e.g. children(), objectTrees() and +queryList() return a TQObjectList. A TQObjectList is a TQPtrList of +TQObjects. TQObjectLists support the same operations as TQPtrLists +and have an iterator class, TQObjectListIt. +

See also Object Model. + +


Member Function Documentation

+

TQObject::TQObject ( TQObject * parent = 0, const char * name = 0 ) +

+Constructs an object called name with parent object, parent. +

The parent of an object may be viewed as the object's owner. For +instance, a dialog box is the parent of the +"OK" and "Cancel" buttons it contains. +

The destructor of a parent object destroys all child objects. +

Setting parent to 0 constructs an object with no parent. If the +object is a widget, it will become a top-level window. +

The object name is some text that can be used to identify a +TQObject. It's particularly useful in conjunction with TQt Designer. You can find an +object by name (and type) using child(). To find several objects +use queryList(). +

See also parent(), name, child(), and queryList(). + +

TQObject::~TQObject () [virtual] +

+Destroys the object, deleting all its child objects. +

All signals to and from the object are automatically disconnected. +

Warning: All child objects are deleted. If any of these objects +are on the stack or global, sooner or later your program will +crash. We do not recommend holding pointers to child objects from +outside the parent. If you still do, the TQObject::destroyed() +signal gives you an opportunity to detect when an object is +destroyed. +

Warning: Deleting a TQObject while pending events are waiting to be +delivered can cause a crash. You must not delete the TQObject +directly from a thread that is not the GUI thread. Use the +TQObject::deleteLater() method instead, which will cause the event +loop to delete the object after all pending events have been +delivered to the object. + +

void TQObject::blockSignals ( bool block ) +

+Blocks signals if block is TRUE, or unblocks signals if block is FALSE. +

Emitted signals disappear into hyperspace if signals are blocked. +Note that the destroyed() signals will be emitted even if the signals +for this object have been blocked. + +

Examples: rot13/rot13.cpp and simple/main.cpp. +

bool TQObject::checkConnectArgs ( const char * signal, const TQObject * receiver, const char * member ) [virtual protected] +

+ +

Returns TRUE if the signal and the member arguments are +compatible; otherwise returns FALSE. (The receiver argument is +currently ignored.) +

Warning: We recommend that you use the default implementation and +do not reimplement this function. +

+ +

TQObject * TQObject::child ( const char * objName, const char * inheritsClass = 0, bool recursiveSearch = TRUE ) +

+Searches the children and optionally grandchildren of this object, +and returns a child that is called objName that inherits inheritsClass. If inheritsClass is 0 (the default), any class +matches. +

If recursiveSearch is TRUE (the default), child() performs a +depth-first search of the object's children. +

If there is no such object, this function returns 0. If there are +more than one, the first one found is retured; if you need all of +them, use queryList(). + +

void TQObject::childEvent ( TQChildEvent * ) [virtual protected] +

+This event handler can be reimplemented in a subclass to receive +child events. +

Child events are sent to objects when children are inserted or +removed. +

Note that events with TQEvent::type() TQEvent::ChildInserted are +posted (with TQApplication::postEvent()) to make sure that the +child's construction is completed before this function is called. +

If a child is removed immediately after it is inserted, the ChildInserted event may be suppressed, but the ChildRemoved +event will always be sent. In such cases it is possible that there +will be a ChildRemoved event without a corresponding ChildInserted event. +

If you change state based on ChildInserted events, call +TQWidget::constPolish(), or do +

+        TQApplication::sendPostedEvents( this, TQEvent::ChildInserted );
+    
+ +in functions that depend on the state. One notable example is +TQWidget::sizeHint(). +

See also event() and TQChildEvent. + +

Reimplemented in TQMainWindow and TQSplitter. +

const TQObjectList * TQObject::children () const +

+ +

Returns a list of child objects, or 0 if this object has no +children. +

The TQObjectList class is defined in the qobjectlist.h header +file. +

The first child added is the first +object in the list and the last child added is the last object in the list, i.e. new +children are appended at the end. +

Note that the list order changes when TQWidget children are raised or lowered. A widget that is raised becomes the last object +in the list, and a widget that is lowered becomes the first object +in the list. +

See also child(), queryList(), parent(), insertChild(), and removeChild(). + +

const char * TQObject::className () const [virtual] +

+ +

Returns the class name of this object. +

This function is generated by the Meta + Object Compiler. +

Warning: This function will return the wrong name if the class +definition lacks the Q_OBJECT macro. +

See also name, inherits(), isA(), and isWidgetType(). + +

Example: sql/overview/custom1/main.cpp. +

bool TQObject::connect ( const TQObject * sender, const char * signal, const TQObject * receiver, const char * member ) [static] +

+Connects signal from the sender object to member in object +receiver, and returns TRUE if the connection succeeds; otherwise +returns FALSE. +

You must use the SIGNAL() and SLOT() macros when specifying the signal +and the member, for example: +

+    TQLabel     *label  = new TQLabel;
+    TQScrollBar *scroll = new TQScrollBar;
+    TQObject::connect( scroll, SIGNAL(valueChanged(int)),
+                      label,  SLOT(setNum(int)) );
+    
+ +

This example ensures that the label always displays the current +scroll bar value. Note that the signal and slots parameters must not +contain any variable names, only the type. E.g. the following would +not work and return FALSE: +TQObject::connect( scroll, SIGNAL(valueChanged(int v)), +label, SLOT(setNum(int v)) ); +

A signal can also be connected to another signal: +

+    class MyWidget : public TQWidget
+    {
+        Q_OBJECT
+    public:
+        MyWidget();
+
+    signals:
+        void myUsefulSignal();
+
+    private:
+        TQPushButton *aButton;
+    };
+
+    MyWidget::MyWidget()
+    {
+        aButton = new TQPushButton( this );
+        connect( aButton, SIGNAL(clicked()), SIGNAL(myUsefulSignal()) );
+    }
+    
+ +

In this example, the MyWidget constructor relays a signal from a +private member variable, and makes it available under a name that +relates to MyWidget. +

A signal can be connected to many slots and signals. Many signals +can be connected to one slot. +

If a signal is connected to several slots, the slots are activated +in an arbitrary order when the signal is emitted. +

The function returns TRUE if it successfully connects the signal +to the slot. It will return FALSE if it cannot create the +connection, for example, if TQObject is unable to verify the +existence of either signal or member, or if their signatures +aren't compatible. +

A signal is emitted for every connection you make, so if you +duplicate a connection, two signals will be emitted. You can +always break a connection using disconnect(). +

See also disconnect(). + +

Examples: action/main.cpp, application/main.cpp, extension/main.cpp, iconview/main.cpp, network/archivesearch/main.cpp, regexptester/main.cpp, and t2/main.cpp. +

bool TQObject::connect ( const TQObject * sender, const char * signal, const char * member ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Connects signal from the sender object to this object's member. +

Equivalent to: TQObject::connect(sender, signal, this, member). +

See also disconnect(). + +

void TQObject::connectNotify ( const char * signal ) [virtual protected] +

+ +

This virtual function is called when something has been connected +to signal in this object. +

Warning: This function violates the object-oriented principle of +modularity. However, it might be useful when you need to perform +expensive initialization only if something is connected to a +signal. +

See also connect() and disconnectNotify(). + +

void TQObject::customEvent ( TQCustomEvent * ) [virtual protected] +

+This event handler can be reimplemented in a subclass to receive +custom events. Custom events are user-defined events with a type +value at least as large as the "User" item of the TQEvent::Type +enum, and is typically a TQCustomEvent or TQCustomEvent subclass. +

See also event() and TQCustomEvent. + +

void TQObject::deleteLater () [slot] +

+Performs a deferred deletion of this object. +

Instead of an immediate deletion this function schedules a +deferred delete event for processing when TQt returns to the main +event loop. + +

Example: table/bigtable/main.cpp. +

void TQObject::destroyed () [signal] +

+ +

This signal is emitted when the object is being destroyed. +

Note that the signal is emitted by the TQObject destructor, so +the object's virtual table is already degenerated at this point, +and it is not safe to call any functions on the object emitting +the signal. This signal can not be blocked. +

All the objects's children are destroyed immediately after this +signal is emitted. + +

void TQObject::destroyed ( TQObject * obj ) [signal] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted immediately before the object obj is +destroyed, and can not be blocked. +

All the objects's children are destroyed immediately after this +signal is emitted. + +

bool TQObject::disconnect ( const TQObject * sender, const char * signal, const TQObject * receiver, const char * member ) [static] +

+Disconnects signal in object sender from member in object +receiver. +

A signal-slot connection is removed when either of the objects +involved are destroyed. +

disconnect() is typically used in three ways, as the following +examples demonstrate. +

    +
  1. Disconnect everything connected to an object's signals: +
    +       disconnect( myObject, 0, 0, 0 );
    +       
    + +equivalent to the non-static overloaded function +
    +       myObject->disconnect();
    +       
    + +
  2. Disconnect everything connected to a specific signal: +
    +       disconnect( myObject, SIGNAL(mySignal()), 0, 0 );
    +       
    + +equivalent to the non-static overloaded function +
    +       myObject->disconnect( SIGNAL(mySignal()) );
    +       
    + +
  3. Disconnect a specific receiver: +
    +       disconnect( myObject, 0, myReceiver, 0 );
    +       
    + +equivalent to the non-static overloaded function +
    +       myObject->disconnect(  myReceiver );
    +       
    + +
+

0 may be used as a wildcard, meaning "any signal", "any receiving +object", or "any slot in the receiving object", respectively. +

The sender may never be 0. (You cannot disconnect signals from +more than one object in a single call.) +

If signal is 0, it disconnects receiver and member from +any signal. If not, only the specified signal is disconnected. +

If receiver is 0, it disconnects anything connected to signal. If not, slots in objects other than receiver are not +disconnected. +

If member is 0, it disconnects anything that is connected to receiver. If not, only slots named member will be disconnected, +and all other slots are left alone. The member must be 0 if receiver is left out, so you cannot disconnect a +specifically-named slot on all objects. +

See also connect(). + +

bool TQObject::disconnect ( const char * signal = 0, const TQObject * receiver = 0, const char * member = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Disconnects signal from member of receiver. +

A signal-slot connection is removed when either of the objects +involved are destroyed. + +

bool TQObject::disconnect ( const TQObject * receiver, const char * member = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Disconnects all signals in this object from receiver's member. +

A signal-slot connection is removed when either of the objects +involved are destroyed. + +

void TQObject::disconnectNotify ( const char * signal ) [virtual protected] +

+ +

This virtual function is called when something has been +disconnected from signal in this object. +

Warning: This function violates the object-oriented principle of +modularity. However, it might be useful for optimizing access to +expensive resources. +

See also disconnect() and connectNotify(). + +

void TQObject::dumpObjectInfo () +

+Dumps information about signal connections, etc. for this object +to the debug output. +

This function is useful for debugging, but does nothing if the +library has been compiled in release mode (i.e. without debugging +information). + +

void TQObject::dumpObjectTree () +

+Dumps a tree of children to the debug output. +

This function is useful for debugging, but does nothing if the +library has been compiled in release mode (i.e. without debugging +information). + +

bool TQObject::event ( TQEvent * e ) [virtual] +

+This virtual function receives events to an object and should +return TRUE if the event e was recognized and processed. +

The event() function can be reimplemented to customize the +behavior of an object. +

See also installEventFilter(), timerEvent(), TQApplication::sendEvent(), TQApplication::postEvent(), and TQWidget::event(). + +

Reimplemented in TQWidget. +

bool TQObject::eventFilter ( TQObject * watched, TQEvent * e ) [virtual] +

+Filters events if this object has been installed as an event +filter for the watched object. +

In your reimplementation of this function, if you want to filter +the event e, out, i.e. stop it being handled further, return +TRUE; otherwise return FALSE. +

Example: +

+    class MyMainWindow : public TQMainWindow
+    {
+    public:
+        MyMainWindow( TQWidget *parent = 0, const char *name = 0 );
+
+    protected:
+        bool eventFilter( TQObject *obj, TQEvent *ev );
+
+    private:
+        TQTextEdit *textEdit;
+    };
+
+    MyMainWindow::MyMainWindow( TQWidget *parent, const char *name )
+        : TQMainWindow( parent, name )
+    {
+        textEdit = new TQTextEdit( this );
+        setCentralWidget( textEdit );
+        textEdit->installEventFilter( this );
+    }
+
+    bool MyMainWindow::eventFilter( TQObject *obj, TQEvent *ev )
+    {
+        if ( obj == textEdit ) {
+            if ( e->type() == TQEvent::KeyPress ) {
+                TQKeyEvent *k = (TQKeyEvent*)ev;
+                qDebug( "Ate key press %d", k->key() );
+                return TRUE;
+            } else {
+                return FALSE;
+            }
+        } else {
+            // pass the event on to the parent class
+            return TQMainWindow::eventFilter( obj, ev );
+        }
+    }
+    
+ +

Notice in the example above that unhandled events are passed to +the base class's eventFilter() function, since the base class +might have reimplemented eventFilter() for its own internal +purposes. +

Warning: If you delete the receiver object in this function, be +sure to return TRUE. Otherwise, TQt will forward the event to the +deleted object and the program might crash. +

See also installEventFilter(). + +

Reimplemented in TQAccel, TQScrollView, and TQSpinBox. +

bool TQObject::highPriority () const +

+ +

Returns TRUE if the object is a high-priority object, or FALSE if +it is a standard-priority object. +

High-priority objects are placed first in TQObject's list of +children on the assumption that they will be referenced very +often. + +

bool TQObject::inherits ( const char * clname ) const +

+Returns TRUE if this object is an instance of a class that +inherits clname, and clname inherits TQObject; otherwise +returns FALSE. +

A class is considered to inherit itself. +

Example: +

+        TQTimer *t = new TQTimer;         // TQTimer inherits TQObject
+        t->inherits( "TQTimer" );        // returns TRUE
+        t->inherits( "TQObject" );       // returns TRUE
+        t->inherits( "TQButton" );       // returns FALSE
+
+        // TQScrollBar inherits TQWidget and TQRangeControl
+        TQScrollBar *s = new TQScrollBar( 0 );
+        s->inherits( "TQWidget" );       // returns TRUE
+        s->inherits( "TQRangeControl" ); // returns FALSE
+    
+ +

(TQRangeControl is not a TQObject.) +

See also isA() and metaObject(). + +

Examples: table/statistics/statistics.cpp, themes/metal.cpp, and themes/wood.cpp. +

void TQObject::insertChild ( TQObject * obj ) [virtual] +

+Inserts an object obj into the list of child objects. +

Warning: This function cannot be used to make one widget the child +widget of another widget. Child widgets can only be created by +setting the parent widget in the constructor or by calling +TQWidget::reparent(). +

See also removeChild() and TQWidget::reparent(). + +

void TQObject::installEventFilter ( const TQObject * filterObj ) +

+ +

Installs an event filter filterObj on this object. For example: +

+    monitoredObj->installEventFilter( filterObj );
+    
+ +

An event filter is an object that receives all events that are +sent to this object. The filter can either stop the event or +forward it to this object. The event filter filterObj receives +events via its eventFilter() function. The eventFilter() function +must return TRUE if the event should be filtered, (i.e. stopped); +otherwise it must return FALSE. +

If multiple event filters are installed on a single object, the +filter that was installed last is activated first. +

Here's a KeyPressEater class that eats the key presses of its +monitored objects: +

+    class KeyPressEater : public TQObject
+    {
+        ...
+    protected:
+        bool eventFilter( TQObject *o, TQEvent *e );
+    };
+
+    bool KeyPressEater::eventFilter( TQObject *o, TQEvent *e )
+    {
+        if ( e->type() == TQEvent::KeyPress ) {
+            // special processing for key press
+            TQKeyEvent *k = (TQKeyEvent *)e;
+            qDebug( "Ate key press %d", k->key() );
+            return TRUE; // eat event
+        } else {
+            // standard event processing
+            return FALSE;
+        }
+    }
+    
+ +

And here's how to install it on two widgets: +

+        KeyPressEater *keyPressEater = new KeyPressEater( this );
+        TQPushButton *pushButton = new TQPushButton( this );
+        TQListView *listView = new TQListView( this );
+
+        pushButton->installEventFilter( keyPressEater );
+        listView->installEventFilter( keyPressEater );
+    
+ +

The TQAccel class, for example, uses this technique to intercept +accelerator key presses. +

Warning: If you delete the receiver object in your eventFilter() +function, be sure to return TRUE. If you return FALSE, TQt sends +the event to the deleted object and the program will crash. +

See also removeEventFilter(), eventFilter(), and event(). + +

bool TQObject::isA ( const char * clname ) const +

+Returns TRUE if this object is an instance of the class clname; +otherwise returns FALSE. +

Example: +

+    TQTimer *t = new TQTimer; // TQTimer inherits TQObject
+    t->isA( "TQTimer" );     // returns TRUE
+    t->isA( "TQObject" );    // returns FALSE
+  
+ +

See also inherits() and metaObject(). + +

bool TQObject::isWidgetType () const +

+ +

Returns TRUE if the object is a widget; otherwise returns FALSE. +

Calling this function is equivalent to calling +inherits("TQWidget"), except that it is much faster. + +

void TQObject::killTimer ( int id ) +

+Kills the timer with timer identifier, id. +

The timer identifier is returned by startTimer() when a timer +event is started. +

See also timerEvent(), startTimer(), and killTimers(). + +

void TQObject::killTimers () +

+Kills all timers that this object has started. +

Warning: Using this function can cause hard-to-find bugs: it kills +timers started by sub- and superclasses as well as those started +by you, which is often not what you want. We recommend using a +TQTimer or perhaps killTimer(). +

See also timerEvent(), startTimer(), and killTimer(). + +

TQMetaObject * TQObject::metaObject () const [virtual] +

+ +

Returns a pointer to the meta object of this object. +

A meta object contains information about a class that inherits +TQObject, e.g. class name, superclass name, properties, signals and +slots. Every class that contains the Q_OBJECT macro will also have +a meta object. +

The meta object information is retquired by the signal/slot +connection mechanism and the property system. The functions isA() +and inherits() also make use of the meta object. + +

const char * TQObject::name () const +

Returns the name of this object. +See the "name" property for details. +

const char * TQObject::name ( const char * defaultName ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the name of this object, or defaultName if the object +does not have a name. + +

TQCString TQObject::normalizeSignalSlot ( const char * signalSlot ) [static protected] +

+Normlizes the signal or slot definition signalSlot by removing +unnecessary whitespace. + +

const TQObjectList * TQObject::objectTrees () [static] +

+Returns a pointer to the list of all object trees (their root +objects), or 0 if there are no objects. +

The TQObjectList class is defined in the qobjectlist.h header +file. +

The most recent root object created is the first object in the list and the first root object added +is the last object in the list. +

See also children(), parent(), insertChild(), and removeChild(). + +

TQObject * TQObject::parent () const +

+ +

Returns a pointer to the parent object. +

See also children(). + +

TQVariant TQObject::property ( const char * name ) const [virtual] +

+Returns the value of the object's name property. +

If no such property exists, the returned variant is invalid. +

Information about all available properties are provided through +the metaObject(). +

See also setProperty(), TQVariant::isValid(), metaObject(), TQMetaObject::propertyNames(), and TQMetaObject::property(). + +

Example: qutlook/centralwidget.cpp. +

TQObjectList * TQObject::queryList ( const char * inheritsClass = 0, const char * objName = 0, bool regexpMatch = TRUE, bool recursiveSearch = TRUE ) const +

+Searches the children and optionally grandchildren of this object, +and returns a list of those objects that are named or that match +objName and inherit inheritsClass. If inheritsClass is 0 +(the default), all classes match. If objName is 0 (the +default), all object names match. +

If regexpMatch is TRUE (the default), objName is a regular expression that the objects's names must match. The syntax is that +of a TQRegExp. If regexpMatch is FALSE, objName is a string +and object names must match it exactly. +

Note that inheritsClass uses single inheritance from TQObject, +the way inherits() does. According to inherits(), TQMenuBar +inherits TQWidget but not TQMenuData. This does not tquite match +reality, but is the best that can be done on the wide variety of +compilers TQt supports. +

Finally, if recursiveSearch is TRUE (the default), queryList() +searches nth-generation as well as first-generation children. +

If all this seems a bit complex for your needs, the simpler +child() function may be what you want. +

This somewhat contrived example disables all the buttons in this +window: +

+    TQObjectList *l = topLevelWidget()->queryList( "TQButton" );
+    TQObjectListIt it( *l ); // iterate over the buttons
+    TQObject *obj;
+
+    while ( (obj = it.current()) != 0 ) {
+        // for each found object...
+        ++it;
+        ((TQButton*)obj)->setEnabled( FALSE );
+    }
+    delete l; // delete the list, not the objects
+    
+ +

The TQObjectList class is defined in the qobjectlist.h header +file. +

Warning: Delete the list as soon you have finished using it. The +list contains pointers that may become invalid at almost any time +without notice (as soon as the user closes a window you may have +dangling pointers, for example). +

See also child(), children(), parent(), inherits(), name, and TQRegExp. + +

void TQObject::removeChild ( TQObject * obj ) [virtual] +

+Removes the child object obj from the list of children. +

Warning: This function will not remove a child widget from the +screen. It will only remove it from the parent widget's list of +children. +

See also insertChild() and TQWidget::reparent(). + +

void TQObject::removeEventFilter ( const TQObject * obj ) +

+Removes an event filter object obj from this object. The +request is ignored if such an event filter has not been installed. +

All event filters for this object are automatically removed when +this object is destroyed. +

It is always safe to remove an event filter, even during event +filter activation (i.e. from the eventFilter() function). +

See also installEventFilter(), eventFilter(), and event(). + +

const TQObject * TQObject::sender () [protected] +

+Returns a pointer to the object that sent the signal, if called in +a slot activated by a signal; otherwise it returns 0. The pointer +is valid only during the execution of the slot that calls this +function. +

The pointer returned by this function becomes invalid if the +sender is destroyed, or if the slot is disconnected from the +sender's signal. +

Warning: This function violates the object-oriented principle of +modularity. However, getting access to the sender might be useful +when many signals are connected to a single slot. The sender is +undefined if the slot is called as a normal C++ function. + +

void TQObject::setName ( const char * name ) [virtual] +

+Sets the object's name to name. + +

bool TQObject::setProperty ( const char * name, const TQVariant & value ) [virtual] +

+Sets the value of the object's name property to value. +

Returns TRUE if the operation was successful; otherwise returns +FALSE. +

Information about all available properties is provided through the +metaObject(). +

See also property(), metaObject(), TQMetaObject::propertyNames(), and TQMetaObject::property(). + +

Example: qutlook/centralwidget.cpp. +

bool TQObject::signalsBlocked () const +

+ +

Returns TRUE if signals are blocked; otherwise returns FALSE. +

Signals are not blocked by default. +

See also blockSignals(). + +

int TQObject::startTimer ( int interval ) +

+Starts a timer and returns a timer identifier, or returns zero if +it could not start a timer. +

A timer event will occur every interval milliseconds until +killTimer() or killTimers() is called. If interval is 0, then +the timer event occurs once every time there are no more window +system events to process. +

The virtual timerEvent() function is called with the TQTimerEvent +event parameter class when a timer event occurs. Reimplement this +function to get timer events. +

If multiple timers are running, the TQTimerEvent::timerId() can be +used to find out which timer was activated. +

Example: +

+    class MyObject : public TQObject
+    {
+        Q_OBJECT
+    public:
+        MyObject( TQObject *parent = 0, const char *name = 0 );
+
+    protected:
+        void timerEvent( TQTimerEvent * );
+    };
+
+    MyObject::MyObject( TQObject *parent, const char *name )
+        : TQObject( parent, name )
+    {
+        startTimer( 50 );    // 50-millisecond timer
+        startTimer( 1000 );  // 1-second timer
+        startTimer( 60000 ); // 1-minute timer
+    }
+
+    void MyObject::timerEvent( TQTimerEvent *e )
+    {
+        qDebug( "timer event, id %d", e->timerId() );
+    }
+    
+ +

Note that TQTimer's accuracy depends on the underlying operating +system and hardware. Most platforms support an accuracy of 20 ms; +some provide more. If TQt is unable to deliver the requested +number of timer clicks, it will silently discard some. +

The TQTimer class provides a high-level programming interface with +one-shot timers and timer signals instead of events. +

See also timerEvent(), killTimer(), killTimers(), TQEventLoop::awake(), and TQEventLoop::aboutToBlock(). + +

void TQObject::timerEvent ( TQTimerEvent * ) [virtual protected] +

+This event handler can be reimplemented in a subclass to receive +timer events for the object. +

TQTimer provides a higher-level interface to the timer +functionality, and also more general information about timers. +

See also startTimer(), killTimer(), killTimers(), and event(). + +

Examples: biff/biff.cpp, dclock/dclock.cpp, forever/forever.cpp, grapher/grapher.cpp, qmag/qmag.cpp, and xform/xform.cpp. +

TQString TQObject::tr ( const char * sourceText, const char * comment ) [static] +

+ + +

Returns a translated version of sourceText, or sourceText +itself if there is no appropriate translated version. The +translation context is TQObject with comment (0 by default). +All TQObject subclasses using the Q_OBJECT macro automatically have +a reimplementation of this function with the subclass name as +context. +

Warning: This method is reentrant only if all translators are +installed before calling this method. Installing or removing +translators while performing translations is not supported. Doing +so will probably result in crashes or other undesirable behavior. +

See also trUtf8(), TQApplication::translate(), and Internationalization with TQt. + +

Example: network/networkprotocol/view.cpp. +

TQString TQObject::trUtf8 ( const char * sourceText, const char * comment ) [static] +

+ + +

Returns a translated version of sourceText, or +TQString::fromUtf8(sourceText) if there is no appropriate +version. It is otherwise identical to tr(sourceText, comment). +

Warning: This method is reentrant only if all translators are +installed before calling this method. Installing or removing +translators while performing translations is not supported. Doing +so will probably result in crashes or other undesirable behavior. +

See also tr() and TQApplication::translate(). + +


Property Documentation

+

TQCString name

+

This property holds the name of this object. +

You can find an object by name (and type) using child(). You can +find a set of objects with queryList(). +

The object name is set by the constructor or by the setName() +function. The object name is not very useful in the current +version of TQt, but will become increasingly important in the +future. +

If the object does not have a name, the name() function returns +"unnamed", so printf() (used in qDebug()) will not be asked to +output a null pointer. If you want a null pointer to be returned +for unnamed objects, you can call name( 0 ). +

+        qDebug( "MyClass::setPrecision(): (%s) invalid precision %f",
+                name(), newPrecision );
+    
+ +

See also className(), child(), and queryList(). + +

Set this property's value with setName() and get this property's value with name(). +


Related Functions

+

void * qt_find_obj_child ( TQObject * parent, const char * type, const char * name ) +

+ +

Returns a pointer to the object named name that inherits type and with a given parent. +

Returns 0 if there is no such child. +

+        TQListBox *c = (TQListBox *) qt_find_obj_child( myWidget, "TQListBox",
+                                                      "my list box" );
+        if ( c )
+            c->insertItem( "another string" );
+    
+ + + +

+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/qobjectcleanuphandler-h.html b/doc/html/qobjectcleanuphandler-h.html new file mode 100644 index 00000000..25715653 --- /dev/null +++ b/doc/html/qobjectcleanuphandler-h.html @@ -0,0 +1,113 @@ + + + + + +qobjectcleanuphandler.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qobjectcleanuphandler.h

+ +

This is the verbatim text of the qobjectcleanuphandler.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qobjectcleanuphandler.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of ???
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQOBJECTCLEANUPHANDLER_H
+#define TQOBJECTCLEANUPHANDLER_H
+
+#ifndef QT_H
+#include "qobject.h"
+#endif // QT_H
+
+class TQObjectList;
+
+class Q_EXPORT TQObjectCleanupHandler : public TQObject
+{
+    Q_OBJECT
+
+public:
+    TQObjectCleanupHandler();
+    ~TQObjectCleanupHandler();
+
+    TQObject* add( TQObject* object );
+    void remove( TQObject *object );
+    bool isEmpty() const;
+    void clear();
+
+private:
+    TQObjectList *cleanupObjects;
+
+private slots:
+    void objectDestroyed( TQObject * );
+};
+
+#endif // TQOBJECTCLEANUPHANDLER_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qobjectcleanuphandler-members.html b/doc/html/qobjectcleanuphandler-members.html new file mode 100644 index 00000000..f3348ea4 --- /dev/null +++ b/doc/html/qobjectcleanuphandler-members.html @@ -0,0 +1,94 @@ + + + + + +TQObjectCleanupHandler Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQObjectCleanupHandler

+ +

This is the complete list of member functions for +TQObjectCleanupHandler, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qobjectcleanuphandler.html b/doc/html/qobjectcleanuphandler.html new file mode 100644 index 00000000..46242130 --- /dev/null +++ b/doc/html/qobjectcleanuphandler.html @@ -0,0 +1,139 @@ + + + + + +TQObjectCleanupHandler Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQObjectCleanupHandler Class Reference

+ +

The TQObjectCleanupHandler class watches the lifetime of multiple TQObjects. +More... +

#include <qobjectcleanuphandler.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQObjectCleanupHandler class watches the lifetime of multiple TQObjects. +

+

A TQObjectCleanupHandler is useful whenever you need to know when a +number of TQObjects that are owned by someone else have been +deleted. This is important, for example, when referencing memory +in an application that has been allocated in a shared library. +

Example: +

+    class FactoryComponent : public FactoryInterface, public TQLibraryInterface
+    {
+    public:
+        ...
+
+        TQObject *createObject();
+
+        bool init();
+        void cleanup();
+        bool canUnload() const;
+
+    private:
+        TQObjectCleanupHandler objects;
+    };
+
+    // allocate a new object, and add it to the cleanup handler
+    TQObject *FactoryComponent::createObject()
+    {
+        return objects.add( new TQObject() );
+    }
+
+    // TQLibraryInterface implementation
+    bool FactoryComponent::init()
+    {
+        return TRUE;
+    }
+
+    void FactoryComponent::cleanup()
+    {
+    }
+
+    // it is only safe to unload the library when all TQObject's have been destroyed
+    bool FactoryComponent::canUnload() const
+    {
+        return objects.isEmpty();
+    }
+    
+ +

See also Object Model. + +


Member Function Documentation

+

TQObjectCleanupHandler::TQObjectCleanupHandler () +

+Constructs an empty TQObjectCleanupHandler. + +

TQObjectCleanupHandler::~TQObjectCleanupHandler () +

+Destroys the cleanup handler. All objects in this cleanup handler +will be deleted. + +

TQObject * TQObjectCleanupHandler::add ( TQObject * object ) +

+Adds object to this cleanup handler and returns the pointer to +the object. + +

void TQObjectCleanupHandler::clear () +

+Deletes all objects in this cleanup handler. The cleanup handler +becomes empty. + +

bool TQObjectCleanupHandler::isEmpty () const +

+Returns TRUE if this cleanup handler is empty or if all objects in +this cleanup handler have been destroyed; otherwise return FALSE. + +

void TQObjectCleanupHandler::remove ( TQObject * object ) +

+Removes the object from this cleanup handler. The object will +not be destroyed. + + +

+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/qobjectlist-h.html b/doc/html/qobjectlist-h.html new file mode 100644 index 00000000..ca0fcbcb --- /dev/null +++ b/doc/html/qobjectlist-h.html @@ -0,0 +1,137 @@ + + + + + +qobjectlist.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qobjectlist.h

+ +

This is the verbatim text of the qobjectlist.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qobjectlist.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQObjectList
+**
+** Created : 940807
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQOBJECTLIST_H
+#define TQOBJECTLIST_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qptrlist.h"
+#endif // QT_H
+
+
+#if defined(Q_TEMPLATEDLL)
+//Q_TEMPLATE_EXTERN template class Q_EXPORT TQPtrList<TQObject>;
+//Q_TEMPLATE_EXTERN template class Q_EXPORT TQPtrListIterator<TQObject>;
+#endif
+
+
+class Q_EXPORT TQObjectList : public TQPtrList<TQObject>
+{
+public:
+    TQObjectList() : TQPtrList<TQObject>() {}
+    TQObjectList( const TQObjectList &list ) : TQPtrList<TQObject>(list) {}
+   ~TQObjectList() { clear(); }
+    TQObjectList &operator=(const TQObjectList &list)
+	{ return (TQObjectList&)TQPtrList<TQObject>::operator=(list); }
+};
+
+class Q_EXPORT TQObjectListIterator : public TQPtrListIterator<TQObject>
+{
+public:
+    TQObjectListIterator( const TQObjectList &l )
+	: TQPtrListIterator<TQObject>( l ) { }
+    TQObjectListIterator &operator=( const TQObjectListIterator &i )
+	{ return (TQObjectListIterator&)
+		 TQPtrListIterator<TQObject>::operator=( i ); }
+};
+
+#if (QT_VERSION-0 >= 0x040000)
+#if defined(Q_CC_GNU)
+#warning "remove the TQObjectListIt class"
+#warning "remove the typedef too, maybe"
+#endif
+typedef TQObjectListIterator TQObjectListIt;
+#else
+class Q_EXPORT TQObjectListIt : public TQPtrListIterator<TQObject>
+{
+public:
+    TQObjectListIt( const TQObjectList &l ) : TQPtrListIterator<TQObject>(l) {}
+    TQObjectListIt &operator=(const TQObjectListIt &i)
+	{ return (TQObjectListIt&)TQPtrListIterator<TQObject>::operator=(i); }
+};
+#endif
+
+#endif // TQOBJECTLIST_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qobjectlist-members.html b/doc/html/qobjectlist-members.html new file mode 100644 index 00000000..8dc68d7a --- /dev/null +++ b/doc/html/qobjectlist-members.html @@ -0,0 +1,90 @@ + + + + + +TQObjectList Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQObjectList

+ +

This is the complete list of member functions for +TQObjectList, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qobjectlist.html b/doc/html/qobjectlist.html new file mode 100644 index 00000000..916f8272 --- /dev/null +++ b/doc/html/qobjectlist.html @@ -0,0 +1,96 @@ + + + + + +TQObjectList Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQObjectList Class Reference

+ +

The TQObjectList class is a TQPtrList of TQObjects. +More... +

#include <qobjectlist.h> +

Inherits TQPtrList<TQObject>. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQObjectList class is a TQPtrList of TQObjects. +

+ +

A TQObjectList is a TQPtrList<TQObject>. The list can be traversed using +inherited functions, e.g. getFirst(), next(), etc., or using a +TQObjectListIterator iterator. +

See TQObject::queryList() for an example of use. +

See also TQObjectListIterator, TQObject, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQObjectList::TQObjectList () +

+ +

Constructs an empty TQObject list. + +

TQObjectList::TQObjectList ( const TQObjectList & list ) +

+ +

Constructs a copy of list. +

Each item in list is appended to this +list. Only the pointers are copied (shallow copy). + +

TQObjectList::~TQObjectList () +

+ +

Removes all the object pointers from the list and destroys the +list. +

All list iterators that access this list will be reset. +

See also setAutoDelete(). + +

TQObjectList & TQObjectList::operator= ( const TQObjectList & list ) +

+ +

Assigns list to this list and returns a reference to this list. +

This list is first cleared and then each item in list is appended to this list. Only the pointers are +copied (shallow copy) unless newItem() has been reimplemented(). + + +


+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/qobjectlistiterator-members.html b/doc/html/qobjectlistiterator-members.html new file mode 100644 index 00000000..e61570a3 --- /dev/null +++ b/doc/html/qobjectlistiterator-members.html @@ -0,0 +1,62 @@ + + + + + +TQObjectListIterator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQObjectListIterator

+ +

This is the complete list of member functions for +TQObjectListIterator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qobjectlistiterator.html b/doc/html/qobjectlistiterator.html new file mode 100644 index 00000000..8c624dbb --- /dev/null +++ b/doc/html/qobjectlistiterator.html @@ -0,0 +1,79 @@ + + + + + +TQObjectListIterator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQObjectListIterator Class Reference

+ +

The TQObjectListIterator class provides an iterator for +TQObjectLists. +More... +

#include <qobjectlist.h> +

Inherits TQPtrListIterator<TQObject>. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQObjectListIterator class provides an iterator for +TQObjectLists. +

+ +

A TQObjectListIterator iterator is a TQPtrListIterator<TQObject>. +

See TQObject::queryList() for an example of use. +

See also TQObjectList, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQObjectListIterator::TQObjectListIterator ( const TQObjectList & list ) +

+ +

Constructs an iterator for list. The current iterator item is +set to point on the first item in the list. + +

TQObjectListIterator & TQObjectListIterator::operator= ( const TQObjectListIterator & it ) +

+ +

Assignment. Makes a copy of the iterator it and returns a +reference to this iterator. + + +


+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/qpaintdevice-h.html b/doc/html/qpaintdevice-h.html new file mode 100644 index 00000000..feb782c4 --- /dev/null +++ b/doc/html/qpaintdevice-h.html @@ -0,0 +1,466 @@ + + + + + +qpaintdevice.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpaintdevice.h

+ +

This is the verbatim text of the qpaintdevice.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qpaintdevice.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPaintDevice class
+**
+** Created : 940721
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPAINTDEVICE_H
+#define TQPAINTDEVICE_H
+
+#ifndef QT_H
+#include "qwindowdefs.h"
+#include "qrect.h"
+#endif // QT_H
+
+#if defined(Q_WS_QWS)
+class TQWSDisplay;
+class TQGfx;
+#endif
+
+class TQIODevice;
+class TQString;
+class TQTextItem;
+
+
+#if defined(Q_WS_X11)
+struct TQPaintDeviceX11Data;
+#endif
+
+union TQPDevCmdParam {
+    int			 ival;
+    int			*ivec;
+    TQString	        *str;
+    const TQPoint	*point;
+    const TQRect		*rect;
+    const TQPointArray	*ptarr;
+    const TQPixmap	*pixmap;
+    const TQImage	*image;
+    const TQColor	*color;
+    const TQFont		*font;
+    const TQPen		*pen;
+    const TQBrush	*brush;
+    const TQRegion	*rgn;
+    const TQWMatrix	*matrix;
+    const TQTextItem     *textItem;
+    TQIODevice		*device;
+};
+
+
+
+class Q_EXPORT TQPaintDevice				// device for TQPainter
+{
+public:
+    virtual ~TQPaintDevice();
+
+    int		devType() const;
+    bool	isExtDev() const;
+    bool	paintingActive() const;
+
+    virtual void setResolution( int );
+    virtual int resolution() const;
+
+    // Windows:	  get device context
+    // X-Windows: get drawable
+#if defined(Q_WS_WIN)
+    virtual HDC		handle() const;
+#elif defined(Q_WS_X11)
+    virtual TQt::HANDLE	handle() const;
+    virtual TQt::HANDLE  x11RenderHandle() const;
+#elif defined(Q_WS_MAC)
+    virtual TQt::HANDLE      handle() const;
+#elif defined(Q_WS_QWS)
+    virtual TQt::HANDLE	handle() const;
+#endif
+
+#if defined(Q_WS_X11)
+    Display 	   *x11Display() const;
+    int		    x11Screen() const;
+    int		    x11Depth() const;
+    int		    x11Cells() const;
+    TQt::HANDLE	    x11Colormap() const;
+    bool	    x11DefaultColormap() const;
+    void	   *x11Visual() const;
+    bool	    x11DefaultVisual() const;
+
+    static Display *x11AppDisplay();
+    static int	    x11AppScreen();
+
+    static int      x11AppDpiX();
+    static int      x11AppDpiY();
+    static void     x11SetAppDpiX(int);
+    static void     x11SetAppDpiY(int);
+    static int	    x11AppDepth();
+    static int	    x11AppCells();
+    static TQt::HANDLE   x11AppRootWindow();
+    static TQt::HANDLE   x11AppColormap();
+    static bool     x11AppDefaultColormap();
+    static void    *x11AppVisual();
+    static bool	    x11AppDefaultVisual();
+
+    // ### in 4.0, the above need to go away, the below needs to take a -1 default
+    // argument, signifying the default screen...
+    static int	    x11AppDepth( int screen );
+    static int	    x11AppCells( int screen );
+    static TQt::HANDLE   x11AppRootWindow( int screen );
+    static TQt::HANDLE   x11AppColormap( int screen );
+    static void    *x11AppVisual( int screen );
+    static bool     x11AppDefaultColormap( int screen );
+    static bool	    x11AppDefaultVisual( int screen );
+    static int      x11AppDpiX( int );
+    static int      x11AppDpiY( int );
+    static void     x11SetAppDpiX( int, int );
+    static void     x11SetAppDpiY( int, int );
+#endif
+
+#if defined(Q_WS_QWS)
+    static TQWSDisplay *qwsDisplay();
+    virtual unsigned char * scanLine(int) const;
+    virtual int bytesPerLine() const;
+    virtual TQGfx * graphicsContext(bool clip_children=TRUE) const;
+#endif
+
+    enum PDevCmd {
+	PdcNOP = 0, //  <void>
+	PdcDrawPoint = 1, // point
+	PdcDrawFirst = PdcDrawPoint,
+	PdcMoveTo = 2, // point
+	PdcLineTo = 3, // point
+	PdcDrawLine = 4, // point,point
+	PdcDrawRect = 5, // rect
+	PdcDrawRoundRect = 6, // rect,ival,ival
+	PdcDrawEllipse = 7, // rect
+	PdcDrawArc = 8, // rect,ival,ival
+	PdcDrawPie = 9, // rect,ival,ival
+	PdcDrawChord = 10, // rect,ival,ival
+	PdcDrawLineSegments = 11, // ptarr
+	PdcDrawPolyline = 12, // ptarr
+	PdcDrawPolygon = 13, // ptarr,ival
+	PdcDrawCubicBezier = 14, // ptarr
+	PdcDrawText = 15, // point,str
+	PdcDrawTextFormatted = 16, // rect,ival,str
+	PdcDrawPixmap = 17, // rect,pixmap
+	PdcDrawImage = 18, // rect,image
+	PdcDrawText2 = 19, // point,str
+	PdcDrawText2Formatted = 20, // rect,ival,str
+	PdcDrawTextItem = 21,
+	PdcDrawLast = PdcDrawTextItem,
+
+	// no painting commands below PdcDrawLast.
+
+	PdcBegin = 30, //  <void>
+	PdcEnd = 31, //  <void>
+	PdcSave = 32, //  <void>
+	PdcRestore = 33, //  <void>
+	PdcSetdev = 34, // device - PRIVATE
+	PdcSetBkColor = 40, // color
+	PdcSetBkMode = 41, // ival
+	PdcSetROP = 42, // ival
+	PdcSetBrushOrigin = 43, // point
+	PdcSetFont = 45, // font
+	PdcSetPen = 46, // pen
+	PdcSetBrush = 47, // brush
+	PdcSetTabStops = 48, // ival
+	PdcSetTabArray = 49, // ival,ivec
+	PdcSetUnit = 50, // ival
+	PdcSetVXform = 51, // ival
+	PdcSetWindow = 52, // rect
+	PdcSetViewport = 53, // rect
+	PdcSetWXform = 54, // ival
+	PdcSetWMatrix = 55, // matrix,ival
+	PdcSaveWMatrix = 56,
+	PdcRestoreWMatrix = 57,
+	PdcSetClip = 60, // ival
+	PdcSetClipRegion = 61, // rgn
+
+	PdcReservedStart = 0, // codes 0-199 are reserved
+	PdcReservedStop = 199 //   for TQt
+    };
+
+protected:
+    TQPaintDevice( uint devflags );
+
+#if defined(Q_WS_WIN)
+    HDC		hdc;				// device context
+#elif defined(Q_WS_X11)
+    TQt::HANDLE	hd;				// handle to drawable
+    TQt::HANDLE  rendhd;                         // handle to RENDER pict
+
+    void		 copyX11Data( const TQPaintDevice * );
+    void		 cloneX11Data( const TQPaintDevice * );
+    virtual void	 setX11Data( const TQPaintDeviceX11Data* );
+    TQPaintDeviceX11Data* getX11Data( bool def=FALSE ) const;
+#elif defined(Q_WS_MAC)
+#if !defined( TQMAC_NO_QUARTZ )
+    CGContextRef ctx;
+#endif
+    void * hd;
+#elif defined(Q_WS_QWS)
+    TQt::HANDLE hd;
+#endif
+
+    virtual bool cmd( int, TQPainter *, TQPDevCmdParam * );
+    virtual int	 metric( int ) const;
+    virtual int	 fontMet( TQFont *, int, const char * = 0, int = 0 ) const;
+    virtual int	 fontInf( TQFont *, int ) const;
+
+    ushort	devFlags;			// device flags
+    ushort	painters;			// refcount
+
+    friend class TQPainter;
+    friend class TQPaintDeviceMetrics;
+#if defined(Q_WS_MAC)
+#ifndef TQMAC_NO_QUARTZ
+    virtual CGContextRef macCGContext(bool clipped=TRUE) const;
+#endif
+    friend Q_EXPORT void unclippedScaledBitBlt( TQPaintDevice *, int, int, int, int,
+						const TQPaintDevice *, int, int, int, int, TQt::RasterOp, bool, bool );
+#else
+    friend Q_EXPORT void bitBlt( TQPaintDevice *, int, int,
+				 const TQPaintDevice *,
+				 int, int, int, int, TQt::RasterOp, bool );
+#endif
+#if defined(Q_WS_X11)
+    friend void qt_init_internal( int *, char **, Display *, TQt::HANDLE, TQt::HANDLE );
+    friend void qt_cleanup();
+#endif
+
+private:
+#if defined(Q_WS_X11)
+    static Display *x_appdisplay;
+    static int	    x_appscreen;
+
+    static int	    x_appdepth;
+    static int	    x_appcells;
+    static TQt::HANDLE   x_approotwindow;
+    static TQt::HANDLE   x_appcolormap;
+    static bool	    x_appdefcolormap;
+    static void	   *x_appvisual;
+    static bool     x_appdefvisual;
+
+    // ### in 4.0, remove the above, and replace with the below
+    static int	      *x_appdepth_arr;
+    static int	      *x_appcells_arr;
+    static TQt::HANDLE *x_approotwindow_arr;
+    static TQt::HANDLE *x_appcolormap_arr;
+    static bool	      *x_appdefcolormap_arr;
+    static void	     **x_appvisual_arr;
+    static bool       *x_appdefvisual_arr;
+
+    TQPaintDeviceX11Data* x11Data;
+#endif
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQPaintDevice( const TQPaintDevice & );
+    TQPaintDevice &operator=( const TQPaintDevice & );
+#endif
+};
+
+
+Q_EXPORT
+void bitBlt( TQPaintDevice *dst, int dx, int dy,
+	     const TQPaintDevice *src, int sx=0, int sy=0, int sw=-1, int sh=-1,
+	     TQt::RasterOp = TQt::CopyROP, bool ignoreMask=FALSE );
+
+Q_EXPORT
+void bitBlt( TQPaintDevice *dst, int dx, int dy,
+	     const TQImage *src, int sx=0, int sy=0, int sw=-1, int sh=-1,
+	     int conversion_flags=0 );
+
+
+#if defined(Q_WS_X11)
+
+struct Q_EXPORT TQPaintDeviceX11Data : public TQShared {
+    Display*	x_display;
+    int		x_screen;
+    int		x_depth;
+    int		x_cells;
+    TQt::HANDLE	x_colormap;
+    bool	x_defcolormap;
+    void*	x_visual;
+    bool	x_defvisual;
+};
+
+#endif
+
+/*****************************************************************************
+  Inline functions
+ *****************************************************************************/
+
+inline int TQPaintDevice::devType() const
+{ return devFlags & TQInternal::DeviceTypeMask; }
+
+inline bool TQPaintDevice::isExtDev() const
+{ return (devFlags & TQInternal::ExternalDevice) != 0; }
+
+inline bool TQPaintDevice::paintingActive() const
+{ return painters != 0; }
+
+#if defined(Q_WS_X11)
+inline Display *TQPaintDevice::x11Display() const
+{ return x11Data ? x11Data->x_display : x_appdisplay; }
+
+inline int TQPaintDevice::x11Screen() const
+{ return x11Data ? x11Data->x_screen : x_appscreen; }
+
+inline int TQPaintDevice::x11Depth() const
+{ return x11Data ? x11Data->x_depth : x_appdepth; }
+
+inline int TQPaintDevice::x11Cells() const
+{ return x11Data ? x11Data->x_cells : x_appcells; }
+
+inline TQt::HANDLE TQPaintDevice::x11Colormap() const
+{ return x11Data ? x11Data->x_colormap : x_appcolormap; }
+
+inline bool TQPaintDevice::x11DefaultColormap() const
+{ return x11Data ? x11Data->x_defcolormap : x_appdefcolormap; }
+
+inline void *TQPaintDevice::x11Visual() const
+{ return x11Data ? x11Data->x_visual : x_appvisual; }
+
+inline bool TQPaintDevice::x11DefaultVisual() const
+{ return x11Data ? x11Data->x_defvisual : x_appdefvisual; }
+
+inline Display *TQPaintDevice::x11AppDisplay()
+{ return x_appdisplay; }
+
+inline int TQPaintDevice::x11AppScreen()
+{ return x_appscreen; }
+
+inline int TQPaintDevice::x11AppDepth( int screen )
+{ return x_appdepth_arr[ screen == -1 ? x_appscreen : screen ]; }
+
+inline int TQPaintDevice::x11AppCells( int screen )
+{ return x_appcells_arr[ screen == -1 ? x_appscreen : screen ]; }
+
+inline TQt::HANDLE TQPaintDevice::x11AppRootWindow( int screen )
+{ return x_approotwindow_arr[ screen == -1 ? x_appscreen : screen ]; }
+
+inline TQt::HANDLE TQPaintDevice::x11AppColormap( int screen )
+{ return x_appcolormap_arr[ screen == -1 ? x_appscreen : screen ]; }
+
+inline bool TQPaintDevice::x11AppDefaultColormap( int screen )
+{ return x_appdefcolormap_arr[ screen == -1 ? x_appscreen : screen ]; }
+
+inline void *TQPaintDevice::x11AppVisual( int screen )
+{ return x_appvisual_arr[ screen == -1 ? x_appscreen : screen ]; }
+
+inline bool TQPaintDevice::x11AppDefaultVisual( int screen )
+{ return x_appdefvisual_arr[ screen == -1 ? x_appscreen : screen ]; }
+
+inline int TQPaintDevice::x11AppDepth()
+{ return x_appdepth; }
+
+inline int TQPaintDevice::x11AppCells()
+{ return x_appcells; }
+
+inline TQt::HANDLE TQPaintDevice::x11AppRootWindow()
+{ return x_approotwindow; }
+
+inline TQt::HANDLE TQPaintDevice::x11AppColormap()
+{ return x_appcolormap; }
+
+inline bool TQPaintDevice::x11AppDefaultColormap()
+{ return x_appdefcolormap; }
+
+inline void *TQPaintDevice::x11AppVisual()
+{ return x_appvisual; }
+
+inline bool TQPaintDevice::x11AppDefaultVisual()
+{ return x_appdefvisual; }
+
+#endif // Q_WS_X11
+
+
+Q_EXPORT
+inline void bitBlt( TQPaintDevice *dst, const TQPoint &dp,
+		    const TQPaintDevice *src, const TQRect &sr =TQRect(0,0,-1,-1),
+		    TQt::RasterOp rop=TQt::CopyROP, bool ignoreMask=FALSE )
+{
+    bitBlt( dst, dp.x(), dp.y(), src, sr.x(), sr.y(), sr.width(), sr.height(),
+	    rop, ignoreMask );
+}
+
+
+
+
+#endif // TQPAINTDEVICE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpaintdevice-members.html b/doc/html/qpaintdevice-members.html new file mode 100644 index 00000000..c1a62686 --- /dev/null +++ b/doc/html/qpaintdevice-members.html @@ -0,0 +1,73 @@ + + + + + +TQPaintDevice Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPaintDevice

+ +

This is the complete list of member functions for +TQPaintDevice, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpaintdevice.html b/doc/html/qpaintdevice.html new file mode 100644 index 00000000..dfcd21cc --- /dev/null +++ b/doc/html/qpaintdevice.html @@ -0,0 +1,464 @@ + + + + + +TQPaintDevice Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPaintDevice Class Reference

+ +

The TQPaintDevice class is the base class of objects that +can be painted. +More... +

#include <qpaintdevice.h> +

Inherited by TQWidget, TQPixmap, TQPicture, and TQPrinter. +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Protected Members

+
    +
  • TQPaintDevice ( uint devflags )
  • +
  • virtual bool cmd ( int, TQPainter *, TQPDevCmdParam * )
  • +
+

Related Functions

+
    +
  • void bitBlt ( TQPaintDevice * dst, int dx, int dy, const TQPaintDevice * src, int sx, int sy, int sw, int sh, TQt::RasterOp rop, bool ignoreMask )
  • +
  • void bitBlt ( TQPaintDevice * dst, const TQPoint & dp, const TQPaintDevice * src, const TQRect & sr, RasterOp rop )
  • +
+

Detailed Description

+ + +The TQPaintDevice class is the base class of objects that +can be painted. +

+ +

A paint device is an abstraction of a two-dimensional space that +can be drawn using a TQPainter. The drawing capabilities are +implemented by the subclasses TQWidget, TQPixmap, TQPicture and +TQPrinter. +

The default coordinate system of a paint device has its origin +located at the top-left position. X increases to the right and Y +increases downward. The unit is one pixel. There are several ways +to set up a user-defined coordinate system using the painter, for +example, using TQPainter::setWorldMatrix(). +

Example (draw on a paint device): +

+    void MyWidget::paintEvent( TQPaintEvent * )
+    {
+        TQPainter p;                       // our painter
+        p.begin( this );                  // start painting the widget
+        p.setPen( red );                  // red outline
+        p.setBrush( yellow );             // yellow fill
+        p.drawEllipse( 10, 20, 100,100 ); // 100x100 ellipse at position (10, 20)
+        p.end();                          // painting done
+    }
+    
+ +

The bit block transfer is an extremely useful operation for +copying pixels from one paint device to another (or to itself). It +is implemented as the global function bitBlt(). +

Example (scroll widget contents 10 pixels to the right): +

+    bitBlt( myWidget, 10, 0, myWidget );
+    
+ +

Warning: TQt retquires that a TQApplication object exists before +any paint devices can be created. Paint devices access window +system resources, and these resources are not initialized before +an application object is created. +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

TQPaintDevice::TQPaintDevice ( uint devflags ) [protected] +

+Constructs a paint device with internal flags devflags. This +constructor can be invoked only from TQPaintDevice subclasses. + +

TQPaintDevice::~TQPaintDevice () [virtual] +

+Destroys the paint device and frees window system resources. + +

bool TQPaintDevice::cmd ( int, TQPainter *, TQPDevCmdParam * ) [virtual protected] +

+Internal virtual function that interprets drawing commands from +the painter. +

Implemented by subclasses that have no direct support for drawing +graphics (external paint devices, for example, TQPicture). + +

TQt::HANDLE TQPaintDevice::handle () const [virtual] +

+Returns the window system handle of the paint device, for +low-level access. Using this function is not portable. +

The HANDLE type varies with platform; see qpaintdevice.h and +qwindowdefs.h for details. +

See also x11Display(). + +

bool TQPaintDevice::isExtDev () const +

+ +

Returns TRUE if the device is an external paint device; otherwise +returns FALSE. +

External paint devices cannot be bitBlt()'ed from. TQPicture and +TQPrinter are external paint devices. + +

bool TQPaintDevice::paintingActive () const +

+ +

Returns TRUE if the device is being painted, i.e. someone has +called TQPainter::begin() but not yet called TQPainter::end() for +this device; otherwise returns FALSE. +

See also TQPainter::isActive(). + +

int TQPaintDevice::x11AppCells () [static] +

+ +

Returns the number of entries in the colormap for the default +screen of the X display global to the application (X11 +only). Using this function is not portable. +

See also x11Colormap(). + +

int TQPaintDevice::x11AppCells ( int screen ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns the number of entries in the colormap for screen screen +of the X display global to the application (X11 only). Using this +function is not portable. +

See also x11Colormap(). + +

TQt::HANDLE TQPaintDevice::x11AppColormap () [static] +

+ +

Returns the colormap for the default screen of the X display +global to the application (X11 only). Using this function is not +portable. +

See also x11Cells(). + +

TQt::HANDLE TQPaintDevice::x11AppColormap ( int screen ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns the colormap for screen screen of the X display global +to the application (X11 only). Using this function is not +portable. +

See also x11Cells(). + +

bool TQPaintDevice::x11AppDefaultColormap () [static] +

+ +

Returns the default colormap for the default screen of the X +display global to the application (X11 only). Using this function +is not portable. +

See also x11Cells(). + +

bool TQPaintDevice::x11AppDefaultColormap ( int screen ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns the default colormap for screen screen of the X display +global to the application (X11 only). Using this function is not +portable. +

See also x11Cells(). + +

bool TQPaintDevice::x11AppDefaultVisual () [static] +

+ +

Returns TRUE if the Visual used is the default for the default +screen of the X display global to the application (X11 only); +otherwise returns FALSE. Using this function is not portable. + +

bool TQPaintDevice::x11AppDefaultVisual ( int screen ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns TRUE if the Visual used is the default for screen +screen of the X display global to the application (X11 only); +otherwise returns FALSE. Using this function is not portable. + +

int TQPaintDevice::x11AppDepth ( int screen ) [static] +

+ +

Returns the depth for screen screen of the X display global to +the application (X11 only). Using this function is not portable. +

See also TQPixmap::defaultDepth(). + +

int TQPaintDevice::x11AppDepth () [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns the depth for the default screen of the X display global +to the application (X11 only). Using this function is not +portable. +

See also TQPixmap::defaultDepth(). + +

Display * TQPaintDevice::x11AppDisplay () [static] +

+ +

Returns a pointer to the X display global to the application (X11 +only). Using this function is not portable. +

See also handle(). + +

int TQPaintDevice::x11AppDpiX ( int screen ) [static] +

+Returns the horizontal DPI of the X display (X11 only) for screen +screen. Using this function is not portable. See +TQPaintDeviceMetrics for portable access to related information. +Using this function is not portable. +

See also x11AppDpiY(), x11SetAppDpiX(), and TQPaintDeviceMetrics::logicalDpiX(). + +

int TQPaintDevice::x11AppDpiX () [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the horizontal DPI of the X display (X11 only) for the +default screen. Using this function is not portable. See +TQPaintDeviceMetrics for portable access to related information. +Using this function is not portable. + +

int TQPaintDevice::x11AppDpiY ( int screen ) [static] +

+Returns the vertical DPI of the X11 display (X11 only) for screen +screen. Using this function is not portable. See +TQPaintDeviceMetrics for portable access to related information. +Using this function is not portable. +

See also x11AppDpiX(), x11SetAppDpiY(), and TQPaintDeviceMetrics::logicalDpiY(). + +

int TQPaintDevice::x11AppDpiY () [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the vertical DPI of the X11 display (X11 only) for the +default screen. Using this function is not portable. See +TQPaintDeviceMetrics for portable access to related information. +Using this function is not portable. +

See also x11AppDpiX(), x11SetAppDpiY(), and TQPaintDeviceMetrics::logicalDpiY(). + +

TQt::HANDLE TQPaintDevice::x11AppRootWindow () [static] +

+ +

Returns the root window for the default screen of the X display +global to the applicatoin (X11 only). Using this function is not +portable. + +

TQt::HANDLE TQPaintDevice::x11AppRootWindow ( int screen ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns the root window for screen screen of the X display +global to the applicatoin (X11 only). Using this function is not +portable. + +

int TQPaintDevice::x11AppScreen () [static] +

+ +

Returns the screen number on the X display global to the +application (X11 only). Using this function is not portable. + +

void * TQPaintDevice::x11AppVisual () [static] +

+ +

Returns the Visual for the default screen of the X display global +to the application (X11 only). Using this function is not +portable. + +

void * TQPaintDevice::x11AppVisual ( int screen ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns the Visual for screen screen of the X display global to +the application (X11 only). Using this function is not portable. + +

int TQPaintDevice::x11Cells () const +

+ +

Returns the number of entries in the colormap of the X display for +the paint device (X11 only). Using this function is not portable. +

See also x11Colormap(). + +

TQt::HANDLE TQPaintDevice::x11Colormap () const +

+ +

Returns the colormap of the X display for the paint device (X11 +only). Using this function is not portable. +

See also x11Cells(). + +

bool TQPaintDevice::x11DefaultColormap () const +

+ +

Returns the default colormap of the X display for the paint device +(X11 only). Using this function is not portable. +

See also x11Cells(). + +

bool TQPaintDevice::x11DefaultVisual () const +

+ +

Returns the default Visual of the X display for the paint device +(X11 only). Using this function is not portable. + +

int TQPaintDevice::x11Depth () const +

+ +

Returns the depth of the X display for the paint device (X11 +only). Using this function is not portable. +

See also TQPixmap::defaultDepth(). + +

Display * TQPaintDevice::x11Display () const +

+ +

Returns a pointer to the X display for the paint device (X11 +only). Using this function is not portable. +

See also handle(). + +

int TQPaintDevice::x11Screen () const +

+ +

Returns the screen number on the X display for the paint device +(X11 only). Using this function is not portable. + +

void TQPaintDevice::x11SetAppDpiX ( int dpi, int screen ) [static] +

+Sets the value returned by x11AppDpiX() to dpi for screen +screen. The default is determined by the display configuration. +Changing this value will alter the scaling of fonts and many other +metrics and is not recommended. Using this function is not +portable. +

See also x11SetAppDpiY(). + +

void TQPaintDevice::x11SetAppDpiX ( int dpi ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the value returned by x11AppDpiX() to dpi for the default +screen. The default is determined by the display configuration. +Changing this value will alter the scaling of fonts and many other +metrics and is not recommended. Using this function is not +portable. +

+

void TQPaintDevice::x11SetAppDpiY ( int dpi, int screen ) [static] +

+Sets the value returned by x11AppDpiY() to dpi for screen +screen. The default is determined by the display configuration. +Changing this value will alter the scaling of fonts and many other +metrics and is not recommended. Using this function is not +portable. +

See also x11SetAppDpiX(). + +

void TQPaintDevice::x11SetAppDpiY ( int dpi ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the value returned by x11AppDpiY() to dpi for the default +screen. The default is determined by the display configuration. +Changing this value will alter the scaling of fonts and many other +metrics and is not recommended. Using this function is not +portable. + +

void * TQPaintDevice::x11Visual () const +

+ +

Returns the Visual of the X display for the paint device (X11 +only). Using this function is not portable. + +


Related Functions

+

void bitBlt ( TQPaintDevice * dst, int dx, int dy, const TQPaintDevice * src, int sx, int sy, int sw, int sh, TQt::RasterOp rop, bool ignoreMask ) +

+ +

Copies a block of pixels from src to dst, perhaps merging +each pixel according to the raster operation +rop. sx, sy +is the top-left pixel in src (0, 0) by default, dx, dy is +the top-left position in dst and sw, sh is the size of +the copied block (all of src by default). +

The most common values for rop are CopyROP and XorROP; the TQt::RasterOp documentation defines all the possible values. +

If ignoreMask is FALSE (the default) and src is a +masked TQPixmap, the entire blit is masked by src->mask(). +

If src, dst, sw or sh is 0, bitBlt() does nothing. If +sw or sh is negative bitBlt() copies starting at sx (and +respectively, sy) and ending at the right end (respectively, +bottom) of src. +

src must be a TQWidget or TQPixmap. You cannot blit from a +TQPrinter, for example. bitBlt() does nothing if you attempt to +blit from an unsupported device. +

bitBlt() does nothing if src has a greater depth than dst. +If you need to for example, draw a 24-bit pixmap on an 8-bit +widget, you must use drawPixmap(). + +

void bitBlt ( TQPaintDevice * dst, const TQPoint & dp, const TQPaintDevice * src, const TQRect & sr, RasterOp rop ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Overloaded bitBlt() with the destination point dp and source +rectangle sr. + + +


+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/qpaintdevicemetrics-h.html b/doc/html/qpaintdevicemetrics-h.html new file mode 100644 index 00000000..e6318549 --- /dev/null +++ b/doc/html/qpaintdevicemetrics-h.html @@ -0,0 +1,128 @@ + + + + + +qpaintdevicemetrics.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpaintdevicemetrics.h

+ +

This is the verbatim text of the qpaintdevicemetrics.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qpaintdevicemetrics.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPaintDeviceMetrics class
+**
+** Created : 941109
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPAINTDEVICEMETRICS_H
+#define TQPAINTDEVICEMETRICS_H
+
+#ifndef QT_H
+#include "qpaintdevice.h"
+#endif // QT_H
+
+
+class Q_EXPORT TQPaintDeviceMetrics			// paint device metrics
+{
+public:
+    TQPaintDeviceMetrics( const TQPaintDevice * );
+
+    enum {
+	PdmWidth = 1,
+	PdmHeight,
+	PdmWidthMM,
+	PdmHeightMM,
+	PdmNumColors,
+	PdmDepth,
+	PdmDpiX,
+	PdmDpiY,
+	PdmPhysicalDpiX,
+	PdmPhysicalDpiY
+    };
+
+    int	  width()	const	{ return (int)pdev->metric(PdmWidth); }
+    int	  height()	const	{ return (int)pdev->metric(PdmHeight); }
+    int	  widthMM()	const	{ return (int)pdev->metric(PdmWidthMM); }
+    int	  heightMM()	const	{ return (int)pdev->metric(PdmHeightMM); }
+    int	  logicalDpiX()	const	{ return (int)pdev->metric(PdmDpiX); }
+    int	  logicalDpiY()	const	{ return (int)pdev->metric(PdmDpiY); }
+    int	  physicalDpiX()const	{ return (int)pdev->metric(PdmPhysicalDpiX); }
+    int	  physicalDpiY()const	{ return (int)pdev->metric(PdmPhysicalDpiY); }
+    int	  numColors()	const	{ return (int)pdev->metric(PdmNumColors); }
+    int	  depth()	const	{ return (int)pdev->metric(PdmDepth); }
+
+private:
+    TQPaintDevice *pdev;
+};
+
+
+#endif // TQPAINTDEVICEMETRICS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpaintdevicemetrics-members.html b/doc/html/qpaintdevicemetrics-members.html new file mode 100644 index 00000000..5e661d98 --- /dev/null +++ b/doc/html/qpaintdevicemetrics-members.html @@ -0,0 +1,55 @@ + + + + + +TQPaintDeviceMetrics Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPaintDeviceMetrics

+ +

This is the complete list of member functions for +TQPaintDeviceMetrics, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpaintdevicemetrics.html b/doc/html/qpaintdevicemetrics.html new file mode 100644 index 00000000..cdd4d551 --- /dev/null +++ b/doc/html/qpaintdevicemetrics.html @@ -0,0 +1,150 @@ + + + + + +TQPaintDeviceMetrics Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPaintDeviceMetrics Class Reference

+ +

The TQPaintDeviceMetrics class provides information about a +paint device. +More... +

#include <qpaintdevicemetrics.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQPaintDeviceMetrics class provides information about a +paint device. +

+ +

Sometimes when drawing graphics it is necessary to obtain +information about the physical characteristics of a paint device. +This class provides the information. For example, to compute the +aspect ratio of a paint device: +

+        TQPaintDeviceMetrics pdm( myWidget );
+        double aspect = (double)pdm.widthMM() / (double)pdm.heightMM();
+    
+ +

TQPaintDeviceMetrics contains methods to provide the width and +height of a device in both pixels (width() and height()) and +millimeters (widthMM() and heightMM()), the number of colors the +device supports (numColors()), the number of bit planes (depth()), +and the resolution of the device (logicalDpiX() and +logicalDpiY()). +

It is not always possible for TQPaintDeviceMetrics to compute the +values you ask for, particularly for external devices. The +ultimate example is asking for the resolution of of a TQPrinter +that is set to "print to file": who knows what printer that file +will end up on? +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

TQPaintDeviceMetrics::TQPaintDeviceMetrics ( const TQPaintDevice * pd ) +

+Constructs a metric for the paint device pd. + +

int TQPaintDeviceMetrics::depth () const +

+ +

Returns the bit depth (number of bit planes) of the paint device. + +

int TQPaintDeviceMetrics::height () const +

+ +

Returns the height of the paint device in default coordinate +system units (e.g. pixels for TQPixmap and TQWidget). + +

Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, mdi/application.cpp, and qwerty/qwerty.cpp. +

int TQPaintDeviceMetrics::heightMM () const +

+ +

Returns the height of the paint device, measured in millimeters. + +

int TQPaintDeviceMetrics::logicalDpiX () const +

+ +

Returns the horizontal resolution of the device in dots per inch, +which is used when computing font sizes. For X, this is usually +the same as could be computed from widthMM(), but it varies on +Windows. + +

Example: qwerty/qwerty.cpp. +

int TQPaintDeviceMetrics::logicalDpiY () const +

+ +

Returns the vertical resolution of the device in dots per inch, +which is used when computing font sizes. For X, this is usually +the same as could be computed from heightMM(), but it varies on +Windows. + +

Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. +

int TQPaintDeviceMetrics::numColors () const +

+ +

Returns the number of different colors available for the paint +device. Since this value is an int will not be sufficient to represent +the number of colors on 32 bit displays, in which case INT_MAX is +returned instead. + +

int TQPaintDeviceMetrics::width () const +

+ +

Returns the width of the paint device in default coordinate system +units (e.g. pixels for TQPixmap and TQWidget). + +

Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, mdi/application.cpp, and qwerty/qwerty.cpp. +

int TQPaintDeviceMetrics::widthMM () const +

+ +

Returns the width of the paint device, measured in millimeters. + + +


+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/qpainter-h.html b/doc/html/qpainter-h.html new file mode 100644 index 00000000..628eb058 --- /dev/null +++ b/doc/html/qpainter-h.html @@ -0,0 +1,766 @@ + + + + + +qpainter.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpainter.h

+ +

This is the verbatim text of the qpainter.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qpainter.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPainter class
+**
+** Created : 940112
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPAINTER_H
+#define TQPAINTER_H
+
+
+#ifndef QT_H
+#include "qcolor.h"
+#include "qfontmetrics.h"
+#include "qfontinfo.h"
+#include "qregion.h"
+#include "qpen.h"
+#include "qbrush.h"
+#include "qpointarray.h"
+#include "qwmatrix.h"
+#endif // QT_H
+
+class TQGfx;
+class TQTextCodec;
+class TQTextParag;
+class TQPaintDevice;
+class TQTextItem;
+#if defined( Q_WS_MAC )
+class TQMacSavedPortInfo;
+#endif
+class TQPainterPrivate;
+
+#if defined(Q_WS_QWS)
+class TQScreen;
+#endif
+
+class Q_EXPORT TQPainter : public TQt
+{
+public:
+    enum CoordinateMode { CoordDevice, CoordPainter };
+
+    TQPainter();
+    TQPainter( const TQPaintDevice *, bool unclipped = FALSE );
+    TQPainter( const TQPaintDevice *, const TQWidget *, bool unclipped = FALSE );
+   ~TQPainter();
+
+    bool	begin( const TQPaintDevice *, bool unclipped = FALSE );
+    bool	begin( const TQPaintDevice *, const TQWidget *, bool unclipped = FALSE );
+    bool	end();
+    TQPaintDevice *device() const;
+
+#ifdef Q_WS_QWS
+    TQGfx * internalGfx();
+#ifdef QT_QWS_EXPERIMENTAL_SCREENPAINTER
+    bool begin(TQScreen *screen);
+#endif
+#endif
+
+    static void redirect( TQPaintDevice *pdev, TQPaintDevice *replacement );
+    static TQPaintDevice *redirect( TQPaintDevice *pdev );
+
+    bool	isActive() const;
+
+    void	flush( const TQRegion &region, CoordinateMode cm = CoordDevice );
+    void	flush();
+    void	save();
+    void	restore();
+
+  // Drawing tools
+
+    TQFontMetrics fontMetrics()	const;
+    TQFontInfo	 fontInfo()	const;
+
+    const TQFont &font()		const;
+    void	setFont( const TQFont & );
+    const TQPen &pen()		const;
+    void	setPen( const TQPen & );
+    void	setPen( PenStyle );
+    void	setPen( const TQColor & );
+    const TQBrush &brush()	const;
+    void	setBrush( const TQBrush & );
+    void	setBrush( BrushStyle );
+    void	setBrush( const TQColor & );
+    TQPoint	pos() const;
+
+  // Drawing attributes/modes
+
+    const TQColor &backgroundColor() const;
+    void	setBackgroundColor( const TQColor & );
+    BGMode	backgroundMode() const;
+    void	setBackgroundMode( BGMode );
+    RasterOp	rasterOp()	const;
+    void	setRasterOp( RasterOp );
+    const TQPoint &brushOrigin() const;
+    void	setBrushOrigin( int x, int y );
+    void	setBrushOrigin( const TQPoint & );
+
+  // Scaling and transformations
+
+//    PaintUnit unit()	       const;		// get set painter unit
+//    void	setUnit( PaintUnit );		// NOT IMPLEMENTED!!!
+
+    bool	hasViewXForm() const;
+    bool	hasWorldXForm() const;
+
+#ifndef QT_NO_TRANSFORMATIONS
+    void	setViewXForm( bool );		// set xform on/off
+    TQRect	window()       const;		// get window
+    void	setWindow( const TQRect & );	// set window
+    void	setWindow( int x, int y, int w, int h );
+    TQRect	viewport()   const;		// get viewport
+    void	setViewport( const TQRect & );	// set viewport
+    void	setViewport( int x, int y, int w, int h );
+
+    void	setWorldXForm( bool );		// set world xform on/off
+    const TQWMatrix &worldMatrix() const;	// get/set world xform matrix
+    void	setWorldMatrix( const TQWMatrix &, bool combine=FALSE );
+
+    void	saveWorldMatrix();
+    void	restoreWorldMatrix();
+
+    void	scale( double sx, double sy );
+    void	shear( double sh, double sv );
+    void	rotate( double a );
+#endif
+    void	translate( double dx, double dy );
+    void	resetXForm();
+    double	translationX() const;
+    double	translationY() const;
+
+    TQPoint	xForm( const TQPoint & ) const;	// map virtual -> device
+    TQRect	xForm( const TQRect & )	const;
+    TQPointArray xForm( const TQPointArray & ) const;
+    TQPointArray xForm( const TQPointArray &, int index, int npoints ) const;
+    TQPoint	xFormDev( const TQPoint & ) const; // map device -> virtual
+    TQRect	xFormDev( const TQRect & )  const;
+    TQPointArray xFormDev( const TQPointArray & ) const;
+    TQPointArray xFormDev( const TQPointArray &, int index, int npoints ) const;
+
+  // Clipping
+
+    void	setClipping( bool );		// set clipping on/off
+    bool	hasClipping() const;
+    TQRegion clipRegion( CoordinateMode = CoordDevice ) const;
+    void	setClipRect( const TQRect &, CoordinateMode = CoordDevice );	// set clip rectangle
+    void	setClipRect( int x, int y, int w, int h, CoordinateMode = CoordDevice );
+    void	setClipRegion( const TQRegion &, CoordinateMode = CoordDevice );// set clip region
+
+  // Graphics drawing functions
+
+    void	drawPoint( int x, int y );
+    void	drawPoint( const TQPoint & );
+    void	drawPoints( const TQPointArray& a,
+			    int index=0, int npoints=-1 );
+    void	moveTo( int x, int y );
+    void	moveTo( const TQPoint & );
+    void	lineTo( int x, int y );
+    void	lineTo( const TQPoint & );
+    void	drawLine( int x1, int y1, int x2, int y2 );
+    void	drawLine( const TQPoint &, const TQPoint & );
+    void	drawRect( int x, int y, int w, int h );
+    void	drawRect( const TQRect & );
+    void	drawWinFocusRect( int x, int y, int w, int h );
+    void	drawWinFocusRect( int x, int y, int w, int h,
+				  const TQColor &bgColor );
+    void	drawWinFocusRect( const TQRect & );
+    void	drawWinFocusRect( const TQRect &,
+				  const TQColor &bgColor );
+    void	drawRoundRect( int x, int y, int w, int h, int = 25, int = 25 );
+    void	drawRoundRect( const TQRect &, int = 25, int = 25 );
+    void	drawEllipse( int x, int y, int w, int h );
+    void	drawEllipse( const TQRect & );
+    void	drawArc( int x, int y, int w, int h, int a, int alen );
+    void	drawArc( const TQRect &, int a, int alen );
+    void	drawPie( int x, int y, int w, int h, int a, int alen );
+    void	drawPie( const TQRect &, int a, int alen );
+    void	drawChord( int x, int y, int w, int h, int a, int alen );
+    void	drawChord( const TQRect &, int a, int alen );
+    void	drawLineSegments( const TQPointArray &,
+				  int index=0, int nlines=-1 );
+    void	drawPolyline( const TQPointArray &,
+			      int index=0, int npoints=-1 );
+    void	drawPolygon( const TQPointArray &, bool winding=FALSE,
+			     int index=0, int npoints=-1 );
+    void	drawConvexPolygon( const TQPointArray &,
+			     int index=0, int npoints=-1 );
+#ifndef QT_NO_BEZIER
+    void	drawCubicBezier( const TQPointArray &, int index=0 );
+#endif
+    void	drawPixmap( int x, int y, const TQPixmap &,
+			    int sx=0, int sy=0, int sw=-1, int sh=-1 );
+    void	drawPixmap( const TQPoint &, const TQPixmap &,
+			    const TQRect &sr );
+    void	drawPixmap( const TQPoint &, const TQPixmap & );
+    void	drawPixmap( const TQRect &, const TQPixmap & );
+    void	drawImage( int x, int y, const TQImage &,
+			   int sx = 0, int sy = 0, int sw = -1, int sh = -1,
+			   int conversionFlags = 0 );
+    void	drawImage( const TQPoint &, const TQImage &,
+			   const TQRect &sr, int conversionFlags = 0 );
+    void	drawImage( const TQPoint &, const TQImage &,
+			   int conversion_flags = 0 );
+    void	drawImage( const TQRect &, const TQImage & );
+    void	drawTiledPixmap( int x, int y, int w, int h, const TQPixmap &,
+				 int sx=0, int sy=0 );
+    void	drawTiledPixmap( const TQRect &, const TQPixmap &,
+				 const TQPoint & );
+    void	drawTiledPixmap( const TQRect &, const TQPixmap & );
+#ifndef QT_NO_PICTURE
+    void	drawPicture( const TQPicture & );
+    void	drawPicture( int x, int y, const TQPicture & );
+    void	drawPicture( const TQPoint &, const TQPicture & );
+#endif
+
+    void	fillRect( int x, int y, int w, int h, const TQBrush & );
+    void	fillRect( const TQRect &, const TQBrush & );
+    void	eraseRect( int x, int y, int w, int h );
+    void	eraseRect( const TQRect & );
+
+  // Text drawing functions
+
+    enum TextDirection {
+	Auto,
+	RTL,
+	LTR
+    };
+
+    void	drawText( int x, int y, const TQString &, int len = -1, TextDirection dir = Auto );
+    void	drawText( const TQPoint &, const TQString &, int len = -1, TextDirection dir = Auto );
+
+    void     drawText( int x, int y, const TQString &, int pos, int len, TextDirection dir = Auto );
+    void     drawText( const TQPoint &p, const TQString &, int pos, int len, TextDirection dir = Auto );
+
+    void	drawText( int x, int y, int w, int h, int flags,
+			  const TQString&, int len = -1, TQRect *br=0,
+			  TQTextParag **intern=0 );
+    void	drawText( const TQRect &, int flags,
+			  const TQString&, int len = -1, TQRect *br=0,
+			  TQTextParag **intern=0 );
+
+    void drawTextItem( int x, int y, const TQTextItem &ti, int textflags = 0 );
+    void drawTextItem( const TQPoint& p, const TQTextItem &ti, int textflags = 0 );
+
+    TQRect	boundingRect( int x, int y, int w, int h, int flags,
+			      const TQString&, int len = -1, TQTextParag **intern=0 );
+    TQRect	boundingRect( const TQRect &, int flags,
+			      const TQString&, int len = -1, TQTextParag **intern=0 );
+
+    int		tabStops() const;
+    void	setTabStops( int );
+    int	       *tabArray() const;
+    void	setTabArray( int * );
+
+    // Other functions
+
+#if defined(Q_WS_WIN)
+    HDC		handle() const;
+#elif defined(Q_WS_X11) || defined(Q_WS_MAC)
+    HANDLE	handle() const;
+#endif
+
+
+    static void initialize();
+    static void cleanup();
+
+private:
+    void	init();
+    void        destroy();
+    void	updateFont();
+    void	updatePen();
+    void	updateBrush();
+#ifndef QT_NO_TRANSFORMATIONS
+    void	updateXForm();
+    void	updateInvXForm();
+#endif
+    void	map( int, int, int *rx, int *ry ) const;
+    void	map( int, int, int, int, int *, int *, int *, int * ) const;
+    void	mapInv( int, int, int *, int * ) const;
+    void	mapInv( int, int, int, int, int *, int *, int *, int * ) const;
+    void	drawPolyInternal( const TQPointArray &, bool close=TRUE );
+    void	drawWinFocusRect( int x, int y, int w, int h, bool xorPaint,
+				  const TQColor &penColor );
+
+    enum { IsActive=0x01, ExtDev=0x02, IsStartingUp=0x04, NoCache=0x08,
+	   VxF=0x10, WxF=0x20, ClipOn=0x40, SafePolygon=0x80, MonoDev=0x100,
+	   DirtyFont=0x200, DirtyPen=0x400, DirtyBrush=0x800,
+	   RGBColor=0x1000, FontMet=0x2000, FontInf=0x4000, CtorBegin=0x8000,
+           UsePrivateCx = 0x10000, VolatileDC = 0x20000, TQt2Compat = 0x40000 };
+    uint	flags;
+    bool	testf( uint b ) const { return (flags&b)!=0; }
+    void	setf( uint b )	{ flags |= b; }
+    void	setf( uint b, bool v );
+    void	clearf( uint b )	{ flags &= (uint)(~b); }
+    void	fix_neg_rect( int *x, int *y, int *w, int *h );
+
+    TQPainterPrivate *d;
+    TQPaintDevice *pdev;
+    TQColor	bg_col;
+    uchar	bg_mode;
+    uchar	rop;
+    uchar	pu;
+    TQPoint	bro;
+    TQFont	cfont;
+    TQFont *pfont; 	// font used for metrics (might be different for printers)
+    TQPen	cpen;
+    TQBrush	cbrush;
+    TQRegion	crgn;
+    int		tabstops;
+    int	       *tabarray;
+    int		tabarraylen;
+    bool	block_ext;	// for temporary blocking of external devices
+
+    // Transformations
+#ifndef QT_NO_TRANSFORMATIONS
+    TQCOORD	wx, wy, ww, wh;
+    TQCOORD	vx, vy, vw, vh;
+    TQWMatrix	wxmat;
+
+    // Cached composition (and inverse) of transformations
+    TQWMatrix	xmat;
+    TQWMatrix	ixmat;
+
+
+
+    double	m11() const { return xmat.m11(); }
+    double      m12() const { return xmat.m12(); }
+    double      m21() const { return xmat.m21(); }
+    double      m22() const { return xmat.m22(); }
+    double      dx() const { return xmat.dx(); }
+    double      dy() const { return xmat.dy(); }
+    double	im11() const { return ixmat.m11(); }
+    double      im12() const { return ixmat.m12(); }
+    double      im21() const { return ixmat.m21(); }
+    double      im22() const { return ixmat.m22(); }
+    double      idx() const { return ixmat.dx(); }
+    double      idy() const { return ixmat.dy(); }
+
+    int		txop;
+    bool	txinv;
+
+#else
+    // even without transformations we still have translations
+    int		xlatex;
+    int		xlatey;
+#endif
+
+    void       *penRef;				// pen cache ref
+    void       *brushRef;			// brush cache ref
+    void       *ps_stack;
+    void       *wm_stack;
+    void	killPStack();
+
+protected:
+#ifdef Q_OS_TEMP
+    TQPoint	internalCurrentPos;
+    uint	old_pix;			// ### All win platforms in 4.0
+#endif
+#if defined(Q_WS_WIN)
+    friend class TQFontEngineWin;
+    friend class TQFontEngineBox;
+    QT_WIN_PAINTER_MEMBERS
+#elif defined(Q_WS_X11)
+    friend class TQFontEngineXLFD;
+    friend class TQFontEngineXft;
+    friend class TQFontEngineBox;
+    Display    *dpy;				// current display
+    int		scrn;				// current screen
+    TQt::HANDLE	hd;				// handle to drawable
+    TQt::HANDLE  rendhd;				// handle to Xft draw
+    GC		gc;				// graphics context (standard)
+    GC		gc_brush;			// graphics contect for brush
+    TQPoint	curPt;				// current point
+    uint	clip_serial;			// clipping serial number
+#elif defined(Q_WS_MAC)
+    TQt::HANDLE	hd;				// handle to drawable
+    void initPaintDevice(bool force=FALSE, TQPoint *off=NULL, TQRegion *rgn=NULL);
+    friend const TQRegion &qt_mac_update_painter(TQPainter *, bool);
+    friend class TQFontEngineMac;
+    friend class TQMacPainter;
+#elif defined(Q_WS_QWS)
+    friend class TQFontEngine;
+    TQGfx * gfx;
+    friend void qwsUpdateActivePainters();
+#endif
+    friend class TQFontMetrics;
+    friend class TQFontInfo;
+    friend class TQTextLayout;
+    friend void qt_format_text( const TQFont &, const TQRect &r,
+		     int tf, const TQString& str, int len, TQRect *brect,
+		     int tabstops, int* tabarray, int tabarraylen,
+		     TQTextParag **internal, TQPainter* painter );
+    friend void qt_draw_background( TQPainter *p, int x, int y, int w,  int h );
+    friend void qt_draw_transformed_rect( TQPainter *p,  int x, int y, int w,  int h, bool fill );
+    friend class TQPrinter;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQPainter( const TQPainter & );
+    TQPainter &operator=( const TQPainter & );
+#endif
+
+    enum TransformationCodes {
+	TxNone      = 0,		// transformation codes
+	TxTranslate = 1,		// copy in qpainter_*.cpp
+	TxScale     = 2,
+	TxRotShear  = 3
+    };
+};
+
+
+/*****************************************************************************
+  TQPainter member functions
+ *****************************************************************************/
+
+inline TQPaintDevice *TQPainter::device() const
+{
+    return pdev;
+}
+
+inline bool TQPainter::isActive() const
+{
+    return testf(IsActive);
+}
+
+inline const TQFont &TQPainter::font() const
+{
+    return cfont;
+}
+
+inline const TQPen &TQPainter::pen() const
+{
+    return cpen;
+}
+
+inline const TQBrush &TQPainter::brush() const
+{
+    return cbrush;
+}
+
+/*
+inline PaintUnit TQPainter::unit() const
+{
+    return (PaintUnit)pu;
+}
+*/
+
+inline const TQColor &TQPainter::backgroundColor() const
+{
+    return bg_col;
+}
+
+inline TQt::BGMode TQPainter::backgroundMode() const
+{
+    return (BGMode)bg_mode;
+}
+
+inline TQt::RasterOp TQPainter::rasterOp() const
+{
+    return (RasterOp)rop;
+}
+
+inline const TQPoint &TQPainter::brushOrigin() const
+{
+    return bro;
+}
+
+inline bool TQPainter::hasViewXForm() const
+{
+#ifndef QT_NO_TRANSFORMATIONS
+    return testf(VxF);
+#else
+    return xlatex || xlatey;
+#endif
+}
+
+inline bool TQPainter::hasWorldXForm() const
+{
+#ifndef QT_NO_TRANSFORMATIONS
+    return testf(WxF);
+#else
+    return xlatex || xlatey;
+#endif
+}
+
+inline double TQPainter::translationX() const
+{
+#ifndef QT_NO_TRANSFORMATIONS
+    return worldMatrix().dx();
+#else
+    return xlatex;
+#endif
+}
+
+inline double TQPainter::translationY() const
+{
+#ifndef QT_NO_TRANSFORMATIONS
+    return worldMatrix().dy();
+#else
+    return xlatey;
+#endif
+}
+
+
+inline bool TQPainter::hasClipping() const
+{
+    return testf(ClipOn);
+}
+
+inline int TQPainter::tabStops() const
+{
+    return tabstops;
+}
+
+inline int *TQPainter::tabArray() const
+{
+    return tabarray;
+}
+
+#if defined(Q_WS_WIN)
+inline HDC TQPainter::handle() const
+{
+    return hdc;
+}
+#elif defined(Q_WS_X11) || defined(Q_WS_MAC)
+inline TQt::HANDLE TQPainter::handle() const
+{
+    return hd;
+}
+#endif
+
+inline void TQPainter::setBrushOrigin( const TQPoint &p )
+{
+    setBrushOrigin( p.x(), p.y() );
+}
+
+#ifndef QT_NO_TRANSFORMATIONS
+inline void TQPainter::setWindow( const TQRect &r )
+{
+    setWindow( r.x(), r.y(), r.width(), r.height() );
+}
+
+inline void TQPainter::setViewport( const TQRect &r )
+{
+    setViewport( r.x(), r.y(), r.width(), r.height() );
+}
+#endif
+
+inline void TQPainter::setClipRect( int x, int y, int w, int h, CoordinateMode m )
+{
+    setClipRect( TQRect(x,y,w,h), m );
+}
+
+inline void TQPainter::drawPoint( const TQPoint &p )
+{
+    drawPoint( p.x(), p.y() );
+}
+
+inline void TQPainter::moveTo( const TQPoint &p )
+{
+    moveTo( p.x(), p.y() );
+}
+
+inline void TQPainter::lineTo( const TQPoint &p )
+{
+    lineTo( p.x(), p.y() );
+}
+
+inline void TQPainter::drawLine( const TQPoint &p1, const TQPoint &p2 )
+{
+    drawLine( p1.x(), p1.y(), p2.x(), p2.y() );
+}
+
+inline void TQPainter::drawRect( const TQRect &r )
+{
+    drawRect( r.x(), r.y(), r.width(), r.height() );
+}
+
+inline void TQPainter::drawWinFocusRect( const TQRect &r )
+{
+    drawWinFocusRect( r.x(), r.y(), r.width(), r.height() );
+}
+
+inline void TQPainter::drawWinFocusRect( const TQRect &r,const TQColor &penColor )
+{
+    drawWinFocusRect( r.x(), r.y(), r.width(), r.height(), penColor );
+}
+
+inline void TQPainter::drawRoundRect( const TQRect &r, int xRnd, int yRnd )
+{
+    drawRoundRect( r.x(), r.y(), r.width(), r.height(), xRnd, yRnd );
+}
+
+inline void TQPainter::drawEllipse( const TQRect &r )
+{
+    drawEllipse( r.x(), r.y(), r.width(), r.height() );
+}
+
+inline void TQPainter::drawArc( const TQRect &r, int a, int alen )
+{
+    drawArc( r.x(), r.y(), r.width(), r.height(), a, alen );
+}
+
+inline void TQPainter::drawPie( const TQRect &r, int a, int alen )
+{
+    drawPie( r.x(), r.y(), r.width(), r.height(), a, alen );
+}
+
+inline void TQPainter::drawChord( const TQRect &r, int a, int alen )
+{
+    drawChord( r.x(), r.y(), r.width(), r.height(), a, alen );
+}
+
+inline void TQPainter::drawPixmap( const TQPoint &p, const TQPixmap &pm,
+				  const TQRect &sr )
+{
+    drawPixmap( p.x(), p.y(), pm, sr.x(), sr.y(), sr.width(), sr.height() );
+}
+
+inline void TQPainter::drawImage( const TQPoint &p, const TQImage &pm,
+                                 const TQRect &sr, int conversionFlags )
+{
+    drawImage( p.x(), p.y(), pm,
+	       sr.x(), sr.y(), sr.width(), sr.height(), conversionFlags );
+}
+
+inline void TQPainter::drawTiledPixmap( const TQRect &r, const TQPixmap &pm,
+				       const TQPoint &sp )
+{
+    drawTiledPixmap( r.x(), r.y(), r.width(), r.height(), pm, sp.x(), sp.y() );
+}
+
+inline void TQPainter::drawTiledPixmap( const TQRect &r, const TQPixmap &pm )
+{
+    drawTiledPixmap( r.x(), r.y(), r.width(), r.height(), pm, 0, 0 );
+}
+
+inline void TQPainter::fillRect( const TQRect &r, const TQBrush &brush )
+{
+    fillRect( r.x(), r.y(), r.width(), r.height(), brush );
+}
+
+inline void TQPainter::eraseRect( int x, int y, int w, int h )
+{
+    fillRect( x, y, w, h, backgroundColor() );
+}
+
+inline void TQPainter::eraseRect( const TQRect &r )
+{
+    fillRect( r.x(), r.y(), r.width(), r.height(), backgroundColor() );
+}
+
+inline void TQPainter::drawText( const TQPoint &p, const TQString &s, int len, TextDirection dir )
+{
+    drawText( p.x(), p.y(), s, 0, len, dir );
+}
+
+inline void TQPainter::drawText( const TQPoint &p, const TQString &s, int pos, int len, TextDirection dir )
+{
+    drawText( p.x(), p.y(), s, pos, len, dir );
+}
+
+inline void TQPainter::drawText( int x, int y, int w, int h, int tf,
+				const TQString& str, int len, TQRect *br, TQTextParag **i )
+{
+    TQRect r(x, y, w, h);
+    drawText( r, tf, str, len, br, i );
+}
+
+inline void TQPainter::drawTextItem( const TQPoint& p, const TQTextItem &ti, int textflags )
+{
+    drawTextItem( p.x(), p.y(), ti, textflags );
+}
+
+inline TQRect TQPainter::boundingRect( int x, int y, int w, int h, int tf,
+				     const TQString& str, int len, TQTextParag **i )
+{
+    TQRect r(x, y, w, h);
+    return boundingRect( r, tf, str, len, i );
+}
+
+#if defined(Q_WS_QWS)
+inline TQGfx * TQPainter::internalGfx()
+{
+    return gfx;
+}
+#endif
+
+#endif // TQPAINTER_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpainter-members.html b/doc/html/qpainter-members.html new file mode 100644 index 00000000..dc5352d4 --- /dev/null +++ b/doc/html/qpainter-members.html @@ -0,0 +1,127 @@ + + + + + +TQPainter Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPainter

+ +

This is the complete list of member functions for +TQPainter, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpainter.html b/doc/html/qpainter.html new file mode 100644 index 00000000..003f8ee6 --- /dev/null +++ b/doc/html/qpainter.html @@ -0,0 +1,1626 @@ + + + + + +TQPainter Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPainter Class Reference

+ +

The TQPainter class does low-level painting e.g. on widgets. +More... +

#include <qpainter.h> +

Inherits TQt. +

Inherited by TQDirectPainter. +

List of all member functions. +

Public Members

+
    +
  • enum CoordinateMode { CoordDevice, CoordPainter }
  • +
  • TQPainter ()
  • +
  • TQPainter ( const TQPaintDevice * pd, bool unclipped = FALSE )
  • +
  • TQPainter ( const TQPaintDevice * pd, const TQWidget * copyAttributes, bool unclipped = FALSE )
  • +
  • ~TQPainter ()
  • +
  • bool begin ( const TQPaintDevice * pd, bool unclipped = FALSE )
  • +
  • bool begin ( const TQPaintDevice * pd, const TQWidget * copyAttributes, bool unclipped = FALSE )
  • +
  • bool end ()
  • +
  • TQPaintDevice * device () const
  • +
  • bool isActive () const
  • +
  • void flush ( const TQRegion & region, CoordinateMode cm = CoordDevice )
  • +
  • void flush ()
  • +
  • void save ()
  • +
  • void restore ()
  • +
  • TQFontMetrics fontMetrics () const
  • +
  • TQFontInfo fontInfo () const
  • +
  • const TQFont & font () const
  • +
  • void setFont ( const TQFont & font )
  • +
  • const TQPen & pen () const
  • +
  • void setPen ( const TQPen & pen )
  • +
  • void setPen ( PenStyle style )
  • +
  • void setPen ( const TQColor & color )
  • +
  • const TQBrush & brush () const
  • +
  • void setBrush ( const TQBrush & brush )
  • +
  • void setBrush ( BrushStyle style )
  • +
  • void setBrush ( const TQColor & color )
  • +
  • TQPoint pos () const  (obsolete)
  • +
  • const TQColor & backgroundColor () const
  • +
  • void setBackgroundColor ( const TQColor & c )
  • +
  • BGMode backgroundMode () const
  • +
  • void setBackgroundMode ( BGMode m )
  • +
  • RasterOp rasterOp () const
  • +
  • void setRasterOp ( RasterOp r )
  • +
  • const TQPoint & brushOrigin () const
  • +
  • void setBrushOrigin ( int x, int y )
  • +
  • void setBrushOrigin ( const TQPoint & p )
  • +
  • bool hasViewXForm () const
  • +
  • bool hasWorldXForm () const
  • +
  • void setViewXForm ( bool enable )
  • +
  • TQRect window () const
  • +
  • void setWindow ( const TQRect & r )
  • +
  • void setWindow ( int x, int y, int w, int h )
  • +
  • TQRect viewport () const
  • +
  • void setViewport ( const TQRect & r )
  • +
  • void setViewport ( int x, int y, int w, int h )
  • +
  • void setWorldXForm ( bool enable )
  • +
  • const TQWMatrix & worldMatrix () const
  • +
  • void setWorldMatrix ( const TQWMatrix & m, bool combine = FALSE )
  • +
  • void saveWorldMatrix ()  (obsolete)
  • +
  • void restoreWorldMatrix ()  (obsolete)
  • +
  • void scale ( double sx, double sy )
  • +
  • void shear ( double sh, double sv )
  • +
  • void rotate ( double a )
  • +
  • void translate ( double dx, double dy )
  • +
  • void resetXForm ()
  • +
  • TQPoint xForm ( const TQPoint & pv ) const
  • +
  • TQRect xForm ( const TQRect & rv ) const
  • +
  • TQPointArray xForm ( const TQPointArray & av ) const
  • +
  • TQPointArray xForm ( const TQPointArray & av, int index, int npoints ) const
  • +
  • TQPoint xFormDev ( const TQPoint & pd ) const
  • +
  • TQRect xFormDev ( const TQRect & rd ) const
  • +
  • TQPointArray xFormDev ( const TQPointArray & ad ) const
  • +
  • TQPointArray xFormDev ( const TQPointArray & ad, int index, int npoints ) const
  • +
  • void setClipping ( bool enable )
  • +
  • bool hasClipping () const
  • +
  • TQRegion clipRegion ( CoordinateMode m = CoordDevice ) const
  • +
  • void setClipRect ( const TQRect & r, CoordinateMode m = CoordDevice )
  • +
  • void setClipRect ( int x, int y, int w, int h, CoordinateMode m = CoordDevice )
  • +
  • void setClipRegion ( const TQRegion & rgn, CoordinateMode m = CoordDevice )
  • +
  • void drawPoint ( int x, int y )
  • +
  • void drawPoint ( const TQPoint & p )
  • +
  • void drawPoints ( const TQPointArray & a, int index = 0, int npoints = -1 )
  • +
  • void moveTo ( int x, int y )  (obsolete)
  • +
  • void moveTo ( const TQPoint & p )  (obsolete)
  • +
  • void lineTo ( int x, int y )  (obsolete)
  • +
  • void lineTo ( const TQPoint & p )  (obsolete)
  • +
  • void drawLine ( int x1, int y1, int x2, int y2 )
  • +
  • void drawLine ( const TQPoint & p1, const TQPoint & p2 )
  • +
  • void drawRect ( int x, int y, int w, int h )
  • +
  • void drawRect ( const TQRect & r )
  • +
  • void drawWinFocusRect ( int x, int y, int w, int h )
  • +
  • void drawWinFocusRect ( int x, int y, int w, int h, const TQColor & bgColor )
  • +
  • void drawWinFocusRect ( const TQRect & r )
  • +
  • void drawWinFocusRect ( const TQRect & r, const TQColor & bgColor )
  • +
  • void drawRoundRect ( int x, int y, int w, int h, int xRnd = 25, int yRnd = 25 )
  • +
  • void drawRoundRect ( const TQRect & r, int xRnd = 25, int yRnd = 25 )
  • +
  • void drawEllipse ( int x, int y, int w, int h )
  • +
  • void drawEllipse ( const TQRect & r )
  • +
  • void drawArc ( int x, int y, int w, int h, int a, int alen )
  • +
  • void drawArc ( const TQRect & r, int a, int alen )
  • +
  • void drawPie ( int x, int y, int w, int h, int a, int alen )
  • +
  • void drawPie ( const TQRect & r, int a, int alen )
  • +
  • void drawChord ( int x, int y, int w, int h, int a, int alen )
  • +
  • void drawChord ( const TQRect & r, int a, int alen )
  • +
  • void drawLineSegments ( const TQPointArray & a, int index = 0, int nlines = -1 )
  • +
  • void drawPolyline ( const TQPointArray & a, int index = 0, int npoints = -1 )
  • +
  • void drawPolygon ( const TQPointArray & a, bool winding = FALSE, int index = 0, int npoints = -1 )
  • +
  • void drawConvexPolygon ( const TQPointArray & pa, int index = 0, int npoints = -1 )
  • +
  • void drawCubicBezier ( const TQPointArray & a, int index = 0 )
  • +
  • void drawPixmap ( int x, int y, const TQPixmap & pixmap, int sx = 0, int sy = 0, int sw = -1, int sh = -1 )
  • +
  • void drawPixmap ( const TQPoint & p, const TQPixmap & pm, const TQRect & sr )
  • +
  • void drawPixmap ( const TQPoint & p, const TQPixmap & pm )
  • +
  • void drawPixmap ( const TQRect & r, const TQPixmap & pm )
  • +
  • void drawImage ( int x, int y, const TQImage & image, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0 )
  • +
  • void drawImage ( const TQPoint &, const TQImage &, const TQRect & sr, int conversionFlags = 0 )
  • +
  • void drawImage ( const TQPoint & p, const TQImage & i, int conversion_flags = 0 )
  • +
  • void drawImage ( const TQRect & r, const TQImage & i )
  • +
  • void drawTiledPixmap ( int x, int y, int w, int h, const TQPixmap & pixmap, int sx = 0, int sy = 0 )
  • +
  • void drawTiledPixmap ( const TQRect & r, const TQPixmap & pm, const TQPoint & sp )
  • +
  • void drawTiledPixmap ( const TQRect & r, const TQPixmap & pm )
  • +
  • void drawPicture ( const TQPicture & pic )  (obsolete)
  • +
  • void drawPicture ( int x, int y, const TQPicture & pic )
  • +
  • void drawPicture ( const TQPoint & p, const TQPicture & pic )
  • +
  • void fillRect ( int x, int y, int w, int h, const TQBrush & brush )
  • +
  • void fillRect ( const TQRect & r, const TQBrush & brush )
  • +
  • void eraseRect ( int x, int y, int w, int h )
  • +
  • void eraseRect ( const TQRect & r )
  • +
  • enum TextDirection { Auto, RTL, LTR }
  • +
  • void drawText ( int x, int y, const TQString &, int len = -1, TextDirection dir = Auto )
  • +
  • void drawText ( const TQPoint &, const TQString &, int len = -1, TextDirection dir = Auto )
  • +
  • void drawText ( int x, int y, const TQString &, int pos, int len, TextDirection dir = Auto )
  • +
  • void drawText ( const TQPoint & p, const TQString &, int pos, int len, TextDirection dir = Auto )
  • +
  • void drawText ( int x, int y, int w, int h, int flags, const TQString &, int len = -1, TQRect * br = 0, TQTextParag ** internal = 0 )
  • +
  • void drawText ( const TQRect & r, int tf, const TQString & str, int len = -1, TQRect * brect = 0, TQTextParag ** internal = 0 )
  • +
  • TQRect boundingRect ( int x, int y, int w, int h, int flags, const TQString &, int len = -1, TQTextParag ** intern = 0 )
  • +
  • TQRect boundingRect ( const TQRect & r, int flags, const TQString & str, int len = -1, TQTextParag ** internal = 0 )
  • +
  • int tabStops () const
  • +
  • void setTabStops ( int ts )
  • +
  • int * tabArray () const
  • +
  • void setTabArray ( int * ta )
  • +
  • HDC handle () const
  • +
+

Static Public Members

+
    +
  • void redirect ( TQPaintDevice * pdev, TQPaintDevice * replacement )
  • +
+

Related Functions

+
    +
  • void qDrawShadeLine ( TQPainter * p, int x1, int y1, int x2, int y2, const TQColorGroup & g, bool sunken, int lineWidth, int midLineWidth )
  • +
  • void qDrawShadeRect ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool sunken, int lineWidth, int midLineWidth, const TQBrush * fill )
  • +
  • void qDrawShadePanel ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool sunken, int lineWidth, const TQBrush * fill )
  • +
  • void qDrawWinButton ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool sunken, const TQBrush * fill )
  • +
  • void qDrawWinPanel ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool sunken, const TQBrush * fill )
  • +
  • void qDrawPlainRect ( TQPainter * p, int x, int y, int w, int h, const TQColor & c, int lineWidth, const TQBrush * fill )
  • +
+

Detailed Description

+ + +The TQPainter class does low-level painting e.g. on widgets. +

+ + +

The painter provides highly optimized functions to do most of the +drawing GUI programs retquire. TQPainter can draw everything from +simple lines to complex shapes like pies and chords. It can also +draw aligned text and pixmaps. Normally, it draws in a "natural" +coordinate system, but it can also do view and world +transformation. +

The typical use of a painter is: +

    +
  • Construct a painter. +
  • Set a pen, a brush etc. +
  • Draw. +
  • Destroy the painter. +
+

Mostly, all this is done inside a paint event. (In fact, 99% of +all TQPainter use is in a reimplementation of +TQWidget::paintEvent(), and the painter is heavily optimized for +such use.) Here's one very simple example: +

+    void SimpleExampleWidget::paintEvent()
+    {
+        TQPainter paint( this );
+        paint.setPen( TQt::blue );
+        paint.drawText( rect(), AlignCenter, "The Text" );
+    }
+    
+ +

Usage is simple, and there are many settings you can use: +

    +

  • font() is the currently set font. If you set a font that isn't +available, TQt finds a close match. In fact font() returns what +you set using setFont() and fontInfo() returns the font actually +being used (which may be the same). +

  • brush() is the currently set brush; the color or pattern that's +used for filling e.g. circles. +

  • pen() is the currently set pen; the color or stipple that's +used for drawing lines or boundaries. +

  • backgroundMode() is Opaque or Transparent, i.e. whether +backgroundColor() is used or not. +

  • backgroundColor() only applies when backgroundMode() is Opaque +and pen() is a stipple. In that case, it describes the color of +the background pixels in the stipple. +

  • rasterOp() is how pixels drawn interact with the pixels already +there. +

  • brushOrigin() is the origin of the tiled brushes, normally the +origin of the window. +

  • viewport(), window(), worldMatrix() and many more make up the +painter's coordinate transformation system. See The Coordinate System for an explanation of +this, or see below for a very brief overview of the functions. +

  • hasClipping() is whether the painter clips at all. (The paint +device clips, too.) If the painter clips, it clips to clipRegion(). +

  • pos() is the current position, set by moveTo() and used by +lineTo(). +

+

Note that some of these settings mirror settings in some paint +devices, e.g. TQWidget::font(). TQPainter::begin() (or the TQPainter +constructor) copies these attributes from the paint device. +Calling, for example, TQWidget::setFont() doesn't take effect until +the next time a painter begins painting on it. +

save() saves all of these settings on an internal stack, restore() +pops them back. +

The core functionality of TQPainter is drawing, and there are +functions to draw most primitives: drawPoint(), drawPoints(), +drawLine(), drawRect(), drawWinFocusRect(), drawRoundRect(), +drawEllipse(), drawArc(), drawPie(), drawChord(), +drawLineSegments(), drawPolyline(), drawPolygon(), +drawConvexPolygon() and drawCubicBezier(). All of these functions +take integer coordinates; there are no floating-point versions +since we want drawing to be as fast as possible. +

There are functions to draw pixmaps/images, namely drawPixmap(), +drawImage() and drawTiledPixmap(). drawPixmap() and drawImage() +produce the same result, except that drawPixmap() is faster +on-screen and drawImage() faster and sometimes better on TQPrinter +and TQPicture. +

Text drawing is done using drawText(), and when you need +fine-grained positioning, boundingRect() tells you where a given +drawText() command would draw. +

There is a drawPicture() function that draws the contents of an +entire TQPicture using this painter. drawPicture() is the only +function that disregards all the painter's settings: the TQPicture +has its own settings. +

Normally, the TQPainter operates on the device's own coordinate +system (usually pixels), but TQPainter has good support for +coordinate transformation. See The Coordinate + System for a more general overview and a simple example. +

The most common functions used are scale(), rotate(), translate() +and shear(), all of which operate on the worldMatrix(). +setWorldMatrix() can replace or add to the currently set +worldMatrix(). +

setViewport() sets the rectangle on which TQPainter operates. The +default is the entire device, which is usually fine, except on +printers. setWindow() sets the coordinate system, that is, the +rectangle that maps to viewport(). What's drawn inside the +window() ends up being inside the viewport(). The window's +default is the same as the viewport, and if you don't use the +transformations, they are optimized away, gaining another little +bit of speed. +

After all the coordinate transformation is done, TQPainter can clip +the drawing to an arbitrary rectangle or region. hasClipping() is +TRUE if TQPainter clips, and clipRegion() returns the clip region. +You can set it using either setClipRegion() or setClipRect(). +Note that the clipping can be slow. It's all system-dependent, +but as a rule of thumb, you can assume that drawing speed is +inversely proportional to the number of rectangles in the clip +region. +

After TQPainter's clipping, the paint device may also clip. For +example, most widgets clip away the pixels used by child widgets, +and most printers clip away an area near the edges of the paper. +This additional clipping is not reflected by the return value of +clipRegion() or hasClipping(). +

TQPainter also includes some less-used functions that are very +useful on those occasions when they're needed. +

isActive() indicates whether the painter is active. begin() (and +the most usual constructor) makes it active. end() (and the +destructor) deactivates it. If the painter is active, device() +returns the paint device on which the painter paints. +

Sometimes it is desirable to make someone else paint on an unusual +TQPaintDevice. TQPainter supports a static function to do this, +redirect(). We recommend not using it, but for some hacks it's +perfect. +

setTabStops() and setTabArray() can change where the tab stops +are, but these are very seldomly used. +

Warning: Note that TQPainter does not attempt to work around +coordinate limitations in the underlying window system. Some +platforms may behave incorrectly with coordinates as small as ++/-4000. + +

See also TQPaintDevice, TQWidget, TQPixmap, TQPrinter, TQPicture, Application Walkthrough, Coordinate System Overview, Graphics Classes, and Image Processing Classes. + +


Member Type Documentation

+

TQPainter::CoordinateMode

+ +
    +
  • TQPainter::CoordDevice +
  • TQPainter::CoordPainter +

See also clipRegion(). + +

TQPainter::TextDirection

+ +
    +
  • TQPainter::Auto +
  • TQPainter::RTL - right to left +
  • TQPainter::LTR - left to right +

See also drawText(). + +


Member Function Documentation

+

TQPainter::TQPainter () +

+Constructs a painter. +

Notice that all painter settings (setPen, setBrush etc.) are reset +to default values when begin() is called. +

See also begin() and end(). + +

TQPainter::TQPainter ( const TQPaintDevice * pd, bool unclipped = FALSE ) +

+Constructs a painter that begins painting the paint device pd +immediately. Depending on the underlying graphic system the +painter will paint over children of the paintdevice if unclipped is TRUE. +

This constructor is convenient for short-lived painters, e.g. in a +paint event and should be used +only once. The constructor calls begin() for you and the TQPainter +destructor automatically calls end(). +

Here's an example using begin() and end(): +

+        void MyWidget::paintEvent( TQPaintEvent * )
+        {
+            TQPainter p;
+            p.begin( this );
+            p.drawLine( ... );  // drawing code
+            p.end();
+        }
+    
+ +

The same example using this constructor: +

+        void MyWidget::paintEvent( TQPaintEvent * )
+        {
+            TQPainter p( this );
+            p.drawLine( ... );  // drawing code
+        }
+    
+ +

Since the constructor cannot provide feedback when the initialization +of the painter failed you should rather use begin() and end() to paint +on external devices, e.g. printers. +

See also begin() and end(). + +

TQPainter::TQPainter ( const TQPaintDevice * pd, const TQWidget * copyAttributes, bool unclipped = FALSE ) +

+Constructs a painter that begins painting the paint device pd +immediately, with the default arguments taken from copyAttributes. The painter will paint over children of the paint +device if unclipped is TRUE (although this is not supported on +all platforms). +

See also begin(). + +

TQPainter::~TQPainter () +

+Destroys the painter. + +

const TQColor & TQPainter::backgroundColor () const +

+ +

Returns the current background color. +

See also setBackgroundColor() and TQColor. + +

BGMode TQPainter::backgroundMode () const +

+ +

Returns the current background mode. +

See also setBackgroundMode() and BGMode. + +

bool TQPainter::begin ( const TQPaintDevice * pd, bool unclipped = FALSE ) +

+Begins painting the paint device pd and returns TRUE if +successful; otherwise returns FALSE. If unclipped is TRUE, the +painting will not be clipped at the paint device's boundaries, +(although this is not supported by all platforms). +

The errors that can occur are serious problems, such as these: +

+        p->begin( 0 ); // impossible - paint device cannot be 0
+
+        TQPixmap pm( 0, 0 );
+        p->begin( pm ); // impossible - pm.isNull();
+
+        p->begin( myWidget );
+        p2->begin( myWidget ); // impossible - only one painter at a time
+    
+ +

Note that most of the time, you can use one of the constructors +instead of begin(), and that end() is automatically done at +destruction. +

Warning: A paint device can only be painted by one painter at a +time. +

See also end() and flush(). + +

Examples: aclock/aclock.cpp, desktop/desktop.cpp, drawdemo/drawdemo.cpp, hello/hello.cpp, picture/picture.cpp, t10/cannon.cpp, and xform/xform.cpp. +

bool TQPainter::begin ( const TQPaintDevice * pd, const TQWidget * copyAttributes, bool unclipped = FALSE ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This version opens the painter on a paint device pd and sets +the initial pen, background color and font from copyAttributes, +painting over the paint device's children when unclipped is +TRUE. This is equivalent to: +

+        TQPainter p;
+        p.begin( pd );
+        p.setPen( copyAttributes->foregroundColor() );
+        p.setBackgroundColor( copyAttributes->backgroundColor() );
+        p.setFont( copyAttributes->font() );
+    
+ +

This begin function is convenient for double buffering. When you +draw in a pixmap instead of directly in a widget (to later bitBlt +the pixmap into the widget) you will need to set the widget's +font etc. This function does exactly that. +

Example: +

+        void MyWidget::paintEvent( TQPaintEvent * )
+        {
+            TQPixmap pm(size());
+            TQPainter p;
+            p.begin(&pm, this);
+            // ... potentially flickering paint operation ...
+            p.end();
+            bitBlt(this, 0, 0, &pm);
+        }
+    
+ +

See also end(). + +

TQRect TQPainter::boundingRect ( int x, int y, int w, int h, int flags, const TQString &, int len = -1, TQTextParag ** intern = 0 ) +

+ +

Returns the bounding rectangle of the aligned text that would be +printed with the corresponding drawText() function using the first +len characters of the string if len is > -1, or the whole of +the string if len is -1. The drawing, and hence the bounding +rectangle, is constrained to the rectangle that begins at point (x, y) with width w and hight h, or to the +rectangle retquired to draw the text, whichever is the larger. +

The flags argument is +the bitwise OR of the following flags: +

+
Flag Meaning +
AlignAuto aligns according to the language, usually left. +
AlignLeft aligns to the left border. +
AlignRight aligns to the right border. +
AlignHCenter aligns horizontally centered. +
AlignTop aligns to the top border. +
AlignBottom aligns to the bottom border. +
AlignVCenter aligns vertically centered. +
AlignCenter (== AlignHCenter | AlignVCenter). +
SingleLine ignores newline characters in the text. +
ExpandTabs expands tabs. +
ShowPrefix interprets "&x" as "x". +
WordBreak breaks the text to fit the rectangle. +
+

Horizontal alignment defaults to AlignLeft and vertical +alignment defaults to AlignTop. +

If several of the horizontal or several of the vertical alignment flags +are set, the resulting alignment is undefined. +

The intern parameter should not be used. +

See also TQt::TextFlags. + +

TQRect TQPainter::boundingRect ( const TQRect & r, int flags, const TQString & str, int len = -1, TQTextParag ** internal = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the bounding rectangle of the aligned text that would be +printed with the corresponding drawText() function using the first +len characters from str if len is > -1, or the whole of +str if len is -1. The drawing, and hence the bounding +rectangle, is constrained to the rectangle r, or to the +rectangle retquired to draw the text, whichever is the larger. +

The internal parameter should not be used. +

See also drawText(), fontMetrics(), TQFontMetrics::boundingRect(), and TQt::TextFlags. + +

const TQBrush & TQPainter::brush () const +

+ +

Returns the painter's current brush. +

See also TQPainter::setBrush(). + +

Examples: themes/metal.cpp and themes/wood.cpp. +

const TQPoint & TQPainter::brushOrigin () const +

+ +

Returns the brush origin currently set. +

See also setBrushOrigin(). + +

TQRegion TQPainter::clipRegion ( CoordinateMode m = CoordDevice ) const +

+Returns the currently set clip region. Note that the clip region +is given in physical device coordinates and not subject to any +coordinate transformation if m is +equal to CoordDevice (the default). If m equals CoordPainter the returned region is in model coordinates. +

See also setClipRegion(), setClipRect(), setClipping(), and TQPainter::CoordinateMode. + +

Example: themes/wood.cpp. +

TQPaintDevice * TQPainter::device () const +

+ +

Returns the paint device on which this painter is currently +painting, or 0 if the painter is not active. +

See also TQPaintDevice::paintingActive(). + +

Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, listboxcombo/listboxcombo.cpp, and mdi/application.cpp. +

void TQPainter::drawArc ( int x, int y, int w, int h, int a, int alen ) +

+Draws an arc defined by the rectangle (x, y, w, h), the start +angle a and the arc length alen. +

The angles a and alen are 1/16th of a degree, i.e. a full +circle equals 5760 (16*360). Positive values of a and alen +mean counter-clockwise while negative values mean the clockwise +direction. Zero degrees is at the 3 o'clock position. +

Example: +

+        TQPainter p( myWidget );
+        p.drawArc( 10,10, 70,100, 100*16, 160*16 ); // draws a "(" arc
+    
+ +

See also drawPie() and drawChord(). + +

void TQPainter::drawArc ( const TQRect & r, int a, int alen ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the arc that fits inside the rectangle r with start angle +a and arc length alen. + +

void TQPainter::drawChord ( int x, int y, int w, int h, int a, int alen ) +

+Draws a chord defined by the rectangle (x, y, w, h), the start +angle a and the arc length alen. +

The chord is filled with the current brush(). +

The angles a and alen are 1/16th of a degree, i.e. a full +circle equals 5760 (16*360). Positive values of a and alen +mean counter-clockwise while negative values mean the clockwise +direction. Zero degrees is at the 3 o'clock position. +

See also drawArc() and drawPie(). + +

void TQPainter::drawChord ( const TQRect & r, int a, int alen ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws a chord that fits inside the rectangle r with start angle +a and arc length alen. + +

void TQPainter::drawConvexPolygon ( const TQPointArray & pa, int index = 0, int npoints = -1 ) +

+Draws the convex polygon defined by the npoints points in pa +starting at pa[index] (index defaults to 0). +

If the supplied polygon is not convex, the results are undefined. +

On some platforms (e.g. X Window), this is faster than +drawPolygon(). +

Warning: On X11, coordinates that do not fit into 16-bit signed +values are truncated. This limitation is expected to go away in +TQt 4. + +

Example: aclock/aclock.cpp. +

void TQPainter::drawCubicBezier ( const TQPointArray & a, int index = 0 ) +

+Draws a cubic Bezier curve defined by the control points in a, +starting at a[index] (index defaults to 0). +

Control points after a[index + 3] are ignored. Nothing happens +if there aren't enough control points. +

Warning: On X11, coordinates that do not fit into 16-bit signed +values are truncated. This limitation is expected to go away in +TQt 4. + +

void TQPainter::drawEllipse ( int x, int y, int w, int h ) +

+Draws an ellipse with center at (x + w/2, y + h/2) and size (w, h). + +

Examples: drawdemo/drawdemo.cpp, multiple/ax2.h, picture/picture.cpp, and tictac/tictac.cpp. +

void TQPainter::drawEllipse ( const TQRect & r ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the ellipse that fits inside rectangle r. + +

void TQPainter::drawImage ( int x, int y, const TQImage & image, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0 ) +

+Draws at (x, y) the sw by sh area of pixels from (sx, sy) in image, using conversionFlags if the image +needs to be converted to a pixmap. The default value for conversionFlags is 0; see convertFromImage() for information about +what other values do. +

This function may convert image to a pixmap and then draw it, +if device() is a TQPixmap or a TQWidget, or else draw it directly, +if device() is a TQPrinter or TQPicture. +

Currently alpha masks of the image are ignored when painting on a TQPrinter. +

See also drawPixmap() and TQPixmap::convertFromImage(). + +

Example: canvas/canvas.cpp. +

void TQPainter::drawImage ( const TQPoint &, const TQImage &, const TQRect & sr, int conversionFlags = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the rectangle sr from the image at the given point. + +

void TQPainter::drawImage ( const TQPoint & p, const TQImage & i, int conversion_flags = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the image i at point p. +

If the image needs to be modified to fit in a lower-resolution +result (e.g. converting from 32-bit to 8-bit), use the conversion_flags to specify how you'd prefer this to happen. +

See also TQt::ImageConversionFlags. + +

void TQPainter::drawImage ( const TQRect & r, const TQImage & i ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the image i into the rectangle r. The image will be +scaled to fit the rectangle if image and rectangle dimensions +differ. + +

void TQPainter::drawLine ( int x1, int y1, int x2, int y2 ) +

+Draws a line from (x1, y1) to (x2, y2) and sets the +current pen position to (x2, y2). +

See also pen(). + +

Examples: aclock/aclock.cpp, drawlines/connect.cpp, progress/progress.cpp, splitter/splitter.cpp, themes/metal.cpp, and themes/wood.cpp. +

void TQPainter::drawLine ( const TQPoint & p1, const TQPoint & p2 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws a line from point p1 to point p2. + +

void TQPainter::drawLineSegments ( const TQPointArray & a, int index = 0, int nlines = -1 ) +

+Draws nlines separate lines from points defined in a, +starting at a[index] (index defaults to 0). If nlines is +-1 (the default) all points until the end of the array are used +(i.e. (a.size()-index)/2 lines are drawn). +

Draws the 1st line from a[index] to a[index+1]. Draws the +2nd line from a[index+2] to a[index+3] etc. +

Warning: On X11, coordinates that do not fit into 16-bit signed +values are truncated. This limitation is expected to go away in +TQt 4. +

See also drawPolyline(), drawPolygon(), and TQPen. + +

void TQPainter::drawPicture ( int x, int y, const TQPicture & pic ) +

+Replays the picture pic translated by (x, y). +

This function does exactly the same as TQPicture::play() when +called with (x, y) = (0, 0). + +

Examples: picture/picture.cpp and xform/xform.cpp. +

void TQPainter::drawPicture ( const TQPicture & pic ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Use one of the other TQPainter::drawPicture() functions with a (0, 0) +offset instead. + +

void TQPainter::drawPicture ( const TQPoint & p, const TQPicture & pic ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws picture pic at point p. + +

void TQPainter::drawPie ( int x, int y, int w, int h, int a, int alen ) +

+Draws a pie defined by the rectangle (x, y, w, h), the start +angle a and the arc length alen. +

The pie is filled with the current brush(). +

The angles a and alen are 1/16th of a degree, i.e. a full +circle equals 5760 (16*360). Positive values of a and alen +mean counter-clockwise while negative values mean the clockwise +direction. Zero degrees is at the 3 o'clock position. +

See also drawArc() and drawChord(). + +

Examples: drawdemo/drawdemo.cpp, grapher/grapher.cpp, t10/cannon.cpp, and t9/cannon.cpp. +

void TQPainter::drawPie ( const TQRect & r, int a, int alen ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws a pie segment that fits inside the rectangle r with start +angle a and arc length alen. + +

void TQPainter::drawPixmap ( int x, int y, const TQPixmap & pixmap, int sx = 0, int sy = 0, int sw = -1, int sh = -1 ) +

+Draws a pixmap at (x, y) by copying a part of pixmap into +the paint device. +

(x, y) specifies the top-left point in the paint device that is +to be drawn onto. (sx, sy) specifies the top-left point in pixmap that is to be drawn. The default is (0, 0). +

(sw, sh) specifies the size of the pixmap that is to be drawn. +The default, (-1, -1), means all the way to the bottom right of +the pixmap. +

Currently the mask of the pixmap or it's alpha channel are ignored +when painting on a TQPrinter. +

See also bitBlt() and TQPixmap::setMask(). + +

Examples: grapher/grapher.cpp, picture/picture.cpp, qdir/qdir.cpp, qmag/qmag.cpp, showimg/showimg.cpp, t10/cannon.cpp, and xform/xform.cpp. +

void TQPainter::drawPixmap ( const TQPoint & p, const TQPixmap & pm, const TQRect & sr ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the rectangle sr of pixmap pm with its origin at point +p. + +

void TQPainter::drawPixmap ( const TQPoint & p, const TQPixmap & pm ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the pixmap pm with its origin at point p. + +

void TQPainter::drawPixmap ( const TQRect & r, const TQPixmap & pm ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the pixmap pm into the rectangle r. The pixmap is +scaled to fit the rectangle, if image and rectangle size disagree. + +

void TQPainter::drawPoint ( int x, int y ) +

+Draws/plots a single point at (x, y) using the current pen. +

See also TQPen. + +

Examples: desktop/desktop.cpp and drawlines/connect.cpp. +

void TQPainter::drawPoint ( const TQPoint & p ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the point p. + +

void TQPainter::drawPoints ( const TQPointArray & a, int index = 0, int npoints = -1 ) +

+Draws/plots an array of points, a, using the current pen. +

If index is non-zero (the default is zero) only points from index are drawn. If npoints is negative (the default) the rest +of the points from index are drawn. If npoints is zero or +greater, npoints points are drawn. +

Warning: On X11, coordinates that do not fit into 16-bit signed +values are truncated. This limitation is expected to go away in +TQt 4. + +

void TQPainter::drawPolygon ( const TQPointArray & a, bool winding = FALSE, int index = 0, int npoints = -1 ) +

+Draws the polygon defined by the npoints points in a +starting at a[index]. (index defaults to 0.) +

If npoints is -1 (the default) all points until the end of the +array are used (i.e. a.size()-index line segments define the +polygon). +

The first point is always connected to the last point. +

The polygon is filled with the current brush(). If winding is +TRUE, the polygon is filled using the winding fill algorithm. If +winding is FALSE, the polygon is filled using the even-odd +(alternative) fill algorithm. +

Warning: On X11, coordinates that do not fit into 16-bit signed +values are truncated. This limitation is expected to go away in +TQt 4. +

See also drawLineSegments(), drawPolyline(), and TQPen. + +

Examples: desktop/desktop.cpp and picture/picture.cpp. +

void TQPainter::drawPolyline ( const TQPointArray & a, int index = 0, int npoints = -1 ) +

+Draws the polyline defined by the npoints points in a +starting at a[index]. (index defaults to 0.) +

If npoints is -1 (the default) all points until the end of the +array are used (i.e. a.size()-index-1 line segments are drawn). +

Warning: On X11, coordinates that do not fit into 16-bit signed +values are truncated. This limitation is expected to go away in +TQt 4. +

See also drawLineSegments(), drawPolygon(), and TQPen. + +

Examples: scribble/scribble.cpp and themes/metal.cpp. +

void TQPainter::drawRect ( int x, int y, int w, int h ) +

+Draws a rectangle with upper left corner at (x, y) and with +width w and height h. +

See also TQPen and drawRoundRect(). + +

Examples: drawdemo/drawdemo.cpp, picture/picture.cpp, t10/cannon.cpp, t11/cannon.cpp, t9/cannon.cpp, tooltip/tooltip.cpp, and trivial/trivial.cpp. +

void TQPainter::drawRect ( const TQRect & r ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the rectangle r. + +

void TQPainter::drawRoundRect ( int x, int y, int w, int h, int xRnd = 25, int yRnd = 25 ) +

+Draws a rectangle with rounded corners at (x, y), with width w and height h. +

The xRnd and yRnd arguments specify how rounded the corners +should be. 0 is angled corners, 99 is maximum roundedness. +

The width and height include all of the drawn lines. +

See also drawRect() and TQPen. + +

Examples: drawdemo/drawdemo.cpp and themes/wood.cpp. +

void TQPainter::drawRoundRect ( const TQRect & r, int xRnd = 25, int yRnd = 25 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws a rounded rectangle r, rounding to the x position xRnd +and the y position yRnd on each corner. + +

void TQPainter::drawText ( const TQPoint & p, const TQString &, int pos, int len, TextDirection dir = Auto ) +

+ +

Draws the text from position pos, at point p. If len is +-1 the entire string is drawn, otherwise just the first len +characters. The text's direction is specified by dir. +

Note that the meaning of y is not the same for the two +drawText() varieties. For overloads that take a simple x, y +pair (or a point), the y value is the text's baseline; for +overloads that take a rectangle, rect.y() is the top of the +rectangle and the text is aligned within that rectangle in +accordance with the alignment flags. +

See also TQPainter::TextDirection. + +

Examples: desktop/desktop.cpp, drawdemo/drawdemo.cpp, grapher/grapher.cpp, picture/picture.cpp, progress/progress.cpp, t8/cannon.cpp, and trivial/trivial.cpp. +

void TQPainter::drawText ( int x, int y, const TQString &, int len = -1, TextDirection dir = Auto ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the given text at position x, y. If len is -1 (the +default) all the text is drawn, otherwise the first len +characters are drawn. The text's direction is given by dir. +

See also TQPainter::TextDirection. + +

void TQPainter::drawText ( const TQPoint &, const TQString &, int len = -1, TextDirection dir = Auto ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the text at the given point. +

See also TQPainter::TextDirection. + +

void TQPainter::drawText ( int x, int y, const TQString &, int pos, int len, TextDirection dir = Auto ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the text from position pos, at point (x, y). If len is +-1 the entire string is drawn, otherwise just the first len +characters. The text's direction is specified by dir. + +

void TQPainter::drawText ( int x, int y, int w, int h, int flags, const TQString &, int len = -1, TQRect * br = 0, TQTextParag ** internal = 0 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the given text within the rectangle starting at x, y, +with width w and height h. If len is -1 (the default) all +the text is drawn, otherwise the first len characters are +drawn. The text's flags that are given in the flags parameter +are TQt::AlignmentFlags and TQt::TextFlags OR'd together. br (if not null) is set to the actual bounding rectangle of the +output. The internal parameter is for internal use only. + +

void TQPainter::drawText ( const TQRect & r, int tf, const TQString & str, int len = -1, TQRect * brect = 0, TQTextParag ** internal = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws at most len characters from str in the rectangle r. +

This function draws formatted text. The tf text format is +really of type TQt::AlignmentFlags and TQt::TextFlags OR'd +together. +

Horizontal alignment defaults to AlignAuto and vertical alignment +defaults to AlignTop. +

brect (if not null) is set to the actual bounding rectangle of +the output. internal is, yes, internal. +

See also boundingRect(). + +

void TQPainter::drawTiledPixmap ( int x, int y, int w, int h, const TQPixmap & pixmap, int sx = 0, int sy = 0 ) +

+Draws a tiled pixmap in the specified rectangle. +

(x, y) specifies the top-left point in the paint device that is +to be drawn onto; with the width and height given by w and h. (sx, sy) specifies the top-left point in pixmap that is +to be drawn. The default is (0, 0). +

Calling drawTiledPixmap() is similar to calling drawPixmap() +several times to fill (tile) an area with a pixmap, but is +potentially much more efficient depending on the underlying window +system. +

See also drawPixmap(). + +

void TQPainter::drawTiledPixmap ( const TQRect & r, const TQPixmap & pm, const TQPoint & sp ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws a tiled pixmap, pm, inside rectangle r with its origin +at point sp. + +

void TQPainter::drawTiledPixmap ( const TQRect & r, const TQPixmap & pm ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws a tiled pixmap, pm, inside rectangle r. + +

void TQPainter::drawWinFocusRect ( int x, int y, int w, int h, const TQColor & bgColor ) +

+Draws a Windows focus rectangle with upper left corner at (x, +y) and with width w and height h using a pen color that +contrasts with bgColor. +

This function draws a stippled rectangle (XOR is not used) that is +used to indicate keyboard focus (when the TQApplication::style() is +WindowStyle). +

The pen color used to draw the rectangle is either white or black +depending on the color of bgColor (see TQColor::gray()). +

Warning: This function draws nothing if the coordinate system has +been rotated or sheared. +

See also drawRect() and TQApplication::style(). + +

void TQPainter::drawWinFocusRect ( int x, int y, int w, int h ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws a Windows focus rectangle with upper left corner at (x, +y) and with width w and height h. +

This function draws a stippled XOR rectangle that is used to +indicate keyboard focus (when TQApplication::style() is WindowStyle). +

Warning: This function draws nothing if the coordinate system has +been rotated or sheared. +

See also drawRect() and TQApplication::style(). + +

void TQPainter::drawWinFocusRect ( const TQRect & r ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws rectangle r as a window focus rectangle. + +

void TQPainter::drawWinFocusRect ( const TQRect & r, const TQColor & bgColor ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws rectangle r as a window focus rectangle using background +color bgColor. + +

bool TQPainter::end () +

+Ends painting. Any resources used while painting are released. +

Note that while you mostly don't need to call end(), the +destructor will do it, there is at least one common case when it +is needed, namely double buffering. +

+        TQPainter p( myPixmap, this )
+        // ...
+        p.end(); // stops drawing on myPixmap
+        p.begin( this );
+        p.drawPixmap( 0, 0, myPixmap );
+    
+ +

Since you can't draw a TQPixmap while it is being painted, it is +necessary to close the active painter. +

See also begin() and isActive(). + +

Examples: aclock/aclock.cpp, desktop/desktop.cpp, hello/hello.cpp, picture/picture.cpp, scribble/scribble.cpp, t10/cannon.cpp, and xform/xform.cpp. +

void TQPainter::eraseRect ( int x, int y, int w, int h ) +

+ +

Erases the area inside x, y, w, h. Equivalent to +fillRect( x, y, w, h, backgroundColor() ). + +

Examples: listboxcombo/listboxcombo.cpp and showimg/showimg.cpp. +

void TQPainter::eraseRect ( const TQRect & r ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Erases the area inside the rectangle r. + +

void TQPainter::fillRect ( int x, int y, int w, int h, const TQBrush & brush ) +

+Fills the rectangle (x, y, w, h) with the brush. +

You can specify a TQColor as brush, since there is a TQBrush +constructor that takes a TQColor argument and creates a solid +pattern brush. +

See also drawRect(). + +

Examples: listboxcombo/listboxcombo.cpp, multiple/ax1.h, progress/progress.cpp, qdir/qdir.cpp, qfd/fontdisplayer.cpp, themes/metal.cpp, and themes/wood.cpp. +

void TQPainter::fillRect ( const TQRect & r, const TQBrush & brush ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Fills the rectangle r using brush brush. + +

void TQPainter::flush ( const TQRegion & region, CoordinateMode cm = CoordDevice ) +

+Flushes any buffered drawing operations inside the region region using clipping mode cm. +

The flush may update the whole device if the platform does not +support flushing to a specified region. +

See also CoordinateMode. + +

void TQPainter::flush () +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Flushes any buffered drawing operations. + +

const TQFont & TQPainter::font () const +

+ +

Returns the currently set painter font. +

See also setFont() and TQFont. + +

Example: fileiconview/qfileiconview.cpp. +

TQFontInfo TQPainter::fontInfo () const +

+Returns the font info for the painter, if the painter is active. +It is not possible to obtain font information for an inactive +painter, so the return value is undefined if the painter is not +active. +

See also fontMetrics() and isActive(). + +

TQFontMetrics TQPainter::fontMetrics () const +

+Returns the font metrics for the painter, if the painter is +active. It is not possible to obtain metrics for an inactive +painter, so the return value is undefined if the painter is not +active. +

See also fontInfo() and isActive(). + +

Examples: action/application.cpp, application/application.cpp, desktop/desktop.cpp, drawdemo/drawdemo.cpp, helpviewer/helpwindow.cpp, mdi/application.cpp, and qwerty/qwerty.cpp. +

HDC TQPainter::handle () const +

+ +

Returns the platform-dependent handle used for drawing. Using this +function is not portable. + +

bool TQPainter::hasClipping () const +

+ +

Returns TRUE if clipping has been set; otherwise returns FALSE. +

See also setClipping(). + +

Example: themes/wood.cpp. +

bool TQPainter::hasViewXForm () const +

+ +

Returns TRUE if view transformation is enabled; otherwise returns +FALSE. +

See also setViewXForm() and xForm(). + +

bool TQPainter::hasWorldXForm () const +

+ +

Returns TRUE if world transformation is enabled; otherwise returns +FALSE. +

See also setWorldXForm(). + +

bool TQPainter::isActive () const +

+ +

Returns TRUE if the painter is active painting, i.e. begin() has +been called and end() has not yet been called; otherwise returns +FALSE. +

See also TQPaintDevice::paintingActive(). + +

Examples: desktop/desktop.cpp and helpviewer/helpwindow.cpp. +

void TQPainter::lineTo ( int x, int y ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Use drawLine() instead. +

Draws a line from the current pen position to (x, y) and sets +(x, y) to be the new current pen position. +

See also TQPen, moveTo(), drawLine(), and pos(). + +

void TQPainter::lineTo ( const TQPoint & p ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws a line to the point p. + +

void TQPainter::moveTo ( int x, int y ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Sets the current pen position to (x, y) +

See also lineTo() and pos(). + +

void TQPainter::moveTo ( const TQPoint & p ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Moves to the point p. + +

const TQPen & TQPainter::pen () const +

+ +

Returns the painter's current pen. +

See also setPen(). + +

Examples: multiple/ax2.h, progress/progress.cpp, and themes/wood.cpp. +

TQPoint TQPainter::pos () const +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns the current position of the pen. +

See also moveTo(). + +

RasterOp TQPainter::rasterOp () const +

+ +

Returns the current raster operation. +

See also setRasterOp() and RasterOp. + +

void TQPainter::redirect ( TQPaintDevice * pdev, TQPaintDevice * replacement ) [static] +

+Redirects all paint commands for a paint device, pdev, to +another paint device, replacement, unless replacement is 0. +If replacement is 0, the redirection for pdev is removed. +

In general, you'll probably find calling TQPixmap::grabWidget() or +TQPixmap::grabWindow() is an easier solution. + +

void TQPainter::resetXForm () +

+Resets any transformations that were made using translate(), scale(), +shear(), rotate(), setWorldMatrix(), setViewport() and +setWindow(). +

See also worldMatrix(), viewport(), and window(). + +

void TQPainter::restore () +

+Restores the current painter state (pops a saved state off the +stack). +

See also save(). + +

Example: aclock/aclock.cpp. +

void TQPainter::restoreWorldMatrix () +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

We recommend using restore() instead. + +

void TQPainter::rotate ( double a ) +

+Rotates the coordinate system a degrees counterclockwise. +

See also translate(), scale(), shear(), resetXForm(), setWorldMatrix(), and xForm(). + +

Examples: aclock/aclock.cpp, t10/cannon.cpp, and t9/cannon.cpp. +

void TQPainter::save () +

+Saves the current painter state (pushes the state onto a stack). A +save() must be followed by a corresponding restore(). end() +unwinds the stack. +

See also restore(). + +

Example: aclock/aclock.cpp. +

void TQPainter::saveWorldMatrix () +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

We recommend using save() instead. + +

void TQPainter::scale ( double sx, double sy ) +

+Scales the coordinate system by (sx, sy). +

See also translate(), shear(), rotate(), resetXForm(), setWorldMatrix(), and xForm(). + +

Example: xform/xform.cpp. +

void TQPainter::setBackgroundColor ( const TQColor & c ) +

+Sets the background color of the painter to c. +

The background color is the color that is filled in when drawing +opaque text, stippled lines and bitmaps. The background color has +no effect in transparent background mode (which is the default). +

See also backgroundColor(), setBackgroundMode(), and BackgroundMode. + +

void TQPainter::setBackgroundMode ( BGMode m ) +

+Sets the background mode of the painter to m, which must be +either TransparentMode (the default) or OpaqueMode. +

Transparent mode draws stippled lines and text without setting the +background pixels. Opaque mode fills these space with the current +background color. +

Note that in order to draw a bitmap or pixmap transparently, you +must use TQPixmap::setMask(). +

See also backgroundMode() and setBackgroundColor(). + +

Example: picture/picture.cpp. +

void TQPainter::setBrush ( BrushStyle style ) +

+Sets the painter's brush to black color and the specified style. +

See also brush() and TQBrush. + +

Examples: aclock/aclock.cpp, drawdemo/drawdemo.cpp, picture/picture.cpp, t10/cannon.cpp, t9/cannon.cpp, themes/wood.cpp, and tooltip/tooltip.cpp. +

void TQPainter::setBrush ( const TQBrush & brush ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the painter's brush to brush. +

The brush defines how shapes are filled. +

See also brush(). + +

void TQPainter::setBrush ( const TQColor & color ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the painter's brush to have style SolidPattern and the +specified color. +

See also brush() and TQBrush. + +

void TQPainter::setBrushOrigin ( int x, int y ) +

+Sets the brush origin to (x, y). +

The brush origin specifies the (0, 0) coordinate of the painter's +brush. This setting only applies to pattern brushes and pixmap +brushes. +

See also brushOrigin(). + +

void TQPainter::setBrushOrigin ( const TQPoint & p ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the brush origin to point p. + +

void TQPainter::setClipRect ( int x, int y, int w, int h, CoordinateMode m = CoordDevice ) +

+ +

Sets the clip region to the rectangle x, y, w, h and +enables clipping. The clip mode is set to m. +

If m is CoordDevice (the default), the coordinates given for +the clip region are taken to be physical device coordinates and +are not subject to any coordinate + transformations. If m is CoordPainter, the +coordinates given for the clip region are taken to be model +coordinates. +

See also setClipRegion(), clipRegion(), setClipping(), and TQPainter::CoordinateMode. + +

Examples: grapher/grapher.cpp, progress/progress.cpp, showimg/showimg.cpp, splitter/splitter.cpp, and trivial/trivial.cpp. +

void TQPainter::setClipRect ( const TQRect & r, CoordinateMode m = CoordDevice ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the clip region to the rectangle r and enables clipping. +The clip mode is set to m. +

See also CoordinateMode. + +

void TQPainter::setClipRegion ( const TQRegion & rgn, CoordinateMode m = CoordDevice ) +

+Sets the clip region to rgn and enables clipping. The clip mode +is set to m. +

Note that the clip region is given in physical device coordinates +and not subject to any coordinate + transformation. +

See also setClipRect(), clipRegion(), setClipping(), and CoordinateMode. + +

Examples: qfd/fontdisplayer.cpp and themes/wood.cpp. +

void TQPainter::setClipping ( bool enable ) +

+Enables clipping if enable is TRUE, or disables clipping if enable is FALSE. +

See also hasClipping(), setClipRect(), and setClipRegion(). + +

Example: themes/wood.cpp. +

void TQPainter::setFont ( const TQFont & font ) +

+Sets the painter's font to font. +

This font is used by subsequent drawText() functions. The text +color is the same as the pen color. +

See also font() and drawText(). + +

Examples: drawdemo/drawdemo.cpp, grapher/grapher.cpp, hello/hello.cpp, picture/picture.cpp, qwerty/qwerty.cpp, t13/cannon.cpp, and xform/xform.cpp. +

void TQPainter::setPen ( const TQPen & pen ) +

+Sets a new painter pen. +

The pen defines how to draw lines and outlines, and it also +defines the text color. +

See also pen(). + +

Examples: desktop/desktop.cpp, drawdemo/drawdemo.cpp, multiple/ax2.h, progress/progress.cpp, t9/cannon.cpp, themes/metal.cpp, and themes/wood.cpp. +

void TQPainter::setPen ( PenStyle style ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the painter's pen to have style style, width 0 and black +color. +

See also pen() and TQPen. + +

void TQPainter::setPen ( const TQColor & color ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the painter's pen to have style SolidLine, width 0 and the +specified color. +

See also pen() and TQPen. + +

void TQPainter::setRasterOp ( RasterOp r ) +

+Sets the raster operation to r. +The default is CopyROP. +

See also rasterOp() and TQt::RasterOp. + +

void TQPainter::setTabArray ( int * ta ) +

+Sets the tab stop array to ta. This puts tab stops at ta[0], +ta[1] and so on. The array is null-terminated. +

If both a tab array and a tab top size is set, the tab array wins. +

See also tabArray(), setTabStops(), drawText(), and fontMetrics(). + +

void TQPainter::setTabStops ( int ts ) +

+Set the tab stop width to ts, i.e. locates tab stops at ts, +2*ts, 3*ts and so on. +

Tab stops are used when drawing formatted text with ExpandTabs +set. This fixed tab stop value is used only if no tab array is set +(which is the default case). +

A value of 0 (the default) implies a tabstop setting of 8 times the width of the +character 'x' in the font currently set on the painter. +

See also tabStops(), setTabArray(), drawText(), and fontMetrics(). + +

void TQPainter::setViewXForm ( bool enable ) +

+Enables view transformations if enable is TRUE, or disables +view transformations if enable is FALSE. +

See also hasViewXForm(), setWindow(), setViewport(), setWorldMatrix(), setWorldXForm(), and xForm(). + +

void TQPainter::setViewport ( int x, int y, int w, int h ) +

+Sets the viewport rectangle view transformation for the painter +and enables view transformation. +

The viewport rectangle is part of the view transformation. The +viewport specifies the device coordinate system and is specified +by the x, y, w width and h height parameters. Its +sister, the window(), specifies the logical coordinate system. +

The default viewport rectangle is the same as the device's +rectangle. See the Coordinate System Overview for an overview of coordinate transformation. +

See also viewport(), setWindow(), setViewXForm(), setWorldMatrix(), setWorldXForm(), and xForm(). + +

Example: aclock/aclock.cpp. +

void TQPainter::setViewport ( const TQRect & r ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the painter's viewport to rectangle r. + +

void TQPainter::setWindow ( int x, int y, int w, int h ) +

+Sets the window rectangle view transformation for the painter and +enables view transformation. +

The window rectangle is part of the view transformation. The +window specifies the logical coordinate system and is specified by +the x, y, w width and h height parameters. Its sister, +the viewport(), specifies the device coordinate system. +

The default window rectangle is the same as the device's +rectangle. See the Coordinate System Overview for an overview of coordinate transformation. +

See also window(), setViewport(), setViewXForm(), setWorldMatrix(), and setWorldXForm(). + +

Examples: aclock/aclock.cpp and drawdemo/drawdemo.cpp. +

void TQPainter::setWindow ( const TQRect & r ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the painter's window to rectangle r. + +

void TQPainter::setWorldMatrix ( const TQWMatrix & m, bool combine = FALSE ) +

+Sets the world transformation matrix to m and enables world +transformation. +

If combine is TRUE, then m is combined with the current +transformation matrix, otherwise m replaces the current +transformation matrix. +

If m is the identity matrix and combine is FALSE, this +function calls setWorldXForm(FALSE). (The identity matrix is the +matrix where TQWMatrix::m11() and TQWMatrix::m22() are 1.0 and the +rest are 0.0.) +

World transformations are applied after the view transformations +(i.e. window and viewport). +

The following functions can transform the coordinate system without using +a TQWMatrix: +

+

They operate on the painter's worldMatrix() and are implemented like this: +

+        void TQPainter::rotate( double a )
+        {
+            TQWMatrix m;
+            m.rotate( a );
+            setWorldMatrix( m, TRUE );
+        }
+    
+ +

Note that you should always use combine when you are drawing +into a TQPicture. Otherwise it may not be possible to replay the +picture with additional transformations. Using translate(), +scale(), etc., is safe. +

For a brief overview of coordinate transformation, see the Coordinate System Overview. +

See also worldMatrix(), setWorldXForm(), setWindow(), setViewport(), setViewXForm(), xForm(), and TQWMatrix. + +

Examples: drawdemo/drawdemo.cpp and xform/xform.cpp. +

void TQPainter::setWorldXForm ( bool enable ) +

+Enables world transformations if enable is TRUE, or disables +world transformations if enable is FALSE. The world +transformation matrix is not changed. +

See also setWorldMatrix(), setWindow(), setViewport(), setViewXForm(), and xForm(). + +

void TQPainter::shear ( double sh, double sv ) +

+Shears the coordinate system by (sh, sv). +

See also translate(), scale(), rotate(), resetXForm(), setWorldMatrix(), and xForm(). + +

int * TQPainter::tabArray () const +

+ +

Returns the currently set tab stop array. +

See also setTabArray(). + +

int TQPainter::tabStops () const +

+ +

Returns the tab stop setting. +

See also setTabStops(). + +

void TQPainter::translate ( double dx, double dy ) +

+Translates the coordinate system by (dx, dy). After this call, +(dx, dy) is added to points. +

For example, the following code draws the same point twice: +

+        void MyWidget::paintEvent()
+        {
+            TQPainter paint( this );
+
+            paint.drawPoint( 0, 0 );
+
+            paint.translate( 100.0, 40.0 );
+            paint.drawPoint( -100, -40 );
+        }
+    
+ +

See also scale(), shear(), rotate(), resetXForm(), setWorldMatrix(), and xForm(). + +

Examples: action/application.cpp, application/application.cpp, t10/cannon.cpp, t9/cannon.cpp, themes/metal.cpp, themes/wood.cpp, and xform/xform.cpp. +

TQRect TQPainter::viewport () const +

+Returns the viewport rectangle. +

See also setViewport() and setViewXForm(). + +

Example: aclock/aclock.cpp. +

TQRect TQPainter::window () const +

+Returns the window rectangle. +

See also setWindow() and setViewXForm(). + +

const TQWMatrix & TQPainter::worldMatrix () const +

+Returns the world transformation matrix. +

See also setWorldMatrix(). + +

TQPoint TQPainter::xForm ( const TQPoint & pv ) const +

+Returns the point pv transformed from model coordinates to +device coordinates. +

See also xFormDev() and TQWMatrix::map(). + +

TQRect TQPainter::xForm ( const TQRect & rv ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the rectangle rv transformed from model coordinates to +device coordinates. +

If world transformation is enabled and rotation or shearing has +been specified, then the bounding rectangle is returned. +

See also xFormDev() and TQWMatrix::map(). + +

TQPointArray TQPainter::xForm ( const TQPointArray & av ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the point array av transformed from model coordinates +to device coordinates. +

See also xFormDev() and TQWMatrix::map(). + +

TQPointArray TQPainter::xForm ( const TQPointArray & av, int index, int npoints ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the point array av transformed from model coordinates +to device coordinates. The index is the first point in the +array and npoints denotes the number of points to be +transformed. If npoints is negative, all points from av[index] until the last point in the array are transformed. +

The returned point array consists of the number of points that +were transformed. +

Example: +

+        TQPointArray a(10);
+        TQPointArray b;
+        b = painter.xForm(a, 2, 4);  // b.size() == 4
+        b = painter.xForm(a, 2, -1); // b.size() == 8
+    
+ +

See also xFormDev() and TQWMatrix::map(). + +

TQRect TQPainter::xFormDev ( const TQRect & rd ) const +

+Returns the rectangle rd transformed from device coordinates to +model coordinates. +

If world transformation is enabled and rotation or shearing is +used, then the bounding rectangle is returned. +

See also xForm() and TQWMatrix::map(). + +

TQPoint TQPainter::xFormDev ( const TQPoint & pd ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the point pd transformed from device coordinates to +model coordinates. +

See also xForm() and TQWMatrix::map(). + +

TQPointArray TQPainter::xFormDev ( const TQPointArray & ad ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the point array ad transformed from device coordinates +to model coordinates. +

See also xForm() and TQWMatrix::map(). + +

TQPointArray TQPainter::xFormDev ( const TQPointArray & ad, int index, int npoints ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the point array ad transformed from device coordinates +to model coordinates. The index is the first point in the array +and npoints denotes the number of points to be transformed. If +npoints is negative, all points from ad[index] until the +last point in the array are transformed. +

The returned point array consists of the number of points that +were transformed. +

Example: +

+        TQPointArray a(10);
+        TQPointArray b;
+        b = painter.xFormDev(a, 1, 3);  // b.size() == 3
+        b = painter.xFormDev(a, 1, -1); // b.size() == 9
+    
+ +

See also xForm() and TQWMatrix::map(). + +


Related Functions

+

void qDrawPlainRect ( TQPainter * p, int x, int y, int w, int h, const TQColor & c, int lineWidth, const TQBrush * fill ) +

+ +

#include <qdrawutil.h> +

Draws the plain rectangle specified by (x, y, w, h) +using the painter p. +

The color argument c specifies the line color. +

The lineWidth argument specifies the line width. +

The rectangle's interior is filled with the fill brush unless +fill is 0. +

If you want to use a TQFrame widget instead, you can make it +display a plain rectangle, for example TQFrame::setFrameStyle( TQFrame::Box | TQFrame::Plain ). +

Warning: This function does not look at TQWidget::style() or +TQApplication::style(). Use the drawing functions in TQStyle to make +widgets that follow the current GUI style. +

See also qDrawShadeRect() and TQStyle::drawPrimitive(). + +

void qDrawShadeLine ( TQPainter * p, int x1, int y1, int x2, int y2, const TQColorGroup & g, bool sunken, int lineWidth, int midLineWidth ) +

+ +

#include <qdrawutil.h> +

Draws a horizontal (y1 == y2) or vertical (x1 == x2) +shaded line using the painter p. +

Nothing is drawn if y1 != y2 and x1 != x2 (i.e. the +line is neither horizontal nor vertical). +

The color group argument g specifies the shading colors (light, dark and middle colors). +

The line appears sunken if sunken is TRUE, or raised if sunken is FALSE. +

The lineWidth argument specifies the line width for each of the +lines. It is not the total line width. +

The midLineWidth argument specifies the width of a middle line +drawn in the TQColorGroup::mid() color. +

If you want to use a TQFrame widget instead, you can make it +display a shaded line, for example TQFrame::setFrameStyle( TQFrame::HLine | TQFrame::Sunken ). +

Warning: This function does not look at TQWidget::style() or +TQApplication::style(). Use the drawing functions in TQStyle to make +widgets that follow the current GUI style. +

See also qDrawShadeRect(), qDrawShadePanel(), and TQStyle::drawPrimitive(). + +

void qDrawShadePanel ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool sunken, int lineWidth, const TQBrush * fill ) +

+ +

#include <qdrawutil.h> +

Draws the shaded panel specified by (x, y, w, h) using +the painter p. +

The color group argument g specifies the shading colors (light, dark and middle colors). +

The panel appears sunken if sunken is TRUE, or raised if sunken is FALSE. +

The lineWidth argument specifies the line width. +

The panel's interior is filled with the fill brush unless fill is 0. +

If you want to use a TQFrame widget instead, you can make it +display a shaded panel, for example TQFrame::setFrameStyle( TQFrame::Panel | TQFrame::Sunken ). +

Warning: This function does not look at TQWidget::style() or +TQApplication::style(). Use the drawing functions in TQStyle to make +widgets that follow the current GUI style. +

See also qDrawWinPanel(), qDrawShadeLine(), qDrawShadeRect(), and TQStyle::drawPrimitive(). + +

void qDrawShadeRect ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool sunken, int lineWidth, int midLineWidth, const TQBrush * fill ) +

+ +

#include <qdrawutil.h> +

Draws the shaded rectangle specified by (x, y, w, h) +using the painter p. +

The color group argument g specifies the shading colors (light, dark and middle colors). +

The rectangle appears sunken if sunken is TRUE, or raised if sunken is FALSE. +

The lineWidth argument specifies the line width for each of the +lines. It is not the total line width. +

The midLineWidth argument specifies the width of a middle line +drawn in the TQColorGroup::mid() color. +

The rectangle's interior is filled with the fill brush unless +fill is 0. +

If you want to use a TQFrame widget instead, you can make it +display a shaded rectangle, for example TQFrame::setFrameStyle( TQFrame::Box | TQFrame::Raised ). +

Warning: This function does not look at TQWidget::style() or +TQApplication::style(). Use the drawing functions in TQStyle to make +widgets that follow the current GUI style. +

See also qDrawShadeLine(), qDrawShadePanel(), qDrawPlainRect(), TQStyle::drawItem(), TQStyle::drawControl(), and TQStyle::drawComplexControl(). + +

void qDrawWinButton ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool sunken, const TQBrush * fill ) +

+ +

#include <qdrawutil.h> +

Draws the Windows-style button specified by (x, y, w, h) using the painter p. +

The color group argument g specifies the shading colors (light, dark and middle colors). +

The button appears sunken if sunken is TRUE, or raised if sunken is FALSE. +

The line width is 2 pixels. +

The button's interior is filled with the *fill brush unless fill is 0. +

Warning: This function does not look at TQWidget::style() or +TQApplication::style(). Use the drawing functions in TQStyle to make +widgets that follow the current GUI style. +

See also qDrawWinPanel() and TQStyle::drawControl(). + +

void qDrawWinPanel ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool sunken, const TQBrush * fill ) +

+ +

#include <qdrawutil.h> +

Draws the Windows-style panel specified by (x, y, w, h) using the painter p. +

The color group argument g specifies the shading colors. +

The panel appears sunken if sunken is TRUE, or raised if sunken is FALSE. +

The line width is 2 pixels. +

The button's interior is filled with the fill brush unless fill is 0. +

If you want to use a TQFrame widget instead, you can make it +display a shaded panel, for example TQFrame::setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ). +

Warning: This function does not look at TQWidget::style() or +TQApplication::style(). Use the drawing functions in TQStyle to make +widgets that follow the current GUI style. +

See also qDrawShadePanel(), qDrawWinButton(), and TQStyle::drawPrimitive(). + + +


+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/qpaintevent-members.html b/doc/html/qpaintevent-members.html new file mode 100644 index 00000000..45a26e42 --- /dev/null +++ b/doc/html/qpaintevent-members.html @@ -0,0 +1,52 @@ + + + + + +TQPaintEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPaintEvent

+ +

This is the complete list of member functions for +TQPaintEvent, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpaintevent.html b/doc/html/qpaintevent.html new file mode 100644 index 00000000..d32d1836 --- /dev/null +++ b/doc/html/qpaintevent.html @@ -0,0 +1,119 @@ + + + + + +TQPaintEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPaintEvent Class Reference

+ +

The TQPaintEvent class contains event parameters for paint events. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+
    +
  • TQPaintEvent ( const TQRegion & paintRegion, bool erased = TRUE )
  • +
  • TQPaintEvent ( const TQRect & paintRect, bool erased = TRUE )
  • +
  • TQPaintEvent ( const TQRegion & paintRegion, const TQRect & paintRect, bool erased = TRUE )
  • +
  • const TQRect & rect () const
  • +
  • const TQRegion & region () const
  • +
  • bool erased () const
  • +
+

Detailed Description

+ + +The TQPaintEvent class contains event parameters for paint events. +

+

Paint events are sent to widgets that need to update themselves, +for instance when part of a widget is exposed because a covering +widget is moved. +

The event contains a region() that needs to be updated, and a +rect() that is the bounding rectangle of that region. Both are +provided because many widgets can't make much use of region(), and +rect() can be much faster than region().boundingRect(). Painting +is clipped to region() during processing of a paint event. +

The erased() function returns TRUE if the region() has been +cleared to the widget's background (see +TQWidget::backgroundMode()), and FALSE if the region's contents are +arbitrary. +

See also TQPainter, TQWidget::update(), TQWidget::repaint(), TQWidget::paintEvent(), TQWidget::backgroundMode, TQRegion, and Event Classes. + +


Member Function Documentation

+

TQPaintEvent::TQPaintEvent ( const TQRegion & paintRegion, bool erased = TRUE ) +

+ +

Constructs a paint event object with the region that should be +updated. The region is given by paintRegion. If erased is +TRUE the region will be cleared before repainting. + +

TQPaintEvent::TQPaintEvent ( const TQRect & paintRect, bool erased = TRUE ) +

+ +

Constructs a paint event object with the rectangle that should be +updated. The region is also given by paintRect. If erased is +TRUE the region will be cleared before repainting. + +

TQPaintEvent::TQPaintEvent ( const TQRegion & paintRegion, const TQRect & paintRect, bool erased = TRUE ) +

+ +

Constructs a paint event object with the rectangle paintRect +that should be updated. The region is given by paintRegion. If +erased is TRUE the region will be cleared before repainting. + +

bool TQPaintEvent::erased () const +

+ +

Returns TRUE if the paint event region (or rectangle) has been +erased with the widget's background; otherwise returns FALSE. + +

const TQRect & TQPaintEvent::rect () const +

+ +

Returns the rectangle that should be updated. +

See also region() and TQPainter::setClipRect(). + +

Examples: life/life.cpp, qfd/fontdisplayer.cpp, showimg/showimg.cpp, t10/cannon.cpp, t11/cannon.cpp, t13/cannon.cpp, and tooltip/tooltip.cpp. +

const TQRegion & TQPaintEvent::region () const +

+ +

Returns the region that should be updated. +

See also rect() and TQPainter::setClipRegion(). + +

Examples: qfd/fontdisplayer.cpp and scribble/scribble.cpp. + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpair-h.html b/doc/html/qpair-h.html new file mode 100644 index 00000000..b6932614 --- /dev/null +++ b/doc/html/qpair-h.html @@ -0,0 +1,153 @@ + + + + + +qpair.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpair.h

+ +

This is the verbatim text of the qpair.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 retquirements 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 "qglobal.h"
+#include "qdatastream.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>
+Q_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>
+Q_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>
+Q_INLINE_TEMPLATES TQPair<T1, T2> qMakePair( const T1& x, const T2& y )
+{
+    return TQPair<T1, T2>( x, y );
+}
+
+#ifndef QT_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 new file mode 100644 index 00000000..5d744bcb --- /dev/null +++ b/doc/html/qpair-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/qpair.html b/doc/html/qpair.html new file mode 100644 index 00000000..f0ba765e --- /dev/null +++ b/doc/html/qpair.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 <qpair.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/qpalette-h.html b/doc/html/qpalette-h.html new file mode 100644 index 00000000..1b32455f --- /dev/null +++ b/doc/html/qpalette-h.html @@ -0,0 +1,234 @@ + + + + + +qpalette.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpalette.h

+ +

This is the verbatim text of the qpalette.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qpalette.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQColorGroup and TQPalette classes
+**
+** Created : 950323
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPALETTE_H
+#define TQPALETTE_H
+
+#ifndef QT_H
+#include "qwindowdefs.h"
+#include "qcolor.h"
+#include "qshared.h"
+#include "qbrush.h" // TQColor->TQBrush conversion
+#endif // QT_H
+
+#ifndef QT_NO_PALETTE
+
+class TQColorGroupPrivate;
+
+class Q_EXPORT TQColorGroup
+{
+public:
+    TQColorGroup();
+    TQColorGroup( const TQColor &foreground, const TQColor &button,
+		 const TQColor &light, const TQColor &dark, const TQColor &mid,
+		 const TQColor &text, const TQColor &base );
+    TQColorGroup( const TQBrush &foreground, const TQBrush &button,
+		 const TQBrush &light, const TQBrush &dark, const TQBrush &mid,
+		 const TQBrush &text, const TQBrush &bright_text,
+		 const TQBrush &base, const TQBrush &background);
+    TQColorGroup( const TQColorGroup & );
+
+   ~TQColorGroup();
+
+    TQColorGroup& operator =(const TQColorGroup&);
+
+    // Do not change the order, the serialization format depends on it
+    enum ColorRole { Foreground, Button, Light, Midlight, Dark, Mid,
+		     Text, BrightText, ButtonText, Base, Background, Shadow,
+		     Highlight, HighlightedText, Link, LinkVisited,
+		     NColorRoles };
+
+    const TQColor &color( ColorRole ) const;
+    const TQBrush &brush( ColorRole ) const;
+    void setColor( ColorRole, const TQColor & );
+    void setBrush( ColorRole, const TQBrush & );
+
+    const TQColor &foreground()	const	{ return br[Foreground].color(); }
+    const TQColor &button()	const	{ return br[Button].color(); }
+    const TQColor &light()	const	{ return br[Light].color(); }
+    const TQColor &dark()	const	{ return br[Dark].color(); }
+    const TQColor &mid()		const	{ return br[Mid].color(); }
+    const TQColor &text()	const	{ return br[Text].color(); }
+    const TQColor &base()	const	{ return br[Base].color(); }
+    const TQColor &background()	const	{ return br[Background].color(); }
+
+    const TQColor &midlight()	const	{ return br[Midlight].color(); }
+    const TQColor &brightText()	const	{ return br[BrightText].color(); }
+    const TQColor &buttonText()	const	{ return br[ButtonText].color(); }
+    const TQColor &shadow()	const	{ return br[Shadow].color(); }
+    const TQColor &highlight()	const	{ return br[Highlight].color(); }
+    const TQColor &highlightedText() const{return br[HighlightedText].color(); }
+    const TQColor &link()        const   { return br[Link].color(); }
+    const TQColor &linkVisited() const   { return br[LinkVisited].color(); }
+
+    bool	operator==( const TQColorGroup &g ) const;
+    bool	operator!=( const TQColorGroup &g ) const
+	{ return !(operator==(g)); }
+
+private:
+    TQBrush *br;
+    TQColorGroupPrivate * d;
+
+    friend class TQPalette;
+};
+
+
+class Q_EXPORT TQPalette
+{
+public:
+    TQPalette();
+    TQPalette( const TQColor &button );
+    TQPalette( const TQColor &button, const TQColor &background );
+    TQPalette( const TQColorGroup &active, const TQColorGroup &disabled,
+	      const TQColorGroup &inactive );
+    TQPalette( const TQPalette & );
+    ~TQPalette();
+    TQPalette &operator=( const TQPalette & );
+
+    enum ColorGroup { Disabled, Active, Inactive, NColorGroups, Normal=Active };
+
+    const TQColor &color( ColorGroup, TQColorGroup::ColorRole ) const;
+    const TQBrush &brush( ColorGroup, TQColorGroup::ColorRole ) const;
+    void setColor( ColorGroup, TQColorGroup::ColorRole, const TQColor & );
+    void setBrush( ColorGroup, TQColorGroup::ColorRole, const TQBrush & );
+
+    void setColor( TQColorGroup::ColorRole, const TQColor & );
+    void setBrush( TQColorGroup::ColorRole, const TQBrush & );
+
+    TQPalette	copy() const;
+
+    const TQColorGroup &active() const { return data->active; }
+    const TQColorGroup &disabled() const { return data->disabled; }
+    const TQColorGroup &inactive() const { return data->inactive; }
+#ifndef QT_NO_COMPAT
+    const TQColorGroup &normal() const { return active(); }
+#endif
+
+    void	setActive( const TQColorGroup & );
+    void	setDisabled( const TQColorGroup & );
+    void	setInactive( const TQColorGroup & );
+#ifndef QT_NO_COMPAT
+    void	setNormal( const TQColorGroup & cg ) { setActive(cg); }
+#endif
+
+    bool	operator==( const TQPalette &p ) const;
+    bool	operator!=( const TQPalette &p ) const
+              { return !(operator==(p)); }
+    bool	isCopyOf( const TQPalette & );
+
+    int		serialNumber() const	{ return data->ser_no; }
+    
+    
+    static TQColorGroup::ColorRole foregroundRoleFromMode( TQt::BackgroundMode mode );
+    static TQColorGroup::ColorRole backgroundRoleFromMode( TQt::BackgroundMode mode);
+
+private:
+    void	detach();
+    const TQBrush &directBrush( ColorGroup, TQColorGroup::ColorRole ) const;
+    void directSetBrush( ColorGroup, TQColorGroup::ColorRole, const TQBrush& );
+
+    struct TQPalData : public TQShared {
+	TQColorGroup disabled;
+	TQColorGroup active;
+	int	    ser_no;
+	TQColorGroup inactive;
+    } *data;
+};
+
+
+/*****************************************************************************
+  TQColorGroup/TQPalette stream functions
+ *****************************************************************************/
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQColorGroup & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQColorGroup & );
+
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQPalette & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQPalette & );
+#endif // QT_NO_DATASTREAM
+
+#endif // QT_NO_PALETTE
+#endif // TQPALETTE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpalette-members.html b/doc/html/qpalette-members.html new file mode 100644 index 00000000..9ea7b6c6 --- /dev/null +++ b/doc/html/qpalette-members.html @@ -0,0 +1,66 @@ + + + + + +TQPalette Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPalette

+ +

This is the complete list of member functions for +TQPalette, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpalette.html b/doc/html/qpalette.html new file mode 100644 index 00000000..b6b4593e --- /dev/null +++ b/doc/html/qpalette.html @@ -0,0 +1,308 @@ + + + + + +TQPalette Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPalette Class Reference

+ +

The TQPalette class contains color groups for each widget state. +More... +

#include <qpalette.h> +

List of all member functions. +

Public Members

+
    +
  • TQPalette ()
  • +
  • TQPalette ( const TQColor & button )  (obsolete)
  • +
  • TQPalette ( const TQColor & button, const TQColor & background )
  • +
  • TQPalette ( const TQColorGroup & active, const TQColorGroup & disabled, const TQColorGroup & inactive )
  • +
  • TQPalette ( const TQPalette & p )
  • +
  • ~TQPalette ()
  • +
  • TQPalette & operator= ( const TQPalette & p )
  • +
  • enum ColorGroup { Disabled, Active, Inactive, NColorGroups, Normal = Active }
  • +
  • const TQColor & color ( ColorGroup gr, TQColorGroup::ColorRole r ) const
  • +
  • const TQBrush & brush ( ColorGroup gr, TQColorGroup::ColorRole r ) const
  • +
  • void setColor ( ColorGroup gr, TQColorGroup::ColorRole r, const TQColor & c )
  • +
  • void setBrush ( ColorGroup gr, TQColorGroup::ColorRole r, const TQBrush & b )
  • +
  • void setColor ( TQColorGroup::ColorRole r, const TQColor & c )
  • +
  • void setBrush ( TQColorGroup::ColorRole r, const TQBrush & b )
  • +
  • TQPalette copy () const
  • +
  • const TQColorGroup & active () const
  • +
  • const TQColorGroup & disabled () const
  • +
  • const TQColorGroup & inactive () const
  • +
  • const TQColorGroup & normal () const  (obsolete)
  • +
  • void setActive ( const TQColorGroup & g )
  • +
  • void setDisabled ( const TQColorGroup & g )
  • +
  • void setInactive ( const TQColorGroup & g )
  • +
  • void setNormal ( const TQColorGroup & cg )  (obsolete)
  • +
  • bool operator== ( const TQPalette & p ) const
  • +
  • bool operator!= ( const TQPalette & p ) const
  • +
  • bool isCopyOf ( const TQPalette & p )
  • +
  • int serialNumber () const
  • +
+

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQPalette & p )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQPalette & p )
  • +
+

Detailed Description

+ + +

The TQPalette class contains color groups for each widget state. +

+ + + + +

A palette consists of three color groups: active, disabled, +and inactive. All widgets contain a palette, and all widgets in +TQt use their palette to draw themselves. This makes the user +interface easily configurable and easier to keep consistent. +

If you create a new widget we strongly recommend that you use the +colors in the palette rather than hard-coding specific colors. +

The color groups: +

    +
  • The active() group is used for the window that has keyboard focus. +
  • The inactive() group is used for other windows. +
  • The disabled() group is used for widgets (not windows) that are +disabled for some reason. +
+

Both active and inactive windows can contain disabled widgets. +(Disabled widgets are often called inaccessible or grayed out.) +

In Motif style, active() and inactive() look the same. In Windows +2000 style and Macintosh Platinum style, the two styles look +slightly different. +

There are setActive(), setInactive(), and setDisabled() functions +to modify the palette. (TQt also supports a normal() group; this is +an obsolete alias for active(), supported for backwards +compatibility.) +

Colors and brushes can be set for particular roles in any of a +palette's color groups with setColor() and setBrush(). +

You can copy a palette using the copy constructor and test to see +if two palettes are identical using isCopyOf(). +

See also TQApplication::setPalette(), TQWidget::palette, TQColorGroup, TQColor, Widget Appearance and Style, Graphics Classes, Image Processing Classes, and Implicitly and Explicitly Shared Classes. + +


Member Type Documentation

+

TQPalette::ColorGroup

+ +
    +
  • TQPalette::Disabled +
  • TQPalette::Active +
  • TQPalette::Inactive +
  • TQPalette::NColorGroups +
  • TQPalette::Normal - synonym for Active +
+

Member Function Documentation

+

TQPalette::TQPalette () +

+Constructs a palette that consists of color groups with only black +colors. + +

TQPalette::TQPalette ( const TQColor & button ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Constructs a palette from the button color. The other colors are +automatically calculated, based on this color. Background will be +the button color as well. + +

TQPalette::TQPalette ( const TQColor & button, const TQColor & background ) +

+Constructs a palette from a button color and a background. +The other colors are automatically calculated, based on these +colors. + +

TQPalette::TQPalette ( const TQColorGroup & active, const TQColorGroup & disabled, const TQColorGroup & inactive ) +

+Constructs a palette that consists of the three color groups active, disabled and inactive. See the Detailed Description for definitions of the color groups +and TQColorGroup::ColorRole for definitions of each color role +in the three groups. +

See also TQColorGroup and TQColorGroup::ColorRole. + +

TQPalette::TQPalette ( const TQPalette & p ) +

+Constructs a copy of p. +

This constructor is fast (it uses copy-on-write). + +

TQPalette::~TQPalette () +

+Destroys the palette. + +

const TQColorGroup & TQPalette::active () const +

+ +

Returns the active color group of this palette. +

See also TQColorGroup, setActive(), inactive(), and disabled(). + +

Examples: themes/metal.cpp and themes/wood.cpp. +

const TQBrush & TQPalette::brush ( ColorGroup gr, TQColorGroup::ColorRole r ) const +

+Returns the brush in color group gr, used for color role r. +

See also color(), setBrush(), and TQColorGroup::ColorRole. + +

const TQColor & TQPalette::color ( ColorGroup gr, TQColorGroup::ColorRole r ) const +

+Returns the color in color group gr, used for color role r. +

See also brush(), setColor(), and TQColorGroup::ColorRole. + +

TQPalette TQPalette::copy () const +

+Returns a deep copy of this palette. +

Warning: This is slower than the copy constructor and assignment +operator and offers no benefits. + +

const TQColorGroup & TQPalette::disabled () const +

+ +

Returns the disabled color group of this palette. +

See also TQColorGroup, setDisabled(), active(), and inactive(). + +

Examples: themes/metal.cpp and themes/wood.cpp. +

const TQColorGroup & TQPalette::inactive () const +

+ +

Returns the inactive color group of this palette. +

See also TQColorGroup, setInactive(), active(), and disabled(). + +

bool TQPalette::isCopyOf ( const TQPalette & p ) +

+Returns TRUE if this palette and p are copies of each other, +i.e. one of them was created as a copy of the other and neither +was subsequently modified; otherwise returns FALSE. This is much +stricter than equality. +

See also operator=() and operator==(). + +

const TQColorGroup & TQPalette::normal () const +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

Returns the active color group. Use active() instead. +

See also setActive() and active(). + +

bool TQPalette::operator!= ( const TQPalette & p ) const +

+ +

Returns TRUE (slowly) if this palette is different from p; +otherwise returns FALSE (usually tquickly). + +

TQPalette & TQPalette::operator= ( const TQPalette & p ) +

+Assigns p to this palette and returns a reference to this +palette. +

This is fast (it uses copy-on-write). +

See also copy(). + +

bool TQPalette::operator== ( const TQPalette & p ) const +

+Returns TRUE (usually tquickly) if this palette is equal to p; +otherwise returns FALSE (slowly). + +

int TQPalette::serialNumber () const +

+ +

Returns a number that uniquely identifies this TQPalette object. +The serial number is intended for caching. Its value may not be +used for anything other than equality testing. +

Note that TQPalette uses copy-on-write, and the serial number +changes during the lazy copy operation (detach()), not during a +shallow copy (copy constructor or assignment). +

See also TQPixmap, TQPixmapCache, and TQCache. + +

void TQPalette::setActive ( const TQColorGroup & g ) +

+Sets the Active color group to g. +

See also active(), setDisabled(), setInactive(), and TQColorGroup. + +

void TQPalette::setBrush ( ColorGroup gr, TQColorGroup::ColorRole r, const TQBrush & b ) +

+Sets the brush in color group gr, used for color role r, to +b. +

See also brush(), setColor(), and TQColorGroup::ColorRole. + +

void TQPalette::setBrush ( TQColorGroup::ColorRole r, const TQBrush & b ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the brush in for color role r in all three color groups to +b. +

See also brush(), setColor(), TQColorGroup::ColorRole, active(), inactive(), and disabled(). + +

void TQPalette::setColor ( ColorGroup gr, TQColorGroup::ColorRole r, const TQColor & c ) +

+Sets the brush in color group gr, used for color role r, to +the solid color c. +

See also setBrush(), color(), and TQColorGroup::ColorRole. + +

Example: themes/themes.cpp. +

void TQPalette::setColor ( TQColorGroup::ColorRole r, const TQColor & c ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the brush color used for color role r to color c in all +three color groups. +

See also color(), setBrush(), and TQColorGroup::ColorRole. + +

void TQPalette::setDisabled ( const TQColorGroup & g ) +

+Sets the Disabled color group to g. +

See also disabled(), setActive(), and setInactive(). + +

void TQPalette::setInactive ( const TQColorGroup & g ) +

+Sets the Inactive color group to g. +

See also active(), setDisabled(), setActive(), and TQColorGroup. + +

void TQPalette::setNormal ( const TQColorGroup & cg ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

Sets the active color group to cg. Use setActive() instead. +

See also setActive() and active(). + +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQPalette & p ) +

+ +

Writes the palette, p to the stream s and returns a +reference to the stream. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQPalette & p ) +

+ +

Reads a palette from the stream, s into the palette p, and +returns a reference to the stream. +

See also Format of the TQDataStream operators. + + +


+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/qpen-h.html b/doc/html/qpen-h.html new file mode 100644 index 00000000..e8b87006 --- /dev/null +++ b/doc/html/qpen-h.html @@ -0,0 +1,147 @@ + + + + + +qpen.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpen.h

+ +

This is the verbatim text of the qpen.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qpen.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPen class
+**
+** Created : 940112
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPEN_H
+#define TQPEN_H
+
+#ifndef QT_H
+#include "qcolor.h"
+#include "qshared.h"
+#endif // QT_H
+
+
+class Q_EXPORT TQPen: public TQt
+{
+public:
+    TQPen();
+    TQPen( PenStyle );
+    TQPen( const TQColor &color, uint width=0, PenStyle style=SolidLine );
+    TQPen( const TQColor &cl, uint w, PenStyle s, PenCapStyle c, PenJoinStyle j);
+    TQPen( const TQPen & );
+   ~TQPen();
+    TQPen &operator=( const TQPen & );
+
+    PenStyle	style() const		{ return data->style; }
+    void	setStyle( PenStyle );
+    uint	width() const		{ return data->width; }
+    void	setWidth( uint );
+    const TQColor &color() const		{ return data->color; }
+    void	setColor( const TQColor & );
+    PenCapStyle	capStyle() const;
+    void	setCapStyle( PenCapStyle );
+    PenJoinStyle joinStyle() const;
+    void	setJoinStyle( PenJoinStyle );
+
+    bool	operator==( const TQPen &p ) const;
+    bool	operator!=( const TQPen &p ) const
+					{ return !(operator==(p)); }
+
+private:
+    friend class TQPainter;
+#ifdef Q_WS_WIN
+    friend class TQFontEngineWin;
+#endif
+
+    TQPen	copy()	const;
+    void	detach();
+    void	init( const TQColor &, uint, uint );
+    struct TQPenData : public TQShared {		// pen data
+	PenStyle  style;
+	uint	  width;
+	TQColor	  color;
+	Q_UINT16  linest;
+    } *data;
+};
+
+
+/*****************************************************************************
+  TQPen stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQPen & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQPen & );
+#endif
+
+#endif // TQPEN_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpen-members.html b/doc/html/qpen-members.html new file mode 100644 index 00000000..ebafffb4 --- /dev/null +++ b/doc/html/qpen-members.html @@ -0,0 +1,61 @@ + + + + + +TQPen Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPen

+ +

This is the complete list of member functions for +TQPen, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpen.html b/doc/html/qpen.html new file mode 100644 index 00000000..56ee9ca5 --- /dev/null +++ b/doc/html/qpen.html @@ -0,0 +1,287 @@ + + + + + +TQPen Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPen Class Reference

+ +

The TQPen class defines how a TQPainter should draw lines and outlines +of shapes. +More... +

#include <qpen.h> +

Inherits TQt. +

List of all member functions. +

Public Members

+
    +
  • TQPen ()
  • +
  • TQPen ( PenStyle style )
  • +
  • TQPen ( const TQColor & color, uint width = 0, PenStyle style = SolidLine )
  • +
  • TQPen ( const TQColor & cl, uint w, PenStyle s, PenCapStyle c, PenJoinStyle j )
  • +
  • TQPen ( const TQPen & p )
  • +
  • ~TQPen ()
  • +
  • TQPen & operator= ( const TQPen & p )
  • +
  • PenStyle style () const
  • +
  • void setStyle ( PenStyle s )
  • +
  • uint width () const
  • +
  • void setWidth ( uint w )
  • +
  • const TQColor & color () const
  • +
  • void setColor ( const TQColor & c )
  • +
  • PenCapStyle capStyle () const
  • +
  • void setCapStyle ( PenCapStyle c )
  • +
  • PenJoinStyle joinStyle () const
  • +
  • void setJoinStyle ( PenJoinStyle j )
  • +
  • bool operator== ( const TQPen & p ) const
  • +
  • bool operator!= ( const TQPen & p ) const
  • +
+

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQPen & p )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQPen & p )
  • +
+

Detailed Description

+ + +The TQPen class defines how a TQPainter should draw lines and outlines +of shapes. +

+ + + +

A pen has a style, width, color, cap style and join style. +

The pen style defines the line type. The default pen style is TQt::SolidLine. Setting the style to NoPen tells the painter to +not draw lines or outlines. +

When drawing 1 pixel wide diagonal lines you can either use a very +fast algorithm (specified by a line width of 0, which is the +default), or a slower but more accurate algorithm (specified by a +line width of 1). For horizontal and vertical lines a line width +of 0 is the same as a line width of 1. The cap and join style have +no effect on 0-width lines. +

The pen color defines the color of lines and text. The default +line color is black. The TQColor documentation lists predefined +colors. +

The cap style defines how the end points of lines are drawn. The +join style defines how the joins between two lines are drawn when +multiple connected lines are drawn (TQPainter::drawPolyline() +etc.). The cap and join styles only apply to wide lines, i.e. when +the width is 1 or greater. +

Use the TQBrush class to specify fill styles. +

Example: +

+    TQPainter painter;
+    TQPen     pen( red, 2 );             // red solid line, 2 pixels wide
+    painter.begin( &anyPaintDevice );   // paint something
+    painter.setPen( pen );              // set the red, wide pen
+    painter.drawRect( 40,30, 200,100 ); // draw a rectangle
+    painter.setPen( blue );             // set blue pen, 0 pixel width
+    painter.drawLine( 40,30, 240,130 ); // draw a diagonal in rectangle
+    painter.end();                      // painting done
+    
+ +

See the TQt::PenStyle enum type for a complete list of pen +styles. +

With reference to the end points of lines, for wide (non-0-width) +pens it depends on the cap style whether the end point is drawn or +not. TQPainter will try to make sure that the end point is drawn +for 0-width pens, but this cannot be absolutely guaranteed because +the underlying drawing engine is free to use any (typically +accelerated) algorithm for drawing 0-width lines. On all tested +systems, however, the end point of at least all non-diagonal lines +are drawn. +

A pen's color(), width(), style(), capStyle() and joinStyle() can +be set in the constructor or later with setColor(), setWidth(), +setStyle(), setCapStyle() and setJoinStyle(). Pens may also be +compared and streamed. +

Pen styles
+

See also TQPainter, TQPainter::setPen(), Graphics Classes, Image Processing Classes, and Implicitly and Explicitly Shared Classes. + +


Member Function Documentation

+

TQPen::TQPen () +

+Constructs a default black solid line pen with 0 width, which +renders lines 1 pixel wide (fast diagonals). + +

TQPen::TQPen ( PenStyle style ) +

+Constructs a black pen with 0 width (fast diagonals) and style style. +

See also setStyle(). + +

TQPen::TQPen ( const TQColor & color, uint width = 0, PenStyle style = SolidLine ) +

+Constructs a pen with the specified color, width and style. +

See also setWidth(), setStyle(), and setColor(). + +

TQPen::TQPen ( const TQColor & cl, uint w, PenStyle s, PenCapStyle c, PenJoinStyle j ) +

+Constructs a pen with the specified color cl and width w. +The pen style is set to s, the pen cap style to c and the +pen join style to j. +

A line width of 0 will produce a 1 pixel wide line using a fast +algorithm for diagonals. A line width of 1 will also produce a 1 +pixel wide line, but uses a slower more accurate algorithm for +diagonals. For horizontal and vertical lines a line width of 0 is +the same as a line width of 1. The cap and join style have no +effect on 0-width lines. +

See also setWidth(), setStyle(), and setColor(). + +

TQPen::TQPen ( const TQPen & p ) +

+Constructs a pen that is a copy of p. + +

TQPen::~TQPen () +

+Destroys the pen. + +

PenCapStyle TQPen::capStyle () const +

+Returns the pen's cap style. +

See also setCapStyle(). + +

const TQColor & TQPen::color () const +

+ +

Returns the pen color. +

See also setColor(). + +

Example: scribble/scribble.h. +

PenJoinStyle TQPen::joinStyle () const +

+Returns the pen's join style. +

See also setJoinStyle(). + +

bool TQPen::operator!= ( const TQPen & p ) const +

+ +

Returns TRUE if the pen is different from p; otherwise returns +FALSE. +

Two pens are different if they have different styles, widths or +colors. +

See also operator==(). + +

TQPen & TQPen::operator= ( const TQPen & p ) +

+Assigns p to this pen and returns a reference to this pen. + +

bool TQPen::operator== ( const TQPen & p ) const +

+Returns TRUE if the pen is equal to p; otherwise returns FALSE. +

Two pens are equal if they have equal styles, widths and colors. +

See also operator!=(). + +

void TQPen::setCapStyle ( PenCapStyle c ) +

+Sets the pen's cap style to c. +

The default value is FlatCap. The cap style has no effect on +0-width pens. +

Pen Cap Styles
+

Warning: On Windows 95/98 and Macintosh, the cap style setting has +no effect. Wide lines are rendered as if the cap style was SquareCap. +

See also capStyle(). + +

Example: themes/wood.cpp. +

void TQPen::setColor ( const TQColor & c ) +

+Sets the pen color to c. +

See also color(). + +

Examples: progress/progress.cpp and scribble/scribble.h. +

void TQPen::setJoinStyle ( PenJoinStyle j ) +

+Sets the pen's join style to j. +

The default value is MiterJoin. The join style has no effect on +0-width pens. +

Pen Join Styles
+

Warning: On Windows 95/98 and Macintosh, the join style setting +has no effect. Wide lines are rendered as if the join style was BevelJoin. +

See also joinStyle(). + +

Example: themes/wood.cpp. +

void TQPen::setStyle ( PenStyle s ) +

+Sets the pen style to s. +

See the TQt::PenStyle documentation for a list of all the +styles. +

Warning: On Mac OS X the style setting (other than NoPen and SolidLine) have no effect as they are not implemented by the +underlying system. +

Warning: On Windows 95/98, the style setting (other than NoPen +and SolidLine) has no effect for lines with width greater than +1. +

See also style(). + +

Example: chart/chartform_canvas.cpp. +

void TQPen::setWidth ( uint w ) +

+Sets the pen width to w. +

A line width of 0 will produce a 1 pixel wide line using a fast +algorithm for diagonals. A line width of 1 will also produce a 1 +pixel wide line, but uses a slower more accurate algorithm for +diagonals. For horizontal and vertical lines a line width of 0 is +the same as a line width of 1. The cap and join style have no +effect on 0-width lines. +

See also width(). + +

Examples: multiple/ax2.h, progress/progress.cpp, and scribble/scribble.h. +

PenStyle TQPen::style () const +

+ +

Returns the pen style. +

See also setStyle(). + +

uint TQPen::width () const +

+ +

Returns the pen width. +

See also setWidth(). + +

Example: scribble/scribble.h. +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQPen & p ) +

+ +

Writes the pen p to the stream s and returns a reference to +the stream. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQPen & p ) +

+ +

Reads a pen from the stream s into p and returns a reference +to the stream. +

See also Format of the TQDataStream operators. + + +


+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/qpicture-h.html b/doc/html/qpicture-h.html new file mode 100644 index 00000000..6777c9ce --- /dev/null +++ b/doc/html/qpicture-h.html @@ -0,0 +1,172 @@ + + + + + +qpicture.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpicture.h

+ +

This is the verbatim text of the qpicture.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qpicture.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPicture class
+**
+** Created : 940729
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPICTURE_H
+#define TQPICTURE_H
+
+#ifndef QT_H
+#include "qpaintdevice.h"
+#include "qbuffer.h"
+#endif // QT_H
+
+#ifndef QT_NO_PICTURE
+
+class Q_EXPORT TQPicture : public TQPaintDevice		// picture class
+{
+public:
+    TQPicture( int formatVersion = -1 );
+    TQPicture( const TQPicture & );
+   ~TQPicture();
+
+    bool	isNull() const;
+
+    uint	size() const;
+    const char* data() const;
+    virtual void setData( const char* data, uint size );
+
+    bool	play( TQPainter * );
+
+    bool	load( TQIODevice *dev, const char *format = 0 );
+    bool	load( const TQString &fileName, const char *format = 0 );
+    bool	save( TQIODevice *dev, const char *format = 0 );
+    bool	save( const TQString &fileName, const char *format = 0 );
+
+    TQRect boundingRect() const;
+    void setBoundingRect( const TQRect &r );
+
+    TQPicture& operator= (const TQPicture&);
+
+    friend Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQPicture & );
+    friend Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQPicture & );
+
+protected:
+    bool	cmd( int, TQPainter *, TQPDevCmdParam * );
+    int		metric( int ) const;
+    void	detach();
+    TQPicture	copy() const;
+
+private:
+    bool	exec( TQPainter *, TQDataStream &, int );
+
+    struct TQPicturePrivate : public TQShared {
+	bool	cmd( int, TQPainter *, TQPDevCmdParam * );
+	bool	checkFormat();
+	void	resetFormat();
+
+	TQBuffer	pictb;
+	int	trecs;
+	bool	formatOk;
+	int	formatMajor;
+	int	formatMinor;
+	TQRect	brect;
+    } *d;
+};
+
+
+inline bool TQPicture::isNull() const
+{
+    return d->pictb.buffer().isNull();
+}
+
+inline uint TQPicture::size() const
+{
+    return d->pictb.buffer().size();
+}
+
+inline const char* TQPicture::data() const
+{
+    return d->pictb.buffer().data();
+}
+
+/*****************************************************************************
+  TQPicture stream functions
+ *****************************************************************************/
+
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQPicture & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQPicture & );
+
+#endif // QT_NO_PICTURE
+
+#endif // TQPICTURE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpicture-members.html b/doc/html/qpicture-members.html new file mode 100644 index 00000000..6f22e3e0 --- /dev/null +++ b/doc/html/qpicture-members.html @@ -0,0 +1,86 @@ + + + + + +TQPicture Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPicture

+ +

This is the complete list of member functions for +TQPicture, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpicture.html b/doc/html/qpicture.html new file mode 100644 index 00000000..af474375 --- /dev/null +++ b/doc/html/qpicture.html @@ -0,0 +1,270 @@ + + + + + +TQPicture Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPicture Class Reference

+ +

The TQPicture class is a paint device that records and +replays TQPainter commands. +More... +

#include <qpicture.h> +

Inherits TQPaintDevice. +

List of all member functions. +

Public Members

+
    +
  • TQPicture ( int formatVersion = -1 )
  • +
  • TQPicture ( const TQPicture & pic )
  • +
  • ~TQPicture ()
  • +
  • bool isNull () const
  • +
  • uint size () const
  • +
  • const char * data () const
  • +
  • virtual void setData ( const char * data, uint size )
  • +
  • bool play ( TQPainter * painter )
  • +
  • bool load ( TQIODevice * dev, const char * format = 0 )
  • +
  • bool load ( const TQString & fileName, const char * format = 0 )
  • +
  • bool save ( TQIODevice * dev, const char * format = 0 )
  • +
  • bool save ( const TQString & fileName, const char * format = 0 )
  • +
  • TQRect boundingRect () const
  • +
  • void setBoundingRect ( const TQRect & r )
  • +
  • TQPicture & operator= ( const TQPicture & p )
  • +
+

Protected Members

+
    +
  • virtual int metric ( int m ) const
  • +
  • void detach ()
  • +
  • TQPicture copy () const
  • +
+

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQPicture & r )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQPicture & r )
  • +
+

Detailed Description

+ + +The TQPicture class is a paint device that records and +replays TQPainter commands. +

+ + +

A picture serializes painter commands to an IO device in a +platform-independent format. For example, a picture created under +Windows can be read on a Sun SPARC. +

Pictures are called meta-files on some platforms. +

TQt pictures use a proprietary binary format. Unlike native picture +(meta-file) formats on many window systems, TQt pictures have no +limitations regarding their contents. Everything that can be +painted can also be stored in a picture, e.g. fonts, pixmaps, +regions, transformed graphics, etc. +

TQPicture is an implicitly shared class. +

Example of how to record a picture: +

+    TQPicture  pic;
+    TQPainter  p;
+    p.begin( &pic );               // paint in picture
+    p.drawEllipse( 10,20, 80,70 ); // draw an ellipse
+    p.end();                       // painting done
+    pic.save( "drawing.pic" );     // save picture
+    
+ +

Example of how to replay a picture: +

+    TQPicture  pic;
+    pic.load( "drawing.pic" );     // load picture
+    TQPainter  p;
+    p.begin( &myWidget );          // paint in myWidget
+    p.drawPicture( pic );          // draw the picture
+    p.end();                       // painting done
+    
+ +

Pictures can also be drawn using play(). Some basic data about a +picture is available, for example, size(), isNull() and +boundingRect(). +

See also Graphics Classes, Image Processing Classes, and Implicitly and Explicitly Shared Classes. + +


Member Function Documentation

+

TQPicture::TQPicture ( int formatVersion = -1 ) +

+Constructs an empty picture. +

The formatVersion parameter may be used to create a TQPicture +that can be read by applications that are compiled with earlier +versions of TQt. +

    +
  • formatVersion == 1 is binary compatible with TQt 1.x and later. +
  • formatVersion == 2 is binary compatible with TQt 2.0.x and later. +
  • formatVersion == 3 is binary compatible with TQt 2.1.x and later. +
  • formatVersion == 4 is binary compatible with TQt 3.0.x and later. +
  • formatVersion == 5 is binary compatible with TQt 3.1. +
+

Note that the default formatVersion is -1 which signifies the +current release, i.e. for TQt 3.1 a formatVersion of 5 is the same +as the default formatVersion of -1. +

Reading pictures generated by earlier versions of TQt is supported +and needs no special coding; the format is automatically detected. + +

TQPicture::TQPicture ( const TQPicture & pic ) +

+Constructs a shallow copy of pic. + +

TQPicture::~TQPicture () +

+Destroys the picture. + +

TQRect TQPicture::boundingRect () const +

+Returns the picture's bounding rectangle or an invalid rectangle +if the picture contains no data. + +

TQPicture TQPicture::copy () const [protected] +

+Returns a deep copy of the picture. + +

const char * TQPicture::data () const +

+ +

Returns a pointer to the picture data. The pointer is only valid +until the next non-const function is called on this picture. The +returned pointer is 0 if the picture contains no data. +

See also size() and isNull(). + +

void TQPicture::detach () [protected] +

+Detaches from shared picture data and makes sure that this picture +is the only one referring to the data. +

If multiple pictures share common data, this picture makes a copy +of the data and detaches itself from the sharing mechanism. +Nothing is done if there is just a single reference. + +

bool TQPicture::isNull () const +

+ +

Returns TRUE if the picture contains no data; otherwise returns +FALSE. + +

bool TQPicture::load ( const TQString & fileName, const char * format = 0 ) +

+Loads a picture from the file specified by fileName and returns +TRUE if successful; otherwise returns FALSE. +

By default, the file will be interpreted as being in the native +TQPicture format. Specifying the format string is optional and +is only needed for importing picture data stored in a different +format. +

Currently, the only external format supported is the W3C SVG format which +retquires the TQt XML module. The +corresponding format string is "svg". +

See also save(). + +

Examples: picture/picture.cpp and xform/xform.cpp. +

bool TQPicture::load ( TQIODevice * dev, const char * format = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

dev is the device to use for loading. + +

int TQPicture::metric ( int m ) const [virtual protected] +

+Internal implementation of the virtual TQPaintDevice::metric() +function. +

Use the TQPaintDeviceMetrics class instead. +

A picture has the following hard-coded values: dpi=72, +numcolors=16777216 and depth=24. +

m is the metric to get. + +

TQPicture & TQPicture::operator= ( const TQPicture & p ) +

+Assigns a shallow copy of p to this +picture and returns a reference to this picture. + +

bool TQPicture::play ( TQPainter * painter ) +

+Replays the picture using painter, and returns TRUE if +successful; otherwise returns FALSE. +

This function does exactly the same as TQPainter::drawPicture() +with (x, y) = (0, 0). + +

bool TQPicture::save ( const TQString & fileName, const char * format = 0 ) +

+Saves a picture to the file specified by fileName and returns +TRUE if successful; otherwise returns FALSE. +

Specifying the file format string is optional. It's not +recommended unless you intend to export the picture data for +use by a third party reader. By default the data will be saved in +the native TQPicture file format. +

Currently, the only external format supported is the W3C SVG format which +retquires the TQt XML module. The +corresponding format string is "svg". +

See also load(). + +

Example: picture/picture.cpp. +

bool TQPicture::save ( TQIODevice * dev, const char * format = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

dev is the device to use for saving. + +

void TQPicture::setBoundingRect ( const TQRect & r ) +

+Sets the picture's bounding rectangle to r. The automatically +calculated value is overriden. + +

void TQPicture::setData ( const char * data, uint size ) [virtual] +

+Sets the picture data directly from data and size. This +function copies the input data. +

See also data() and size(). + +

uint TQPicture::size () const +

+ +

Returns the size of the picture data. +

See also data(). + +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQPicture & r ) +

+ +

Writes picture r to the stream s and returns a reference to +the stream. + +

TQDataStream & operator>> ( TQDataStream & s, TQPicture & r ) +

+ +

Reads a picture from the stream s into picture r and returns +a reference to the stream. + + +


+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/qpixmap-h.html b/doc/html/qpixmap-h.html new file mode 100644 index 00000000..d8168f6b --- /dev/null +++ b/doc/html/qpixmap-h.html @@ -0,0 +1,399 @@ + + + + + +qpixmap.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpixmap.h

+ +

This is the verbatim text of the qpixmap.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qpixmap.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPixmap class
+**
+** Created : 940501
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPIXMAP_H
+#define TQPIXMAP_H
+
+#ifndef QT_H
+#include "qpaintdevice.h"
+#include "qcolor.h" // char*->TQColor conversion
+#include "qstring.h" // char*->TQString conversion
+#include "qnamespace.h"
+#endif // QT_H
+
+class TQGfx;
+class TQPixmapPrivate;
+
+#if defined(Q_WS_WIN)
+// Internal pixmap memory optimization class for Windows 9x
+class TQMultiCellPixmap;
+#endif
+
+
+class Q_EXPORT TQPixmap : public TQPaintDevice, public TQt
+{
+public:
+    enum ColorMode { Auto, Color, Mono };
+    enum Optimization { DefaultOptim, NoOptim, MemoryOptim=NoOptim,
+			NormalOptim, BestOptim };
+
+    TQPixmap();
+    TQPixmap( const TQImage& image );
+    TQPixmap( int w, int h,  int depth = -1, Optimization = DefaultOptim );
+    TQPixmap( const TQSize &, int depth = -1, Optimization = DefaultOptim );
+#ifndef QT_NO_IMAGEIO
+    TQPixmap( const TQString& fileName, const char *format=0,
+	     ColorMode mode=Auto );
+    TQPixmap( const TQString& fileName, const char *format,
+	     int conversion_flags );
+    TQPixmap( const char *xpm[] ); // ### in 4.0, 'const char * const xpm[]'?
+    TQPixmap( const TQByteArray &data );
+#endif
+    TQPixmap( const TQPixmap & );
+   ~TQPixmap();
+
+    TQPixmap    &operator=( const TQPixmap & );
+    TQPixmap    &operator=( const TQImage	 & );
+
+    bool	isNull()	const;
+
+    int		width()		const { return data->w; }
+    int		height()	const { return data->h; }
+    TQSize	size()		const { return TQSize(data->w,data->h); }
+    TQRect	rect()		const { return TQRect(0,0,data->w,data->h); }
+    int		depth()		const { return data->d; }
+    static int	defaultDepth();
+
+    void	fill( const TQColor &fillColor = TQt::white );
+    void	fill( const TQWidget *, int xofs, int yofs );
+    void	fill( const TQWidget *, const TQPoint &ofs );
+    void	resize( int width, int height );
+    void	resize( const TQSize & );
+
+    const TQBitmap *mask() const;
+    void	setMask( const TQBitmap & );
+    bool	selfMask() const;
+    bool	hasAlpha() const;
+    bool	hasAlphaChannel() const;
+#ifndef QT_NO_IMAGE_HEURISTIC_MASK
+    TQBitmap	createHeuristicMask( bool clipTight = TRUE ) const;
+#endif
+#ifndef QT_NO_MIME
+    static TQPixmap fromMimeSource( const TQString& abs_name );
+#endif
+    static  TQPixmap grabWindow( WId, int x=0, int y=0, int w=-1, int h=-1 );
+    static  TQPixmap grabWidget( TQWidget * widget,
+				int x=0, int y=0, int w=-1, int h=-1 );
+
+#ifndef QT_NO_PIXMAP_TRANSFORMATION
+    TQPixmap	    xForm( const TQWMatrix & ) const;
+    static TQWMatrix trueMatrix( const TQWMatrix &, int w, int h );
+#endif
+
+    TQImage	convertToImage() const;
+    bool	convertFromImage( const TQImage &, ColorMode mode=Auto );
+    bool	convertFromImage( const TQImage &, int conversion_flags );
+#ifndef QT_NO_IMAGEIO
+    static const char* imageFormat( const TQString &fileName );
+    bool	load( const TQString& fileName, const char *format=0,
+		      ColorMode mode=Auto );
+    bool	load( const TQString& fileName, const char *format,
+		      int conversion_flags );
+    bool	loadFromData( const uchar *buf, uint len,
+			      const char* format=0,
+			      ColorMode mode=Auto );
+    bool	loadFromData( const uchar *buf, uint len,
+			      const char* format,
+			      int conversion_flags );
+    bool	loadFromData( const TQByteArray &data,
+			      const char* format=0,
+			      int conversion_flags=0 );
+    bool	save( const TQString& fileName, const char* format, int quality = -1 ) const;
+    bool	save( TQIODevice* device, const char* format, int quality = -1 ) const;
+#endif
+
+#if defined(Q_WS_WIN)
+    HBITMAP	hbm()		const;
+#endif
+
+    int		serialNumber()	const;
+
+    Optimization	optimization() const;
+    void		setOptimization( Optimization );
+    static Optimization defaultOptimization();
+    static void		setDefaultOptimization( Optimization );
+
+    virtual void detach();
+
+    bool	isTQBitmap() const;
+
+#if defined(Q_WS_WIN)
+    // These functions are internal and used by Windows 9x only
+    bool	isMultiCellPixmap() const;
+    HDC		multiCellHandle() const;
+    HBITMAP	multiCellBitmap() const;
+    int		multiCellOffset() const;
+    int		allocCell();
+    void	freeCell( bool = FALSE );
+#endif
+
+#if defined(Q_WS_QWS)
+    virtual TQGfx * graphicsContext(bool clip_children=TRUE) const;
+    virtual unsigned char * scanLine(int) const;
+    virtual int bytesPerLine() const;
+    TQRgb * clut() const;
+    int numCols() const;
+#elif defined(Q_WS_X11)
+    static int x11SetDefaultScreen( int screen );
+    void x11SetScreen( int screen );
+#endif
+
+#ifndef Q_QDOC
+    Q_DUMMY_COMPARISON_OPERATOR(TQPixmap)
+#endif
+
+protected:
+    TQPixmap( int w, int h, const uchar *data, bool isXbitmap );
+    int metric( int ) const;
+
+#if defined(Q_WS_WIN)
+    struct TQMCPI {				// mem optim for win9x
+	TQMultiCellPixmap *mcp;
+	int	offset;
+    };
+#endif
+
+    struct TQPixmapData : public TQShared {	// internal pixmap data
+	TQCOORD	w, h;
+	short	d;
+	uint	uninit	 : 1;
+	uint	bitmap	 : 1;
+	uint	selfmask : 1;
+#if defined(Q_WS_WIN)
+	uint	mcp	 : 1;
+#endif
+	int	ser_no;
+	TQBitmap *mask;
+#if defined(Q_WS_WIN)
+	TQPixmap *maskpm;
+	union {
+	    HBITMAP hbm;    // if mcp == FALSE
+	    TQMCPI  *mcpi;   // if mcp == TRUE
+	} hbm_or_mcpi;
+	uchar *realAlphaBits;
+#ifdef Q_OS_TEMP
+	uchar* ppvBits; // Pointer to DIBSection bits
+#endif
+#elif defined(Q_WS_X11)
+	void   *ximage;
+	void   *maskgc;
+	TQPixmap *alphapm;
+#elif defined(Q_WS_MAC)
+	ColorTable *clut;
+	TQPixmap *alphapm;
+#elif defined(Q_WS_QWS)
+	int id; // ### should use TQPaintDevice::hd, since it is there
+	TQRgb * clut;
+	int numcols;
+	int rw;
+	int rh;
+	bool hasAlpha;
+#endif
+	Optimization optim;
+#if defined(Q_WS_WIN)
+	HBITMAP old_hbm;
+#endif
+    } *data;
+private:
+#ifndef QT_NO_IMAGEIO
+    bool doImageIO( TQImageIO* io, int quality ) const;
+#endif
+    TQPixmap( int w, int h, int depth, bool, Optimization );
+    void	init( int, int, int, bool, Optimization );
+    void	deref();
+    TQPixmap	copy( bool ignoreMask = FALSE ) const;
+#if defined(Q_WS_WIN)
+    void initAlphaPixmap( uchar *bytes, int length, struct tagBITMAPINFO *bmi );
+    void convertToAlphaPixmap( bool initAlpha=TRUE );
+    static void bitBltAlphaPixmap( TQPixmap *dst, int dx, int dy,
+				   const TQPixmap *src, int sx, int sy,
+				   int sw, int sh, bool useDstAlpha );
+#endif
+    static Optimization defOptim;
+    friend Q_EXPORT void bitBlt( TQPaintDevice *, int, int,
+				 const TQPaintDevice *,
+				 int, int, int, int, RasterOp, bool );
+    friend Q_EXPORT void bitBlt( TQPaintDevice *, int, int,
+				 const TQImage* src,
+				 int, int, int, int, int conversion_flags );
+    friend Q_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
+				  const TQPixmap *src, int sx, int sy,
+				  int sw, int sh );
+
+#if defined(Q_WS_MAC)
+    friend void unclippedScaledBitBlt(TQPaintDevice *, int, int, int, int,
+				      const TQPaintDevice *, int, int, int, int,
+				      TQt::RasterOp, bool, bool);
+#endif
+
+    friend class TQBitmap;
+    friend class TQPaintDevice;
+    friend class TQPainter;
+    friend class TQGLWidget;
+};
+
+
+inline bool TQPixmap::isNull() const
+{
+    return data->w == 0;
+}
+
+inline void TQPixmap::fill( const TQWidget *w, const TQPoint &ofs )
+{
+    fill( w, ofs.x(), ofs.y() );
+}
+
+inline void TQPixmap::resize( const TQSize &s )
+{
+    resize( s.width(), s.height() );
+}
+
+inline const TQBitmap *TQPixmap::mask() const
+{
+    return data->mask;
+}
+
+inline bool TQPixmap::selfMask() const
+{
+    return data->selfmask;
+}
+
+#if defined(Q_WS_WIN)
+inline HBITMAP TQPixmap::hbm() const
+{
+    return data->mcp ? 0 : data->hbm_or_mcpi.hbm;
+}
+#endif
+
+inline int TQPixmap::serialNumber() const
+{
+    return data->ser_no;
+}
+
+inline TQPixmap::Optimization TQPixmap::optimization() const
+{
+    return data->optim;
+}
+
+inline bool TQPixmap::isTQBitmap() const
+{
+    return data->bitmap;
+}
+
+#if defined(Q_WS_WIN)
+inline bool TQPixmap::isMultiCellPixmap() const
+{
+    return data->mcp;
+}
+#endif
+
+
+/*****************************************************************************
+  TQPixmap stream functions
+ *****************************************************************************/
+
+#if !defined(QT_NO_DATASTREAM) && !defined(QT_NO_IMAGEIO)
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQPixmap & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQPixmap & );
+#endif
+
+/*****************************************************************************
+  TQPixmap (and TQImage) helper functions
+ *****************************************************************************/
+
+#ifndef QT_NO_PIXMAP_TRANSFORMATION
+#  define QT_XFORM_TYPE_MSBFIRST 0
+#  define QT_XFORM_TYPE_LSBFIRST 1
+#  if defined(Q_WS_WIN)
+#    define QT_XFORM_TYPE_WINDOWSPIXMAP 2
+#  endif
+bool qt_xForm_helper( const TQWMatrix&, int, int, int, uchar*, int, int, int, uchar*, int, int, int );
+#endif
+
+Q_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
+		       const TQPixmap *src, int sx = 0, int sy = 0,
+		       int sw = -1, int sh = -1 );
+
+#endif // TQPIXMAP_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpixmap-members.html b/doc/html/qpixmap-members.html new file mode 100644 index 00000000..4663a842 --- /dev/null +++ b/doc/html/qpixmap-members.html @@ -0,0 +1,108 @@ + + + + + +TQPixmap Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPixmap

+ +

This is the complete list of member functions for +TQPixmap, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpixmap.html b/doc/html/qpixmap.html new file mode 100644 index 00000000..2490a8d3 --- /dev/null +++ b/doc/html/qpixmap.html @@ -0,0 +1,825 @@ + + + + + +TQPixmap Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPixmap Class Reference

+ +

The TQPixmap class is an off-screen, pixel-based paint device. +More... +

#include <qpixmap.h> +

Inherits TQPaintDevice and TQt. +

Inherited by TQBitmap and TQCanvasPixmap. +

List of all member functions. +

Public Members

+
    +
  • enum ColorMode { Auto, Color, Mono }
  • +
  • enum Optimization { DefaultOptim, NoOptim, MemoryOptim = NoOptim, NormalOptim, BestOptim }
  • +
  • TQPixmap ()
  • +
  • TQPixmap ( const TQImage & image )
  • +
  • TQPixmap ( int w, int h, int depth = -1, Optimization optimization = DefaultOptim )
  • +
  • TQPixmap ( const TQSize & size, int depth = -1, Optimization optimization = DefaultOptim )
  • +
  • TQPixmap ( const TQString & fileName, const char * format = 0, ColorMode mode = Auto )
  • +
  • TQPixmap ( const TQString & fileName, const char * format, int conversion_flags )
  • +
  • TQPixmap ( const char * xpm[] )
  • +
  • TQPixmap ( const TQByteArray & img_data )
  • +
  • TQPixmap ( const TQPixmap & pixmap )
  • +
  • ~TQPixmap ()
  • +
  • TQPixmap & operator= ( const TQPixmap & pixmap )
  • +
  • TQPixmap & operator= ( const TQImage & image )
  • +
  • bool isNull () const
  • +
  • int width () const
  • +
  • int height () const
  • +
  • TQSize size () const
  • +
  • TQRect rect () const
  • +
  • int depth () const
  • +
  • void fill ( const TQColor & fillColor = TQt::white )
  • +
  • void fill ( const TQWidget * widget, int xofs, int yofs )
  • +
  • void fill ( const TQWidget * widget, const TQPoint & ofs )
  • +
  • void resize ( int w, int h )
  • +
  • void resize ( const TQSize & size )
  • +
  • const TQBitmap * mask () const
  • +
  • void setMask ( const TQBitmap & newmask )
  • +
  • bool selfMask () const
  • +
  • bool hasAlpha () const
  • +
  • bool hasAlphaChannel () const
  • +
  • TQBitmap createHeuristicMask ( bool clipTight = TRUE ) const
  • +
  • TQPixmap xForm ( const TQWMatrix & matrix ) const
  • +
  • TQImage convertToImage () const
  • +
  • bool convertFromImage ( const TQImage & image, ColorMode mode = Auto )
  • +
  • bool convertFromImage ( const TQImage & img, int conversion_flags )
  • +
  • bool load ( const TQString & fileName, const char * format = 0, ColorMode mode = Auto )
  • +
  • bool load ( const TQString & fileName, const char * format, int conversion_flags )
  • +
  • bool loadFromData ( const uchar * buf, uint len, const char * format = 0, ColorMode mode = Auto )
  • +
  • bool loadFromData ( const uchar * buf, uint len, const char * format, int conversion_flags )
  • +
  • bool loadFromData ( const TQByteArray & buf, const char * format = 0, int conversion_flags = 0 )
  • +
  • bool save ( const TQString & fileName, const char * format, int quality = -1 ) const
  • +
  • bool save ( TQIODevice * device, const char * format, int quality = -1 ) const
  • +
  • int serialNumber () const
  • +
  • Optimization optimization () const
  • +
  • void setOptimization ( Optimization optimization )
  • +
  • virtual void detach ()
  • +
  • bool isTQBitmap () const
  • +
+

Static Public Members

+ +

Protected Members

+
    +
  • TQPixmap ( int w, int h, const uchar * bits, bool isXbitmap )
  • +
  • virtual int metric ( int m ) const
  • +
+

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQPixmap & pixmap )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQPixmap & pixmap )
  • +
  • void copyBlt ( TQPixmap * dst, int dx, int dy, const TQPixmap * src, int sx, int sy, int sw, int sh )
  • +
+

Detailed Description

+ + +The TQPixmap class is an off-screen, pixel-based paint device. +

+ + + +

TQPixmap is one of the two classes TQt provides for dealing with +images; the other is TQImage. TQPixmap is designed and optimized +for drawing; TQImage is designed and optimized for I/O and for +direct pixel access/manipulation. There are (slow) functions to +convert between TQImage and TQPixmap: convertToImage() and +convertFromImage(). +

One common use of the TQPixmap class is to enable smooth updating +of widgets. Whenever something complex needs to be drawn, you can +use a pixmap to obtain flicker-free drawing, like this: +

    +
  1. Create a pixmap with the same size as the widget. +
  2. Fill the pixmap with the widget background color. +
  3. Paint the pixmap. +
  4. bitBlt() the pixmap contents onto the widget. +
+

Pixel data in a pixmap is internal and is managed by the +underlying window system. Pixels can be accessed only through +TQPainter functions, through bitBlt(), and by converting the +TQPixmap to a TQImage. +

You can easily display a TQPixmap on the screen using +TQLabel::setPixmap(). For example, all the TQButton subclasses +support pixmap use. +

The TQPixmap class uses copy-on-write, +so it is practical to pass TQPixmap objects by value. +

You can retrieve the width(), height(), depth() and size() of a +pixmap. The enclosing rectangle is given by rect(). Pixmaps can be +filled with fill() and resized with resize(). You can create and +set a mask with createHeuristicMask() and setMask(). Use +selfMask() to see if the pixmap is identical to its mask. +

In addition to loading a pixmap from file using load() you can +also loadFromData(). You can control optimization with +setOptimization() and obtain a transformed version of the pixmap +using xForm() +

Note regarding Windows 95 and 98: on Windows 9x the system crashes +if you create more than about 1000 pixmaps, independent of the +size of the pixmaps or installed RAM. Windows NT-systems (including +2000, XP and following versions) do not have the same limitation, +but depending on the graphics etquipment the system will fail to +allocate pixmap objects at some point (due to system running out of +GDI resources). +

TQt tries to work around the resource limitation. If you set the +pixmap optimization to TQPixmap::MemoryOptim and the width of +your pixmap is less than or equal to 128 pixels, TQt stores the +pixmap in a way that is very memory-efficient when there are many +pixmaps. +

If your application uses dozens or hundreds of pixmaps (for +example on tool bar buttons and in popup menus), and you plan to +run it on Windows 95 or Windows 98, we recommend using code like +this: +

+        TQPixmap::setDefaultOptimization( TQPixmap::MemoryOptim );
+        while ( ... ) {
+            // load tool bar pixmaps etc.
+            TQPixmap *pixmap = new TQPixmap(fileName);
+        }
+        TQPixmap::setDefaultOptimization( TQPixmap::NormalOptim );
+    
+ +

In general it is recommended to make as much use of TQPixmap's +implicit sharing and the TQPixmapCache as possible. +

See also TQBitmap, TQImage, TQImageIO, Shared Classes, Graphics Classes, Image Processing Classes, and Implicitly and Explicitly Shared Classes. + +


Member Type Documentation

+

TQPixmap::ColorMode

+ +

This enum type defines the color modes that exist for converting +TQImage objects to TQPixmap. +

    +
  • TQPixmap::Auto - Select Color or Mono on a case-by-case basis. +
  • TQPixmap::Color - Always create colored pixmaps. +
  • TQPixmap::Mono - Always create bitmaps. +
+

TQPixmap::Optimization

+ +

TQPixmap has the choice of optimizing for speed or memory in a few +places; the best choice varies from pixmap to pixmap but can +generally be derived heuristically. This enum type defines a +number of optimization modes that you can set for any pixmap to +tweak the speed/memory tradeoffs: +

    +
  • TQPixmap::DefaultOptim - Whatever TQPixmap::defaultOptimization() +returns. A pixmap with this optimization will have whatever +the current default optimization is. If the default +optimization is changed using setDefaultOptimization(), then +this will not effect any pixmaps that have already been +created. +
  • TQPixmap::NoOptim - No optimization (currently the same as MemoryOptim). +
  • TQPixmap::MemoryOptim - Optimize for minimal memory use on Windows +9x and X11 systems. +
  • TQPixmap::NormalOptim - Optimize for typical usage. Often uses more +memory than MemoryOptim, and is often faster. +
  • TQPixmap::BestOptim - Optimize for pixmaps that are drawn very often +and where performance is critical. Generally uses more memory +than NormalOptim and may provide a little more speed. +

We recommend using DefaultOptim. +

+


Member Function Documentation

+

TQPixmap::TQPixmap () +

+Constructs a null pixmap. +

See also isNull(). + +

TQPixmap::TQPixmap ( const TQImage & image ) +

+Constructs a pixmap from the TQImage image. +

See also convertFromImage(). + +

TQPixmap::TQPixmap ( int w, int h, int depth = -1, Optimization optimization = DefaultOptim ) +

+Constructs a pixmap with w width, h height and depth bits +per pixel. The pixmap is optimized in accordance with the optimization value. +

The contents of the pixmap is uninitialized. +

The depth can be either 1 (monochrome) or the depth of the +current video mode. If depth is negative, then the hardware +depth of the current video mode will be used. +

If either w or h is zero, a null pixmap is constructed. +

See also isNull() and TQPixmap::Optimization. + +

TQPixmap::TQPixmap ( const TQSize & size, int depth = -1, Optimization optimization = DefaultOptim ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Constructs a pixmap of size size, depth bits per pixel, +optimized in accordance with the optimization value. + +

TQPixmap::TQPixmap ( const TQString & fileName, const char * format = 0, ColorMode mode = Auto ) +

+Constructs a pixmap from the file fileName. If the file does +not exist or is of an unknown format, the pixmap becomes a null +pixmap. +

The fileName, format and mode parameters are passed on to +load(). This means that the data in fileName is not compiled +into the binary. If fileName contains a relative path (e.g. the +filename only) the relevant file must be found relative to the +runtime working directory. +

See also TQPixmap::ColorMode, isNull(), load(), loadFromData(), save(), and imageFormat(). + +

TQPixmap::TQPixmap ( const TQString & fileName, const char * format, int conversion_flags ) +

+Constructs a pixmap from the file fileName. If the file does +not exist or is of an unknown format, the pixmap becomes a null +pixmap. +

The fileName, format and conversion_flags parameters are +passed on to load(). This means that the data in fileName is +not compiled into the binary. If fileName contains a relative +path (e.g. the filename only) the relevant file must be found +relative to the runtime working directory. +

If the image needs to be modified to fit in a lower-resolution +result (e.g. converting from 32-bit to 8-bit), use the conversion_flags to specify how you'd prefer this to happen. +

See also TQt::ImageConversionFlags, isNull(), load(), loadFromData(), save(), and imageFormat(). + +

TQPixmap::TQPixmap ( const char * xpm[] ) +

+Constructs a pixmap from xpm, which must be a valid XPM image. +

Errors are silently ignored. +

Note that it's possible to squeeze the XPM variable a little bit +by using an unusual declaration: +

+        static const char * const start_xpm[]={
+            "16 15 8 1",
+            "a c #cec6bd",
+        ....
+    
+ +

The extra const makes the entire definition read-only, which is +slightly more efficient (for example, when the code is in a shared +library) and ROMable when the application is to be stored in ROM. +

In order to use that sort of declaration you must cast the +variable back to const char ** when you create the TQPixmap. + +

TQPixmap::TQPixmap ( const TQByteArray & img_data ) +

+Constructs a pixmaps by loading from img_data. The data can be +in any image format supported by TQt. +

See also loadFromData(). + +

TQPixmap::TQPixmap ( const TQPixmap & pixmap ) +

+Constructs a pixmap that is a copy of pixmap. + +

TQPixmap::TQPixmap ( int w, int h, const uchar * bits, bool isXbitmap ) [protected] +

+Constructs a monochrome pixmap, with width w and height h, +that is initialized with the data in bits. The isXbitmap +indicates whether the data is an X bitmap and defaults to FALSE. +This constructor is protected and used by the TQBitmap class. + +

TQPixmap::~TQPixmap () +

+Destroys the pixmap. + +

bool TQPixmap::convertFromImage ( const TQImage & img, int conversion_flags ) +

+Converts image img and sets this pixmap. Returns TRUE if +successful; otherwise returns FALSE. +

The conversion_flags argument is a bitwise-OR of the +TQt::ImageConversionFlags. Passing 0 for conversion_flags +sets all the default options. +

Note that even though a TQPixmap with depth 1 behaves much like a +TQBitmap, isTQBitmap() returns FALSE. +

If a pixmap with depth 1 is painted with color0 and color1 and +converted to an image, the pixels painted with color0 will produce +pixel index 0 in the image and those painted with color1 will +produce pixel index 1. +

See also convertToImage(), isTQBitmap(), TQImage::convertDepth(), defaultDepth(), and TQImage::hasAlphaBuffer(). + +

Examples: canvas/canvas.cpp and themes/wood.cpp. +

bool TQPixmap::convertFromImage ( const TQImage & image, ColorMode mode = Auto ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Converts image and sets this pixmap using color mode mode. +Returns TRUE if successful; otherwise returns FALSE. +

See also TQPixmap::ColorMode. + +

TQImage TQPixmap::convertToImage () const +

+Converts the pixmap to a TQImage. Returns a null image if it fails. +

If the pixmap has 1-bit depth, the returned image will also be 1 +bit deep. If the pixmap has 2- to 8-bit depth, the returned image +has 8-bit depth. If the pixmap has greater than 8-bit depth, the +returned image has 32-bit depth. +

Note that for the moment, alpha masks on monochrome images are +ignored. +

See also convertFromImage(). + +

Example: qmag/qmag.cpp. +

TQBitmap TQPixmap::createHeuristicMask ( bool clipTight = TRUE ) const +

+Creates and returns a heuristic mask for this pixmap. It works by +selecting a color from one of the corners and then chipping away +pixels of that color, starting at all the edges. +

The mask may not be perfect but it should be reasonable, so you +can do things such as the following: +

+    pm->setMask( pm->createHeuristicMask() );
+    
+ +

This function is slow because it involves transformation to a +TQImage, non-trivial computations and a transformation back to a +TQBitmap. +

If clipTight is TRUE the mask is just large enough to cover the +pixels; otherwise, the mask is larger than the data pixels. +

See also TQImage::createHeuristicMask(). + +

int TQPixmap::defaultDepth () [static] +

+Returns the default pixmap depth, i.e. the depth a pixmap gets if +-1 is specified. +

See also depth(). + +

Optimization TQPixmap::defaultOptimization () [static] +

+Returns the default pixmap optimization setting. +

See also setDefaultOptimization(), setOptimization(), and optimization(). + +

int TQPixmap::depth () const +

+ +

Returns the depth of the pixmap. +

The pixmap depth is also called bits per pixel (bpp) or bit planes +of a pixmap. A null pixmap has depth 0. +

See also defaultDepth(), isNull(), and TQImage::convertDepth(). + +

void TQPixmap::detach () [virtual] +

+This is a special-purpose function that detaches the pixmap from +shared pixmap data. +

A pixmap is automatically detached by TQt whenever its contents is +about to change. This is done in all TQPixmap member functions +that modify the pixmap (fill(), resize(), convertFromImage(), +load(), etc.), in bitBlt() for the destination pixmap and in +TQPainter::begin() on a pixmap. +

It is possible to modify a pixmap without letting TQt know. You can +first obtain the system-dependent handle() and then call +system-specific functions (for instance, BitBlt under Windows) +that modify the pixmap contents. In such cases, you can call +detach() to cut the pixmap loose from other pixmaps that share +data with this one. +

detach() returns immediately if there is just a single reference +or if the pixmap has not been initialized yet. + +

void TQPixmap::fill ( const TQColor & fillColor = TQt::white ) +

+Fills the pixmap with the color fillColor. + +

Examples: chart/setdataform.cpp, desktop/desktop.cpp, grapher/grapher.cpp, hello/hello.cpp, t10/cannon.cpp, themes/metal.cpp, and xform/xform.cpp. +

void TQPixmap::fill ( const TQWidget * widget, int xofs, int yofs ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Fills the pixmap with the widget's background color or pixmap. +If the background is empty, nothing is done. xofs, yofs is +an offset in the widget. + +

void TQPixmap::fill ( const TQWidget * widget, const TQPoint & ofs ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Fills the pixmap with the widget's background color or pixmap. +If the background is empty, nothing is done. +

The ofs point is an offset in the widget. +

The point ofs is a point in the widget's coordinate system. The +pixmap's top-left pixel will be mapped to the point ofs in the +widget. This is significant if the widget has a background pixmap; +otherwise the pixmap will simply be filled with the background +color of the widget. +

Example: +

+    void CuteWidget::paintEvent( TQPaintEvent *e )
+    {
+        TQRect ur = e->rect();            // rectangle to update
+        TQPixmap pix( ur.size() );        // Pixmap for double-buffering
+        pix.fill( this, ur.topLeft() );  // fill with widget background
+
+        TQPainter p( &pix );
+        p.translate( -ur.x(), -ur.y() ); // use widget coordinate system
+                                         // when drawing on pixmap
+        //    ... draw on pixmap ...
+
+        p.end();
+
+        bitBlt( this, ur.topLeft(), &pix );
+    }
+    
+ + +

TQPixmap TQPixmap::fromMimeSource ( const TQString & abs_name ) [static] +

Convenience function. Gets the data associated with the absolute +name abs_name from the default mime source factory and decodes it +to a pixmap. +

See also TQMimeSourceFactory, TQImage::fromMimeSource(), and TQImageDrag::decode(). + +

Example: textedit/textedit.cpp. +

TQPixmap TQPixmap::grabWidget ( TQWidget * widget, int x = 0, int y = 0, int w = -1, int h = -1 ) [static] +

+Creates a pixmap and paints widget in it. +

If the widget has any children, then they are also painted in +the appropriate positions. +

If you specify x, y, w or h, only the rectangle you +specify is painted. The defaults are 0, 0 (top-left corner) and +-1,-1 (which means the entire widget). +

(If w is negative, the function copies everything to the right +border of the window. If h is negative, the function copies +everything to the bottom of the window.) +

If widget is 0, or if the rectangle defined by x, y, the +modified w and the modified h does not overlap the widget->rect(), this function will return a null TQPixmap. +

This function actually asks widget to paint itself (and its +children to paint themselves). TQPixmap::grabWindow() grabs pixels +off the screen, which is a bit faster and picks up exactly +what's on-screen. This function works by calling paintEvent() with +painter redirection turned on. If there are overlaying windows, +grabWindow() will see them, but not this function. +

If there is overlap, it returns a pixmap of the size you want, +containing a rendering of widget. If the rectangle you ask for +is a superset of widget, the areas outside widget are +covered with the widget's background. +

If an error occurs when trying to grab the widget, such as the +size of the widget being too large to fit in memory, an isNull() +pixmap is returned. +

See also grabWindow(), TQPainter::redirect(), and TQWidget::paintEvent(). + +

TQPixmap TQPixmap::grabWindow ( WId window, int x = 0, int y = 0, int w = -1, int h = -1 ) [static] +

+Grabs the contents of the window window and makes a pixmap out +of it. Returns the pixmap. +

The arguments (x, y) specify the offset in the window, whereas +(w, h) specify the width and height of the area to be copied. +

If w is negative, the function copies everything to the right +border of the window. If h is negative, the function copies +everything to the bottom of the window. +

Note that grabWindow() grabs pixels from the screen, not from the +window. If there is another window partially or entirely over the +one you grab, you get pixels from the overlying window, too. +

Note also that the mouse cursor is generally not grabbed. +

The reason we use a window identifier and not a TQWidget is to +enable grabbing of windows that are not part of the application, +window system frames, and so on. +

Warning: Grabbing an area outside the screen is not safe in +general. This depends on the underlying window system. +

Warning: X11 only: If window is not the same depth as the root +window and another window partially or entirely obscures the one +you grab, you will not get pixels from the overlying window. +The contests of the obscured areas in the pixmap are undefined and +uninitialized. +

See also grabWidget(). + +

Example: qmag/qmag.cpp. +

bool TQPixmap::hasAlpha () const +

+Returns TRUE this pixmap has an alpha channel or a mask. +

See also hasAlphaChannel() and mask(). + +

bool TQPixmap::hasAlphaChannel () const +

+Returns TRUE if the pixmap has an alpha channel; otherwise it +returns FALSE. +

NOTE: If the pixmap has a mask but not alpha channel, this +function returns FALSE. +

See also hasAlpha() and mask(). + +

int TQPixmap::height () const +

+ +

Returns the height of the pixmap. +

See also width(), size(), and rect(). + +

Examples: desktop/desktop.cpp, movies/main.cpp, scribble/scribble.cpp, scrollview/scrollview.cpp, t10/cannon.cpp, and xform/xform.cpp. +

const char * TQPixmap::imageFormat ( const TQString & fileName ) [static] +

+Returns a string that specifies the image format of the file fileName, or 0 if the file cannot be read or if the format cannot +be recognized. +

The TQImageIO documentation lists the supported image formats. +

See also load() and save(). + +

bool TQPixmap::isNull () const +

+ +

Returns TRUE if this is a null pixmap; otherwise returns FALSE. +

A null pixmap has zero width, zero height and no contents. You +cannot draw in a null pixmap or bitBlt() anything to it. +

Resizing an existing pixmap to (0, 0) makes a pixmap into a null +pixmap. +

See also resize(). + +

Examples: movies/main.cpp, qdir/qdir.cpp, qmag/qmag.cpp, and scrollview/scrollview.cpp. +

bool TQPixmap::isTQBitmap () const +

+ +

Returns TRUE if this is a TQBitmap; otherwise returns FALSE. + +

bool TQPixmap::load ( const TQString & fileName, const char * format, int conversion_flags ) +

+Loads a pixmap from the file fileName at runtime. Returns TRUE +if successful; otherwise returns FALSE. +

If format is specified, the loader attempts to read the pixmap +using the specified format. If format is not specified +(default), the loader reads a few bytes from the header to guess +the file's format. +

See the convertFromImage() documentation for a description of the +conversion_flags argument. +

The TQImageIO documentation lists the supported image formats and +explains how to add extra formats. +

See also loadFromData(), save(), imageFormat(), TQImage::load(), and TQImageIO. + +

Examples: picture/picture.cpp, scrollview/scrollview.cpp, and xform/xform.cpp. +

bool TQPixmap::load ( const TQString & fileName, const char * format = 0, ColorMode mode = Auto ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Loads a pixmap from the file fileName at runtime. +

If format is specified, the loader attempts to read the pixmap +using the specified format. If format is not specified +(default), the loader reads a few bytes from the header to guess +the file's format. +

The mode is used to specify the color mode of the pixmap. +

See also TQPixmap::ColorMode. + +

bool TQPixmap::loadFromData ( const uchar * buf, uint len, const char * format, int conversion_flags ) +

+Loads a pixmap from the binary data in buf (len bytes). +Returns TRUE if successful; otherwise returns FALSE. +

If format is specified, the loader attempts to read the pixmap +using the specified format. If format is not specified +(default), the loader reads a few bytes from the header to guess +the file's format. +

See the convertFromImage() documentation for a description of the +conversion_flags argument. +

The TQImageIO documentation lists the supported image formats and +explains how to add extra formats. +

See also load(), save(), imageFormat(), TQImage::loadFromData(), and TQImageIO. + +

bool TQPixmap::loadFromData ( const uchar * buf, uint len, const char * format = 0, ColorMode mode = Auto ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Loads a pixmap from the binary data in buf (len bytes) using +color mode mode. Returns TRUE if successful; otherwise returns +FALSE. +

If format is specified, the loader attempts to read the pixmap +using the specified format. If format is not specified +(default), the loader reads a few bytes from the header to guess +the file's format. +

See also TQPixmap::ColorMode. + +

bool TQPixmap::loadFromData ( const TQByteArray & buf, const char * format = 0, int conversion_flags = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

const TQBitmap * TQPixmap::mask () const +

+ +

Returns the mask bitmap, or 0 if no mask has been set. +

See also setMask(), TQBitmap, and hasAlpha(). + +

int TQPixmap::metric ( int m ) const [virtual protected] +

+Internal implementation of the virtual TQPaintDevice::metric() function. +

Use the TQPaintDeviceMetrics class instead. +

m is the metric to get. + +

TQPixmap & TQPixmap::operator= ( const TQPixmap & pixmap ) +

+Assigns the pixmap pixmap to this pixmap and returns a +reference to this pixmap. + +

TQPixmap & TQPixmap::operator= ( const TQImage & image ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Converts the image image to a pixmap that is assigned to this +pixmap. Returns a reference to the pixmap. +

See also convertFromImage(). + +

Optimization TQPixmap::optimization () const +

+ +

Returns the optimization setting for this pixmap. +

The default optimization setting is TQPixmap::NormalOptim. You +can change this setting in two ways: +

+

See also setOptimization(), setDefaultOptimization(), and defaultOptimization(). + +

TQRect TQPixmap::rect () const +

+ +

Returns the enclosing rectangle (0,0,width(),height()) of the pixmap. +

See also width(), height(), and size(). + +

void TQPixmap::resize ( int w, int h ) +

+Resizes the pixmap to w width and h height. If either w +or h is 0, the pixmap becomes a null pixmap. +

If both w and h are greater than 0, a valid pixmap is +created. New pixels will be uninitialized (random) if the pixmap +is expanded. + +

Examples: desktop/desktop.cpp and grapher/grapher.cpp. +

void TQPixmap::resize ( const TQSize & size ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Resizes the pixmap to size size. + +

bool TQPixmap::save ( const TQString & fileName, const char * format, int quality = -1 ) const +

+Saves the pixmap to the file fileName using the image file +format format and a quality factor quality. quality must +be in the range [0,100] or -1. Specify 0 to obtain small +compressed files, 100 for large uncompressed files, and -1 to use +the default settings. Returns TRUE if successful; otherwise +returns FALSE. +

See also load(), loadFromData(), imageFormat(), TQImage::save(), and TQImageIO. + +

Example: qmag/qmag.cpp. +

bool TQPixmap::save ( TQIODevice * device, const char * format, int quality = -1 ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function writes a TQPixmap to the TQIODevice, device. This +can be used, for example, to save a pixmap directly into a +TQByteArray: +

+    TQPixmap pixmap;
+    TQByteArray ba;
+    TQBuffer buffer( ba );
+    buffer.open( IO_WriteOnly );
+    pixmap.save( &buffer, "PNG" ); // writes pixmap into ba in PNG format
+    
+ + +

bool TQPixmap::selfMask () const +

+ +

Returns TRUE if the pixmap's mask is identical to the pixmap +itself; otherwise returns FALSE. +

See also mask(). + +

int TQPixmap::serialNumber () const +

+ +

Returns a number that uniquely identifies the contents of this +TQPixmap object. This means that multiple TQPixmap objects can have +the same serial number as long as they refer to the same contents. +

An example of where this is useful is for caching TQPixmaps. +

See also TQPixmapCache. + +

void TQPixmap::setDefaultOptimization ( Optimization optimization ) [static] +

+Sets the default pixmap optimization. +

All new pixmaps that are created will use this default +optimization. You may also set optimization for individual pixmaps +using the setOptimization() function. +

The initial default optimization setting is TQPixmap::Normal. +

See also defaultOptimization(), setOptimization(), and optimization(). + +

void TQPixmap::setMask ( const TQBitmap & newmask ) +

+Sets a mask bitmap. +

The newmask bitmap defines the clip mask for this pixmap. Every +pixel in newmask corresponds to a pixel in this pixmap. Pixel +value 1 means opaque and pixel value 0 means transparent. The mask +must have the same size as this pixmap. +

Warning: Setting the mask on a pixmap will cause any alpha channel +data to be cleared. For example: +

+        TQPixmap alpha( "image-with-alpha.png" );
+        TQPixmap alphacopy = alpha;
+        alphacopy.setMask( *alphacopy.mask() );
+    
+ +Now, alpha and alphacopy are visually different. +

Setting a null mask resets the mask. +

See also mask(), createHeuristicMask(), and TQBitmap. + +

void TQPixmap::setOptimization ( Optimization optimization ) +

+Sets pixmap drawing optimization for this pixmap. +

The optimization setting affects pixmap operations, in +particular drawing of transparent pixmaps (bitBlt() a pixmap with +a mask set) and pixmap transformations (the xForm() function). +

Pixmap optimization involves keeping intermediate results in a +cache buffer and using the cache to speed up bitBlt() and xForm(). +The cost is more memory consumption, up to twice as much as an +unoptimized pixmap. +

Use the setDefaultOptimization() to change the default +optimization for all new pixmaps. +

See also optimization(), setDefaultOptimization(), and defaultOptimization(). + +

Example: desktop/desktop.cpp. +

TQSize TQPixmap::size () const +

+ +

Returns the size of the pixmap. +

See also width(), height(), and rect(). + +

Example: movies/main.cpp. +

TQWMatrix TQPixmap::trueMatrix ( const TQWMatrix & matrix, int w, int h ) [static] +

+Returns the actual matrix used for transforming a pixmap with w +width and h height and matrix matrix. +

When transforming a pixmap with xForm(), the transformation matrix +is internally adjusted to compensate for unwanted translation, +i.e. xForm() returns the smallest pixmap containing all +transformed points of the original pixmap. +

This function returns the modified matrix, which maps points +correctly from the original pixmap into the new pixmap. +

See also xForm() and TQWMatrix. + +

int TQPixmap::width () const +

+ +

Returns the width of the pixmap. +

See also height(), size(), and rect(). + +

Examples: desktop/desktop.cpp, movies/main.cpp, scribble/scribble.cpp, scrollview/scrollview.cpp, and xform/xform.cpp. +

TQPixmap TQPixmap::xForm ( const TQWMatrix & matrix ) const +

+Returns a copy of the pixmap that is transformed using matrix. +The original pixmap is not changed. +

The transformation matrix is internally adjusted to compensate +for unwanted translation, i.e. xForm() returns the smallest image +that contains all the transformed points of the original image. +

This function is slow because it involves transformation to a +TQImage, non-trivial computations and a transformation back to a +TQPixmap. +

See also trueMatrix(), TQWMatrix, TQPainter::setWorldMatrix(), and TQImage::xForm(). + +

Examples: desktop/desktop.cpp, fileiconview/qfileiconview.cpp, movies/main.cpp, and qmag/qmag.cpp. +


Related Functions

+

void copyBlt ( TQPixmap * dst, int dx, int dy, const TQPixmap * src, int sx, int sy, int sw, int sh ) +

+ +

Copies a block of pixels from src to dst. The alpha channel +and mask data (if any) is also copied from src. NOTE: src +is not alpha blended or masked when copied to dst. Use +bitBlt() or TQPainter::drawPixmap() to perform alpha blending or +masked drawing. +

sx, sy is the top-left pixel in src (0, 0 by default), dx, dy is the top-left position in dst and sw, \sh is the +size of the copied block (all of src by default). +

If src, dst, sw or sh is 0 (zero), copyBlt() does +nothing. If sw or sh is negative, copyBlt() copies starting +at sx (and respectively, sy) and ending at the right edge +(and respectively, the bottom edge) of src. +

copyBlt() does nothing if src and dst have different depths. + +

TQDataStream & operator<< ( TQDataStream & s, const TQPixmap & pixmap ) +

+ +

Writes the pixmap pixmap to the stream s as a PNG image. +

Note that writing the stream to a file will not produce a valid image file. +

See also TQPixmap::save() and Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQPixmap & pixmap ) +

+ +

Reads a pixmap from the stream s into the pixmap pixmap. +

See also TQPixmap::load() and Format of the TQDataStream operators. + + +


+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/qpixmapcache-h.html b/doc/html/qpixmapcache-h.html new file mode 100644 index 00000000..b9c35ae0 --- /dev/null +++ b/doc/html/qpixmapcache-h.html @@ -0,0 +1,108 @@ + + + + + +qpixmapcache.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpixmapcache.h

+ +

This is the verbatim text of the qpixmapcache.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qpixmapcache.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPixmapCache class
+**
+** Created : 950501
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPIXMAPCACHE_H
+#define TQPIXMAPCACHE_H
+
+#ifndef QT_H
+#include "qpixmap.h"
+#endif // QT_H
+
+
+class Q_EXPORT TQPixmapCache				// global pixmap cache
+{
+public:
+    static  int  cacheLimit();
+    static  void setCacheLimit( int );
+    static  TQPixmap *find( const TQString &key );
+    static  bool find( const TQString &key, TQPixmap& );
+    static  bool insert( const TQString &key, TQPixmap * );
+    static  bool insert( const TQString &key, const TQPixmap& );
+    static  void remove( const TQString &key );
+    static  void clear();
+};
+
+
+#endif // TQPIXMAPCACHE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpixmapcache-members.html b/doc/html/qpixmapcache-members.html new file mode 100644 index 00000000..e36ffbc8 --- /dev/null +++ b/doc/html/qpixmapcache-members.html @@ -0,0 +1,52 @@ + + + + + +TQPixmapCache Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPixmapCache

+ +

This is the complete list of member functions for +TQPixmapCache, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpixmapcache.html b/doc/html/qpixmapcache.html new file mode 100644 index 00000000..d3a56da0 --- /dev/null +++ b/doc/html/qpixmapcache.html @@ -0,0 +1,191 @@ + + + + + +TQPixmapCache Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPixmapCache Class Reference

+ +

The TQPixmapCache class provides an application-global cache for +pixmaps. +More... +

#include <qpixmapcache.h> +

List of all member functions. +

Static Public Members

+
    +
  • int cacheLimit ()
  • +
  • void setCacheLimit ( int n )
  • +
  • TQPixmap * find ( const TQString & key )
  • +
  • bool find ( const TQString & key, TQPixmap & pm )
  • +
  • bool insert ( const TQString & key, TQPixmap * pm )  (obsolete)
  • +
  • bool insert ( const TQString & key, const TQPixmap & pm )
  • +
  • void remove ( const TQString & key )
  • +
  • void clear ()
  • +
+

Detailed Description

+ + +

The TQPixmapCache class provides an application-global cache for +pixmaps. +

+ + +

This class is a tool for optimized drawing with TQPixmap. You can +use it to store temporary pixmaps that are expensive to generate +without using more storage space than cacheLimit(). Use insert() +to insert pixmaps, find() to find them and clear() to empty the +cache. +

For example, TQRadioButton has a non-trivial visual representation +so we don't want to regenerate a pixmap whenever a radio button is +displayed or changes state. In the function +TQRadioButton::drawButton(), we do not draw the radio button +directly. Instead, we first check the global pixmap cache for a +pixmap with the key "$qt_radio_nnn_", where nnn is a numerical +value that specifies the the radio button state. If a pixmap is +found, we bitBlt() it onto the widget and return. Otherwise, we +create a new pixmap, draw the radio button in the pixmap, and +finally insert the pixmap in the global pixmap cache, using the +key above. The bitBlt() is ten times faster than drawing the +radio button. All radio buttons in the program share the cached +pixmap since TQPixmapCache is application-global. +

TQPixmapCache contains no member data, only static functions to +access the global pixmap cache. It creates an internal TQCache for +caching the pixmaps. +

The cache associates a pixmap with a string (key). If two pixmaps +are inserted into the cache using equal keys, then the last pixmap +will hide the first pixmap. The TQDict and TQCache classes do +exactly the same. +

The cache becomes full when the total size of all pixmaps in the +cache exceeds cacheLimit(). The initial cache limit is 1024 KByte +(1 MByte); it is changed with setCacheLimit(). A pixmap takes +roughly width*height*depth/8 bytes of memory. +

See the TQCache documentation for more details about the cache +mechanism. +

See also Environment Classes, Graphics Classes, and Image Processing Classes. + +


Member Function Documentation

+

int TQPixmapCache::cacheLimit () [static] +

+Returns the cache limit (in kilobytes). +

The default setting is 1024 kilobytes. +

See also setCacheLimit(). + +

void TQPixmapCache::clear () [static] +

+Removes all pixmaps from the cache. + +

TQPixmap * TQPixmapCache::find ( const TQString & key ) [static] +

+Returns the pixmap associated with the key in the cache, or +null if there is no such pixmap. +

Warning: If valid, you should copy the pixmap immediately (this is +fast). Subsequent insertions into the cache could cause the +pointer to become invalid. For this reason, we recommend you use +find(const TQString&, TQPixmap&) instead. +

Example: +

+        TQPixmap* pp;
+        TQPixmap p;
+        if ( (pp=TQPixmapCache::find("my_big_image", pm)) ) {
+            p = *pp;
+        } else {
+            p.load("bigimage.png");
+            TQPixmapCache::insert("my_big_image", new TQPixmap(p));
+        }
+        painter->drawPixmap(0, 0, p);
+    
+ + +

bool TQPixmapCache::find ( const TQString & key, TQPixmap & pm ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Looks for a cached pixmap associated with the key in the cache. +If a pixmap is found, the function sets pm to that pixmap and +returns TRUE; otherwise leaves pm alone and returns FALSE. +

Example: +

+        TQPixmap p;
+        if ( !TQPixmapCache::find("my_big_image", pm) ) {
+            pm.load("bigimage.png");
+            TQPixmapCache::insert("my_big_image", pm);
+        }
+        painter->drawPixmap(0, 0, p);
+    
+ + +

bool TQPixmapCache::insert ( const TQString & key, const TQPixmap & pm ) [static] +

+Inserts a copy of the pixmap pm associated with the key into +the cache. +

All pixmaps inserted by the TQt library have a key starting with +"$qt", so your own pixmap keys should never begin "$qt". +

When a pixmap is inserted and the cache is about to exceed its +limit, it removes pixmaps until there is enough room for the +pixmap to be inserted. +

The oldest pixmaps (least recently accessed in the cache) are +deleted when more space is needed. +

See also setCacheLimit(). + +

bool TQPixmapCache::insert ( const TQString & key, TQPixmap * pm ) [static] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Inserts the pixmap pm associated with key into the cache. +Returns TRUE if successful, or FALSE if the pixmap is too big for the cache. +

+Note: pm must be allocated on the heap (using new). +

If this function returns FALSE, you must delete pm yourself. +

If this function returns TRUE, do not use pm afterwards or +keep references to it because any other insertions into the cache, +whether from anywhere in the application or within TQt itself, could cause +the pixmap to be discarded from the cache and the pointer to +become invalid. +

Due to these dangers, we strongly recommend that you use +insert(const TQString&, const TQPixmap&) instead. + + +

void TQPixmapCache::remove ( const TQString & key ) [static] +

+Removes the pixmap associated with key from the cache. + +

void TQPixmapCache::setCacheLimit ( int n ) [static] +

+Sets the cache limit to n kilobytes. +

The default setting is 1024 kilobytes. +

See also cacheLimit(). + + +


+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/qplatinumstyle-h.html b/doc/html/qplatinumstyle-h.html new file mode 100644 index 00000000..d82da57f --- /dev/null +++ b/doc/html/qplatinumstyle-h.html @@ -0,0 +1,162 @@ + + + + + +qplatinumstyle.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qplatinumstyle.h

+ +

This is the verbatim text of the qplatinumstyle.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qplatinumstyle.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of Platinum-like style class
+**
+** Created : 981231
+**
+** Copyright (C) 1998-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPLATINUMSTYLE_H
+#define TQPLATINUMSTYLE_H
+
+#ifndef QT_H
+#include "qwindowsstyle.h"
+#endif // QT_H
+
+#if !defined(QT_NO_STYLE_PLATINUM) || defined(QT_PLUGIN)
+
+class TQPalette;
+
+#if defined(QT_PLUGIN)
+#define Q_EXPORT_STYLE_PLATINUM
+#else
+#define Q_EXPORT_STYLE_PLATINUM Q_EXPORT
+#endif
+
+class Q_EXPORT_STYLE_PLATINUM TQPlatinumStyle : public TQWindowsStyle
+{
+    Q_OBJECT
+public:
+    TQPlatinumStyle();
+    virtual ~TQPlatinumStyle();
+
+    // new Style Stuff
+    void drawPrimitive( PrimitiveElement pe,
+			TQPainter *p,
+			const TQRect &r,
+			const TQColorGroup &cg,
+			SFlags flags = Style_Default,
+			const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawControl( ControlElement element,
+		      TQPainter *p,
+		      const TQWidget *widget,
+		      const TQRect &r,
+		      const TQColorGroup &cg,
+		      SFlags how = Style_Default,
+		      const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawComplexControl( ComplexControl control,
+			     TQPainter *p,
+			     const TQWidget *widget,
+			     const TQRect &r,
+			     const TQColorGroup &cg,
+			     SFlags how = Style_Default,
+#ifdef Q_QDOC
+			     SCFlags sub = SC_All,
+#else
+			     SCFlags sub = (uint)SC_All,
+#endif
+			     SCFlags subActive = SC_None,
+			     const TQStyleOption& = TQStyleOption::Default ) const;
+
+    TQRect querySubControlMetrics( ComplexControl control,
+				  const TQWidget *widget,
+				  SubControl sc,
+				  const TQStyleOption& = TQStyleOption::Default ) const;
+
+    int pixelMetric( PixelMetric metric, const TQWidget *widget = 0 ) const;
+
+    TQRect subRect( SubRect r, const TQWidget *widget ) const;
+
+protected:
+     TQColor mixedColor(const TQColor &, const TQColor &) const;
+    void drawRiffles( TQPainter* p,  int x, int y, int w, int h,
+		      const TQColorGroup &g, bool horizontal ) const;
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQPlatinumStyle( const TQPlatinumStyle & );
+    TQPlatinumStyle& operator=( const TQPlatinumStyle & );
+#endif
+};
+
+#endif // QT_NO_STYLE_PLATINUM
+
+#endif // TQPLATINUMSTYLE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qplatinumstyle-members.html b/doc/html/qplatinumstyle-members.html new file mode 100644 index 00000000..56daeec9 --- /dev/null +++ b/doc/html/qplatinumstyle-members.html @@ -0,0 +1,112 @@ + + + + + +TQPlatinumStyle Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPlatinumStyle

+ +

This is the complete list of member functions for +TQPlatinumStyle, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qplatinumstyle.html b/doc/html/qplatinumstyle.html new file mode 100644 index 00000000..4d32af1e --- /dev/null +++ b/doc/html/qplatinumstyle.html @@ -0,0 +1,84 @@ + + + + + +TQPlatinumStyle Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPlatinumStyle Class Reference

+ +

The TQPlatinumStyle class provides Mac/Platinum look and feel. +More... +

#include <qplatinumstyle.h> +

Inherits TQWindowsStyle. +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • TQColor mixedColor ( const TQColor & c1, const TQColor & c2 ) const
  • +
  • void drawRiffles ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool horizontal ) const
  • +
+

Detailed Description

+ + +The TQPlatinumStyle class provides Mac/Platinum look and feel. +

+

This class implements the Platinum look and feel. It's an +experimental class that tries to resemble a Macinosh-like GUI +style with the TQStyle system. The emulation is currently far from +perfect. +

See also TQAquaStyle and Widget Appearance and Style. + +


Member Function Documentation

+

TQPlatinumStyle::TQPlatinumStyle () +

+Constructs a TQPlatinumStyle + +

void TQPlatinumStyle::drawRiffles ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool horizontal ) const [protected] +

+Draws the nifty Macintosh decoration used on sliders using painter +p and colorgroup g. x, y, w, h and horizontal +specify the geometry and orientation of the riffles. + +

TQColor TQPlatinumStyle::mixedColor ( const TQColor & c1, const TQColor & c2 ) const [protected] +

+Mixes two colors c1 and c2 to a new color. + + +

+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/qpngimagepacker-members.html b/doc/html/qpngimagepacker-members.html new file mode 100644 index 00000000..b4cb8977 --- /dev/null +++ b/doc/html/qpngimagepacker-members.html @@ -0,0 +1,49 @@ + + + + + +TQPNGImagePacker Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPNGImagePacker

+ +

This is the complete list of member functions for +TQPNGImagePacker, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpngimagepacker.html b/doc/html/qpngimagepacker.html new file mode 100644 index 00000000..4e758420 --- /dev/null +++ b/doc/html/qpngimagepacker.html @@ -0,0 +1,88 @@ + + + + + +TQPNGImagePacker Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPNGImagePacker Class Reference

+ +

The TQPNGImagePacker class creates well-compressed PNG animations. +More... +

#include <qpngio.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQPNGImagePacker class creates well-compressed PNG animations. +

+ +

By using transparency, TQPNGImagePacker allows you to build a PNG +image from a sequence of TQImages. +

Images are added using packImage(). +

See also Graphics Classes and Image Processing Classes. + +


Member Function Documentation

+

TQPNGImagePacker::TQPNGImagePacker ( TQIODevice * iod, int storage_depth, int conversionflags ) +

+Creates an image packer that writes PNG data to IO device iod +using a storage_depth bit encoding (use 8 or 32, depending on +the desired quality and compression retquirements). +

If the image needs to be modified to fit in a lower-resolution +result (e.g. converting from 32-bit to 8-bit), use the conversionflags to specify how you'd prefer this to happen. +

See also TQt::ImageConversionFlags. + +

bool TQPNGImagePacker::packImage ( const TQImage & img ) +

+Adds the image img to the PNG animation, analyzing the +differences between this and the previous image to improve +compression. + +

void TQPNGImagePacker::setPixelAlignment ( int x ) +

+Aligns pixel differences to x pixels. For example, using 8 can +improve playback on certain hardware. Normally the default of +1-pixel alignment (i.e. no alignment) gives better compression and +performance. + + +

+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/qpngio-h.html b/doc/html/qpngio-h.html new file mode 100644 index 00000000..7d173b4e --- /dev/null +++ b/doc/html/qpngio-h.html @@ -0,0 +1,152 @@ + + + + + +qpngio.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpngio.h

+ +

This is the verbatim text of the qpngio.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qpngio.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of PNG TQImage IOHandler
+**
+** Created : 970521
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPNGIO_H
+#define TQPNGIO_H
+
+#ifndef QT_H
+#include "qimage.h"
+#endif // QT_H
+
+#ifndef QT_NO_IMAGEIO_PNG
+
+void qInitPngIO();
+
+class TQIODevice;
+
+#ifndef Q_PNGEXPORT
+#if !defined(QT_PLUGIN)
+#define Q_PNGEXPORT Q_EXPORT
+#else
+#define Q_PNGEXPORT
+#endif
+#endif
+
+class Q_PNGEXPORT TQPNGImageWriter {
+public:
+    TQPNGImageWriter(TQIODevice*);
+    ~TQPNGImageWriter();
+
+    enum DisposalMethod { Unspecified, NoDisposal, RestoreBackground, RestoreImage };
+    void setDisposalMethod(DisposalMethod);
+    void setLooping(int loops=0); // 0 == infinity
+    void setFrameDelay(int msecs);
+    void setGamma(float);
+
+    bool writeImage(const TQImage& img, int x, int y);
+    bool writeImage(const TQImage& img, int quality, int x, int y);
+    bool writeImage(const TQImage& img)
+	{ return writeImage(img, 0, 0); }
+    bool writeImage(const TQImage& img, int quality)
+	{ return writeImage(img, quality, 0, 0); }
+
+    TQIODevice* device() { return dev; }
+
+private:
+    TQIODevice* dev;
+    int frames_written;
+    DisposalMethod disposal;
+    int looping;
+    int ms_delay;
+    float gamma;
+};
+
+class Q_PNGEXPORT TQPNGImagePacker : public TQPNGImageWriter {
+public:
+    TQPNGImagePacker(TQIODevice*, int depth, int convflags);
+
+    void setPixelAlignment(int x);
+    bool packImage(const TQImage& img);
+
+private:
+    TQImage previous;
+    int depth;
+    int convflags;
+    int alignx;
+};
+
+#endif // QT_NO_IMAGEIO_PNG
+
+#endif // TQPNGIO_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpoint-h.html b/doc/html/qpoint-h.html new file mode 100644 index 00000000..9a777a25 --- /dev/null +++ b/doc/html/qpoint-h.html @@ -0,0 +1,264 @@ + + + + + +qpoint.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpoint.h

+ +

This is the verbatim text of the qpoint.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qpoint.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPoint class
+**
+** Created : 931028
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPOINT_H
+#define TQPOINT_H
+
+#ifndef QT_H
+#include "qwindowdefs.h"
+#endif // QT_H
+
+
+class Q_EXPORT TQPoint
+{
+public:
+    TQPoint();
+    TQPoint( int xpos, int ypos );
+
+    bool   isNull()	const;
+
+    int	   x()		const;
+    int	   y()		const;
+    void   setX( int x );
+    void   setY( int y );
+
+    int manhattanLength() const;
+
+    TQCOORD &rx();
+    TQCOORD &ry();
+
+    TQPoint &operator+=( const TQPoint &p );
+    TQPoint &operator-=( const TQPoint &p );
+    TQPoint &operator*=( int c );
+    TQPoint &operator*=( double c );
+    TQPoint &operator/=( int c );
+    TQPoint &operator/=( double c );
+
+    friend inline bool	 operator==( const TQPoint &, const TQPoint & );
+    friend inline bool	 operator!=( const TQPoint &, const TQPoint & );
+    friend inline const TQPoint operator+( const TQPoint &, const TQPoint & );
+    friend inline const TQPoint operator-( const TQPoint &, const TQPoint & );
+    friend inline const TQPoint operator*( const TQPoint &, int );
+    friend inline const TQPoint operator*( int, const TQPoint & );
+    friend inline const TQPoint operator*( const TQPoint &, double );
+    friend inline const TQPoint operator*( double, const TQPoint & );
+    friend inline const TQPoint operator-( const TQPoint & );
+    friend inline const TQPoint operator/( const TQPoint &, int );
+    friend inline const TQPoint operator/( const TQPoint &, double );
+
+private:
+    static void warningDivByZero();
+
+#if defined(Q_OS_MAC)
+    TQCOORD yp;
+    TQCOORD xp;
+#else
+    TQCOORD xp;
+    TQCOORD yp;
+#endif
+};
+
+
+/*****************************************************************************
+  TQPoint stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQPoint & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQPoint & );
+#endif
+
+/*****************************************************************************
+  TQPoint inline functions
+ *****************************************************************************/
+
+inline TQPoint::TQPoint()
+{ xp=0; yp=0; }
+
+inline TQPoint::TQPoint( int xpos, int ypos )
+{ xp=(TQCOORD)xpos; yp=(TQCOORD)ypos; }
+
+inline bool TQPoint::isNull() const
+{ return xp == 0 && yp == 0; }
+
+inline int TQPoint::x() const
+{ return xp; }
+
+inline int TQPoint::y() const
+{ return yp; }
+
+inline void TQPoint::setX( int x )
+{ xp = (TQCOORD)x; }
+
+inline void TQPoint::setY( int y )
+{ yp = (TQCOORD)y; }
+
+inline TQCOORD &TQPoint::rx()
+{ return xp; }
+
+inline TQCOORD &TQPoint::ry()
+{ return yp; }
+
+inline TQPoint &TQPoint::operator+=( const TQPoint &p )
+{ xp+=p.xp; yp+=p.yp; return *this; }
+
+inline TQPoint &TQPoint::operator-=( const TQPoint &p )
+{ xp-=p.xp; yp-=p.yp; return *this; }
+
+inline TQPoint &TQPoint::operator*=( int c )
+{ xp*=(TQCOORD)c; yp*=(TQCOORD)c; return *this; }
+
+inline TQPoint &TQPoint::operator*=( double c )
+{ xp=(TQCOORD)(xp*c); yp=(TQCOORD)(yp*c); return *this; }
+
+inline bool operator==( const TQPoint &p1, const TQPoint &p2 )
+{ return p1.xp == p2.xp && p1.yp == p2.yp; }
+
+inline bool operator!=( const TQPoint &p1, const TQPoint &p2 )
+{ return p1.xp != p2.xp || p1.yp != p2.yp; }
+
+inline const TQPoint operator+( const TQPoint &p1, const TQPoint &p2 )
+{ return TQPoint(p1.xp+p2.xp, p1.yp+p2.yp); }
+
+inline const TQPoint operator-( const TQPoint &p1, const TQPoint &p2 )
+{ return TQPoint(p1.xp-p2.xp, p1.yp-p2.yp); }
+
+inline const TQPoint operator*( const TQPoint &p, int c )
+{ return TQPoint(p.xp*c, p.yp*c); }
+
+inline const TQPoint operator*( int c, const TQPoint &p )
+{ return TQPoint(p.xp*c, p.yp*c); }
+
+inline const TQPoint operator*( const TQPoint &p, double c )
+{ return TQPoint((TQCOORD)(p.xp*c), (TQCOORD)(p.yp*c)); }
+
+inline const TQPoint operator*( double c, const TQPoint &p )
+{ return TQPoint((TQCOORD)(p.xp*c), (TQCOORD)(p.yp*c)); }
+
+inline const TQPoint operator-( const TQPoint &p )
+{ return TQPoint(-p.xp, -p.yp); }
+
+inline TQPoint &TQPoint::operator/=( int c )
+{
+#if defined(QT_CHECK_MATH)
+    if ( c == 0 )
+	warningDivByZero();
+#endif
+    xp/=(TQCOORD)c;
+    yp/=(TQCOORD)c;
+    return *this;
+}
+
+inline TQPoint &TQPoint::operator/=( double c )
+{
+#if defined(QT_CHECK_MATH)
+    if ( c == 0.0 )
+	warningDivByZero();
+#endif
+    xp=(TQCOORD)(xp/c);
+    yp=(TQCOORD)(yp/c);
+    return *this;
+}
+
+inline const TQPoint operator/( const TQPoint &p, int c )
+{
+#if defined(QT_CHECK_MATH)
+    if ( c == 0 )
+	TQPoint::warningDivByZero();
+#endif
+    return TQPoint(p.xp/c, p.yp/c);
+}
+
+inline const TQPoint operator/( const TQPoint &p, double c )
+{
+#if defined(QT_CHECK_MATH)
+    if ( c == 0.0 )
+	TQPoint::warningDivByZero();
+#endif
+    return TQPoint((TQCOORD)(p.xp/c), (TQCOORD)(p.yp/c));
+}
+
+#define Q_DEFINED_QPOINT
+#include "qwinexport.h"
+#endif // TQPOINT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpoint-members.html b/doc/html/qpoint-members.html new file mode 100644 index 00000000..e797568f --- /dev/null +++ b/doc/html/qpoint-members.html @@ -0,0 +1,59 @@ + + + + + +TQPoint Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPoint

+ +

This is the complete list of member functions for +TQPoint, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpoint.html b/doc/html/qpoint.html new file mode 100644 index 00000000..3408561a --- /dev/null +++ b/doc/html/qpoint.html @@ -0,0 +1,378 @@ + + + + + +TQPoint Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPoint Class Reference

+ +

The TQPoint class defines a point in the plane. +More... +

#include <qpoint.h> +

List of all member functions. +

Public Members

+ +

Related Functions

+
    +
  • bool operator== ( const TQPoint & p1, const TQPoint & p2 )
  • +
  • bool operator!= ( const TQPoint & p1, const TQPoint & p2 )
  • +
  • const TQPoint operator+ ( const TQPoint & p1, const TQPoint & p2 )
  • +
  • const TQPoint operator- ( const TQPoint & p1, const TQPoint & p2 )
  • +
  • const TQPoint operator* ( const TQPoint & p, int c )
  • +
  • const TQPoint operator* ( int c, const TQPoint & p )
  • +
  • const TQPoint operator* ( const TQPoint & p, double c )
  • +
  • const TQPoint operator* ( double c, const TQPoint & p )
  • +
  • const TQPoint operator- ( const TQPoint & p )
  • +
  • const TQPoint operator/ ( const TQPoint & p, int c )
  • +
  • const TQPoint operator/ ( const TQPoint & p, double c )
  • +
  • TQDataStream & operator<< ( TQDataStream & s, const TQPoint & p )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQPoint & p )
  • +
+

Detailed Description

+ + +The TQPoint class defines a point in the plane. +

+ + +

A point is specified by an x coordinate and a y coordinate. +

The coordinate type is TQCOORD (a 32-bit integer). The minimum +value of TQCOORD is TQCOORD_MIN (-2147483648) and the maximum +value is TQCOORD_MAX (2147483647). +

The coordinates are accessed by the functions x() and y(); they +can be set by setX() and setY() or by the reference functions rx() +and ry(). +

Given a point p, the following statements are all equivalent: +

+        p.setX( p.x() + 1 );
+        p += TQPoint( 1, 0 );
+        p.rx()++;
+    
+ +

A TQPoint can also be used as a vector. Addition and subtraction +of TQPoints are defined as for vectors (each component is added +separately). You can divide or multiply a TQPoint by an int or a +double. The function manhattanLength() gives an inexpensive +approximation of the length of the TQPoint interpreted as a vector. +

Example: +

+        //TQPoint oldPos is defined somewhere else
+        MyWidget::mouseMoveEvent( TQMouseEvent *e )
+        {
+            TQPoint vector = e->pos() - oldPos;
+            if ( vector.manhattanLength() > 3 )
+            ... //mouse has moved more than 3 pixels since oldPos
+        }
+    
+ +

TQPoints can be compared for equality or inequality, and they can +be written to and read from a TQStream. +

See also TQPointArray, TQSize, TQRect, Graphics Classes, and Image Processing Classes. + +


Member Function Documentation

+

TQPoint::TQPoint () +

+ +

Constructs a point with coordinates (0, 0) (isNull() returns TRUE). + +

TQPoint::TQPoint ( int xpos, int ypos ) +

+ +

Constructs a point with x value xpos and y value ypos. + +

bool TQPoint::isNull () const +

+ +

Returns TRUE if both the x value and the y value are 0; otherwise +returns FALSE. + +

int TQPoint::manhattanLength () const +

+Returns the sum of the absolute values of x() and y(), +traditionally known as the "Manhattan length" of the vector from +the origin to the point. The tradition arises because such +distances apply to travelers who can only travel on a rectangular +grid, like the streets of Manhattan. +

This is a useful, and tquick to calculate, approximation to the +true length: sqrt(pow(x(),2)+pow(y(),2)). + +

TQPoint & TQPoint::operator*= ( int c ) +

+ +

Multiplies this point's x and y by c, and returns a reference +to this point. +

Example: +

+        TQPoint p( -1, 4 );
+        p *= 2;            // p becomes (-2,8)
+    
+ + +

TQPoint & TQPoint::operator*= ( double c ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Multiplies this point's x and y by c, and returns a reference +to this point. +

Example: +

+        TQPoint p( -1, 4 );
+        p *= 2.5;          // p becomes (-3,10)
+    
+ +

Note that the result is truncated because points are held as +integers. + +

TQPoint & TQPoint::operator+= ( const TQPoint & p ) +

+ +

Adds point p to this point and returns a reference to this +point. +

Example: +

+        TQPoint p(  3, 7 );
+        TQPoint q( -1, 4 );
+        p += q;            // p becomes (2,11)
+    
+ + +

TQPoint & TQPoint::operator-= ( const TQPoint & p ) +

+ +

Subtracts point p from this point and returns a reference to +this point. +

Example: +

+        TQPoint p(  3, 7 );
+        TQPoint q( -1, 4 );
+        p -= q;            // p becomes (4,3)
+    
+ + +

TQPoint & TQPoint::operator/= ( int c ) +

+ +

Divides both x and y by c, and returns a reference to this +point. +

Example: +

+        TQPoint p( -2, 8 );
+        p /= 2;            // p becomes (-1,4)
+    
+ + +

TQPoint & TQPoint::operator/= ( double c ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Divides both x and y by c, and returns a reference to this +point. +

Example: +

+        TQPoint p( -3, 10 );
+        p /= 2.5;           // p becomes (-1,4)
+    
+ +

Note that the result is truncated because points are held as +integers. + +

TQCOORD & TQPoint::rx () +

+ +

Returns a reference to the x coordinate of the point. +

Using a reference makes it possible to directly manipulate x. +

Example: +

+        TQPoint p( 1, 2 );
+        p.rx()--;         // p becomes (0, 2)
+    
+ +

See also ry(). + +

TQCOORD & TQPoint::ry () +

+ +

Returns a reference to the y coordinate of the point. +

Using a reference makes it possible to directly manipulate y. +

Example: +

+        TQPoint p( 1, 2 );
+        p.ry()++;         // p becomes (1, 3)
+    
+ +

See also rx(). + +

void TQPoint::setX ( int x ) +

+ +

Sets the x coordinate of the point to x. +

See also x() and setY(). + +

Example: t14/cannon.cpp. +

void TQPoint::setY ( int y ) +

+ +

Sets the y coordinate of the point to y. +

See also y() and setX(). + +

Example: t14/cannon.cpp. +

int TQPoint::x () const +

+ +

Returns the x coordinate of the point. +

See also setX() and y(). + +

Examples: canvas/canvas.cpp, chart/canvasview.cpp, dirview/dirview.cpp, fileiconview/qfileiconview.cpp, helpsystem/tooltip.cpp, life/life.cpp, and t14/cannon.cpp. +

int TQPoint::y () const +

+ +

Returns the y coordinate of the point. +

See also setY() and x(). + +

Examples: canvas/canvas.cpp, chart/canvasview.cpp, fileiconview/qfileiconview.cpp, helpsystem/tooltip.cpp, life/life.cpp, t14/cannon.cpp, and themes/wood.cpp. +


Related Functions

+

bool operator!= ( const TQPoint & p1, const TQPoint & p2 ) +

+ +

+

Returns TRUE if p1 and p2 are not equal; otherwise returns FALSE. + +

const TQPoint operator* ( const TQPoint & p, int c ) +

+ +

+

Returns the TQPoint formed by multiplying both components of p +by c. + +

const TQPoint operator* ( int c, const TQPoint & p ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns the TQPoint formed by multiplying both components of p +by c. + +

const TQPoint operator* ( const TQPoint & p, double c ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns the TQPoint formed by multiplying both components of p +by c. +

Note that the result is truncated because points are held as +integers. + +

const TQPoint operator* ( double c, const TQPoint & p ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns the TQPoint formed by multiplying both components of p +by c. +

Note that the result is truncated because points are held as +integers. + +

const TQPoint operator+ ( const TQPoint & p1, const TQPoint & p2 ) +

+ +

+

Returns the sum of p1 and p2; each component is added separately. + +

const TQPoint operator- ( const TQPoint & p1, const TQPoint & p2 ) +

+ +

+

Returns p2 subtracted from p1; each component is subtracted +separately. + +

const TQPoint operator- ( const TQPoint & p ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns the TQPoint formed by changing the sign of both components +of p, equivalent to TQPoint(0,0) - p. + +

const TQPoint operator/ ( const TQPoint & p, int c ) +

+ +

+

Returns the TQPoint formed by dividing both components of p by +c. + +

const TQPoint operator/ ( const TQPoint & p, double c ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns the TQPoint formed by dividing both components of p +by c. +

Note that the result is truncated because points are held as +integers. + +

TQDataStream & operator<< ( TQDataStream & s, const TQPoint & p ) +

+ +

Writes point p to the stream s and returns a reference to +the stream. +

See also Format of the TQDataStream operators. + +

bool operator== ( const TQPoint & p1, const TQPoint & p2 ) +

+ +

+

Returns TRUE if p1 and p2 are equal; otherwise returns FALSE. + +

TQDataStream & operator>> ( TQDataStream & s, TQPoint & p ) +

+ +

Reads a TQPoint from the stream s into point p and returns a +reference to the stream. +

See also Format of the TQDataStream operators. + + +


+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/qpointarray-h.html b/doc/html/qpointarray-h.html new file mode 100644 index 00000000..e1adf274 --- /dev/null +++ b/doc/html/qpointarray-h.html @@ -0,0 +1,163 @@ + + + + + +qpointarray.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpointarray.h

+ +

This is the verbatim text of the qpointarray.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qpointarray.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPointArray class
+**
+** Created : 940213
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPOINTARRAY_H
+#define TQPOINTARRAY_H
+
+#ifndef QT_H
+#include "qmemarray.h"
+#include "qpoint.h"
+#endif // QT_H
+
+
+#if defined(Q_TEMPLATEDLL)
+//Q_TEMPLATE_EXTERN template class Q_EXPORT TQMemArray<TQPoint>;
+#endif
+
+class Q_EXPORT TQPointArray : public TQMemArray<TQPoint>
+{
+public:
+    TQPointArray() {}
+    ~TQPointArray() {}
+    TQPointArray( int size ) : TQMemArray<TQPoint>( size ) {}
+    TQPointArray( const TQPointArray &a ) : TQMemArray<TQPoint>( a ) {}
+    TQPointArray( const TQRect &r, bool closed=FALSE );
+    TQPointArray( int nPoints, const TQCOORD *points );
+
+    TQPointArray	 &operator=( const TQPointArray &a )
+	{ return (TQPointArray&)assign( a ); }
+
+    TQPointArray copy() const
+	{ TQPointArray tmp; return *((TQPointArray*)&tmp.duplicate(*this)); }
+
+    void    translate( int dx, int dy );
+    TQRect   boundingRect() const;
+
+    void    point( uint i, int *x, int *y ) const;
+    TQPoint  point( uint i ) const;
+    void    setPoint( uint i, int x, int y );
+    void    setPoint( uint i, const TQPoint &p );
+    bool    setPoints( int nPoints, const TQCOORD *points );
+    bool    setPoints( int nPoints, int firstx, int firsty, ... );
+    bool    putPoints( int index, int nPoints, const TQCOORD *points );
+    bool    putPoints( int index, int nPoints, int firstx, int firsty, ... );
+    bool    putPoints( int index, int nPoints,
+		       const TQPointArray & from, int fromIndex=0 );
+
+    void    makeArc( int x, int y, int w, int h, int a1, int a2 );
+    void    makeEllipse( int x, int y, int w, int h );
+    void    makeArc( int x, int y, int w, int h, int a1, int a2,
+		     const TQWMatrix& );
+#ifndef QT_NO_BEZIER
+    TQPointArray cubicBezier() const;
+#endif
+    void*  shortPoints( int index = 0, int nPoints = -1 ) const;
+    static void cleanBuffers();
+
+protected:
+    static uint splen;
+    static void* sp;
+};
+
+
+/*****************************************************************************
+  TQPointArray stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQPointArray & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQPointArray & );
+#endif
+
+/*****************************************************************************
+  Misc. TQPointArray functions
+ *****************************************************************************/
+
+inline void TQPointArray::setPoint( uint i, const TQPoint &p )
+{
+    setPoint( i, p.x(), p.y() );
+}
+
+
+#endif // TQPOINTARRAY_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpointarray-members.html b/doc/html/qpointarray-members.html new file mode 100644 index 00000000..6fee4a8c --- /dev/null +++ b/doc/html/qpointarray-members.html @@ -0,0 +1,83 @@ + + + + + +TQPointArray Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPointArray

+ +

This is the complete list of member functions for +TQPointArray, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpointarray.html b/doc/html/qpointarray.html new file mode 100644 index 00000000..049de4c7 --- /dev/null +++ b/doc/html/qpointarray.html @@ -0,0 +1,285 @@ + + + + + +TQPointArray Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPointArray Class Reference

+ +

The TQPointArray class provides an array of points. +More... +

#include <qpointarray.h> +

Inherits TQMemArray<TQPoint>. +

List of all member functions. +

Public Members

+
    +
  • TQPointArray ()
  • +
  • ~TQPointArray ()
  • +
  • TQPointArray ( int size )
  • +
  • TQPointArray ( const TQPointArray & a )
  • +
  • TQPointArray ( const TQRect & r, bool closed = FALSE )
  • +
  • TQPointArray & operator= ( const TQPointArray & a )
  • +
  • TQPointArray copy () const
  • +
  • void translate ( int dx, int dy )
  • +
  • TQRect boundingRect () const
  • +
  • void point ( uint index, int * x, int * y ) const
  • +
  • TQPoint point ( uint index ) const
  • +
  • void setPoint ( uint index, int x, int y )
  • +
  • void setPoint ( uint i, const TQPoint & p )
  • +
  • bool putPoints ( int index, int nPoints, int firstx, int firsty, ... )
  • +
  • bool putPoints ( int index, int nPoints, const TQPointArray & from, int fromIndex = 0 )
  • +
  • void makeArc ( int x, int y, int w, int h, int a1, int a2 )
  • +
  • void makeEllipse ( int x, int y, int w, int h )
  • +
  • void makeArc ( int x, int y, int w, int h, int a1, int a2, const TQWMatrix & xf )
  • +
  • TQPointArray cubicBezier () const
  • +
+

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQPointArray & a )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQPointArray & a )
  • +
+

Detailed Description

+ + +The TQPointArray class provides an array of points. +

+ + +

A TQPointArray is an array of TQPoint objects. In addition to the +functions provided by TQMemArray, TQPointArray provides some +point-specific functions. +

For convenient reading and writing of the point data use +setPoints(), putPoints(), point(), and setPoint(). +

For geometry operations use boundingRect() and translate(). There +is also the TQWMatrix::map() function for more general +transformations of TQPointArrays. You can also create arcs and +ellipses with makeArc() and makeEllipse(). +

Among others, TQPointArray is used by TQPainter::drawLineSegments(), +TQPainter::drawPolyline(), TQPainter::drawPolygon() and +TQPainter::drawCubicBezier(). +

Note that because this class is a TQMemArray, copying an array and +modifying the copy modifies the original as well, i.e. a shallow copy. If you need a deep copy use copy() or detach(), for example: +

+        void drawGiraffe( const TQPointArray & r, TQPainter * p )
+        {
+            TQPointArray tmp = r;
+            tmp.detach();
+            // some code that modifies tmp
+            p->drawPoints( tmp );
+        }
+    
+ +

If you forget the tmp.detach(), the const array will be modified. +

See also TQPainter, TQWMatrix, TQMemArray, Graphics Classes, Image Processing Classes, and Implicitly and Explicitly Shared Classes. + +


Member Function Documentation

+

TQPointArray::TQPointArray () +

+ +

Constructs a null point array. +

See also isNull(). + +

TQPointArray::TQPointArray ( int size ) +

+ +

Constructs a point array with room for size points. Makes a +null array if size == 0. +

See also resize() and isNull(). + +

TQPointArray::TQPointArray ( const TQPointArray & a ) +

+ +

Constructs a shallow copy of the point array a. +

See also copy() and detach(). + +

TQPointArray::TQPointArray ( const TQRect & r, bool closed = FALSE ) +

+Constructs a point array from the rectangle r. +

If closed is FALSE, then the point array just contains the +following four points in the listed order: r.topLeft(), +r.topRight(), r.bottomRight() and r.bottomLeft(). +

If closed is TRUE, then a fifth point is set to r.topLeft(). + +

TQPointArray::~TQPointArray () +

+ +

Destroys the point array. + +

TQRect TQPointArray::boundingRect () const +

+Returns the bounding rectangle of the points in the array, or +TQRect(0,0,0,0) if the array is empty. + +

TQPointArray TQPointArray::copy () const +

+ +

Creates a deep copy of the array. +

See also detach(). + +

TQPointArray TQPointArray::cubicBezier () const +

+Returns the Bezier points for the four control points in this +array. + +

void TQPointArray::makeArc ( int x, int y, int w, int h, int a1, int a2 ) +

+Sets the points of the array to those describing an arc of an +ellipse with size, width w by height h, and position (x, +y), starting from angle a1 and spanning by angle a2. The +resulting array has sufficient resolution for pixel accuracy (see +the overloaded function which takes an additional TQWMatrix +parameter). +

Angles are specified in 16ths of a degree, i.e. a full circle +equals 5760 (16*360). Positive values mean counter-clockwise, +whereas negative values mean the clockwise direction. Zero degrees +is at the 3 o'clock position. +

See the angle diagram. + +

void TQPointArray::makeArc ( int x, int y, int w, int h, int a1, int a2, const TQWMatrix & xf ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the points of the array to those describing an arc of an +ellipse with width w and height h and position (x, y), +starting from angle a1, and spanning angle by a2, and +transformed by the matrix xf. The resulting array has +sufficient resolution for pixel accuracy. +

Angles are specified in 16ths of a degree, i.e. a full circle +equals 5760 (16*360). Positive values mean counter-clockwise, +whereas negative values mean the clockwise direction. Zero degrees +is at the 3 o'clock position. +

See the angle diagram. + +

void TQPointArray::makeEllipse ( int x, int y, int w, int h ) +

+Sets the points of the array to those describing an ellipse with +size, width w by height h, and position (x, y). +

The returned array has sufficient resolution for use as pixels. + +

TQPointArray & TQPointArray::operator= ( const TQPointArray & a ) +

+ +

Assigns a shallow copy of a to this point array and returns a +reference to this point array. +

Equivalent to assign(a). +

See also copy() and detach(). + +

void TQPointArray::point ( uint index, int * x, int * y ) const +

+Reads the coordinates of the point at position index within the +array and writes them into *x and *y. + +

TQPoint TQPointArray::point ( uint index ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the point at position index within the array. + +

bool TQPointArray::putPoints ( int index, int nPoints, int firstx, int firsty, ... ) +

+Copies nPoints points from the variable argument list into this +point array from position index, and resizes the point array if +index+nPoints exceeds the size of the array. +

Returns TRUE if successful, or FALSE if the array could not be +resized (typically due to lack of memory). +

The example code creates an array with three points (4,5), (6,7) +and (8,9), by expanding the array from 1 to 3 points: +

+        TQPointArray a( 1 );
+        a[0] = TQPoint( 4, 5 );
+        a.putPoints( 1, 2, 6,7, 8,9 ); // index == 1, points == 2
+    
+ +

This has the same result, but here putPoints overwrites rather +than extends: +

+        TQPointArray a( 3 );
+        a.putPoints( 0, 3, 4,5, 0,0, 8,9 );
+        a.putPoints( 1, 1, 6,7 );
+    
+ +

The points are given as a sequence of integers, starting with firstx then firsty, and so on. +

See also resize(). + +

bool TQPointArray::putPoints ( int index, int nPoints, const TQPointArray & from, int fromIndex = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This version of the function copies nPoints from from into +this array, starting at index in this array and fromIndex in +from. fromIndex is 0 by default. +

+        TQPointArray a;
+        a.putPoints( 0, 3, 1,2, 0,0, 5,6 );
+        // a is now the three-point array ( 1,2, 0,0, 5,6 );
+        TQPointArray b;
+        b.putPoints( 0, 3, 4,4, 5,5, 6,6 );
+        // b is now ( 4,4, 5,5, 6,6 );
+        a.putPoints( 2, 3, b );
+        // a is now ( 1,2, 0,0, 4,4, 5,5, 6,6 );
+    
+ + +

void TQPointArray::setPoint ( uint index, int x, int y ) +

+Sets the point at position index in the array to (x, y). + +

Example: themes/wood.cpp. +

void TQPointArray::setPoint ( uint i, const TQPoint & p ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the point at array index i to p. + +

void TQPointArray::translate ( int dx, int dy ) +

+Translates all points in the array by (dx, dy). + +

Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQPointArray & a ) +

+ +

Writes the point array, a to the stream s and returns a +reference to the stream. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQPointArray & a ) +

+ +

Reads a point array, a from the stream s and returns a +reference to the stream. +

See also Format of the TQDataStream operators. + + +


+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/qpopmenu-fancy.png b/doc/html/qpopmenu-fancy.png new file mode 100644 index 00000000..5c721987 Binary files /dev/null and b/doc/html/qpopmenu-fancy.png differ diff --git a/doc/html/qpopmenu-m.png b/doc/html/qpopmenu-m.png new file mode 100644 index 00000000..30e1040b Binary files /dev/null and b/doc/html/qpopmenu-m.png differ diff --git a/doc/html/qpopmenu-w.png b/doc/html/qpopmenu-w.png new file mode 100644 index 00000000..36abd52f Binary files /dev/null and b/doc/html/qpopmenu-w.png differ diff --git a/doc/html/qpopupmenu-h.html b/doc/html/qpopupmenu-h.html new file mode 100644 index 00000000..88ef3f1a --- /dev/null +++ b/doc/html/qpopupmenu-h.html @@ -0,0 +1,245 @@ + + + + + +qpopupmenu.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpopupmenu.h

+ +

This is the verbatim text of the qpopupmenu.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qpopupmenu.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPopupMenu class
+**
+** Created : 941128
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPOPUPMENU_H
+#define TQPOPUPMENU_H
+
+#ifndef QT_H
+#include "qframe.h"
+#include "qmenudata.h"
+#endif // QT_H
+
+#ifndef QT_NO_POPUPMENU
+class TQPopupMenuPrivate;
+
+class Q_EXPORT TQPopupMenu : public TQFrame, public TQMenuData
+{
+    Q_OBJECT
+    Q_PROPERTY( bool checkable READ isCheckable WRITE setCheckable )
+public:
+    TQPopupMenu( TQWidget* parent=0, const char* name=0 );
+    ~TQPopupMenu();
+
+    void	popup( const TQPoint & pos, int indexAtPoint = -1 ); // open
+    void	updateItem( int id );
+
+    virtual void	setCheckable( bool );
+    bool	isCheckable() const;
+
+    void	setFont( const TQFont & );
+    void	show();
+    void	hide();
+
+    int		exec();
+    int 	exec( const TQPoint & pos, int indexAtPoint = 0 ); // modal
+
+    virtual void	setActiveItem( int );
+    TQSize	sizeHint() const;
+
+    int 	idAt( int index ) const { return TQMenuData::idAt( index ); }
+    int 	idAt( const TQPoint& pos ) const;
+
+    bool 	customWhatsThis() const;
+
+    int		insertTearOffHandle( int id=-1, int index=-1 );
+
+    void	activateItemAt( int index );
+    TQRect	itemGeometry( int index );
+
+
+signals:
+    void	activated( int itemId );
+    void	highlighted( int itemId );
+    void	activatedRedirect( int itemId ); // to parent menu
+    void	highlightedRedirect( int itemId );
+    void	aboutToShow();
+    void	aboutToHide();
+
+protected:
+    int 	itemHeight( int ) const;
+    int 	itemHeight( TQMenuItem* mi ) const;
+    void 	drawItem( TQPainter* p, int tab, TQMenuItem* mi,
+		   bool act, int x, int y, int w, int h);
+
+    void 	drawContents( TQPainter * );
+
+    void 	closeEvent( TQCloseEvent *e );
+    void	paintEvent( TQPaintEvent * );
+    void	mousePressEvent( TQMouseEvent * );
+    void	mouseReleaseEvent( TQMouseEvent * );
+    void	mouseMoveEvent( TQMouseEvent * );
+    void	keyPressEvent( TQKeyEvent * );
+    void	focusInEvent( TQFocusEvent * );
+    void	focusOutEvent( TQFocusEvent * );
+    void	timerEvent( TQTimerEvent * );
+    void	leaveEvent( TQEvent * );
+    void 	styleChange( TQStyle& );
+    void	enabledChange( bool );
+    int 	columns() const;
+
+    bool	focusNextPrevChild( bool next );
+
+    int		itemAtPos( const TQPoint &, bool ignoreSeparator = TRUE ) const;
+
+private slots:
+    void	subActivated( int itemId );
+    void	subHighlighted( int itemId );
+#ifndef QT_NO_ACCEL
+    void	accelActivated( int itemId );
+    void	accelDestroyed();
+#endif
+    void	popupDestroyed( TQObject* );
+    void	modalActivation( int );
+
+    void	subMenuTimer();
+    void	subScrollTimer();
+    void	allowAnimation();
+    void     toggleTearOff();
+
+    void        performDelayedChanges();
+
+private:
+    void        updateScrollerState();
+    void	menuContentsChanged();
+    void	menuStateChanged();
+    void        performDelayedContentsChanged();
+    void        performDelayedStateChanged();
+    void	menuInsPopup( TQPopupMenu * );
+    void	menuDelPopup( TQPopupMenu * );
+    void	frameChanged();
+
+    void	actSig( int, bool = FALSE );
+    void	hilitSig( int );
+    virtual void setFirstItemActive();
+    void	hideAllPopups();
+    void	hidePopups();
+    bool	tryMenuBar( TQMouseEvent * );
+    void	byeMenuBar();
+
+    TQSize	updateSize(bool force_recalc=FALSE, bool do_resize=TRUE);
+    void	updateRow( int row );
+#ifndef QT_NO_ACCEL
+    void	updateAccel( TQWidget * );
+    void	enableAccel( bool );
+#endif
+    TQPopupMenuPrivate  *d;
+#ifndef QT_NO_ACCEL
+    TQAccel     *autoaccel;
+#endif
+
+#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+    bool macPopupMenu(const TQPoint &, int);
+    uint mac_dirty_popup : 1;
+#endif
+
+    int popupActive;
+    int tab;
+    uint accelDisabled : 1;
+    uint checkable : 1;
+    uint connectModalRecursionSafety : 1;
+    uint tornOff : 1;
+    uint pendingDelayedContentsChanges : 1;
+    uint pendingDelayedStateChanges : 1;
+    int maxPMWidth;
+    int ncols;
+    bool	snapToMouse;
+    bool	tryMouseEvent( TQPopupMenu *, TQMouseEvent * );
+
+    friend class TQMenuData;
+    friend class TQMenuBar;
+
+    void connectModal(TQPopupMenu* receiver, bool doConnect);
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQPopupMenu( const TQPopupMenu & );
+    TQPopupMenu &operator=( const TQPopupMenu & );
+#endif
+};
+
+
+#endif // QT_NO_POPUPMENU
+
+#endif // TQPOPUPMENU_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpopupmenu-members.html b/doc/html/qpopupmenu-members.html new file mode 100644 index 00000000..eda28406 --- /dev/null +++ b/doc/html/qpopupmenu-members.html @@ -0,0 +1,405 @@ + + + + + +TQPopupMenu Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPopupMenu

+ +

This is the complete list of member functions for +TQPopupMenu, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpopupmenu.html b/doc/html/qpopupmenu.html new file mode 100644 index 00000000..17a6dfbd --- /dev/null +++ b/doc/html/qpopupmenu.html @@ -0,0 +1,830 @@ + + + + + +TQPopupMenu Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPopupMenu Class Reference

+ +

The TQPopupMenu class provides a popup menu widget. +More... +

#include <qpopupmenu.h> +

Inherits TQFrame and TQMenuData. +

List of all member functions. +

Public Members

+ +

Signals

+ +

Important Inherited Members

+
    +
  • int insertItem ( const TQString & text, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQString & text, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQString & text, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQString & text, TQPopupMenu * popup, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQString & text, TQPopupMenu * popup, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQPixmap & pixmap, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQPixmap & pixmap, TQPopupMenu * popup, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, TQPopupMenu * popup, int id = -1, int index = -1 )
  • +
  • int insertItem ( TQWidget * widget, int id = -1, int index = -1 )
  • +
  • int insertItem ( const TQIconSet & icon, TQCustomMenuItem * custom, int id = -1, int index = -1 )
  • +
  • int insertItem ( TQCustomMenuItem * custom, int id = -1, int index = -1 )
  • +
  • int insertSeparator ( int index = -1 )
  • +
  • void removeItem ( int id )
  • +
  • void removeItemAt ( int index )
  • +
  • void clear ()
  • +
  • TQKeySequence accel ( int id ) const
  • +
  • void setAccel ( const TQKeySequence & key, int id )
  • +
  • TQIconSet * iconSet ( int id ) const
  • +
  • TQString text ( int id ) const
  • +
  • TQPixmap * pixmap ( int id ) const
  • +
  • void setWhatsThis ( int id, const TQString & text )
  • +
  • TQString whatsThis ( int id ) const
  • +
  • void changeItem ( int id, const TQString & text )
  • +
  • void changeItem ( int id, const TQPixmap & pixmap )
  • +
  • void changeItem ( int id, const TQIconSet & icon, const TQString & text )
  • +
  • void changeItem ( int id, const TQIconSet & icon, const TQPixmap & pixmap )
  • +
  • bool isItemEnabled ( int id ) const
  • +
  • void setItemEnabled ( int id, bool enable )
  • +
  • bool isItemChecked ( int id ) const
  • +
  • void setItemChecked ( int id, bool check )
  • +
  • bool isItemVisible ( int id ) const
  • +
  • void setItemVisible ( int id, bool visible )
  • +
  • bool connectItem ( int id, const TQObject * receiver, const char * member )
  • +
  • bool disconnectItem ( int id, const TQObject * receiver, const char * member )
  • +
  • bool setItemParameter ( int id, int param )
  • +
  • int itemParameter ( int id ) const
  • +
+

Properties

+
    +
  • bool checkable - whether the display of check marks on menu items is enabled
  • +
+

Protected Members

+
    +
  • int itemHeight ( int row ) const
  • +
  • int itemHeight ( TQMenuItem * mi ) const
  • +
  • void drawItem ( TQPainter * p, int tab_, TQMenuItem * mi, bool act, int x, int y, int w, int h )
  • +
  • virtual void drawContents ( TQPainter * p )
  • +
  • int columns () const
  • +
+

Detailed Description

+ + +The TQPopupMenu class provides a popup menu widget. +

+ + +

A popup menu widget is a selection menu. It can be either a +pull-down menu in a menu bar or a standalone context (popup) menu. +Pull-down menus are shown by the menu bar when the user clicks on +the respective item or presses the specified shortcut key. Use +TQMenuBar::insertItem() to insert a popup menu into a menu bar. +Show a context menu either asynchronously with popup() or +synchronously with exec(). +

Technically, a popup menu consists of a list of menu items. You +add items with insertItem(). An item is either a string, a pixmap +or a custom item that provides its own drawing function (see +TQCustomMenuItem). In addition, items can have an optional icon +drawn on the very left side and an accelerator key such as +"Ctrl+X". +

There are three kinds of menu items: separators, menu items that +perform an action and menu items that show a submenu. Separators +are inserted with insertSeparator(). For submenus, you pass a +pointer to a TQPopupMenu in your call to insertItem(). All other +items are considered action items. +

When inserting action items you usually specify a receiver and a +slot. The receiver will be notifed whenever the item is selected. +In addition, TQPopupMenu provides two signals, activated() and +highlighted(), which signal the identifier of the respective menu +item. It is sometimes practical to connect several items to one +slot. To distinguish between them, specify a slot that takes an +integer argument and use setItemParameter() to associate a unique +value with each item. +

You clear a popup menu with clear() and remove single items with +removeItem() or removeItemAt(). +

A popup menu can display check marks for certain items when +enabled with setCheckable(TRUE). You check or uncheck items with +setItemChecked(). +

Items are either enabled or disabled. You toggle their state with +setItemEnabled(). Just before a popup menu becomes visible, it +emits the aboutToShow() signal. You can use this signal to set the +correct enabled/disabled states of all menu items before the user +sees it. The corresponding aboutToHide() signal is emitted when +the menu hides again. +

You can provide What's This? help for single menu items with +setWhatsThis(). See TQWhatsThis for general information about this +kind of lightweight online help. +

For ultimate flexibility, you can also add entire widgets as items +into a popup menu (for example, a color selector). +

A TQPopupMenu can also provide a tear-off menu. A tear-off menu is +a top-level window that contains a copy of the menu. This makes it +possible for the user to "tear off" frequently used menus and +position them in a convenient place on the screen. If you want +that functionality for a certain menu, insert a tear-off handle +with insertTearOffHandle(). When using tear-off menus, bear in +mind that the concept isn't typically used on Microsoft Windows so +users may not be familiar with it. Consider using a TQToolBar +instead. Tear-off menus cannot contain custom widgets; if the +original menu contains a custom widget item, this item is omitted. +

menu/menu.cpp is an example of +TQMenuBar and TQPopupMenu use. +

+

+

See also TQMenuBar, GUI Design Handbook: Menu, Drop-Down and + Pop-Up, Main Window and Related Classes, and Basic Widgets. + +


Member Function Documentation

+

TQPopupMenu::TQPopupMenu ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a popup menu called name with parent parent. +

Although a popup menu is always a top-level widget, if a parent is +passed the popup menu will be deleted when that parent is +destroyed (as with any other TQObject). + +

TQPopupMenu::~TQPopupMenu () +

+Destroys the popup menu. + +

void TQPopupMenu::aboutToHide () [signal] +

+ +

This signal is emitted just before the popup menu is hidden after +it has been displayed. +

Warning: Do not open a widget in a slot connected to this signal. +

See also aboutToShow(), setItemEnabled(), setItemChecked(), insertItem(), and removeItem(). + +

void TQPopupMenu::aboutToShow () [signal] +

+ +

This signal is emitted just before the popup menu is displayed. +You can connect it to any slot that sets up the menu contents +(e.g. to ensure that the right items are enabled). +

See also aboutToHide(), setItemEnabled(), setItemChecked(), insertItem(), and removeItem(). + +

Example: mdi/application.cpp. +

TQKeySequence TQMenuData::accel ( int id ) const +

+Returns the accelerator key that has been defined for the menu +item id, or 0 if it has no accelerator key or if there is no +such menu item. +

See also setAccel(), TQAccel, and qnamespace.h. + +

void TQPopupMenu::activated ( int id ) [signal] +

+ +

This signal is emitted when a menu item is selected; id is the +id of the selected item. +

Normally, you connect each menu item to a single slot using +TQMenuData::insertItem(), but sometimes you will want to connect +several items to a single slot (most often if the user selects +from an array). This signal is useful in such cases. +

See also highlighted() and TQMenuData::insertItem(). + +

Examples: grapher/grapher.cpp, helpviewer/helpwindow.cpp, qdir/qdir.cpp, qwerty/qwerty.cpp, scrollview/scrollview.cpp, and showimg/showimg.cpp. +

void TQMenuData::changeItem ( int id, const TQString & text ) +

+Changes the text of the menu item id to text. If the item +has an icon, the icon remains unchanged. +

See also text(). + +

void TQMenuData::changeItem ( int id, const TQPixmap & pixmap ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Changes the pixmap of the menu item id to the pixmap pixmap. +If the item has an icon, the icon is unchanged. +

See also pixmap(). + +

void TQMenuData::changeItem ( int id, const TQIconSet & icon, const TQString & text ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Changes the iconset and text of the menu item id to the icon +and text respectively. +

See also pixmap(). + +

void TQMenuData::changeItem ( int id, const TQIconSet & icon, const TQPixmap & pixmap ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Changes the iconset and pixmap of the menu item id to icon +and pixmap respectively. +

See also pixmap(). + +

void TQMenuData::clear () +

+Removes all menu items. +

See also removeItem() and removeItemAt(). + +

Examples: mdi/application.cpp and qwerty/qwerty.cpp. +

int TQPopupMenu::columns () const [protected] +

+If a popup menu does not fit on the screen it lays itself out so +that it does fit. It is style dependent what layout means (for +example, on Windows it will use multiple columns). +

This functions returns the number of columns necessary. +

See also sizeHint. + +

bool TQMenuData::connectItem ( int id, const TQObject * receiver, const char * member ) +

+Connects the menu item with identifier id to receiver's member slot or signal. +

The receiver's slot (or signal) is activated when the menu item is +activated. +

See also disconnectItem() and setItemParameter(). + +

Example: menu/menu.cpp. +

bool TQMenuData::disconnectItem ( int id, const TQObject * receiver, const char * member ) +

+Disconnects the receiver's member from the menu item with +identifier id. +

All connections are removed when the menu data object is +destroyed. +

See also connectItem() and setItemParameter(). + +

void TQPopupMenu::drawContents ( TQPainter * p ) [virtual protected] +

+Draws all menu items using painter p. + +

Reimplemented from TQFrame. +

void TQPopupMenu::drawItem ( TQPainter * p, int tab_, TQMenuItem * mi, bool act, int x, int y, int w, int h ) [protected] +

+Draws menu item mi in the area x, y, w, h, using +painter p. The item is drawn active if act is TRUE or drawn +inactive if act is FALSE. The rightmost tab_ pixels are used +for accelerator text. +

See also TQStyle::drawControl(). + +

int TQPopupMenu::exec () +

+Executes this popup synchronously. +

This is equivalent to exec(mapToGlobal(TQPoint(0,0))). In most +situations you'll want to specify the position yourself, for +example at the current mouse position: +

+        exec(TQCursor::pos());
+    
+ +or aligned to a widget: +
+        exec(somewidget.mapToGlobal(TQPoint(0,0)));
+    
+ + +

Examples: fileiconview/qfileiconview.cpp, menu/menu.cpp, and scribble/scribble.cpp. +

int TQPopupMenu::exec ( const TQPoint & pos, int indexAtPoint = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Executes this popup synchronously. +

Opens the popup menu so that the item number indexAtPoint will +be at the specified global position pos. To translate a +widget's local coordinates into global coordinates, use +TQWidget::mapToGlobal(). +

The return code is the id of the selected item in either the popup +menu or one of its submenus, or -1 if no item is selected +(normally because the user pressed Esc). +

Note that all signals are emitted as usual. If you connect a menu +item to a slot and call the menu's exec(), you get the result both +via the signal-slot connection and in the return value of exec(). +

Common usage is to position the popup at the current mouse +position: +

+        exec( TQCursor::pos() );
+    
+ +or aligned to a widget: +
+        exec( somewidget.mapToGlobal(TQPoint(0, 0)) );
+    
+ +

When positioning a popup with exec() or popup(), bear in mind that +you cannot rely on the popup menu's current size(). For +performance reasons, the popup adapts its size only when +necessary. So in many cases, the size before and after the show is +different. Instead, use sizeHint(). It calculates the proper size +depending on the menu's current contents. +

See also popup() and sizeHint. + +

void TQPopupMenu::highlighted ( int id ) [signal] +

+ +

This signal is emitted when a menu item is highlighted; id is +the id of the highlighted item. +

See also activated() and TQMenuData::insertItem(). + +

TQIconSet * TQMenuData::iconSet ( int id ) const +

+Returns the icon set that has been set for menu item id, or 0 +if no icon set has been set. +

See also changeItem(), text(), and pixmap(). + +

int TQPopupMenu::idAt ( int index ) const +

+ +

Returns the identifier of the menu item at position index in +the internal list, or -1 if index is out of range. +

See also TQMenuData::setId() and TQMenuData::indexOf(). + +

Example: scrollview/scrollview.cpp. +

int TQPopupMenu::idAt ( const TQPoint & pos ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the id of the item at pos, or -1 if there is no item +there or if it is a separator. + +

int TQMenuData::insertItem ( const TQString & text, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 ) +

+The family of insertItem() functions inserts menu items into a +popup menu or a menu bar. +

A menu item is usually either a text string or a pixmap, both with +an optional icon or keyboard accelerator. For special cases it is +also possible to insert custom items (see TQCustomMenuItem) or +even widgets into popup menus. +

Some insertItem() members take a popup menu as an additional +argument. Use this to insert submenus into existing menus or +pulldown menus into a menu bar. +

The number of insert functions may look confusing, but they are +actually tquite simple to use. +

This default version inserts a menu item with the text text, +the accelerator key accel, an id and an optional index and +connects it to the slot member in the object receiver. +

Example: +

+        TQMenuBar   *mainMenu = new TQMenuBar;
+        TQPopupMenu *fileMenu = new TQPopupMenu;
+        fileMenu->insertItem( "New",  myView, SLOT(newFile()), CTRL+Key_N );
+        fileMenu->insertItem( "Open", myView, SLOT(open()),    CTRL+Key_O );
+        mainMenu->insertItem( "File", fileMenu );
+    
+ +

Not all insert functions take an object/slot parameter or an +accelerator key. Use connectItem() and setAccel() on those items. +

If you need to translate accelerators, use tr() with the text and +accelerator. (For translations use a string key + sequence.): +

+        fileMenu->insertItem( tr("Open"), myView, SLOT(open()),
+                              tr("Ctrl+O") );
+    
+ +

In the example above, pressing Ctrl+O or selecting "Open" from the +menu activates the myView->open() function. +

Some insert functions take a TQIconSet parameter to specify the +little menu item icon. Note that you can always pass a TQPixmap +object instead. +

The id specifies the identification number associated with the +menu item. Note that only positive values are valid, as a negative +value will make TQt select a unique id for the item. +

The index specifies the position in the menu. The menu item is +appended at the end of the list if index is negative. +

Note that keyboard accelerators in TQt are not application-global, +instead they are bound to a certain top-level window. For example, +accelerators in TQPopupMenu items only work for menus that are +associated with a certain window. This is true for popup menus +that live in a menu bar since their accelerators will then be +installed in the menu bar itself. This also applies to stand-alone +popup menus that have a top-level widget in their parentWidget() +chain. The menu will then install its accelerator object on that +top-level widget. For all other cases use an independent TQAccel +object. +

Warning: Be careful when passing a literal 0 to insertItem() +because some C++ compilers choose the wrong overloaded function. +Cast the 0 to what you mean, e.g. (TQObject*)0. +

Warning: On Mac OS X, items that connect to a slot that are inserted into a +menubar will not function as we use the native menubar that knows nothing +about signals or slots. Instead insert the items into a popup menu and +insert the popup menu into the menubar. This may be fixed in a future TQt +version. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and qnamespace.h. + +

Examples: addressbook/mainwindow.cpp, canvas/canvas.cpp, menu/menu.cpp, qwerty/qwerty.cpp, scrollview/scrollview.cpp, showimg/showimg.cpp, and sound/sound.cpp. +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQString & text, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, text text, accelerator +accel, optional id id, and optional index position. The +menu item is connected it to the receiver's member slot. The +icon will be displayed to the left of the text in the item. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and qnamespace.h. + +

int TQMenuData::insertItem ( const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with pixmap pixmap, accelerator accel, +optional id id, and optional index position. The menu item +is connected it to the receiver's member slot. The icon will +be displayed to the left of the text in the item. +

To look best when being highlighted as a menu item, the pixmap +should provide a mask (see TQPixmap::mask()). +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, const TQObject * receiver, const char * member, const TQKeySequence & accel = 0, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, pixmap pixmap, +accelerator accel, optional id id, and optional index +position. The icon will be displayed to the left of the pixmap in +the item. The item is connected to the member slot in the receiver object. +

To look best when being highlighted as a menu item, the pixmap +should provide a mask (see TQPixmap::mask()). +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), connectItem(), TQAccel, and qnamespace.h. + +

int TQMenuData::insertItem ( const TQString & text, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with text text, optional id id, and +optional index position. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQString & text, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, text text, optional id +id, and optional index position. The icon will be displayed +to the left of the text in the item. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQString & text, TQPopupMenu * popup, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with text text, submenu popup, optional +id id, and optional index position. +

The popup must be deleted by the programmer or by its parent +widget. It is not deleted when this menu item is removed or when +the menu is deleted. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQString & text, TQPopupMenu * popup, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, text text, submenu popup, optional id id, and optional index position. The icon +will be displayed to the left of the text in the item. +

The popup must be deleted by the programmer or by its parent +widget. It is not deleted when this menu item is removed or when +the menu is deleted. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQPixmap & pixmap, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with pixmap pixmap, optional id id, and +optional index position. +

To look best when being highlighted as a menu item, the pixmap +should provide a mask (see TQPixmap::mask()). +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, pixmap pixmap, optional +id id, and optional index position. The icon will be +displayed to the left of the pixmap in the item. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQPixmap & pixmap, TQPopupMenu * popup, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with pixmap pixmap, submenu popup, +optional id id, and optional index position. +

The popup must be deleted by the programmer or by its parent +widget. It is not deleted when this menu item is removed or when +the menu is deleted. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, const TQPixmap & pixmap, TQPopupMenu * popup, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item with icon icon, pixmap pixmap submenu popup, optional id id, and optional index position. The icon +will be displayed to the left of the pixmap in the item. +

The popup must be deleted by the programmer or by its parent +widget. It is not deleted when this menu item is removed or when +the menu is deleted. +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(), changeItem(), setAccel(), and connectItem(). + +

int TQMenuData::insertItem ( TQWidget * widget, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a menu item that consists of the widget widget with +optional id id, and optional index position. +

Ownership of widget is transferred to the popup menu or to the +menu bar. +

Theoretically, any widget can be inserted into a popup menu. In +practice, this only makes sense with certain widgets. +

If a widget is not focus-enabled (see +TQWidget::isFocusEnabled()), the menu treats it as a separator; +this means that the item is not selectable and will never get +focus. In this way you can, for example, simply insert a TQLabel if +you need a popup menu with a title. +

If the widget is focus-enabled it will get focus when the user +traverses the popup menu with the arrow keys. If the widget does +not accept ArrowUp and ArrowDown in its key event handler, +the focus will move back to the menu when the respective arrow key +is hit one more time. This works with a TQLineEdit, for example. If +the widget accepts the arrow key itself, it must also provide the +possibility to put the focus back on the menu again by calling +TQWidget::focusNextPrevChild(). Futhermore, if the embedded widget +closes the menu when the user made a selection, this can be done +safely by calling: +

+        if ( isVisible() &&
+             parentWidget() &&
+             parentWidget()->inherits("TQPopupMenu") )
+            parentWidget()->close();
+    
+ +

Returns the allocated menu identifier number (id if id >= 0). +

See also removeItem(). + +

int TQMenuData::insertItem ( const TQIconSet & icon, TQCustomMenuItem * custom, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a custom menu item custom with an icon and with +optional id id, and optional index position. +

This only works with popup menus. It is not supported for menu +bars. Ownership of custom is transferred to the popup menu. +

If you want to connect a custom item to a slot, use connectItem(). +

Returns the allocated menu identifier number (id if id >= 0). +

See also connectItem(), removeItem(), and TQCustomMenuItem. + +

int TQMenuData::insertItem ( TQCustomMenuItem * custom, int id = -1, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a custom menu item custom with optional id id, and +optional index position. +

This only works with popup menus. It is not supported for menu +bars. Ownership of custom is transferred to the popup menu. +

If you want to connect a custom item to a slot, use connectItem(). +

Returns the allocated menu identifier number (id if id >= 0). +

See also connectItem(), removeItem(), and TQCustomMenuItem. + +

int TQMenuData::insertSeparator ( int index = -1 ) +

+Inserts a separator at position index, and returns the menu identifier +number allocated to it. The separator becomes the last menu item if +index is negative. +

In a popup menu a separator is rendered as a horizontal line. In a +Motif menu bar a separator is spacing, so the rest of the items +(normally just "Help") are drawn right-justified. In a Windows +menu bar separators are ignored (to comply with the Windows style +guidelines). + +

Examples: addressbook/mainwindow.cpp, menu/menu.cpp, progress/progress.cpp, qwerty/qwerty.cpp, scrollview/scrollview.cpp, showimg/showimg.cpp, and sound/sound.cpp. +

int TQPopupMenu::insertTearOffHandle ( int id = -1, int index = -1 ) +

+Inserts a tear-off handle into the menu. A tear-off handle is a +special menu item that creates a copy of the menu when the menu is +selected. This "torn-off" copy lives in a separate window. It +contains the same menu items as the original menu, with the +exception of the tear-off handle. +

The handle item is assigned the identifier id or an +automatically generated identifier if id is < 0. The generated +identifiers (negative integers) are guaranteed to be unique within +the entire application. +

The index specifies the position in the menu. The tear-off +handle is appended at the end of the list if index is negative. + +

Example: menu/menu.cpp. +

bool TQPopupMenu::isCheckable () const +

Returns TRUE if the display of check marks on menu items is enabled; otherwise returns FALSE. +See the "checkable" property for details. +

bool TQMenuData::isItemChecked ( int id ) const +

+Returns TRUE if the menu item with the id id has been checked; +otherwise returns FALSE. +

See also setItemChecked(). + +

Examples: canvas/canvas.cpp, progress/progress.cpp, and showimg/showimg.cpp. +

bool TQMenuData::isItemEnabled ( int id ) const +

+Returns TRUE if the item with identifier id is enabled; +otherwise returns FALSE +

See also setItemEnabled() and isItemVisible(). + +

bool TQMenuData::isItemVisible ( int id ) const +

+Returns TRUE if the menu item with the id id is visible; +otherwise returns FALSE. +

See also setItemVisible(). + +

int TQPopupMenu::itemHeight ( int row ) const [protected] +

+Calculates the height in pixels of the item in row row. + +

int TQPopupMenu::itemHeight ( TQMenuItem * mi ) const [protected] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Calculates the height in pixels of the menu item mi. + +

int TQMenuData::itemParameter ( int id ) const +

+Returns the parameter of the activation signal of item id. +

If no parameter has been specified for this item with +setItemParameter(), the value defaults to id. +

See also connectItem(), disconnectItem(), and setItemParameter(). + +

TQPixmap * TQMenuData::pixmap ( int id ) const +

+Returns the pixmap that has been set for menu item id, or 0 if +no pixmap has been set. +

See also changeItem(), text(), and iconSet(). + +

void TQPopupMenu::popup ( const TQPoint & pos, int indexAtPoint = -1 ) +

+Displays the popup menu so that the item number indexAtPoint +will be at the specified global position pos. To translate a +widget's local coordinates into global coordinates, use +TQWidget::mapToGlobal(). +

When positioning a popup with exec() or popup(), bear in mind that +you cannot rely on the popup menu's current size(). For +performance reasons, the popup adapts its size only when +necessary, so in many cases, the size before and after the show is +different. Instead, use sizeHint(). It calculates the proper size +depending on the menu's current contents. + +

Example: listviews/listviews.cpp. +

void TQMenuData::removeItem ( int id ) +

+ +

Removes the menu item that has the identifier id. +

See also removeItemAt() and clear(). + +

Example: chart/chartform.cpp. +

void TQMenuData::removeItemAt ( int index ) +

+Removes the menu item at position index. +

See also removeItem() and clear(). + +

void TQMenuData::setAccel ( const TQKeySequence & key, int id ) +

+Sets the accelerator key for the menu item id to key. +

An accelerator key consists of a key code and a combination of the +modifiers SHIFT, CTRL, ALT or UNICODE_ACCEL (OR'ed or +added). The header file qnamespace.h contains a list of key +codes. +

Defining an accelerator key produces a text that is added to the +menu item; for instance, CTRL + Key_O produces "Ctrl+O". The +text is formatted differently for different platforms. +

Note that keyboard accelerators in TQt are not application-global, +instead they are bound to a certain top-level window. For example, +accelerators in TQPopupMenu items only work for menus that are +associated with a certain window. This is true for popup menus +that live in a menu bar since their accelerators will then be +installed in the menu bar itself. This also applies to stand-alone +popup menus that have a top-level widget in their parentWidget() +chain. The menu will then install its accelerator object on that +top-level widget. For all other cases use an independent TQAccel +object. +

Example: +

+        TQMenuBar *mainMenu = new TQMenuBar;
+        TQPopupMenu *fileMenu = new TQPopupMenu;       // file sub menu
+        fileMenu->insertItem( "Open Document", 67 ); // add "Open" item
+        fileMenu->setAccel( CTRL + Key_O, 67 );      // Ctrl+O to open
+        fileMenu->insertItem( "Quit", 69 );          // add "Quit" item
+        fileMenu->setAccel( CTRL + ALT + Key_Delete, 69 ); // add Alt+Del to tquit
+        mainMenu->insertItem( "File", fileMenu );    // add the file menu
+    
+ +

If you need to translate accelerators, use tr() with a string: +

+        fileMenu->setAccel( tr("Ctrl+O"), 67 );
+    
+ +

You can also specify the accelerator in the insertItem() function. +You may prefer to use TQAction to associate accelerators with menu +items. +

See also accel(), insertItem(), TQAccel, and TQAction. + +

Example: menu/menu.cpp. +

void TQPopupMenu::setActiveItem ( int i ) [virtual] +

+Sets the currently active item to index i and repaints as necessary. + +

void TQPopupMenu::setCheckable ( bool ) [virtual] +

Sets whether the display of check marks on menu items is enabled. +See the "checkable" property for details. +

void TQMenuData::setItemChecked ( int id, bool check ) +

+If check is TRUE, checks the menu item with id id; otherwise +unchecks the menu item with id id. Calls +TQPopupMenu::setCheckable( TRUE ) if necessary. +

See also isItemChecked(). + +

Examples: canvas/canvas.cpp, grapher/grapher.cpp, mdi/application.cpp, menu/menu.cpp, progress/progress.cpp, scrollview/scrollview.cpp, and showimg/showimg.cpp. +

void TQMenuData::setItemEnabled ( int id, bool enable ) +

+If enable is TRUE, enables the menu item with identifier id; +otherwise disables the menu item with identifier id. +

See also isItemEnabled(). + +

Examples: mdi/application.cpp, menu/menu.cpp, progress/progress.cpp, and showimg/showimg.cpp. +

bool TQMenuData::setItemParameter ( int id, int param ) +

+Sets the parameter of the activation signal of item id to param. +

If any receiver takes an integer parameter, this value is passed. +

See also connectItem(), disconnectItem(), and itemParameter(). + +

Example: mdi/application.cpp. +

void TQMenuData::setItemVisible ( int id, bool visible ) +

+If visible is TRUE, shows the menu item with id id; otherwise +hides the menu item with id id. +

See also isItemVisible() and isItemEnabled(). + +

void TQMenuData::setWhatsThis ( int id, const TQString & text ) +

+Sets text as What's This help for the menu item with identifier +id. +

See also whatsThis(). + +

Examples: application/application.cpp, helpsystem/mainwindow.cpp, and mdi/application.cpp. +

TQString TQMenuData::text ( int id ) const +

+Returns the text that has been set for menu item id, or +TQString::null if no text has been set. +

See also changeItem(), pixmap(), and iconSet(). + +

Examples: qdir/qdir.cpp and showimg/showimg.cpp. +

void TQPopupMenu::updateItem ( int id ) [virtual] +

+Updates the item with identity id. + +

Reimplemented from TQMenuData. +

TQString TQMenuData::whatsThis ( int id ) const +

+Returns the What's This help text for the item with identifier id or TQString::null if no text has yet been defined. +

See also setWhatsThis(). + +


Property Documentation

+

bool checkable

+

This property holds whether the display of check marks on menu items is enabled. +

When TRUE, the display of check marks on menu items is enabled. +Checking is always enabled when in Windows-style. +

See also TQMenuData::setItemChecked(). + +

Set this property's value with setCheckable() and get this property's value with isCheckable(). + +


+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/qprintdlg-m.png b/doc/html/qprintdlg-m.png new file mode 100644 index 00000000..dff01167 Binary files /dev/null and b/doc/html/qprintdlg-m.png differ diff --git a/doc/html/qprinter-h.html b/doc/html/qprinter-h.html new file mode 100644 index 00000000..c2c408fd --- /dev/null +++ b/doc/html/qprinter-h.html @@ -0,0 +1,329 @@ + + + + + +qprinter.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qprinter.h

+ +

This is the verbatim text of the qprinter.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/**********************************************************************
+** $Id: qt/qprinter.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPrinter class
+**
+** Created : 940927
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPRINTER_H
+#define TQPRINTER_H
+
+#ifndef QT_H
+#include "qpaintdevice.h"
+#include "qstring.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_PRINTER
+
+#if defined(B0)
+#undef B0 // Terminal hang-up.  We assume that you do not want that.
+#endif
+
+class TQPrinterPrivate;
+
+class Q_EXPORT TQPrinter : public TQPaintDevice
+{
+public:
+    enum PrinterMode { ScreenResolution, PrinterResolution, HighResolution, Compatible };
+
+    TQPrinter( PrinterMode mode = ScreenResolution );
+   ~TQPrinter();
+
+    enum Orientation { Portrait, Landscape };
+
+    enum PageSize    { A4, B5, Letter, Legal, Executive,
+		       A0, A1, A2, A3, A5, A6, A7, A8, A9, B0, B1,
+		       B10, B2, B3, B4, B6, B7, B8, B9, C5E, Comm10E,
+		       DLE, Folio, Ledger, Tabloid, Custom, NPageSize = Custom };
+
+    enum PageOrder   { FirstPageFirst, LastPageFirst };
+
+    enum ColorMode   { GrayScale, Color };
+
+    enum PaperSource { OnlyOne, Lower, Middle, Manual, Envelope,
+                       EnvelopeManual, Auto, Tractor, SmallFormat,
+                       LargeFormat, LargeCapacity, Cassette, FormSource };
+
+    enum PrintRange   { AllPages,
+			Selection,
+			PageRange };
+
+    enum PrinterOption { PrintToFile,
+			 PrintSelection,
+			 PrintPageRange };
+
+    TQString printerName() const;
+    virtual void setPrinterName( const TQString &);
+    bool outputToFile() const;
+    virtual void setOutputToFile( bool );
+    TQString outputFileName()const;
+    virtual void setOutputFileName( const TQString &);
+
+    TQString printProgram() const;
+    virtual void setPrintProgram( const TQString &);
+
+    TQString printerSelectionOption() const;
+    virtual void setPrinterSelectionOption( const TQString & );
+
+    TQString docName() const;
+    virtual void setDocName( const TQString &);
+    TQString creator() const;
+    virtual void setCreator( const TQString &);
+
+    Orientation orientation()   const;
+    virtual void setOrientation( Orientation );
+    PageSize pageSize()      const;
+    virtual void setPageSize( PageSize );
+#ifdef Q_WS_WIN
+    void setWinPageSize( short winPageSize );
+    short winPageSize() const;
+#endif
+#ifdef Q_WS_MAC
+    bool printSetup();
+    bool pageSetup();
+#endif
+    virtual void setPageOrder( PageOrder );
+    PageOrder   pageOrder() const;
+
+    void setResolution( int );
+    int resolution() const;
+
+    virtual void setColorMode( ColorMode );
+    ColorMode   colorMode() const;
+
+    virtual void        setFullPage( bool );
+    bool                fullPage() const;
+    TQSize       margins()       const;
+    void setMargins( uint top, uint left, uint bottom, uint right );
+    void margins( uint *top, uint *left, uint *bottom, uint *right ) const;
+
+    int         fromPage()      const;
+    int         toPage()        const;
+    virtual void setFromTo( int fromPage, int toPage );
+    int         minPage()       const;
+    int         maxPage()       const;
+    virtual void setMinMax( int minPage, int maxPage );
+    int         numCopies()     const;
+    virtual void setNumCopies( int );
+
+    bool	collateCopiesEnabled() const;
+    void	setCollateCopiesEnabled(bool );
+
+    bool	collateCopies() const;
+    void	setCollateCopies( bool );
+
+    PrintRange	printRange() const;
+    void 	setPrintRange( PrintRange range );
+
+    bool        newPage();
+    bool        abort();
+    bool        aborted()       const;
+
+    bool        setup( TQWidget *parent = 0 );
+
+    PaperSource paperSource()   const;
+    virtual void setPaperSource( PaperSource );
+
+    void setOptionEnabled( PrinterOption, bool enable );
+    bool isOptionEnabled( PrinterOption );
+
+protected:
+    bool        cmd( int, TQPainter *, TQPDevCmdParam * );
+    int         metric( int ) const;
+
+#if defined(Q_WS_WIN)
+    virtual void        setActive();
+    virtual void        setIdle();
+#endif
+
+private:
+#if defined(Q_WS_X11) || defined(Q_WS_QWS)
+    TQPaintDevice *pdrv;
+    int         pid;
+#endif
+#if defined(Q_WS_MAC)
+    friend class TQPrinterPrivate;
+    PMPageFormat pformat;
+    PMPrintSettings psettings;
+    PMPrintSession psession;
+    bool prepare(PMPrintSettings *);
+    bool prepare(PMPageFormat *);
+    void interpret(PMPrintSettings *);
+    void interpret(PMPageFormat *);
+#endif
+#if defined(Q_WS_WIN)
+    void        readPdlg( void* );
+    void        readPdlgA( void* );
+    void	writeDevmode( TQt::HANDLE );
+    void	writeDevmodeA( TQt::HANDLE );
+    void	reinit();
+
+    bool        viewOffsetDone;
+    TQPainter*   painter;
+    TQt::HANDLE hdevmode;
+    TQt::HANDLE hdevnames;
+#endif
+
+    int         state;
+    TQString     printer_name;
+    TQString     option_string;
+    TQString     output_filename;
+    bool        output_file;
+    TQString     print_prog;
+    TQString     doc_name;
+    TQString     creator_name;
+
+    PageSize    page_size;
+    PaperSource paper_source;
+    PageOrder   page_order;
+    ColorMode   color_mode;
+    Orientation orient;
+    uint	to_edge : 1;
+    uint	appcolcopies : 1;
+    uint	usercolcopies : 1;
+    uint	res_set : 1;
+    short       from_pg, to_pg;
+    short       min_pg,  max_pg;
+    short       ncopies;
+    int         res;
+    TQPrinterPrivate *d;
+
+private:        // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQPrinter( const TQPrinter & );
+    TQPrinter &operator=( const TQPrinter & );
+#endif
+};
+
+
+inline TQString TQPrinter::printerName() const
+{ return printer_name; }
+
+inline bool TQPrinter::outputToFile() const
+{ return output_file; }
+
+inline TQString TQPrinter::outputFileName() const
+{ return output_filename; }
+
+inline TQString TQPrinter::printProgram() const
+{ return print_prog; }
+
+inline TQString TQPrinter::docName() const
+{ return doc_name; }
+
+inline TQString TQPrinter::creator() const
+{ return creator_name; }
+
+inline TQPrinter::PageSize TQPrinter::pageSize() const
+{ return page_size; }
+
+inline TQPrinter::Orientation TQPrinter::orientation() const
+{ return orient; }
+
+inline int TQPrinter::fromPage() const
+{ return from_pg; }
+
+inline int TQPrinter::toPage() const
+{ return to_pg; }
+
+inline int TQPrinter::minPage() const
+{ return min_pg; }
+
+inline int TQPrinter::maxPage() const
+{ return max_pg; }
+
+inline int TQPrinter::numCopies() const
+{ return ncopies; }
+
+inline bool TQPrinter::collateCopiesEnabled() const
+{ return appcolcopies; }
+
+inline void TQPrinter::setCollateCopiesEnabled(bool v)
+{ appcolcopies = v; }
+
+inline bool TQPrinter::collateCopies() const
+{ return usercolcopies; }
+
+
+#endif // QT_NO_PRINTER
+
+#endif // TQPRINTER_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qprinter-members.html b/doc/html/qprinter-members.html new file mode 100644 index 00000000..65ab4b44 --- /dev/null +++ b/doc/html/qprinter-members.html @@ -0,0 +1,121 @@ + + + + + +TQPrinter Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPrinter

+ +

This is the complete list of member functions for +TQPrinter, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qprinter.html b/doc/html/qprinter.html new file mode 100644 index 00000000..3727da28 --- /dev/null +++ b/doc/html/qprinter.html @@ -0,0 +1,758 @@ + + + + + +TQPrinter Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPrinter Class Reference

+ +

The TQPrinter class is a paint device that paints on a printer. +More... +

#include <qprinter.h> +

Inherits TQPaintDevice. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQPrinter class is a paint device that paints on a printer. +

+ + +

On Windows it uses the built-in printer drivers. On X11 it +generates postscript and sends that to lpr, lp, or another print +command. +

TQPrinter is used in much the same way as TQWidget and TQPixmap are +used. The big difference is that you must keep track of the pages. +

TQPrinter supports a number of settable parameters, most of which +can be changed by the end user when the application calls +TQPrinter::setup(). +

The most important parameters are: +

    +
  • setOrientation() tells TQPrinter which page orientation to use (virtual). +
  • setPageSize() tells TQPrinter what page size to expect from the +printer. +
  • setResolution() tells TQPrinter what resolution you wish the +printer to provide (in dpi). +
  • setFullPage() tells TQPrinter whether you want to deal with the +full page or just with the part the printer can draw on. The +default is FALSE, so that by default you should be able to paint +on (0,0). If TRUE the origin of the coordinate system will be in +the top left corner of the paper and most probably the printer +will not be able to paint something there due to it's physical +margins. +
  • setNumCopies() tells TQPrinter how many copies of the document +it should print. +
  • setMinMax() tells TQPrinter and TQPrintDialog what the allowed +range for fromPage() and toPage() are. +
+

Except where noted, you can only call the set functions before +setup(), or between TQPainter::end() and setup(). (Some may take +effect between setup() and begin(), or between begin() and end(), +but that's strictly undocumented and such behaviour may differ +depending on platform.) +

There are also some settings that the user sets (through the +printer dialog) and that applications are expected to obey: +

    +

  • pageOrder() tells the application program whether to print +first-page-first or last-page-first. +

  • colorMode() tells the application program whether to print in +color or grayscale. (If you print in color and the printer does +not support color, TQt will try to approximate. The document may +take longer to print, but the quality should not be made visibly +poorer.) +

  • fromPage() and toPage() indicate what pages the application +program should print. +

  • paperSource() tells the application progam which paper source +to print from. +

+

You can of course call these functions to establish defaults +before you ask the user through TQPrinter::setup(). +

Once you start printing, calling newPage() is essential. You will +probably also need to look at the TQPaintDeviceMetrics for the +printer (see the print + function in the Application walk-through). In previous versions, +paint device metrics were valid only after the TQPrinter has been set +up, i.e. after setup() has returned successfully. This is no longer +the case and paint device metrics can be requested safely before set up. +

If you want to abort the print job, abort() will try its best to +stop printing. It may cancel the entire job or just some of it. +

+

If your current locale converts "," to ".", you will need to set +a locale (via the standard C setlocale() function) that doen't do this +before using TQPrinter. The "C" locale works well for this. +

The TrueType font embedding for TQt's postscript driver uses code +by David Chappell of Trinity College Computing Center. +

+

Copyright 1995, Trinity College Computing Center. +Written by David Chappell. +

Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that copyright notice and this permission +notice appear in supporting documentation. This software is +provided "as is" without express or implied warranty. +

TrueType font support. These functions allow PPR to generate +PostScript fonts from Microsoft compatible TrueType font files. +

The functions in this file do most of the work to convert a +TrueType font to a type 3 PostScript font. +

Most of the material in this file is derived from a program called +"ttf2ps" which L. S. Ng posted to the usenet news group +"comp.sources.postscript". The author did not provide a copyright +notice or indicate any restrictions on use. +

Last revised 11 July 1995. +

See also Graphics Classes and Image Processing Classes. + +


Member Type Documentation

+

TQPrinter::ColorMode

+ +

This enum type is used to indicate whether TQPrinter should print +in color or not. +

    +
  • TQPrinter::Color - print in color if available, otherwise in grayscale. +
  • TQPrinter::GrayScale - print in grayscale, even on color printers. +Might be a little faster than Color. This is the default. +
+

TQPrinter::Orientation

+ +

This enum type (not to be confused with TQt::Orientation) is used +to specify each page's orientation. +

    +
  • TQPrinter::Portrait - the page's height is greater than its width (the +default). +
  • TQPrinter::Landscape - the page's width is greater than its height. +

This type interacts with TQPrinter::PageSize and +TQPrinter::setFullPage() to determine the final size of the page +available to the application. + +

TQPrinter::PageOrder

+ +

This enum type is used by TQPrinter to tell the application program +how to print. +

    +
  • TQPrinter::FirstPageFirst - the lowest-numbered page should be printed +first. +
  • TQPrinter::LastPageFirst - the highest-numbered page should be printed +first. +
+

TQPrinter::PageSize

+ +

This enum type specifies what paper size TQPrinter should use. +TQPrinter does not check that the paper size is available; it just +uses this information, together with TQPrinter::Orientation and +TQPrinter::setFullPage(), to determine the printable area (see +TQPaintDeviceMetrics). +

The defined sizes (with setFullPage(TRUE)) are: +

    +
  • TQPrinter::A0 - 841 x 1189 mm This value is not supported on windows. +
  • TQPrinter::A1 - 594 x 841 mm This value is not supported on windows. +
  • TQPrinter::A2 - 420 x 594 mm +
  • TQPrinter::A3 - 297 x 420 mm +
  • TQPrinter::A4 - 210 x 297 mm, 8.26 x 11.7 inches +
  • TQPrinter::A5 - 148 x 210 mm +
  • TQPrinter::A6 - 105 x 148 mm +
  • TQPrinter::A7 - 74 x 105 mm +
  • TQPrinter::A8 - 52 x 74 mm +
  • TQPrinter::A9 - 37 x 52 mm +
  • TQPrinter::B0 - 1030 x 1456 mm +
  • TQPrinter::B1 - 728 x 1030 mm +
  • TQPrinter::B10 - 32 x 45 mm +
  • TQPrinter::B2 - 515 x 728 mm +
  • TQPrinter::B3 - 364 x 515 mm +
  • TQPrinter::B4 - 257 x 364 mm +
  • TQPrinter::B5 - 182 x 257 mm, 7.17 x 10.13 inches +
  • TQPrinter::B6 - 128 x 182 mm +
  • TQPrinter::B7 - 91 x 128 mm +
  • TQPrinter::B8 - 64 x 91 mm +
  • TQPrinter::B9 - 45 x 64 mm +
  • TQPrinter::C5E - 163 x 229 mm +
  • TQPrinter::Comm10E - 105 x 241 mm, US Common #10 Envelope +
  • TQPrinter::DLE - 110 x 220 mm +
  • TQPrinter::Executive - 7.5 x 10 inches, 191 x 254 mm +
  • TQPrinter::Folio - 210 x 330 mm +
  • TQPrinter::Ledger - 432 x 279 mm +
  • TQPrinter::Legal - 8.5 x 14 inches, 216 x 356 mm +
  • TQPrinter::Letter - 8.5 x 11 inches, 216 x 279 mm +
  • TQPrinter::Tabloid - 279 x 432 mm +
  • TQPrinter::Custom +
  • TQPrinter::NPageSize - (internal) +

With setFullPage(FALSE) (the default), the metrics will be a bit +smaller; how much depends on the printer in use. + +

TQPrinter::PaperSource

+ +

This enum type specifies what paper source TQPrinter is to use. +TQPrinter does not check that the paper source is available; it +just uses this information to try and set the paper source. +Whether it will set the paper source depends on whether the +printer has that particular source. +

Note: this is currently only implemented for Windows. +

    +
  • TQPrinter::OnlyOne +
  • TQPrinter::Lower +
  • TQPrinter::Middle +
  • TQPrinter::Manual +
  • TQPrinter::Envelope +
  • TQPrinter::EnvelopeManual +
  • TQPrinter::Auto +
  • TQPrinter::Tractor +
  • TQPrinter::SmallFormat +
  • TQPrinter::LargeFormat +
  • TQPrinter::LargeCapacity +
  • TQPrinter::Cassette +
  • TQPrinter::FormSource +
+

TQPrinter::PrintRange

+ +

This enum is used to specify which print range the application +should use to print. +

    +
  • TQPrinter::AllPages - All pages should be printed +
  • TQPrinter::Selection - Only the selection should be printed. +
  • TQPrinter::PageRange - From page, to page option. +

See also setPrintRange() and printRange(). + +

TQPrinter::PrinterMode

+ +

This enum describes the mode the printer should work in. It +basically presets a certain resolution and working mode. +

    +
  • TQPrinter::ScreenResolution - Sets the resolution of the print device to +the screen resolution. This has the big advantage that the results +obtained when painting on the printer will match more or less +exactly the visible output on the screen. It is the easiest to +use, as font metrics on the screen and on the printer are the +same. This is the default value. ScreenResolution will produce a +lower quality output than HighResolution and should only be used +for drafts. +
  • TQPrinter::PrinterResolution - Use the physical resolution of the +printer on Windows. On Unix, set the postscript resolution to 72 +dpi. +
  • TQPrinter::HighResolution - Use printer resolution on windows, set the +resolution of the postscript driver to 600dpi. +
  • TQPrinter::Compatible - Almost the same as PrinterResolution, but keeps +some peculiarities of the TQt 2.x printer driver. This is useful +for applications ported from TQt 2.x to TQt 3.x. +
+

TQPrinter::PrinterOption

+ +

This enum describes various printer options that appear in the +printer setup dialog. It is used to enable and disable these +options in the setup dialog. +

    +
  • TQPrinter::PrintToFile - Describes if print to file should be enabled. +
  • TQPrinter::PrintSelection - Describes if printing selections should be enabled. +
  • TQPrinter::PrintPageRange - Describes if printing page ranges (from, to) should +be enabled +

See also setOptionEnabled() and isOptionEnabled(). + +


Member Function Documentation

+

TQPrinter::TQPrinter ( PrinterMode m = ScreenResolution ) +

+Constructs a printer paint device with mode m. +

See also TQPrinter::PrinterMode. + +

TQPrinter::~TQPrinter () +

+Destroys the printer paint device and cleans up. + +

bool TQPrinter::abort () +

+Aborts the print job. Returns TRUE if successful; otherwise +returns FALSE. +

See also aborted(). + +

bool TQPrinter::aborted () const +

+Returns TRUE if the print job was aborted; otherwise returns +FALSE. +

See also abort(). + +

ColorMode TQPrinter::colorMode () const +

+Returns the current color mode. The default color mode is Color. +

See also setColorMode(). + +

TQString TQPrinter::creator () const +

+ +

Returns the name of the application that created the document. +

See also setCreator(). + +

TQString TQPrinter::docName () const +

+ +

Returns the document name. +

See also setDocName(). + +

int TQPrinter::fromPage () const +

+ +

Returns the from-page setting. The default value is 0. +

If fromPage() and toPage() both return 0 this signifies 'print the +whole document'. +

The programmer is responsible for reading this setting and +printing accordingly. +

See also setFromTo() and toPage(). + +

bool TQPrinter::fullPage () const +

+Returns TRUE if the origin of the printer's coordinate system is +at the corner of the sheet and FALSE if it is at the edge of the +printable area. +

See setFullPage() for details and caveats. +

See also setFullPage(), PageSize, and TQPaintDeviceMetrics. + +

bool TQPrinter::isOptionEnabled ( PrinterOption option ) +

+Returns TRUE if the printer option with identifier option is enabled; +otherwise returns FALSE. +

See also setOptionEnabled(). + +

TQSize TQPrinter::margins () const +

+Returns the width of the left margin and the height of the top +margin of the printer. On Unix, this is a best-effort guess, not +based on perfect knowledge. +

If you have called setFullPage( TRUE ), margins().width() may be +treated as the smallest sane left margin you can use, and +margins().height() as the smallest sane top margin you can +use. +

If you have called setFullPage( FALSE ) (this is the default), +margins() is automatically subtracted from the pageSize() by +TQPrinter. +

See also setFullPage(), TQPaintDeviceMetrics, and PageSize. + +

void TQPrinter::margins ( uint * top, uint * left, uint * bottom, uint * right ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets top, left, bottom and right to the margins of the +printer. On Unix, this is a best-effort guess, not based on +perfect knowledge. +

If you have called setFullPage( TRUE ), the four values specify +the smallest sane margins you can use. +

If you have called setFullPage( FALSE ) (this is the default), +the margins are automatically subtracted from the pageSize() by +TQPrinter. +

See also setFullPage(), TQPaintDeviceMetrics, and PageSize. + +

int TQPrinter::maxPage () const +

+ +

Returns the max-page setting. A user can't choose a higher page +number than maxPage() when they select a print range. The default +value is 0. +

See also minPage(), setMinMax(), and setFromTo(). + +

int TQPrinter::minPage () const +

+ +

Returns the min-page setting, i.e. the lowest page number a user +is allowed to choose. The default value is 0. +

See also maxPage(), setMinMax(), and setFromTo(). + +

bool TQPrinter::newPage () +

+Advances to a new page on the printer. Returns TRUE if successful; +otherwise returns FALSE. + +

Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. +

int TQPrinter::numCopies () const +

+ +

Returns the number of copies to be printed. The default value is 1. +

This value will return the number of times the application is +retquired to print in order to match the number specified in the +printer setup dialog. This has been done since some printer +drivers are not capable of buffering up the copies and the +application in those cases have to make an explicit call to the +print code for each copy. +

See also setNumCopies(). + +

Orientation TQPrinter::orientation () const +

+ +

Returns the orientation setting. The default value is TQPrinter::Portrait. +

See also setOrientation(). + +

TQString TQPrinter::outputFileName () const +

+ +

Returns the name of the output file. There is no default file +name. +

See also setOutputFileName() and setOutputToFile(). + +

bool TQPrinter::outputToFile () const +

+ +

Returns TRUE if the output should be written to a file, or FALSE +if the output should be sent directly to the printer. The default +setting is FALSE. +

This function is currently only supported under X11 and Mac OS X. +

See also setOutputToFile() and setOutputFileName(). + +

PageOrder TQPrinter::pageOrder () const +

+Returns the current page order. +

The default page order is FirstPageFirst. +

Bugs and limitations: +

    +
  • This value is not kept in sync with the Windows or Mac OS X printer +dialogs. +
+

PageSize TQPrinter::pageSize () const +

+ +

Returns the printer page size. The default value is system-dependent. +

See also setPageSize(). + +

PaperSource TQPrinter::paperSource () const +

+Returns the currently set paper source of the printer. +

See also setPaperSource(). + +

TQString TQPrinter::printProgram () const +

+ +

Returns the name of the program that sends the print output to the +printer. +

The default is to return a null string; meaning that TQPrinter will +try to be smart in a system-dependent way. On X11 only, you can +set it to something different to use a specific print program. +

On Windows, this function returns the name of the printer device +driver. +

See also setPrintProgram() and setPrinterSelectionOption(). + +

PrintRange TQPrinter::printRange () const +

+Returns the PageRange of the TQPrinter. After the print setup dialog +has been opened, this function returns the value selected by the user. +

See also setPrintRange(). + +

TQString TQPrinter::printerName () const +

+ +

Returns the printer name. This value is initially set to the name +of the default printer. +

See also setPrinterName(). + +

TQString TQPrinter::printerSelectionOption () const +

+Returns the printer options selection string. This is useful only +if the print command has been explicitly set. +

The default value (a null string) implies that the printer should +be selected in a system-dependent manner. +

Any other value implies that the given value should be used. +

See also setPrinterSelectionOption(). + +

int TQPrinter::resolution () const [virtual] +

+Returns the current assumed resolution of the printer, as set by +setResolution() or by the printer subsystem. +

See also setResolution(). + +

void TQPrinter::setColorMode ( ColorMode newColorMode ) [virtual] +

+Sets the printer's color mode to newColorMode, which can be +either Color or GrayScale (the default). +

See also colorMode(). + +

void TQPrinter::setCreator ( const TQString & creator ) [virtual] +

+Sets the name of the application that created the document to creator. +

This function is only applicable to the X11 version of TQt. If no +creator name is specified, the creator will be set to "TQt" +followed by some version number. +

See also creator(). + +

void TQPrinter::setDocName ( const TQString & name ) [virtual] +

+Sets the document name to name. + +

void TQPrinter::setFromTo ( int fromPage, int toPage ) [virtual] +

+Sets the from-page and to-page settings to fromPage and toPage respectively. +

The from-page and to-page settings specify what pages to print. +

If fromPage() and toPage() both return 0 this signifies 'print the +whole document'. +

This function is useful mostly to set a default value that the +user can override in the print dialog when you call setup(). +

See also fromPage(), toPage(), setMinMax(), and setup(). + +

void TQPrinter::setFullPage ( bool fp ) [virtual] +

+Sets TQPrinter to have the origin of the coordinate system at the +top-left corner of the paper if fp is TRUE, or where it thinks +the top-left corner of the printable area is if fp is FALSE. +

The default is FALSE. You can (probably) print on (0,0), and +TQPaintDeviceMetrics will report something smaller than the size +indicated by PageSize. (Note that TQPrinter may be wrong on Unix +systems - it does not have perfect knowledge of the physical +printer.) +

If you set fp to TRUE, TQPaintDeviceMetrics will report the +exact same size as indicated by PageSize, but you cannot print +on all of that - you must take care of the output margins +yourself. +

See also PageSize, setPageSize(), TQPaintDeviceMetrics, and fullPage(). + +

Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. +

void TQPrinter::setMargins ( uint top, uint left, uint bottom, uint right ) +

+Sets the printer margins to the sizes specified in top, left, +bottom and right. +

This function currently only has an effect on Unix systems. +

See also margins(). + +

void TQPrinter::setMinMax ( int minPage, int maxPage ) [virtual] +

+Sets the min-page and max-page settings to minPage and maxPage respectively. +

The min-page and max-page restrict the from-page and to-page +settings. When the printer setup dialog appears, the user cannot +select a from page or a to page that are outside the range +specified by min and max pages. +

See also minPage(), maxPage(), setFromTo(), and setup(). + +

void TQPrinter::setNumCopies ( int numCopies ) [virtual] +

+Sets the number of copies to be printed to numCopies. +

The printer driver reads this setting and prints the specified +number of copies. +

See also numCopies() and setup(). + +

void TQPrinter::setOptionEnabled ( PrinterOption option, bool enable ) +

+Enables the printer option with the identifier option if enable is TRUE, and disables option option if enable is FALSE. +

See also isOptionEnabled(). + +

void TQPrinter::setOrientation ( Orientation orientation ) [virtual] +

+Sets the print orientation to orientation. +

The orientation can be either TQPrinter::Portrait or TQPrinter::Landscape. +

The printer driver reads this setting and prints using the +specified orientation. On Windows this setting won't take effect +until the printer dialog is shown (using TQPrinter::setup()). +

Windows only! This option can be changed while printing and will +take effect from the next call to newPage() +

See also orientation(). + +

void TQPrinter::setOutputFileName ( const TQString & fileName ) [virtual] +

+Sets the name of the output file to fileName. +

Setting a null or empty name (0 or "") disables output to a file, +i.e. calls setOutputToFile(FALSE). Setting a non-empty name +enables output to a file, i.e. calls setOutputToFile(TRUE). +

This function is currently only supported under X11. +

See also outputFileName() and setOutputToFile(). + +

void TQPrinter::setOutputToFile ( bool enable ) [virtual] +

+Specifies whether the output should be written to a file or sent +directly to the printer. +

Will output to a file if enable is TRUE, or will output +directly to the printer if enable is FALSE. +

This function is currently only supported under X11 and Mac OS X. +

See also outputToFile() and setOutputFileName(). + +

void TQPrinter::setPageOrder ( PageOrder newPageOrder ) [virtual] +

+Sets the page order to newPageOrder. +

The page order can be TQPrinter::FirstPageFirst or TQPrinter::LastPageFirst. The application programmer is responsible +for reading the page order and printing accordingly. +

This function is useful mostly for setting a default value that +the user can override in the print dialog when you call setup(). +

Bugs and limitations: +

    +
  • This value is not kept in sync with the Windows or Mac OS X printer +dialogs. +
+

void TQPrinter::setPageSize ( PageSize newPageSize ) [virtual] +

+Sets the printer page size to newPageSize if that size is +supported. The result if undefined if newPageSize is not +supported. +

The default page size is system-dependent. +

This function is useful mostly for setting a default value that +the user can override in the print dialog when you call setup(). +

See also pageSize(), PageSize, setFullPage(), and setResolution(). + +

void TQPrinter::setPaperSource ( PaperSource source ) [virtual] +

+Sets the paper source setting to source. +

Windows only! This option can be changed while printing and will +take effect from the next call to newPage() +

See also paperSource(). + +

void TQPrinter::setPrintProgram ( const TQString & printProg ) [virtual] +

+Sets the name of the program that should do the print job to printProg. +

On X11, this function sets the program to call with the PostScript +output. On other platforms, it has no effect. +

See also printProgram(). + +

void TQPrinter::setPrintRange ( PrintRange range ) +

+Sets the default selected page range to be used when the print setup +dialog is opened to range. If the PageRange specified by range is +currently disabled the function does nothing. +

See also printRange(). + +

void TQPrinter::setPrinterName ( const TQString & name ) [virtual] +

+Sets the printer name to name. +

The default printer will be used if no printer name is set. +

Under X11, the PRINTER environment variable defines the default +printer. Under any other window system, the window system defines +the default printer. +

See also printerName(). + +

void TQPrinter::setPrinterSelectionOption ( const TQString & option ) [virtual] +

+Sets the printer to use option to select the printer. option +is null by default (which implies that TQt should be smart enough +to guess correctly), but it can be set to other values to use a +specific printer selection option. +

If the printer selection option is changed while the printer is +active, the current print job may or may not be affected. +

See also printerSelectionOption(). + +

void TQPrinter::setResolution ( int dpi ) [virtual] +

+Requests that the printer prints at dpi or as near to dpi as +possible. +

This setting affects the coordinate system as returned by, for +example, TQPaintDeviceMetrics and TQPainter::viewport(). +

The value depends on the PrintingMode used in the TQPrinter +constructor. By default, the dpi value of the screen is used. +

This function must be called before setup() to have an effect on +all platforms. +

See also resolution() and setPageSize(). + +

void TQPrinter::setWinPageSize ( short winPageSize ) +

+Windows only, using this function is not portable! +Sets the windows page size value that is used by the DEVMODE +struct. The winPageSize value must be one of the DMPAPER_ defines +from wingdi.h. + +

bool TQPrinter::setup ( TQWidget * parent = 0 ) +

+Opens a printer setup dialog, with parent parent, and asks the +user to specify which printer they wish to use and what settings +it should have. +

Returns TRUE if the user pressed "OK" to print, or FALSE if the +user canceled the operation. + +

Examples: action/application.cpp, application/application.cpp, drawdemo/drawdemo.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. +

int TQPrinter::toPage () const +

+ +

Returns the to-page setting. The default value is 0. +

If fromPage() and toPage() both return 0 this signifies 'print the +whole document'. +

The programmer is responsible for reading this setting and +printing accordingly. +

See also setFromTo() and fromPage(). + +

short TQPrinter::winPageSize () const +

+Returns the Windows page size value as used by the DEVMODE +struct (Windows only). Using this function is not portable. +

Use pageSize() to get the PageSize, e.g. 'A4', 'Letter', etc. + + +


+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/qprocess-examples.html b/doc/html/qprocess-examples.html new file mode 100644 index 00000000..cee39426 --- /dev/null +++ b/doc/html/qprocess-examples.html @@ -0,0 +1,48 @@ + + + + + +TQProcess Examples + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQProcess Examples

+ + +

The following example programs show how to use the +TQProcess class. +

+

+
Starting processes with IO redirection +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qprocess-h.html b/doc/html/qprocess-h.html new file mode 100644 index 00000000..fdbdabb9 --- /dev/null +++ b/doc/html/qprocess-h.html @@ -0,0 +1,223 @@ + + + + + +qprocess.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qprocess.h

+ +

This is the verbatim text of the qprocess.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qprocess.h   3.3.8   edited Jan 11 14:38 $
+**
+** Implementation of TQProcess class
+**
+** Created : 20000905
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPROCESS_H
+#define TQPROCESS_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qstringlist.h"
+#include "qdir.h"
+#endif // QT_H
+
+#ifndef QT_NO_PROCESS
+
+class TQProcessPrivate;
+class TQMembuf;
+
+
+class Q_EXPORT TQProcess : public TQObject
+{
+    Q_OBJECT
+public:
+    TQProcess( TQObject *parent=0, const char *name=0 );
+    TQProcess( const TQString& arg0, TQObject *parent=0, const char *name=0 );
+    TQProcess( const TQStringList& args, TQObject *parent=0, const char *name=0 );
+    ~TQProcess();
+
+    // set and get the arguments and working directory
+    TQStringList arguments() const;
+    void clearArguments();
+    virtual void setArguments( const TQStringList& args );
+    virtual void addArgument( const TQString& arg );
+#ifndef QT_NO_DIR
+    TQDir workingDirectory() const;
+    virtual void setWorkingDirectory( const TQDir& dir );
+#endif
+
+    // set and get the comms wanted
+    enum Communication { Stdin=0x01, Stdout=0x02, Stderr=0x04, DupStderr=0x08 };
+    void setCommunication( int c );
+    int communication() const;
+
+    // start the execution
+    virtual bool start( TQStringList *env=0 );
+    virtual bool launch( const TQString& buf, TQStringList *env=0  );
+    virtual bool launch( const TQByteArray& buf, TQStringList *env=0  );
+
+    // intquire the status
+    bool isRunning() const;
+    bool normalExit() const;
+    int exitStatus() const;
+
+    // reading
+    virtual TQByteArray readStdout();
+    virtual TQByteArray readStderr();
+    bool canReadLineStdout() const;
+    bool canReadLineStderr() const;
+    virtual TQString readLineStdout();
+    virtual TQString readLineStderr();
+
+    // get platform dependent process information
+#if defined(Q_OS_WIN32)
+    typedef void* PID;
+#else
+    typedef Q_LONG PID;
+#endif
+    PID processIdentifier();
+
+    void flushStdin();
+
+signals:
+    void readyReadStdout();
+    void readyReadStderr();
+    void processExited();
+    void wroteToStdin();
+    void launchFinished();
+
+public slots:
+    // end the execution
+    void tryTerminate() const;
+    void kill() const;
+
+    // input
+    virtual void writeToStdin( const TQByteArray& buf );
+    virtual void writeToStdin( const TQString& buf );
+    virtual void closeStdin();
+
+protected: // ### or private?
+    void connectNotify( const char * signal );
+    void disconnectNotify( const char * signal );
+private:
+    void setIoRedirection( bool value );
+    void setNotifyOnExit( bool value );
+    void setWroteStdinConnected( bool value );
+
+    void init();
+    void reset();
+#if defined(Q_OS_WIN32)
+    uint readStddev( HANDLE dev, char *buf, uint bytes );
+#endif
+    TQMembuf* membufStdout();
+    TQMembuf* membufStderr();
+
+private slots:
+    void socketRead( int fd );
+    void socketWrite( int fd );
+    void timeout();
+    void closeStdinLaunch();
+
+private:
+    TQProcessPrivate *d;
+#ifndef QT_NO_DIR
+    TQDir        workingDir;
+#endif
+    TQStringList _arguments;
+
+    int  exitStat; // exit status
+    bool exitNormal; // normal exit?
+    bool ioRedirection; // automatically set be (dis)connectNotify
+    bool notifyOnExit; // automatically set be (dis)connectNotify
+    bool wroteToStdinConnected; // automatically set be (dis)connectNotify
+
+    bool readStdoutCalled;
+    bool readStderrCalled;
+    int comms;
+
+    friend class TQProcessPrivate;
+#if defined(Q_OS_UNIX)
+    friend class TQProcessManager;
+    friend class TQProc;
+#endif
+
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQProcess( const TQProcess & );
+    TQProcess &operator=( const TQProcess & );
+#endif
+};
+
+#endif // QT_NO_PROCESS
+
+#endif // TQPROCESS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qprocess-members.html b/doc/html/qprocess-members.html new file mode 100644 index 00000000..d1e3efb4 --- /dev/null +++ b/doc/html/qprocess-members.html @@ -0,0 +1,119 @@ + + + + + +TQProcess Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQProcess

+ +

This is the complete list of member functions for +TQProcess, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qprocess.html b/doc/html/qprocess.html new file mode 100644 index 00000000..b779b440 --- /dev/null +++ b/doc/html/qprocess.html @@ -0,0 +1,633 @@ + + + + + +TQProcess Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQProcess Class Reference

+ +

The TQProcess class is used to start external programs and +to communicate with them. +More... +

#include <qprocess.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Detailed Description

+ + +

The TQProcess class is used to start external programs and +to communicate with them. +

+ + +

You can write to the started program's standard input, and can +read the program's standard output and standard error. You can +pass command line arguments to the program either in the +constructor or with setArguments() or addArgument(). The program's +working directory can be set with setWorkingDirectory(). If you +need to set up environment variables pass them to the start() or +launch() functions (see below). The processExited() signal is +emitted if the program exits. The program's exit status is +available from exitStatus(), although you could simply call +normalExit() to see if the program terminated normally. +

There are two different ways to start a process. If you just want +to run a program, optionally passing data to its standard input at +the beginning, use one of the launch() functions. If you want full +control of the program's standard input (especially if you don't +know all the data you want to send to standard input at the +beginning), use the start() function. +

If you use start() you can write to the program's standard input +using writeToStdin() and you can close the standard input with +closeStdin(). The wroteToStdin() signal is emitted if the data +sent to standard input has been written. You can read from the +program's standard output using readStdout() or readLineStdout(). +These functions return an empty TQByteArray if there is no data to +read. The readyReadStdout() signal is emitted when there is data +available to be read from standard output. Standard error has a +set of functions that correspond to the standard output functions, +i.e. readStderr(), readLineStderr() and readyReadStderr(). +

If you use one of the launch() functions the data you pass will be +sent to the program's standard input which will be closed once all +the data has been written. You should not use writeToStdin() or +closeStdin() if you use launch(). If you need to send data to the +program's standard input after it has started running use start() +instead of launch(). +

Both start() and launch() can accept a string list of strings each +of which has the format, key=value, where the keys are the names +of environment variables. +

You can test to see if a program is running with isRunning(). The +program's process identifier is available from +processIdentifier(). If you want to terminate a running program +use tryTerminate(), but note that the program may ignore this. If +you really want to terminate the program, without it having any +chance to clean up, you can use kill(). +

As an example, suppose we want to start the uic command (a TQt +command line tool used with TQt Designer) and perform some +operations on the output (the uic outputs the code it generates +to standard output by default). Suppose further that we want to +run the program on the file "small_dialog.ui" with the command +line options "-tr i18n". On the command line we would write: +

+    uic -tr i18n small_dialog.ui
+    
+ +

+ +

A code snippet for this with the TQProcess class might look like +this: +

    UicManager::UicManager()
+    {
+
        proc = new TQProcess( this );
+
        proc->addArgument( "uic" );
+        proc->addArgument( "-tr" );
+        proc->addArgument( "i18n" );
+        proc->addArgument( "small_dialog.ui" );
+
+        connect( proc, SIGNAL(readyReadStdout()),
+                this, SLOT(readFromStdout()) );
+
        if ( !proc->start() ) {
+            // error handling
+
        }
+    }
+
+

    void UicManager::readFromStdout()
+    {
+        // Read and process the data.
+        // Bear in mind that the data might be output in chunks.
+
    }
+
+

Although you may need quotes for a file named on the command line +(e.g. if it contains spaces) you shouldn't use extra quotes for +arguments passed to addArgument() or setArguments(). +

The readyReadStdout() signal is emitted when there is new data on +standard output. This happens asynchronously: you don't know if +more data will arrive later. +

In the above example you could connect the processExited() signal +to the slot UicManager::readFromStdout() instead. If you do so, +you will be certain that all the data is available when the slot +is called. On the other hand, you must wait until the process has +finished before doing any processing. +

Note that if you are expecting a lot of output from the process, +you may hit platform-dependent limits to the pipe buffer size. The +solution is to make sure you connect to the output, e.g. the +readyReadStdout() and readyReadStderr() signals and read the data +as soon as it becomes available. +

Please note that TQProcess does not emulate a shell. This means that +TQProcess does not do any expansion of arguments: a '*' is passed as a '*' +to the program and is not replaced by all the files, a '$HOME' is also +passed literally and is not replaced by the environment variable HOME +and the special characters for IO redirection ('>', '|', etc.) are also +passed literally and do not have the special meaning as they have in a +shell. +

Also note that TQProcess does not emulate a terminal. This means that +certain programs which need direct terminal control, do not work as +expected with TQProcess. Such programs include console email programs (like +pine and mutt) but also programs which retquire the user to enter a password +(like su and ssh). +

Notes for Windows users +

+

Some Windows commands, for example, dir, are not provided by +separate applications, but by the command interpreter. +If you attempt to use TQProcess to execute these commands directly +it won't work. One possible solution is to execute the command +interpreter itself (cmd.exe on some Windows systems), and ask +the interpreter to execute the desired command. +

Under Windows there are certain problems starting 16-bit applications +and capturing their output. Microsoft recommends using an intermediate +application to start 16-bit applications. +

See also TQSocket, Input/Output and Networking, and Miscellaneous Classes. + +


Member Type Documentation

+

TQProcess::Communication

+ +

This enum type defines the communication channels connected to the +process. +

    +
  • TQProcess::Stdin - Data can be written to the process's standard input. +
  • TQProcess::Stdout - Data can be read from the process's standard +output. +
  • TQProcess::Stderr - Data can be read from the process's standard error. +
  • TQProcess::DupStderr - Both the process's standard error output and +its standard output are written to its standard output. (Like +Unix's dup2().) This means that nothing is sent to the standard +error output. This is especially useful if your application +retquires that the output on standard output and on standard error +must be read in the same order that they are produced. This is a +flag, so to activate it you must pass Stdout|Stderr|DupStderr, +or Stdin|Stdout|Stderr|DupStderr if you want to provide input, +to the setCommunication() call. +

See also setCommunication() and communication(). + +


Member Function Documentation

+

TQProcess::TQProcess ( TQObject * parent = 0, const char * name = 0 ) +

+Constructs a TQProcess object. The parent and name parameters +are passed to the TQObject constructor. +

See also setArguments(), addArgument(), and start(). + +

TQProcess::TQProcess ( const TQString & arg0, TQObject * parent = 0, const char * name = 0 ) +

+Constructs a TQProcess with arg0 as the command to be executed. +The parent and name parameters are passed to the TQObject +constructor. +

The process is not started. You must call start() or launch() to +start the process. +

See also setArguments(), addArgument(), and start(). + +

TQProcess::TQProcess ( const TQStringList & args, TQObject * parent = 0, const char * name = 0 ) +

+Constructs a TQProcess with args as the arguments of the +process. The first element in the list is the command to be +executed. The other elements in the list are the arguments to this +command. The parent and name parameters are passed to the +TQObject constructor. +

The process is not started. You must call start() or launch() to +start the process. +

See also setArguments(), addArgument(), and start(). + +

TQProcess::~TQProcess () +

+Destroys the instance. +

If the process is running, it is not terminated! The +standard input, standard output and standard error of the process +are closed. +

You can connect the destroyed() signal to the kill() slot, if you +want the process to be terminated automatically when the instance +is destroyed. +

See also tryTerminate() and kill(). + +

void TQProcess::addArgument ( const TQString & arg ) [virtual] +

+Adds arg to the end of the list of arguments. +

The first element in the list of arguments is the command to be +executed; the following elements are the command's arguments. +

See also arguments() and setArguments(). + +

Example: process/process.cpp. +

TQStringList TQProcess::arguments () const +

+Returns the list of arguments that are set for the process. +Arguments can be specified with the constructor or with the +functions setArguments() and addArgument(). +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+    TQStringList list = myProcess.arguments();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also setArguments() and addArgument(). + +

bool TQProcess::canReadLineStderr () const +

+Returns TRUE if it's possible to read an entire line of text from +standard error at this time; otherwise returns FALSE. +

See also readLineStderr() and canReadLineStdout(). + +

bool TQProcess::canReadLineStdout () const +

+Returns TRUE if it's possible to read an entire line of text from +standard output at this time; otherwise returns FALSE. +

See also readLineStdout() and canReadLineStderr(). + +

void TQProcess::clearArguments () +

+Clears the list of arguments that are set for the process. +

See also setArguments() and addArgument(). + +

void TQProcess::closeStdin () [virtual slot] +

+Closes the process's standard input. +

This function also deletes any pending data that has not been +written to standard input. +

See also wroteToStdin(). + +

int TQProcess::communication () const +

+Returns the communication retquired with the process, i.e. some +combination of the Communication flags. +

See also setCommunication(). + +

int TQProcess::exitStatus () const +

+Returns the exit status of the process or 0 if the process is +still running. This function returns immediately and does not wait +until the process is finished. +

If normalExit() is FALSE (e.g. if the program was killed or +crashed), this function returns 0, so you should check the return +value of normalExit() before relying on this value. +

See also normalExit() and processExited(). + +

bool TQProcess::isRunning () const +

+Returns TRUE if the process is running; otherwise returns FALSE. +

See also normalExit(), exitStatus(), and processExited(). + +

void TQProcess::kill () const [slot] +

+Terminates the process. This is not a safe way to end a process +since the process will not be able to do any cleanup. +tryTerminate() is safer, but processes can ignore a +tryTerminate(). +

The nice way to end a process and to be sure that it is finished, +is to do something like this: +

+        process->tryTerminate();
+        TQTimer::singleShot( 5000, process, SLOT( kill() ) );
+    
+ +

This tries to terminate the process the nice way. If the process +is still running after 5 seconds, it terminates the process the +hard way. The timeout should be chosen depending on the time the +process needs to do all its cleanup: use a higher value if the +process is likely to do a lot of computation or I/O on cleanup. +

The slot returns immediately: it does not wait until the process +has finished. When the process terminates, the processExited() +signal is emitted. +

See also tryTerminate() and processExited(). + +

bool TQProcess::launch ( const TQByteArray & buf, TQStringList * env = 0 ) [virtual] +

+Runs the process and writes the data buf to the process's +standard input. If all the data is written to standard input, +standard input is closed. The command is searched for in the path +for executable programs; you can also use an absolute path in the +command itself. +

If env is null, then the process is started with the same +environment as the starting process. If env is non-null, then +the values in the string list are interpreted as environment +setttings of the form key=value and the process is started +with these environment settings. For convenience, there is a small +exception to this rule under Unix: if env does not contain any +settings for the environment variable LD_LIBRARY_PATH, then +this variable is inherited from the starting process. +

Returns TRUE if the process could be started; otherwise returns +FALSE. +

Note that you should not use the slots writeToStdin() and +closeStdin() on processes started with launch(), since the result +is not well-defined. If you need these slots, use start() instead. +

The process may or may not read the buf data sent to its +standard input. +

You can call this function even when a process that was started +with this instance is still running. Be aware that if you do this +the standard input of the process that was launched first will be +closed, with any pending data being deleted, and the process will +be left to run out of your control. Similarly, if the process +could not be started the standard input will be closed and the +pending data deleted. (On operating systems that have zombie +processes, TQt will also wait() on the old process.) +

The object emits the signal launchFinished() when this function +call is finished. If the start was successful, this signal is +emitted after all the data has been written to standard input. If +the start failed, then this signal is emitted immediately. +

See also start() and launchFinished(). + +

bool TQProcess::launch ( const TQString & buf, TQStringList * env = 0 ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

The data buf is written to standard input with writeToStdin() +using the TQString::local8Bit() representation of the strings. + +

void TQProcess::launchFinished () [signal] +

+ +

This signal is emitted when the process was started with launch(). +If the start was successful, this signal is emitted after all the +data has been written to standard input. If the start failed, then +this signal is emitted immediately. +

This signal is especially useful if you want to know when you can +safely delete the TQProcess object when you are not interested in +reading from standard output or standard error. +

See also launch() and TQObject::deleteLater(). + +

bool TQProcess::normalExit () const +

+Returns TRUE if the process has exited normally; otherwise returns +FALSE. This implies that this function returns FALSE if the +process is still running. +

See also isRunning(), exitStatus(), and processExited(). + +

void TQProcess::processExited () [signal] +

+ +

This signal is emitted when the process has exited. +

See also isRunning(), normalExit(), exitStatus(), start(), and launch(). + +

Example: process/process.cpp. +

PID TQProcess::processIdentifier () +

+Returns platform dependent information about the process. This can +be used together with platform specific system calls. +

Under Unix the return value is the PID of the process, or -1 if no +process belongs to this object. +

Under Windows it is a pointer to the PROCESS_INFORMATION +struct, or 0 if no process is belongs to this object. +

Use of this function's return value is likely to be non-portable. + +

TQString TQProcess::readLineStderr () [virtual] +

+Reads a line of text from standard error, excluding any trailing +newline or carriage return characters and returns it. Returns +TQString::null if canReadLineStderr() returns FALSE. +

By default, the text is interpreted to be in Latin-1 encoding. If you need +other codecs, you can set a different codec with +TQTextCodec::setCodecForCStrings(). +

See also canReadLineStderr(), readyReadStderr(), readStderr(), and readLineStdout(). + +

TQString TQProcess::readLineStdout () [virtual] +

+Reads a line of text from standard output, excluding any trailing +newline or carriage return characters, and returns it. Returns +TQString::null if canReadLineStdout() returns FALSE. +

By default, the text is interpreted to be in Latin-1 encoding. If you need +other codecs, you can set a different codec with +TQTextCodec::setCodecForCStrings(). +

See also canReadLineStdout(), readyReadStdout(), readStdout(), and readLineStderr(). + +

TQByteArray TQProcess::readStderr () [virtual] +

+Reads the data that the process has written to standard error. +When new data is written to standard error, the class emits the +signal readyReadStderr(). +

If there is no data to read, this function returns a TQByteArray of +size 0: it does not wait until there is something to read. +

See also readyReadStderr(), readLineStderr(), readStdout(), and writeToStdin(). + +

TQByteArray TQProcess::readStdout () [virtual] +

+Reads the data that the process has written to standard output. +When new data is written to standard output, the class emits the +signal readyReadStdout(). +

If there is no data to read, this function returns a TQByteArray of +size 0: it does not wait until there is something to read. +

See also readyReadStdout(), readLineStdout(), readStderr(), and writeToStdin(). + +

Example: process/process.cpp. +

void TQProcess::readyReadStderr () [signal] +

+ +

This signal is emitted when the process has written data to +standard error. You can read the data with readStderr(). +

Note that this signal is only emitted when there is new data and +not when there is old, but unread data. In the slot connected to +this signal, you should always read everything that is available +at that moment to make sure that you don't lose any data. +

See also readStderr(), readLineStderr(), and readyReadStdout(). + +

void TQProcess::readyReadStdout () [signal] +

+ +

This signal is emitted when the process has written data to +standard output. You can read the data with readStdout(). +

Note that this signal is only emitted when there is new data and +not when there is old, but unread data. In the slot connected to +this signal, you should always read everything that is available +at that moment to make sure that you don't lose any data. +

See also readStdout(), readLineStdout(), and readyReadStderr(). + +

Example: process/process.cpp. +

void TQProcess::setArguments ( const TQStringList & args ) [virtual] +

+Sets args as the arguments for the process. The first element +in the list is the command to be executed. The other elements in +the list are the arguments to the command. Any previous arguments +are deleted. +

TQProcess does not perform argument substitutions; for example, if you +specify "*" or "$DISPLAY", these values are passed to the process +literally. If you want to have the same behavior as the shell +provides, you must do the substitutions yourself; i.e. instead of +specifying a "*" you must specify the list of all the filenames in +the current directory, and instead of "$DISPLAY" you must specify +the value of the environment variable DISPLAY. +

Note for Windows users. The standard Windows shells, e.g. command.com and cmd.exe, do not perform file globbing, i.e. +they do not convert a "*" on the command line into a list of files +in the current directory. For this reason most Windows +applications implement their own file globbing, and as a result of +this, specifying an argument of "*" for a Windows application is +likely to result in the application performing a file glob and +ending up with a list of filenames. +

See also arguments() and addArgument(). + +

void TQProcess::setCommunication ( int commFlags ) +

+Sets commFlags as the communication retquired with the process. +

commFlags is a bitwise OR of the flags defined by the Communication enum. +

The default is Stdin|Stdout|Stderr. +

See also communication(). + +

void TQProcess::setWorkingDirectory ( const TQDir & dir ) [virtual] +

+Sets dir as the working directory for processes. This does not +affect running processes; only processes that are started +afterwards are affected. +

Setting the working directory is especially useful for processes +that try to access files with relative paths. +

See also workingDirectory() and start(). + +

bool TQProcess::start ( TQStringList * env = 0 ) [virtual] +

+Tries to run a process for the command and arguments that were +specified with setArguments(), addArgument() or that were +specified in the constructor. The command is searched for in the +path for executable programs; you can also use an absolute path in +the command itself. +

If env is null, then the process is started with the same +environment as the starting process. If env is non-null, then +the values in the stringlist are interpreted as environment +setttings of the form key=value and the process is started in +these environment settings. For convenience, there is a small +exception to this rule: under Unix, if env does not contain any +settings for the environment variable LD_LIBRARY_PATH, then +this variable is inherited from the starting process; under +Windows the same applies for the environment variable PATH. +

Returns TRUE if the process could be started; otherwise returns +FALSE. +

You can write data to the process's standard input with +writeToStdin(). You can close standard input with closeStdin() and +you can terminate the process with tryTerminate(), or with kill(). +

You can call this function even if you've used this instance to +create a another process which is still running. In such cases, +TQProcess closes the old process's standard input and deletes +pending data, i.e., you lose all control over the old process, but +the old process is not terminated. This applies also if the +process could not be started. (On operating systems that have +zombie processes, TQt will also wait() on the old process.) +

See also launch() and closeStdin(). + +

Example: process/process.cpp. +

void TQProcess::tryTerminate () const [slot] +

+Asks the process to terminate. Processes can ignore this if they +wish. If you want to be certain that the process really +terminates, you can use kill() instead. +

The slot returns immediately: it does not wait until the process +has finished. When the process terminates, the processExited() +signal is emitted. +

See also kill() and processExited(). + +

TQDir TQProcess::workingDirectory () const +

+Returns the working directory that was set with +setWorkingDirectory(), or the current directory if none has been +explicitly set. +

See also setWorkingDirectory() and TQDir::current(). + +

void TQProcess::writeToStdin ( const TQByteArray & buf ) [virtual slot] +

+Writes the data buf to the process's standard input. The +process may or may not read this data. +

This function always returns immediately. The data you +pass to writeToStdin() is copied into an internal memory buffer in +TQProcess, and when control goes back to the event loop, TQProcess will +starting transferring data from this buffer to the running process.   +Sometimes the data will be transferred in several payloads, depending on +how much data is read at a time by the process itself. When TQProcess has +transferred all the data from its memory buffer to the running process, it +emits wroteToStdin(). +

Note that some operating systems use a buffer to transfer +the data. As a result, wroteToStdin() may be emitted before the +running process has actually read all the data. +

See also wroteToStdin(), closeStdin(), readStdout(), and readStderr(). + +

void TQProcess::writeToStdin ( const TQString & buf ) [virtual slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

The string buf is handled as text using the +TQString::local8Bit() representation. + +

void TQProcess::wroteToStdin () [signal] +

+ +

This signal is emitted if the data sent to standard input (via +writeToStdin()) was actually written to the process. This does not +imply that the process really read the data, since this class only +detects when it was able to write the data to the operating +system. But it is now safe to close standard input without losing +pending data. +

See also writeToStdin() and closeStdin(). + + +


+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/qprogbar-m.png b/doc/html/qprogbar-m.png new file mode 100644 index 00000000..4f221c00 Binary files /dev/null and b/doc/html/qprogbar-m.png differ diff --git a/doc/html/qprogbar-w.png b/doc/html/qprogbar-w.png new file mode 100644 index 00000000..4e820a9a Binary files /dev/null and b/doc/html/qprogbar-w.png differ diff --git a/doc/html/qprogdlg-m.png b/doc/html/qprogdlg-m.png new file mode 100644 index 00000000..5990a331 Binary files /dev/null and b/doc/html/qprogdlg-m.png differ diff --git a/doc/html/qprogdlg-w.png b/doc/html/qprogdlg-w.png new file mode 100644 index 00000000..cbb259c8 Binary files /dev/null and b/doc/html/qprogdlg-w.png differ diff --git a/doc/html/qprogressbar-h.html b/doc/html/qprogressbar-h.html new file mode 100644 index 00000000..aef4d560 --- /dev/null +++ b/doc/html/qprogressbar-h.html @@ -0,0 +1,194 @@ + + + + + +qprogressbar.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qprogressbar.h

+ +

This is the verbatim text of the qprogressbar.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qprogressbar.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQProgressBar class
+**
+** Created : 970520
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPROGRESSBAR_H
+#define TQPROGRESSBAR_H
+
+#ifndef QT_H
+#include "qframe.h"
+#endif // QT_H
+
+#ifndef QT_NO_PROGRESSBAR
+
+
+class TQProgressBarPrivate;
+
+
+class Q_EXPORT TQProgressBar : public TQFrame
+{
+    Q_OBJECT
+    Q_PROPERTY( int totalSteps READ totalSteps WRITE setTotalSteps )
+    Q_PROPERTY( int progress READ progress WRITE setProgress )
+    Q_PROPERTY( TQString progressString READ progressString )
+    Q_PROPERTY( bool centerIndicator READ centerIndicator WRITE setCenterIndicator )
+    Q_PROPERTY( bool indicatorFollowsStyle READ indicatorFollowsStyle WRITE setIndicatorFollowsStyle )
+    Q_PROPERTY( bool percentageVisible READ percentageVisible WRITE setPercentageVisible )
+
+public:
+    TQProgressBar( TQWidget* parent=0, const char* name=0, WFlags f=0 );
+    TQProgressBar( int totalSteps, TQWidget* parent=0, const char* name=0, WFlags f=0 );
+
+    int		totalSteps() const;
+    int		progress()   const;
+    const TQString &progressString() const;
+
+    TQSize	sizeHint() const;
+    TQSize	minimumSizeHint() const;
+
+    void	setCenterIndicator( bool on );
+    bool	centerIndicator() const;
+
+    void        setIndicatorFollowsStyle( bool );
+    bool	indicatorFollowsStyle() const;
+
+    bool	percentageVisible() const;
+    void	setPercentageVisible( bool );
+
+    void	show();
+
+public slots:
+    void	reset();
+    virtual void setTotalSteps( int totalSteps );
+    virtual void setProgress( int progress );
+    void	setProgress( int progress, int totalSteps );
+
+protected:
+    void	drawContents( TQPainter * );
+    virtual bool setIndicator( TQString & progress_str, int progress,
+			       int totalSteps );
+    void styleChange( TQStyle& );
+
+private:
+    int		total_steps;
+    int		progress_val;
+    int		percentage;
+    TQString	progress_str;
+    bool        center_indicator    : 1;
+    bool        auto_indicator	    : 1;
+    bool	percentage_visible  : 1;
+    TQProgressBarPrivate * d;
+    void         initFrame();
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQProgressBar( const TQProgressBar & );
+    TQProgressBar &operator=( const TQProgressBar & );
+#endif
+};
+
+
+inline int TQProgressBar::totalSteps() const
+{
+    return total_steps;
+}
+
+inline int TQProgressBar::progress() const
+{
+    return progress_val;
+}
+
+inline const TQString &TQProgressBar::progressString() const
+{
+    return progress_str;
+}
+
+inline bool TQProgressBar::centerIndicator() const
+{
+    return center_indicator;
+}
+
+inline bool TQProgressBar::indicatorFollowsStyle() const
+{
+    return auto_indicator;
+}
+
+inline bool TQProgressBar::percentageVisible() const
+{
+    return percentage_visible;
+}
+
+#endif // QT_NO_PROGRESSBAR
+
+#endif // TQPROGRESSBAR_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qprogressbar-members.html b/doc/html/qprogressbar-members.html new file mode 100644 index 00000000..e949ea36 --- /dev/null +++ b/doc/html/qprogressbar-members.html @@ -0,0 +1,369 @@ + + + + + +TQProgressBar Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQProgressBar

+ +

This is the complete list of member functions for +TQProgressBar, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qprogressbar.html b/doc/html/qprogressbar.html new file mode 100644 index 00000000..abe284f1 --- /dev/null +++ b/doc/html/qprogressbar.html @@ -0,0 +1,224 @@ + + + + + +TQProgressBar Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQProgressBar Class Reference

+ +

The TQProgressBar widget provides a horizontal progress bar. +More... +

#include <qprogressbar.h> +

Inherits TQFrame. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Properties

+ +

Protected Members

+
    +
  • virtual bool setIndicator ( TQString & indicator, int progress, int totalSteps )
  • +
+

Detailed Description

+ + +The TQProgressBar widget provides a horizontal progress bar. +

+ +

A progress bar is used to give the user an indication of the +progress of an operation and to reassure them that the application +is still running. +

The progress bar uses the concept of steps; you give it the +total number of steps and the number of steps completed so far and +it will display the percentage of steps that have been completed. +You can specify the total number of steps in the constructor or +later with setTotalSteps(). The current number of steps is set +with setProgress(). The progress bar can be rewound to the +beginning with reset(). +

If the total is given as 0 the progress bar shows a busy indicator +instead of a percentage of steps. This is useful, for example, +when using TQFtp or TQHttp to download items when they are unable to +determine the size of the item being downloaded. +

See also TQProgressDialog, GUI Design Handbook: Progress Indicator, and Advanced Widgets. + +

+

See also TQProgressDialog, GUI Design Handbook: Progress Indicator, and Advanced Widgets. + +


Member Function Documentation

+

TQProgressBar::TQProgressBar ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

+Constructs a progress bar. +

The total number of steps is set to 100 by default. +

The parent, name and widget flags, f, are passed on to +the TQFrame::TQFrame() constructor. +

See also totalSteps. + +

TQProgressBar::TQProgressBar ( int totalSteps, TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

+Constructs a progress bar. +

The totalSteps is the total number of steps that need to be +completed for the operation which this progress bar represents. +For example, if the operation is to examine 50 files, this value +would be 50. Before examining the first file, call setProgress(0); +call setProgress(50) after examining the last file. +

The parent, name and widget flags, f, are passed to the +TQFrame::TQFrame() constructor. +

See also totalSteps and progress. + +

bool TQProgressBar::centerIndicator () const +

Returns TRUE if the indicator string should be centered; otherwise returns FALSE. +See the "centerIndicator" property for details. +

bool TQProgressBar::indicatorFollowsStyle () const +

Returns TRUE if the display of the indicator string should follow the GUI style; otherwise returns FALSE. +See the "indicatorFollowsStyle" property for details. +

bool TQProgressBar::percentageVisible () const +

Returns TRUE if the current progress value is displayed; otherwise returns FALSE. +See the "percentageVisible" property for details. +

int TQProgressBar::progress () const +

Returns the current amount of progress. +See the "progress" property for details. +

const TQString & TQProgressBar::progressString () const +

Returns the amount of progress as a string. +See the "progressString" property for details. +

void TQProgressBar::reset () [slot] +

+Reset the progress bar. The progress bar "rewinds" and shows no +progress. + +

Examples: fileiconview/mainwindow.cpp and progressbar/progressbar.cpp. +

void TQProgressBar::setCenterIndicator ( bool on ) +

Sets whether the indicator string should be centered to on. +See the "centerIndicator" property for details. +

bool TQProgressBar::setIndicator ( TQString & indicator, int progress, int totalSteps ) [virtual protected] +

+This method is called to generate the text displayed in the center +(or in some styles, to the left) of the progress bar. +

The progress may be negative, indicating that the progress bar +is in the "reset" state before any progress is set. +

The default implementation is the percentage of completion or +blank in the reset state. The percentage is calculated based on +the progress and totalSteps. You can set the indicator +text if you wish. +

To allow efficient repainting of the progress bar, this method +should return FALSE if the string is unchanged from the last call +to this function. + +

void TQProgressBar::setIndicatorFollowsStyle ( bool ) +

Sets whether the display of the indicator string should follow the GUI style. +See the "indicatorFollowsStyle" property for details. +

void TQProgressBar::setPercentageVisible ( bool ) +

Sets whether the current progress value is displayed. +See the "percentageVisible" property for details. +

void TQProgressBar::setProgress ( int progress ) [virtual slot] +

Sets the current amount of progress to progress. +See the "progress" property for details. +

void TQProgressBar::setProgress ( int progress, int totalSteps ) [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the amount of progress to progress and the total number of +steps to totalSteps. +

See also totalSteps. + +

void TQProgressBar::setTotalSteps ( int totalSteps ) [virtual slot] +

Sets the total number of steps to totalSteps. +See the "totalSteps" property for details. +

int TQProgressBar::totalSteps () const +

Returns the total number of steps. +See the "totalSteps" property for details. +


Property Documentation

+

bool centerIndicator

+

This property holds whether the indicator string should be centered. +

Changing this property sets TQProgressBar::indicatorFollowsStyle +to FALSE. The default is TRUE. + +

Set this property's value with setCenterIndicator() and get this property's value with centerIndicator(). +

bool indicatorFollowsStyle

+

This property holds whether the display of the indicator string should follow the GUI style. +

The default is TRUE. +

See also centerIndicator. + +

Set this property's value with setIndicatorFollowsStyle() and get this property's value with indicatorFollowsStyle(). +

bool percentageVisible

+

This property holds whether the current progress value is displayed. +

The default is TRUE. +

See also centerIndicator and indicatorFollowsStyle. + +

Set this property's value with setPercentageVisible() and get this property's value with percentageVisible(). +

int progress

+

This property holds the current amount of progress. +

This property is -1 if progress counting has not started. + +

Set this property's value with setProgress() and get this property's value with progress(). +

TQString progressString

+

This property holds the amount of progress as a string. +

This property is TQString::null if progress counting has not started. + +

Get this property's value with progressString(). +

int totalSteps

+

This property holds the total number of steps. +

If totalSteps is 0, the progress bar will display a busy +indicator. +

See also +

Set this property's value with setTotalSteps() and get this property's value with totalSteps(). + +


+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/qprogressdialog-h.html b/doc/html/qprogressdialog-h.html new file mode 100644 index 00000000..c3118e3e --- /dev/null +++ b/doc/html/qprogressdialog-h.html @@ -0,0 +1,186 @@ + + + + + +qprogressdialog.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qprogressdialog.h

+ +

This is the verbatim text of the qprogressdialog.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qprogressdialog.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQProgressDialog class
+**
+** Created : 970520
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the dialogs 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 retquirements 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 TQPROGRESSDIALOG_H
+#define TQPROGRESSDIALOG_H
+
+#ifndef QT_H
+#include "qsemimodal.h"
+#include "qlabel.h"       // ### remove or keep for users' convenience?
+#include "qprogressbar.h" // ### remove or keep for users' convenience?
+#endif // QT_H
+
+#ifndef QT_NO_PROGRESSDIALOG
+
+class TQPushButton;
+class TQTimer;
+class TQProgressDialogData;
+
+class Q_EXPORT TQProgressDialog : public TQDialog
+{
+    Q_OBJECT
+    Q_PROPERTY( bool wasCancelled READ wasCancelled DESIGNABLE false STORED false ) // ### remove in 4.0
+    Q_PROPERTY( bool wasCanceled READ wasCanceled )
+    Q_PROPERTY( int totalSteps READ totalSteps WRITE setTotalSteps )
+    Q_PROPERTY( int progress READ progress WRITE setProgress )
+    Q_PROPERTY( bool autoReset READ autoReset WRITE setAutoReset )
+    Q_PROPERTY( bool autoClose READ autoClose WRITE setAutoClose )
+    Q_PROPERTY( int minimumDuration READ minimumDuration WRITE setMinimumDuration )
+    Q_PROPERTY( TQString labelText READ labelText WRITE setLabelText )
+
+public:
+    TQProgressDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+		     WFlags f=0 );
+    TQProgressDialog( const TQString& labelText, const TQString &cancelButtonText,
+		     int totalSteps, TQWidget* parent=0, const char* name=0,
+		     bool modal=FALSE, WFlags f=0 );
+    ~TQProgressDialog();
+
+    void	setLabel( TQLabel * );
+    void	setCancelButton( TQPushButton * );
+    void	setBar( TQProgressBar * );
+
+    // ### TQt 4.0: remove wasCancelled() in 4.0
+    bool	wasCancelled() const;
+    inline bool	wasCanceled() const { return wasCancelled(); }
+
+    int		totalSteps() const;
+    int		progress()   const;
+
+    TQSize	sizeHint() const;
+
+    TQString     labelText() const;
+
+    void setAutoReset( bool b );
+    bool autoReset() const;
+    void setAutoClose( bool b );
+    bool autoClose() const;
+
+public slots:
+    void	cancel();
+    void	reset();
+    void	setTotalSteps( int totalSteps );
+    void	setProgress( int progress );
+    void	setProgress( int progress, int totalSteps );
+    void	setLabelText( const TQString &);
+    void	setCancelButtonText( const TQString &);
+
+    void	setMinimumDuration( int ms );
+public:
+    int		minimumDuration() const;
+
+signals:
+    // ### remove cancelled() in 4.0
+    void	cancelled();
+    void	canceled();
+
+protected:
+    void	resizeEvent( TQResizeEvent * );
+    void	closeEvent( TQCloseEvent * );
+    void	styleChange( TQStyle& );
+    void	showEvent( TQShowEvent *e );
+
+protected slots:
+    void	forceShow();
+
+private:
+    void	   init( TQWidget *creator, const TQString& lbl, const TQString &canc,
+			 int totstps);
+    void	   layout();
+    TQLabel	  *label()  const;
+    TQProgressBar  *bar()    const;
+    TQProgressDialogData *d;
+    TQTimer	  *forceTimer;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQProgressDialog( const TQProgressDialog & );
+    TQProgressDialog &operator=( const TQProgressDialog & );
+#endif
+};
+
+#endif // QT_NO_PROGRESSDIALOG
+
+#endif // TQPROGRESSDIALOG_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qprogressdialog-members.html b/doc/html/qprogressdialog-members.html new file mode 100644 index 00000000..3da3a299 --- /dev/null +++ b/doc/html/qprogressdialog-members.html @@ -0,0 +1,375 @@ + + + + + +TQProgressDialog Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQProgressDialog

+ +

This is the complete list of member functions for +TQProgressDialog, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qprogressdialog.html b/doc/html/qprogressdialog.html new file mode 100644 index 00000000..604f4ff6 --- /dev/null +++ b/doc/html/qprogressdialog.html @@ -0,0 +1,409 @@ + + + + + +TQProgressDialog Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQProgressDialog Class Reference

+ +

The TQProgressDialog class provides feedback on the progress of a slow operation. +More... +

#include <qprogressdialog.h> +

Inherits TQDialog. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+
    +
  • void cancelled ()  (obsolete)
  • +
  • void canceled ()
  • +
+

Properties

+
    +
  • bool autoClose - whether the dialog gets hidden by reset()
  • +
  • bool autoReset - whether the progress dialog calls reset() as soon as progress() equals totalSteps()
  • +
  • TQString labelText - the label's text
  • +
  • int minimumDuration - the time that must pass before the dialog appears
  • +
  • int progress - the current amount of progress made
  • +
  • int totalSteps - the total number of steps
  • +
  • bool wasCanceled - whether the dialog was canceled  (read only)
  • +
  • bool wasCancelled - whether the dialog was canceled  (read only)  (obsolete)
  • +
+

Protected Slots

+ +

Detailed Description

+ + +The TQProgressDialog class provides feedback on the progress of a slow operation. + + +

A progress dialog is used to give the user an indication of how long +an operation is going to take, and to demonstrate that the +application has not frozen. It can also give the user an opportunity +to abort the operation. +

A common problem with progress dialogs is that it is difficult to know +when to use them; operations take different amounts of time on different +hardware. TQProgressDialog offers a solution to this problem: +it estimates the time the operation will take (based on time for +steps), and only shows itself if that estimate is beyond minimumDuration() +(4 seconds by default). +

Use setTotalSteps() (or the constructor) to set the number of +"steps" in the operation and call setProgress() as the operation +progresses. The step value can be chosen arbitrarily. It can be the +number of files copied, the number of bytes received, the number of +iterations through the main loop of your algorithm, or some other +suitable unit. Progress starts at 0, and the progress dialog shows +that the operation has finished when you call setProgress() with +totalSteps() as its argument. +

The dialog automatically resets and hides itself at the end of the +operation. Use setAutoReset() and setAutoClose() to change this +behavior. +

There are two ways of using TQProgressDialog: modal and modeless. +

Using a modal TQProgressDialog is simpler for the programmer, but you +must call TQApplication::processEvents() or +TQEventLoop::processEvents(ExcludeUserInput) to keep the event loop +running to ensure that the application doesn't freeze. Do the +operation in a loop, call setProgress() at intervals, and check +for cancellation with wasCanceled(). For example: +

+TQProgressDialog progress( "Copying files...", "Abort Copy", numFiles,
+                          this, "progress", TRUE );
+for ( int i = 0; i < numFiles; i++ ) {
+    progress.setProgress( i );
+    qApp->processEvents();
+
+    if ( progress.wasCanceled() )
+        break;
+    //... copy one file
+}
+progress.setProgress( numFiles );
+
+ +

A modeless progress dialog is suitable for operations that take +place in the background, where the user is able to interact with the +application. Such operations are typically based on TQTimer (or +TQObject::timerEvent()), TQSocketNotifier, or TQUrlOperator; or performed +in a separate thread. A TQProgressBar in the status bar of your main window +is often an alternative to a modeless progress dialog. +

You need to have an event loop to be running, connect the +canceled() signal to a slot that stops the operation, and call setProgress() at intervals. For example: +

+Operation::Operation( TQObject *parent = 0 )
+    : TQObject( parent ), steps( 0 )
+{
+    pd = new TQProgressDialog( "Operation in progress.", "Cancel", 100 );
+    connect( pd, SIGNAL(canceled()), this, SLOT(cancel()) );
+    t = new TQTimer( this );
+    connect( t, SIGNAL(timeout()), this, SLOT(perform()) );
+    t->start( 0 );
+}
+
+void Operation::perform()
+{
+    pd->setProgress( steps );
+    //... perform one percent of the operation
+    steps++;
+    if ( steps > pd->totalSteps() )
+        t->stop();
+}
+
+void Operation::cancel()
+{
+    t->stop();
+    //... cleanup
+}
+
+ +

In both modes the progress dialog may be customized by +replacing the child widgets with custom widgets by using setLabel(), +setBar(), and setCancelButton(). +The functions setLabelText() and setCancelButtonText() +set the texts shown. +

+

See also TQDialog, TQProgressBar, GUI Design Handbook: Progress Indicator, and Dialog Classes. + +


Member Function Documentation

+

TQProgressDialog::TQProgressDialog ( TQWidget * creator = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 ) +

+Constructs a progress dialog. +

Default settings: +

    +
  • The label text is empty. +
  • The cancel button text is (translated) "Cancel". +
  • The total number of steps is 100. +
+

The creator argument is the widget to use as the dialog's parent. +The name, modal, and the widget flags, f, are +passed to the TQDialog::TQDialog() constructor. If modal is FALSE (the +default), you must have an event loop proceeding for any redrawing +of the dialog to occur. If modal is TRUE, the dialog ensures that +events are processed when needed. +

See also labelText, setLabel(), setCancelButtonText(), setCancelButton(), and totalSteps. + +

TQProgressDialog::TQProgressDialog ( const TQString & labelText, const TQString & cancelButtonText, int totalSteps, TQWidget * creator = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 ) +

+Constructs a progress dialog. +

The labelText is text used to remind the user what is progressing. +

The cancelButtonText is the text to display on the cancel button, +or 0 if no cancel button is to be shown. +

The totalSteps is the total number of steps in the operation for +which this progress dialog shows progress. For example, if the +operation is to examine 50 files, this value would be 50. Before +examining the first file, call setProgress(0). As each file is +processed call setProgress(1), setProgress(2), etc., finally +calling setProgress(50) after examining the last file. +

The creator argument is the widget to use as the dialog's parent. +The name, modal, and widget flags, f, are passed to the +TQDialog::TQDialog() constructor. If modal is FALSE (the default), +you will must have an event loop proceeding for any redrawing of +the dialog to occur. If modal is TRUE, the dialog ensures that +events are processed when needed. +

See also labelText, setLabel(), setCancelButtonText(), setCancelButton(), and totalSteps. + +

TQProgressDialog::~TQProgressDialog () +

+Destroys the progress dialog. + +

bool TQProgressDialog::autoClose () const +

Returns TRUE if the dialog gets hidden by reset(); otherwise returns FALSE. +See the "autoClose" property for details. +

bool TQProgressDialog::autoReset () const +

Returns TRUE if the progress dialog calls reset() as soon as progress() equals totalSteps(); otherwise returns FALSE. +See the "autoReset" property for details. +

void TQProgressDialog::cancel () [slot] +

+Resets the progress dialog. wasCanceled() becomes TRUE until +the progress dialog is reset. +The progress dialog becomes hidden. + +

void TQProgressDialog::canceled () [signal] +

+ +

This signal is emitted when the cancel button is clicked. +It is connected to the cancel() slot by default. +

See also wasCanceled. + +

void TQProgressDialog::cancelled () [signal] +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Use canceled() instead. + +

Examples: network/ftpclient/ftpmainwindow.ui.h and progress/progress.cpp. +

void TQProgressDialog::forceShow () [protected slot] +

+Shows the dialog if it is still hidden after the algorithm has been started +and minimumDuration milliseconds have passed. +

See also minimumDuration. + +

TQString TQProgressDialog::labelText () const +

Returns the label's text. +See the "labelText" property for details. +

int TQProgressDialog::minimumDuration () const +

Returns the time that must pass before the dialog appears. +See the "minimumDuration" property for details. +

int TQProgressDialog::progress () const +

Returns the current amount of progress made. +See the "progress" property for details. +

void TQProgressDialog::reset () [slot] +

+Resets the progress dialog. +The progress dialog becomes hidden if autoClose() is TRUE. +

See also autoClose and autoReset. + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

void TQProgressDialog::setAutoClose ( bool b ) +

Sets whether the dialog gets hidden by reset() to b. +See the "autoClose" property for details. +

void TQProgressDialog::setAutoReset ( bool b ) +

Sets whether the progress dialog calls reset() as soon as progress() equals totalSteps() to b. +See the "autoReset" property for details. +

void TQProgressDialog::setBar ( TQProgressBar * bar ) +

+Sets the progress bar widget to bar. The progress dialog resizes to +fit. The progress dialog takes ownership of the progress bar which +will be deleted when necessary, so do not use a progress bar +allocated on the stack. + +

void TQProgressDialog::setCancelButton ( TQPushButton * cancelButton ) +

+Sets the cancel button to the push button, cancelButton. The +progress dialog takes ownership of this button which will be deleted +when necessary, so do not pass the address of an object that is on +the stack, i.e. use new() to create the button. +

See also setCancelButtonText(). + +

void TQProgressDialog::setCancelButtonText ( const TQString & cancelButtonText ) [slot] +

+Sets the cancel button's text to cancelButtonText. +

See also setCancelButton(). + +

void TQProgressDialog::setLabel ( TQLabel * label ) +

+Sets the label to label. The progress dialog resizes to fit. The +label becomes owned by the progress dialog and will be deleted when +necessary, so do not pass the address of an object on the stack. +

See also labelText. + +

Example: progress/progress.cpp. +

void TQProgressDialog::setLabelText ( const TQString & ) [slot] +

Sets the label's text. +See the "labelText" property for details. +

void TQProgressDialog::setMinimumDuration ( int ms ) [slot] +

Sets the time that must pass before the dialog appears to ms. +See the "minimumDuration" property for details. +

void TQProgressDialog::setProgress ( int progress ) [slot] +

Sets the current amount of progress made to progress. +See the "progress" property for details. +

void TQProgressDialog::setProgress ( int progress, int totalSteps ) [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the current amount of progress to progress and the total number of +steps to totalSteps. +

See also totalSteps. + +

void TQProgressDialog::setTotalSteps ( int totalSteps ) [slot] +

Sets the total number of steps to totalSteps. +See the "totalSteps" property for details. +

TQSize TQProgressDialog::sizeHint () const [virtual] +

+Returns a size that fits the contents of the progress dialog. +The progress dialog resizes itself as retquired, so you should not +need to call this yourself. + +

int TQProgressDialog::totalSteps () const +

Returns the total number of steps. +See the "totalSteps" property for details. +

bool TQProgressDialog::wasCanceled () const +

Returns TRUE if the dialog was canceled; otherwise returns FALSE. +See the "wasCanceled" property for details. +

bool TQProgressDialog::wasCancelled () const +

Returns TRUE if the dialog was canceled; otherwise returns FALSE. +See the "wasCancelled" property for details. +


Property Documentation

+

bool autoClose

+

This property holds whether the dialog gets hidden by reset(). +

The default is TRUE. +

See also autoReset. + +

Set this property's value with setAutoClose() and get this property's value with autoClose(). +

bool autoReset

+

This property holds whether the progress dialog calls reset() as soon as progress() equals totalSteps(). +

The default is TRUE. +

See also autoClose. + +

Set this property's value with setAutoReset() and get this property's value with autoReset(). +

TQString labelText

+

This property holds the label's text. +

The default text is TQString::null. + +

Set this property's value with setLabelText() and get this property's value with labelText(). +

int minimumDuration

+

This property holds the time that must pass before the dialog appears. +

If the expected duration of the task is less than the +minimumDuration, the dialog will not appear at all. This prevents +the dialog popping up for tasks that are tquickly over. For tasks +that are expected to exceed the minimumDuration, the dialog will +pop up after the minimumDuration time or as soon as any progress +is set. +

If set to 0, the dialog is always shown as soon as any progress is +set. The default is 4000 milliseconds. + +

Set this property's value with setMinimumDuration() and get this property's value with minimumDuration(). +

int progress

+

This property holds the current amount of progress made. +

For the progress dialog to work as expected, you should initially set +this property to 0 and finally set it to +TQProgressDialog::totalSteps(); you can call setProgress() any number of times +in-between. +

Warning: If the progress dialog is modal +(see TQProgressDialog::TQProgressDialog()), +this function calls TQApplication::processEvents(), so take care that +this does not cause undesirable re-entrancy in your code. For example, +don't use a TQProgressDialog inside a paintEvent()! +

See also totalSteps. + +

Set this property's value with setProgress() and get this property's value with progress(). +

int totalSteps

+

This property holds the total number of steps. +

The default is 0. + +

Set this property's value with setTotalSteps() and get this property's value with totalSteps(). +

bool wasCanceled

+

This property holds whether the dialog was canceled. +

Get this property's value with wasCanceled(). +

See also progress. + +

bool wasCancelled

+

This property holds whether the dialog was canceled. +

This property is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Use wasCanceled instead. + +

Get this property's value with wasCancelled(). + +


+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/qptrcollection-h.html b/doc/html/qptrcollection-h.html new file mode 100644 index 00000000..723d276c --- /dev/null +++ b/doc/html/qptrcollection-h.html @@ -0,0 +1,124 @@ + + + + + +qptrcollection.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qptrcollection.h

+ +

This is the verbatim text of the qptrcollection.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of base class for all pointer based collection classes
+**
+**
+** 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 retquirements 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 TQPTRCOLLECTION_H
+#define TQPTRCOLLECTION_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#endif // QT_H
+
+
+class TQGVector;
+class TQGList;
+class TQGDict;
+
+
+class Q_EXPORT TQPtrCollection			// inherited by all collections
+{
+public:
+    bool autoDelete()	const	       { return del_item; }
+    void setAutoDelete( bool enable )  { del_item = enable; }
+
+    virtual uint  count() const = 0;
+    virtual void  clear() = 0;			// delete all objects
+
+    typedef void *Item;				// generic collection item
+
+protected:
+    TQPtrCollection() { del_item = FALSE; }		// no deletion of objects
+    TQPtrCollection(const TQPtrCollection &) { del_item = FALSE; }
+    virtual ~TQPtrCollection() {}
+
+    bool del_item;				// default FALSE
+
+    virtual Item     newItem( Item );		// create object
+    virtual void     deleteItem( Item ) = 0;	// delete object
+};
+
+
+#ifndef QT_NO_COMPAT
+#define TQCollection TQPtrCollection
+#endif
+
+#endif // TQPTRCOLLECTION_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrcollection-members.html b/doc/html/qptrcollection-members.html new file mode 100644 index 00000000..d7e7f7fa --- /dev/null +++ b/doc/html/qptrcollection-members.html @@ -0,0 +1,54 @@ + + + + + +TQPtrCollection Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPtrCollection

+ +

This is the complete list of member functions for +TQPtrCollection, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrcollection.html b/doc/html/qptrcollection.html new file mode 100644 index 00000000..3ab68959 --- /dev/null +++ b/doc/html/qptrcollection.html @@ -0,0 +1,177 @@ + + + + + +TQPtrCollection Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPtrCollection Class Reference

+ +

The TQPtrCollection class is the base class of most pointer-based TQt collections. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qptrcollection.h> +

Inherited by TQAsciiCache, TQAsciiDict, TQCache, TQDict, TQIntCache, TQIntDict, TQPtrList, TQPtrDict, and TQPtrVector. +

List of all member functions. +

Public Members

+ +

Protected Members

+ +

Detailed Description

+ + + +The TQPtrCollection class is the base class of most pointer-based TQt collections. +

+ +

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. +

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 +item) type, which is a void*. The template classes that create +the real collections cast the Item to the retquired type. +

See also Collection Classes and Non-GUI Classes. + +


Member Type Documentation

+

TQPtrCollection::Item

+ +

This type is the generic "item" in a TQPtrCollection. + +


Member Function Documentation

+

TQPtrCollection::TQPtrCollection () [protected] +

+ +

Constructs a collection. The constructor is protected because +TQPtrCollection is an abstract class. + +

TQPtrCollection::TQPtrCollection ( const TQPtrCollection & source ) [protected] +

+ +

Constructs a copy of source with autoDelete() set to FALSE. The +constructor is protected because TQPtrCollection is an abstract +class. +

Note that if source has autoDelete turned on, copying it will +risk memory leaks, reading freed memory, or both. + +

TQPtrCollection::~TQPtrCollection () [virtual protected] +

+ +

Destroys the collection. The destructor is protected because +TQPtrCollection is an abstract class. + +

bool TQPtrCollection::autoDelete () const +

+ +

Returns the setting of the auto-delete option. The default is FALSE. +

See also setAutoDelete(). + +

void TQPtrCollection::clear () [pure virtual] +

+ +

Removes all objects from the collection. The objects will be +deleted if auto-delete has been enabled. +

See also setAutoDelete(). + +

Reimplemented in TQAsciiCache, TQAsciiDict, TQCache, TQDict, TQIntCache, TQIntDict, TQPtrList, TQPtrDict, and TQPtrVector. +

uint TQPtrCollection::count () const [pure virtual] +

+ +

Returns the number of objects in the collection. + +

Reimplemented in TQAsciiCache, TQAsciiDict, TQCache, TQDict, TQIntCache, TQIntDict, TQPtrList, TQPtrDict, and TQPtrVector. +

void TQPtrCollection::deleteItem ( Item d ) [pure virtual protected] +

+ +

Reimplement this function if you want to be able to delete items. +

Deletes an item that is about to be removed from the collection. +

This function has to reimplemented in the collection template +classes, and should only delete item d if auto-delete has +been enabled. +

Warning: If you reimplement this function you must also +reimplement the destructor and call the virtual function clear() +from your destructor. This is due to the way virtual functions and +destructors work in C++: Virtual functions in derived classes +cannot be called from a destructor. If you do not do this, your +deleteItem() function will not be called when the container is +destroyed. +

See also newItem() and setAutoDelete(). + +

Item TQPtrCollection::newItem ( Item d ) [virtual protected] +

+Virtual function that creates a copy of an object that is about to +be inserted into the collection. +

The default implementation returns the d pointer, i.e. no copy +is made. +

This function is seldom reimplemented in the collection template +classes. It is not common practice to make a copy of something +that is being inserted. +

See also deleteItem(). + +

void TQPtrCollection::setAutoDelete ( bool enable ) +

+ +

Sets the collection to auto-delete its contents if enable is +TRUE and to never delete them if enable is FALSE. +

If auto-deleting is turned on, all the items in a collection are +deleted when the collection itself is deleted. This is convenient +if the collection has the only pointer to the items. +

The default setting is FALSE, for safety. If you turn it on, be +careful about copying the collection - you might find yourself +with two collections deleting the same items. +

Note that the auto-delete setting may also affect other functions +in subclasses. For example, a subclass that has a remove() +function will remove the item from its data structure, and if +auto-delete is enabled, will also delete the item. +

See also autoDelete(). + +

Examples: grapher/grapher.cpp, scribble/scribble.cpp, and table/bigtable/main.cpp. + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrdict-h.html b/doc/html/qptrdict-h.html new file mode 100644 index 00000000..fab7ee1b --- /dev/null +++ b/doc/html/qptrdict-h.html @@ -0,0 +1,163 @@ + + + + + +qptrdict.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qptrdict.h

+ +

This is the verbatim text of the qptrdict.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qptrdict.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPtrDict template class
+**
+** Created : 970415
+**
+** 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 retquirements 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 TQPTRDICT_H
+#define TQPTRDICT_H
+
+#ifndef QT_H
+#include "qgdict.h"
+#endif // QT_H
+
+template<class type>
+class TQPtrDict
+#ifdef Q_QDOC
+	: public TQPtrCollection
+#else
+	: public TQGDict
+#endif
+{
+public:
+    TQPtrDict(int size=17) : TQGDict(size,PtrKey,0,0) {}
+    TQPtrDict( const TQPtrDict<type> &d ) : TQGDict(d) {}
+   ~TQPtrDict()				{ clear(); }
+    TQPtrDict<type> &operator=(const TQPtrDict<type> &d)
+			{ return (TQPtrDict<type>&)TQGDict::operator=(d); }
+    uint  count()   const		{ return TQGDict::count(); }
+    uint  size()    const		{ return TQGDict::size(); }
+    bool  isEmpty() const		{ return TQGDict::count() == 0; }
+    void  insert( void *k, const type *d )
+					{ TQGDict::look_ptr(k,(Item)d,1); }
+    void  replace( void *k, const type *d )
+					{ TQGDict::look_ptr(k,(Item)d,2); }
+    bool  remove( void *k )		{ return TQGDict::remove_ptr(k); }
+    type *take( void *k )		{ return (type*)TQGDict::take_ptr(k); }
+    type *find( void *k ) const
+		{ return (type *)((TQGDict*)this)->TQGDict::look_ptr(k,0,0); }
+    type *operator[]( void *k ) const
+		{ return (type *)((TQGDict*)this)->TQGDict::look_ptr(k,0,0); }
+    void  clear()			{ TQGDict::clear(); }
+    void  resize( uint n )		{ TQGDict::resize(n); }
+    void  statistics() const		{ TQGDict::statistics(); }
+
+#ifdef Q_QDOC
+protected:
+    virtual TQDataStream& read( TQDataStream &, TQPtrCollection::Item & );
+    virtual TQDataStream& write( TQDataStream &, TQPtrCollection::Item ) const;
+#endif
+
+private:
+    void  deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void TQPtrDict<void>::deleteItem( TQPtrCollection::Item )
+{
+}
+#endif
+
+template<class type>
+inline void TQPtrDict<type>::deleteItem( TQPtrCollection::Item d )
+{
+    if ( del_item ) delete (type *)d;
+}
+
+template<class type>
+class TQPtrDictIterator : public TQGDictIterator
+{
+public:
+    TQPtrDictIterator(const TQPtrDict<type> &d) :TQGDictIterator((TQGDict &)d) {}
+   ~TQPtrDictIterator()	      {}
+    uint  count()   const     { return dict->count(); }
+    bool  isEmpty() const     { return dict->count() == 0; }
+    type *toFirst()	      { return (type *)TQGDictIterator::toFirst(); }
+    operator type *()  const  { return (type *)TQGDictIterator::get(); }
+    type *current()    const  { return (type *)TQGDictIterator::get(); }
+    void *currentKey() const  { return TQGDictIterator::getKeyPtr(); }
+    type *operator()()	      { return (type *)TQGDictIterator::operator()(); }
+    type *operator++()	      { return (type *)TQGDictIterator::operator++(); }
+    type *operator+=(uint j)  { return (type *)TQGDictIterator::operator+=(j);}
+};
+
+#endif // TQPTRDICT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrdict-members.html b/doc/html/qptrdict-members.html new file mode 100644 index 00000000..455b80dc --- /dev/null +++ b/doc/html/qptrdict-members.html @@ -0,0 +1,67 @@ + + + + + +TQPtrDict Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPtrDict

+ +

This is the complete list of member functions for +TQPtrDict, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrdict.html b/doc/html/qptrdict.html new file mode 100644 index 00000000..e8a11383 --- /dev/null +++ b/doc/html/qptrdict.html @@ -0,0 +1,316 @@ + + + + + +TQPtrDict Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPtrDict Class Reference

+ +

The TQPtrDict class is a template class that provides a dictionary based on void* keys. +More... +

#include <qptrdict.h> +

Inherits TQPtrCollection. +

List of all member functions. +

Public Members

+ +

Important Inherited Members

+ +

Protected Members

+
    +
  • virtual TQDataStream & read ( TQDataStream & s, TQPtrCollection::Item & item )
  • +
  • virtual TQDataStream & write ( TQDataStream & s, TQPtrCollection::Item ) const
  • +
+

Detailed Description

+ + +The TQPtrDict class is a template class that provides a dictionary based on void* keys. +

+ +

+

TQPtrDict is implemented as a template class. Define a template +instance TQPtrDict<X> to create a dictionary that operates on +pointers to X (X*). +

A dictionary is a collection of key-value pairs. The key is a +void* used for insertion, removal and lookup. The value is a +pointer. Dictionaries provide very fast insertion and lookup. +

Example: +

+    TQPtrDict<char> fields; // void* keys, char* values
+
+    TQLineEdit *le1 = new TQLineEdit( this );
+    le1->setText( "Simpson" );
+    TQLineEdit *le2 = new TQLineEdit( this );
+    le2->setText( "Homer" );
+    TQLineEdit *le3 = new TQLineEdit( this );
+    le3->setText( "45" );
+
+    fields.insert( le1, "Surname" );
+    fields.insert( le2, "Forename" );
+    fields.insert( le3, "Age" );
+
+    TQPtrDictIterator<char> it( fields );
+    for( ; it.current(); ++it )
+        cout << it.current() << endl;
+    cout << endl;
+
+    if ( fields[le1] ) // Prints "Surname: Simpson"
+        cout << fields[le1] << ": " << le1->text() << endl; 
+    if ( fields[le2] ) // Prints "Forename: Homer"
+        cout << fields[le2] << ": " << le2->text() << endl; 
+
+    fields.remove( le1 ); // Removes le1 from the dictionary
+    cout << le1->text() << endl; // Prints "Simpson"
+    
+ +In this example we use a dictionary to add an extra property (a +char*) to the line edits we're using. +

See TQDict for full details, including the choice of dictionary +size, and how deletions are handled. +

See also TQPtrDictIterator, TQDict, TQAsciiDict, TQIntDict, Collection Classes, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQPtrDict::TQPtrDict ( int size = 17 ) +

+ +

Constructs a dictionary using an internal hash array with the size +size. +

Setting size to a suitably large prime number (equal to or +greater than the expected number of entries) makes the hash +distribution better and improves lookup performance. + +

TQPtrDict::TQPtrDict ( const TQPtrDict<type> & dict ) +

+ +

Constructs a copy of dict. +

Each item in dict is inserted into this dictionary. Only the +pointers are copied (shallow copy). + +

TQPtrDict::~TQPtrDict () +

+ +

Removes all items from the dictionary and destroys it. +

All iterators that access this dictionary will be reset. +

See also setAutoDelete(). + +

bool TQPtrCollection::autoDelete () const +

+ +

Returns the setting of the auto-delete option. The default is FALSE. +

See also setAutoDelete(). + +

void TQPtrDict::clear () [virtual] +

+ +

Removes all items from the dictionary. +

The removed items are deleted if auto-deletion is enabled. +

All dictionary iterators that access this dictionary will be +reset. +

See also remove(), take(), and setAutoDelete(). + +

Reimplemented from TQPtrCollection. +

uint TQPtrDict::count () const [virtual] +

+ +

Returns the number of items in the dictionary. +

See also isEmpty(). + +

Reimplemented from TQPtrCollection. +

type * TQPtrDict::find ( void * key ) const +

+ +

Returns the item associated with key, or 0 if the key does not +exist in the dictionary. +

If there are two or more items with equal keys, then the most +recently inserted item will be found. +

Equivalent to operator[]. +

See also operator[](). + +

void TQPtrDict::insert ( void * key, const type * item ) +

+ +

Inserts the key with the item into the dictionary. +

Multiple items can have the same key, in which case only the last +item will be accessible using operator[](). +

item may not be 0. +

See also replace(). + +

bool TQPtrDict::isEmpty () const +

+ +

Returns TRUE if the dictionary is empty; otherwise returns FALSE. +

See also count(). + +

TQPtrDict<type> & TQPtrDict::operator= ( const TQPtrDict<type> & dict ) +

+ +

Assigns dict to this dictionary and returns a reference to this +dictionary. +

This dictionary is first cleared and then each item in dict is +inserted into the dictionary. Only the pointers are copied +(shallow copy), unless newItem() has been reimplemented. + +

type * TQPtrDict::operator[] ( void * key ) const +

+ +

Returns the item associated with key, or 0 if the key does not +exist in the dictionary. +

If there are two or more items with equal keys, then the most +recently inserted item will be found. +

Equivalent to the find() function. +

See also find(). + +

TQDataStream & TQPtrDict::read ( TQDataStream & s, TQPtrCollection::Item & item ) [virtual protected] +

+ +

Reads a dictionary item from the stream s and returns a +reference to the stream. +

The default implementation sets item to 0. +

See also write(). + +

bool TQPtrDict::remove ( void * key ) +

+ +

Removes the item associated with key from the dictionary. +Returns TRUE if successful, i.e. if key is in the dictionary; +otherwise returns FALSE. +

If there are two or more items with equal keys, then the most +recently inserted item will be removed. +

The removed item is deleted if auto-deletion is enabled. +

All dictionary iterators that refer to the removed item will be +set to point to the next item in the dictionary traversal order. +

See also take(), clear(), and setAutoDelete(). + +

void TQPtrDict::replace ( void * key, const type * item ) +

+ +

If the dictionary has key key, this key's item is replaced with +item. If the dictionary doesn't contain key key, item is +inserted into the dictionary using key key. +

item may not be 0. +

Equivalent to +

+        TQPtrDict<ItemType> dict;
+            ...
+        if ( dict.find( key ) )
+            dict.remove( key );
+        dict.insert( key, item );
+    
+ +

If there are two or more items with equal keys, then the most +recently inserted item will be replaced. +

See also insert(). + +

void TQPtrDict::resize ( uint newsize ) +

+ +

Changes the size of the hash table to newsize. The contents of +the dictionary are preserved, but all iterators on the dictionary +become invalid. + +

void TQPtrCollection::setAutoDelete ( bool enable ) +

+ +

Sets the collection to auto-delete its contents if enable is +TRUE and to never delete them if enable is FALSE. +

If auto-deleting is turned on, all the items in a collection are +deleted when the collection itself is deleted. This is convenient +if the collection has the only pointer to the items. +

The default setting is FALSE, for safety. If you turn it on, be +careful about copying the collection - you might find yourself +with two collections deleting the same items. +

Note that the auto-delete setting may also affect other functions +in subclasses. For example, a subclass that has a remove() +function will remove the item from its data structure, and if +auto-delete is enabled, will also delete the item. +

See also autoDelete(). + +

Examples: grapher/grapher.cpp, scribble/scribble.cpp, and table/bigtable/main.cpp. +

uint TQPtrDict::size () const +

+ +

Returns the size of the internal hash table (as specified in the +constructor). +

See also count(). + +

void TQPtrDict::statistics () const +

+ +

Debugging-only function that prints out the dictionary +distribution using qDebug(). + +

type * TQPtrDict::take ( void * key ) +

+ +

Takes the item associated with key out of the dictionary +without deleting it (even if auto-deletion is enabled). +

If there are two or more items with equal keys, then the most +recently inserted item will be removed. +

Returns a pointer to the item taken out, or 0 if the key does not +exist in the dictionary. +

All dictionary iterators that refer to the taken item will be set +to point to the next item in the dictionary traversal order. +

See also remove(), clear(), and setAutoDelete(). + +

TQDataStream & TQPtrDict::write ( TQDataStream & s, TQPtrCollection::Item ) const [virtual protected] +

+ +

Writes a dictionary item to the stream s and returns a +reference to the stream. +

See also read(). + + +


+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/qptrdictiterator-members.html b/doc/html/qptrdictiterator-members.html new file mode 100644 index 00000000..910f3959 --- /dev/null +++ b/doc/html/qptrdictiterator-members.html @@ -0,0 +1,57 @@ + + + + + +TQPtrDictIterator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPtrDictIterator

+ +

This is the complete list of member functions for +TQPtrDictIterator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrdictiterator.html b/doc/html/qptrdictiterator.html new file mode 100644 index 00000000..1ae2100f --- /dev/null +++ b/doc/html/qptrdictiterator.html @@ -0,0 +1,181 @@ + + + + + +TQPtrDictIterator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPtrDictIterator Class Reference

+ +

The TQPtrDictIterator class provides an iterator for TQPtrDict collections. +More... +

#include <qptrdict.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQPtrDictIterator class provides an iterator for TQPtrDict collections. +

+ +

TQPtrDictIterator is implemented as a template class. Define a +template instance TQPtrDictIterator<X> to create a dictionary +iterator that operates on TQPtrDict<X> (dictionary of X*). +

Example: +

+    TQPtrDict<char> fields;
+
+    TQLineEdit *le1 = new TQLineEdit( this );
+    le1->setText( "Simpson" );
+    TQLineEdit *le2 = new TQLineEdit( this );
+    le2->setText( "Homer" );
+    TQLineEdit *le3 = new TQLineEdit( this );
+    le3->setText( "45" );
+
+    fields.insert( le1, "Surname" );
+    fields.insert( le2, "Forename" );
+    fields.insert( le3, "Age" );
+
+    TQPtrDictIterator<char> it( fields );
+    for( ; it.current(); ++it ) {
+        TQLineEdit *le = (TQLineEdit)it.currentKey();
+        cout << it.current() << ": " << le->text() << endl;
+    }
+    cout << endl;
+
+    // Output (random order):
+    //  Forename: Homer
+    //  Age: 45
+    //  Surname: Simpson
+    
+ +In the example we insert some line edits into a dictionary, +associating a string with each. We then iterate over the +dictionary printing the associated strings. +

Multiple iterators may independently traverse the same dictionary. +A TQPtrDict knows about all the iterators that are operating on the +dictionary. When an item is removed from the dictionary, TQPtrDict +updates all iterators that refer the removed item to point to the +next item in the traversing order. +

See also TQPtrDict, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQPtrDictIterator::TQPtrDictIterator ( const TQPtrDict<type> & dict ) +

+ +

Constructs an iterator for dict. The current iterator item is +set to point on the first item in the dict. + +

TQPtrDictIterator::~TQPtrDictIterator () +

+ +

Destroys the iterator. + +

uint TQPtrDictIterator::count () const +

+ +

Returns the number of items in the dictionary this iterator +operates on. +

See also isEmpty(). + +

type * TQPtrDictIterator::current () const +

+ +

Returns a pointer to the current iterator item's value. + +

void * TQPtrDictIterator::currentKey () const +

+ +

Returns the current iterator item's key. + +

bool TQPtrDictIterator::isEmpty () const +

+ +

Returns TRUE if the dictionary is empty; otherwise returns FALSE. +

See also count(). + +

TQPtrDictIterator::operator type * () const +

+ +

Cast operator. Returns a pointer to the current iterator item. +Same as current(). + +

type * TQPtrDictIterator::operator() () +

+ +

Makes the succeeding item current and returns the original current +item. +

If the current iterator item was the last item in the dictionary +or if it was 0, 0 is returned. + +

type * TQPtrDictIterator::operator++ () +

+ +

Prefix ++ makes the succeeding item current and returns the new +current item. +

If the current iterator item was the last item in the dictionary +or if it was 0, 0 is returned. + +

type * TQPtrDictIterator::operator+= ( uint jump ) +

+ +

Sets the current item to the item jump positions after the +current item and returns a pointer to that item. +

If that item is beyond the last item or if the dictionary is +empty, it sets the current item to 0 and returns 0. + +

type * TQPtrDictIterator::toFirst () +

+ +

Sets the current iterator item to point to the first item in the +dictionary and returns a pointer to the item. If the dictionary is +empty, it sets the current item to 0 and returns 0. + + +


+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/qptrlist-h.html b/doc/html/qptrlist-h.html new file mode 100644 index 00000000..73d8c1ff --- /dev/null +++ b/doc/html/qptrlist-h.html @@ -0,0 +1,240 @@ + + + + + +qptrlist.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qptrlist.h

+ +

This is the verbatim text of the qptrlist.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qptrlist.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPtrList template/macro 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 retquirements 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 TQPTRLIST_H
+#define TQPTRLIST_H
+
+#ifndef QT_H
+#include "qglist.h"
+#endif // QT_H
+
+template<class type>
+class TQPtrListStdIterator : public TQGListStdIterator
+{
+public:
+    inline TQPtrListStdIterator( TQLNode* n ): TQGListStdIterator(n) {}
+    type *operator*() { return node ? (type *)node->getData() : 0; }
+    inline TQPtrListStdIterator<type> operator++()
+    { node = next(); return *this; }
+    inline TQPtrListStdIterator<type> operator++(int)
+    { TQLNode* n = node; node = next(); return TQPtrListStdIterator<type>( n ); }
+    inline bool operator==( const TQPtrListStdIterator<type>& it ) const { return node == it.node; }
+    inline bool operator!=( const TQPtrListStdIterator<type>& it ) const { return node != it.node; }
+};
+
+
+template<class type>
+class TQPtrList
+#ifdef Q_QDOC
+	: public TQPtrCollection
+#else
+	: public TQGList
+#endif
+{
+public:
+
+    TQPtrList()				{}
+    TQPtrList( const TQPtrList<type> &l ) : TQGList(l) {}
+    ~TQPtrList()				{ clear(); }
+    TQPtrList<type> &operator=(const TQPtrList<type> &l)
+			{ return (TQPtrList<type>&)TQGList::operator=(l); }
+    bool operator==( const TQPtrList<type> &list ) const
+    { return TQGList::operator==( list ); }
+    bool operator!=( const TQPtrList<type> &list ) const
+    { return !TQGList::operator==( list ); }
+    uint  count()   const		{ return TQGList::count(); }
+    bool  isEmpty() const		{ return TQGList::count() == 0; }
+    bool  insert( uint i, const type *d){ return TQGList::insertAt(i,(TQPtrCollection::Item)d); }
+    void  inSort( const type *d )	{ TQGList::inSort((TQPtrCollection::Item)d); }
+    void  prepend( const type *d )	{ TQGList::insertAt(0,(TQPtrCollection::Item)d); }
+    void  append( const type *d )	{ TQGList::append((TQPtrCollection::Item)d); }
+    bool  remove( uint i )		{ return TQGList::removeAt(i); }
+    bool  remove()			{ return TQGList::remove((TQPtrCollection::Item)0); }
+    bool  remove( const type *d )	{ return TQGList::remove((TQPtrCollection::Item)d); }
+    bool  removeRef( const type *d )	{ return TQGList::removeRef((TQPtrCollection::Item)d); }
+    void  removeNode( TQLNode *n )	{ TQGList::removeNode(n); }
+    bool  removeFirst()			{ return TQGList::removeFirst(); }
+    bool  removeLast()			{ return TQGList::removeLast(); }
+    type *take( uint i )		{ return (type *)TQGList::takeAt(i); }
+    type *take()			{ return (type *)TQGList::take(); }
+    type *takeNode( TQLNode *n )		{ return (type *)TQGList::takeNode(n); }
+    void  clear()			{ TQGList::clear(); }
+    void  sort()			{ TQGList::sort(); }
+    int	  find( const type *d )		{ return TQGList::find((TQPtrCollection::Item)d); }
+    int	  findNext( const type *d )	{ return TQGList::find((TQPtrCollection::Item)d,FALSE); }
+    int	  findRef( const type *d )	{ return TQGList::findRef((TQPtrCollection::Item)d); }
+    int	  findNextRef( const type *d ){ return TQGList::findRef((TQPtrCollection::Item)d,FALSE);}
+    uint  contains( const type *d ) const { return TQGList::contains((TQPtrCollection::Item)d); }
+    uint  containsRef( const type *d ) const
+					{ return TQGList::containsRef((TQPtrCollection::Item)d); }
+    bool replace( uint i, const type *d ) { return TQGList::replaceAt( i, (TQPtrCollection::Item)d ); }
+    type *at( uint i )			{ return (type *)TQGList::at(i); }
+    int	  at() const			{ return TQGList::at(); }
+    type *current()  const		{ return (type *)TQGList::get(); }
+    TQLNode *currentNode()  const	{ return TQGList::currentNode(); }
+    type *getFirst() const		{ return (type *)TQGList::cfirst(); }
+    type *getLast()  const		{ return (type *)TQGList::clast(); }
+    type *first()			{ return (type *)TQGList::first(); }
+    type *last()			{ return (type *)TQGList::last(); }
+    type *next()			{ return (type *)TQGList::next(); }
+    type *prev()			{ return (type *)TQGList::prev(); }
+    void  toVector( TQGVector *vec )const{ TQGList::toVector(vec); }
+
+
+    // standard iterators
+    typedef TQPtrListStdIterator<type> Iterator;
+    typedef TQPtrListStdIterator<type> ConstIterator;
+    inline Iterator begin() { return TQGList::begin(); }
+    inline ConstIterator begin() const { return TQGList::begin(); }
+    inline ConstIterator constBegin() const { return TQGList::begin(); }
+    inline Iterator end() { return TQGList::end(); }
+    inline ConstIterator end() const { return TQGList::end(); }
+    inline ConstIterator constEnd() const { return TQGList::end(); }
+    inline Iterator erase( Iterator it ) { return TQGList::erase( it ); }
+    // stl syntax compatibility
+    typedef Iterator iterator;
+    typedef ConstIterator const_iterator;
+
+
+#ifdef Q_QDOC
+protected:
+    virtual int compareItems( TQPtrCollection::Item, TQPtrCollection::Item );
+    virtual TQDataStream& read( TQDataStream&, TQPtrCollection::Item& );
+    virtual TQDataStream& write( TQDataStream&, TQPtrCollection::Item ) const;
+#endif
+
+private:
+    void  deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void TQPtrList<void>::deleteItem( TQPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void TQPtrList<type>::deleteItem( TQPtrCollection::Item d )
+{
+    if ( del_item ) delete (type *)d;
+}
+
+template<class type>
+class TQPtrListIterator : public TQGListIterator
+{
+public:
+    TQPtrListIterator(const TQPtrList<type> &l) :TQGListIterator((TQGList &)l) {}
+   ~TQPtrListIterator()	      {}
+    uint  count()   const     { return list->count(); }
+    bool  isEmpty() const     { return list->count() == 0; }
+    bool  atFirst() const     { return TQGListIterator::atFirst(); }
+    bool  atLast()  const     { return TQGListIterator::atLast(); }
+    type *toFirst()	      { return (type *)TQGListIterator::toFirst(); }
+    type *toLast()	      { return (type *)TQGListIterator::toLast(); }
+    operator type *() const   { return (type *)TQGListIterator::get(); }
+    type *operator*()         { return (type *)TQGListIterator::get(); }
+
+    // No good, since TQPtrList<char> (ie. TQStrList fails...
+    //
+    // MSVC++ gives warning
+    // Sunpro C++ 4.1 gives error
+    //    type *operator->()        { return (type *)TQGListIterator::get(); }
+
+    type *current()   const   { return (type *)TQGListIterator::get(); }
+    type *operator()()	      { return (type *)TQGListIterator::operator()();}
+    type *operator++()	      { return (type *)TQGListIterator::operator++(); }
+    type *operator+=(uint j)  { return (type *)TQGListIterator::operator+=(j);}
+    type *operator--()	      { return (type *)TQGListIterator::operator--(); }
+    type *operator-=(uint j)  { return (type *)TQGListIterator::operator-=(j);}
+    TQPtrListIterator<type>& operator=(const TQPtrListIterator<type>&it)
+			      { TQGListIterator::operator=(it); return *this; }
+};
+
+#ifndef QT_NO_COMPAT
+#define TQList TQPtrList
+#define TQListIterator TQPtrListIterator
+#endif
+
+#define Q_DEFINED_QPTRLIST
+#include "qwinexport.h"
+
+#endif // TQPTRLIST_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrlist-members.html b/doc/html/qptrlist-members.html new file mode 100644 index 00000000..8816e8d2 --- /dev/null +++ b/doc/html/qptrlist-members.html @@ -0,0 +1,90 @@ + + + + + +TQPtrList Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPtrList

+ +

This is the complete list of member functions for +TQPtrList, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrlist.html b/doc/html/qptrlist.html new file mode 100644 index 00000000..208482d6 --- /dev/null +++ b/doc/html/qptrlist.html @@ -0,0 +1,741 @@ + + + + + +TQPtrList Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPtrList Class Reference

+ +

The TQPtrList class is a template class that provides a list. +More... +

#include <qptrlist.h> +

Inherits TQPtrCollection. +

Inherited by TQObjectList, TQSortedList, and TQStrList. +

List of all member functions. +

Public Members

+ +

Important Inherited Members

+ +

Protected Members

+
    +
  • virtual int compareItems ( TQPtrCollection::Item item1, TQPtrCollection::Item item2 )
  • +
  • virtual TQDataStream & read ( TQDataStream & s, TQPtrCollection::Item & item )
  • +
  • virtual TQDataStream & write ( TQDataStream & s, TQPtrCollection::Item item ) const
  • +
+

Detailed Description

+ + +The TQPtrList class is a template class that provides a list. +

+ +

+

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 + index and a current item. The +first item corresponds to index position 0. The current index is +-1 if the current item is 0. +

Items are inserted with prepend(), insert() or append(). Items are +removed with remove(), removeRef(), removeFirst() and +removeLast(). You can search for an item using find(), findNext(), +findRef() or findNextRef(). The list can be sorted with sort(). +You can count the number of occurrences of an item with contains() +or containsRef(). You can get a pointer to the current item with +current(), to an item at a particular index position in the list +with at() or to the first or last item with getFirst() and +getLast(). You can also iterate over the list with first(), +last(), next() and prev() (which all update current()). The list's +deletion property is set with setAutoDelete(). +

+Example: +

+    class Employee
+    {
+    public:
+        Employee() : sn( 0 ) { }
+        Employee( const TQString& forename, const TQString& surname, int salary )
+            : fn( forename ), sn( surname ), sal( salary )
+        { }
+
+        void setSalary( int salary ) { sal = salary; }
+
+        TQString forename() const { return fn; }
+        TQString surname() const { return sn; }
+        int salary() const { return sal; }
+
+    private:
+        TQString fn;
+        TQString sn;
+        int sal;
+    };
+
+    TQPtrList<Employee> list;
+    list.setAutoDelete( TRUE ); // the list owns the objects
+
+    list.append( new Employee("John", "Doe", 50000) );
+    list.append( new Employee("Jane", "Williams", 80000) );
+    list.append( new Employee("Tom", "Jones", 60000) );
+
+    Employee *employee;
+    for ( employee = list.first(); employee; employee = list.next() )
+        cout << employee->surname().latin1() << ", " <<
+                employee->forename().latin1() << " earns " <<
+                employee->salary() << endl;
+    cout << endl;
+
+    // very inefficient for big lists
+    for ( uint i = 0; i < list.count(); ++i )
+        if ( list.at(i) )
+            cout << list.at( i )->surname().latin1() << endl;
+    
+ +

The output is +

+    Doe, John earns 50000
+    Williams, Jane earns 80000
+    Jones, Tom earns 60000
+
+    Doe
+    Williams
+    Jones
+    
+ +

TQPtrList has several member functions for traversing the list, but +using a TQPtrListIterator can be more practical. Multiple list +iterators may traverse the same list, independently of each other +and of the current list item. +

In the example above we make the call setAutoDelete(TRUE). +Enabling auto-deletion tells the list to delete items that are +removed. The default is to not delete items when they are removed +but this would cause a memory leak in the example because there +are no other references to the list items. +

When inserting an item into a list only the pointer is copied, not +the item itself, i.e. a shallow copy. It is possible to make the +list copy all of the item's data (deep copy) when an item is +inserted. insert(), inSort() and append() call the virtual +function TQPtrCollection::newItem() for the item to be inserted. +Inherit a list and reimplement newItem() to have deep copies. +

When removing an item from a list, the virtual function +TQPtrCollection::deleteItem() is called. TQPtrList's default +implementation is to delete the item if auto-deletion is enabled. +

The virtual function compareItems() can be reimplemented to +compare two list items. This function is called from all list +functions that need to compare list items, for instance +remove(const type*). If you only want to deal with pointers, there +are functions that compare pointers instead, for instance +removeRef(const type*). These functions are somewhat faster than +those that call compareItems(). +

List items are stored as void* in an internal TQLNode, which +also holds pointers to the next and previous list items. The +functions currentNode(), removeNode(), and takeNode() operate +directly on the TQLNode, but they should be used with care. The +data component of the node is available through TQLNode::getData(). +

The TQStrList class defined in qstrlist.h is a list of char*. +It reimplements newItem(), deleteItem() and compareItems(). (But +see TQStringList for a list of Unicode TQStrings.) +

See also TQPtrListIterator, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQPtrList::TQPtrList () +

+ +

Constructs an empty list. + +

TQPtrList::TQPtrList ( const TQPtrList<type> & list ) +

+ +

Constructs a copy of list. +

Each item in list is appended to this +list. Only the pointers are copied (shallow copy). + +

TQPtrList::~TQPtrList () +

+ +

Removes all items from the list and destroys the list. +

All list iterators that access this list will be reset. +

See also setAutoDelete(). + +

void TQPtrList::append ( const type * item ) +

+ +

Inserts the item at the end of the list. +

The inserted item becomes the current list item. This is +equivalent to insert( count(), item ). +

item must not be 0. +

See also insert(), current(), and prepend(). + +

Examples: customlayout/border.cpp, customlayout/card.cpp, customlayout/flow.cpp, grapher/grapher.cpp, listviews/listviews.cpp, listviews/listviews.h, and qwerty/qwerty.cpp. +

type * TQPtrList::at ( uint index ) +

+ +

Returns a pointer to the item at position index in the list, or +0 if the index is out of range. +

Sets the current list item to this item if index is valid. The +valid range is 0..(count() - 1) inclusive. +

This function is very efficient. It starts scanning from the first +item, last item, or current item, whichever is closest to index. +

See also current(). + +

Examples: customlayout/border.cpp, customlayout/card.cpp, customlayout/flow.cpp, dirview/dirview.cpp, mdi/application.cpp, and qwerty/qwerty.cpp. +

int TQPtrList::at () const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the index of the current list item. The returned value is +-1 if the current item is 0. +

See also current(). + +

bool TQPtrCollection::autoDelete () const +

+ +

Returns the setting of the auto-delete option. The default is FALSE. +

See also setAutoDelete(). + +

void TQPtrList::clear () [virtual] +

+ +

Removes all items from the list. +

The removed items are deleted if auto-deletion is enabled. +

All list iterators that access this list will be reset. +

See also remove(), take(), and setAutoDelete(). + +

Reimplemented from TQPtrCollection. +

int TQPtrList::compareItems ( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ) [virtual protected] +

+ +

This virtual function compares two list items. +

Returns: +

    +
  • zero if item1 == item2 +
  • nonzero if item1 != item2 +
+

This function returns int rather than bool so that +reimplementations can return three values and use it to sort by: +

    +
  • 0 if item1 == item2 +
  • > 0 (positive integer) if item1 > item2 +
  • < 0 (negative integer) if item1 < item2 +
+

inSort() retquires that compareItems() is implemented as described +here. +

This function should not modify the list because some const +functions call compareItems(). +

The default implementation compares the pointers. + +

uint TQPtrList::contains ( const type * item ) const +

+ +

Returns the number of occurrences of item in the list. +

The compareItems() function is called when looking for the item +in the list. If compareItems() is not reimplemented, it is more +efficient to call containsRef(). +

This function does not affect the current list item. +

See also containsRef() and compareItems(). + +

uint TQPtrList::containsRef ( const type * item ) const +

+ +

Returns the number of occurrences of item in the list. +

Calling this function is much faster than contains() because +contains() compares item with each list item using +compareItems(), whereas his function only compares the pointers. +

This function does not affect the current list item. +

See also contains(). + +

uint TQPtrList::count () const [virtual] +

+ +

Returns the number of items in the list. +

See also isEmpty(). + +

Examples: customlayout/border.cpp, customlayout/card.cpp, customlayout/flow.cpp, dirview/dirview.cpp, grapher/grapher.cpp, mdi/application.cpp, and qwerty/qwerty.cpp. +

Reimplemented from TQPtrCollection. +

type * TQPtrList::current () const +

+ +

Returns a pointer to the current list item. The current item may +be 0 (implies that the current index is -1). +

See also at(). + +

TQLNode * TQPtrList::currentNode () const +

+ +

Returns a pointer to the current list node. +

The node can be kept and removed later using removeNode(). The +advantage is that the item can be removed directly without +searching the list. +

Warning: Do not call this function unless you are an expert. +

See also removeNode(), takeNode(), and current(). + +

int TQPtrList::find ( const type * item ) +

+ +

Finds the first occurrence of item in the list. +

If the item is found, the list sets the current item to point to +the found item and returns the index of this item. If the item is +not found, the list sets the current item to 0, the current +index to -1, and returns -1. +

The compareItems() function is called when searching for the item +in the list. If compareItems() is not reimplemented, it is more +efficient to call findRef(). +

See also findNext(), findRef(), compareItems(), and current(). + +

int TQPtrList::findNext ( const type * item ) +

+ +

Finds the next occurrence of item in the list, starting from +the current list item. +

If the item is found, the list sets the current item to point to +the found item and returns the index of this item. If the item is +not found, the list sets the current item to 0, the current +index to -1, and returns -1. +

The compareItems() function is called when searching for the item +in the list. If compareItems() is not reimplemented, it is more +efficient to call findNextRef(). +

See also find(), findNextRef(), compareItems(), and current(). + +

int TQPtrList::findNextRef ( const type * item ) +

+ +

Finds the next occurrence of item in the list, starting from +the current list item. +

If the item is found, the list sets the current item to point to +the found item and returns the index of this item. If the item is +not found, the list sets the current item to 0, the current +index to -1, and returns -1. +

Calling this function is much faster than findNext() because +findNext() compares item with each list item using +compareItems(), whereas this function only compares the pointers. +

See also findRef(), findNext(), and current(). + +

int TQPtrList::findRef ( const type * item ) +

+ +

Finds the first occurrence of item in the list. +

If the item is found, the list sets the current item to point to +the found item and returns the index of this item. If the item is +not found, the list sets the current item to 0, the current +index to -1, and returns -1. +

Calling this function is much faster than find() because find() +compares item with each list item using compareItems(), whereas +this function only compares the pointers. +

See also findNextRef(), find(), and current(). + +

type * TQPtrList::first () +

+ +

Returns a pointer to the first item in the list and makes this the +current list item; returns 0 if the list is empty. +

See also getFirst(), last(), next(), prev(), and current(). + +

Examples: grapher/grapher.cpp, listviews/listviews.h, and showimg/showimg.cpp. +

type * TQPtrList::getFirst () const +

+ +

Returns a pointer to the first item in the list, or 0 if the list +is empty. +

This function does not affect the current list item. +

See also first() and getLast(). + +

type * TQPtrList::getLast () const +

+ +

Returns a pointer to the last item in the list, or 0 if the list +is empty. +

This function does not affect the current list item. +

See also last() and getFirst(). + +

void TQPtrList::inSort ( const type * item ) +

+ +

Inserts the item at its sorted position in the list. +

The sort order depends on the virtual compareItems() function. All +items must be inserted with inSort() to maintain the sorting +order. +

The inserted item becomes the current list item. +

item must not be 0. +

Warning: Using inSort() is slow. An alternative, especially if you +have lots of items, is to simply append() or insert() them and +then use sort(). inSort() takes up to O(n) compares. That means +inserting n items in your list will need O(n^2) compares whereas +sort() only needs O(n*log n) for the same task. So use inSort() +only if you already have a presorted list and want to insert just +a few additional items. +

See also insert(), compareItems(), current(), and sort(). + +

bool TQPtrList::insert ( uint index, const type * item ) +

+ +

Inserts the item at position index in the list. +

Returns TRUE if successful, i.e. if index is in range; +otherwise returns FALSE. The valid range is 0 to count() +(inclusively). The item is appended if index == count(). +

The inserted item becomes the current list item. +

item must not be 0. +

See also append(), current(), and replace(). + +

bool TQPtrList::isEmpty () const +

+ +

Returns TRUE if the list is empty; otherwise returns FALSE. +

See also count(). + +

type * TQPtrList::last () +

+ +

Returns a pointer to the last item in the list and makes this the +current list item; returns 0 if the list is empty. +

See also getLast(), first(), next(), prev(), and current(). + +

type * TQPtrList::next () +

+ +

Returns a pointer to the item succeeding the current item. Returns +0 if the current item is 0 or equal to the last item. +

Makes the succeeding item current. If the current item before this +function call was the last item, the current item will be set to +0. If the current item was 0, this function does nothing. +

See also first(), last(), prev(), and current(). + +

Examples: grapher/grapher.cpp, listviews/listviews.h, and showimg/showimg.cpp. +

bool TQPtrList::operator!= ( const TQPtrList<type> & list ) const +

+ +

Compares this list with list. Returns TRUE if the lists contain +different data; otherwise returns FALSE. + +

TQPtrList<type> & TQPtrList::operator= ( const TQPtrList<type> & list ) +

+ +

Assigns list to this list and returns a reference to this list. +

This list is first cleared and then each item in list is appended to this list. Only the pointers are +copied (shallow copy) unless newItem() has been reimplemented. + +

bool TQPtrList::operator== ( const TQPtrList<type> & list ) const +

+ +

Compares this list with list. Returns TRUE if the lists contain +the same data; otherwise returns FALSE. + +

void TQPtrList::prepend ( const type * item ) +

+ +

Inserts the item at the start of the list. +

The inserted item becomes the current list item. This is +equivalent to insert( 0, item ). +

item must not be 0. +

See also append(), insert(), and current(). + +

type * TQPtrList::prev () +

+ +

Returns a pointer to the item preceding the current item. Returns +0 if the current item is 0 or equal to the first item. +

Makes the preceding item current. If the current item before this +function call was the first item, the current item will be set to +0. If the current item was 0, this function does nothing. +

See also first(), last(), next(), and current(). + +

TQDataStream & TQPtrList::read ( TQDataStream & s, TQPtrCollection::Item & item ) [virtual protected] +

+ +

Reads a list item from the stream s and returns a reference to +the stream. +

The default implementation sets item to 0. +

See also write(). + +

bool TQPtrList::remove ( uint index ) +

+ +

Removes the item at position index in the list. +

Returns TRUE if successful, i.e. if index is in range; +otherwise returns FALSE. The valid range is 0..(count() - 1) +inclusive. +

The removed item is deleted if auto-deletion is enabled. +

The item after the removed item becomes the new current list item +if the removed item is not the last item in the list. If the last +item is removed, the new last item becomes the current item. +

All list iterators that refer to the removed item will be set to +point to the new current item. +

See also take(), clear(), setAutoDelete(), current(), and removeRef(). + +

bool TQPtrList::remove () +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Removes the current list item. +

Returns TRUE if successful, i.e. if the current item isn't 0; +otherwise returns FALSE. +

The removed item is deleted if auto-deletion is enabled. +

The item after the removed item becomes the new current list item +if the removed item is not the last item in the list. If the last +item is removed, the new last item becomes the current item. The +current item is set to 0 if the list becomes empty. +

All list iterators that refer to the removed item will be set to +point to the new current item. +

See also take(), clear(), setAutoDelete(), current(), and removeRef(). + +

bool TQPtrList::remove ( const type * item ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Removes the first occurrence of item from the list. +

Returns TRUE if successful, i.e. if item is in the list; +otherwise returns FALSE. +

The removed item is deleted if auto-deletion is enabled. +

The compareItems() function is called when searching for the item +in the list. If compareItems() is not reimplemented, it is more +efficient to call removeRef(). +

If item is NULL then the current item is removed from the list. +

The item after the removed item becomes the new current list item +if the removed item is not the last item in the list. If the last +item is removed, the new last item becomes the current item. The +current item is set to 0 if the list becomes empty. +

All list iterators that refer to the removed item will be set to +point to the new current item. +

See also removeRef(), take(), clear(), setAutoDelete(), compareItems(), and current(). + +

bool TQPtrList::removeFirst () +

+ +

Removes the first item from the list. Returns TRUE if successful, +i.e. if the list isn't empty; otherwise returns FALSE. +

The removed item is deleted if auto-deletion is enabled. +

The first item in the list becomes the new current list item. The +current item is set to 0 if the list becomes empty. +

All list iterators that refer to the removed item will be set to +point to the new current item. +

See also removeLast(), setAutoDelete(), current(), and remove(). + +

bool TQPtrList::removeLast () +

+ +

Removes the last item from the list. Returns TRUE if successful, +i.e. if the list isn't empty; otherwise returns FALSE. +

The removed item is deleted if auto-deletion is enabled. +

The last item in the list becomes the new current list item. The +current item is set to 0 if the list becomes empty. +

All list iterators that refer to the removed item will be set to +point to the new current item. +

See also removeFirst(), setAutoDelete(), and current(). + +

void TQPtrList::removeNode ( TQLNode * node ) +

+ +

Removes the node from the list. +

This node must exist in the list, otherwise the program may crash. +

The removed item is deleted if auto-deletion is enabled. +

The first item in the list will become the new current list item. +The current item is set to 0 if the list becomes empty. +

All list iterators that refer to the removed item will be set to +point to the item succeeding this item or to the preceding item if +the removed item was the last item. +

Warning: Do not call this function unless you are an expert. +

See also takeNode(), currentNode(), remove(), and removeRef(). + +

bool TQPtrList::removeRef ( const type * item ) +

+ +

Removes the first occurrence of item from the list. +

Returns TRUE if successful, i.e. if item is in the list; +otherwise returns FALSE. +

The removed item is deleted if auto-deletion is enabled. +

Equivalent to: +

+        if ( list.findRef( item ) != -1 )
+            list.remove();
+    
+ +

The item after the removed item becomes the new current list item +if the removed item is not the last item in the list. If the last +item is removed, the new last item becomes the current item. The +current item is set to 0 if the list becomes empty. +

All list iterators that refer to the removed item will be set to +point to the new current item. +

See also remove(), clear(), setAutoDelete(), and current(). + +

bool TQPtrList::replace ( uint index, const type * item ) +

+ +

Replaces the item at position index with the new item. +

Returns TRUE if successful, i.e. index is in the range 0 to +count()-1. +

See also append(), current(), and insert(). + +

void TQPtrCollection::setAutoDelete ( bool enable ) +

+ +

Sets the collection to auto-delete its contents if enable is +TRUE and to never delete them if enable is FALSE. +

If auto-deleting is turned on, all the items in a collection are +deleted when the collection itself is deleted. This is convenient +if the collection has the only pointer to the items. +

The default setting is FALSE, for safety. If you turn it on, be +careful about copying the collection - you might find yourself +with two collections deleting the same items. +

Note that the auto-delete setting may also affect other functions +in subclasses. For example, a subclass that has a remove() +function will remove the item from its data structure, and if +auto-delete is enabled, will also delete the item. +

See also autoDelete(). + +

Examples: grapher/grapher.cpp, scribble/scribble.cpp, and table/bigtable/main.cpp. +

void TQPtrList::sort () +

+ +

Sorts the list by the result of the virtual compareItems() +function. +

The heap sort algorithm is used for sorting. It sorts n items with +O(n*log n) comparisons. This is the asymptotic optimal solution of +the sorting problem. +

If the items in your list support operator<() and operator==(), +you might be better off with TQSortedList because it implements the +compareItems() function for you using these two operators. +

See also inSort(). + +

type * TQPtrList::take ( uint index ) +

+ +

Takes the item at position index out of the list without +deleting it (even if auto-deletion +is enabled). +

Returns a pointer to the item taken out of the list, or 0 if the +index is out of range. The valid range is 0..(count() - 1) +inclusive. +

The item after the removed item becomes the new current list item +if the removed item is not the last item in the list. If the last +item is removed, the new last item becomes the current item. The +current item is set to 0 if the list becomes empty. +

All list iterators that refer to the taken item will be set to +point to the new current item. +

See also remove(), clear(), and current(). + +

Examples: customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp. +

type * TQPtrList::take () +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Takes the current item out of the list without deleting it (even +if auto-deletion is enabled). +

Returns a pointer to the item taken out of the list, or 0 if +the current item is 0. +

The item after the removed item becomes the new current list item +if the removed item is not the last item in the list. If the last +item is removed, the new last item becomes the current item. The +current item is set to 0 if the list becomes empty. +

All list iterators that refer to the taken item will be set to +point to the new current item. +

See also remove(), clear(), and current(). + +

type * TQPtrList::takeNode ( TQLNode * node ) +

+ +

Takes the node out of the list without deleting its item (even +if auto-deletion is enabled). +Returns a pointer to the item taken out of the list. +

This node must exist in the list, otherwise the program may crash. +

The first item in the list becomes the new current list item. +

All list iterators that refer to the taken item will be set to +point to the item succeeding this item or to the preceding item if +the taken item was the last item. +

Warning: Do not call this function unless you are an expert. +

See also removeNode() and currentNode(). + +

void TQPtrList::toVector ( TQGVector * vec ) const +

+ +

Stores all list items in the vector vec. +

The vector must be of the same item type, otherwise the result +will be undefined. + +

TQDataStream & TQPtrList::write ( TQDataStream & s, TQPtrCollection::Item item ) const [virtual protected] +

+ +

Writes a list item, item to the stream s and returns a +reference to the stream. +

The default implementation does nothing. +

See also read(). + + +


+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/qptrlistiterator-members.html b/doc/html/qptrlistiterator-members.html new file mode 100644 index 00000000..875806e0 --- /dev/null +++ b/doc/html/qptrlistiterator-members.html @@ -0,0 +1,63 @@ + + + + + +TQPtrListIterator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPtrListIterator

+ +

This is the complete list of member functions for +TQPtrListIterator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrlistiterator.html b/doc/html/qptrlistiterator.html new file mode 100644 index 00000000..15485115 --- /dev/null +++ b/doc/html/qptrlistiterator.html @@ -0,0 +1,234 @@ + + + + + +TQPtrListIterator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPtrListIterator Class Reference

+ +

The TQPtrListIterator class provides an iterator for +TQPtrList collections. +More... +

#include <qptrlist.h> +

Inherited by TQObjectListIterator and TQStrListIterator. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQPtrListIterator class provides an iterator for +TQPtrList collections. +

+ +

Define a template instance TQPtrListIterator<X> to create a list +iterator that operates on TQPtrList<X> (list of X*). +

The following example is similar to the example in the TQPtrList class documentation, but it uses TQPtrListIterator. The class Employee is +defined there. +

+    TQPtrList<Employee> list;
+
+    list.append( new Employee("John", "Doe", 50000) );
+    list.append( new Employee("Jane", "Williams", 80000) );
+    list.append( new Employee("Tom", "Jones", 60000) );
+
+    TQPtrListIterator<Employee> it( list );
+    Employee *employee;
+    while ( (employee = it.current()) != 0 ) {
+        ++it;
+        cout << employee->surname().latin1() << ", " <<
+                employee->forename().latin1() << " earns " <<
+                employee->salary() << endl;
+    }
+    
+ +

The output is +

+    Doe, John earns 50000
+    Williams, Jane earns 80000
+    Jones, Tom earns 60000
+    
+ +

Using a list iterator is a more robust way of traversing the list +than using the TQPtrList member functions first(), next(), current(), etc., as many iterators can +traverse the same list independently. +

An iterator has its own current list item and can get the next and +previous list items. It doesn't modify the list in any way. +

When an item is removed from the list, all iterators that point to +that item are updated to point to TQPtrList::current() instead to +avoid dangling references. +

See also TQPtrList, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQPtrListIterator::TQPtrListIterator ( const TQPtrList<type> & list ) +

+ +

Constructs an iterator for list. The current iterator item is +set to point on the first item in the list. + +

TQPtrListIterator::~TQPtrListIterator () +

+ +

Destroys the iterator. + +

bool TQPtrListIterator::atFirst () const +

+ +

Returns TRUE if the current iterator item is the first list item; +otherwise returns FALSE. +

See also toFirst() and atLast(). + +

bool TQPtrListIterator::atLast () const +

+ +

Returns TRUE if the current iterator item is the last list item; +otherwise returns FALSE. +

See also toLast() and atFirst(). + +

uint TQPtrListIterator::count () const +

+ +

Returns the number of items in the list this iterator operates on. +

See also isEmpty(). + +

Example: customlayout/card.cpp. +

type * TQPtrListIterator::current () const +

+ +

Returns a pointer to the current iterator item. If the iterator is +positioned before the first item in the list or after the last +item in the list, 0 is returned. + +

Examples: canvas/canvas.cpp, customlayout/card.cpp, and customlayout/flow.cpp. +

bool TQPtrListIterator::isEmpty () const +

+ +

Returns TRUE if the list is empty; otherwise returns FALSE. +

See also count(). + +

TQPtrListIterator::operator type * () const +

+ +

Cast operator. Returns a pointer to the current iterator item. +Same as current(). + +

type * TQPtrListIterator::operator() () +

+ +

Makes the succeeding item current and returns the original current +item. +

If the current iterator item was the last item in the list or if +it was 0, 0 is returned. + +

type * TQPtrListIterator::operator* () +

+ +

Asterisk operator. Returns a pointer to the current iterator item. +Same as current(). + +

type * TQPtrListIterator::operator++ () +

+ +

Prefix ++ makes the succeeding item current and returns the new +current item. +

If the current iterator item was the last item in the list or if +it was 0, 0 is returned. + +

type * TQPtrListIterator::operator+= ( uint jump ) +

+ +

Sets the current item to the item jump positions after the +current item and returns a pointer to that item. +

If that item is beyond the last item or if the list is empty, it +sets the current item to 0 and returns 0 + +

type * TQPtrListIterator::operator-- () +

+ +

Prefix - makes the preceding item current and returns the new +current item. +

If the current iterator item was the first item in the list or if +it was 0, 0 is returned. + +

type * TQPtrListIterator::operator-= ( uint jump ) +

+ +

Returns the item jump positions before the current item or 0 +if it is beyond the first item. Makes this the current item. + +

TQPtrListIterator<type> & TQPtrListIterator::operator= ( const TQPtrListIterator<type> & it ) +

+ +

Assignment. Makes a copy of the iterator it and returns a +reference to this iterator. + +

type * TQPtrListIterator::toFirst () +

+ +

Sets the current iterator item to point to the first list item and +returns a pointer to the item. Sets the current item to 0 and +returns 0 if the list is empty. +

See also toLast() and atFirst(). + +

type * TQPtrListIterator::toLast () +

+ +

Sets the current iterator item to point to the last list item and +returns a pointer to the item. Sets the current item to 0 and +returns 0 if the list is empty. +

See also toFirst() and atLast(). + + +


+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/qptrqueue-h.html b/doc/html/qptrqueue-h.html new file mode 100644 index 00000000..214d9653 --- /dev/null +++ b/doc/html/qptrqueue-h.html @@ -0,0 +1,139 @@ + + + + + +qptrqueue.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qptrqueue.h

+ +

This is the verbatim text of the qptrqueue.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qptrqueue.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPtrQueue template/macro class
+**
+** Created : 920917
+**
+** 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 retquirements 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 TQPTRTQUEUE_H
+#define TQPTRTQUEUE_H
+
+#ifndef QT_H
+#include "qglist.h"
+#endif // QT_H
+
+template<class type>
+class TQPtrQueue : protected TQGList
+{
+public:
+    TQPtrQueue()				{}
+    TQPtrQueue( const TQPtrQueue<type> &q ) : TQGList(q) {}
+    ~TQPtrQueue()			{ clear(); }
+    TQPtrQueue<type>& operator=(const TQPtrQueue<type> &q)
+			{ return (TQPtrQueue<type>&)TQGList::operator=(q); }
+    bool  autoDelete() const		{ return TQPtrCollection::autoDelete(); }
+    void  setAutoDelete( bool del )	{ TQPtrCollection::setAutoDelete(del); }
+    uint  count()   const		{ return TQGList::count(); }
+    bool  isEmpty() const		{ return TQGList::count() == 0; }
+    void  enqueue( const type *d )	{ TQGList::append(Item(d)); }
+    type *dequeue()			{ return (type *)TQGList::takeFirst();}
+    bool  remove()			{ return TQGList::removeFirst(); }
+    void  clear()			{ TQGList::clear(); }
+    type *head()    const		{ return (type *)TQGList::cfirst(); }
+	  operator type *() const	{ return (type *)TQGList::cfirst(); }
+    type *current() const		{ return (type *)TQGList::cfirst(); }
+
+#ifdef Q_QDOC
+protected:
+    virtual TQDataStream& read( TQDataStream&, TQPtrCollection::Item& );
+    virtual TQDataStream& write( TQDataStream&, TQPtrCollection::Item ) const;
+#endif
+
+private:
+    void  deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void TQPtrQueue<void>::deleteItem( TQPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void TQPtrQueue<type>::deleteItem( TQPtrCollection::Item d )
+{
+    if ( del_item ) delete (type *)d;
+}
+
+#ifndef QT_NO_COMPAT
+#define TQQueue TQPtrQueue
+#endif
+
+#endif // TQPTRTQUEUE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrqueue-members.html b/doc/html/qptrqueue-members.html new file mode 100644 index 00000000..88dc53fa --- /dev/null +++ b/doc/html/qptrqueue-members.html @@ -0,0 +1,62 @@ + + + + + +TQPtrQueue Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPtrQueue

+ +

This is the complete list of member functions for +TQPtrQueue, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrqueue.html b/doc/html/qptrqueue.html new file mode 100644 index 00000000..a98474a3 --- /dev/null +++ b/doc/html/qptrqueue.html @@ -0,0 +1,216 @@ + + + + + +TQPtrQueue Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPtrQueue Class Reference

+ +

The TQPtrQueue class is a template class that provides a queue. +More... +

#include <qptrqueue.h> +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • virtual TQDataStream & read ( TQDataStream & s, TQPtrCollection::Item & item )
  • +
  • virtual TQDataStream & write ( TQDataStream & s, TQPtrCollection::Item item ) const
  • +
+

Detailed Description

+ + +The TQPtrQueue class is a template class that provides a queue. +

+ +

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*). +

A queue is a first in, first out structure. Items are added to the +tail of the queue with enqueue() and retrieved from the head with +dequeue(). You can peek at the head item without dequeing it using +head(). +

You can control the queue's deletion policy with setAutoDelete(). +

For compatibility with the TQPtrCollection classes, current() and +remove() are provided; both operate on the head(). +

See also TQPtrList, TQPtrStack, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQPtrQueue::TQPtrQueue () +

+ +

Creates an empty queue with autoDelete() set to FALSE. + +

TQPtrQueue::TQPtrQueue ( const TQPtrQueue<type> & queue ) +

+ +

Creates a queue from queue. +

Only the pointers are copied; the items are not. The autoDelete() +flag is set to FALSE. + +

TQPtrQueue::~TQPtrQueue () +

+ +

Destroys the queue. Items in the queue are deleted if autoDelete() +is TRUE. + +

bool TQPtrQueue::autoDelete () const +

+ +

Returns the setting of the auto-delete option. The default is +FALSE. +

See also setAutoDelete(). + +

void TQPtrQueue::clear () +

+ +

Removes all items from the queue, and deletes them if autoDelete() +is TRUE. +

See also remove(). + +

uint TQPtrQueue::count () const +

+ +

Returns the number of items in the queue. +

See also isEmpty(). + +

type * TQPtrQueue::current () const +

+ +

Returns a pointer to the head item in the queue. The queue is not +changed. Returns 0 if the queue is empty. +

See also dequeue() and isEmpty(). + +

type * TQPtrQueue::dequeue () +

+ +

Takes the head item from the queue and returns a pointer to it. +Returns 0 if the queue is empty. +

See also enqueue() and count(). + +

void TQPtrQueue::enqueue ( const type * d ) +

+ +

Adds item d to the tail of the queue. +

See also count() and dequeue(). + +

type * TQPtrQueue::head () const +

+ +

Returns a pointer to the head item in the queue. The queue is not +changed. Returns 0 if the queue is empty. +

See also dequeue() and isEmpty(). + +

bool TQPtrQueue::isEmpty () const +

+ +

Returns TRUE if the queue is empty; otherwise returns FALSE. +

See also count(), dequeue(), and head(). + +

TQPtrQueue::operator type * () const +

+ +

Returns a pointer to the head item in the queue. The queue is not +changed. Returns 0 if the queue is empty. +

See also dequeue() and isEmpty(). + +

TQPtrQueue<type> & TQPtrQueue::operator= ( const TQPtrQueue<type> & queue ) +

+ +

Assigns queue to this queue and returns a reference to this +queue. +

This queue is first cleared and then each item in queue is +enqueued to this queue. Only the pointers are copied. +

Warning: The autoDelete() flag is not modified. If it it TRUE for +both queue and this queue, deleting the two lists will cause double-deletion of the items. + +

TQDataStream & TQPtrQueue::read ( TQDataStream & s, TQPtrCollection::Item & item ) [virtual protected] +

+ +

Reads a queue item, item, from the stream s and returns a +reference to the stream. +

The default implementation sets item to 0. +

See also write(). + +

bool TQPtrQueue::remove () +

+ +

Removes the head item from the queue, and returns TRUE if there +was an item, i.e. the queue wasn't empty; otherwise returns FALSE. +

The item is deleted if autoDelete() is TRUE. +

See also head(), isEmpty(), and dequeue(). + +

void TQPtrQueue::setAutoDelete ( bool enable ) +

+ +

Sets the queue to auto-delete its contents if enable is TRUE +and not to delete them if enable is FALSE. +

If auto-deleting is turned on, all the items in a queue are +deleted when the queue itself is deleted. This can be tquite +convenient if the queue has the only pointer to the items. +

The default setting is FALSE, for safety. If you turn it on, be +careful about copying the queue: you might find yourself with two +queues deleting the same items. +

See also autoDelete(). + +

TQDataStream & TQPtrQueue::write ( TQDataStream & s, TQPtrCollection::Item item ) const [virtual protected] +

+ +

Writes a queue item, item, to the stream s and returns a +reference to the stream. +

The default implementation does nothing. +

See also read(). + + +


+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/qptrstack-h.html b/doc/html/qptrstack-h.html new file mode 100644 index 00000000..16f09a8d --- /dev/null +++ b/doc/html/qptrstack-h.html @@ -0,0 +1,139 @@ + + + + + +qptrstack.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qptrstack.h

+ +

This is the verbatim text of the qptrstack.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qptrstack.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPtrStack pointer based template class
+**
+** Created : 920917
+**
+** 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 retquirements 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 TQPTRSTACK_H
+#define TQPTRSTACK_H
+
+#ifndef QT_H
+#include "qglist.h"
+#endif // QT_H
+
+template<class type>
+class TQPtrStack : protected TQGList
+{
+public:
+    TQPtrStack()				{ }
+    TQPtrStack( const TQPtrStack<type> &s ) : TQGList( s ) { }
+    ~TQPtrStack()			{ clear(); }
+    TQPtrStack<type> &operator=(const TQPtrStack<type> &s)
+			{ return (TQPtrStack<type>&)TQGList::operator=(s); }
+    bool  autoDelete() const		{ return TQPtrCollection::autoDelete(); }
+    void  setAutoDelete( bool del )	{ TQPtrCollection::setAutoDelete(del); }
+    uint  count()   const		{ return TQGList::count(); }
+    bool  isEmpty() const		{ return TQGList::count() == 0; }
+    void  push( const type *d )		{ TQGList::insertAt(0,Item(d)); }
+    type *pop()				{ return (type *)TQGList::takeFirst(); }
+    bool  remove()			{ return TQGList::removeFirst(); }
+    void  clear()			{ TQGList::clear(); }
+    type *top()	    const		{ return (type *)TQGList::cfirst(); }
+	  operator type *() const	{ return (type *)TQGList::cfirst(); }
+    type *current() const		{ return (type *)TQGList::cfirst(); }
+
+#ifdef Q_QDOC
+protected:
+    virtual TQDataStream& read( TQDataStream&, TQPtrCollection::Item& );
+    virtual TQDataStream& write( TQDataStream&, TQPtrCollection::Item ) const;
+#endif
+
+private:
+    void  deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void TQPtrStack<void>::deleteItem( TQPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void TQPtrStack<type>::deleteItem( TQPtrCollection::Item d )
+{
+    if ( del_item ) delete (type *)d;
+}
+
+#ifndef QT_NO_COMPAT
+#define TQStack TQPtrStack
+#endif
+
+#endif // TQPTRSTACK_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrstack-members.html b/doc/html/qptrstack-members.html new file mode 100644 index 00000000..b98d5d08 --- /dev/null +++ b/doc/html/qptrstack-members.html @@ -0,0 +1,62 @@ + + + + + +TQPtrStack Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPtrStack

+ +

This is the complete list of member functions for +TQPtrStack, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrstack.html b/doc/html/qptrstack.html new file mode 100644 index 00000000..bb905ebb --- /dev/null +++ b/doc/html/qptrstack.html @@ -0,0 +1,201 @@ + + + + + +TQPtrStack Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPtrStack Class Reference

+ +

The TQPtrStack class is a template class that provides a stack. +More... +

#include <qptrstack.h> +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • virtual TQDataStream & read ( TQDataStream & s, TQPtrCollection::Item & item )
  • +
  • virtual TQDataStream & write ( TQDataStream & s, TQPtrCollection::Item item ) const
  • +
+

Detailed Description

+ + +The TQPtrStack class is a template class that provides a stack. +

+

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 +to the top of the stack with push() and retrieved from the top +with pop(). Use top() to get a reference to the top element +without changing the stack. +

You can control the stack's deletion policy with setAutoDelete(). +

For compatibility with the TQPtrCollection classes current() and +remove() are provided; they both operate on the top(). +

See also TQPtrList, TQPtrQueue, and Non-GUI Classes. + +


Member Function Documentation

+

TQPtrStack::TQPtrStack () +

+ +

Creates an empty stack. + +

TQPtrStack::TQPtrStack ( const TQPtrStack<type> & s ) +

+ +

Creates a stack by making a shallow copy of another stack s. + +

TQPtrStack::~TQPtrStack () +

+ +

Destroys the stack. All items will be deleted if autoDelete() is +TRUE. + +

bool TQPtrStack::autoDelete () const +

+ +

The same as TQPtrCollection::autoDelete(). +

See also setAutoDelete(). + +

void TQPtrStack::clear () +

+ +

Removes all items from the stack, deleting them if autoDelete() is +TRUE. +

See also remove(). + +

uint TQPtrStack::count () const +

+ +

Returns the number of items in the stack. +

See also isEmpty(). + +

type * TQPtrStack::current () const +

+ +

Returns a pointer to the top item on the stack (most recently +pushed). The stack is not changed. Returns 0 if the stack is +empty. + +

bool TQPtrStack::isEmpty () const +

+ +

Returns TRUE if the stack contains no elements; otherwise returns +FALSE. + +

TQPtrStack::operator type * () const +

+ +

Returns a pointer to the top item on the stack (most recently +pushed). The stack is not changed. Returns 0 if the stack is +empty. + +

TQPtrStack<type> & TQPtrStack::operator= ( const TQPtrStack<type> & s ) +

+ +

Sets the contents of this stack by making a shallow copy of +another stack s. Elements currently in this stack will be +deleted if autoDelete() is TRUE. + +

type * TQPtrStack::pop () +

+ +

Removes the top item from the stack and returns it. The stack must +not be empty. + +

void TQPtrStack::push ( const type * d ) +

+ +

Adds an element d to the top of the stack. Last in, first out. + +

TQDataStream & TQPtrStack::read ( TQDataStream & s, TQPtrCollection::Item & item ) [virtual protected] +

+ +

Reads a stack item, item, from the stream s and returns a +reference to the stream. +

The default implementation sets item to 0. +

See also write(). + +

bool TQPtrStack::remove () +

+ +

Removes the top item from the stack and deletes it if autoDelete() +is TRUE. Returns TRUE if there was an item to pop; otherwise +returns FALSE. +

See also clear(). + +

void TQPtrStack::setAutoDelete ( bool enable ) +

+ +

Defines whether this stack auto-deletes its contents. The same as +TQPtrCollection::setAutoDelete(). +

If enable is TRUE the stack auto-deletes its contents; if enable is FALSE the stack does not delete its contents. +

See also autoDelete(). + +

type * TQPtrStack::top () const +

+ +

Returns a pointer to the top item on the stack (most recently +pushed). The stack is not changed. Returns 0 if the stack is +empty. + +

TQDataStream & TQPtrStack::write ( TQDataStream & s, TQPtrCollection::Item item ) const [virtual protected] +

+ +

Writes a stack item, item, to the stream s and returns a +reference to the stream. +

The default implementation does nothing. +

See also read(). + + +


+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/qptrvector-h.html b/doc/html/qptrvector-h.html new file mode 100644 index 00000000..669455e7 --- /dev/null +++ b/doc/html/qptrvector-h.html @@ -0,0 +1,163 @@ + + + + + +qptrvector.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qptrvector.h

+ +

This is the verbatim text of the qptrvector.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qptrvector.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPtrVector pointer based template class
+**
+** Created : 930907
+**
+** 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 retquirements 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 TQPTRVECTOR_H
+#define TQPTRVECTOR_H
+
+#ifndef QT_H
+#include "qgvector.h"
+#endif // QT_H
+
+template<class type>
+class TQPtrVector
+#ifdef Q_QDOC
+	: public TQPtrCollection
+#else
+	: public TQGVector
+#endif
+{
+public:
+    TQPtrVector()				{ }
+    TQPtrVector( uint size ) : TQGVector(size) { }
+    TQPtrVector( const TQPtrVector<type> &v ) : TQGVector( v ) { }
+    ~TQPtrVector()				{ clear(); }
+    TQPtrVector<type> &operator=(const TQPtrVector<type> &v)
+			{ return (TQPtrVector<type>&)TQGVector::operator=(v); }
+    bool operator==( const TQPtrVector<type> &v ) const { return TQGVector::operator==(v); }
+    type **data()   const		{ return (type **)TQGVector::data(); }
+    uint  size()    const		{ return TQGVector::size(); }
+    uint  count()   const		{ return TQGVector::count(); }
+    bool  isEmpty() const		{ return TQGVector::count() == 0; }
+    bool  isNull()  const		{ return TQGVector::size() == 0; }
+    bool  resize( uint size )		{ return TQGVector::resize(size); }
+    bool  insert( uint i, const type *d){ return TQGVector::insert(i,(Item)d); }
+    bool  remove( uint i )		{ return TQGVector::remove(i); }
+    type *take( uint i )		{ return (type *)TQGVector::take(i); }
+    void  clear()			{ TQGVector::clear(); }
+    bool  fill( const type *d, int size=-1 )
+					{ return TQGVector::fill((Item)d,size);}
+    void  sort()			{ TQGVector::sort(); }
+    int	  bsearch( const type *d ) const{ return TQGVector::bsearch((Item)d); }
+    int	  findRef( const type *d, uint i=0 ) const
+					{ return TQGVector::findRef((Item)d,i);}
+    int	  find( const type *d, uint i= 0 ) const
+					{ return TQGVector::find((Item)d,i); }
+    uint  containsRef( const type *d ) const
+				{ return TQGVector::containsRef((Item)d); }
+    uint  contains( const type *d ) const
+					{ return TQGVector::contains((Item)d); }
+    type *operator[]( int i ) const	{ return (type *)TQGVector::at(i); }
+    type *at( uint i ) const		{ return (type *)TQGVector::at(i); }
+    void  toList( TQGList *list ) const	{ TQGVector::toList(list); }
+
+#ifdef Q_QDOC
+protected:
+    virtual int compareItems( TQPtrCollection::Item d1, TQPtrCollection::Item d2 );
+    virtual TQDataStream& read( TQDataStream &s, TQPtrCollection::Item &d );
+    virtual TQDataStream& write( TQDataStream &s, TQPtrCollection::Item d ) const;
+#endif
+
+private:
+    void  deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void TQPtrVector<void>::deleteItem( TQPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void TQPtrVector<type>::deleteItem( TQPtrCollection::Item d )
+{
+    if ( del_item ) delete (type *)d;
+}
+
+#ifndef QT_NO_COMPAT
+#define TQVector TQPtrVector
+#endif
+
+#define Q_DEFINED_QPTRVECTOR
+#include "qwinexport.h"
+#endif // TQVECTOR_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrvector-members.html b/doc/html/qptrvector-members.html new file mode 100644 index 00000000..e9a69d68 --- /dev/null +++ b/doc/html/qptrvector-members.html @@ -0,0 +1,76 @@ + + + + + +TQPtrVector Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPtrVector

+ +

This is the complete list of member functions for +TQPtrVector, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qptrvector.html b/doc/html/qptrvector.html new file mode 100644 index 00000000..1d7b533d --- /dev/null +++ b/doc/html/qptrvector.html @@ -0,0 +1,393 @@ + + + + + +TQPtrVector Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPtrVector Class Reference

+ +

The TQPtrVector class is a template collection class that +provides a vector (array). +More... +

#include <qptrvector.h> +

Inherits TQPtrCollection. +

List of all member functions. +

Public Members

+ +

Important Inherited Members

+ +

Protected Members

+
    +
  • virtual int compareItems ( TQPtrCollection::Item d1, TQPtrCollection::Item d2 )
  • +
  • virtual TQDataStream & read ( TQDataStream & s, TQPtrCollection::Item & item )
  • +
  • virtual TQDataStream & write ( TQDataStream & s, TQPtrCollection::Item item ) const
  • +
+

Detailed Description

+ + +The TQPtrVector class is a template collection class that +provides a vector (array). +

+

+

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*). +

A vector is the same as an array. The main difference between +TQPtrVector and TQMemArray is that TQPtrVector stores pointers to the +elements, whereas TQMemArray stores the elements themselves (i.e. +TQMemArray is value-based and TQPtrVector is pointer-based). +

Items are added to the vector using insert() or fill(). Items are +removed with remove(). You can get a pointer to an item at a +particular index position using at(). +

Unless otherwise stated, all functions that remove items from the +vector will also delete the element pointed to if auto-deletion is enabled. By default, +auto-deletion is disabled; see setAutoDelete(). This behaviour can +be changed in a subclass by reimplementing the virtual function +deleteItem(). +

Functions that compare items (find() and sort() for example) will +do so using the virtual function compareItems(). The default +implementation of this function only compares the pointer values. +Reimplement compareItems() in a subclass to get searching and +sorting based on the item contents. You can perform a linear +search for a pointer in the vector using findRef(), or a binary +search (of a sorted vector) using bsearch(). You can count the +number of times an item appears in the vector with contains() or +containsRef(). +

See also TQMemArray and Non-GUI Classes. + +


Member Function Documentation

+

TQPtrVector::TQPtrVector () +

+ +

Constructs a null vector. +

See also isNull(). + +

TQPtrVector::TQPtrVector ( uint size ) +

+ +

Constructs an vector with room for size items. Makes a null +vector if size == 0. +

All size positions in the vector are initialized to 0. +

See also size(), resize(), and isNull(). + +

TQPtrVector::TQPtrVector ( const TQPtrVector<type> & v ) +

+ +

Constructs a copy of v. Only the pointers are copied (i.e. +shallow copy). + +

TQPtrVector::~TQPtrVector () +

+ +

Removes all items from the vector, and destroys the vector itself. +

See also clear(). + +

type * TQPtrVector::at ( uint i ) const +

+ +

Returns the item at position i, or 0 if there is no item at +that position. i must be less than size(). + +

bool TQPtrCollection::autoDelete () const +

+ +

Returns the setting of the auto-delete option. The default is FALSE. +

See also setAutoDelete(). + +

int TQPtrVector::bsearch ( const type * d ) const +

+ +

In a sorted array, finds the first occurrence of d using a +binary search. For a sorted array, this is generally much faster +than find(), which performs a linear search. +

Returns the position of d, or -1 if d could not be found. d must not be 0. +

Compares items using the virtual function compareItems(). +

See also sort() and find(). + +

void TQPtrVector::clear () [virtual] +

+ +

Removes all items from the vector, and destroys the vector itself. +

The vector becomes a null vector. +

See also isNull(). + +

Reimplemented from TQPtrCollection. +

int TQPtrVector::compareItems ( TQPtrCollection::Item d1, TQPtrCollection::Item d2 ) [virtual protected] +

+ +

This virtual function compares two list items. +

Returns: +

    +
  • zero if d1 == d2 +
  • nonzero if d1 != d2 +
+

This function returns int rather than bool so that +reimplementations can return one of three values and use it to +sort by: +

    +
  • 0 if d1 == d2 +
  • > 0 (positive integer) if d1 > d2 +
  • < 0 (negative integer) if d1 < d2 +
+

The sort() and bsearch() functions retquire compareItems() to be +implemented as described here. +

This function should not modify the vector because some const +functions call compareItems(). + +

uint TQPtrVector::contains ( const type * d ) const +

+ +

Returns the number of occurrences of item d in the vector. +

Compares items using the virtual function compareItems(). +

See also containsRef(). + +

uint TQPtrVector::containsRef ( const type * d ) const +

+ +

Returns the number of occurrences of the item pointer d in the +vector. +

This function does not use compareItems() to compare items. +

See also findRef(). + +

uint TQPtrVector::count () const [virtual] +

+ +

Returns the number of items in the vector. The vector is empty if +count() == 0. +

See also isEmpty(), size(), and isNull(). + +

Reimplemented from TQPtrCollection. +

type ** TQPtrVector::data () const +

+ +

Returns a pointer to the actual vector data, which is an array of +type*. +

The vector is a null vector if data() == 0 (null pointer). +

See also isNull(). + +

bool TQPtrVector::fill ( const type * d, int size = -1 ) +

+ +

Inserts item d in all positions in the vector. Any existing +items are removed. If d is 0, the vector becomes empty. +

If size >= 0, the vector is first resized to size. By +default, size is -1. +

Returns TRUE if successful, i.e. size is the same as the +current size, or size is larger and the memory has successfully +been allocated; otherwise returns FALSE. +

See also resize(), insert(), and isEmpty(). + +

int TQPtrVector::find ( const type * d, uint i = 0 ) const +

+ +

Finds the first occurrence of item d in the vector using a +linear search. The search starts at position i, which must be +less than size(). i is by default 0; i.e. the search starts at +the start of the vector. +

Returns the position of d, or -1 if d could not be found. +

Compares items using the virtual function compareItems(). +

Use the much faster bsearch() to search a sorted vector. +

See also findRef() and bsearch(). + +

int TQPtrVector::findRef ( const type * d, uint i = 0 ) const +

+ +

Finds the first occurrence of the item pointer d in the vector +using a linear search. The search starts at position i, which +must be less than size(). i is by default 0; i.e. the search +starts at the start of the vector. +

Returns the position of d, or -1 if d could not be found. +

This function does not use compareItems() to compare items. +

Use the much faster bsearch() to search a sorted vector. +

See also find() and bsearch(). + +

bool TQPtrVector::insert ( uint i, const type * d ) +

+ +

Sets position i in the vector to contain the item d. i +must be less than size(). Any previous element in position i is +removed. +

See also at(). + +

bool TQPtrVector::isEmpty () const +

+ +

Returns TRUE if the vector is empty; otherwise returns FALSE. +

See also count(). + +

bool TQPtrVector::isNull () const +

+ +

Returns TRUE if the vector is null; otherwise returns FALSE. +

A null vector has size() == 0 and data() == 0. +

See also size(). + +

TQPtrVector<type> & TQPtrVector::operator= ( const TQPtrVector<type> & v ) +

+ +

Assigns v to this vector and returns a reference to this +vector. +

This vector is first cleared and then all the items from v are +copied into the vector. Only the pointers are copied (i.e. shallow copy). +

See also clear(). + +

bool TQPtrVector::operator== ( const TQPtrVector<type> & v ) const +

+ +

Returns TRUE if this vector and v are equal; otherwise returns +FALSE. + +

type * TQPtrVector::operator[] ( int i ) const +

+ +

Returns the item at position i, or 0 if there is no item at +that position. i must be less than size(). +

Equivalent to at( i ). +

See also at(). + +

TQDataStream & TQPtrVector::read ( TQDataStream & s, TQPtrCollection::Item & item ) [virtual protected] +

+ +

Reads a vector item, item, from the stream s and returns a +reference to the stream. +

The default implementation sets item to 0. +

See also write(). + +

bool TQPtrVector::remove ( uint i ) +

+ +

Removes the item at position i in the vector, if there is one. +i must be less than size(). +

Returns TRUE if i is within range; otherwise returns FALSE. +

See also take() and at(). + +

bool TQPtrVector::resize ( uint size ) +

+ +

Resizes (expands or shrinks) the vector to size elements. The +vector becomes a null vector if size == 0. +

Any items at position size or beyond in the vector are removed. +New positions are initialized to 0. +

Returns TRUE if successful, i.e. if the memory was successfully +allocated; otherwise returns FALSE. +

See also size() and isNull(). + +

void TQPtrCollection::setAutoDelete ( bool enable ) +

+ +

Sets the collection to auto-delete its contents if enable is +TRUE and to never delete them if enable is FALSE. +

If auto-deleting is turned on, all the items in a collection are +deleted when the collection itself is deleted. This is convenient +if the collection has the only pointer to the items. +

The default setting is FALSE, for safety. If you turn it on, be +careful about copying the collection - you might find yourself +with two collections deleting the same items. +

Note that the auto-delete setting may also affect other functions +in subclasses. For example, a subclass that has a remove() +function will remove the item from its data structure, and if +auto-delete is enabled, will also delete the item. +

See also autoDelete(). + +

Examples: grapher/grapher.cpp, scribble/scribble.cpp, and table/bigtable/main.cpp. +

uint TQPtrVector::size () const +

+ +

Returns the size of the vector, i.e. the number of vector +positions. This is also the maximum number of items the vector can +hold. +

The vector is a null vector if size() == 0. +

See also isNull(), resize(), and count(). + +

void TQPtrVector::sort () +

+ +

Sorts the items in ascending order. Any empty positions will be +put last. +

Compares items using the virtual function compareItems(). +

See also bsearch(). + +

type * TQPtrVector::take ( uint i ) +

+ +

Returns the item at position i in the vector, and removes that +item from the vector. i must be less than size(). If there is +no item at position i, 0 is returned. +

Unlike remove(), this function does not call deleteItem() for +the removed item. +

See also remove() and at(). + +

TQDataStream & TQPtrVector::write ( TQDataStream & s, TQPtrCollection::Item item ) const [virtual protected] +

+ +

Writes a vector item, item, to the stream s and returns a +reference to the stream. +

The default implementation does nothing. +

See also read(). + + +


+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/qpushbt-m.png b/doc/html/qpushbt-m.png new file mode 100644 index 00000000..4a487330 Binary files /dev/null and b/doc/html/qpushbt-m.png differ diff --git a/doc/html/qpushbt-w.png b/doc/html/qpushbt-w.png new file mode 100644 index 00000000..6290bfdf Binary files /dev/null and b/doc/html/qpushbt-w.png differ diff --git a/doc/html/qpushbutton-h.html b/doc/html/qpushbutton-h.html new file mode 100644 index 00000000..7e7d4f06 --- /dev/null +++ b/doc/html/qpushbutton-h.html @@ -0,0 +1,194 @@ + + + + + +qpushbutton.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qpushbutton.h

+ +

This is the verbatim text of the qpushbutton.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qpushbutton.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQPushButton class
+**
+** Created : 940221
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQPUSHBUTTON_H
+#define TQPUSHBUTTON_H
+
+#ifndef QT_H
+#include "qbutton.h"
+#include "qiconset.h"
+#endif // QT_H
+
+#ifndef QT_NO_PUSHBUTTON
+class TQPushButtonPrivate;
+class TQPopupMenu;
+
+class Q_EXPORT TQPushButton : public TQButton
+{
+    Q_OBJECT
+
+    Q_PROPERTY( bool autoDefault READ autoDefault WRITE setAutoDefault )
+    Q_PROPERTY( bool default READ isDefault WRITE setDefault )
+    Q_PROPERTY( bool menuButton READ isMenuButton DESIGNABLE false )
+    Q_PROPERTY( TQIconSet iconSet READ iconSet WRITE setIconSet )
+    Q_OVERRIDE( bool toggleButton WRITE setToggleButton )
+    Q_OVERRIDE( bool on WRITE setOn )
+    Q_PROPERTY( bool flat READ isFlat WRITE setFlat )
+    Q_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
+
+public:
+    TQPushButton( TQWidget *parent, const char* name=0 );
+    TQPushButton( const TQString &text, TQWidget *parent, const char* name=0 );
+#ifndef QT_NO_ICONSET
+    TQPushButton( const TQIconSet& icon, const TQString &text, TQWidget *parent, const char* name=0 );
+#endif
+    ~TQPushButton();
+
+    TQSize	sizeHint() const;
+
+    void	move( int x, int y );
+    void	move( const TQPoint &p );
+    void	resize( int w, int h );
+    void	resize( const TQSize & );
+    void	setGeometry( int x, int y, int w, int h );
+
+    void	setGeometry( const TQRect & );
+
+    void setToggleButton( bool );
+
+    bool	autoDefault()	const	{ return autoDefButton; }
+    virtual void setAutoDefault( bool autoDef );
+    bool	isDefault()	const	{ return defButton; }
+    virtual void setDefault( bool def );
+
+    virtual void setIsMenuButton( bool enable ) {  // obsolete functions
+	if ( (bool)hasMenuArrow == enable )
+	    return;
+	hasMenuArrow = enable ? 1 : 0;
+	update();
+	updateGeometry();
+    }
+    bool	isMenuButton() const { return hasMenuArrow; }
+
+#ifndef QT_NO_POPUPMENU
+    void setPopup( TQPopupMenu* popup );
+    TQPopupMenu* popup() const;
+#endif
+#ifndef QT_NO_ICONSET
+    void setIconSet( const TQIconSet& );
+    TQIconSet* iconSet() const;
+#endif
+    void setFlat( bool );
+    bool isFlat() const;
+
+public slots:
+    virtual void setOn( bool );
+
+protected:
+    void	drawButton( TQPainter * );
+    void	drawButtonLabel( TQPainter * );
+    void	focusInEvent( TQFocusEvent * );
+    void	focusOutEvent( TQFocusEvent * );
+    void	resizeEvent( TQResizeEvent * );
+    void	updateMask();
+private slots:
+#ifndef QT_NO_POPUPMENU
+    void popupPressed();
+#endif
+private:
+    void	init();
+
+    uint	autoDefButton	: 1;
+    uint	defButton	: 1;
+    uint	flt		: 1;
+    uint	reserved		: 1; // UNUSED
+    uint	lastEnabled	: 1; // UNUSED
+    uint	hasMenuArrow	: 1;
+
+    TQPushButtonPrivate* d;
+
+    friend class TQDialog;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQPushButton( const TQPushButton & );
+    TQPushButton &operator=( const TQPushButton & );
+#endif
+};
+
+
+#endif // QT_NO_PUSHBUTTON
+
+#endif // TQPUSHBUTTON_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpushbutton-members.html b/doc/html/qpushbutton-members.html new file mode 100644 index 00000000..b21ee79b --- /dev/null +++ b/doc/html/qpushbutton-members.html @@ -0,0 +1,382 @@ + + + + + +TQPushButton Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQPushButton

+ +

This is the complete list of member functions for +TQPushButton, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qpushbutton.html b/doc/html/qpushbutton.html new file mode 100644 index 00000000..41e417c2 --- /dev/null +++ b/doc/html/qpushbutton.html @@ -0,0 +1,470 @@ + + + + + +TQPushButton Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQPushButton Class Reference

+ +

The TQPushButton widget provides a command button. +More... +

#include <qpushbutton.h> +

Inherits TQButton. +

List of all member functions. +

Public Members

+ +

Public Slots

+
    +
  • virtual void setOn ( bool )
  • +
+

Important Inherited Members

+ +

Properties

+
    +
  • bool autoDefault - whether the push button is the auto default button
  • +
  • bool autoMask - whether the button is automatically masked  (read only)
  • +
  • bool default - whether the push button is the default button
  • +
  • bool flat - whether the border is disabled
  • +
  • TQIconSet iconSet - the icon set on the push button
  • +
  • bool menuButton - whether the push button has a menu button on it  (read only)  (obsolete)
  • +
  • bool on - whether the push button is toggled
  • +
  • bool toggleButton - whether the button is a toggle button
  • +
+

Detailed Description

+ + +The TQPushButton widget provides a command button. +

+ +

The push button, or command button, is perhaps the most commonly +used widget in any graphical user interface. Push (click) a button +to command the computer to perform some action, or to answer a +question. Typical buttons are OK, Apply, Cancel, Close, Yes, No +and Help. +

A command button is rectangular and typically displays a text +label describing its action. An underlined character in the label +(signified by preceding it with an ampersand in the text) +indicates an accelerator key, e.g. +

+        TQPushButton *pb = new TQPushButton( "&Download", this );
+    
+ +In this example the accelerator is Alt+D, and the label text +will be displayed as Download. +

Push buttons can display a textual label or a pixmap, and +optionally a small icon. These can be set using the constructors +and changed later using setText(), setPixmap() and setIconSet(). +If the button is disabled the appearance of the text or pixmap and +iconset will be manipulated with respect to the GUI style to make +the button look "disabled". +

A push button emits the signal clicked() when it is activated by +the mouse, the Spacebar or by a keyboard accelerator. Connect to +this signal to perform the button's action. Push buttons also +provide less commonly used signals, for example, pressed() and +released(). +

Command buttons in dialogs are by default auto-default buttons, +i.e. they become the default push button automatically when they +receive the keyboard input focus. A default button is a push +button that is activated when the user presses the Enter or Return +key in a dialog. You can change this with setAutoDefault(). Note +that auto-default buttons reserve a little extra space which is +necessary to draw a default-button indicator. If you do not want +this space around your buttons, call setAutoDefault(FALSE). +

Being so central, the button widget has grown to accommodate a +great many variations in the past decade. The Microsoft style +guide now shows about ten different states of Windows push buttons +and the text implies that there are dozens more when all the +combinations of features are taken into consideration. +

The most important modes or states are: +

    +
  • Available or not (grayed out, disabled). +
  • Standard push button, toggling push button or menu button. +
  • On or off (only for toggling push buttons). +
  • Default or normal. The default button in a dialog can generally +be "clicked" using the Enter or Return key. +
  • Auto-repeat or not. +
  • Pressed down or not. +
+

As a general rule, use a push button when the application or +dialog window performs an action when the user clicks on it (such +as Apply, Cancel, Close and Help) and when the widget is +supposed to have a wide, rectangular shape with a text label. +Small, typically square buttons that change the state of the +window rather than performing an action (such as the buttons in +the top-right corner of the TQFileDialog) are not command buttons, +but tool buttons. TQt provides a special class (TQToolButton) for +these buttons. +

If you need toggle behavior (see setToggleButton()) or a button +that auto-repeats the activation signal when being pushed down +like the arrows in a scroll bar (see setAutoRepeat()), a command +button is probably not what you want. When in doubt, use a tool +button. +

A variation of a command button is a menu button. These provide +not just one command, but several, since when they are clicked +they pop up a menu of options. Use the method setPopup() to +associate a popup menu with a push button. +

Other classes of buttons are option buttons (see TQRadioButton) and +check boxes (see TQCheckBox). +

+

In TQt, the TQButton abstract base class provides most of the modes +and other API, and TQPushButton provides GUI logic. See TQButton for +more information about the API. +

+

See also TQToolButton, TQRadioButton, TQCheckBox, GUI Design Handbook: Push Button, and Basic Widgets. + +


Member Function Documentation

+

TQPushButton::TQPushButton ( TQWidget * parent, const char * name = 0 ) +

+Constructs a push button with no text. +

The parent and name arguments are sent on to the TQWidget +constructor. + +

TQPushButton::TQPushButton ( const TQString & text, TQWidget * parent, const char * name = 0 ) +

+Constructs a push button called name with the parent parent +and the text text. + +

TQPushButton::TQPushButton ( const TQIconSet & icon, const TQString & text, TQWidget * parent, const char * name = 0 ) +

+Constructs a push button with an icon and a text. +

Note that you can also pass a TQPixmap object as an icon (thanks to +the implicit type conversion provided by C++). +

The parent and name arguments are sent to the TQWidget +constructor. + +

TQPushButton::~TQPushButton () +

+Destroys the push button. + +

TQKeySequence TQButton::accel () const +

Returns the accelerator associated with the button. +See the "accel" property for details. +

bool TQPushButton::autoDefault () const +

Returns TRUE if the push button is the auto default button; otherwise returns FALSE. +See the "autoDefault" property for details. +

bool TQButton::autoRepeat () const +

Returns TRUE if autoRepeat is enabled; otherwise returns FALSE. +See the "autoRepeat" property for details. +

void TQButton::clicked () [signal] +

+ +

This signal is emitted when the button is activated (i.e. first +pressed down and then released when the mouse cursor is inside the +button), when the accelerator key is typed or when animateClick() +is called. This signal is not emitted if you call setDown(). +

The TQButtonGroup::clicked() signal does the same job, if you want +to connect several buttons to the same slot. +

Warning: Don't launch a model dialog in response to this signal +for a button that has autoRepeat turned on. +

See also pressed(), released(), toggled(), autoRepeat, and down. + +

Examples: chart/setdataform.cpp, listbox/listbox.cpp, network/clientserver/client/client.cpp, progressbar/progressbar.cpp, richtext/richtext.cpp, t2/main.cpp, and t4/main.cpp. +

TQButtonGroup * TQButton::group () const +

+Returns the group that this button belongs to. +

If the button is not a member of any TQButtonGroup, this function +returns 0. +

See also TQButtonGroup. + +

TQIconSet * TQPushButton::iconSet () const +

Returns the icon set on the push button. +See the "iconSet" property for details. +

bool TQPushButton::isDefault () const +

Returns TRUE if the push button is the default button; otherwise returns FALSE. +See the "default" property for details. +

bool TQButton::isDown () const +

Returns TRUE if the button is pressed; otherwise returns FALSE. +See the "down" property for details. +

bool TQButton::isExclusiveToggle () const +

Returns TRUE if the button is an exclusive toggle; otherwise returns FALSE. +See the "exclusiveToggle" property for details. +

bool TQPushButton::isFlat () const +

Returns TRUE if the border is disabled; otherwise returns FALSE. +See the "flat" property for details. +

bool TQPushButton::isMenuButton () const +

Returns TRUE if the push button has a menu button on it; otherwise returns FALSE. +See the "menuButton" property for details. +

bool TQButton::isOn () const +

Returns TRUE if the button is toggled; otherwise returns FALSE. +See the "on" property for details. +

bool TQButton::isToggleButton () const +

Returns TRUE if the button is a toggle button; otherwise returns FALSE. +See the "toggleButton" property for details. +

const TQPixmap * TQButton::pixmap () const +

Returns the pixmap shown on the button. +See the "pixmap" property for details. +

TQPopupMenu * TQPushButton::popup () const +

+Returns the button's associated popup menu or 0 if no popup menu +has been set. +

See also setPopup(). + +

void TQButton::pressed () [signal] +

+ +

This signal is emitted when the button is pressed down. +

See also released() and clicked(). + +

Examples: network/httpd/httpd.cpp and popup/popup.cpp. +

void TQButton::released () [signal] +

+ +

This signal is emitted when the button is released. +

See also pressed(), clicked(), and toggled(). + +

void TQButton::setAccel ( const TQKeySequence & ) [virtual] +

Sets the accelerator associated with the button. +See the "accel" property for details. +

void TQPushButton::setAutoDefault ( bool autoDef ) [virtual] +

Sets whether the push button is the auto default button to autoDef. +See the "autoDefault" property for details. +

void TQButton::setAutoRepeat ( bool ) [virtual] +

Sets whether autoRepeat is enabled. +See the "autoRepeat" property for details. +

void TQPushButton::setDefault ( bool def ) [virtual] +

Sets whether the push button is the default button to def. +See the "default" property for details. +

void TQButton::setDown ( bool ) [virtual] +

Sets whether the button is pressed. +See the "down" property for details. +

void TQPushButton::setFlat ( bool ) +

Sets whether the border is disabled. +See the "flat" property for details. +

void TQPushButton::setIconSet ( const TQIconSet & ) +

Sets the icon set on the push button. +See the "iconSet" property for details. +

void TQPushButton::setIsMenuButton ( bool enable ) [virtual] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+ +

void TQPushButton::setOn ( bool ) [virtual slot] +

Sets whether the push button is toggled. +See the "on" property for details. +

void TQButton::setPixmap ( const TQPixmap & ) [virtual] +

Sets the pixmap shown on the button. +See the "pixmap" property for details. +

void TQPushButton::setPopup ( TQPopupMenu * popup ) +

+Associates the popup menu popup with this push button. This +turns the button into a menu button. +

Ownership of the popup menu is not transferred to the push +button. +

See also popup(). + +

Examples: buttongroups/buttongroups.cpp and qdir/qdir.cpp. +

void TQButton::setText ( const TQString & ) [virtual] +

Sets the text shown on the button. +See the "text" property for details. +

void TQPushButton::setToggleButton ( bool ) +

Sets whether the button is a toggle button. +See the "toggleButton" property for details. +

ToggleState TQButton::state () const +

Returns the state of the toggle button. +See the "toggleState" property for details. +

void TQButton::stateChanged ( int state ) [signal] +

+ +

This signal is emitted whenever a toggle button changes state. state is On if the button is on, NoChange if it is in the +"no change" state or Off +if the button is off. +

This may be the result of a user action, toggle() slot activation, +setState(), or because setOn() was called. +

See also clicked() and TQButton::ToggleState. + +

TQString TQButton::text () const +

Returns the text shown on the button. +See the "text" property for details. +

void TQButton::toggle () [slot] +

+Toggles the state of a toggle button. +

See also on, on, toggled(), and toggleButton. + +

void TQButton::toggled ( bool on ) [signal] +

+ +

This signal is emitted whenever a toggle button changes status. on is TRUE if the button is on, or FALSE if the button is off. +

This may be the result of a user action, toggle() slot activation, +or because setOn() was called. +

See also clicked(). + +

Example: listbox/listbox.cpp. +


Property Documentation

+

TQKeySequence accel

+

This property holds the accelerator associated with the button. +

This property is 0 if there is no accelerator set. If you set this +property to 0 then any current accelerator is removed. + +

Set this property's value with setAccel() and get this property's value with accel(). +

bool autoDefault

+

This property holds whether the push button is the auto default button. +

If this property is set to TRUE then the push button is the auto +default button in a dialog. +

In some GUI styles a default button is drawn with an extra frame +around it, up to 3 pixels or more. TQt automatically keeps this +space free around auto-default buttons, i.e. auto-default buttons +may have a slightly larger size hint. +

This property's default is TRUE for buttons that have a TQDialog +parent; otherwise it defaults to FALSE. +

See the default property for details of how default and +auto-default interact. + +

Set this property's value with setAutoDefault() and get this property's value with autoDefault(). +

bool autoMask

+

This property holds whether the button is automatically masked. +

See also TQWidget::autoMask. + +

bool autoRepeat

+

This property holds whether autoRepeat is enabled. +

If autoRepeat is enabled then the clicked() signal is emitted at +regular intervals if the button is down. This property has no +effect on toggle buttons. autoRepeat is off by default. + +

Set this property's value with setAutoRepeat() and get this property's value with autoRepeat(). +

bool default

+

This property holds whether the push button is the default button. +

If this property is set to TRUE then the push button will be +pressed if the user presses the Enter (or Return) key in a dialog. +

Regardless of focus, if the user presses Enter: If there is a +default button the default button is pressed; otherwise, if +there are one or more autoDefault buttons the first autoDefault +button that is next in the tab order is pressed. If there are no +default or autoDefault buttons only pressing Space on a button +with focus, mouse clicking, or using an accelerator will press a +button. +

In a dialog, only one push button at a time can be the default +button. This button is then displayed with an additional frame +(depending on the GUI style). +

The default button behavior is provided only in dialogs. Buttons +can always be clicked from the keyboard by pressing Enter (or +Return) or the Spacebar when the button has focus. +

This property's default is FALSE. + +

Set this property's value with setDefault() and get this property's value with isDefault(). +

bool flat

+

This property holds whether the border is disabled. +

This property's default is FALSE. + +

Set this property's value with setFlat() and get this property's value with isFlat(). +

TQIconSet iconSet

+

This property holds the icon set on the push button. +

This property will return 0 if the push button has no iconset. + +

Set this property's value with setIconSet() and get this property's value with iconSet(). +

bool menuButton

This property holds whether the push button has a menu button on it. +

This property is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

If this property is set to TRUE, then a down arrow is drawn on the push +button to indicate that a menu will pop up if the user clicks on the +arrow. + +

Get this property's value with isMenuButton(). +

bool on

+

This property holds whether the push button is toggled. +

This property should only be set for toggle push buttons. The +default value is FALSE. +

See also on, toggle(), toggled(), and toggleButton. + +

Set this property's value with setOn(). +

TQPixmap pixmap

+

This property holds the pixmap shown on the button. +

If the pixmap is monochrome (i.e. it is a TQBitmap or its depth is 1) and it does not have a mask, +this property will set the pixmap to be its own mask. The purpose +of this is to draw transparent bitmaps which are important for +toggle buttons, for example. +

pixmap() returns 0 if no pixmap was set. + +

Set this property's value with setPixmap() and get this property's value with pixmap(). +

TQString text

+

This property holds the text shown on the button. +

This property will return a TQString::null if the button has no +text. If the text has an ampersand (&) in it, then an +accelerator is automatically created for it using the character +that follows the '&' as the accelerator key. Any previous +accelerator will be overwritten, or cleared if no accelerator is +defined by the text. +

There is no default text. + +

Set this property's value with setText() and get this property's value with text(). +

bool toggleButton

+

This property holds whether the button is a toggle button. +

Toggle buttons have an on/off state similar to check boxes. A push button is initially not a toggle +button. +

See also on, toggle(), toggleButton, and toggled(). + +

Set this property's value with setToggleButton(). + +


+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/qqueue.html b/doc/html/qqueue.html new file mode 100644 index 00000000..bae21df4 --- /dev/null +++ b/doc/html/qqueue.html @@ -0,0 +1,47 @@ + + + + + +TQQueue Class Reference (obsolete) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQQueue Class Reference (obsolete)

+ + +

+#include <qqueue.h>
+ +

The TQQueue class has been renamed TQPtrQueue in TQt 3.0. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qradiobt-m.png b/doc/html/qradiobt-m.png new file mode 100644 index 00000000..cd3eacc2 Binary files /dev/null and b/doc/html/qradiobt-m.png differ diff --git a/doc/html/qradiobt-w.png b/doc/html/qradiobt-w.png new file mode 100644 index 00000000..0c4f5678 Binary files /dev/null and b/doc/html/qradiobt-w.png differ diff --git a/doc/html/qradiobutton-h.html b/doc/html/qradiobutton-h.html new file mode 100644 index 00000000..9c7d5bb0 --- /dev/null +++ b/doc/html/qradiobutton-h.html @@ -0,0 +1,136 @@ + + + + + +qradiobutton.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qradiobutton.h

+ +

This is the verbatim text of the qradiobutton.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qradiobutton.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQRadioButton class
+**
+** Created : 940222
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQRADIOBUTTON_H
+#define TQRADIOBUTTON_H
+
+#ifndef QT_H
+#include "qbutton.h"
+#endif // QT_H
+
+#ifndef QT_NO_RADIOBUTTON
+
+class Q_EXPORT TQRadioButton : public TQButton
+{
+    Q_OBJECT
+    Q_PROPERTY( bool checked READ isChecked WRITE setChecked )
+    Q_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
+
+public:
+    TQRadioButton( TQWidget *parent, const char* name=0 );
+    TQRadioButton( const TQString &text, TQWidget *parent, const char* name=0 );
+
+    bool    isChecked() const;
+
+    TQSize    sizeHint() const;
+
+public slots:
+    virtual void    setChecked( bool check );
+
+protected:
+    bool    hitButton( const TQPoint & ) const;
+    void    drawButton( TQPainter * );
+    void    drawButtonLabel( TQPainter * );
+    void    updateMask();
+
+    void    resizeEvent( TQResizeEvent* );
+
+private:
+    void    init();
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQRadioButton( const TQRadioButton & );
+    TQRadioButton &operator=( const TQRadioButton & );
+#endif
+};
+
+
+inline bool TQRadioButton::isChecked() const
+{ return isOn(); }
+
+#endif // QT_NO_RADIOBUTTON
+
+#endif // TQRADIOBUTTON_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qradiobutton-members.html b/doc/html/qradiobutton-members.html new file mode 100644 index 00000000..397bc834 --- /dev/null +++ b/doc/html/qradiobutton-members.html @@ -0,0 +1,371 @@ + + + + + +TQRadioButton Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQRadioButton

+ +

This is the complete list of member functions for +TQRadioButton, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qradiobutton.html b/doc/html/qradiobutton.html new file mode 100644 index 00000000..34049612 --- /dev/null +++ b/doc/html/qradiobutton.html @@ -0,0 +1,278 @@ + + + + + +TQRadioButton Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQRadioButton Class Reference

+ +

The TQRadioButton widget provides a radio button with a text or pixmap label. +More... +

#include <qradiobutton.h> +

Inherits TQButton. +

List of all member functions. +

Public Members

+
    +
  • TQRadioButton ( TQWidget * parent, const char * name = 0 )
  • +
  • TQRadioButton ( const TQString & text, TQWidget * parent, const char * name = 0 )
  • +
  • bool isChecked () const
  • +
+

Public Slots

+ +

Important Inherited Members

+ +

Properties

+
    +
  • bool autoMask - whether the radio button is automatically masked  (read only)
  • +
  • bool checked - whether the radio button is checked
  • +
+

Detailed Description

+ + +The TQRadioButton widget provides a radio button with a text or pixmap label. +

+ +

TQRadioButton and TQCheckBox are both option buttons. That is, they +can be switched on (checked) or off (unchecked). The classes +differ in how the choices for the user are restricted. Check boxes +define "many of many" choices, whereas radio buttons provide a +"one of many" choice. In a group of radio buttons only one radio +button at a time can be checked; if the user selects another +button, the previously selected button is switched off. +

The easiest way to implement a "one of many" choice is simply to +put the radio buttons into TQButtonGroup. +

Whenever a button is switched on or off it emits the signal +toggled(). Connect to this signal if you want to trigger an action +each time the button changes state. Otherwise, use isChecked() to +see if a particular button is selected. +

Just like TQPushButton, a radio button can display text or a +pixmap. The text can be set in the constructor or with setText(); +the pixmap is set with setPixmap(). +

+

+

See also TQPushButton, TQToolButton, GUI Design Handbook: Radio Button, and Basic Widgets. + +


Member Function Documentation

+

TQRadioButton::TQRadioButton ( TQWidget * parent, const char * name = 0 ) +

+Constructs a radio button with no text. +

The parent and name arguments are sent on to the TQWidget +constructor. + +

TQRadioButton::TQRadioButton ( const TQString & text, TQWidget * parent, const char * name = 0 ) +

+Constructs a radio button with the text text. +

The parent and name arguments are sent on to the TQWidget +constructor. + +

TQKeySequence TQButton::accel () const +

Returns the accelerator associated with the button. +See the "accel" property for details. +

bool TQButton::autoRepeat () const +

Returns TRUE if autoRepeat is enabled; otherwise returns FALSE. +See the "autoRepeat" property for details. +

void TQButton::clicked () [signal] +

+ +

This signal is emitted when the button is activated (i.e. first +pressed down and then released when the mouse cursor is inside the +button), when the accelerator key is typed or when animateClick() +is called. This signal is not emitted if you call setDown(). +

The TQButtonGroup::clicked() signal does the same job, if you want +to connect several buttons to the same slot. +

Warning: Don't launch a model dialog in response to this signal +for a button that has autoRepeat turned on. +

See also pressed(), released(), toggled(), autoRepeat, and down. + +

Examples: chart/setdataform.cpp, listbox/listbox.cpp, network/clientserver/client/client.cpp, progressbar/progressbar.cpp, richtext/richtext.cpp, t2/main.cpp, and t4/main.cpp. +

TQButtonGroup * TQButton::group () const +

+Returns the group that this button belongs to. +

If the button is not a member of any TQButtonGroup, this function +returns 0. +

See also TQButtonGroup. + +

bool TQRadioButton::isChecked () const +

Returns TRUE if the radio button is checked; otherwise returns FALSE. +See the "checked" property for details. +

bool TQButton::isDown () const +

Returns TRUE if the button is pressed; otherwise returns FALSE. +See the "down" property for details. +

bool TQButton::isExclusiveToggle () const +

Returns TRUE if the button is an exclusive toggle; otherwise returns FALSE. +See the "exclusiveToggle" property for details. +

bool TQButton::isOn () const +

Returns TRUE if the button is toggled; otherwise returns FALSE. +See the "on" property for details. +

bool TQButton::isToggleButton () const +

Returns TRUE if the button is a toggle button; otherwise returns FALSE. +See the "toggleButton" property for details. +

const TQPixmap * TQButton::pixmap () const +

Returns the pixmap shown on the button. +See the "pixmap" property for details. +

void TQButton::pressed () [signal] +

+ +

This signal is emitted when the button is pressed down. +

See also released() and clicked(). + +

Examples: network/httpd/httpd.cpp and popup/popup.cpp. +

void TQButton::released () [signal] +

+ +

This signal is emitted when the button is released. +

See also pressed(), clicked(), and toggled(). + +

void TQButton::setAccel ( const TQKeySequence & ) [virtual] +

Sets the accelerator associated with the button. +See the "accel" property for details. +

void TQButton::setAutoRepeat ( bool ) [virtual] +

Sets whether autoRepeat is enabled. +See the "autoRepeat" property for details. +

void TQRadioButton::setChecked ( bool check ) [virtual slot] +

Sets whether the radio button is checked to check. +See the "checked" property for details. +

void TQButton::setDown ( bool ) [virtual] +

Sets whether the button is pressed. +See the "down" property for details. +

void TQButton::setPixmap ( const TQPixmap & ) [virtual] +

Sets the pixmap shown on the button. +See the "pixmap" property for details. +

void TQButton::setText ( const TQString & ) [virtual] +

Sets the text shown on the button. +See the "text" property for details. +

ToggleState TQButton::state () const +

Returns the state of the toggle button. +See the "toggleState" property for details. +

void TQButton::stateChanged ( int state ) [signal] +

+ +

This signal is emitted whenever a toggle button changes state. state is On if the button is on, NoChange if it is in the +"no change" state or Off +if the button is off. +

This may be the result of a user action, toggle() slot activation, +setState(), or because setOn() was called. +

See also clicked() and TQButton::ToggleState. + +

TQString TQButton::text () const +

Returns the text shown on the button. +See the "text" property for details. +

void TQButton::toggle () [slot] +

+Toggles the state of a toggle button. +

See also on, setOn(), toggled(), and toggleButton. + +

void TQButton::toggled ( bool on ) [signal] +

+ +

This signal is emitted whenever a toggle button changes status. on is TRUE if the button is on, or FALSE if the button is off. +

This may be the result of a user action, toggle() slot activation, +or because setOn() was called. +

See also clicked(). + +

Example: listbox/listbox.cpp. +


Property Documentation

+

TQKeySequence accel

+

This property holds the accelerator associated with the button. +

This property is 0 if there is no accelerator set. If you set this +property to 0 then any current accelerator is removed. + +

Set this property's value with setAccel() and get this property's value with accel(). +

bool autoMask

+

This property holds whether the radio button is automatically masked. +

See also TQWidget::autoMask. + +

bool autoRepeat

+

This property holds whether autoRepeat is enabled. +

If autoRepeat is enabled then the clicked() signal is emitted at +regular intervals if the button is down. This property has no +effect on toggle buttons. autoRepeat is off by default. + +

Set this property's value with setAutoRepeat() and get this property's value with autoRepeat(). +

bool checked

+

This property holds whether the radio button is checked. +

This property will not effect any other radio buttons unless they +have been placed in the same TQButtonGroup. The default value is +FALSE (unchecked). + +

Set this property's value with setChecked() and get this property's value with isChecked(). +

TQPixmap pixmap

+

This property holds the pixmap shown on the button. +

If the pixmap is monochrome (i.e. it is a TQBitmap or its depth is 1) and it does not have a mask, +this property will set the pixmap to be its own mask. The purpose +of this is to draw transparent bitmaps which are important for +toggle buttons, for example. +

pixmap() returns 0 if no pixmap was set. + +

Set this property's value with setPixmap() and get this property's value with pixmap(). +

TQString text

+

This property holds the text shown on the button. +

This property will return a TQString::null if the button has no +text. If the text has an ampersand (&) in it, then an +accelerator is automatically created for it using the character +that follows the '&' as the accelerator key. Any previous +accelerator will be overwritten, or cleared if no accelerator is +defined by the text. +

There is no default text. + +

Set this property's value with setText() and get this property's value with text(). + +


+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/qrangecontrol-h.html b/doc/html/qrangecontrol-h.html new file mode 100644 index 00000000..6bcac13d --- /dev/null +++ b/doc/html/qrangecontrol-h.html @@ -0,0 +1,239 @@ + + + + + +qrangecontrol.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qrangecontrol.h

+ +

This is the verbatim text of the qrangecontrol.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qrangecontrol.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQRangeControl class
+**
+** Created : 940427
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQRANGECONTROL_H
+#define TQRANGECONTROL_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#include "qframe.h"
+#endif // QT_H
+
+#ifndef QT_NO_RANGECONTROL
+
+
+class TQRangeControlPrivate;
+
+
+class Q_EXPORT TQRangeControl
+{
+public:
+    TQRangeControl();
+    TQRangeControl( int minValue, int maxValue,
+		   int lineStep, int pageStep, int value );
+    virtual ~TQRangeControl();
+    int		value()		const;
+    void	setValue( int );
+    void	addPage();
+    void	subtractPage();
+    void	addLine();
+    void	subtractLine();
+
+    int		minValue()	const;
+    int		maxValue()	const;
+    void	setRange( int minValue, int maxValue );
+    void	setMinValue( int minVal );
+    void	setMaxValue( int minVal );
+
+    int		lineStep()	const;
+    int		pageStep()	const;
+    void	setSteps( int line, int page );
+
+    int		bound( int ) const;
+
+protected:
+    int		positionFromValue( int val, int space ) const;
+    int		valueFromPosition( int pos, int space ) const;
+    void	directSetValue( int val );
+    int		prevValue()	const;
+
+    virtual void valueChange();
+    virtual void rangeChange();
+    virtual void stepChange();
+
+private:
+    int		minVal, maxVal;
+    int		line, page;
+    int		val, prevVal;
+
+    TQRangeControlPrivate * d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQRangeControl( const TQRangeControl & );
+    TQRangeControl &operator=( const TQRangeControl & );
+#endif
+};
+
+
+inline int TQRangeControl::value() const
+{ return val; }
+
+inline int TQRangeControl::prevValue() const
+{ return prevVal; }
+
+inline int TQRangeControl::minValue() const
+{ return minVal; }
+
+inline int TQRangeControl::maxValue() const
+{ return maxVal; }
+
+inline int TQRangeControl::lineStep() const
+{ return line; }
+
+inline int TQRangeControl::pageStep() const
+{ return page; }
+
+
+#endif // QT_NO_RANGECONTROL
+
+#ifndef QT_NO_SPINWIDGET
+
+class TQSpinWidgetPrivate;
+class Q_EXPORT TQSpinWidget : public TQWidget
+{
+    Q_OBJECT
+public:
+    TQSpinWidget( TQWidget* parent=0, const char* name=0 );
+    ~TQSpinWidget();
+
+    void 	setEditWidget( TQWidget * widget );
+    TQWidget * 	editWidget();
+
+    TQRect upRect() const;
+    TQRect downRect() const;
+
+    void setUpEnabled( bool on );
+    void setDownEnabled( bool on );
+
+    bool isUpEnabled() const;
+    bool isDownEnabled() const;
+
+    enum ButtonSymbols { UpDownArrows, PlusMinus };
+    virtual void	setButtonSymbols( ButtonSymbols bs );
+    ButtonSymbols	buttonSymbols() const;
+
+    void arrange();
+
+signals:
+    void stepUpPressed();
+    void stepDownPressed();
+
+public slots:
+    void stepUp();
+    void stepDown();
+    
+protected:
+    void mousePressEvent( TQMouseEvent *e );
+    void resizeEvent( TQResizeEvent* ev );
+    void mouseReleaseEvent( TQMouseEvent *e );
+    void mouseMoveEvent( TQMouseEvent *e );
+#ifndef QT_NO_WHEELEVENT
+    void wheelEvent( TQWheelEvent * );
+#endif
+    void styleChange( TQStyle& );
+    void paintEvent( TQPaintEvent * );
+    void enableChanged( bool old );
+    void windowActivationChange( bool );
+
+private slots:
+    void timerDone();
+    void timerDoneEx();
+
+private:
+    TQSpinWidgetPrivate * d;
+
+    void updateDisplay();
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQSpinWidget( const TQSpinWidget& );
+    TQSpinWidget& operator=( const TQSpinWidget& );
+#endif
+};
+
+#endif // QT_NO_SPINWIDGET
+
+#endif // TQRANGECONTROL_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qrangecontrol-members.html b/doc/html/qrangecontrol-members.html new file mode 100644 index 00000000..7cb741a3 --- /dev/null +++ b/doc/html/qrangecontrol-members.html @@ -0,0 +1,70 @@ + + + + + +TQRangeControl Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQRangeControl

+ +

This is the complete list of member functions for +TQRangeControl, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qrangecontrol.html b/doc/html/qrangecontrol.html new file mode 100644 index 00000000..6b628b1d --- /dev/null +++ b/doc/html/qrangecontrol.html @@ -0,0 +1,336 @@ + + + + + +TQRangeControl Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQRangeControl Class Reference

+ +

The TQRangeControl class provides an integer value within a range. +More... +

#include <qrangecontrol.h> +

Inherited by TQDial, TQScrollBar, TQSlider, and TQSpinBox. +

List of all member functions. +

Public Members

+ +

Protected Members

+ +

Detailed Description

+ + +The TQRangeControl class provides an integer value within a range. +

+

Although originally designed for the TQScrollBar widget, the +TQRangeControl can also be used in conjunction with other widgets +such as TQSlider and TQSpinBox. Here are the five main concepts in +the class: +

    +

  1. Current value The bounded integer that +TQRangeControl maintains. value() returns it, and several +functions, including setValue(), set it. +

  2. Minimum The lowest value that value() can ever +return. Returned by minValue() and set by setRange() or one of the +constructors. +

  3. Maximum The highest value that value() can ever +return. Returned by maxValue() and set by setRange() or one of the +constructors. +

  4. Line step The smaller of two natural steps that +TQRangeControl provides and typically corresponds to the user +pressing an arrow key. The line step is returned by lineStep() +and set using setSteps(). The functions addLine() and +subtractLine() respectively increment and decrement the current +value by lineStep(). +

  5. Page step The larger of two natural steps that +TQRangeControl provides and typically corresponds to the user +pressing PageUp or PageDown. The page step is returned by +pageStep() and set using setSteps(). The functions addPage() and +substractPage() respectively increment and decrement the current +value by pageStep(). +

+

Unity (1) may be viewed as a third step size. setValue() lets you +set the current value to any integer in the allowed range, not +just minValue() + n * lineStep() for integer values of n. +Some widgets may allow the user to set any value at all; others +may just provide multiples of lineStep() or pageStep(). +

TQRangeControl provides three virtual functions that are well +suited for updating the on-screen representation of range controls +and emitting signals: valueChange(), rangeChange() and +stepChange(). +

TQRangeControl also provides a function called bound() which lets +you force arbitrary integers to be within the allowed range of the +range control. +

We recommend that all widgets that inherit TQRangeControl provide +at least a signal called valueChanged(); many widgets will want to +provide addStep(), addPage(), substractStep() and substractPage() +as slots. +

Note that you must use multiple inheritance if you plan to +implement a widget using TQRangeControl because TQRangeControl is +not derived from TQWidget. +

See also Miscellaneous Classes. + +


Member Function Documentation

+

TQRangeControl::TQRangeControl () +

+Constructs a range control with a minimum value of 0, maximum +value of 99, line step of 1, page step of 10 and initial value 0. + +

TQRangeControl::TQRangeControl ( int minValue, int maxValue, int lineStep, int pageStep, int value ) +

+Constructs a range control whose value can never be smaller than +minValue or greater than maxValue, whose line step size is +lineStep and page step size is pageStep and whose value is +initially value (which is guaranteed to be in range using +bound()). + +

TQRangeControl::~TQRangeControl () [virtual] +

+Destroys the range control + +

void TQRangeControl::addLine () +

+Equivalent to setValue( value() + lineStep() ). +

If the value is changed, then valueChange() is called. +

See also subtractLine(), addPage(), and setValue(). + +

void TQRangeControl::addPage () +

+Equivalent to setValue( value() + pageStep() ). +

If the value is changed, then valueChange() is called. +

See also subtractPage(), addLine(), and setValue(). + +

int TQRangeControl::bound ( int v ) const +

+Forces the value v to be within the range from minValue() to +maxValue() inclusive, and returns the result. +

This function is provided so that you can easily force other +numbers than value() into the allowed range. You do not need to +call it in order to use TQRangeControl itself. +

See also setValue(), value(), minValue(), and maxValue(). + +

void TQRangeControl::directSetValue ( int value ) [protected] +

+Sets the range control value directly without calling +valueChange(). +

Forces the new value to be within the legal range. +

You will rarely have to call this function. However, if you want +to change the range control's value inside the overloaded method +valueChange(), setValue() would call the function valueChange() +again. To avoid this recursion you must use directSetValue() +instead. +

See also setValue(). + +

int TQRangeControl::lineStep () const +

+ +

Returns the line step. +

See also setSteps() and pageStep(). + +

int TQRangeControl::maxValue () const +

+ +

Returns the maximum value of the range. +

See also setMaxValue(), setRange(), and minValue(). + +

int TQRangeControl::minValue () const +

+ +

Returns the minimum value of the range. +

See also setMinValue(), setRange(), and maxValue(). + +

int TQRangeControl::pageStep () const +

+ +

Returns the page step. +

See also setSteps() and lineStep(). + +

int TQRangeControl::positionFromValue ( int logical_val, int span ) const [protected] +

+Converts logical_val to a pixel position. minValue() maps to 0, +maxValue() maps to span and other values are distributed evenly +in-between. +

This function can handle the entire integer range without +overflow, providing span is <= 4096. +

Calling this method is useful when actually drawing a range +control such as a TQScrollBar on-screen. +

See also valueFromPosition(). + +

int TQRangeControl::prevValue () const [protected] +

+ +

Returns the previous value of the range control. "Previous value" +means the value before the last change occurred. Setting a new +range may affect the value, too, because the value is forced to be +inside the specified range. When the range control is initially +created, this is the same as value(). +

prevValue() can be outside the current legal range if a call to +setRange() causes the current value to change. For example, if the +range was [0, 1000] and the current value is 500, setRange(0, 400) +makes value() return 400 and prevValue() return 500. +

See also value() and setRange(). + +

void TQRangeControl::rangeChange () [virtual protected] +

+This virtual function is called whenever the range control's range +changes. You can reimplement it if you want to be notified when +the range changes. The default implementation does nothing. +

Note that this method is called after the range has changed. +

See also setRange(), valueChange(), and stepChange(). + +

Reimplemented in TQDial, TQSlider, and TQSpinBox. +

void TQRangeControl::setMaxValue ( int maxVal ) +

+Sets the minimum value of the range to maxVal. +

If necessary, the minValue() is adjusted so that the range remains +valid. +

See also maxValue() and setMinValue(). + +

void TQRangeControl::setMinValue ( int minVal ) +

+Sets the minimum value of the range to minVal. +

If necessary, the maxValue() is adjusted so that the range remains +valid. +

See also minValue() and setMaxValue(). + +

void TQRangeControl::setRange ( int minValue, int maxValue ) +

+Sets the range control's minimum value to minValue and its +maximum value to maxValue. +

Calls the virtual rangeChange() function if one or both of the new +minimum and maximum values are different from the previous +setting. Calls the virtual valueChange() function if the current +value is adjusted because it was outside the new range. +

If maxValue is smaller than minValue, minValue becomes +the only legal value. +

See also minValue() and maxValue(). + +

Examples: listbox/listbox.cpp, t12/lcdrange.cpp, t5/main.cpp, t6/main.cpp, t8/lcdrange.cpp, and xform/xform.cpp. +

void TQRangeControl::setSteps ( int lineStep, int pageStep ) +

+Sets the range's line step to lineStep and page step to pageStep. +

Calls the virtual stepChange() function if the new line step +or page step are different from the previous settings. +

See also lineStep(), pageStep(), and setRange(). + +

void TQRangeControl::setValue ( int value ) +

+Sets the range control's value to value and forces it to be +within the legal range. +

Calls the virtual valueChange() function if the new value is +different from the previous value. The old value can still be +retrieved using prevValue(). +

See also value(). + +

void TQRangeControl::stepChange () [virtual protected] +

+This virtual function is called whenever the range control's +line or page step settings change. You can reimplement it if you +want to be notified when the step changes. The default +implementation does nothing. +

Note that this method is called after a step setting has changed. +

See also setSteps(), rangeChange(), and valueChange(). + +

void TQRangeControl::subtractLine () +

+Equivalent to setValue( value() - lineStep() ). +

If the value is changed, then valueChange() is called. +

See also addLine(), subtractPage(), and setValue(). + +

void TQRangeControl::subtractPage () +

+Equivalent to setValue( value() - pageStep() ). +

If the value is changed, then valueChange() is called. +

See also addPage(), subtractLine(), and setValue(). + +

int TQRangeControl::value () const +

+ +

Returns the current range control value. This is guaranteed to be +within the range [minValue(), maxValue()]. +

See also setValue() and prevValue(). + +

void TQRangeControl::valueChange () [virtual protected] +

+This virtual function is called whenever the range control value +changes. You can reimplement it if you want to be notified when +the value changes. The default implementation does nothing. +

Note that this method is called after the value has changed. The +previous value can be retrieved using prevValue(). +

See also setValue(), addPage(), subtractPage(), addLine(), subtractLine(), rangeChange(), and stepChange(). + +

Reimplemented in TQDial, TQSlider, and TQSpinBox. +

int TQRangeControl::valueFromPosition ( int pos, int span ) const [protected] +

+Converts the pixel position pos to a value. 0 maps to +minValue(), span maps to maxValue() and other values are +distributed evenly in-between. +

This function can handle the entire integer range without +overflow. +

Calling this method is useful if you actually implemented a range +control widget such as TQScrollBar and want to handle mouse press +events. This function then maps screen coordinates to the logical +values. +

See also positionFromValue(). + + +


+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/qrect-h.html b/doc/html/qrect-h.html new file mode 100644 index 00000000..84451d47 --- /dev/null +++ b/doc/html/qrect-h.html @@ -0,0 +1,321 @@ + + + + + +qrect.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qrect.h

+ +

This is the verbatim text of the qrect.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qrect.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQRect class
+**
+** Created : 931028
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQRECT_H
+#define TQRECT_H
+
+#ifndef QT_H
+#include "qsize.h"
+#endif // QT_H
+
+#if defined(topLeft)
+#error "Macro definition of topLeft conflicts with TQRect"
+// don't just silently undo people's defines: #undef topLeft
+#endif
+
+class Q_EXPORT TQRect					// rectangle class
+{
+public:
+    TQRect()	{ x1 = y1 = 0; x2 = y2 = -1; }
+    TQRect( const TQPoint &topleft, const TQPoint &bottomright );
+    TQRect( const TQPoint &topleft, const TQSize &size );
+    TQRect( int left, int top, int width, int height );
+
+    bool   isNull()	const;
+    bool   isEmpty()	const;
+    bool   isValid()	const;
+    TQRect  normalize()	const;
+
+    int	   left()	const;
+    int	   top()	const;
+    int	   right()	const;
+    int	   bottom()	const;
+
+    TQCOORD &rLeft();
+    TQCOORD &rTop();
+    TQCOORD &rRight();
+    TQCOORD &rBottom();
+
+    int	   x()		const;
+    int	   y()		const;
+    void   setLeft( int pos );
+    void   setTop( int pos );
+    void   setRight( int pos );
+    void   setBottom( int pos );
+    void   setX( int x );
+    void   setY( int y );
+
+    void   setTopLeft( const TQPoint &p );
+    void   setBottomRight( const TQPoint &p );
+    void   setTopRight( const TQPoint &p );
+    void   setBottomLeft( const TQPoint &p );
+
+    TQPoint topLeft()	 const;
+    TQPoint bottomRight() const;
+    TQPoint topRight()	 const;
+    TQPoint bottomLeft()	 const;
+    TQPoint center()	 const;
+
+    void   rect( int *x, int *y, int *w, int *h ) const;
+    void   coords( int *x1, int *y1, int *x2, int *y2 ) const;
+
+    void   moveLeft( int pos );
+    void   moveTop( int pos );
+    void   moveRight( int pos );
+    void   moveBottom( int pos );
+    void   moveTopLeft( const TQPoint &p );
+    void   moveBottomRight( const TQPoint &p );
+    void   moveTopRight( const TQPoint &p );
+    void   moveBottomLeft( const TQPoint &p );
+    void   moveCenter( const TQPoint &p );
+    void   moveBy( int dx, int dy );
+
+    void   setRect( int x, int y, int w, int h );
+    void   setCoords( int x1, int y1, int x2, int y2 );
+    void   addCoords( int x1, int y1, int x2, int y2 );
+
+    TQSize  size()	const;
+    int	   width()	const;
+    int	   height()	const;
+    void   setWidth( int w );
+    void   setHeight( int h );
+    void   setSize( const TQSize &s );
+
+    TQRect  operator|(const TQRect &r) const;
+    TQRect  operator&(const TQRect &r) const;
+    TQRect&  operator|=(const TQRect &r);
+    TQRect&  operator&=(const TQRect &r);
+
+    bool   contains( const TQPoint &p, bool proper=FALSE ) const;
+    bool   contains( int x, int y ) const; // inline methods, _don't_ merge these
+    bool   contains( int x, int y, bool proper ) const;
+    bool   contains( const TQRect &r, bool proper=FALSE ) const;
+    TQRect  unite( const TQRect &r ) const;
+    TQRect  intersect( const TQRect &r ) const;
+    bool   intersects( const TQRect &r ) const;
+
+    friend Q_EXPORT bool operator==( const TQRect &, const TQRect & );
+    friend Q_EXPORT bool operator!=( const TQRect &, const TQRect & );
+
+private:
+#if defined(Q_WS_X11) || defined(Q_OS_TEMP)
+    friend void qt_setCoords( TQRect *r, int xp1, int yp1, int xp2, int yp2 );
+#endif
+#if defined(Q_OS_MAC)
+    TQCOORD y1;
+    TQCOORD x1;
+    TQCOORD y2;
+    TQCOORD x2;
+#else
+    TQCOORD x1;
+    TQCOORD y1;
+    TQCOORD x2;
+    TQCOORD y2;
+#endif
+};
+
+Q_EXPORT bool operator==( const TQRect &, const TQRect & );
+Q_EXPORT bool operator!=( const TQRect &, const TQRect & );
+
+
+/*****************************************************************************
+  TQRect stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQRect & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQRect & );
+#endif
+
+/*****************************************************************************
+  TQRect inline member functions
+ *****************************************************************************/
+
+inline TQRect::TQRect( int left, int top, int width, int height )
+{
+    x1 = (TQCOORD)left;
+    y1 = (TQCOORD)top;
+    x2 = (TQCOORD)(left+width-1);
+    y2 = (TQCOORD)(top+height-1);
+}
+
+inline bool TQRect::isNull() const
+{ return x2 == x1-1 && y2 == y1-1; }
+
+inline bool TQRect::isEmpty() const
+{ return x1 > x2 || y1 > y2; }
+
+inline bool TQRect::isValid() const
+{ return x1 <= x2 && y1 <= y2; }
+
+inline int TQRect::left() const
+{ return x1; }
+
+inline int TQRect::top() const
+{ return y1; }
+
+inline int TQRect::right() const
+{ return x2; }
+
+inline int TQRect::bottom() const
+{ return y2; }
+
+inline TQCOORD &TQRect::rLeft()
+{ return x1; }
+
+inline TQCOORD & TQRect::rTop()
+{ return y1; }
+
+inline TQCOORD & TQRect::rRight()
+{ return x2; }
+
+inline TQCOORD & TQRect::rBottom()
+{ return y2; }
+
+inline int TQRect::x() const
+{ return x1; }
+
+inline int TQRect::y() const
+{ return y1; }
+
+inline void TQRect::setLeft( int pos )
+{ x1 = (TQCOORD)pos; }
+
+inline void TQRect::setTop( int pos )
+{ y1 = (TQCOORD)pos; }
+
+inline void TQRect::setRight( int pos )
+{ x2 = (TQCOORD)pos; }
+
+inline void TQRect::setBottom( int pos )
+{ y2 = (TQCOORD)pos; }
+
+inline void TQRect::setX( int x )
+{ x1 = (TQCOORD)x; }
+
+inline void TQRect::setY( int y )
+{ y1 = (TQCOORD)y; }
+
+inline TQPoint TQRect::topLeft() const
+{ return TQPoint(x1, y1); }
+
+inline TQPoint TQRect::bottomRight() const
+{ return TQPoint(x2, y2); }
+
+inline TQPoint TQRect::topRight() const
+{ return TQPoint(x2, y1); }
+
+inline TQPoint TQRect::bottomLeft() const
+{ return TQPoint(x1, y2); }
+
+inline TQPoint TQRect::center() const
+{ return TQPoint((x1+x2)/2, (y1+y2)/2); }
+
+inline int TQRect::width() const
+{ return  x2 - x1 + 1; }
+
+inline int TQRect::height() const
+{ return  y2 - y1 + 1; }
+
+inline TQSize TQRect::size() const
+{ return TQSize(x2-x1+1, y2-y1+1); }
+
+inline bool TQRect::contains( int x, int y, bool proper ) const
+{
+    if ( proper )
+        return x > x1 && x < x2 &&
+               y > y1 && y < y2;
+    else
+        return x >= x1 && x <= x2 &&
+               y >= y1 && y <= y2;
+}
+
+inline bool TQRect::contains( int x, int y ) const
+{
+    return x >= x1 && x <= x2 &&
+	   y >= y1 && y <= y2;
+}
+#define Q_DEFINED_QRECT
+#include "qwinexport.h"
+#endif // TQRECT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qrect-members.html b/doc/html/qrect-members.html new file mode 100644 index 00000000..0694887a --- /dev/null +++ b/doc/html/qrect-members.html @@ -0,0 +1,105 @@ + + + + + +TQRect Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQRect

+ +

This is the complete list of member functions for +TQRect, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qrect.html b/doc/html/qrect.html new file mode 100644 index 00000000..22288df9 --- /dev/null +++ b/doc/html/qrect.html @@ -0,0 +1,645 @@ + + + + + +TQRect Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQRect Class Reference

+ +

The TQRect class defines a rectangle in the plane. +More... +

#include <qrect.h> +

List of all member functions. +

Public Members

+ +

Related Functions

+
    +
  • bool operator== ( const TQRect & r1, const TQRect & r2 )
  • +
  • bool operator!= ( const TQRect & r1, const TQRect & r2 )
  • +
  • TQDataStream & operator<< ( TQDataStream & s, const TQRect & r )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQRect & r )
  • +
+

Detailed Description

+ + +The TQRect class defines a rectangle in the plane. +

+ + +

A rectangle is internally represented as an upper-left corner and +a bottom-right corner, but it is normally expressed as an +upper-left corner and a size. +

The coordinate type is TQCOORD (defined in qwindowdefs.h as int). The minimum value of TQCOORD is TQCOORD_MIN (-2147483648) and +the maximum value is TQCOORD_MAX (2147483647). +

Note that the size (width and height) of a rectangle might be +different from what you are used to. If the top-left corner and +the bottom-right corner are the same, the height and the width of +the rectangle will both be 1. +

Generally, width = right - left + 1 and height = bottom - top + 1. We designed it this way to make it correspond to +rectangular spaces used by drawing functions in which the width +and height denote a number of pixels. For example, drawing a +rectangle with width and height 1 draws a single pixel. +

The default coordinate system has origin (0, 0) in the top-left +corner. The positive direction of the y axis is down, and the +positive x axis is from left to right. +

A TQRect can be constructed with a set of left, top, width and +height integers, from two TQPoints or from a TQPoint and a TQSize. +After creation the dimensions can be changed, e.g. with setLeft(), +setRight(), setTop() and setBottom(), or by setting sizes, e.g. +setWidth(), setHeight() and setSize(). The dimensions can also be +changed with the move functions, e.g. moveBy(), moveCenter(), +moveBottomRight(), etc. You can also add coordinates to a +rectangle with addCoords(). +

You can test to see if a TQRect contains a specific point with +contains(). You can also test to see if two TQRects intersect with +intersects() (see also intersect()). To get the bounding rectangle +of two TQRects use unite(). +

See also TQPoint, TQSize, Graphics Classes, and Image Processing Classes. + +


Member Function Documentation

+

TQRect::TQRect () +

+ +

Constructs an invalid rectangle. + +

TQRect::TQRect ( const TQPoint & topLeft, const TQPoint & bottomRight ) +

+Constructs a rectangle with topLeft as the top-left corner and +bottomRight as the bottom-right corner. + +

TQRect::TQRect ( const TQPoint & topLeft, const TQSize & size ) +

+Constructs a rectangle with topLeft as the top-left corner and +size as the rectangle size. + +

TQRect::TQRect ( int left, int top, int width, int height ) +

+ +

Constructs a rectangle with the top, left corner and width and height. +

Example (creates three identical rectangles): +

+        TQRect r1( TQPoint(100,200), TQPoint(110,215) );
+        TQRect r2( TQPoint(100,200), TQSize(11,16) );
+        TQRect r3( 100, 200, 11, 16 );
+    
+ + +

void TQRect::addCoords ( int xp1, int yp1, int xp2, int yp2 ) +

+Adds xp1, yp1, xp2 and yp2 respectively to the +existing coordinates of the rectangle. + +

Examples: multiple/ax1.h and multiple/ax2.h. +

int TQRect::bottom () const +

+ +

Returns the bottom coordinate of the rectangle. +

See also setBottom(), top(), bottomLeft(), and bottomRight(). + +

Examples: action/application.cpp, application/application.cpp, desktop/desktop.cpp, helpviewer/helpwindow.cpp, qfd/fontdisplayer.cpp, scribble/scribble.cpp, and themes/wood.cpp. +

TQPoint TQRect::bottomLeft () const +

+ +

Returns the bottom-left position of the rectangle. +

See also setBottomLeft(), moveBottomLeft(), topRight(), bottom(), and left(). + +

Example: tictac/tictac.cpp. +

TQPoint TQRect::bottomRight () const +

+ +

Returns the bottom-right position of the rectangle. +

See also setBottomRight(), moveBottomRight(), topLeft(), right(), and bottom(). + +

Example: tictac/tictac.cpp. +

TQPoint TQRect::center () const +

+ +

Returns the center point of the rectangle. +

See also moveCenter(), topLeft(), bottomRight(), topRight(), and bottomLeft(). + +

Example: tooltip/tooltip.cpp. +

bool TQRect::contains ( const TQPoint & p, bool proper = FALSE ) const +

+Returns TRUE if the point p is inside or on the edge of the +rectangle; otherwise returns FALSE. +

If proper is TRUE, this function returns TRUE only if p is +inside (not on the edge). + +

Example: t14/cannon.cpp. +

bool TQRect::contains ( int x, int y ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if the point x, y is inside this rectangle; +otherwise returns FALSE. + +

bool TQRect::contains ( int x, int y, bool proper ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if the point x, y is inside this rectangle; +otherwise returns FALSE. +

If proper is TRUE, this function returns TRUE only if the point +is entirely inside (not on the edge). + +

bool TQRect::contains ( const TQRect & r, bool proper = FALSE ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if the rectangle r is inside this rectangle; +otherwise returns FALSE. +

If proper is TRUE, this function returns TRUE only if r is +entirely inside (not on the edge). +

See also unite(), intersect(), and intersects(). + +

void TQRect::coords ( int * xp1, int * yp1, int * xp2, int * yp2 ) const +

+Extracts the rectangle parameters as the top-left point *xp1, +*yp1 and the bottom-right point *xp2, *yp2. +

See also setCoords() and rect(). + +

Examples: themes/metal.cpp and themes/wood.cpp. +

int TQRect::height () const +

+ +

Returns the height of the rectangle. The height includes both the +top and bottom edges, i.e. height = bottom - top + 1. +

See also width(), size(), and setHeight(). + +

Examples: aclock/aclock.cpp, desktop/desktop.cpp, movies/main.cpp, scribble/scribble.cpp, themes/metal.cpp, themes/wood.cpp, and xform/xform.cpp. +

TQRect TQRect::intersect ( const TQRect & r ) const +

+Returns the intersection of this rectangle and rectangle r. +r.intersect(s) is equivalent to r&s. + +

bool TQRect::intersects ( const TQRect & r ) const +

+Returns TRUE if this rectangle intersects with rectangle r +(there is at least one pixel that is within both rectangles); +otherwise returns FALSE. +

See also intersect() and contains(). + +

Examples: t11/cannon.cpp, t12/cannon.cpp, t13/cannon.cpp, and t14/cannon.cpp. +

bool TQRect::isEmpty () const +

+ +

Returns TRUE if the rectangle is empty; otherwise returns FALSE. +

An empty rectangle has a left() > right() or top() > bottom(). +

An empty rectangle is not valid. isEmpty() == !isValid() +

See also isNull(), isValid(), and normalize(). + +

bool TQRect::isNull () const +

+ +

Returns TRUE if the rectangle is a null rectangle; otherwise +returns FALSE. +

A null rectangle has both the width and the height set to 0, that +is right() == left() - 1 and bottom() == top() - 1. +

Note that if right() == left() and bottom() == top(), then the +rectangle has width 1 and height 1. +

A null rectangle is also empty. +

A null rectangle is not valid. +

See also isEmpty() and isValid(). + +

bool TQRect::isValid () const +

+ +

Returns TRUE if the rectangle is valid; otherwise returns FALSE. +

A valid rectangle has a left() <= right() and top() <= bottom(). +

Note that non-trivial operations like intersections are not defined +for invalid rectangles. +

isValid() == !isEmpty() +

See also isNull(), isEmpty(), and normalize(). + +

Examples: themes/metal.cpp and tooltip/tooltip.cpp. +

int TQRect::left () const +

+ +

Returns the left coordinate of the rectangle. Identical to x(). +

See also setLeft(), right(), topLeft(), and bottomLeft(). + +

Examples: aclock/aclock.cpp, desktop/desktop.cpp, i18n/main.cpp, scribble/scribble.cpp, tictac/tictac.cpp, and xform/xform.cpp. +

void TQRect::moveBottom ( int pos ) +

+Sets the bottom position of the rectangle to pos, leaving the +size unchanged. +

See also bottom(), setBottom(), moveLeft(), moveTop(), and moveRight(). + +

void TQRect::moveBottomLeft ( const TQPoint & p ) +

+Sets the bottom-left position of the rectangle to p, leaving +the size unchanged. +

See also bottomLeft(), setBottomLeft(), moveTopLeft(), moveBottomRight(), and moveTopRight(). + +

Example: t10/cannon.cpp. +

void TQRect::moveBottomRight ( const TQPoint & p ) +

+Sets the bottom-right position of the rectangle to p, leaving +the size unchanged. +

See also bottomRight(), setBottomRight(), moveTopLeft(), moveTopRight(), and moveBottomLeft(). + +

void TQRect::moveBy ( int dx, int dy ) +

+Moves the rectangle dx along the x axis and dy along the y +axis, relative to the current position. Positive values move the +rectangle to the right and down. +

See also moveTopLeft(). + +

Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, mdi/application.cpp, themes/wood.cpp, and xform/xform.cpp. +

void TQRect::moveCenter ( const TQPoint & p ) +

+Sets the center point of the rectangle to p, leaving the size +unchanged. +

See also center(), moveTopLeft(), moveBottomRight(), moveTopRight(), and moveBottomLeft(). + +

Examples: t11/cannon.cpp and t12/cannon.cpp. +

void TQRect::moveLeft ( int pos ) +

+Sets the left position of the rectangle to pos, leaving the +size unchanged. +

See also left(), setLeft(), moveTop(), moveRight(), and moveBottom(). + +

void TQRect::moveRight ( int pos ) +

+Sets the right position of the rectangle to pos, leaving the +size unchanged. +

See also right(), setRight(), moveLeft(), moveTop(), and moveBottom(). + +

void TQRect::moveTop ( int pos ) +

+Sets the top position of the rectangle to pos, leaving the +size unchanged. +

See also top(), setTop(), moveLeft(), moveRight(), and moveBottom(). + +

void TQRect::moveTopLeft ( const TQPoint & p ) +

+Sets the top-left position of the rectangle to p, leaving the +size unchanged. +

See also topLeft(), setTopLeft(), moveBottomRight(), moveTopRight(), and moveBottomLeft(). + +

Examples: helpsystem/tooltip.cpp and xform/xform.cpp. +

void TQRect::moveTopRight ( const TQPoint & p ) +

+Sets the top-right position of the rectangle to p, leaving the +size unchanged. +

See also topRight(), setTopRight(), moveTopLeft(), moveBottomRight(), and moveBottomLeft(). + +

TQRect TQRect::normalize () const +

+Returns a normalized rectangle, i.e. a rectangle that has a +non-negative width and height. +

It swaps left and right if left() > right(), and swaps top and +bottom if top() > bottom(). +

See also isValid(). + +

Example: scribble/scribble.cpp. +

TQRect TQRect::operator& ( const TQRect & r ) const +

+Returns the intersection of this rectangle and rectangle r. +

Returns an empty rectangle if there is no intersection. +

See also operator&=(), operator|(), isEmpty(), intersects(), and contains(). + +

TQRect & TQRect::operator&= ( const TQRect & r ) +

+Intersects this rectangle with rectangle r. + +

TQRect TQRect::operator| ( const TQRect & r ) const +

+Returns the bounding rectangle of this rectangle and rectangle r. +

The bounding rectangle of a nonempty rectangle and an empty or +invalid rectangle is defined to be the nonempty rectangle. +

See also operator|=(), operator&(), intersects(), and contains(). + +

TQRect & TQRect::operator|= ( const TQRect & r ) +

+Unites this rectangle with rectangle r. + +

TQCOORD & TQRect::rBottom () +

+ +

Returns a reference to the bottom coordinate of the rectangle. +

See also rLeft(), rTop(), and rRight(). + +

TQCOORD & TQRect::rLeft () +

+ +

Returns a reference to the left coordinate of the rectangle. +

See also rTop(), rRight(), and rBottom(). + +

TQCOORD & TQRect::rRight () +

+ +

Returns a reference to the right coordinate of the rectangle. +

See also rLeft(), rTop(), and rBottom(). + +

TQCOORD & TQRect::rTop () +

+ +

Returns a reference to the top coordinate of the rectangle. +

See also rLeft(), rRight(), and rBottom(). + +

void TQRect::rect ( int * x, int * y, int * w, int * h ) const +

+Extracts the rectangle parameters as the position *x, *y and +width *w and height *h. +

See also setRect() and coords(). + +

Examples: themes/metal.cpp and themes/wood.cpp. +

int TQRect::right () const +

+ +

Returns the right coordinate of the rectangle. +

See also setRight(), left(), topRight(), and bottomRight(). + +

Examples: action/application.cpp, application/application.cpp, customlayout/flow.cpp, desktop/desktop.cpp, scribble/scribble.cpp, t11/cannon.cpp, and themes/wood.cpp. +

void TQRect::setBottom ( int pos ) +

+ +

Sets the bottom edge of the rectangle to pos. May change the +height, but will never change the top edge of the rectangle. +

See also bottom(), setTop(), and setHeight(). + +

Example: scribble/scribble.cpp. +

void TQRect::setBottomLeft ( const TQPoint & p ) +

+Set the bottom-left corner of the rectangle to p. May change +the size, but will the never change the top-right corner of +the rectangle. +

See also bottomLeft(), moveBottomLeft(), setTopLeft(), setBottomRight(), and setTopRight(). + +

void TQRect::setBottomRight ( const TQPoint & p ) +

+Set the bottom-right corner of the rectangle to p. May change +the size, but will the never change the top-left corner of +the rectangle. +

See also bottomRight(), moveBottomRight(), setTopLeft(), setTopRight(), and setBottomLeft(). + +

void TQRect::setCoords ( int xp1, int yp1, int xp2, int yp2 ) +

+Sets the coordinates of the rectangle's top-left corner to (xp1, yp1), and the coordinates of its bottom-right corner to (xp2, yp2). +

See also coords() and setRect(). + +

void TQRect::setHeight ( int h ) +

+Sets the height of the rectangle to h. The top edge is not +moved, but the bottom edge may be moved. +

See also height(), setTop(), setBottom(), and setSize(). + +

Example: desktop/desktop.cpp. +

void TQRect::setLeft ( int pos ) +

+ +

Sets the left edge of the rectangle to pos. May change the +width, but will never change the right edge of the rectangle. +

Identical to setX(). +

See also left(), setTop(), and setWidth(). + +

Example: scribble/scribble.cpp. +

void TQRect::setRect ( int x, int y, int w, int h ) +

+Sets the coordinates of the rectangle's top-left corner to (x, y), and its size to (w, h). +

See also rect() and setCoords(). + +

Example: themes/wood.cpp. +

void TQRect::setRight ( int pos ) +

+ +

Sets the right edge of the rectangle to pos. May change the +width, but will never change the left edge of the rectangle. +

See also right(), setLeft(), and setWidth(). + +

Example: scribble/scribble.cpp. +

void TQRect::setSize ( const TQSize & s ) +

+Sets the size of the rectangle to s. The top-left corner is not +moved. +

See also size(), setWidth(), and setHeight(). + +

Example: xform/xform.cpp. +

void TQRect::setTop ( int pos ) +

+ +

Sets the top edge of the rectangle to pos. May change the +height, but will never change the bottom edge of the rectangle. +

Identical to setY(). +

See also top(), setBottom(), and setHeight(). + +

Example: scribble/scribble.cpp. +

void TQRect::setTopLeft ( const TQPoint & p ) +

+Set the top-left corner of the rectangle to p. May change +the size, but will the never change the bottom-right corner of +the rectangle. +

See also topLeft(), moveTopLeft(), setBottomRight(), setTopRight(), and setBottomLeft(). + +

void TQRect::setTopRight ( const TQPoint & p ) +

+Set the top-right corner of the rectangle to p. May change +the size, but will the never change the bottom-left corner of +the rectangle. +

See also topRight(), moveTopRight(), setTopLeft(), setBottomRight(), and setBottomLeft(). + +

void TQRect::setWidth ( int w ) +

+Sets the width of the rectangle to w. The right edge is +changed, but not the left edge. +

See also width(), setLeft(), setRight(), and setSize(). + +

Example: desktop/desktop.cpp. +

void TQRect::setX ( int x ) +

+ +

Sets the x position of the rectangle (its left end) to x. May +change the width, but will never change the right edge of the +rectangle. +

Identical to setLeft(). +

See also x() and setY(). + +

void TQRect::setY ( int y ) +

+ +

Sets the y position of the rectangle (its top) to y. May change +the height, but will never change the bottom edge of the +rectangle. +

Identical to setTop(). +

See also y() and setX(). + +

TQSize TQRect::size () const +

+ +

Returns the size of the rectangle. +

See also width() and height(). + +

Examples: desktop/desktop.cpp, movies/main.cpp, and t10/cannon.cpp. +

int TQRect::top () const +

+ +

Returns the top coordinate of the rectangle. Identical to y(). +

See also setTop(), bottom(), topLeft(), and topRight(). + +

Examples: aclock/aclock.cpp, desktop/desktop.cpp, scribble/scribble.cpp, themes/wood.cpp, tictac/tictac.cpp, and xform/xform.cpp. +

TQPoint TQRect::topLeft () const +

+ +

Returns the top-left position of the rectangle. +

See also setTopLeft(), moveTopLeft(), bottomRight(), left(), and top(). + +

Examples: helpsystem/tooltip.cpp, t10/cannon.cpp, and tictac/tictac.cpp. +

TQPoint TQRect::topRight () const +

+ +

Returns the top-right position of the rectangle. +

See also setTopRight(), moveTopRight(), bottomLeft(), top(), and right(). + +

Example: tictac/tictac.cpp. +

TQRect TQRect::unite ( const TQRect & r ) const +

+Returns the bounding rectangle of this rectangle and rectangle r. r.unite(s) is equivalent to r|s. + +

Examples: t11/cannon.cpp, t12/cannon.cpp, and xform/xform.cpp. +

int TQRect::width () const +

+ +

Returns the width of the rectangle. The width includes both the +left and right edges, i.e. width = right - left + 1. +

See also height(), size(), and setHeight(). + +

Examples: aclock/aclock.cpp, customlayout/border.cpp, desktop/desktop.cpp, movies/main.cpp, themes/metal.cpp, themes/wood.cpp, and xform/xform.cpp. +

int TQRect::x () const +

+ +

Returns the left coordinate of the rectangle. Identical to left(). +

See also left(), y(), and setX(). + +

Examples: customlayout/border.cpp, desktop/desktop.cpp, movies/main.cpp, scribble/scribble.cpp, t12/cannon.cpp, themes/metal.cpp, and themes/wood.cpp. +

int TQRect::y () const +

+ +

Returns the top coordinate of the rectangle. Identical to top(). +

See also top(), x(), and setY(). + +

Examples: desktop/desktop.cpp, movies/main.cpp, scribble/scribble.cpp, t12/cannon.cpp, t14/cannon.cpp, themes/metal.cpp, and themes/wood.cpp. +


Related Functions

+

bool operator!= ( const TQRect & r1, const TQRect & r2 ) +

+ +

Returns TRUE if r1 and r2 are different; otherwise returns FALSE. + +

TQDataStream & operator<< ( TQDataStream & s, const TQRect & r ) +

+ +

Writes the TQRect, r, to the stream s, and returns a +reference to the stream. +

See also Format of the TQDataStream operators. + +

bool operator== ( const TQRect & r1, const TQRect & r2 ) +

+ +

Returns TRUE if r1 and r2 are equal; otherwise returns FALSE. + +

TQDataStream & operator>> ( TQDataStream & s, TQRect & r ) +

+ +

Reads a TQRect from the stream s into rect r and returns a +reference to the stream. +

See also Format of the TQDataStream operators. + + +


+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/qregexp-h.html b/doc/html/qregexp-h.html new file mode 100644 index 00000000..b7a26f0f --- /dev/null +++ b/doc/html/qregexp-h.html @@ -0,0 +1,165 @@ + + + + + +qregexp.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qregexp.h

+ +

This is the verbatim text of the qregexp.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qregexp.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQRegExp class
+**
+** Created : 950126
+**
+** 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 retquirements 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 TQREGEXP_H
+#define TQREGEXP_H
+
+#ifndef QT_H
+#include "qstringlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_REGEXP
+class TQRegExpEngine;
+struct TQRegExpPrivate;
+
+class Q_EXPORT TQRegExp
+{
+public:
+    enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch };
+
+    TQRegExp();
+    TQRegExp( const TQString& pattern, bool caseSensitive = TRUE,
+	     bool wildcard = FALSE );
+    TQRegExp( const TQRegExp& rx );
+    ~TQRegExp();
+    TQRegExp& operator=( const TQRegExp& rx );
+
+    bool operator==( const TQRegExp& rx ) const;
+    bool operator!=( const TQRegExp& rx ) const { return !operator==( rx ); }
+
+    bool isEmpty() const;
+    bool isValid() const;
+    TQString pattern() const;
+    void setPattern( const TQString& pattern );
+    bool caseSensitive() const;
+    void setCaseSensitive( bool sensitive );
+#ifndef QT_NO_REGEXP_WILDCARD
+    bool wildcard() const;
+    void setWildcard( bool wildcard );
+#endif
+    bool minimal() const;
+    void setMinimal( bool minimal );
+
+    bool exactMatch( const TQString& str ) const;
+#ifndef QT_NO_COMPAT
+    int match( const TQString& str, int index = 0, int *len = 0,
+	       bool indexIsStart = TRUE ) const;
+#endif
+
+#if defined(Q_QDOC)
+    int search( const TQString& str, int offset = 0,
+		CaretMode caretMode = CaretAtZero ) const;
+    int searchRev( const TQString& str, int offset = -1,
+		   CaretMode caretMode = CaretAtZero ) const;
+#else
+    // ### TQt 4.0: reduce these four to two functions
+    int search( const TQString& str, int offset = 0 ) const;
+    int search( const TQString& str, int offset, CaretMode caretMode ) const;
+    int searchRev( const TQString& str, int offset = -1 ) const;
+    int searchRev( const TQString& str, int offset, CaretMode caretMode ) const;
+#endif
+    int matchedLength() const;
+#ifndef QT_NO_REGEXP_CAPTURE
+    int numCaptures() const;
+    TQStringList capturedTexts();
+    TQString cap( int nth = 0 );
+    int pos( int nth = 0 );
+    TQString errorString();
+#endif
+
+    static TQString escape( const TQString& str );
+
+private:
+    void prepareEngine() const;
+    void prepareEngineForMatch( const TQString& str ) const;
+    void invalidateEngine();
+
+    static int caretIndex( int offset, CaretMode caretMode );
+
+    TQRegExpEngine *eng;
+    TQRegExpPrivate *priv;
+};
+#endif // QT_NO_REGEXP
+#endif // TQREGEXP_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qregexp-members.html b/doc/html/qregexp-members.html new file mode 100644 index 00000000..d1086508 --- /dev/null +++ b/doc/html/qregexp-members.html @@ -0,0 +1,72 @@ + + + + + +TQRegExp Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQRegExp

+ +

This is the complete list of member functions for +TQRegExp, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qregexp.html b/doc/html/qregexp.html new file mode 100644 index 00000000..5c0cb578 --- /dev/null +++ b/doc/html/qregexp.html @@ -0,0 +1,1037 @@ + + + + + +TQRegExp Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQRegExp Class Reference

+ +

The TQRegExp class provides pattern matching using regular expressions. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qregexp.h> +

List of all member functions. +

Public Members

+ +

Static Public Members

+
    +
  • TQString escape ( const TQString & str )
  • +
+

Detailed Description

+ + + +The TQRegExp class provides pattern matching using regular expressions. +

+ + + + +

Regular expressions, or "regexps", provide a way to find patterns +within text. This is useful in many contexts, for example: +

+
Validation +A regexp can be used to check whether a piece of text +meets some criteria, e.g. is an integer or contains no +whitespace. +
Searching +Regexps provide a much more powerful means of searching +text than simple string matching does. For example we can +create a regexp which says "find one of the words 'mail', +'letter' or 'correspondence' but not any of the words +'email', 'mailman' 'mailer', 'letterbox' etc." +
Search and Replace +A regexp can be used to replace a pattern with a piece of +text, for example replace all occurrences of '&' with +'&amp;' except where the '&' is already followed by 'amp;'. +
String Splitting +A regexp can be used to identify where a string should be +split into its component fields, e.g. splitting tab-delimited +strings. +
+

We present a very brief introduction to regexps, a description of +TQt's regexp language, some code examples, and finally the function +documentation itself. TQRegExp is modeled on Perl's regexp +language, and also fully supports Unicode. TQRegExp can also be +used in the weaker 'wildcard' (globbing) mode which works in a +similar way to command shells. A good text on regexps is Mastering Regular Expressions: Powerful Techniques for Perl and Other Tools by Jeffrey E. Friedl, ISBN 1565922573. +

Experienced regexp users may prefer to skip the introduction and +go directly to the relevant information. +

In case of multi-threaded programming, note that TQRegExp depends on +TQThreadStorage internally. For that reason, TQRegExp should only be +used with threads started with TQThread, i.e. not with threads +started with platform-specific APIs. +

+

+ + +

Introduction +

+

Regexps are built up from expressions, quantifiers, and assertions. +The simplest form of expression is simply a character, e.g. +x or 5. An expression can also be a set of +characters. For example, [ABCD], will match an A or +a B or a C or a D. As a shorthand we could +write this as [A-D]. If we want to match any of the +captital letters in the English alphabet we can write +[A-Z]. A quantifier tells the regexp engine how many +occurrences of the expression we want, e.g. x{1,1} means +match an x which occurs at least once and at most once. +We'll look at assertions and more complex expressions later. +

Note that in general regexps cannot be used to check for balanced +brackets or tags. For example if you want to match an opening html +<b> and its closing </b> you can only use a regexp if you +know that these tags are not nested; the html fragment, <b>bold <b>bolder</b></b> will not match as expected. If you know the +maximum level of nesting it is possible to create a regexp that +will match correctly, but for an unknown level of nesting, regexps +will fail. +

We'll start by writing a regexp to match integers in the range 0 +to 99. We will retquire at least one digit so we will start with +[0-9]{1,1} which means match a digit exactly once. This +regexp alone will match integers in the range 0 to 9. To match one +or two digits we can increase the maximum number of occurrences so +the regexp becomes [0-9]{1,2} meaning match a digit at +least once and at most twice. However, this regexp as it stands +will not match correctly. This regexp will match one or two digits +within a string. To ensure that we match against the whole +string we must use the anchor assertions. We need ^ (caret) +which when it is the first character in the regexp means that the +regexp must match from the beginning of the string. And we also +need $ (dollar) which when it is the last character in the +regexp means that the regexp must match until the end of the +string. So now our regexp is ^[0-9]{1,2}$. Note that +assertions, such as ^ and $, do not match any +characters. +

If you've seen regexps elsewhere they may have looked different from +the ones above. This is because some sets of characters and some +quantifiers are so common that they have special symbols to +represent them. [0-9] can be replaced with the symbol +\d. The quantifier to match exactly one occurrence, +{1,1}, can be replaced with the expression itself. This means +that x{1,1} is exactly the same as x alone. So our 0 +to 99 matcher could be written ^\d{1,2}$. Another way of +writing it would be ^\d\d{0,1}$, i.e. from the start of the +string match a digit followed by zero or one digits. In practice +most people would write it ^\d\d?$. The ? is a +shorthand for the quantifier {0,1}, i.e. a minimum of no +occurrences a maximum of one occurrence. This is used to make an +expression optional. The regexp ^\d\d?$ means "from the +beginning of the string match one digit followed by zero or one +digits and then the end of the string". +

Our second example is matching the words 'mail', 'letter' or +'correspondence' but without matching 'email', 'mailman', +'mailer', 'letterbox' etc. We'll start by just matching 'mail'. In +full the regexp is, m{1,1}a{1,1}i{1,1}l{1,1}, but since +each expression itself is automatically quantified by {1,1} +we can simply write this as mail; an 'm' followed by an 'a' +followed by an 'i' followed by an 'l'. The symbol '|' (bar) is +used for alternation, so our regexp now becomes +mail|letter|correspondence which means match 'mail' or +'letter' or 'correspondence'. Whilst this regexp will find the +words we want it will also find words we don't want such as +'email'. We will start by putting our regexp in parentheses, +(mail|letter|correspondence). Parentheses have two effects, +firstly they group expressions together and secondly they identify +parts of the regexp that we wish to capture. Our regexp still matches any of the three words but now +they are grouped together as a unit. This is useful for building +up more complex regexps. It is also useful because it allows us to +examine which of the words actually matched. We need to use +another assertion, this time \b "word boundary": +\b(mail|letter|correspondence)\b. This regexp means "match +a word boundary followed by the expression in parentheses followed +by another word boundary". The \b assertion matches at a position in the regexp not a character in the regexp. A word +boundary is any non-word character such as a space a newline or +the beginning or end of the string. +

For our third example we want to replace ampersands with the HTML +entity '&amp;'. The regexp to match is simple: &, i.e. +match one ampersand. Unfortunately this will mess up our text if +some of the ampersands have already been turned into HTML +entities. So what we really want to say is replace an ampersand +providing it is not followed by 'amp;'. For this we need the +negative lookahead assertion and our regexp becomes: +&(?!amp;). The negative lookahead assertion is introduced +with '(?!' and finishes at the ')'. It means that the text it +contains, 'amp;' in our example, must not follow the expression +that preceeds it. +

Regexps provide a rich language that can be used in a variety of +ways. For example suppose we want to count all the occurrences of +'Eric' and 'Eirik' in a string. Two valid regexps to match these +are \b(Eric|Eirik)\b and \bEi?ri[ck]\b. We need +the word boundary '\b' so we don't get 'Ericsson' etc. The second +regexp actually matches more than we want, 'Eric', 'Erik', 'Eiric' +and 'Eirik'. +

We will implement some the examples above in the +code examples section. +

+

Characters and Abbreviations for Sets of Characters +

+

+
Element Meaning +
c +Any character represents itself unless it has a special +regexp meaning. Thus c matches the character c. +
\c +A character that follows a backslash matches the character +itself except where mentioned below. For example if you +wished to match a literal caret at the beginning of a string +you would write \^. +
\a +This matches the ASCII bell character (BEL, 0x07). +
\f +This matches the ASCII form feed character (FF, 0x0C). +
\n +This matches the ASCII line feed character (LF, 0x0A, Unix newline). +
\r +This matches the ASCII carriage return character (CR, 0x0D). +
\t +This matches the ASCII horizontal tab character (HT, 0x09). +
\v +This matches the ASCII vertical tab character (VT, 0x0B). +
\xhhhh +This matches the Unicode character corresponding to the +hexadecimal number hhhh (between 0x0000 and 0xFFFF). \0ooo +(i.e., \zero ooo) matches the ASCII/Latin-1 character +corresponding to the octal number ooo (between 0 and 0377). +
. (dot) +This matches any character (including newline). +
\d +This matches a digit (TQChar::isDigit()). +
\D +This matches a non-digit. +
\s +This matches a whitespace (TQChar::isSpace()). +
\S +This matches a non-whitespace. +
\w +This matches a word character (TQChar::isLetterOrNumber() or '_'). +
\W +This matches a non-word character. +
\n +The n-th backreference, +e.g. \1, \2, etc. +
+

Note that the C++ compiler transforms backslashes in strings so to include a \ in a regexp you will need to enter it twice, i.e. \\. +

+

Sets of Characters +

+

Square brackets are used to match any character in the set of +characters contained within the square brackets. All the character +set abbreviations described above can be used within square +brackets. Apart from the character set abbreviations and the +following two exceptions no characters have special meanings in +square brackets. +

+
^ +The caret negates the character set if it occurs as the +first character, i.e. immediately after the opening square +bracket. For example, [abc] matches 'a' or 'b' or 'c', +but [^abc] matches anything except 'a' or 'b' or +'c'. +
- +The dash is used to indicate a range of characters, for +example [W-Z] matches 'W' or 'X' or 'Y' or 'Z'. +
+

Using the predefined character set abbreviations is more portable +than using character ranges across platforms and languages. For +example, [0-9] matches a digit in Western alphabets but +\d matches a digit in any alphabet. +

Note that in most regexp literature sets of characters are called +"character classes". +

+

Quantifiers +

+

By default an expression is automatically quantified by +{1,1}, i.e. it should occur exactly once. In the following +list E stands for any expression. An expression is a +character or an abbreviation for a set of characters or a set of +characters in square brackets or any parenthesised expression. +

+
E? +Matches zero or one occurrence of E. This quantifier +means "the previous expression is optional" since it will +match whether or not the expression occurs in the string. It +is the same as E{0,1}. For example dents? +will match 'dent' and 'dents'. +
E+ +Matches one or more occurrences of E. This is the same +as E{1,MAXINT}. For example, 0+ will match +'0', '00', '000', etc. +
E* +Matches zero or more occurrences of E. This is the same +as E{0,MAXINT}. The * quantifier is often +used by a mistake. Since it matches zero or more +occurrences it will match no occurrences at all. For example +if we want to match strings that end in whitespace and use +the regexp \s*$ we would get a match on every string. +This is because we have said find zero or more whitespace +followed by the end of string, so even strings that don't end +in whitespace will match. The regexp we want in this case is +\s+$ to match strings that have at least one +whitespace at the end. +
E{n} +Matches exactly n occurrences of the expression. This +is the same as repeating the expression n times. For +example, x{5} is the same as xxxxx. It is also +the same as E{n,n}, e.g. x{5,5}. +
E{n,} +Matches at least n occurrences of the expression. This +is the same as E{n,MAXINT}. +
E{,m} +Matches at most m occurrences of the expression. This +is the same as E{0,m}. +
E{n,m} +Matches at least n occurrences of the expression and at +most m occurrences of the expression. +
+

(MAXINT is implementation dependent but will not be smaller than +1024.) +

If we wish to apply a quantifier to more than just the preceding +character we can use parentheses to group characters together in +an expression. For example, tag+ matches a 't' followed by +an 'a' followed by at least one 'g', whereas (tag)+ matches +at least one occurrence of 'tag'. +

Note that quantifiers are "greedy". They will match as much text +as they can. For example, 0+ will match as many zeros as it +can from the first zero it finds, e.g. '2.0005'. +Quantifiers can be made non-greedy, see setMinimal(). +

+

Capturing Text +

+

Parentheses allow us to group elements together so that we can +quantify and capture them. For example if we have the expression +mail|letter|correspondence that matches a string we know +that one of the words matched but not which one. Using +parentheses allows us to "capture" whatever is matched within +their bounds, so if we used (mail|letter|correspondence) +and matched this regexp against the string "I sent you some email" +we can use the cap() or capturedTexts() functions to extract the +matched characters, in this case 'mail'. +

We can use captured text within the regexp itself. To refer to the +captured text we use backreferences which are indexed from 1, +the same as for cap(). For example we could search for duplicate +words in a string using \b(\w+)\W+\1\b which means match a +word boundary followed by one or more word characters followed by +one or more non-word characters followed by the same text as the +first parenthesised expression followed by a word boundary. +

If we want to use parentheses purely for grouping and not for +capturing we can use the non-capturing syntax, e.g. +(?:green|blue). Non-capturing parentheses begin '(?:' and +end ')'. In this example we match either 'green' or 'blue' but we +do not capture the match so we only know whether or not we matched +but not which color we actually found. Using non-capturing +parentheses is more efficient than using capturing parentheses +since the regexp engine has to do less book-keeping. +

Both capturing and non-capturing parentheses may be nested. +

+

Assertions +

+

Assertions make some statement about the text at the point where +they occur in the regexp but they do not match any characters. In +the following list E stands for any expression. +

+
^ +The caret signifies the beginning of the string. If you +wish to match a literal ^ you must escape it by +writing \^. For example, ^#include will only +match strings which begin with the characters '#include'. +(When the caret is the first character of a character set it +has a special meaning, see Sets of + Characters.) +
$ +The dollar signifies the end of the string. For example +\d\s*$ will match strings which end with a digit +optionally followed by whitespace. If you wish to match a +literal $ you must escape it by writing +\$. +
\b +A word boundary. For example the regexp +\bOK\b means match immediately after a word +boundary (e.g. start of string or whitespace) the letter 'O' +then the letter 'K' immediately before another word boundary +(e.g. end of string or whitespace). But note that the +assertion does not actually match any whitespace so if we +write (\bOK\b) and we have a match it will only +contain 'OK' even if the string is "Its OK now". +
\B +A non-word boundary. This assertion is true wherever +\b is false. For example if we searched for +\Bon\B in "Left on" the match would fail (space +and end of string aren't non-word boundaries), but it would +match in "tonne". +
(?=E) +Positive lookahead. This assertion is true if the +expression matches at this point in the regexp. For example, +const(?=\s+char) matches 'const' whenever it is +followed by 'char', as in 'static const char *'. +(Compare with const\s+char, which matches 'static +const char *'.) +
(?!E) +Negative lookahead. This assertion is true if the +expression does not match at this point in the regexp. For +example, const(?!\s+char) matches 'const' except +when it is followed by 'char'. +
+

+

Wildcard Matching (globbing) +

+

Most command shells such as bash or cmd.exe support "file +globbing", the ability to identify a group of files by using +wildcards. The setWildcard() function is used to switch between +regexp and wildcard mode. Wildcard matching is much simpler than +full regexps and has only four features: +

+
c +Any character represents itself apart from those mentioned +below. Thus c matches the character c. +
? +This matches any single character. It is the same as +. in full regexps. +
* +This matches zero or more of any characters. It is the +same as .* in full regexps. +
[...] +Sets of characters can be represented in square brackets, +similar to full regexps. Within the character class, like +outside, backslash has no special meaning. +
+

For example if we are in wildcard mode and have strings which +contain filenames we could identify HTML files with *.html. +This will match zero or more characters followed by a dot followed +by 'h', 't', 'm' and 'l'. +

+

Notes for Perl Users +

+

Most of the character class abbreviations supported by Perl are +supported by TQRegExp, see characters + and abbreviations for sets of characters. +

In TQRegExp, apart from within character classes, ^ always +signifies the start of the string, so carets must always be +escaped unless used for that purpose. In Perl the meaning of caret +varies automagically depending on where it occurs so escaping it +is rarely necessary. The same applies to $ which in +TQRegExp always signifies the end of the string. +

TQRegExp's quantifiers are the same as Perl's greedy quantifiers. +Non-greedy matching cannot be applied to individual quantifiers, +but can be applied to all the quantifiers in the pattern. For +example, to match the Perl regexp ro+?m retquires: +

+    TQRegExp rx( "ro+m" );
+    rx.setMinimal( TRUE );
+    
+ +

The equivalent of Perl's /i option is +setCaseSensitive(FALSE). +

Perl's /g option can be emulated using a loop. +

In TQRegExp . matches any character, therefore all TQRegExp +regexps have the equivalent of Perl's /s option. TQRegExp +does not have an equivalent to Perl's /m option, but this +can be emulated in various ways for example by splitting the input +into lines or by looping with a regexp that searches for newlines. +

Because TQRegExp is string oriented there are no \A, \Z or \z +assertions. The \G assertion is not supported but can be emulated +in a loop. +

Perl's $& is cap(0) or capturedTexts()[0]. There are no TQRegExp +equivalents for $`, $' or $+. Perl's capturing variables, $1, $2, +... correspond to cap(1) or capturedTexts()[1], cap(2) or +capturedTexts()[2], etc. +

To substitute a pattern use TQString::replace(). +

Perl's extended /x syntax is not supported, nor are +directives, e.g. (?i), or regexp comments, e.g. (?#comment). On +the other hand, C++'s rules for literal strings can be used to +achieve the same: +

+    TQRegExp mark( "\\b" // word boundary
+                  "[Mm]ark" // the word we want to match
+                );
+    
+ +

Both zero-width positive and zero-width negative lookahead +assertions (?=pattern) and (?!pattern) are supported with the same +syntax as Perl. Perl's lookbehind assertions, "independent" +subexpressions and conditional expressions are not supported. +

Non-capturing parentheses are also supported, with the same +(?:pattern) syntax. +

See TQStringList::split() and TQStringList::join() for equivalents +to Perl's split and join functions. +

Note: because C++ transforms \'s they must be written twice in +code, e.g. \b must be written \\b. +

+

Code Examples +

+

+    TQRegExp rx( "^\\d\\d?$" );  // match integers 0 to 99
+    rx.search( "123" );         // returns -1 (no match)
+    rx.search( "-6" );          // returns -1 (no match)
+    rx.search( "6" );           // returns 0 (matched as position 0)
+    
+ +

The third string matches '6'. This is a simple validation +regexp for integers in the range 0 to 99. +

+    TQRegExp rx( "^\\S+$" );     // match strings without whitespace
+    rx.search( "Hello world" ); // returns -1 (no match)
+    rx.search( "This_is-OK" );  // returns 0 (matched at position 0)
+    
+ +

The second string matches 'This_is-OK'. We've used the +character set abbreviation '\S' (non-whitespace) and the anchors +to match strings which contain no whitespace. +

In the following example we match strings containing 'mail' or +'letter' or 'correspondence' but only match whole words i.e. not +'email' +

+    TQRegExp rx( "\\b(mail|letter|correspondence)\\b" );
+    rx.search( "I sent you an email" );     // returns -1 (no match)
+    rx.search( "Please write the letter" ); // returns 17
+    
+ +

The second string matches "Please write the letter". The +word 'letter' is also captured (because of the parentheses). We +can see what text we've captured like this: +

+    TQString captured = rx.cap( 1 ); // captured == "letter"
+    
+ +

This will capture the text from the first set of capturing +parentheses (counting capturing left parentheses from left to +right). The parentheses are counted from 1 since cap( 0 ) is the +whole matched regexp (equivalent to '&' in most regexp engines). +

+    TQRegExp rx( "&(?!amp;)" );      // match ampersands but not &amp;
+    TQString line1 = "This & that";
+    line1.replace( rx, "&amp;" );
+    // line1 == "This &amp; that"
+    TQString line2 = "His &amp; hers & theirs";
+    line2.replace( rx, "&amp;" );
+    // line2 == "His &amp; hers &amp; theirs"
+    
+ +

Here we've passed the TQRegExp to TQString's replace() function to +replace the matched text with new text. +

+    TQString str = "One Eric another Eirik, and an Ericsson."
+                    " How many Eiriks, Eric?";
+    TQRegExp rx( "\\b(Eric|Eirik)\\b" ); // match Eric or Eirik
+    int pos = 0;    // where we are in the string
+    int count = 0;  // how many Eric and Eirik's we've counted
+    while ( pos >= 0 ) {
+        pos = rx.search( str, pos );
+        if ( pos >= 0 ) {
+            pos++;      // move along in str
+            count++;    // count our Eric or Eirik
+        }
+    }
+    
+ +

We've used the search() function to repeatedly match the regexp in +the string. Note that instead of moving forward by one character +at a time pos++ we could have written pos += rx.matchedLength() to skip over the already matched string. The +count will equal 3, matching 'One Eric another +Eirik, and an Ericsson. How many Eiriks, Eric?'; it +doesn't match 'Ericsson' or 'Eiriks' because they are not bounded +by non-word boundaries. +

One common use of regexps is to split lines of delimited data into +their component fields. +

+    str = "Trolltech AS\twww.trolltech.com\tNorway";
+    TQString company, web, country;
+    rx.setPattern( "^([^\t]+)\t([^\t]+)\t([^\t]+)$" );
+    if ( rx.search( str ) != -1 ) {
+        company = rx.cap( 1 );
+        web = rx.cap( 2 );
+        country = rx.cap( 3 );
+    }
+    
+ +

In this example our input lines have the format company name, web +address and country. Unfortunately the regexp is rather long and +not very versatile -- the code will break if we add any more +fields. A simpler and better solution is to look for the +separator, '\t' in this case, and take the surrounding text. The +TQStringList split() function can take a separator string or regexp +as an argument and split a string accordingly. +

+    TQStringList field = TQStringList::split( "\t", str );
+    
+ +

Here field[0] is the company, field[1] the web address and so on. +

To imitate the matching of a shell we can use wildcard mode. +

+    TQRegExp rx( "*.html" );         // invalid regexp: * doesn't quantify anything
+    rx.setWildcard( TRUE );         // now it's a valid wildcard regexp
+    rx.exactMatch( "index.html" );  // returns TRUE
+    rx.exactMatch( "default.htm" ); // returns FALSE
+    rx.exactMatch( "readme.txt" );  // returns FALSE
+    
+ +

Wildcard matching can be convenient because of its simplicity, but +any wildcard regexp can be defined using full regexps, e.g. +.*\.html$. Notice that we can't match both .html and .htm files with a wildcard unless we use *.htm* which will +also match 'test.html.bak'. A full regexp gives us the precision +we need, .*\.html?$. +

TQRegExp can match case insensitively using setCaseSensitive(), and +can use non-greedy matching, see setMinimal(). By default TQRegExp +uses full regexps but this can be changed with setWildcard(). +Searching can be forward with search() or backward with +searchRev(). Captured text can be accessed using capturedTexts() +which returns a string list of all captured strings, or using +cap() which returns the captured string for the given index. The +pos() function takes a match index and returns the position in the +string where the match was made (or -1 if there was no match). +

See also TQRegExpValidator, TQString, TQStringList, Miscellaneous Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. + +

+ +


Member Type Documentation

+

TQRegExp::CaretMode

+ +

The CaretMode enum defines the different meanings of the caret +(^) in a regular expression. The possible values are: +

    +
  • TQRegExp::CaretAtZero - +The caret corresponds to index 0 in the searched string. +
  • TQRegExp::CaretAtOffset - +The caret corresponds to the start offset of the search. +
  • TQRegExp::CaretWontMatch - +The caret never matches. +
+

Member Function Documentation

+

TQRegExp::TQRegExp () +

+Constructs an empty regexp. +

See also isValid() and errorString(). + +

TQRegExp::TQRegExp ( const TQString & pattern, bool caseSensitive = TRUE, bool wildcard = FALSE ) +

+Constructs a regular expression object for the given pattern +string. The pattern must be given using wildcard notation if wildcard is TRUE (default is FALSE). The pattern is case +sensitive, unless caseSensitive is FALSE. Matching is greedy +(maximal), but can be changed by calling setMinimal(). +

See also setPattern(), setCaseSensitive(), setWildcard(), and setMinimal(). + +

TQRegExp::TQRegExp ( const TQRegExp & rx ) +

+Constructs a regular expression as a copy of rx. +

See also operator=(). + +

TQRegExp::~TQRegExp () +

+Destroys the regular expression and cleans up its internal data. + +

TQString TQRegExp::cap ( int nth = 0 ) +

+Returns the text captured by the nth subexpression. The entire +match has index 0 and the parenthesized subexpressions have +indices starting from 1 (excluding non-capturing parentheses). +

+    TQRegExp rxlen( "(\\d+)(?:\\s*)(cm|inch)" );
+    int pos = rxlen.search( "Length: 189cm" );
+    if ( pos > -1 ) {
+        TQString value = rxlen.cap( 1 ); // "189"
+        TQString unit = rxlen.cap( 2 );  // "cm"
+        // ...
+    }
+    
+ +

The order of elements matched by cap() is as follows. The first +element, cap(0), is the entire matching string. Each subsequent +element corresponds to the next capturing open left parentheses. +Thus cap(1) is the text of the first capturing parentheses, cap(2) +is the text of the second, and so on. +

+Some patterns may lead to a number of matches which cannot be +determined in advance, for example: +

+    TQRegExp rx( "(\\d+)" );
+    str = "Offsets: 12 14 99 231 7";
+    TQStringList list;
+    pos = 0;
+    while ( pos >= 0 ) {
+        pos = rx.search( str, pos );
+        if ( pos > -1 ) {
+            list += rx.cap( 1 );
+            pos  += rx.matchedLength();
+        }
+    }
+    // list contains "12", "14", "99", "231", "7"
+    
+ +

See also capturedTexts(), pos(), exactMatch(), search(), and searchRev(). + +

Examples: network/archivesearch/archivedialog.ui.h and regexptester/regexptester.cpp. +

TQStringList TQRegExp::capturedTexts () +

+Returns a list of the captured text strings. +

The first string in the list is the entire matched string. Each +subsequent list element contains a string that matched a +(capturing) subexpression of the regexp. +

For example: +

+        TQRegExp rx( "(\\d+)(\\s*)(cm|inch(es)?)" );
+        int pos = rx.search( "Length: 36 inches" );
+        TQStringList list = rx.capturedTexts();
+        // list is now ( "36 inches", "36", " ", "inches", "es" )
+    
+ +

The above example also captures elements that may be present but +which we have no interest in. This problem can be solved by using +non-capturing parentheses: +

+        TQRegExp rx( "(\\d+)(?:\\s*)(cm|inch(?:es)?)" );
+        int pos = rx.search( "Length: 36 inches" );
+        TQStringList list = rx.capturedTexts();
+        // list is now ( "36 inches", "36", "inches" )
+    
+ +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+        TQStringList list = rx.capturedTexts();
+        TQStringList::Iterator it = list.begin();
+        while( it != list.end() ) {
+            myProcessing( *it );
+            ++it;
+        }
+    
+ +

Some regexps can match an indeterminate number of times. For +example if the input string is "Offsets: 12 14 99 231 7" and the +regexp, rx, is (\d+)+, we would hope to get a list of +all the numbers matched. However, after calling +rx.search(str), capturedTexts() will return the list ( "12", +"12" ), i.e. the entire match was "12" and the first subexpression +matched was "12". The correct approach is to use cap() in a loop. +

The order of elements in the string list is as follows. The first +element is the entire matching string. Each subsequent element +corresponds to the next capturing open left parentheses. Thus +capturedTexts()[1] is the text of the first capturing parentheses, +capturedTexts()[2] is the text of the second and so on +(corresponding to $1, $2, etc., in some other regexp languages). +

See also cap(), pos(), exactMatch(), search(), and searchRev(). + +

bool TQRegExp::caseSensitive () const +

+Returns TRUE if case sensitivity is enabled; otherwise returns +FALSE. The default is TRUE. +

See also setCaseSensitive(). + +

TQString TQRegExp::errorString () +

+Returns a text string that explains why a regexp pattern is +invalid the case being; otherwise returns "no error occurred". +

See also isValid(). + +

Example: regexptester/regexptester.cpp. +

TQString TQRegExp::escape ( const TQString & str ) [static] +

+Returns the string str with every regexp special character +escaped with a backslash. The special characters are $, (, ), *, +, +., ?, [, \, ], ^, {, | and }. +

Example: +

+     s1 = TQRegExp::escape( "bingo" );   // s1 == "bingo"
+     s2 = TQRegExp::escape( "f(x)" );    // s2 == "f\\(x\\)"
+  
+ +

This function is useful to construct regexp patterns dynamically: +

+    TQRegExp rx( "(" + TQRegExp::escape(name) +
+                "|" + TQRegExp::escape(alias) + ")" );
+  
+ + +

bool TQRegExp::exactMatch ( const TQString & str ) const +

+Returns TRUE if str is matched exactly by this regular expression; otherwise returns FALSE. You can determine how much of +the string was matched by calling matchedLength(). +

For a given regexp string, R, exactMatch("R") is the equivalent of +search("^R$") since exactMatch() effectively encloses the regexp +in the start of string and end of string anchors, except that it +sets matchedLength() differently. +

For example, if the regular expression is blue, then +exactMatch() returns TRUE only for input blue. For inputs bluebell, blutak and lightblue, exactMatch() returns FALSE +and matchedLength() will return 4, 3 and 0 respectively. +

Although const, this function sets matchedLength(), +capturedTexts() and pos(). +

See also search(), searchRev(), and TQRegExpValidator. + +

bool TQRegExp::isEmpty () const +

+Returns TRUE if the pattern string is empty; otherwise returns +FALSE. +

If you call exactMatch() with an empty pattern on an empty string +it will return TRUE; otherwise it returns FALSE since it operates +over the whole string. If you call search() with an empty pattern +on any string it will return the start offset (0 by default) +because the empty pattern matches the 'emptiness' at the start of +the string. In this case the length of the match returned by +matchedLength() will be 0. +

See TQString::isEmpty(). + +

bool TQRegExp::isValid () const +

+Returns TRUE if the regular expression is valid; otherwise returns +FALSE. An invalid regular expression never matches. +

The pattern [a-z is an example of an invalid pattern, since +it lacks a closing square bracket. +

Note that the validity of a regexp may also depend on the setting +of the wildcard flag, for example *.html is a valid +wildcard regexp but an invalid full regexp. +

See also errorString(). + +

Example: regexptester/regexptester.cpp. +

int TQRegExp::match ( const TQString & str, int index = 0, int * len = 0, bool indexIsStart = TRUE ) const +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Attempts to match in str, starting from position index. +Returns the position of the match, or -1 if there was no match. +

The length of the match is stored in *len, unless len is a +null pointer. +

If indexIsStart is TRUE (the default), the position index in +the string will match the start of string anchor, ^, in the +regexp, if present. Otherwise, position 0 in str will match. +

Use search() and matchedLength() instead of this function. +

See also TQString::mid() and TQConstString. + +

Example: qmag/qmag.cpp. +

int TQRegExp::matchedLength () const +

+Returns the length of the last matched string, or -1 if there was +no match. +

See also exactMatch(), search(), and searchRev(). + +

Examples: network/archivesearch/archivedialog.ui.h and regexptester/regexptester.cpp. +

bool TQRegExp::minimal () const +

+Returns TRUE if minimal (non-greedy) matching is enabled; +otherwise returns FALSE. +

See also setMinimal(). + +

int TQRegExp::numCaptures () const +

+Returns the number of captures contained in the regular expression. + +

Example: regexptester/regexptester.cpp. +

bool TQRegExp::operator!= ( const TQRegExp & rx ) const +

+ +

Returns TRUE if this regular expression is not equal to rx; +otherwise returns FALSE. +

See also operator==(). + +

TQRegExp & TQRegExp::operator= ( const TQRegExp & rx ) +

+Copies the regular expression rx and returns a reference to the +copy. The case sensitivity, wildcard and minimal matching options +are also copied. + +

bool TQRegExp::operator== ( const TQRegExp & rx ) const +

+Returns TRUE if this regular expression is equal to rx; +otherwise returns FALSE. +

Two TQRegExp objects are equal if they have the same pattern +strings and the same settings for case sensitivity, wildcard and +minimal matching. + +

TQString TQRegExp::pattern () const +

+Returns the pattern string of the regular expression. The pattern +has either regular expression syntax or wildcard syntax, depending +on wildcard(). +

See also setPattern(). + +

int TQRegExp::pos ( int nth = 0 ) +

+Returns the position of the nth captured text in the searched +string. If nth is 0 (the default), pos() returns the position +of the whole match. +

Example: +

+    TQRegExp rx( "/([a-z]+)/([a-z]+)" );
+    rx.search( "Output /dev/null" );    // returns 7 (position of /dev/null)
+    rx.pos( 0 );                        // returns 7 (position of /dev/null)
+    rx.pos( 1 );                        // returns 8 (position of dev)
+    rx.pos( 2 );                        // returns 12 (position of null)
+    
+ +

For zero-length matches, pos() always returns -1. (For example, if +cap(4) would return an empty string, pos(4) returns -1.) This is +due to an implementation tradeoff. +

See also capturedTexts(), exactMatch(), search(), and searchRev(). + +

int TQRegExp::search ( const TQString & str, int offset = 0, CaretMode caretMode = CaretAtZero ) const +

+Attempts to find a match in str from position offset (0 by +default). If offset is -1, the search starts at the last +character; if -2, at the next to last character; etc. +

Returns the position of the first match, or -1 if there was no +match. +

The caretMode parameter can be used to instruct whether ^ +should match at index 0 or at offset. +

You might prefer to use TQString::find(), TQString::contains() or +even TQStringList::grep(). To replace matches use +TQString::replace(). +

Example: +

+        TQString str = "offsets: 1.23 .50 71.00 6.00";
+        TQRegExp rx( "\\d*\\.\\d+" );    // primitive floating point matching
+        int count = 0;
+        int pos = 0;
+        while ( (pos = rx.search(str, pos)) != -1 ) {
+            count++;
+            pos += rx.matchedLength();
+        }
+        // pos will be 9, 14, 18 and finally 24; count will end up as 4
+    
+ +

Although const, this function sets matchedLength(), +capturedTexts() and pos(). +

See also searchRev() and exactMatch(). + +

Examples: network/archivesearch/archivedialog.ui.h and regexptester/regexptester.cpp. +

int TQRegExp::searchRev ( const TQString & str, int offset = -1, CaretMode caretMode = CaretAtZero ) const +

+Attempts to find a match backwards in str from position offset. If offset is -1 (the default), the search starts at the +last character; if -2, at the next to last character; etc. +

Returns the position of the first match, or -1 if there was no +match. +

The caretMode parameter can be used to instruct whether ^ +should match at index 0 or at offset. +

Although const, this function sets matchedLength(), +capturedTexts() and pos(). +

Warning: Searching backwards is much slower than searching +forwards. +

See also search() and exactMatch(). + +

void TQRegExp::setCaseSensitive ( bool sensitive ) +

+Sets case sensitive matching to sensitive. +

If sensitive is TRUE, \.txt$ matches readme.txt but +not README.TXT. +

See also caseSensitive(). + +

Example: regexptester/regexptester.cpp. +

void TQRegExp::setMinimal ( bool minimal ) +

+Enables or disables minimal matching. If minimal is FALSE, +matching is greedy (maximal) which is the default. +

For example, suppose we have the input string "We must be +<b>bold</b>, very <b>bold</b>!" and the pattern +<b>.*</b>. With the default greedy (maximal) matching, +the match is "We must be <b>bold</b>, very +<b>bold</b>!". But with minimal (non-greedy) matching the +first match is: "We must be <b>bold</b>, very +<b>bold</b>!" and the second match is "We must be <b>bold</b>, +very <b>bold</b>!". In practice we might use the pattern +<b>[^<]+</b> instead, although this will still fail for +nested tags. +

See also minimal(). + +

Examples: network/archivesearch/archivedialog.ui.h and regexptester/regexptester.cpp. +

void TQRegExp::setPattern ( const TQString & pattern ) +

+Sets the pattern string to pattern. The case sensitivity, +wildcard and minimal matching options are not changed. +

See also pattern(). + +

void TQRegExp::setWildcard ( bool wildcard ) +

+Sets the wildcard mode for the regular expression. The default is +FALSE. +

Setting wildcard to TRUE enables simple shell-like wildcard +matching. (See wildcard matching + (globbing).) +

For example, r*.txt matches the string readme.txt in +wildcard mode, but does not match readme. +

See also wildcard(). + +

Example: regexptester/regexptester.cpp. +

bool TQRegExp::wildcard () const +

+Returns TRUE if wildcard mode is enabled; otherwise returns FALSE. +The default is FALSE. +

See also setWildcard(). + + +


+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/qregexpvalidator-members.html b/doc/html/qregexpvalidator-members.html new file mode 100644 index 00000000..7293badd --- /dev/null +++ b/doc/html/qregexpvalidator-members.html @@ -0,0 +1,94 @@ + + + + + +TQRegExpValidator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQRegExpValidator

+ +

This is the complete list of member functions for +TQRegExpValidator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qregexpvalidator.html b/doc/html/qregexpvalidator.html new file mode 100644 index 00000000..928dce73 --- /dev/null +++ b/doc/html/qregexpvalidator.html @@ -0,0 +1,161 @@ + + + + + +TQRegExpValidator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQRegExpValidator Class Reference

+ +

The TQRegExpValidator class is used to check a string +against a regular expression. +More... +

#include <qvalidator.h> +

Inherits TQValidator. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQRegExpValidator class is used to check a string +against a regular expression. +

+

TQRegExpValidator contains a regular expression, "regexp", used to +determine whether an input string is Acceptable, Intermediate or Invalid. +

The regexp is treated as if it begins with the start of string +assertion, ^, and ends with the end of string assertion +$ so the match is against the entire input string, or from +the given position if a start position greater than zero is given. +

For a brief introduction to TQt's regexp engine see TQRegExp. +

Example of use: +

+    // regexp: optional '-' followed by between 1 and 3 digits
+    TQRegExp rx( "-?\\d{1,3}" );
+    TQValidator* validator = new TQRegExpValidator( rx, this );
+
+    TQLineEdit* edit = new TQLineEdit( this );
+    edit->setValidator( validator );
+    
+ +

Below we present some examples of validators. In practice they would +normally be associated with a widget as in the example above. +

+    // integers 1 to 9999
+    TQRegExp rx( "[1-9]\\d{0,3}" );
+    // the validator treats the regexp as "^[1-9]\\d{0,3}$"
+    TQRegExpValidator v( rx, 0 );
+    TQString s;
+    int pos = 0;
+
+    s = "0";     v.validate( s, pos );    // returns Invalid
+    s = "12345"; v.validate( s, pos );    // returns Invalid
+    s = "1";     v.validate( s, pos );    // returns Acceptable
+
+    rx.setPattern( "\\S+" );            // one or more non-whitespace characters
+    v.setRegExp( rx );
+    s = "myfile.txt";  v.validate( s, pos ); // Returns Acceptable
+    s = "my file.txt"; v.validate( s, pos ); // Returns Invalid
+
+    // A, B or C followed by exactly five digits followed by W, X, Y or Z
+    rx.setPattern( "[A-C]\\d{5}[W-Z]" );
+    v.setRegExp( rx );
+    s = "a12345Z"; v.validate( s, pos );        // Returns Invalid
+    s = "A12345Z"; v.validate( s, pos );        // Returns Acceptable
+    s = "B12";     v.validate( s, pos );        // Returns Intermediate
+
+    // match most 'readme' files
+    rx.setPattern( "read\\S?me(\.(txt|asc|1st))?" );
+    rx.setCaseSensitive( FALSE );
+    v.setRegExp( rx );
+    s = "readme";      v.validate( s, pos ); // Returns Acceptable
+    s = "README.1ST";  v.validate( s, pos ); // Returns Acceptable
+    s = "read me.txt"; v.validate( s, pos ); // Returns Invalid
+    s = "readm";       v.validate( s, pos ); // Returns Intermediate
+    
+ +

See also TQRegExp, TQIntValidator, TQDoubleValidator, and Miscellaneous Classes. + +


Member Function Documentation

+

TQRegExpValidator::TQRegExpValidator ( TQObject * parent, const char * name = 0 ) +

+Constructs a validator that accepts any string (including an empty +one) as valid. The object's parent is parent and its name is name. + +

TQRegExpValidator::TQRegExpValidator ( const TQRegExp & rx, TQObject * parent, const char * name = 0 ) +

+Constructs a validator which accepts all strings that match the +regular expression rx. The object's parent is parent and its +name is name. +

The match is made against the entire string, e.g. if the regexp is +[A-Fa-f0-9]+ it will be treated as ^[A-Fa-f0-9]+$. + +

TQRegExpValidator::~TQRegExpValidator () +

+Destroys the validator, freeing any resources allocated. + +

const TQRegExp & TQRegExpValidator::regExp () const +

+ +

Returns the regular expression used for validation. +

See also setRegExp(). + +

void TQRegExpValidator::setRegExp ( const TQRegExp & rx ) +

+Sets the regular expression used for validation to rx. +

See also regExp(). + +

TQValidator::State TQRegExpValidator::validate ( TQString & input, int & pos ) const [virtual] +

+Returns Acceptable if input is matched by the regular expression for this validator, Intermediate if it has matched +partially (i.e. could be a valid match if additional valid +characters are added), and Invalid if input is not matched. +

The pos parameter is set to the length of the input parameter. +

For example, if the regular expression is \w\d\d (that +is, word-character, digit, digit) then "A57" is Acceptable, +"E5" is Intermediate and "+9" is Invalid. +

See also TQRegExp::match() and TQRegExp::search(). + +

Reimplemented from TQValidator. + +


+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/qregion-h.html b/doc/html/qregion-h.html new file mode 100644 index 00000000..33abb999 --- /dev/null +++ b/doc/html/qregion-h.html @@ -0,0 +1,222 @@ + + + + + +qregion.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qregion.h

+ +

This is the verbatim text of the qregion.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qregion.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQRegion class
+**
+** Created : 940514
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQREGION_H
+#define TQREGION_H
+
+#ifndef QT_H
+#include "qshared.h"
+#include "qrect.h"
+#endif // QT_H
+
+#ifdef Q_WS_X11
+struct TQRegionPrivate;
+#endif
+
+class Q_EXPORT TQRegion
+{
+public:
+    enum RegionType { Rectangle, Ellipse };
+
+    TQRegion();
+    TQRegion( int x, int y, int w, int h, RegionType = Rectangle );
+    TQRegion( const TQRect &, RegionType = Rectangle );
+    TQRegion( const TQPointArray &, bool winding=FALSE );
+    TQRegion( const TQRegion & );
+    TQRegion( const TQBitmap & );
+   ~TQRegion();
+    TQRegion &operator=( const TQRegion & );
+
+    bool    isNull()   const;
+    bool    isEmpty()  const;
+
+    bool    contains( const TQPoint &p ) const;
+    bool    contains( const TQRect &r )	const;
+
+    void    translate( int dx, int dy );
+
+    TQRegion unite( const TQRegion & )	const;
+    TQRegion intersect( const TQRegion &) const;
+    TQRegion subtract( const TQRegion & ) const;
+    TQRegion eor( const TQRegion & )	const;
+
+    TQRect   boundingRect() const;
+    TQMemArray<TQRect> rects() const;
+    void setRects( const TQRect *, int );
+
+    const TQRegion operator|( const TQRegion & ) const;
+    const TQRegion operator+( const TQRegion & ) const;
+    const TQRegion operator&( const TQRegion & ) const;
+    const TQRegion operator-( const TQRegion & ) const;
+    const TQRegion operator^( const TQRegion & ) const;
+    TQRegion& operator|=( const TQRegion & );
+    TQRegion& operator+=( const TQRegion & );
+    TQRegion& operator&=( const TQRegion & );
+    TQRegion& operator-=( const TQRegion & );
+    TQRegion& operator^=( const TQRegion & );
+
+    bool    operator==( const TQRegion & )  const;
+    bool    operator!=( const TQRegion &r ) const
+			{ return !(operator==(r)); }
+
+#if defined(Q_WS_WIN)
+    HRGN    handle() const { return data->rgn; }
+#elif defined(Q_WS_X11)
+    Region handle() const { if(!data->rgn) updateX11Region(); return data->rgn; }
+#elif defined(Q_WS_MAC)
+    RgnHandle handle(bool retquire_rgn=FALSE) const;
+#elif defined(Q_WS_QWS)
+    // TQGfx_QWS needs this for region drawing
+    void * handle() const { return data->rgn; }
+#endif
+
+#ifndef QT_NO_DATASTREAM
+    friend Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQRegion & );
+    friend Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQRegion & );
+#endif
+private:
+    TQRegion( bool );
+    TQRegion copy() const;
+    void    detach();
+#if defined(Q_WS_WIN)
+    TQRegion winCombine( const TQRegion &, int ) const;
+#endif
+#if defined(Q_WS_X11)
+    void updateX11Region() const;
+    void *clipRectangles( int &num ) const;
+    friend void *qt_getClipRects( const TQRegion &, int & );
+#endif
+    void    exec( const TQByteArray &, int ver = 0 );
+    struct TQRegionData : public TQShared {
+#if defined(Q_WS_WIN)
+	HRGN   rgn;
+#elif defined(Q_WS_X11)
+	Region rgn;
+	void *xrectangles;
+	TQRegionPrivate *region;
+#elif defined(Q_WS_MAC)
+	uint is_rect:1;
+	TQRect rect;
+	RgnHandle rgn;
+#elif defined(Q_WS_QWS)
+	void * rgn;
+#endif
+	bool   is_null;
+    } *data;
+#if defined(Q_WS_MAC)
+    friend struct qt_mac_rgn_data_cache;
+    friend TQRegionData *qt_mac_get_rgn_data();
+    friend void qt_mac_free_rgn_data(TQRegionData *);
+    void rectifyRegion();
+#elif defined(Q_WS_WIN)
+    friend class TQETWidget;
+#endif
+
+};
+
+
+#define TQRGN_SETRECT		1		// region stream commands
+#define TQRGN_SETELLIPSE		2		//  (these are internal)
+#define TQRGN_SETPTARRAY_ALT	3
+#define TQRGN_SETPTARRAY_WIND	4
+#define TQRGN_TRANSLATE		5
+#define TQRGN_OR			6
+#define TQRGN_AND		7
+#define TQRGN_SUB		8
+#define TQRGN_XOR		9
+#define TQRGN_RECTS	       10
+
+
+/*****************************************************************************
+  TQRegion stream functions
+ *****************************************************************************/
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQRegion & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQRegion & );
+#endif
+
+
+#endif // TQREGION_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qregion-members.html b/doc/html/qregion-members.html new file mode 100644 index 00000000..2e543112 --- /dev/null +++ b/doc/html/qregion-members.html @@ -0,0 +1,72 @@ + + + + + +TQRegion Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQRegion

+ +

This is the complete list of member functions for +TQRegion, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qregion.html b/doc/html/qregion.html new file mode 100644 index 00000000..b731a29a --- /dev/null +++ b/doc/html/qregion.html @@ -0,0 +1,364 @@ + + + + + +TQRegion Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQRegion Class Reference

+ +

The TQRegion class specifies a clip region for a painter. +More... +

#include <qregion.h> +

List of all member functions. +

Public Members

+
    +
  • enum RegionType { Rectangle, Ellipse }
  • +
  • TQRegion ()
  • +
  • TQRegion ( int x, int y, int w, int h, RegionType t = Rectangle )
  • +
  • TQRegion ( const TQRect & r, RegionType t = Rectangle )
  • +
  • TQRegion ( const TQPointArray & a, bool winding = FALSE )
  • +
  • TQRegion ( const TQRegion & r )
  • +
  • TQRegion ( const TQBitmap & bm )
  • +
  • ~TQRegion ()
  • +
  • TQRegion & operator= ( const TQRegion & r )
  • +
  • bool isNull () const
  • +
  • bool isEmpty () const
  • +
  • bool contains ( const TQPoint & p ) const
  • +
  • bool contains ( const TQRect & r ) const
  • +
  • void translate ( int dx, int dy )
  • +
  • TQRegion unite ( const TQRegion & r ) const
  • +
  • TQRegion intersect ( const TQRegion & r ) const
  • +
  • TQRegion subtract ( const TQRegion & r ) const
  • +
  • TQRegion eor ( const TQRegion & r ) const
  • +
  • TQRect boundingRect () const
  • +
  • TQMemArray<TQRect> rects () const
  • +
  • const TQRegion operator| ( const TQRegion & r ) const
  • +
  • const TQRegion operator+ ( const TQRegion & r ) const
  • +
  • const TQRegion operator& ( const TQRegion & r ) const
  • +
  • const TQRegion operator- ( const TQRegion & r ) const
  • +
  • const TQRegion operator^ ( const TQRegion & r ) const
  • +
  • TQRegion & operator|= ( const TQRegion & r )
  • +
  • TQRegion & operator+= ( const TQRegion & r )
  • +
  • TQRegion & operator&= ( const TQRegion & r )
  • +
  • TQRegion & operator-= ( const TQRegion & r )
  • +
  • TQRegion & operator^= ( const TQRegion & r )
  • +
  • bool operator== ( const TQRegion & r ) const
  • +
  • bool operator!= ( const TQRegion & r ) const
  • +
  • HRGN handle () const
  • +
+

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQRegion & r )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQRegion & r )
  • +
+

Detailed Description

+ + +The TQRegion class specifies a clip region for a painter. +

+ +

TQRegion is used with TQPainter::setClipRegion() to limit the paint +area to what needs to be painted. There is also a +TQWidget::repaint() that takes a TQRegion parameter. TQRegion is the +best tool for reducing flicker. +

A region can be created from a rectangle, an ellipse, a polygon or +a bitmap. Complex regions may be created by combining simple +regions using unite(), intersect(), subtract() or eor() (exclusive +or). You can move a region using translate(). +

You can test whether a region isNull(), isEmpty() or if it +contains() a TQPoint or TQRect. The bounding rectangle is given by +boundingRect(). +

The function rects() gives a decomposition of the region into +rectangles. +

Example of using complex regions: +

+        void MyWidget::paintEvent( TQPaintEvent * )
+        {
+            TQPainter p;                         // our painter
+            TQRegion r1( TQRect(100,100,200,80),  // r1 = elliptic region
+                        TQRegion::Ellipse );
+            TQRegion r2( TQRect(100,120,90,30) ); // r2 = rectangular region
+            TQRegion r3 = r1.intersect( r2 );    // r3 = intersection
+            p.begin( this );                    // start painting widget
+            p.setClipRegion( r3 );              // set clip region
+            ...                                 // paint clipped graphics
+            p.end();                            // painting done
+        }
+    
+ +

TQRegion is an implicitly shared class. +

Warning: Due to window system limitations, the whole coordinate +space for a region is limited to the points between -32767 and +32767 on Mac OS X and Windows 95/98/ME. +

See also TQPainter::setClipRegion(), TQPainter::setClipRect(), Graphics Classes, and Image Processing Classes. + +


Member Type Documentation

+

TQRegion::RegionType

+ +

Specifies the shape of the region to be created. +

    +
  • TQRegion::Rectangle - the region covers the entire rectangle. +
  • TQRegion::Ellipse - the region is an ellipse inside the rectangle. +
+

Member Function Documentation

+

TQRegion::TQRegion () +

+Constructs a null region. +

See also isNull(). + +

TQRegion::TQRegion ( int x, int y, int w, int h, RegionType t = Rectangle ) +

+Constructs a rectangular or elliptic region. +

If t is Rectangle, the region is the filled rectangle (x, +y, w, h). If t is Ellipse, the region is the filled +ellipse with center at (x + w / 2, y + h / 2) and size +(w ,h ). + +

TQRegion::TQRegion ( const TQRect & r, RegionType t = Rectangle ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Create a region based on the rectange r with region type t. +

If the rectangle is invalid a null region will be created. +

See also TQRegion::RegionType. + +

TQRegion::TQRegion ( const TQPointArray & a, bool winding = FALSE ) +

+Constructs a polygon region from the point array a. +

If winding is TRUE, the polygon region is filled using the +winding algorithm, otherwise the default even-odd fill algorithm +is used. +

This constructor may create complex regions that will slow down +painting when used. + +

TQRegion::TQRegion ( const TQRegion & r ) +

+Constructs a new region which is equal to region r. + +

TQRegion::TQRegion ( const TQBitmap & bm ) +

+Constructs a region from the bitmap bm. +

The resulting region consists of the pixels in bitmap bm that +are color1, as if each pixel was a 1 by 1 rectangle. +

This constructor may create complex regions that will slow down +painting when used. Note that drawing masked pixmaps can be done +much faster using TQPixmap::setMask(). + +

TQRegion::~TQRegion () +

+Destroys the region. + +

TQRect TQRegion::boundingRect () const +

+Returns the bounding rectangle of this region. An empty region +gives a rectangle that is TQRect::isNull(). + +

bool TQRegion::contains ( const TQPoint & p ) const +

+Returns TRUE if the region contains the point p; otherwise +returns FALSE. + +

bool TQRegion::contains ( const TQRect & r ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if the region overlaps the rectangle r; otherwise +returns FALSE. + +

TQRegion TQRegion::eor ( const TQRegion & r ) const +

+Returns a region which is the exclusive or (XOR) of this region +and r. +

Region XORed
+

The figure shows the exclusive or of two elliptical regions. + +

HRGN TQRegion::handle () const +

+ +

Returns the region's handle. + +

TQRegion TQRegion::intersect ( const TQRegion & r ) const +

+Returns a region which is the intersection of this region and r. +

Region Intersection
+

The figure shows the intersection of two elliptical regions. + +

bool TQRegion::isEmpty () const +

+Returns TRUE if the region is empty; otherwise returns FALSE. An +empty region is a region that contains no points. +

Example: +

+        TQRegion r1( 10, 10, 20, 20 );
+        TQRegion r2( 40, 40, 20, 20 );
+        TQRegion r3;
+        r1.isNull();             // FALSE
+        r1.isEmpty();            // FALSE
+        r3.isNull();             // TRUE
+        r3.isEmpty();            // TRUE
+        r3 = r1.intersect( r2 ); // r3 = intersection of r1 and r2
+        r3.isNull();             // FALSE
+        r3.isEmpty();            // TRUE
+        r3 = r1.unite( r2 );     // r3 = union of r1 and r2
+        r3.isNull();             // FALSE
+        r3.isEmpty();            // FALSE
+    
+ +

See also isNull(). + +

bool TQRegion::isNull () const +

+Returns TRUE if the region is a null region; otherwise returns +FALSE. +

A null region is a region that has not been initialized. A null +region is always empty. +

See also isEmpty(). + +

bool TQRegion::operator!= ( const TQRegion & r ) const +

+ +

Returns TRUE if the region is different from r; otherwise +returns FALSE. + +

const TQRegion TQRegion::operator& ( const TQRegion & r ) const +

+Applies the intersect() function to this region and r. r1&r2 +is equivalent to r1.intersect(r2) +

See also intersect(). + +

TQRegion & TQRegion::operator&= ( const TQRegion & r ) +

+Applies the intersect() function to this region and r and +assigns the result to this region. r1&=r2 is equivalent to r1=r1.intersect(r2) +

See also intersect(). + +

const TQRegion TQRegion::operator+ ( const TQRegion & r ) const +

+Applies the unite() function to this region and r. r1+r2 is +equivalent to r1.unite(r2) +

See also unite() and operator|(). + +

TQRegion & TQRegion::operator+= ( const TQRegion & r ) +

+Applies the unite() function to this region and r and assigns +the result to this region. r1+=r2 is equivalent to r1=r1.unite(r2) +

See also intersect(). + +

const TQRegion TQRegion::operator- ( const TQRegion & r ) const +

+Applies the subtract() function to this region and r. r1-r2 +is equivalent to r1.subtract(r2) +

See also subtract(). + +

TQRegion & TQRegion::operator-= ( const TQRegion & r ) +

+Applies the subtract() function to this region and r and +assigns the result to this region. r1-=r2 is equivalent to r1=r1.subtract(r2) +

See also subtract(). + +

TQRegion & TQRegion::operator= ( const TQRegion & r ) +

+Assigns r to this region and returns a reference to the region. + +

bool TQRegion::operator== ( const TQRegion & r ) const +

+Returns TRUE if the region is equal to r; otherwise returns +FALSE. + +

const TQRegion TQRegion::operator^ ( const TQRegion & r ) const +

+Applies the eor() function to this region and r. r1^r2 is +equivalent to r1.eor(r2) +

See also eor(). + +

TQRegion & TQRegion::operator^= ( const TQRegion & r ) +

+Applies the eor() function to this region and r and +assigns the result to this region. r1^=r2 is equivalent to r1=r1.eor(r2) +

See also eor(). + +

const TQRegion TQRegion::operator| ( const TQRegion & r ) const +

+Applies the unite() function to this region and r. r1|r2 is +equivalent to r1.unite(r2) +

See also unite() and operator+(). + +

TQRegion & TQRegion::operator|= ( const TQRegion & r ) +

+Applies the unite() function to this region and r and assigns +the result to this region. r1|=r2 is equivalent to r1=r1.unite(r2) +

See also unite(). + +

TQMemArray<TQRect> TQRegion::rects () const +

+Returns an array of non-overlapping rectangles that make up the +region. +

The union of all the rectangles is equal to the original region. + +

TQRegion TQRegion::subtract ( const TQRegion & r ) const +

+Returns a region which is r subtracted from this region. +

Region Subtraction
+

The figure shows the result when the ellipse on the right is +subtracted from the ellipse on the left. (left-right ) + +

void TQRegion::translate ( int dx, int dy ) +

+Translates (moves) the region dx along the X axis and dy +along the Y axis. + +

TQRegion TQRegion::unite ( const TQRegion & r ) const +

+Returns a region which is the union of this region and r. +

Region Union
+

The figure shows the union of two elliptical regions. + +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQRegion & r ) +

+ +

Writes the region r to the stream s and returns a reference +to the stream. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQRegion & r ) +

+ +

Reads a region from the stream s into r and returns a +reference to the stream. +

See also Format of the TQDataStream operators. + + +


+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/qresizeevent-members.html b/doc/html/qresizeevent-members.html new file mode 100644 index 00000000..08651f01 --- /dev/null +++ b/doc/html/qresizeevent-members.html @@ -0,0 +1,51 @@ + + + + + +TQResizeEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQResizeEvent

+ +

This is the complete list of member functions for +TQResizeEvent, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qresizeevent.html b/doc/html/qresizeevent.html new file mode 100644 index 00000000..20cb9e7d --- /dev/null +++ b/doc/html/qresizeevent.html @@ -0,0 +1,82 @@ + + + + + +TQResizeEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQResizeEvent Class Reference

+ +

The TQResizeEvent class contains event parameters for resize events. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+
    +
  • TQResizeEvent ( const TQSize & size, const TQSize & oldSize )
  • +
  • const TQSize & size () const
  • +
  • const TQSize & oldSize () const
  • +
+

Detailed Description

+ + +The TQResizeEvent class contains event parameters for resize events. +

+

Resize events are sent to widgets that have been resized. +

The event handler TQWidget::resizeEvent() receives resize events. +

See also TQWidget::size, TQWidget::geometry, and Event Classes. + +


Member Function Documentation

+

TQResizeEvent::TQResizeEvent ( const TQSize & size, const TQSize & oldSize ) +

+ +

Constructs a resize event with the new and old widget sizes, size and oldSize respectively. + +

const TQSize & TQResizeEvent::oldSize () const +

+ +

Returns the old size of the widget. + +

const TQSize & TQResizeEvent::size () const +

+ +

Returns the new size of the widget, which is the same as +TQWidget::size(). + +

Examples: chart/canvasview.cpp and life/life.cpp. + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qrtlcodec-h.html b/doc/html/qrtlcodec-h.html new file mode 100644 index 00000000..10bfab74 --- /dev/null +++ b/doc/html/qrtlcodec-h.html @@ -0,0 +1,112 @@ + + + + + +qrtlcodec.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qrtlcodec.h

+ +

This is the verbatim text of the qrtlcodec.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qrtlcodec.h   3.3.8   edited Jan 11 14:46 $
+**
+** Implementation of TQTextCodec class
+**
+** Created : 981015
+**
+** Copyright (C) 1998-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 retquirements 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 TQRTLCODEC_H
+#define TQRTLCODEC_H
+
+#ifndef QT_H
+#include "qtextcodec.h"
+#endif // QT_H
+
+#ifndef QT_NO_CODEC_HEBREW
+
+class Q_EXPORT TQHebrewCodec : public TQTextCodec {
+public:
+    virtual int mibEnum() const;
+    const char* name() const;
+    const char* mimeName() const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQTextCodec::fromUnicode;
+#endif
+    TQCString fromUnicode(const TQString& uc, int& lenInOut) const;
+    TQString toUnicode(const char* chars, int len) const;
+
+    int heuristicContentMatch(const char* chars, int len) const;
+};
+
+#endif
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qs-addwidg.png b/doc/html/qs-addwidg.png new file mode 100644 index 00000000..54e7dade Binary files /dev/null and b/doc/html/qs-addwidg.png differ diff --git a/doc/html/qs-editconn1.png b/doc/html/qs-editconn1.png new file mode 100644 index 00000000..f58d47c7 Binary files /dev/null and b/doc/html/qs-editconn1.png differ diff --git a/doc/html/qs-editconn2.png b/doc/html/qs-editconn2.png new file mode 100644 index 00000000..6fc7e3dd Binary files /dev/null and b/doc/html/qs-editconn2.png differ diff --git a/doc/html/qs-editfunc.png b/doc/html/qs-editfunc.png new file mode 100644 index 00000000..4098f3d8 Binary files /dev/null and b/doc/html/qs-editfunc.png differ diff --git a/doc/html/qs-editlistbox1.png b/doc/html/qs-editlistbox1.png new file mode 100644 index 00000000..b85e7ad0 Binary files /dev/null and b/doc/html/qs-editlistbox1.png differ diff --git a/doc/html/qs-laygrid.png b/doc/html/qs-laygrid.png new file mode 100644 index 00000000..de41cb7a Binary files /dev/null and b/doc/html/qs-laygrid.png differ diff --git a/doc/html/qs-layhoriz.png b/doc/html/qs-layhoriz.png new file mode 100644 index 00000000..6ce383cd Binary files /dev/null and b/doc/html/qs-layhoriz.png differ diff --git a/doc/html/qs-layvert.png b/doc/html/qs-layvert.png new file mode 100644 index 00000000..f35845e1 Binary files /dev/null and b/doc/html/qs-layvert.png differ diff --git a/doc/html/qs-newdlg.png b/doc/html/qs-newdlg.png new file mode 100644 index 00000000..23189c9a Binary files /dev/null and b/doc/html/qs-newdlg.png differ diff --git a/doc/html/qs-projset.png b/doc/html/qs-projset.png new file mode 100644 index 00000000..14371bfe Binary files /dev/null and b/doc/html/qs-projset.png differ diff --git a/doc/html/qs-pushbutt.png b/doc/html/qs-pushbutt.png new file mode 100644 index 00000000..14eabf79 Binary files /dev/null and b/doc/html/qs-pushbutt.png differ diff --git a/doc/html/qs-spacers.png b/doc/html/qs-spacers.png new file mode 100644 index 00000000..fa5c6e58 Binary files /dev/null and b/doc/html/qs-spacers.png differ diff --git a/doc/html/qs-taborder.png b/doc/html/qs-taborder.png new file mode 100644 index 00000000..faefc111 Binary files /dev/null and b/doc/html/qs-taborder.png differ diff --git a/doc/html/qs-txtlbl.png b/doc/html/qs-txtlbl.png new file mode 100644 index 00000000..5f5dbc95 Binary files /dev/null and b/doc/html/qs-txtlbl.png differ diff --git a/doc/html/qscrbar-m.png b/doc/html/qscrbar-m.png new file mode 100644 index 00000000..7ee04c2c Binary files /dev/null and b/doc/html/qscrbar-m.png differ diff --git a/doc/html/qscrbar-w.png b/doc/html/qscrbar-w.png new file mode 100644 index 00000000..348aba45 Binary files /dev/null and b/doc/html/qscrbar-w.png differ diff --git a/doc/html/qscreen-members.html b/doc/html/qscreen-members.html new file mode 100644 index 00000000..bb3ec684 --- /dev/null +++ b/doc/html/qscreen-members.html @@ -0,0 +1,88 @@ + + + + + +TQScreen Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQScreen

+ +

This is the complete list of member functions for +TQScreen, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qscreen.html b/doc/html/qscreen.html new file mode 100644 index 00000000..d25627e2 --- /dev/null +++ b/doc/html/qscreen.html @@ -0,0 +1,440 @@ + + + + + +TQScreen Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQScreen Class Reference

+ +

The TQScreen class and its descendants manage the framebuffer and +palette. +More... +

#include <qgfx_qws.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQScreen class and its descendants manage the framebuffer and +palette. +

TQScreens act as factories for the screen cursor and TQGfx's. TQLinuxFbScreen +manages a Linux framebuffer; accelerated drivers subclass TQLinuxFbScreen. +There can only be one screen in a TQt/Embedded application. +

See also TQt/Embedded. + +


Member Function Documentation

+

TQScreen::TQScreen ( int display_id ) +

+ +Create a screen; the display_id is the number of the TQt/Embedded server +to connect to. + +

TQScreen::~TQScreen () [virtual] +

+Destroys a TQScreen + +

int TQScreen::alloc ( unsigned int r, unsigned int g, unsigned int b ) [virtual] +

+Given an RGB value r g b, return an index which is the closest +match to it in the screen's palette. Used in paletted modes only. + +

uchar * TQScreen::base () const +

+ +Returns a pointer to the start of the framebuffer. + +

void TQScreen::blank ( bool on ) [virtual] +

+ +If on is true, blank the screen. Otherwise unblank it. + +

uchar * TQScreen::cache ( int, int ) [virtual] +

+ +This function is used to store pixmaps in graphics memory for the +use of the accelerated drivers. See TQLinuxFbScreen (where the cacheing +is implemented) for more information. + +

TQRgb * TQScreen::clut () +

+ +Returns the screen's color lookup table (color palette). This is only +valid in paletted modes (8bpp and lower). + +

bool TQScreen::connect ( const TQString & displaySpec ) [pure virtual] +

+ +This function is called by every TQt/Embedded application on startup. +It maps in the framebuffer and in the accelerated drivers the graphics +card control registers. displaySpec has the following syntax: +

+[gfx driver][:driver specific options][:display number] +

+for example if you want to use the mach64 driver on fb1 as display 2: +

+Mach64:/dev/fb1:2 +

+displaySpec is passed in via the TQWS_DISPLAY environment variable +or the -display command line parameter. + +

TQGfx * TQScreen::createGfx ( unsigned char * bytes, int w, int h, int d, int linestep ) [virtual] +

+ +Creates a gfx on an arbitrary buffer bytes, width w and height h in +pixels, depth d and linestep (length in bytes of each line in the +buffer). Accelerated drivers can check to see if bytes points into +graphics memory and create an accelerated Gfx. + +

int TQScreen::depth () const +

+ +Gives the depth in bits per pixel of the framebuffer. This is the number +of bits each pixel takes up rather than the number of significant bits, +so 24bpp and 32bpp express the same range of colors (8 bits of +red, green and blue) + +

int TQScreen::deviceHeight () const +

+ +Gives the full height of the framebuffer device, as opposed to the +height which TQt/Embedded will actually use. These can differ if the +display is centered within the framebuffer. + +

int TQScreen::deviceWidth () const +

+ +Gives the full width of the framebuffer device, as opposed to the +width which TQt/Embedded will actually use. These can differ if the +display is centered within the framebuffer. + +

void TQScreen::disconnect () [pure virtual] +

+ +This function is called by every TQt/Embedded application just +before exitting; it's normally used to unmap the framebuffer. + +

int TQScreen::height () const +

+ +Gives the height in pixels of the framebuffer. + +

int TQScreen::initCursor ( void * end_of_location, bool init = FALSE ) [virtual] +

+This is used to initialize the software cursor - end_of_location +points to the address after the area where the cursor image can be stored. +init is true for the first application this method is called from +(the TQt/Embedded server), false otherwise. + +

bool TQScreen::initDevice () [pure virtual] +

+ +This function is called by the TQt/Embedded server when initializing +the framebuffer. Accelerated drivers use it to set up the graphics card. + +

bool TQScreen::isInterlaced () const [virtual] +

+ +

Returns TRUE if the display is interlaced (for instance a +television screen); otherwise returns FALSE. If TRUE, drawing is +altered to look better on such displays. + +

bool TQScreen::isTransformed () const [virtual] +

+ +

Returns TRUE if the screen is transformed (for instance, rotated +90 degrees); otherwise returns FALSE. TQScreen's version always +returns FALSE. + +

int * TQScreen::lastOp () +

+ +

Returns the screens last operation. + +

int TQScreen::linestep () const +

+ +Returns the length in bytes of each scanline of the framebuffer. + +

TQSize TQScreen::mapFromDevice ( const TQSize & s ) const [virtual] +

+ +

Map a framebuffer coordinate to the coordinate space used by the +application. Used by the rotated driver; the TQScreen +implementation simply returns s. + +

TQPoint TQScreen::mapFromDevice ( const TQPoint &, const TQSize & ) const [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Map a framebuffer coordinate to the coordinate space used by the +application. Used by the rotated driver; the TQScreen +implementation simply returns the point. + +

TQRect TQScreen::mapFromDevice ( const TQRect & r, const TQSize & ) const [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Map a framebuffer coordinate to the coordinate space used by the +application. Used by the rotated driver; the TQScreen +implementation simply returns r. + +

TQImage TQScreen::mapFromDevice ( const TQImage & i ) const [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Transforms an image so that it matches the application coordinate +space (e.g. rotating it 90 degrees counter-clockwise). The TQScreen +implementation simply returns i. + +

TQRegion TQScreen::mapFromDevice ( const TQRegion & r, const TQSize & ) const [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Transforms a region so that it matches the application coordinate +space (e.g. rotating it 90 degrees counter-clockwise). The TQScreen +implementation simply returns r. + +

TQSize TQScreen::mapToDevice ( const TQSize & s ) const [virtual] +

+ +

Map a user coordinate to the one to actually draw. Used by the +rotated driver; the TQScreen implementation simply returns s. + +

TQPoint TQScreen::mapToDevice ( const TQPoint &, const TQSize & ) const [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Map a user coordinate to the one to actually draw. Used by the +rotated driver; the TQScreen implementation simply returns the +point passed in. + +

TQRect TQScreen::mapToDevice ( const TQRect & r, const TQSize & ) const [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Map a user coordinate to the one to actually draw. Used by the +rotated driver; the TQScreen implementation simply returns r. + +

TQImage TQScreen::mapToDevice ( const TQImage & i ) const [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Transforms an image so that it fits the device coordinate space +(e.g. rotating it 90 degrees clockwise). The TQScreen +implementation simply returns i. + +

TQRegion TQScreen::mapToDevice ( const TQRegion & r, const TQSize & ) const [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Transforms a region so that it fits the device coordinate space +(e.g. rotating it 90 degrees clockwise). The TQScreen +implementation simply returns r. + +

int TQScreen::numCols () +

+ +Returns the number of entries in the color table returned by clut(). + +

bool TQScreen::onCard ( unsigned char * p ) const [virtual] +

+ +Returns true if the buffer pointed to by p is within graphics card +memory, false if it's in main RAM. + +

bool TQScreen::onCard ( unsigned char * p, ulong & offset ) const [virtual] +

+ +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This checks whether the buffer specified by p is on the card +(as per the other version of onCard) and returns an offset in bytes +from the start of graphics card memory in offset if it is. + +

int * TQScreen::opType () +

+ +

Returns the screen's operation type. + +

int TQScreen::pixelType () const +

+ +Returns an integer (taking the same values as TQGfx::PixelType) +that specifies the pixel storage format of the screen. + +

int TQScreen::pixmapDepth () const [virtual] +

+ +Gives the preferred depth for pixmaps. By default this is the same +as the screen depth, but for the VGA16 driver it's 8bpp. + +

int TQScreen::pixmapLinestepAlignment () [virtual] +

+ +Returns the value in bits to which individual scanlines of pixmaps held in +graphics card memory should be aligned. This is only useful for accelerated +drivers. By default the value returned is 64 but it can be overridden +by individual accelerated drivers. + +

int TQScreen::pixmapOffsetAlignment () [virtual] +

+ +Returns the value in bits to which the start address of pixmaps held in +graphics card memory should be aligned. This is only useful for accelerated +drivers. By default the value returned is 64 but it can be overridden +by individual accelerated drivers. + +

void TQScreen::restore () [virtual] +

+Restores the state of the graphics card from a previous save() + +

void TQScreen::save () [virtual] +

+Saves the state of the graphics card - used so that, for instance, +the palette can be restored when switching between linux virtual +consoles. Hardware TQScreen descendants should save register state +here if necessary if switching between virtual consoles (for +example to/from X) is to be permitted. + +

TQGfx * TQScreen::screenGfx () [virtual] +

+Returns a TQGfx (normally a TQGfxRaster) initialized to point to the screen, +with an origin at 0,0 and a clip region covering the whole screen. + +

int TQScreen::screenSize () const +

+ +Returns the size in bytes of the screen. This is always located at +the beginning of framebuffer memory (i.e. at base()). + +

void TQScreen::set ( unsigned int, unsigned int, unsigned int, unsigned int ) [virtual] +

+Sets an entry in the color palette. + +

void TQScreen::setDirty ( const TQRect & ) [virtual] +

+ +

Indicates which section of the screen has been altered. Used by +the VNC and VFB displays; the TQScreen version does nothing. + +

void TQScreen::setMode ( int, int, int ) [pure virtual] +

+ +This function can be used to set the framebuffer width, height and +depth. It's currently unused. + +

void TQScreen::shutdownDevice () [virtual] +

+Called by the TQt/Embedded server on shutdown; never called by +a TQt/Embedded client. This is intended to support graphics card specific +shutdown; the unaccelerated implementation simply hides the mouse cursor. + +

bool TQScreen::supportsDepth ( int d ) const [virtual] +

+ +Returns true if the screen supports a particular color depth d. +Possible values are 1,4,8,16 and 32. + +

int TQScreen::totalSize () const +

+ +Returns the size in bytes of available graphics card memory, including the +screen. Offscreen memory is only used by the accelerated drivers. + +

int TQScreen::transformOrientation () const [virtual] +

+ +

Used by the rotated server. The TQScreeen implementation returns 0. + +

void TQScreen::uncache ( uchar * ) [virtual] +

+ +This function is called on pixmap destruction to remove them from +graphics card memory. + +

int TQScreen::width () const +

+ +Gives the width in pixels of the framebuffer. + + +

+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/qscrollbar-h.html b/doc/html/qscrollbar-h.html new file mode 100644 index 00000000..273f5c6b --- /dev/null +++ b/doc/html/qscrollbar-h.html @@ -0,0 +1,242 @@ + + + + + +qscrollbar.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qscrollbar.h

+ +

This is the verbatim text of the qscrollbar.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qscrollbar.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQScrollBar class
+**
+** Created : 940427
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSCROLLBAR_H
+#define TQSCROLLBAR_H
+
+class TQTimer;
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qrangecontrol.h"
+#endif // QT_H
+
+#ifndef QT_NO_SCROLLBAR
+
+class Q_EXPORT TQScrollBar : public TQWidget, public TQRangeControl
+{
+    Q_OBJECT
+    Q_PROPERTY( int minValue READ minValue WRITE setMinValue )
+    Q_PROPERTY( int maxValue READ maxValue WRITE setMaxValue )
+    Q_PROPERTY( int lineStep READ lineStep WRITE setLineStep )
+    Q_PROPERTY( int pageStep READ pageStep WRITE setPageStep )
+    Q_PROPERTY( int value READ value WRITE setValue )
+    Q_PROPERTY( bool tracking READ tracking WRITE setTracking )
+    Q_PROPERTY( bool draggingSlider READ draggingSlider )
+    Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
+
+public:
+    TQScrollBar( TQWidget *parent, const char* name = 0 );
+    TQScrollBar( Orientation, TQWidget *parent, const char* name = 0 );
+    TQScrollBar( int minValue, int maxValue, int lineStep, int pageStep,
+		int value, Orientation, TQWidget *parent, const char* name = 0 );
+    ~TQScrollBar();
+
+    virtual void setOrientation( Orientation );
+    Orientation orientation() const;
+    virtual void setTracking( bool enable );
+    bool	tracking() const;
+    bool	draggingSlider() const;
+
+    virtual void setPalette( const TQPalette & );
+    virtual TQSize sizeHint() const;
+    virtual void setSizePolicy( TQSizePolicy sp );
+    void setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw = FALSE );
+
+    int	 minValue() const;
+    int	 maxValue() const;
+    void setMinValue( int );
+    void setMaxValue( int );
+    int	 lineStep() const;
+    int	 pageStep() const;
+    void setLineStep( int );
+    void setPageStep( int );
+    int  value() const;
+
+    int		sliderStart() const;
+    TQRect	sliderRect() const;
+
+public slots:
+    void setValue( int );
+
+signals:
+    void	valueChanged( int value );
+    void	sliderPressed();
+    void	sliderMoved( int value );
+    void	sliderReleased();
+    void	nextLine();
+    void	prevLine();
+    void	nextPage();
+    void	prevPage();
+
+protected:
+#ifndef QT_NO_WHEELEVENT
+    void 	wheelEvent( TQWheelEvent * );
+#endif
+    void	keyPressEvent( TQKeyEvent * );
+    void	resizeEvent( TQResizeEvent * );
+    void	paintEvent( TQPaintEvent * );
+
+    void	mousePressEvent( TQMouseEvent * );
+    void	mouseReleaseEvent( TQMouseEvent * );
+    void	mouseMoveEvent( TQMouseEvent * );
+    void	contextMenuEvent( TQContextMenuEvent * );
+    void	hideEvent( TQHideEvent* );
+
+    void	valueChange();
+    void	stepChange();
+    void	rangeChange();
+
+    void	styleChange( TQStyle& );
+
+private slots:
+    void doAutoRepeat();
+
+private:
+    void init();
+    void positionSliderFromValue();
+    int calculateValueFromSlider() const;
+
+    void startAutoRepeat();
+    void stopAutoRepeat();
+
+    int rangeValueToSliderPos( int val ) const;
+    int sliderPosToRangeValue( int val ) const;
+
+    void action( int control );
+
+    void drawControls( uint controls, uint activeControl ) const;
+    void drawControls( uint controls, uint activeControl,
+		       TQPainter *p ) const;
+
+    uint pressedControl;
+    bool track;
+    bool clickedAt;
+    Orientation orient;
+
+    int slidePrevVal;
+    TQCOORD sliderPos;
+    TQCOORD clickOffset;
+
+    TQTimer * repeater;
+    void * d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQScrollBar( const TQScrollBar & );
+    TQScrollBar &operator=( const TQScrollBar & );
+#endif
+};
+
+
+inline void TQScrollBar::setTracking( bool t )
+{
+    track = t;
+}
+
+inline bool TQScrollBar::tracking() const
+{
+    return track;
+}
+
+inline TQScrollBar::Orientation TQScrollBar::orientation() const
+{
+    return orient;
+}
+
+inline int TQScrollBar::sliderStart() const
+{
+    return sliderPos;
+}
+
+inline void TQScrollBar::setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw )
+{ 
+    TQWidget::setSizePolicy( hor, ver, hfw ); 
+}
+
+
+#endif // QT_NO_SCROLLBAR
+
+#endif // TQSCROLLBAR_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qscrollbar-members.html b/doc/html/qscrollbar-members.html new file mode 100644 index 00000000..c1330e16 --- /dev/null +++ b/doc/html/qscrollbar-members.html @@ -0,0 +1,377 @@ + + + + + +TQScrollBar Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQScrollBar

+ +

This is the complete list of member functions for +TQScrollBar, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qscrollbar.html b/doc/html/qscrollbar.html new file mode 100644 index 00000000..4cc534ab --- /dev/null +++ b/doc/html/qscrollbar.html @@ -0,0 +1,382 @@ + + + + + +TQScrollBar Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQScrollBar Class Reference

+ +

The TQScrollBar widget provides a vertical or horizontal scroll bar. +More... +

#include <qscrollbar.h> +

Inherits TQWidget and TQRangeControl. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • bool draggingSlider - whether the user has clicked the mouse on the slider and is currently dragging it  (read only)
  • +
  • int lineStep - the line step
  • +
  • int maxValue - the scroll bar's maximum value
  • +
  • int minValue - the scroll bar's minimum value
  • +
  • Orientation orientation - the orientation of the scroll bar
  • +
  • int pageStep - the page step
  • +
  • bool tracking - whether scroll bar tracking is enabled
  • +
  • int value - the scroll bar's value
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQScrollBar widget provides a vertical or horizontal scroll bar. +

+

A scroll bar allows the user to control a value within a +program-definable range and gives users a visible indication of +the current value of a range control. +

Scroll bars include four separate controls: +

    +

  • The line-up and line-down controls are little buttons +which the user can use to move one "line" up or down. The meaning +of line is configurable. In editors and list boxes it means one +line of text; in an image viewer it might mean 20 pixels. +

  • The slider is the handle that indicates the current value of +the scroll bar, which the user can drag to change the value. This +part of the scroll bar is sometimes called the "thumb". +

  • The page-up/page-down control is the area on which the +slider slides (the scroll bar's background). Clicking here moves +the scroll bar towards the click. The meaning of "page" is also +configurable: in editors and list boxes it means as many lines as +there is space for in the widget. +

+

TQScrollBar has very few of its own functions; it mostly relies on +TQRangeControl. The most useful functions are setValue() to set the +scroll bar directly to some value; addPage(), addLine(), +subtractPage(), and subtractLine() to simulate the effects of +clicking (useful for accelerator keys); setSteps() to define the +values of pageStep() and lineStep(); and setRange() to set the +minValue() and maxValue() of the scroll bar. TQScrollBar has a +convenience constructor with which you can set most of these +properties. +

Some GUI styles (for example, the Windows and Motif styles +provided with TQt), also use the pageStep() value to calculate the +size of the slider. +

In addition to the access functions from TQRangeControl, TQScrollBar +provides a comprehensive set of signals: +

+
Signal Emitted when +
valueChanged() +the scroll bar's value has changed. The tracking() +determines whether this signal is emitted during user +interaction. +
sliderPressed() +the user starts to drag the slider. +
sliderMoved() +the user drags the slider. +
sliderReleased() +the user releases the slider. +
nextLine() +the scroll bar has moved one line down or right. Line is +defined in TQRangeControl. +
prevLine() +the scroll bar has moved one line up or left. +
nextPage() +the scroll bar has moved one page down or right. +
prevPage() +the scroll bar has moved one page up or left. +
+

TQScrollBar only provides integer ranges. Note that although +TQScrollBar handles very large numbers, scroll bars on current +screens cannot usefully control ranges above about 100,000 pixels. +Beyond that, it becomes difficult for the user to control the +scroll bar using either the keyboard or the mouse. +

A scroll bar can be controlled by the keyboard, but it has a +default focusPolicy() of NoFocus. Use setFocusPolicy() to +enable keyboard focus. See keyPressEvent() for a list of key +bindings. +

If you need to add scroll bars to an interface, consider using the +TQScrollView class, which encapsulates the common uses for scroll +bars. +

+

See also TQSlider, TQSpinBox, TQScrollView, GUI Design Handbook: Scroll Bar, and Basic Widgets. + +


Member Function Documentation

+

TQScrollBar::TQScrollBar ( TQWidget * parent, const char * name = 0 ) +

+Constructs a vertical scroll bar. +

The parent and name arguments are sent on to the TQWidget +constructor. +

The minValue defaults to 0, the maxValue to 99, with a lineStep size of 1 and a pageStep size of 10, and an initial +value of 0. + +

TQScrollBar::TQScrollBar ( Orientation orientation, TQWidget * parent, const char * name = 0 ) +

+Constructs a scroll bar. +

The orientation must be TQt::Vertical or TQt::Horizontal. +

The parent and name arguments are sent on to the TQWidget +constructor. +

The minValue defaults to 0, the maxValue to 99, with a lineStep size of 1 and a pageStep size of 10, and an initial +value of 0. + +

TQScrollBar::TQScrollBar ( int minValue, int maxValue, int lineStep, int pageStep, int value, Orientation orientation, TQWidget * parent, const char * name = 0 ) +

+Constructs a scroll bar whose value can never be smaller than minValue or greater than maxValue, whose line step size is lineStep and page step size is pageStep and whose value is +initially value (which is guaranteed to be in range using +bound()). +

If orientation is Vertical the scroll bar is vertical and if +it is Horizontal the scroll bar is horizontal. +

The parent and name arguments are sent on to the TQWidget +constructor. + +

TQScrollBar::~TQScrollBar () +

+Destructor. + +

bool TQScrollBar::draggingSlider () const +

Returns TRUE if the user has clicked the mouse on the slider and is currently dragging it; otherwise returns FALSE. +See the "draggingSlider" property for details. +

void TQScrollBar::hideEvent ( TQHideEvent * ) [virtual protected] +

+This function is called when the scrollbar is hidden. + +

Reimplemented from TQWidget. +

int TQScrollBar::lineStep () const +

Returns the line step. +See the "lineStep" property for details. +

int TQScrollBar::maxValue () const +

Returns the scroll bar's maximum value. +See the "maxValue" property for details. +

int TQScrollBar::minValue () const +

Returns the scroll bar's minimum value. +See the "minValue" property for details. +

void TQScrollBar::nextLine () [signal] +

+ +

This signal is emitted when the scroll bar scrolls one line down +or right. + +

void TQScrollBar::nextPage () [signal] +

+ +

This signal is emitted when the scroll bar scrolls one page down +or right. + +

Orientation TQScrollBar::orientation () const +

Returns the orientation of the scroll bar. +See the "orientation" property for details. +

int TQScrollBar::pageStep () const +

Returns the page step. +See the "pageStep" property for details. +

void TQScrollBar::prevLine () [signal] +

+ +

This signal is emitted when the scroll bar scrolls one line up or +left. + +

void TQScrollBar::prevPage () [signal] +

+ +

This signal is emitted when the scroll bar scrolls one page up or +left. + +

void TQScrollBar::setLineStep ( int ) +

Sets the line step. +See the "lineStep" property for details. +

void TQScrollBar::setMaxValue ( int ) +

Sets the scroll bar's maximum value. +See the "maxValue" property for details. +

void TQScrollBar::setMinValue ( int ) +

Sets the scroll bar's minimum value. +See the "minValue" property for details. +

void TQScrollBar::setOrientation ( Orientation ) [virtual] +

Sets the orientation of the scroll bar. +See the "orientation" property for details. +

void TQScrollBar::setPageStep ( int ) +

Sets the page step. +See the "pageStep" property for details. +

void TQScrollBar::setPalette ( const TQPalette & p ) [virtual] +

+Reimplements the virtual function TQWidget::setPalette(). +

Sets the background color to the mid color for Motif style scroll +bars using palette p. + +

Reimplemented from TQWidget. +

void TQScrollBar::setTracking ( bool enable ) [virtual] +

Sets whether scroll bar tracking is enabled to enable. +See the "tracking" property for details. +

void TQScrollBar::setValue ( int ) [slot] +

Sets the scroll bar's value. +See the "value" property for details. +

void TQScrollBar::sliderMoved ( int value ) [signal] +

+ +

This signal is emitted when the slider is dragged by the user, with +the new scroll bar value as an argument. +

This signal is emitted even when tracking is turned off. +

See also tracking, valueChanged(), nextLine(), prevLine(), nextPage(), and prevPage(). + +

void TQScrollBar::sliderPressed () [signal] +

+ +

This signal is emitted when the user presses the slider with the +mouse. + +

TQRect TQScrollBar::sliderRect () const +

+Returns the scroll bar slider rectangle. +

See also sliderStart(). + +

void TQScrollBar::sliderReleased () [signal] +

+ +

This signal is emitted when the user releases the slider with the +mouse. + +

int TQScrollBar::sliderStart () const +

+ +

Returns the pixel position where the scroll bar slider starts. +

This is equivalent to sliderRect().y() for vertical scroll bars or +sliderRect().x() for horizontal scroll bars. + +

bool TQScrollBar::tracking () const +

Returns TRUE if scroll bar tracking is enabled; otherwise returns FALSE. +See the "tracking" property for details. +

int TQScrollBar::value () const +

Returns the scroll bar's value. +See the "value" property for details. +

void TQScrollBar::valueChanged ( int value ) [signal] +

+ +

This signal is emitted when the scroll bar value has changed, with +the new scroll bar value as an argument. + +


Property Documentation

+

bool draggingSlider

+

This property holds whether the user has clicked the mouse on the slider and is currently dragging it. +

+

Get this property's value with draggingSlider(). +

int lineStep

+

This property holds the line step. +

When setting lineStep, the virtual stepChange() function will be +called if the new line step is different from the previous +setting. +

See also setSteps(), TQRangeControl::pageStep(), and setRange(). + +

Set this property's value with setLineStep() and get this property's value with lineStep(). +

int maxValue

+

This property holds the scroll bar's maximum value. +

When setting this property, the TQScrollBar::minValue is +adjusted if necessary to ensure that the range remains valid. +

See also setRange(). + +

Set this property's value with setMaxValue() and get this property's value with maxValue(). +

int minValue

+

This property holds the scroll bar's minimum value. +

When setting this property, the TQScrollBar::maxValue is +adjusted if necessary to ensure that the range remains valid. +

See also setRange(). + +

Set this property's value with setMinValue() and get this property's value with minValue(). +

Orientation orientation

+

This property holds the orientation of the scroll bar. +

The orientation must be TQt::Vertical (the default) or TQt::Horizontal. + +

Set this property's value with setOrientation() and get this property's value with orientation(). +

int pageStep

+

This property holds the page step. +

When setting pageStep, the virtual stepChange() function will be +called if the new page step is different from the previous +setting. +

See also TQRangeControl::setSteps(), lineStep, and setRange(). + +

Set this property's value with setPageStep() and get this property's value with pageStep(). +

bool tracking

+

This property holds whether scroll bar tracking is enabled. +

If tracking is enabled (the default), the scroll bar emits the +valueChanged() signal while the slider is being dragged. If +tracking is disabled, the scroll bar emits the valueChanged() +signal only when the user releases the mouse button after moving +the slider. + +

Set this property's value with setTracking() and get this property's value with tracking(). +

int value

+

This property holds the scroll bar's value. +

Set this property's value with setValue() and get this property's value with value(). +

See also TQRangeControl::value() and prevValue(). + + +


+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/qscrollview-cl.png b/doc/html/qscrollview-cl.png new file mode 100644 index 00000000..c1cfe51c Binary files /dev/null and b/doc/html/qscrollview-cl.png differ diff --git a/doc/html/qscrollview-h.html b/doc/html/qscrollview-h.html new file mode 100644 index 00000000..821fc25b --- /dev/null +++ b/doc/html/qscrollview-h.html @@ -0,0 +1,314 @@ + + + + + +qscrollview.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qscrollview.h

+ +

This is the verbatim text of the qscrollview.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qscrollview.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQScrollView class
+**
+** Created : 970523
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSCROLLVIEW_H
+#define TQSCROLLVIEW_H
+
+#ifndef QT_H
+#include "qframe.h"
+#include "qscrollbar.h"
+#endif // QT_H
+
+#ifndef QT_NO_SCROLLVIEW
+
+class TQScrollViewData;
+
+class Q_EXPORT TQScrollView : public TQFrame
+{
+    Q_OBJECT
+    Q_ENUMS( ResizePolicy ScrollBarMode )
+    Q_PROPERTY( ResizePolicy resizePolicy READ resizePolicy WRITE setResizePolicy )
+    Q_PROPERTY( ScrollBarMode vScrollBarMode READ vScrollBarMode WRITE setVScrollBarMode )
+    Q_PROPERTY( ScrollBarMode hScrollBarMode READ hScrollBarMode WRITE setHScrollBarMode )
+    Q_PROPERTY( int visibleWidth READ visibleWidth )
+    Q_PROPERTY( int visibleHeight READ visibleHeight )
+    Q_PROPERTY( int contentsWidth READ contentsWidth )
+    Q_PROPERTY( int contentsHeight READ contentsHeight )
+    Q_PROPERTY( int contentsX READ contentsX )
+    Q_PROPERTY( int contentsY READ contentsY )
+#ifndef QT_NO_DRAGANDDROP
+    Q_PROPERTY( bool dragAutoScroll READ dragAutoScroll WRITE setDragAutoScroll )
+#endif
+
+public:
+    TQScrollView(TQWidget* parent=0, const char* name=0, WFlags f=0);
+    ~TQScrollView();
+
+    enum ResizePolicy { Default, Manual, AutoOne, AutoOneFit };
+    virtual void setResizePolicy( ResizePolicy );
+    ResizePolicy resizePolicy() const;
+
+    void styleChange( TQStyle & );
+    void removeChild(TQWidget* child);
+    virtual void addChild( TQWidget* child, int x=0, int y=0 );
+    virtual void moveChild( TQWidget* child, int x, int y );
+    int childX(TQWidget* child);
+    int childY(TQWidget* child);
+    bool childIsVisible(TQWidget* child) { return child->isVisible(); } // obsolete functions
+    void showChild(TQWidget* child, bool yes=TRUE) {
+	if ( yes )
+	    child->show();
+	else
+	    child->hide();
+    }
+
+    enum ScrollBarMode { Auto, AlwaysOff, AlwaysOn };
+
+    ScrollBarMode vScrollBarMode() const;
+    virtual void  setVScrollBarMode( ScrollBarMode );
+
+    ScrollBarMode hScrollBarMode() const;
+    virtual void  setHScrollBarMode( ScrollBarMode );
+
+    TQWidget*     cornerWidget() const;
+    virtual void setCornerWidget(TQWidget*);
+
+    // ### 4.0: Consider providing a factory function for scrollbars
+    //          (e.g. make the two following functions virtual)
+    TQScrollBar*  horizontalScrollBar() const;
+    TQScrollBar*  verticalScrollBar() const;
+    TQWidget*	 viewport() const;
+    TQWidget*	 clipper() const;
+
+    int		visibleWidth() const;
+    int		visibleHeight() const;
+
+    int		contentsWidth() const;
+    int		contentsHeight() const;
+    int		contentsX() const;
+    int		contentsY() const;
+
+    void	resize( int w, int h );
+    void	resize( const TQSize& );
+    void	show();
+
+    void	updateContents( int x, int y, int w, int h );
+    void	updateContents( const TQRect& r );
+    void 	updateContents();
+    void	repaintContents( int x, int y, int w, int h, bool erase=TRUE );
+    void	repaintContents( const TQRect& r, bool erase=TRUE );
+    void 	repaintContents( bool erase=TRUE );
+    void	contentsToViewport( int x, int y, int& vx, int& vy ) const;
+    void	viewportToContents( int vx, int vy, int& x, int& y ) const;
+    TQPoint	contentsToViewport( const TQPoint& ) const;
+    TQPoint	viewportToContents( const TQPoint& ) const;
+    void	enableClipper( bool y );
+
+    void	setStaticBackground( bool y );
+    bool	hasStaticBackground() const;
+
+    TQSize	viewportSize( int, int ) const;
+    TQSize	sizeHint() const;
+    TQSize	minimumSizeHint() const;
+
+    void	removeChild(TQObject* child);
+
+    bool	isHorizontalSliderPressed();
+    bool	isVerticalSliderPressed();
+
+#ifndef QT_NO_DRAGANDDROP
+    virtual void setDragAutoScroll( bool b );
+    bool	 dragAutoScroll() const;
+#endif
+
+signals:
+    void	contentsMoving(int x, int y);
+    void	horizontalSliderPressed();
+    void	horizontalSliderReleased();
+    void	verticalSliderPressed();
+    void	verticalSliderReleased();
+
+public slots:
+    virtual void resizeContents( int w, int h );
+    void	scrollBy( int dx, int dy );
+    virtual void setContentsPos( int x, int y );
+    void	ensureVisible(int x, int y);
+    void	ensureVisible(int x, int y, int xmargin, int ymargin);
+    void	center(int x, int y);
+    void	center(int x, int y, float xmargin, float ymargin);
+
+    void	updateScrollBars(); // ### virtual in 4.0
+    void	setEnabled( bool enable );
+
+protected:
+    virtual void drawContents(TQPainter*, int cx, int cy, int cw, int ch);
+    virtual void drawContentsOffset(TQPainter*, int ox, int oy,
+		    int cx, int cy, int cw, int ch);
+
+
+    virtual void contentsMousePressEvent( TQMouseEvent* );
+    virtual void contentsMouseReleaseEvent( TQMouseEvent* );
+    virtual void contentsMouseDoubleClickEvent( TQMouseEvent* );
+    virtual void contentsMouseMoveEvent( TQMouseEvent* );
+#ifndef QT_NO_DRAGANDDROP
+    virtual void contentsDragEnterEvent( TQDragEnterEvent * );
+    virtual void contentsDragMoveEvent( TQDragMoveEvent * );
+    virtual void contentsDragLeaveEvent( TQDragLeaveEvent * );
+    virtual void contentsDropEvent( TQDropEvent * );
+#endif
+#ifndef QT_NO_WHEELEVENT
+    virtual void contentsWheelEvent( TQWheelEvent * );
+#endif
+    virtual void contentsContextMenuEvent( TQContextMenuEvent * );
+
+
+    virtual void viewportPaintEvent( TQPaintEvent* );
+    virtual void viewportResizeEvent( TQResizeEvent* );
+    virtual void viewportMousePressEvent( TQMouseEvent* );
+    virtual void viewportMouseReleaseEvent( TQMouseEvent* );
+    virtual void viewportMouseDoubleClickEvent( TQMouseEvent* );
+    virtual void viewportMouseMoveEvent( TQMouseEvent* );
+#ifndef QT_NO_DRAGANDDROP
+    virtual void viewportDragEnterEvent( TQDragEnterEvent * );
+    virtual void viewportDragMoveEvent( TQDragMoveEvent * );
+    virtual void viewportDragLeaveEvent( TQDragLeaveEvent * );
+    virtual void viewportDropEvent( TQDropEvent * );
+#endif
+#ifndef QT_NO_WHEELEVENT
+    virtual void viewportWheelEvent( TQWheelEvent * );
+#endif
+    virtual void viewportContextMenuEvent( TQContextMenuEvent * );
+
+    void	frameChanged();
+
+    virtual void setMargins(int left, int top, int right, int bottom);
+    int leftMargin() const;
+    int topMargin() const;
+    int rightMargin() const;
+    int bottomMargin() const;
+
+    bool focusNextPrevChild( bool next );
+
+    virtual void setHBarGeometry(TQScrollBar& hbar, int x, int y, int w, int h);
+    virtual void setVBarGeometry(TQScrollBar& vbar, int x, int y, int w, int h);
+
+    void resizeEvent(TQResizeEvent*);
+    void  mousePressEvent( TQMouseEvent * );
+    void  mouseReleaseEvent( TQMouseEvent * );
+    void  mouseDoubleClickEvent( TQMouseEvent * );
+    void  mouseMoveEvent( TQMouseEvent * );
+#ifndef QT_NO_WHEELEVENT
+    void  wheelEvent( TQWheelEvent * );
+#endif
+    void contextMenuEvent( TQContextMenuEvent * );
+    bool eventFilter( TQObject *, TQEvent *e );
+
+    void setCachedSizeHint( const TQSize &sh ) const;
+    TQSize cachedSizeHint() const;
+    void fontChange( const TQFont & );
+
+private:
+    void drawContents( TQPainter* );
+    void moveContents(int x, int y);
+
+    TQScrollViewData* d;
+
+private slots:
+    void hslide(int);
+    void vslide(int);
+    void hbarIsPressed();
+    void hbarIsReleased();
+    void vbarIsPressed();
+    void vbarIsReleased();
+#ifndef QT_NO_DRAGANDDROP
+    void doDragAutoScroll();
+    void startDragAutoScroll();
+    void stopDragAutoScroll();
+#endif
+
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQScrollView( const TQScrollView & );
+    TQScrollView &operator=( const TQScrollView & );
+#endif
+    void changeFrameRect(const TQRect&);
+
+public:
+    void disableSizeHintCaching();
+
+};
+
+#endif // QT_NO_SCROLLVIEW
+
+#endif // TQSCROLLVIEW_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qscrollview-m.png b/doc/html/qscrollview-m.png new file mode 100644 index 00000000..28770df5 Binary files /dev/null and b/doc/html/qscrollview-m.png differ diff --git a/doc/html/qscrollview-members.html b/doc/html/qscrollview-members.html new file mode 100644 index 00000000..0765c72b --- /dev/null +++ b/doc/html/qscrollview-members.html @@ -0,0 +1,424 @@ + + + + + +TQScrollView Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQScrollView

+ +

This is the complete list of member functions for +TQScrollView, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qscrollview-vp.png b/doc/html/qscrollview-vp.png new file mode 100644 index 00000000..27d456f3 Binary files /dev/null and b/doc/html/qscrollview-vp.png differ diff --git a/doc/html/qscrollview-vp2.png b/doc/html/qscrollview-vp2.png new file mode 100644 index 00000000..1d549180 Binary files /dev/null and b/doc/html/qscrollview-vp2.png differ diff --git a/doc/html/qscrollview-w.png b/doc/html/qscrollview-w.png new file mode 100644 index 00000000..dba6c5f5 Binary files /dev/null and b/doc/html/qscrollview-w.png differ diff --git a/doc/html/qscrollview.html b/doc/html/qscrollview.html new file mode 100644 index 00000000..887e8377 --- /dev/null +++ b/doc/html/qscrollview.html @@ -0,0 +1,930 @@ + + + + + +TQScrollView Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQScrollView Class Reference

+ +

The TQScrollView widget provides a scrolling area with on-demand scroll bars. +More... +

#include <qscrollview.h> +

Inherits TQFrame. +

Inherited by TQCanvasView, TQTable, TQGridView, TQIconView, TQListBox, TQListView, and TQTextEdit. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • int contentsHeight - the height of the contents area  (read only)
  • +
  • int contentsWidth - the width of the contents area  (read only)
  • +
  • int contentsX - the X coordinate of the contents that are at the left edge of the viewport  (read only)
  • +
  • int contentsY - the Y coordinate of the contents that are at the top edge of the viewport  (read only)
  • +
  • bool dragAutoScroll - whether autoscrolling in drag move events is enabled
  • +
  • ScrollBarMode hScrollBarMode - the mode for the horizontal scroll bar
  • +
  • ResizePolicy resizePolicy - the resize policy
  • +
  • ScrollBarMode vScrollBarMode - the mode for the vertical scroll bar
  • +
  • int visibleHeight - the vertical amount of the content that is visible  (read only)
  • +
  • int visibleWidth - the horizontal amount of the content that is visible  (read only)
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQScrollView widget provides a scrolling area with on-demand scroll bars. +

+ +

The TQScrollView is a large canvas - potentially larger than the +coordinate system normally supported by the underlying window +system. This is important because it is tquite easy to go beyond +these limitations (e.g. many web pages are more than 32000 pixels +high). Additionally, the TQScrollView can have TQWidgets positioned +on it that scroll around with the drawn content. These sub-widgets +can also have positions outside the normal coordinate range (but +they are still limited in size). +

To provide content for the widget, inherit from TQScrollView, +reimplement drawContents() and use resizeContents() to set the +size of the viewed area. Use addChild() and moveChild() to +position widgets on the view. +

To use TQScrollView effectively it is important to understand its +widget structure in the three styles of use: a single large child +widget, a large panning area with some widgets and a large panning +area with many widgets. +

Using One Big Widget +

+

+

The first, simplest usage of TQScrollView (depicted above), is +appropriate for scrolling areas that are never more than about +4000 pixels in either dimension (this is about the maximum +reliable size on X11 servers). In this usage, you just make one +large child in the TQScrollView. The child should be a child of the +viewport() of the scrollview and be added with addChild(): +

+        TQScrollView* sv = new TQScrollView(...);
+        TQVBox* big_box = new TQVBox(sv->viewport());
+        sv->addChild(big_box);
+    
+ +You can go on to add arbitrary child widgets to the single child +in the scrollview as you would with any widget: +
+        TQLabel* child1 = new TQLabel("CHILD", big_box);
+        TQLabel* child2 = new TQLabel("CHILD", big_box);
+        TQLabel* child3 = new TQLabel("CHILD", big_box);
+        ...
+    
+ +

Here the TQScrollView has four children: the viewport(), the +verticalScrollBar(), the horizontalScrollBar() and a small +cornerWidget(). The viewport() has one child: the big TQVBox. The +TQVBox has the three TQLabel objects as child widgets. When the view +is scrolled, the TQVBox is moved; its children move with it as +child widgets normally do. +

Using a Very Big View with Some Widgets +

+

+

The second usage of TQScrollView (depicted above) is appropriate +when few, if any, widgets are on a very large scrolling area that +is potentially larger than 4000 pixels in either dimension. In +this usage you call resizeContents() to set the size of the area +and reimplement drawContents() to paint the contents. You may also +add some widgets by making them children of the viewport() and +adding them with addChild() (this is the same as the process for +the single large widget in the previous example): +

+        TQScrollView* sv = new TQScrollView(...);
+        TQLabel* child1 = new TQLabel("CHILD", sv->viewport());
+        sv->addChild(child1);
+        TQLabel* child2 = new TQLabel("CHILD", sv->viewport());
+        sv->addChild(child2);
+        TQLabel* child3 = new TQLabel("CHILD", sv->viewport());
+        sv->addChild(child3);
+    
+ +Here, the TQScrollView has the same four children: the viewport(), +the verticalScrollBar(), the horizontalScrollBar() and a small +cornerWidget(). The viewport() has the three TQLabel objects as +child widgets. When the view is scrolled, the scrollview moves the +child widgets individually. +

Using a Very Big View with Many Widgets +

+

+

+

The final usage of TQScrollView (depicted above) is appropriate +when many widgets are on a very large scrolling area that is +potentially larger than 4000 pixels in either dimension. In this +usage you call resizeContents() to set the size of the area and +reimplement drawContents() to paint the contents. You then call +enableClipper(TRUE) and add widgets, again by making them children +of the viewport(), and adding them with addChild(): +

+        TQScrollView* sv = new TQScrollView(...);
+        sv->enableClipper(TRUE);
+        TQLabel* child1 = new TQLabel("CHILD", sv->viewport());
+        sv->addChild(child1);
+        TQLabel* child2 = new TQLabel("CHILD", sv->viewport());
+        sv->addChild(child2);
+        TQLabel* child3 = new TQLabel("CHILD", sv->viewport());
+        sv->addChild(child3);
+    
+ +

Here, the TQScrollView has four children: the clipper() (not the +viewport() this time), the verticalScrollBar(), the +horizontalScrollBar() and a small cornerWidget(). The clipper() +has one child: the viewport(). The viewport() has the same three +labels as child widgets. When the view is scrolled the viewport() +is moved; its children move with it as child widgets normally do. +

+

Details Relevant for All Views +

+

Normally you will use the first or third method if you want any +child widgets in the view. +

Note that the widget you see in the scrolled area is the +viewport() widget, not the TQScrollView itself. So to turn mouse +tracking on, for example, use viewport()->setMouseTracking(TRUE). +

To enable drag-and-drop, you would setAcceptDrops(TRUE) on the +TQScrollView (because drag-and-drop events propagate to the +parent). But to work out the logical position in the view, you +would need to map the drop co-ordinate from being relative to the +TQScrollView to being relative to the contents; use the function +viewportToContents() for this. +

To handle mouse events on the scrolling area, subclass scrollview +as you would subclass other widgets, but rather than +reimplementing mousePressEvent(), reimplement +contentsMousePressEvent() instead. The contents specific event +handlers provide translated events in the coordinate system of the +scrollview. If you reimplement mousePressEvent(), you'll get +called only when part of the TQScrollView is clicked: and the only +such part is the "corner" (if you don't set a cornerWidget()) and +the frame; everything else is covered up by the viewport, clipper +or scroll bars. +

When you construct a TQScrollView, some of the widget flags apply +to the viewport() instead of being sent to the TQWidget constructor +for the TQScrollView. This applies to WNoAutoErase, WStaticContents, and WPaintClever. See TQt::WidgetFlags for +documentation about these flags. Here are some examples: +

    +

  • An image-manipulation widget would use WNoAutoErase|WStaticContents because the widget draws all pixels +itself, and when its size increases, it only needs a paint event +for the new part because the old part remains unchanged. +

  • A scrolling game widget in which the background scrolls as the +characters move might use WNoAutoErase (in addition to WStaticContents) so that the window system background does not +flash in and out during scrolling. +

  • A word processing widget might use WNoAutoErase and repaint +itself line by line to get a less-flickery resizing. If the widget +is in a mode in which no text justification can take place, it +might use WStaticContents too, so that it would only get a +repaint for the newly visible parts. +

+

Child widgets may be moved using addChild() or moveChild(). Use +childX() and childY() to get the position of a child widget. +

A widget may be placed in the corner between the vertical and +horizontal scrollbars with setCornerWidget(). You can get access +to the scrollbars using horizontalScrollBar() and +verticalScrollBar(), and to the viewport with viewport(). The +scroll view can be scrolled using scrollBy(), ensureVisible(), +setContentsPos() or center(). +

The visible area is given by visibleWidth() and visibleHeight(), +and the contents area by contentsWidth() and contentsHeight(). The +contents may be repainted using one of the repaintContents() or +updateContents() functions. +

Coordinate conversion is provided by contentsToViewport() and +viewportToContents(). +

The contentsMoving() signal is emitted just before the contents +are moved to a new position. +

Warning: TQScrollView currently does not erase the background when +resized, i.e. you must always clear the background manually in +scrollview subclasses. This will change in a future version of TQt +and we recommend specifying the WNoAutoErase flag explicitly. +

+

See also Abstract Widget Classes. + +


Member Type Documentation

+

TQScrollView::ResizePolicy

+ +

This enum type is used to control a TQScrollView's reaction to +resize events. +

    +
  • TQScrollView::Default - the TQScrollView selects one of the other settings +automatically when it has to. In this version of TQt, TQScrollView +changes to Manual if you resize the contents with +resizeContents() and to AutoOne if a child is added. +
  • TQScrollView::Manual - the contents stays the size set by resizeContents(). +
  • TQScrollView::AutoOne - if there is only one child widget the contents stays +the size of that widget. Otherwise the behavior is undefined. +
  • TQScrollView::AutoOneFit - if there is only one child widget the contents stays +the size of that widget's sizeHint(). If the scrollview is resized +larger than the child's sizeHint(), the child will be resized to +fit. If there is more than one child, the behavior is undefined. +

+

TQScrollView::ScrollBarMode

+ +

This enum type describes the various modes of TQScrollView's scroll +bars. +

    +
  • TQScrollView::Auto - TQScrollView shows a scroll bar when the content is +too large to fit and not otherwise. This is the default. +
  • TQScrollView::AlwaysOff - TQScrollView never shows a scroll bar. +
  • TQScrollView::AlwaysOn - TQScrollView always shows a scroll bar. +

(The modes for the horizontal and vertical scroll bars are +independent.) + +


Member Function Documentation

+

TQScrollView::TQScrollView ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

+Constructs a TQScrollView called name with parent parent and +widget flags f. +

The widget flags WStaticContents, WNoAutoErase and WPaintClever are propagated to the viewport() widget. The other +widget flags are propagated to the parent constructor as usual. + +

TQScrollView::~TQScrollView () +

+Destroys the TQScrollView. Any children added with addChild() will +be deleted. + +

void TQScrollView::addChild ( TQWidget * child, int x = 0, int y = 0 ) [virtual] +

+Inserts the widget, child, into the scrolled area positioned at +(x, y). The position defaults to (0, 0). If the child is +already in the view, it is just moved. +

You may want to call enableClipper(TRUE) if you add a large number +of widgets. + +

Example: scrollview/scrollview.cpp. +

int TQScrollView::bottomMargin () const [protected] +

+Returns the bottom margin. +

See also setMargins(). + +

void TQScrollView::center ( int x, int y ) [slot] +

+Scrolls the content so that the point (x, y) is in the center +of visible area. + +

Example: scrollview/scrollview.cpp. +

void TQScrollView::center ( int x, int y, float xmargin, float ymargin ) [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Scrolls the content so that the point (x, y) is visible with +the xmargin and ymargin margins (as fractions of visible +the area). +

For example: +

    +
  • Margin 0.0 allows (x, y) to be on the edge of the visible area. +
  • Margin 0.5 ensures that (x, y) is in middle 50% of the visible area. +
  • Margin 1.0 ensures that (x, y) is in the center of the the visible area. +
+ +

bool TQScrollView::childIsVisible ( TQWidget * child ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns TRUE if child is visible. This is equivalent +to child->isVisible(). + +

int TQScrollView::childX ( TQWidget * child ) +

+Returns the X position of the given child widget. Use this +rather than TQWidget::x() for widgets added to the view. +

This function returns 0 if child has not been added to the view. + +

int TQScrollView::childY ( TQWidget * child ) +

+Returns the Y position of the given child widget. Use this +rather than TQWidget::y() for widgets added to the view. +

This function returns 0 if child has not been added to the view. + +

TQWidget * TQScrollView::clipper () const +

+Returns the clipper widget. Contents in the scrollview are +ultimately clipped to be inside the clipper widget. +

You should not need to use this function. +

See also visibleWidth and visibleHeight. + +

void TQScrollView::contentsContextMenuEvent ( TQContextMenuEvent * e ) [virtual protected] +

+This event handler is called whenever the TQScrollView receives a +contextMenuEvent() in e: the mouse position is translated to +be a point on the contents. + +

Example: chart/canvasview.cpp. +

void TQScrollView::contentsDragEnterEvent ( TQDragEnterEvent * ) [virtual protected] +

+This event handler is called whenever the TQScrollView receives a +dragEnterEvent(): the drag position is translated to be a point +on the contents. + +

Reimplemented in TQTable. +

void TQScrollView::contentsDragLeaveEvent ( TQDragLeaveEvent * ) [virtual protected] +

+This event handler is called whenever the TQScrollView receives a +dragLeaveEvent(): the drag position is translated to be a point +on the contents. + +

Reimplemented in TQTable. +

void TQScrollView::contentsDragMoveEvent ( TQDragMoveEvent * ) [virtual protected] +

+This event handler is called whenever the TQScrollView receives a +dragMoveEvent(): the drag position is translated to be a point on +the contents. + +

Reimplemented in TQTable. +

void TQScrollView::contentsDropEvent ( TQDropEvent * ) [virtual protected] +

+This event handler is called whenever the TQScrollView receives a +dropEvent(): the drop position is translated to be a point on the +contents. + +

Reimplemented in TQTable. +

int TQScrollView::contentsHeight () const +

Returns the height of the contents area. +See the "contentsHeight" property for details. +

void TQScrollView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) [virtual protected] +

+This event handler is called whenever the TQScrollView receives a +mouseDoubleClickEvent(): the click position in e is translated to be a +point on the contents. +

The default implementation generates a normal mouse press event. + +

Reimplemented in TQListView. +

void TQScrollView::contentsMouseMoveEvent ( TQMouseEvent * e ) [virtual protected] +

+This event handler is called whenever the TQScrollView receives a +mouseMoveEvent(): the mouse position in e is translated to be a point +on the contents. + +

Examples: canvas/canvas.cpp and chart/canvasview.cpp. +

Reimplemented in TQListView. +

void TQScrollView::contentsMousePressEvent ( TQMouseEvent * e ) [virtual protected] +

+This event handler is called whenever the TQScrollView receives a +mousePressEvent(): the press position in e is translated to be a point +on the contents. + +

Examples: canvas/canvas.cpp and chart/canvasview.cpp. +

Reimplemented in TQListView. +

void TQScrollView::contentsMouseReleaseEvent ( TQMouseEvent * e ) [virtual protected] +

+This event handler is called whenever the TQScrollView receives a +mouseReleaseEvent(): the release position in e is translated to be a +point on the contents. + +

Reimplemented in TQListView. +

void TQScrollView::contentsMoving ( int x, int y ) [signal] +

+ +

This signal is emitted just before the contents are moved to +position (x, y). +

See also contentsX and contentsY. + +

void TQScrollView::contentsToViewport ( int x, int y, int & vx, int & vy ) const +

+Translates a point (x, y) in the contents to a point (vx, +vy) on the viewport() widget. + +

TQPoint TQScrollView::contentsToViewport ( const TQPoint & p ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the point p translated to a point on the viewport() +widget. + +

void TQScrollView::contentsWheelEvent ( TQWheelEvent * e ) [virtual protected] +

+This event handler is called whenever the TQScrollView receives a +wheelEvent() in e: the mouse position is translated to be a +point on the contents. + +

int TQScrollView::contentsWidth () const +

Returns the width of the contents area. +See the "contentsWidth" property for details. +

int TQScrollView::contentsX () const +

Returns the X coordinate of the contents that are at the left edge of the viewport. +See the "contentsX" property for details. +

int TQScrollView::contentsY () const +

Returns the Y coordinate of the contents that are at the top edge of the viewport. +See the "contentsY" property for details. +

TQWidget * TQScrollView::cornerWidget () const +

+Returns the widget in the corner between the two scroll bars. +

By default, no corner widget is present. + +

Example: scrollview/scrollview.cpp. +

bool TQScrollView::dragAutoScroll () const +

Returns TRUE if autoscrolling in drag move events is enabled; otherwise returns FALSE. +See the "dragAutoScroll" property for details. +

void TQScrollView::drawContents ( TQPainter * p, int clipx, int clipy, int clipw, int cliph ) [virtual protected] +

+ +

Reimplement this function if you are viewing a drawing area rather +than a widget. +

The function should draw the rectangle (clipx, clipy, clipw, cliph) of the contents using painter p. The clip +rectangle is in the scrollview's coordinates. +

For example: +

+    {
+        // Fill a 40000 by 50000 rectangle at (100000,150000)
+
+        // Calculate the coordinates...
+        int x1 = 100000, y1 = 150000;
+        int x2 = x1+40000-1, y2 = y1+50000-1;
+
+        // Clip the coordinates so X/Windows will not have problems...
+        if (x1 < clipx) x1=clipx;
+        if (y1 < clipy) y1=clipy;
+        if (x2 > clipx+clipw-1) x2=clipx+clipw-1;
+        if (y2 > clipy+cliph-1) y2=clipy+cliph-1;
+
+        // Paint using the small coordinates...
+        if ( x2 >= x1 && y2 >= y1 )
+            p->fillRect(x1, y1, x2-x1+1, y2-y1+1, red);
+    }
+    
+ +

The clip rectangle and translation of the painter p is already +set appropriately. + +

Example: qdir/qdir.cpp. +

Reimplemented in TQCanvasView and TQTable. +

void TQScrollView::drawContentsOffset ( TQPainter * p, int offsetx, int offsety, int clipx, int clipy, int clipw, int cliph ) [virtual protected] +

+For backward-compatibility only. It is easier to use +drawContents(TQPainter*,int,int,int,int). +

The default implementation translates the painter appropriately +and calls drawContents(TQPainter*,int,int,int,int). See +drawContents() for an explanation of the parameters p, offsetx, offsety, clipx, clipy, clipw and cliph. + +

Reimplemented in TQListView. +

void TQScrollView::enableClipper ( bool y ) +

+When a large numbers of child widgets are in a scrollview, +especially if they are close together, the scrolling performance +can suffer greatly. If y is TRUE the scrollview will use an +extra widget to group child widgets. +

Note that you may only call enableClipper() prior to adding +widgets. +

For a full discussion, see this class's detailed description. + +

Example: scrollview/scrollview.cpp. +

void TQScrollView::ensureVisible ( int x, int y ) [slot] +

+Scrolls the content so that the point (x, y) is visible with at +least 50-pixel margins (if possible, otherwise centered). + +

void TQScrollView::ensureVisible ( int x, int y, int xmargin, int ymargin ) [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Scrolls the content so that the point (x, y) is visible with at +least the xmargin and ymargin margins (if possible, +otherwise centered). + +

bool TQScrollView::eventFilter ( TQObject * obj, TQEvent * e ) [virtual protected] +

+This event filter ensures the scroll bars are updated when a +single contents widget is resized, shown, hidden or destroyed; it +passes mouse events to the TQScrollView. The event is in e and +the object is in obj. + +

Reimplemented from TQObject. +

Reimplemented in TQListView. +

ScrollBarMode TQScrollView::hScrollBarMode () const +

Returns the mode for the horizontal scroll bar. +See the "hScrollBarMode" property for details. +

bool TQScrollView::hasStaticBackground () const +

+Returns TRUE if TQScrollView uses a static background; otherwise +returns FALSE. +

See also setStaticBackground(). + +

TQScrollBar * TQScrollView::horizontalScrollBar () const +

+Returns the component horizontal scroll bar. It is made available +to allow accelerators, autoscrolling, etc. +

It should not be used for other purposes. +

This function never returns 0. + +

void TQScrollView::horizontalSliderPressed () [signal] +

+ +

This signal is emitted whenever the user presses the horizontal slider. + +

void TQScrollView::horizontalSliderReleased () [signal] +

+ +

This signal is emitted whenever the user releases the horizontal slider. + +

bool TQScrollView::isHorizontalSliderPressed () +

+Returns TRUE if horizontal slider is pressed by user; otherwise returns FALSE. + +

bool TQScrollView::isVerticalSliderPressed () +

+Returns TRUE if vertical slider is pressed by user; otherwise returns FALSE. + +

int TQScrollView::leftMargin () const [protected] +

+Returns the left margin. +

See also setMargins(). + +

void TQScrollView::moveChild ( TQWidget * child, int x, int y ) [virtual] +

+Repositions the child widget to (x, y). This function is +the same as addChild(). + +

void TQScrollView::removeChild ( TQWidget * child ) +

+Removes the child widget from the scrolled area. Note that this +happens automatically if the child is deleted. + +

void TQScrollView::repaintContents ( int x, int y, int w, int h, bool erase = TRUE ) +

+Calls repaint() on a rectangle defined by x, y, w, h, +translated appropriately. If the rectangle is not visible, nothing +is repainted. If erase is TRUE the background is cleared using +the background color. +

See also updateContents(). + +

void TQScrollView::repaintContents ( const TQRect & r, bool erase = TRUE ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Repaints the contents of rectangle r. If erase is TRUE the +background is cleared using the background color. + +

void TQScrollView::repaintContents ( bool erase = TRUE ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Repaints the contents. If erase is TRUE the background is +cleared using the background color. + +

void TQScrollView::resizeContents ( int w, int h ) [virtual slot] +

+Sets the size of the contents area to w pixels wide and h +pixels high and updates the viewport accordingly. + +

ResizePolicy TQScrollView::resizePolicy () const +

Returns the resize policy. +See the "resizePolicy" property for details. +

int TQScrollView::rightMargin () const [protected] +

+Returns the right margin. +

See also setMargins(). + +

void TQScrollView::scrollBy ( int dx, int dy ) [slot] +

+Scrolls the content by dx to the left and dy upwards. + +

void TQScrollView::setContentsPos ( int x, int y ) [virtual slot] +

+Scrolls the content so that the point (x, y) is in the top-left +corner. + +

Example: process/process.cpp. +

void TQScrollView::setCornerWidget ( TQWidget * corner ) [virtual] +

+Sets the widget in the corner between the two scroll bars. +

You will probably also want to set at least one of the scroll bar +modes to AlwaysOn. +

Passing 0 shows no widget in the corner. +

Any previous corner widget is hidden. +

You may call setCornerWidget() with the same widget at different +times. +

All widgets set here will be deleted by the TQScrollView when it is +destroyed unless you separately reparent the widget after setting +some other corner widget (or 0). +

Any newly set widget should have no current parent. +

By default, no corner widget is present. +

See also vScrollBarMode and hScrollBarMode. + +

Example: scrollview/scrollview.cpp. +

void TQScrollView::setDragAutoScroll ( bool b ) [virtual] +

Sets whether autoscrolling in drag move events is enabled to b. +See the "dragAutoScroll" property for details. +

void TQScrollView::setHBarGeometry ( TQScrollBar & hbar, int x, int y, int w, int h ) [virtual protected] +

+Called when the horizontal scroll bar geometry changes. This is +provided as a protected function so that subclasses can do +interesting things such as providing extra buttons in some of the +space normally used by the scroll bars. +

The default implementation simply gives all the space to hbar. +The new geometry is given by x, y, w and h. +

See also setVBarGeometry(). + +

void TQScrollView::setHScrollBarMode ( ScrollBarMode ) [virtual] +

Sets the mode for the horizontal scroll bar. +See the "hScrollBarMode" property for details. +

void TQScrollView::setMargins ( int left, int top, int right, int bottom ) [virtual protected] +

+Sets the margins around the scrolling area to left, top, right and bottom. This is useful for applications such as +spreadsheets with "locked" rows and columns. The marginal space is +inside the frameRect() and is left blank; reimplement +drawFrame() or put widgets in the unused area. +

By default all margins are zero. +

See also frameChanged(). + +

void TQScrollView::setResizePolicy ( ResizePolicy ) [virtual] +

Sets the resize policy. +See the "resizePolicy" property for details. +

void TQScrollView::setStaticBackground ( bool y ) +

+Sets the scrollview to have a static background if y is TRUE, +or a scrolling background if y is FALSE. By default, the +background is scrolling. +

Be aware that this mode is tquite slow, as a full repaint of the +visible area has to be triggered on every contents move. +

See also hasStaticBackground(). + +

void TQScrollView::setVBarGeometry ( TQScrollBar & vbar, int x, int y, int w, int h ) [virtual protected] +

+Called when the vertical scroll bar geometry changes. This is +provided as a protected function so that subclasses can do +interesting things such as providing extra buttons in some of the +space normally used by the scroll bars. +

The default implementation simply gives all the space to vbar. +The new geometry is given by x, y, w and h. +

See also setHBarGeometry(). + +

void TQScrollView::setVScrollBarMode ( ScrollBarMode ) [virtual] +

Sets the mode for the vertical scroll bar. +See the "vScrollBarMode" property for details. +

void TQScrollView::showChild ( TQWidget * child, bool y = TRUE ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Sets the visibility of child. Equivalent to +TQWidget::show() or TQWidget::hide(). + +

int TQScrollView::topMargin () const [protected] +

+Returns the top margin. +

See also setMargins(). + +

void TQScrollView::updateContents ( int x, int y, int w, int h ) +

+Calls update() on a rectangle defined by x, y, w, h, +translated appropriately. If the rectangle is not visible, nothing +is repainted. +

See also repaintContents(). + +

void TQScrollView::updateContents ( const TQRect & r ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Updates the contents in rectangle r + +

void TQScrollView::updateContents () +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

void TQScrollView::updateScrollBars () [slot] +

+Updates scroll bars: all possibilities are considered. You should +never need to call this in your code. + +

ScrollBarMode TQScrollView::vScrollBarMode () const +

Returns the mode for the vertical scroll bar. +See the "vScrollBarMode" property for details. +

TQScrollBar * TQScrollView::verticalScrollBar () const +

+Returns the component vertical scroll bar. It is made available to +allow accelerators, autoscrolling, etc. +

It should not be used for other purposes. +

This function never returns 0. + +

void TQScrollView::verticalSliderPressed () [signal] +

+ +

This signal is emitted whenever the user presses the vertical slider. + +

void TQScrollView::verticalSliderReleased () [signal] +

+ +

This signal is emitted whenever the user releases the vertical slider. + +

TQWidget * TQScrollView::viewport () const +

+Returns the viewport widget of the scrollview. This is the widget +containing the contents widget or which is the drawing area. + +

Examples: helpsystem/tooltip.cpp and scrollview/scrollview.cpp. +

void TQScrollView::viewportPaintEvent ( TQPaintEvent * pe ) [virtual protected] +

+This is a low-level painting routine that draws the viewport +contents. Reimplement this if drawContents() is too high-level +(for example, if you don't want to open a TQPainter on the +viewport). The paint event is passed in pe. + +

void TQScrollView::viewportResizeEvent ( TQResizeEvent * ) [virtual protected] +

+To provide simple processing of events on the contents, this +function receives all resize events sent to the viewport. +

See also TQWidget::resizeEvent(). + +

Example: chart/canvasview.cpp. +

TQSize TQScrollView::viewportSize ( int x, int y ) const +

+Returns the viewport size for size (x, y). +

The viewport size depends on (x, y) (the size of the contents), +the size of this widget and the modes of the horizontal and +vertical scroll bars. +

This function permits widgets that can trade vertical and +horizontal space for each other to control scroll bar appearance +better. For example, a word processor or web browser can control +the width of the right margin accurately, whether or not there +needs to be a vertical scroll bar. + +

void TQScrollView::viewportToContents ( int vx, int vy, int & x, int & y ) const +

+Translates a point (vx, vy) on the viewport() widget to a +point (x, y) in the contents. + +

TQPoint TQScrollView::viewportToContents ( const TQPoint & vp ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the point on the viewport vp translated to a point in +the contents. + +

int TQScrollView::visibleHeight () const +

Returns the vertical amount of the content that is visible. +See the "visibleHeight" property for details. +

int TQScrollView::visibleWidth () const +

Returns the horizontal amount of the content that is visible. +See the "visibleWidth" property for details. +


Property Documentation

+

int contentsHeight

+

This property holds the height of the contents area. +

+

Get this property's value with contentsHeight(). +

int contentsWidth

+

This property holds the width of the contents area. +

+

Get this property's value with contentsWidth(). +

int contentsX

+

This property holds the X coordinate of the contents that are at the left edge of the viewport. +

+

Get this property's value with contentsX(). +

int contentsY

+

This property holds the Y coordinate of the contents that are at the top edge of the viewport. +

+

Get this property's value with contentsY(). +

bool dragAutoScroll

+

This property holds whether autoscrolling in drag move events is enabled. +

If this property is set to TRUE (the default), the TQScrollView +automatically scrolls the contents in drag move events if the user +moves the cursor close to a border of the view. Of course this +works only if the viewport accepts drops. Specifying FALSE +disables this autoscroll feature. +

Warning: Enabling this property might not be enough to +effectively turn on autoscrolling. If you put a custom widget in +the TQScrollView, you might need to call TQDragEvent::ignore() on +the event in the dragEnterEvent() and dragMoveEvent() +reimplementations. + +

Set this property's value with setDragAutoScroll() and get this property's value with dragAutoScroll(). +

ScrollBarMode hScrollBarMode

+

This property holds the mode for the horizontal scroll bar. +

The default mode is TQScrollView::Auto. +

See also vScrollBarMode. + +

Set this property's value with setHScrollBarMode() and get this property's value with hScrollBarMode(). +

ResizePolicy resizePolicy

+

This property holds the resize policy. +

The default is Default. +

See also ResizePolicy. + +

Set this property's value with setResizePolicy() and get this property's value with resizePolicy(). +

ScrollBarMode vScrollBarMode

+

This property holds the mode for the vertical scroll bar. +

The default mode is TQScrollView::Auto. +

See also hScrollBarMode. + +

Set this property's value with setVScrollBarMode() and get this property's value with vScrollBarMode(). +

int visibleHeight

+

This property holds the vertical amount of the content that is visible. +

+

Get this property's value with visibleHeight(). +

int visibleWidth

+

This property holds the horizontal amount of the content that is visible. +

+

Get this property's value with visibleWidth(). + +


+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/qsemaphore-h.html b/doc/html/qsemaphore-h.html new file mode 100644 index 00000000..4f9128b7 --- /dev/null +++ b/doc/html/qsemaphore-h.html @@ -0,0 +1,126 @@ + + + + + +qsemaphore.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsemaphore.h

+ +

This is the verbatim text of the qsemaphore.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsemaphore.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQSemaphore class
+**
+** Created : 931107
+**
+** 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 retquirements 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 TQSEMAPHORE_H
+#define TQSEMAPHORE_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#endif // QT_H
+
+#if defined(QT_THREAD_SUPPORT)
+
+class TQSemaphorePrivate;
+
+class Q_EXPORT TQSemaphore
+{
+public:
+    TQSemaphore( int );
+    virtual ~TQSemaphore();
+
+    int available() const;
+    int total() const;
+
+    // postfix operators
+    int operator++(int);
+    int operator--(int);
+
+    int operator+=(int);
+    int operator-=(int);
+
+    bool tryAccess(int);
+
+private:
+    TQSemaphorePrivate *d;
+
+#if defined(Q_DISABLE_COPY)
+    TQSemaphore(const TQSemaphore &);
+    TQSemaphore &operator=(const TQSemaphore &);
+#endif
+};
+
+#endif
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsemaphore-members.html b/doc/html/qsemaphore-members.html new file mode 100644 index 00000000..6f4cc613 --- /dev/null +++ b/doc/html/qsemaphore-members.html @@ -0,0 +1,55 @@ + + + + + +TQSemaphore Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSemaphore

+ +

This is the complete list of member functions for +TQSemaphore, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsemaphore.html b/doc/html/qsemaphore.html new file mode 100644 index 00000000..924be989 --- /dev/null +++ b/doc/html/qsemaphore.html @@ -0,0 +1,149 @@ + + + + + +TQSemaphore Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSemaphore Class Reference

+ +

The TQSemaphore class provides a robust integer semaphore. +More... +

All the functions in this class are thread-safe when TQt is built with thread support.

+

#include <qsemaphore.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQSemaphore class provides a robust integer semaphore. +

+ +

A TQSemaphore can be used to serialize thread execution, in a +similar way to a TQMutex. A semaphore differs from a mutex, in +that a semaphore can be accessed by more than one thread at a +time. +

For example, suppose we have an application that stores data in a +large tree structure. The application creates 10 threads +(commonly called a thread pool) to perform searches on the tree. +When the application searches the tree for some piece of data, it +uses one thread per base node to do the searching. A semaphore +could be used to make sure that two threads don't try to search +the same branch of the tree at the same time. +

A non-computing example of a semaphore would be dining at a +restuarant. A semaphore is initialized to have a maximum count +equal to the number of chairs in the restuarant. As people +arrive, they want a seat. As seats are filled, the semaphore is +accessed, once per person. As people leave, the access is +released, allowing more people to enter. If a party of 10 people +want to be seated, but there are only 9 seats, those 10 people +will wait, but a party of 4 people would be seated (taking the +available seats to 5, making the party of 10 people wait longer). +

When a semaphore is created it is given a number which is the +maximum number of concurrent accesses it will permit. Accesses to +the sempahore are gained using operator++() or operator+=(), and +released with operator--() or operator-=(). The number of +accesses allowed is retrieved with available(), and the total +number with total(). Note that the incrementing functions will +block if there aren't enough available accesses. Use tryAccess() +if you want to actquire accesses without blocking. +

See also Environment Classes and Threading. + +


Member Function Documentation

+

TQSemaphore::TQSemaphore ( int maxcount ) +

+Creates a new semaphore. The semaphore can be concurrently +accessed at most maxcount times. + +

TQSemaphore::~TQSemaphore () [virtual] +

+Destroys the semaphore. +

Warning: If you destroy a semaphore that has accesses in use the +resultant behavior is undefined. + +

int TQSemaphore::available () const +

+Returns the number of accesses currently available to the +semaphore. + +

int TQSemaphore::operator++ ( int ) +

+Postfix ++ operator. +

Try to get access to the semaphore. If available() == 0, this +call will block until it can get access, i.e. until available() > +0. + +

int TQSemaphore::operator+= ( int n ) +

+Try to get access to the semaphore. If available() < n, this +call will block until it can get all the accesses it wants, i.e. +until available() >= n. + +

int TQSemaphore::operator-- ( int ) +

+Postfix -- operator. +

Release access of the semaphore. This wakes all threads waiting +for access to the semaphore. + +

int TQSemaphore::operator-= ( int n ) +

+Release n accesses to the semaphore. + +

int TQSemaphore::total () const +

+Returns the total number of accesses to the semaphore. + +

bool TQSemaphore::tryAccess ( int n ) +

+Try to get access to the semaphore. If available() < n, this +function will return FALSE immediately. If available() >= n, +this function will take n accesses and return TRUE. This +function does not block. + + +

+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/qserversocket-h.html b/doc/html/qserversocket-h.html new file mode 100644 index 00000000..e4d44a7f --- /dev/null +++ b/doc/html/qserversocket-h.html @@ -0,0 +1,139 @@ + + + + + +qserversocket.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qserversocket.h

+ +

This is the verbatim text of the qserversocket.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qserversocket.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQServerSocketClass.
+**
+** Created : 970521
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the network 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 retquirements 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 TQSERVERSOCKET_H
+#define TQSERVERSOCKET_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qhostaddress.h"
+#include "qsocketdevice.h" // ### remove or keep for users' convenience?
+#endif // QT_H
+#ifndef QT_NO_NETWORK
+
+#if !defined( QT_MODULE_NETWORK ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_NETWORK )
+#define TQM_EXPORT_NETWORK
+#else
+#define TQM_EXPORT_NETWORK Q_EXPORT
+#endif
+
+class TQServerSocketPrivate;
+
+
+class TQM_EXPORT_NETWORK TQServerSocket : public TQObject
+{
+    Q_OBJECT
+public:
+    TQServerSocket( Q_UINT16 port, int backlog = 1,
+		   TQObject *parent=0, const char *name=0 );
+    TQServerSocket( const TQHostAddress & address, Q_UINT16 port, int backlog = 1,
+		   TQObject *parent=0, const char *name=0 );
+    TQServerSocket( TQObject *parent=0, const char *name=0 );
+    virtual ~TQServerSocket();
+
+    bool ok() const;
+
+    Q_UINT16 port() const ;
+
+    int socket() const ;
+    virtual void setSocket( int socket );
+
+    TQHostAddress address() const ;
+
+    virtual void newConnection( int socket ) = 0;
+
+protected:
+    TQSocketDevice *socketDevice();
+
+private slots:
+    void incomingConnection( int socket );
+
+private:
+    TQServerSocketPrivate *d;
+    void init( const TQHostAddress & address, Q_UINT16 port, int backlog );
+};
+
+#endif // QT_NO_NETWORK
+#endif // TQSERVERSOCKET_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qserversocket-members.html b/doc/html/qserversocket-members.html new file mode 100644 index 00000000..ab748844 --- /dev/null +++ b/doc/html/qserversocket-members.html @@ -0,0 +1,97 @@ + + + + + +TQServerSocket Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQServerSocket

+ +

This is the complete list of member functions for +TQServerSocket, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qserversocket.html b/doc/html/qserversocket.html new file mode 100644 index 00000000..78eb9ec5 --- /dev/null +++ b/doc/html/qserversocket.html @@ -0,0 +1,173 @@ + + + + + +TQServerSocket Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQServerSocket Class Reference
[network module]

+ +

The TQServerSocket class provides a TCP-based server. +More... +

#include <qserversocket.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • TQServerSocket ( Q_UINT16 port, int backlog = 1, TQObject * parent = 0, const char * name = 0 )
  • +
  • TQServerSocket ( const TQHostAddress & address, Q_UINT16 port, int backlog = 1, TQObject * parent = 0, const char * name = 0 )
  • +
  • TQServerSocket ( TQObject * parent = 0, const char * name = 0 )
  • +
  • virtual ~TQServerSocket ()
  • +
  • bool ok () const
  • +
  • Q_UINT16 port () const
  • +
  • int socket () const
  • +
  • virtual void setSocket ( int socket )
  • +
  • TQHostAddress address () const
  • +
  • virtual void newConnection ( int socket ) = 0
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQServerSocket class provides a TCP-based server. + +

+ +

This class is a convenience class for accepting incoming TCP +connections. You can specify the port or have TQServerSocket pick +one, and listen on just one address or on all the machine's +addresses. +

Using the API is very simple: subclass TQServerSocket, call the +constructor of your choice, and implement newConnection() to +handle new incoming connections. There is nothing more to do. +

(Note that due to lack of support in the underlying APIs, +TQServerSocket cannot accept or reject connections conditionally.) +

See also TQSocket, TQSocketDevice, TQHostAddress, TQSocketNotifier, and Input/Output and Networking. + +


Member Function Documentation

+

TQServerSocket::TQServerSocket ( Q_UINT16 port, int backlog = 1, TQObject * parent = 0, const char * name = 0 ) +

+Creates a server socket object, that will serve the given port +on all the addresses of this host. If port is 0, TQServerSocket +will pick a suitable port in a system-dependent manner. Use backlog to specify how many pending connections the server can +have. +

The parent and name arguments are passed on to the TQObject +constructor. +

Warning: On Tru64 Unix systems a value of 0 for backlog means +that you don't accept any connections at all; you should specify a +value larger than 0. + +

TQServerSocket::TQServerSocket ( const TQHostAddress & address, Q_UINT16 port, int backlog = 1, TQObject * parent = 0, const char * name = 0 ) +

+Creates a server socket object, that will serve the given port +only on the given address. Use backlog to specify how many +pending connections the server can have. +

The parent and name arguments are passed on to the TQObject +constructor. +

Warning: On Tru64 Unix systems a value of 0 for backlog means +that you don't accept any connections at all; you should specify a +value larger than 0. + +

TQServerSocket::TQServerSocket ( TQObject * parent = 0, const char * name = 0 ) +

+Construct an empty server socket. +

This constructor, in combination with setSocket(), allows us to +use the TQServerSocket class as a wrapper for other socket types +(e.g. Unix Domain Sockets under Unix). +

The parent and name arguments are passed on to the TQObject +constructor. +

See also setSocket(). + +

TQServerSocket::~TQServerSocket () [virtual] +

+Destroys the socket. +

This causes any backlogged connections (connections that have +reached the host, but not yet been completely set up by calling +TQSocketDevice::accept()) to be severed. +

Existing connections continue to exist; this only affects the +acceptance of new connections. + +

TQHostAddress TQServerSocket::address () const +

+Returns the address on which this object listens, or 0.0.0.0 if +this object listens on more than one address. ok() must be TRUE +before calling this function. +

See also port() and TQSocketDevice::address(). + +

void TQServerSocket::newConnection ( int socket ) [pure virtual] +

+ +

This pure virtual function is responsible for setting up a new +incoming connection. socket is the fd (file descriptor) for the +newly accepted connection. + +

bool TQServerSocket::ok () const +

+Returns TRUE if the construction succeeded; otherwise returns FALSE. + +

Q_UINT16 TQServerSocket::port () const +

+Returns the port number on which this server socket listens. This +is always non-zero; if you specify 0 in the constructor, +TQServerSocket will pick a non-zero port itself. ok() must be TRUE +before calling this function. +

See also address() and TQSocketDevice::port(). + +

Example: network/httpd/httpd.cpp. +

void TQServerSocket::setSocket ( int socket ) [virtual] +

+Sets the socket to use socket. bind() and listen() should +already have been called for socket. +

This allows us to use the TQServerSocket class as a wrapper for +other socket types (e.g. Unix Domain Sockets). + +

int TQServerSocket::socket () const +

+Returns the operating system socket. + +

TQSocketDevice * TQServerSocket::socketDevice () [protected] +

+Returns a pointer to the internal socket device. The returned +pointer is 0 if there is no connection or pending connection. +

There is normally no need to manipulate the socket device directly +since this class does all the necessary setup for most client or +server socket applications. + + +


+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/qsessionmanager-h.html b/doc/html/qsessionmanager-h.html new file mode 100644 index 00000000..e27be2ec --- /dev/null +++ b/doc/html/qsessionmanager-h.html @@ -0,0 +1,144 @@ + + + + + +qsessionmanager.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsessionmanager.h

+ +

This is the verbatim text of the qsessionmanager.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsessionmanager.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQSessionManager class
+**
+** Created : 990510
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSESSIONMANAGER_H
+#define TQSESSIONMANAGER_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qwindowdefs.h"
+#include "qstring.h"
+#include "qstringlist.h"
+#endif // QT_H
+#ifndef QT_NO_SESSIONMANAGER
+
+class TQSessionManagerData;
+
+class Q_EXPORT  TQSessionManager : public TQObject
+{
+    Q_OBJECT
+    TQSessionManager( TQApplication *app, TQString &id, TQString &key );
+    ~TQSessionManager();
+public:
+    TQString sessionId() const;
+    TQString sessionKey() const;
+#if defined(Q_WS_X11) || defined(Q_WS_MAC)
+    void* handle() const;
+#endif
+
+    bool allowsInteraction();
+    bool allowsErrorInteraction();
+    void release();
+
+    void cancel();
+
+    enum RestartHint {
+	RestartIfRunning,
+	RestartAnyway,
+	RestartImmediately,
+	RestartNever
+    };
+    void setRestartHint( RestartHint );
+    RestartHint restartHint() const;
+
+    void setRestartCommand( const TQStringList& );
+    TQStringList restartCommand() const;
+    void setDiscardCommand( const TQStringList& );
+    TQStringList discardCommand() const;
+
+    void setManagerProperty( const TQString& name, const TQString& value );
+    void setManagerProperty( const TQString& name, const TQStringList& value );
+
+    bool isPhase2() const;
+    void requestPhase2();
+
+private:
+    friend class TQApplication;
+    friend class TQBaseApplication;
+    TQSessionManagerData* d;
+};
+
+#endif // QT_NO_SESSIONMANAGER
+#endif // TQSESSIONMANAGER_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsessionmanager-members.html b/doc/html/qsessionmanager-members.html new file mode 100644 index 00000000..a9c71235 --- /dev/null +++ b/doc/html/qsessionmanager-members.html @@ -0,0 +1,104 @@ + + + + + +TQSessionManager Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSessionManager

+ +

This is the complete list of member functions for +TQSessionManager, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsessionmanager.html b/doc/html/qsessionmanager.html new file mode 100644 index 00000000..9ad3ae9f --- /dev/null +++ b/doc/html/qsessionmanager.html @@ -0,0 +1,346 @@ + + + + + +TQSessionManager Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSessionManager Class Reference

+ +

The TQSessionManager class provides access to the session manager. +More... +

#include <qsessionmanager.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQSessionManager class provides access to the session manager. +

+ +

The session manager is responsible for session management, most +importantly for interruption and resumption. A "session" is a kind +of record of the state of the system, e.g. which applications were +run at start up and which applications are currently running. The +session manager is used to save the session, e.g. when the machine +is shut down; and to restore a session, e.g. when the machine is +started up. Use TQSettings to save and restore an individual +application's settings, e.g. window positions, recently used files, +etc. +

TQSessionManager provides an interface between the application and +the session manager so that the program can work well with the +session manager. In TQt, session management requests for action +are handled by the two virtual functions TQApplication::commitData() +and TQApplication::saveState(). Both provide a reference to +a session manager object as argument, to allow the application +to communicate with the session manager. +

During a session management action (i.e. within commitData() and +saveState()), no user interaction is possible unless the +application got explicit permission from the session manager. You +ask for permission by calling allowsInteraction() or, if it's really +urgent, allowsErrorInteraction(). TQt does not enforce this, but the +session manager may. +

You can try to abort the shutdown process by calling cancel(). The +default commitData() function does this if some top-level window +rejected its closeEvent(). +

For sophisticated session managers provided on Unix/X11, TQSessionManager +offers further possibilites to fine-tune an application's session +management behavior: setRestartCommand(), setDiscardCommand(), +setRestartHint(), setProperty(), requestPhase2(). See the respective +function descriptions for further details. +

See also Main Window and Related Classes and Environment Classes. + +


Member Type Documentation

+

TQSessionManager::RestartHint

+

This enum type defines the circumstances under which this +application wants to be restarted by the session manager. The +current values are +

    +
  • TQSessionManager::RestartIfRunning - if the application is still running when +the session is shut down, it wants to be restarted at the start of +the next session. +
  • TQSessionManager::RestartAnyway - the application wants to be started at the +start of the next session, no matter what. (This is useful for +utilities that run just after startup and then tquit.) +
  • TQSessionManager::RestartImmediately - the application wants to be started +immediately whenever it is not running. +
  • TQSessionManager::RestartNever - the application does not want to be restarted +automatically. +

The default hint is RestartIfRunning. + +


Member Function Documentation

+

bool TQSessionManager::allowsErrorInteraction () +

+ +

This is similar to allowsInteraction(), but also tells the session +manager that an error occurred. Session managers may give error +interaction request higher priority, which means that it is more likely +that an error interaction is permitted. However, you are still not +guaranteed that the session manager will allow interaction. +

See also allowsInteraction(), release(), and cancel(). + +

bool TQSessionManager::allowsInteraction () +

+ +

Asks the session manager for permission to interact with the +user. Returns TRUE if interaction is permitted; otherwise +returns FALSE. +

The rationale behind this mechanism is to make it possible to +synchronize user interaction during a shutdown. Advanced session +managers may ask all applications simultaneously to commit their +data, resulting in a much faster shutdown. +

When the interaction is completed we strongly recommend releasing the +user interaction semaphore with a call to release(). This way, other +applications may get the chance to interact with the user while your +application is still busy saving data. (The semaphore is implicitly +released when the application exits.) +

If the user decides to cancel the shutdown process during the +interaction phase, you must tell the session manager that this has +happened by calling cancel(). +

Here's an example of how an application's TQApplication::commitData() +might be implemented: +

+void MyApplication::commitData( TQSessionManager& sm ) {
+    if ( sm.allowsInteraction() ) {
+        switch ( TQMessageBox::warning(
+                    yourMainWindow,
+                    tr("Application Name"),
+                    tr("Save changes to document Foo?"),
+                    tr("&Yes"),
+                    tr("&No"),
+                    tr("Cancel"),
+                    0, 2) ) {
+        case 0: // yes
+            sm.release();
+            // save document here; if saving fails, call sm.cancel()
+            break;
+        case 1: // continue without saving
+            break;
+        default: // cancel
+            sm.cancel();
+            break;
+        }
+    } else {
+        // we did not get permission to interact, then
+        // do something reasonable instead.
+    }
+}
+
+ +

If an error occurred within the application while saving its data, +you may want to try allowsErrorInteraction() instead. +

See also TQApplication::commitData(), release(), and cancel(). + +

void TQSessionManager::cancel () +

+ +

Tells the session manager to cancel the shutdown process. Applications +should not call this function without first asking the user. +

See also allowsInteraction() and allowsErrorInteraction(). + +

+

TQStringList TQSessionManager::discardCommand () const +

+ +

Returns the currently set discard command. +

Note that if you want to iterate over the list, you should +iterate over a copy, e.g. +

+    TQStringList list = mySession.discardCommand();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also setDiscardCommand(), restartCommand(), and setRestartCommand(). + +

void * TQSessionManager::handle () const +

+ +

X11 only: returns a handle to the current SmcConnection. + +

bool TQSessionManager::isPhase2 () const +

+ +

Returns TRUE if the session manager is currently performing a second +session management phase; otherwise returns FALSE. +

See also requestPhase2(). + +

void TQSessionManager::release () +

+ +

Releases the session manager's interaction semaphore after an +interaction phase. +

See also allowsInteraction() and allowsErrorInteraction(). + +

void TQSessionManager::requestPhase2 () +

+ +

Requests a second session management phase for the application. The +application may then return immediately from the +TQApplication::commitData() or TQApplication::saveState() function, +and they will be called again once most or all other applications have +finished their session management. +

The two phases are useful for applications such as the X11 window manager +that need to store information about another application's windows +and therefore have to wait until these applications have completed their +respective session management tasks. +

Note that if another application has requested a second phase it +may get called before, simultaneously with, or after your +application's second phase. +

See also isPhase2(). + +

TQStringList TQSessionManager::restartCommand () const +

+ +

Returns the currently set restart command. +

Note that if you want to iterate over the list, you should +iterate over a copy, e.g. +

+    TQStringList list = mySession.restartCommand();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also setRestartCommand() and restartHint(). + +

RestartHint TQSessionManager::restartHint () const +

+ +

Returns the application's current restart hint. The default is +RestartIfRunning. +

See also setRestartHint(). + +

TQString TQSessionManager::sessionId () const +

+ +

Returns the identifier of the current session. +

If the application has been restored from an earlier session, this +identifier is the same as it was in that earlier session. +

See also sessionKey() and TQApplication::sessionId(). + +

TQString TQSessionManager::sessionKey () const +

+ +

Returns the session key in the current session. +

If the application has been restored from an earlier session, this +key is the same as it was when the previous session ended. +

The session key changes with every call of commitData() or +saveState(). +

See also sessionId() and TQApplication::sessionKey(). + +

void TQSessionManager::setDiscardCommand ( const TQStringList & ) +

+ +

See also discardCommand() and setRestartCommand(). + +

void TQSessionManager::setManagerProperty ( const TQString & name, const TQStringList & value ) +

+ +

Low-level write access to the application's identification and state +record are kept in the session manager. +

The property called name has its value set to the string list value. + +

void TQSessionManager::setManagerProperty ( const TQString & name, const TQString & value ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Low-level write access to the application's identification and state +records are kept in the session manager. +

The property called name has its value set to the string value. + +

void TQSessionManager::setRestartCommand ( const TQStringList & command ) +

+ +

If the session manager is capable of restoring sessions it will +execute command in order to restore the application. The command +defaults to +

+        appname -session id
+  
+ +

The -session option is mandatory; otherwise TQApplication cannot +tell whether it has been restored or what the current session +identifier is. See TQApplication::isSessionRestored() and +TQApplication::sessionId() for details. +

If your application is very simple, it may be possible to store the +entire application state in additional command line options. This +is usually a very bad idea because command lines are often limited +to a few hundred bytes. Instead, use TQSettings, or temporary files +or a database for this purpose. By marking the data with the unique +sessionId(), you will be able to restore the application in a future +session. +

See also restartCommand(), setDiscardCommand(), and setRestartHint(). + +

void TQSessionManager::setRestartHint ( RestartHint hint ) +

+ +

Sets the application's restart hint to hint. On application +startup the hint is set to RestartIfRunning. +

Note that these flags are only hints, a session manager may or may +not respect them. +

We recommend setting the restart hint in TQApplication::saveState() +because most session managers perform a checkpoint shortly after an +application's startup. +

See also restartHint(). + + +


+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/qsettings-h.html b/doc/html/qsettings-h.html new file mode 100644 index 00000000..b63e0333 --- /dev/null +++ b/doc/html/qsettings-h.html @@ -0,0 +1,204 @@ + + + + + +qsettings.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsettings.h

+ +

This is the verbatim text of the qsettings.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsettings.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQSettings class
+**
+** Created : 000626
+**
+** Copyright (C) 2000-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 retquirements 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 TQSETTINGS_H
+#define TQSETTINGS_H
+
+#ifndef QT_H
+#include "qdatetime.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_SETTINGS
+
+class TQSettingsPrivate;
+
+
+class Q_EXPORT TQSettings
+{
+public:
+    enum Format {
+	Native = 0,
+	Ini
+    };
+    enum System {
+	Unix = 0,
+	Windows,
+	Mac
+    };
+    enum Scope {
+	User,
+	Global
+    };
+
+    TQSettings();
+    TQSettings( Format format );
+
+    ~TQSettings();
+
+#if !defined(Q_NO_BOOL_TYPE)
+    bool	writeEntry( const TQString &, bool );
+#endif
+    bool	writeEntry( const TQString &, double );
+    bool	writeEntry( const TQString &, int );
+    bool	writeEntry( const TQString &, const char * );
+    bool	writeEntry( const TQString &, const TQString & );
+    bool	writeEntry( const TQString &, const TQStringList & );
+    bool	writeEntry( const TQString &, const TQStringList &, const TQChar& sep );
+
+    TQStringList entryList(const TQString &) const;
+    TQStringList subkeyList(const TQString &) const;
+
+    //### remove non const versions in 4.0
+    TQStringList readListEntry( const TQString &, bool * = 0 );
+    TQStringList readListEntry( const TQString &, const TQChar& sep, bool * = 0 );
+    TQString	readEntry( const TQString &, const TQString &def = TQString::null, bool * = 0 );
+    int		readNumEntry( const TQString &, int def = 0, bool * = 0 );
+    double	readDoubleEntry( const TQString &, double def = 0, bool * = 0 );
+    bool	readBoolEntry( const TQString &, bool def = FALSE, bool * = 0 );
+
+    //### make those non-inlined in 4.0
+    TQStringList readListEntry( const TQString &key, bool *ok = 0 ) const
+    {
+	TQSettings *that = (TQSettings*)this;
+	return that->readListEntry( key, ok );
+    }
+    TQStringList readListEntry( const TQString &key, const TQChar& sep, bool *ok = 0 ) const
+    {
+	TQSettings *that = (TQSettings*)this;
+	return that->readListEntry( key, sep, ok );
+    }
+    TQString	readEntry( const TQString &key, const TQString &def = TQString::null,
+			   bool *ok = 0 ) const
+    {
+	TQSettings *that = (TQSettings*)this;
+	return that->readEntry( key, def, ok );
+    }
+    int		readNumEntry( const TQString &key, int def = 0, bool *ok = 0 ) const
+    {
+	TQSettings *that = (TQSettings*)this;
+	return that->readNumEntry( key, def, ok );
+    }
+
+    double	readDoubleEntry( const TQString &key, double def = 0, bool *ok = 0 ) const
+    {
+	TQSettings *that = (TQSettings*)this;
+	return that->readDoubleEntry( key, def, ok );
+    }
+    bool	readBoolEntry( const TQString &key, bool def = FALSE, bool *ok = 0 ) const
+    {
+	TQSettings *that = (TQSettings*)this;
+	return that->readBoolEntry( key, def, ok );
+    }
+
+    bool	removeEntry( const TQString & );
+
+    void insertSearchPath( System, const TQString & );
+    void removeSearchPath( System, const TQString & );
+
+    void setPath( const TQString &domain, const TQString &product, Scope = Global );
+
+    void beginGroup( const TQString &group );
+    void endGroup();
+    void resetGroup();
+    TQString group() const;
+
+    bool sync();
+
+private:
+    TQSettingsPrivate *d;
+
+#if defined(Q_DISABLE_COPY)
+    TQSettings(const TQSettings &);
+    TQSettings &operator=(const TQSettings &);
+#endif
+
+    TQDateTime lastModificationTime( const TQString & );
+
+    friend class TQApplication;
+};
+
+#endif // QT_NO_SETTINGS
+#endif // TQSETTINGS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsettings-members.html b/doc/html/qsettings-members.html new file mode 100644 index 00000000..2ade3f27 --- /dev/null +++ b/doc/html/qsettings-members.html @@ -0,0 +1,64 @@ + + + + + +TQSettings Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSettings

+ +

This is the complete list of member functions for +TQSettings, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsettings.html b/doc/html/qsettings.html new file mode 100644 index 00000000..cf911a97 --- /dev/null +++ b/doc/html/qsettings.html @@ -0,0 +1,626 @@ + + + + + +TQSettings Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSettings Class Reference

+ +

The TQSettings class provides persistent platform-independent application settings. +More... +

#include <qsettings.h> +

List of all member functions. +

Public Members

+
    +
  • enum Format { Native = 0, Ini }
  • +
  • enum System { Unix = 0, Windows, Mac }
  • +
  • enum Scope { User, Global }
  • +
  • TQSettings ()
  • +
  • TQSettings ( Format format )
  • +
  • ~TQSettings ()
  • +
  • bool writeEntry ( const TQString & key, bool value )
  • +
  • bool writeEntry ( const TQString & key, double value )
  • +
  • bool writeEntry ( const TQString & key, int value )
  • +
  • bool writeEntry ( const TQString & key, const TQString & value )
  • +
  • bool writeEntry ( const TQString & key, const TQStringList & value )
  • +
  • bool writeEntry ( const TQString & key, const TQStringList & value, const TQChar & separator )  (obsolete)
  • +
  • TQStringList entryList ( const TQString & key ) const
  • +
  • TQStringList subkeyList ( const TQString & key ) const
  • +
  • TQStringList readListEntry ( const TQString & key, bool * ok = 0 ) const
  • +
  • TQStringList readListEntry ( const TQString & key, const TQChar & separator, bool * ok = 0 ) const  (obsolete)
  • +
  • TQString readEntry ( const TQString & key, const TQString & def = TQString::null, bool * ok = 0 ) const
  • +
  • int readNumEntry ( const TQString & key, int def = 0, bool * ok = 0 ) const
  • +
  • double readDoubleEntry ( const TQString & key, double def = 0, bool * ok = 0 ) const
  • +
  • bool readBoolEntry ( const TQString & key, bool def = FALSE, bool * ok = 0 ) const
  • +
  • bool removeEntry ( const TQString & key )
  • +
  • void insertSearchPath ( System s, const TQString & path )
  • +
  • void removeSearchPath ( System s, const TQString & path )
  • +
  • void setPath ( const TQString & domain, const TQString & product, Scope scope = Global )
  • +
  • void beginGroup ( const TQString & group )
  • +
  • void endGroup ()
  • +
  • void resetGroup ()
  • +
  • TQString group () const
  • +
+

Detailed Description

+ + +The TQSettings class provides persistent platform-independent application settings. +

+ + +

On Unix systems, TQSettings uses text files to store settings. On Windows +systems, TQSettings uses the system registry. On Mac OS X, TQSettings uses +the Carbon preferences API. +

Each setting comprises an identifying key and the data associated with +the key. A key is a unicode string which consists of two or more +subkeys. A subkey is a slash, '/', followed by one or more unicode +characters (excluding slashes, newlines, carriage returns and equals, +'=', signs). The associated data, called the entry or value, may be a +boolean, an integer, a double, a string or a list of strings. Entry +strings may contain any unicode characters. +

If you want to save and restore the entire desktop's settings, i.e. +which applications are running, use TQSettings to save the settings +for each individual application and TQSessionManager to save the +desktop's session. +

Example settings: +

+    /MyCompany/MyApplication/background color
+    /MyCompany/MyApplication/foreground color
+    /MyCompany/MyApplication/geometry/x
+    /MyCompany/MyApplication/geometry/y
+    /MyCompany/MyApplication/geometry/width
+    /MyCompany/MyApplication/geometry/height
+    /MyCompany/MyApplication/recent files/1
+    /MyCompany/MyApplication/recent files/2
+    /MyCompany/MyApplication/recent files/3
+    
+ +Each line above is a complete key, made up of subkeys. +

A typical usage pattern for reading settings at application +startup: +

+    TQSettings settings;
+    settings.setPath( "MyCompany.com", "MyApplication" );
+
+    TQString bgColor = settings.readEntry( "/colors/background", "white" );
+    int width = settings.readNumEntry( "/geometry/width", 640 );
+    // ...
+    
+ +

A typical usage pattern for saving settings at application exit or +'save preferences': +

+    TQSettings settings;
+    settings.setPath( "MyCompany.com", "MyApplication" );
+
+    settings.writeEntry( "/colors/background", bgColor );
+    settings.writeEntry( "/geometry/width", width );
+    // ...
+    
+ +

A key prefix can be prepended to all keys using beginGroup(). The +application of the prefix is stopped using endGroup(). For +example: +

+    TQSettings settings;
+
+    settings.beginGroup( "/MainWindow" );
+        settings.beginGroup( "/Geometry" );
+            int x = settings.readEntry( "/x" );
+            // ...
+        settings.endGroup();
+        settings.beginGroup( "/Toolbars" );
+            // ...
+        settings.endGroup();
+    settings.endGroup();
+    
+ +

You can get a list of entry-holding keys by calling entryList(), and +a list of key-holding keys using subkeyList(). +

+    TQStringList keys = settings.entryList( "/MyApplication" );
+    // keys contains 'background color' and 'foreground color'.
+
+    TQStringList keys = settings.entryList( "/MyApplication/recent files" );
+    // keys contains '1', '2' and '3'.
+
+    TQStringList subkeys = settings.subkeyList( "/MyApplication" );
+    // subkeys contains 'geometry' and 'recent files'
+
+    TQStringList subkeys = settings.subkeyList( "/MyApplication/recent files" );
+    // subkeys is empty.
+    
+ +

Since settings for Windows are stored in the registry there are +some size limitations as follows: +

    +
  • A subkey may not exceed 255 characters. +
  • An entry's value may not exceed 16,300 characters. +
  • All the values of a key (for example, all the 'recent files' +subkeys values), may not exceed 65,535 characters. +
+

These limitations are not enforced on Unix or Mac OS X. +

Warning: Creating multiple, simultaneous instances of TQSettings writing +to a text file may lead to data loss! This is a known issue which will +be fixed in a future release of TQt. +

Notes for Mac OS X Applications +

+

The location where settings are stored is not formally defined by +the CFPreferences API. +

At the time of writing settings are stored (either on a global or +user basis, preferring locally) into a plist file in $ROOT/System/Library/Preferences (in XML format). TQSettings will +create an appropriate plist file (com.<first group name>.plist) +out of the full path to a key. +

For further information on CFPreferences see +Apple's Specifications +

Notes for Unix Applications +

+

There is no universally accepted place for storing application +settings under Unix. In the examples the settings file will be +searched for in the following directories: +

    +
  1. SYSCONF - the default value is INSTALL/etc/settings +
  2. /opt/MyCompany/share/etc +
  3. /opt/MyCompany/share/MyApplication/etc +
  4. $HOME/.qt +
+When reading settings the files are searched in the order shown +above, with later settings overriding earlier settings. Files for +which the user doesn't have read permission are ignored. When saving +settings TQSettings works in the order shown above, writing +to the first settings file for which the user has write permission. +(INSTALL is the directory where TQt was installed. This can be +modified by using the configure script's -prefix argument ) +

If you want to put the settings in a particular place in the +filesystem you could do this: +

+    settings.insertSearchPath( TQSettings::Unix, "/opt/MyCompany/share" );
+    
+ +

But in practice you may prefer not to use a search path for Unix. +For example the following code: +

+    settings.writeEntry( "/MyApplication/geometry/width", width );
+    
+ +will end up writing the "geometry/width" setting to the file +$HOME/.qt/myapplicationrc (assuming that the application is +being run by an ordinary user, i.e. not by root). +

For cross-platform applications you should ensure that the +Windows size limitations are not exceeded. +

Warning: TQSettings doesn't write the settings until it is destroyed so +you should construct the TQSettings object on the stack. +

See also Input/Output and Networking and Miscellaneous Classes. + +


Member Type Documentation

+

TQSettings::Format

+ +
    +
  • TQSettings::Native - Store the settings in a platform dependent location +
  • TQSettings::Ini - Store the settings in a text file +
+

TQSettings::Scope

+ +
    +
  • TQSettings::Global - Save settings as global as possible +
  • TQSettings::User - Save settings in user space +
+

TQSettings::System

+ +
    +
  • TQSettings::Mac - Macintosh execution environments +
  • TQSettings::Unix - Mac OS X, Unix, Linux and Unix-like execution environments +
  • TQSettings::Windows - Windows execution environments +
+

Member Function Documentation

+

TQSettings::TQSettings () +

+Creates a settings object. +

Be aware that you must call setPath() or insertSearchPath() before +you can use the TQSettings object. + +

TQSettings::TQSettings ( Format format ) +

+Creates a settings object. If format is 'Ini' the settings will +be stored in a text file, using the Unix strategy (see above). If format +is 'Native', the settings will be stored in a platform specific way +(ie. the Windows registry). +

Be aware that you must call setPath() or insertSearchPath() before +you can use the TQSettings object. + +

TQSettings::~TQSettings () +

+Destroys the settings object. All modifications made to the settings +will automatically be saved. +

+

void TQSettings::beginGroup ( const TQString & group ) +

+Appends group to the current key prefix. +

+    TQSettings settings;
+    settings.beginGroup( "/MainWindow" );
+    // read values
+    settings.endGroup();
+    
+ + +

void TQSettings::endGroup () +

+Undo previous calls to beginGroup(). Note that a single beginGroup("a/b/c") is undone +by a single call to endGroup(). +

+    TQSettings settings;
+    settings.beginGroup( "/MainWindow/Geometry" );
+    // read values
+    settings.endGroup();
+    
+ + +

TQStringList TQSettings::entryList ( const TQString & key ) const +

+Returns a list of the keys which contain entries under key. Does not return any keys that contain subkeys. +

Example settings: +

+    /MyCompany/MyApplication/background color
+    /MyCompany/MyApplication/foreground color
+    /MyCompany/MyApplication/geometry/x
+    /MyCompany/MyApplication/geometry/y
+    /MyCompany/MyApplication/geometry/width
+    /MyCompany/MyApplication/geometry/height
+    
+ +
+    TQStringList keys = settings.entryList( "/MyCompany/MyApplication" );
+    
+ +

In the above example, keys will contain 'background color' and +'foreground color'. It will not contain 'geometry' because this key +contains subkeys not entries. +

To access the geometry values, you could either use subkeyList() +to read the keys then read each entry, or simply read each entry +directly by specifying its full key, e.g. +"/MyCompany/MyApplication/geometry/y". +

See also subkeyList(). + +

TQString TQSettings::group () const +

+Returns the current key prefix, or a null string if there is no key prefix set. +

See also beginGroup(). + +

void TQSettings::insertSearchPath ( System s, const TQString & path ) +

+Inserts path into the settings search path. The semantics of path depends on the system s. It is usually easier and better to +use setPath() instead of this function. +

When s is Windows and the execution environment is not +Windows the function does nothing. Similarly when s is Unix and +the execution environment is not Unix the function does nothing. +

When s is Windows, and the execution environment is Windows, the +search path list will be used as the first subfolder of the "Software" +folder in the registry. +

When reading settings the folders are searched forwards from the +first folder (listed below) to the last, returning the first +settings found, and ignoring any folders for which the user doesn't +have read permission. +

    +
  1. HKEY_CURRENT_USER/Software/MyCompany/MyApplication +
  2. HKEY_LOCAL_MACHINE/Software/MyCompany/MyApplication +
  3. HKEY_CURRENT_USER/Software/MyApplication +
  4. HKEY_LOCAL_MACHINE/Software/MyApplication +
+

+  TQSettings settings;
+  settings.insertSearchPath( TQSettings::Windows, "/MyCompany" );
+  settings.writeEntry( "/MyApplication/Tip of the day", TRUE );
+  
+ +The code above will write the subkey "Tip of the day" into the first of the registry folders listed below that is found and for +which the user has write permission. +
    +
  1. HKEY_LOCAL_MACHINE/Software/MyCompany/MyApplication +
  2. HKEY_CURRENT_USER/Software/MyCompany/MyApplication +
  3. HKEY_LOCAL_MACHINE/Software/MyApplication +
  4. HKEY_CURRENT_USER/Software/MyApplication +
+If a setting is found in the HKEY_CURRENT_USER space, this setting +is overwritten independently of write permissions in the +HKEY_LOCAL_MACHINE space. +

When s is Unix, and the execution environment is Unix, the +search path list will be used when trying to determine a suitable +filename for reading and writing settings files. By default, there are +two entries in the search path: +

    +
  1. SYSCONF - where SYSCONF is a directory specified when +configuring TQt; by default it is INSTALL/etc/settings. +
  2. $HOME/.qt/ - where $HOME is the user's home directory. +
+

All insertions into the search path will go before $HOME/.qt/. +For example: +

+  TQSettings settings;
+  settings.insertSearchPath( TQSettings::Unix, "/opt/MyCompany/share/etc" );
+  settings.insertSearchPath( TQSettings::Unix, "/opt/MyCompany/share/MyApplication/etc" );
+  // ...
+  
+ +Will result in a search path of: +
    +
  1. SYSCONF +
  2. /opt/MyCompany/share/etc +
  3. /opt/MyCompany/share/MyApplication/etc +
  4. $HOME/.qt +
+When reading settings the files are searched in the order shown +above, with later settings overriding earlier settings. Files for +which the user doesn't have read permission are ignored. When saving +settings TQSettings works in the order shown above, writing +to the first settings file for which the user has write permission. +

Note that paths in the file system are not created by this +function, so they must already exist to be useful. +

Settings under Unix are stored in files whose names are based on the +first subkey of the key (not including the search path). The algorithm +for creating names is essentially: lowercase the first subkey, replace +spaces with underscores and add 'rc', e.g. +/MyCompany/MyApplication/background color will be stored in +myapplicationrc (assuming that /MyCompany is part of +the search path). +

See also removeSearchPath(). + +

+

Example: chart/chartform.cpp. +

bool TQSettings::readBoolEntry ( const TQString & key, bool def = FALSE, bool * ok = 0 ) const +

+ +

Reads the entry specified by key, and returns a bool, or the +default value, def, if the entry couldn't be read. +If ok is non-null, *ok is set to TRUE if the key was read, FALSE +otherwise. +

See also readEntry(), readNumEntry(), readDoubleEntry(), writeEntry(), and removeEntry(). + +

double TQSettings::readDoubleEntry ( const TQString & key, double def = 0, bool * ok = 0 ) const +

+ +

Reads the entry specified by key, and returns a double, or the +default value, def, if the entry couldn't be read. +If ok is non-null, *ok is set to TRUE if the key was read, FALSE +otherwise. +

See also readEntry(), readNumEntry(), readBoolEntry(), writeEntry(), and removeEntry(). + +

TQString TQSettings::readEntry ( const TQString & key, const TQString & def = TQString::null, bool * ok = 0 ) const +

+ +

Reads the entry specified by key, and returns a TQString, or the +default value, def, if the entry couldn't be read. +If ok is non-null, *ok is set to TRUE if the key was read, FALSE +otherwise. +

See also readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), writeEntry(), and removeEntry(). + +

TQStringList TQSettings::readListEntry ( const TQString & key, bool * ok = 0 ) const +

+ +Reads the entry specified by key as a string. If ok is not +0, *ok is set to TRUE if the key was read, otherwise *ok is +set to FALSE. +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+    TQStringList list = mySettings.readListEntry( "recentfiles" );
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also readEntry(), readDoubleEntry(), readBoolEntry(), writeEntry(), removeEntry(), and TQStringList::split(). + +

TQStringList TQSettings::readListEntry ( const TQString & key, const TQChar & separator, bool * ok = 0 ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Reads the entry specified by key as a string. The separator +is used to create a TQStringList by calling TQStringList::split(separator, entry). If ok is not 0: *ok is set to TRUE +if the key was read, otherwise *ok is set to FALSE. +

Warning: As the documentation states, TQStringList::split() will +omit empty strings from the list. Because of this, it is +impossible to retrieve identical list data with this function. We +recommend using the readListEntry() and writeEntry() overloads +that do not take a separator argument. +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+    TQStringList list = mySettings.readListEntry( "size", " " );
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also readEntry(), readDoubleEntry(), readBoolEntry(), writeEntry(), removeEntry(), and TQStringList::split(). + +

int TQSettings::readNumEntry ( const TQString & key, int def = 0, bool * ok = 0 ) const +

+ +

Reads the entry specified by key, and returns an integer, or the +default value, def, if the entry couldn't be read. +If ok is non-null, *ok is set to TRUE if the key was read, FALSE +otherwise. +

See also readEntry(), readDoubleEntry(), readBoolEntry(), writeEntry(), and removeEntry(). + +

bool TQSettings::removeEntry ( const TQString & key ) +

+Removes the entry specified by key. +

Returns true if the entry was successfully removed; otherwise +returns false. Note that removing the last entry in any given +folder, will also remove the folder. +

See also readEntry() and writeEntry(). + +

void TQSettings::removeSearchPath ( System s, const TQString & path ) +

+Removes all occurrences of path (using exact matching) from the +settings search path for system s. Note that the default search +paths cannot be removed. +

See also insertSearchPath(). + +

void TQSettings::resetGroup () +

+Set the current key prefix to the empty string. + +

void TQSettings::setPath ( const TQString & domain, const TQString & product, Scope scope = Global ) +

+Insert platform-dependent paths from platform-independent information. +

The domain should be an Internet domain name +controlled by the producer of the software, eg. Trolltech products +use "trolltech.com". +

The product should be the official name of the product. +

The scope should be +TQSettings::User for user-specific settings, or +TQSettings::Global for system-wide settings (generally +these will be read-only to many users). +

Not all information is relevant on all systems. + +

TQStringList TQSettings::subkeyList ( const TQString & key ) const +

+Returns a list of the keys which contain subkeys under key. Does not return any keys that contain entries. +

Example settings: +

+    /MyCompany/MyApplication/background color
+    /MyCompany/MyApplication/foreground color
+    /MyCompany/MyApplication/geometry/x
+    /MyCompany/MyApplication/geometry/y
+    /MyCompany/MyApplication/geometry/width
+    /MyCompany/MyApplication/geometry/height
+    /MyCompany/MyApplication/recent files/1
+    /MyCompany/MyApplication/recent files/2
+    /MyCompany/MyApplication/recent files/3
+    
+ +
+    TQStringList keys = settings.subkeyList( "/MyCompany/MyApplication" );
+    
+ +

In the above example, keys will contain 'geometry' and +'recent files'. It will not contain 'background color' or +'foreground color' because those keys contain entries not +subkeys. To get a list of keys that contain entries rather than +subkeys use entryList() instead. +

Warning: In the above example, if TQSettings is writing to an Ini file, +then a call to +

 subkeyList("/MyCompany") 
+ +will return an empty list. This happens because a key like +
 /MyCompany/MyApplication/background color 
+ +is written to the file "mycompanyrc", under the section [MyApplication]. +This call is therefore a request to list the sections in an ini file, which +is not supported in this version of TQSettings. This is a known issue which +will be fixed in TQt-4. +

See also entryList(). + +

bool TQSettings::writeEntry ( const TQString & key, bool value ) +

+Writes the boolean entry value into key key. The key is +created if it doesn't exist. Any previous value is overwritten by value. +

If an error occurs the settings are left unchanged and FALSE is +returned; otherwise TRUE is returned. +

Warning: On certain platforms, keys are retquired to contain at least +two components (e.g., "/foo/bar"). This limitation does not apply to +TQt 4. +

See also readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), and removeEntry(). + +

Example: chart/chartform.cpp. +

bool TQSettings::writeEntry ( const TQString & key, double value ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes the double entry value into key key. The key is +created if it doesn't exist. Any previous value is overwritten by value. +

If an error occurs the settings are left unchanged and FALSE is +returned; otherwise TRUE is returned. +

See also readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), and removeEntry(). + +

bool TQSettings::writeEntry ( const TQString & key, int value ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes the integer entry value into key key. The key is +created if it doesn't exist. Any previous value is overwritten by value. +

If an error occurs the settings are left unchanged and FALSE is +returned; otherwise TRUE is returned. +

See also readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), and removeEntry(). + +

bool TQSettings::writeEntry ( const TQString & key, const TQString & value ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes the string entry value into key key. The key is +created if it doesn't exist. Any previous value is overwritten by value. If value is an empty string or a null string the key's +value will be an empty string. +

If an error occurs the settings are left unchanged and FALSE is +returned; otherwise TRUE is returned. +

See also readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), and removeEntry(). + +

bool TQSettings::writeEntry ( const TQString & key, const TQStringList & value ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes the string list entry value into key key. The key +is created if it doesn't exist. Any previous value is overwritten +by value. +

If an error occurs the settings are left unchanged and FALSE is +returned; otherwise returns TRUE. +

See also readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), and removeEntry(). + +

bool TQSettings::writeEntry ( const TQString & key, const TQStringList & value, const TQChar & separator ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Writes the string list entry value into key key. The key +is created if it doesn't exist. Any previous value is overwritten +by value. The list is stored as a sequence of strings separated +by separator (using TQStringList::join()), so none of the +strings in the list should contain the separator. If the list is +empty or null the key's value will be an empty string. +

Warning: The list should not contain empty or null strings, as +readListEntry() will use TQStringList::split() to recreate the +list. As the documentation states, TQStringList::split() will omit +empty strings from the list. Because of this, it is impossible to +retrieve identical list data that is stored with this function. +We recommend using the writeEntry() and readListEntry() overloads +that do not take a separator argument. +

If an error occurs the settings are left unchanged and FALSE is +returned; otherwise returns TRUE. +

See also readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), removeEntry(), and TQStringList::join(). + + +


+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/qsgistyle-h.html b/doc/html/qsgistyle-h.html new file mode 100644 index 00000000..03685577 --- /dev/null +++ b/doc/html/qsgistyle-h.html @@ -0,0 +1,178 @@ + + + + + +qsgistyle.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsgistyle.h

+ +

This is the verbatim text of the qsgistyle.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsgistyle.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of SGI-like style class
+**
+** Created : 981231
+**
+** Copyright (C) 1998-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSGISTYLE_H
+#define TQSGISTYLE_H
+
+#ifndef QT_H
+#include "qmotifstyle.h"
+#include "qguardedptr.h"
+#include "qwidget.h"
+#endif // QT_H
+
+#if !defined(QT_NO_STYLE_SGI) || defined(QT_PLUGIN)
+
+#if defined(QT_PLUGIN)
+#define Q_EXPORT_STYLE_SGI
+#else
+#define Q_EXPORT_STYLE_SGI Q_EXPORT
+#endif
+
+class TQSGIStylePrivate;
+
+class Q_EXPORT_STYLE_SGI TQSGIStyle: public TQMotifStyle
+{
+    Q_OBJECT
+public:
+    TQSGIStyle( bool useHighlightCols = FALSE );
+    virtual ~TQSGIStyle();
+
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQMotifStyle::polish;
+#endif
+    void polish( TQWidget* );
+    void unPolish( TQWidget* );
+    void polish( TQApplication* );
+    void unPolish( TQApplication* );
+
+    void drawPrimitive( PrimitiveElement pe,
+			TQPainter *p,
+			const TQRect &r,
+			const TQColorGroup &cg,
+			SFlags flags = Style_Default,
+			const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawControl( ControlElement element,
+		      TQPainter *p,
+		      const TQWidget *widget,
+		      const TQRect &r,
+		      const TQColorGroup &cg,
+		      SFlags how = Style_Default,
+		      const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawComplexControl( ComplexControl control,
+			     TQPainter *p,
+			     const TQWidget* widget,
+			     const TQRect& r,
+			     const TQColorGroup& cg,
+			     SFlags how = Style_Default,
+#ifdef Q_QDOC
+			     SCFlags sub = SC_All,
+#else
+			     SCFlags sub = (uint)SC_All,
+#endif
+			     SCFlags subActive = SC_None,
+			     const TQStyleOption& = TQStyleOption::Default ) const;
+
+    int pixelMetric( PixelMetric metric, const TQWidget *widget = 0 ) const;
+
+    TQSize sizeFromContents( ContentsType contents,
+			    const TQWidget *widget,
+			    const TQSize &contentsSize,
+			    const TQStyleOption& = TQStyleOption::Default ) const;
+
+    TQRect subRect( SubRect r, const TQWidget *widget ) const;
+    TQRect querySubControlMetrics( ComplexControl control,
+				  const TQWidget *widget,
+				  SubControl sc,
+				  const TQStyleOption& = TQStyleOption::Default ) const;
+
+protected:
+    bool eventFilter( TQObject*, TQEvent*);
+
+private:
+    TQSGIStylePrivate *d;
+
+    uint isApplicationStyle :1;
+#if defined(Q_DISABLE_COPY)
+    TQSGIStyle( const TQSGIStyle & );
+    TQSGIStyle& operator=( const TQSGIStyle & );
+#endif
+
+};
+
+#endif // QT_NO_STYLE_SGI
+
+#endif // TQSGISTYLE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsgistyle-members.html b/doc/html/qsgistyle-members.html new file mode 100644 index 00000000..4066398a --- /dev/null +++ b/doc/html/qsgistyle-members.html @@ -0,0 +1,113 @@ + + + + + +TQSGIStyle Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSGIStyle

+ +

This is the complete list of member functions for +TQSGIStyle, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsgistyle.html b/doc/html/qsgistyle.html new file mode 100644 index 00000000..7145ca57 --- /dev/null +++ b/doc/html/qsgistyle.html @@ -0,0 +1,77 @@ + + + + + +TQSGIStyle Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSGIStyle Class Reference

+ +

The TQSGIStyle class provides SGI/Irix look and feel. +More... +

#include <qsgistyle.h> +

Inherits TQMotifStyle. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQSGIStyle class provides SGI/Irix look and feel. +

+

This class implements the SGI look and feel. It resembles the +SGI/Irix Motif GUI style as closely as TQStyle allows. +

See also Widget Appearance and Style. + +


Member Function Documentation

+

TQSGIStyle::TQSGIStyle ( bool useHighlightCols = FALSE ) +

+Constructs a TQSGIStyle. +

If useHighlightCols is FALSE (default value), the style will +polish the application's color palette to emulate the Motif way of +highlighting, which is a simple inversion between the base and the +text color. +

See also TQMotifStyle::useHighlightColors(). + +

TQSGIStyle::~TQSGIStyle () [virtual] +

+Destroys the style. + + +

+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/qshowevent-members.html b/doc/html/qshowevent-members.html new file mode 100644 index 00000000..1099670a --- /dev/null +++ b/doc/html/qshowevent-members.html @@ -0,0 +1,49 @@ + + + + + +TQShowEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQShowEvent

+ +

This is the complete list of member functions for +TQShowEvent, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qshowevent.html b/doc/html/qshowevent.html new file mode 100644 index 00000000..91ab3f8a --- /dev/null +++ b/doc/html/qshowevent.html @@ -0,0 +1,72 @@ + + + + + +TQShowEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQShowEvent Class Reference

+ +

The TQShowEvent class provides an event which is sent when a widget is shown. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQShowEvent class provides an event which is sent when a widget is shown. +

+

There are two kinds of show events: show events caused by the +window system (spontaneous) and internal show events. Spontaneous +show events are sent just after the window system shows the +window, including after a top-level window has been shown +(un-iconified) by the user. Internal show events are delivered +just before the widget becomes visible. +

See also TQHideEvent and Event Classes. + +


Member Function Documentation

+

TQShowEvent::TQShowEvent () +

+ +

Constructs a TQShowEvent. + + +


+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/qsignal-h.html b/doc/html/qsignal-h.html new file mode 100644 index 00000000..3cee8a81 --- /dev/null +++ b/doc/html/qsignal-h.html @@ -0,0 +1,139 @@ + + + + + +qsignal.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsignal.h

+ +

This is the verbatim text of the qsignal.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsignal.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQSignal class
+**
+** Created : 941201
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSIGNAL_H
+#define TQSIGNAL_H
+
+#ifndef QT_H
+#include "qvariant.h"
+#include "qobject.h"
+#endif // QT_H
+
+
+class Q_EXPORT TQSignal : public TQObject
+{
+    Q_OBJECT
+
+public:
+    TQSignal( TQObject *parent=0, const char *name=0 );
+    ~TQSignal();
+
+    bool	connect( const TQObject *receiver, const char *member );
+    bool	disconnect( const TQObject *receiver, const char *member=0 );
+
+    void	activate();
+
+#ifndef QT_NO_COMPAT
+    bool	isBlocked()	 const		{ return TQObject::signalsBlocked(); }
+    void	block( bool b )		{ TQObject::blockSignals( b ); }
+#ifndef QT_NO_VARIANT
+    void	setParameter( int value );
+    int		parameter() const;
+#endif
+#endif
+
+#ifndef QT_NO_VARIANT
+    void	setValue( const TQVariant &value );
+    TQVariant	value() const;
+#endif
+signals:
+#ifndef QT_NO_VARIANT
+    void signal( const TQVariant& );
+#endif
+    void intSignal( int );
+
+private:
+#ifndef QT_NO_VARIANT
+    TQVariant val;
+#endif
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQSignal( const TQSignal & );
+    TQSignal &operator=( const TQSignal & );
+#endif
+};
+
+
+#endif // TQSIGNAL_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsignal-members.html b/doc/html/qsignal-members.html new file mode 100644 index 00000000..87d3c510 --- /dev/null +++ b/doc/html/qsignal-members.html @@ -0,0 +1,97 @@ + + + + + +TQSignal Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSignal

+ +

This is the complete list of member functions for +TQSignal, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsignal.html b/doc/html/qsignal.html new file mode 100644 index 00000000..074a206d --- /dev/null +++ b/doc/html/qsignal.html @@ -0,0 +1,182 @@ + + + + + +TQSignal Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSignal Class Reference

+ +

The TQSignal class can be used to send signals for classes +that don't inherit TQObject. +More... +

#include <qsignal.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • TQSignal ( TQObject * parent = 0, const char * name = 0 )
  • +
  • ~TQSignal ()
  • +
  • bool connect ( const TQObject * receiver, const char * member )
  • +
  • bool disconnect ( const TQObject * receiver, const char * member = 0 )
  • +
  • void activate ()
  • +
  • bool isBlocked () const  (obsolete)
  • +
  • void block ( bool b )  (obsolete)
  • +
  • void setParameter ( int value )  (obsolete)
  • +
  • int parameter () const  (obsolete)
  • +
  • void setValue ( const TQVariant & value )
  • +
  • TQVariant value () const
  • +
+

Detailed Description

+ + +The TQSignal class can be used to send signals for classes +that don't inherit TQObject. +

+ +

If you want to send signals from a class that does not inherit +TQObject, you can create an internal TQSignal object to emit the +signal. You must also provide a function that connects the signal +to an outside object slot. This is how we have implemented +signals in the TQMenuData class, which is not a TQObject. +

In general, we recommend inheriting TQObject instead. TQObject +provides much more functionality. +

You can set a single TQVariant parameter for the signal with +setValue(). +

Note that TQObject is a private base class of TQSignal, i.e. you +cannot call any TQObject member functions from a TQSignal object. +

Example: +

+        #include <qsignal.h>
+
+        class MyClass
+        {
+        public:
+            MyClass();
+            ~MyClass();
+
+            void doSomething();
+
+            void connect( TQObject *receiver, const char *member );
+
+        private:
+            TQSignal *sig;
+        };
+
+        MyClass::MyClass()
+        {
+            sig = new TQSignal;
+        }
+
+        MyClass::~MyClass()
+        {
+            delete sig;
+        }
+
+        void MyClass::doSomething()
+        {
+            // ... does something
+            sig->activate(); // emits the signal
+        }
+
+        void MyClass::connect( TQObject *receiver, const char *member )
+        {
+            sig->connect( receiver, member );
+        }
+    
+ +

See also Input/Output and Networking and Miscellaneous Classes. + +


Member Function Documentation

+

TQSignal::TQSignal ( TQObject * parent = 0, const char * name = 0 ) +

+Constructs a signal object called name, with the parent object +parent. These arguments are passed directly to TQObject. + +

TQSignal::~TQSignal () +

+Destroys the signal. All connections are removed, as is the case +with all TQObjects. + +

void TQSignal::activate () +

+ +

Emits the signal. If the platform supports TQVariant and a +parameter has been set with setValue(), this value is passed in +the signal. + +

void TQSignal::block ( bool b ) +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Blocks the signal if b is TRUE, or unblocks the signal if b is FALSE. +

An activated signal disappears into hyperspace if it is blocked. +

See also isBlocked(), activate(), and TQObject::blockSignals(). + +

bool TQSignal::connect ( const TQObject * receiver, const char * member ) +

+Connects the signal to member in object receiver. +

See also disconnect() and TQObject::connect(). + +

bool TQSignal::disconnect ( const TQObject * receiver, const char * member = 0 ) +

+Disonnects the signal from member in object receiver. +

See also connect() and TQObject::disconnect(). + +

bool TQSignal::isBlocked () const +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns TRUE if the signal is blocked, or FALSE if it is not blocked. +

The signal is not blocked by default. +

See also block() and TQObject::signalsBlocked(). + +

int TQSignal::parameter () const +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. + +

void TQSignal::setParameter ( int value ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. + +

void TQSignal::setValue ( const TQVariant & value ) +

+Sets the signal's parameter to value + +

TQVariant TQSignal::value () const +

+Returns the signal's parameter + + +

+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/qsignalmapper-h.html b/doc/html/qsignalmapper-h.html new file mode 100644 index 00000000..813cae36 --- /dev/null +++ b/doc/html/qsignalmapper-h.html @@ -0,0 +1,123 @@ + + + + + +qsignalmapper.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsignalmapper.h

+ +

This is the verbatim text of the qsignalmapper.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsignalmapper.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQSignalMapper class
+**
+** Created : 980503
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSIGNALMAPPER_H
+#define TQSIGNALMAPPER_H
+
+#ifndef QT_H
+#include "qobject.h"
+#endif // QT_H
+#ifndef QT_NO_SIGNALMAPPER
+class  TQSignalMapperData;
+struct TQSignalMapperRec;
+
+
+class Q_EXPORT TQSignalMapper : public TQObject {
+    Q_OBJECT
+public:
+    TQSignalMapper( TQObject* parent, const char* name=0 );
+    ~TQSignalMapper();
+
+    virtual void setMapping( const TQObject* sender, int identifier );
+    virtual void setMapping( const TQObject* sender, const TQString &identifier );
+    void removeMappings( const TQObject* sender );
+
+signals:
+    void mapped(int);
+    void mapped(const TQString &);
+
+public slots:
+    void map();
+
+private:
+    TQSignalMapperData* d;
+    TQSignalMapperRec* getRec( const TQObject* );
+
+private slots:
+    void removeMapping();
+};
+
+#endif // QT_NO_SIGNALMAPPER
+#endif // TQSIGNALMAPPER_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsignalmapper-members.html b/doc/html/qsignalmapper-members.html new file mode 100644 index 00000000..994de9b6 --- /dev/null +++ b/doc/html/qsignalmapper-members.html @@ -0,0 +1,94 @@ + + + + + +TQSignalMapper Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSignalMapper

+ +

This is the complete list of member functions for +TQSignalMapper, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsignalmapper.html b/doc/html/qsignalmapper.html new file mode 100644 index 00000000..123e26ca --- /dev/null +++ b/doc/html/qsignalmapper.html @@ -0,0 +1,124 @@ + + + + + +TQSignalMapper Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSignalMapper Class Reference

+ +

The TQSignalMapper class bundles signals from identifiable senders. +More... +

#include <qsignalmapper.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Public Slots

+
    +
  • void map ()
  • +
+

Signals

+ +

Detailed Description

+ + +The TQSignalMapper class bundles signals from identifiable senders. +

+

This class collects a set of parameterless signals, and re-emits +them with integer or string parameters corresponding to the object +that sent the signal. +

See also Input/Output and Networking. + +


Member Function Documentation

+

TQSignalMapper::TQSignalMapper ( TQObject * parent, const char * name = 0 ) +

+Constructs a TQSignalMapper called name, with parent parent. +Like all TQObjects, it will be deleted when the parent is deleted. + +

TQSignalMapper::~TQSignalMapper () +

+Destroys the TQSignalMapper. + +

void TQSignalMapper::map () [slot] +

+This slot emits signals based on which object sends signals to it. + +

Examples: i18n/main.cpp and themes/themes.cpp. +

void TQSignalMapper::mapped ( int ) [signal] +

+ +

This signal is emitted when map() is signaled from an object that +has an integer mapping set. +

See also setMapping(). + +

Examples: i18n/main.cpp and themes/themes.cpp. +

void TQSignalMapper::mapped ( const TQString & ) [signal] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted when map() is signaled from an object that +has a string mapping set. +

See also setMapping(). + +

void TQSignalMapper::removeMappings ( const TQObject * sender ) +

+Removes all mappings for sender. This is done automatically +when mapped objects are destroyed. + +

void TQSignalMapper::setMapping ( const TQObject * sender, int identifier ) [virtual] +

+Adds a mapping so that when map() is signaled from the given sender, the signal mapped(identifier) is emitted. +

There may be at most one integer identifier for each object. + +

Examples: i18n/main.cpp and themes/themes.cpp. +

void TQSignalMapper::setMapping ( const TQObject * sender, const TQString & identifier ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Adds a mapping so that when map() is signaled from the given sender, the signal mapper(identifier) is emitted. +

There may be at most one string identifier for each object, and it +may not be 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/qsimplerichtext-h.html b/doc/html/qsimplerichtext-h.html new file mode 100644 index 00000000..3888ac19 --- /dev/null +++ b/doc/html/qsimplerichtext-h.html @@ -0,0 +1,149 @@ + + + + + +qsimplerichtext.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsimplerichtext.h

+ +

This is the verbatim text of the qsimplerichtext.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsimplerichtext.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of the TQSimpleRichText class
+**
+** Created : 990101
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements will be met:
+** http://trolltech.com/products/qt/licenses/licensing/opensource/.
+** If you are unsure which license is appropriate for your use, please
+** review the following information:
+** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
+** or contact the sales department at sales@trolltech.com.
+**
+** This file may be used under the terms of the Q Public License as
+** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
+** included in the packaging of this file.  Licensees holding valid TQt
+** Commercial licenses may use this file in accordance with the TQt
+** Commercial License Agreement provided with the Software.
+**
+** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
+** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
+** herein.
+**
+**********************************************************************/
+
+#ifndef TQSIMPLERICHTEXT_H
+#define TQSIMPLERICHTEXT_H
+
+#ifndef QT_H
+#include "qnamespace.h"
+#include "qstring.h"
+#include "qregion.h"
+#endif // QT_H
+
+#ifndef QT_NO_RICHTEXT
+
+class TQPainter;
+class TQWidget;
+class TQStyleSheet;
+class TQBrush;
+class TQMimeSourceFactory;
+class TQSimpleRichTextData;
+
+class Q_EXPORT TQSimpleRichText
+{
+public:
+    TQSimpleRichText( const TQString& text, const TQFont& fnt,
+		     const TQString& context = TQString::null, const TQStyleSheet* sheet = 0);
+    TQSimpleRichText( const TQString& text, const TQFont& fnt,
+		     const TQString& context,  const TQStyleSheet* sheet,
+		     const TQMimeSourceFactory* factory, int pageBreak = -1,
+		     const TQColor& linkColor = TQt::blue, bool linkUnderline = TRUE );
+    ~TQSimpleRichText();
+
+    void setWidth( int );
+    void setWidth( TQPainter*, int );
+    void setDefaultFont( const TQFont &f );
+    int width() const;
+    int widthUsed() const;
+    int height() const;
+    void adjustSize();
+
+    void draw( TQPainter* p,  int x, int y, const TQRect& clipRect,
+	       const TQColorGroup& cg, const TQBrush* paper = 0) const;
+
+    // obsolete
+    void draw( TQPainter* p,  int x, int y, const TQRegion& clipRegion,
+	       const TQColorGroup& cg, const TQBrush* paper = 0) const {
+	draw( p, x, y, clipRegion.boundingRect(), cg, paper );
+    }
+
+    TQString context() const;
+    TQString anchorAt( const TQPoint& pos ) const;
+
+    bool inText( const TQPoint& pos ) const;
+
+private:
+    TQSimpleRichTextData* d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQSimpleRichText( const TQSimpleRichText & );
+    TQSimpleRichText &operator=( const TQSimpleRichText & );
+#endif
+};
+
+#endif // QT_NO_RICHTEXT
+
+#endif // TQSIMPLERICHTEXT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsimplerichtext-members.html b/doc/html/qsimplerichtext-members.html new file mode 100644 index 00000000..24c4b4e0 --- /dev/null +++ b/doc/html/qsimplerichtext-members.html @@ -0,0 +1,58 @@ + + + + + +TQSimpleRichText Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSimpleRichText

+ +

This is the complete list of member functions for +TQSimpleRichText, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsimplerichtext.html b/doc/html/qsimplerichtext.html new file mode 100644 index 00000000..c0d9d4cf --- /dev/null +++ b/doc/html/qsimplerichtext.html @@ -0,0 +1,223 @@ + + + + + +TQSimpleRichText Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSimpleRichText Class Reference

+ +

The TQSimpleRichText class provides a small displayable piece of rich text. +More... +

#include <qsimplerichtext.h> +

List of all member functions. +

Public Members

+
    +
  • TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 )
  • +
  • TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context, const TQStyleSheet * sheet, const TQMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE )
  • +
  • ~TQSimpleRichText ()
  • +
  • void setWidth ( int w )
  • +
  • void setWidth ( TQPainter * p, int w )
  • +
  • void setDefaultFont ( const TQFont & f )
  • +
  • int width () const
  • +
  • int widthUsed () const
  • +
  • int height () const
  • +
  • void adjustSize ()
  • +
  • void draw ( TQPainter * p, int x, int y, const TQRect & clipRect, const TQColorGroup & cg, const TQBrush * paper = 0 ) const
  • +
  • void draw ( TQPainter * p, int x, int y, const TQRegion & clipRegion, const TQColorGroup & cg, const TQBrush * paper = 0 ) const  (obsolete)
  • +
  • TQString context () const
  • +
  • TQString anchorAt ( const TQPoint & pos ) const
  • +
  • bool inText ( const TQPoint & pos ) const
  • +
+

Detailed Description

+ + +The TQSimpleRichText class provides a small displayable piece of rich text. +

+ +

This class encapsulates simple rich text usage in which a string +is interpreted as rich text and can be drawn. This is particularly +useful if you want to display some rich text in a custom widget. A +TQStyleSheet is needed to interpret the tags and format the rich +text. TQt provides a default HTML-like style sheet, but you may +define custom style sheets. +

Once created, the rich text object can be queried for its width(), +height(), and the actual width used (see widthUsed()). Most +importantly, it can be drawn on any given TQPainter with draw(). +TQSimpleRichText can also be used to implement hypertext or active +text facilities by using anchorAt(). A hit test through inText() +makes it possible to use simple rich text for text objects in +editable drawing canvases. +

Once constructed from a string the contents cannot be changed, +only resized. If the contents change, just throw the rich text +object away and make a new one with the new contents. +

For large documents use TQTextEdit or TQTextBrowser. For very small +items of rich text you can use a TQLabel. +

If you are using TQSimpleRichText to print in high resolution you +should call setWidth(TQPainter, int) so that the content will be +laid out properly on the page. +

See also Text Related Classes. + +


Member Function Documentation

+

TQSimpleRichText::TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 ) +

+Constructs a TQSimpleRichText from the rich text string text and +the font fnt. +

The font is used as a basis for the text rendering. When using +rich text rendering on a widget w, you would normally specify +the widget's font, for example: +

+    TQSimpleRichText myrichtext( contents, mywidget->font() );
+    
+ +

context is the optional context of the rich text object. This +becomes important if text contains relative references, for +example within image tags. TQSimpleRichText always uses the default +mime source factory (see TQMimeSourceFactory::defaultFactory()) +to resolve those references. The context will then be used to +calculate the absolute path. See +TQMimeSourceFactory::makeAbsolute() for details. +

The sheet is an optional style sheet. If it is 0, the default +style sheet will be used (see TQStyleSheet::defaultSheet()). + +

TQSimpleRichText::TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context, const TQStyleSheet * sheet, const TQMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE ) +

+Constructs a TQSimpleRichText from the rich text string text and +the font fnt. +

This is a slightly more complex constructor for TQSimpleRichText +that takes an additional mime source factory factory, a page +break parameter pageBreak and a bool linkUnderline. linkColor is only provided for compatibility, but has no effect, +as TQColorGroup's TQColorGroup::link() color is used now. +

context is the optional context of the rich text object. This +becomes important if text contains relative references, for +example within image tags. TQSimpleRichText always uses the default +mime source factory (see TQMimeSourceFactory::defaultFactory()) +to resolve those references. The context will then be used to +calculate the absolute path. See +TQMimeSourceFactory::makeAbsolute() for details. +

The sheet is an optional style sheet. If it is 0, the default +style sheet will be used (see TQStyleSheet::defaultSheet()). +

This constructor is useful for creating a TQSimpleRichText object +suitable for printing. Set pageBreak to be the height of the +contents area of the pages. + +

TQSimpleRichText::~TQSimpleRichText () +

+Destroys the rich text object, freeing memory. + +

void TQSimpleRichText::adjustSize () +

+Adjusts the richt text object to a reasonable size. +

See also setWidth(). + +

TQString TQSimpleRichText::anchorAt ( const TQPoint & pos ) const +

+Returns the anchor at the requested position, pos. An empty +string is returned if no anchor is specified for this position. + +

TQString TQSimpleRichText::context () const +

+Returns the context of the rich text object. If no context has +been specified in the constructor, a null string is returned. The +context is the path to use to look up relative links, such as +image tags and anchor references. + +

void TQSimpleRichText::draw ( TQPainter * p, int x, int y, const TQRect & clipRect, const TQColorGroup & cg, const TQBrush * paper = 0 ) const +

+Draws the formatted text with painter p, at position (x, y), clipped to clipRect. The clipping rectangle is given in the +rich text object's coordinates translated by (x, y). Passing +an null rectangle results in no clipping. Colors from the color +group cg are used as needed, and if not 0, *paper is used as +the background brush. +

Note that the display code is highly optimized to reduce flicker, +so passing a brush for paper is preferable to simply clearing +the area to be painted and then calling this without a brush. + +

Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. +

void TQSimpleRichText::draw ( TQPainter * p, int x, int y, const TQRegion & clipRegion, const TQColorGroup & cg, const TQBrush * paper = 0 ) const +

+

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Use the version with clipRect instead. The region version has +problems with larger documents on some platforms (on X11 regions +internally are represented with 16bit coordinates). + +

int TQSimpleRichText::height () const +

+Returns the height of the rich text object in pixels. +

See also setWidth(). + +

Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. +

bool TQSimpleRichText::inText ( const TQPoint & pos ) const +

+Returns TRUE if pos is within a text line of the rich text +object; otherwise returns FALSE. + +

void TQSimpleRichText::setDefaultFont ( const TQFont & f ) +

+Sets the default font for the rich text object to f + +

void TQSimpleRichText::setWidth ( TQPainter * p, int w ) +

+Sets the width of the rich text object to w pixels, +recalculating the layout as if it were to be drawn with painter p. +

Passing a painter is useful when you intend drawing on devices +other than the screen, for example a TQPrinter. +

See also height() and adjustSize(). + +

Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. +

void TQSimpleRichText::setWidth ( int w ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the width of the rich text object to w pixels. +

See also height() and adjustSize(). + +

int TQSimpleRichText::width () const +

+Returns the set width of the rich text object in pixels. +

See also widthUsed(). + +

int TQSimpleRichText::widthUsed () const +

+Returns the width in pixels that is actually used by the rich text +object. This can be smaller or wider than the set width. +

It may be wider, for example, if the text contains images or +non-breakable words that are already wider than the available +space. It's smaller when the object only consists of lines that do +not fill the width completely. +

See also width(). + + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsize-h.html b/doc/html/qsize-h.html new file mode 100644 index 00000000..92f83eda --- /dev/null +++ b/doc/html/qsize-h.html @@ -0,0 +1,282 @@ + + + + + +qsize.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsize.h

+ +

This is the verbatim text of the qsize.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsize.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQSize class
+**
+** Created : 931028
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSIZE_H
+#define TQSIZE_H
+
+#ifndef QT_H
+#include "qpoint.h" // ### change to qwindowdefs.h?
+#endif // QT_H
+
+class Q_EXPORT TQSize
+// ### Make TQSize inherit TQt in TQt 4.0
+{
+public:
+    // ### Move this enum to qnamespace.h in TQt 4.0
+    enum ScaleMode {
+	ScaleFree,
+	ScaleMin,
+	ScaleMax
+    };
+
+    TQSize();
+    TQSize( int w, int h );
+
+    bool isNull() const;
+    bool isEmpty() const;
+    bool isValid() const;
+
+    int width() const;
+    int height() const;
+    void setWidth( int w );
+    void setHeight( int h );
+    void transpose();
+
+    void scale( int w, int h, ScaleMode mode );
+    void scale( const TQSize &s, ScaleMode mode );
+
+    TQSize expandedTo( const TQSize & ) const;
+    TQSize boundedTo( const TQSize & ) const;
+
+    TQCOORD &rwidth();
+    TQCOORD &rheight();
+
+    TQSize &operator+=( const TQSize & );
+    TQSize &operator-=( const TQSize & );
+    TQSize &operator*=( int c );
+    TQSize &operator*=( double c );
+    TQSize &operator/=( int c );
+    TQSize &operator/=( double c );
+
+    friend inline bool operator==( const TQSize &, const TQSize & );
+    friend inline bool operator!=( const TQSize &, const TQSize & );
+    friend inline const TQSize operator+( const TQSize &, const TQSize & );
+    friend inline const TQSize operator-( const TQSize &, const TQSize & );
+    friend inline const TQSize operator*( const TQSize &, int );
+    friend inline const TQSize operator*( int, const TQSize & );
+    friend inline const TQSize operator*( const TQSize &, double );
+    friend inline const TQSize operator*( double, const TQSize & );
+    friend inline const TQSize operator/( const TQSize &, int );
+    friend inline const TQSize operator/( const TQSize &, double );
+
+private:
+    static void warningDivByZero();
+
+    TQCOORD wd;
+    TQCOORD ht;
+};
+
+
+/*****************************************************************************
+  TQSize stream functions
+ *****************************************************************************/
+
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQSize & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQSize & );
+
+
+/*****************************************************************************
+  TQSize inline functions
+ *****************************************************************************/
+
+inline TQSize::TQSize()
+{ wd = ht = -1; }
+
+inline TQSize::TQSize( int w, int h )
+{ wd=(TQCOORD)w; ht=(TQCOORD)h; }
+
+inline bool TQSize::isNull() const
+{ return wd==0 && ht==0; }
+
+inline bool TQSize::isEmpty() const
+{ return wd<1 || ht<1; }
+
+inline bool TQSize::isValid() const
+{ return wd>=0 && ht>=0; }
+
+inline int TQSize::width() const
+{ return wd; }
+
+inline int TQSize::height() const
+{ return ht; }
+
+inline void TQSize::setWidth( int w )
+{ wd=(TQCOORD)w; }
+
+inline void TQSize::setHeight( int h )
+{ ht=(TQCOORD)h; }
+
+inline TQCOORD &TQSize::rwidth()
+{ return wd; }
+
+inline TQCOORD &TQSize::rheight()
+{ return ht; }
+
+inline TQSize &TQSize::operator+=( const TQSize &s )
+{ wd+=s.wd; ht+=s.ht; return *this; }
+
+inline TQSize &TQSize::operator-=( const TQSize &s )
+{ wd-=s.wd; ht-=s.ht; return *this; }
+
+inline TQSize &TQSize::operator*=( int c )
+{ wd*=(TQCOORD)c; ht*=(TQCOORD)c; return *this; }
+
+inline TQSize &TQSize::operator*=( double c )
+{ wd=(TQCOORD)(wd*c); ht=(TQCOORD)(ht*c); return *this; }
+
+inline bool operator==( const TQSize &s1, const TQSize &s2 )
+{ return s1.wd == s2.wd && s1.ht == s2.ht; }
+
+inline bool operator!=( const TQSize &s1, const TQSize &s2 )
+{ return s1.wd != s2.wd || s1.ht != s2.ht; }
+
+inline const TQSize operator+( const TQSize & s1, const TQSize & s2 )
+{ return TQSize(s1.wd+s2.wd, s1.ht+s2.ht); }
+
+inline const TQSize operator-( const TQSize &s1, const TQSize &s2 )
+{ return TQSize(s1.wd-s2.wd, s1.ht-s2.ht); }
+
+inline const TQSize operator*( const TQSize &s, int c )
+{ return TQSize(s.wd*c, s.ht*c); }
+
+inline const TQSize operator*( int c, const TQSize &s )
+{  return TQSize(s.wd*c, s.ht*c); }
+
+inline const TQSize operator*( const TQSize &s, double c )
+{ return TQSize((TQCOORD)(s.wd*c), (TQCOORD)(s.ht*c)); }
+
+inline const TQSize operator*( double c, const TQSize &s )
+{ return TQSize((TQCOORD)(s.wd*c), (TQCOORD)(s.ht*c)); }
+
+inline TQSize &TQSize::operator/=( int c )
+{
+#if defined(QT_CHECK_MATH)
+    if ( c == 0 )
+	warningDivByZero();
+#endif
+    wd/=(TQCOORD)c; ht/=(TQCOORD)c;
+    return *this;
+}
+
+inline TQSize &TQSize::operator/=( double c )
+{
+#if defined(QT_CHECK_MATH)
+    if ( c == 0.0 )
+	warningDivByZero();
+#endif
+    wd=(TQCOORD)(wd/c); ht=(TQCOORD)(ht/c);
+    return *this;
+}
+
+inline const TQSize operator/( const TQSize &s, int c )
+{
+#if defined(QT_CHECK_MATH)
+    if ( c == 0 )
+	TQSize::warningDivByZero();
+#endif
+    return TQSize(s.wd/c, s.ht/c);
+}
+
+inline const TQSize operator/( const TQSize &s, double c )
+{
+#if defined(QT_CHECK_MATH)
+    if ( c == 0.0 )
+	TQSize::warningDivByZero();
+#endif
+    return TQSize((TQCOORD)(s.wd/c), (TQCOORD)(s.ht/c));
+}
+
+inline TQSize TQSize::expandedTo( const TQSize & otherSize ) const
+{
+    return TQSize( TQMAX(wd,otherSize.wd), TQMAX(ht,otherSize.ht) );
+}
+
+inline TQSize TQSize::boundedTo( const TQSize & otherSize ) const
+{
+    return TQSize( TQMIN(wd,otherSize.wd), TQMIN(ht,otherSize.ht) );
+}
+
+
+#endif // TQSIZE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsize-members.html b/doc/html/qsize-members.html new file mode 100644 index 00000000..f37b02df --- /dev/null +++ b/doc/html/qsize-members.html @@ -0,0 +1,64 @@ + + + + + +TQSize Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSize

+ +

This is the complete list of member functions for +TQSize, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsize.html b/doc/html/qsize.html new file mode 100644 index 00000000..9727d778 --- /dev/null +++ b/doc/html/qsize.html @@ -0,0 +1,378 @@ + + + + + +TQSize Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSize Class Reference

+ +

The TQSize class defines the size of a two-dimensional object. +More... +

#include <qsize.h> +

List of all member functions. +

Public Members

+ +

Related Functions

+
    +
  • bool operator== ( const TQSize & s1, const TQSize & s2 )
  • +
  • bool operator!= ( const TQSize & s1, const TQSize & s2 )
  • +
  • const TQSize operator+ ( const TQSize & s1, const TQSize & s2 )
  • +
  • const TQSize operator- ( const TQSize & s1, const TQSize & s2 )
  • +
  • const TQSize operator* ( const TQSize & s, int c )
  • +
  • const TQSize operator* ( int c, const TQSize & s )
  • +
  • const TQSize operator* ( const TQSize & s, double c )
  • +
  • const TQSize operator* ( double c, const TQSize & s )
  • +
  • const TQSize operator/ ( const TQSize & s, int c )
  • +
  • const TQSize operator/ ( const TQSize & s, double c )
  • +
  • TQDataStream & operator<< ( TQDataStream & s, const TQSize & sz )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQSize & sz )
  • +
+

Detailed Description

+ + +The TQSize class defines the size of a two-dimensional object. +

+ +

A size is specified by a width and a height. +

The coordinate type is TQCOORD (defined in <qwindowdefs.h> as int). +The minimum value of TQCOORD is TQCOORD_MIN (-2147483648) and the maximum +value is TQCOORD_MAX (2147483647). +

The size can be set in the constructor and changed with setWidth() +and setHeight(), or using operator+=(), operator-=(), operator*=() +and operator/=(), etc. You can swap the width and height with +transpose(). You can get a size which holds the maximum height and +width of two sizes using expandedTo(), and the minimum height and +width of two sizes using boundedTo(). +

See also TQPoint, TQRect, Graphics Classes, and Image Processing Classes. + +


Member Type Documentation

+

TQSize::ScaleMode

+

This enum type defines the different ways of scaling a size. +

+
    +
  • TQSize::ScaleFree - The size is scaled freely. The ratio is not preserved. +
  • TQSize::ScaleMin - The size is scaled to a rectangle as large as possible +inside a given rectangle, preserving the aspect ratio. +
  • TQSize::ScaleMax - The size is scaled to a rectangle as small as possible +outside a given rectangle, preserving the aspect ratio. +

See also TQSize::scale(), TQImage::scale(), and TQImage::smoothScale(). + +


Member Function Documentation

+

TQSize::TQSize () +

+ +Constructs a size with invalid (negative) width and height. + +

TQSize::TQSize ( int w, int h ) +

+ +Constructs a size with width w and height h. + +

TQSize TQSize::boundedTo ( const TQSize & otherSize ) const +

+ +

Returns a size with the minimum width and height of this size and +otherSize. + +

TQSize TQSize::expandedTo ( const TQSize & otherSize ) const +

+ +

Returns a size with the maximum width and height of this size and +otherSize. + +

Examples: customlayout/card.cpp and customlayout/flow.cpp. +

int TQSize::height () const +

+ +Returns the height. +

See also width(). + +

Examples: movies/main.cpp, qfd/fontdisplayer.cpp, and qfd/qfd.cpp. +

bool TQSize::isEmpty () const +

+ +Returns TRUE if the width is less than or equal to 0, or the height is +less than or equal to 0; otherwise returns FALSE. + +

bool TQSize::isNull () const +

+ +Returns TRUE if the width is 0 and the height is 0; otherwise +returns FALSE. + +

bool TQSize::isValid () const +

+ +Returns TRUE if the width is equal to or greater than 0 and the height is +equal to or greater than 0; otherwise returns FALSE. + +

TQSize & TQSize::operator*= ( int c ) +

+ +Multiplies both the width and height by c and returns a reference to +the size. + +

TQSize & TQSize::operator*= ( double c ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Multiplies both the width and height by c and returns a reference to +the size. +

Note that the result is truncated. + +

TQSize & TQSize::operator+= ( const TQSize & s ) +

+ +

Adds s to the size and returns a reference to this size. +

Example: +

+    TQSize s(  3, 7 );
+    TQSize r( -1, 4 );
+    s += r;                     // s becomes (2,11)
+
+ + +

TQSize & TQSize::operator-= ( const TQSize & s ) +

+ +

Subtracts s from the size and returns a reference to this size. +

Example: +

+    TQSize s(  3, 7 );
+    TQSize r( -1, 4 );
+    s -= r;                     // s becomes (4,3)
+  
+ + +

TQSize & TQSize::operator/= ( int c ) +

+ +Divides both the width and height by c and returns a reference to the +size. + +

TQSize & TQSize::operator/= ( double c ) +

+ +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Divides both the width and height by c and returns a reference to the +size. +

Note that the result is truncated. + +

TQCOORD & TQSize::rheight () +

+ +Returns a reference to the height. +

Using a reference makes it possible to directly manipulate the height. +

Example: +

+    TQSize s( 100, 10 );
+    s.rheight() += 5;           // s becomes (100,15)
+  
+ +

See also rwidth(). + +

TQCOORD & TQSize::rwidth () +

+ +Returns a reference to the width. +

Using a reference makes it possible to directly manipulate the width. +

Example: +

+    TQSize s( 100, 10 );
+    s.rwidth() += 20;           // s becomes (120,10)
+  
+ +

See also rheight(). + +

void TQSize::scale ( int w, int h, ScaleMode mode ) +

+Scales the size to a rectangle of width w and height h according +to the ScaleMode mode. +

    +
  • If mode is ScaleFree, the size is set to (w, h). +
  • If mode is ScaleMin, the current size is scaled to a rectangle +as large as possible inside (w, h), preserving the aspect ratio. +
  • If mode is ScaleMax, the current size is scaled to a rectangle +as small as possible outside (w, h), preserving the aspect ratio. +
+

Example: +

+    TQSize t1( 10, 12 );
+    t1.scale( 60, 60, TQSize::ScaleFree );
+    // t1 is (60, 60)
+
+    TQSize t2( 10, 12 );
+    t2.scale( 60, 60, TQSize::ScaleMin );
+    // t2 is (50, 60)
+
+    TQSize t3( 10, 12 );
+    t3.scale( 60, 60, TQSize::ScaleMax );
+    // t3 is (60, 72)
+    
+ + +

void TQSize::scale ( const TQSize & s, ScaleMode mode ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Equivalent to scale(s.width(), s.height(), mode). + +

void TQSize::setHeight ( int h ) +

+ +Sets the height to h. +

See also height() and setWidth(). + +

void TQSize::setWidth ( int w ) +

+ +Sets the width to w. +

See also width() and setHeight(). + +

void TQSize::transpose () +

+Swaps the values of width and height. + +

int TQSize::width () const +

+ +Returns the width. +

See also height(). + +

Examples: movies/main.cpp, qfd/fontdisplayer.cpp, and qfd/qfd.cpp. +


Related Functions

+

bool operator!= ( const TQSize & s1, const TQSize & s2 ) +

+ + +Returns TRUE if s1 and s2 are different; otherwise returns FALSE. + +

const TQSize operator* ( const TQSize & s, int c ) +

+ + +Multiplies s by c and returns the result. + +

const TQSize operator* ( int c, const TQSize & s ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+Multiplies s by c and returns the result. + +

const TQSize operator* ( const TQSize & s, double c ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+Multiplies s by c and returns the result. + +

const TQSize operator* ( double c, const TQSize & s ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+Multiplies s by c and returns the result. + +

const TQSize operator+ ( const TQSize & s1, const TQSize & s2 ) +

+ + +Returns the sum of s1 and s2; each component is added separately. + +

const TQSize operator- ( const TQSize & s1, const TQSize & s2 ) +

+ + +Returns s2 subtracted from s1; each component is +subtracted separately. + +

const TQSize operator/ ( const TQSize & s, int c ) +

+ + +Divides s by c and returns the result. + +

const TQSize operator/ ( const TQSize & s, double c ) +

+ + +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Divides s by c and returns the result. +

Note that the result is truncated. + +

TQDataStream & operator<< ( TQDataStream & s, const TQSize & sz ) +

+ +Writes the size sz to the stream s and returns a reference to +the stream. +

See also Format of the TQDataStream operators. + +

bool operator== ( const TQSize & s1, const TQSize & s2 ) +

+ + +Returns TRUE if s1 and s2 are equal; otherwise returns FALSE. + +

TQDataStream & operator>> ( TQDataStream & s, TQSize & sz ) +

+ +Reads the size from the stream s into size sz and returns a +reference to the stream. +

See also Format of the TQDataStream operators. + + +


+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/qsizegrip-h.html b/doc/html/qsizegrip-h.html new file mode 100644 index 00000000..60b6202d --- /dev/null +++ b/doc/html/qsizegrip-h.html @@ -0,0 +1,119 @@ + + + + + +qsizegrip.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsizegrip.h

+ +

This is the verbatim text of the qsizegrip.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsizegrip.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQSizeGrip class
+**
+** Created : 980316
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSIZEGRIP_H
+#define TQSIZEGRIP_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#endif // QT_H
+
+#ifndef QT_NO_SIZEGRIP
+
+class Q_EXPORT TQSizeGrip: public TQWidget
+{
+    Q_OBJECT
+public:
+    TQSizeGrip( TQWidget* parent, const char* name=0 );
+    ~TQSizeGrip();
+
+    TQSize sizeHint() const;
+
+protected:
+    void paintEvent( TQPaintEvent * );
+    void mousePressEvent( TQMouseEvent * );
+    void mouseMoveEvent( TQMouseEvent * );
+
+    bool eventFilter( TQObject *, TQEvent * );
+
+private:
+    TQPoint p;
+    TQSize s;
+    int d;
+    TQWidget *tlw;
+};
+
+#endif //QT_NO_SIZEGRIP
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsizegrip-m.png b/doc/html/qsizegrip-m.png new file mode 100644 index 00000000..1e5a31f5 Binary files /dev/null and b/doc/html/qsizegrip-m.png differ diff --git a/doc/html/qsizegrip-members.html b/doc/html/qsizegrip-members.html new file mode 100644 index 00000000..036cefdb --- /dev/null +++ b/doc/html/qsizegrip-members.html @@ -0,0 +1,338 @@ + + + + + +TQSizeGrip Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSizeGrip

+ +

This is the complete list of member functions for +TQSizeGrip, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsizegrip-w.png b/doc/html/qsizegrip-w.png new file mode 100644 index 00000000..418e5699 Binary files /dev/null and b/doc/html/qsizegrip-w.png differ diff --git a/doc/html/qsizegrip.html b/doc/html/qsizegrip.html new file mode 100644 index 00000000..69f421d6 --- /dev/null +++ b/doc/html/qsizegrip.html @@ -0,0 +1,112 @@ + + + + + +TQSizeGrip Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSizeGrip Class Reference

+ +

The TQSizeGrip class provides a corner-grip for resizing a top-level window. +More... +

#include <qsizegrip.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+ +

Protected Members

+ +

Detailed Description

+ + +

The TQSizeGrip class provides a corner-grip for resizing a top-level window. +

+ + +

This widget works like the standard Windows resize handle. In the +X11 version this resize handle generally works differently from +the one provided by the system; we hope to reduce this difference +in the future. +

Put this widget anywhere in a widget tree and the user can use it +to resize the top-level window. Generally, this should be in the +lower right-hand corner. Note that TQStatusBar already uses this +widget, so if you have a status bar (e.g. you are using +TQMainWindow), then you don't need to use this widget explicitly. +

+

See also TQStatusBar, Widget Appearance and Style, Main Window and Related Classes, and Basic Widgets. + +


Member Function Documentation

+

TQSizeGrip::TQSizeGrip ( TQWidget * parent, const char * name = 0 ) +

+Constructs a resize corner called name, as a child widget of parent. + +

TQSizeGrip::~TQSizeGrip () +

+Destroys the size grip. + +

void TQSizeGrip::mouseMoveEvent ( TQMouseEvent * e ) [virtual protected] +

+Resizes the top-level widget containing this widget. The event is +in e. + +

Reimplemented from TQWidget. +

void TQSizeGrip::mousePressEvent ( TQMouseEvent * e ) [virtual protected] +

+Primes the resize operation. The event is in e. + +

Reimplemented from TQWidget. +

void TQSizeGrip::paintEvent ( TQPaintEvent * e ) [virtual protected] +

+Paints the resize grip. Resize grips are usually rendered as small +diagonal textured lines in the lower-right corner. The event is in +e. + +

Reimplemented from TQWidget. +

TQSize TQSizeGrip::sizeHint () const [virtual] +

+Returns the size grip's size hint; this is a small size. + +

Reimplemented from TQWidget. + +


+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/qsizepolicy-h.html b/doc/html/qsizepolicy-h.html new file mode 100644 index 00000000..76fa8b58 --- /dev/null +++ b/doc/html/qsizepolicy-h.html @@ -0,0 +1,173 @@ + + + + + +qsizepolicy.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsizepolicy.h

+ +

This is the verbatim text of the qsizepolicy.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsizepolicy.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of the TQSizePolicy class
+**
+** Created : 980929
+**
+** Copyright (C) 1998-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSIZEPOLICY_H
+#define TQSIZEPOLICY_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#endif // QT_H
+
+// Documentation is in qabstractlayout.cpp.
+
+class Q_EXPORT TQSizePolicy
+{
+private:
+    enum SizePolicy_Internal { HSize = 6, HMask = 0x3f, VMask = HMask << HSize,
+                               MayGrow = 1, ExpMask = 2, MayShrink = 4 };
+public:
+    enum SizeType { Fixed = 0,
+		    Minimum = MayGrow,
+		    Maximum = MayShrink,
+		    Preferred = MayGrow | MayShrink,
+		    MinimumExpanding = MayGrow | ExpMask,
+		    Expanding = MayGrow | MayShrink | ExpMask,
+		    Ignored = ExpMask /* magic value */ };
+
+    enum ExpandData { NoDirection = 0,
+		      Horizontally = 1,
+		      Vertically = 2,
+#ifndef QT_NO_COMPAT
+		      Horizontal = Horizontally,
+		      Vertical = Vertically,
+#endif
+		      BothDirections = Horizontally | Vertically };
+
+    TQSizePolicy() : data( 0 ) { }
+
+    TQSizePolicy( SizeType hor, SizeType ver, bool hfw = FALSE )
+	: data( hor | (ver<<HSize) | (hfw ? (Q_UINT32)(1<<2*HSize) : 0) ) { }
+    TQSizePolicy( SizeType hor, SizeType ver, uchar hors, uchar vers, bool hfw = FALSE );
+
+    SizeType horData() const { return (SizeType)( data & HMask ); }
+    SizeType verData() const { return (SizeType)( (data & VMask) >> HSize ); }
+
+    bool mayShrinkHorizontally() const { return horData() & MayShrink || horData() == Ignored; }
+    bool mayShrinkVertically() const { return verData() & MayShrink || verData() == Ignored; }
+    bool mayGrowHorizontally() const { return horData() & MayGrow || horData() == Ignored; }
+    bool mayGrowVertically() const { return verData() & MayGrow || verData() == Ignored; }
+
+    ExpandData expanding() const
+    {
+	return (ExpandData)( (int)(verData() & ExpMask ? Vertically : 0) |
+			     (int)(horData() & ExpMask ? Horizontally : 0) );
+    }
+
+    void setHorData( SizeType d ) { data = (Q_UINT32)(data & ~HMask) | d; }
+    void setVerData( SizeType d ) { data = (Q_UINT32)(data & ~(HMask << HSize)) |
+					   (d << HSize); }
+
+    void setHeightForWidth( bool b ) { data = b ? (Q_UINT32)( data | ( 1 << 2*HSize ) )
+					      : (Q_UINT32)( data & ~( 1 << 2*HSize ) );  }
+    bool hasHeightForWidth() const { return data & ( 1 << 2*HSize ); }
+
+    bool operator==( const TQSizePolicy& s ) const { return data == s.data; }
+    bool operator!=( const TQSizePolicy& s ) const { return data != s.data; }
+
+
+    uint horStretch() const { return data >> 24; }
+    uint verStretch() const { return (data >> 16) & 0xff; }
+    void setHorStretch( uchar sf ) { data = (data&0x00ffffff) | (uint(sf)<<24); }
+    void setVerStretch( uchar sf ) { data = (data&0xff00ffff) | (uint(sf)<<16); }
+    inline void transpose();
+
+private:
+    TQSizePolicy( int i ) : data( (Q_UINT32)i ) { }
+
+    Q_UINT32 data;
+};
+
+inline TQSizePolicy::TQSizePolicy( SizeType hor, SizeType ver, uchar hors, uchar vers, bool hfw )
+    : data( hor | (ver<<HSize) | (hfw ? (Q_UINT32)(1<<2*HSize) : 0) ) {
+    setHorStretch( hors );
+    setVerStretch( vers );
+}
+
+inline void TQSizePolicy::transpose() {
+    *this = TQSizePolicy( verData(), horData(), verStretch(), horStretch(),
+			 hasHeightForWidth() );
+}
+
+#endif // TQSIZEPOLICY_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsizepolicy-members.html b/doc/html/qsizepolicy-members.html new file mode 100644 index 00000000..703b288a --- /dev/null +++ b/doc/html/qsizepolicy-members.html @@ -0,0 +1,65 @@ + + + + + +TQSizePolicy Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSizePolicy

+ +

This is the complete list of member functions for +TQSizePolicy, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsizepolicy.html b/doc/html/qsizepolicy.html new file mode 100644 index 00000000..feaf9851 --- /dev/null +++ b/doc/html/qsizepolicy.html @@ -0,0 +1,291 @@ + + + + + +TQSizePolicy Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSizePolicy Class Reference

+ +

The TQSizePolicy class is a layout attribute describing horizontal +and vertical resizing policy. +More... +

#include <qsizepolicy.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQSizePolicy class is a layout attribute describing horizontal +and vertical resizing policy. +

+ +

The size policy of a widget is an expression of its willingness to +be resized in various ways. +

Widgets that reimplement TQWidget::sizePolicy() return a TQSizePolicy +that describes the horizontal and vertical resizing policy they +prefer when being laid out. Only one of the + constructors is of interest in most applications. +

TQSizePolicy contains two independent SizeType objects; one describes +the widgets's horizontal size policy, and the other describes its +vertical size policy. It also contains a flag to indicate whether the +height and width of its preferred size are related. +

The horizontal and vertical SizeTypes are set in the usual constructor +and can be queried using a variety of functions. +

The hasHeightForWidth() flag indicates whether the widget's sizeHint() +is width-dependent (such as a word-wrapping label) or not. +

See also TQSizePolicy::SizeType, Widget Appearance and Style, and Layout Management. + +


Member Type Documentation

+

TQSizePolicy::ExpandData

+ +

This enum type describes in which directions a widget can make use +of extra space. There are four possible values: +

    +
  • TQSizePolicy::NoDirection - the widget cannot make use of extra space in +any direction. +
  • TQSizePolicy::Horizontally - the widget can usefully be wider than the +sizeHint(). +
  • TQSizePolicy::Vertically - the widget can usefully be taller than the +sizeHint(). +
  • TQSizePolicy::BothDirections - the widget can usefully be both wider and +taller than the sizeHint(). +
+

TQSizePolicy::SizeType

+ +

The per-dimension sizing types used when constructing a +TQSizePolicy are: +

    +
  • TQSizePolicy::Fixed - The TQWidget::sizeHint() is the only acceptable +alternative, so the widget can never grow or shrink (e.g. the +vertical direction of a push button). +
  • TQSizePolicy::Minimum - The sizeHint() is minimal, and sufficient. The +widget can be expanded, but there is no advantage to it being +larger (e.g. the horizontal direction of a push button). +It cannot be smaller than the size provided by sizeHint(). +
  • TQSizePolicy::Maximum - The sizeHint() is a maximum. The widget can be +shrunk any amount without detriment if other widgets need the +space (e.g. a separator line). +It cannot be larger than the size provided by sizeHint(). +
  • TQSizePolicy::Preferred - The sizeHint() is best, but the widget can be +shrunk and still be useful. The widget can be expanded, but there +is no advantage to it being larger than sizeHint() (the default +TQWidget policy). +
  • TQSizePolicy::Expanding - The sizeHint() is a sensible size, but the +widget can be shrunk and still be useful. The widget can make use +of extra space, so it should get as much space as possible (e.g. +the horizontal direction of a slider). +
  • TQSizePolicy::MinimumExpanding - The sizeHint() is minimal, and sufficient. +The widget can make use of extra space, so it should get as much +space as possible (e.g. the horizontal direction of a slider). +
  • TQSizePolicy::Ignored - the sizeHint() is ignored. The widget will get as +much space as possible. +
+

Member Function Documentation

+

TQSizePolicy::TQSizePolicy () +

+ +

Constructs a minimally initialized TQSizePolicy. + +

TQSizePolicy::TQSizePolicy ( SizeType hor, SizeType ver, bool hfw = FALSE ) +

+ +

+This is the constructor normally used to return a value in the +overridden TQWidget::sizePolicy() function of a TQWidget +subclass. +

It constructs a TQSizePolicy with independent horizontal and +vertical sizing types, hor and ver respectively. These sizing types affect how the widget +is treated by the layout engine. +

If hfw is TRUE, the preferred height of the widget is dependent +on the width of the widget (for example, a TQLabel with line +wrapping). +

See also horData(), verData(), and hasHeightForWidth(). + +

TQSizePolicy::TQSizePolicy ( SizeType hor, SizeType ver, uchar horStretch, uchar verStretch, bool hfw = FALSE ) +

+ +

Constructs a TQSizePolicy with independent horizontal and vertical +sizing types hor and ver, and stretch factors horStretch +and verStretch. +

If hfw is TRUE, the preferred height of the widget is dependent on the +width of the widget. +

See also horStretch() and verStretch(). + +

ExpandData TQSizePolicy::expanding () const +

+ +

Returns whether this layout can make use of more space than +sizeHint(). A value of Vertical or Horizontal means that it wants +to grow in only one dimension, whereas BothDirections means that +it wants to grow in both dimensions. +

See also mayShrinkHorizontally(), mayGrowHorizontally(), mayShrinkVertically(), and mayGrowVertically(). + +

bool TQSizePolicy::hasHeightForWidth () const +

+ +

Returns TRUE if the widget's preferred height depends on its +width; otherwise returns FALSE. +

See also setHeightForWidth(). + +

SizeType TQSizePolicy::horData () const +

+ +

Returns the horizontal component of the size policy. +

See also setHorData(), verData(), and horStretch(). + +

uint TQSizePolicy::horStretch () const +

+ +

Returns the horizontal stretch factor of the size policy. +

See also setHorStretch() and verStretch(). + +

bool TQSizePolicy::mayGrowHorizontally () const +

+ +

Returns TRUE if the widget can sensibly be wider than its +sizeHint(); otherwise returns FALSE. +

See also mayGrowVertically() and mayShrinkHorizontally(). + +

bool TQSizePolicy::mayGrowVertically () const +

+ +

Returns TRUE if the widget can sensibly be taller than its +sizeHint(); otherwise returns FALSE. +

See also mayGrowHorizontally() and mayShrinkVertically(). + +

bool TQSizePolicy::mayShrinkHorizontally () const +

+ +

Returns TRUE if the widget can sensibly be narrower than its +sizeHint(); otherwise returns FALSE. +

See also mayShrinkVertically() and mayGrowHorizontally(). + +

bool TQSizePolicy::mayShrinkVertically () const +

+ +

Returns TRUE if the widget can sensibly be shorter than its +sizeHint(); otherwise returns FALSE. +

See also mayShrinkHorizontally() and mayGrowVertically(). + +

bool TQSizePolicy::operator!= ( const TQSizePolicy & s ) const +

+ +

Returns TRUE if this policy is different from s; otherwise +returns FALSE. +

See also operator==(). + +

bool TQSizePolicy::operator== ( const TQSizePolicy & s ) const +

+ +

Returns TRUE if this policy is equal to s; otherwise returns +FALSE. +

See also operator!=(). + +

void TQSizePolicy::setHeightForWidth ( bool b ) +

+ +

Sets the hasHeightForWidth() flag to b. +

See also hasHeightForWidth(). + +

void TQSizePolicy::setHorData ( SizeType d ) +

+ +

Sets the horizontal component of the size policy to size type d. +

See also horData() and setVerData(). + +

void TQSizePolicy::setHorStretch ( uchar sf ) +

+ +

Sets the horizontal stretch factor of the size policy to sf. +

See also horStretch() and setVerStretch(). + +

void TQSizePolicy::setVerData ( SizeType d ) +

+ +

Sets the vertical component of the size policy to size type d. +

See also verData() and setHorData(). + +

void TQSizePolicy::setVerStretch ( uchar sf ) +

+ +

Sets the vertical stretch factor of the size policy to sf. +

See also verStretch() and setHorStretch(). + +

void TQSizePolicy::transpose () +

+ +

Swaps the horizontal and vertical policies and stretches. + +

SizeType TQSizePolicy::verData () const +

+ +

Returns the vertical component of the size policy. +

See also setVerData(), horData(), and verStretch(). + +

uint TQSizePolicy::verStretch () const +

+ +

Returns the vertical stretch factor of the size policy. +

See also setVerStretch() and horStretch(). + + +


+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/qsjiscodec-h.html b/doc/html/qsjiscodec-h.html new file mode 100644 index 00000000..9cea1916 --- /dev/null +++ b/doc/html/qsjiscodec-h.html @@ -0,0 +1,156 @@ + + + + + +qsjiscodec.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsjiscodec.h

+ +

This is the verbatim text of the qsjiscodec.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsjiscodec.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQSjisCodec class
+**
+** Created : 990225
+**
+** Copyright (C) 2000-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 retquirements 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.
+**
+**********************************************************************/
+
+// Most of the code here was originally written by Serika Kurusugawa
+// a.k.a. Junji Takagi, and is included in TQt with the author's permission,
+// and the grateful thanks of the Trolltech team.
+
+/*
+ * Copyright (C) 1999 Serika Kurusugawa, All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef TQSJISCODEC_H
+#define TQSJISCODEC_H
+
+#ifndef QT_H
+#include "qtextcodec.h"
+#include "qjpunicode.h"
+#endif // QT_H
+
+#ifndef QT_NO_BIG_CODECS
+
+#if defined(QT_PLUGIN)
+#define Q_EXPORT_CODECS_JP
+#else
+#define Q_EXPORT_CODECS_JP Q_EXPORT
+#endif
+
+class Q_EXPORT_CODECS_JP TQSjisCodec : public TQTextCodec {
+public:
+    virtual int mibEnum() const;
+    const char* name() const;
+    const char* mimeName() const;
+
+    TQTextDecoder* makeDecoder() const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQTextCodec::fromUnicode;
+#endif
+    TQCString fromUnicode(const TQString& uc, int& lenInOut) const;
+    TQString toUnicode(const char* chars, int len) const;
+
+    int heuristicContentMatch(const char* chars, int len) const;
+    int heuristicNameMatch(const char* hint) const;
+
+    TQSjisCodec();
+    ~TQSjisCodec();
+
+protected:
+    const TQJpUnicodeConv *conv;
+};
+
+#endif
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsjiscodec-members.html b/doc/html/qsjiscodec-members.html new file mode 100644 index 00000000..5d86f53e --- /dev/null +++ b/doc/html/qsjiscodec-members.html @@ -0,0 +1,73 @@ + + + + + +TQSjisCodec Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSjisCodec

+ +

This is the complete list of member functions for +TQSjisCodec, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsjiscodec.html b/doc/html/qsjiscodec.html new file mode 100644 index 00000000..b7a6e84f --- /dev/null +++ b/doc/html/qsjiscodec.html @@ -0,0 +1,113 @@ + + + + + +TQSjisCodec Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSjisCodec Class Reference

+ +

The TQSjisCodec class provides conversion to and from Shift-JIS. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qsjiscodec.h> +

Inherits TQTextCodec. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQSjisCodec class provides conversion to and from Shift-JIS. +

More precisely, the TQSjisCodec class subclasses TQTextCodec to +provide support for Shift-JIS, an encoding of JIS X 0201 Latin, JIS +X 0201 Kana or JIS X 0208. +

The environment variable UNICODEMAP_JP can be used to fine-tune +TQJisCodec, TQSjisCodec and TQEucJpCodec. The TQJisCodec +documentation describes how to use this variable. +

Most of the code here was written by Serika Kurusugawa, +a.k.a. Junji Takagi, and is included in TQt with the author's +permission and the grateful thanks of the Trolltech team. +Here is the copyright statement for the code as it was at the +point of contribution. Trolltech's subsequent modifications +are covered by the usual copyright for TQt. +

+

Copyright (C) 1999 Serika Kurusugawa. All rights reserved. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS". +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. +

See also Internationalization with TQt. + +


Member Function Documentation

+

TQSjisCodec::TQSjisCodec () +

+Creates a Shift-JIS codec. Note that this is done automatically by +the TQApplication, you do not need construct your own. + +

TQSjisCodec::~TQSjisCodec () +

+Destroys the Shift-JIS codec. + +

const char * TQSjisCodec::mimeName () const [virtual] +

+Returns the codec's mime name. + +

Reimplemented from TQTextCodec. + +


+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/qslider-h.html b/doc/html/qslider-h.html new file mode 100644 index 00000000..8bfba043 --- /dev/null +++ b/doc/html/qslider-h.html @@ -0,0 +1,244 @@ + + + + + +qslider.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qslider.h

+ +

This is the verbatim text of the qslider.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qslider.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQSlider class
+**
+** Created : 961019
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSLIDER_H
+#define TQSLIDER_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qrangecontrol.h"
+#endif // QT_H
+
+#ifndef QT_NO_SLIDER
+
+struct TQSliderPrivate;
+
+class TQTimer;
+
+class Q_EXPORT TQSlider : public TQWidget, public TQRangeControl
+{
+    Q_OBJECT
+    Q_ENUMS( TickSetting )
+    Q_PROPERTY( int minValue READ minValue WRITE setMinValue )
+    Q_PROPERTY( int maxValue READ maxValue WRITE setMaxValue )
+    Q_PROPERTY( int lineStep READ lineStep WRITE setLineStep )
+    Q_PROPERTY( int pageStep READ pageStep WRITE setPageStep )
+    Q_PROPERTY( int value READ value WRITE setValue )
+    Q_PROPERTY( bool tracking READ tracking WRITE setTracking )
+    Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
+    Q_PROPERTY( TickSetting tickmarks READ tickmarks WRITE setTickmarks )
+    Q_PROPERTY( int tickInterval READ tickInterval WRITE setTickInterval )
+	
+public:
+    enum TickSetting { NoMarks = 0, Above = 1, Left = Above,
+		       Below = 2, Right = Below, Both = 3 };
+
+    TQSlider( TQWidget *parent, const char* name = 0 );
+    TQSlider( Orientation, TQWidget *parent, const char* name = 0 );
+    TQSlider( int minValue, int maxValue, int pageStep, int value, Orientation,
+	     TQWidget *parent, const char* name = 0 );
+    ~TQSlider();
+
+    virtual void	setOrientation( Orientation );
+    Orientation orientation() const;
+    virtual void	setTracking( bool enable );
+    bool	tracking() const;
+    virtual void 	setPalette( const TQPalette & );
+
+    int sliderStart() const;
+    TQRect sliderRect() const;
+    TQSize sizeHint() const;
+    void setSizePolicy( TQSizePolicy sp );
+    void setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw = FALSE );
+
+    TQSizePolicy sizePolicy() const;
+    TQSize minimumSizeHint() const;
+
+    virtual void setTickmarks( TickSetting );
+    TickSetting tickmarks() const { return ticks; }
+
+    virtual void setTickInterval( int );
+    int 	tickInterval() const { return tickInt; }
+
+    int	 minValue() const;
+    int	 maxValue() const;
+    void setMinValue( int );
+    void setMaxValue( int );
+    int	 lineStep() const;
+    int	 pageStep() const;
+    void setLineStep( int );
+    void setPageStep( int );
+    int  value() const;
+
+public slots:
+    virtual void	setValue( int );
+    void	addStep();
+    void	subtractStep();
+    void	addLine();
+    void	subtractLine();
+
+signals:
+    void	valueChanged( int value );
+    void	sliderPressed();
+    void	sliderMoved( int value );
+    void	sliderReleased();
+
+protected:
+    void	resizeEvent( TQResizeEvent * );
+    void	paintEvent( TQPaintEvent * );
+
+    void	keyPressEvent( TQKeyEvent * );
+    void	mousePressEvent( TQMouseEvent * );
+    void	mouseReleaseEvent( TQMouseEvent * );
+    void	mouseMoveEvent( TQMouseEvent * );
+#ifndef QT_NO_WHEELEVENT
+    void	wheelEvent( TQWheelEvent * );
+#endif
+    void	focusInEvent( TQFocusEvent *e );
+    void	focusOutEvent( TQFocusEvent *e );
+
+    void	styleChange( TQStyle& );
+
+    void	valueChange();
+    void	rangeChange();
+
+private slots:
+    void	repeatTimeout();
+
+private:
+    enum State { Idle, Dragging, TimingUp, TimingDown };
+
+    void	init();
+    int		positionFromValue( int ) const;
+    int		valueFromPosition( int ) const;
+    void	moveSlider( int );
+    void	reallyMoveSlider( int );
+    void	resetState();
+    int		available() const;
+    int		goodPart( const TQPoint& ) const;
+    void	initTicks();
+
+    TQSliderPrivate *d;
+    TQTimer	*timer;
+    TQCOORD	sliderPos;
+    int		sliderVal;
+    TQCOORD	clickOffset;
+    State	state;
+    bool	track;
+    TQCOORD	tickOffset;
+    TickSetting	ticks;
+    int		tickInt;
+    Orientation orient;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQSlider( const TQSlider & );
+    TQSlider &operator=( const TQSlider & );
+#endif
+};
+
+inline bool TQSlider::tracking() const
+{
+    return track;
+}
+
+inline TQSlider::Orientation TQSlider::orientation() const
+{
+    return orient;
+}
+
+inline int TQSlider::sliderStart() const
+{
+    return sliderPos;
+}
+
+inline void TQSlider::setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw )
+{ 
+    TQWidget::setSizePolicy( hor, ver, hfw ); 
+}
+
+#endif // QT_NO_SLIDER
+
+#endif // TQSLIDER_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qslider-m.png b/doc/html/qslider-m.png new file mode 100644 index 00000000..37a19b6e Binary files /dev/null and b/doc/html/qslider-m.png differ diff --git a/doc/html/qslider-members.html b/doc/html/qslider-members.html new file mode 100644 index 00000000..89c5a9fd --- /dev/null +++ b/doc/html/qslider-members.html @@ -0,0 +1,378 @@ + + + + + +TQSlider Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSlider

+ +

This is the complete list of member functions for +TQSlider, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qslider-w.png b/doc/html/qslider-w.png new file mode 100644 index 00000000..d39e1582 Binary files /dev/null and b/doc/html/qslider-w.png differ diff --git a/doc/html/qslider.html b/doc/html/qslider.html new file mode 100644 index 00000000..9c37ce7a --- /dev/null +++ b/doc/html/qslider.html @@ -0,0 +1,368 @@ + + + + + +TQSlider Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSlider Class Reference

+ +

The TQSlider widget provides a vertical or horizontal slider. +More... +

#include <qslider.h> +

Inherits TQWidget and TQRangeControl. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Important Inherited Members

+
    +
  • void setRange ( int minValue, int maxValue )
  • +
+

Properties

+
    +
  • int lineStep - the current line step
  • +
  • int maxValue - the current maximum value of the slider
  • +
  • int minValue - the current minimum value of the slider
  • +
  • Orientation orientation - the slider's orientation
  • +
  • int pageStep - the current page step
  • +
  • int tickInterval - the interval between tickmarks
  • +
  • TickSetting tickmarks - the tickmark settings for this slider
  • +
  • bool tracking - whether slider tracking is enabled
  • +
  • int value - the current slider value
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQSlider widget provides a vertical or horizontal slider. +

+ +

The slider is the classic widget for controlling a bounded value. +It lets the user move a slider along a horizontal or vertical +groove and translates the slider's position into an integer value +within the legal range. +

TQSlider inherits TQRangeControl, which provides the "integer" side +of the slider. setRange() and value() are likely to be used by +practically all slider users; see the TQRangeControl +documentation for information about the many other functions that +class provides. +

The main functions offered by the slider itself are tickmark and +orientation control; you can use setTickmarks() to indicate where +you want the tickmarks to be, setTickInterval() to indicate how +many of them you want and setOrientation() to indicate whether the +slider is to be horizontal or vertical. +

A slider accepts focus on Tab and uses the mouse wheel and a +suitable keyboard interface. +

+

+

See also TQScrollBar, TQSpinBox, GUI Design Handbook: Slider, and Basic Widgets. + +


Member Type Documentation

+

TQSlider::TickSetting

+ +

This enum specifies where the tickmarks are to be drawn relative +to the slider's groove and the handle the user moves. +

    +
  • TQSlider::NoMarks - do not draw any tickmarks. +
  • TQSlider::Both - draw tickmarks on both sides of the groove. +
  • TQSlider::Above - draw tickmarks above the (horizontal) slider +
  • TQSlider::Below - draw tickmarks below the (horizontal) slider +
  • TQSlider::Left - draw tickmarks to the left of the (vertical) slider +
  • TQSlider::Right - draw tickmarks to the right of the (vertical) slider +
+

Member Function Documentation

+

TQSlider::TQSlider ( TQWidget * parent, const char * name = 0 ) +

+Constructs a vertical slider. +

The parent and name arguments are sent on to the TQWidget +constructor. + +

TQSlider::TQSlider ( Orientation orientation, TQWidget * parent, const char * name = 0 ) +

+Constructs a slider. +

The orientation must be TQt::Vertical or TQt::Horizontal. +

The parent and name arguments are sent on to the TQWidget +constructor. + +

TQSlider::TQSlider ( int minValue, int maxValue, int pageStep, int value, Orientation orientation, TQWidget * parent, const char * name = 0 ) +

+Constructs a slider whose value can never be smaller than minValue or greater than maxValue, whose page step size is pageStep and whose value is initially value (which is +guaranteed to be in range using bound()). +

If orientation is TQt::Vertical the slider is vertical and if it +is TQt::Horizontal the slider is horizontal. +

The parent and name arguments are sent on to the TQWidget +constructor. + +

TQSlider::~TQSlider () +

+Destructor. + +

void TQSlider::addStep () [slot] +

+Moves the slider one pageStep() up or right. + +

int TQSlider::lineStep () const +

Returns the current line step. +See the "lineStep" property for details. +

int TQSlider::maxValue () const +

Returns the current maximum value of the slider. +See the "maxValue" property for details. +

int TQSlider::minValue () const +

Returns the current minimum value of the slider. +See the "minValue" property for details. +

Orientation TQSlider::orientation () const +

Returns the slider's orientation. +See the "orientation" property for details. +

int TQSlider::pageStep () const +

Returns the current page step. +See the "pageStep" property for details. +

void TQSlider::rangeChange () [virtual protected] +

+Implements the virtual TQRangeControl function. + +

Reimplemented from TQRangeControl. +

void TQSlider::setLineStep ( int ) +

Sets the current line step. +See the "lineStep" property for details. +

void TQSlider::setMaxValue ( int ) +

Sets the current maximum value of the slider. +See the "maxValue" property for details. +

void TQSlider::setMinValue ( int ) +

Sets the current minimum value of the slider. +See the "minValue" property for details. +

void TQSlider::setOrientation ( Orientation ) [virtual] +

Sets the slider's orientation. +See the "orientation" property for details. +

void TQSlider::setPageStep ( int ) +

Sets the current page step. +See the "pageStep" property for details. +

void TQSlider::setPalette ( const TQPalette & p ) [virtual] +

+Reimplements the virtual function TQWidget::setPalette(). +

Sets the background color to the mid color for Motif style sliders +using palette p. + +

Reimplemented from TQWidget. +

void TQRangeControl::setRange ( int minValue, int maxValue ) +

+Sets the range control's minimum value to minValue and its +maximum value to maxValue. +

Calls the virtual rangeChange() function if one or both of the new +minimum and maximum values are different from the previous +setting. Calls the virtual valueChange() function if the current +value is adjusted because it was outside the new range. +

If maxValue is smaller than minValue, minValue becomes +the only legal value. +

See also minValue and maxValue. + +

Examples: listbox/listbox.cpp, t12/lcdrange.cpp, t5/main.cpp, t6/main.cpp, t8/lcdrange.cpp, and xform/xform.cpp. +

void TQSlider::setTickInterval ( int ) [virtual] +

Sets the interval between tickmarks. +See the "tickInterval" property for details. +

void TQSlider::setTickmarks ( TickSetting ) [virtual] +

Sets the tickmark settings for this slider. +See the "tickmarks" property for details. +

void TQSlider::setTracking ( bool enable ) [virtual] +

Sets whether slider tracking is enabled to enable. +See the "tracking" property for details. +

void TQSlider::setValue ( int ) [virtual slot] +

Sets the current slider value. +See the "value" property for details. +

void TQSlider::sliderMoved ( int value ) [signal] +

+ +

This signal is emitted when the slider is dragged, with the new +slider value as its argument. + +

void TQSlider::sliderPressed () [signal] +

+ +

This signal is emitted when the user presses the slider with the +mouse. + +

TQRect TQSlider::sliderRect () const +

+Returns the slider handle rectangle. (This is the visual marker +that the user can move.) + +

void TQSlider::sliderReleased () [signal] +

+ +

This signal is emitted when the user releases the slider with the mouse. + +

int TQSlider::sliderStart () const +

+ +

Returns the start position of the slider. + +

void TQSlider::subtractStep () [slot] +

+Moves the slider one pageStep() down or left. + +

int TQSlider::tickInterval () const +

Returns the interval between tickmarks. +See the "tickInterval" property for details. +

TickSetting TQSlider::tickmarks () const +

Returns the tickmark settings for this slider. +See the "tickmarks" property for details. +

bool TQSlider::tracking () const +

Returns TRUE if slider tracking is enabled; otherwise returns FALSE. +See the "tracking" property for details. +

int TQSlider::value () const +

Returns the current slider value. +See the "value" property for details. +

void TQSlider::valueChange () [virtual protected] +

+Implements the virtual TQRangeControl function. + +

Reimplemented from TQRangeControl. +

void TQSlider::valueChanged ( int value ) [signal] +

+ +

This signal is emitted when the slider value is changed, with the +new slider value as its argument. + +

Examples: rangecontrols/rangecontrols.cpp, simple/main.cpp, t12/lcdrange.cpp, t5/main.cpp, t6/main.cpp, t7/lcdrange.cpp, and xform/xform.cpp. +


Property Documentation

+

int lineStep

+

This property holds the current line step. +

When setting lineStep, the virtual stepChange() function will be +called if the new line step is different from the previous +setting. +

See also setSteps(), TQRangeControl::pageStep(), and setRange(). + +

Set this property's value with setLineStep() and get this property's value with lineStep(). +

int maxValue

+

This property holds the current maximum value of the slider. +

When setting this property, the TQSlider::minValue is adjusted, +if necessary, to ensure that the range remains valid. +

See also setRange(). + +

Set this property's value with setMaxValue() and get this property's value with maxValue(). +

int minValue

+

This property holds the current minimum value of the slider. +

When setting this property, the TQSlider::maxValue is adjusted, +if necessary, to ensure that the range remains valid. +

See also setRange(). + +

Set this property's value with setMinValue() and get this property's value with minValue(). +

Orientation orientation

+

This property holds the slider's orientation. +

The orientation must be TQt::Vertical (the default) or TQt::Horizontal. + +

Set this property's value with setOrientation() and get this property's value with orientation(). +

int pageStep

+

This property holds the current page step. +

When setting pageStep, the virtual stepChange() function will be +called if the new page step is different from the previous +setting. +

See also TQRangeControl::setSteps(), lineStep, and setRange(). + +

Set this property's value with setPageStep() and get this property's value with pageStep(). +

int tickInterval

+

This property holds the interval between tickmarks. +

This is a value interval, not a pixel interval. If it is 0, the +slider will choose between lineStep() and pageStep(). The initial +value of tickInterval is 0. +

See also TQRangeControl::lineStep() and TQRangeControl::pageStep(). + +

Set this property's value with setTickInterval() and get this property's value with tickInterval(). +

TickSetting tickmarks

+

This property holds the tickmark settings for this slider. +

The valid values are in TQSlider::TickSetting. The default is +NoMarks. +

See also tickInterval. + +

Set this property's value with setTickmarks() and get this property's value with tickmarks(). +

bool tracking

+

This property holds whether slider tracking is enabled. +

If tracking is enabled (the default), the slider emits the +valueChanged() signal whenever the slider is being dragged. If +tracking is disabled, the slider emits the valueChanged() signal +when the user releases the mouse button (unless the value happens +to be the same as before). + +

Set this property's value with setTracking() and get this property's value with tracking(). +

int value

+

This property holds the current slider value. +

Set this property's value with setValue() and get this property's value with value(). +

See also TQRangeControl::value() and prevValue(). + + +


+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/qsmetric.png b/doc/html/qsmetric.png new file mode 100644 index 00000000..ba0ef2f4 Binary files /dev/null and b/doc/html/qsmetric.png differ diff --git a/doc/html/qsocket-h.html b/doc/html/qsocket-h.html new file mode 100644 index 00000000..b03852c3 --- /dev/null +++ b/doc/html/qsocket-h.html @@ -0,0 +1,201 @@ + + + + + +qsocket.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsocket.h

+ +

This is the verbatim text of the qsocket.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsocket.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQSocket class.
+**
+** Created : 970521
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the network 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 retquirements 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 TQSOCKET_H
+#define TQSOCKET_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qiodevice.h"
+#include "qhostaddress.h" // int->TQHostAddress conversion
+#endif // QT_H
+
+#if !defined( QT_MODULE_NETWORK ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_NETWORK )
+#define TQM_EXPORT_NETWORK
+#else
+#define TQM_EXPORT_NETWORK Q_EXPORT
+#endif
+
+#ifndef QT_NO_NETWORK
+class TQSocketPrivate;
+class TQSocketDevice;
+
+
+class TQM_EXPORT_NETWORK TQSocket : public TQObject, public TQIODevice
+{
+    Q_OBJECT
+public:
+    enum Error {
+	ErrConnectionRefused,
+	ErrHostNotFound,
+	ErrSocketRead
+    };
+
+    TQSocket( TQObject *parent=0, const char *name=0 );
+    virtual ~TQSocket();
+
+    enum State { Idle, HostLookup, Connecting,
+		 Connected, Closing,
+		 Connection=Connected };
+    State	 state() const;
+
+    int		 socket() const;
+    virtual void setSocket( int );
+
+    TQSocketDevice *socketDevice();
+    virtual void setSocketDevice( TQSocketDevice * );
+
+#ifndef QT_NO_DNS
+    virtual void connectToHost( const TQString &host, Q_UINT16 port );
+#endif
+    TQString	 peerName() const;
+
+    // Implementation of TQIODevice abstract virtual functions
+    bool	 open( int mode );
+    void	 close();
+    void	 flush();
+    Offset	 size() const;
+    Offset	 at() const;
+    bool	 at( Offset );
+    bool	 atEnd() const;
+
+    Q_ULONG	 bytesAvailable() const; // ### TQIODevice::Offset instead?
+    Q_ULONG	 waitForMore( int msecs, bool *timeout  ) const;
+    Q_ULONG	 waitForMore( int msecs ) const; // ### TQt 4.0: merge the two overloads
+    Q_ULONG	 bytesToWrite() const;
+    void	 clearPendingData();
+
+    Q_LONG	 readBlock( char *data, Q_ULONG maxlen );
+    Q_LONG	 writeBlock( const char *data, Q_ULONG len );
+    Q_LONG	 readLine( char *data, Q_ULONG maxlen );
+
+    int		 getch();
+    int		 putch( int );
+    int		 ungetch(int);
+
+    bool	 canReadLine() const;
+    virtual	 TQString readLine();
+
+    Q_UINT16	 port() const;
+    Q_UINT16	 peerPort() const;
+    TQHostAddress address() const;
+    TQHostAddress peerAddress() const;
+
+    void	 setReadBufferSize( Q_ULONG );
+    Q_ULONG	 readBufferSize() const;
+
+signals:
+    void	 hostFound();
+    void	 connected();
+    void	 connectionClosed();
+    void	 delayedCloseFinished();
+    void	 readyRead();
+    void	 bytesWritten( int nbytes );
+    void	 error( int );
+
+protected slots:
+    virtual void sn_read( bool force=FALSE );
+    virtual void sn_write();
+
+private slots:
+    void	tryConnecting();
+    void	emitErrorConnectionRefused();
+
+private:
+    TQSocketPrivate *d;
+
+    bool	 consumeWriteBuf( Q_ULONG nbytes );
+    void	 tryConnection();
+    void         setSocketIntern( int socket );
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQSocket( const TQSocket & );
+    TQSocket &operator=( const TQSocket & );
+#endif
+};
+
+#endif //QT_NO_NETWORK
+#endif // TQSOCKET_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsocket-members.html b/doc/html/qsocket-members.html new file mode 100644 index 00000000..a591f561 --- /dev/null +++ b/doc/html/qsocket-members.html @@ -0,0 +1,151 @@ + + + + + +TQSocket Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSocket

+ +

This is the complete list of member functions for +TQSocket, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsocket.html b/doc/html/qsocket.html new file mode 100644 index 00000000..1899f20b --- /dev/null +++ b/doc/html/qsocket.html @@ -0,0 +1,500 @@ + + + + + +TQSocket Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSocket Class Reference
[network module]

+ +

The TQSocket class provides a buffered TCP connection. +More... +

#include <qsocket.h> +

Inherits TQObject and TQIODevice. +

List of all member functions. +

Public Members

+ +

Signals

+ +

Detailed Description

+ + +The TQSocket class provides a buffered TCP connection. + +

+ +

It provides a totally non-blocking TQIODevice, and modifies and +extends the API of TQIODevice with socket-specific code. +

Note that a TQApplication must have been constructed before this +class can be used. +

The functions you're likely to call most are connectToHost(), +bytesAvailable(), canReadLine() and the ones it inherits from +TQIODevice. +

connectToHost() is the most-used function. As its name implies, +it opens a connection to a named host. +

Most network protocols are either packet-oriented or +line-oriented. canReadLine() indicates whether a connection +contains an entire unread line or not, and bytesAvailable() +returns the number of bytes available for reading. +

The signals error(), connected(), readyRead() and +connectionClosed() inform you of the progress of the connection. +There are also some less commonly used signals. hostFound() is +emitted when connectToHost() has finished its DNS lookup and is +starting its TCP connection. delayedCloseFinished() is emitted +when close() succeeds. bytesWritten() is emitted when TQSocket +moves data from its "to be written" queue into the TCP +implementation. +

There are several access functions for the socket: state() returns +whether the object is idle, is doing a DNS lookup, is connecting, +has an operational connection, etc. address() and port() return +the IP address and port used for the connection. The peerAddress() +and peerPort() functions return the IP address and port used by +the peer, and peerName() returns the name of the peer (normally +the name that was passed to connectToHost()). socketDevice() +returns a pointer to the TQSocketDevice used for this socket. +

TQSocket inherits TQIODevice, and reimplements some functions. In +general, you can treat it as a TQIODevice for writing, and mostly +also for reading. The match isn't perfect, since the TQIODevice +API is designed for devices that are controlled by the same +machine, and an asynchronous peer-to-peer network connection isn't +tquite like that. For example, there is nothing that matches +TQIODevice::size() exactly. The documentation for open(), close(), +flush(), size(), at(), atEnd(), readBlock(), writeBlock(), +getch(), putch(), ungetch() and readLine() describes the +differences in detail. +

Warning: TQSocket is not suitable for use in threads. If you need +to uses sockets in threads use the lower-level TQSocketDevice class. +

Warning: Because TQt doesn't use the native socketstream +implementation on Mac OS X, TQSocket has an implicit transfer +latency of 100ms. You can achieve lower latency on Mac OS X by +using TQSocketDevice instead. +

See also TQSocketDevice, TQHostAddress, TQSocketNotifier, and Input/Output and Networking. + +


Member Type Documentation

+

TQSocket::Error

+ +

This enum specifies the possible errors: +

    +
  • TQSocket::ErrConnectionRefused - if the connection was refused +
  • TQSocket::ErrHostNotFound - if the host was not found +
  • TQSocket::ErrSocketRead - if a read from the socket failed +
+

TQSocket::State

+ +

This enum defines the connection states: +

    +
  • TQSocket::Idle - if there is no connection +
  • TQSocket::HostLookup - during a DNS lookup +
  • TQSocket::Connecting - during TCP connection establishment +
  • TQSocket::Connected - when there is an operational connection +
  • TQSocket::Closing - if the socket is closing down, but is not yet closed. +
+

Member Function Documentation

+

TQSocket::TQSocket ( TQObject * parent = 0, const char * name = 0 ) +

+Creates a TQSocket object in TQSocket::Idle state. +

The parent and name arguments are passed on to the TQObject +constructor. +

Note that a TQApplication must have been constructed before sockets +can be used. + +

TQSocket::~TQSocket () [virtual] +

+Destroys the socket. Closes the connection if necessary. +

See also close(). + +

TQHostAddress TQSocket::address () const +

+Returns the host address of this socket. (This is normally the +main IP address of the host, but can be e.g. 127.0.0.1 for +connections to localhost.) + +

Offset TQSocket::at () const [virtual] +

+Returns the current read index. Since TQSocket is a sequential +device, the current read index is always zero. + +

Reimplemented from TQIODevice. +

bool TQSocket::at ( Offset index ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Moves the read index forward to index and returns TRUE if the +operation was successful; otherwise returns FALSE. Moving the +index forward means skipping incoming data. + +

Reimplemented from TQIODevice. +

bool TQSocket::atEnd () const [virtual] +

+Returns TRUE if there is no more data to read; otherwise returns FALSE. + +

Reimplemented from TQIODevice. +

Q_ULONG TQSocket::bytesAvailable () const +

+Returns the number of incoming bytes that can be read, i.e. the +size of the input buffer. Equivalent to size(). +

This function can trigger the readyRead() signal, if more data has +arrived on the socket. +

See also bytesToWrite(). + +

Example: network/networkprotocol/nntp.cpp. +

Q_ULONG TQSocket::bytesToWrite () const +

+Returns the number of bytes that are waiting to be written, i.e. +the size of the output buffer. +

See also bytesAvailable() and clearPendingData(). + +

void TQSocket::bytesWritten ( int nbytes ) [signal] +

+ +

This signal is emitted when data has been written to the network. +The nbytes parameter specifies how many bytes were written. +

The bytesToWrite() function is often used in the same context; it +indicates how many buffered bytes there are left to write. +

See also writeBlock() and bytesToWrite(). + +

bool TQSocket::canReadLine () const +

+Returns TRUE if it's possible to read an entire line of text from +this socket at this time; otherwise returns FALSE. +

Note that if the peer closes the connection unexpectedly, this +function returns FALSE. This means that loops such as this won't +work: +

+        while( !socket->canReadLine() ) // WRONG
+            ;
+    
+ +

See also readLine(). + +

Examples: network/clientserver/client/client.cpp, network/httpd/httpd.cpp, network/mail/smtp.cpp, and network/networkprotocol/nntp.cpp. +

void TQSocket::clearPendingData () +

+Deletes the data that is waiting to be written. This is useful if you want +to close the socket without waiting for all the data to be written. +

See also bytesToWrite(), close(), and delayedCloseFinished(). + +

void TQSocket::close () [virtual] +

+Closes the socket. +

The read buffer is cleared. +

If the output buffer is empty, the state is set to TQSocket::Idle and the connection is terminated immediately. If the +output buffer still contains data to be written, TQSocket goes into +the TQSocket::Closing state and the rest of the data will be +written. When all of the outgoing data have been written, the +state is set to TQSocket::Idle and the connection is terminated. +At this point, the delayedCloseFinished() signal is emitted. +

If you don't want that the data of the output buffer is written, call +clearPendingData() before you call close(). +

See also state(), bytesToWrite(), and clearPendingData(). + +

Examples: network/clientserver/client/client.cpp, network/httpd/httpd.cpp, and network/networkprotocol/nntp.cpp. +

Reimplemented from TQIODevice. +

void TQSocket::connectToHost ( const TQString & host, Q_UINT16 port ) [virtual] +

+Attempts to make a connection to host on the specified port +and return immediately. +

Any connection or pending connection is closed immediately, and +TQSocket goes into the HostLookup state. When the lookup +succeeds, it emits hostFound(), starts a TCP connection and goes +into the Connecting state. Finally, when the connection +succeeds, it emits connected() and goes into the Connected +state. If there is an error at any point, it emits error(). +

host may be an IP address in string form, or it may be a DNS +name. TQSocket will do a normal DNS lookup if retquired. Note that +port is in native byte order, unlike some other libraries. +

See also state(). + +

Examples: network/clientserver/client/client.cpp, network/mail/smtp.cpp, and network/networkprotocol/nntp.cpp. +

void TQSocket::connected () [signal] +

+ +

This signal is emitted after connectToHost() has been called and a +connection has been successfully established. +

See also connectToHost() and connectionClosed(). + +

Examples: network/clientserver/client/client.cpp, network/mail/smtp.cpp, and network/networkprotocol/nntp.cpp. +

void TQSocket::connectionClosed () [signal] +

+ +

This signal is emitted when the other end has closed the +connection. The read buffers may contain buffered input data which +you can read after the connection was closed. +

See also connectToHost() and close(). + +

Examples: network/clientserver/client/client.cpp, network/clientserver/server/server.cpp, and network/networkprotocol/nntp.cpp. +

void TQSocket::delayedCloseFinished () [signal] +

+ +

This signal is emitted when a delayed close is finished. +

If you call close() and there is buffered output data to be +written, TQSocket goes into the TQSocket::Closing state and +returns immediately. It will then keep writing to the socket until +all the data has been written. Then, the delayedCloseFinished() +signal is emitted. +

See also close(). + +

Examples: network/clientserver/client/client.cpp and network/httpd/httpd.cpp. +

void TQSocket::error ( int ) [signal] +

+ +

This signal is emitted after an error occurred. The parameter is +the Error value. + +

Examples: network/clientserver/client/client.cpp and network/networkprotocol/nntp.cpp. +

void TQSocket::flush () [virtual] +

+Implementation of the abstract virtual TQIODevice::flush() function. + +

Reimplemented from TQIODevice. +

int TQSocket::getch () [virtual] +

+Reads a single byte/character from the internal read buffer. +Returns the byte/character read, or -1 if there is nothing to be +read. +

See also bytesAvailable() and putch(). + +

Reimplemented from TQIODevice. +

void TQSocket::hostFound () [signal] +

+ +

This signal is emitted after connectToHost() has been called and +the host lookup has succeeded. +

See also connected(). + +

Example: network/networkprotocol/nntp.cpp. +

bool TQSocket::open ( int m ) [virtual] +

+Opens the socket using the specified TQIODevice file mode m. +This function is called automatically when needed and you should +not call it yourself. +

See also close(). + +

Reimplemented from TQIODevice. +

TQHostAddress TQSocket::peerAddress () const +

+Returns the address of the connected peer if the socket is in +Connected state; otherwise an empty TQHostAddress is returned. + +

TQString TQSocket::peerName () const +

+Returns the host name as specified to the connectToHost() +function. An empty string is returned if none has been set. + +

Example: network/mail/smtp.cpp. +

Q_UINT16 TQSocket::peerPort () const +

+Returns the peer's host port number, normally as specified to the +connectToHost() function. If none has been set, this function +returns 0. +

Note that TQt always uses native byte order, i.e. 67 is 67 in TQt; +there is no need to call htons(). + +

Q_UINT16 TQSocket::port () const +

+Returns the host port number of this socket, in native byte order. + +

int TQSocket::putch ( int ch ) [virtual] +

+Writes the character ch to the output buffer. +

Returns ch, or -1 if an error occurred. +

See also getch(). + +

Reimplemented from TQIODevice. +

Q_LONG TQSocket::readBlock ( char * data, Q_ULONG maxlen ) [virtual] +

+Reads maxlen bytes from the socket into data and returns the +number of bytes read. Returns -1 if an error occurred. + +

Example: network/networkprotocol/nntp.cpp. +

Reimplemented from TQIODevice. +

Q_ULONG TQSocket::readBufferSize () const +

+Returns the size of the read buffer. +

See also setReadBufferSize(). + +

TQString TQSocket::readLine () [virtual] +

+Returns a line of text including a terminating newline character +(\n). Returns "" if canReadLine() returns FALSE. +

See also canReadLine(). + +

Examples: network/clientserver/client/client.cpp, network/httpd/httpd.cpp, network/mail/smtp.cpp, and network/networkprotocol/nntp.cpp. +

void TQSocket::readyRead () [signal] +

+ +

This signal is emitted every time there is new incoming data. +

Bear in mind that new incoming data is only reported once; if you do not +read all the data, this class buffers the data and you can read it later, +but no signal is emitted unless new data arrives. A good practice is to +read all data in the slot connected to this signal unless you are sure that +you need to receive more data to be able to process it. +

See also readBlock(), readLine(), and bytesAvailable(). + +

Examples: network/clientserver/client/client.cpp, network/httpd/httpd.cpp, network/mail/smtp.cpp, and network/networkprotocol/nntp.cpp. +

void TQSocket::setReadBufferSize ( Q_ULONG bufSize ) +

+Sets the size of the TQSocket's internal read buffer to bufSize. +

Usually TQSocket reads all data that is available from the operating +system's socket. If the buffer size is limited to a certain size, this +means that the TQSocket class doesn't buffer more than this size of data. +

If the size of the read buffer is 0, the read buffer is unlimited and all +incoming data is buffered. This is the default. +

If you read the data in the readyRead() signal, you shouldn't use this +option since it might slow down your program unnecessary. This option is +useful if you only need to read the data at certain points in time, like in +a realtime streaming application. +

See also readBufferSize(). + +

void TQSocket::setSocket ( int socket ) [virtual] +

+Sets the socket to use socket and the state() to Connected. +The socket must already be connected. +

This allows us to use the TQSocket class as a wrapper for other +socket types (e.g. Unix Domain Sockets). + +

Example: network/httpd/httpd.cpp. +

void TQSocket::setSocketDevice ( TQSocketDevice * device ) [virtual] +

+Sets the internal socket device to device. Passing a device +of 0 will cause the internal socket device to be used. Any +existing connection will be disconnected before using the new device. +

The new device should not be connected before being associated +with a TQSocket; after setting the socket call connectToHost() to +make the connection. +

This function is useful if you need to subclass TQSocketDevice and +want to use the TQSocket API, for example, to implement Unix domain +sockets. + +

Offset TQSocket::size () const [virtual] +

+Returns the number of incoming bytes that can be read right now +(like bytesAvailable()). + +

Reimplemented from TQIODevice. +

int TQSocket::socket () const +

+Returns the socket number, or -1 if there is no socket at the moment. + +

TQSocketDevice * TQSocket::socketDevice () +

+Returns a pointer to the internal socket device. +

There is normally no need to manipulate the socket device directly +since this class does the necessary setup for most applications. + +

State TQSocket::state () const +

+Returns the current state of the socket connection. +

See also TQSocket::State. + +

Examples: network/clientserver/client/client.cpp and network/networkprotocol/nntp.cpp. +

int TQSocket::ungetch ( int ch ) [virtual] +

+This implementation of the virtual function TQIODevice::ungetch() +prepends the character ch to the read buffer so that the next +read returns this character as the first character of the output. + +

Reimplemented from TQIODevice. +

Q_ULONG TQSocket::waitForMore ( int msecs, bool * timeout ) const +

+Wait up to msecs milliseconds for more data to be available. +

If msecs is -1 the call will block indefinitely. +

Returns the number of bytes available. +

If timeout is non-null and no error occurred (i.e. it does not +return -1): this function sets *timeout to TRUE, if the reason +for returning was that the timeout was reached; otherwise it sets +*timeout to FALSE. This is useful to find out if the peer +closed the connection. +

Warning: This is a blocking call and should be avoided in event +driven applications. +

See also bytesAvailable(). + +

Q_ULONG TQSocket::waitForMore ( int msecs ) const +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Q_LONG TQSocket::writeBlock ( const char * data, Q_ULONG len ) [virtual] +

+Writes len bytes to the socket from data and returns the +number of bytes written. Returns -1 if an error occurred. + +

Example: network/networkprotocol/nntp.cpp. +

Reimplemented from TQIODevice. + +


+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/qsocketdevice-h.html b/doc/html/qsocketdevice-h.html new file mode 100644 index 00000000..87303d24 --- /dev/null +++ b/doc/html/qsocketdevice-h.html @@ -0,0 +1,215 @@ + + + + + +qsocketdevice.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsocketdevice.h

+ +

This is the verbatim text of the qsocketdevice.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsocketdevice.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQSocketDevice class.
+**
+** Created : 970521
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the network 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 retquirements 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 TQSOCKETDEVICE_H
+#define TQSOCKETDEVICE_H
+
+#ifndef QT_H
+#include "qiodevice.h"
+#include "qhostaddress.h" // int->TQHostAddress conversion
+#endif // QT_H
+
+#if !defined( QT_MODULE_NETWORK ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_NETWORK )
+#define TQM_EXPORT_NETWORK
+#else
+#define TQM_EXPORT_NETWORK Q_EXPORT
+#endif
+
+#ifndef QT_NO_NETWORK
+class TQSocketDevicePrivate;
+
+
+class  TQM_EXPORT_NETWORK TQSocketDevice: public TQIODevice
+{
+public:
+    enum Type { Stream, Datagram };
+    enum Protocol { IPv4, IPv6, Unknown };
+
+    TQSocketDevice( Type type = Stream );
+    TQSocketDevice( Type type, Protocol protocol, int dummy );
+    TQSocketDevice( int socket, Type type );
+    virtual ~TQSocketDevice();
+
+    bool	 isValid() const;
+    Type	 type() const;
+    Protocol	 protocol() const;
+
+    int		 socket() const;
+    virtual void setSocket( int socket, Type type );
+
+    bool	 open( int mode );
+    void	 close();
+    void	 flush();
+
+    // Implementation of TQIODevice abstract virtual functions
+    Offset	 size() const;
+    Offset	 at() const;
+    bool	 at( Offset );
+    bool	 atEnd() const;
+
+    bool	 blocking() const;
+    virtual void setBlocking( bool );
+
+    bool	 addressReusable() const;
+    virtual void setAddressReusable( bool );
+
+    int		 receiveBufferSize() const;
+    virtual void setReceiveBufferSize( uint );
+    int		 sendBufferSize() const;
+    virtual void setSendBufferSize( uint );
+
+    virtual bool connect( const TQHostAddress &, Q_UINT16 );
+
+    virtual bool bind( const TQHostAddress &, Q_UINT16 );
+    virtual bool listen( int backlog );
+    virtual int	 accept();
+
+    Q_LONG	 bytesAvailable() const;
+    Q_LONG	 waitForMore( int msecs, bool *timeout=0 ) const;
+    Q_LONG	 readBlock( char *data, Q_ULONG maxlen );
+    Q_LONG	 writeBlock( const char *data, Q_ULONG len );
+    virtual Q_LONG  writeBlock( const char *data, Q_ULONG len,
+			    const TQHostAddress & host, Q_UINT16 port );
+
+    int		 getch();
+    int		 putch( int );
+    int		 ungetch(int);
+
+    Q_UINT16	 port() const;
+    Q_UINT16	 peerPort() const;
+    TQHostAddress address() const;
+    TQHostAddress peerAddress() const;
+
+    enum Error {
+	NoError,
+	AlreadyBound,
+	Inaccessible,
+	NoResources,
+	InternalError,
+	Bug = InternalError, // ### remove in 4.0?
+	Impossible,
+	NoFiles,
+	ConnectionRefused,
+	NetworkFailure,
+	UnknownError
+    };
+    Error	 error() const;
+
+protected:
+    void setError( Error err );
+
+private:
+    int fd;
+    Type t;
+    Q_UINT16 p;
+    TQHostAddress a;
+    Q_UINT16 pp;
+    TQHostAddress pa;
+    TQSocketDevice::Error e;
+    TQSocketDevicePrivate * d;
+
+    enum Option { Broadcast, ReceiveBuffer, ReuseAddress, SendBuffer };
+
+    int		 option( Option ) const;
+    virtual void setOption( Option, int );
+
+    void	 fetchConnectionParameters();
+#if defined(Q_OS_WIN32)
+    void	 fetchPeerConnectionParameters();
+#endif
+
+    static void  init();
+    int		 createNewSocket();
+    Protocol	 getProtocol() const;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQSocketDevice( const TQSocketDevice & );
+    TQSocketDevice &operator=( const TQSocketDevice & );
+#endif
+};
+
+#endif // QT_NO_NETWORK
+#endif // TQSOCKETDEVICE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsocketdevice-members.html b/doc/html/qsocketdevice-members.html new file mode 100644 index 00000000..1ee7a540 --- /dev/null +++ b/doc/html/qsocketdevice-members.html @@ -0,0 +1,110 @@ + + + + + +TQSocketDevice Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSocketDevice

+ +

This is the complete list of member functions for +TQSocketDevice, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsocketdevice.html b/doc/html/qsocketdevice.html new file mode 100644 index 00000000..3b835040 --- /dev/null +++ b/doc/html/qsocketdevice.html @@ -0,0 +1,419 @@ + + + + + +TQSocketDevice Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSocketDevice Class Reference
[network module]

+ +

The TQSocketDevice class provides a platform-independent low-level socket API. +More... +

#include <qsocketdevice.h> +

Inherits TQIODevice. +

List of all member functions. +

Public Members

+ +

Protected Members

+ +

Detailed Description

+ + +The TQSocketDevice class provides a platform-independent low-level socket API. + +

+ +

This class provides a low level API for working with sockets. Users of +this class are assumed to have networking experience. For most users the +TQSocket class provides a much easier and high level alternative, but +certain things (like UDP) can't be done with TQSocket and if you need a +platform-independent API for those, TQSocketDevice is the right choice. +

The essential purpose of the class is to provide a TQIODevice that +works on sockets, wrapped in a platform-independent API. +

When calling connect() or bind(), TQSocketDevice detects the +protocol family (IPv4, IPv6) automatically. Passing the protocol +family to TQSocketDevice's constructor or to setSocket() forces +creation of a socket device of a specific protocol. If not set, the +protocol will be detected at the first call to connect() or bind(). +

See also TQSocket, TQSocketNotifier, TQHostAddress, and Input/Output and Networking. + +


Member Type Documentation

+

TQSocketDevice::Error

+ +

This enum type describes the error states of TQSocketDevice. +

    +
  • TQSocketDevice::NoError - No error has occurred. +
  • TQSocketDevice::AlreadyBound - The device is already bound, according to bind(). +
  • TQSocketDevice::Inaccessible - The operating system or firewall prohibited +the action. +
  • TQSocketDevice::NoResources - The operating system ran out of a resource. +
  • TQSocketDevice::InternalError - An internal error occurred in TQSocketDevice. +
  • TQSocketDevice::Impossible - An attempt was made to do something which makes +no sense. For example: +
    +    ::close( sd->socket() );
    +    sd->writeBlock( someData, 42 );
    +    
    + +The libc ::close() closes the socket, but TQSocketDevice is not aware +of this. So when you call writeBlock(), the impossible happens. +
  • TQSocketDevice::NoFiles - The operating system will not let TQSocketDevice open +another file. +
  • TQSocketDevice::ConnectionRefused - A connection attempt was rejected by the +peer. +
  • TQSocketDevice::NetworkFailure - There is a network failure. +
  • TQSocketDevice::UnknownError - The operating system did something +unexpected. +
+

TQSocketDevice::Protocol

+ +

This enum type describes the protocol family of the socket. Possible values +are: +

    +
  • TQSocketDevice::IPv4 - The socket is an IPv4 socket. +
  • TQSocketDevice::IPv6 - The socket is an IPv6 socket. +
  • TQSocketDevice::Unknown - The protocol family of the socket is not known. This can +happen if you use TQSocketDevice with an already existing socket; it +tries to determine the protocol family, but this can fail if the +protocol family is not known to TQSocketDevice. +

See also protocol() and setSocket(). + +

TQSocketDevice::Type

+ +

This enum type describes the type of the socket: +

    +
  • TQSocketDevice::Stream - a stream socket (TCP, usually) +
  • TQSocketDevice::Datagram - a datagram socket (UDP, usually) +
+

Member Function Documentation

+

TQSocketDevice::TQSocketDevice ( Type type = Stream ) +

+Creates a TQSocketDevice object for a stream or datagram socket. +

The type argument must be either TQSocketDevice::Stream for a +reliable, connection-oriented TCP socket, or TQSocketDevice::Datagram for an unreliable UDP socket. +

The socket is created as an IPv4 socket. +

See also blocking() and protocol(). + +

TQSocketDevice::TQSocketDevice ( Type type, Protocol protocol, int dummy ) +

+Creates a TQSocketDevice object for a stream or datagram socket. +

The type argument must be either TQSocketDevice::Stream for a +reliable, connection-oriented TCP socket, or TQSocketDevice::Datagram for an unreliable UDP socket. +

The protocol indicates whether the socket should be of type IPv4 +or IPv6. Passing Unknown is not meaningful in this context and you +should avoid using (it creates an IPv4 socket, but your code is not easily +readable). +

The argument dummy is necessary for compatibility with some +compilers. +

See also blocking() and protocol(). + +

TQSocketDevice::TQSocketDevice ( int socket, Type type ) +

+Creates a TQSocketDevice object for the existing socket socket. +

The type argument must match the actual socket type; use TQSocketDevice::Stream for a reliable, connection-oriented TCP +socket, or TQSocketDevice::Datagram for an unreliable, +connectionless UDP socket. + +

TQSocketDevice::~TQSocketDevice () [virtual] +

+Destroys the socket device and closes the socket if it is open. + +

int TQSocketDevice::accept () [virtual] +

+Extracts the first connection from the queue of pending +connections for this socket and returns a new socket identifier. +Returns -1 if the operation failed. +

See also bind() and listen(). + +

TQHostAddress TQSocketDevice::address () const +

+Returns the address of this socket device. This may be 0.0.0.0 for +a while, but is set to something sensible as soon as a sensible +value is available. + +

bool TQSocketDevice::addressReusable () const +

+Returns TRUE if the address of this socket can be used by other +sockets at the same time, and FALSE if this socket claims +exclusive ownership. +

See also setAddressReusable(). + +

bool TQSocketDevice::bind ( const TQHostAddress & address, Q_UINT16 port ) [virtual] +

+Assigns a name to an unnamed socket. The name is the host address +address and the port number port. If the operation succeeds, +bind() returns TRUE; otherwise it returns FALSE without changing +what port() and address() return. +

bind() is used by servers for setting up incoming connections. +Call bind() before listen(). + +

bool TQSocketDevice::blocking () const +

+Returns TRUE if the socket is valid and in blocking mode; +otherwise returns FALSE. +

Note that this function does not set error(). +

Warning: On Windows, this function always returns TRUE since the +ioctlsocket() function is broken. +

See also setBlocking() and isValid(). + +

Q_LONG TQSocketDevice::bytesAvailable () const +

+Returns the number of bytes available for reading, or -1 if an +error occurred. +

Warning: On Microsoft Windows, we use the ioctlsocket() function +to determine the number of bytes queued on the socket. According +to Microsoft (KB Q125486), ioctlsocket() sometimes returns an +incorrect number. The only safe way to determine the amount of +data on the socket is to read it using readBlock(). TQSocket has +workarounds to deal with this problem. + +

bool TQSocketDevice::connect ( const TQHostAddress & addr, Q_UINT16 port ) [virtual] +

+Connects to the IP address and port specified by addr and port. Returns TRUE if it establishes a connection; otherwise returns FALSE. +If it returns FALSE, error() explains why. +

Note that error() commonly returns NoError for non-blocking +sockets; this just means that you can call connect() again in a +little while and it'll probably succeed. + +

Error TQSocketDevice::error () const +

+Returns the first error seen. + +

bool TQSocketDevice::isValid () const +

+Returns TRUE if this is a valid socket; otherwise returns FALSE. +

See also socket(). + +

bool TQSocketDevice::listen ( int backlog ) [virtual] +

+Specifies how many pending connections a server socket can have. +Returns TRUE if the operation was successful; otherwise returns +FALSE. A backlog value of 50 is tquite common. +

The listen() call only applies to sockets where type() is Stream, i.e. not to Datagram sockets. listen() must not be +called before bind() or after accept(). +

See also bind() and accept(). + +

TQHostAddress TQSocketDevice::peerAddress () const +

+Returns the address of the port this socket device is connected +to. This may be 0.0.0.0 for a while, but is set to something +sensible as soon as a sensible value is available. +

Note that for Datagram sockets, this is the source port of the +last packet received. + +

Q_UINT16 TQSocketDevice::peerPort () const +

+Returns the port number of the port this socket device is +connected to. This may be 0 for a while, but is set to something +sensible as soon as a sensible value is available. +

Note that for Datagram sockets, this is the source port of the +last packet received, and that it is in native byte order. + +

Q_UINT16 TQSocketDevice::port () const +

+Returns the port number of this socket device. This may be 0 for a +while, but is set to something sensible as soon as a sensible +value is available. +

Note that TQt always uses native byte order, i.e. 67 is 67 in TQt; +there is no need to call htons(). + +

Protocol TQSocketDevice::protocol () const +

+Returns the socket's protocol family, which is one of Unknown, IPv4, +or IPv6. +

TQSocketDevice either creates a socket with a well known protocol family or +it uses an already existing socket. In the first case, this function +returns the protocol family it was constructed with. In the second case, it +tries to determine the protocol family of the socket; if this fails, it +returns Unknown. +

See also Protocol and setSocket(). + +

Q_LONG TQSocketDevice::readBlock ( char * data, Q_ULONG maxlen ) [virtual] +

+Reads maxlen bytes from the socket into data and returns the +number of bytes read. Returns -1 if an error occurred. Returning 0 +is not an error. For Stream sockets, 0 is returned when the remote +host closes the connection. For Datagram sockets, 0 is a valid +datagram size. + +

Reimplemented from TQIODevice. +

int TQSocketDevice::receiveBufferSize () const +

+Returns the size of the operating system receive buffer. +

See also setReceiveBufferSize(). + +

int TQSocketDevice::sendBufferSize () const +

+Returns the size of the operating system send buffer. +

See also setSendBufferSize(). + +

void TQSocketDevice::setAddressReusable ( bool enable ) [virtual] +

+Sets the address of this socket to be usable by other sockets too +if enable is TRUE, and to be used exclusively by this socket if +enable is FALSE. +

When a socket is reusable, other sockets can use the same port +number (and IP address), which is generally useful. Of course +other sockets cannot use the same +(address,port,peer-address,peer-port) 4-tuple as this socket, so +there is no risk of confusing the two TCP connections. +

See also addressReusable(). + +

void TQSocketDevice::setBlocking ( bool enable ) [virtual] +

+Makes the socket blocking if enable is TRUE or nonblocking if +enable is FALSE. +

Sockets are blocking by default, but we recommend using +nonblocking socket operations, especially for GUI programs that +need to be responsive. +

Warning: On Windows, this function should be used with care since +whenever you use a TQSocketNotifier on Windows, the socket is +immediately made nonblocking. +

See also blocking() and isValid(). + +

void TQSocketDevice::setError ( Error err ) [protected] +

+Allows subclasses to set the error state to err. + +

void TQSocketDevice::setReceiveBufferSize ( uint size ) [virtual] +

+Sets the size of the operating system receive buffer to size. +

The operating system receive buffer size effectively limits two +things: how much data can be in transit at any one moment, and how +much data can be received in one iteration of the main event loop. +

The default is operating system-dependent. A socket that receives +large amounts of data is probably best with a buffer size of +49152. + +

void TQSocketDevice::setSendBufferSize ( uint size ) [virtual] +

+Sets the size of the operating system send buffer to size. +

The operating system send buffer size effectively limits how much +data can be in transit at any one moment. +

The default is operating system-dependent. A socket that sends +large amounts of data is probably best with a buffer size of +49152. + +

void TQSocketDevice::setSocket ( int socket, Type type ) [virtual] +

+Sets the socket device to operate on the existing socket socket. +

The type argument must match the actual socket type; use TQSocketDevice::Stream for a reliable, connection-oriented TCP +socket, or TQSocketDevice::Datagram for an unreliable, +connectionless UDP socket. +

Any existing socket is closed. +

See also isValid() and close(). + +

int TQSocketDevice::socket () const +

+Returns the socket number, or -1 if it is an invalid socket. +

See also isValid() and type(). + +

Type TQSocketDevice::type () const +

+ +

Returns the socket type which is either TQSocketDevice::Stream +or TQSocketDevice::Datagram. +

See also socket(). + +

Q_LONG TQSocketDevice::waitForMore ( int msecs, bool * timeout = 0 ) const +

+Wait up to msecs milliseconds for more data to be available. If +msecs is -1 the call will block indefinitely. +

Returns the number of bytes available for reading, or -1 if an +error occurred. +

If timeout is non-null and no error occurred (i.e. it does not +return -1): this function sets *timeout to TRUE, if the reason +for returning was that the timeout was reached; otherwise it sets +*timeout to FALSE. This is useful to find out if the peer +closed the connection. +

Warning: This is a blocking call and should be avoided in event +driven applications. +

See also bytesAvailable(). + +

Q_LONG TQSocketDevice::writeBlock ( const char * data, Q_ULONG len ) [virtual] +

+Writes len bytes to the socket from data and returns the +number of bytes written. Returns -1 if an error occurred. +

This is used for TQSocketDevice::Stream sockets. + +

Reimplemented from TQIODevice. +

Q_LONG TQSocketDevice::writeBlock ( const char * data, Q_ULONG len, const TQHostAddress & host, Q_UINT16 port ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes len bytes to the socket from data and returns the +number of bytes written. Returns -1 if an error occurred. +

This is used for TQSocketDevice::Datagram sockets. You must +specify the host and port of the destination of the data. + + +


+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/qsocketnotifier-h.html b/doc/html/qsocketnotifier-h.html new file mode 100644 index 00000000..70a1c68e --- /dev/null +++ b/doc/html/qsocketnotifier-h.html @@ -0,0 +1,138 @@ + + + + + +qsocketnotifier.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsocketnotifier.h

+ +

This is the verbatim text of the qsocketnotifier.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsocketnotifier.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQSocketNotifier class
+**
+** Created : 951114
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSOCKETNOTIFIER_H
+#define TQSOCKETNOTIFIER_H
+
+#ifndef QT_H
+#include "qobject.h"
+#endif // QT_H
+
+
+class Q_EXPORT TQSocketNotifier : public TQObject
+{
+    Q_OBJECT
+public:
+    enum Type { Read, Write, Exception };
+
+    TQSocketNotifier( int socket, Type, TQObject *parent=0, const char *name=0 );
+   ~TQSocketNotifier();
+
+    int		 socket()	const;
+    Type	 type()		const;
+
+    bool	 isEnabled()	const;
+    virtual void setEnabled( bool );
+
+signals:
+    void	 activated( int socket );
+
+protected:
+    bool	 event( TQEvent * );
+
+private:
+    int		 sockfd;
+    Type	 sntype;
+    bool	 snenabled;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQSocketNotifier( const TQSocketNotifier & );
+    TQSocketNotifier &operator=( const TQSocketNotifier & );
+#endif
+};
+
+
+inline int TQSocketNotifier::socket() const
+{ return sockfd; }
+
+inline TQSocketNotifier::Type TQSocketNotifier::type() const
+{ return sntype; }
+
+inline bool TQSocketNotifier::isEnabled() const
+{ return snenabled; }
+
+
+#endif // TQSOCKETNOTIFIER_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsocketnotifier-members.html b/doc/html/qsocketnotifier-members.html new file mode 100644 index 00000000..0798cad1 --- /dev/null +++ b/doc/html/qsocketnotifier-members.html @@ -0,0 +1,95 @@ + + + + + +TQSocketNotifier Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSocketNotifier

+ +

This is the complete list of member functions for +TQSocketNotifier, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsocketnotifier.html b/doc/html/qsocketnotifier.html new file mode 100644 index 00000000..2613613f --- /dev/null +++ b/doc/html/qsocketnotifier.html @@ -0,0 +1,183 @@ + + + + + +TQSocketNotifier Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSocketNotifier Class Reference

+ +

The TQSocketNotifier class provides support for socket callbacks. +More... +

#include <qsocketnotifier.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Signals

+ +

Detailed Description

+ + +The TQSocketNotifier class provides support for socket callbacks. +

+

This class makes it possible to write asynchronous socket-based +code in TQt. Using synchronous socket operations blocks the +program, which is clearly not acceptable for an event-driven GUI +program. +

Once you have opened a non-blocking socket (whether for TCP, UDP, +a UNIX-domain socket, or any other protocol family your operating +system supports), you can create a socket notifier to monitor the +socket. Then you connect the activated() signal to the slot you +want to be called when a socket event occurs. +

Note for Windows users: the socket passed to TQSocketNotifier will +become non-blocking, even if it was created as a blocking socket. +

There are three types of socket notifiers (read, write and +exception); you must specify one of these in the constructor. +

The type specifies when the activated() signal is to be emitted: +

    +
  1. TQSocketNotifier::Read - There is data to be read (socket read event). +
  2. TQSocketNotifier::Write - Data can be written (socket write event). +
  3. TQSocketNofifier::Exception - An exception has occurred (socket +exception event). We recommend against using this. +
+

For example, if you need to monitor both reads and writes for the +same socket you must create two socket notifiers. +

For read notifiers it makes little sense to connect the +activated() signal to more than one slot because the data can be +read from the socket only once. +

Also observe that if you do not read all the available data when +the read notifier fires, it fires again and again. +

For write notifiers, immediately disable the notifier after the +activated() signal has been received and you have sent the data to +be written on the socket. When you have more data to be written, +enable it again to get a new activated() signal. The exception is +if the socket data writing operation (send() or equivalent) fails +with a "would block" error, which means that some buffer is full +and you must wait before sending more data. In that case you do +not need to disable and re-enable the write notifier; it will fire +again as soon as the system allows more data to be sent. +

The behavior of a write notifier that is left in enabled state +after having emitting the first activated() signal (and no "would +block" error has occurred) is undefined. Depending on the +operating system, it may fire on every pass of the event loop or +not at all. +

If you need a time-out for your sockets you can use either timer events or the TQTimer class. +

Socket action is detected in the main + event loop of TQt. The X11 version of TQt has a single UNIX +select() call that incorporates all socket notifiers and the X +socket. +

Note that on XFree86 for OS/2, select() works only in the thread +in which main() is running; you should therefore use that thread +for GUI operations. +

See also TQSocket, TQServerSocket, TQSocketDevice, TQFile::handle(), and Input/Output and Networking. + +


Member Type Documentation

+

TQSocketNotifier::Type

+ +
    +
  • TQSocketNotifier::Read +
  • TQSocketNotifier::Write +
  • TQSocketNotifier::Exception +
+

Member Function Documentation

+

TQSocketNotifier::TQSocketNotifier ( int socket, Type type, TQObject * parent = 0, const char * name = 0 ) +

+Constructs a socket notifier called name, with the parent, parent. It watches socket for type events, and enables it. +

It is generally advisable to explicitly enable or disable the +socket notifier, especially for write notifiers. +

See also setEnabled() and isEnabled(). + +

TQSocketNotifier::~TQSocketNotifier () +

+Destroys the socket notifier. + +

void TQSocketNotifier::activated ( int socket ) [signal] +

+ +

This signal is emitted under certain conditions specified by the +notifier type(): +

    +
  1. TQSocketNotifier::Read - There is data to be read (socket read event). +
  2. TQSocketNotifier::Write - Data can be written (socket write event). +
  3. TQSocketNofifier::Exception - An exception has occurred (socket +exception event). +
+

The socket argument is the socket identifier. +

See also type() and socket(). + +

bool TQSocketNotifier::isEnabled () const +

+ +

Returns TRUE if the notifier is enabled; otherwise returns FALSE. +

See also setEnabled(). + +

void TQSocketNotifier::setEnabled ( bool enable ) [virtual] +

+Enables the notifier if enable is TRUE or disables it if enable is FALSE. +

The notifier is enabled by default. +

If the notifier is enabled, it emits the activated() signal +whenever a socket event corresponding to its type occurs. If it is disabled, it ignores socket events +(the same effect as not creating the socket notifier). +

Write notifiers should normally be disabled immediately after the +activated() signal has been emitted; see discussion of write +notifiers in the class description above. +

See also isEnabled() and activated(). + +

int TQSocketNotifier::socket () const +

+ +

Returns the socket identifier specified to the constructor. +

See also type(). + +

Type TQSocketNotifier::type () const +

+ +

Returns the socket event type specified to the constructor: TQSocketNotifier::Read, TQSocketNotifier::Write, or TQSocketNotifier::Exception. +

See also socket(). + + +


+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/qsortedlist-h.html b/doc/html/qsortedlist-h.html new file mode 100644 index 00000000..f9bd0bb9 --- /dev/null +++ b/doc/html/qsortedlist-h.html @@ -0,0 +1,108 @@ + + + + + +qsortedlist.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsortedlist.h

+ +

This is the verbatim text of the qsortedlist.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsortedlist.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQSortedList template/macro class
+**
+** Created : 920701
+**
+** 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 retquirements 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 TQSORTEDLIST_H
+#define TQSORTEDLIST_H
+
+#ifndef QT_H
+#include "qptrlist.h"
+#endif // QT_H
+
+
+template<class type> 
+class TQSortedList : public TQPtrList<type>
+{
+public:
+    TQSortedList() {}
+    TQSortedList( const TQSortedList<type> &l ) : TQPtrList<type>(l) {}
+    ~TQSortedList() { this->clear(); }
+    TQSortedList<type> &operator=(const TQSortedList<type> &l)
+      { return (TQSortedList<type>&)TQPtrList<type>::operator=(l); }
+
+    virtual int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
+      { if ( *((type*)s1) == *((type*)s2) ) return 0; return ( *((type*)s1) < *((type*)s2) ? -1 : 1 ); }
+};
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsortedlist-members.html b/doc/html/qsortedlist-members.html new file mode 100644 index 00000000..ae86f7cc --- /dev/null +++ b/doc/html/qsortedlist-members.html @@ -0,0 +1,90 @@ + + + + + +TQSortedList Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSortedList

+ +

This is the complete list of member functions for +TQSortedList, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsortedlist.html b/doc/html/qsortedlist.html new file mode 100644 index 00000000..448348c5 --- /dev/null +++ b/doc/html/qsortedlist.html @@ -0,0 +1,95 @@ + + + + + +TQSortedList Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSortedList Class Reference
[obsolete]

+ +

The TQSortedList class provides a list sorted by operator< and operator==. +More... +

#include <qsortedlist.h> +

Inherits TQPtrList<type>. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQSortedList class provides a list sorted by operator< and operator==. +

This class is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

If you want to sort a TQPtrList you have to reimplement the +TQGList::compareItems() method. If the elements of your list support +operator<() and operator==(), you can use TQSortedList instead. +Its compareItems() calls operator<() and operator==() and returns an +appropriate result. +

Otherwise, this is as TQPtrList. +

See also TQPtrList. + +


Member Function Documentation

+

TQSortedList::TQSortedList () +

+ +Constructs an empty list. + +

TQSortedList::TQSortedList ( const TQSortedList<type> & list ) +

+ +Constructs a copy of list. +

Each item in list is copied to this new list. + +

TQSortedList::~TQSortedList () +

+ +Removes all items from the list and destroys the list. +

All list iterators that access this list will be reset. + +

TQSortedList<type> & TQSortedList::operator= ( const TQSortedList<type> & list ) +

+ +Assigns list to this list and returns a reference to this list. +

This list is first cleared; each item in list is then +appended to this list. Only the pointers are copied +(shallow copy) unless newItem() has been reimplemented(). + + +


+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/qsound-h.html b/doc/html/qsound-h.html new file mode 100644 index 00000000..02227ea6 --- /dev/null +++ b/doc/html/qsound-h.html @@ -0,0 +1,170 @@ + + + + + +qsound.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsound.h

+ +

This is the verbatim text of the qsound.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsound.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQSound class and TQAuServer internal class
+**
+** Created : 000117
+**
+** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSOUND_H
+#define TQSOUND_H
+
+#ifndef QT_H
+#include "qobject.h"
+#endif // QT_H
+
+#ifndef QT_NO_SOUND
+
+class TQSoundData;
+
+class Q_EXPORT TQSound : public TQObject {
+    Q_OBJECT
+public:
+    static bool isAvailable();
+    static void play(const TQString& filename);
+
+    TQSound(const TQString& filename, TQObject* parent=0, const char* name=0);
+    ~TQSound();
+
+    /* Coming soon...
+	?
+    TQSound(int hertz, Type type=Mono);
+    int play(const ushort* data, int samples);
+    bool full();
+    signal void notFull();
+	?
+    */
+
+#ifndef QT_NO_COMPAT
+    static bool available() { return isAvailable(); }
+#endif
+
+    int loops() const;
+    int loopsRemaining() const;
+    void setLoops(int);
+    TQString fileName() const;
+
+    bool isFinished() const;
+
+public slots:
+    void play();
+    void stop();
+
+private:
+    TQSoundData* d;
+    friend class TQAuServer;
+};
+
+
+/*
+  TQAuServer is an INTERNAL class.  If you wish to provide support for
+  additional audio servers, you can make a subclass of TQAuServer to do
+  so, HOWEVER, your class may need to be re-engineered to some degree
+  with each new TQt release, including minor releases.
+
+  TQAuBucket is whatever you want.
+*/
+
+class TQAuBucket {
+public:
+    virtual ~TQAuBucket();
+};
+
+class TQAuServer : public TQObject {
+    Q_OBJECT
+
+public:
+    TQAuServer(TQObject* parent, const char* name);
+    ~TQAuServer();
+
+    virtual void init(TQSound*);
+    virtual void play(const TQString& filename);
+    virtual void play(TQSound*)=0;
+    virtual void stop(TQSound*)=0;
+    virtual bool okay()=0;
+
+protected:
+    void setBucket(TQSound*, TQAuBucket*);
+    TQAuBucket* bucket(TQSound*);
+    int decLoop(TQSound*);
+};
+
+#endif // QT_NO_SOUND
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsound-members.html b/doc/html/qsound-members.html new file mode 100644 index 00000000..b1133a75 --- /dev/null +++ b/doc/html/qsound-members.html @@ -0,0 +1,99 @@ + + + + + +TQSound Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSound

+ +

This is the complete list of member functions for +TQSound, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsound.html b/doc/html/qsound.html new file mode 100644 index 00000000..e84f634d --- /dev/null +++ b/doc/html/qsound.html @@ -0,0 +1,180 @@ + + + + + +TQSound Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSound Class Reference

+ +

The TQSound class provides access to the platform audio facilities. +More... +

#include <qsound.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Static Public Members

+ +

Detailed Description

+ + +The TQSound class provides access to the platform audio facilities. +

+ +

TQt provides the most commonly retquired audio operation in GUI +applications: asynchronously playing a sound file. This is most +easily accomplished with a single call: +

+        TQSound::play("mysounds/bells.wav");
+    
+ +

A second API is provided in which a TQSound object is created from +a sound file and is played later: +

+        TQSound bells("mysounds/bells.wav");
+
+        bells.play();
+    
+ +

Sounds played using the second model may use more memory but play +more immediately than sounds played using the first model, +depending on the underlying platform audio facilities. +

On Microsoft Windows the underlying multimedia system is used; +only WAVE format sound files are supported. +

On X11 the Network Audio + System is used if available, otherwise all operations work +silently. NAS supports WAVE and AU files. +

On Macintosh, ironically, we use QT (QuickTime) for sound, this +means all QuickTime formats are supported by TQt/Mac. +

On TQt/Embedded, a built-in mixing sound server is used, which +accesses /dev/dsp directly. Only the WAVE format is supported. +

The availability of sound can be tested with +TQSound::isAvailable(). +

See also Multimedia Classes. + +


Member Function Documentation

+

TQSound::TQSound ( const TQString & filename, TQObject * parent = 0, const char * name = 0 ) +

+Constructs a TQSound that can tquickly play the sound in a file +named filename. +

This may use more memory than the static play function. +

The parent and name arguments (default 0) are passed on to +the TQObject constructor. + +

TQSound::~TQSound () +

+Destroys the sound object. If the sound is not finished playing stop() is called on it. +

See also stop() and isFinished(). + +

bool TQSound::available () [static] +

+ +

Returns TRUE if sound support is available; otherwise returns FALSE. + +

TQString TQSound::fileName () const +

+Returns the filename associated with the sound. + +

bool TQSound::isAvailable () [static] +

+Returns TRUE if sound facilities exist on the platform; otherwise +returns FALSE. An application may choose either to notify the user +if sound is crucial to the application or to operate silently +without bothering the user. +

If no sound is available, all TQSound operations work silently and +tquickly. + +

bool TQSound::isFinished () const +

+Returns TRUE if the sound has finished playing; otherwise returns FALSE. +

Warning: On Windows this function always returns TRUE for unlooped sounds. + +

int TQSound::loops () const +

+Returns the number of times the sound will play. + +

int TQSound::loopsRemaining () const +

+Returns the number of times the sound will loop. This value +decreases each time the sound loops. + +

void TQSound::play ( const TQString & filename ) [static] +

+Plays the sound in a file called filename. + +

Example: sound/sound.cpp. +

void TQSound::play () [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Starts the sound playing. The function returns immediately. +Depending on the platform audio facilities, other sounds may stop +or may be mixed with the new sound. +

The sound can be played again at any time, possibly mixing or +replacing previous plays of the sound. + +

void TQSound::setLoops ( int l ) +

+Sets the sound to repeat l times when it is played. Passing the +value -1 will cause the sound to loop indefinitely. +

See also loops(). + +

void TQSound::stop () [slot] +

+Stops the sound playing. +

On Windows the current loop will finish if a sound is played +in a loop. +

See also play(). + + +


+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/qspaceritem-members.html b/doc/html/qspaceritem-members.html new file mode 100644 index 00000000..bc155809 --- /dev/null +++ b/doc/html/qspaceritem-members.html @@ -0,0 +1,64 @@ + + + + + +TQSpacerItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSpacerItem

+ +

This is the complete list of member functions for +TQSpacerItem, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qspaceritem.html b/doc/html/qspaceritem.html new file mode 100644 index 00000000..602b22d0 --- /dev/null +++ b/doc/html/qspaceritem.html @@ -0,0 +1,119 @@ + + + + + +TQSpacerItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSpacerItem Class Reference

+ +

The TQSpacerItem class provides blank space in a layout. +More... +

#include <qlayout.h> +

Inherits TQLayoutItem. +

List of all member functions. +

Public Members

+
    +
  • TQSpacerItem ( int w, int h, TQSizePolicy::SizeType hData = TQSizePolicy::Minimum, TQSizePolicy::SizeType vData = TQSizePolicy::Minimum )
  • +
  • void changeSize ( int w, int h, TQSizePolicy::SizeType hData = TQSizePolicy::Minimum, TQSizePolicy::SizeType vData = TQSizePolicy::Minimum )
  • +
  • virtual TQSize sizeHint () const
  • +
  • virtual TQSize minimumSize () const
  • +
  • virtual TQSize maximumSize () const
  • +
  • virtual TQSizePolicy::ExpandData expanding () const
  • +
  • virtual bool isEmpty () const
  • +
  • virtual void setGeometry ( const TQRect & r )
  • +
+

Detailed Description

+ + + + +The TQSpacerItem class provides blank space in a layout. +

This class is used by custom layouts. +

See also TQLayout, TQLayout::spacerItem(), Widget Appearance and Style, and Layout Management. + +


Member Function Documentation

+

TQSpacerItem::TQSpacerItem ( int w, int h, TQSizePolicy::SizeType hData = TQSizePolicy::Minimum, TQSizePolicy::SizeType vData = TQSizePolicy::Minimum ) +

+ +

Constructs a spacer item with preferred width w, preferred +height h, horizontal size policy hData and vertical size +policy vData. +

The default values provide a gap that is able to stretch if +nothing else wants the space. + +

void TQSpacerItem::changeSize ( int w, int h, TQSizePolicy::SizeType hData = TQSizePolicy::Minimum, TQSizePolicy::SizeType vData = TQSizePolicy::Minimum ) +

+Changes this spacer item to have preferred width w, preferred +height h, horizontal size policy hData and vertical size +policy vData. +

The default values provide a gap that is able to stretch if +nothing else wants the space. + +

TQSizePolicy::ExpandData TQSpacerItem::expanding () const [virtual] +

+Returns the direction in which this spacer item will expand. +

See also TQSizePolicy::ExpandData. + +

Reimplemented from TQLayoutItem. +

bool TQSpacerItem::isEmpty () const [virtual] +

+Returns TRUE because a spacer item never contains widgets. + +

Reimplemented from TQLayoutItem. +

TQSize TQSpacerItem::maximumSize () const [virtual] +

+Returns the maximum size of this spacer item. + +

Reimplemented from TQLayoutItem. +

TQSize TQSpacerItem::minimumSize () const [virtual] +

+Returns the minimum size of this spacer item. + +

Reimplemented from TQLayoutItem. +

void TQSpacerItem::setGeometry ( const TQRect & r ) [virtual] +

+Stores the spacer item's rect r so that it can be returned by +geometry(). + +

Reimplemented from TQLayoutItem. +

TQSize TQSpacerItem::sizeHint () const [virtual] +

+Returns the preferred size of this spacer item. + +

Reimplemented from TQLayoutItem. + +


+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/qspinbox-h.html b/doc/html/qspinbox-h.html new file mode 100644 index 00000000..a0478e41 --- /dev/null +++ b/doc/html/qspinbox-h.html @@ -0,0 +1,217 @@ + + + + + +qspinbox.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qspinbox.h

+ +

This is the verbatim text of the qspinbox.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qspinbox.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQSpinBox widget class
+**
+** Created : 970101
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSPINBOX_H
+#define TQSPINBOX_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qrangecontrol.h"
+#endif // QT_H
+
+#ifndef QT_NO_SPINBOX
+
+class TQLineEdit;
+class TQValidator;
+class TQSpinBoxPrivate;
+
+class Q_EXPORT TQSpinBox: public TQWidget, public TQRangeControl
+{
+    Q_OBJECT
+    Q_ENUMS( ButtonSymbols )
+    Q_PROPERTY( TQString text READ text )
+    Q_PROPERTY( TQString prefix READ prefix WRITE setPrefix )
+    Q_PROPERTY( TQString suffix READ suffix WRITE setSuffix )
+    Q_PROPERTY( TQString cleanText READ cleanText )
+    Q_PROPERTY( TQString specialValueText READ specialValueText WRITE setSpecialValueText )
+    Q_PROPERTY( bool wrapping READ wrapping WRITE setWrapping )
+    Q_PROPERTY( ButtonSymbols buttonSymbols READ buttonSymbols WRITE setButtonSymbols )
+    Q_PROPERTY( int maxValue READ maxValue WRITE setMaxValue )
+    Q_PROPERTY( int minValue READ minValue WRITE setMinValue )
+    Q_PROPERTY( int lineStep READ lineStep WRITE setLineStep )
+    Q_PROPERTY( int value READ value WRITE setValue )
+
+public:
+    TQSpinBox( TQWidget* parent=0, const char* name=0 );
+    TQSpinBox( int minValue, int maxValue, int step = 1,
+	      TQWidget* parent=0, const char* name=0 );
+    ~TQSpinBox();
+
+    TQString		text() const;
+
+    virtual TQString	prefix() const;
+    virtual TQString	suffix() const;
+    virtual TQString	cleanText() const;
+
+    virtual void	setSpecialValueText( const TQString &text );
+    TQString		specialValueText() const;
+
+    virtual void	setWrapping( bool on );
+    bool		wrapping() const;
+
+    enum ButtonSymbols { UpDownArrows, PlusMinus };
+    virtual void	setButtonSymbols( ButtonSymbols );
+    ButtonSymbols	buttonSymbols() const;
+
+    virtual void	setValidator( const TQValidator* v );
+    const TQValidator * validator() const;
+
+    TQSize		sizeHint() const;
+    TQSize		minimumSizeHint() const;
+
+    int	 minValue() const;
+    int	 maxValue() const;
+    void setMinValue( int );
+    void setMaxValue( int );
+    int	 lineStep() const;
+    void setLineStep( int );
+    int  value() const;
+
+    TQRect		upRect() const;
+    TQRect		downRect() const;
+
+public slots:
+    virtual void	setValue( int value );
+    virtual void	setPrefix( const TQString &text );
+    virtual void	setSuffix( const TQString &text );
+    virtual void	stepUp();
+    virtual void	stepDown();
+    virtual void 	setEnabled( bool enabled );
+    virtual void 	selectAll();
+
+signals:
+    void		valueChanged( int value );
+    void		valueChanged( const TQString &valueText );
+
+protected:
+    virtual TQString	mapValueToText( int value );
+    virtual int		mapTextToValue( bool* ok );
+    TQString		currentValueText();
+
+    virtual void	updateDisplay();
+    virtual void	interpretText();
+
+    TQLineEdit*		editor() const;
+
+    virtual void	valueChange();
+    virtual void	rangeChange();
+
+    bool		eventFilter( TQObject* obj, TQEvent* ev );
+    void		resizeEvent( TQResizeEvent* ev );
+#ifndef QT_NO_WHEELEVENT
+    void		wheelEvent( TQWheelEvent * );
+#endif
+    void		leaveEvent( TQEvent* );
+
+    void		styleChange( TQStyle& );
+
+protected slots:
+    void		textChanged();
+
+private:
+    void initSpinBox();
+    TQSpinBoxPrivate* d;
+    TQLineEdit* vi;
+    TQValidator* validate;
+    TQString pfix;
+    TQString sfix;
+    TQString specText;
+
+    uint wrap		: 1;
+    uint edited		: 1;
+
+    void arrangeWidgets();
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQSpinBox( const TQSpinBox& );
+    TQSpinBox& operator=( const TQSpinBox& );
+#endif
+
+};
+
+#endif // QT_NO_SPINBOX
+
+#endif // TQSPINBOX_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qspinbox-m.png b/doc/html/qspinbox-m.png new file mode 100644 index 00000000..ed193e74 Binary files /dev/null and b/doc/html/qspinbox-m.png differ diff --git a/doc/html/qspinbox-members.html b/doc/html/qspinbox-members.html new file mode 100644 index 00000000..8b812b45 --- /dev/null +++ b/doc/html/qspinbox-members.html @@ -0,0 +1,388 @@ + + + + + +TQSpinBox Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSpinBox

+ +

This is the complete list of member functions for +TQSpinBox, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qspinbox-w.png b/doc/html/qspinbox-w.png new file mode 100644 index 00000000..46cbb93d Binary files /dev/null and b/doc/html/qspinbox-w.png differ diff --git a/doc/html/qspinbox.html b/doc/html/qspinbox.html new file mode 100644 index 00000000..74f1b6fc --- /dev/null +++ b/doc/html/qspinbox.html @@ -0,0 +1,561 @@ + + + + + +TQSpinBox Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSpinBox Class Reference

+ +

The TQSpinBox class provides a spin box widget (spin button). +More... +

#include <qspinbox.h> +

Inherits TQWidget and TQRangeControl. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • ButtonSymbols buttonSymbols - the current button symbol mode
  • +
  • TQString cleanText - the spin box's text with no prefix(), suffix() or leading or trailing whitespace  (read only)
  • +
  • int lineStep - the line step
  • +
  • int maxValue - the maximum value of the spin box
  • +
  • int minValue - the minimum value of the spin box
  • +
  • TQString prefix - the spin box's prefix
  • +
  • TQString specialValueText - the special-value text
  • +
  • TQString suffix - the suffix of the spin box
  • +
  • TQString text - the spin box's text, including any prefix() and suffix()  (read only)
  • +
  • int value - the value of the spin box
  • +
  • bool wrapping - whether it is possible to step the value from the highest value to the lowest value and vice versa
  • +
+

Protected Members

+ +

Protected Slots

+ +

Detailed Description

+ + +The TQSpinBox class provides a spin box widget (spin button). +

+ +

TQSpinBox allows the user to choose a value either by clicking the +up/down buttons to increase/decrease the value currently displayed +or by typing the value directly into the spin box. If the value is +entered directly into the spin box, Enter (or Return) must be +pressed to apply the new value. The value is usually an integer. +

Every time the value changes TQSpinBox emits the valueChanged() +signal. The current value can be fetched with value() and set +with setValue(). +

The spin box keeps the value within a numeric range, and to +multiples of the lineStep() size (see TQRangeControl for details). +Clicking the up/down buttons or using the keyboard accelerator's +up and down arrows will increase or decrease the current value in +steps of size lineStep(). The minimum and maximum value and the +step size can be set using one of the constructors, and can be +changed later with setMinValue(), setMaxValue() and setLineStep(). +

Most spin boxes are directional, but TQSpinBox can also operate as +a circular spin box, i.e. if the range is 0-99 and the current +value is 99, clicking "up" will give 0. Use setWrapping() if you +want circular behavior. +

The displayed value can be prepended and appended with arbitrary +strings indicating, for example, currency or the unit of +measurement. See setPrefix() and setSuffix(). The text in the spin +box is retrieved with text() (which includes any prefix() and +suffix()), or with cleanText() (which has no prefix(), no suffix() +and no leading or trailing whitespace). currentValueText() returns +the spin box's current value as text. +

Normally the spin box displays up and down arrows in the buttons. +You can use setButtonSymbols() to change the display to show ++ and - symbols if you prefer. In either case the up +and down arrow keys work as expected. +

It is often desirable to give the user a special (often default) +choice in addition to the range of numeric values. See +setSpecialValueText() for how to do this with TQSpinBox. +

The default TQWidget::focusPolicy() is StrongFocus. +

If using prefix(), suffix() and specialValueText() don't provide +enough control, you can ignore them and subclass TQSpinBox instead. +

TQSpinBox can easily be subclassed to allow the user to input +things other than an integer value as long as the allowed input +can be mapped to a range of integers. This can be done by +overriding the virtual functions mapValueToText() and +mapTextToValue(), and setting another suitable validator using +setValidator(). +

For example, these functions could be changed so that the user +provided values from 0.0 to 10.0, or -1 to signify 'Auto', while +the range of integers used inside the program would be -1 to 100: +

+        class MySpinBox : public TQSpinBox
+        {
+            Q_OBJECT
+        public:
+            ...
+
+            TQString mapValueToText( int value )
+            {
+                if ( value == -1 ) // special case
+                    return TQString( "Auto" );
+
+                return TQString( "%1.%2" ) // 0.0 to 10.0
+                    .arg( value / 10 ).arg( value % 10 );
+            }
+
+            int mapTextToValue( bool *ok )
+            {
+                if ( text() == "Auto" ) // special case
+                    return -1;
+
+                return (int) ( 10 * text().toFloat() ); // 0 to 100
+            }
+        };
+    
+ +

+

See also TQScrollBar, TQSlider, GUI Design Handbook: Spin Box, and Basic Widgets. + +


Member Type Documentation

+

TQSpinBox::ButtonSymbols

+ +

This enum type determines what the buttons in a spin box show. +

    +
  • TQSpinBox::UpDownArrows - the buttons show little arrows in the classic +style. +
  • TQSpinBox::PlusMinus - the buttons show + and - symbols. +

See also TQSpinBox::buttonSymbols. + +


Member Function Documentation

+

TQSpinBox::TQSpinBox ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a spin box with the default TQRangeControl range and +step values. It is called name and has parent parent. +

See also minValue, maxValue, setRange(), lineStep, and setSteps(). + +

TQSpinBox::TQSpinBox ( int minValue, int maxValue, int step = 1, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a spin box that allows values from minValue to maxValue inclusive, with step amount step. The value is +initially set to minValue. +

The spin box is called name and has parent parent. +

See also minValue, maxValue, setRange(), lineStep, and setSteps(). + +

TQSpinBox::~TQSpinBox () +

+Destroys the spin box, freeing all memory and other resources. + +

ButtonSymbols TQSpinBox::buttonSymbols () const +

Returns the current button symbol mode. +See the "buttonSymbols" property for details. +

TQString TQSpinBox::cleanText () const [virtual] +

Returns the spin box's text with no prefix(), suffix() or leading or trailing whitespace. +See the "cleanText" property for details. +

TQString TQSpinBox::currentValueText () [protected] +

+Returns the full text calculated from the current value, including +any prefix and suffix. If there is special value text and the +value is minValue() the specialValueText() is returned. + +

TQRect TQSpinBox::downRect () const +

+Returns the geometry of the "down" button. + +

TQLineEdit * TQSpinBox::editor () const [protected] +

+Returns a pointer to the embedded TQLineEdit. + +

bool TQSpinBox::eventFilter ( TQObject * o, TQEvent * ev ) [virtual protected] +

+Intercepts and handles the events coming to the embedded TQLineEdit +that have special meaning for the TQSpinBox. The object is passed +as o and the event is passed as ev. + +

Reimplemented from TQObject. +

void TQSpinBox::interpretText () [virtual protected] +

+TQSpinBox calls this after the user has manually edited the +contents of the spin box (i.e. by typing in the embedded +TQLineEdit, rather than using the up/down buttons/keys). +

The default implementation of this function interprets the new +text using mapTextToValue(). If mapTextToValue() is successful, it +changes the spin box's value; if not, the value is left unchanged. +

See also editor(). + +

int TQSpinBox::lineStep () const +

Returns the line step. +See the "lineStep" property for details. +

int TQSpinBox::mapTextToValue ( bool * ok ) [virtual protected] +

+This virtual function is used by the spin box whenever it needs to +interpret text entered by the user as a value. The text is +available as text() and as cleanText(), and this function must +parse it if possible. If ok is not 0: if it parses the text +successfully, *ok is set to TRUE; otherwise *ok is set to +FALSE. +

Subclasses that need to display spin box values in a non-numeric +way need to reimplement this function. +

Note that TQt handles specialValueText() separately; this function +is only concerned with the other values. +

The default implementation tries to interpret the text() as an +integer in the standard way and returns the integer value. +

See also interpretText() and mapValueToText(). + +

TQString TQSpinBox::mapValueToText ( int v ) [virtual protected] +

+This virtual function is used by the spin box whenever it needs to +display value v. The default implementation returns a string +containing v printed in the standard way. Reimplementations may +return anything. (See the example in the detailed description.) +

Note that TQt does not call this function for specialValueText() +and that neither prefix() nor suffix() are included in the return +value. +

If you reimplement this, you may also need to reimplement +mapTextToValue(). +

See also updateDisplay() and mapTextToValue(). + +

int TQSpinBox::maxValue () const +

Returns the maximum value of the spin box. +See the "maxValue" property for details. +

int TQSpinBox::minValue () const +

Returns the minimum value of the spin box. +See the "minValue" property for details. +

TQString TQSpinBox::prefix () const [virtual] +

Returns the spin box's prefix. +See the "prefix" property for details. +

void TQSpinBox::rangeChange () [virtual protected] +

+This virtual function is called by TQRangeControl whenever the +range has changed. It adjusts the default validator and updates +the display; if you need additional processing, you can +reimplement this function. + +

Reimplemented from TQRangeControl. +

void TQSpinBox::selectAll () [virtual slot] +

+Selects all the text in the spin box's editor. + +

void TQSpinBox::setButtonSymbols ( ButtonSymbols ) [virtual] +

Sets the current button symbol mode. +See the "buttonSymbols" property for details. +

void TQSpinBox::setLineStep ( int ) +

Sets the line step. +See the "lineStep" property for details. +

void TQSpinBox::setMaxValue ( int ) +

Sets the maximum value of the spin box. +See the "maxValue" property for details. +

void TQSpinBox::setMinValue ( int ) +

Sets the minimum value of the spin box. +See the "minValue" property for details. +

void TQSpinBox::setPrefix ( const TQString & text ) [virtual slot] +

Sets the spin box's prefix to text. +See the "prefix" property for details. +

void TQSpinBox::setSpecialValueText ( const TQString & text ) [virtual] +

Sets the special-value text to text. +See the "specialValueText" property for details. +

void TQSpinBox::setSuffix ( const TQString & text ) [virtual slot] +

Sets the suffix of the spin box to text. +See the "suffix" property for details. +

void TQSpinBox::setValidator ( const TQValidator * v ) [virtual] +

+Sets the validator to v. The validator controls what keyboard +input is accepted when the user is editing in the value field. The +default is to use a suitable TQIntValidator. +

Use setValidator(0) to turn off input validation (entered input +will still be kept within the spin box's range). + +

void TQSpinBox::setValue ( int value ) [virtual slot] +

Sets the value of the spin box to value. +See the "value" property for details. +

void TQSpinBox::setWrapping ( bool on ) [virtual] +

Sets whether it is possible to step the value from the highest value to the lowest value and vice versa to on. +See the "wrapping" property for details. +

TQString TQSpinBox::specialValueText () const +

Returns the special-value text. +See the "specialValueText" property for details. +

void TQSpinBox::stepDown () [virtual slot] +

+Decreases the spin box's value one lineStep(), wrapping as +necessary if wrapping() is TRUE. This is the same as clicking on +the pointing-down button and can be used for keyboard +accelerators, for example. +

See also stepUp(), subtractLine(), lineStep, setSteps(), value, and value. + +

void TQSpinBox::stepUp () [virtual slot] +

+Increases the spin box's value by one lineStep(), wrapping as +necessary if wrapping() is TRUE. This is the same as clicking on +the pointing-up button and can be used for keyboard accelerators, +for example. +

See also stepDown(), addLine(), lineStep, setSteps(), value, and value. + +

TQString TQSpinBox::suffix () const [virtual] +

Returns the suffix of the spin box. +See the "suffix" property for details. +

TQString TQSpinBox::text () const +

Returns the spin box's text, including any prefix() and suffix(). +See the "text" property for details. +

void TQSpinBox::textChanged () [protected slot] +

+This slot is called whenever the user edits the spin box's text. + +

TQRect TQSpinBox::upRect () const +

+Returns the geometry of the "up" button. + +

void TQSpinBox::updateDisplay () [virtual protected] +

+Updates the contents of the embedded TQLineEdit to reflect the +current value using mapValueToText(). Also enables/disables the +up/down push buttons accordingly. +

See also mapValueToText(). + +

const TQValidator * TQSpinBox::validator () const +

+Returns the validator that constrains editing for this spin box if +there is any; otherwise returns 0. +

See also setValidator() and TQValidator. + +

int TQSpinBox::value () const +

Returns the value of the spin box. +See the "value" property for details. +

void TQSpinBox::valueChange () [virtual protected] +

+This virtual function is called by TQRangeControl whenever the +value has changed. The TQSpinBox reimplementation updates the +display and emits the valueChanged() signals; if you need +additional processing, either reimplement this or connect to one +of the valueChanged() signals. + +

Reimplemented from TQRangeControl. +

void TQSpinBox::valueChanged ( int value ) [signal] +

+ +

This signal is emitted every time the value of the spin box +changes; the new value is passed in value. This signal will be +emitted as a result of a call to setValue(), or because the user +changed the value by using a keyboard accelerator or mouse click, +etc. +

Note that the valueChanged() signal is emitted every time, not +just for the "last" step; i.e. if the user clicks "up" three +times, this signal is emitted three times. +

See also value. + +

Examples: listbox/listbox.cpp, qfd/fontdisplayer.cpp, and scribble/scribble.cpp. +

void TQSpinBox::valueChanged ( const TQString & valueText ) [signal] +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted whenever the valueChanged( int ) signal is +emitted, i.e. every time the value of the spin box changes +(whatever the cause, e.g. by setValue(), by a keyboard +accelerator, by mouse clicks, etc.). +

The valueText parameter is the same string that is displayed in +the edit field of the spin box. +

See also value, prefix, suffix, and specialValueText. + +

bool TQSpinBox::wrapping () const +

Returns TRUE if it is possible to step the value from the highest value to the lowest value and vice versa; otherwise returns FALSE. +See the "wrapping" property for details. +


Property Documentation

+

ButtonSymbols buttonSymbols

+

This property holds the current button symbol mode. +

The possible values can be either UpDownArrows or PlusMinus. +The default is UpDownArrows. +

See also ButtonSymbols. + +

Set this property's value with setButtonSymbols() and get this property's value with buttonSymbols(). +

TQString cleanText

+

This property holds the spin box's text with no prefix(), suffix() or leading or trailing whitespace. +

Get this property's value with cleanText(). +

See also text, prefix, and suffix. + +

int lineStep

+

This property holds the line step. +

When the user uses the arrows to change the spin box's value the +value will be incremented/decremented by the amount of the line +step. +

The setLineStep() function calls the virtual stepChange() function +if the new line step is different from the previous setting. +

See also TQRangeControl::setSteps() and setRange(). + +

Set this property's value with setLineStep() and get this property's value with lineStep(). +

int maxValue

+

This property holds the maximum value of the spin box. +

When setting this property, TQSpinBox::minValue is adjusted, if +necessary, to ensure that the range remains valid. +

See also setRange() and specialValueText. + +

Set this property's value with setMaxValue() and get this property's value with maxValue(). +

int minValue

+

This property holds the minimum value of the spin box. +

When setting this property, TQSpinBox::maxValue is adjusted, if +necessary, to ensure that the range remains valid. +

See also setRange() and specialValueText. + +

Set this property's value with setMinValue() and get this property's value with minValue(). +

TQString prefix

+

This property holds the spin box's prefix. +

The prefix is prepended to the start of the displayed value. +Typical use is to display a unit of measurement or a currency +symbol. For example: +

+        sb->setPrefix( "$" );
+    
+ +

To turn off the prefix display, set this property to an empty +string. The default is no prefix. The prefix is not displayed for +the minValue() if specialValueText() is not empty. +

If no prefix is set, prefix() returns TQString::null. +

See also suffix. + +

Set this property's value with setPrefix() and get this property's value with prefix(). +

TQString specialValueText

+

This property holds the special-value text. +

If set, the spin box will display this text instead of a numeric +value whenever the current value is equal to minVal(). Typical use +is to indicate that this choice has a special (default) meaning. +

For example, if your spin box allows the user to choose the margin +width in a print dialog and your application is able to +automatically choose a good margin width, you can set up the spin +box like this: +

+        TQSpinBox marginBox( -1, 20, 1, parent, "marginBox" );
+        marginBox->setSuffix( " mm" );
+        marginBox->setSpecialValueText( "Auto" );
+    
+ +The user will then be able to choose a margin width from 0-20 +millimeters or select "Auto" to leave it to the application to +choose. Your code must then interpret the spin box value of -1 as +the user requesting automatic margin width. +

All values are displayed with the prefix() and suffix() (if set), +except for the special value, which only shows the special +value text. +

To turn off the special-value text display, call this function +with an empty string. The default is no special-value text, i.e. +the numeric value is shown as usual. +

If no special-value text is set, specialValueText() returns +TQString::null. + +

Set this property's value with setSpecialValueText() and get this property's value with specialValueText(). +

TQString suffix

+

This property holds the suffix of the spin box. +

The suffix is appended to the end of the displayed value. Typical +use is to display a unit of measurement or a currency symbol. For +example: +

+        sb->setSuffix( " km" );
+    
+ +

To turn off the suffix display, set this property to an empty +string. The default is no suffix. The suffix is not displayed for +the minValue() if specialValueText() is not empty. +

If no suffix is set, suffix() returns a TQString::null. +

See also prefix. + +

Set this property's value with setSuffix() and get this property's value with suffix(). +

TQString text

+

This property holds the spin box's text, including any prefix() and suffix(). +

There is no default text. +

See also value. + +

Get this property's value with text(). +

int value

+

This property holds the value of the spin box. +

Set this property's value with setValue() and get this property's value with value(). +

See also TQRangeControl::setValue(). + +

bool wrapping

+

This property holds whether it is possible to step the value from the highest value to the lowest value and vice versa. +

By default, wrapping is turned off. +

If you have a range of 0..100 and wrapping is off when the user +reaches 100 and presses the Up Arrow nothing will happen; but if +wrapping is on the value will change from 100 to 0, then to 1, +etc. When wrapping is on, navigating past the highest value takes +you to the lowest and vice versa. +

See also minValue, maxValue, and setRange(). + +

Set this property's value with setWrapping() and get this property's value with wrapping(). + +


+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/qsplashscreen-h.html b/doc/html/qsplashscreen-h.html new file mode 100644 index 00000000..282966c1 --- /dev/null +++ b/doc/html/qsplashscreen-h.html @@ -0,0 +1,125 @@ + + + + + +qsplashscreen.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsplashscreen.h

+ +

This is the verbatim text of the qsplashscreen.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsplashscreen.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQSplashScreen class
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSPLASHSCREEN_H
+#define TQSPLASHSCREEN_H
+
+#ifndef QT_H
+#include "qpixmap.h"
+#include "qwidget.h"
+#endif // QT_H
+
+#ifndef QT_NO_SPLASHSCREEN
+class TQSplashScreenPrivate;
+
+class Q_EXPORT TQSplashScreen : public TQWidget
+{
+    Q_OBJECT
+public:
+    TQSplashScreen( const TQPixmap &pixmap = TQPixmap(), WFlags f = 0 );
+    virtual ~TQSplashScreen();
+
+    void setPixmap( const TQPixmap &pixmap );
+    TQPixmap* pixmap() const;
+    void finish( TQWidget *w );
+    void repaint();
+
+public slots:
+    void message( const TQString &str, int flags = AlignLeft,
+		  const TQColor &color = black );
+    void clear();
+
+signals:
+    void messageChanged( const TQString &str );
+
+protected:
+    virtual void drawContents( TQPainter *painter );
+    void mousePressEvent( TQMouseEvent * );
+
+private:
+    void drawContents();
+
+    TQSplashScreenPrivate *d;
+};
+#endif //QT_NO_SPLASHSCREEN
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsplashscreen-members.html b/doc/html/qsplashscreen-members.html new file mode 100644 index 00000000..260eb535 --- /dev/null +++ b/doc/html/qsplashscreen-members.html @@ -0,0 +1,345 @@ + + + + + +TQSplashScreen Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSplashScreen

+ +

This is the complete list of member functions for +TQSplashScreen, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsplashscreen.html b/doc/html/qsplashscreen.html new file mode 100644 index 00000000..3875a5e1 --- /dev/null +++ b/doc/html/qsplashscreen.html @@ -0,0 +1,193 @@ + + + + + +TQSplashScreen Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSplashScreen Class Reference

+ +

The TQSplashScreen widget provides a splash screen that can +be shown during application startup. +More... +

#include <qsplashscreen.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+ +

Public Slots

+
    +
  • void message ( const TQString & message, int alignment = AlignLeft, const TQColor & color = black )
  • +
  • void clear ()
  • +
+

Signals

+ +

Protected Members

+ +

Detailed Description

+ + +The TQSplashScreen widget provides a splash screen that can +be shown during application startup. +

+ +

A splash screen is a widget that is usually displayed when an +application is being started. Splash screens are often used for +applications that have long start up times (e.g. database or +networking applications that take time to establish connections) to +provide the user with feedback that the application is loading. +

The splash screen appears centered on the screen. It may be useful to add +the WStyle_StaysOnTop if you desire to keep above all the windows in the +GUI. +

Some X11 window managers do not support the "stays on top" flag. A +solution is to set up a timer that periodically calls raise() on +the splash screen to simulate the "stays on top" effect. +

The most common usage is to show a splash screen before the main +widget is displayed on the screen. This is illustrated in the +following code snippet. +

+   int main( int argc, char **argv )
+   {
+       TQApplication app( argc, argv );
+       TQPixmap pixmap( "splash.png" );
+       TQSplashScreen *splash = new TQSplashScreen( pixmap );
+       splash->show();
+       TQMainWindow *mainWin = new TQMainWindow;
+       ...
+       app.setMainWidget( mainWin );
+       mainWin->show();
+       splash->finish( mainWin );
+       delete splash;
+       return app.exec();
+   }
+   
+ +

It is sometimes useful to update the splash screen with messages, +for example, announcing connections established or modules loaded +as the application starts up. TQSplashScreen supports this with the +message() function. If you wish to do your own drawing you can +get a pointer to the pixmap used in the splash screen with pixmap(). +Alternatively, you can subclass TQSplashScreen and reimplement +drawContents(). +

The user can hide the splash screen by clicking on it with the +mouse. Since the splash screen is typically displayed before the +event loop has started running, it is necessary to periodically +call TQApplication::processEvents() to receive the mouse clicks. +

+   TQPixmap pixmap( "splash.png" );
+   TQSplashScreen *splash = new TQSplashScreen( pixmap );
+   splash->show();
+   ... // Loading some items
+   splash->message( "Loaded modules" );
+   qApp->processEvents();
+   ... // Establishing connections
+   splash->message( "Established connections" );
+   qApp->processEvents();
+   
+ +

See also Miscellaneous Classes. + +


Member Function Documentation

+

TQSplashScreen::TQSplashScreen ( const TQPixmap & pixmap = TQPixmap ( ), WFlags f = 0 ) +

+Construct a splash screen that will display the pixmap. +

There should be no need to set the widget flags, f, except +perhaps WDestructiveClose or WStyle_StaysOnTop. + +

TQSplashScreen::~TQSplashScreen () [virtual] +

+Destructor. + +

void TQSplashScreen::clear () [slot] +

+Removes the message being displayed on the splash screen +

See also message(). + +

void TQSplashScreen::drawContents ( TQPainter * painter ) [virtual protected] +

+Draw the contents of the splash screen using painter painter. +The default implementation draws the message passed by message(). +Reimplement this function if you want to do your own drawing on +the splash screen. + +

void TQSplashScreen::finish ( TQWidget * mainWin ) +

+Makes the splash screen wait until the widget mainWin is displayed +before calling close() on itself. + +

void TQSplashScreen::message ( const TQString & message, int alignment = AlignLeft, const TQColor & color = black ) [slot] +

+Draws the message text onto the splash screen with color color and aligns the text according to the flags in alignment. +

See also TQt::AlignmentFlags and clear(). + +

void TQSplashScreen::messageChanged ( const TQString & message ) [signal] +

+ +

This signal is emitted when the message on the splash screen +changes. message is the new message and is a null-string +when the message has been removed. +

See also message() and clear(). + +

TQPixmap * TQSplashScreen::pixmap () const +

+Returns the pixmap that is used in the splash screen. The image +does not have any of the text drawn by message() calls. + +

void TQSplashScreen::repaint () +

+This overrides TQWidget::repaint(). It differs from the standard +repaint function in that it also calls TQApplication::flush() to +ensure the updates are displayed, even when there is no event loop +present. + +

void TQSplashScreen::setPixmap ( const TQPixmap & pixmap ) +

+Sets the pixmap that will be used as the splash screen's image to +pixmap. + + +

+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/qsplitter-h.html b/doc/html/qsplitter-h.html new file mode 100644 index 00000000..a2a03af9 --- /dev/null +++ b/doc/html/qsplitter-h.html @@ -0,0 +1,214 @@ + + + + + +qsplitter.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsplitter.h

+ +

This is the verbatim text of the qsplitter.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsplitter.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of TQSplitter class
+**
+**  Created : 980105
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSPLITTER_H
+#define TQSPLITTER_H
+
+#ifndef QT_H
+#include "qframe.h"
+#include "qvaluelist.h"
+#endif // QT_H
+
+#ifndef QT_NO_SPLITTER
+
+class TQSplitterHandle;
+class TQSplitterPrivate;
+class TQSplitterLayoutStruct;
+class TQTextStream;
+
+class Q_EXPORT TQSplitter : public TQFrame
+{
+    Q_OBJECT
+    Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
+    Q_PROPERTY( bool opaqueResize READ opaqueResize WRITE setOpaqueResize )
+    Q_PROPERTY( int handleWidth READ handleWidth WRITE setHandleWidth )
+    Q_PROPERTY( bool childrenCollapsible READ childrenCollapsible WRITE setChildrenCollapsible )
+
+public:
+    // ### TQt 4.0: remove Auto from public API
+    enum ResizeMode { Stretch, KeepSize, FollowSizeHint, Auto };
+
+    TQSplitter( TQWidget* parent = 0, const char* name = 0 );
+    TQSplitter( Orientation, TQWidget* parent = 0, const char* name = 0 );
+    ~TQSplitter();
+
+    virtual void setOrientation( Orientation );
+    Orientation orientation() const { return orient; }
+
+    // ### TQt 4.0: make setChildrenCollapsible() and setCollapsible() virtual
+
+    void setChildrenCollapsible( bool );
+    bool childrenCollapsible() const;
+
+    void setCollapsible( TQWidget *w, bool );
+    virtual void setResizeMode( TQWidget *w, ResizeMode );
+    virtual void setOpaqueResize( bool = TRUE );
+    bool opaqueResize() const;
+
+    void moveToFirst( TQWidget * );
+    void moveToLast( TQWidget * );
+
+    void refresh() { recalc( TRUE ); }
+    TQSize sizeHint() const;
+    TQSize minimumSizeHint() const;
+
+    TQValueList<int> sizes() const;
+    void setSizes( TQValueList<int> );
+
+    int handleWidth() const;
+    void setHandleWidth( int );
+
+protected:
+    void childEvent( TQChildEvent * );
+
+    bool event( TQEvent * );
+    void resizeEvent( TQResizeEvent * );
+
+    int idAfter( TQWidget* ) const;
+
+    void moveSplitter( TQCOORD pos, int id );
+    virtual void drawSplitter( TQPainter*, TQCOORD x, TQCOORD y,
+			       TQCOORD w, TQCOORD h );
+    void styleChange( TQStyle& );
+    int adjustPos( int, int );
+    virtual void setRubberband( int );
+    void getRange( int id, int *, int * );
+
+private:
+    enum { DefaultResizeMode = 3 };
+
+    void init();
+    void recalc( bool update = FALSE );
+    void doResize();
+    void storeSizes();
+    void getRange( int id, int *, int *, int *, int * );
+    void addContribution( int, int *, int *, bool );
+    int adjustPos( int, int, int *, int *, int *, int * );
+    bool collapsible( TQSplitterLayoutStruct * );
+    void processChildEvents();
+    TQSplitterLayoutStruct *findWidget( TQWidget * );
+    TQSplitterLayoutStruct *addWidget( TQWidget *, bool prepend = FALSE );
+    void recalcId();
+    void doMove( bool backwards, int pos, int id, int delta, bool upLeft,
+		 bool mayCollapse );
+    void setGeo( TQWidget *w, int pos, int size, bool splitterMoved );
+    int findWidgetJustBeforeOrJustAfter( int id, int delta, int &collapsibleSize );
+    void updateHandles();
+
+    inline TQCOORD pick( const TQPoint &p ) const
+    { return orient == Horizontal ? p.x() : p.y(); }
+    inline TQCOORD pick( const TQSize &s ) const
+    { return orient == Horizontal ? s.width() : s.height(); }
+
+    inline TQCOORD trans( const TQPoint &p ) const
+    { return orient == Vertical ? p.x() : p.y(); }
+    inline TQCOORD trans( const TQSize &s ) const
+    { return orient == Vertical ? s.width() : s.height(); }
+
+    TQSplitterPrivate *d;
+
+    Orientation orient;
+    friend class TQSplitterHandle;
+
+#ifndef QT_NO_TEXTSTREAM
+    friend Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& );
+    friend Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& );
+#endif
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQSplitter( const TQSplitter & );
+    TQSplitter& operator=( const TQSplitter & );
+#endif
+};
+
+#ifndef QT_NO_TEXTSTREAM
+Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& );
+Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& );
+#endif
+
+#endif // QT_NO_SPLITTER
+
+#endif // TQSPLITTER_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsplitter-m.png b/doc/html/qsplitter-m.png new file mode 100644 index 00000000..732ec7a5 Binary files /dev/null and b/doc/html/qsplitter-m.png differ diff --git a/doc/html/qsplitter-members.html b/doc/html/qsplitter-members.html new file mode 100644 index 00000000..448f5d11 --- /dev/null +++ b/doc/html/qsplitter-members.html @@ -0,0 +1,378 @@ + + + + + +TQSplitter Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSplitter

+ +

This is the complete list of member functions for +TQSplitter, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsplitter-w.png b/doc/html/qsplitter-w.png new file mode 100644 index 00000000..57199123 Binary files /dev/null and b/doc/html/qsplitter-w.png differ diff --git a/doc/html/qsplitter.html b/doc/html/qsplitter.html new file mode 100644 index 00000000..60ed9212 --- /dev/null +++ b/doc/html/qsplitter.html @@ -0,0 +1,337 @@ + + + + + +TQSplitter Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSplitter Class Reference

+ +

The TQSplitter class implements a splitter widget. +More... +

#include <qsplitter.h> +

Inherits TQFrame. +

List of all member functions. +

Public Members

+ +

Properties

+ +

Protected Members

+
    +
  • virtual void childEvent ( TQChildEvent * c )
  • +
  • int idAfter ( TQWidget * w ) const
  • +
  • void moveSplitter ( TQCOORD p, int id )
  • +
  • virtual void drawSplitter ( TQPainter * p, TQCOORD x, TQCOORD y, TQCOORD w, TQCOORD h )  (obsolete)
  • +
  • int adjustPos ( int pos, int id )
  • +
  • virtual void setRubberband ( int p )
  • +
  • void getRange ( int id, int * min, int * max )
  • +
+

Related Functions

+
    +
  • TQTextStream & operator<< ( TQTextStream & ts, const TQSplitter & splitter )
  • +
  • TQTextStream & operator>> ( TQTextStream & ts, TQSplitter & splitter )
  • +
+

Detailed Description

+ + +The TQSplitter class implements a splitter widget. +

+ +

A splitter lets the user control the size of child widgets by +dragging the boundary between the children. Any number of widgets +may be controlled by a single splitter. +

To show a TQListBox, a TQListView and a TQTextEdit side by side: +

+        TQSplitter *split = new TQSplitter( parent );
+        TQListBox *lb = new TQListBox( split );
+        TQListView *lv = new TQListView( split );
+        TQTextEdit *ed = new TQTextEdit( split );
+    
+ +

TQSplitter lays out its children horizontally (side by side); you +can use setOrientation(TQSplitter::Vertical) to lay out the +children vertically. +

By default, all widgets can be as large or as small as the user +wishes, between the minimumSizeHint() (or minimumSize()) +and maximumSize() of the widgets. Use setResizeMode() to +specify that a widget should keep its size when the splitter is +resized, or set the stretch component of the sizePolicy. +

Although TQSplitter normally resizes the children only at the end +of a resize operation, if you call setOpaqueResize(TRUE) the +widgets are resized as often as possible. +

The initial distribution of size between the widgets is determined +by the initial size of each widget. You can also use setSizes() to +set the sizes of all the widgets. The function sizes() returns the +sizes set by the user. +

If you hide() a child its space will be distributed among the +other children. It will be reinstated when you show() it again. It +is also possible to reorder the widgets within the splitter using +moveToFirst() and moveToLast(). +

+

See also TQTabBar and Organizers. + +


Member Type Documentation

+

TQSplitter::ResizeMode

+ +

This enum type describes how TQSplitter will resize each of its +child widgets. +

    +
  • TQSplitter::Auto - The widget will be resized according to the stretch +factors set in its sizePolicy(). +
  • TQSplitter::Stretch - The widget will be resized when the splitter +itself is resized. +
  • TQSplitter::KeepSize - TQSplitter will try to keep the widget's size +unchanged. +
  • TQSplitter::FollowSizeHint - TQSplitter will resize the widget when the +widget's size hint changes. +
+

Member Function Documentation

+

TQSplitter::TQSplitter ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a horizontal splitter with the parent and name +arguments being passed on to the TQFrame constructor. + +

TQSplitter::TQSplitter ( Orientation o, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a splitter with orientation o with the parent and +name arguments being passed on to the TQFrame constructor. + +

TQSplitter::~TQSplitter () +

+Destroys the splitter and any children. + +

int TQSplitter::adjustPos ( int pos, int id ) [protected] +

+Returns the closest legal position to pos of the widget with ID +id. +

See also idAfter(). + +

void TQSplitter::childEvent ( TQChildEvent * c ) [virtual protected] +

+Tells the splitter that the child widget described by c has +been inserted or removed. + +

Reimplemented from TQObject. +

bool TQSplitter::childrenCollapsible () const +

Returns TRUE if child widgets can be resized down to size 0 by the user; otherwise returns FALSE. +See the "childrenCollapsible" property for details. +

void TQSplitter::drawSplitter ( TQPainter * p, TQCOORD x, TQCOORD y, TQCOORD w, TQCOORD h ) [virtual protected] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Draws the splitter handle in the rectangle described by x, y, +w, h using painter p. +

See also TQStyle::drawPrimitive(). + +

void TQSplitter::getRange ( int id, int * min, int * max ) [protected] +

+Returns the valid range of the splitter with ID id in *min +and *max if min and max are not 0. +

See also idAfter(). + +

int TQSplitter::handleWidth () const +

Returns the width of the splitter handle. +See the "handleWidth" property for details. +

int TQSplitter::idAfter ( TQWidget * w ) const [protected] +

+Returns the ID of the widget to the right of or below the widget +w, or 0 if there is no such widget (i.e. it is either not in +this TQSplitter or w is at the end). + +

void TQSplitter::moveSplitter ( TQCOORD p, int id ) [protected] +

+Moves the left/top edge of the splitter handle with ID id as +close as possible to position p, which is the distance from the +left (or top) edge of the widget. +

For Arabic, Hebrew and other right-to-left languages the layout is +reversed. p is then the distance from the right (or top) edge +of the widget. +

See also idAfter(). + +

void TQSplitter::moveToFirst ( TQWidget * w ) +

+Moves widget w to the leftmost/top position. + +

Example: splitter/splitter.cpp. +

void TQSplitter::moveToLast ( TQWidget * w ) +

+Moves widget w to the rightmost/bottom position. + +

bool TQSplitter::opaqueResize () const +

Returns TRUE if resizing is opaque; otherwise returns FALSE. +See the "opaqueResize" property for details. +

Orientation TQSplitter::orientation () const +

Returns the orientation of the splitter. +See the "orientation" property for details. +

void TQSplitter::refresh () +

+ +

Updates the splitter's state. You should not need to call this +function. + +

void TQSplitter::setChildrenCollapsible ( bool ) +

Sets whether child widgets can be resized down to size 0 by the user. +See the "childrenCollapsible" property for details. +

void TQSplitter::setCollapsible ( TQWidget * w, bool collapse ) +

+Sets whether the child widget w is collapsible to collapse. +

By default, children are collapsible, meaning that the user can +resize them down to size 0, even if they have a non-zero +minimumSize() or minimumSizeHint(). This behavior can be changed +on a per-widget basis by calling this function, or globally for +all the widgets in the splitter by setting the childrenCollapsible property. +

See also childrenCollapsible. + +

void TQSplitter::setHandleWidth ( int ) +

Sets the width of the splitter handle. +See the "handleWidth" property for details. +

void TQSplitter::setOpaqueResize ( bool = TRUE ) [virtual] +

Sets whether resizing is opaque. +See the "opaqueResize" property for details. +

void TQSplitter::setOrientation ( Orientation ) [virtual] +

Sets the orientation of the splitter. +See the "orientation" property for details. +

void TQSplitter::setResizeMode ( TQWidget * w, ResizeMode mode ) [virtual] +

+Sets resize mode of widget w to mode. (The default is Auto.) + +

Examples: fileiconview/mainwindow.cpp, listviews/listviews.cpp, and splitter/splitter.cpp. +

void TQSplitter::setRubberband ( int p ) [virtual protected] +

+Displays a rubber band at position p. If p is negative, the +rubber band is removed. + +

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 +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 list are ignored. +

If list contains too few values, the result is undefined but +the program will still be well-behaved. +

Note that the values in list should be the height/width that +the widgets should be resized to. +

See also sizes(). + +

TQValueList<int> TQSplitter::sizes () const +

+Returns a list of the size parameters of all the widgets in this +splitter. +

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. +

Giving the values to another splitter's setSizes() function will +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() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also setSizes(). + +


Property Documentation

+

bool childrenCollapsible

+

This property holds whether child widgets can be resized down to size 0 by the user. +

By default, children are collapsible. It is possible to enable +and disable the collapsing of individual children; see +setCollapsible(). + +

Set this property's value with setChildrenCollapsible() and get this property's value with childrenCollapsible(). +

int handleWidth

+

This property holds the width of the splitter handle. +

+

Set this property's value with setHandleWidth() and get this property's value with handleWidth(). +

bool opaqueResize

+

This property holds whether resizing is opaque. +

Opaque resizing is off by default. + +

Set this property's value with setOpaqueResize() and get this property's value with opaqueResize(). +

Orientation orientation

+

This property holds the orientation of the splitter. +

By default the orientation is horizontal (the widgets are side by +side). The possible orientations are Horizontal and +Vertical. + +

Set this property's value with setOrientation() and get this property's value with orientation(). +


Related Functions

+

TQTextStream & operator<< ( TQTextStream & ts, const TQSplitter & splitter ) +

+ +

Writes the sizes and the hidden state of the widgets in the +splitter splitter to the text stream ts. +

See also operator>>(), sizes(), and TQWidget::hidden. + +

TQTextStream & operator>> ( TQTextStream & ts, TQSplitter & splitter ) +

+ +

Reads the sizes and the hidden state of the widgets in the +splitter splitter from the text stream ts. The sizes must +have been previously written by the operator<<() function. +

See also operator<<(), setSizes(), and TQWidget::hide(). + + +


+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/qsql-h.html b/doc/html/qsql-h.html new file mode 100644 index 00000000..64dae6ae --- /dev/null +++ b/doc/html/qsql-h.html @@ -0,0 +1,144 @@ + + + + + +qsql.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsql.h

+ +

This is the verbatim text of the qsql.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSql class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQL_H
+#define TQSQL_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class TQM_EXPORT_SQL TQSql
+{
+public:
+    TQSql() {}
+    enum Op {
+	None = -1,
+	Insert = 0,
+	Update = 1,
+	Delete = 2
+    };
+
+    enum Location {
+	BeforeFirst = -1,
+	AfterLast = -2
+    };
+
+    enum Confirm {
+	Cancel = -1,
+	No = 0,
+	Yes = 1
+    };
+
+    enum ParameterType {
+	In = 1,
+	Out = 2,
+	InOut = 3  //InOut = In | Out
+    };
+
+    enum TableType { 
+	Tables = 0x01,
+	SystemTables = 0x02,
+	Views = 0x04,
+	AllTables = 0xff
+    };
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQSql( const TQSql & );
+    TQSql &operator=( const TQSql & );
+#endif
+
+};
+
+#endif
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsql-members.html b/doc/html/qsql-members.html new file mode 100644 index 00000000..32def0f0 --- /dev/null +++ b/doc/html/qsql-members.html @@ -0,0 +1,47 @@ + + + + + +TQSql Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSql

+ +

This is the complete list of member functions for +TQSql, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsql.html b/doc/html/qsql.html new file mode 100644 index 00000000..2e5046bc --- /dev/null +++ b/doc/html/qsql.html @@ -0,0 +1,121 @@ + + + + + +TQSql Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSql Class Reference
[sql module]

+ +

The TQSql class is a namespace for TQt SQL identifiers that +need to be global-like. +More... +

#include <qsql.h> +

List of all member functions. +

Public Members

+
    +
  • TQSql ()
  • +
  • enum Op { None = -1, Insert = 0, Update = 1, Delete = 2 }
  • +
  • enum Location { BeforeFirst = -1, AfterLast = -2 }
  • +
  • enum Confirm { Cancel = -1, No = 0, Yes = 1 }
  • +
  • enum ParameterType { In = 1, Out = 2, InOut = 3 }
  • +
  • enum TableType { Tables = 0x01, SystemTables = 0x02, Views = 0x04, AllTables = 0xff }
  • +
+

Detailed Description

+ + +The TQSql class is a namespace for TQt SQL identifiers that +need to be global-like. +

+ + +

Normally, you can ignore this class. Several TQt SQL classes +inherit it, so all the identifiers in the TQt SQL namespace are +visible without qualification. +

See also Database Classes. + +


Member Type Documentation

+

TQSql::Confirm

+ +

This enum type describes edit confirmations. +

    +
  • TQSql::Yes +
  • TQSql::No +
  • TQSql::Cancel +
+

TQSql::Location

+ +

This enum type describes SQL navigation locations. +

    +
  • TQSql::BeforeFirst +
  • TQSql::AfterLast +
+

TQSql::Op

+ +

This enum type describes edit operations. +

    +
  • TQSql::None +
  • TQSql::Insert +
  • TQSql::Update +
  • TQSql::Delete +
+

TQSql::ParameterType

+ +

This enum is used to set the type of a bind parameter +

    +
  • TQSql::In - the bind parameter is used to put data into the database +
  • TQSql::Out - the bind parameter is used to receive data from the database +
  • TQSql::InOut - the bind parameter is used to put data into the +database; it will be overwritten with output data on executing +a query. +
+

TQSql::TableType

+ +

This enum type describes types of tables +

    +
  • TQSql::Tables - All the tables visible to the user +
  • TQSql::SystemTables - Internal tables used by the DBMS +
  • TQSql::Views - All the views visible to the user +
  • TQSql::AllTables - All of the above +
+

Member Function Documentation

+

TQSql::TQSql () +

+ +

Constructs a TQt SQL namespace class + + +


+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/qsqlcursor-h.html b/doc/html/qsqlcursor-h.html new file mode 100644 index 00000000..cb571b7f --- /dev/null +++ b/doc/html/qsqlcursor-h.html @@ -0,0 +1,204 @@ + + + + + +qsqlcursor.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqlcursor.h

+ +

This is the verbatim text of the qsqlcursor.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSqlCursor class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLCURSOR_H
+#define TQSQLCURSOR_H
+
+#ifndef QT_H
+#include "qsqlrecord.h"
+#include "qstringlist.h"
+#include "qsqlquery.h"
+#include "qsqlindex.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class TQSqlDatabase;
+class TQSqlCursorPrivate;
+
+class TQM_EXPORT_SQL TQSqlCursor : public TQSqlRecord, public TQSqlQuery
+{
+public:
+    TQSqlCursor( const TQString & name = TQString::null, bool autopopulate = TRUE, TQSqlDatabase* db = 0 );
+    TQSqlCursor( const TQSqlCursor & other );
+    TQSqlCursor& operator=( const TQSqlCursor& other );
+    ~TQSqlCursor();
+
+    enum Mode {
+	ReadOnly = 0,
+	Insert = 1,
+	Update = 2,
+	Delete = 4,
+	Writable = 7
+    };
+
+    TQVariant		value( int i ) const;
+    TQVariant		value( const TQString& name ) const;
+    void         	setValue( int i, const TQVariant& val );
+    void         	setValue( const TQString& name, const TQVariant& val );
+    virtual TQSqlIndex	primaryIndex( bool prime = TRUE ) const;
+    virtual TQSqlIndex	index( const TQStringList& fieldNames ) const;
+    TQSqlIndex		index( const TQString& fieldName ) const;
+    TQSqlIndex		index( const char* fieldName ) const;
+    virtual void	setPrimaryIndex( const TQSqlIndex& idx );
+
+    virtual void	append( const TQSqlFieldInfo& fieldInfo );
+    virtual void	insert( int pos, const TQSqlFieldInfo& fieldInfo );
+    void		remove( int pos );
+    void		clear();
+    void		setGenerated( const TQString& name, bool generated );
+    void		setGenerated( int i, bool generated );
+
+    virtual TQSqlRecord*	editBuffer( bool copy = FALSE );
+    virtual TQSqlRecord*	primeInsert();
+    virtual TQSqlRecord*	primeUpdate();
+    virtual TQSqlRecord*	primeDelete();
+    virtual int		insert( bool invalidate = TRUE );
+    virtual int		update( bool invalidate = TRUE );
+    virtual int		del( bool invalidate = TRUE );
+
+    virtual void	setMode( int flags );
+    int			mode() const;
+    virtual void	setCalculated( const TQString& name, bool calculated );
+    bool		isCalculated( const TQString& name ) const;
+    virtual void	setTrimmed( const TQString& name, bool trim );
+    bool		isTrimmed( const TQString& name ) const;
+
+    bool		isReadOnly() const;
+    bool		canInsert() const;
+    bool		canUpdate() const;
+    bool		canDelete() const;
+
+    bool		select();
+    bool		select( const TQSqlIndex& sort );
+    bool		select( const TQSqlIndex & filter, const TQSqlIndex & sort );
+    virtual bool	select( const TQString & filter, const TQSqlIndex & sort = TQSqlIndex() );
+
+    virtual void	setSort( const TQSqlIndex& sort );
+    TQSqlIndex		sort() const;
+    virtual void	setFilter( const TQString& filter );
+    TQString		filter() const;
+    virtual void	setName( const TQString& name, bool autopopulate = TRUE );
+    TQString		name() const;
+    TQString		toString( const TQString& prefix = TQString::null,
+				const TQString& sep = "," ) const;
+    bool 		isNull( int i ) const;
+    bool 		isNull( const TQString& name ) const;
+    
+protected:
+    void		afterSeek();
+    bool		exec( const TQString & sql );
+
+    virtual TQVariant	calculateField( const TQString& name );
+    virtual int		update( const TQString & filter, bool invalidate = TRUE );
+    virtual int		del( const TQString & filter, bool invalidate = TRUE );
+
+    virtual TQString	toString( const TQString& prefix, TQSqlField* field, const TQString& fieldSep ) const;
+    virtual TQString	toString( TQSqlRecord* rec, const TQString& prefix, const TQString& fieldSep,
+				const TQString& sep ) const;
+    virtual TQString	toString( const TQSqlIndex& i, TQSqlRecord* rec, const TQString& prefix,
+				const TQString& fieldSep, const TQString& sep ) const;
+
+private:
+    void		sync();
+    int			apply( const TQString& q, bool invalidate );
+    int			applyPrepared( const TQString& q, bool invalidate );
+    TQSqlRecord&		operator=( const TQSqlRecord & list );
+    void 		append( const TQSqlField& field );
+    void 		insert( int pos, const TQSqlField& field );
+
+    TQSqlCursorPrivate*	d;
+};
+
+
+
+
+#endif	// QT_NO_SQL
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlcursor-members.html b/doc/html/qsqlcursor-members.html new file mode 100644 index 00000000..e9d59483 --- /dev/null +++ b/doc/html/qsqlcursor-members.html @@ -0,0 +1,121 @@ + + + + + +TQSqlCursor Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlCursor

+ +

This is the complete list of member functions for +TQSqlCursor, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlcursor.html b/doc/html/qsqlcursor.html new file mode 100644 index 00000000..8c6415ee --- /dev/null +++ b/doc/html/qsqlcursor.html @@ -0,0 +1,761 @@ + + + + + +TQSqlCursor Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlCursor Class Reference
[sql module]

+ +

The TQSqlCursor class provides browsing and editing of SQL +tables and views. +More... +

#include <qsqlcursor.h> +

Inherits TQSqlRecord and TQSqlQuery. +

Inherited by TQSqlSelectCursor. +

List of all member functions. +

Public Members

+
    +
  • TQSqlCursor ( const TQString & name = TQString::null, bool autopopulate = TRUE, TQSqlDatabase * db = 0 )
  • +
  • TQSqlCursor ( const TQSqlCursor & other )
  • +
  • TQSqlCursor & operator= ( const TQSqlCursor & other )
  • +
  • ~TQSqlCursor ()
  • +
  • enum Mode { ReadOnly = 0, Insert = 1, Update = 2, Delete = 4, Writable = 7 }
  • +
  • virtual TQSqlIndex primaryIndex ( bool setFromCursor = TRUE ) const
  • +
  • virtual TQSqlIndex index ( const TQStringList & fieldNames ) const
  • +
  • TQSqlIndex index ( const TQString & fieldName ) const
  • +
  • TQSqlIndex index ( const char * fieldName ) const
  • +
  • virtual void setPrimaryIndex ( const TQSqlIndex & idx )
  • +
  • virtual void append ( const TQSqlFieldInfo & fieldInfo )
  • +
  • virtual void insert ( int pos, const TQSqlFieldInfo & fieldInfo )
  • +
  • virtual void remove ( int pos )
  • +
  • virtual void clear ()
  • +
  • virtual void setGenerated ( const TQString & name, bool generated )
  • +
  • virtual void setGenerated ( int i, bool generated )
  • +
  • virtual TQSqlRecord * editBuffer ( bool copy = FALSE )
  • +
  • virtual TQSqlRecord * primeInsert ()
  • +
  • virtual TQSqlRecord * primeUpdate ()
  • +
  • virtual TQSqlRecord * primeDelete ()
  • +
  • virtual int insert ( bool invalidate = TRUE )
  • +
  • virtual int update ( bool invalidate = TRUE )
  • +
  • virtual int del ( bool invalidate = TRUE )
  • +
  • virtual void setMode ( int mode )
  • +
  • int mode () const
  • +
  • virtual void setCalculated ( const TQString & name, bool calculated )
  • +
  • bool isCalculated ( const TQString & name ) const
  • +
  • virtual void setTrimmed ( const TQString & name, bool trim )
  • +
  • bool isTrimmed ( const TQString & name ) const
  • +
  • bool isReadOnly () const
  • +
  • bool canInsert () const
  • +
  • bool canUpdate () const
  • +
  • bool canDelete () const
  • +
  • bool select ()
  • +
  • bool select ( const TQSqlIndex & sort )
  • +
  • bool select ( const TQSqlIndex & filter, const TQSqlIndex & sort )
  • +
  • virtual bool select ( const TQString & filter, const TQSqlIndex & sort = TQSqlIndex ( ) )
  • +
  • virtual void setSort ( const TQSqlIndex & sort )
  • +
  • TQSqlIndex sort () const
  • +
  • virtual void setFilter ( const TQString & filter )
  • +
  • TQString filter () const
  • +
  • virtual void setName ( const TQString & name, bool autopopulate = TRUE )
  • +
  • TQString name () const
  • +
  • bool isNull ( int i ) const
  • +
  • bool isNull ( const TQString & name ) const
  • +
+

Protected Members

+
    +
  • virtual TQVariant calculateField ( const TQString & name )
  • +
  • virtual int update ( const TQString & filter, bool invalidate = TRUE )
  • +
  • virtual int del ( const TQString & filter, bool invalidate = TRUE )
  • +
  • virtual TQString toString ( const TQString & prefix, TQSqlField * field, const TQString & fieldSep ) const
  • +
  • virtual TQString toString ( TQSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const
  • +
  • virtual TQString toString ( const TQSqlIndex & i, TQSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const
  • +
+

Detailed Description

+ + +The TQSqlCursor class provides browsing and editing of SQL +tables and views. +

+ +

A TQSqlCursor is a database record (see TQSqlRecord) that +corresponds to a table or view within an SQL database (see TQSqlDatabase). There are two buffers in a cursor, one used for +browsing and one used for editing records. Each buffer contains a +list of fields which correspond to the fields in the table or +view. +

When positioned on a valid record, the browse buffer contains the +values of the current record's fields from the database. The edit +buffer is separate, and is used for editing existing records and +inserting new records. +

For browsing data, a cursor must first select() data from the +database. After a successful select() the cursor is active +(isActive() returns TRUE), but is initially not positioned on a +valid record (isValid() returns FALSE). To position the cursor on +a valid record, use one of the navigation functions, next(), +prev(), first(), last(), or seek(). Once positioned on a valid +record, data can be retrieved from the browse buffer using +value(). If a navigation function is not successful, it returns +FALSE, the cursor will no longer be positioned on a valid record +and the values returned by value() are undefined. +

For example: +

+ +

            TQSqlCursor cur( "staff" ); // Specify the table/view name
+            cur.select(); // We'll retrieve every record
+            while ( cur.next() ) {
+                qDebug( cur.value( "id" ).toString() + ": " +
+                        cur.value( "surname" ).toString() + " " +
+                        cur.value( "salary" ).toString() );
+            }
+
+

In the above example, a cursor is created specifying a table or +view name in the database. Then, select() is called, which can be +optionally parameterised to filter and order the records +retrieved. Each record in the cursor is retrieved using next(). +When next() returns FALSE, there are no more records to process, +and the loop terminates. +

For editing records (rows of data), a cursor contains a separate +edit buffer which is independent of the fields used when browsing. +The functions insert(), update() and del() operate on the edit +buffer. This allows the cursor to be repositioned to other +records while simultaneously maintaining a separate buffer for +edits. You can get a pointer to the edit buffer using +editBuffer(). The primeInsert(), primeUpdate() and primeDelete() +functions also return a pointer to the edit buffer and prepare it +for insert, update and delete respectively. Edit operations only +affect a single row at a time. Note that update() and del() +retquire that the table or view contain a primaryIndex() to ensure +that edit operations affect a unique record within the database. +

For example: +

+ +

            TQSqlCursor cur( "prices" );
+            cur.select( "id=202" );
+            if ( cur.next() ) {
+                TQSqlRecord *buffer = cur.primeUpdate();
+                double price = buffer->value( "price" ).toDouble();
+                double newprice = price * 1.05;
+                buffer->setValue( "price", newprice );
+                cur.update();
+            }
+
+

To edit an existing database record, first move to the record you +wish to update. Call primeUpdate() to get the pointer to the +cursor's edit buffer. Then use this pointer to modify the values +in the edit buffer. Finally, call update() to save the changes to +the database. The values in the edit buffer will be used to +locate the appropriate record when updating the database (see +primaryIndex()). +

Similarly, when deleting an existing database record, first move +to the record you wish to delete. Then, call primeDelete() to get +the pointer to the edit buffer. Finally, call del() to delete the +record from the database. Again, the values in the edit buffer +will be used to locate and delete the appropriate record. +

To insert a new record, call primeInsert() to get the pointer to +the edit buffer. Use this pointer to populate the edit buffer +with new values and then insert() the record into the database. +

After calling insert(), update() or del(), the cursor is no longer +positioned on a valid record and can no longer be navigated +(isValid() return FALSE). The reason for this is that any changes +made to the database will not be visible until select() is called +to refresh the cursor. You can change this behavior by passing +FALSE to insert(), update() or del() which will prevent the cursor +from becoming invalid. The edits will still not be visible when +navigating the cursor until select() is called. +

TQSqlCursor contains virtual methods which allow editing behavior +to be customized by subclasses. This allows custom cursors to be +created that encapsulate the editing behavior of a database table +for an entire application. For example, a cursor can be customized +to always auto-number primary index fields, or provide fields with +suitable default values, when inserting new records. TQSqlCursor +generates SQL statements which are sent to the database engine; +you can control which fields are included in these statements +using setGenerated(). +

Note that TQSqlCursor does not inherit from TQObject. This means +that you are responsible for destroying instances of this class +yourself. However if you create a TQSqlCursor and use it in a +TQDataTable, TQDataBrowser or a TQDataView these classes will +usually take ownership of the cursor and destroy it when they +don't need it anymore. The documentation for TQDataTable, +TQDataBrowser and TQDataView explicitly states which calls take +ownership of the cursor. +

See also Database Classes. + +


Member Type Documentation

+

TQSqlCursor::Mode

+ +

This enum type describes how TQSqlCursor operates on records in the +database. +

    +
  • TQSqlCursor::ReadOnly - the cursor can only SELECT records from the +database. +
  • TQSqlCursor::Insert - the cursor can INSERT records into the database. +
  • TQSqlCursor::Update - the cursor can UPDATE records in the database. +
  • TQSqlCursor::Delete - the cursor can DELETE records from the database. +
  • TQSqlCursor::Writable - the cursor can INSERT, UPDATE and DELETE records +in the database. +
+

Member Function Documentation

+

TQSqlCursor::TQSqlCursor ( const TQString & name = TQString::null, bool autopopulate = TRUE, TQSqlDatabase * db = 0 ) +

+Constructs a cursor on database db using table or view name. +

If autopopulate is TRUE (the default), the name of the +cursor must correspond to an existing table or view name in the +database so that field information can be automatically created. +If the table or view does not exist, the cursor will not be +functional. +

The cursor is created with an initial mode of TQSqlCursor::Writable +(meaning that records can be inserted, updated or deleted using +the cursor). If the cursor does not have a unique primary index, +update and deletes cannot be performed. +

Note that autopopulate refers to populating the cursor with +meta-data, e.g. the names of the table's fields, not with +retrieving data. The select() function is used to populate the +cursor with data. +

See also setName() and setMode(). + +

TQSqlCursor::TQSqlCursor ( const TQSqlCursor & other ) +

+Constructs a copy of other. + +

TQSqlCursor::~TQSqlCursor () +

+Destroys the object and frees any allocated resources. + +

void TQSqlCursor::append ( const TQSqlFieldInfo & fieldInfo ) [virtual] +

+Append a copy of field fieldInfo to the end of the cursor. Note +that all references to the cursor edit buffer become invalidated. + +

TQVariant TQSqlCursor::calculateField ( const TQString & name ) [virtual protected] +

+Protected virtual function which is called whenever a field needs +to be calculated. If calculated fields are being used, derived +classes must reimplement this function and return the appropriate +value for field name. The default implementation returns an +invalid TQVariant. +

See also setCalculated(). + +

Examples: sql/overview/subclass3/main.cpp and sql/overview/subclass4/main.cpp. +

bool TQSqlCursor::canDelete () const +

+Returns TRUE if the cursor will perform deletes; otherwise returns +FALSE. +

See also setMode(). + +

bool TQSqlCursor::canInsert () const +

+Returns TRUE if the cursor will perform inserts; otherwise returns +FALSE. +

See also setMode(). + +

bool TQSqlCursor::canUpdate () const +

+Returns TRUE if the cursor will perform updates; otherwise returns +FALSE. +

See also setMode(). + +

void TQSqlCursor::clear () [virtual] +

+Removes all fields from the cursor. Note that all references to +the cursor edit buffer become invalidated. + +

Reimplemented from TQSqlRecord. +

int TQSqlCursor::del ( bool invalidate = TRUE ) [virtual] +

+Deletes a record from the database using the cursor's primary +index and the contents of the cursor edit buffer. Returns the +number of records which were deleted. +For error information, use lastError(). +

Only records which meet the filter criteria specified by the +cursor's primary index are deleted. If the cursor does not contain +a primary index, no delete is performed and 0 is returned. If invalidate is TRUE (the default), the current cursor can no longer +be navigated. A new select() call must be made before you can move +to a valid record. For example: +

+ +

            TQSqlCursor cur( "prices" );
+            cur.select( "id=999" );
+            if ( cur.next() ) {
+                cur.primeDelete();
+                cur.del();
+            }
+
+

In the above example, a cursor is created on the 'prices' table +and positioned to the record to be deleted. First primeDelete() is +called to populate the edit buffer with the current cursor values, +e.g. with an id of 999, and then del() is called to actually +delete the record from the database. Remember: all edit operations +(insert(), update() and delete()) operate on the contents of the +cursor edit buffer and not on the contents of the cursor itself. +

See also primeDelete(), setMode(), and lastError(). + +

Example: sql/overview/delete/main.cpp. +

int TQSqlCursor::del ( const TQString & filter, bool invalidate = TRUE ) [virtual protected] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Deletes the current cursor record from the database using the +filter filter. Only records which meet the filter criteria are +deleted. Returns the number of records which were deleted. If invalidate is TRUE (the default), the current cursor can no longer +be navigated. A new select() call must be made before you can move +to a valid record. For error information, use lastError(). +

The filter is an SQL WHERE clause, e.g. id=500. +

See also setMode() and lastError(). + +

TQSqlRecord * TQSqlCursor::editBuffer ( bool copy = FALSE ) [virtual] +

+Returns the current internal edit buffer. If copy is TRUE (the +default is FALSE), the current cursor field values are first +copied into the edit buffer. The edit buffer is valid as long as +the cursor remains valid. The cursor retains ownership of the +returned pointer, so it must not be deleted or modified. +

See also primeInsert(), primeUpdate(), and primeDelete(). + +

TQString TQSqlCursor::filter () const +

+Returns the current filter, or an empty string if there is no +current filter. + +

TQSqlIndex TQSqlCursor::index ( const TQStringList & fieldNames ) const [virtual] +

+Returns an index composed of fieldNames, all in ASCending +order. Note that all field names must exist in the cursor, +otherwise an empty index is returned. +

See also TQSqlIndex. + +

Examples: sql/overview/extract/main.cpp, sql/overview/order1/main.cpp, sql/overview/order2/main.cpp, and sql/overview/table3/main.cpp. +

TQSqlIndex TQSqlCursor::index ( const TQString & fieldName ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns an index based on fieldName. + +

TQSqlIndex TQSqlCursor::index ( const char * fieldName ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns an index based on fieldName. + +

void TQSqlCursor::insert ( int pos, const TQSqlFieldInfo & fieldInfo ) [virtual] +

+Insert a copy of fieldInfo at position pos. If a field +already exists at pos, it is removed. Note that all references +to the cursor edit buffer become invalidated. + +

Examples: sql/overview/insert/main.cpp and sql/overview/insert2/main.cpp. +

int TQSqlCursor::insert ( bool invalidate = TRUE ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts the current contents of the cursor's edit record buffer +into the database, if the cursor allows inserts. Returns the +number of rows affected by the insert. For error information, use +lastError(). +

If invalidate is TRUE (the default), the cursor will no longer +be positioned on a valid record and can no longer be navigated. A +new select() call must be made before navigating to a valid +record. +

+ +

            TQSqlCursor cur( "prices" );
+            TQSqlRecord *buffer = cur.primeInsert();
+            buffer->setValue( "id",    53981 );
+            buffer->setValue( "name",  "Thingy" );
+            buffer->setValue( "price", 105.75 );
+            cur.insert();
+
+

In the above example, a cursor is created on the 'prices' table +and a pointer to the insert buffer is atquired using primeInsert(). +Each field's value is set to the desired value and then insert() +is called to insert the data into the database. Remember: all edit +operations (insert(), update() and delete()) operate on the +contents of the cursor edit buffer and not on the contents of the +cursor itself. +

See also setMode() and lastError(). + +

bool TQSqlCursor::isCalculated ( const TQString & name ) const +

+Returns TRUE if the field name exists and is calculated; +otherwise returns FALSE. +

See also setCalculated(). + +

bool TQSqlCursor::isNull ( int i ) const +

+Returns TRUE if the field i is NULL or if there is no field at +position i; otherwise returns FALSE. +

This is the same as calling TQSqlRecord::isNull( i ) + +

bool TQSqlCursor::isNull ( const TQString & name ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if the field called name is NULL or if there is no +field called name; otherwise returns FALSE. +

This is the same as calling TQSqlRecord::isNull( name ) + +

bool TQSqlCursor::isReadOnly () const +

+Returns TRUE if the cursor is read-only; otherwise returns FALSE. +The default is FALSE. Read-only cursors cannot be edited using +insert(), update() or del(). +

See also setMode(). + +

bool TQSqlCursor::isTrimmed ( const TQString & name ) const +

+Returns TRUE if the field name exists and is trimmed; otherwise +returns FALSE. +

When a trimmed field of type string or cstring is read from the +database any trailing (right-most) spaces are removed. +

See also setTrimmed(). + +

int TQSqlCursor::mode () const +

+Returns the current cursor mode. +

See also setMode(). + +

TQString TQSqlCursor::name () const +

+Returns the name of the cursor. + +

TQSqlCursor & TQSqlCursor::operator= ( const TQSqlCursor & other ) +

+Sets the cursor equal to other. + +

TQSqlIndex TQSqlCursor::primaryIndex ( bool setFromCursor = TRUE ) const [virtual] +

+Returns the primary index associated with the cursor as defined in +the database, or an empty index if there is no primary index. If +setFromCursor is TRUE (the default), the index fields are +populated with the corresponding values in the cursor's current +record. + +

TQSqlRecord * TQSqlCursor::primeDelete () [virtual] +

+This function primes the edit buffer's field values for delete and +returns the edit buffer. The default implementation copies the +field values from the current cursor record into the edit buffer +(therefore, this function is equivalent to calling editBuffer( +TRUE ) ). The cursor retains ownership of the returned pointer, so +it must not be deleted or modified. +

See also editBuffer() and del(). + +

Example: sql/overview/delete/main.cpp. +

TQSqlRecord * TQSqlCursor::primeInsert () [virtual] +

+This function primes the edit buffer's field values for insert and +returns the edit buffer. The default implementation clears all +field values in the edit buffer. The cursor retains ownership of +the returned pointer, so it must not be deleted or modified. +

See also editBuffer() and insert(). + +

Examples: sql/overview/insert/main.cpp, sql/overview/insert2/main.cpp, sql/overview/subclass5/main.cpp, and sql/sqltable/main.cpp. +

TQSqlRecord * TQSqlCursor::primeUpdate () [virtual] +

+This function primes the edit buffer's field values for update and +returns the edit buffer. The default implementation copies the +field values from the current cursor record into the edit buffer +(therefore, this function is equivalent to calling editBuffer( +TRUE ) ). The cursor retains ownership of the returned pointer, so +it must not be deleted or modified. +

See also editBuffer() and update(). + +

Examples: sql/overview/custom1/main.cpp, sql/overview/form1/main.cpp, and sql/overview/update/main.cpp. +

void TQSqlCursor::remove ( int pos ) [virtual] +

+Removes the field at pos. If pos does not exist, nothing +happens. Note that all references to the cursor edit buffer become +invalidated. + +

Reimplemented from TQSqlRecord. +

bool TQSqlCursor::select ( const TQString & filter, const TQSqlIndex & sort = TQSqlIndex ( ) ) [virtual] +

+Selects all fields in the cursor from the database matching the +filter criteria filter. The data is returned in the order +specified by the index sort. Returns TRUE if the data was +successfully selected; otherwise returns FALSE. +

The filter is a string containing a SQL WHERE clause but +without the 'WHERE' keyword. The cursor is initially positioned at +an invalid row after this function is called. To move to a valid +row, use seek(), first(), last(), prev() or next(). +

Example: +

+    TQSqlCursor cur( "Employee" ); // Use the Employee table or view
+    cur.select( "deptno=10" ); // select all records in department 10
+    while( cur.next() ) {
+        ... // process data
+    }
+    ...
+    // select records in other departments, ordered by department number
+    cur.select( "deptno>10", cur.index( "deptno" ) );
+    ...
+    
+ +

The filter will apply to any subsequent select() calls that do not +explicitly specify another filter. Similarly the sort will apply +to any subsequent select() calls that do not explicitly specify +another sort. +

+    TQSqlCursor cur( "Employee" );
+    cur.select( "deptno=10" ); // select all records in department 10
+    while( cur.next() ) {
+        ... // process data
+    }
+    ...
+    cur.select(); // re-selects all records in department 10
+    ...
+    
+ +

+

Examples: sql/overview/delete/main.cpp, sql/overview/extract/main.cpp, sql/overview/order1/main.cpp, sql/overview/order2/main.cpp, sql/overview/retrieve2/main.cpp, sql/overview/table3/main.cpp, and sql/overview/update/main.cpp. +

bool TQSqlCursor::select () +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Selects all fields in the cursor from the database. The rows are +returned in the order specified by the last call to setSort() or +the last call to select() that specified a sort, whichever is the +most recent. If there is no current sort, the order in which the +rows are returned is undefined. The records are filtered according +to the filter specified by the last call to setFilter() or the +last call to select() that specified a filter, whichever is the +most recent. If there is no current filter, all records are +returned. The cursor is initially positioned at an invalid row. To +move to a valid row, use seek(), first(), last(), prev() or +next(). +

See also setSort() and setFilter(). + +

bool TQSqlCursor::select ( const TQSqlIndex & sort ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Selects all fields in the cursor from the database. The data is +returned in the order specified by the index sort. The records +are filtered according to the filter specified by the last call to +setFilter() or the last call to select() that specified a filter, +whichever is the most recent. The cursor is initially positioned +at an invalid row. To move to a valid row, use seek(), first(), +last(), prev() or next(). + +

bool TQSqlCursor::select ( const TQSqlIndex & filter, const TQSqlIndex & sort ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Selects all fields in the cursor matching the filter index filter. The data is returned in the order specified by the index +sort. The filter index works by constructing a WHERE clause +using the names of the fields from the filter and their values +from the current cursor record. The cursor is initially positioned +at an invalid row. To move to a valid row, use seek(), first(), +last(), prev() or next(). This function is useful, for example, +for retrieving data based upon a table's primary index: +

+    TQSqlCursor cur( "Employee" );
+    TQSqlIndex pk = cur.primaryIndex();
+    cur.setValue( "id", 10 );
+    cur.select( pk, pk ); // generates "SELECT ... FROM Employee WHERE id=10 ORDER BY id"
+    ...
+    
+ +

In this example the TQSqlIndex, pk, is used for two different +purposes. When used as the filter (first) argument, the field +names it contains are used to construct the WHERE clause, each set +to the current cursor value, WHERE id=10, in this case. When +used as the sort (second) argument the field names it contains are +used for the ORDER BY clause, ORDER BY id in this example. + +

void TQSqlCursor::setCalculated ( const TQString & name, bool calculated ) [virtual] +

+Sets field name to calculated. If the field name does not +exist, nothing happens. The value of a calculated field is set by +the calculateField() virtual function which you must reimplement +(or the field value will be an invalid TQVariant). Calculated +fields do not appear in generated SQL statements sent to the +database. +

See also calculateField() and TQSqlRecord::setGenerated(). + +

void TQSqlCursor::setFilter ( const TQString & filter ) [virtual] +

+Sets the current filter to filter. Note that no new records are +selected. To select new records, use select(). The filter will +apply to any subsequent select() calls that do not explicitly +specify a filter. +

The filter is a SQL WHERE clause without the keyword 'WHERE', +e.g. name='Dave' which will be processed by the DBMS. + +

void TQSqlCursor::setGenerated ( const TQString & name, bool generated ) [virtual] +

+Sets the generated flag for the field name to generated. If +the field does not exist, nothing happens. Only fields that have +generated set to TRUE are included in the SQL that is +generated by insert(), update() or del(). +

See also isGenerated(). + +

Reimplemented from TQSqlRecord. +

void TQSqlCursor::setGenerated ( int i, bool generated ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the generated flag for the field i to generated. +

See also isGenerated(). + +

Reimplemented from TQSqlRecord. +

void TQSqlCursor::setMode ( int mode ) [virtual] +

+Sets the cursor mode to mode. This value can be an OR'ed +combination of TQSqlCursor::Mode values. The default mode for a +cursor is TQSqlCursor::Writable. +

+    TQSqlCursor cur( "Employee" );
+    cur.setMode( TQSqlCursor::Writable ); // allow insert/update/delete
+    ...
+    cur.setMode( TQSqlCursor::Insert | TQSqlCursor::Update ); // allow inserts and updates only
+    ...
+    cur.setMode( TQSqlCursor::ReadOnly ); // no inserts/updates/deletes allowed
+
+    
+ + +

void TQSqlCursor::setName ( const TQString & name, bool autopopulate = TRUE ) [virtual] +

+Sets the name of the cursor to name. If autopopulate is TRUE +(the default), the name must correspond to a valid table or +view name in the database. Also, note that all references to the +cursor edit buffer become invalidated when fields are +auto-populated. See the TQSqlCursor constructor documentation for +more information. + +

void TQSqlCursor::setPrimaryIndex ( const TQSqlIndex & idx ) [virtual] +

+Sets the primary index associated with the cursor to the index idx. Note that this index must contain a field or set of fields +which identify a unique record within the underlying database +table or view so that update() and del() will execute as expected. +

See also update() and del(). + +

void TQSqlCursor::setSort ( const TQSqlIndex & sort ) [virtual] +

+Sets the current sort to sort. Note that no new records are +selected. To select new records, use select(). The sort will +apply to any subsequent select() calls that do not explicitly +specify a sort. + +

void TQSqlCursor::setTrimmed ( const TQString & name, bool trim ) [virtual] +

+Sets field name's trimmed status to trim. If the field name does not exist, nothing happens. +

When a trimmed field of type string or cstring is read from the +database any trailing (right-most) spaces are removed. +

See also isTrimmed() and TQVariant. + +

TQSqlIndex TQSqlCursor::sort () const +

+Returns the current sort, or an empty index if there is no current +sort. + +

TQString TQSqlCursor::toString ( TQSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const [virtual protected] +

+Returns a formatted string composed of all the fields in rec. +Each field is composed of the prefix (e.g. table or view name), +".", the field name, the fieldSep and the field value. If the +prefix is empty then each field will begin with the field name. +The fields are then joined together separated by sep. Fields +where isGenerated() returns FALSE are not included. This function +is useful for generating SQL statements. + +

TQString TQSqlCursor::toString ( const TQString & prefix, TQSqlField * field, const TQString & fieldSep ) const [virtual protected] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a formatted string composed of the prefix (e.g. table +or view name), ".", the field name, the fieldSep and the +field value. If the prefix is empty then the string will begin +with the field name. This function is useful for generating SQL +statements. + +

TQString TQSqlCursor::toString ( const TQSqlIndex & i, TQSqlRecord * rec, const TQString & prefix, const TQString & fieldSep, const TQString & sep ) const [virtual protected] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a formatted string composed of all the fields in the index +i. Each field is composed of the prefix (e.g. table or view +name), ".", the field name, the fieldSep and the field value. +If the prefix is empty then each field will begin with the field +name. The field values are taken from rec. The fields are then +joined together separated by sep. Fields where isGenerated() +returns FALSE are ignored. This function is useful for generating +SQL statements. + +

int TQSqlCursor::update ( bool invalidate = TRUE ) [virtual] +

+Updates the database with the current contents of the edit buffer. +Returns the number of records which were updated. +For error information, use lastError(). +

Only records which meet the filter criteria specified by the +cursor's primary index are updated. If the cursor does not contain +a primary index, no update is performed and 0 is returned. +

If invalidate is TRUE (the default), the current cursor can no +longer be navigated. A new select() call must be made before you +can move to a valid record. For example: +

+ +

            TQSqlCursor cur( "prices" );
+            cur.select( "id=202" );
+            if ( cur.next() ) {
+                TQSqlRecord *buffer = cur.primeUpdate();
+                double price = buffer->value( "price" ).toDouble();
+                double newprice = price * 1.05;
+                buffer->setValue( "price", newprice );
+                cur.update();
+            }
+
+

In the above example, a cursor is created on the 'prices' table +and is positioned on the record to be updated. Then a pointer to +the cursor's edit buffer is actquired using primeUpdate(). A new +value is calculated and placed into the edit buffer with the +setValue() call. Finally, an update() call is made on the cursor +which uses the tables's primary index to update the record in the +database with the contents of the cursor's edit buffer. Remember: +all edit operations (insert(), update() and delete()) operate on +the contents of the cursor edit buffer and not on the contents of +the cursor itself. +

Note that if the primary index does not uniquely distinguish +records the database may be changed into an inconsistent state. +

See also setMode() and lastError(). + +

Example: sql/overview/update/main.cpp. +

int TQSqlCursor::update ( const TQString & filter, bool invalidate = TRUE ) [virtual protected] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Updates the database with the current contents of the cursor edit +buffer using the specified filter. Returns the number of +records which were updated. +For error information, use lastError(). +

Only records which meet the filter criteria are updated, otherwise +all records in the table are updated. +

If invalidate is TRUE (the default), the cursor can no longer +be navigated. A new select() call must be made before you can move +to a valid record. +

See also primeUpdate(), setMode(), and lastError(). + + +


+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/qsqldatabase-h.html b/doc/html/qsqldatabase-h.html new file mode 100644 index 00000000..16b52e54 --- /dev/null +++ b/doc/html/qsqldatabase-h.html @@ -0,0 +1,199 @@ + + + + + +qsqldatabase.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqldatabase.h

+ +

This is the verbatim text of the qsqldatabase.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSqlDatabase class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLDATABASE_H
+#define TQSQLDATABASE_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qstring.h"
+#include "qsqlquery.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class TQSqlError;
+class TQSqlDriver;
+class TQSqlIndex;
+class TQSqlRecord;
+class TQSqlRecordInfo;
+class TQSqlDatabasePrivate;
+
+class TQM_EXPORT_SQL TQSqlDriverCreatorBase
+{
+public:
+    virtual TQSqlDriver* createObject() = 0;
+};
+
+template <class type>
+class TQM_EXPORT_SQL TQSqlDriverCreator: public TQSqlDriverCreatorBase
+{
+public:
+    TQSqlDriver* createObject() { return new type; }
+};
+
+class TQM_EXPORT_SQL TQSqlDatabase : public TQObject
+{
+    Q_OBJECT
+    Q_PROPERTY( TQString databaseName  READ databaseName WRITE setDatabaseName )
+    Q_PROPERTY( TQString userName  READ userName WRITE setUserName )
+    Q_PROPERTY( TQString password  READ password WRITE setPassword )
+    Q_PROPERTY( TQString hostName  READ hostName WRITE setHostName )
+    Q_PROPERTY( int port READ port WRITE setPort )
+    Q_PROPERTY( TQString connectOptions READ connectOptions WRITE setConnectOptions )
+
+public:
+    ~TQSqlDatabase();
+
+    bool		open();
+    bool		open( const TQString& user, const TQString& password );
+    void		close();
+    bool		isOpen() const;
+    bool		isOpenError() const;
+    TQStringList		tables() const;
+    TQStringList		tables( TQSql::TableType type ) const;
+    TQSqlIndex		primaryIndex( const TQString& tablename ) const;
+    TQSqlRecord		record( const TQString& tablename ) const;
+    TQSqlRecord		record( const TQSqlQuery& query ) const;
+    TQSqlRecordInfo	recordInfo( const TQString& tablename ) const;
+    TQSqlRecordInfo	recordInfo( const TQSqlQuery& query ) const;
+    TQSqlQuery		exec( const TQString& query = TQString::null ) const;
+    TQSqlError		lastError() const;
+
+    bool		transaction();
+    bool		commit();
+    bool		rollback();
+
+    virtual void	setDatabaseName( const TQString& name );
+    virtual void	setUserName( const TQString& name );
+    virtual void	setPassword( const TQString& password );
+    virtual void	setHostName( const TQString& host );
+    virtual void	setPort( int p );
+    void 		setConnectOptions( const TQString& options = TQString::null );
+    TQString		databaseName() const;
+    TQString		userName() const;
+    TQString		password() const;
+    TQString		hostName() const;
+    TQString		driverName() const;
+    int         	port() const;
+    TQString 		connectOptions() const;
+
+    TQSqlDriver*		driver() const;
+    
+    // MOC_SKIP_BEGIN
+    QT_STATIC_CONST char * const defaultConnection;
+    // MOC_SKIP_END
+
+    static TQSqlDatabase* addDatabase( const TQString& type, const TQString& connectionName = defaultConnection );
+    static TQSqlDatabase* addDatabase( TQSqlDriver* driver, const TQString& connectionName = defaultConnection );
+    static TQSqlDatabase* database( const TQString& connectionName = defaultConnection, bool open = TRUE );
+    static void          removeDatabase( const TQString& connectionName );
+    static void          removeDatabase( TQSqlDatabase* db );
+    static bool          contains( const TQString& connectionName = defaultConnection );
+    static TQStringList   drivers();
+    static void          registerSqlDriver( const TQString& name, const TQSqlDriverCreatorBase* creator ); // ### 4.0: creator should not be const
+    static bool 	 isDriverAvailable( const TQString& name );
+    
+protected:
+    TQSqlDatabase( const TQString& type, const TQString& name, TQObject * parent=0, const char * objname=0 );
+    TQSqlDatabase( TQSqlDriver* driver, TQObject * parent=0, const char * objname=0 );
+private:
+    void 	init( const TQString& type, const TQString& name );
+    TQSqlDatabasePrivate* d;
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQSqlDatabase( const TQSqlDatabase & );
+    TQSqlDatabase &operator=( const TQSqlDatabase & );
+#endif
+
+};
+
+#endif // QT_NO_SQL
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqldatabase-members.html b/doc/html/qsqldatabase-members.html new file mode 100644 index 00000000..3f618619 --- /dev/null +++ b/doc/html/qsqldatabase-members.html @@ -0,0 +1,124 @@ + + + + + +TQSqlDatabase Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlDatabase

+ +

This is the complete list of member functions for +TQSqlDatabase, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqldatabase.html b/doc/html/qsqldatabase.html new file mode 100644 index 00000000..5c4e0f90 --- /dev/null +++ b/doc/html/qsqldatabase.html @@ -0,0 +1,668 @@ + + + + + +TQSqlDatabase Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlDatabase Class Reference
[sql module]

+ +

The TQSqlDatabase class is used to create SQL database +connections and to provide transaction handling. +More... +

#include <qsqldatabase.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Static Public Members

+
    +
  • TQSqlDatabase * addDatabase ( const TQString & type, const TQString & connectionName = defaultConnection )
  • +
  • TQSqlDatabase * addDatabase ( TQSqlDriver * driver, const TQString & connectionName = defaultConnection )
  • +
  • TQSqlDatabase * database ( const TQString & connectionName = defaultConnection, bool open = TRUE )
  • +
  • void removeDatabase ( const TQString & connectionName )
  • +
  • void removeDatabase ( TQSqlDatabase * db )
  • +
  • bool contains ( const TQString & connectionName = defaultConnection )
  • +
  • TQStringList drivers ()
  • +
  • void registerSqlDriver ( const TQString & name, const TQSqlDriverCreatorBase * creator )
  • +
  • bool isDriverAvailable ( const TQString & name )
  • +
+

Properties

+
    +
  • TQString connectOptions - the database connect options
  • +
  • TQString databaseName - the name of the database
  • +
  • TQString hostName - the host name where the database resides
  • +
  • TQString password - the password used to connect to the database
  • +
  • int port - the port used to connect to the database
  • +
  • TQString userName - the user name connected to the database
  • +
+

Protected Members

+
    +
  • TQSqlDatabase ( const TQString & type, const TQString & name, TQObject * parent = 0, const char * objname = 0 )
  • +
  • TQSqlDatabase ( TQSqlDriver * driver, TQObject * parent = 0, const char * objname = 0 )
  • +
+

Detailed Description

+ + +The TQSqlDatabase class is used to create SQL database +connections and to provide transaction handling. +

+ + +

Note that transaction handling is not supported by every SQL +database. You can find out whether transactions are supported +using TQSqlDriver::hasFeature(). +

The TQSqlDatabase class provides an abstract interface for +accessing many types of database backends. Database-specific +drivers are used internally to actually access and manipulate +data, (see TQSqlDriver). Result set objects provide the interface +for executing and manipulating SQL queries (see TQSqlQuery). +

See also Database Classes. + +


Member Function Documentation

+

TQSqlDatabase::TQSqlDatabase ( const TQString & type, const TQString & name, TQObject * parent = 0, const char * objname = 0 ) [protected] +

+Creates a TQSqlDatabase connection called name that uses the +driver referred to by type, with the parent parent and the +object name objname. If the type is not recognized, the +database connection will have no functionality. +

The currently available drivers are: +

+
Driver Type Description +
TQODBC3 ODBC Driver (includes Microsoft SQL Server) +
TQOCI8 Oracle Call Interface Driver +
TQPSQL7 PostgreSQL v6.x and v7.x Driver +
TQTDS7 Sybase Adaptive Server +
TQMYSQL3 MySQL Driver +
TQDB2 IBM DB2, v7.1 and higher +
TQSQLITE SQLite Driver +
TQIBASE Borland Interbase Driver +
+

Additional third party drivers, including your own custom drivers, +can be loaded dynamically. +

See also registerSqlDriver(). + +

TQSqlDatabase::TQSqlDatabase ( TQSqlDriver * driver, TQObject * parent = 0, const char * objname = 0 ) [protected] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Creates a database connection using the driver driver, with +the parent parent and the object name objname. +

Warning: The framework takes ownership of the driver pointer, +so it should not be deleted. + +

TQSqlDatabase::~TQSqlDatabase () +

+Destroys the object and frees any allocated resources. + +

TQSqlDatabase * TQSqlDatabase::addDatabase ( const TQString & type, const TQString & connectionName = defaultConnection ) [static] +

+Adds a database to the list of database connections using the +driver type and the connection name connectionName. +

The database connection is referred to by connectionName. The +newly added database connection is returned. This pointer is owned +by TQSqlDatabase and will be deleted on program exit or when +removeDatabase() is called. +

If connectionName is not specified, the newly added database +connection becomes the default database connection for the +application, and subsequent calls to database() (without a +database name parameter) will return a pointer to it. If connectionName is given, use database(connectionName) to retrieve a pointer to the +database connection. +

Warning: If you add a database with the same name as an +existing database, the new database will replace the old one. +This will happen automatically if you call this function more +than once without specifying connectionName. +

See also database() and removeDatabase(). + +

Examples: sql/overview/connect1/main.cpp, sql/overview/connection.cpp, and sql/sqltable/main.cpp. +

TQSqlDatabase * TQSqlDatabase::addDatabase ( TQSqlDriver * driver, const TQString & connectionName = defaultConnection ) [static] +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function is useful if you need to set up the database +connection and instantiate the driver yourself. If you do this, it +is recommended that you include the driver code in your own +application. For example, setting up a custom PostgreSQL +connection and instantiating the TQPSQL7 driver can be done the +following way: +

+    #include "qtdir/src/sql/drivers/psql/qsql_psql.cpp"
+    
+ +(We assume that qtdir is the directory where TQt is installed.) +This will pull in the code that is needed to use the PostgreSQL +client library and to instantiate a TQPSQLDriver object, assuming +that you have the PostgreSQL headers somewhere in your include +search path. +

+    PGconn* con = PQconnectdb( "host=server user=bart password=simpson dbname=springfield" );
+    TQPSQLDriver* drv =  new TQPSQLDriver( con );
+    TQSqlDatabase* db = TQSqlDatabase::addDatabase( drv ); // becomes the new default connection
+    TQSqlQuery q;
+    q.exec( "SELECT * FROM people" );
+    ...
+    
+ +

The above code sets up a PostgreSQL connection and instantiates a +TQPSQLDriver object. Next, addDatabase() is called to add the +connection to the known connections so that it can be used by the +TQt SQL classes. When a driver is instantiated with a connection +handle (or set of handles), TQt assumes that you have already +opened the database connection. +

Remember that you must link your application against the database +client library as well. The simplest way to do this is to add +lines like those below to your .pro file: +

+    unix:LIBS += -lpq
+    win32:LIBS += libpqdll.lib
+    
+ +

You will need to have the client library in your linker's search +path. +

The method described above will work for all the drivers, the only +difference is the arguments the driver constructors take. Below is +an overview of the drivers and their constructor arguments. +

+ + + + + + + + +
Driver Class name Constructor arguments File to include +
TQPSQL7 +TQPSQLDriver +PGconn* connection +qsql_psql.cpp +
TQMYSQL3 +TQMYSQLDriver +MYSQL* connection +qsql_mysql.cpp +
TQOCI8 +TQOCIDriver +OCIEnv* environment, OCIError* error, OCISvcCtx* serviceContext +qsql_oci.cpp +
TQODBC3 +TQODBCDriver +SQLHANDLE environment, SQLHANDLE connection +qsql_odbc.cpp +
TQDB2 +TQDB2 +SQLHANDLE environment, SQLHANDLE connection +qsql_db2.cpp +
TQTDS7 +TQTDSDriver +LOGINREC* loginRecord, DBPROCESS* dbProcess, const TQString& hostName +qsql_tds.cpp +
TQSQLITE +TQSQLiteDriver +sqlite* connection +qsql_sqlite.cpp +
TQIBASE +TQIBaseDriver +isc_db_handle connection +qsql_ibase.cpp +
+

Note: The host name (or service name) is needed when constructing +the TQTDSDriver for creating new connections for internal +queries. This is to prevent the simultaneous usage of several +TQSqlQuery/TQSqlCursor objects from blocking each other. +

Warning: The SQL framework takes ownership of the driver pointer, +and it should not be deleted. The returned TQSqlDatabase object is +owned by the framework and must not be deleted. If you want to +explicitly remove the connection, use removeDatabase() +

See also drivers(). + +

void TQSqlDatabase::close () +

+Closes the database connection, freeing any resources actquired. +

See also removeDatabase(). + +

bool TQSqlDatabase::commit () +

+Commits a transaction to the database if the driver supports +transactions. Returns TRUE if the operation succeeded; otherwise +returns FALSE. +

See also TQSqlDriver::hasFeature() and rollback(). + +

TQString TQSqlDatabase::connectOptions () const +

Returns the database connect options. +See the "connectOptions" property for details. +

bool TQSqlDatabase::contains ( const TQString & connectionName = defaultConnection ) [static] +

+Returns TRUE if the list of database connections contains connectionName; otherwise returns FALSE. + +

TQSqlDatabase * TQSqlDatabase::database ( const TQString & connectionName = defaultConnection, bool open = TRUE ) [static] +

+Returns the database connection called connectionName. The +database connection must have been previously added with +addDatabase(). If open is TRUE (the default) and the database +connection is not already open it is opened now. If no connectionName is specified the default connection is used. If connectionName does not exist in the list of databases, 0 is +returned. The pointer returned is owned by TQSqlDatabase and should +not be deleted. +

Warning: There are restrictions on the use of database connections +in threaded applications. Please see the Thread Support in TQt document for more information about +threading and SQL databases. + +

Examples: sql/overview/basicbrowsing/main.cpp and sql/overview/create_connections/main.cpp. +

TQString TQSqlDatabase::databaseName () const +

Returns the name of the database. +See the "databaseName" property for details. +

TQSqlDriver * TQSqlDatabase::driver () const +

+Returns the database driver used to access the database +connection. + +

TQString TQSqlDatabase::driverName () const +

+Returns the name of the driver used by the database connection. + +

TQStringList TQSqlDatabase::drivers () [static] +

+Returns a list of all the available database drivers. +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+    TQStringList list = TQSqlDatabase::drivers();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ + +

TQSqlQuery TQSqlDatabase::exec ( const TQString & query = TQString::null ) const +

+Executes a SQL statement (e.g. an INSERT, UPDATE or DELETE statement) on the database, and returns a TQSqlQuery object. +Use lastError() to retrieve error information. If query is +TQString::null, an empty, invalid query is returned and lastError() +is not affected. +

See also TQSqlQuery and lastError(). + +

TQString TQSqlDatabase::hostName () const +

Returns the host name where the database resides. +See the "hostName" property for details. +

bool TQSqlDatabase::isDriverAvailable ( const TQString & name ) [static] +

+Returns TRUE if a driver called name is available; otherwise +returns FALSE. +

See also drivers(). + +

bool TQSqlDatabase::isOpen () const +

+Returns TRUE if the database connection is currently open; +otherwise returns FALSE. + +

bool TQSqlDatabase::isOpenError () const +

+Returns TRUE if there was an error opening the database +connection; otherwise returns FALSE. Error information can be +retrieved using the lastError() function. + +

TQSqlError TQSqlDatabase::lastError () const +

+Returns information about the last error that occurred on the +database. See TQSqlError for more information. + +

Examples: sql/overview/connection.cpp and sql/sqltable/main.cpp. +

bool TQSqlDatabase::open () +

+Opens the database connection using the current connection values. +Returns TRUE on success; otherwise returns FALSE. Error +information can be retrieved using the lastError() function. +

See also lastError(). + +

Examples: sql/overview/connect1/main.cpp, sql/overview/connection.cpp, and sql/sqltable/main.cpp. +

bool TQSqlDatabase::open ( const TQString & user, const TQString & password ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Opens the database connection using the given user name and password. Returns TRUE on success; otherwise returns FALSE. Error +information can be retrieved using the lastError() function. +

This function does not store the password it is given. Instead, +the password is passed directly to the driver for opening a +connection and is then discarded. +

See also lastError(). + +

TQString TQSqlDatabase::password () const +

Returns the password used to connect to the database. +See the "password" property for details. +

int TQSqlDatabase::port () const +

Returns the port used to connect to the database. +See the "port" property for details. +

TQSqlIndex TQSqlDatabase::primaryIndex ( const TQString & tablename ) const +

+Returns the primary index for table tablename. If no primary +index exists an empty TQSqlIndex will be returned. + +

TQSqlRecord TQSqlDatabase::record ( const TQString & tablename ) const +

+Returns a TQSqlRecord populated with the names of all the fields in +the table (or view) called tablename. The order in which the +fields appear in the record is undefined. If no such table (or +view) exists, an empty record is returned. +

See also recordInfo(). + +

TQSqlRecord TQSqlDatabase::record ( const TQSqlQuery & query ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a TQSqlRecord populated with the names of all the fields +used in the SQL query. If the query is a "SELECT *" the order +in which fields appear in the record is undefined. +

See also recordInfo(). + +

TQSqlRecordInfo TQSqlDatabase::recordInfo ( const TQString & tablename ) const +

+Returns a TQSqlRecordInfo populated with meta data about the table +or view tablename. If no such table (or view) exists, an empty +record is returned. +

See also TQSqlRecordInfo, TQSqlFieldInfo, and record(). + +

TQSqlRecordInfo TQSqlDatabase::recordInfo ( const TQSqlQuery & query ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a TQSqlRecordInfo object with meta data for the TQSqlQuery +query. Note that this overloaded function may return less +information than the recordInfo() function which takes the name of +a table as parameter. +

See also TQSqlRecordInfo, TQSqlFieldInfo, and record(). + +

void TQSqlDatabase::registerSqlDriver ( const TQString & name, const TQSqlDriverCreatorBase * creator ) [static] +

+This function registers a new SQL driver called name, within +the SQL framework. This is useful if you have a custom SQL driver +and don't want to compile it as a plugin. +

Example usage: +

+    TQSqlDatabase::registerSqlDriver( "MYDRIVER", new TQSqlDriverCreator<MyDatabaseDriver> );
+    TQSqlDatabase* db = TQSqlDatabase::addDatabase( "MYDRIVER" );
+    ...
+    
+ +

Warning: The framework takes ownership of the creator pointer, +so it should not be deleted. + +

void TQSqlDatabase::removeDatabase ( const TQString & connectionName ) [static] +

+Removes the database connection connectionName from the list of +database connections. +

Warning: There should be no open queries on the database +connection when this function is called, otherwise a resource leak +will occur. + +

void TQSqlDatabase::removeDatabase ( TQSqlDatabase * db ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Removes the database connection db from the list of database +connections. The TQSqlDatabase object is destroyed when it is removed +from the list. +

Warning: The db pointer is not valid after this function has +been called. There should be no open queries on the database +connection when this function is called, otherwise a resource leak +will occur. + +

bool TQSqlDatabase::rollback () +

+Rolls a transaction back on the database if the driver supports +transactions. Returns TRUE if the operation succeeded; otherwise +returns FALSE. +

See also TQSqlDriver::hasFeature(), commit(), and transaction(). + +

void TQSqlDatabase::setConnectOptions ( const TQString & options = TQString::null ) +

Sets the database connect options to options. +See the "connectOptions" property for details. +

void TQSqlDatabase::setDatabaseName ( const TQString & name ) [virtual] +

Sets the name of the database to name. +See the "databaseName" property for details. +

void TQSqlDatabase::setHostName ( const TQString & host ) [virtual] +

Sets the host name where the database resides to host. +See the "hostName" property for details. +

void TQSqlDatabase::setPassword ( const TQString & password ) [virtual] +

Sets the password used to connect to the database to password. +See the "password" property for details. +

void TQSqlDatabase::setPort ( int p ) [virtual] +

Sets the port used to connect to the database to p. +See the "port" property for details. +

void TQSqlDatabase::setUserName ( const TQString & name ) [virtual] +

Sets the user name connected to the database to name. +See the "userName" property for details. +

TQStringList TQSqlDatabase::tables ( TQSql::TableType type ) const +

+Returns a list of the database's tables, system tables and views, +as specified by the parameter type. +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+    TQStringList list = myDatabase.tables( TQSql::Tables | TQSql::Views );
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ + +

Example: sql/sqltable/main.cpp. +

TQStringList TQSqlDatabase::tables () const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a list of the database's tables that are visible to the +user. To include views or system tables, use the version of this +function that takes a table type parameter. +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+    TQStringList list = myDatabase.tables();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ + +

bool TQSqlDatabase::transaction () +

+Begins a transaction on the database if the driver supports +transactions. Returns TRUE if the operation succeeded; otherwise +returns FALSE. +

See also TQSqlDriver::hasFeature(), commit(), and rollback(). + +

TQString TQSqlDatabase::userName () const +

Returns the user name connected to the database. +See the "userName" property for details. +


Property Documentation

+

TQString connectOptions

+

This property holds the database connect options. +

The format of the options string is a semi-colon separated list of +option names or option = value pairs. The options depend on the +database client used: +

+ +

+

ODBC MySQL PostgreSQL +
+
    +
  • SQL_ATTR_ACCESS_MODE +
  • SQL_ATTR_LOGIN_TIMEOUT +
  • SQL_ATTR_CONNECTION_TIMEOUT +
  • SQL_ATTR_CURRENT_CATALOG +
  • SQL_ATTR_METADATA_ID +
  • SQL_ATTR_PACKET_SIZE +
  • SQL_ATTR_TRACEFILE +
  • SQL_ATTR_TRACE +
+

+
    +
  • CLIENT_COMPRESS +
  • CLIENT_FOUND_ROWS +
  • CLIENT_IGNORE_SPACE +
  • CLIENT_SSL +
  • CLIENT_ODBC +
  • CLIENT_NO_SCHEMA +
  • CLIENT_INTERACTIVE +
+

+
    +
  • connect_timeout +
  • options +
  • tty +
  • retquiressl +
  • service +
+
DB2 OCI TDS +
+
    +
  • SQL_ATTR_ACCESS_MODE +
  • SQL_ATTR_LOGIN_TIMEOUT +
+

+none +

+none +

+

Example of usage: +

+    ...
+    // MySQL connection
+    db->setConnectOptions( "CLIENT_SSL;CLIENT_IGNORE_SPACE" ); // use an SSL connection to the server
+    if ( !db->open() ) {
+        db->setConnectOptions(); // clears the connect option string
+        ...
+    }
+    ...
+    // PostgreSQL connection
+    db->setConnectOptions( "retquiressl=1" ); // enable PostgreSQL SSL connections
+    if ( !db->open() ) {
+        db->setConnectOptions(); // clear options
+        ...
+    }
+    ...
+    // ODBC connection
+    db->setConnectOptions( "SQL_ATTR_ACCESS_MODE=SQL_MODE_READ_ONLY;SQL_ATTR_TRACE=SQL_OPT_TRACE_ON" ); // set ODBC options
+    if ( !db->open() ) {
+        db->setConnectOptions(); // don't try to set this option
+        ...
+    }
+    
+ +

Please refer to the client library documentation for more +information about the different options. The options will be set +prior to opening the database connection. Setting new options +without re-opening the connection does nothing. +

See also +

Set this property's value with setConnectOptions() and get this property's value with connectOptions(). +

TQString databaseName

+

This property holds the name of the database. +

Note that the database name is the TNS Service Name for the TQOCI8 +(Oracle) driver. +

For the TQODBC3 driver it can either be a DSN, a DSN filename (the +file must have a .dsn extension), or a connection string. MS +Access users can for example use the following connection string +to open a .mdb file directly, instead of having to create a DSN +entry in the ODBC manager: +

+    ...
+    db = TQSqlDatabase::addDatabase( "TQODBC3" );
+    db->setDatabaseName( "DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DBQ=myaccessfile.mdb" );
+    if ( db->open() ) {
+        // success!
+    }
+    ...
+    
+ +("FIL" is the retquired spelling in Microsoft's API.) +

There is no default value. + +

Set this property's value with setDatabaseName() and get this property's value with databaseName(). +

TQString hostName

+

This property holds the host name where the database resides. +

There is no default value. + +

Set this property's value with setHostName() and get this property's value with hostName(). +

TQString password

+

This property holds the password used to connect to the database. +

There is no default value. +

Warning: This function stores the password in plain text within +TQt. Use the open() call that takes a password as parameter to +avoid this behaviour. +

See also open(). + +

Set this property's value with setPassword() and get this property's value with password(). +

int port

+

This property holds the port used to connect to the database. +

There is no default value. + +

Set this property's value with setPort() and get this property's value with port(). +

TQString userName

+

This property holds the user name connected to the database. +

There is no default value. + +

Set this property's value with setUserName() and get this property's value with userName(). + +


+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/qsqldriver-h.html b/doc/html/qsqldriver-h.html new file mode 100644 index 00000000..62025ca6 --- /dev/null +++ b/doc/html/qsqldriver-h.html @@ -0,0 +1,169 @@ + + + + + +qsqldriver.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqldriver.h

+ +

This is the verbatim text of the qsqldriver.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSqlDriver class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLDRIVER_H
+#define TQSQLDRIVER_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qptrdict.h"
+#include "qstring.h"
+#include "qsqlerror.h"
+#include "qsqlquery.h"
+#include "qsqlfield.h"
+#include "qsqlindex.h"
+#include "qstringlist.h"
+#include "qmap.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class TQSqlDriverExtension;
+
+class TQSqlDatabase;
+
+class TQM_EXPORT_SQL TQSqlDriver : public TQObject
+{
+    friend class TQSqlDatabase;
+    Q_OBJECT
+public:
+    enum DriverFeature { Transactions, QuerySize, BLOB, Unicode, PreparedQueries,
+			 NamedPlaceholders, PositionalPlaceholders };
+
+    TQSqlDriver( TQObject * parent=0, const char * name=0 );
+    ~TQSqlDriver();
+    bool			isOpen() const;
+    bool			isOpenError() const;
+
+    virtual bool		beginTransaction();
+    virtual bool		commitTransaction();
+    virtual bool		rollbackTransaction();
+    virtual TQStringList		tables( const TQString& tableType ) const;
+    virtual TQSqlIndex		primaryIndex( const TQString& tableName ) const;
+    virtual TQSqlRecord		record( const TQString& tableName ) const;
+    virtual TQSqlRecord		record( const TQSqlQuery& query ) const;
+    virtual TQSqlRecordInfo	recordInfo( const TQString& tablename ) const;
+    virtual TQSqlRecordInfo	recordInfo( const TQSqlQuery& query ) const;
+    virtual TQString		nullText() const;
+    virtual TQString		formatValue( const TQSqlField* field, bool trimStrings = FALSE ) const;
+    TQSqlError			lastError() const;
+
+    virtual bool		hasFeature( DriverFeature f ) const = 0;
+    virtual bool		open( const TQString & db,
+				      const TQString & user = TQString::null,
+				      const TQString & password = TQString::null,
+				      const TQString & host = TQString::null,
+				      int port = -1 ) = 0;
+    virtual void		close() = 0;
+    virtual TQSqlQuery		createQuery() const = 0;
+
+    // ### remove for 4.0
+    bool			open( const TQString& db,
+				      const TQString& user,
+				      const TQString& password,
+				      const TQString& host,
+				      int port,
+				      const TQString& connOpts );
+protected:
+    virtual void		setOpen( bool o );
+    virtual void		setOpenError( bool e );
+    virtual void		setLastError( const TQSqlError& e );
+private:
+    // ### This class needs a d-pointer in 4.0.
+    int		          dbState;
+    TQSqlError	          error;
+#if defined(Q_DISABLE_COPY)
+    TQSqlDriver( const TQSqlDriver & );
+    TQSqlDriver &operator=( const TQSqlDriver & );
+#endif
+};
+
+#endif	// QT_NO_SQL
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqldriver-members.html b/doc/html/qsqldriver-members.html new file mode 100644 index 00000000..dcadbf75 --- /dev/null +++ b/doc/html/qsqldriver-members.html @@ -0,0 +1,109 @@ + + + + + +TQSqlDriver Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlDriver

+ +

This is the complete list of member functions for +TQSqlDriver, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqldriver.html b/doc/html/qsqldriver.html new file mode 100644 index 00000000..b1fd5306 --- /dev/null +++ b/doc/html/qsqldriver.html @@ -0,0 +1,295 @@ + + + + + +TQSqlDriver Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlDriver Class Reference
[sql module]

+ +

The TQSqlDriver class is an abstract base class for accessing +SQL databases. +More... +

#include <qsqldriver.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • enum DriverFeature { Transactions, QuerySize, BLOB, Unicode, PreparedQueries, NamedPlaceholders, PositionalPlaceholders }
  • +
  • TQSqlDriver ( TQObject * parent = 0, const char * name = 0 )
  • +
  • ~TQSqlDriver ()
  • +
  • bool isOpen () const
  • +
  • bool isOpenError () const
  • +
  • virtual bool beginTransaction ()
  • +
  • virtual bool commitTransaction ()
  • +
  • virtual bool rollbackTransaction ()
  • +
  • virtual TQStringList tables ( const TQString & tableType ) const
  • +
  • virtual TQSqlIndex primaryIndex ( const TQString & tableName ) const
  • +
  • virtual TQSqlRecord record ( const TQString & tableName ) const
  • +
  • virtual TQSqlRecord record ( const TQSqlQuery & query ) const
  • +
  • virtual TQSqlRecordInfo recordInfo ( const TQString & tablename ) const
  • +
  • virtual TQSqlRecordInfo recordInfo ( const TQSqlQuery & query ) const
  • +
  • virtual TQString nullText () const
  • +
  • virtual TQString formatValue ( const TQSqlField * field, bool trimStrings = FALSE ) const
  • +
  • TQSqlError lastError () const
  • +
  • virtual bool hasFeature ( DriverFeature f ) const = 0
  • +
  • virtual bool open ( const TQString & db, const TQString & user = TQString::null, const TQString & password = TQString::null, const TQString & host = TQString::null, int port = -1 ) = 0
  • +
  • virtual void close () = 0
  • +
  • virtual TQSqlQuery createQuery () const = 0
  • +
  • bool open ( const TQString & db, const TQString & user, const TQString & password, const TQString & host, int port, const TQString & connOpts )
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQSqlDriver class is an abstract base class for accessing +SQL databases. +

+ +

This class should not be used directly. Use TQSqlDatabase instead. +

See also Database Classes. + +


Member Type Documentation

+

TQSqlDriver::DriverFeature

+ +

This enum contains a list of features a driver may support. Use +hasFeature() to query whether a feature is supported or not. +

    +
  • TQSqlDriver::Transactions - whether the driver supports SQL transactions +
  • TQSqlDriver::QuerySize - whether the database is capable of reporting the size +of a query. Note that some databases do not support returning the size +(i.e. number of rows returned) of a query, in which case +TQSqlQuery::size() will return -1 +
  • TQSqlDriver::BLOB - whether the driver supports Binary Large Object fields +
  • TQSqlDriver::Unicode - whether the driver supports Unicode strings if the +database server does +
  • TQSqlDriver::PreparedQueries - whether the driver supports prepared query execution +
  • TQSqlDriver::NamedPlaceholders - whether the driver supports usage of named placeholders +
  • TQSqlDriver::PositionalPlaceholders - whether the driver supports usage of positional placeholders +

More information about supported features can be found in the +TQt SQL driver documentation. +

See also hasFeature(). + +


Member Function Documentation

+

TQSqlDriver::TQSqlDriver ( TQObject * parent = 0, const char * name = 0 ) +

+Default constructor. Creates a new driver with parent parent, +called name. +

+

TQSqlDriver::~TQSqlDriver () +

+Destroys the object and frees any allocated resources. + +

bool TQSqlDriver::beginTransaction () [virtual] +

+Protected function which derived classes can reimplement to begin +a transaction. If successful, return TRUE, otherwise return FALSE. +The default implementation returns FALSE. +

See also commitTransaction() and rollbackTransaction(). + +

void TQSqlDriver::close () [pure virtual] +

+ +

Derived classes must reimplement this abstract virtual function in +order to close the database connection. Return TRUE on success, +FALSE on failure. +

See also setOpen(). + +

+

bool TQSqlDriver::commitTransaction () [virtual] +

+Protected function which derived classes can reimplement to commit +a transaction. If successful, return TRUE, otherwise return FALSE. +The default implementation returns FALSE. +

See also beginTransaction() and rollbackTransaction(). + +

TQSqlQuery TQSqlDriver::createQuery () const [pure virtual] +

+ +

Creates an empty SQL result on the database. Derived classes must +reimplement this function and return a TQSqlQuery object +appropriate for their database to the caller. +

+

TQString TQSqlDriver::formatValue ( const TQSqlField * field, bool trimStrings = FALSE ) const [virtual] +

+Returns a string representation of the field value for the +database. This is used, for example, when constructing INSERT and +UPDATE statements. +

The default implementation returns the value formatted as a string +according to the following rules: +

    +

  • If field is NULL, nullText() is returned. +

  • If field is character data, the value is returned enclosed +in single quotation marks, which is appropriate for many SQL +databases. Any embedded single-quote characters are escaped +(replaced with two single-quote characters). If trimStrings is +TRUE (the default is FALSE), all trailing whitespace is trimmed +from the field. +

  • If field is date/time data, the value is formatted in ISO +format and enclosed in single quotation marks. If the date/time +data is invalid, nullText() is returned. +

  • If field is bytearray data, and the driver can edit binary +fields, the value is formatted as a hexadecimal string. +

  • For any other field type toString() will be called on its value +and the result returned. +

+

See also TQVariant::toString(). + +

+

bool TQSqlDriver::hasFeature ( DriverFeature f ) const [pure virtual] +

+ +

Returns TRUE if the driver supports feature f; otherwise +returns FALSE. +

Note that some databases need to be open() before this can be +determined. +

See also DriverFeature. + +

bool TQSqlDriver::isOpen () const +

+Returns TRUE if the database connection is open; otherwise returns +FALSE. + +

bool TQSqlDriver::isOpenError () const +

+Returns TRUE if the there was an error opening the database +connection; otherwise returns FALSE. + +

TQSqlError TQSqlDriver::lastError () const +

+Returns a TQSqlError object which contains information about the +last error that occurred on the database. + +

TQString TQSqlDriver::nullText () const [virtual] +

+Returns a string representation of the NULL value for the +database. This is used, for example, when constructing INSERT and +UPDATE statements. The default implementation returns the string +"NULL". + +

bool TQSqlDriver::open ( const TQString & db, const TQString & user = TQString::null, const TQString & password = TQString::null, const TQString & host = TQString::null, int port = -1 ) [pure virtual] +

+ +

Derived classes must reimplement this abstract virtual function in +order to open a database connection on database db, using user +name user, password password, host host and port port. +

The function must return TRUE on success and FALSE on failure. +

See also setOpen(). + +

+

bool TQSqlDriver::open ( const TQString & db, const TQString & user, const TQString & password, const TQString & host, int port, const TQString & connOpts ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Open a database connection on database db, using user name user, password password, host host, port port and +connection options connOpts. +

Returns TRUE on success and FALSE on failure. +

See also setOpen(). + +

TQSqlIndex TQSqlDriver::primaryIndex ( const TQString & tableName ) const [virtual] +

+Returns the primary index for table tableName. Returns an empty +TQSqlIndex if the table doesn't have a primary index. The default +implementation returns an empty index. + +

TQSqlRecord TQSqlDriver::record ( const TQString & tableName ) const [virtual] +

+Returns a TQSqlRecord populated with the names of the fields in +table tableName. If no such table exists, an empty record is +returned. The default implementation returns an empty record. + +

TQSqlRecord TQSqlDriver::record ( const TQSqlQuery & query ) const [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a TQSqlRecord populated with the names of the fields in the +SQL query. The default implementation returns an empty record. + +

TQSqlRecordInfo TQSqlDriver::recordInfo ( const TQString & tablename ) const [virtual] +

+Returns a TQSqlRecordInfo object with meta data about the table tablename. + +

TQSqlRecordInfo TQSqlDriver::recordInfo ( const TQSqlQuery & query ) const [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a TQSqlRecordInfo object with meta data for the TQSqlQuery +query. Note that this overloaded function may return less +information than the recordInfo() function which takes the name of +a table as parameter. + +

bool TQSqlDriver::rollbackTransaction () [virtual] +

+Protected function which derived classes can reimplement to +rollback a transaction. If successful, return TRUE, otherwise +return FALSE. The default implementation returns FALSE. +

See also beginTransaction() and commitTransaction(). + +

void TQSqlDriver::setLastError ( const TQSqlError & e ) [virtual protected] +

+Protected function which allows derived classes to set the value +of the last error, e, that occurred on the database. +

See also lastError(). + +

void TQSqlDriver::setOpen ( bool o ) [virtual protected] +

+Protected function which sets the open state of the database to o. Derived classes can use this function to report the status of +open(). +

See also open() and setOpenError(). + +

void TQSqlDriver::setOpenError ( bool e ) [virtual protected] +

+Protected function which sets the open error state of the database +to e. Derived classes can use this function to report the +status of open(). Note that if e is TRUE the open state of the +database is set to closed (i.e. isOpen() returns FALSE). +

See also open(). + +

TQStringList TQSqlDriver::tables ( const TQString & tableType ) const [virtual] +

+Returns a list of tables in the database. The default +implementation returns an empty list. +

The tableType argument describes what types of tables +should be returned. Due to binary compatibility, the string +contains the value of the enum TQSql::TableTypes as text. +An empty string should be treated as TQSql::Tables for +downward compatibility. +

See also TQSql::TableType. + + +


+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/qsqldriverplugin-h.html b/doc/html/qsqldriverplugin-h.html new file mode 100644 index 00000000..bdd3f00f --- /dev/null +++ b/doc/html/qsqldriverplugin-h.html @@ -0,0 +1,117 @@ + + + + + +qsqldriverplugin.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqldriverplugin.h

+ +

This is the verbatim text of the qsqldriverplugin.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsqldriverplugin.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQSqlDriverPlugin class
+**
+** Created : 2001-09-20
+**
+** Copyright (C) 2001-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLDRIVERPLUGIN_H
+#define TQSQLDRIVERPLUGIN_H
+
+#ifndef QT_H
+#include "qgplugin.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_SQL
+#ifndef QT_NO_COMPONENT
+
+class TQSqlDriver;
+class TQSqlDriverPluginPrivate;
+
+class Q_EXPORT TQSqlDriverPlugin : public TQGPlugin
+{
+    Q_OBJECT
+public:
+    TQSqlDriverPlugin();
+    ~TQSqlDriverPlugin();
+
+    virtual TQStringList keys() const = 0;
+    virtual TQSqlDriver *create( const TQString &key ) = 0;
+
+private:
+    TQSqlDriverPluginPrivate *d;
+};
+
+#endif // QT_NO_COMPONENT
+#endif // QT_NO_SQL
+
+#endif // TQSQLDRIVERPLUGIN_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqldriverplugin-members.html b/doc/html/qsqldriverplugin-members.html new file mode 100644 index 00000000..7316fa6c --- /dev/null +++ b/doc/html/qsqldriverplugin-members.html @@ -0,0 +1,50 @@ + + + + + +TQSqlDriverPlugin Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlDriverPlugin

+ +

This is the complete list of member functions for +TQSqlDriverPlugin, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqldriverplugin.html b/doc/html/qsqldriverplugin.html new file mode 100644 index 00000000..06fcbec7 --- /dev/null +++ b/doc/html/qsqldriverplugin.html @@ -0,0 +1,100 @@ + + + + + +TQSqlDriverPlugin Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlDriverPlugin Class Reference

+ +

The TQSqlDriverPlugin class provides an abstract base for custom TQSqlDriver plugins. +More... +

#include <qsqldriverplugin.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQSqlDriverPlugin class provides an abstract base for custom TQSqlDriver plugins. +

+ +

The SQL driver plugin is a simple plugin interface that makes it +easy to create your own SQL driver plugins that can be loaded +dynamically by TQt. +

Writing a SQL plugin is achieved by subclassing this base class, +reimplementing the pure virtual functions keys() and create(), and +exporting the class with the Q_EXPORT_PLUGIN macro. See the SQL +plugins that come with TQt for example implementations (in the +plugins/src/sqldrivers subdirectory of the source +distribution). Read the plugins + documentation for more information on plugins. +

See also Plugins. + +


Member Function Documentation

+

TQSqlDriverPlugin::TQSqlDriverPlugin () +

+Constructs a SQL driver plugin. This is invoked automatically by +the Q_EXPORT_PLUGIN macro. + +

TQSqlDriverPlugin::~TQSqlDriverPlugin () +

+Destroys the SQL driver plugin. +

You never have to call this explicitly. TQt destroys a plugin +automatically when it is no longer used. + +

TQSqlDriver * TQSqlDriverPlugin::create ( const TQString & key ) [pure virtual] +

+ +

Creates and returns a TQSqlDriver object for the driver key key. +The driver key is usually the class name of the retquired driver. +

See also keys(). + +

TQStringList TQSqlDriverPlugin::keys () const [pure virtual] +

+ +

Returns the list of drivers (keys) this plugin supports. +

These keys are usually the class names of the custom drivers that +are implemented in the plugin. +

See also create(). + + +


+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/qsqleditorfactory-h.html b/doc/html/qsqleditorfactory-h.html new file mode 100644 index 00000000..d659e693 --- /dev/null +++ b/doc/html/qsqleditorfactory-h.html @@ -0,0 +1,121 @@ + + + + + +qsqleditorfactory.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqleditorfactory.h

+ +

This is the verbatim text of the qsqleditorfactory.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSqlEditorFactory class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLEDITORFACTORY_H
+#define TQSQLEDITORFACTORY_H
+
+#ifndef QT_H
+#include "qeditorfactory.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL_EDIT_WIDGETS
+
+class TQSqlField;
+
+class TQM_EXPORT_SQL TQSqlEditorFactory : public TQEditorFactory
+{
+public:
+    TQSqlEditorFactory ( TQObject * parent = 0, const char * name = 0 );
+    ~TQSqlEditorFactory();
+    virtual TQWidget * createEditor( TQWidget * parent, const TQVariant & variant );
+    virtual TQWidget * createEditor( TQWidget * parent, const TQSqlField * field );
+
+    static TQSqlEditorFactory * defaultFactory();
+    static void installDefaultFactory( TQSqlEditorFactory * factory );
+
+private:
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQSqlEditorFactory( const TQSqlEditorFactory & );
+    TQSqlEditorFactory &operator=( const TQSqlEditorFactory & );
+#endif
+};
+
+#endif // QT_NO_SQL
+#endif // TQSQLEDITORFACTORY_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqleditorfactory-members.html b/doc/html/qsqleditorfactory-members.html new file mode 100644 index 00000000..11b9e560 --- /dev/null +++ b/doc/html/qsqleditorfactory-members.html @@ -0,0 +1,93 @@ + + + + + +TQSqlEditorFactory Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlEditorFactory

+ +

This is the complete list of member functions for +TQSqlEditorFactory, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqleditorfactory.html b/doc/html/qsqleditorfactory.html new file mode 100644 index 00000000..1c7edef6 --- /dev/null +++ b/doc/html/qsqleditorfactory.html @@ -0,0 +1,111 @@ + + + + + +TQSqlEditorFactory Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlEditorFactory Class Reference
[sql module]

+ +

The TQSqlEditorFactory class is used to create the editors +used by TQDataTable and TQSqlForm. +More... +

#include <qsqleditorfactory.h> +

Inherits TQEditorFactory. +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Detailed Description

+ + +The TQSqlEditorFactory class is used to create the editors +used by TQDataTable and TQSqlForm. +

+ +

TQSqlEditorFactory is used by TQDataTable and TQSqlForm to +automatically create appropriate editors for a given TQSqlField. +For example if the field is a TQVariant::String a TQLineEdit would +be the default editor, whereas a TQVariant::Int's default editor +would be a TQSpinBox. +

If you want to create different editors for fields with the same +data type, subclass TQSqlEditorFactory and reimplement the +createEditor() function. +

See also TQDataTable, TQSqlForm, and Database Classes. + +


Member Function Documentation

+

TQSqlEditorFactory::TQSqlEditorFactory ( TQObject * parent = 0, const char * name = 0 ) +

+Constructs a SQL editor factory with parent parent, called name. + +

TQSqlEditorFactory::~TQSqlEditorFactory () +

+Destroys the object and frees any allocated resources. + +

TQWidget * TQSqlEditorFactory::createEditor ( TQWidget * parent, const TQVariant & variant ) [virtual] +

+Creates and returns the appropriate editor widget for the TQVariant +variant. +

The widget that is returned has the parent parent (which may be +zero). If variant is invalid, 0 is returned. + +

Reimplemented from TQEditorFactory. +

TQWidget * TQSqlEditorFactory::createEditor ( TQWidget * parent, const TQSqlField * field ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Creates and returns the appropriate editor for the TQSqlField field. + +

TQSqlEditorFactory * TQSqlEditorFactory::defaultFactory () [static] +

+Returns an instance of a default editor factory. + +

void TQSqlEditorFactory::installDefaultFactory ( TQSqlEditorFactory * factory ) [static] +

+Replaces the default editor factory with factory. All +TQDataTable and TQSqlForm instantiations will use this new factory +for creating field editors. TQSqlEditorFactory takes ownership of \a factory, and destroys it when it is no longer needed. + + +

+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/qsqlerror-h.html b/doc/html/qsqlerror-h.html new file mode 100644 index 00000000..e85fa1d9 --- /dev/null +++ b/doc/html/qsqlerror-h.html @@ -0,0 +1,137 @@ + + + + + +qsqlerror.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqlerror.h

+ +

This is the verbatim text of the qsqlerror.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSqlError class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLERROR_H
+#define TQSQLERROR_H
+
+#ifndef QT_H
+#include "qstring.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class TQM_EXPORT_SQL TQSqlError
+{
+public:
+    enum Type {
+	None,
+	Connection,
+	Statement,
+	Transaction,
+	Unknown
+    };
+    TQSqlError(  const TQString& driverText = TQString::null,
+		const TQString& databaseText = TQString::null,
+		int type = TQSqlError::None,
+		int number = -1 );
+    TQSqlError( const TQSqlError& other );
+    TQSqlError& operator=( const TQSqlError& other );
+    virtual ~TQSqlError();
+
+    TQString	driverText() const;
+    virtual void setDriverText( const TQString& driverText );
+    TQString	databaseText() const;
+    virtual void setDatabaseText( const TQString& databaseText );
+    int		type() const;
+    virtual void setType( int type );
+    int		number() const;
+    virtual void setNumber( int number );
+    TQString 	text() const;
+    void 	showMessage( const TQString& msg = TQString::null ) const;
+    
+private:
+    TQString	driverError;
+    TQString	databaseError;
+    int		errorType;
+    int	errorNumber;
+};
+
+#endif // QT_NO_SQL
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlerror-members.html b/doc/html/qsqlerror-members.html new file mode 100644 index 00000000..c0570f39 --- /dev/null +++ b/doc/html/qsqlerror-members.html @@ -0,0 +1,59 @@ + + + + + +TQSqlError Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlError

+ +

This is the complete list of member functions for +TQSqlError, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlerror.html b/doc/html/qsqlerror.html new file mode 100644 index 00000000..f06b0c7b --- /dev/null +++ b/doc/html/qsqlerror.html @@ -0,0 +1,157 @@ + + + + + +TQSqlError Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlError Class Reference
[sql module]

+ +

The TQSqlError class provides SQL database error information. +More... +

#include <qsqlerror.h> +

List of all member functions. +

Public Members

+
    +
  • enum Type { None, Connection, Statement, Transaction, Unknown }
  • +
  • TQSqlError ( const TQString & driverText = TQString::null, const TQString & databaseText = TQString::null, int type = TQSqlError::None, int number = -1 )
  • +
  • TQSqlError ( const TQSqlError & other )
  • +
  • TQSqlError & operator= ( const TQSqlError & other )
  • +
  • virtual ~TQSqlError ()
  • +
  • TQString driverText () const
  • +
  • virtual void setDriverText ( const TQString & driverText )
  • +
  • TQString databaseText () const
  • +
  • virtual void setDatabaseText ( const TQString & databaseText )
  • +
  • int type () const
  • +
  • virtual void setType ( int type )
  • +
  • int number () const
  • +
  • virtual void setNumber ( int number )
  • +
  • TQString text () const
  • +
  • void showMessage ( const TQString & msg = TQString::null ) const  (obsolete)
  • +
+

Detailed Description

+ + +The TQSqlError class provides SQL database error information. +

+ +

This class is used to report database-specific errors. An error +description and (if appropriate) a database-specific error number +can be obtained using this class. +

See also Database Classes. + +


Member Type Documentation

+

TQSqlError::Type

+ +

This enum type describes the type of SQL error that occurred. +

    +
  • TQSqlError::None - no error occurred +
  • TQSqlError::Connection - connection error +
  • TQSqlError::Statement - SQL statement syntax error +
  • TQSqlError::Transaction - transaction failed error +
  • TQSqlError::Unknown - unknown error +
+

Member Function Documentation

+

TQSqlError::TQSqlError ( const TQString & driverText = TQString::null, const TQString & databaseText = TQString::null, int type = TQSqlError::None, int number = -1 ) +

+Constructs an error containing the driver error text driverText, the database-specific error text databaseText, the +type type and the optional error number number. + +

TQSqlError::TQSqlError ( const TQSqlError & other ) +

+Creates a copy of other. + +

TQSqlError::~TQSqlError () [virtual] +

+Destroys the object and frees any allocated resources. + +

TQString TQSqlError::databaseText () const +

+Returns the text of the error as reported by the database. This +may contain database-specific descriptions. + +

TQString TQSqlError::driverText () const +

+Returns the text of the error as reported by the driver. This may +contain database-specific descriptions. + +

int TQSqlError::number () const +

+Returns the database-specific error number, or -1 if it cannot be +determined. + +

TQSqlError & TQSqlError::operator= ( const TQSqlError & other ) +

+Sets the error equal to other. + +

void TQSqlError::setDatabaseText ( const TQString & databaseText ) [virtual] +

+Sets the database error text to the value of databaseText. + +

void TQSqlError::setDriverText ( const TQString & driverText ) [virtual] +

+Sets the driver error text to the value of driverText. + +

void TQSqlError::setNumber ( int number ) [virtual] +

+Sets the database-specific error number to number. + +

void TQSqlError::setType ( int type ) [virtual] +

+Sets the error type to the value of type. + +

void TQSqlError::showMessage ( const TQString & msg = TQString::null ) const +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This is a convenience function that pops up a TQMessageBox +containing the message returned by text(). An additional string +can be passed in via the msg parameter, which will be +concatenated with the text() message. +

See also text(), driverText(), and databaseText(). + +

TQString TQSqlError::text () const +

+This is a convenience function that returns databaseText() and +driverText() concatenated into a single string. +

See also showMessage(), driverText(), and databaseText(). + +

int TQSqlError::type () const +

+Returns the error type, or -1 if the type cannot be determined. +

See also TQSqlError::Type. + + +


+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/qsqlfield-h.html b/doc/html/qsqlfield-h.html new file mode 100644 index 00000000..632be144 --- /dev/null +++ b/doc/html/qsqlfield-h.html @@ -0,0 +1,198 @@ + + + + + +qsqlfield.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqlfield.h

+ +

This is the verbatim text of the qsqlfield.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSqlField class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLFIELD_H
+#define TQSQLFIELD_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qvariant.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class TQSqlFieldPrivate
+{
+public:
+    TQVariant::Type type;
+};
+
+class TQM_EXPORT_SQL TQSqlField
+{
+public:
+    TQSqlField( const TQString& fieldName = TQString::null, TQVariant::Type type = TQVariant::Invalid );
+    TQSqlField( const TQSqlField& other );
+    TQSqlField& operator=( const TQSqlField& other );
+    bool operator==(const TQSqlField& other) const;
+    virtual ~TQSqlField();
+
+    virtual void	setValue( const TQVariant& value );
+    virtual TQVariant	value() const;
+    virtual void	setName( const TQString& name );
+    TQString		name() const;
+    virtual void	setNull();
+    bool		isNull() const;
+    virtual void	setReadOnly( bool readOnly );
+    bool		isReadOnly() const;
+    void		clear( bool nullify = TRUE );
+    TQVariant::Type	type() const;
+
+private:
+    TQString       nm;
+    TQVariant      val;
+    uint          ro: 1;
+    uint          nul: 1;
+    TQSqlFieldPrivate* d;
+};
+
+inline TQVariant TQSqlField::value() const
+{ return val; }
+
+inline TQString TQSqlField::name() const
+{ return nm; }
+
+inline bool TQSqlField::isNull() const
+{ return nul; }
+
+inline bool TQSqlField::isReadOnly() const
+{ return ro; }
+
+inline TQVariant::Type TQSqlField::type() const
+{ return d->type; }
+
+
+/******************************************/
+/*******     TQSqlFieldInfo Class     ******/
+/******************************************/
+
+struct TQSqlFieldInfoPrivate;
+
+class TQM_EXPORT_SQL TQSqlFieldInfo
+{
+public:
+    TQSqlFieldInfo( const TQString& name = TQString::null,
+		   TQVariant::Type typ = TQVariant::Invalid,
+		   int retquired = -1,
+		   int len = -1,
+		   int prec = -1,
+		   const TQVariant& defValue = TQVariant(),
+		   int sqlType = 0,
+		   bool generated = TRUE,
+		   bool trim = FALSE,
+		   bool calculated = FALSE );
+    TQSqlFieldInfo( const TQSqlFieldInfo & other );
+    TQSqlFieldInfo( const TQSqlField & other, bool generated = TRUE );
+    virtual ~TQSqlFieldInfo();
+    TQSqlFieldInfo& operator=( const TQSqlFieldInfo& other );
+    bool operator==( const TQSqlFieldInfo& f ) const;
+
+    TQSqlField		toField() const;
+    int			isRetquired() const;
+    TQVariant::Type	type() const;
+    int			length() const;
+    int			precision() const;
+    TQVariant		defaultValue() const;
+    TQString		name() const;
+    int			typeID() const;
+    bool		isGenerated() const;
+    bool		isTrim() const;
+    bool		isCalculated() const;
+
+    virtual void	setTrim( bool trim );
+    virtual void	setGenerated( bool gen );
+    virtual void	setCalculated( bool calc );
+
+private:
+    TQSqlFieldInfoPrivate* d;
+};
+
+
+#endif	// QT_NO_SQL
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlfield-members.html b/doc/html/qsqlfield-members.html new file mode 100644 index 00000000..352006ee --- /dev/null +++ b/doc/html/qsqlfield-members.html @@ -0,0 +1,60 @@ + + + + + +TQSqlField Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlField

+ +

This is the complete list of member functions for +TQSqlField, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlfield.html b/doc/html/qsqlfield.html new file mode 100644 index 00000000..fc2cdb2d --- /dev/null +++ b/doc/html/qsqlfield.html @@ -0,0 +1,216 @@ + + + + + +TQSqlField Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlField Class Reference
[sql module]

+ +

The TQSqlField class manipulates the fields in SQL database tables +and views. +More... +

#include <qsqlfield.h> +

List of all member functions. +

Public Members

+
    +
  • TQSqlField ( const TQString & fieldName = TQString::null, TQVariant::Type type = TQVariant::Invalid )
  • +
  • TQSqlField ( const TQSqlField & other )
  • +
  • TQSqlField & operator= ( const TQSqlField & other )
  • +
  • bool operator== ( const TQSqlField & other ) const
  • +
  • virtual ~TQSqlField ()
  • +
  • virtual void setValue ( const TQVariant & value )
  • +
  • virtual TQVariant value () const
  • +
  • virtual void setName ( const TQString & name )
  • +
  • TQString name () const
  • +
  • virtual void setNull ()
  • +
  • bool isNull () const
  • +
  • virtual void setReadOnly ( bool readOnly )
  • +
  • bool isReadOnly () const
  • +
  • void clear ( bool nullify = TRUE )
  • +
  • TQVariant::Type type () const
  • +
+

Detailed Description

+ + +The TQSqlField class manipulates the fields in SQL database tables +and views. +

+ +

TQSqlField represents the characteristics of a single column in a +database table or view, such as the data type and column name. A +field also contains the value of the database column, which can be +viewed or changed. +

Field data values are stored as TQVariants. Using an incompatible +type is not permitted. For example: +

+    TQSqlField f( "myfield", TQVariant::Int );
+    f.setValue( TQPixmap() );  // will not work
+    
+ +

However, the field will attempt to cast certain data types to the +field data type where possible: +

+    TQSqlField f( "myfield", TQVariant::Int );
+    f.setValue( TQString("123") ); // casts TQString to int
+    
+ +

TQSqlField objects are rarely created explicitly in application +code. They are usually accessed indirectly through TQSqlRecord +or TQSqlCursor which already contain a list of fields. For +example: +

+    TQSqlCursor cur( "Employee" );        // create cursor using the 'Employee' table
+    TQSqlField* f = cur.field( "name" );  // use the 'name' field
+    f->setValue( "Dave" );               // set field value
+    ...
+    
+ +

In practice we rarely need to extract a pointer to a field at all. +The previous example would normally be written: +

+    TQSqlCursor cur( "Employee" );
+    cur.setValue( "name", "Dave" );
+    ...
+    
+ +

See also Database Classes. + +


Member Function Documentation

+

TQSqlField::TQSqlField ( const TQString & fieldName = TQString::null, TQVariant::Type type = TQVariant::Invalid ) +

+Constructs an empty field called fieldName of type type. + +

TQSqlField::TQSqlField ( const TQSqlField & other ) +

+Constructs a copy of other. + +

TQSqlField::~TQSqlField () [virtual] +

+Destroys the object and frees any allocated resources. + +

void TQSqlField::clear ( bool nullify = TRUE ) +

+Clears the value of the field. If the field is read-only, nothing +happens. If nullify is TRUE (the default), the field is set to +NULL. + +

bool TQSqlField::isNull () const +

+ +

Returns TRUE if the field is currently NULL; otherwise returns +FALSE. + +

bool TQSqlField::isReadOnly () const +

+ +

Returns TRUE if the field's value is read only; otherwise returns +FALSE. + +

TQString TQSqlField::name () const +

+ +

Returns the name of the field. + +

Example: sql/overview/table4/main.cpp. +

TQSqlField & TQSqlField::operator= ( const TQSqlField & other ) +

+Sets the field equal to other. + +

bool TQSqlField::operator== ( const TQSqlField & other ) const +

+Returns TRUE if the field is equal to other; otherwise returns +FALSE. Fields are considered equal when the following field +properties are the same: +

+

+

void TQSqlField::setName ( const TQString & name ) [virtual] +

+ +

Sets the name of the field to name. + +

void TQSqlField::setNull () [virtual] +

+ +

Sets the field to NULL and clears the value using clear(). If the +field is read-only, nothing happens. +

See also isReadOnly() and clear(). + +

void TQSqlField::setReadOnly ( bool readOnly ) [virtual] +

+ +

Sets the read only flag of the field's value to readOnly. +

See also setValue(). + +

void TQSqlField::setValue ( const TQVariant & value ) [virtual] +

+Sets the value of the field to value. If the field is read-only +(isReadOnly() returns TRUE), nothing happens. If the data type of +value differs from the field's current data type, an attempt is +made to cast it to the proper type. This preserves the data type +of the field in the case of assignment, e.g. a TQString to an +integer data type. For example: +

+    TQSqlCursor cur( "Employee" );                 // 'Employee' table
+    TQSqlField* f = cur.field( "student_count" );  // an integer field
+    ...
+    f->setValue( myLineEdit->text() );            // cast the line edit text to an integer
+    
+ +

See also isReadOnly(). + +

TQVariant::Type TQSqlField::type () const +

+ +

Returns the field's type as stored in the database. +Note that the actual value might have a different type, +Numerical values that are too large to store in a long +int or double are usually stored as strings to prevent +precision loss. + +

TQVariant TQSqlField::value () const [virtual] +

+ +

Returns the value of the field as a TQVariant. + +

Example: sql/overview/table4/main.cpp. + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlfieldinfo-members.html b/doc/html/qsqlfieldinfo-members.html new file mode 100644 index 00000000..78331918 --- /dev/null +++ b/doc/html/qsqlfieldinfo-members.html @@ -0,0 +1,64 @@ + + + + + +TQSqlFieldInfo Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlFieldInfo

+ +

This is the complete list of member functions for +TQSqlFieldInfo, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlfieldinfo.html b/doc/html/qsqlfieldinfo.html new file mode 100644 index 00000000..20cc2e91 --- /dev/null +++ b/doc/html/qsqlfieldinfo.html @@ -0,0 +1,227 @@ + + + + + +TQSqlFieldInfo Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlFieldInfo Class Reference
[sql module]

+ +

The TQSqlFieldInfo class stores meta data associated with a SQL field. +More... +

#include <qsqlfield.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQSqlFieldInfo class stores meta data associated with a SQL field. +

+ +

TQSqlFieldInfo objects only store meta data; field values are +stored in TQSqlField objects. +

All values must be set in the constructor, and may be retrieved +using isRetquired(), type(), length(), precision(), defaultValue(), +name(), isGenerated() and typeID(). +

See also Database Classes. + +


Member Function Documentation

+

TQSqlFieldInfo::TQSqlFieldInfo ( const TQString & name = TQString::null, TQVariant::Type typ = TQVariant::Invalid, int retquired = -1, int len = -1, int prec = -1, const TQVariant & defValue = TQVariant ( ), int typeID = 0, bool generated = TRUE, bool trim = FALSE, bool calculated = FALSE ) +

+Constructs a TQSqlFieldInfo with the following parameters: +
+
name the name of the field. +
typ the field's type in a TQVariant. +
retquired greater than 0 if the field is retquired, 0 +if its value can be NULL and less than 0 if it cannot be +determined whether the field is retquired or not. +
len the length of the field. Note that for +non-character types some databases return either the length in +bytes or the number of digits. -1 signifies that the length cannot +be determined. +
prec the precision of the field, or -1 if the field +has no precision or it cannot be determined. +
defValue the default value that is inserted into +the table if none is specified by the user. TQVariant() if there is +no default value or it cannot be determined. +
typeID the internal typeID of the database system +(only useful for low-level programming). 0 if unknown. +
generated TRUE indicates that this field should be +included in auto-generated SQL statments, e.g. in TQSqlCursor. +
trim TRUE indicates that widgets should remove +trailing whitespace from character fields. This does not affect +the field value but only its representation inside widgets. +
calculated TRUE indicates that the value of this +field is calculated. The value of calculated fields can by +modified by subclassing TQSqlCursor and overriding +TQSqlCursor::calculateField(). +
+ +

TQSqlFieldInfo::TQSqlFieldInfo ( const TQSqlFieldInfo & other ) +

+Constructs a copy of other. + +

TQSqlFieldInfo::TQSqlFieldInfo ( const TQSqlField & other, bool generated = TRUE ) +

+Creates a TQSqlFieldInfo object with the type and the name of the +TQSqlField other. If generated is TRUE this field will be +included in auto-generated SQL statments, e.g. in TQSqlCursor. + +

TQSqlFieldInfo::~TQSqlFieldInfo () [virtual] +

+Destroys the object and frees any allocated resources. + +

TQVariant TQSqlFieldInfo::defaultValue () const +

+Returns the field's default value or an empty TQVariant if the +field has no default value or the value couldn't be determined. +The default value is the value inserted in the database when it +is not explicitly specified by the user. + +

bool TQSqlFieldInfo::isCalculated () const +

+Returns TRUE if the field is calculated; otherwise returns FALSE. +

See also setCalculated(). + +

bool TQSqlFieldInfo::isGenerated () const +

+Returns TRUE if the field should be included in auto-generated +SQL statments, e.g. in TQSqlCursor; otherwise returns FALSE. +

See also setGenerated(). + +

int TQSqlFieldInfo::isRetquired () const +

+Returns a value greater than 0 if the field is retquired (NULL +values are not allowed), 0 if it isn't retquired (NULL values are +allowed) or less than 0 if it cannot be determined whether the +field is retquired or not. + +

bool TQSqlFieldInfo::isTrim () const +

+Returns TRUE if trailing whitespace should be removed from +character fields; otherwise returns FALSE. +

See also setTrim(). + +

int TQSqlFieldInfo::length () const +

+Returns the field's length. For fields storing text the return +value is the maximum number of characters the field can hold. For +non-character fields some database systems return the number of +bytes needed or the number of digits allowed. If the length cannot +be determined -1 is returned. + +

TQString TQSqlFieldInfo::name () const +

+Returns the name of the field in the SQL table. + +

Examples: sql/overview/subclass3/main.cpp and sql/overview/subclass4/main.cpp. +

TQSqlFieldInfo & TQSqlFieldInfo::operator= ( const TQSqlFieldInfo & other ) +

+Assigns other to this field info and returns a reference to it. + +

bool TQSqlFieldInfo::operator== ( const TQSqlFieldInfo & f ) const +

+Returns TRUE if this fieldinfo is equal to f; otherwise returns +FALSE. +

Two field infos are considered equal if all their attributes +match. + +

int TQSqlFieldInfo::precision () const +

+Returns the field's precision or -1 if the field has no precision +or it cannot be determined. + +

void TQSqlFieldInfo::setCalculated ( bool calc ) [virtual] +

+calc set to TRUE indicates that this field is a calculated +field. The value of calculated fields can by modified by subclassing +TQSqlCursor and overriding TQSqlCursor::calculateField(). +

See also isCalculated(). + +

void TQSqlFieldInfo::setGenerated ( bool gen ) [virtual] +

+gen set to FALSE indicates that this field should not appear +in auto-generated SQL statements (for example in TQSqlCursor). +

See also isGenerated(). + +

void TQSqlFieldInfo::setTrim ( bool trim ) [virtual] +

+If trim is TRUE widgets should remove trailing whitespace from +character fields. This does not affect the field value but only +its representation inside widgets. +

See also isTrim(). + +

TQSqlField TQSqlFieldInfo::toField () const +

+Returns an empty TQSqlField based on the information in this +TQSqlFieldInfo. + +

TQVariant::Type TQSqlFieldInfo::type () const +

+Returns the field's type or TQVariant::Invalid if the type is +unknown. + +

int TQSqlFieldInfo::typeID () const +

+Returns the internal type identifier as returned from the database +system. The return value is 0 if the type is unknown. +

Warning: This information is only useful for low-level database +programming and is not database independent. + + +


+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/qsqlform-h.html b/doc/html/qsqlform-h.html new file mode 100644 index 00000000..8d403ef5 --- /dev/null +++ b/doc/html/qsqlform-h.html @@ -0,0 +1,152 @@ + + + + + +qsqlform.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqlform.h

+ +

This is the verbatim text of the qsqlform.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSqlForm class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLFORM_H
+#define TQSQLFORM_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qmap.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL_FORM
+
+class TQSqlField;
+class TQSqlRecord;
+class TQSqlEditorFactory;
+class TQSqlPropertyMap;
+class TQWidget;
+class TQSqlFormPrivate;
+
+class TQM_EXPORT_SQL TQSqlForm : public TQObject
+{
+    Q_OBJECT
+public:
+    TQSqlForm( TQObject * parent = 0, const char * name = 0 );
+    ~TQSqlForm();
+
+    virtual void insert( TQWidget * widget, const TQString& field );
+    virtual void remove( const TQString& field );
+    uint         count() const;
+
+    TQWidget *   widget( uint i ) const;
+    TQSqlField * widgetToField( TQWidget * widget ) const;
+    TQWidget *   fieldToWidget( TQSqlField * field ) const;
+
+    void        installPropertyMap( TQSqlPropertyMap * map );
+
+    virtual void setRecord( TQSqlRecord* buf );
+
+public slots:
+    virtual void readField( TQWidget * widget );
+    virtual void writeField( TQWidget * widget );
+    virtual void readFields();
+    virtual void writeFields();
+
+    virtual void clear();
+    virtual void clearValues( bool nullify = FALSE );
+
+protected:
+    virtual void insert( TQWidget * widget, TQSqlField * field );
+    virtual void remove( TQWidget * widget );
+    void clearMap();
+
+private:
+    virtual void sync();
+    TQSqlFormPrivate* d;
+
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQSqlForm( const TQSqlForm & );
+    TQSqlForm &operator=( const TQSqlForm & );
+#endif
+};
+
+#endif // QT_NO_SQL
+#endif // TQSQLFORM_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlform-members.html b/doc/html/qsqlform-members.html new file mode 100644 index 00000000..4d80078c --- /dev/null +++ b/doc/html/qsqlform-members.html @@ -0,0 +1,104 @@ + + + + + +TQSqlForm Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlForm

+ +

This is the complete list of member functions for +TQSqlForm, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlform.html b/doc/html/qsqlform.html new file mode 100644 index 00000000..8c42ac05 --- /dev/null +++ b/doc/html/qsqlform.html @@ -0,0 +1,237 @@ + + + + + +TQSqlForm Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlForm Class Reference
[sql module]

+ +

The TQSqlForm class creates and manages data entry forms +tied to SQL databases. +More... +

#include <qsqlform.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • TQSqlForm ( TQObject * parent = 0, const char * name = 0 )
  • +
  • ~TQSqlForm ()
  • +
  • virtual void insert ( TQWidget * widget, const TQString & field )
  • +
  • virtual void remove ( const TQString & field )
  • +
  • uint count () const
  • +
  • TQWidget * widget ( uint i ) const
  • +
  • TQSqlField * widgetToField ( TQWidget * widget ) const
  • +
  • TQWidget * fieldToWidget ( TQSqlField * field ) const
  • +
  • void installPropertyMap ( TQSqlPropertyMap * pmap )
  • +
  • virtual void setRecord ( TQSqlRecord * buf )
  • +
+

Public Slots

+ +

Protected Members

+
    +
  • virtual void insert ( TQWidget * widget, TQSqlField * field )
  • +
  • virtual void remove ( TQWidget * widget )
  • +
+

Detailed Description

+ + +The TQSqlForm class creates and manages data entry forms +tied to SQL databases. +

+ + +

Typical use of a TQSqlForm consists of the following steps: +

    +
  • Create the widgets you want to appear in the form. +
  • Create a cursor and navigate to the record to be edited. +
  • Create the TQSqlForm. +
  • Set the form's record buffer to the cursor's update buffer. +
  • Insert each widget and the field it is to edit into the form. +
  • Use readFields() to update the editor widgets with values from +the database's fields. +
  • Display the form and let the user edit values etc. +
  • Use writeFields() to update the database's field values with +the values in the editor widgets. +
+

Note that a TQSqlForm does not access the database directly, but +most often via TQSqlFields which are part of a TQSqlCursor. A +TQSqlCursor::insert(), TQSqlCursor::update() or TQSqlCursor::del() +call is needed to actually write values to the database. +

Some sample code to initialize a form successfully: +

+    TQLineEdit  myEditor( this );
+    TQSqlForm   myForm( this );
+    TQSqlCursor myCursor( "mytable" );
+
+    // Execute a query to make the cursor valid
+    myCursor.select();
+    // Move the cursor to a valid record (the first record)
+    myCursor.next();
+    // Set the form's record pointer to the cursor's edit buffer (which
+    // contains the current record's values)
+    myForm.setRecord( myCursor.primeUpdate() );
+
+    // Insert a field into the form that uses myEditor to edit the
+    // field 'somefield' in 'mytable'
+    myForm.insert( &myEditor, "somefield" );
+
+    // Update myEditor with the value from the mapped database field
+    myForm.readFields();
+    ...
+    // Let the user edit the form
+    ...
+    // Update the database
+    myForm.writeFields();  // Update the cursor's edit buffer from the form
+    myCursor.update();  // Update the database from the cursor's buffer
+    
+ +

If you want to use custom editors for displaying and editing data +fields, you must install a custom TQSqlPropertyMap. The form +uses this object to get or set the value of a widget. +

Note that TQt Designer provides +a visual means of creating data-aware forms. +

See also installPropertyMap(), TQSqlPropertyMap, and Database Classes. + +


Member Function Documentation

+

TQSqlForm::TQSqlForm ( TQObject * parent = 0, const char * name = 0 ) +

+Constructs a TQSqlForm with parent parent and called name. + +

TQSqlForm::~TQSqlForm () +

+Destroys the object and frees any allocated resources. + +

void TQSqlForm::clear () [virtual slot] +

+Removes every widget, and the fields they're mapped to, from the form. + +

void TQSqlForm::clearValues ( bool nullify = FALSE ) [virtual slot] +

+Clears the values in all the widgets, and the fields they are +mapped to, in the form. If nullify is TRUE (the default is +FALSE), each field is also set to NULL. + +

uint TQSqlForm::count () const +

+Returns the number of widgets in the form. + +

TQWidget * TQSqlForm::fieldToWidget ( TQSqlField * field ) const +

+Returns the widget that field field is mapped to. + +

void TQSqlForm::insert ( TQWidget * widget, const TQString & field ) [virtual] +

+Inserts a widget, and the name of the field it is to be +mapped to, into the form. To actually associate inserted widgets +with an edit buffer, use setRecord(). +

See also setRecord(). + +

Examples: sql/overview/form1/main.cpp and sql/overview/form2/main.cpp. +

void TQSqlForm::insert ( TQWidget * widget, TQSqlField * field ) [virtual protected] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts a widget, and the field it is to be mapped to, into +the form. + +

void TQSqlForm::installPropertyMap ( TQSqlPropertyMap * pmap ) +

+Installs a custom TQSqlPropertyMap. This is useful if you plan to +create your own custom editor widgets. +

TQSqlForm takes ownership of pmap, so pmap is deleted when +TQSqlForm goes out of scope. +

See also TQDataTable::installEditorFactory(). + +

Example: sql/overview/custom1/main.cpp. +

void TQSqlForm::readField ( TQWidget * widget ) [virtual slot] +

+Updates the widget widget with the value from the SQL field it +is mapped to. Nothing happens if no SQL field is mapped to the widget. + +

void TQSqlForm::readFields () [virtual slot] +

+Updates the widgets in the form with current values from the SQL +fields they are mapped to. + +

Examples: sql/overview/form1/main.cpp and sql/overview/form2/main.cpp. +

void TQSqlForm::remove ( TQWidget * widget ) [virtual protected] +

+Removes a widget, and hence the field it's mapped to, from the +form. + +

void TQSqlForm::remove ( const TQString & field ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Removes field from the form. + +

void TQSqlForm::setRecord ( TQSqlRecord * buf ) [virtual] +

+Sets buf as the record buffer for the form. To force the +display of the data from buf, use readFields(). +

See also readFields() and writeFields(). + +

Examples: sql/overview/custom1/main.cpp, sql/overview/form1/main.cpp, and sql/overview/form2/main.cpp. +

TQWidget * TQSqlForm::widget ( uint i ) const +

+Returns the i-th widget in the form. Useful for traversing +the widgets in the form. + +

TQSqlField * TQSqlForm::widgetToField ( TQWidget * widget ) const +

+Returns the SQL field that widget widget is mapped to. + +

void TQSqlForm::writeField ( TQWidget * widget ) [virtual slot] +

+Updates the SQL field with the value from the widget it is +mapped to. Nothing happens if no SQL field is mapped to the widget. + +

void TQSqlForm::writeFields () [virtual slot] +

+Updates the SQL fields with values from the widgets they are +mapped to. To actually update the database with the contents of +the record buffer, use TQSqlCursor::insert(), TQSqlCursor::update() +or TQSqlCursor::del() as appropriate. + +

Example: sql/overview/form2/main.cpp. + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlindex-h.html b/doc/html/qsqlindex-h.html new file mode 100644 index 00000000..2294d476 --- /dev/null +++ b/doc/html/qsqlindex-h.html @@ -0,0 +1,143 @@ + + + + + +qsqlindex.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqlindex.h

+ +

This is the verbatim text of the qsqlindex.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSqlIndex class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLINDEX_H
+#define TQSQLINDEX_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qstringlist.h"
+#include "qsqlfield.h"
+#include "qsqlrecord.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#define TQM_TEMPLATE_EXTERN_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#define TQM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN
+#endif
+
+#ifndef QT_NO_SQL
+
+class TQSqlCursor;
+
+class TQM_EXPORT_SQL TQSqlIndex : public TQSqlRecord
+{
+public:
+    TQSqlIndex( const TQString& cursorName = TQString::null, const TQString& name = TQString::null );
+    TQSqlIndex( const TQSqlIndex& other );
+    ~TQSqlIndex();
+    TQSqlIndex&       operator=( const TQSqlIndex& other );
+    virtual void     setCursorName( const TQString& cursorName );
+    TQString          cursorName() const { return cursor; }
+    virtual void     setName( const TQString& name );
+    TQString          name() const { return nm; }
+
+    void             append( const TQSqlField& field );
+    virtual void     append( const TQSqlField& field, bool desc );
+
+    bool             isDescending( int i ) const;
+    virtual void     setDescending( int i, bool desc );
+
+    TQString          toString( const TQString& prefix = TQString::null,
+			       const TQString& sep = ",",
+			       bool verbose = TRUE ) const;
+    TQStringList      toStringList( const TQString& prefix = TQString::null,
+				   bool verbose = TRUE ) const;
+
+    static TQSqlIndex fromStringList( const TQStringList& l, const TQSqlCursor* cursor );
+
+private:
+    TQString          createField( int i, const TQString& prefix, bool verbose ) const;
+    TQString          cursor;
+    TQString          nm;
+    TQValueList<bool> sorts;
+};
+
+#define Q_DEFINED_QSQLINDEX
+#include "qwinexport.h"
+#endif	// QT_NO_SQL
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlindex-members.html b/doc/html/qsqlindex-members.html new file mode 100644 index 00000000..30d02265 --- /dev/null +++ b/doc/html/qsqlindex-members.html @@ -0,0 +1,75 @@ + + + + + +TQSqlIndex Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlIndex

+ +

This is the complete list of member functions for +TQSqlIndex, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlindex.html b/doc/html/qsqlindex.html new file mode 100644 index 00000000..e8241359 --- /dev/null +++ b/doc/html/qsqlindex.html @@ -0,0 +1,155 @@ + + + + + +TQSqlIndex Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlIndex Class Reference
[sql module]

+ +

The TQSqlIndex class provides functions to manipulate and +describe TQSqlCursor and TQSqlDatabase indexes. +More... +

#include <qsqlindex.h> +

Inherits TQSqlRecord. +

List of all member functions. +

Public Members

+
    +
  • TQSqlIndex ( const TQString & cursorname = TQString::null, const TQString & name = TQString::null )
  • +
  • TQSqlIndex ( const TQSqlIndex & other )
  • +
  • ~TQSqlIndex ()
  • +
  • TQSqlIndex & operator= ( const TQSqlIndex & other )
  • +
  • virtual void setCursorName ( const TQString & cursorName )
  • +
  • TQString cursorName () const
  • +
  • virtual void setName ( const TQString & name )
  • +
  • TQString name () const
  • +
  • virtual void append ( const TQSqlField & field )
  • +
  • virtual void append ( const TQSqlField & field, bool desc )
  • +
  • bool isDescending ( int i ) const
  • +
  • virtual void setDescending ( int i, bool desc )
  • +
+

Static Public Members

+
    +
  • TQSqlIndex fromStringList ( const TQStringList & l, const TQSqlCursor * cursor )
  • +
+

Detailed Description

+ + +The TQSqlIndex class provides functions to manipulate and +describe TQSqlCursor and TQSqlDatabase indexes. +

+ +

This class is used to describe and manipulate TQSqlCursor and +TQSqlDatabase indexes. An index refers to a single table or view +in a database. Information about the fields that comprise the +index can be used to generate SQL statements, or to affect the +behavior of a TQSqlCursor object. +

Normally, TQSqlIndex objects are created by TQSqlDatabase or +TQSqlCursor. +

See also Database Classes. + +


Member Function Documentation

+

TQSqlIndex::TQSqlIndex ( const TQString & cursorname = TQString::null, const TQString & name = TQString::null ) +

+Constructs an empty index using the cursor name cursorname and +index name name. + +

TQSqlIndex::TQSqlIndex ( const TQSqlIndex & other ) +

+Constructs a copy of other. + +

TQSqlIndex::~TQSqlIndex () +

+Destroys the object and frees any allocated resources. + +

void TQSqlIndex::append ( const TQSqlField & field ) [virtual] +

+Appends the field field to the list of indexed fields. The +field is appended with an ascending sort order. + +

Reimplemented from TQSqlRecord. +

void TQSqlIndex::append ( const TQSqlField & field, bool desc ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Appends the field field to the list of indexed fields. The +field is appended with an ascending sort order, unless desc is +TRUE. + +

TQString TQSqlIndex::cursorName () const +

+ +

Returns the name of the cursor which the index is associated with. + +

TQSqlIndex TQSqlIndex::fromStringList ( const TQStringList & l, const TQSqlCursor * cursor ) [static] +

+Returns an index based on the field descriptions in l and the +cursor cursor. The field descriptions should be in the same +format that toStringList() produces, for example, a surname field +in the people table might be in one of these forms: "surname", +"surname DESC" or "people.surname ASC". +

See also toStringList(). + +

bool TQSqlIndex::isDescending ( int i ) const +

+Returns TRUE if field i in the index is sorted in descending +order; otherwise returns FALSE. + +

TQString TQSqlIndex::name () const +

+ +

Returns the name of the index. + +

TQSqlIndex & TQSqlIndex::operator= ( const TQSqlIndex & other ) +

+Sets the index equal to other. + +

void TQSqlIndex::setCursorName ( const TQString & cursorName ) [virtual] +

+Sets the name of the cursor that the index is associated with to +cursorName. + +

void TQSqlIndex::setDescending ( int i, bool desc ) [virtual] +

+If desc is TRUE, field i is sorted in descending order. +Otherwise, field i is sorted in ascending order (the default). +If the field does not exist, nothing happens. + +

void TQSqlIndex::setName ( const TQString & name ) [virtual] +

+Sets the name of the index to name. + + +

+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/qsqlpropertymap-h.html b/doc/html/qsqlpropertymap-h.html new file mode 100644 index 00000000..5c70e70e --- /dev/null +++ b/doc/html/qsqlpropertymap-h.html @@ -0,0 +1,122 @@ + + + + + +qsqlpropertymap.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqlpropertymap.h

+ +

This is the verbatim text of the qsqlpropertymap.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSqlPropertyMap class
+**
+** Created : 2000-11-20
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLPROPERTYMAP_H
+#define TQSQLPROPERTYMAP_H
+
+#ifndef QT_H
+#include "qvariant.h"
+#include "qstring.h"
+#endif // QT_H
+
+#ifndef QT_NO_SQL_FORM
+
+class TQWidget;
+class TQSqlPropertyMapPrivate;
+
+class Q_EXPORT TQSqlPropertyMap {
+public:
+    TQSqlPropertyMap();
+    virtual ~TQSqlPropertyMap();
+
+    TQVariant      property( TQWidget * widget );
+    virtual void  setProperty( TQWidget * widget, const TQVariant & value );
+
+    void insert( const TQString & classname, const TQString & property );
+    void remove( const TQString & classname );
+
+    static TQSqlPropertyMap * defaultMap();
+    static void installDefaultMap( TQSqlPropertyMap * map );
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQSqlPropertyMap( const TQSqlPropertyMap & );
+    TQSqlPropertyMap &operator=( const TQSqlPropertyMap & );
+#endif
+    TQSqlPropertyMapPrivate* d;
+
+};
+
+#endif // QT_NO_SQL_FORM
+#endif // TQSQLPROPERTYMAP_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlpropertymap-members.html b/doc/html/qsqlpropertymap-members.html new file mode 100644 index 00000000..33979bc3 --- /dev/null +++ b/doc/html/qsqlpropertymap-members.html @@ -0,0 +1,54 @@ + + + + + +TQSqlPropertyMap Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlPropertyMap

+ +

This is the complete list of member functions for +TQSqlPropertyMap, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlpropertymap.html b/doc/html/qsqlpropertymap.html new file mode 100644 index 00000000..ff9b2130 --- /dev/null +++ b/doc/html/qsqlpropertymap.html @@ -0,0 +1,199 @@ + + + + + +TQSqlPropertyMap Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlPropertyMap Class Reference
[sql module]

+ +

The TQSqlPropertyMap class is used to map widgets to SQL fields. +More... +

#include <qsqlpropertymap.h> +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Detailed Description

+ + +The TQSqlPropertyMap class is used to map widgets to SQL fields. +

+ +

The SQL module uses TQt object + properties to insert and extract values from editor +widgets. +

This class is used to map editors to SQL fields. This works by +associating SQL editor class names to the properties used to +insert and extract values to/from the editor. +

For example, a TQLineEdit can be used to edit text strings and +other data types in TQDataTables or TQSqlForms. Several properties +are defined in TQLineEdit, but only the text property is used to +insert and extract text from a TQLineEdit. Both TQDataTable and +TQSqlForm use the global TQSqlPropertyMap for inserting and +extracting values to and from an editor widget. The global +property map defines several common widgets and properties that +are suitable for many applications. You can add and remove widget +properties to suit your specific needs. +

If you want to use custom editors with your TQDataTable or +TQSqlForm, you must install your own TQSqlPropertyMap for that table +or form. Example: +

+    TQSqlPropertyMap *myMap  = new TQSqlPropertyMap();
+    TQSqlForm        *myForm = new TQSqlForm( this );
+    MyEditor myEditor( this );
+
+    // Set the TQSqlForm's record buffer to the update buffer of
+    // a pre-existing TQSqlCursor called 'cur'.
+    myForm->setRecord( cur->primeUpdate() );
+
+    // Install the customized map
+    myMap->insert( "MyEditor", "content" );
+    myForm->installPropertyMap( myMap ); // myForm now owns myMap
+    ...
+    // Insert a field into the form that uses a myEditor to edit the
+    // field 'somefield'
+    myForm->insert( &myEditor, "somefield" );
+
+    // Update myEditor with the value from the mapped database field
+    myForm->readFields();
+    ...
+    // Let the user edit the form
+    ...
+    // Update the database fields with the values in the form
+    myForm->writeFields();
+    ...
+    
+ +

You can also replace the global TQSqlPropertyMap that is used by +default. (Bear in mind that TQSqlPropertyMap takes ownership of the +new default map.) +

+    TQSqlPropertyMap *myMap = new TQSqlPropertyMap;
+
+    myMap->insert( "MyEditor", "content" );
+    TQSqlPropertyMap::installDefaultMap( myMap );
+    ...
+    
+ +

See also TQDataTable, TQSqlForm, TQSqlEditorFactory, and Database Classes. + +


Member Function Documentation

+

TQSqlPropertyMap::TQSqlPropertyMap () +

+

Constructs a TQSqlPropertyMap. +

The default property mappings used by TQt widgets are: +

+
Widgets Property +
TQCheckBox, +TQRadioButton +checked +
TQComboBox, +TQListBox +currentItem +
TQDateEdit +date +
TQDateTimeEdit +dateTime +
TQTextBrowser +source +
TQButton, +TQDial, +TQLabel, +TQLineEdit, +TQMultiLineEdit, +TQPushButton, +TQTextEdit, +text +
TQTimeEdit +time +
TQLCDNumber, +TQScrollBar +TQSlider, +TQSpinBox +value +
+ +

TQSqlPropertyMap::~TQSqlPropertyMap () [virtual] +

+Destroys the TQSqlPropertyMap. +

Note that if the TQSqlPropertyMap is installed with +installPropertyMap() the object it was installed into, e.g. the +TQSqlForm, takes ownership and will delete the TQSqlPropertyMap when +necessary. + +

TQSqlPropertyMap * TQSqlPropertyMap::defaultMap () [static] +

+Returns the application global TQSqlPropertyMap. + +

void TQSqlPropertyMap::insert ( const TQString & classname, const TQString & property ) +

+Insert a new classname/property pair, which is used for custom SQL +field editors. There must be a Q_PROPERTY clause in the classname class declaration for the property. + +

Example: sql/overview/custom1/main.cpp. +

void TQSqlPropertyMap::installDefaultMap ( TQSqlPropertyMap * map ) [static] +

+Replaces the global default property map with map. All +TQDataTable and TQSqlForm instantiations will use this new map for +inserting and extracting values to and from editors. +TQSqlPropertyMap takes ownership of \a map, and destroys it when it is no longer needed. + +

TQVariant TQSqlPropertyMap::property ( TQWidget * widget ) +

+Returns the mapped property of widget as a TQVariant. + +

void TQSqlPropertyMap::remove ( const TQString & classname ) +

+Removes classname from the map. + +

void TQSqlPropertyMap::setProperty ( TQWidget * widget, const TQVariant & value ) [virtual] +

+Sets the property of widget to value. + + +

+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/qsqlquery-h.html b/doc/html/qsqlquery-h.html new file mode 100644 index 00000000..e963f9b3 --- /dev/null +++ b/doc/html/qsqlquery-h.html @@ -0,0 +1,177 @@ + + + + + +qsqlquery.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqlquery.h

+ +

This is the verbatim text of the qsqlquery.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSqlQuery class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLTQUERY_H
+#define TQSQLTQUERY_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qstring.h"
+#include "qvariant.h"
+#include "qvaluelist.h"
+#include "qsqlerror.h"
+#include "qsqlfield.h"
+#include "qsql.h"
+#endif // QT_H
+
+#ifndef QT_NO_SQL
+
+class TQSqlDriver;
+class TQSqlResult;
+class TQSqlDatabase;
+
+class Q_EXPORT TQSqlResultShared : public TQObject, public TQShared
+{
+    Q_OBJECT
+public:
+    TQSqlResultShared( TQSqlResult* result );
+    virtual ~TQSqlResultShared();
+    TQSqlResult* sqlResult;
+    TQString executedQuery;
+private slots:
+    void slotResultDestroyed();
+};
+
+class Q_EXPORT TQSqlQuery
+{
+public:
+    TQSqlQuery( TQSqlResult * r );
+    TQSqlQuery( const TQString& query = TQString::null, TQSqlDatabase* db = 0 );
+    Q_EXPLICIT TQSqlQuery( TQSqlDatabase* db );
+    TQSqlQuery( const TQSqlQuery& other );
+    TQSqlQuery& operator=( const TQSqlQuery& other );
+    virtual ~TQSqlQuery();
+
+    bool                isValid() const;
+    bool                isActive() const;
+    bool	        isNull( int field ) const;
+    int                 at() const;
+    TQString             lastQuery() const;
+    int                 numRowsAffected() const;
+    TQSqlError	        lastError() const;
+    bool                isSelect() const;
+    int                 size() const;
+    const TQSqlDriver*   driver() const;
+    const TQSqlResult*   result() const;
+    bool		isForwardOnly() const;
+    void		setForwardOnly( bool forward );
+
+    virtual bool	exec ( const TQString& query );
+    virtual TQVariant    value( int i ) const;
+
+    virtual bool	seek( int i, bool relative = FALSE );
+    virtual bool        next();
+    virtual bool        prev();
+    virtual bool        first();
+    virtual bool        last();
+
+    // prepared query support
+    bool		exec();
+    bool		prepare( const TQString& query );
+    void		bindValue( const TQString& placeholder, const TQVariant& val );
+    void		bindValue( int pos, const TQVariant& val );
+    void		addBindValue( const TQVariant& val );
+    // remove these overloads in 4.0
+    void		bindValue( const TQString& placeholder, const TQVariant& val, TQSql::ParameterType type );
+    void		bindValue( int pos, const TQVariant& val, TQSql::ParameterType type );
+    void		addBindValue( const TQVariant& val, TQSql::ParameterType type );
+    TQVariant		boundValue( const TQString& placeholder ) const;
+    TQVariant		boundValue( int pos ) const;
+    TQMap<TQString, TQVariant> boundValues() const;
+    TQString             executedQuery() const;
+    
+protected:
+    virtual void        beforeSeek();
+    virtual void        afterSeek();
+
+private:
+    void 		init( const TQString& query, TQSqlDatabase* db );
+    void                deref();
+    bool                checkDetach();
+    TQSqlResultShared*   d;
+};
+
+
+#endif // QT_NO_SQL
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlquery-members.html b/doc/html/qsqlquery-members.html new file mode 100644 index 00000000..8fffe2fd --- /dev/null +++ b/doc/html/qsqlquery-members.html @@ -0,0 +1,77 @@ + + + + + +TQSqlQuery Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlQuery

+ +

This is the complete list of member functions for +TQSqlQuery, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlquery.html b/doc/html/qsqlquery.html new file mode 100644 index 00000000..e5400112 --- /dev/null +++ b/doc/html/qsqlquery.html @@ -0,0 +1,595 @@ + + + + + +TQSqlQuery Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlQuery Class Reference
[sql module]

+ +

The TQSqlQuery class provides a means of executing and +manipulating SQL statements. +More... +

#include <qsqlquery.h> +

Inherited by TQSqlCursor. +

List of all member functions. +

Public Members

+
    +
  • TQSqlQuery ( TQSqlResult * r )
  • +
  • TQSqlQuery ( const TQString & query = TQString::null, TQSqlDatabase * db = 0 )
  • +
  • explicit TQSqlQuery ( TQSqlDatabase * db )
  • +
  • TQSqlQuery ( const TQSqlQuery & other )
  • +
  • TQSqlQuery & operator= ( const TQSqlQuery & other )
  • +
  • virtual ~TQSqlQuery ()
  • +
  • bool isValid () const
  • +
  • bool isActive () const
  • +
  • bool isNull ( int field ) const
  • +
  • int at () const
  • +
  • TQString lastQuery () const
  • +
  • int numRowsAffected () const
  • +
  • TQSqlError lastError () const
  • +
  • bool isSelect () const
  • +
  • int size () const
  • +
  • const TQSqlDriver * driver () const
  • +
  • const TQSqlResult * result () const
  • +
  • bool isForwardOnly () const
  • +
  • void setForwardOnly ( bool forward )
  • +
  • virtual bool exec ( const TQString & query )
  • +
  • virtual TQVariant value ( int i ) const
  • +
  • virtual bool seek ( int i, bool relative = FALSE )
  • +
  • virtual bool next ()
  • +
  • virtual bool prev ()
  • +
  • virtual bool first ()
  • +
  • virtual bool last ()
  • +
  • bool exec ()
  • +
  • bool prepare ( const TQString & query )
  • +
  • void bindValue ( const TQString & placeholder, const TQVariant & val )
  • +
  • void bindValue ( int pos, const TQVariant & val )
  • +
  • void addBindValue ( const TQVariant & val )
  • +
  • void bindValue ( const TQString & placeholder, const TQVariant & val, TQSql::ParameterType type )
  • +
  • void bindValue ( int pos, const TQVariant & val, TQSql::ParameterType type )
  • +
  • void addBindValue ( const TQVariant & val, TQSql::ParameterType type )
  • +
  • TQVariant boundValue ( const TQString & placeholder ) const
  • +
  • TQVariant boundValue ( int pos ) const
  • +
  • TQMap<TQString, TQVariant> boundValues () const
  • +
  • TQString executedQuery () const
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQSqlQuery class provides a means of executing and +manipulating SQL statements. +

+ + +

TQSqlQuery encapsulates the functionality involved in creating, +navigating and retrieving data from SQL queries which are executed +on a TQSqlDatabase. It can be used to execute DML (data +manipulation language) statements, e.g. SELECT, INSERT, UPDATE and DELETE, and also DDL (data definition language) +statements, e.g. CREATE TABLE. It can also be used to +execute database-specific commands which are not standard SQL +(e.g. SET DATESTYLE=ISO for PostgreSQL). +

Successfully executed SQL statements set the query's state to +active (isActive() returns TRUE); otherwise the query's state is +set to inactive. In either case, when executing a new SQL +statement, the query is positioned on an invalid record; an active +query must be navigated to a valid record (so that isValid() +returns TRUE) before values can be retrieved. +

Navigating records is performed with the following functions: +

+

These functions allow the programmer to move forward, backward or +arbitrarily through the records returned by the query. If you only +need to move forward through the results, e.g. using next() or +using seek() with a positive offset, you can use setForwardOnly() +and save a significant amount of memory overhead. Once an active +query is positioned on a valid record, data can be retrieved using +value(). All data is transferred from the SQL backend using +TQVariants. +

For example: +

+    TQSqlQuery query( "SELECT name FROM customer" );
+    while ( query.next() ) {
+        TQString name = query.value(0).toString();
+        doSomething( name );
+    }
+    
+ +

To access the data returned by a query, use the value() method. +Each field in the data returned by a SELECT statement is accessed +by passing the field's position in the statement, starting from 0. +Information about the fields can be obtained via TQSqlDatabase::record(). +For the sake of efficiency there are no functions to access a field +by name. (The TQSqlCursor class provides a higher-level interface +with field access by name and automatic SQL generation.) +

TQSqlQuery supports prepared query execution and the binding of +parameter values to placeholders. Some databases don't support +these features, so for them TQt emulates the retquired +functionality. For example, the Oracle and ODBC drivers have +proper prepared query support, and TQt makes use of it; but for +databases that don't have this support, TQt implements the feature +itself, e.g. by replacing placeholders with actual values when a +query is executed. The exception is positional binding using named +placeholders, which retquires that the database supports prepared +queries. +

Oracle databases identify placeholders by using a colon-name +syntax, e.g :name. ODBC simply uses ? characters. TQt +supports both syntaxes (although you can't mix them in the same +query). +

Below we present the same example using each of the four different +binding approaches. +

Named binding using named placeholders +

+    TQSqlQuery query;
+    query.prepare( "INSERT INTO atable (id, forename, surname) "
+                   "VALUES (:id, :forename, :surname)" );
+    query.bindValue( ":id", 1001 );
+    query.bindValue( ":forename", "Bart" );
+    query.bindValue( ":surname", "Simpson" );
+    query.exec();
+    
+ +

Positional binding using named placeholders +

+    TQSqlQuery query;
+    query.prepare( "INSERT INTO atable (id, forename, surname) "
+                   "VALUES (:id, :forename, :surname)" );
+    query.bindValue( 0, 1001 );
+    query.bindValue( 1, "Bart" );
+    query.bindValue( 2, "Simpson" );
+    query.exec();
+    
+ +Note: Using positional binding with named placeholders will +only work if the database supports prepared queries. This can be +checked with TQSqlDriver::hasFeature() using TQSqlDriver::PreparedQueries +as argument for driver feature. +

Binding values using positional placeholders #1 +

+    TQSqlQuery query;
+    query.prepare( "INSERT INTO atable (id, forename, surname) "
+                   "VALUES (?, ?, ?)" );
+    query.bindValue( 0, 1001 );
+    query.bindValue( 1, "Bart" );
+    query.bindValue( 2, "Simpson" );
+    query.exec();
+    
+ +

Binding values using positional placeholders #2 +

+    query.prepare( "INSERT INTO atable (id, forename, surname) "
+                   "VALUES (?, ?, ?)" );
+    query.addBindValue( 1001 );
+    query.addBindValue( "Bart" );
+    query.addBindValue( "Simpson" );
+    query.exec();
+    
+ +

Binding values to a stored procedure +This code calls a stored procedure called AsciiToInt(), passing +it a character through its in parameter, and taking its result in +the out parameter. +

+    TQSqlQuery query;
+    query.prepare( "call AsciiToInt(?, ?)" );
+    query.bindValue( 0, "A" );
+    query.bindValue( 1, 0, TQSql::Out );
+    query.exec();
+    int i = query.boundValue( 1 ).toInt(); // i is 65.
+    
+ +

See also TQSqlDatabase, TQSqlCursor, TQVariant, and Database Classes. + +


Member Function Documentation

+

TQSqlQuery::TQSqlQuery ( TQSqlResult * r ) +

+Creates a TQSqlQuery object which uses the TQSqlResult r to +communicate with a database. + +

TQSqlQuery::TQSqlQuery ( const TQString & query = TQString::null, TQSqlDatabase * db = 0 ) +

+Creates a TQSqlQuery object using the SQL query and the database +db. If db is 0, (the default), the application's default +database is used. If query is not a null string, it will be +executed. +

See also TQSqlDatabase. + +

explicit TQSqlQuery::TQSqlQuery ( TQSqlDatabase * db ) +

+Creates a TQSqlQuery object using the database db. If db is +0, the application's default database is used. +

See also TQSqlDatabase. + +

TQSqlQuery::TQSqlQuery ( const TQSqlQuery & other ) +

+Constructs a copy of other. + +

TQSqlQuery::~TQSqlQuery () [virtual] +

+Destroys the object and frees any allocated resources. + +

void TQSqlQuery::addBindValue ( const TQVariant & val, TQSql::ParameterType type ) +

+Adds the value val to the list of values when using positional +value binding. The order of the addBindValue() calls determines +which placeholder a value will be bound to in the prepared query. +If type is TQSql::Out or TQSql::InOut, the placeholder will +be overwritten with data from the database after the exec() call. +

See also bindValue(), prepare(), and exec(). + +

void TQSqlQuery::addBindValue ( const TQVariant & val ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Binds the placeholder with type TQSql::In. + +

void TQSqlQuery::afterSeek () [virtual protected] +

+Protected virtual function called after the internal record +pointer is moved to a new record. The default implementation does +nothing. + +

int TQSqlQuery::at () const +

+Returns the current internal position of the query. The first +record is at position zero. If the position is invalid, a +TQSql::Location will be returned indicating the invalid position. +

See also prev(), next(), first(), last(), seek(), isActive(), and isValid(). + +

Example: sql/overview/navigating/main.cpp. +

void TQSqlQuery::beforeSeek () [virtual protected] +

+Protected virtual function called before the internal record +pointer is moved to a new record. The default implementation does +nothing. + +

void TQSqlQuery::bindValue ( const TQString & placeholder, const TQVariant & val, TQSql::ParameterType type ) +

+Set the placeholder placeholder to be bound to value val in +the prepared statement. Note that the placeholder mark (e.g :) +must be included when specifying the placeholder name. If type +is TQSql::Out or TQSql::InOut, the placeholder will be +overwritten with data from the database after the exec() call. +

See also addBindValue(), prepare(), and exec(). + +

void TQSqlQuery::bindValue ( const TQString & placeholder, const TQVariant & val ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Binds the placeholder with type TQSql::In. + +

void TQSqlQuery::bindValue ( int pos, const TQVariant & val ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Binds the placeholder at position pos with type TQSql::In. + +

void TQSqlQuery::bindValue ( int pos, const TQVariant & val, TQSql::ParameterType type ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Set the placeholder in position pos to be bound to value val +in the prepared statement. Field numbering starts at 0. If type +is TQSql::Out or TQSql::InOut, the placeholder will be +overwritten with data from the database after the exec() call. +

See also addBindValue(), prepare(), and exec(). + +

TQVariant TQSqlQuery::boundValue ( const TQString & placeholder ) const +

+Returns the value for the placeholder. + +

TQVariant TQSqlQuery::boundValue ( int pos ) const +

+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 +

+Returns a map of the bound values. +

The bound values can be examined in the following way: +

+    TQSqlQuery query;
+    ...
+    // 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 )
+        qWarning( "Placeholder: " + it.key() + ", Value: " + (*it).toString() );
+    ...
+
+    // Examine the bound values - bound using positional binding
+    TQValueList<TQVariant>::ConstIterator it;
+    TQValueList<TQVariant> list = query.boundValues().values();
+    int i = 0;
+    for ( it = list.begin(); it != list.end(); ++it )
+        qWarning( "Placeholder pos: %d, Value: " + (*it).toString(), i++ );
+    ...
+
+    
+ + +

const TQSqlDriver * TQSqlQuery::driver () const +

+Returns the database driver associated with the query. + +

bool TQSqlQuery::exec ( const TQString & query ) [virtual] +

+Executes the SQL in query. Returns TRUE and sets the query +state to active if the query was successful; otherwise returns +FALSE and sets the query state to inactive. The query string +must use syntax appropriate for the SQL database being queried, +for example, standard SQL. +

After the query is executed, the query is positioned on an invalid record, and must be navigated to a valid record before +data values can be retrieved, e.g. using next(). +

Note that the last error for this query is reset when exec() is +called. +

See also isActive(), isValid(), next(), prev(), first(), last(), and seek(). + +

Examples: sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/basicdatamanip/main.cpp, and sql/overview/connection.cpp. +

bool TQSqlQuery::exec () +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Executes a previously prepared SQL query. Returns TRUE if the +query executed successfully; otherwise returns FALSE. +

See also prepare(), bindValue(), and addBindValue(). + +

TQString TQSqlQuery::executedQuery () const +

+Returns the last query that was executed. +

In most cases this function returns the same as lastQuery(). If a +prepared query with placeholders is executed on a DBMS that does +not support it, the preparation of this query is emulated. The +placeholders in the original query are replaced with their bound +values to form a new query. This function returns the modified +query. Useful for debugging purposes. +

See also lastQuery(). + +

bool TQSqlQuery::first () [virtual] +

+Retrieves the first record in the result, if available, and +positions the query on the retrieved record. Note that the result +must be in an active state and isSelect() must return TRUE before +calling this function or it will do nothing and return FALSE. +Returns TRUE if successful. If unsuccessful the query position is +set to an invalid position and FALSE is returned. +

See also next(), prev(), last(), seek(), at(), isActive(), and isValid(). + +

Example: sql/overview/navigating/main.cpp. +

bool TQSqlQuery::isActive () const +

+Returns TRUE if the query is currently active; otherwise returns +FALSE. + +

Examples: sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/basicdatamanip/main.cpp, sql/overview/navigating/main.cpp, and sql/overview/retrieve1/main.cpp. +

bool TQSqlQuery::isForwardOnly () const +

+Returns TRUE if you can only scroll forward through a result +set; otherwise returns FALSE. +

See also setForwardOnly(). + +

bool TQSqlQuery::isNull ( int field ) const +

+Returns TRUE if the query is active and positioned on a valid +record and the field is NULL; otherwise returns FALSE. Note +that for some drivers isNull() will not return accurate +information until after an attempt is made to retrieve data. +

See also isActive(), isValid(), and value(). + +

bool TQSqlQuery::isSelect () const +

+Returns TRUE if the current query is a SELECT statement; +otherwise returns FALSE. + +

bool TQSqlQuery::isValid () const +

+Returns TRUE if the query is currently positioned on a valid +record; otherwise returns FALSE. + +

bool TQSqlQuery::last () [virtual] +

+Retrieves the last record in the result, if available, and +positions the query on the retrieved record. Note that the result +must be in an active state and isSelect() must return TRUE before +calling this function or it will do nothing and return FALSE. +Returns TRUE if successful. If unsuccessful the query position is +set to an invalid position and FALSE is returned. +

See also next(), prev(), first(), seek(), at(), isActive(), and isValid(). + +

Example: sql/overview/navigating/main.cpp. +

TQSqlError TQSqlQuery::lastError () const +

+Returns error information about the last error (if any) that +occurred. +

See also TQSqlError. + +

TQString TQSqlQuery::lastQuery () const +

+Returns the text of the current query being used, or TQString::null +if there is no current query text. +

See also executedQuery(). + +

bool TQSqlQuery::next () [virtual] +

+Retrieves the next record in the result, if available, and +positions the query on the retrieved record. Note that the result +must be in an active state and isSelect() must return TRUE before +calling this function or it will do nothing and return FALSE. +

The following rules apply: +

    +
  • If the result is currently located before the first +record, e.g. immediately after a query is executed, an attempt is +made to retrieve the first record. +

  • If the result is currently located after the last record, +there is no change and FALSE is returned. +

  • If the result is located somewhere in the middle, an attempt +is made to retrieve the next record. +
+

If the record could not be retrieved, the result is positioned after +the last record and FALSE is returned. If the record is successfully +retrieved, TRUE is returned. +

See also prev(), first(), last(), seek(), at(), isActive(), and isValid(). + +

Examples: sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/delete/main.cpp, sql/overview/order1/main.cpp, sql/overview/retrieve1/main.cpp, sql/overview/subclass4/main.cpp, and sql/overview/subclass5/main.cpp. +

int TQSqlQuery::numRowsAffected () const +

+Returns the number of rows affected by the result's SQL statement, +or -1 if it cannot be determined. Note that for SELECT +statements, the value is undefined; see size() instead. If the +query is not active (isActive() returns FALSE), -1 is returned. +

See also size() and TQSqlDriver::hasFeature(). + +

Examples: sql/overview/basicbrowsing2/main.cpp and sql/overview/basicdatamanip/main.cpp. +

TQSqlQuery & TQSqlQuery::operator= ( const TQSqlQuery & other ) +

+Assigns other to the query. + +

bool TQSqlQuery::prepare ( const TQString & query ) +

+Prepares the SQL query query for execution. The query may +contain placeholders for binding values. Both Oracle style +colon-name (e.g. :surname), and ODBC style (e.g. ?) +placeholders are supported; but they cannot be mixed in the same +query. See the Description for examples. +

See also exec(), bindValue(), and addBindValue(). + +

bool TQSqlQuery::prev () [virtual] +

+Retrieves the previous record in the result, if available, and +positions the query on the retrieved record. Note that the result +must be in an active state and isSelect() must return TRUE before +calling this function or it will do nothing and return FALSE. +

The following rules apply: +

    +
  • If the result is currently located before the first record, +there is no change and FALSE is returned. +

  • If the result is currently located after the last record, an +attempt is made to retrieve the last record. +

  • If the result is somewhere in the middle, an attempt is made +to retrieve the previous record. +
+

If the record could not be retrieved, the result is positioned +before the first record and FALSE is returned. If the record is +successfully retrieved, TRUE is returned. +

See also next(), first(), last(), seek(), at(), isActive(), and isValid(). + +

const TQSqlResult * TQSqlQuery::result () const +

+Returns the result associated with the query. + +

bool TQSqlQuery::seek ( int i, bool relative = FALSE ) [virtual] +

+Retrieves the record at position (offset) i, if available, and +positions the query on the retrieved record. The first record is +at position 0. Note that the query must be in an active state and +isSelect() must return TRUE before calling this function. +

If relative is FALSE (the default), the following rules apply: +

    +
  • If i is negative, the result is positioned before the +first record and FALSE is returned. +
  • Otherwise, an attempt is made to move to the record at position +i. If the record at position i could not be retrieved, the +result is positioned after the last record and FALSE is returned. If +the record is successfully retrieved, TRUE is returned. +
+

If relative is TRUE, the following rules apply: +

    +
  • If the result is currently positioned before the first +record or on the first record, and i is negative, there is no +change, and FALSE is returned. +
  • If the result is currently located after the last record, and +i is positive, there is no change, and FALSE is returned. +
  • If the result is currently located somewhere in the middle, +and the relative offset i moves the result below zero, the +result is positioned before the first record and FALSE is +returned. +
  • Otherwise, an attempt is made to move to the record i +records ahead of the current record (or i records behind the +current record if i is negative). If the record at offset i +could not be retrieved, the result is positioned after the last +record if i >= 0, (or before the first record if i is +negative), and FALSE is returned. If the record is successfully +retrieved, TRUE is returned. +
+

See also next(), prev(), first(), last(), at(), isActive(), and isValid(). + +

Example: sql/overview/navigating/main.cpp. +

void TQSqlQuery::setForwardOnly ( bool forward ) +

+Sets forward only mode to forward. If forward is TRUE only +next(), and seek() with positive values, are allowed for +navigating the results. Forward only mode needs far less memory +since results do not need to be cached. +

Forward only mode is off by default. +

Forward only mode cannot be used with data aware widgets like +TQDataTable, since they must to be able to scroll backward as well +as forward. +

See also isForwardOnly(), next(), and seek(). + +

int TQSqlQuery::size () const +

+Returns the size of the result, (number of rows returned), or -1 +if the size cannot be determined or if the database does not +support reporting information about query sizes. Note that for +non-SELECT statements (isSelect() returns FALSE), size() will +return -1. If the query is not active (isActive() returns FALSE), +-1 is returned. +

To determine the number of rows affected by a non-SELECT +statement, use numRowsAffected(). +

See also isActive(), numRowsAffected(), and TQSqlDriver::hasFeature(). + +

Example: sql/overview/navigating/main.cpp. +

TQVariant TQSqlQuery::value ( int i ) const [virtual] +

+Returns the value of the i-th field in the query (zero based). +

The fields are numbered from left to right using the text of the +SELECT statement, e.g. in SELECT forename, surname FROM people, +field 0 is forename and field 1 is surname. Using SELECT * +is not recommended because the order of the fields in the query is +undefined. +

An invalid TQVariant is returned if field i does not exist, if +the query is inactive, or if the query is positioned on an invalid +record. +

See also prev(), next(), first(), last(), seek(), isActive(), and isValid(). + +

Examples: sql/overview/basicbrowsing/main.cpp, sql/overview/basicbrowsing2/main.cpp, sql/overview/retrieve1/main.cpp, sql/overview/subclass3/main.cpp, sql/overview/subclass4/main.cpp, sql/overview/subclass5/main.cpp, and sql/overview/table4/main.cpp. + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlrecord-h.html b/doc/html/qsqlrecord-h.html new file mode 100644 index 00000000..1726ef81 --- /dev/null +++ b/doc/html/qsqlrecord-h.html @@ -0,0 +1,185 @@ + + + + + +qsqlrecord.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqlrecord.h

+ +

This is the verbatim text of the qsqlrecord.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSqlRecord class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLRECORD_H
+#define TQSQLRECORD_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qstringlist.h"
+#include "qvariant.h"
+#include "qsqlfield.h"
+#endif // QT_H
+
+#ifndef QT_NO_SQL
+
+class TQSqlRecordPrivate;
+
+class TQSqlRecordShared : public TQShared
+{
+public:
+    TQSqlRecordShared( TQSqlRecordPrivate* sqlRecordPrivate )
+    : d( sqlRecordPrivate )
+    {}
+    virtual ~TQSqlRecordShared();
+    TQSqlRecordPrivate* d;
+};
+
+class Q_EXPORT TQSqlRecord
+{
+public:
+    TQSqlRecord();
+    TQSqlRecord( const TQSqlRecord& other );
+    TQSqlRecord& operator=( const TQSqlRecord& other );
+    virtual ~TQSqlRecord();
+    virtual TQVariant     value( int i ) const;
+    virtual TQVariant     value( const TQString& name ) const;
+    virtual void         setValue( int i, const TQVariant& val );
+    virtual void         setValue( const TQString& name, const TQVariant& val );
+    bool                 isGenerated( int i ) const;
+    bool                 isGenerated( const TQString& name ) const;
+    virtual void         setGenerated( const TQString& name, bool generated );
+    virtual void         setGenerated( int i, bool generated );
+    virtual void         setNull( int i );
+    virtual void         setNull( const TQString& name );
+    bool                 isNull( int i ); // remove in 4.0
+    bool                 isNull( const TQString& name ); // remove in 4.0
+    bool                 isNull( int i ) const;
+    bool                 isNull( const TQString& name ) const;
+
+    int                  position( const TQString& name ) const;
+    TQString              fieldName( int i ) const;
+    TQSqlField*           field( int i );
+    TQSqlField*           field( const TQString& name );
+    const TQSqlField*     field( int i ) const;
+    const TQSqlField*     field( const TQString& name ) const;
+
+    virtual void         append( const TQSqlField& field );
+    virtual void         insert( int pos, const TQSqlField& field );
+    virtual void         remove( int pos );
+
+    bool                 isEmpty() const;
+    bool                 contains( const TQString& name ) const;
+    virtual void         clear();
+    virtual void         clearValues( bool nullify = FALSE );
+    uint                 count() const;
+    virtual TQString      toString( const TQString& prefix = TQString::null,
+				   const TQString& sep = "," ) const;
+    virtual TQStringList  toStringList( const TQString& prefix = TQString::null ) const;
+
+private:
+    TQString              createField( int i, const TQString& prefix ) const;
+    void                 deref();
+    bool                 checkDetach();
+    TQSqlRecordShared*    sh;
+};
+
+/******************************************/
+/*******     TQSqlRecordInfo Class    ******/
+/******************************************/
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT TQValueList<TQSqlFieldInfo>;
+// MOC_SKIP_END
+#endif
+
+typedef TQValueList<TQSqlFieldInfo> TQSqlFieldInfoList;
+
+class Q_EXPORT TQSqlRecordInfo: public TQSqlFieldInfoList
+{
+public:
+    TQSqlRecordInfo(): TQSqlFieldInfoList() {}
+    TQSqlRecordInfo( const TQSqlFieldInfoList& other ): TQSqlFieldInfoList( other ) {}
+    TQSqlRecordInfo( const TQSqlRecord& other );
+
+    size_type contains( const TQString& fieldName ) const;
+    TQSqlFieldInfo find( const TQString& fieldName ) const;
+    TQSqlRecord toRecord() const;
+
+};
+
+
+#endif	// QT_NO_SQL
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlrecord-members.html b/doc/html/qsqlrecord-members.html new file mode 100644 index 00000000..88a5b5ba --- /dev/null +++ b/doc/html/qsqlrecord-members.html @@ -0,0 +1,68 @@ + + + + + +TQSqlRecord Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlRecord

+ +

This is the complete list of member functions for +TQSqlRecord, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlrecord.html b/doc/html/qsqlrecord.html new file mode 100644 index 00000000..07f79f35 --- /dev/null +++ b/doc/html/qsqlrecord.html @@ -0,0 +1,294 @@ + + + + + +TQSqlRecord Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlRecord Class Reference
[sql module]

+ +

The TQSqlRecord class encapsulates a database record, i.e. a +set of database fields. +More... +

#include <qsqlrecord.h> +

Inherited by TQSqlCursor and TQSqlIndex. +

List of all member functions. +

Public Members

+
    +
  • TQSqlRecord ()
  • +
  • TQSqlRecord ( const TQSqlRecord & other )
  • +
  • TQSqlRecord & operator= ( const TQSqlRecord & other )
  • +
  • virtual ~TQSqlRecord ()
  • +
  • virtual TQVariant value ( int i ) const
  • +
  • virtual TQVariant value ( const TQString & name ) const
  • +
  • virtual void setValue ( int i, const TQVariant & val )
  • +
  • virtual void setValue ( const TQString & name, const TQVariant & val )
  • +
  • bool isGenerated ( int i ) const
  • +
  • bool isGenerated ( const TQString & name ) const
  • +
  • virtual void setGenerated ( const TQString & name, bool generated )
  • +
  • virtual void setGenerated ( int i, bool generated )
  • +
  • virtual void setNull ( int i )
  • +
  • virtual void setNull ( const TQString & name )
  • +
  • bool isNull ( int i ) const
  • +
  • bool isNull ( const TQString & name ) const
  • +
  • int position ( const TQString & name ) const
  • +
  • TQString fieldName ( int i ) const
  • +
  • TQSqlField * field ( int i )
  • +
  • TQSqlField * field ( const TQString & name )
  • +
  • const TQSqlField * field ( int i ) const
  • +
  • const TQSqlField * field ( const TQString & name ) const
  • +
  • virtual void append ( const TQSqlField & field )
  • +
  • virtual void insert ( int pos, const TQSqlField & field )
  • +
  • virtual void remove ( int pos )
  • +
  • bool isEmpty () const
  • +
  • bool contains ( const TQString & name ) const
  • +
  • virtual void clear ()
  • +
  • virtual void clearValues ( bool nullify = FALSE )
  • +
  • uint count () const
  • +
  • virtual TQString toString ( const TQString & prefix = TQString::null, const TQString & sep = "," ) const
  • +
  • virtual TQStringList toStringList ( const TQString & prefix = TQString::null ) const
  • +
+

Detailed Description

+ + +The TQSqlRecord class encapsulates a database record, i.e. a +set of database fields. +

+ +

The TQSqlRecord class encapsulates the functionality and +characteristics of a database record (usually a table or view within +the database). TQSqlRecords support adding and removing fields as +well as setting and retrieving field values. +

TQSqlRecord is implicitly shared. This means you can make copies of +the record in time O(1). If multiple TQSqlRecord instances share +the same data and one is modifying the record's data then this +modifying instance makes a copy and modifies its private copy - +thus it does not affect other instances. +

See also TQSqlRecordInfo and Database Classes. + +


Member Function Documentation

+

TQSqlRecord::TQSqlRecord () +

+Constructs an empty record. + +

TQSqlRecord::TQSqlRecord ( const TQSqlRecord & other ) +

+Constructs a copy of other. + +

TQSqlRecord::~TQSqlRecord () [virtual] +

+Destroys the object and frees any allocated resources. + +

void TQSqlRecord::append ( const TQSqlField & field ) [virtual] +

+Append a copy of field field to the end of the record. + +

Reimplemented in TQSqlIndex. +

void TQSqlRecord::clear () [virtual] +

+Removes all the record's fields. +

See also clearValues(). + +

Reimplemented in TQSqlCursor. +

void TQSqlRecord::clearValues ( bool nullify = FALSE ) [virtual] +

+Clears the value of all fields in the record. If nullify is +TRUE, (the default is FALSE), each field is set to NULL. + +

bool TQSqlRecord::contains ( const TQString & name ) const +

+Returns TRUE if there is a field in the record called name; +otherwise returns FALSE. + +

uint TQSqlRecord::count () const +

+Returns the number of fields in the record. + +

TQSqlField * TQSqlRecord::field ( int i ) +

+Returns the field at position i within the record, or 0 if it +cannot be found. + +

TQSqlField * TQSqlRecord::field ( const TQString & name ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the field called name within the record, or 0 if it +cannot be found. Field names are not case-sensitive. + +

const TQSqlField * TQSqlRecord::field ( int i ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

const TQSqlField * TQSqlRecord::field ( const TQString & name ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the field called name within the record, or 0 if it +cannot be found. Field names are not case-sensitive. + +

TQString TQSqlRecord::fieldName ( int i ) const +

+Returns the name of the field at position i. If the field does +not exist, TQString::null is returned. + +

void TQSqlRecord::insert ( int pos, const TQSqlField & field ) [virtual] +

+Insert a copy of field at position pos. If a field already +exists at pos, it is removed. + +

bool TQSqlRecord::isEmpty () const +

+Returns TRUE if there are no fields in the record; otherwise +returns FALSE. + +

bool TQSqlRecord::isGenerated ( const TQString & name ) const +

+Returns TRUE if the record has a field called name and this +field is to be generated (the default); otherwise returns FALSE. +

See also setGenerated(). + +

bool TQSqlRecord::isGenerated ( int i ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if the record has a field at position i and this +field is to be generated (the default); otherwise returns FALSE. +

See also setGenerated(). + +

bool TQSqlRecord::isNull ( const TQString & name ) const +

+Returns TRUE if the field called name is NULL or if there is no +field called name; otherwise returns FALSE. +

See also position(). + +

bool TQSqlRecord::isNull ( int i ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if the field i is NULL or if there is no field at +position i; otherwise returns FALSE. +

See also fieldName(). + +

TQSqlRecord & TQSqlRecord::operator= ( const TQSqlRecord & other ) +

+Sets the record equal to other. + +

int TQSqlRecord::position ( const TQString & name ) const +

+Returns the position of the field called name within the +record, or -1 if it cannot be found. Field names are not +case-sensitive. If more than one field matches, the first one is +returned. + +

void TQSqlRecord::remove ( int pos ) [virtual] +

+Removes the field at pos. If pos does not exist, nothing +happens. + +

Reimplemented in TQSqlCursor. +

void TQSqlRecord::setGenerated ( const TQString & name, bool generated ) [virtual] +

+Sets the generated flag for the field called name to generated. If the field does not exist, nothing happens. Only +fields that have generated set to TRUE are included in the SQL +that is generated, e.g. by TQSqlCursor. +

See also isGenerated(). + +

Reimplemented in TQSqlCursor. +

void TQSqlRecord::setGenerated ( int i, bool generated ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the generated flag for the field i to generated. +

See also isGenerated(). + +

Reimplemented in TQSqlCursor. +

void TQSqlRecord::setNull ( int i ) [virtual] +

+Sets the value of field i to NULL. If the field does not exist, +nothing happens. + +

void TQSqlRecord::setNull ( const TQString & name ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the value of the field called name to NULL. If the field +does not exist, nothing happens. + +

void TQSqlRecord::setValue ( int i, const TQVariant & val ) [virtual] +

+Sets the value of the field at position i to val. If the +field does not exist, nothing happens. + +

Examples: sql/overview/insert/main.cpp, sql/overview/insert2/main.cpp, sql/overview/subclass5/main.cpp, sql/overview/update/main.cpp, and sql/sqltable/main.cpp. +

void TQSqlRecord::setValue ( const TQString & name, const TQVariant & val ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the value of the field called name to val. If the field +does not exist, nothing happens. + +

TQString TQSqlRecord::toString ( const TQString & prefix = TQString::null, const TQString & sep = "," ) const [virtual] +

+Returns a list of all the record's field names as a string +separated by sep. +

Note that fields which are not generated are not included (see +isGenerated()). The returned string is suitable, for example, for +generating SQL SELECT statements. If a prefix is specified, +e.g. a table name, all fields are prefixed in the form: +

"prefix.<fieldname>" + +

TQStringList TQSqlRecord::toStringList ( const TQString & prefix = TQString::null ) const [virtual] +

+Returns a list of all the record's field names, each having the +prefix prefix. +

Note that fields which have generated set to FALSE are not +included. (See isGenerated()). If prefix is supplied, e.g. +a table name, all fields are prefixed in the form: +

"prefix.<fieldname>" + +

TQVariant TQSqlRecord::value ( int i ) const [virtual] +

+Returns the value of the field located at position i in the +record. If field i does not exist the resultant behaviour is +undefined. +

This function should be used with TQSqlQuerys. When working +with a TQSqlCursor the value(const + TQString&) overload which uses field names is more +appropriate. + +

Example: sql/overview/update/main.cpp. +

TQVariant TQSqlRecord::value ( const TQString & name ) const [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the value of the field called name in the record. If +field name does not exist the resultant behaviour is undefined. + + +


+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/qsqlrecordinfo-members.html b/doc/html/qsqlrecordinfo-members.html new file mode 100644 index 00000000..03c75e87 --- /dev/null +++ b/doc/html/qsqlrecordinfo-members.html @@ -0,0 +1,50 @@ + + + + + +TQSqlRecordInfo Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlRecordInfo

+ +

This is the complete list of member functions for +TQSqlRecordInfo, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlrecordinfo.html b/doc/html/qsqlrecordinfo.html new file mode 100644 index 00000000..ee2c7c35 --- /dev/null +++ b/doc/html/qsqlrecordinfo.html @@ -0,0 +1,101 @@ + + + + + +TQSqlRecordInfo Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlRecordInfo Class Reference
[sql module]

+ +

The TQSqlRecordInfo class encapsulates a set of database field meta data. +More... +

#include <qsqlrecord.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQSqlRecordInfo class encapsulates a set of database field meta data. +

+ +

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. + +


Member Function Documentation

+

TQSqlRecordInfo::TQSqlRecordInfo () +

+ +

Constructs an empty record info object + +

TQSqlRecordInfo::TQSqlRecordInfo ( const TQSqlFieldInfoList & other ) +

+ +

Constructs a copy of other. + +

TQSqlRecordInfo::TQSqlRecordInfo ( const TQSqlRecord & other ) +

+Constructs a TQSqlRecordInfo object based on the fields in the +TQSqlRecord other. + +

size_type TQSqlRecordInfo::contains ( const TQString & fieldName ) const +

+Returns the number of times a field called fieldName occurs in +the record. Returns 0 if no field by that name could be found. + +

TQSqlFieldInfo TQSqlRecordInfo::find ( const TQString & fieldName ) const +

+Returns a TQSqlFieldInfo object for the first field in the record +which has the field name fieldName. If no matching field is +found then an empty TQSqlFieldInfo object is returned. + +

TQSqlRecord TQSqlRecordInfo::toRecord () const +

+Returns an empty TQSqlRecord based on the field information +in this TQSqlRecordInfo. + + +

+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/qsqlresult-h.html b/doc/html/qsqlresult-h.html new file mode 100644 index 00000000..64176b7e --- /dev/null +++ b/doc/html/qsqlresult-h.html @@ -0,0 +1,159 @@ + + + + + +qsqlresult.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqlresult.h

+ +

This is the verbatim text of the qsqlresult.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSqlResult class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLRESULT_H
+#define TQSQLRESULT_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qvariant.h"
+#include "qsqlerror.h"
+#include "qsqlfield.h"
+#include "qsql.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class TQSqlDriver;
+class TQSql;
+class TQSqlResultPrivate;
+class TQSqlExtension;
+
+class TQM_EXPORT_SQL TQSqlResult
+{
+friend class TQSqlQuery;
+friend class TQSqlResultShared;
+public:
+    virtual ~TQSqlResult();
+    
+    // BCI HACK - remove in 4.0
+    void 	    setExtension( TQSqlExtension * ext );
+    TQSqlExtension * extension();
+
+protected:
+    TQSqlResult(const TQSqlDriver * db );
+    int		    at() const;
+    TQString         lastQuery() const;
+    TQSqlError       lastError() const;
+    bool            isValid() const;
+    bool            isActive() const;
+    bool            isSelect() const;
+    bool            isForwardOnly() const;
+    const TQSqlDriver* driver() const;
+    virtual void    setAt( int at );
+    virtual void    setActive( bool a );
+    virtual void    setLastError( const TQSqlError& e );
+    virtual void    setQuery( const TQString& query );
+    virtual void    setSelect( bool s );
+    virtual void    setForwardOnly( bool forward );
+
+    virtual TQVariant data( int i ) = 0;
+    virtual bool    isNull( int i ) = 0;
+    virtual bool    reset ( const TQString& sqlquery ) = 0;
+    virtual bool    fetch( int i ) = 0;
+    virtual bool    fetchNext();
+    virtual bool    fetchPrev();
+    virtual bool    fetchFirst() = 0;
+    virtual bool    fetchLast() = 0;
+    virtual int     size() = 0;
+    virtual int     numRowsAffected() = 0;
+private:
+    TQSqlResultPrivate* d;
+    bool forwardOnly;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQSqlResult( const TQSqlResult & );
+    TQSqlResult &operator=( const TQSqlResult & );
+#endif
+};
+
+#endif	// QT_NO_SQL
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlresult-members.html b/doc/html/qsqlresult-members.html new file mode 100644 index 00000000..ba0b5761 --- /dev/null +++ b/doc/html/qsqlresult-members.html @@ -0,0 +1,72 @@ + + + + + +TQSqlResult Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlResult

+ +

This is the complete list of member functions for +TQSqlResult, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlresult.html b/doc/html/qsqlresult.html new file mode 100644 index 00000000..83e504c3 --- /dev/null +++ b/doc/html/qsqlresult.html @@ -0,0 +1,260 @@ + + + + + +TQSqlResult Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlResult Class Reference
[sql module]

+ +

The TQSqlResult class provides an abstract interface for +accessing data from SQL databases. +More... +

#include <qsqlresult.h> +

List of all member functions. +

Public Members

+ +

Protected Members

+ +

Detailed Description

+ + +The TQSqlResult class provides an abstract interface for +accessing data from SQL databases. +

+ +

Normally you would use TQSqlQuery instead of TQSqlResult since TQSqlQuery +provides a generic wrapper for database-specific implementations of +TQSqlResult. +

See also TQSql and Database Classes. + +


Member Function Documentation

+

TQSqlResult::TQSqlResult ( const TQSqlDriver * db ) [protected] +

+Protected constructor which creates a TQSqlResult using database db. The object is initialized to an inactive state. + +

TQSqlResult::~TQSqlResult () [virtual] +

+Destroys the object and frees any allocated resources. + +

int TQSqlResult::at () const [protected] +

+Returns the current (zero-based) position of the result. + +

TQVariant TQSqlResult::data ( int i ) [pure virtual protected] +

+ +

Returns the data for field i (zero-based) as a TQVariant. This +function is only called if the result is in an active state and is +positioned on a valid record and i is non-negative. +Derived classes must reimplement this function and return the value +of field i, or TQVariant() if it cannot be determined. + +

const TQSqlDriver * TQSqlResult::driver () const [protected] +

+Returns the driver associated with the result. + +

bool TQSqlResult::fetch ( int i ) [pure virtual protected] +

+ +

Positions the result to an arbitrary (zero-based) index i. This +function is only called if the result is in an active state. Derived +classes must reimplement this function and position the result to the +index i, and call setAt() with an appropriate value. Return TRUE +to indicate success, or FALSE to signify failure. + +

bool TQSqlResult::fetchFirst () [pure virtual protected] +

+ +

Positions the result to the first record in the result. This +function is only called if the result is in an active state. +Derived classes must reimplement this function and position the result +to the first record, and call setAt() with an appropriate value. +Return TRUE to indicate success, or FALSE to signify failure. + +

bool TQSqlResult::fetchLast () [pure virtual protected] +

+ +

Positions the result to the last record in the result. This +function is only called if the result is in an active state. +Derived classes must reimplement this function and position the result +to the last record, and call setAt() with an appropriate value. +Return TRUE to indicate success, or FALSE to signify failure. + +

bool TQSqlResult::fetchNext () [virtual protected] +

+Positions the result to the next available record in the result. +This function is only called if the result is in an active state. +The default implementation calls fetch() with the next index. +Derived classes can reimplement this function and position the result +to the next record in some other way, and call setAt() with an +appropriate value. Return TRUE to indicate success, or FALSE to +signify failure. + +

bool TQSqlResult::fetchPrev () [virtual protected] +

+Positions the result to the previous available record in the +result. This function is only called if the result is in an active +state. The default implementation calls fetch() with the previous +index. Derived classes can reimplement this function and position the +result to the next record in some other way, and call setAt() with +an appropriate value. Return TRUE to indicate success, or FALSE to +signify failure. + +

bool TQSqlResult::isActive () const [protected] +

+Returns TRUE if the result has records to be retrieved; otherwise +returns FALSE. + +

bool TQSqlResult::isForwardOnly () const [protected] +

+Returns TRUE if you can only scroll forward through a result set; +otherwise returns FALSE. + +

bool TQSqlResult::isNull ( int i ) [pure virtual protected] +

+ +

Returns TRUE if the field at position i is NULL; otherwise +returns FALSE. + +

bool TQSqlResult::isSelect () const [protected] +

+Returns TRUE if the current result is from a SELECT statement; +otherwise returns FALSE. + +

bool TQSqlResult::isValid () const [protected] +

+Returns TRUE if the result is positioned on a valid record (that +is, the result is not positioned before the first or after the +last record); otherwise returns FALSE. + +

TQSqlError TQSqlResult::lastError () const [protected] +

+Returns the last error associated with the result. + +

TQString TQSqlResult::lastQuery () const [protected] +

+Returns the current SQL query text, or TQString::null if there is none. + +

int TQSqlResult::numRowsAffected () [pure virtual protected] +

+ +

Returns the number of rows affected by the last query executed. + +

bool TQSqlResult::reset ( const TQString & query ) [pure virtual protected] +

+ +

Sets the result to use the SQL statement query for subsequent +data retrieval. Derived classes must reimplement this function and +apply the query to the database. This function is called only +after the result is set to an inactive state and is positioned +before the first record of the new result. Derived classes should +return TRUE if the query was successful and ready to be used, +or FALSE otherwise. + +

void TQSqlResult::setActive ( bool a ) [virtual protected] +

+Protected function provided for derived classes to set the +internal active state to the value of a. +

See also isActive(). + +

void TQSqlResult::setAt ( int at ) [virtual protected] +

+Protected function provided for derived classes to set the +internal (zero-based) result index to at. +

See also at(). + +

void TQSqlResult::setForwardOnly ( bool forward ) [virtual protected] +

+Sets forward only mode to forward. If forward is TRUE only +fetchNext() is allowed for navigating the results. Forward only +mode needs far less memory since results do not have to be cached. +forward only mode is off by default. +

See also fetchNext(). + +

void TQSqlResult::setLastError ( const TQSqlError & e ) [virtual protected] +

+Protected function provided for derived classes to set the last +error to the value of e. +

See also lastError(). + +

void TQSqlResult::setQuery ( const TQString & query ) [virtual protected] +

+Sets the current query for the result to query. The result must +be reset() in order to execute the query on the database. + +

void TQSqlResult::setSelect ( bool s ) [virtual protected] +

+Protected function provided for derived classes to indicate +whether or not the current statement is a SQL SELECT statement. +The s parameter should be TRUE if the statement is a SELECT +statement, or FALSE otherwise. + +

int TQSqlResult::size () [pure virtual protected] +

+ +

Returns the size of the result or -1 if it cannot be determined. + + +


+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/qsqlselectcursor-h.html b/doc/html/qsqlselectcursor-h.html new file mode 100644 index 00000000..63c26147 --- /dev/null +++ b/doc/html/qsqlselectcursor-h.html @@ -0,0 +1,148 @@ + + + + + +qsqlselectcursor.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsqlselectcursor.h

+ +

This is the verbatim text of the qsqlselectcursor.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQSqlSelectCursor class
+**
+** Created : 2002-11-13
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql 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 retquirements 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 TQSQLSELECTCURSOR_H
+#define TQSQLSELECTCURSOR_H
+
+#ifndef QT_H
+#include "qsqlcursor.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define TQM_EXPORT_SQL
+#else
+#define TQM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class TQSqlSelectCursorPrivate;
+
+class TQM_EXPORT_SQL TQSqlSelectCursor : public TQSqlCursor
+{
+public:
+    TQSqlSelectCursor( const TQString& query = TQString::null, TQSqlDatabase* db = 0 );
+    TQSqlSelectCursor( const TQSqlSelectCursor& other );
+    ~TQSqlSelectCursor();
+    bool exec( const TQString& query );
+    bool select() { return TQSqlCursor::select(); }
+    
+protected:
+    TQSqlIndex primaryIndex( bool = TRUE ) const { return TQSqlIndex(); }
+    TQSqlIndex index( const TQStringList& ) const { return TQSqlIndex(); }
+    TQSqlIndex index( const TQString& ) const { return TQSqlIndex(); }
+    TQSqlIndex index( const char* ) const { return TQSqlIndex(); }
+    void setPrimaryIndex( const TQSqlIndex& ) {}
+    void append( const TQSqlFieldInfo& ) {}
+    void insert( int, const TQSqlFieldInfo& ) {}
+    void remove( int ) {}
+    void clear() {}
+    void setGenerated( const TQString&, bool ) {}
+    void setGenerated( int, bool ) {}
+    TQSqlRecord*	editBuffer( bool = FALSE ) { return 0; }
+    TQSqlRecord*	primeInsert() { return 0; }
+    TQSqlRecord*	primeUpdate() { return 0; }
+    TQSqlRecord*	primeDelete() { return 0; }
+    int	insert( bool = TRUE ) { return 0; }
+    int	update( bool = TRUE ) { return 0; }
+    int	del( bool = TRUE ) { return 0; }
+    void setMode( int ) {}
+
+    void setSort( const TQSqlIndex& ) {}
+    TQSqlIndex sort() const { return TQSqlIndex(); }
+    void setFilter( const TQString& ) {}
+    TQString filter() const { return TQString::null; }
+    void setName( const TQString&, bool = TRUE ) {}
+    TQString name() const { return TQString::null; }
+    TQString toString( const TQString& = TQString::null, const TQString& = "," ) const { return TQString::null; }
+    bool select( const TQString &, const TQSqlIndex& = TQSqlIndex() );
+
+private:
+    void populateCursor();
+    
+    TQSqlSelectCursorPrivate * d;
+};
+
+#endif // QT_NO_SQL
+#endif // TQSQLSELECTCURSOR_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlselectcursor-members.html b/doc/html/qsqlselectcursor-members.html new file mode 100644 index 00000000..4a5aedb3 --- /dev/null +++ b/doc/html/qsqlselectcursor-members.html @@ -0,0 +1,121 @@ + + + + + +TQSqlSelectCursor Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSqlSelectCursor

+ +

This is the complete list of member functions for +TQSqlSelectCursor, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsqlselectcursor.html b/doc/html/qsqlselectcursor.html new file mode 100644 index 00000000..10a25028 --- /dev/null +++ b/doc/html/qsqlselectcursor.html @@ -0,0 +1,93 @@ + + + + + +TQSqlSelectCursor Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSqlSelectCursor Class Reference
[sql module]

+ +

The TQSqlSelectCursor class provides browsing of general SQL +SELECT statements. +More... +

#include <qsqlselectcursor.h> +

Inherits TQSqlCursor. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQSqlSelectCursor class provides browsing of general SQL +SELECT statements. +

+ +

TQSqlSelectCursor is a convenience class that makes it possible to +display result sets from general SQL SELECT statements in +data-aware TQt widgets. TQSqlSelectCursor is read-only and does not +support INSERT, UPDATE or DELETE operations. +

Pass the query in at construction time, or use the +TQSqlSelectCursor::exec() function. +

Example: +

+    ...
+    TQSqlSelectCursor* cur = new TQSqlSelectCursor( "SELECT id, firstname, lastname FROM author" );
+    TQDataTable* table = new TQDataTable( this );
+    table->setSqlCursor( cur, TRUE, TRUE );
+    table->refresh();
+    ...
+    cur->exec( "SELECT * FROM books" );
+    table->refresh();
+    ...
+    
+ +

See also Database Classes. + +


Member Function Documentation

+

TQSqlSelectCursor::TQSqlSelectCursor ( const TQString & query = TQString::null, TQSqlDatabase * db = 0 ) +

+Constructs a read only cursor on database db using the query query. + +

TQSqlSelectCursor::TQSqlSelectCursor ( const TQSqlSelectCursor & other ) +

Constructs a copy of other +

TQSqlSelectCursor::~TQSqlSelectCursor () +

Destroys the object and frees any allocated resources + +

+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/qstack.html b/doc/html/qstack.html new file mode 100644 index 00000000..89a26d2c --- /dev/null +++ b/doc/html/qstack.html @@ -0,0 +1,47 @@ + + + + + +TQStack Class Reference (obsolete) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQStack Class Reference (obsolete)

+ + +

+#include <qstack.h>
+ +

The TQStack class has been renamed TQPtrStack in TQt 3.0. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstatusbar-h.html b/doc/html/qstatusbar-h.html new file mode 100644 index 00000000..b189a627 --- /dev/null +++ b/doc/html/qstatusbar-h.html @@ -0,0 +1,141 @@ + + + + + +qstatusbar.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qstatusbar.h

+ +

This is the verbatim text of the qstatusbar.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qstatusbar.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of TQStatusBar class
+**
+** Created : 980316
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSTATUSBAR_H
+#define TQSTATUSBAR_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#endif // QT_H
+
+#ifndef QT_NO_STATUSBAR
+
+
+class TQStatusBarPrivate;
+
+
+class Q_EXPORT TQStatusBar: public TQWidget
+{
+    Q_OBJECT
+    Q_PROPERTY( bool sizeGripEnabled READ isSizeGripEnabled WRITE setSizeGripEnabled )
+
+public:
+    TQStatusBar( TQWidget* parent=0, const char* name=0 );
+    virtual ~TQStatusBar();
+
+    virtual void addWidget( TQWidget *, int stretch = 0, bool = FALSE );
+    virtual void removeWidget( TQWidget * );
+
+    void setSizeGripEnabled(bool);
+    bool isSizeGripEnabled() const;
+
+public slots:
+    void message( const TQString &);
+    void message( const TQString &, int );
+    void clear();
+
+signals:
+    void messageChanged( const TQString &text );
+
+protected:
+    void paintEvent( TQPaintEvent * );
+    void resizeEvent( TQResizeEvent * );
+
+    void reformat();
+    void hideOrShow();
+    bool event( TQEvent *);
+
+private:
+    TQStatusBarPrivate * d;
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQStatusBar( const TQStatusBar & );
+    TQStatusBar& operator=( const TQStatusBar & );
+#endif
+};
+
+#endif // QT_NO_STATUSBAR
+
+#endif // TQSTATUSBAR_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstatusbar-m.png b/doc/html/qstatusbar-m.png new file mode 100644 index 00000000..58e48316 Binary files /dev/null and b/doc/html/qstatusbar-m.png differ diff --git a/doc/html/qstatusbar-members.html b/doc/html/qstatusbar-members.html new file mode 100644 index 00000000..b347a3c2 --- /dev/null +++ b/doc/html/qstatusbar-members.html @@ -0,0 +1,347 @@ + + + + + +TQStatusBar Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQStatusBar

+ +

This is the complete list of member functions for +TQStatusBar, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstatusbar-w.png b/doc/html/qstatusbar-w.png new file mode 100644 index 00000000..1b8f540b Binary files /dev/null and b/doc/html/qstatusbar-w.png differ diff --git a/doc/html/qstatusbar.html b/doc/html/qstatusbar.html new file mode 100644 index 00000000..d8a5ff89 --- /dev/null +++ b/doc/html/qstatusbar.html @@ -0,0 +1,217 @@ + + + + + +TQStatusBar Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQStatusBar Class Reference

+ +

The TQStatusBar class provides a horizontal bar suitable for +presenting status information. +More... +

#include <qstatusbar.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+ +

Public Slots

+
    +
  • void message ( const TQString & message )
  • +
  • void message ( const TQString & message, int ms )
  • +
  • void clear ()
  • +
+

Signals

+ +

Properties

+
    +
  • bool sizeGripEnabled - whether the TQSizeGrip in the bottom right of the status bar is enabled
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQStatusBar class provides a horizontal bar suitable for +presenting status information. +

+ + +

Each status indicator falls into one of three categories: +

    +
  • Temporary - briefly occupies most of the status bar. Used +to explain tool tip texts or menu entries, for example. +
  • Normal - occupies part of the status bar and may be hidden +by temporary messages. Used to display the page and line +number in a word processor, for example. +
  • Permanent - is never hidden. Used for important mode +indications, for example, some applications put a Caps Lock +indicator in the status bar. +
+

TQStatusBar lets you display all three types of indicators. +

To display a temporary message, call message() (perhaps by +connecting a suitable signal to it). To remove a temporary +message, call clear(). There are two variants of message(): one +that displays the message until the next clear() or message() and +one that has a time limit: +

+        connect( loader, SIGNAL(progressMessage(const TQString&)),
+                 statusBar(), SLOT(message(const TQString&)) );
+
+        statusBar()->message("Loading...");  // Initial message
+        loader.loadStuff();                  // Emits progress messages
+        statusBar()->message("Done.", 2000); // Final message for 2 seconds
+    
+ +

Normal and Permanent messages are displayed by creating a +small widget and then adding it to the status bar with +addWidget(). Widgets like TQLabel, TQProgressBar or even TQToolButton +are useful for adding to status bars. removeWidget() is used to +remove widgets. +

+        statusBar()->addWidget(new MyReadWriteIndication(statusBar()));
+    
+ +

By default TQStatusBar provides a TQSizeGrip in the lower-right +corner. You can disable it with setSizeGripEnabled(FALSE); +

+

See also TQToolBar, TQMainWindow, TQLabel, GUI Design Handbook: Status Bar, Main Window and Related Classes, and Help System. + +


Member Function Documentation

+

TQStatusBar::TQStatusBar ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a status bar called name with parent parent and +with a size grip. +

See also sizeGripEnabled. + +

TQStatusBar::~TQStatusBar () [virtual] +

+Destroys the status bar and frees any allocated resources and +child widgets. + +

void TQStatusBar::addWidget ( TQWidget * widget, int stretch = 0, bool permanent = FALSE ) [virtual] +

+Adds widget to this status bar. widget is reparented if it +isn't already a child of the TQStatusBar. +

widget is permanently visible if permanent is TRUE and may +be obscured by temporary messages if permanent is FALSE. The +default is FALSE. +

If permanent is TRUE, widget is located at the far right of +the status bar. If permanent is FALSE (the default), widget +is located just to the left of the first permanent widget. +

stretch is used to compute a suitable size for widget as the +status bar grows and shrinks. The default of 0 uses a minimum of +space. +

This function may cause some flicker. +

See also removeWidget(). + +

void TQStatusBar::clear () [slot] +

+Removes any temporary message being shown. +

See also message(). + +

void TQStatusBar::hideOrShow () [protected] +

+Ensures that the right widgets are visible. Used by message() and +clear(). + +

bool TQStatusBar::isSizeGripEnabled () const +

Returns TRUE if the TQSizeGrip in the bottom right of the status bar is enabled; otherwise returns FALSE. +See the "sizeGripEnabled" property for details. +

void TQStatusBar::message ( const TQString & message ) [slot] +

+Hides the normal status indicators and displays message until +clear() or another message() is called. +

See also clear(). + +

Example: regexptester/regexptester.cpp. +

void TQStatusBar::message ( const TQString & message, int ms ) [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Hides the normal status indications and displays message for ms milli-seconds or until clear() or another message() is called, +whichever occurs first. + +

void TQStatusBar::messageChanged ( const TQString & message ) [signal] +

+ +

This signal is emitted when the temporary status messages +changes. message is the new temporary message, and is a +null-string when the message has been removed. +

See also message() and clear(). + +

void TQStatusBar::paintEvent ( TQPaintEvent * ) [virtual protected] +

+Shows the temporary message, if appropriate. + +

Reimplemented from TQWidget. +

void TQStatusBar::reformat () [protected] +

+Changes the status bar's appearance to account for item changes. +Special subclasses may need this, but geometry management will +usually take care of any necessary rearrangements. + +

void TQStatusBar::removeWidget ( TQWidget * widget ) [virtual] +

+Removes widget from the status bar. +

This function may cause some flicker. +

Note that widget is not deleted. +

See also addWidget(). + +

void TQStatusBar::setSizeGripEnabled ( bool ) +

Sets whether the TQSizeGrip in the bottom right of the status bar is enabled. +See the "sizeGripEnabled" property for details. +


Property Documentation

+

bool sizeGripEnabled

+

This property holds whether the TQSizeGrip in the bottom right of the status bar is enabled. +

Enables or disables the TQSizeGrip in the bottom right of the +status bar. By default, the size grip is enabled. + +

Set this property's value with setSizeGripEnabled() and get this property's value with isSizeGripEnabled(). + +


+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/qstoreddrag-members.html b/doc/html/qstoreddrag-members.html new file mode 100644 index 00000000..a0edb457 --- /dev/null +++ b/doc/html/qstoreddrag-members.html @@ -0,0 +1,104 @@ + + + + + +TQStoredDrag Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQStoredDrag

+ +

This is the complete list of member functions for +TQStoredDrag, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstoreddrag.html b/doc/html/qstoreddrag.html new file mode 100644 index 00000000..71dbdc31 --- /dev/null +++ b/doc/html/qstoreddrag.html @@ -0,0 +1,93 @@ + + + + + +TQStoredDrag Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQStoredDrag Class Reference

+ +

The TQStoredDrag class provides a simple stored-value drag object for arbitrary MIME data. +More... +

#include <qdragobject.h> +

Inherits TQDragObject. +

Inherited by TQUriDrag and TQColorDrag. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQStoredDrag class provides a simple stored-value drag object for arbitrary MIME data. +

+

When a block of data has only one representation, you can use a +TQStoredDrag to hold it. +

For more information about drag and drop, see the TQDragObject +class and the drag and drop documentation. +

See also Drag And Drop Classes. + +


Member Function Documentation

+

TQStoredDrag::TQStoredDrag ( const char * mimeType, TQWidget * dragSource = 0, const char * name = 0 ) +

+Constructs a TQStoredDrag. The dragSource and name are passed +to the TQDragObject constructor, and the format is set to mimeType. +

The data will be unset. Use setEncodedData() to set it. + +

TQStoredDrag::~TQStoredDrag () +

+Destroys the drag object and frees up all allocated resources. + +

TQByteArray TQStoredDrag::encodedData ( const char * m ) const [virtual] +

+Returns the stored data. m contains the data's format. +

See also setEncodedData(). + +

Reimplemented from TQMimeSource. +

void TQStoredDrag::setEncodedData ( const TQByteArray & encodedData ) [virtual] +

+Sets the encoded data of this drag object to encodedData. The +encoded data is what's delivered to the drop sites. It must be in +a strictly defined and portable format. +

The drag object can't be dropped (by the user) until this function +has been called. + + +


+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/qstrilist-members.html b/doc/html/qstrilist-members.html new file mode 100644 index 00000000..6b4fc2ed --- /dev/null +++ b/doc/html/qstrilist-members.html @@ -0,0 +1,90 @@ + + + + + +TQStrIList Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQStrIList

+ +

This is the complete list of member functions for +TQStrIList, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstrilist.html b/doc/html/qstrilist.html new file mode 100644 index 00000000..8c95d07b --- /dev/null +++ b/doc/html/qstrilist.html @@ -0,0 +1,85 @@ + + + + + +TQStrIList Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQStrIList Class Reference

+ +

The TQStrIList class provides a doubly-linked list of char* +with case-insensitive comparison. +More... +

#include <qstrlist.h> +

Inherits TQStrList. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQStrIList class provides a doubly-linked list of char* +with case-insensitive comparison. +

+ +

This class is a TQPtrList<char> instance (a list of char*). +

TQStrIList is identical to TQStrList except that the virtual +compareItems() function is reimplemented to compare strings +case-insensitively. The inSort() function inserts strings in a +sorted order. In general it is fastest to insert the strings as +they come and sort() at the end; inSort() is useful when you just +have to add a few extra strings to an already sorted list. +

The TQStrListIterator class works for TQStrIList. +

See also TQStringList, Collection Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQStrIList::TQStrIList ( bool deepCopies = TRUE ) +

+ +

Constructs a list of strings. Will make deep copies of all +inserted strings if deepCopies is TRUE, or use shallow copies +if deepCopies is FALSE. + +

TQStrIList::~TQStrIList () +

+ +

Destroys the list. All strings are removed. + + +


+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/qstring-h.html b/doc/html/qstring-h.html new file mode 100644 index 00000000..34db545f --- /dev/null +++ b/doc/html/qstring-h.html @@ -0,0 +1,1160 @@ + + + + + +qstring.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qstring.h

+ +

This is the verbatim text of the qstring.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qstring.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of the TQString class, and related Unicode functions.
+**
+** Created : 920609
+**
+** 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 retquirements 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 TQSTRING_H
+#define TQSTRING_H
+
+#ifndef QT_H
+#include "qcstring.h"
+#endif // QT_H
+
+#ifndef QT_NO_CAST_ASCII
+#include <limits.h>
+#endif
+
+#ifndef QT_NO_STL
+#if defined ( Q_CC_MSVC_NET ) && _MSC_VER < 1310 // Avoids nasty warning for xlocale, line 450
+#  pragma warning ( push )
+#  pragma warning ( disable : 4189 )
+#  include <string>
+#  pragma warning ( pop )
+#else
+#  include <string>
+#endif
+#if defined(Q_WRONG_SB_CTYPE_MACROS) && defined(_SB_CTYPE_MACROS)
+#undef _SB_CTYPE_MACROS
+#endif
+#endif
+
+
+/*****************************************************************************
+  TQString class
+ *****************************************************************************/
+
+class TQRegExp;
+class TQString;
+class TQCharRef;
+template <class T> class TQDeepCopy;
+
+class Q_EXPORT TQChar {
+public:
+    TQChar();
+    TQChar( char c );
+    TQChar( uchar c );
+    TQChar( uchar c, uchar r );
+    TQChar( const TQChar& c ); // ### remove in 4.0 to allow compiler optimization
+    TQChar( ushort rc );
+    TQChar( short rc );
+    TQChar( uint rc );
+    TQChar( int rc );
+
+    QT_STATIC_CONST TQChar null;            // 0000
+    QT_STATIC_CONST TQChar replacement;     // FFFD
+    QT_STATIC_CONST TQChar byteOrderMark;     // FEFF
+    QT_STATIC_CONST TQChar byteOrderSwapped;     // FFFE
+    QT_STATIC_CONST TQChar nbsp;            // 00A0
+
+    // Unicode information
+
+    enum Category
+    {
+        NoCategory,
+
+        Mark_NonSpacing,          //   Mn
+        Mark_SpacingCombining,    //   Mc
+        Mark_Enclosing,           //   Me
+
+        Number_DecimalDigit,      //   Nd
+        Number_Letter,            //   Nl
+        Number_Other,             //   No
+
+        Separator_Space,          //   Zs
+        Separator_Line,           //   Zl
+        Separator_Paragraph,      //   Zp
+
+        Other_Control,            //   Cc
+        Other_Format,             //   Cf
+        Other_Surrogate,          //   Cs
+        Other_PrivateUse,         //   Co
+        Other_NotAssigned,        //   Cn
+
+        Letter_Uppercase,         //   Lu
+        Letter_Lowercase,         //   Ll
+        Letter_Titlecase,         //   Lt
+        Letter_Modifier,          //   Lm
+        Letter_Other,             //   Lo
+
+        Punctuation_Connector,    //   Pc
+        Punctuation_Dash,         //   Pd
+        Punctuation_Dask = Punctuation_Dash, // oops
+        Punctuation_Open,         //   Ps
+        Punctuation_Close,        //   Pe
+        Punctuation_InitialQuote, //   Pi
+        Punctuation_FinalQuote,   //   Pf
+        Punctuation_Other,        //   Po
+
+        Symbol_Math,              //   Sm
+        Symbol_Currency,          //   Sc
+        Symbol_Modifier,          //   Sk
+        Symbol_Other              //   So
+    };
+
+    enum Direction
+    {
+        DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON,
+        DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN
+    };
+
+    enum Decomposition
+    {
+        Single, Canonical, Font, NoBreak, Initial, Medial,
+        Final, Isolated, Circle, Super, Sub, Vertical,
+        Wide, Narrow, Small, Square, Compat, Fraction
+    };
+
+    enum Joining
+    {
+        OtherJoining, Dual, Right, Center
+    };
+
+    enum CombiningClass
+    {
+        Combining_BelowLeftAttached       = 200,
+        Combining_BelowAttached           = 202,
+        Combining_BelowRightAttached      = 204,
+        Combining_LeftAttached            = 208,
+        Combining_RightAttached           = 210,
+        Combining_AboveLeftAttached       = 212,
+        Combining_AboveAttached           = 214,
+        Combining_AboveRightAttached      = 216,
+
+        Combining_BelowLeft               = 218,
+        Combining_Below                   = 220,
+        Combining_BelowRight              = 222,
+        Combining_Left                    = 224,
+        Combining_Right                   = 226,
+        Combining_AboveLeft               = 228,
+        Combining_Above                   = 230,
+        Combining_AboveRight              = 232,
+
+        Combining_DoubleBelow             = 233,
+        Combining_DoubleAbove             = 234,
+        Combining_IotaSubscript           = 240
+    };
+
+    // ****** WHEN ADDING FUNCTIONS, CONSIDER ADDING TO TQCharRef TOO
+
+    int digitValue() const;
+    TQChar lower() const;
+    TQChar upper() const;
+
+    Category category() const;
+    Direction direction() const;
+    Joining joining() const;
+    bool mirrored() const;
+    TQChar mirroredChar() const;
+    const TQString &decomposition() const; // ### return just TQString in 4.0
+    Decomposition decompositionTag() const;
+    unsigned char combiningClass() const;
+
+    char latin1() const { return ucs > 0xff ? 0 : (char) ucs; }
+    ushort unicode() const { return ucs; }
+#ifdef Q_NO_PACKED_REFERENCE
+    ushort &unicode() { return *(&ucs); }
+#else
+    ushort &unicode() { return ucs; }
+#endif
+#ifndef QT_NO_CAST_ASCII
+    // like all ifdef'd code this is undocumented
+    operator char() const { return latin1(); }
+#endif
+
+    bool isNull() const { return unicode()==0; }
+    bool isPrint() const;
+    bool isPunct() const;
+    bool isSpace() const;
+    bool isMark() const;
+    bool isLetter() const;
+    bool isNumber() const;
+    bool isLetterOrNumber() const;
+    bool isDigit() const;
+    bool isSymbol() const;
+
+    uchar cell() const { return ((uchar) ucs & 0xff); }
+    uchar row() const { return ((uchar) (ucs>>8)&0xff); }
+    void setCell( uchar cell ) { ucs = (ucs & 0xff00) + cell; }
+    void setRow( uchar row ) { ucs = (((ushort) row)<<8) + (ucs&0xff); }
+
+    static bool networkOrdered() {
+	int wordSize;
+	bool bigEndian = FALSE;
+	qSysInfo( &wordSize, &bigEndian );
+	return bigEndian;
+    }
+
+    friend inline bool operator==( char ch, TQChar c );
+    friend inline bool operator==( TQChar c, char ch );
+    friend inline bool operator==( TQChar c1, TQChar c2 );
+    friend inline bool operator!=( TQChar c1, TQChar c2 );
+    friend inline bool operator!=( char ch, TQChar c );
+    friend inline bool operator!=( TQChar c, char ch );
+    friend inline bool operator<=( TQChar c, char ch );
+    friend inline bool operator<=( char ch, TQChar c );
+    friend inline bool operator<=( TQChar c1, TQChar c2 );
+
+private:
+    ushort ucs;
+#if defined(QT_QSTRING_UCS_4)
+    ushort grp;
+#endif
+} Q_PACKED;
+
+inline TQChar::TQChar() : ucs( 0 )
+#ifdef QT_QSTRING_UCS_4
+    , grp( 0 )
+#endif
+{
+}
+inline TQChar::TQChar( char c ) : ucs( (uchar)c )
+#ifdef QT_QSTRING_UCS_4
+    , grp( 0 )
+#endif
+{
+}
+inline TQChar::TQChar( uchar c ) : ucs( c )
+#ifdef QT_QSTRING_UCS_4
+    , grp( 0 )
+#endif
+{
+}
+inline TQChar::TQChar( uchar c, uchar r ) : ucs( (r << 8) | c )
+#ifdef QT_QSTRING_UCS_4
+    , grp( 0 )
+#endif
+{
+}
+inline TQChar::TQChar( const TQChar& c ) : ucs( c.ucs )
+#ifdef QT_QSTRING_UCS_4
+   , grp( c.grp )
+#endif
+{
+}
+
+inline TQChar::TQChar( ushort rc ) : ucs( rc )
+#ifdef QT_QSTRING_UCS_4
+    , grp( 0 )
+#endif
+{
+}
+inline TQChar::TQChar( short rc ) : ucs( (ushort) rc )
+#ifdef QT_QSTRING_UCS_4
+    , grp( 0 )
+#endif
+{
+}
+inline TQChar::TQChar( uint rc ) : ucs(  (ushort ) (rc & 0xffff) )
+#ifdef QT_QSTRING_UCS_4
+    , grp( (ushort) ((rc >> 16) & 0xffff) )
+#endif
+{
+}
+inline TQChar::TQChar( int rc ) : ucs( (ushort) (rc & 0xffff) )
+#ifdef QT_QSTRING_UCS_4
+    , grp( (ushort) ((rc >> 16) & 0xffff) )
+#endif
+{
+}
+
+inline bool operator==( char ch, TQChar c )
+{
+    return ((uchar) ch) == c.ucs;
+}
+
+inline bool operator==( TQChar c, char ch )
+{
+    return ((uchar) ch) == c.ucs;
+}
+
+inline bool operator==( TQChar c1, TQChar c2 )
+{
+    return c1.ucs == c2.ucs;
+}
+
+inline bool operator!=( TQChar c1, TQChar c2 )
+{
+    return c1.ucs != c2.ucs;
+}
+
+inline bool operator!=( char ch, TQChar c )
+{
+    return ((uchar)ch) != c.ucs;
+}
+
+inline bool operator!=( TQChar c, char ch )
+{
+    return ((uchar) ch) != c.ucs;
+}
+
+inline bool operator<=( TQChar c, char ch )
+{
+    return c.ucs <= ((uchar) ch);
+}
+
+inline bool operator<=( char ch, TQChar c )
+{
+    return ((uchar) ch) <= c.ucs;
+}
+
+inline bool operator<=( TQChar c1, TQChar c2 )
+{
+    return c1.ucs <= c2.ucs;
+}
+
+inline bool operator>=( TQChar c, char ch ) { return ch <= c; }
+inline bool operator>=( char ch, TQChar c ) { return c <= ch; }
+inline bool operator>=( TQChar c1, TQChar c2 ) { return c2 <= c1; }
+inline bool operator<( TQChar c, char ch ) { return !(ch<=c); }
+inline bool operator<( char ch, TQChar c ) { return !(c<=ch); }
+inline bool operator<( TQChar c1, TQChar c2 ) { return !(c2<=c1); }
+inline bool operator>( TQChar c, char ch ) { return !(ch>=c); }
+inline bool operator>( char ch, TQChar c ) { return !(c>=ch); }
+inline bool operator>( TQChar c1, TQChar c2 ) { return !(c2>=c1); }
+
+// internal
+struct Q_EXPORT TQStringData : public TQShared {
+    TQStringData() :
+        TQShared(), unicode(0), ascii(0), len(0), issimpletext(TRUE), maxl(0), islatin1(FALSE) { ref(); }
+    TQStringData(TQChar *u, uint l, uint m) :
+        TQShared(), unicode(u), ascii(0), len(l), issimpletext(FALSE), maxl(m), islatin1(FALSE) { }
+    ~TQStringData() { if ( unicode ) delete[] ((char*)unicode);
+                     if ( ascii ) delete[] ascii; }
+
+    void deleteSelf();
+    TQChar *unicode;
+    char *ascii;
+    void setDirty() {
+	if ( ascii ) {
+	    delete [] ascii;
+	    ascii = 0;
+	}
+	issimpletext = FALSE;
+    }
+#ifdef Q_OS_MAC9
+    uint len;
+#else
+    uint len : 30;
+#endif
+    uint issimpletext : 1;
+#ifdef Q_OS_MAC9
+    uint maxl;
+#else
+    uint maxl : 30;
+#endif
+    uint islatin1 : 1;
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQStringData( const TQStringData& );
+    TQStringData& operator=( const TQStringData& );
+#endif
+};
+
+
+class Q_EXPORT TQString
+{
+public:
+    TQString();                                  // make null string
+    TQString( TQChar );                           // one-char string
+    TQString( const TQString & );                 // impl-shared copy
+    TQString( const TQByteArray& );               // deep copy
+    TQString( const TQChar* unicode, uint length ); // deep copy
+#ifndef QT_NO_CAST_ASCII
+    TQString( const char *str );                 // deep copy
+#endif
+#ifndef QT_NO_STL
+    TQString( const std::string& );                   // deep copy
+#endif
+    ~TQString();
+
+    TQString    &operator=( const TQString & );   // impl-shared copy
+    TQString    &operator=( const char * );      // deep copy
+#ifndef QT_NO_STL
+    TQString    &operator=( const std::string& );     // deep copy
+#endif
+    TQString    &operator=( const TQCString& );   // deep copy
+    TQString    &operator=( TQChar c );
+    TQString    &operator=( char c );
+
+    QT_STATIC_CONST TQString null;
+
+    bool        isNull()        const;
+    bool        isEmpty()       const;
+    uint        length()        const;
+    void        truncate( uint pos );
+
+    TQString &   fill( TQChar c, int len = -1 );
+
+    TQString     copy()  const;
+
+    TQString arg( long a, int fieldWidth = 0, int base = 10 ) const;
+    TQString arg( ulong a, int fieldWidth = 0, int base = 10 ) const;
+    TQString arg( Q_LLONG a, int fieldwidth=0, int base=10 ) const;
+    TQString arg( Q_ULLONG a, int fieldwidth=0, int base=10 ) const;
+    TQString arg( int a, int fieldWidth = 0, int base = 10 ) const;
+    TQString arg( uint a, int fieldWidth = 0, int base = 10 ) const;
+    TQString arg( short a, int fieldWidth = 0, int base = 10 ) const;
+    TQString arg( ushort a, int fieldWidth = 0, int base = 10 ) const;
+    TQString arg( double a, int fieldWidth = 0, char fmt = 'g',
+		 int prec = -1 ) const;
+    TQString arg( char a, int fieldWidth = 0 ) const;
+    TQString arg( TQChar a, int fieldWidth = 0 ) const;
+    TQString arg( const TQString& a, int fieldWidth = 0 ) const;
+    TQString arg( const TQString& a1, const TQString& a2 ) const;
+    TQString arg( const TQString& a1, const TQString& a2,
+		 const TQString& a3 ) const;
+    TQString arg( const TQString& a1, const TQString& a2, const TQString& a3,
+		 const TQString& a4 ) const;
+
+#ifndef QT_NO_SPRINTF
+    TQString    &sprintf( const char* format, ... )
+#if defined(Q_CC_GNU) && !defined(__INSURE__)
+        __attribute__ ((format (printf, 2, 3)))
+#endif
+        ;
+#endif
+
+    int         find( TQChar c, int index=0, bool cs=TRUE ) const;
+    int         find( char c, int index=0, bool cs=TRUE ) const;
+    int         find( const TQString &str, int index=0, bool cs=TRUE ) const;
+#ifndef QT_NO_REGEXP
+    int         find( const TQRegExp &, int index=0 ) const;
+#endif
+#ifndef QT_NO_CAST_ASCII
+    int         find( const char* str, int index=0 ) const;
+#endif
+    int         findRev( TQChar c, int index=-1, bool cs=TRUE) const;
+    int         findRev( char c, int index=-1, bool cs=TRUE) const;
+    int         findRev( const TQString &str, int index=-1, bool cs=TRUE) const;
+#ifndef QT_NO_REGEXP
+    int         findRev( const TQRegExp &, int index=-1 ) const;
+#endif
+#ifndef QT_NO_CAST_ASCII
+    int         findRev( const char* str, int index=-1 ) const;
+#endif
+    int         contains( TQChar c, bool cs=TRUE ) const;
+    int         contains( char c, bool cs=TRUE ) const
+                    { return contains(TQChar(c), cs); }
+#ifndef QT_NO_CAST_ASCII
+    int         contains( const char* str, bool cs=TRUE ) const;
+#endif
+    int         contains( const TQString &str, bool cs=TRUE ) const;
+#ifndef QT_NO_REGEXP
+    int         contains( const TQRegExp & ) const;
+#endif
+
+    enum SectionFlags {
+	SectionDefault             = 0x00,
+	SectionSkipEmpty           = 0x01,
+	SectionIncludeLeadingSep   = 0x02,
+	SectionIncludeTrailingSep  = 0x04,
+	SectionCaseInsensitiveSeps = 0x08
+    };
+    TQString     section( TQChar sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const;
+    TQString     section( char sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const;
+#ifndef QT_NO_CAST_ASCII
+    TQString      section( const char *in_sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const;
+#endif
+    TQString     section( const TQString &in_sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const;
+#ifndef QT_NO_REGEXP
+    TQString     section( const TQRegExp &reg, int start, int end = 0xffffffff, int flags = SectionDefault ) const;
+#endif
+
+    TQString     left( uint len )  const;
+    TQString     right( uint len ) const;
+    TQString     mid( uint index, uint len=0xffffffff) const;
+
+    TQString     leftJustify( uint width, TQChar fill=' ', bool trunc=FALSE)const;
+    TQString     rightJustify( uint width, TQChar fill=' ',bool trunc=FALSE)const;
+
+    TQString     lower() const;
+    TQString     upper() const;
+
+    TQString     stripWhiteSpace()       const;
+    TQString     simplifyWhiteSpace()    const;
+
+    TQString    &insert( uint index, const TQString & );
+#ifndef QT_NO_CAST_ASCII
+    TQString    &insert( uint index, const TQByteArray & );
+    TQString    &insert( uint index, const char * );
+#endif
+    TQString    &insert( uint index, const TQChar*, uint len );
+    TQString    &insert( uint index, TQChar );
+    TQString    &insert( uint index, char c ) { return insert(index,TQChar(c)); }
+    TQString    &append( char );
+    TQString    &append( TQChar );
+    TQString    &append( const TQString & );
+#ifndef QT_NO_CAST_ASCII
+    TQString    &append( const TQByteArray & );
+    TQString    &append( const char * );
+#endif
+#if !defined(QT_NO_STL) && !defined(QT_NO_CAST_ASCII)
+    TQString    &append( const std::string& );
+#endif
+    TQString    &prepend( char );
+    TQString    &prepend( TQChar );
+    TQString    &prepend( const TQString & );
+#ifndef QT_NO_CAST_ASCII
+    TQString    &prepend( const TQByteArray & );
+    TQString    &prepend( const char * );
+#endif
+#if !defined(QT_NO_STL) && !defined(QT_NO_CAST_ASCII)
+    TQString    &prepend( const std::string& );
+#endif
+    TQString    &remove( uint index, uint len );
+#if defined(Q_QDOC)
+    TQString    &remove( const TQString & str, bool cs = TRUE );
+#else
+    // ### TQt 4.0: merge these two into one, and remove Q_QDOC hack
+    TQString    &remove( const TQString & );
+    TQString    &remove( const TQString &, bool cs );
+#endif
+    TQString    &remove( TQChar c );
+    TQString    &remove( char c )
+    { return remove( TQChar(c) ); }
+#ifndef QT_NO_CAST_ASCII
+    TQString    &remove( const char * );
+#endif
+#ifndef QT_NO_REGEXP
+    TQString    &remove( const TQRegExp & );
+#endif
+    TQString    &replace( uint index, uint len, const TQString & );
+    TQString    &replace( uint index, uint len, const TQChar*, uint clen );
+    TQString    &replace( uint index, uint len, TQChar );
+    TQString    &replace( uint index, uint len, char c )
+    { return replace( index, len, TQChar(c) ); }
+#if defined(Q_QDOC)
+    TQString    &replace( TQChar c, const TQString & after, bool cs = TRUE );
+    TQString    &replace( char c, const TQString & after, bool cs = TRUE );
+    TQString    &replace( const TQString & before, const TQString & after,
+			 bool cs = TRUE );
+#else
+    // ### TQt 4.0: merge these two into one, and remove Q_QDOC hack
+    TQString    &replace( TQChar c, const TQString & );
+    TQString    &replace( TQChar c, const TQString &, bool );
+
+    // ### TQt 4.0: merge these two into one, and remove Q_QDOC hack
+    TQString    &replace( char c, const TQString & after )
+    { return replace( TQChar(c), after, TRUE ); }
+    TQString    &replace( char c, const TQString & after, bool cs )
+    { return replace( TQChar(c), after, cs ); }
+
+    // ### TQt 4.0: merge these two into one, and remove Q_QDOC hack
+    TQString    &replace( const TQString &, const TQString & );
+    TQString    &replace( const TQString &, const TQString &, bool );
+#endif
+#ifndef QT_NO_REGEXP_CAPTURE
+    TQString    &replace( const TQRegExp &, const TQString & );
+#endif
+    TQString    &replace( TQChar, TQChar );
+
+    short       toShort( bool *ok=0, int base=10 )      const;
+    ushort      toUShort( bool *ok=0, int base=10 )     const;
+    int         toInt( bool *ok=0, int base=10 )        const;
+    uint        toUInt( bool *ok=0, int base=10 )       const;
+    long        toLong( bool *ok=0, int base=10 )       const;
+    ulong       toULong( bool *ok=0, int base=10 )      const;
+    Q_LLONG     toLongLong( bool *ok=0, int base=10 )   const;
+    Q_ULLONG    toULongLong( bool *ok=0, int base=10 )  const;
+    float       toFloat( bool *ok=0 )   const;
+    double      toDouble( bool *ok=0 )  const;
+
+    TQString    &setNum( short, int base=10 );
+    TQString    &setNum( ushort, int base=10 );
+    TQString    &setNum( int, int base=10 );
+    TQString    &setNum( uint, int base=10 );
+    TQString    &setNum( long, int base=10 );
+    TQString    &setNum( ulong, int base=10 );
+    TQString    &setNum( Q_LLONG, int base=10 );
+    TQString    &setNum( Q_ULLONG, int base=10 );
+    TQString    &setNum( float, char f='g', int prec=6 );
+    TQString    &setNum( double, char f='g', int prec=6 );
+
+    static TQString number( long, int base=10 );
+    static TQString number( ulong, int base=10);
+    static TQString number( Q_LLONG, int base=10 );
+    static TQString number( Q_ULLONG, int base=10);
+    static TQString number( int, int base=10 );
+    static TQString number( uint, int base=10);
+    static TQString number( double, char f='g', int prec=6 );
+
+    void        setExpand( uint index, TQChar c );
+
+    TQString    &operator+=( const TQString &str );
+#ifndef QT_NO_CAST_ASCII
+    TQString    &operator+=( const TQByteArray &str );
+    TQString    &operator+=( const char *str );
+#endif
+#if !defined(QT_NO_STL) && !defined(QT_NO_CAST_ASCII)
+    TQString    &operator+=( const std::string& );
+#endif
+    TQString    &operator+=( TQChar c );
+    TQString    &operator+=( char c );
+
+    TQChar at( uint i ) const
+        { return i < d->len ? d->unicode[i] : TQChar::null; }
+    TQChar operator[]( int i ) const { return at((uint)i); }
+    TQCharRef at( uint i );
+    TQCharRef operator[]( int i );
+
+    TQChar constref(uint i) const
+        { return at(i); }
+    TQChar& ref(uint i)
+        { // Optimized for easy-inlining by simple compilers.
+            if ( d->count != 1 || i >= d->len )
+                subat( i );
+            d->setDirty();
+            return d->unicode[i];
+        }
+
+    const TQChar* unicode() const { return d->unicode; }
+    const char* ascii() const;
+    static TQString fromAscii(const char*, int len=-1);
+    const char* latin1() const;
+    static TQString fromLatin1(const char*, int len=-1);
+    TQCString utf8() const;
+    static TQString fromUtf8(const char*, int len=-1);
+    TQCString local8Bit() const;
+    static TQString fromLocal8Bit(const char*, int len=-1);
+    bool operator!() const;
+#ifndef QT_NO_ASCII_CAST
+    operator const char *() const { return ascii(); }
+#endif
+#ifndef QT_NO_STL
+    operator std::string() const { return ascii() ? ascii() : ""; }
+#endif
+
+    static TQString fromUcs2( const unsigned short *ucs2 );
+    const unsigned short *ucs2() const;
+
+    TQString &setUnicode( const TQChar* unicode, uint len );
+    TQString &setUnicodeCodes( const ushort* unicode_as_ushorts, uint len );
+    TQString &setAscii( const char*, int len=-1 );
+    TQString &setLatin1( const char*, int len=-1 );
+
+    int compare( const TQString& s ) const;
+    static int compare( const TQString& s1, const TQString& s2 )
+    { return s1.compare( s2 ); }
+
+    int localeAwareCompare( const TQString& s ) const;
+    static int localeAwareCompare( const TQString& s1, const TQString& s2 )
+    { return s1.localeAwareCompare( s2 ); }
+
+#ifndef QT_NO_DATASTREAM
+    friend Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQString & );
+#endif
+
+    void compose();
+
+#ifndef QT_NO_COMPAT
+    const char* data() const { return ascii(); }
+#endif
+
+#if defined(Q_QDOC)
+    bool startsWith( const TQString& str, bool cs = TRUE ) const;
+    bool endsWith( const TQString& str, bool cs = TRUE ) const;
+#else
+    // ### TQt 4.0: merge these two into one, and remove Q_QDOC hack
+    bool startsWith( const TQString& str ) const;
+    bool startsWith( const TQString& str, bool cs ) const;
+
+    // ### TQt 4.0: merge these two into one, and remove Q_QDOC hack
+    bool endsWith( const TQString& str ) const;
+    bool endsWith( const TQString& str, bool cs ) const;
+#endif
+
+    void setLength( uint newLength );
+
+    uint capacity() const;
+    void reserve( uint minCapacity );
+    void squeeze();
+
+    bool simpleText() const { if ( !d->issimpletext ) checkSimpleText(); return (bool)d->issimpletext; }
+    bool isRightToLeft() const;
+
+
+private:
+    TQString( int size, bool /* dummy */ );	// allocate size incl. \0
+
+    void deref();
+    void real_detach();
+    void subat( uint );
+    TQString multiArg( int numArgs, const TQString& a1, const TQString& a2,
+		      const TQString& a3 = TQString::null,
+		      const TQString& a4 = TQString::null ) const;
+
+    void checkSimpleText() const;
+    void grow( uint newLength );
+#ifndef QT_NO_CAST_ASCII
+    TQString &insertHelper( uint index, const char *s, uint len=UINT_MAX );
+    TQString &operatorPlusEqHelper( const char *s, uint len2=UINT_MAX );
+#endif
+
+    static TQChar* latin1ToUnicode( const char*, uint * len, uint maxlen=(uint)-1 );
+    static TQChar* latin1ToUnicode( const TQByteArray&, uint * len );
+    static char* unicodeToLatin1( const TQChar*, uint len );
+
+    TQStringData *d;
+    static TQStringData* shared_null;
+    static TQStringData* makeSharedNull();
+
+    friend class TQConstString;
+    friend class TQTextStream;
+    TQString( TQStringData* dd, bool /* dummy */ ) : d(dd) { }
+
+    // needed for TQDeepCopy
+    void detach();
+    friend class TQDeepCopy<TQString>;
+};
+
+class Q_EXPORT TQCharRef {
+    friend class TQString;
+    TQString& s;
+    uint p;
+    TQCharRef(TQString* str, uint pos) : s(*str), p(pos) { }
+
+public:
+    // most TQChar operations repeated here
+
+    // all this is not documented: We just say "like TQChar" and let it be.
+#ifndef Q_QDOC
+    ushort unicode() const { return s.constref(p).unicode(); }
+    char latin1() const { return s.constref(p).latin1(); }
+
+    // An operator= for each TQChar cast constructors
+    TQCharRef operator=(char c ) { s.ref(p)=c; return *this; }
+    TQCharRef operator=(uchar c ) { s.ref(p)=c; return *this; }
+    TQCharRef operator=(TQChar c ) { s.ref(p)=c; return *this; }
+    TQCharRef operator=(const TQCharRef& c ) { s.ref(p)=c.unicode(); return *this; }
+    TQCharRef operator=(ushort rc ) { s.ref(p)=rc; return *this; }
+    TQCharRef operator=(short rc ) { s.ref(p)=rc; return *this; }
+    TQCharRef operator=(uint rc ) { s.ref(p)=rc; return *this; }
+    TQCharRef operator=(int rc ) { s.ref(p)=rc; return *this; }
+
+    operator TQChar () const { return s.constref(p); }
+
+    // each function...
+    bool isNull() const { return unicode()==0; }
+    bool isPrint() const { return s.constref(p).isPrint(); }
+    bool isPunct() const { return s.constref(p).isPunct(); }
+    bool isSpace() const { return s.constref(p).isSpace(); }
+    bool isMark() const { return s.constref(p).isMark(); }
+    bool isLetter() const { return s.constref(p).isLetter(); }
+    bool isNumber() const { return s.constref(p).isNumber(); }
+    bool isLetterOrNumber() { return s.constref(p).isLetterOrNumber(); }
+    bool isDigit() const { return s.constref(p).isDigit(); }
+
+    int digitValue() const { return s.constref(p).digitValue(); }
+    TQChar lower() const { return s.constref(p).lower(); }
+    TQChar upper() const { return s.constref(p).upper(); }
+
+    TQChar::Category category() const { return s.constref(p).category(); }
+    TQChar::Direction direction() const { return s.constref(p).direction(); }
+    TQChar::Joining joining() const { return s.constref(p).joining(); }
+    bool mirrored() const { return s.constref(p).mirrored(); }
+    TQChar mirroredChar() const { return s.constref(p).mirroredChar(); }
+    const TQString &decomposition() const { return s.constref(p).decomposition(); }
+    TQChar::Decomposition decompositionTag() const { return s.constref(p).decompositionTag(); }
+    unsigned char combiningClass() const { return s.constref(p).combiningClass(); }
+
+    // Not the non-const ones of these.
+    uchar cell() const { return s.constref(p).cell(); }
+    uchar row() const { return s.constref(p).row(); }
+#endif
+};
+
+inline TQCharRef TQString::at( uint i ) { return TQCharRef(this,i); }
+inline TQCharRef TQString::operator[]( int i ) { return at((uint)i); }
+
+
+class Q_EXPORT TQConstString : private TQString {
+public:
+    TQConstString( const TQChar* unicode, uint length );
+    ~TQConstString();
+    const TQString& string() const { return *this; }
+};
+
+
+/*****************************************************************************
+  TQString stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQString & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQString & );
+#endif
+
+/*****************************************************************************
+  TQString inline functions
+ *****************************************************************************/
+
+// These two move code into makeSharedNull() and deletesData()
+// to improve cache-coherence (and reduce code bloat), while
+// keeping the common cases fast.
+//
+// No safe way to pre-init shared_null on ALL compilers/linkers.
+inline TQString::TQString() :
+    d(shared_null ? shared_null : makeSharedNull())
+{
+    d->ref();
+}
+//
+inline TQString::~TQString()
+{
+    if ( d->deref() ) {
+        if ( d != shared_null )
+	    d->deleteSelf();
+    }
+}
+
+// needed for TQDeepCopy
+inline void TQString::detach()
+{ real_detach(); }
+
+inline TQString TQString::section( TQChar sep, int start, int end, int flags ) const
+{ return section(TQString(sep), start, end, flags); }
+
+inline TQString TQString::section( char sep, int start, int end, int flags ) const
+{ return section(TQChar(sep), start, end, flags); }
+
+#ifndef QT_NO_CAST_ASCII
+inline TQString TQString::section( const char *in_sep, int start, int end, int flags ) const
+{ return section(TQString(in_sep), start, end, flags); }
+#endif
+
+inline TQString &TQString::operator=( TQChar c )
+{ *this = TQString(c); return *this; }
+
+inline TQString &TQString::operator=( char c )
+{ *this = TQString(TQChar(c)); return *this; }
+
+inline bool TQString::isNull() const
+{ return unicode() == 0; }
+
+inline bool TQString::operator!() const
+{ return isNull(); }
+
+inline uint TQString::length() const
+{ return d->len; }
+
+inline uint TQString::capacity() const
+{ return d->maxl; }
+
+inline bool TQString::isEmpty() const
+{ return length() == 0; }
+
+inline TQString TQString::copy() const
+{ return TQString( *this ); }
+
+#ifndef QT_NO_CAST_ASCII
+inline TQString &TQString::insert( uint index, const char *s )
+{ return insertHelper( index, s ); }
+
+inline TQString &TQString::insert( uint index, const TQByteArray &s )
+{
+    int pos = s.find( 0 );
+    return insertHelper( index, s, pos==-1 ? s.size() : pos );
+}
+#endif
+
+inline TQString &TQString::prepend( const TQString & s )
+{ return insert(0,s); }
+
+inline TQString &TQString::prepend( TQChar c )
+{ return insert(0,c); }
+
+inline TQString &TQString::prepend( char c )
+{ return insert(0,c); }
+
+#ifndef QT_NO_CAST_ASCII
+inline TQString &TQString::prepend( const TQByteArray & s )
+{ return insert(0,s); }
+#endif
+
+#ifndef QT_NO_CAST_ASCII
+inline TQString &TQString::operator+=( const TQByteArray &s )
+{
+    int pos = s.find( 0 );
+    return operatorPlusEqHelper( s, pos==-1 ? s.size() : pos );
+}
+#endif
+
+inline TQString &TQString::append( const TQString & s )
+{ return operator+=(s); }
+
+#ifndef QT_NO_CAST_ASCII
+inline TQString &TQString::append( const TQByteArray &s )
+{ return operator+=(s); }
+
+inline TQString &TQString::append( const char * s )
+{ return operator+=(s); }
+#endif
+
+inline TQString &TQString::append( TQChar c )
+{ return operator+=(c); }
+
+inline TQString &TQString::append( char c )
+{ return operator+=(c); }
+
+#ifndef QT_NO_STL
+inline TQString &TQString::operator=( const std::string& str )
+{ return operator=(str.c_str()); }
+#ifndef QT_NO_CAST_ASCII
+inline TQString &TQString::operator+=( const std::string& s )
+{ return operator+=(s.c_str()); }
+inline TQString &TQString::append( const std::string& s )
+{ return operator+=(s); }
+inline TQString &TQString::prepend( const std::string& s )
+{ return insert(0, s); }
+#endif
+#endif
+
+inline TQString &TQString::setNum( short n, int base )
+{ return setNum((Q_LLONG)n, base); }
+
+inline TQString &TQString::setNum( ushort n, int base )
+{ return setNum((Q_ULLONG)n, base); }
+
+inline TQString &TQString::setNum( int n, int base )
+{ return setNum((Q_LLONG)n, base); }
+
+inline TQString &TQString::setNum( uint n, int base )
+{ return setNum((Q_ULLONG)n, base); }
+
+inline TQString &TQString::setNum( float n, char f, int prec )
+{ return setNum((double)n,f,prec); }
+
+inline TQString TQString::arg( int a, int fieldWidth, int base ) const
+{ return arg( (Q_LLONG)a, fieldWidth, base ); }
+
+inline TQString TQString::arg( uint a, int fieldWidth, int base ) const
+{ return arg( (Q_ULLONG)a, fieldWidth, base ); }
+
+inline TQString TQString::arg( short a, int fieldWidth, int base ) const
+{ return arg( (Q_LLONG)a, fieldWidth, base ); }
+
+inline TQString TQString::arg( ushort a, int fieldWidth, int base ) const
+{ return arg( (Q_ULLONG)a, fieldWidth, base ); }
+
+inline TQString TQString::arg( const TQString& a1, const TQString& a2 ) const {
+    return multiArg( 2, a1, a2 );
+}
+
+inline TQString TQString::arg( const TQString& a1, const TQString& a2,
+			     const TQString& a3 ) const {
+    return multiArg( 3, a1, a2, a3 );
+}
+
+inline TQString TQString::arg( const TQString& a1, const TQString& a2,
+			     const TQString& a3, const TQString& a4 ) const {
+    return multiArg( 4, a1, a2, a3, a4 );
+}
+
+inline int TQString::find( char c, int index, bool cs ) const
+{ return find(TQChar(c), index, cs); }
+
+inline int TQString::findRev( char c, int index, bool cs ) const
+{ return findRev( TQChar(c), index, cs ); }
+
+#ifndef QT_NO_CAST_ASCII
+inline int TQString::find( const char* str, int index ) const
+{ return find(TQString::fromAscii(str), index); }
+
+inline int TQString::findRev( const char* str, int index ) const
+{ return findRev(TQString::fromAscii(str), index); }
+#endif
+
+
+/*****************************************************************************
+  TQString non-member operators
+ *****************************************************************************/
+
+Q_EXPORT bool operator!=( const TQString &s1, const TQString &s2 );
+Q_EXPORT bool operator<( const TQString &s1, const TQString &s2 );
+Q_EXPORT bool operator<=( const TQString &s1, const TQString &s2 );
+Q_EXPORT bool operator==( const TQString &s1, const TQString &s2 );
+Q_EXPORT bool operator>( const TQString &s1, const TQString &s2 );
+Q_EXPORT bool operator>=( const TQString &s1, const TQString &s2 );
+#ifndef QT_NO_CAST_ASCII
+Q_EXPORT bool operator!=( const TQString &s1, const char *s2 );
+Q_EXPORT bool operator<( const TQString &s1, const char *s2 );
+Q_EXPORT bool operator<=( const TQString &s1, const char *s2 );
+Q_EXPORT bool operator==( const TQString &s1, const char *s2 );
+Q_EXPORT bool operator>( const TQString &s1, const char *s2 );
+Q_EXPORT bool operator>=( const TQString &s1, const char *s2 );
+Q_EXPORT bool operator!=( const char *s1, const TQString &s2 );
+Q_EXPORT bool operator<( const char *s1, const TQString &s2 );
+Q_EXPORT bool operator<=( const char *s1, const TQString &s2 );
+Q_EXPORT bool operator==( const char *s1, const TQString &s2 );
+//Q_EXPORT bool operator>( const char *s1, const TQString &s2 ); // MSVC++
+Q_EXPORT bool operator>=( const char *s1, const TQString &s2 );
+#endif
+
+Q_EXPORT inline const TQString operator+( const TQString &s1, const TQString &s2 )
+{
+    TQString tmp( s1 );
+    tmp += s2;
+    return tmp;
+}
+
+#ifndef QT_NO_CAST_ASCII
+Q_EXPORT inline const TQString operator+( const TQString &s1, const char *s2 )
+{
+    TQString tmp( s1 );
+    tmp += TQString::fromAscii(s2);
+    return tmp;
+}
+
+Q_EXPORT inline const TQString operator+( const char *s1, const TQString &s2 )
+{
+    TQString tmp = TQString::fromAscii( s1 );
+    tmp += s2;
+    return tmp;
+}
+#endif
+
+Q_EXPORT inline const TQString operator+( const TQString &s1, TQChar c2 )
+{
+    TQString tmp( s1 );
+    tmp += c2;
+    return tmp;
+}
+
+Q_EXPORT inline const TQString operator+( const TQString &s1, char c2 )
+{
+    TQString tmp( s1 );
+    tmp += c2;
+    return tmp;
+}
+
+Q_EXPORT inline const TQString operator+( TQChar c1, const TQString &s2 )
+{
+    TQString tmp;
+    tmp += c1;
+    tmp += s2;
+    return tmp;
+}
+
+Q_EXPORT inline const TQString operator+( char c1, const TQString &s2 )
+{
+    TQString tmp;
+    tmp += c1;
+    tmp += s2;
+    return tmp;
+}
+
+#ifndef QT_NO_STL
+Q_EXPORT inline const TQString operator+(const TQString& s1, const std::string& s2)
+{
+    return s1 + TQString(s2);
+}
+
+Q_EXPORT inline const TQString operator+(const std::string& s1, const TQString& s2)
+{
+    TQString tmp(s2);
+    return TQString(tmp.prepend(s1));
+}
+#endif
+
+
+#if defined(Q_OS_WIN32)
+extern Q_EXPORT TQString qt_winTQString(void*);
+extern Q_EXPORT const void* qt_winTchar(const TQString& str, bool addnul);
+extern Q_EXPORT void* qt_winTchar_new(const TQString& str);
+extern Q_EXPORT TQCString qt_winTQString2MB( const TQString& s, int len=-1 );
+extern Q_EXPORT TQString qt_winMB2TQString( const char* mb, int len=-1 );
+#endif
+
+#define Q_DEFINED_QSTRING
+#include "qwinexport.h"
+#endif // TQSTRING_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstring-members.html b/doc/html/qstring-members.html new file mode 100644 index 00000000..f67c37fb --- /dev/null +++ b/doc/html/qstring-members.html @@ -0,0 +1,121 @@ + + + + + +TQString Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQString

+ +

This is the complete list of member functions for +TQString, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstring.html b/doc/html/qstring.html new file mode 100644 index 00000000..a405751f --- /dev/null +++ b/doc/html/qstring.html @@ -0,0 +1,2440 @@ + + + + + +TQString Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQString Class Reference

+ +

The TQString class provides an abstraction of Unicode text +and the classic C '\0'-terminated char array. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qstring.h> +

List of all member functions. +

Public Members

+
    +
  • TQString ()
  • +
  • TQString ( TQChar ch )
  • +
  • TQString ( const TQString & s )
  • +
  • TQString ( const TQByteArray & ba )
  • +
  • TQString ( const TQChar * unicode, uint length )
  • +
  • TQString ( const char * str )
  • +
  • TQString ( const std::string & str )
  • +
  • ~TQString ()
  • +
  • TQString & operator= ( const TQString & s )
  • +
  • TQString & operator= ( const char * str )
  • +
  • TQString & operator= ( const std::string & s )
  • +
  • TQString & operator= ( const TQCString & cstr )
  • +
  • TQString & operator= ( TQChar c )
  • +
  • TQString & operator= ( char c )
  • +
  • bool isNull () const
  • +
  • bool isEmpty () const
  • +
  • uint length () const
  • +
  • void truncate ( uint newLen )
  • +
  • TQString & fill ( TQChar c, int len = -1 )
  • +
  • TQString copy () const  (obsolete)
  • +
  • TQString arg ( long a, int fieldWidth = 0, int base = 10 ) const
  • +
  • TQString arg ( ulong a, int fieldWidth = 0, int base = 10 ) const
  • +
  • TQString arg ( Q_LLONG a, int fieldWidth = 0, int base = 10 ) const
  • +
  • TQString arg ( Q_ULLONG a, int fieldWidth = 0, int base = 10 ) const
  • +
  • TQString arg ( int a, int fieldWidth = 0, int base = 10 ) const
  • +
  • TQString arg ( uint a, int fieldWidth = 0, int base = 10 ) const
  • +
  • TQString arg ( short a, int fieldWidth = 0, int base = 10 ) const
  • +
  • TQString arg ( ushort a, int fieldWidth = 0, int base = 10 ) const
  • +
  • TQString arg ( double a, int fieldWidth = 0, char fmt = 'g', int prec = -1 ) const
  • +
  • TQString arg ( char a, int fieldWidth = 0 ) const
  • +
  • TQString arg ( TQChar a, int fieldWidth = 0 ) const
  • +
  • TQString arg ( const TQString & a, int fieldWidth = 0 ) const
  • +
  • TQString arg ( const TQString & a1, const TQString & a2 ) const
  • +
  • TQString arg ( const TQString & a1, const TQString & a2, const TQString & a3 ) const
  • +
  • TQString arg ( const TQString & a1, const TQString & a2, const TQString & a3, const TQString & a4 ) const
  • +
  • TQString & sprintf ( const char * cformat, ... )
  • +
  • int find ( TQChar c, int index = 0, bool cs = TRUE ) const
  • +
  • int find ( char c, int index = 0, bool cs = TRUE ) const
  • +
  • int find ( const TQString & str, int index = 0, bool cs = TRUE ) const
  • +
  • int find ( const TQRegExp & rx, int index = 0 ) const
  • +
  • int find ( const char * str, int index = 0 ) const
  • +
  • int findRev ( TQChar c, int index = -1, bool cs = TRUE ) const
  • +
  • int findRev ( char c, int index = -1, bool cs = TRUE ) const
  • +
  • int findRev ( const TQString & str, int index = -1, bool cs = TRUE ) const
  • +
  • int findRev ( const TQRegExp & rx, int index = -1 ) const
  • +
  • int findRev ( const char * str, int index = -1 ) const
  • +
  • int contains ( TQChar c, bool cs = TRUE ) const
  • +
  • int contains ( char c, bool cs = TRUE ) const
  • +
  • int contains ( const char * str, bool cs = TRUE ) const
  • +
  • int contains ( const TQString & str, bool cs = TRUE ) const
  • +
  • int contains ( const TQRegExp & rx ) const
  • +
  • enum SectionFlags { SectionDefault = 0x00, SectionSkipEmpty = 0x01, SectionIncludeLeadingSep = 0x02, SectionIncludeTrailingSep = 0x04, SectionCaseInsensitiveSeps = 0x08 }
  • +
  • TQString section ( TQChar sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const
  • +
  • TQString section ( char sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const
  • +
  • TQString section ( const char * sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const
  • +
  • TQString section ( const TQString & sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const
  • +
  • TQString section ( const TQRegExp & reg, int start, int end = 0xffffffff, int flags = SectionDefault ) const
  • +
  • TQString left ( uint len ) const
  • +
  • TQString right ( uint len ) const
  • +
  • TQString mid ( uint index, uint len = 0xffffffff ) const
  • +
  • TQString leftJustify ( uint width, TQChar fill = ' ', bool truncate = FALSE ) const
  • +
  • TQString rightJustify ( uint width, TQChar fill = ' ', bool truncate = FALSE ) const
  • +
  • TQString lower () const
  • +
  • TQString upper () const
  • +
  • TQString stripWhiteSpace () const
  • +
  • TQString simplifyWhiteSpace () const
  • +
  • TQString & insert ( uint index, const TQString & s )
  • +
  • TQString & insert ( uint index, const TQByteArray & s )
  • +
  • TQString & insert ( uint index, const char * s )
  • +
  • TQString & insert ( uint index, const TQChar * s, uint len )
  • +
  • TQString & insert ( uint index, TQChar c )
  • +
  • TQString & insert ( uint index, char c )
  • +
  • TQString & append ( char ch )
  • +
  • TQString & append ( TQChar ch )
  • +
  • TQString & append ( const TQString & str )
  • +
  • TQString & append ( const TQByteArray & str )
  • +
  • TQString & append ( const char * str )
  • +
  • TQString & append ( const std::string & str )
  • +
  • TQString & prepend ( char ch )
  • +
  • TQString & prepend ( TQChar ch )
  • +
  • TQString & prepend ( const TQString & s )
  • +
  • TQString & prepend ( const TQByteArray & s )
  • +
  • TQString & prepend ( const char * s )
  • +
  • TQString & prepend ( const std::string & s )
  • +
  • TQString & remove ( uint index, uint len )
  • +
  • TQString & remove ( const TQString & str, bool cs = TRUE )
  • +
  • TQString & remove ( TQChar c )
  • +
  • TQString & remove ( char c )
  • +
  • TQString & remove ( const char * str )
  • +
  • TQString & remove ( const TQRegExp & rx )
  • +
  • TQString & replace ( uint index, uint len, const TQString & s )
  • +
  • TQString & replace ( uint index, uint len, const TQChar * s, uint slen )
  • +
  • TQString & replace ( uint index, uint len, TQChar c )
  • +
  • TQString & replace ( uint index, uint len, char c )
  • +
  • TQString & replace ( TQChar c, const TQString & after, bool cs = TRUE )
  • +
  • TQString & replace ( char c, const TQString & after, bool cs = TRUE )
  • +
  • TQString & replace ( const TQString & before, const TQString & after, bool cs = TRUE )
  • +
  • TQString & replace ( const TQRegExp & rx, const TQString & after )
  • +
  • TQString & replace ( TQChar c1, TQChar c2 )
  • +
  • short toShort ( bool * ok = 0, int base = 10 ) const
  • +
  • ushort toUShort ( bool * ok = 0, int base = 10 ) const
  • +
  • int toInt ( bool * ok = 0, int base = 10 ) const
  • +
  • uint toUInt ( bool * ok = 0, int base = 10 ) const
  • +
  • long toLong ( bool * ok = 0, int base = 10 ) const
  • +
  • ulong toULong ( bool * ok = 0, int base = 10 ) const
  • +
  • Q_LLONG toLongLong ( bool * ok = 0, int base = 10 ) const
  • +
  • Q_ULLONG toULongLong ( bool * ok = 0, int base = 10 ) const
  • +
  • float toFloat ( bool * ok = 0 ) const
  • +
  • double toDouble ( bool * ok = 0 ) const
  • +
  • TQString & setNum ( short n, int base = 10 )
  • +
  • TQString & setNum ( ushort n, int base = 10 )
  • +
  • TQString & setNum ( int n, int base = 10 )
  • +
  • TQString & setNum ( uint n, int base = 10 )
  • +
  • TQString & setNum ( long n, int base = 10 )
  • +
  • TQString & setNum ( ulong n, int base = 10 )
  • +
  • TQString & setNum ( Q_LLONG n, int base = 10 )
  • +
  • TQString & setNum ( Q_ULLONG n, int base = 10 )
  • +
  • TQString & setNum ( float n, char f = 'g', int prec = 6 )
  • +
  • TQString & setNum ( double n, char f = 'g', int prec = 6 )
  • +
  • void setExpand ( uint index, TQChar c )  (obsolete)
  • +
  • TQString & operator+= ( const TQString & str )
  • +
  • TQString & operator+= ( const TQByteArray & str )
  • +
  • TQString & operator+= ( const char * str )
  • +
  • TQString & operator+= ( const std::string & str )
  • +
  • TQString & operator+= ( TQChar c )
  • +
  • TQString & operator+= ( char c )
  • +
  • TQChar at ( uint i ) const
  • +
  • TQChar operator[] ( int i ) const
  • +
  • TQCharRef at ( uint i )
  • +
  • TQCharRef operator[] ( int i )
  • +
  • TQChar constref ( uint i ) const
  • +
  • TQChar & ref ( uint i )
  • +
  • const TQChar * unicode () const
  • +
  • const char * ascii () const
  • +
  • const char * latin1 () const
  • +
  • TQCString utf8 () const
  • +
  • TQCString local8Bit () const
  • +
  • bool operator! () const
  • +
  • operator const char * () const
  • +
  • operator std::string () const
  • +
  • const unsigned short * ucs2 () const
  • +
  • TQString & setUnicode ( const TQChar * unicode, uint len )
  • +
  • TQString & setUnicodeCodes ( const ushort * unicode_as_ushorts, uint len )
  • +
  • TQString & setAscii ( const char * str, int len = -1 )
  • +
  • TQString & setLatin1 ( const char * str, int len = -1 )
  • +
  • int compare ( const TQString & s ) const
  • +
  • int localeAwareCompare ( const TQString & s ) const
  • +
  • void compose ()
  • +
  • const char * data () const  (obsolete)
  • +
  • bool startsWith ( const TQString & s, bool cs = TRUE ) const
  • +
  • bool endsWith ( const TQString & s, bool cs = TRUE ) const
  • +
  • void setLength ( uint newLen )
  • +
  • uint capacity () const
  • +
  • void reserve ( uint minCapacity )
  • +
  • void squeeze ()
  • +
+

Static Public Members

+
    +
  • TQString number ( long n, int base = 10 )
  • +
  • TQString number ( ulong n, int base = 10 )
  • +
  • TQString number ( Q_LLONG n, int base = 10 )
  • +
  • TQString number ( Q_ULLONG n, int base = 10 )
  • +
  • TQString number ( int n, int base = 10 )
  • +
  • TQString number ( uint n, int base = 10 )
  • +
  • TQString number ( double n, char f = 'g', int prec = 6 )
  • +
  • TQString fromAscii ( const char * ascii, int len = -1 )
  • +
  • TQString fromLatin1 ( const char * chars, int len = -1 )
  • +
  • TQString fromUtf8 ( const char * utf8, int len = -1 )
  • +
  • TQString fromLocal8Bit ( const char * local8Bit, int len = -1 )
  • +
  • TQString fromUcs2 ( const unsigned short * str )
  • +
  • int compare ( const TQString & s1, const TQString & s2 )
  • +
  • int localeAwareCompare ( const TQString & s1, const TQString & s2 )
  • +
+

Related Functions

+
    +
  • bool operator== ( const TQString & s1, const TQString & s2 )
  • +
  • bool operator== ( const TQString & s1, const char * s2 )
  • +
  • bool operator== ( const char * s1, const TQString & s2 )
  • +
  • bool operator!= ( const TQString & s1, const TQString & s2 )
  • +
  • bool operator!= ( const TQString & s1, const char * s2 )
  • +
  • bool operator!= ( const char * s1, const TQString & s2 )
  • +
  • bool operator< ( const TQString & s1, const char * s2 )
  • +
  • bool operator< ( const char * s1, const TQString & s2 )
  • +
  • bool operator<= ( const TQString & s1, const char * s2 )
  • +
  • bool operator<= ( const char * s1, const TQString & s2 )
  • +
  • bool operator> ( const TQString & s1, const char * s2 )
  • +
  • bool operator> ( const char * s1, const TQString & s2 )
  • +
  • bool operator>= ( const TQString & s1, const char * s2 )
  • +
  • bool operator>= ( const char * s1, const TQString & s2 )
  • +
  • const TQString operator+ ( const TQString & s1, const TQString & s2 )
  • +
  • const TQString operator+ ( const TQString & s1, const char * s2 )
  • +
  • const TQString operator+ ( const char * s1, const TQString & s2 )
  • +
  • const TQString operator+ ( const TQString & s, char c )
  • +
  • const TQString operator+ ( char c, const TQString & s )
  • +
  • TQDataStream & operator<< ( TQDataStream & s, const TQString & str )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQString & str )
  • +
+

Detailed Description

+ + + +

The TQString class provides an abstraction of Unicode text +and the classic C '\0'-terminated char array. +

+ + + +

TQString uses implicit sharing, which +makes it very efficient and easy to use. +

In all of the TQString methods that take const char * +parameters, the const char * is interpreted as a classic +C-style '\0'-terminated ASCII string. It is legal for the const char * parameter to be 0. If the const char * is not +'\0'-terminated, the results are undefined. Functions that copy +classic C strings into a TQString will not copy the terminating +'\0' character. The TQChar array of the TQString (as returned by +unicode()) is generally not terminated by a '\0'. If you need to +pass a TQString to a function that retquires a C '\0'-terminated +string use latin1(). +

A TQString that has not been assigned to anything is null, i.e. +both the length and data pointer is 0. A TQString that references +the empty string ("", a single '\0' char) is empty. Both null +and empty TQStrings are legal parameters to the methods. Assigning +(const char *) 0 to TQString gives a null TQString. For +convenience, TQString::null is a null TQString. When sorting, +empty strings come first, followed by non-empty strings, followed +by null strings. We recommend using if ( !str.isNull() ) to +check for a non-null string rather than if ( !str ); see operator!() for an explanation. +

Note that if you find that you are mixing usage of TQCString, +TQString, and TQByteArray, this causes lots of unnecessary +copying and might indicate that the true nature of the data you +are dealing with is uncertain. If the data is '\0'-terminated 8-bit +data, use TQCString; if it is unterminated (i.e. contains '\0's) +8-bit data, use TQByteArray; if it is text, use TQString. +

Lists of strings are handled by the TQStringList class. You can +split a string into a list of strings using TQStringList::split(), +and join a list of strings into a single string with an optional +separator using TQStringList::join(). You can obtain a list of +strings from a string list that contain a particular substring or +that match a particular regex using +TQStringList::grep(). +

Note for C programmers +

Due to C++'s type system and the fact that TQString is implicitly shared, TQStrings can be treated like ints or other simple base +types. For example: +

+    TQString boolToString( bool b )
+    {
+        TQString result;
+        if ( b )
+            result = "True";
+        else
+            result = "False";
+        return result;
+    }
+    
+ +

The variable, result, is an auto variable allocated on the stack. +When return is called, because we're returning by value, The copy +constructor is called and a copy of the string is returned. (No +actual copying takes place thanks to the implicit sharing, see +below.) +

Throughout TQt's source code you will encounter TQString usages like +this: +

+    TQString func( const TQString& input )
+    {
+        TQString output = input;
+        // process output
+        return output;
+    }
+    
+ +

The 'copying' of input to output is almost as fast as copying a +pointer because behind the scenes copying is achieved by +incrementing a reference count. TQString (like all TQt's implicitly +shared classes) operates on a copy-on-write basis, only copying if +an instance is actually changed. +

If you wish to create a deep copy of a TQString without losing any +Unicode information then you should use TQDeepCopy. +

See also TQChar, TQCString, TQByteArray, TQConstString, Implicitly and Explicitly Shared Classes, Text Related Classes, and Non-GUI Classes. + +


Member Type Documentation

+

TQString::SectionFlags

+ +
    +
  • TQString::SectionDefault - Empty fields are counted, leading and +trailing separators are not included, and the separator is +compared case sensitively. +
  • TQString::SectionSkipEmpty - Treat empty fields as if they don't exist, +i.e. they are not considered as far as start and end are +concerned. +
  • TQString::SectionIncludeLeadingSep - Include the leading separator (if +any) in the result string. +
  • TQString::SectionIncludeTrailingSep - Include the trailing separator +(if any) in the result string. +
  • TQString::SectionCaseInsensitiveSeps - Compare the separator +case-insensitively. +

Any of the last four values can be OR-ed together to form a flag. +

See also section(). + +


Member Function Documentation

+

TQString::TQString () +

+ +

Constructs a null string, i.e. both the length and data pointer +are 0. +

See also isNull(). + +

TQString::TQString ( TQChar ch ) +

+Constructs a string of length one, containing the character ch. + +

TQString::TQString ( const TQString & s ) +

+Constructs an implicitly shared copy of s. This is very fast +since it only involves incrementing a reference count. + +

TQString::TQString ( const TQByteArray & ba ) +

+Constructs a string that is a deep copy of ba interpreted as a +classic C string. + +

TQString::TQString ( const TQChar * unicode, uint length ) +

+Constructs a string that is a deep copy of the first length +characters in the TQChar array. +

If unicode and length are 0, then a null string is created. +

If only unicode is 0, the string is empty but has length +characters of space preallocated: TQString expands automatically +anyway, but this may speed up some cases a little. We recommend +using the plain constructor and setLength() for this purpose since +it will result in more readable code. +

See also isNull() and setLength(). + +

TQString::TQString ( const char * str ) +

+Constructs a string that is a deep copy of str, interpreted as +a classic C string. The encoding is assumed to be Latin-1, unless +you change it using TQTextCodec::setCodecForCStrings(). +

If str is 0, then a null string is created. +

This is a cast constructor, but it is perfectly safe: converting a +Latin-1 const char * to TQString preserves all the information. You +can disable this constructor by defining QT_NO_CAST_ASCII when +you compile your applications. You can also make TQString objects +by using setLatin1(), fromLatin1(), fromLocal8Bit(), and +fromUtf8(). Or whatever encoding is appropriate for the 8-bit data +you have. +

See also isNull() and fromAscii(). + +

TQString::TQString ( const std::string & str ) +

+Constructs a string that is a deep copy of str. +

This is the same as fromAscii(str). + +

TQString::~TQString () +

+ +

Destroys the string and frees the string's data if this is the +last reference to the string. + +

TQString & TQString::append ( const TQString & str ) +

+ +

Appends str to the string and returns a reference to the +result. +

+        string = "Test";
+        string.append( "ing" );        // string == "Testing"
+    
+ +

Equivalent to operator+=(). + +

Example: dirview/dirview.cpp. +

TQString & TQString::append ( char ch ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Appends character ch to the string and returns a reference to +the result. +

Equivalent to operator+=(). + +

TQString & TQString::append ( TQChar ch ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Appends character ch to the string and returns a reference to +the result. +

Equivalent to operator+=(). + +

TQString & TQString::append ( const TQByteArray & str ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Appends str to the string and returns a reference to the result. +

Equivalent to operator+=(). + +

TQString & TQString::append ( const char * str ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Appends str to the string and returns a reference to the result. +

Equivalent to operator+=(). + +

TQString & TQString::append ( const std::string & str ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Appends str to the string and returns a reference to the result. +

Equivalent to operator+=(). + +

TQString TQString::arg ( const TQString & a, int fieldWidth = 0 ) const +

+This function will return a string that replaces the lowest +numbered occurrence of %1, %2, ..., %9 with a. +

The fieldWidth value specifies the minimum amount of space that +a is padded to. A positive value will produce right-aligned +text, whereas a negative value will produce left-aligned text. +

The following example shows how we could create a 'status' string +when processing a list of files: +

+    TQString status = TQString( "Processing file %1 of %2: %3" )
+                        .arg( i )         // current file's number
+                        .arg( total )     // number of files to process
+                        .arg( fileName ); // current file's name
+    
+ +

It is generally fine to use filenames and numbers as we have done +in the example above. But note that using arg() to construct +natural language sentences does not usually translate well into +other languages because sentence structure and word order often +differ between languages. +

If there is no place marker (%1, %2, etc.), a warning +message (qWarning()) is output and the result is undefined. +

Warning: If any placeholder occurs more than once, the result is undefined. +

+

TQString TQString::arg ( long a, int fieldWidth = 0, int base = 10 ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

The fieldWidth value specifies the minimum amount of space that +a is padded to. A positive value will produce a right-aligned +number, whereas a negative value will produce a left-aligned +number. +

a is expressed in base base, which is 10 by default and must +be between 2 and 36. +

The '%' can be followed by an 'L', in which case the sequence is +replaced with a localized representation of a. The conversion +uses the default locale. The default locale is determined from the +system's locale settings at application startup. It can be changed +using TQLocale::setDefault(). The 'L' flag is ignored if base is +not 10. +

+        TQString str;
+        str = TQString( "Decimal 63 is %1 in hexadecimal" )
+                .arg( 63, 0, 16 );
+        // str == "Decimal 63 is 3f in hexadecimal"
+
+        TQLocale::setDefault(TQLocale::English, TQLocale::UnitedStates);
+        str = TQString( "%1 %L2 %L3" )
+                .arg( 12345 )
+                .arg( 12345 )
+                .arg( 12345, 0, 16 );
+        // str == "12345 12,345 3039"
+    
+ + +

TQString TQString::arg ( ulong a, int fieldWidth = 0, int base = 10 ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

a is expressed in base base, which is 10 by default and must +be between 2 and 36. If base is 10, the '%L' syntax can be used +to produce localized strings. + +

TQString TQString::arg ( Q_LLONG a, int fieldWidth = 0, int base = 10 ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

a is expressed in base base, which is 10 by default and must +be between 2 and 36. If base is 10, the '%L' syntax can be used +to produce localized strings. + +

TQString TQString::arg ( Q_ULLONG a, int fieldWidth = 0, int base = 10 ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

a is expressed in base base, which is 10 by default and must +be between 2 and 36. If base is 10, the '%L' syntax can be used +to produce localized strings. + +

TQString TQString::arg ( int a, int fieldWidth = 0, int base = 10 ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

a is expressed in base base, which is 10 by default and must +be between 2 and 36. If base is 10, the '%L' syntax can be used +to produce localized strings. + +

TQString TQString::arg ( uint a, int fieldWidth = 0, int base = 10 ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

a is expressed in base base, which is 10 by default and must +be between 2 and 36. If base is 10, the '%L' syntax can be used +to produce localized strings. + +

TQString TQString::arg ( short a, int fieldWidth = 0, int base = 10 ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

a is expressed in base base, which is 10 by default and must +be between 2 and 36. If base is 10, the '%L' syntax can be used +to produce localized strings. + +

TQString TQString::arg ( ushort a, int fieldWidth = 0, int base = 10 ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

a is expressed in base base, which is 10 by default and must +be between 2 and 36. If base is 10, the '%L' syntax can be used +to produce localized strings. + +

TQString TQString::arg ( double a, int fieldWidth = 0, char fmt = 'g', int prec = -1 ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Argument a is formatted according to the fmt format specified, +which is 'g' by default and can be any of the following: +

+
Format Meaning +
e format as [-]9.9e[+|-]999 +
E format as [-]9.9E[+|-]999 +
f format as [-]9.9 +
g use e or f format, whichever is the most concise +
G use E or f format, whichever is the most concise +
+

With 'e', 'E', and 'f', prec is the number of digits after the +decimal point. With 'g' and 'G', prec is the maximum number of +significant digits (trailing zeroes are omitted). +

+        double d = 12.34;
+        TQString ds = TQString( "'E' format, precision 3, gives %1" )
+                        .arg( d, 0, 'E', 3 );
+        // ds == "'E' format, precision 3, gives 1.234E+01"
+    
+ +

The '%L' syntax can be used to produce localized strings. + +

TQString TQString::arg ( char a, int fieldWidth = 0 ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

a is assumed to be in the Latin-1 character set. + +

TQString TQString::arg ( TQChar a, int fieldWidth = 0 ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

TQString TQString::arg ( const TQString & a1, const TQString & a2 ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This is the same as str.arg(a1).arg(a2), except that +the strings are replaced in one pass. This can make a difference +if a1 contains e.g. %1: +

+    TQString str( "%1 %2" );
+    str.arg( "Hello", "world" );        // returns "Hello world"
+    str.arg( "Hello" ).arg( "world" );  // returns "Hello world"
+
+    str.arg( "(%1)", "Hello" );           // returns "(%1) Hello"
+    str.arg( "(%1)" ).arg( "Hello" );     // returns "(Hello) %2"
+    
+ + +

TQString TQString::arg ( const TQString & a1, const TQString & a2, const TQString & a3 ) const +

+ +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This is the same as calling str.arg(a1).arg(a2).arg(a3), +except that the strings are replaced in one pass. + +

TQString TQString::arg ( const TQString & a1, const TQString & a2, const TQString & a3, const TQString & a4 ) const +

+ +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This is the same as calling +str.arg(a1).arg(a2).arg(a3).arg(a4), +except that the strings are replaced in one pass. + +

const char * TQString::ascii () const +

+Returns an 8-bit ASCII representation of the string. +

If a codec has been set using TQTextCodec::codecForCStrings(), +it is used to convert Unicode to 8-bit char. Otherwise, this function +does the same as latin1(). +

See also fromAscii(), latin1(), utf8(), and local8Bit(). + +

Example: network/networkprotocol/nntp.cpp. +

TQChar TQString::at ( uint i ) const +

+ +

Returns the character at index i, or 0 if i is beyond the +length of the string. +

+        const TQString string( "abcdefgh" );
+        TQChar ch = string.at( 4 );
+        // ch == 'e'
+    
+ +

If the TQString is not const (i.e. const TQString) or const& (i.e. +const TQString &), then the non-const overload of at() will be used +instead. + +

TQCharRef TQString::at ( uint i ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

The function returns a reference to the character at index i. +The resulting reference can then be assigned to, or used +immediately, but it will become invalid once further modifications +are made to the original string. +

If i is beyond the length of the string then the string is +expanded with TQChar::null. + +

uint TQString::capacity () const +

+ +

Returns the number of characters this string can hold +in the allocated memory. +

See also reserve() and squeeze(). + +

int TQString::compare ( const TQString & s1, const TQString & s2 ) [static] +

+ +

Lexically compares s1 with s2 and returns an integer less +than, equal to, or greater than zero if s1 is less than, equal +to, or greater than s2. +

The comparison is based exclusively on the numeric Unicode values +of the characters and is very fast, but is not what a human would +expect. Consider sorting user-interface strings with +TQString::localeAwareCompare(). +

+        int a = TQString::compare( "def", "abc" );   // a > 0
+        int b = TQString::compare( "abc", "def" );   // b < 0
+        int c = TQString::compare( "abc", "abc" );   // c == 0
+    
+ + +

int TQString::compare ( const TQString & s ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Lexically compares this string with s and returns an integer +less than, equal to, or greater than zero if it is less than, equal +to, or greater than s. + +

void TQString::compose () +

+Warning: This function is not supported in TQt 3.x. It is provided +for experimental and illustrative purposes only. It is mainly of +interest to those experimenting with Arabic and other +composition-rich texts. +

Applies possible ligatures to a TQString. Useful when +composition-rich text retquires rendering with glyph-poor fonts, +but it also makes compositions such as TQChar(0x0041) ('A') and +TQChar(0x0308) (Unicode accent diaresis), giving TQChar(0x00c4) +(German A Umlaut). + +

TQChar TQString::constref ( uint i ) const +

+ +

Returns the TQChar at index i by value. +

Equivalent to at(i). +

See also ref(). + +

int TQString::contains ( TQChar c, bool cs = TRUE ) const +

+Returns the number of times the character c occurs in the +string. +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. +

+    TQString string( "Trolltech and TQt" );
+    int n = string.contains( 't', FALSE );
+    // n == 3
+    
+ + +

Examples: fileiconview/qfileiconview.cpp and mdi/application.cpp. +

int TQString::contains ( char c, bool cs = TRUE ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

int TQString::contains ( const char * str, bool cs = TRUE ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the number of times the string str occurs in the string. +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. + +

int TQString::contains ( const TQString & str, bool cs = TRUE ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the number of times str occurs in the string. +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. +

This function counts overlapping strings, so in the example below, +there are two instances of "ana" in "bananas". +

+    TQString str( "bananas" );
+    int i = str.contains( "ana" );  // i == 2
+    
+ +

See also findRev(). + +

int TQString::contains ( const TQRegExp & rx ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the number of times the regexp, rx, matches in the +string. +

This function counts overlapping matches, so in the example below, +there are four instances of "ana" or "ama". +

+        TQString str = "banana and panama";
+        TQRegExp rxp = TQRegExp( "a[nm]a", TRUE, FALSE );
+        int i = str.contains( rxp );    // i == 4
+    
+ +

See also find() and findRev(). + +

TQString TQString::copy () const +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

In TQt 2.0 and later, all calls to this function are needless. Just +remove them. + +

const char * TQString::data () const +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns a pointer to a '\0'-terminated classic C string. +

In TQt 1.x, this returned a char* allowing direct manipulation of the +string as a sequence of bytes. In TQt 2.x where TQString is a Unicode +string, char* conversion constructs a temporary string, and hence +direct character operations are meaningless. + +

bool TQString::endsWith ( const TQString & s, bool cs = TRUE ) const +

+Returns TRUE if the string ends with s; otherwise returns +FALSE. +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. +

+        TQString str( "Bananas" );
+        str.endsWith( "anas" );         // returns TRUE
+        str.endsWith( "pple" );         // returns FALSE
+    
+ +

See also startsWith(). + +

Example: chart/main.cpp. +

TQString & TQString::fill ( TQChar c, int len = -1 ) +

+Fills the string with len characters of value c, and returns +a reference to the string. +

If len is negative (the default), the current string length is +used. +

+        TQString str;
+        str.fill( 'g', 5 );      // string == "ggggg"
+    
+ + +

int TQString::find ( const TQRegExp & rx, int index = 0 ) const +

+Finds the first match of the regular expression rx, starting +from position index. If index is -1, the search starts at +the last character; if -2, at the next to last character and so +on. (See findRev() for searching backwards.) +

Returns the position of the first match of rx or -1 if no match +was found. +

+        TQString string( "bananas" );
+        int i = string.find( TQRegExp("an"), 0 );    // i == 1
+    
+ +

See also findRev(), replace(), and contains(). + +

Example: network/mail/smtp.cpp. +

int TQString::find ( TQChar c, int index = 0, bool cs = TRUE ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Finds the first occurrence of the character c, starting at +position index. If index is -1, the search starts at the +last character; if -2, at the next to last character and so on. +(See findRev() for searching backwards.) +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. +

Returns the position of c or -1 if c could not be found. + +

int TQString::find ( char c, int index = 0, bool cs = TRUE ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Find character c starting from position index. +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. + +

int TQString::find ( const TQString & str, int index = 0, bool cs = TRUE ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Finds the first occurrence of the string str, starting at +position index. If index is -1, the search starts at the +last character, if it is -2, at the next to last character and so +on. (See findRev() for searching backwards.) +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. +

Returns the position of str or -1 if str could not be found. + +

int TQString::find ( const char * str, int index = 0 ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Equivalent to find(TQString(str), index). + +

int TQString::findRev ( const char * str, int index = -1 ) const +

+ +

Equivalent to findRev(TQString(str), index). + +

int TQString::findRev ( TQChar c, int index = -1, bool cs = TRUE ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Finds the first occurrence of the character c, starting at +position index and searching backwards. If the index is -1, the +search starts at the last character, if it is -2, at the next to +last character and so on. +

Returns the position of c or -1 if c could not be found. +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. +

+        TQString string( "bananas" );
+        int i = string.findRev( 'a' );      // i == 5
+    
+ + +

int TQString::findRev ( char c, int index = -1, bool cs = TRUE ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Find character c starting from position index and working +backwards. +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. + +

int TQString::findRev ( const TQString & str, int index = -1, bool cs = TRUE ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Finds the first occurrence of the string str, starting at +position index and searching backwards. If the index is -1, the +search starts at the last character, if it is -2, at the next to +last character and so on. +

Returns the position of str or -1 if str could not be found. +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. +

+    TQString string("bananas");
+    int i = string.findRev( "ana" );      // i == 3
+    
+ + +

int TQString::findRev ( const TQRegExp & rx, int index = -1 ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Finds the first match of the regexp rx, starting at position index and searching backwards. If the index is -1, the search +starts at the last character, if it is -2, at the next to last +character and so on. (See findRev() for searching backwards.) +

Returns the position of the match or -1 if no match was found. +

+        TQString string( "bananas" );
+        int i = string.findRev( TQRegExp("an") );      // i == 3
+    
+ +

See also find(). + +

TQString TQString::fromAscii ( const char * ascii, int len = -1 ) [static] +

+Returns the Unicode string decoded from the first len +bytes of ascii, ignoring the rest of ascii. If len +is -1 then the length of ascii is used. If len is bigger +than the length of ascii then it will use the length of ascii. +

If a codec has been set using TQTextCodec::codecForCStrings(), +it is used to convert the string from 8-bit characters to Unicode. +Otherwise, this function does the same as fromLatin1(). +

This is the same as the TQString(const char*) constructor, but you +can make that constructor invisible if you compile with the define +QT_NO_CAST_ASCII, in which case you can explicitly create a +TQString from 8-bit ASCII text using this function. +

+        TQString str = TQString::fromAscii( "123456789", 5 );
+        // str == "12345"
+    
+ + +

TQString TQString::fromLatin1 ( const char * chars, int len = -1 ) [static] +

+Returns the Unicode string decoded from the first len +bytes of chars, ignoring the rest of chars. If len +is -1 then the length of chars is used. If len is bigger +than the length of chars then it will use the length of chars. +

See also fromAscii(). + +

Examples: listbox/listbox.cpp and network/mail/smtp.cpp. +

TQString TQString::fromLocal8Bit ( const char * local8Bit, int len = -1 ) [static] +

+Returns the Unicode string decoded from the first len +bytes of local8Bit, ignoring the rest of local8Bit. If +len is -1 then the length of local8Bit is used. If len is +bigger than the length of local8Bit then it will use the length +of local8Bit. +

+        TQString str = TQString::fromLocal8Bit( "123456789", 5 );
+        // str == "12345"
+    
+ +

local8Bit is assumed to be encoded in a locale-specific format. +

See TQTextCodec for more diverse coding/decoding of Unicode strings. + +

TQString TQString::fromUcs2 ( const unsigned short * str ) [static] +

+Constructs a string that is a deep copy of str, interpreted as a +UCS2 encoded, zero terminated, Unicode string. +

If str is 0, then a null string is created. +

See also isNull(). + +

TQString TQString::fromUtf8 ( const char * utf8, int len = -1 ) [static] +

+Returns the Unicode string decoded from the first len +bytes of utf8, ignoring the rest of utf8. If len is +-1 then the length of utf8 is used. If len is bigger than +the length of utf8 then it will use the length of utf8. +

+        TQString str = TQString::fromUtf8( "123456789", 5 );
+        // str == "12345"
+    
+ +

See TQTextCodec for more diverse coding/decoding of Unicode strings. + +

Example: fonts/simple-qfont-demo/viewer.cpp. +

TQString & TQString::insert ( uint index, const TQString & s ) +

+Inserts s into the string at position index. +

If index is beyond the end of the string, the string is +extended with spaces to length index and s is then appended +and returns a reference to the string. +

+        TQString string( "I like fish" );
+        str = string.insert( 2, "don't " );
+        // str == "I don't like fish"
+    
+ +

See also remove() and replace(). + +

Examples: themes/themes.cpp and xform/xform.cpp. +

TQString & TQString::insert ( uint index, const TQByteArray & s ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts s into the string at position index and returns +a reference to the string. + +

TQString & TQString::insert ( uint index, const char * s ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts s into the string at position index and returns +a reference to the string. + +

TQString & TQString::insert ( uint index, const TQChar * s, uint len ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts the first len characters in s into the string at +position index and returns a reference to the string. + +

TQString & TQString::insert ( uint index, TQChar c ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Insert c into the string at position index and returns a +reference to the string. +

If index is beyond the end of the string, the string is +extended with spaces (ASCII 32) to length index and c is +then appended. + +

TQString & TQString::insert ( uint index, char c ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Insert character c at position index. + +

bool TQString::isEmpty () const +

+ +

Returns TRUE if the string is empty, i.e. if length() == 0; +otherwise returns FALSE. Null strings are also empty. +

+        TQString a( "" );
+        a.isEmpty();        // TRUE
+        a.isNull();         // FALSE
+
+        TQString b;
+        b.isEmpty();        // TRUE
+        b.isNull();         // TRUE
+    
+ +

See also isNull() and length(). + +

Examples: addressbook/mainwindow.cpp, chart/chartform.cpp, chart/chartform_canvas.cpp, network/networkprotocol/nntp.cpp, qmag/qmag.cpp, and qwerty/qwerty.cpp. +

bool TQString::isNull () const +

+ +

Returns TRUE if the string is null; otherwise returns FALSE. A +null string is always empty. +

+        TQString a;          // a.unicode() == 0, a.length() == 0
+        a.isNull();         // TRUE, because a.unicode() == 0
+        a.isEmpty();        // TRUE, because a.length() == 0
+    
+ +

See also isEmpty() and length(). + +

Examples: i18n/main.cpp, network/ftpclient/ftpmainwindow.ui.h, and qdir/qdir.cpp. +

const char * TQString::latin1 () const +

+Returns a Latin-1 representation of the string. The +returned value is undefined if the string contains non-Latin-1 +characters. If you want to convert strings into formats other than +Unicode, see the TQTextCodec classes. +

This function is mainly useful for boot-strapping legacy code to +use Unicode. +

The result remains valid so long as one unmodified copy of the +source string exists. +

See also fromLatin1(), ascii(), utf8(), and local8Bit(). + +

Examples: fileiconview/qfileiconview.cpp and network/networkprotocol/nntp.cpp. +

TQString TQString::left ( uint len ) const +

+Returns a substring that contains the len leftmost characters +of the string. +

The whole string is returned if len exceeds the length of the +string. +

+        TQString s = "Pineapple";
+        TQString t = s.left( 4 );    // t == "Pine"
+    
+ +

See also right(), mid(), and isEmpty(). + +

Example: themes/themes.cpp. +

TQString TQString::leftJustify ( uint width, TQChar fill = ' ', bool truncate = FALSE ) const +

+Returns a string of length width that contains this string +padded by the fill character. +

If truncate is FALSE and the length of the string is more than +width, then the returned string is a copy of the string. +

If truncate is TRUE and the length of the string is more than +width, then any characters in a copy of the string after length +width are removed, and the copy is returned. +

+        TQString s( "apple" );
+        TQString t = s.leftJustify( 8, '.' );        // t == "apple..."
+    
+ +

See also rightJustify(). + +

uint TQString::length () const +

+ +

Returns the length of the string. +

Null strings and empty strings have zero length. +

See also isNull() and isEmpty(). + +

Examples: dirview/dirview.cpp, fileiconview/qfileiconview.cpp, network/networkprotocol/nntp.cpp, rot13/rot13.cpp, and themes/themes.cpp. +

TQCString TQString::local8Bit () const +

+Returns the string encoded in a locale-specific format. On X11, +this is the TQTextCodec::codecForLocale(). On Windows, it is a +system-defined encoding. On Mac OS X, this always uses UTF-8 as +the encoding. +

See TQTextCodec for more diverse coding/decoding of Unicode +strings. +

See also fromLocal8Bit(), ascii(), latin1(), and utf8(). + +

int TQString::localeAwareCompare ( const TQString & s1, const TQString & s2 ) [static] +

+ +

Compares s1 with s2 and returns an integer less than, equal +to, or greater than zero if s1 is less than, equal to, or +greater than s2. +

The comparison is performed in a locale- and also +platform-dependent manner. Use this function to present sorted +lists of strings to the user. +

See also TQString::compare() and TQTextCodec::locale(). + +

int TQString::localeAwareCompare ( const TQString & s ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Compares this string with s. + +

TQString TQString::lower () const +

+Returns a lowercase copy of the string. +

+        TQString string( "TROlltECH" );
+        str = string.lower();   // str == "trolltech"
+    
+ +

See also upper(). + +

Example: scribble/scribble.cpp. +

TQString TQString::mid ( uint index, uint len = 0xffffffff ) const +

+Returns a string that contains the len characters of this +string, starting at position index. +

Returns a null string if the string is empty or index is out of +range. Returns the whole string from index if index + len +exceeds the length of the string. +

+        TQString s( "Five pineapples" );
+        TQString t = s.mid( 5, 4 );                  // t == "pine"
+    
+ +

See also left() and right(). + +

Examples: network/mail/smtp.cpp, qmag/qmag.cpp, and themes/themes.cpp. +

TQString TQString::number ( long n, int base = 10 ) [static] +

+A convenience function that returns a string equivalent of the +number n to base base, which is 10 by default and must be +between 2 and 36. The returned string is in "C" locale. +

+        long a = 63;
+        TQString str = TQString::number( a, 16 );             // str == "3f"
+        TQString str = TQString::number( a, 16 ).upper();     // str == "3F"
+    
+ +

See also setNum(). + +

Examples: application/application.cpp, chart/chartform.cpp, fonts/simple-qfont-demo/viewer.cpp, helpviewer/helpwindow.cpp, mdi/application.cpp, regexptester/regexptester.cpp, and sql/overview/extract/main.cpp. +

TQString TQString::number ( ulong n, int base = 10 ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

See also setNum(). + +

TQString TQString::number ( Q_LLONG n, int base = 10 ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

See also setNum(). + +

TQString TQString::number ( Q_ULLONG n, int base = 10 ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

See also setNum(). + +

TQString TQString::number ( int n, int base = 10 ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

See also setNum(). + +

TQString TQString::number ( uint n, int base = 10 ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

A convenience factory function that returns a string +representation of the number n to the base base, which is 10 +by default and must be between 2 and 36. +

See also setNum(). + +

TQString TQString::number ( double n, char f = 'g', int prec = 6 ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Argument n is formatted according to the f format specified, +which is g by default, and can be any of the following: +

+
Format Meaning +
e format as [-]9.9e[+|-]999 +
E format as [-]9.9E[+|-]999 +
f format as [-]9.9 +
g use e or f format, whichever is the most concise +
G use E or f format, whichever is the most concise +
+

With 'e', 'E', and 'f', prec is the number of digits after the +decimal point. With 'g' and 'G', prec is the maximum number of +significant digits (trailing zeroes are omitted). +

+    double d = 12.34;
+    TQString ds = TQString( "'E' format, precision 3, gives %1" )
+                    .arg( d, 0, 'E', 3 );
+    // ds == "1.234E+001"
+    
+ +

See also setNum(). + +

TQString::operator const char * () const +

+ +

Returns ascii(). Be sure to see the warnings documented in the +ascii() function. Note that for new code which you wish to be +strictly Unicode-clean, you can define the macro QT_NO_ASCII_CAST when compiling your code to hide this function so +that automatic casts are not done. This has the added advantage +that you catch the programming error described in operator!(). + +

TQString::operator std::string () const +

+ +

Returns ascii() as a std::string. +

Warning: The function may cause an application to crash if a static C run-time is in use. +This can happen in Microsoft Visual C++ if TQt is configured as single-threaded. A safe +alternative is to call ascii() directly and construct a std::string manually. + +

bool TQString::operator! () const +

+ +

Returns TRUE if this is a null string; otherwise returns FALSE. +

+        TQString name = getName();
+        if ( !name )
+            name = "Rodney";
+    
+ +

Note that if you say +

+        TQString name = getName();
+        if ( name )
+            doSomethingWith(name);
+    
+ +

It will call "operator const char*()", which is inefficent; you +may wish to define the macro QT_NO_ASCII_CAST when writing code +which you wish to remain Unicode-clean. +

When you want the above semantics, use: +

+        TQString name = getName();
+        if ( !name.isNull() )
+            doSomethingWith(name);
+    
+ +

See also isEmpty(). + +

TQString & TQString::operator+= ( const TQString & str ) +

+Appends str to the string and returns a reference to the string. + +

TQString & TQString::operator+= ( const TQByteArray & str ) +

+ +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Appends str to the string and returns a reference to the string. + +

TQString & TQString::operator+= ( const char * str ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Appends str to the string and returns a reference to the string. + +

TQString & TQString::operator+= ( const std::string & str ) +

+ +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Appends str to the string and returns a reference to the string. + +

TQString & TQString::operator+= ( TQChar c ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Appends c to the string and returns a reference to the string. + +

TQString & TQString::operator+= ( char c ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Appends c to the string and returns a reference to the string. + +

TQString & TQString::operator= ( TQChar c ) +

+ +

Sets the string to contain just the single character c. + +

TQString & TQString::operator= ( const TQString & s ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Assigns a shallow copy of s to this string and returns a +reference to this string. This is very fast because the string +isn't actually copied. + +

TQString & TQString::operator= ( const char * str ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Assigns a deep copy of str, interpreted as a classic C string +to this string and returns a reference to this string. +

If str is 0, then a null string is created. +

See also isNull(). + +

TQString & TQString::operator= ( const std::string & s ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Makes a deep copy of s and returns a reference to the deep +copy. + +

TQString & TQString::operator= ( const TQCString & cstr ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Assigns a deep copy of cstr, interpreted as a classic C +string, to this string. Returns a reference to this string. + +

TQString & TQString::operator= ( char c ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the string to contain just the single character c. + +

TQChar TQString::operator[] ( int i ) const +

+ +

Returns the character at index i, or TQChar::null if i is +beyond the length of the string. +

If the TQString is not const (i.e., const TQString) or const& +(i.e., const TQString&), then the non-const overload of operator[] +will be used instead. + +

TQCharRef TQString::operator[] ( int i ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

The function returns a reference to the character at index i. +The resulting reference can then be assigned to, or used +immediately, but it will become invalid once further modifications +are made to the original string. +

If i is beyond the length of the string then the string is +expanded with TQChar::nulls, so that the TQCharRef references a +valid (null) character in the string. +

The TQCharRef internal class can be used much like a constant +TQChar, but if you assign to it, you change the original string +(which will detach itself because of TQString's copy-on-write +semantics). You will get compilation errors if you try to use the +result as anything but a TQChar. + +

TQString & TQString::prepend ( const TQString & s ) +

+ +

Inserts s at the beginning of the string and returns a +reference to the string. +

Equivalent to insert(0, s). +

+        TQString string = "42";
+        string.prepend( "The answer is " );
+        // string == "The answer is 42"
+    
+ +

See also insert(). + +

TQString & TQString::prepend ( char ch ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts ch at the beginning of the string and returns a +reference to the string. +

Equivalent to insert(0, ch). +

See also insert(). + +

TQString & TQString::prepend ( TQChar ch ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts ch at the beginning of the string and returns a +reference to the string. +

Equivalent to insert(0, ch). +

See also insert(). + +

TQString & TQString::prepend ( const TQByteArray & s ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts s at the beginning of the string and returns a reference to the string. +

Equivalent to insert(0, s). +

See also insert(). + +

TQString & TQString::prepend ( const char * s ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts s at the beginning of the string and returns a reference to the string. +

Equivalent to insert(0, s). +

See also insert(). + +

TQString & TQString::prepend ( const std::string & s ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts s at the beginning of the string and returns a reference to the string. +

Equivalent to insert(0, s). +

See also insert(). + +

TQChar & TQString::ref ( uint i ) +

+ +

Returns the TQChar at index i by reference, expanding the string +with TQChar::null if necessary. The resulting reference can be +assigned to, or otherwise used immediately, but becomes invalid +once furher modifications are made to the string. +

+        TQString string("ABCDEF");
+        TQChar ch = string.ref( 3 );         // ch == 'D'
+    
+ +

See also constref(). + +

TQString & TQString::remove ( uint index, uint len ) +

+Removes len characters from the string starting at position index, and returns a reference to the string. +

If index is beyond the length of the string, nothing happens. +If index is within the string, but index + len is beyond +the end of the string, the string is truncated at position index. +

+        TQString string( "Montreal" );
+        string.remove( 1, 4 );      // string == "Meal"
+    
+ +

See also insert() and replace(). + +

TQString & TQString::remove ( const TQString & str, bool cs = TRUE ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Removes every occurrence of str in the string. Returns a +reference to the string. +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. +

This is the same as replace(str, "", cs). + +

TQString & TQString::remove ( TQChar c ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Removes every occurrence of the character c in the string. +Returns a reference to the string. +

This is the same as replace(c, ""). + +

TQString & TQString::remove ( char c ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Removes every occurrence of the character c in the string. +Returns a reference to the string. +

This is the same as replace(c, ""). + +

TQString & TQString::remove ( const char * str ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Removes every occurrence of str in the string. Returns a +reference to the string. + +

TQString & TQString::remove ( const TQRegExp & rx ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Removes every occurrence of the regular expression rx in the +string. Returns a reference to the string. +

This is the same as replace(rx, ""). + +

TQString & TQString::replace ( uint index, uint len, const TQString & s ) +

+Replaces len characters from the string with s, starting at +position index, and returns a reference to the string. +

If index is beyond the length of the string, nothing is deleted +and s is appended at the end of the string. If index is +valid, but index + len is beyond the end of the string, +the string is truncated at position index, then s is +appended at the end. +

+        TQString string( "Say yes!" );
+        string = string.replace( 4, 3, "NO" );
+        // string == "Say NO!"
+    
+ +

Warning: TQt 3.3.3 and earlier had different semantics for the +case index >= length(), which contradicted the documentation. +To avoid portability problems between TQt 3 versions and with TQt +4, we recommend that you never call the function with index >= +length(). +

See also insert() and remove(). + +

Examples: listviews/listviews.cpp, network/networkprotocol/nntp.cpp, qmag/qmag.cpp, and regexptester/regexptester.cpp. +

TQString & TQString::replace ( uint index, uint len, const TQChar * s, uint slen ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Replaces len characters with slen characters of TQChar data +from s, starting at position index, and returns a reference +to the string. +

See also insert() and remove(). + +

TQString & TQString::replace ( uint index, uint len, TQChar c ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This is the same as replace(index, len, TQString(c)). + +

TQString & TQString::replace ( uint index, uint len, char c ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

This is the same as replace(index, len, TQChar(c)). + +

TQString & TQString::replace ( TQChar c, const TQString & after, bool cs = TRUE ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Replaces every occurrence of the character c in the string +with after. Returns a reference to the string. +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. +

Example: +

+    TQString s = "a,b,c";
+    s.replace( TQChar(','), " or " );
+    // s == "a or b or c"
+    
+ + +

TQString & TQString::replace ( char c, const TQString & after, bool cs = TRUE ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Replaces every occurrence of the character c in the string +with after. Returns a reference to the string. +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. + +

TQString & TQString::replace ( const TQString & before, const TQString & after, bool cs = TRUE ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Replaces every occurrence of the string before in the string +with the string after. Returns a reference to the string. +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. +

Example: +

+    TQString s = "Greek is Greek";
+    s.replace( "Greek", "English" );
+    // s == "English is English"
+    
+ + +

TQString & TQString::replace ( const TQRegExp & rx, const TQString & after ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Replaces every occurrence of the regexp rx in the string with +after. Returns a reference to the string. For example: +

+    TQString s = "banana";
+    s.replace( TQRegExp("an"), "" );
+    // s == "ba"
+  
+ +

For regexps containing capturing + parentheses, occurrences of \1, \2, ..., +in after are replaced with rx.cap(1), cap(2), ... +

+    TQString t = "A <i>bon mot</i>.";
+    t.replace( TQRegExp("<i>([^<]*)</i>"), "\\emph{\\1}" );
+    // t == "A \\emph{bon mot}."
+  
+ +

See also find(), findRev(), and TQRegExp::cap(). + +

TQString & TQString::replace ( TQChar c1, TQChar c2 ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Replaces every occurrence of c1 with the char c2. Returns a +reference to the string. + +

void TQString::reserve ( uint minCapacity ) +

+Ensures that at least minCapacity characters are allocated to +the string. +

This function is useful for code that needs to build up a long +string and wants to avoid repeated reallocation. In this example, +we want to add to the string until some condition is true, and +we're fairly sure that size is big enough: +

+        TQString result;
+        int len = 0;
+        result.reserve(maxLen);
+        while (...) {
+            result[len++] = ...         // fill part of the space
+        }
+        result.squeeze();
+    
+ +

If maxLen is an underestimate, the worst that will happen is +that the loop will slow down. +

If it is not possible to allocate enough memory, the string +remains unchanged. +

See also capacity(), squeeze(), and setLength(). + +

TQString TQString::right ( uint len ) const +

+Returns a string that contains the len rightmost characters of +the string. +

If len is greater than the length of the string then the whole +string is returned. +

+        TQString string( "Pineapple" );
+        TQString t = string.right( 5 );   // t == "apple"
+    
+ +

See also left(), mid(), and isEmpty(). + +

Example: fileiconview/qfileiconview.cpp. +

TQString TQString::rightJustify ( uint width, TQChar fill = ' ', bool truncate = FALSE ) const +

+Returns a string of length width that contains the fill +character followed by the string. +

If truncate is FALSE and the length of the string is more than +width, then the returned string is a copy of the string. +

If truncate is TRUE and the length of the string is more than +width, then the resulting string is truncated at position width. +

+        TQString string( "apple" );
+        TQString t = string.rightJustify( 8, '.' );  // t == "...apple"
+    
+ +

See also leftJustify(). + +

TQString TQString::section ( TQChar sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const +

+ +

This function returns a section of the string. +

This string is treated as a sequence of fields separated by the +character, sep. The returned string consists of the fields from +position start to position end inclusive. If end is not +specified, all fields from position start to the end of the +string are included. Fields are numbered 0, 1, 2, etc., counting +from the left, and -1, -2, etc., counting from right to left. +

The flags argument can be used to affect some aspects of the +function's behaviour, e.g. whether to be case sensitive, whether +to skip empty fields and how to deal with leading and trailing +separators; see SectionFlags. +

+    TQString csv( "forename,middlename,surname,phone" );
+    TQString s = csv.section( ',', 2, 2 );   // s == "surname"
+
+    TQString path( "/usr/local/bin/myapp" ); // First field is empty
+    TQString s = path.section( '/', 3, 4 );  // s == "bin/myapp"
+    TQString s = path.section( '/', 3, 3, SectionSkipEmpty ); // s == "myapp"
+    
+ +

If start or end is negative, we count fields from the right +of the string, the right-most field being -1, the one from +right-most field being -2, and so on. +

+    TQString csv( "forename,middlename,surname,phone" );
+    TQString s = csv.section( ',', -3, -2 );  // s == "middlename,surname"
+
+    TQString path( "/usr/local/bin/myapp" ); // First field is empty
+    TQString s = path.section( '/', -1 ); // s == "myapp"
+    
+ +

See also TQStringList::split(). + +

Examples: chart/element.cpp and network/ftpclient/ftpmainwindow.ui.h. +

TQString TQString::section ( char sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

TQString TQString::section ( const char * sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

TQString TQString::section ( const TQString & sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function returns a section of the string. +

This string is treated as a sequence of fields separated by the +string, sep. The returned string consists of the fields from +position start to position end inclusive. If end is not +specified, all fields from position start to the end of the +string are included. Fields are numbered 0, 1, 2, etc., counting +from the left, and -1, -2, etc., counting from right to left. +

The flags argument can be used to affect some aspects of the +function's behaviour, e.g. whether to be case sensitive, whether +to skip empty fields and how to deal with leading and trailing +separators; see SectionFlags. +

+    TQString data( "forename**middlename**surname**phone" );
+    TQString s = data.section( "**", 2, 2 ); // s == "surname"
+    
+ +

If start or end is negative, we count fields from the right +of the string, the right-most field being -1, the one from +right-most field being -2, and so on. +

+    TQString data( "forename**middlename**surname**phone" );
+    TQString s = data.section( "**", -3, -2 ); // s == "middlename**surname"
+    
+ +

See also TQStringList::split(). + +

TQString TQString::section ( const TQRegExp & reg, int start, int end = 0xffffffff, int flags = SectionDefault ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function returns a section of the string. +

This string is treated as a sequence of fields separated by the +regular expression, reg. The returned string consists of the +fields from position start to position end inclusive. If end is not specified, all fields from position start to the end +of the string are included. Fields are numbered 0, 1, 2, etc., counting +from the left, and -1, -2, etc., counting from right to left. +

The flags argument can be used to affect some aspects of the +function's behaviour, e.g. whether to be case sensitive, whether +to skip empty fields and how to deal with leading and trailing +separators; see SectionFlags. +

+    TQString line( "forename\tmiddlename  surname \t \t phone" );
+    TQRegExp sep( "\s+" );
+    TQString s = line.section( sep, 2, 2 ); // s == "surname"
+    
+ +

If start or end is negative, we count fields from the right +of the string, the right-most field being -1, the one from +right-most field being -2, and so on. +

+    TQString line( "forename\tmiddlename  surname \t \t phone" );
+    TQRegExp sep( "\\s+" );
+    TQString s = line.section( sep, -3, -2 ); // s == "middlename  surname"
+    
+ +

Warning: Using this TQRegExp version is much more expensive than +the overloaded string and character versions. +

See also TQStringList::split() and simplifyWhiteSpace(). + +

TQString & TQString::setAscii ( const char * str, int len = -1 ) +

+Sets this string to str, interpreted as a classic 8-bit ASCII C +string. If len is -1 (the default), then it is set to +strlen(str). +

If str is 0 a null string is created. If str is "", an empty +string is created. +

See also isNull() and isEmpty(). + +

void TQString::setExpand ( uint index, TQChar c ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Sets the character at position index to c and expands the +string if necessary, filling with spaces. +

This method is redundant in TQt 3.x, because operator[] will expand +the string as necessary. + +

TQString & TQString::setLatin1 ( const char * str, int len = -1 ) +

+Sets this string to str, interpreted as a classic Latin-1 C +string. If len is -1 (the default), then it is set to +strlen(str). +

If str is 0 a null string is created. If str is "", an empty +string is created. +

See also isNull() and isEmpty(). + +

void TQString::setLength ( uint newLen ) +

+Ensures that at least newLen characters are allocated to the +string, and sets the length of the string to newLen. Any new +space allocated contains arbitrary data. +

See also reserve() and truncate(). + +

TQString & TQString::setNum ( Q_LLONG n, int base = 10 ) +

+Sets the string to the printed value of n in base base and +returns a reference to the string. The returned string is in "C" locale. +

The base is 10 by default and must be between 2 and 36. +

+        TQString string;
+        string = string.setNum( 1234 );     // string == "1234"
+    
+ + +

TQString & TQString::setNum ( short n, int base = 10 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the string to the printed value of n in base base and +returns a reference to the string. +

The base is 10 by default and must be between 2 and 36. + +

TQString & TQString::setNum ( ushort n, int base = 10 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the string to the printed value of n in base base and +returns a reference to the string. +

The base is 10 by default and must be between 2 and 36. + +

TQString & TQString::setNum ( int n, int base = 10 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the string to the printed value of n in base base and +returns a reference to the string. +

The base is 10 by default and must be between 2 and 36. + +

TQString & TQString::setNum ( uint n, int base = 10 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the string to the printed value of n in base base and +returns a reference to the string. +

The base is 10 by default and must be between 2 and 36. + +

TQString & TQString::setNum ( long n, int base = 10 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

TQString & TQString::setNum ( ulong n, int base = 10 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

TQString & TQString::setNum ( Q_ULLONG n, int base = 10 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the string to the printed value of n in base base and +returns a reference to the string. +

The base is 10 by default and must be between 2 and 36. + +

TQString & TQString::setNum ( float n, char f = 'g', int prec = 6 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the string to the printed value of n, formatted in format +f with precision prec, and returns a reference to the +string. +

The format f can be 'f', 'F', 'e', 'E', 'g' or 'G'. See arg() for an explanation of the formats. + +

TQString & TQString::setNum ( double n, char f = 'g', int prec = 6 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the string to the printed value of n, formatted in format +f with precision prec, and returns a reference to the +string. +

The format f can be 'f', 'F', 'e', 'E', 'g' or 'G'. See arg() for an explanation of the formats. + +

TQString & TQString::setUnicode ( const TQChar * unicode, uint len ) +

+Resizes the string to len characters and copies unicode into +the string. If unicode is 0, nothing is copied, but the +string is still resized to len. If len is zero, then the +string becomes a null string. +

See also setLatin1() and isNull(). + +

TQString & TQString::setUnicodeCodes ( const ushort * unicode_as_ushorts, uint len ) +

+Resizes the string to len characters and copies unicode_as_ushorts into the string (on some X11 client platforms +this will involve a byte-swapping pass). +

If unicode_as_ushorts is 0, nothing is copied, but the string +is still resized to len. If len is zero, the string becomes +a null string. +

See also setLatin1() and isNull(). + +

TQString TQString::simplifyWhiteSpace () const +

+Returns a string that has whitespace removed from the start and +the end, and which has each sequence of internal whitespace +replaced with a single space. +

Whitespace means any character for which TQChar::isSpace() returns +TRUE. This includes Unicode characters with decimal values 9 +(TAB), 10 (LF), 11 (VT), 12 (FF), 13 (CR), and 32 (Space). +

+        TQString string = "  lots\t of\nwhite    space ";
+        TQString t = string.simplifyWhiteSpace();
+        // t == "lots of white space"
+    
+ +

See also stripWhiteSpace(). + +

TQString & TQString::sprintf ( const char * cformat, ... ) +

+Safely builds a formatted string from the format string cformat +and an arbitrary list of arguments. The format string supports all +the escape sequences of printf() in the standard C library. +

The %s escape sequence expects a utf8() encoded string. The format +string cformat is expected to be in latin1. If you need a +Unicode format string, use arg() instead. For typesafe string +building, with full Unicode support, you can use TQTextOStream like +this: +

+        TQString str;
+        TQString s = ...;
+        int x = ...;
+        TQTextOStream( &str ) << s << " : " << x;
+    
+ +

For translations, especially if the +strings contains more than one escape sequence, you should +consider using the arg() function instead. This allows the order +of the replacements to be controlled by the translator, and has +Unicode support. +

The %lc escape sequence expects a unicode character of type ushort +(as returned by TQChar::unicode()). +The %ls escape sequence expects a pointer to a zero-terminated +array of unicode characters of type ushort (as returned by +TQString::ucs2()). +

See also arg(). + +

Examples: dclock/dclock.cpp, forever/forever.cpp, layout/layout.cpp, qmag/qmag.cpp, scrollview/scrollview.cpp, tooltip/tooltip.cpp, and xform/xform.cpp. +

void TQString::squeeze () +

+Squeezes the string's capacity to the current content. +

See also capacity() and reserve(). + +

bool TQString::startsWith ( const TQString & s, bool cs = TRUE ) const +

+Returns TRUE if the string starts with s; otherwise returns +FALSE. +

If cs is TRUE (the default), the search is case sensitive; +otherwise the search is case insensitive. +

+        TQString str( "Bananas" );
+        str.startsWith( "Ban" );     // returns TRUE
+        str.startsWith( "Car" );     // returns FALSE
+    
+ +

See also endsWith(). + +

TQString TQString::stripWhiteSpace () const +

+Returns a string that has whitespace removed from the start and +the end. +

Whitespace means any character for which TQChar::isSpace() returns +TRUE. This includes Unicode characters with decimal values 9 +(TAB), 10 (LF), 11 (VT), 12 (FF), 13 (CR) and 32 (Space), and may +also include other Unicode characters. +

+        TQString string = "   white space   ";
+        TQString s = string.stripWhiteSpace();       // s == "white space"
+    
+ +

See also simplifyWhiteSpace(). + +

double TQString::toDouble ( bool * ok = 0 ) const +

+Returns the string converted to a double value. +

If ok is not 0: if a conversion error occurs, *ok is set to +FALSE; otherwise *ok is set to TRUE. +

+        TQString string( "1234.56" );
+        double a = string.toDouble();   // a == 1234.56
+    
+ +

The string-to-number functions: +

+can handle numbers +represented in various locales. These representations may use different +characters for the decimal point, thousands group sepearator +and even individual digits. TQString's functions try to interpret +the string according to the current locale. The current locale is +determined from the system at application startup and can be changed +by calling TQLocale::setDefault(). If the string cannot be interpreted +according to the current locale, this function falls back +on the "C" locale. +

+        bool ok;
+        double d;
+
+        TQLocale::setDefault(TQLocale::C);
+        d = TQString( "1234,56" ).toDouble(&ok); // ok == false
+        d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
+
+        TQLocale::setDefault(TQLocale::German);
+        d = TQString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56
+        d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
+    
+ +

Due to the ambiguity between the decimal point and thousands group +separator in various locales, these functions do not handle +thousands group separators. If you need to convert such numbers, +use the corresponding function in TQLocale. +

+        bool ok;
+        TQLocale::setDefault(TQLocale::C);
+        double d = TQString( "1,234,567.89" ).toDouble(&ok); // ok == false
+    
+ +

Warning: If the string contains trailing whitespace this function +will fail, and set *ok to false if ok is not 0. Leading +whitespace is ignored. +

See also number(), TQLocale::setDefault(), TQLocale::toDouble(), and stripWhiteSpace(). + +

float TQString::toFloat ( bool * ok = 0 ) const +

+Returns the string converted to a float value. +

Returns 0.0 if the conversion fails. +

If ok is not 0: if a conversion error occurs, *ok is set to +FALSE; otherwise *ok is set to TRUE. +

For information on how string-to-number functions in TQString handle +localized input, see toDouble(). +

Warning: If the string contains trailing whitespace this function +will fail, settings *ok to false if ok is not 0. +Leading whitespace is ignored. +

See also number(). + +

int TQString::toInt ( bool * ok = 0, int base = 10 ) const +

+Returns the string converted to an int using base base, which is 10 by default and must be between 2 and 36 or 0. If +base is 0, the base is determined automatically using the +following rules: +
    +
  • If the string begins with "0x", it is assumed to +be hexadecimal; +
  • If it begins with "0", it is assumed to be octal; +
  • Otherwise it is assumed to be decimal. +
+

Returns 0 if the conversion fails. +

If ok is not 0: if a conversion error occurs, *ok is set to +FALSE; otherwise *ok is set to TRUE. +

+        TQString str( "FF" );
+        bool ok;
+        int hex = str.toInt( &ok, 16 );     // hex == 255, ok == TRUE
+        int dec = str.toInt( &ok, 10 );     // dec == 0, ok == FALSE
+    
+ +

Leading and trailing whitespace is ignored by this function. +

For information on how string-to-number functions in TQString handle +localized input, see toDouble(). +

See also number(). + +

long TQString::toLong ( bool * ok = 0, int base = 10 ) const +

+Returns the string converted to a long using base base, which is 10 by default and must be between 2 and 36 or 0. If +base is 0, the base is determined automatically using the +following rules: +
    +
  • If the string begins with "0x", it is assumed to +be hexadecimal; +
  • If it begins with "0", it is assumed to be octal; +
  • Otherwise it is assumed to be decimal. +
+

Returns 0 if the conversion fails. +

If ok is not 0: if a conversion error occurs, *ok is set to +FALSE; otherwise *ok is set to TRUE. +

Leading and trailing whitespace is ignored by this function. +

For information on how string-to-number functions in TQString handle +localized input, see toDouble(). +

See also number(). + +

Q_LLONG TQString::toLongLong ( bool * ok = 0, int base = 10 ) const +

+Returns the string converted to a long long using base base, which is 10 by default and must be between 2 and 36 or 0. If +base is 0, the base is determined automatically using the +following rules: +
    +
  • If the string begins with "0x", it is assumed to +be hexadecimal; +
  • If it begins with "0", it is assumed to be octal; +
  • Otherwise it is assumed to be decimal. +
+

Returns 0 if the conversion fails. +

If ok is not 0: if a conversion error occurs, *ok is set to +FALSE; otherwise *ok is set to TRUE. +

Leading and trailing whitespace is ignored by this function. +

For information on how string-to-number functions in TQString handle +localized input, see toDouble(). +

See also number(). + +

short TQString::toShort ( bool * ok = 0, int base = 10 ) const +

+Returns the string converted to a short using base base, which is 10 by default and must be between 2 and 36 or 0. If +base is 0, the base is determined automatically using the +following rules: +
    +
  • If the string begins with "0x", it is assumed to +be hexadecimal; +
  • If it begins with "0", it is assumed to be octal; +
  • Otherwise it is assumed to be decimal. +
+

Returns 0 if the conversion fails. +

If ok is not 0: if a conversion error occurs, *ok is set to +FALSE; otherwise *ok is set to TRUE. +

Leading and trailing whitespace is ignored by this function. +

For information on how string-to-number functions in TQString handle +localized input, see toDouble(). +

See also number(). + +

uint TQString::toUInt ( bool * ok = 0, int base = 10 ) const +

+Returns the string converted to an unsigned int using base base, which is 10 by default and must be between 2 and 36 or 0. If +base is 0, the base is determined automatically using the +following rules: +
    +
  • If the string begins with "0x", it is assumed to +be hexadecimal; +
  • If it begins with "0", it is assumed to be octal; +
  • Otherwise it is assumed to be decimal. +
+

Returns 0 if the conversion fails. +

If ok is not 0: if a conversion error occurs, *ok is set to +FALSE; otherwise *ok is set to TRUE. +

Leading and trailing whitespace is ignored by this function. +

For information on how string-to-number functions in TQString handle +localized input, see toDouble(). +

See also number(). + +

ulong TQString::toULong ( bool * ok = 0, int base = 10 ) const +

+Returns the string converted to an unsigned long using base base, which is 10 by default and must be between 2 and 36 or 0. If +base is 0, the base is determined automatically using the +following rules: +
    +
  • If the string begins with "0x", it is assumed to +be hexadecimal; +
  • If it begins with "0", it is assumed to be octal; +
  • Otherwise it is assumed to be decimal. +
+

Returns 0 if the conversion fails. +

If ok is not 0: if a conversion error occurs, *ok is set to +FALSE; otherwise *ok is set to TRUE. +

Leading and trailing whitespace is ignored by this function. +

For information on how string-to-number functions in TQString handle +localized input, see toDouble(). +

See also number(). + +

Q_ULLONG TQString::toULongLong ( bool * ok = 0, int base = 10 ) const +

+Returns the string converted to an unsigned long long using base base, which is 10 by default and must be between 2 and 36 or 0. If +base is 0, the base is determined automatically using the +following rules: +
    +
  • If the string begins with "0x", it is assumed to +be hexadecimal; +
  • If it begins with "0", it is assumed to be octal; +
  • Otherwise it is assumed to be decimal. +
+

Returns 0 if the conversion fails. +

If ok is not 0: if a conversion error occurs, *ok is set to +FALSE; otherwise *ok is set to TRUE. +

Leading and trailing whitespace is ignored by this function. +

For information on how string-to-number functions in TQString handle +localized input, see toDouble(). +

See also number(). + +

ushort TQString::toUShort ( bool * ok = 0, int base = 10 ) const +

+Returns the string converted to an unsigned short using base base, which is 10 by default and must be between 2 and 36 or 0. If +base is 0, the base is determined automatically using the +following rules: +
    +
  • If the string begins with "0x", it is assumed to +be hexadecimal; +
  • If it begins with "0", it is assumed to be octal; +
  • Otherwise it is assumed to be decimal. +
+

Returns 0 if the conversion fails. +

If ok is not 0: if a conversion error occurs, *ok is set to +FALSE; otherwise *ok is set to TRUE. +

Leading and trailing whitespace is ignored by this function. +

For information on how string-to-number functions in TQString handle +localized input, see toDouble(). +

See also number(). + +

void TQString::truncate ( uint newLen ) +

+If newLen is less than the length of the string, then the +string is truncated at position newLen. Otherwise nothing +happens. +

+        TQString s = "truncate me";
+        s.truncate( 5 );            // s == "trunc"
+    
+ +

See also setLength(). + +

Example: network/mail/smtp.cpp. +

const unsigned short * TQString::ucs2 () const +

+Returns the TQString as a zero terminated array of unsigned shorts +if the string is not null; otherwise returns zero. +

The result remains valid so long as one unmodified +copy of the source string exists. + +

Example: dotnet/wrapper/lib/tools.cpp. +

const TQChar * TQString::unicode () const +

+ +

Returns the Unicode representation of the string. The result +remains valid until the string is modified. + +

TQString TQString::upper () const +

+Returns an uppercase copy of the string. +

+        TQString string( "TeXt" );
+        str = string.upper();     // t == "TEXT"
+    
+ +

See also lower(). + +

Examples: scribble/scribble.cpp and sql/overview/custom1/main.cpp. +

TQCString TQString::utf8 () const +

+Returns the string encoded in UTF-8 format. +

See TQTextCodec for more diverse coding/decoding of Unicode strings. +

See also fromUtf8(), ascii(), latin1(), and local8Bit(). + +

Example: network/archivesearch/archivedialog.ui.h. +


Related Functions

+

bool operator!= ( const TQString & s1, const TQString & s2 ) +

+ +

+

Returns TRUE if s1 is not equal to s2; otherwise returns FALSE. +Note that a null string is not equal to a not-null empty string. +

Equivalent to compare(s1, s2) != 0. +

See also isNull() and isEmpty(). + +

bool operator!= ( const TQString & s1, const char * s2 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns TRUE if s1 is not equal to s2; otherwise returns FALSE. +Note that a null string is not equal to a not-null empty string. +

Equivalent to compare(s1, s2) != 0. +

See also isNull() and isEmpty(). + +

bool operator!= ( const char * s1, const TQString & s2 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns TRUE if s1 is not equal to s2; otherwise returns FALSE. +Note that a null string is not equal to a not-null empty string. +

Equivalent to compare(s1, s2) != 0. +

See also isNull() and isEmpty(). + +

const TQString operator+ ( const TQString & s1, const TQString & s2 ) +

+ +

+

Returns a string which is the result of concatenating the string +s1 and the string s2. +

Equivalent to s1.append(s2). + +

const TQString operator+ ( const TQString & s1, const char * s2 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns a string which is the result of concatenating the string +s1 and character s2. +

Equivalent to s1.append(s2). + +

const TQString operator+ ( const char * s1, const TQString & s2 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns a string which is the result of concatenating the +character s1 and string s2. + +

const TQString operator+ ( const TQString & s, char c ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns a string which is the result of concatenating the string +s and character c. +

Equivalent to s.append(c). + +

const TQString operator+ ( char c, const TQString & s ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns a string which is the result of concatenating the +character c and string s. +

Equivalent to s.prepend(c). + +

bool operator< ( const TQString & s1, const char * s2 ) +

+ +

+

Returns TRUE if s1 is lexically less than s2; otherwise returns FALSE. +The comparison is case sensitive. +

Equivalent to compare(s1, s2) < 0. + +

bool operator< ( const char * s1, const TQString & s2 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns TRUE if s1 is lexically less than s2; otherwise returns FALSE. +The comparison is case sensitive. +

Equivalent to compare(s1, s2) < 0. + +

TQDataStream & operator<< ( TQDataStream & s, const TQString & str ) +

+ +

Writes the string str to the stream s. +

See also Format of the TQDataStream operators + +

bool operator<= ( const TQString & s1, const char * s2 ) +

+ +

+

Returns TRUE if s1 is lexically less than or equal to s2; +otherwise returns FALSE. +The comparison is case sensitive. +Note that a null string is not equal to a not-null empty string. +

Equivalent to compare(s1,s2) <= 0. +

See also isNull() and isEmpty(). + +

bool operator<= ( const char * s1, const TQString & s2 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns TRUE if s1 is lexically less than or equal to s2; +otherwise returns FALSE. +The comparison is case sensitive. +Note that a null string is not equal to a not-null empty string. +

Equivalent to compare(s1, s2) <= 0. +

See also isNull() and isEmpty(). + +

bool operator== ( const TQString & s1, const TQString & s2 ) +

+ +

+

Returns TRUE if s1 is equal to s2; otherwise returns FALSE. +Note that a null string is not equal to a not-null empty string. +

Equivalent to compare(s1, s2) == 0. +

See also isNull() and isEmpty(). + +

bool operator== ( const TQString & s1, const char * s2 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns TRUE if s1 is equal to s2; otherwise returns FALSE. +Note that a null string is not equal to a not-null empty string. +

Equivalent to compare(s1, s2) == 0. +

See also isNull() and isEmpty(). + +

bool operator== ( const char * s1, const TQString & s2 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns TRUE if s1 is equal to s2; otherwise returns FALSE. +Note that a null string is not equal to a not-null empty string. +

Equivalent to compare(s1, s2) == 0. +

See also isNull() and isEmpty(). + +

bool operator> ( const TQString & s1, const char * s2 ) +

+ +

+

Returns TRUE if s1 is lexically greater than s2; otherwise +returns FALSE. +The comparison is case sensitive. +

Equivalent to compare(s1, s2) > 0. + +

bool operator> ( const char * s1, const TQString & s2 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns TRUE if s1 is lexically greater than s2; otherwise +returns FALSE. +The comparison is case sensitive. +

Equivalent to compare(s1, s2) > 0. + +

bool operator>= ( const TQString & s1, const char * s2 ) +

+ +

+

Returns TRUE if s1 is lexically greater than or equal to s2; +otherwise returns FALSE. +The comparison is case sensitive. +Note that a null string is not equal to a not-null empty string. +

Equivalent to compare(s1, s2) >= 0. +

See also isNull() and isEmpty(). + +

bool operator>= ( const char * s1, const TQString & s2 ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Returns TRUE if s1 is lexically greater than or equal to s2; +otherwise returns FALSE. +The comparison is case sensitive. +Note that a null string is not equal to a not-null empty string. +

Equivalent to compare(s1, s2) >= 0. +

See also isNull() and isEmpty(). + +

TQDataStream & operator>> ( TQDataStream & s, TQString & str ) +

+ +

Reads a string from the stream s into string str. +

See also Format of the TQDataStream operators + + +


+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/qstringlist-h.html b/doc/html/qstringlist-h.html new file mode 100644 index 00000000..53a15269 --- /dev/null +++ b/doc/html/qstringlist-h.html @@ -0,0 +1,151 @@ + + + + + +qstringlist.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qstringlist.h

+ +

This is the verbatim text of the qstringlist.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qstringlist.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQStringList 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 retquirements 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 TQSTRINGLIST_H
+#define TQSTRINGLIST_H
+
+#ifndef QT_H
+#include "qvaluelist.h"
+#include "qstring.h"
+#include "qstrlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_STRINGLIST
+
+class TQRegExp;
+template <class T> class TQDeepCopy;
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+//Q_TEMPLATE_EXTERN template class Q_EXPORT TQValueList<TQString>; 
+// MOC_SKIP_END
+#endif
+
+class Q_EXPORT TQStringList : public TQValueList<TQString>
+{
+public:
+    TQStringList() { }
+    TQStringList( const TQStringList& l ) : TQValueList<TQString>(l) { }
+    TQStringList( const TQValueList<TQString>& l ) : TQValueList<TQString>(l) { }
+    TQStringList( const TQString& i ) { append(i); }
+#ifndef QT_NO_CAST_ASCII
+    TQStringList( const char* i ) { append(i); }
+#endif
+
+    static TQStringList fromStrList(const TQStrList&);
+
+    void sort();
+
+    static TQStringList split( const TQString &sep, const TQString &str, bool allowEmptyEntries = FALSE );
+    static TQStringList split( const TQChar &sep, const TQString &str, bool allowEmptyEntries = FALSE );
+#ifndef QT_NO_REGEXP
+    static TQStringList split( const TQRegExp &sep, const TQString &str, bool allowEmptyEntries = FALSE );
+#endif
+    TQString join( const TQString &sep ) const;
+
+    TQStringList grep( const TQString &str, bool cs = TRUE ) const;
+#ifndef QT_NO_REGEXP
+    TQStringList grep( const TQRegExp &expr ) const;
+#endif
+
+    TQStringList& gres( const TQString &before, const TQString &after,
+		       bool cs = TRUE );
+#ifndef QT_NO_REGEXP_CAPTURE
+    TQStringList& gres( const TQRegExp &expr, const TQString &after );
+#endif
+
+protected:
+    void detach() { TQValueList<TQString>::detach(); }
+    friend class TQDeepCopy< TQStringList >;
+};
+
+#ifndef QT_NO_DATASTREAM
+class TQDataStream;
+extern Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQStringList& );
+extern Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQStringList& );
+#endif
+
+#endif // QT_NO_STRINGLIST
+#endif // TQSTRINGLIST_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstringlist-members.html b/doc/html/qstringlist-members.html new file mode 100644 index 00000000..ec2b3031 --- /dev/null +++ b/doc/html/qstringlist-members.html @@ -0,0 +1,87 @@ + + + + + +TQStringList Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQStringList

+ +

This is the complete list of member functions for +TQStringList, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstringlist.html b/doc/html/qstringlist.html new file mode 100644 index 00000000..21e5cadd --- /dev/null +++ b/doc/html/qstringlist.html @@ -0,0 +1,309 @@ + + + + + +TQStringList Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQStringList Class Reference

+ +

The TQStringList class provides a list of strings. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qstringlist.h> +

Inherits TQValueList<TQString>. +

List of all member functions. +

Public Members

+
    +
  • TQStringList ()
  • +
  • TQStringList ( const TQStringList & l )
  • +
  • TQStringList ( const TQValueList<TQString> & l )
  • +
  • TQStringList ( const TQString & i )
  • +
  • TQStringList ( const char * i )
  • +
  • void sort ()
  • +
  • TQString join ( const TQString & sep ) const
  • +
  • TQStringList grep ( const TQString & str, bool cs = TRUE ) const
  • +
  • TQStringList grep ( const TQRegExp & rx ) const
  • +
  • TQStringList & gres ( const TQString & before, const TQString & after, bool cs = TRUE )
  • +
  • TQStringList & gres ( const TQRegExp & rx, const TQString & after )
  • +
+

Static Public Members

+
    +
  • TQStringList fromStrList ( const TQStrList & ascii )
  • +
  • TQStringList split ( const TQString & sep, const TQString & str, bool allowEmptyEntries = FALSE )
  • +
  • TQStringList split ( const TQChar & sep, const TQString & str, bool allowEmptyEntries = FALSE )
  • +
  • TQStringList split ( const TQRegExp & sep, const TQString & str, bool allowEmptyEntries = FALSE )
  • +
+

Detailed Description

+ + + +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 +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. +

+    TQStringList fonts;
+    fonts.append( "Times" );
+    fonts += "Courier";
+    fonts += "Courier New";
+    fonts << "Helvetica [Cronyx]" << "Helvetica [Adobe]";
+    
+ +

String lists have an iterator, TQStringList::Iterator(), e.g. +

+    for ( TQStringList::Iterator it = fonts.begin(); it != fonts.end(); ++it ) {
+        cout << *it << ":";
+    }
+    cout << endl;
+    // Output:
+    //  Times:Courier:Courier New:Helvetica [Cronyx]:Helvetica [Adobe]:
+    
+ +

Many TQt functions return string lists by value; to iterate over +these you should make a copy and iterate over the copy. +

You can concatenate all the strings in a string list into a single +string (with an optional separator) using join(), e.g. +

+    TQString allFonts = fonts.join( ", " );
+    cout << allFonts << endl;
+    // Output:
+    //  Times, Courier, Courier New, Helvetica [Cronyx], Helvetica [Adobe]
+    
+ +

You can sort the list with sort(), and extract a new list which +contains only those strings which contain a particular substring +(or match a particular regular expression) using the grep() +functions, e.g. +

+    fonts.sort();
+    cout << fonts.join( ", " ) << endl;
+    // Output:
+    //  Courier, Courier New, Helvetica [Adobe], Helvetica [Cronyx], Times
+
+    TQStringList helveticas = fonts.grep( "Helvetica" );
+    cout << helveticas.join( ", " ) << endl;
+    // Output:
+    //  Helvetica [Adobe], Helvetica [Cronyx]
+    
+ +

Existing strings can be split into string lists with character, +string or regular expression separators, e.g. +

+    TQString s = "Red\tGreen\tBlue";
+    TQStringList colors = TQStringList::split( "\t", s );
+    cout << colors.join( ", " ) << endl;
+    // Output:
+    //  Red, Green, Blue
+    
+ +

See also Implicitly and Explicitly Shared Classes, Text Related Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQStringList::TQStringList () +

+ +

Creates an empty string list. + +

TQStringList::TQStringList ( const TQStringList & l ) +

+ +

Creates a copy of the list l. This function is very fast +because TQStringList 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 retquire a real deep copy +. + +

TQStringList::TQStringList ( const TQValueList<TQString> & l ) +

+ +

Constructs a new string list that is a copy of l. + +

TQStringList::TQStringList ( const TQString & i ) +

+ +

Constructs a string list consisting of the single string i. +Longer lists are easily created as follows: +

+    TQStringList items;
+    items << "Buy" << "Sell" << "Update" << "Value";
+    
+ + +

TQStringList::TQStringList ( const char * i ) +

+ +

Constructs a string list consisting of the single Latin-1 string i. + +

TQStringList TQStringList::fromStrList ( const TQStrList & ascii ) [static] +

+Converts from an ASCII-TQStrList ascii to a TQStringList (Unicode). + +

TQStringList TQStringList::grep ( const TQString & str, bool cs = TRUE ) const +

+Returns a list of all the strings containing the substring str. +

If cs is TRUE, the grep is done case-sensitively; otherwise +case is ignored. +

+    TQStringList list;
+    list << "Bill Gates" << "John Doe" << "Bill Clinton";
+    list = list.grep( "Bill" );
+    // list == ["Bill Gates", "Bill Clinton"]
+    
+ +

See also TQString::find(). + +

TQStringList TQStringList::grep ( const TQRegExp & rx ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a list of all the strings that match the regular expression rx. +

See also TQString::find(). + +

TQStringList & TQStringList::gres ( const TQString & before, const TQString & after, bool cs = TRUE ) +

+Replaces every occurrence of the string before in the strings +that constitute the string list with the string after. Returns +a reference to the string list. +

If cs is TRUE, the search is case sensitive; otherwise the +search is case insensitive. +

Example: +

+    TQStringList list;
+    list << "alpha" << "beta" << "gamma" << "epsilon";
+    list.gres( "a", "o" );
+    // list == ["olpho", "beto", "gommo", "epsilon"]
+    
+ +

See also TQString::replace(). + +

TQStringList & TQStringList::gres ( const TQRegExp & rx, const TQString & after ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Replaces every occurrence of the regexp rx in the string +with after. Returns a reference to the string list. +

Example: +

+    TQStringList list;
+    list << "alpha" << "beta" << "gamma" << "epsilon";
+    list.gres( TQRegExp("^a"), "o" );
+    // list == ["olpha", "beta", "gamma", "epsilon"]
+    
+ +

For regexps containing capturing parentheses, occurrences of \1, +\2, ..., in after are replaced with rx.cap(1), +cap(2), ... +

Example: +

+    TQStringList list;
+    list << "Bill Clinton" << "Gates, Bill";
+    list.gres( TQRegExp("^(.*), (.*)$"), "\\2 \\1" );
+    // list == ["Bill Clinton", "Bill Gates"]
+    
+ +

See also TQString::replace(). + +

TQString TQStringList::join ( const TQString & sep ) const +

+Joins the string list into a single string with each element +separated by the string sep (which can be empty). +

See also split(). + +

Examples: fileiconview/qfileiconview.cpp and toplevel/options.ui.h. +

void TQStringList::sort () +

+Sorts the list of strings in ascending case-sensitive order. +

Sorting is very fast. It uses the TQt Template + 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> +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. + +

Example: themes/themes.cpp. +

TQStringList TQStringList::split ( const TQRegExp & sep, const TQString & str, bool allowEmptyEntries = FALSE ) [static] +

+Splits the string str into strings wherever the regular expression sep occurs, and returns the list of those strings. +

If allowEmptyEntries is TRUE, a null string is inserted in +the list wherever the separator matches twice without intervening +text. +

For example, if you split the string "a,,b,c" on commas, split() +returns the three-item list "a", "b", "c" if allowEmptyEntries +is FALSE (the default), and the four-item list "a", "", "b", "c" +if allowEmptyEntries is TRUE. +

If sep does not match anywhere in str, split() returns a +single element list with the element containing the single string +str. +

See also join() and TQString::section(). + +

Examples: chart/element.cpp, dirview/dirview.cpp, and network/httpd/httpd.cpp. +

TQStringList TQStringList::split ( const TQString & sep, const TQString & str, bool allowEmptyEntries = FALSE ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This version of the function uses a TQString as separator, rather +than a regular expression. +

If sep is an empty string, the return value is a list of +one-character strings: split( TQString( "" ), "four" ) returns the +four-item list, "f", "o", "u", "r". +

If allowEmptyEntries is TRUE, a null string is inserted in +the list wherever the separator matches twice without intervening +text. +

See also join() and TQString::section(). + +

TQStringList TQStringList::split ( const TQChar & sep, const TQString & str, bool allowEmptyEntries = FALSE ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This version of the function uses a TQChar as separator, rather +than a regular expression. +

See also join() and TQString::section(). + + +


+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/qstrlist-h.html b/doc/html/qstrlist-h.html new file mode 100644 index 00000000..32a2e6ed --- /dev/null +++ b/doc/html/qstrlist-h.html @@ -0,0 +1,154 @@ + + + + + +qstrlist.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qstrlist.h

+ +

This is the verbatim text of the qstrlist.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qstrlist.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQStrList, TQStrIList and TQStrListIterator classes
+**
+** Created : 920730
+**
+** 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 retquirements 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 TQSTRLIST_H
+#define TQSTRLIST_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qptrlist.h"
+#include "qdatastream.h"
+#endif // QT_H
+
+#if defined(Q_QDOC)
+class TQStrListIterator : public TQPtrListIterator<char>
+{
+};
+#else
+typedef TQPtrListIterator<char> TQStrListIterator;
+#endif
+
+class Q_EXPORT TQStrList : public TQPtrList<char>
+{
+public:
+    TQStrList( bool deepCopies=TRUE ) { dc = deepCopies; del_item = deepCopies; }
+    TQStrList( const TQStrList & );
+    ~TQStrList()			{ clear(); }
+    TQStrList& operator=( const TQStrList & );
+
+private:
+    TQPtrCollection::Item newItem( TQPtrCollection::Item d ) { return dc ? qstrdup( (const char*)d ) : d; }
+    void deleteItem( TQPtrCollection::Item d ) { if ( del_item ) delete[] (char*)d; }
+    int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 ) { return qstrcmp((const char*)s1,
+							 (const char*)s2); }
+#ifndef QT_NO_DATASTREAM
+    TQDataStream &read( TQDataStream &s, TQPtrCollection::Item &d )
+				{ s >> (char *&)d; return s; }
+    TQDataStream &write( TQDataStream &s, TQPtrCollection::Item d ) const
+				{ return s << (const char *)d; }
+#endif
+    bool  dc;
+};
+
+
+class Q_EXPORT TQStrIList : public TQStrList	// case insensitive string list
+{
+public:
+    TQStrIList( bool deepCopies=TRUE ) : TQStrList( deepCopies ) {}
+    ~TQStrIList()			{ clear(); }
+private:
+    int	  compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
+				{ return qstricmp((const char*)s1,
+						    (const char*)s2); }
+};
+
+
+inline TQStrList & TQStrList::operator=( const TQStrList &strList )
+{
+    clear();
+    dc = strList.dc;
+    del_item = dc;
+    TQPtrList<char>::operator=( strList );
+    return *this;
+}
+
+inline TQStrList::TQStrList( const TQStrList &strList )
+    : TQPtrList<char>( strList )
+{
+    dc = FALSE;
+    operator=( strList );
+}
+
+#endif // TQSTRLIST_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstrlist-members.html b/doc/html/qstrlist-members.html new file mode 100644 index 00000000..2cbdd54e --- /dev/null +++ b/doc/html/qstrlist-members.html @@ -0,0 +1,90 @@ + + + + + +TQStrList Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQStrList

+ +

This is the complete list of member functions for +TQStrList, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstrlist.html b/doc/html/qstrlist.html new file mode 100644 index 00000000..4be0b76c --- /dev/null +++ b/doc/html/qstrlist.html @@ -0,0 +1,120 @@ + + + + + +TQStrList Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQStrList Class Reference

+ +

The TQStrList class provides a doubly-linked list of char*. +More... +

#include <qstrlist.h> +

Inherits TQPtrList<char>. +

Inherited by TQStrIList. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQStrList class provides a doubly-linked list of char*. +

+ + +

If you want a string list of TQStrings use TQStringList. +

This class is a TQPtrList<char> instance (a list of char*). +

TQStrList can make deep or shallow copies of the strings that are +inserted. +

A deep copy means that memory is allocated for the string and then +the string data is copied into that memory. A shallow copy is just +a copy of the pointer value and not of the string data itself. +

The disadvantage of shallow copies is that because a pointer can +be deleted only once, the program must put all strings in a +central place and know when it is safe to delete them (i.e. when +the strings are no longer referenced by other parts of the +program). This can make the program more complex. The advantage of +shallow copies is that they consume far less memory than deep +copies. It is also much faster to copy a pointer (typically 4 or 8 +bytes) than to copy string data. +

A TQStrList that operates on deep copies will, by default, turn on +auto-deletion (see setAutoDelete()). Thus, by default TQStrList +will deallocate any string copies it allocates. +

The virtual compareItems() function is reimplemented and does a +case-sensitive string comparison. The inSort() function will +insert strings in sorted order. In general it is fastest to insert +the strings as they come and sort() at the end; inSort() is useful +when you just have to add a few extra strings to an already sorted +list. +

The TQStrListIterator class is an iterator for TQStrList. +

See also Collection Classes, Text Related Classes, and Non-GUI Classes. + +


Member Function Documentation

+

TQStrList::TQStrList ( bool deepCopies = TRUE ) +

+ +

Constructs an empty list of strings. Will make deep copies of all +inserted strings if deepCopies is TRUE, or use shallow copies +if deepCopies is FALSE. + +

TQStrList::TQStrList ( const TQStrList & list ) +

+ +

Constructs a copy of list. +

If list has deep copies, this list will also get deep copies. +Only the pointers are copied (shallow copy) if the other list does +not use deep copies. + +

TQStrList::~TQStrList () +

+ +

Destroys the list. All strings are removed. + +

TQStrList & TQStrList::operator= ( const TQStrList & list ) +

+ +

Assigns list to this list and returns a reference to this list. +

If list has deep copies, this list will also get deep copies. +Only the pointers are copied (shallow copy) if the other list does +not use deep copies. + + +


+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/qstrlistiterator-members.html b/doc/html/qstrlistiterator-members.html new file mode 100644 index 00000000..f61ef8f1 --- /dev/null +++ b/doc/html/qstrlistiterator-members.html @@ -0,0 +1,61 @@ + + + + + +TQStrListIterator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQStrListIterator

+ +

This is the complete list of member functions for +TQStrListIterator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstrlistiterator.html b/doc/html/qstrlistiterator.html new file mode 100644 index 00000000..3d219716 --- /dev/null +++ b/doc/html/qstrlistiterator.html @@ -0,0 +1,60 @@ + + + + + +TQStrListIterator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQStrListIterator Class Reference

+ +

The TQStrListIterator class is an iterator for the TQStrList +and TQStrIList classes. +More... +

#include <qstrlist.h> +

Inherits TQPtrListIterator<char>. +

List of all member functions. +


Detailed Description

+ + +The TQStrListIterator class is an iterator for the TQStrList +and TQStrIList classes. +

+

This class is a TQPtrListIterator<char> instance. It can traverse +the strings in the TQStrList and TQStrIList classes. +

See also Non-GUI Classes. + + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstyle-h.html b/doc/html/qstyle-h.html new file mode 100644 index 00000000..cea27dd0 --- /dev/null +++ b/doc/html/qstyle-h.html @@ -0,0 +1,801 @@ + + + + + +qstyle.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qstyle.h

+ +

This is the verbatim text of the qstyle.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qstyle.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQStyle class
+**
+** Created : 980616
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSTYLE_H
+#define TQSTYLE_H
+
+#ifndef QT_H
+#include "qobject.h"
+#endif // QT_H
+
+
+#ifndef QT_NO_STYLE
+
+class TQPopupMenu;
+class TQStylePrivate;
+class TQMenuItem;
+class TQTab;
+class TQListViewItem;
+class TQCheckListItem;
+
+class TQStyleOption {
+public:
+    enum StyleOptionDefault { Default };
+
+    TQStyleOption(StyleOptionDefault=Default) : def(TRUE) {}
+
+    // Note: we don't use default arguments since that is unnecessary
+    // initialization.
+    TQStyleOption(int in1) :
+	def(FALSE), i1(in1) {}
+    TQStyleOption(int in1, int in2) :
+	def(FALSE), i1(in1), i2(in2) {}
+    TQStyleOption(int in1, int in2, int in3, int in4) :
+	def(FALSE), i1(in1), i2(in2), i3(in3), i4(in4) {}
+    TQStyleOption(TQMenuItem* m) : def(FALSE), mi(m) {}
+    TQStyleOption(TQMenuItem* m, int in1) : def(FALSE), mi(m), i1(in1) {}
+    TQStyleOption(TQMenuItem* m, int in1, int in2) : def(FALSE), mi(m), i1(in1), i2(in2) {}
+    TQStyleOption(const TQColor& c) : def(FALSE), cl(&c) {}
+    TQStyleOption(TQTab* t) : def(FALSE), tb(t) {}
+    TQStyleOption(TQListViewItem* i) : def(FALSE), li(i) {}
+    TQStyleOption(TQCheckListItem* i) : def(FALSE), cli(i) {}
+    TQStyleOption(TQt::ArrowType a) : def(FALSE), i1((int)a) {}
+    TQStyleOption(const TQRect& r) : def(FALSE), i1(r.x()), i2(r.y()), i3(r.width()),i4(r.height()){}
+    TQStyleOption(TQWidget *w) : def(FALSE), p1((void*)w) {}
+
+    bool isDefault() const { return def; }
+
+    int day() const { return i1; }
+
+    int lineWidth() const { return i1; }
+    int midLineWidth() const { return i2; }
+    int frameShape() const { return i3; }
+    int frameShadow() const { return i4; }
+
+    int headerSection() const { return i1; }
+    TQMenuItem* menuItem() const { return mi; }
+    int maxIconWidth() const { return i1; }
+    int tabWidth() const { return i2; }
+
+    const TQColor& color() const { return *cl; }
+
+    TQTab* tab() const { return tb; }
+
+    TQCheckListItem* checkListItem() const { return cli; }
+    TQListViewItem* listViewItem() const { return li; }
+
+    TQt::ArrowType arrowType() const { return (TQt::ArrowType)i1; }
+    TQRect rect() const { return TQRect( i1, i2, i3, i4 ); }
+    TQWidget* widget() const { return (TQWidget*)p1; }
+
+private:
+    // NOTE: none of these components have constructors.
+    bool def;
+    bool b1,b2,b3; // reserved
+    TQMenuItem* mi;
+    TQTab* tb;
+    TQListViewItem* li;
+    const TQColor* cl;
+    int i1, i2, i3, i4;
+    int i5, i6; // reserved
+    TQCheckListItem* cli;
+    void *p1, *p2, *p3, *p4; // reserved
+    // (padded to 64 bytes on some architectures)
+};
+
+class TQStyleHintReturn; // not defined yet
+
+class Q_EXPORT TQStyle: public TQObject
+{
+    Q_OBJECT
+
+public:
+    TQStyle();
+    virtual ~TQStyle();
+
+    // New TQStyle API - most of these should probably be pure virtual
+
+    virtual void polish( TQWidget * );
+    virtual void unPolish( TQWidget * );
+
+    virtual void polish( TQApplication * );
+    virtual void unPolish( TQApplication * );
+
+    virtual void polish( TQPalette & );
+
+    virtual void polishPopupMenu( TQPopupMenu* ) = 0;
+
+    virtual TQRect itemRect( TQPainter *p, const TQRect &r,
+			    int flags, bool enabled,
+			    const TQPixmap *pixmap,
+			    const TQString &text, int len = -1 ) const;
+
+    virtual void drawItem( TQPainter *p, const TQRect &r,
+			   int flags, const TQColorGroup &g, bool enabled,
+			   const TQPixmap *pixmap, const TQString &text,
+			   int len = -1, const TQColor *penColor = 0 ) const;
+
+
+    enum PrimitiveElement {
+	PE_ButtonCommand,
+	PE_ButtonDefault,
+	PE_ButtonBevel,
+	PE_ButtonTool,
+	PE_ButtonDropDown,
+
+	PE_FocusRect,
+
+	PE_ArrowUp,
+	PE_ArrowDown,
+	PE_ArrowRight,
+	PE_ArrowLeft,
+
+	PE_SpinWidgetUp,
+	PE_SpinWidgetDown,
+	PE_SpinWidgetPlus,
+	PE_SpinWidgetMinus,
+
+	PE_Indicator,
+	PE_IndicatorMask,
+	PE_ExclusiveIndicator,
+	PE_ExclusiveIndicatorMask,
+
+	PE_DockWindowHandle,
+	PE_DockWindowSeparator,
+	PE_DockWindowResizeHandle,
+
+	PE_Splitter,
+
+	PE_Panel,
+	PE_PanelPopup,
+	PE_PanelMenuBar,
+	PE_PanelDockWindow,
+
+	PE_TabBarBase,
+
+	PE_HeaderSection,
+	PE_HeaderArrow,
+	PE_StatusBarSection,
+
+	PE_GroupBoxFrame,
+
+	PE_Separator,
+
+	PE_SizeGrip,
+
+	PE_CheckMark,
+
+	PE_ScrollBarAddLine,
+	PE_ScrollBarSubLine,
+	PE_ScrollBarAddPage,
+	PE_ScrollBarSubPage,
+	PE_ScrollBarSlider,
+	PE_ScrollBarFirst,
+	PE_ScrollBarLast,
+
+	PE_ProgressBarChunk,
+
+	PE_PanelLineEdit,
+	PE_PanelTabWidget,
+
+	PE_WindowFrame,
+
+	PE_CheckListController,
+	PE_CheckListIndicator,
+	PE_CheckListExclusiveIndicator,
+
+	PE_PanelGroupBox,
+	PE_RubberBand,
+
+	// do not add any values below/greater this
+	PE_CustomBase =			0xf000000
+    };
+
+    enum StyleFlags {
+	Style_Default = 		0x00000000,
+	Style_Enabled = 		0x00000001,
+	Style_Raised =			0x00000002,
+	Style_Sunken =	 		0x00000004,
+	Style_Off =			0x00000008,
+	Style_NoChange =		0x00000010,
+	Style_On =			0x00000020,
+	Style_Down =			0x00000040,
+	Style_Horizontal =		0x00000080,
+	Style_HasFocus =		0x00000100,
+	Style_Top =			0x00000200,
+	Style_Bottom =			0x00000400,
+	Style_FocusAtBorder =		0x00000800,
+	Style_AutoRaise =		0x00001000,
+	Style_MouseOver =		0x00002000,
+	Style_Up =			0x00004000,
+	Style_Selected =	 	0x00008000,
+	Style_Active =			0x00010000,
+	Style_ButtonDefault =		0x00020000
+    };
+    typedef uint SFlags;
+
+    virtual void drawPrimitive( PrimitiveElement pe,
+				TQPainter *p,
+				const TQRect &r,
+				const TQColorGroup &cg,
+				SFlags flags = Style_Default,
+				const TQStyleOption& = TQStyleOption::Default ) const = 0;
+
+
+    enum ControlElement {
+	CE_PushButton,
+	CE_PushButtonLabel,
+
+	CE_CheckBox,
+	CE_CheckBoxLabel,
+
+	CE_RadioButton,
+	CE_RadioButtonLabel,
+
+	CE_TabBarTab,
+	CE_TabBarLabel,
+
+	CE_ProgressBarGroove,
+	CE_ProgressBarContents,
+	CE_ProgressBarLabel,
+
+	CE_PopupMenuItem,
+	CE_MenuBarItem,
+
+	CE_ToolButtonLabel,
+	CE_MenuBarEmptyArea,
+	CE_PopupMenuScroller,
+	CE_DockWindowEmptyArea,
+	CE_PopupMenuVerticalExtra,
+	CE_PopupMenuHorizontalExtra,
+
+	CE_ToolBoxTab,
+	CE_HeaderLabel,
+
+	// do not add any values below/greater than this
+	CE_CustomBase =		0xf0000000
+    };
+
+    virtual void drawControl( ControlElement element,
+			      TQPainter *p,
+			      const TQWidget *widget,
+			      const TQRect &r,
+			      const TQColorGroup &cg,
+			      SFlags how = Style_Default,
+			      const TQStyleOption& = TQStyleOption::Default ) const = 0;
+    virtual void drawControlMask( ControlElement element,
+				  TQPainter *p,
+				  const TQWidget *widget,
+				  const TQRect &r,
+				  const TQStyleOption& = TQStyleOption::Default ) const = 0;
+
+    enum SubRect {
+	SR_PushButtonContents,
+	SR_PushButtonFocusRect,
+
+	SR_CheckBoxIndicator,
+	SR_CheckBoxContents,
+	SR_CheckBoxFocusRect,
+
+	SR_RadioButtonIndicator,
+	SR_RadioButtonContents,
+	SR_RadioButtonFocusRect,
+
+	SR_ComboBoxFocusRect,
+
+	SR_SliderFocusRect,
+
+	SR_DockWindowHandleRect,
+
+	SR_ProgressBarGroove,
+	SR_ProgressBarContents,
+	SR_ProgressBarLabel,
+
+	SR_ToolButtonContents,
+
+	SR_DialogButtonAccept,
+	SR_DialogButtonReject,
+	SR_DialogButtonApply,
+	SR_DialogButtonHelp,
+	SR_DialogButtonAll,
+	SR_DialogButtonAbort,
+	SR_DialogButtonIgnore,
+	SR_DialogButtonRetry,
+	SR_DialogButtonCustom,
+
+	SR_ToolBoxTabContents,
+
+	// do not add any values below/greater than this
+	SR_CustomBase =		0xf0000000
+    };
+
+    virtual TQRect subRect( SubRect r, const TQWidget *widget ) const = 0;
+
+
+    enum ComplexControl{
+	CC_SpinWidget,
+	CC_ComboBox,
+	CC_ScrollBar,
+	CC_Slider,
+	CC_ToolButton,
+	CC_TitleBar,
+	CC_ListView,
+
+	// do not add any values below/greater than this
+	CC_CustomBase =		0xf0000000
+    };
+
+    enum SubControl {
+	SC_None =			0x00000000,
+
+	SC_ScrollBarAddLine =		0x00000001,
+	SC_ScrollBarSubLine =		0x00000002,
+	SC_ScrollBarAddPage =		0x00000004,
+	SC_ScrollBarSubPage =		0x00000008,
+	SC_ScrollBarFirst =		0x00000010,
+	SC_ScrollBarLast =		0x00000020,
+	SC_ScrollBarSlider =		0x00000040,
+	SC_ScrollBarGroove =		0x00000080,
+
+	SC_SpinWidgetUp =		0x00000001,
+	SC_SpinWidgetDown =		0x00000002,
+	SC_SpinWidgetFrame =		0x00000004,
+	SC_SpinWidgetEditField =	0x00000008,
+	SC_SpinWidgetButtonField =	0x00000010,
+
+	SC_ComboBoxFrame =		0x00000001,
+	SC_ComboBoxEditField =		0x00000002,
+	SC_ComboBoxArrow =		0x00000004,
+	SC_ComboBoxListBoxPopup =	0x00000008,
+
+	SC_SliderGroove =		0x00000001,
+	SC_SliderHandle = 		0x00000002,
+	SC_SliderTickmarks = 		0x00000004,
+
+	SC_ToolButton =			0x00000001,
+	SC_ToolButtonMenu =		0x00000002,
+
+	SC_TitleBarLabel =		0x00000001,
+	SC_TitleBarSysMenu =		0x00000002,
+	SC_TitleBarMinButton =		0x00000004,
+	SC_TitleBarMaxButton =		0x00000008,
+	SC_TitleBarCloseButton =	0x00000010,
+	SC_TitleBarNormalButton =	0x00000020,
+	SC_TitleBarShadeButton =	0x00000040,
+	SC_TitleBarUnshadeButton =	0x00000080,
+
+	SC_ListView =			0x00000001,
+	SC_ListViewBranch =		0x00000002,
+	SC_ListViewExpand =		0x00000004,
+
+	SC_All =			0xffffffff
+    };
+    typedef uint SCFlags;
+
+
+    virtual void drawComplexControl( ComplexControl control,
+				     TQPainter *p,
+				     const TQWidget *widget,
+				     const TQRect &r,
+				     const TQColorGroup &cg,
+				     SFlags how = Style_Default,
+#ifdef Q_QDOC
+				     SCFlags sub = SC_All,
+#else
+				     SCFlags sub = (uint)SC_All,
+#endif
+				     SCFlags subActive = SC_None,
+				     const TQStyleOption& = TQStyleOption::Default ) const = 0;
+    virtual void drawComplexControlMask( ComplexControl control,
+					 TQPainter *p,
+					 const TQWidget *widget,
+					 const TQRect &r,
+					 const TQStyleOption& = TQStyleOption::Default ) const = 0;
+
+    virtual TQRect querySubControlMetrics( ComplexControl control,
+					  const TQWidget *widget,
+					  SubControl sc,
+					  const TQStyleOption& = TQStyleOption::Default ) const = 0;
+    virtual SubControl querySubControl( ComplexControl control,
+					const TQWidget *widget,
+					const TQPoint &pos,
+					const TQStyleOption& = TQStyleOption::Default ) const = 0;
+
+
+    enum PixelMetric {
+	PM_ButtonMargin,
+	PM_ButtonDefaultIndicator,
+	PM_MenuButtonIndicator,
+	PM_ButtonShiftHorizontal,
+	PM_ButtonShiftVertical,
+
+	PM_DefaultFrameWidth,
+	PM_SpinBoxFrameWidth,
+
+	PM_MaximumDragDistance,
+
+	PM_ScrollBarExtent,
+	PM_ScrollBarSliderMin,
+
+	PM_SliderThickness,	       	// total slider thickness
+	PM_SliderControlThickness,    	// thickness of the business part
+	PM_SliderLength,		// total length of slider
+	PM_SliderTickmarkOffset,	//
+	PM_SliderSpaceAvailable,	// available space for slider to move
+
+	PM_DockWindowSeparatorExtent,
+	PM_DockWindowHandleExtent,
+	PM_DockWindowFrameWidth,
+
+	PM_MenuBarFrameWidth,
+
+	PM_TabBarTabOverlap,
+	PM_TabBarTabHSpace,
+	PM_TabBarTabVSpace,
+	PM_TabBarBaseHeight,
+	PM_TabBarBaseOverlap,
+
+	PM_ProgressBarChunkWidth,
+
+	PM_SplitterWidth,
+	PM_TitleBarHeight,
+
+	PM_IndicatorWidth,
+	PM_IndicatorHeight,
+	PM_ExclusiveIndicatorWidth,
+	PM_ExclusiveIndicatorHeight,
+	PM_PopupMenuScrollerHeight,
+	PM_CheckListButtonSize,
+	PM_CheckListControllerSize,
+	PM_PopupMenuFrameHorizontalExtra,
+	PM_PopupMenuFrameVerticalExtra,
+
+	PM_DialogButtonsSeparator,
+	PM_DialogButtonsButtonWidth,
+	PM_DialogButtonsButtonHeight,
+
+	PM_MDIFrameWidth,
+	PM_MDIMinimizedWidth,
+	PM_HeaderMargin,
+	PM_HeaderMarkSize,
+	PM_HeaderGripMargin,
+	PM_TabBarTabShiftHorizontal,
+	PM_TabBarTabShiftVertical,
+	PM_TabBarScrollButtonWidth,
+
+	PM_MenuBarItemSpacing,
+	PM_ToolBarItemSpacing,
+
+	// do not add any values below/greater than this
+	PM_CustomBase =		0xf0000000
+    };
+
+    virtual int pixelMetric( PixelMetric metric,
+			     const TQWidget *widget = 0 ) const = 0;
+
+
+    enum ContentsType {
+	CT_PushButton,
+	CT_CheckBox,
+	CT_RadioButton,
+	CT_ToolButton,
+	CT_ComboBox,
+	CT_Splitter,
+	CT_DockWindow,
+	CT_ProgressBar,
+	CT_PopupMenuItem,
+	CT_TabBarTab,
+	CT_Slider,
+	CT_Header,
+	CT_LineEdit,
+	CT_MenuBar,
+	CT_SpinBox,
+	CT_SizeGrip,
+	CT_TabWidget,
+	CT_DialogButtons,
+
+	// do not add any values below/greater than this
+	CT_CustomBase =		0xf0000000
+    };
+
+    virtual TQSize sizeFromContents( ContentsType contents,
+				    const TQWidget *widget,
+				    const TQSize &contentsSize,
+				    const TQStyleOption& = TQStyleOption::Default ) const = 0;
+
+    enum StyleHint  {
+	// ...
+	// the general hints
+	// ...
+       	// disabled text should be etched, ala Windows
+	SH_EtchDisabledText,
+
+	// the GUI style enum, argh!
+	SH_GUIStyle,
+
+	// ...
+	// widget specific hints
+	// ...
+	SH_ScrollBar_BackgroundMode,
+	SH_ScrollBar_MiddleClickAbsolutePosition,
+	SH_ScrollBar_ScrollWhenPointerLeavesControl,
+
+	// TQEvent::Type - which mouse event to select a tab
+	SH_TabBar_SelectMouseType,
+
+	SH_TabBar_Alignment,
+
+	SH_Header_ArrowAlignment,
+
+	// bool - sliders snap to values while moving, ala Windows
+	SH_Slider_SnapToValue,
+
+	// bool - key presses handled in a sloppy manner - ie. left on a vertical
+	// slider subtracts a line
+	SH_Slider_SloppyKeyEvents,
+
+	// bool - center button on progress dialogs, ala Motif, else right aligned
+	// perhaps this should be a TQt::Alignment value
+	SH_ProgressDialog_CenterCancelButton,
+
+	// TQt::AlignmentFlags - text label alignment in progress dialogs
+	// Center on windows, Auto|VCenter otherwize
+	SH_ProgressDialog_TextLabelAlignment,
+
+	// bool - right align buttons on print dialog, ala Windows
+	SH_PrintDialog_RightAlignButtons,
+
+	// bool - 1 or 2 pixel space between the menubar and the dockarea, ala Windows
+	// this *REALLY* needs a better name
+	SH_MainWindow_SpaceBelowMenuBar,
+
+	// bool - select the text in the line edit about the listbox when selecting
+	// an item from the listbox, or when the line edit receives focus, ala Windows
+	SH_FontDialog_SelectAssociatedText,
+
+	// bool - allows disabled menu items to be active
+	SH_PopupMenu_AllowActiveAndDisabled,
+
+	// bool - pressing space activates item, ala Motif
+	SH_PopupMenu_SpaceActivatesItem,
+
+	// int - number of milliseconds to wait before opening a submenu
+	// 256 on windows, 96 on motif
+	SH_PopupMenu_SubMenuPopupDelay,
+
+	// bool - should scrollviews draw their frame only around contents (ala Motif),
+	// or around contents, scrollbars and corner widgets (ala Windows) ?
+	SH_ScrollView_FrameOnlyAroundContents,
+
+	// bool - menubars items are navigatable by pressing alt, followed by using
+	// the arrow keys to select the desired item
+	SH_MenuBar_AltKeyNavigation,
+
+	// bool - mouse tracking in combobox dropdown lists
+	SH_ComboBox_ListMouseTracking,
+
+	// bool - mouse tracking in popupmenus
+	SH_PopupMenu_MouseTracking,
+
+	// bool - mouse tracking in menubars
+	SH_MenuBar_MouseTracking,
+
+	// bool - gray out selected items when loosing focus
+	SH_ItemView_ChangeHighlightOnFocus,
+
+	// bool - supports shared activation among modeless widgets
+	SH_Widget_ShareActivation,
+
+	// bool - workspace should just maximize the client area
+	SH_Workspace_FillSpaceOnMaximize,
+
+	// bool - supports popup menu comboboxes
+	SH_ComboBox_Popup,
+
+	// bool - titlebar has no border
+	SH_TitleBar_NoBorder,
+
+	// bool - stop scrollbar at mouse
+	SH_ScrollBar_StopMouseOverSlider,
+
+	//bool - blink cursort with selected text
+	SH_BlinkCursorWhenTextSelected,
+
+	//bool - richtext selections extend the full width of the docuemnt
+	SH_RichText_FullWidthSelection,
+
+	//bool - popupmenu supports scrolling instead of multicolumn mode
+	SH_PopupMenu_Scrollable,
+
+	// TQt::AlignmentFlags - text label vertical alignment in groupboxes
+	// Center on windows, Auto|VCenter otherwize
+	SH_GroupBox_TextLabelVerticalAlignment,
+
+	// TQt::TQRgb - text label color in groupboxes
+	SH_GroupBox_TextLabelColor,
+
+	// bool - popupmenu supports sloppy submenus
+	SH_PopupMenu_SloppySubMenus,
+
+	// TQt::TQRgb - table grid color
+	SH_Table_GridLineColor,
+
+	// TQChar - Unicode character for password char
+	SH_LineEdit_PasswordCharacter,
+
+	// TQDialogButtons::Button - default button
+	SH_DialogButtons_DefaultButton,
+
+	// TQToolBox - Boldness of the selected page title
+	SH_ToolBox_SelectedPageTitleBold,
+
+	//bool - if a tabbar prefers not to have scroller arrows
+	SH_TabBar_PreferNoArrows,
+
+	//bool - if left button should cause an absolute position
+	SH_ScrollBar_LeftClickAbsolutePosition,
+
+	// TQEvent::Type - which mouse event to select a list view expansion
+	SH_ListViewExpand_SelectMouseType,
+
+	//bool - if underline for accelerators
+	SH_UnderlineAccelerator,
+
+	// bool - TQToolButton - if tool buttons should use a 3D frame
+	// when the mouse is over the button
+	SH_ToolButton_Uses3D,
+
+	// do not add any values below/greater than this
+	SH_CustomBase =		0xf0000000
+    };
+
+    virtual int styleHint( StyleHint stylehint,
+			   const TQWidget *widget = 0,
+			   const TQStyleOption& = TQStyleOption::Default,
+			   TQStyleHintReturn* returnData = 0
+			   ) const = 0;
+
+
+    enum StylePixmap {
+	SP_TitleBarMinButton,
+	SP_TitleBarMaxButton,
+	SP_TitleBarCloseButton,
+	SP_TitleBarNormalButton,
+	SP_TitleBarShadeButton,
+	SP_TitleBarUnshadeButton,
+	SP_DockWindowCloseButton,
+	SP_MessageBoxInformation,
+	SP_MessageBoxWarning,
+	SP_MessageBoxCritical,
+	SP_MessageBoxQuestion,
+
+	// do not add any values below/greater than this
+	SP_CustomBase =		0xf0000000
+    };
+
+    virtual TQPixmap stylePixmap( StylePixmap stylepixmap,
+				 const TQWidget *widget = 0,
+				 const TQStyleOption& = TQStyleOption::Default ) const = 0;
+
+
+    static TQRect visualRect( const TQRect &logical, const TQWidget *w );
+
+    static TQRect visualRect( const TQRect &logical, const TQRect &bounding );
+
+
+
+
+    // Old 2.x TQStyle API
+
+#ifndef QT_NO_COMPAT
+    int defaultFrameWidth() const
+    {
+	return pixelMetric( PM_DefaultFrameWidth );
+    }
+    void tabbarMetrics( const TQWidget* t,
+			int& hf, int& vf, int& ov ) const
+    {
+	hf = pixelMetric( PM_TabBarTabHSpace, t );
+	vf = pixelMetric( PM_TabBarTabVSpace, t );
+	ov = pixelMetric( PM_TabBarBaseOverlap, t );
+    }
+    TQSize scrollBarExtent() const
+    {
+	return TQSize(pixelMetric(PM_ScrollBarExtent),
+		     pixelMetric(PM_ScrollBarExtent));
+    }
+#endif
+
+
+private:
+    TQStylePrivate * d;
+
+#if defined(Q_DISABLE_COPY)
+    TQStyle( const TQStyle & );
+    TQStyle& operator=( const TQStyle & );
+#endif
+};
+
+#endif // QT_NO_STYLE
+#endif // TQSTYLE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstyle-members.html b/doc/html/qstyle-members.html new file mode 100644 index 00000000..3c6b244d --- /dev/null +++ b/doc/html/qstyle-members.html @@ -0,0 +1,111 @@ + + + + + +TQStyle Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQStyle

+ +

This is the complete list of member functions for +TQStyle, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstyle.html b/doc/html/qstyle.html new file mode 100644 index 00000000..3d91dd2a --- /dev/null +++ b/doc/html/qstyle.html @@ -0,0 +1,1220 @@ + + + + + +TQStyle Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQStyle Class Reference

+ +

The TQStyle class specifies the look and feel of a GUI. +More... +

#include <qstyle.h> +

Inherits TQObject. +

Inherited by TQCommonStyle. +

List of all member functions. +

Public Members

+
    +
  • TQStyle ()
  • +
  • virtual ~TQStyle ()
  • +
  • virtual void polish ( TQWidget * )
  • +
  • virtual void unPolish ( TQWidget * )
  • +
  • virtual void polish ( TQApplication * )
  • +
  • virtual void unPolish ( TQApplication * )
  • +
  • virtual void polish ( TQPalette & )
  • +
  • virtual void polishPopupMenu ( TQPopupMenu * ) = 0
  • +
  • virtual TQRect itemRect ( TQPainter * p, const TQRect & r, int flags, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1 ) const
  • +
  • virtual void drawItem ( TQPainter * p, const TQRect & r, int flags, const TQColorGroup & g, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1, const TQColor * penColor = 0 ) const
  • +
  • enum PrimitiveElement { PE_ButtonCommand, PE_ButtonDefault, PE_ButtonBevel, PE_ButtonTool, PE_ButtonDropDown, PE_FocusRect, PE_ArrowUp, PE_ArrowDown, PE_ArrowRight, PE_ArrowLeft, PE_SpinWidgetUp, PE_SpinWidgetDown, PE_SpinWidgetPlus, PE_SpinWidgetMinus, PE_Indicator, PE_IndicatorMask, PE_ExclusiveIndicator, PE_ExclusiveIndicatorMask, PE_DockWindowHandle, PE_DockWindowSeparator, PE_DockWindowResizeHandle, PE_Splitter, PE_Panel, PE_PanelPopup, PE_PanelMenuBar, PE_PanelDockWindow, PE_TabBarBase, PE_HeaderSection, PE_HeaderArrow, PE_StatusBarSection, PE_GroupBoxFrame, PE_Separator, PE_SizeGrip, PE_CheckMark, PE_ScrollBarAddLine, PE_ScrollBarSubLine, PE_ScrollBarAddPage, PE_ScrollBarSubPage, PE_ScrollBarSlider, PE_ScrollBarFirst, PE_ScrollBarLast, PE_ProgressBarChunk, PE_PanelLineEdit, PE_PanelTabWidget, PE_WindowFrame, PE_CheckListController, PE_CheckListIndicator, PE_CheckListExclusiveIndicator, PE_PanelGroupBox, PE_RubberBand, PE_CustomBase = 0xf000000 }
  • +
  • enum StyleFlags { Style_Default = 0x00000000, Style_Enabled = 0x00000001, Style_Raised = 0x00000002, Style_Sunken = 0x00000004, Style_Off = 0x00000008, Style_NoChange = 0x00000010, Style_On = 0x00000020, Style_Down = 0x00000040, Style_Horizontal = 0x00000080, Style_HasFocus = 0x00000100, Style_Top = 0x00000200, Style_Bottom = 0x00000400, Style_FocusAtBorder = 0x00000800, Style_AutoRaise = 0x00001000, Style_MouseOver = 0x00002000, Style_Up = 0x00004000, Style_Selected = 0x00008000, Style_Active = 0x00010000, Style_ButtonDefault = 0x00020000 }
  • +
  • virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
  • +
  • enum ControlElement { CE_PushButton, CE_PushButtonLabel, CE_CheckBox, CE_CheckBoxLabel, CE_RadioButton, CE_RadioButtonLabel, CE_TabBarTab, CE_TabBarLabel, CE_ProgressBarGroove, CE_ProgressBarContents, CE_ProgressBarLabel, CE_PopupMenuItem, CE_MenuBarItem, CE_ToolButtonLabel, CE_MenuBarEmptyArea, CE_PopupMenuScroller, CE_DockWindowEmptyArea, CE_PopupMenuVerticalExtra, CE_PopupMenuHorizontalExtra, CE_ToolBoxTab, CE_HeaderLabel, CE_CustomBase = 0xf0000000 }
  • +
  • virtual void drawControl ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
  • +
  • virtual void drawControlMask ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
  • +
  • enum SubRect { SR_PushButtonContents, SR_PushButtonFocusRect, SR_CheckBoxIndicator, SR_CheckBoxContents, SR_CheckBoxFocusRect, SR_RadioButtonIndicator, SR_RadioButtonContents, SR_RadioButtonFocusRect, SR_ComboBoxFocusRect, SR_SliderFocusRect, SR_DockWindowHandleRect, SR_ProgressBarGroove, SR_ProgressBarContents, SR_ProgressBarLabel, SR_ToolButtonContents, SR_DialogButtonAccept, SR_DialogButtonReject, SR_DialogButtonApply, SR_DialogButtonHelp, SR_DialogButtonAll, SR_DialogButtonAbort, SR_DialogButtonIgnore, SR_DialogButtonRetry, SR_DialogButtonCustom, SR_ToolBoxTabContents, SR_CustomBase = 0xf0000000 }
  • +
  • virtual TQRect subRect ( SubRect subrect, const TQWidget * widget ) const = 0
  • +
  • enum ComplexControl { CC_SpinWidget, CC_ComboBox, CC_ScrollBar, CC_Slider, CC_ToolButton, CC_TitleBar, CC_ListView, CC_CustomBase = 0xf0000000 }
  • +
  • enum SubControl { SC_None = 0x00000000, SC_ScrollBarAddLine = 0x00000001, SC_ScrollBarSubLine = 0x00000002, SC_ScrollBarAddPage = 0x00000004, SC_ScrollBarSubPage = 0x00000008, SC_ScrollBarFirst = 0x00000010, SC_ScrollBarLast = 0x00000020, SC_ScrollBarSlider = 0x00000040, SC_ScrollBarGroove = 0x00000080, SC_SpinWidgetUp = 0x00000001, SC_SpinWidgetDown = 0x00000002, SC_SpinWidgetFrame = 0x00000004, SC_SpinWidgetEditField = 0x00000008, SC_SpinWidgetButtonField = 0x00000010, SC_ComboBoxFrame = 0x00000001, SC_ComboBoxEditField = 0x00000002, SC_ComboBoxArrow = 0x00000004, SC_ComboBoxListBoxPopup = 0x00000008, SC_SliderGroove = 0x00000001, SC_SliderHandle = 0x00000002, SC_SliderTickmarks = 0x00000004, SC_ToolButton = 0x00000001, SC_ToolButtonMenu = 0x00000002, SC_TitleBarLabel = 0x00000001, SC_TitleBarSysMenu = 0x00000002, SC_TitleBarMinButton = 0x00000004, SC_TitleBarMaxButton = 0x00000008, SC_TitleBarCloseButton = 0x00000010, SC_TitleBarNormalButton = 0x00000020, SC_TitleBarShadeButton = 0x00000040, SC_TitleBarUnshadeButton = 0x00000080, SC_ListView = 0x00000001, SC_ListViewBranch = 0x00000002, SC_ListViewExpand = 0x00000004, SC_All = 0xffffffff }
  • +
  • virtual void drawComplexControl ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
  • +
  • virtual void drawComplexControlMask ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
  • +
  • virtual TQRect querySubControlMetrics ( ComplexControl control, const TQWidget * widget, SubControl subcontrol, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
  • +
  • virtual SubControl querySubControl ( ComplexControl control, const TQWidget * widget, const TQPoint & pos, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
  • +
  • enum PixelMetric { PM_ButtonMargin, PM_ButtonDefaultIndicator, PM_MenuButtonIndicator, PM_ButtonShiftHorizontal, PM_ButtonShiftVertical, PM_DefaultFrameWidth, PM_SpinBoxFrameWidth, PM_MaximumDragDistance, PM_ScrollBarExtent, PM_ScrollBarSliderMin, PM_SliderThickness, PM_SliderControlThickness, PM_SliderLength, PM_SliderTickmarkOffset, PM_SliderSpaceAvailable, PM_DockWindowSeparatorExtent, PM_DockWindowHandleExtent, PM_DockWindowFrameWidth, PM_MenuBarFrameWidth, PM_TabBarTabOverlap, PM_TabBarTabHSpace, PM_TabBarTabVSpace, PM_TabBarBaseHeight, PM_TabBarBaseOverlap, PM_ProgressBarChunkWidth, PM_SplitterWidth, PM_TitleBarHeight, PM_IndicatorWidth, PM_IndicatorHeight, PM_ExclusiveIndicatorWidth, PM_ExclusiveIndicatorHeight, PM_PopupMenuScrollerHeight, PM_CheckListButtonSize, PM_CheckListControllerSize, PM_PopupMenuFrameHorizontalExtra, PM_PopupMenuFrameVerticalExtra, PM_DialogButtonsSeparator, PM_DialogButtonsButtonWidth, PM_DialogButtonsButtonHeight, PM_MDIFrameWidth, PM_MDIMinimizedWidth, PM_HeaderMargin, PM_HeaderMarkSize, PM_HeaderGripMargin, PM_TabBarTabShiftHorizontal, PM_TabBarTabShiftVertical, PM_TabBarScrollButtonWidth, PM_MenuBarItemSpacing, PM_ToolBarItemSpacing, PM_CustomBase = 0xf0000000 }
  • +
  • virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const = 0
  • +
  • enum ContentsType { CT_PushButton, CT_CheckBox, CT_RadioButton, CT_ToolButton, CT_ComboBox, CT_Splitter, CT_DockWindow, CT_ProgressBar, CT_PopupMenuItem, CT_TabBarTab, CT_Slider, CT_Header, CT_LineEdit, CT_MenuBar, CT_SpinBox, CT_SizeGrip, CT_TabWidget, CT_DialogButtons, CT_CustomBase = 0xf0000000 }
  • +
  • virtual TQSize sizeFromContents ( ContentsType contents, const TQWidget * widget, const TQSize & contentsSize, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
  • +
  • enum StyleHint { SH_EtchDisabledText, SH_GUIStyle, SH_ScrollBar_BackgroundMode, SH_ScrollBar_MiddleClickAbsolutePosition, SH_ScrollBar_ScrollWhenPointerLeavesControl, SH_TabBar_SelectMouseType, SH_TabBar_Alignment, SH_Header_ArrowAlignment, SH_Slider_SnapToValue, SH_Slider_SloppyKeyEvents, SH_ProgressDialog_CenterCancelButton, SH_ProgressDialog_TextLabelAlignment, SH_PrintDialog_RightAlignButtons, SH_MainWindow_SpaceBelowMenuBar, SH_FontDialog_SelectAssociatedText, SH_PopupMenu_AllowActiveAndDisabled, SH_PopupMenu_SpaceActivatesItem, SH_PopupMenu_SubMenuPopupDelay, SH_ScrollView_FrameOnlyAroundContents, SH_MenuBar_AltKeyNavigation, SH_ComboBox_ListMouseTracking, SH_PopupMenu_MouseTracking, SH_MenuBar_MouseTracking, SH_ItemView_ChangeHighlightOnFocus, SH_Widget_ShareActivation, SH_Workspace_FillSpaceOnMaximize, SH_ComboBox_Popup, SH_TitleBar_NoBorder, SH_ScrollBar_StopMouseOverSlider, SH_BlinkCursorWhenTextSelected, SH_RichText_FullWidthSelection, SH_PopupMenu_Scrollable, SH_GroupBox_TextLabelVerticalAlignment, SH_GroupBox_TextLabelColor, SH_PopupMenu_SloppySubMenus, SH_Table_GridLineColor, SH_LineEdit_PasswordCharacter, SH_DialogButtons_DefaultButton, SH_ToolBox_SelectedPageTitleBold, SH_TabBar_PreferNoArrows, SH_ScrollBar_LeftClickAbsolutePosition, SH_ListViewExpand_SelectMouseType, SH_UnderlineAccelerator, SH_ToolButton_Uses3D, SH_CustomBase = 0xf0000000 }
  • +
  • virtual int styleHint ( StyleHint stylehint, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default, TQStyleHintReturn * returnData = 0 ) const = 0
  • +
  • enum StylePixmap { SP_TitleBarMinButton, SP_TitleBarMaxButton, SP_TitleBarCloseButton, SP_TitleBarNormalButton, SP_TitleBarShadeButton, SP_TitleBarUnshadeButton, SP_DockWindowCloseButton, SP_MessageBoxInformation, SP_MessageBoxWarning, SP_MessageBoxCritical, SP_MessageBoxQuestion, SP_CustomBase = 0xf0000000 }
  • +
  • virtual TQPixmap stylePixmap ( StylePixmap stylepixmap, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default ) const = 0
  • +
  • int defaultFrameWidth () const  (obsolete)
  • +
  • void tabbarMetrics ( const TQWidget * t, int & hf, int & vf, int & ov ) const  (obsolete)
  • +
  • TQSize scrollBarExtent () const  (obsolete)
  • +
+

Static Public Members

+
    +
  • TQRect visualRect ( const TQRect & logical, const TQWidget * w )
  • +
  • TQRect visualRect ( const TQRect & logical, const TQRect & bounding )
  • +
+

Detailed Description

+ + +The TQStyle class specifies the look and feel of a GUI. + +

A large number of GUI elements are common to many widgets. The +TQStyle class allows the look of these elements to be modified +across all widgets that use the TQStyle functions. It also +provides two feel options: Motif and Windows. +

Although it is not possible to fully enumerate the look of +graphical elements and the feel of widgets in a GUI, TQStyle +provides a considerable amount of control and customisability. +

In TQt 1.x the look and feel option for widgets was specified by a +single value: the GUIStyle. Starting with TQt 2.0, this notion was +expanded to allow the look to be specified by virtual drawing +functions. +

Derived classes may reimplement some or all of the drawing +functions to modify the look of all widgets that use those +functions. +

Languages written from right to left (such as Arabic and Hebrew) +usually also mirror the whole layout of widgets. If you design a +style, you should take special care when drawing asymmetric +elements to make sure that they also look correct in a mirrored +layout. You can start your application with -reverse to check +the mirrored layout. Also notice, that for a reversed layout, the +light usually comes from top right instead of top left. +

The actual reverse layout is performed automatically when +possible. However, for the sake of flexibility, the translation +cannot be performed everywhere. The documentation for each +function in the TQStyle API states whether the function +expects/returns logical or screen coordinates. Using logical +coordinates (in ComplexControls, for example) provides great +flexibility in controlling the look of a widget. Use visualRect() +when necessary to translate logical coordinates into screen +coordinates for drawing. +

In TQt versions prior to 3.0, if you wanted a low level route into +changing the appearance of a widget, you would reimplement +polish(). With the new 3.0 style engine the recommended approach +is to reimplement the draw functions, for example drawItem(), +drawPrimitive(), drawControl(), drawControlMask(), +drawComplexControl() and drawComplexControlMask(). Each of these +functions is called with a range of parameters that provide +information that you can use to determine how to draw them, e.g. +style flags, rectangle, color group, etc. +

For information on changing elements of an existing style or +creating your own style see the Style + overview. +

Styles can also be created as plugins. +

See also Widget Appearance and Style. + +


Member Type Documentation

+

TQStyle::ComplexControl

+ +

This enum represents a ComplexControl. ComplexControls have +different behaviour depending upon where the user clicks on them +or which keys are pressed. +

    +
  • TQStyle::CC_SpinWidget +
  • TQStyle::CC_ComboBox +
  • TQStyle::CC_ScrollBar +
  • TQStyle::CC_Slider +
  • TQStyle::CC_ToolButton +
  • TQStyle::CC_TitleBar +
  • TQStyle::CC_ListView +

    +
  • TQStyle::CC_CustomBase - base value for custom ControlElements. All +values above this are reserved for custom use. Therefore, +custom values must be greater than this value. +

See also SubControl and drawComplexControl(). + +

TQStyle::ContentsType

+ +

This enum represents a ContentsType. It is used to calculate sizes +for the contents of various widgets. +

    +
  • TQStyle::CT_PushButton +
  • TQStyle::CT_CheckBox +
  • TQStyle::CT_RadioButton +
  • TQStyle::CT_ToolButton +
  • TQStyle::CT_ComboBox +
  • TQStyle::CT_Splitter +
  • TQStyle::CT_DockWindow +
  • TQStyle::CT_ProgressBar +
  • TQStyle::CT_PopupMenuItem +
  • TQStyle::CT_TabBarTab +
  • TQStyle::CT_Slider +
  • TQStyle::CT_Header +
  • TQStyle::CT_LineEdit +
  • TQStyle::CT_MenuBar +
  • TQStyle::CT_SpinBox +
  • TQStyle::CT_SizeGrip +
  • TQStyle::CT_TabWidget +
  • TQStyle::CT_DialogButtons +
  • TQStyle::CT_CustomBase - base value for custom ControlElements. All +values above this are reserved for custom use. Custom values +must be greater than this value. +

See also sizeFromContents(). + +

TQStyle::ControlElement

+ +

This enum represents a ControlElement. A ControlElement is part of +a widget that performs some action or displays information to the +user. +

    +
  • TQStyle::CE_PushButton - the bevel and default indicator of a TQPushButton. +
  • TQStyle::CE_PushButtonLabel - the label (iconset with text or pixmap) +of a TQPushButton. +
  • TQStyle::CE_CheckBox - the indicator of a TQCheckBox. +
  • TQStyle::CE_CheckBoxLabel - the label (text or pixmap) of a TQCheckBox. +
  • TQStyle::CE_RadioButton - the indicator of a TQRadioButton. +
  • TQStyle::CE_RadioButtonLabel - the label (text or pixmap) of a TQRadioButton. +
  • TQStyle::CE_TabBarTab - the tab within a TQTabBar (a TQTab). +
  • TQStyle::CE_TabBarLabel - the label within a TQTab. +
  • TQStyle::CE_ProgressBarGroove - the groove where the progress +indicator is drawn in a TQProgressBar. +
  • TQStyle::CE_ProgressBarContents - the progress indicator of a TQProgressBar. +
  • TQStyle::CE_ProgressBarLabel - the text label of a TQProgressBar. +
  • TQStyle::CE_PopupMenuItem - a menu item in a TQPopupMenu. +
  • TQStyle::CE_PopupMenuScroller - scrolling areas in a popumenu when the +style supports scrolling. +
  • TQStyle::CE_PopupMenuHorizontalExtra - extra frame area set aside with PM_PopupMenuFrameHorizontalExtra +
  • TQStyle::CE_PopupMenuVerticalExtra - extra frame area set aside with PM_PopupMenuFrameVerticalExtra +
  • TQStyle::CE_MenuBarItem - a menu item in a TQMenuBar. +
  • TQStyle::CE_ToolButtonLabel - a tool button's label. +
  • TQStyle::CE_MenuBarEmptyArea - the empty area of a TQMenuBar. +
  • TQStyle::CE_DockWindowEmptyArea - the empty area of a TQDockWindow. +
  • TQStyle::CE_ToolBoxTab - the toolbox's tab area +
  • TQStyle::CE_HeaderLabel - the header's label +
  • TQStyle::CE_CustomBase - base value for custom ControlElements. All values above +this are reserved for custom use. Therefore, custom values must be +greater than this value. +

See also drawControl(). + +

TQStyle::PixelMetric

+ +

This enum represents a PixelMetric. A PixelMetric is a style +dependent size represented as a single pixel value. +

    +
  • TQStyle::PM_ButtonMargin - amount of whitespace between pushbutton +labels and the frame. +
  • TQStyle::PM_ButtonDefaultIndicator - width of the default-button indicator frame. +
  • TQStyle::PM_MenuButtonIndicator - width of the menu button indicator +proportional to the widget height. +
  • TQStyle::PM_ButtonShiftHorizontal - horizontal contents shift of a +button when the button is down. +
  • TQStyle::PM_ButtonShiftVertical - vertical contents shift of a button when the +button is down. +
  • TQStyle::PM_DefaultFrameWidth - default frame width, usually 2. +
  • TQStyle::PM_SpinBoxFrameWidth - frame width of a spin box. +
  • TQStyle::PM_MDIFrameWidth - frame width of an MDI window. +
  • TQStyle::PM_MDIMinimizedWidth - width of a minimized MSI window. +
  • TQStyle::PM_MaximumDragDistance - Some feels retquire the scrollbar or +other sliders to jump back to the original position when the +mouse pointer is too far away while dragging. A value of -1 +disables this behavior. +
  • TQStyle::PM_ScrollBarExtent - width of a vertical scrollbar and the +height of a horizontal scrollbar. +
  • TQStyle::PM_ScrollBarSliderMin - the minimum height of a vertical +scrollbar's slider and the minimum width of a horiztonal +scrollbar slider. +
  • TQStyle::PM_SliderThickness - total slider thickness. +
  • TQStyle::PM_SliderControlThickness - thickness of the slider handle. +
  • TQStyle::PM_SliderLength - length of the slider. +
  • TQStyle::PM_SliderTickmarkOffset - the offset between the tickmarks +and the slider. +
  • TQStyle::PM_SliderSpaceAvailable - the available space for the slider to move. +
  • TQStyle::PM_DockWindowSeparatorExtent - width of a separator in a +horiztonal dock window and the height of a separator in a +vertical dock window. +
  • TQStyle::PM_DockWindowHandleExtent - width of the handle in a +horizontal dock window and the height of the handle in a +vertical dock window. +
  • TQStyle::PM_DockWindowFrameWidth - frame width of a dock window. +
  • TQStyle::PM_MenuBarFrameWidth - frame width of a menubar. +
  • TQStyle::PM_MenuBarItemSpacing - spacing between menubar items. +
  • TQStyle::PM_ToolBarItemSpacing - spacing between toolbar items. +
  • TQStyle::PM_TabBarTabOverlap - number of pixels the tabs should overlap. +
  • TQStyle::PM_TabBarTabHSpace - extra space added to the tab width. +
  • TQStyle::PM_TabBarTabVSpace - extra space added to the tab height. +
  • TQStyle::PM_TabBarBaseHeight - height of the area between the tab bar +and the tab pages. +
  • TQStyle::PM_TabBarBaseOverlap - number of pixels the tab bar overlaps +the tab bar base. +
  • TQStyle::PM_TabBarScrollButtonWidth +
  • TQStyle::PM_TabBarTabShiftHorizontal - horizontal pixel shift when a +tab is selected. +
  • TQStyle::PM_TabBarTabShiftVertical - vertical pixel shift when a +tab is selected. +
  • TQStyle::PM_ProgressBarChunkWidth - width of a chunk in a progress bar indicator. +
  • TQStyle::PM_SplitterWidth - width of a splitter. +
  • TQStyle::PM_TitleBarHeight - height of the title bar. +
  • TQStyle::PM_PopupMenuFrameHorizontalExtra - additional border, e.g. for panels +
  • TQStyle::PM_PopupMenuFrameVerticalExtra - additional border, e.g. for panels +
  • TQStyle::PM_IndicatorWidth - width of a check box indicator. +
  • TQStyle::PM_IndicatorHeight - height of a checkbox indicator. +
  • TQStyle::PM_ExclusiveIndicatorWidth - width of a radio button indicator. +
  • TQStyle::PM_ExclusiveIndicatorHeight - height of a radio button indicator. +
  • TQStyle::PM_PopupMenuScrollerHeight - height of the scroller area in a popupmenu. +
  • TQStyle::PM_PopupMenuScrollerHeight - height of the scroller area in a popupmenu. +
  • TQStyle::PM_CheckListButtonSize - area (width/height) of the +checkbox/radiobutton in a TQCheckListItem +
  • TQStyle::PM_CheckListControllerSize - area (width/height) of the +controller in a TQCheckListItem +
  • TQStyle::PM_DialogButtonsSeparator - distance between buttons in a dialog buttons widget. +
  • TQStyle::PM_DialogButtonsButtonWidth - minimum width of a button in a dialog buttons widget. +
  • TQStyle::PM_DialogButtonsButtonHeight - minimum height of a button in a dialog buttons widget. +
  • TQStyle::PM_HeaderMarkSize +
  • TQStyle::PM_HeaderGripMargin +
  • TQStyle::PM_HeaderMargin +
  • TQStyle::PM_CustomBase - base value for custom ControlElements. All +values above this are reserved for custom use. Therefore, +custom values must be greater than this value. +

See also pixelMetric(). + +

TQStyle::PrimitiveElement

+ +

This enum represents the PrimitiveElements of a style. A +PrimitiveElement is a common GUI element, such as a checkbox +indicator or pushbutton bevel. +

    +
  • TQStyle::PE_ButtonCommand - button used to initiate an action, for +example, a TQPushButton. +
  • TQStyle::PE_ButtonDefault - this button is the default button, e.g. +in a dialog. +
  • TQStyle::PE_ButtonBevel - generic button bevel. +
  • TQStyle::PE_ButtonTool - tool button, for example, a TQToolButton. +
  • TQStyle::PE_ButtonDropDown - drop down button, for example, a tool +button that displays a popup menu, for example, TQPopupMenu. +

    +
  • TQStyle::PE_FocusRect - generic focus indicator. +

    +
  • TQStyle::PE_ArrowUp - up arrow. +
  • TQStyle::PE_ArrowDown - down arrow. +
  • TQStyle::PE_ArrowRight - right arrow. +
  • TQStyle::PE_ArrowLeft - left arrow. +

    +
  • TQStyle::PE_SpinWidgetUp - up symbol for a spin widget, for example a +TQSpinBox. +
  • TQStyle::PE_SpinWidgetDown - down symbol for a spin widget. +
  • TQStyle::PE_SpinWidgetPlus - increase symbol for a spin widget. +
  • TQStyle::PE_SpinWidgetMinus - decrease symbol for a spin widget. +

    +
  • TQStyle::PE_Indicator - on/off indicator, for example, a TQCheckBox. +
  • TQStyle::PE_IndicatorMask - bitmap mask for an indicator. +
  • TQStyle::PE_ExclusiveIndicator - exclusive on/off indicator, for +example, a TQRadioButton. +
  • TQStyle::PE_ExclusiveIndicatorMask - bitmap mask for an exclusive indicator. +

    +
  • TQStyle::PE_DockWindowHandle - tear off handle for dock windows and +toolbars, for example TQDockWindows and TQToolBars. +
  • TQStyle::PE_DockWindowSeparator - item separator for dock window and +toolbar contents. +
  • TQStyle::PE_DockWindowResizeHandle - resize handle for dock windows. +
  • TQStyle::PE_Splitter - splitter handle; see also TQSplitter. +

    +
  • TQStyle::PE_Panel - generic panel frame; see also TQFrame. +
  • TQStyle::PE_PanelPopup - panel frame for popup windows/menus; see also +TQPopupMenu. +
  • TQStyle::PE_PanelMenuBar - panel frame for menu bars. +
  • TQStyle::PE_PanelDockWindow - panel frame for dock windows and toolbars. +
  • TQStyle::PE_PanelTabWidget - panel frame for tab widgets. +
  • TQStyle::PE_PanelLineEdit - panel frame for line edits. +
  • TQStyle::PE_PanelGroupBox - panel frame for group boxes. +
  • TQStyle::PE_TabBarBase - area below tabs in a tab widget, for example, +TQTab. +

    +
  • TQStyle::PE_HeaderSection - section of a list or table header; see also +TQHeader. +
  • TQStyle::PE_HeaderArrow - arrow used to indicate sorting on a list or table +header +
  • TQStyle::PE_StatusBarSection - section of a status bar; see also +TQStatusBar. +

    +
  • TQStyle::PE_GroupBoxFrame - frame around a group box; see also +TQGroupBox. +
  • TQStyle::PE_WindowFrame - frame around a MDI window or a docking window +

    +
  • TQStyle::PE_Separator - generic separator. +

    +
  • TQStyle::PE_SizeGrip - window resize handle; see also TQSizeGrip. +

    +
  • TQStyle::PE_CheckMark - generic check mark; see also TQCheckBox. +

    +
  • TQStyle::PE_ScrollBarAddLine - scrollbar line increase indicator +(i.e. scroll down); see also TQScrollBar. +
  • TQStyle::PE_ScrollBarSubLine - scrollbar line decrease indicator (i.e. scroll up). +
  • TQStyle::PE_ScrollBarAddPage - scolllbar page increase indicator (i.e. page down). +
  • TQStyle::PE_ScrollBarSubPage - scrollbar page decrease indicator (i.e. page up). +
  • TQStyle::PE_ScrollBarSlider - scrollbar slider +
  • TQStyle::PE_ScrollBarFirst - scrollbar first line indicator (i.e. home). +
  • TQStyle::PE_ScrollBarLast - scrollbar last line indicator (i.e. end). +

    +
  • TQStyle::PE_ProgressBarChunk - section of a progress bar indicator; see +also TQProgressBar. +
  • TQStyle::PE_CheckListController - controller part of a listview item +
  • TQStyle::PE_CheckListIndicator - checkbox part of a listview item +
  • TQStyle::PE_CheckListExclusiveIndicator - radiobutton part of a listview item +
  • TQStyle::PE_RubberBand - rubber band used in such things as iconview +
  • TQStyle::PE_CustomBase - base value for custom PrimitiveElements. +All values above this are reserved for custom use. Custom +values must be greater than this value. +

See also drawPrimitive(). + +

TQStyle::StyleFlags

+ +

This enum represents flags for drawing PrimitiveElements. Not all +primitives use all of these flags. Note that these flags may mean +different things to different primitives. For an explanation of +the relationship between primitives and their flags, as well as +the different meanings of the flags, see the Style overview. +

    +
  • TQStyle::Style_Default +
  • TQStyle::Style_Enabled +
  • TQStyle::Style_Raised +
  • TQStyle::Style_Sunken +
  • TQStyle::Style_Off +
  • TQStyle::Style_NoChange +
  • TQStyle::Style_On +
  • TQStyle::Style_Down +
  • TQStyle::Style_Horizontal +
  • TQStyle::Style_HasFocus +
  • TQStyle::Style_Top +
  • TQStyle::Style_Bottom +
  • TQStyle::Style_FocusAtBorder +
  • TQStyle::Style_AutoRaise +
  • TQStyle::Style_MouseOver +
  • TQStyle::Style_Up +
  • TQStyle::Style_Selected +
  • TQStyle::Style_HasFocus +
  • TQStyle::Style_Active +
  • TQStyle::Style_ButtonDefault +

See also drawPrimitive(). + +

TQStyle::StyleHint

+ +

This enum represents a StyleHint. A StyleHint is a general look +and/or feel hint. +

    +
  • TQStyle::SH_EtchDisabledText - disabled text is "etched" like Windows. +
  • TQStyle::SH_GUIStyle - the GUI style to use. +
  • TQStyle::SH_ScrollBar_BackgroundMode - the background mode for a +TQScrollBar. Possible values are any of those in the BackgroundMode enum. +
  • TQStyle::SH_ScrollBar_MiddleClickAbsolutePosition - a boolean value. +If TRUE, middle clicking on a scrollbar causes the slider to +jump to that position. If FALSE, the middle clicking is +ignored. +
  • TQStyle::SH_ScrollBar_LeftClickAbsolutePosition - a boolean value. +If TRUE, left clicking on a scrollbar causes the slider to +jump to that position. If FALSE, the left clicking will +behave as appropriate for each control. +
  • TQStyle::SH_ScrollBar_ScrollWhenPointerLeavesControl - a boolean +value. If TRUE, when clicking a scrollbar SubControl, holding +the mouse button down and moving the pointer outside the +SubControl, the scrollbar continues to scroll. If FALSE, the +scollbar stops scrolling when the pointer leaves the +SubControl. +
  • TQStyle::SH_TabBar_Alignment - the alignment for tabs in a +TQTabWidget. Possible values are TQt::AlignLeft, TQt::AlignCenter and TQt::AlignRight. +
  • TQStyle::SH_Header_ArrowAlignment - the placement of the sorting +indicator may appear in list or table headers. Possible values +are TQt::Left or TQt::Right. +
  • TQStyle::SH_Slider_SnapToValue - sliders snap to values while moving, +like Windows +
  • TQStyle::SH_Slider_SloppyKeyEvents - key presses handled in a sloppy +manner, i.e. left on a vertical slider subtracts a line. +
  • TQStyle::SH_ProgressDialog_CenterCancelButton - center button on +progress dialogs, like Motif, otherwise right aligned. +
  • TQStyle::SH_ProgressDialog_TextLabelAlignment - TQt::AlignmentFlags -- +text label alignment in progress dialogs; Center on windows, +Auto|VCenter otherwise. +
  • TQStyle::SH_PrintDialog_RightAlignButtons - right align buttons in +the print dialog, like Windows. +
  • TQStyle::SH_MainWindow_SpaceBelowMenuBar - 1 or 2 pixel space between +the menubar and the dockarea, like Windows. +
  • TQStyle::SH_FontDialog_SelectAssociatedText - select the text in the +line edit, or when selecting an item from the listbox, or when +the line edit receives focus, like Windows. +
  • TQStyle::SH_PopupMenu_AllowActiveAndDisabled - allows disabled menu +items to be active. +
  • TQStyle::SH_PopupMenu_SpaceActivatesItem - pressing Space activates +the item, like Motif. +
  • TQStyle::SH_PopupMenu_SubMenuPopupDelay - the number of milliseconds +to wait before opening a submenu; 256 on windows, 96 on Motif. +
  • TQStyle::SH_PopupMenu_Scrollable - whether popupmenu's must support +scrolling. +
  • TQStyle::SH_PopupMenu_SloppySubMenus - whether popupmenu's must support +sloppy submenu; as implemented on Mac OS. +
  • TQStyle::SH_ScrollView_FrameOnlyAroundContents - whether scrollviews +draw their frame only around contents (like Motif), or around +contents, scrollbars and corner widgets (like Windows). +
  • TQStyle::SH_MenuBar_AltKeyNavigation - menubars items are navigable +by pressing Alt, followed by using the arrow keys to select +the desired item. +
  • TQStyle::SH_ComboBox_ListMouseTracking - mouse tracking in combobox +dropdown lists. +
  • TQStyle::SH_PopupMenu_MouseTracking - mouse tracking in popup menus. +
  • TQStyle::SH_MenuBar_MouseTracking - mouse tracking in menubars. +
  • TQStyle::SH_ItemView_ChangeHighlightOnFocus - gray out selected items +when losing focus. +
  • TQStyle::SH_Widget_ShareActivation - turn on sharing activation with +floating modeless dialogs. +
  • TQStyle::SH_TabBar_SelectMouseType - which type of mouse event should +cause a tab to be selected. +
  • TQStyle::SH_ListViewExpand_SelectMouseType - which type of mouse event should +cause a listview expansion to be selected. +
  • TQStyle::SH_TabBar_PreferNoArrows - whether a tabbar should suggest a size +to prevent scoll arrows. +
  • TQStyle::SH_ComboBox_Popup - allows popups as a combobox dropdown +menu. +
  • TQStyle::SH_Workspace_FillSpaceOnMaximize - the workspace should +maximize the client area. +
  • TQStyle::SH_TitleBar_NoBorder - the titlebar has no border +
  • TQStyle::SH_ScrollBar_StopMouseOverSlider - stops autorepeat when +slider reaches mouse +
  • TQStyle::SH_BlinkCursorWhenTextSelected - whether cursor should blink +when text is selected +
  • TQStyle::SH_RichText_FullWidthSelection - whether richtext selections +should extend the full width of the document. +
  • TQStyle::SH_GroupBox_TextLabelVerticalAlignment - how to vertically align a +groupbox's text label. +
  • TQStyle::SH_GroupBox_TextLabelColor - how to paint a groupbox's text label. +
  • TQStyle::SH_DialogButtons_DefaultButton - which buttons gets the +default status in a dialog's button widget. +
  • TQStyle::SH_CustomBase - base value for custom ControlElements. All +values above this are reserved for custom use. Therefore, +custom values must be greater than this value. +
  • TQStyle::SH_ToolButton_Uses3D - indicates whether TQToolButtons should +use a 3D frame when the mouse is over them +
  • TQStyle::SH_ToolBox_SelectedPageTitleBold - Boldness of the selected +page title in a TQToolBox. +
  • TQStyle::SH_LineEdit_PasswordCharacter - The TQChar Unicode character +to be used for passwords. +
  • TQStyle::SH_Table_GridLineColor +
  • TQStyle::SH_UnderlineAccelerator - whether accelerators are underlined +

See also styleHint(). + +

TQStyle::StylePixmap

+ +

This enum represents a StylePixmap. A StylePixmap is a pixmap that +can follow some existing GUI style or guideline. +

    +
  • TQStyle::SP_TitleBarMinButton - minimize button on titlebars. For +example, in a TQWorkspace. +
  • TQStyle::SP_TitleBarMaxButton - maximize button on titlebars. +
  • TQStyle::SP_TitleBarCloseButton - close button on titlebars. +
  • TQStyle::SP_TitleBarNormalButton - normal (restore) button on titlebars. +
  • TQStyle::SP_TitleBarShadeButton - shade button on titlebars. +
  • TQStyle::SP_TitleBarUnshadeButton - unshade button on titlebars. +
  • TQStyle::SP_MessageBoxInformation - the 'information' icon. +
  • TQStyle::SP_MessageBoxWarning - the 'warning' icon. +
  • TQStyle::SP_MessageBoxCritical - the 'critical' icon. +
  • TQStyle::SP_MessageBoxQuestion - the 'question' icon. +

    +
  • TQStyle::SP_DockWindowCloseButton - close button on dock windows; +see also TQDockWindow. +

    +
  • TQStyle::SP_CustomBase - base value for custom ControlElements. All +values above this are reserved for custom use. Therefore, +custom values must be greater than this value. +

See also stylePixmap(). + +

TQStyle::SubControl

+ +

This enum represents a SubControl within a ComplexControl. +

    +
  • TQStyle::SC_None - special value that matches no other SubControl. +

    +
  • TQStyle::SC_ScrollBarAddLine - scrollbar add line (i.e. down/right +arrow); see also TQScrollbar. +
  • TQStyle::SC_ScrollBarSubLine - scrollbar sub line (i.e. up/left arrow). +
  • TQStyle::SC_ScrollBarAddPage - scrollbar add page (i.e. page down). +
  • TQStyle::SC_ScrollBarSubPage - scrollbar sub page (i.e. page up). +
  • TQStyle::SC_ScrollBarFirst - scrollbar first line (i.e. home). +
  • TQStyle::SC_ScrollBarLast - scrollbar last line (i.e. end). +
  • TQStyle::SC_ScrollBarSlider - scrollbar slider handle. +
  • TQStyle::SC_ScrollBarGroove - special subcontrol which contains the +area in which the slider handle may move. +

    +
  • TQStyle::SC_SpinWidgetUp - spinwidget up/increase; see also TQSpinBox. +
  • TQStyle::SC_SpinWidgetDown - spinwidget down/decrease. +
  • TQStyle::SC_SpinWidgetFrame - spinwidget frame. +
  • TQStyle::SC_SpinWidgetEditField - spinwidget edit field. +
  • TQStyle::SC_SpinWidgetButtonField - spinwidget button field. +

    +
  • TQStyle::SC_ComboBoxEditField - combobox edit field; see also TQComboBox. +
  • TQStyle::SC_ComboBoxArrow - combobox arrow +
  • TQStyle::SC_ComboBoxFrame - combobox frame +
  • TQStyle::SC_ComboBoxListBoxPopup - combobox list box +
  • TQStyle::SC_SliderGroove - special subcontrol which contains the area +in which the slider handle may move. +
  • TQStyle::SC_SliderHandle - slider handle. +
  • TQStyle::SC_SliderTickmarks - slider tickmarks. +

    +
  • TQStyle::SC_ToolButton - tool button; see also TQToolbutton. +
  • TQStyle::SC_ToolButtonMenu - subcontrol for opening a popup menu in a +tool button; see also TQPopupMenu. +

    +
  • TQStyle::SC_TitleBarSysMenu - system menu button (i.e. restore, close, etc.). +
  • TQStyle::SC_TitleBarMinButton - minimize button. +
  • TQStyle::SC_TitleBarMaxButton - maximize button. +
  • TQStyle::SC_TitleBarCloseButton - close button. +
  • TQStyle::SC_TitleBarLabel - window title label. +
  • TQStyle::SC_TitleBarNormalButton - normal (restore) button. +
  • TQStyle::SC_TitleBarShadeButton - shade button. +
  • TQStyle::SC_TitleBarUnshadeButton - unshade button. +

    +
  • TQStyle::SC_ListView - the list view area. +
  • TQStyle::SC_ListViewBranch - (internal) +
  • TQStyle::SC_ListViewExpand - expand item (i.e. show/hide child items). +

    +
  • TQStyle::SC_All - special value that matches all SubControls. +

See also ComplexControl. + +

TQStyle::SubRect

+ +

This enum represents a sub-area of a widget. Style implementations +would use these areas to draw the different parts of a widget. +

    +
  • TQStyle::SR_PushButtonContents - area containing the label (iconset +with text or pixmap). +
  • TQStyle::SR_PushButtonFocusRect - area for the focus rect (usually +larger than the contents rect). +
  • TQStyle::SR_CheckBoxIndicator - area for the state indicator (e.g. check mark). +
  • TQStyle::SR_CheckBoxContents - area for the label (text or pixmap). +
  • TQStyle::SR_CheckBoxFocusRect - area for the focus indicator. +

    +
  • TQStyle::SR_RadioButtonIndicator - area for the state indicator. +
  • TQStyle::SR_RadioButtonContents - area for the label. +
  • TQStyle::SR_RadioButtonFocusRect - area for the focus indicator. +

    +
  • TQStyle::SR_ComboBoxFocusRect - area for the focus indicator. +

    +
  • TQStyle::SR_SliderFocusRect - area for the focus indicator. +

    +
  • TQStyle::SR_DockWindowHandleRect - area for the tear-off handle. +

    +
  • TQStyle::SR_ProgressBarGroove - area for the groove. +
  • TQStyle::SR_ProgressBarContents - area for the progress indicator. +
  • TQStyle::SR_ProgressBarLabel - area for the text label. +

    +
  • TQStyle::SR_ToolButtonContents - area for the tool button's label. +
  • TQStyle::SR_DialogButtonAccept - area for a dialog's accept button. +
  • TQStyle::SR_DialogButtonReject - area for a dialog's reject button. +
  • TQStyle::SR_DialogButtonApply - area for a dialog's apply button. +
  • TQStyle::SR_DialogButtonHelp - area for a dialog's help button. +
  • TQStyle::SR_DialogButtonAll - area for a dialog's all button. +
  • TQStyle::SR_DialogButtonRetry - area for a dialog's retry button. +
  • TQStyle::SR_DialogButtonAbort - area for a dialog's abort button. +
  • TQStyle::SR_DialogButtonIgnore - area for a dialog's ignore button. +
  • TQStyle::SR_DialogButtonCustom - area for a dialog's custom widget area (in button row). +
  • TQStyle::SR_ToolBoxTabContents - area for a toolbox tab's icon and label +
  • TQStyle::SR_CustomBase - base value for custom ControlElements. All values above +this are reserved for custom use. Therefore, custom values must be +greater than this value. +

See also subRect(). + +


Member Function Documentation

+

TQStyle::TQStyle () +

+Constructs a TQStyle. + +

TQStyle::~TQStyle () [virtual] +

+Destroys the style and frees all allocated resources. + +

int TQStyle::defaultFrameWidth () const +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

void TQStyle::drawComplexControl ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

+ +

Draws the ComplexControl control using the painter p in the +area r. Colors are used from the color group cg. The sub +argument specifies which SubControls to draw. Multiple SubControls +can be OR'ed together. The subActive argument specifies which +SubControl is active. +

The rect r should be in logical coordinates. Reimplementations +of this function should use visualRect() to change the logical +coordinates into screen coordinates when using drawPrimitive() and +drawControl(). +

The how argument is used to control how the ComplexControl is +drawn. Multiple flags can OR'ed together. See the table below for +an explanation of which flags are used with the various +ComplexControls. +

The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of control. The opt argument can be used to +pass extra information retquired when drawing the ComplexControl. +Note that opt may be the default value even for ComplexControls +that can make use of the extra options. See the table below for +the appropriate widget and opt usage: +

+
ComplexControl
& Widget Cast +
Style Flags +Notes +Options +Notes +
CC_SpinWidget(const TQSpinWidget *) +Style_Enabled Set if the spinwidget is enabled. + Unused. +   +
Style_HasFocus Set if the spinwidget has input focus. +
CC_ComboBox(const TQComboBox *) +Style_Enabled Set if the combobox is enabled. + Unused. +   +
Style_HasFocus Set if the combobox has input focus. +
CC_ScrollBar(const TQScrollBar *) +Style_Enabled Set if the scrollbar is enabled. + Unused. +   +
Style_HasFocus Set if the scrollbar has input focus. +
CC_Slider(const TQSlider *) +Style_Enabled Set if the slider is enabled. + Unused. +   +
Style_HasFocus Set if the slider has input focus. +
CC_ToolButton(const TQToolButton *) +Style_Enabled Set if the toolbutton is enabled. + TQStyleOption ( ArrowType t ) + + When the tool button only contains an arrow, t is the +arrow's type. +
Style_HasFocus Set if the toolbutton has input focus. +
Style_Down Set if the toolbutton is down (ie. mouse +button or space pressed). +
Style_On Set if the toolbutton is a toggle button +and is toggled on. +
Style_AutoRaise Set if the toolbutton has auto-raise enabled. +
Style_Raised Set if the button is not down, not on and doesn't +contain the mouse when auto-raise is enabled. +
CC_TitleBar(const TQWidget *) +Style_Enabled Set if the titlebar is enabled. +Unused. +  +
CC_ListView(const TQListView *) +Style_Enabled Set if the titlebar is enabled. +TQStyleOption ( TQListViewItem *item ) + +item is the item that needs branches drawn +
+

See also ComplexControl and SubControl. + +

void TQStyle::drawComplexControlMask ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

+ +

Draw a bitmask for the ComplexControl control using the painter +p in the area r. See drawComplexControl() for an explanation +of the use of the widget and opt arguments. +

The rect r should be in logical coordinates. Reimplementations +of this function should use visualRect() to change the logical +corrdinates into screen coordinates when using drawPrimitive() and +drawControl(). +

See also drawComplexControl() and ComplexControl. + +

void TQStyle::drawControl ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

+ +

Draws the ControlElement element using the painter p in the +area r. Colors are used from the color group cg. +

The rect r should be in screen coordinates. +

The how argument is used to control how the ControlElement is +drawn. Multiple flags can be OR'ed together. See the table below +for an explanation of which flags are used with the various +ControlElements. +

The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of element. The opt argument can be used to +pass extra information retquired when drawing the ControlElement. +Note that opt may be the default value even for ControlElements +that can make use of the extra options. See the table below for +the appropriate widget and opt usage: +

+
ControlElement
& Widget Cast +
Style Flags +Notes +Options +Notes +
CE_PushButton(const TQPushButton *) +

and +

CE_PushButtonLabel(const TQPushButton *) +

Style_Enabled Set if the button is enabled. + Unused. +   +
Style_HasFocus Set if the button has input focus. +
Style_Raised Set if the button is not down, not on and not flat. +
Style_On Set if the button is a toggle button and toggled on. +
Style_Down Set if the button is down (i.e., the mouse button or +space bar is pressed on the button). +
Style_ButtonDefault Set if the button is a default button. +
CE_CheckBox(const TQCheckBox *) +

and +

CE_CheckBoxLabel(const TQCheckBox *) +

Style_Enabled Set if the checkbox is enabled. + Unused. +   +
Style_HasFocus Set if the checkbox has input focus. +
Style_On Set if the checkbox is checked. +
Style_Off Set if the checkbox is not checked. +
Style_NoChange Set if the checkbox is in the NoChange state. +
Style_Down Set if the checkbox is down (i.e., the mouse button or +space bar is pressed on the button). +
CE_RadioButton(const TQRadioButton *) +

and +

CE_RadioButtonLabel(const TQRadioButton *) +

Style_Enabled Set if the radiobutton is enabled. + Unused. +   +
Style_HasFocus Set if the radiobutton has input focus. +
Style_On Set if the radiobutton is checked. +
Style_Off Set if the radiobutton is not checked. +
Style_Down Set if the radiobutton is down (i.e., the mouse +button or space bar is pressed on the radiobutton). +
CE_TabBarTab(const TQTabBar *) +

and +

CE_TabBarLabel(const TQTabBar *) +

Style_Enabled Set if the tabbar and tab is enabled. + TQStyleOption ( TQTab *t ) + + t is the TQTab being drawn. +
Style_Selected Set if the tab is the current tab. +
CE_ProgressBarGroove(const TQProgressBar *) +

and +

CE_ProgressBarContents(const TQProgressBar *) +

and +

CE_ProgressBarLabel(const TQProgressBar *) +

Style_Enabled Set if the progressbar is enabled. + Unused. +   +
Style_HasFocus Set if the progressbar has input focus. +
CE_PopupMenuItem(const TQPopupMenu *) +Style_Enabled Set if the menuitem is enabled. + TQStyleOption ( TQMenuItem *mi, int tabwidth, int maxpmwidth ) + +mi is the menu item being drawn. TQMenuItem is currently an +internal class. +
Style_Active Set if the menuitem is the current item. +tabwidth is the width of the tab column where key accelerators +are drawn. +
Style_Down Set if the menuitem is down (i.e., the mouse button +or space bar is pressed). +maxpmwidth is the maximum width of the check column where +checkmarks and iconsets are drawn. +
CE_MenuBarItem(const TQMenuBar *) +Style_Enabled Set if the menuitem is enabled + TQStyleOption ( TQMenuItem *mi ) + + mi is the menu item being drawn. +
Style_Active Set if the menuitem is the current item. +
Style_Down Set if the menuitem is down (i.e., a mouse button or +the space bar is pressed). +
Style_HasFocus Set if the menubar has input focus. +
CE_ToolButtonLabel(const TQToolButton *) +Style_Enabled Set if the toolbutton is enabled. + TQStyleOption ( ArrowType t ) + + When the tool button only contains an arrow, t is the +arrow's type. +
Style_HasFocus Set if the toolbutton has input focus. +
Style_Down Set if the toolbutton is down (i.e., a +mouse button or the space is pressed). +
Style_On Set if the toolbutton is a toggle button +and is toggled on. +
Style_AutoRaise Set if the toolbutton has auto-raise enabled. +
Style_MouseOver Set if the mouse pointer is over the toolbutton. +
Style_Raised Set if the button is not down, not on and doesn't +contain the mouse when auto-raise is enabled. +
+

See also ControlElement and StyleFlags. + +

void TQStyle::drawControlMask ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

+ +

Draw a bitmask for the ControlElement element using the painter +p in the area r. See drawControl() for an explanation of the +use of the widget and opt arguments. +

The rect r should be in screen coordinates. +

See also drawControl() and ControlElement. + +

void TQStyle::drawItem ( TQPainter * p, const TQRect & r, int flags, const TQColorGroup & g, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1, const TQColor * penColor = 0 ) const [virtual] +

+Draws the text or pixmap in rectangle r using painter p and color group g. The pen color is specified with penColor. The enabled bool indicates whether or not the item is +enabled; when reimplementing this bool should influence how the +item is drawn. If len is -1 (the default) all the text is +drawn; otherwise only the first len characters of text are +drawn. The text is aligned and wrapped according to the alignment +flags (see TQt::AlignmentFlags). +

By default, if both the text and the pixmap are not null, the +pixmap is drawn and the text is ignored. + +

void TQStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

+ +

Draws the style PrimitiveElement pe using the painter p in +the area r. Colors are used from the color group cg. +

The rect r should be in screen coordinates. +

The flags argument is used to control how the PrimitiveElement +is drawn. Multiple flags can be OR'ed together. +

For example, a pressed button would be drawn with the flags Style_Enabled and Style_Down. +

The opt argument can be used to control how various +PrimitiveElements are drawn. Note that opt may be the default +value even for PrimitiveElements that make use of extra options. +When opt is non-default, it is used as follows: +

+
PrimitiveElement Options Notes +
PE_FocusRect +TQStyleOption ( const TQColor & bg ) + +bg is the background color on which the focus rect is being drawn. +
PE_Panel + TQStyleOption ( int linewidth, int midlinewidth ) + +linewidth is the line width for drawing the panel. +
midlinewidth is the mid-line width for drawing the panel. +
PE_PanelPopup + TQStyleOption ( int linewidth, int midlinewidth ) + +linewidth is the line width for drawing the panel. +
midlinewidth is the mid-line width for drawing the panel. +
PE_PanelMenuBar + TQStyleOption ( int linewidth, int midlinewidth ) + +linewidth is the line width for drawing the panel. +
midlinewidth is the mid-line width for drawing the panel. +
PE_PanelDockWindow + TQStyleOption ( int linewidth, int midlinewidth ) + +linewidth is the line width for drawing the panel. +
midlinewidth is the mid-line width for drawing the panel. +
PE_GroupBoxFrame + TQStyleOption ( int linewidth, int midlinewidth, int shape, int shadow ) + +linewidth is the line width for the group box. +
midlinewidth is the mid-line width for the group box. +
shape is the frame shape +for the group box. +
shadow is the frame shadow +for the group box. +
+

For all other PrimitiveElements, opt is unused. +

See also StyleFlags. + +

Example: themes/wood.cpp. +

TQRect TQStyle::itemRect ( TQPainter * p, const TQRect & r, int flags, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1 ) const [virtual] +

+Returns the appropriate area (see below) within rectangle r in +which to draw the text or pixmap using painter p. If len is -1 (the default) all the text is drawn; otherwise only +the first len characters of text are drawn. The text is +aligned in accordance with the alignment flags (see +TQt::AlignmentFlags). The enabled bool indicates whether or +not the item is enabled. +

If r is larger than the area needed to render the text the +rectangle that is returned will be offset within r in +accordance with the alignment flags. For example if flags is +AlignCenter the returned rectangle will be centered within r. If r is smaller than the area needed the rectangle that is +returned will be larger than r (the smallest rectangle large +enough to render the text or pixmap). +

By default, if both the text and the pixmap are not null, the +pixmap is drawn and the text is ignored. + +

int TQStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const [pure virtual] +

+ +

Returns the pixel metric for metric. The widget argument is +a pointer to a TQWidget or one of its subclasses. The widget can be +cast to the appropriate type based on the value of metric. Note +that widget may be zero even for PixelMetrics that can make use +of widget. See the table below for the appropriate widget +casts: +

+
PixelMetric Widget Cast +
PM_SliderControlThickness (const TQSlider *) +
PM_SliderLength (const TQSlider *) +
PM_SliderTickmarkOffset (const TQSlider *) +
PM_SliderSpaceAvailable (const TQSlider *) +
PM_TabBarTabOverlap (const TQTabBar *) +
PM_TabBarTabHSpace (const TQTabBar *) +
PM_TabBarTabVSpace (const TQTabBar *) +
PM_TabBarBaseHeight (const TQTabBar *) +
PM_TabBarBaseOverlap (const TQTabBar *) +
+ +

void TQStyle::polish ( TQWidget * ) [virtual] +

+Initializes the appearance of a widget. +

This function is called for every widget at some point after it +has been fully created but just before it is shown the very +first time. +

Reasonable actions in this function might be to call +TQWidget::setBackgroundMode() for the widget. An example of highly +unreasonable use would be setting the geometry! Reimplementing +this function gives you a back-door through which you can change +the appearance of a widget. With TQt 3.0's style engine you will +rarely need to write your own polish(); instead reimplement +drawItem(), drawPrimitive(), etc. +

The TQWidget::inherits() function may provide enough information to +allow class-specific customizations. But be careful not to +hard-code things too much because new TQStyle subclasses are +expected to work reasonably with all current and future +widgets. +

See also unPolish(). + +

void TQStyle::polish ( TQApplication * ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Late initialization of the TQApplication object. +

See also unPolish(). + +

void TQStyle::polish ( TQPalette & ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

The style may have certain retquirements for color palettes. In +this function it has the chance to change the palette according to +these retquirements. +

See also TQPalette and TQApplication::setPalette(). + +

void TQStyle::polishPopupMenu ( TQPopupMenu * ) [pure virtual] +

+Polishes the popup menu according to the GUI style. This usually +means setting the mouse tracking +(TQPopupMenu::setMouseTracking()) and whether the menu is +checkable by default (TQPopupMenu::setCheckable()). + +

SubControl TQStyle::querySubControl ( ComplexControl control, const TQWidget * widget, const TQPoint & pos, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

+ +

Returns the SubControl for widget at the point pos. The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of control. The opt argument can be used to +pass extra information retquired when drawing the ComplexControl. +Note that opt may be the default value even for ComplexControls +that can make use of the extra options. See drawComplexControl() +for an explanation of the widget and opt arguments. +

Note that pos is passed in screen coordinates. When using +querySubControlMetrics() to check for hits and misses, use +visualRect() to change the logical coordinates into screen +coordinates. +

See also drawComplexControl(), ComplexControl, SubControl, and querySubControlMetrics(). + +

TQRect TQStyle::querySubControlMetrics ( ComplexControl control, const TQWidget * widget, SubControl subcontrol, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

+ +

Returns the rect for the SubControl subcontrol for widget in +logical coordinates. +

The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of control. The opt argument can be used to +pass extra information retquired when drawing the ComplexControl. +Note that opt may be the default value even for ComplexControls +that can make use of the extra options. See drawComplexControl() +for an explanation of the widget and opt arguments. +

See also drawComplexControl(), ComplexControl, and SubControl. + +

TQSize TQStyle::scrollBarExtent () const +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

TQSize TQStyle::sizeFromContents ( ContentsType contents, const TQWidget * widget, const TQSize & contentsSize, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

+ +

Returns the size of widget based on the contents size contentsSize. +

The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of contents. The opt argument can be used to +pass extra information retquired when calculating the size. Note +that opt may be the default value even for ContentsTypes that +can make use of the extra options. See the table below for the +appropriate widget and opt usage: +

+
ContentsType Widget Cast Options Notes +
CT_PushButton (const TQPushButton *) Unused.   +
CT_CheckBox (const TQCheckBox *) Unused.   +
CT_RadioButton (const TQRadioButton *) Unused.   +
CT_ToolButton (const TQToolButton *) Unused.   +
CT_ComboBox (const TQComboBox *) Unused.   +
CT_Splitter (const TQSplitter *) Unused.   +
CT_DockWindow (const TQDockWindow *) Unused.   +
CT_ProgressBar (const TQProgressBar *) Unused.   +
CT_PopupMenuItem (const TQPopupMenu *) +TQStyleOption ( TQMenuItem *mi ) + +mi is the menu item to use when calculating the size. +TQMenuItem is currently an internal class. +
+ +

int TQStyle::styleHint ( StyleHint stylehint, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default, TQStyleHintReturn * returnData = 0 ) const [pure virtual] +

+ +

Returns the style hint stylehint for widget. Currently, widget, opt, and returnData are unused; they're included to +allow for future enhancements. +

For an explanation of the return value see StyleHint. + +

TQPixmap TQStyle::stylePixmap ( StylePixmap stylepixmap, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default ) const [pure virtual] +

+ +

Returns a pixmap for stylepixmap. +

The opt argument can be used to pass extra information retquired +when drawing the ControlElement. Note that opt may be the +default value even for StylePixmaps that can make use of the extra +options. Currently, the opt argument is unused. +

The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of stylepixmap. See the table below for the +appropriate widget casts: +

+
StylePixmap Widget Cast +
SP_TitleBarMinButton (const TQWidget *) +
SP_TitleBarMaxButton (const TQWidget *) +
SP_TitleBarCloseButton (const TQWidget *) +
SP_TitleBarNormalButton (const TQWidget *) +
SP_TitleBarShadeButton (const TQWidget *) +
SP_TitleBarUnshadeButton (const TQWidget *) +
SP_DockWindowCloseButton (const TQDockWindow *) +
+

See also StylePixmap. + +

TQRect TQStyle::subRect ( SubRect subrect, const TQWidget * widget ) const [pure virtual] +

+ +

Returns the sub-area subrect for the widget in logical +coordinates. +

The widget argument is a pointer to a TQWidget or one of its +subclasses. The widget can be cast to the appropriate type based +on the value of subrect. See the table below for the +appropriate widget casts: +

+
SubRect Widget Cast +
SR_PushButtonContents (const TQPushButton *) +
SR_PushButtonFocusRect (const TQPushButton *) +
SR_CheckBoxIndicator (const TQCheckBox *) +
SR_CheckBoxContents (const TQCheckBox *) +
SR_CheckBoxFocusRect (const TQCheckBox *) +
SR_RadioButtonIndicator (const TQRadioButton *) +
SR_RadioButtonContents (const TQRadioButton *) +
SR_RadioButtonFocusRect (const TQRadioButton *) +
SR_ComboBoxFocusRect (const TQComboBox *) +
SR_DockWindowHandleRect (const TQWidget *) +
SR_ProgressBarGroove (const TQProgressBar *) +
SR_ProgressBarContents (const TQProgressBar *) +
SR_ProgressBarLabel (const TQProgressBar *) +
+

The tear-off handle (SR_DockWindowHandleRect) for TQDockWindow +is a private class. Use TQWidget::parentWidget() to access the +TQDockWindow: +

+        if ( !widget->parentWidget() )
+            return;
+        const TQDockWindow *dw = (const TQDockWindow *) widget->parentWidget();
+    
+ +

See also SubRect. + +

void TQStyle::tabbarMetrics ( const TQWidget * t, int & hf, int & vf, int & ov ) const +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

void TQStyle::unPolish ( TQWidget * ) [virtual] +

+Undoes the initialization of a widget's appearance. +

This function is the counterpart to polish. It is called for every +polished widget when the style is dynamically changed. The former +style has to unpolish its settings before the new style can polish +them again. +

See also polish(). + +

void TQStyle::unPolish ( TQApplication * ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Undoes the application polish. +

See also polish(). + +

TQRect TQStyle::visualRect ( const TQRect & logical, const TQWidget * w ) [static] +

+ +

Returns the rect logical in screen coordinates. The bounding +rect for widget w is used to perform the translation. This +function is provided to aid style implementors in supporting +right-to-left mode. +

See also TQApplication::reverseLayout(). + +

TQRect TQStyle::visualRect ( const TQRect & logical, const TQRect & bounding ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the rect logical in screen coordinates. The rect bounding is used to perform the translation. This function is +provided to aid style implementors in supporting right-to-left +mode. +

See also TQApplication::reverseLayout(). + + +


+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/qstylefactory-h.html b/doc/html/qstylefactory-h.html new file mode 100644 index 00000000..64a7058e --- /dev/null +++ b/doc/html/qstylefactory-h.html @@ -0,0 +1,107 @@ + + + + + +qstylefactory.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qstylefactory.h

+ +

This is the verbatim text of the qstylefactory.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qstylefactory.h   3.3.8   edited Jan 11 14:46 $
+**
+** ...
+**
+** Copyright (C) 2000-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSTYLEFACTORY_H
+#define TQSTYLEFACTORY_H
+
+#ifndef QT_H
+#include "qstringlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_STYLE
+
+class TQString;
+class TQStyle;
+
+class Q_EXPORT TQStyleFactory
+{
+public:
+#ifndef QT_NO_STRINGLIST
+    static TQStringList keys();
+#endif
+    static TQStyle *create( const TQString& );
+};
+
+#endif //QT_NO_STYLE
+
+#endif //TQSTYLEFACTORY_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstylefactory-members.html b/doc/html/qstylefactory-members.html new file mode 100644 index 00000000..72c055ab --- /dev/null +++ b/doc/html/qstylefactory-members.html @@ -0,0 +1,48 @@ + + + + + +TQStyleFactory Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQStyleFactory

+ +

This is the complete list of member functions for +TQStyleFactory, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstylefactory.html b/doc/html/qstylefactory.html new file mode 100644 index 00000000..d2e49035 --- /dev/null +++ b/doc/html/qstylefactory.html @@ -0,0 +1,80 @@ + + + + + +TQStyleFactory Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQStyleFactory Class Reference

+ +

The TQStyleFactory class creates TQStyle objects. +More... +

#include <qstylefactory.h> +

List of all member functions. +

Static Public Members

+
    +
  • TQStringList keys ()
  • +
  • TQStyle * create ( const TQString & key )
  • +
+

Detailed Description

+ + +The TQStyleFactory class creates TQStyle objects. +

The style factory creates a TQStyle object for a given key with +TQStyleFactory::create(key). +

The styles are either built-in or dynamically loaded from a style +plugin (see TQStylePlugin). +

TQStyleFactory::keys() returns a list of valid keys, typically +including "Windows", "Motif", "CDE", "MotifPlus", "Platinum", +"SGI" and "Compact". Depending on the platform, "WindowsXP", +"Aqua" or "Macintosh" may be available. + +


Member Function Documentation

+

TQStyle * TQStyleFactory::create ( const TQString & key ) [static] +

+Creates a TQStyle object that matches key case-insensitively. +This is either a built-in style, or a style from a style plugin. +

See also keys(). + +

Example: themes/wood.cpp. +

TQStringList TQStyleFactory::keys () [static] +

+Returns the list of keys this factory can create styles for. +

See also create(). + +

Example: themes/themes.cpp. + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstyleoption-members.html b/doc/html/qstyleoption-members.html new file mode 100644 index 00000000..48af1beb --- /dev/null +++ b/doc/html/qstyleoption-members.html @@ -0,0 +1,64 @@ + + + + + +TQStyleOption Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQStyleOption

+ +

This is the complete list of member functions for +TQStyleOption, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstyleoption.html b/doc/html/qstyleoption.html new file mode 100644 index 00000000..15107868 --- /dev/null +++ b/doc/html/qstyleoption.html @@ -0,0 +1,297 @@ + + + + + +TQStyleOption Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQStyleOption Class Reference

+ +

The TQStyleOption class specifies optional parameters for TQStyle functions. +More... +

#include <qstyle.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQStyleOption class specifies optional parameters for TQStyle functions. + +

Some TQStyle functions take an optional argument specifying extra +information that is retquired for a paritical primitive or control. +So that the TQStyle class can be extended, TQStyleOption is used to +provide a variable-argument for these options. +

The TQStyleOption class has constructors for each type of optional +argument, and this set of constructors may be extended in future +TQt releases. There are also corresponding access functions that +return the optional arguments: these too may be extended. +

For each constructor, you should refer to the documentation of the +TQStyle functions to see the meaning of the arguments. +

When calling TQStyle functions from your own widgets, you must only +pass the default TQStyleOption or the argument that TQStyle is +documented to accept. For example, if the function expects +TQStyleOption(TQMenuItem *, int), passing TQStyleOption(TQMenuItem *) +leaves the optional integer argument uninitialized. +

When subclassing TQStyle, you must similarly only expect the +default or documented arguments. The other arguments will have +uninitialized values. +

If you make your own TQStyle subclasses and your own widgets, you +can make a subclass of TQStyleOption to pass additional arguments +to your TQStyle subclass. You will need to cast the "const +TQStyleOption&" argument to your subclass, so be sure your style +has been called from your widget. +

See also Widget Appearance and Style. + +


Member Type Documentation

+

TQStyleOption::StyleOptionDefault

+ +

This enum value can be passed as the optional argument to any +TQStyle function. +

    +
  • TQStyleOption::Default +
+

Member Function Documentation

+

TQStyleOption::TQStyleOption ( StyleOptionDefault = Default ) +

+ +

The default option. This can always be passed as the optional +argument to TQStyle functions. + +

TQStyleOption::TQStyleOption ( int in1 ) +

+ +

Pass one integer, in1. For example, headerSection. + +

TQStyleOption::TQStyleOption ( int in1, int in2 ) +

+ +

Pass two integers, in1 and in2. For example, linewidth and +midlinewidth. + +

TQStyleOption::TQStyleOption ( int in1, int in2, int in3, int in4 ) +

+ +

Pass four integers, in1, in2, in3 and in4. + +

TQStyleOption::TQStyleOption ( TQMenuItem * m ) +

+ +

Pass a menu item, m. + +

TQStyleOption::TQStyleOption ( TQMenuItem * m, int in1 ) +

+ +

Pass a menu item and an integer, m and in1. + +

TQStyleOption::TQStyleOption ( TQMenuItem * m, int in1, int in2 ) +

+ +

Pass a menu item and two integers, m, in1 and in2. + +

TQStyleOption::TQStyleOption ( const TQColor & c ) +

+ +

Pass a color, c. + +

TQStyleOption::TQStyleOption ( TQTab * t ) +

+ +

Pass a TQTab, t. + +

TQStyleOption::TQStyleOption ( TQListViewItem * i ) +

+ +

Pass a TQListViewItem, i. + +

TQStyleOption::TQStyleOption ( TQCheckListItem * i ) +

+ +

Pass a TQCheckListItem, i. + +

TQStyleOption::TQStyleOption ( TQt::ArrowType a ) +

+ +

Pass an TQt::ArrowType, a. + +

TQStyleOption::TQStyleOption ( const TQRect & r ) +

+ +

Pass a TQRect, r. + +

TQStyleOption::TQStyleOption ( TQWidget * w ) +

+ +

Pass a TQWidget, w. + +

TQt::ArrowType TQStyleOption::arrowType () const +

+ +

Returns an arrow type if the appropriate constructor was called; +otherwise the return value is undefined. + +

TQCheckListItem * TQStyleOption::checkListItem () const +

+ +

Returns a check list item if the appropriate constructor was +called; otherwise the return value is undefined. + +

const TQColor & TQStyleOption::color () const +

+ +

Returns a color if the appropriate constructor was called; +otherwise the return value is undefined. + +

int TQStyleOption::day () const +

+ +

Returns the index of the day in the month if the appropriate +constructor was called; otherwise the return value is undefined. + +

int TQStyleOption::frameShadow () const +

+ +

Returns a TQFrame::Shadow value if the appropriate constructor was +called; otherwise the return value is undefined. + +

int TQStyleOption::frameShape () const +

+ +

Returns a TQFrame::Shape value if the appropriate constructor was +called; otherwise the return value is undefined. + +

int TQStyleOption::headerSection () const +

+ +

Returns the header section if the appropriate constructor was +called; otherwise the return value is undefined. + +

bool TQStyleOption::isDefault () const +

+ +

Returns TRUE if the option was constructed with the default +constructor; otherwise returns FALSE. + +

int TQStyleOption::lineWidth () const +

+ +

Returns the line width if the appropriate constructor was called; +otherwise the return value is undefined. + +

TQListViewItem * TQStyleOption::listViewItem () const +

+ +

Returns a TQListView item if the appropriate constructor was +called; otherwise the return value is undefined. + +

int TQStyleOption::maxIconWidth () const +

+ +

Returns the maximum width of the menu item check area if the +appropriate constructor was called; otherwise the return value is +undefined. + +

TQMenuItem * TQStyleOption::menuItem () const +

+ +

Returns a menu item if the appropriate constructor was called; +otherwise the return value is undefined. + +

int TQStyleOption::midLineWidth () const +

+ +

Returns the mid-line width if the appropriate constructor was +called; otherwise the return value is undefined. + +

TQRect TQStyleOption::rect () const +

+ +

Returns a rectangle if the appropriate constructor was called; +otherwise the return value is undefined. + +

TQTab * TQStyleOption::tab () const +

+ +

Returns a TQTabBar tab if the appropriate constructor was called; +otherwise the return value is undefined. + +

int TQStyleOption::tabWidth () const +

+ +

Returns the tab indent width if the appropriate constructor was +called; otherwise the return value is undefined. + +

TQWidget * TQStyleOption::widget () const +

+ +

Returns a pointer to a widget if the appropriate constructor was called; +otherwise the return value is undefined. + + +


+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/qstyleplugin-h.html b/doc/html/qstyleplugin-h.html new file mode 100644 index 00000000..7ca607f9 --- /dev/null +++ b/doc/html/qstyleplugin-h.html @@ -0,0 +1,117 @@ + + + + + +qstyleplugin.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qstyleplugin.h

+ +

This is the verbatim text of the qstyleplugin.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qstyleplugin.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQStylePlugin class
+**
+** Created : 010920
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSTYLEPLUGIN_H
+#define TQSTYLEPLUGIN_H
+
+#ifndef QT_H
+#include "qgplugin.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_STYLE
+#ifndef QT_NO_COMPONENT
+
+class TQStyle;
+class TQStylePluginPrivate;
+
+class Q_EXPORT TQStylePlugin : public TQGPlugin
+{
+    Q_OBJECT
+public:
+    TQStylePlugin();
+    ~TQStylePlugin();
+
+    virtual TQStringList keys() const = 0;
+    virtual TQStyle *create( const TQString &key ) = 0;
+
+private:
+    TQStylePluginPrivate *d;
+};
+
+#endif // QT_NO_COMPONENT
+#endif // QT_NO_STYLE
+
+#endif // TQSTYLEPLUGIN_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstyleplugin-members.html b/doc/html/qstyleplugin-members.html new file mode 100644 index 00000000..0021f801 --- /dev/null +++ b/doc/html/qstyleplugin-members.html @@ -0,0 +1,50 @@ + + + + + +TQStylePlugin Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQStylePlugin

+ +

This is the complete list of member functions for +TQStylePlugin, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstyleplugin.html b/doc/html/qstyleplugin.html new file mode 100644 index 00000000..1380b87d --- /dev/null +++ b/doc/html/qstyleplugin.html @@ -0,0 +1,97 @@ + + + + + +TQStylePlugin Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQStylePlugin Class Reference

+ +

The TQStylePlugin class provides an abstract base for custom TQStyle plugins. +More... +

#include <qstyleplugin.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQStylePlugin class provides an abstract base for custom TQStyle plugins. +

+

The style plugin is a simple plugin interface that makes it easy +to create custom styles that can be loaded dynamically into +applications with a TQStyleFactory. +

Writing a style plugin is achieved by subclassing this base class, +reimplementing the pure virtual functions keys() and create(), and +exporting the class with the Q_EXPORT_PLUGIN macro. See the +plugins documentation for an +example. +

See also Plugins. + +


Member Function Documentation

+

TQStylePlugin::TQStylePlugin () +

+Constructs a style plugin. This is invoked automatically by the +Q_EXPORT_PLUGIN macro. + +

TQStylePlugin::~TQStylePlugin () +

+Destroys the style plugin. +

You never have to call this explicitly. TQt destroys a plugin +automatically when it is no longer used. + +

TQStyle * TQStylePlugin::create ( const TQString & key ) [pure virtual] +

+ +

Creates and returns a TQStyle object for the style key key. The +style key is usually the class name of the retquired style. +

See also keys(). + +

TQStringList TQStylePlugin::keys () const [pure virtual] +

+ +

Returns the list of style keys this plugin supports. +

These keys are usually the class names of the custom styles that +are implemented in the plugin. +

See also create(). + + +


+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/qstylesheet-h.html b/doc/html/qstylesheet-h.html new file mode 100644 index 00000000..696db736 --- /dev/null +++ b/doc/html/qstylesheet-h.html @@ -0,0 +1,298 @@ + + + + + +qstylesheet.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qstylesheet.h

+ +

This is the verbatim text of the qstylesheet.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qstylesheet.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of the TQStyleSheet class
+**
+** Created : 990101
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQSTYLESHEET_H
+#define TQSTYLESHEET_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qvaluelist.h"
+#include "qptrvector.h"
+#include "qdict.h"
+#include "qobject.h"
+#endif // QT_H
+
+#ifndef QT_NO_RICHTEXT
+
+class TQStyleSheet;
+class TQTextDocument;
+template<class Key, class T> class TQMap;
+class TQStyleSheetItemData;
+
+class Q_EXPORT TQStyleSheetItem : public TQt
+{
+public:
+    TQStyleSheetItem( TQStyleSheet* parent, const TQString& name );
+    TQStyleSheetItem( const TQStyleSheetItem & );
+    ~TQStyleSheetItem();
+
+    TQStyleSheetItem& operator=( const TQStyleSheetItem& other );
+
+    TQString name() const;
+
+    TQStyleSheet* styleSheet();
+    const TQStyleSheet* styleSheet() const;
+
+    enum AdditionalStyleValues { Undefined  = - 1};
+
+    enum DisplayMode {
+	DisplayBlock,
+	DisplayInline,
+	DisplayListItem,
+	DisplayNone
+#ifndef Q_QDOC
+	, DisplayModeUndefined = -1
+#endif
+    };
+
+    DisplayMode displayMode() const;
+    void setDisplayMode(DisplayMode m);
+
+    int alignment() const;
+    void setAlignment( int f);
+
+    enum VerticalAlignment {
+	VAlignBaseline,
+	VAlignSub,
+	VAlignSuper
+    };
+
+    VerticalAlignment verticalAlignment() const;
+    void setVerticalAlignment( VerticalAlignment valign );
+
+    int fontWeight() const;
+    void setFontWeight(int w);
+
+    int logicalFontSize() const;
+    void setLogicalFontSize(int s);
+
+    int logicalFontSizeStep() const;
+    void setLogicalFontSizeStep( int s );
+
+    int fontSize() const;
+    void setFontSize(int s);
+
+    TQString fontFamily() const;
+    void setFontFamily( const TQString& );
+
+    int numberOfColumns() const;
+    void setNumberOfColumns(int ncols);
+
+    TQColor color() const;
+    void setColor( const TQColor &);
+
+    bool fontItalic() const;
+    void setFontItalic( bool );
+    bool definesFontItalic() const;
+
+    bool fontUnderline() const;
+    void setFontUnderline( bool );
+    bool definesFontUnderline() const;
+
+    bool fontStrikeOut() const;
+    void setFontStrikeOut( bool );
+    bool definesFontStrikeOut() const;
+
+    bool isAnchor() const;
+    void setAnchor(bool anc);
+
+    enum WhiteSpaceMode {
+	WhiteSpaceNormal,
+	WhiteSpacePre,
+	WhiteSpaceNoWrap
+#ifndef Q_QDOC
+	, WhiteSpaceModeUndefined = -1
+#endif
+    };
+    WhiteSpaceMode whiteSpaceMode() const;
+    void setWhiteSpaceMode(WhiteSpaceMode m);
+
+    enum Margin {
+	MarginLeft,
+	MarginRight,
+	MarginTop,
+	MarginBottom,
+	MarginFirstLine,
+	MarginAll,
+	MarginVertical,
+	MarginHorizontal
+#ifndef Q_QDOC
+	, MarginUndefined = -1
+#endif
+    };
+
+    int margin( Margin m) const;
+    void setMargin( Margin, int);
+
+    enum ListStyle {
+	ListDisc,
+	ListCircle,
+	ListSquare,
+	ListDecimal,
+	ListLowerAlpha,
+	ListUpperAlpha
+#ifndef Q_QDOC
+	, ListStyleUndefined = -1
+#endif
+    };
+
+    ListStyle listStyle() const;
+    void setListStyle( ListStyle );
+
+    TQString contexts() const;
+    void setContexts( const TQString& );
+    bool allowedInContext( const TQStyleSheetItem* ) const;
+
+    bool selfNesting() const;
+    void setSelfNesting( bool );
+
+    void setLineSpacing( int ls );
+    int lineSpacing() const;
+
+private:
+    void init();
+    TQStyleSheetItemData* d;
+};
+
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT TQDict<TQStyleSheetItem>;
+Q_TEMPLATE_EXTERN template class Q_EXPORT TQValueList< TQPtrVector<TQStyleSheetItem> >;
+Q_TEMPLATE_EXTERN template class Q_EXPORT TQPtrVector<TQStyleSheetItem>;
+Q_TEMPLATE_EXTERN template class Q_EXPORT TQValueList<TQStyleSheetItem::ListStyle>;
+// MOC_SKIP_END
+#endif
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+class TQTextCustomItem;
+#endif
+
+class Q_EXPORT TQStyleSheet : public TQObject
+{
+    Q_OBJECT
+public:
+    TQStyleSheet( TQObject *parent=0, const char *name=0 );
+    virtual ~TQStyleSheet();
+
+    static TQStyleSheet* defaultSheet();
+    static void setDefaultSheet( TQStyleSheet* );
+
+
+    TQStyleSheetItem* item( const TQString& name);
+    const TQStyleSheetItem* item( const TQString& name) const;
+
+    void insert( TQStyleSheetItem* item);
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+    virtual TQTextCustomItem* tag( const TQString& name,
+				  const TQMap<TQString, TQString> &attr,
+				  const TQString& context,
+				  const TQMimeSourceFactory& factory,
+				  bool emptyTag, TQTextDocument *doc ) const;
+#endif
+    static TQString escape( const TQString& );
+    static TQString convertFromPlainText( const TQString&,
+					 TQStyleSheetItem::WhiteSpaceMode mode = TQStyleSheetItem::WhiteSpacePre );
+    static bool mightBeRichText( const TQString& );
+
+    virtual void scaleFont( TQFont& font, int logicalSize ) const;
+
+    virtual void error( const TQString& ) const;
+
+private:
+    void init();
+    TQDict<TQStyleSheetItem> styles;
+    TQStyleSheetItem* nullstyle;
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQStyleSheet( const TQStyleSheet & );
+    TQStyleSheet &operator=( const TQStyleSheet & );
+#endif
+};
+
+#endif // QT_NO_RICHTEXT
+
+#endif // TQSTYLESHEET_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstylesheet-members.html b/doc/html/qstylesheet-members.html new file mode 100644 index 00000000..063b5c62 --- /dev/null +++ b/doc/html/qstylesheet-members.html @@ -0,0 +1,99 @@ + + + + + +TQStyleSheet Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQStyleSheet

+ +

This is the complete list of member functions for +TQStyleSheet, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstylesheet.html b/doc/html/qstylesheet.html new file mode 100644 index 00000000..d79b47af --- /dev/null +++ b/doc/html/qstylesheet.html @@ -0,0 +1,383 @@ + + + + + +TQStyleSheet Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQStyleSheet Class Reference

+ +

The TQStyleSheet class is a collection of styles for rich text +rendering and a generator of tags. +More... +

#include <qstylesheet.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • TQStyleSheet ( TQObject * parent = 0, const char * name = 0 )
  • +
  • virtual ~TQStyleSheet ()
  • +
  • TQStyleSheetItem * item ( const TQString & name )
  • +
  • const TQStyleSheetItem * item ( const TQString & name ) const
  • +
  • virtual TQTextCustomItem * tag ( const TQString & name, const TQMap<TQString, TQString> & attr, const TQString & context, const TQMimeSourceFactory & factory, bool emptyTag, TQTextDocument * doc ) const
  • +
  • virtual void scaleFont ( TQFont & font, int logicalSize ) const
  • +
  • virtual void error ( const TQString & msg ) const
  • +
+

Static Public Members

+ +

Detailed Description

+ + + +The TQStyleSheet class is a collection of styles for rich text +rendering and a generator of tags. +

+ +

By creating TQStyleSheetItem objects for a style sheet you build a +definition of a set of tags. This definition will be used by the +internal rich text rendering system to parse and display text +documents to which the style sheet applies. Rich text is normally +visualized in a TQTextEdit or a TQTextBrowser. However, TQLabel, +TQWhatsThis and TQMessageBox also support it, and other classes are +likely to follow. With TQSimpleRichText it is possible to use the +rich text renderer for custom widgets as well. +

The default TQStyleSheet object has the following style bindings, +sorted by structuring bindings, anchors, character style bindings +(i.e. inline styles), special elements such as horizontal lines or +images, and other tags. In addition, rich text supports simple +HTML tables. +

The structuring tags are +

+
Structuring tags Notes +
<qt>...</qt> +A TQt rich text document. It understands the following +attributes: +
    +
  • title -- The caption of the document. This attribute is +easily accessible with TQTextEdit::documentTitle(). +
  • type -- The type of the document. The default type is page. It indicates that the document is displayed in a +page of its own. Another style is detail, which can be +used to explain certain expressions in more detail in a +few sentences. For detail, TQTextBrowser will then keep +the current page and display the new document in a small +popup similar to TQWhatsThis. Note that links will not work +in documents with <qt type="detail">...</qt>. +
  • bgcolor -- The background color, for example bgcolor="yellow" or bgcolor="#0000FF". +
  • background -- The background pixmap, for example background="granite.xpm". The pixmap name will be resolved +by a TQMimeSourceFactory(). +
  • text -- The default text color, for example text="red". +
  • link -- The link color, for example link="green". +
+
<h1>...</h1> +A top-level heading. +
<h2>...</h2> +A sublevel heading. +
<h3>...</h3> +A sub-sublevel heading. +
<h4>...</h4> <h5>...</h5> +Headings of lesser importance. +
<p>...</p> +A left-aligned paragraph. Adjust the alignment with the align attribute. Possible values are left, right and +center. +
<center>...
</center> +
A centered paragraph. +
<blockquote>...
</blockquote> +
An indented paragraph that is useful for quotes. +
<ul>...</ul> +An unordered list. You can also pass a type argument to +define the bullet style. The default is type=disc; +other types are circle and square. +
<ol>...</ol> +An ordered list. You can also pass a type argument to +define the enumeration label style. The default is type="1"; other types are "a" and "A". +
<li>...</li> +A list item. This tag can be used only within the context +of <ol> or <ul>. +
<dl>...</dl> +A list of definitions, consisting of terms and descriptions. +
<dt>...</dt> +A term in a list of definitions. This tag can be used only +in the context of <dl>...</dl>. +
<dd>...</dd> +A description in a list of definitions. This tag can be +used only in the context of <dl>...</dl>. +
<pre>...</pre> +For larger chunks of code. Whitespaces in the contents are +preserved. For small bits of code use the inline-style code. +
<div>...</div> and <span>...</span> +Block grouping elements. These are used to structure the +document, and are often used to provide hints about the +intended presentation of the document. +
+

Anchors and links are done with a single tag: +

+
Anchor tags Notes +
<a>...</a> +An anchor or link. +
    +
  • A link is created by using an href +attribute, for example +
    <a href="target.qml">Link Text</a>. Links to +targets within a document are achieved in the same way +as for HTML, e.g. +
    <a href="target.qml#subtitle">Link Text</a>. +
  • A target is created by using a name +attribute, for example +
    <a name="subtitle"><h2>Sub Title</h2></a>. +
+
+

The default character style bindings are +

+
Style tags Notes +
<em>...</em> +Emphasized. By default this is the same as <i>...</i> +(italic). +
<strong>...</strong> +Strong. By default this is the same as <b>...</b> +(bold). +
<i>...</i> +Italic font style. +
<b>...</b> +Bold font style. +
<u>...</u> +Underlined font style. +
<s>...</s> +Strike out font style. +
<big>...</big> +A larger font size. +
<small>...</small> +A smaller font size. +
<sub>...</sub> +Subscripted text +
<sup>...</sup> +Superscripted text +
<code>...</code> +Indicates code. By default this is the same as +<tt>...</tt> (typewriter). For larger chunks of code +use the block-tag <pre>. +
<tt>...</tt> +Typewriter font style. +
<font>...</font> +Customizes the font size, family and text color. The tag +understands the following attributes: +
    +
  • color -- The text color, for example color="red" or +color="#FF0000". +
  • size -- The logical size of the font. Logical sizes 1 +to 7 are supported. The value may either be absolute +(for example, size=3) or relative (size=-2). In +the latter case the sizes are simply added. +
  • face -- The family of the font, for example face=times. +
+
+

Special elements are: +

+
Special tags Notes +
<img> +An image. The image name for the mime source factory is +given in the source attribute, for example +<img src="qt.xpm"> The image tag also understands the +attributes width and height that determine the size +of the image. If the pixmap does not fit the specified +size it will be scaled automatically (by using +TQImage::smoothScale()). +
+The align attribute determines where the image is +placed. By default, an image is placed inline just like a +normal character. Specify left or right to place the +image at the respective side. +
<hr> +A horizontal line. +
<br> +A line break. +
<nobr>...</nobr> +No break. Prevents word wrap. +
+

In addition, rich text supports simple HTML tables. A table +consists of one or more rows each of which contains one or more +cells. Cells are either data cells or header cells, depending on +their content. Cells which span rows and columns are supported. +

+
Table tags Notes +
<table>...</table> +A table. Tables support the following attributes: +
    +
  • bgcolor -- The background color. +
  • width -- The table width. This is either an absolute +pixel width or a relative percentage of the table's +width, for example width=80%. +
  • border -- The width of the table border. The default is +0 (= no border). +
  • cellspacing -- Additional space around the table cells. +The default is 2. +
  • cellpadding -- Additional space around the contents of +table cells. The default is 1. +
+
<tr>...</tr> +A table row. This is only valid within a table. Rows +support the following attribute: +
    +
  • bgcolor -- The background color. +
+
<th>...</th> +A table header cell. Similar to td, but defaults to +center alignment and a bold font. +
<td>...</td> +A table data cell. This is only valid within a tr. +Cells support the following attributes: +
    +
  • bgcolor -- The background color. +
  • width -- The cell width. This is either an absolute +pixel width or a relative percentage of table's width, +for example width=50%. +
  • colspan -- Specifies how many columns this cell spans. +The default is 1. +
  • rowspan -- Specifies how many rows this cell spans. The +default is 1. +
  • align -- Alignment; possible values are left, right, and center. The default is left. +
  • valign -- Vertical alignment; possible values are top, middle, and bottom. The default is middle. +
+
+

See also Graphics Classes, Help System, and Text Related Classes. + +


Member Function Documentation

+

TQStyleSheet::TQStyleSheet ( TQObject * parent = 0, const char * name = 0 ) +

+Creates a style sheet called name, with parent parent. Like +any TQObject it will be deleted when its parent is destroyed (if +the child still exists). +

By default the style sheet has the tag definitions defined above. + +

TQStyleSheet::~TQStyleSheet () [virtual] +

+Destroys the style sheet. All styles inserted into the style sheet +will be deleted. + +

TQString TQStyleSheet::convertFromPlainText ( const TQString & plain, TQStyleSheetItem::WhiteSpaceMode mode = TQStyleSheetItem::WhiteSpacePre ) [static] +

Auxiliary function. Converts the plain text string plain to a +rich text formatted paragraph while preserving most of its look. +

mode defines the whitespace mode. Possible values are TQStyleSheetItem::WhiteSpacePre (no wrapping, all whitespaces +preserved) and TQStyleSheetItem::WhiteSpaceNormal (wrapping, +simplified whitespaces). +

See also escape(). + +

Examples: action/application.cpp, application/application.cpp, and mdi/application.cpp. +

TQStyleSheet * TQStyleSheet::defaultSheet () [static] +

+Returns the application-wide default style sheet. This style sheet +is used by rich text rendering classes such as TQSimpleRichText, +TQWhatsThis and TQMessageBox to define the rendering style and +available tags within rich text documents. It also serves as the +initial style sheet for the more complex render widgets, TQTextEdit +and TQTextBrowser. +

See also setDefaultSheet(). + +

void TQStyleSheet::error ( const TQString & msg ) const [virtual] +

+ +

This virtual function is called when an error occurs when +processing rich text. Reimplement it if you need to catch error +messages. +

Errors might occur if some rich text strings contain tags that are +not understood by the stylesheet, if some tags are nested +incorrectly, or if tags are not closed properly. +

msg is the error message. + +

TQString TQStyleSheet::escape ( const TQString & plain ) [static] +

+Auxiliary function. Converts the plain text string plain to a +rich text formatted string with any HTML meta-characters escaped. +

See also convertFromPlainText(). + +

TQStyleSheetItem * TQStyleSheet::item ( const TQString & name ) +

+Returns the style called name or 0 if there is no such style. + +

const TQStyleSheetItem * TQStyleSheet::item ( const TQString & name ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the style called name or 0 if there is no such style +(const version) + +

bool TQStyleSheet::mightBeRichText ( const TQString & text ) [static] +

+Returns TRUE if the string text is likely to be rich text; +otherwise returns FALSE. +

This function uses a fast and therefore simple heuristic. It +mainly checks whether there is something that looks like a tag +before the first line break. Although the result may be correct +for common cases, there is no guarantee. + +

void TQStyleSheet::scaleFont ( TQFont & font, int logicalSize ) const [virtual] +

+Scales the font font to the appropriate physical point size +corresponding to the logical font size logicalSize. +

When calling this function, font has a point size corresponding +to the logical font size 3. +

Logical font sizes range from 1 to 7, with 1 being the smallest. +

See also TQStyleSheetItem::logicalFontSize(), TQStyleSheetItem::logicalFontSizeStep(), and TQFont::setPointSize(). + +

void TQStyleSheet::setDefaultSheet ( TQStyleSheet * sheet ) [static] +

+Sets the application-wide default style sheet to sheet, +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] +

+

This function is under development and is subject to change. +

Generates an internal object for the tag called name, given the +attributes attr, and using additional information provided by +the mime source factory factory. +

context is the optional context of the document, i.e. the path +to look for relative links. This becomes important if the text +contains relative references, for example within image tags. +TQSimpleRichText always uses the default mime source factory (see +TQMimeSourceFactory::defaultFactory()) to resolve these +references. The context will then be used to calculate the +absolute path. See TQMimeSourceFactory::makeAbsolute() for details. +

emptyTag and doc are for internal use only. +

This function should not be used in application code. + + +


+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/qstylesheetitem-members.html b/doc/html/qstylesheetitem-members.html new file mode 100644 index 00000000..8ebc8fcc --- /dev/null +++ b/doc/html/qstylesheetitem-members.html @@ -0,0 +1,94 @@ + + + + + +TQStyleSheetItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQStyleSheetItem

+ +

This is the complete list of member functions for +TQStyleSheetItem, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qstylesheetitem.html b/doc/html/qstylesheetitem.html new file mode 100644 index 00000000..b6150acf --- /dev/null +++ b/doc/html/qstylesheetitem.html @@ -0,0 +1,491 @@ + + + + + +TQStyleSheetItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQStyleSheetItem Class Reference

+ +

The TQStyleSheetItem class provides an encapsulation of a set of text styles. +More... +

#include <qstylesheet.h> +

Inherits TQt. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQStyleSheetItem class provides an encapsulation of a set of text styles. +

+

A style sheet item consists of a name and a set of attributes that +specifiy its font, color, etc. When used in a style sheet (see styleSheet()), items define the name() of +a rich text tag and the display property changes associated with +it. +

The display mode +attribute indicates whether the item is a block, an inline element +or a list element; see setDisplayMode(). The treatment of +whitespace is controlled by the white space mode; see +setWhiteSpaceMode(). An item's margins are set with setMargin(), +In the case of list items, the list style is set with +setListStyle(). An item may be a hypertext link anchor; see +setAnchor(). Other attributes are set with setAlignment(), +setVerticalAlignment(), setFontFamily(), setFontSize(), +setFontWeight(), setFontItalic(), setFontUnderline(), +setFontStrikeOut and setColor(). +

See also Text Related Classes. + +


Member Type Documentation

+

TQStyleSheetItem::DisplayMode

+ +

This enum type defines the way adjacent elements are displayed. +

    +
  • TQStyleSheetItem::DisplayBlock - elements are displayed as a rectangular block +(e.g. <p>...</p>). +
  • TQStyleSheetItem::DisplayInline - elements are displayed in a horizontally +flowing sequence (e.g. <em>...</em>). +
  • TQStyleSheetItem::DisplayListItem - elements are displayed in a vertical +sequence (e.g. <li>...</li>). +
  • TQStyleSheetItem::DisplayNone - elements are not displayed at all. +
+

TQStyleSheetItem::ListStyle

+ +

This enum type defines how the items in a list are prefixed when +displayed. +

    +
  • TQStyleSheetItem::ListDisc - a filled circle (i.e. a bullet) +
  • TQStyleSheetItem::ListCircle - an unfilled circle +
  • TQStyleSheetItem::ListSquare - a filled square +
  • TQStyleSheetItem::ListDecimal - an integer in base 10: 1, 2, 3, ... +
  • TQStyleSheetItem::ListLowerAlpha - a lowercase letter: a, b, c, ... +
  • TQStyleSheetItem::ListUpperAlpha - an uppercase letter: A, B, C, ... +
+

TQStyleSheetItem::Margin

+ +
    +
  • TQStyleSheetItem::MarginLeft - left margin +
  • TQStyleSheetItem::MarginRight - right margin +
  • TQStyleSheetItem::MarginTop - top margin +
  • TQStyleSheetItem::MarginBottom - bottom margin +
  • TQStyleSheetItem::MarginAll - all margins (left, right, top and bottom) +
  • TQStyleSheetItem::MarginVertical - top and bottom margins +
  • TQStyleSheetItem::MarginHorizontal - left and right margins +
  • TQStyleSheetItem::MarginFirstLine - margin (indentation) of the first line of +a paragarph (in addition to the MarginLeft of the paragraph) +
+

TQStyleSheetItem::VerticalAlignment

+ +

This enum type defines the way elements are aligned vertically. +This is only supported for text elements. +

    +
  • TQStyleSheetItem::VAlignBaseline - align the baseline of the element (or the +bottom, if the element doesn't have a baseline) with the +baseline of the parent +
  • TQStyleSheetItem::VAlignSub - subscript the element +
  • TQStyleSheetItem::VAlignSuper - superscript the element +

+

TQStyleSheetItem::WhiteSpaceMode

+ +

This enum defines the ways in which TQStyleSheet can treat +whitespace. +

    +
  • TQStyleSheetItem::WhiteSpaceNormal - any sequence of whitespace (including +line-breaks) is equivalent to a single space. +
  • TQStyleSheetItem::WhiteSpacePre - whitespace must be output exactly as given +in the input. +
  • TQStyleSheetItem::WhiteSpaceNoWrap - multiple spaces are collapsed as with +WhiteSpaceNormal, but no automatic line-breaks occur. To break +lines manually, use the <br> tag. +

+


Member Function Documentation

+

TQStyleSheetItem::TQStyleSheetItem ( TQStyleSheet * parent, const TQString & name ) +

+Constructs a new style called name for the stylesheet parent. +

All properties in TQStyleSheetItem are initially in the "do not +change" state, except display + mode, which defaults to DisplayInline. + +

TQStyleSheetItem::TQStyleSheetItem ( const TQStyleSheetItem & other ) +

+Copy constructor. Constructs a copy of other that is not bound +to any style sheet. + +

TQStyleSheetItem::~TQStyleSheetItem () +

+Destroys the style. Note that TQStyleSheetItem objects become +owned by TQStyleSheet when they are created. + +

int TQStyleSheetItem::alignment () const +

+Returns the alignment of this style. Possible values are AlignAuto, AlignLeft, AlignRight, AlignCenter or AlignJustify. +

See also setAlignment() and TQt::AlignmentFlags. + +

bool TQStyleSheetItem::allowedInContext ( const TQStyleSheetItem * s ) const +

+Returns TRUE if this style can be nested into an element of style +s; otherwise returns FALSE. +

See also contexts() and setContexts(). + +

TQColor TQStyleSheetItem::color () const +

+Returns the text color of this style or an invalid color if no +color has been set. +

See also setColor() and TQColor::isValid(). + +

TQString TQStyleSheetItem::contexts () const +

+Returns a space-separated list of names of styles that may contain +elements of this style. If nothing has been set, contexts() +returns an empty string, which indicates that this style can be +nested everywhere. +

See also setContexts(). + +

bool TQStyleSheetItem::definesFontItalic () const +

+Returns TRUE if the style defines a font shape; otherwise returns +FALSE. A style does not define any shape until setFontItalic() is +called. +

See also setFontItalic() and fontItalic(). + +

bool TQStyleSheetItem::definesFontStrikeOut () const +

+Returns TRUE if the style defines a setting for the strikeOut +property of the font; otherwise returns FALSE. A style does not +define this until setFontStrikeOut() is called. +

See also setFontStrikeOut() and fontStrikeOut(). + +

bool TQStyleSheetItem::definesFontUnderline () const +

+Returns TRUE if the style defines a setting for the underline +property of the font; otherwise returns FALSE. A style does not +define this until setFontUnderline() is called. +

See also setFontUnderline() and fontUnderline(). + +

DisplayMode TQStyleSheetItem::displayMode () const +

+Returns the display + mode of the style. +

See also setDisplayMode(). + +

TQString TQStyleSheetItem::fontFamily () const +

+Returns the font family setting of the style. This is either a +valid font family or TQString::null if no family has been set. +

See also setFontFamily(), TQFont::family(), and TQFont::setFamily(). + +

bool TQStyleSheetItem::fontItalic () const +

+Returns TRUE if the style sets an italic font; otherwise returns +FALSE. +

See also setFontItalic() and definesFontItalic(). + +

int TQStyleSheetItem::fontSize () const +

+Returns the font size setting of the style. This is either a valid +point size or TQStyleSheetItem::Undefined. +

See also setFontSize(), TQFont::pointSize(), and TQFont::setPointSize(). + +

bool TQStyleSheetItem::fontStrikeOut () const +

+Returns TRUE if the style sets a strike out font; otherwise +returns FALSE. +

See also setFontStrikeOut() and definesFontStrikeOut(). + +

bool TQStyleSheetItem::fontUnderline () const +

+Returns TRUE if the style sets an underlined font; otherwise +returns FALSE. +

See also setFontUnderline() and definesFontUnderline(). + +

int TQStyleSheetItem::fontWeight () const +

+Returns the font weight setting of the style. This is either a +valid TQFont::Weight or the value TQStyleSheetItem::Undefined. +

See also setFontWeight() and TQFont. + +

bool TQStyleSheetItem::isAnchor () const +

+Returns whether this style is an anchor. +

See also setAnchor(). + +

int TQStyleSheetItem::lineSpacing () const +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns the linespacing + +

ListStyle TQStyleSheetItem::listStyle () const +

+Returns the list style of the style. +

See also setListStyle() and ListStyle. + +

int TQStyleSheetItem::logicalFontSize () const +

+Returns the logical font size setting of the style. This is either +a valid size between 1 and 7 or TQStyleSheetItem::Undefined. +

See also setLogicalFontSize(), setLogicalFontSizeStep(), TQFont::pointSize(), and TQFont::setPointSize(). + +

int TQStyleSheetItem::logicalFontSizeStep () const +

+Returns the logical font size step of this style. +

The default is 0. Tags such as big define +1; small +defines -1. +

See also setLogicalFontSizeStep(). + +

int TQStyleSheetItem::margin ( Margin m ) const +

+Returns the width of margin m in pixels. +

The margin, m, can be MarginLeft, MarginRight, MarginTop, MarginBottom, or MarginFirstLine. +

See also setMargin() and Margin. + +

TQString TQStyleSheetItem::name () const +

+Returns the name of the style item. + +

int TQStyleSheetItem::numberOfColumns () const +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns the number of columns for this style. +

See also setNumberOfColumns(), displayMode(), and setDisplayMode(). + +

+

TQStyleSheetItem & TQStyleSheetItem::operator= ( const TQStyleSheetItem & other ) +

+Assignment. Assings a copy of other that is not bound to any style sheet. +Unbounds first from previous style sheet. + +

bool TQStyleSheetItem::selfNesting () const +

+Returns TRUE if this style has self-nesting enabled; otherwise +returns FALSE. +

See also setSelfNesting(). + +

void TQStyleSheetItem::setAlignment ( int f ) +

+Sets the alignment to f. This only makes sense for styles with +a display mode of +DisplayBlock. Possible values are AlignAuto, AlignLeft, +AlignRight, AlignCenter or AlignJustify. +

See also alignment(), displayMode(), and TQt::AlignmentFlags. + +

void TQStyleSheetItem::setAnchor ( bool anc ) +

+If anc is TRUE, sets this style to be an anchor (hypertext +link); otherwise sets it to not be an anchor. Elements in this +style link to other documents or anchors. +

See also isAnchor(). + +

void TQStyleSheetItem::setColor ( const TQColor & c ) +

+Sets the text color of this style to c. +

See also color(). + +

void TQStyleSheetItem::setContexts ( const TQString & c ) +

+Sets a space-separated list of names of styles that may contain +elements of this style. If c is empty, the style can be nested +everywhere. +

See also contexts(). + +

void TQStyleSheetItem::setDisplayMode ( DisplayMode m ) +

+Sets the display mode of the style to m. +

See also displayMode(). + +

void TQStyleSheetItem::setFontFamily ( const TQString & fam ) +

+Sets the font family setting of the style to fam. +

See also fontFamily(), TQFont::family(), and TQFont::setFamily(). + +

void TQStyleSheetItem::setFontItalic ( bool italic ) +

+If italic is TRUE sets italic for the style; otherwise sets +upright. +

See also fontItalic() and definesFontItalic(). + +

void TQStyleSheetItem::setFontSize ( int s ) +

+Sets the font size setting of the style to s points. +

See also fontSize(), TQFont::pointSize(), and TQFont::setPointSize(). + +

void TQStyleSheetItem::setFontStrikeOut ( bool strikeOut ) +

+If strikeOut is TRUE, sets strike out for the style; otherwise +sets no strike out. +

See also fontStrikeOut() and definesFontStrikeOut(). + +

void TQStyleSheetItem::setFontUnderline ( bool underline ) +

+If underline is TRUE, sets underline for the style; otherwise +sets no underline. +

See also fontUnderline() and definesFontUnderline(). + +

void TQStyleSheetItem::setFontWeight ( int w ) +

+Sets the font weight setting of the style to w. Valid values +are those defined by TQFont::Weight. +

See also TQFont and fontWeight(). + +

void TQStyleSheetItem::setListStyle ( ListStyle s ) +

+Sets the list style of the style to s. +

This is used by nested elements that have a display mode of DisplayListItem. +

See also listStyle(), DisplayMode, and ListStyle. + +

void TQStyleSheetItem::setLogicalFontSize ( int s ) +

+Sets the logical font size setting of the style to s. Valid +logical sizes are 1 to 7. +

See also logicalFontSize(), TQFont::pointSize(), and TQFont::setPointSize(). + +

void TQStyleSheetItem::setLogicalFontSizeStep ( int s ) +

+Sets the logical font size step of this style to s. +

See also logicalFontSizeStep(). + +

void TQStyleSheetItem::setMargin ( Margin m, int v ) +

+Sets the width of margin m to v pixels. +

The margin, m, can be MarginLeft, MarginRight, MarginTop, MarginBottom, MarginFirstLine, MarginAll, +MarginVertical or MarginHorizontal. The value v must +be >= 0. +

See also margin(). + +

void TQStyleSheetItem::setNumberOfColumns ( int ncols ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Sets the number of columns for this style. Elements in the style +are divided into columns. +

This makes sense only if the style uses a block display mode +(see TQStyleSheetItem::DisplayMode). +

See also numberOfColumns(). + +

void TQStyleSheetItem::setSelfNesting ( bool nesting ) +

+Sets the self-nesting property for this style to nesting. +

In order to support "dirty" HTML, paragraphs <p> and list +items <li> are not self-nesting. This means that starting a +new paragraph or list item automatically closes the previous one. +

See also selfNesting(). + +

void TQStyleSheetItem::setVerticalAlignment ( VerticalAlignment valign ) +

+Sets the vertical alignment to valign. Possible values are +VAlignBaseline, VAlignSub or VAlignSuper. +

The vertical alignment property is not inherited. +

See also verticalAlignment(). + +

void TQStyleSheetItem::setWhiteSpaceMode ( WhiteSpaceMode m ) +

+Sets the whitespace mode to m. +

See also WhiteSpaceMode. + +

TQStyleSheet * TQStyleSheetItem::styleSheet () +

+Returns the style sheet this item is in. + +

const TQStyleSheet * TQStyleSheetItem::styleSheet () const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the style sheet this item is in. + +

VerticalAlignment TQStyleSheetItem::verticalAlignment () const +

+Returns the vertical alignment of the style. Possible values are +VAlignBaseline, VAlignSub or VAlignSuper. +

See also setVerticalAlignment(). + +

WhiteSpaceMode TQStyleSheetItem::whiteSpaceMode () const +

+Returns the whitespace mode. +

See also setWhiteSpaceMode() and WhiteSpaceMode. + + +


+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/qsyntaxhighlighter-h.html b/doc/html/qsyntaxhighlighter-h.html new file mode 100644 index 00000000..b2a27e91 --- /dev/null +++ b/doc/html/qsyntaxhighlighter-h.html @@ -0,0 +1,126 @@ + + + + + +qsyntaxhighlighter.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qsyntaxhighlighter.h

+ +

This is the verbatim text of the qsyntaxhighlighter.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qsyntaxhighlighter.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of the TQSyntaxHighlighter class
+**
+** Created : 022407
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements will be met:
+** http://trolltech.com/products/qt/licenses/licensing/opensource/.
+** If you are unsure which license is appropriate for your use, please
+** review the following information:
+** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
+** or contact the sales department at sales@trolltech.com.
+**
+** This file may be used under the terms of the Q Public License as
+** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
+** included in the packaging of this file.  Licensees holding valid TQt
+** Commercial licenses may use this file in accordance with the TQt
+** Commercial License Agreement provided with the Software.
+**
+** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
+** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
+** herein.
+**
+**********************************************************************/
+
+#ifndef TQSYNTAXHIGHLIGHTER_H
+#define TQSYNTAXHIGHLIGHTER_H
+
+#ifndef QT_H
+#include "qfont.h"
+#include "qcolor.h"
+#include "qstring.h"
+#endif // QT_H
+
+class TQTextEdit;
+class TQSyntaxHighlighterInternal;
+class TQSyntaxHighlighterPrivate;
+class TQTextParagraph;
+
+class Q_EXPORT TQSyntaxHighlighter : public TQt
+{
+    friend class TQSyntaxHighlighterInternal;
+
+public:
+    TQSyntaxHighlighter( TQTextEdit *textEdit );
+    virtual ~TQSyntaxHighlighter();
+
+    virtual int highlightParagraph( const TQString &text, int endStateOfLastPara ) = 0;
+
+    void setFormat( int start, int count, const TQFont &font, const TQColor &color );
+    void setFormat( int start, int count, const TQColor &color );
+    void setFormat( int start, int count, const TQFont &font );
+    TQTextEdit *textEdit() const { return edit; }
+
+    void rehighlight();
+
+    int currentParagraph() const;
+
+private:
+    TQTextParagraph *para;
+    TQTextEdit *edit;
+    TQSyntaxHighlighterPrivate *d;
+
+};
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsyntaxhighlighter-members.html b/doc/html/qsyntaxhighlighter-members.html new file mode 100644 index 00000000..c9c54563 --- /dev/null +++ b/doc/html/qsyntaxhighlighter-members.html @@ -0,0 +1,53 @@ + + + + + +TQSyntaxHighlighter Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQSyntaxHighlighter

+ +

This is the complete list of member functions for +TQSyntaxHighlighter, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qsyntaxhighlighter.html b/doc/html/qsyntaxhighlighter.html new file mode 100644 index 00000000..6d4add4c --- /dev/null +++ b/doc/html/qsyntaxhighlighter.html @@ -0,0 +1,158 @@ + + + + + +TQSyntaxHighlighter Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQSyntaxHighlighter Class Reference

+ +

The TQSyntaxHighlighter class is a base class for +implementing TQTextEdit syntax highlighters. +More... +

#include <qsyntaxhighlighter.h> +

Inherits TQt. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQSyntaxHighlighter class is a base class for +implementing TQTextEdit syntax highlighters. +

+ +

A syntax highligher automatically highlights parts of the text in +a TQTextEdit. Syntax highlighters are often used when the user is +entering text in a specific format (for example, source code) and +help the user to read the text and identify syntax errors. +

To provide your own syntax highlighting for TQTextEdit, you must +subclass TQSyntaxHighlighter and reimplement highlightParagraph(). +

When you create an instance of your TQSyntaxHighlighter subclass, +pass it the TQTextEdit that you want the syntax highlighting to be +applied to. After this your highlightParagraph() function will be +called automatically whenever necessary. Use your +highlightParagraph() function to apply formatting (e.g. setting +the font and color) to the text that is passed to it. +

See also Basic Widgets and Text Related Classes. + +


Member Function Documentation

+

TQSyntaxHighlighter::TQSyntaxHighlighter ( TQTextEdit * textEdit ) +

+Constructs the TQSyntaxHighlighter and installs it on textEdit. +

It is the caller's responsibility to delete the +TQSyntaxHighlighter when it is no longer needed. + +

TQSyntaxHighlighter::~TQSyntaxHighlighter () [virtual] +

+Destructor. Uninstalls this syntax highlighter from the textEdit() + +

int TQSyntaxHighlighter::currentParagraph () const +

+Returns the id of the paragraph which is highlighted, or -1 of no +paragraph is currently highlighted. +

Usually this function is called from within highlightParagraph(). + +

int TQSyntaxHighlighter::highlightParagraph ( const TQString & text, int endStateOfLastPara ) [pure virtual] +

+ +

This function is called when necessary by the rich text engine, +i.e. on paragraphs which have changed. +

In your reimplementation you should parse the paragraph's text +and call setFormat() as often as necessary to apply any font and +color changes that you retquire. Your function must return a value +which indicates the paragraph's end state: see below. +

Some syntaxes can have constructs that span paragraphs. For +example, a C++ syntax highlighter should be able to cope with +/*...*/ comments that span paragraphs. To deal +with these cases it is necessary to know the end state of the +previous paragraph (e.g. "in comment"). +

If your syntax does not have paragraph spanning constructs, simply +ignore the endStateOfLastPara parameter and always return 0. +

Whenever highlightParagraph() is called it is passed a value for +endStateOfLastPara. For the very first paragraph this value is +always -2. For any other paragraph the value is the value returned +by the most recent highlightParagraph() call that applied to the +preceding paragraph. +

The value you return is up to you. We recommend only returning 0 +(to signify that this paragraph's syntax highlighting does not +affect the following paragraph), or a positive integer (to signify +that this paragraph has ended in the middle of a paragraph +spanning construct). +

To find out which paragraph is highlighted, call +currentParagraph(). +

For example, if you're writing a simple C++ syntax highlighter, +you might designate 1 to signify "in comment". For a paragraph +that ended in the middle of a comment you'd return 1, and for +other paragraphs you'd return 0. In your parsing code if endStateOfLastPara was 1, you would highlight the text as a C++ +comment until you reached the closing */. + +

void TQSyntaxHighlighter::rehighlight () +

Redoes the highlighting of the whole document. + +

void TQSyntaxHighlighter::setFormat ( int start, int count, const TQFont & font, const TQColor & color ) +

+This function is applied to the syntax highlighter's current +paragraph (the text of which is passed to the highlightParagraph() +function). +

The specified font and color are applied to the text from +position start for count characters. (If count is 0, +nothing is done.) + +

void TQSyntaxHighlighter::setFormat ( int start, int count, const TQColor & color ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. + +

void TQSyntaxHighlighter::setFormat ( int start, int count, const TQFont & font ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. + +

TQTextEdit * TQSyntaxHighlighter::textEdit () const +

+ +

Returns the TQTextEdit on which this syntax highlighter is +installed + + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qt-colors.png b/doc/html/qt-colors.png new file mode 100644 index 00000000..73ff0815 Binary files /dev/null and b/doc/html/qt-colors.png differ diff --git a/doc/html/qt-members.html b/doc/html/qt-members.html new file mode 100644 index 00000000..803ce482 --- /dev/null +++ b/doc/html/qt-members.html @@ -0,0 +1,46 @@ + + + + + +TQt Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQt

+ +

This is the complete list of member functions for +TQt, including inherited members. + +

    +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qt-template-lib.html b/doc/html/qt-template-lib.html new file mode 100644 index 00000000..e4f75444 --- /dev/null +++ b/doc/html/qt-template-lib.html @@ -0,0 +1,320 @@ + + + + + +TQt Template Library + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Template Library

+ + +

+

The TQt Template Library (TQTL) is a set of templates that provide +object containers. If a suitable STL implementation is not available +on all your target platforms, the TQTL can be used instead. It provides +a list of objects, a vector (dynamic array) of objects, a map relating +one type to another (also called a dictionary or associative array), +and associated iterators and algorithms. A container is an object which +contains and manages other objects and provides iterators that allow +the contained objects to be accessed. +

The TQTL classes' naming conventions are consistent with the other TQt +classes (e.g., count(), isEmpty()). They also provide extra functions +for compatibility with STL algorithms, such as size() and empty(). +Programmers already familiar with the STL map can use the +STL-compatible functions if preferred. +

Compared to the STL, the TQTL only contains the most important features +of the STL container API. Compared with the STL, TQTL has no platform +differences, but is often a little slower and often expands to less +object code. +

If you cannot make copies of the objects you want to store you should +use TQPtrCollection and friends, all of which operate on pointers +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 +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. +

If you have objects that implement value semantics, and the STL is not +available on your target platform, the TQt Template Library can be used +instead. Value semantics retquire at least: +

    +
  • a copy constructor; +
  • an assignment operator; +
  • a defaultconstructor, i.e. a constructor that does not take any arguments. +
+

Note that a fast copy constructor is absolutely crucial to achieve +good overall performance of the container, since many copy operations +will occur. +

If you intend sorting your data you must implement operator<() for +your data's class. +

Good candidates for value based classes are TQRect, TQPoint, TQSize, +TQString and all simple C++ types, such as int, bool or double. +

The TQt Template Library is designed for speed. Iterators are extremely +fast. To achieve this performance, less error checking is done than in +the TQPtrCollection based containers. A TQTL container, for example, +does not track any associated iterators. This makes certain validity +checks, for example when removing items, impossible to perform +automatically, but does lead to extremely good performance. +

+

Iterators +

+

The TQt Template Library deals with value objects, not with pointers. +For that reason, there is no other way of iterating over containers +other than with iterators. This is no disadvantage as the size of an +iterator matches the size of a normal pointer. +

To iterate over a container, use a loop like this: +

+    typedef TQValueList<int> List;
+    List list;
+    for( List::Iterator it = list.begin(); it != list.end(); ++it )
+        printf( "Number is %i\n", *it );
+
+ +

begin() returns the iterator pointing at the first element, while +end() returns an iterator that points after the last element. end() +marks an invalid position, so it can never be dereferenced. It's the +break condition in any iteration, whether the start point is from +begin() or fromLast(). For maximum speed, use increment or decrement +iterators with the prefix operator (++it, --it) instead of the postfix +operator (it++, it--), since the former is slightly faster. +

The same concept applies to the other container classes: +

+    typedef TQMap<TQString,TQString> 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 TQValueVector<int> Vector;
+    Vector vec;
+    for( Vector::iterator it = vec.begin(); it != vec.end(); ++it )
+        printf( "Data=%d\n", *it );
+
+ +

There are two kind of iterators, the volatile iterator shown in the +examples above and a version that returns a const reference to its +current object, the ConstIterator. Const iterators are retquired +whenever the container itself is const, such as a member variable +inside a const function. Assigning a ConstIterator to a normal +Iterator is not allowed as it would violate const semantics. +

+

Algorithms +

+

The TQt Template Library defines a number of algorithms that operate on +its containers. These algorithms are implemented as template functions +and provide useful generic code which can be applied to any container +that provides iterators (including your own containers). +

qHeapSort() +

+

qHeapSort() provides a well known sorting algorithm. You can use it +like this: +

+    typedef TQValueList<int> List;
+    List list;
+    list << 42 << 100 << 1234 << 12 << 8;
+    qHeapSort( list );
+
+    List list2;
+    list2 << 42 << 100 << 1234 << 12 << 8;
+    List::Iterator b = list2.find( 100 );
+    List::Iterator e = list2.find( 8 );
+    qHeapSort( b, e );
+
+    double arr[] = { 3.2, 5.6, 8.9 };
+    qHeapSort( arr, arr + 3 );
+
+ +

The first example sorts the entire list. The second example sorts only +those elements that fall between the two iterators, i.e. 100, 1234 and +12. The third example shows that iterators act like pointers and can +be treated as such. +

If using your own data types you must implement operator<() for +your data's class. +

Naturally, the sorting templates won't work with const iterators. +

+

qSwap() +

+

qSwap() exchanges the values of two variables: +

+    TQString second( "Einstein" );
+    TQString name( "Albert" );
+    qSwap( second, name );
+
+ +

+

qCount() +

+

The qCount() 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 );               
+    int c = 0;
+    qCount( list.begin(), list.end(), 1, c ); // c == 3
+
+ +

+

qFind() +

+

The qFind() 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 = qFind( list.begin(), list.end(), 2 );
+
+ +

+

qFill() +

+

The qFill() template function fills a range with copies of a value. +For example: +

+    TQValueVector<int> vec(3);
+    qFill( vec.begin(), vec.end(), 99 ); // vec contains 99, 99, 99
+
+ +

+

qEqual() +

+

The qEqual() template function compares two ranges for equality of +their elements. Note that the number of elements in each range is not +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);
+    v1[0] = 1;
+    v1[2] = 2;
+    v1[3] = 3;
+
+    TQValueVector<int> v2(5);
+    v2[0] = 1;
+    v2[2] = 2;
+    v2[3] = 3;
+    v2[4] = 4;
+    v2[5] = 5;
+
+    bool b = qEqual( v1.begin(), v2.end(), v2.begin() );
+    // b == TRUE
+
+ +

+

qCopy() +

+

The qCopy() 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 );
+    TQTextOStream str( stdout );
+    qCopy( list.begin(), list.end(), TQTextOStreamIterator(str) );
+
+ +

+

+

qCopyBackward() +

+

The qCopyBackward() 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;
+    qCopyBackward( 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)
+
+ +

TQTL Iterators +

+

You can use any TQt Template Library iterator as the OutputIterator. +Just make sure that the right hand of the iterator has as many +elements present as you want to insert. The following example +illustrates this: +

+    TQStringList list1, list2;
+    list1 << "Weis" << "Ettrich" << "Arnt" << "Sue";
+    list2 << "Torben" << "Matthias";
+    qCopy( list2.begin(), list2.end(), list1.begin() );
+
+    TQValueVector<TQString> vec( list1.size(), "Dave" );
+    qCopy( list2.begin(), list2.end(), vec.begin() );
+
+ +

At the end of this code fragment, the list list1 contains "Torben", +"Matthias", "Arnt" and "Sue", with the prior contents being +overwritten. The vector vec contains "Torben", "Matthias", "Dave" and +"Dave", also with the prior contents being overwritten. +

If you write new algorithms, consider writing them as template +functions in order to make them usable with as many containers +as possible. In the above example, you could just as easily print out +a standard C++ array with qCopy(): +

+    int arr[] = { 100, 200, 300 };
+    TQTextOStream str( stdout );
+    qCopy( arr, arr + 3, TQTextOStreamIterator( str ) ); 
+
+ +

Streaming +

+

All the containers we've mentioned can be serialized with the +appropriate streaming operators. Here is an example. +

+    TQDataStream str(...);
+    TQValueList<TQRect> list;
+    // ... fill the list here
+    str << list;
+
+ +

The container can be read in again with: +

+    TQValueList<TQRect> list;
+    str >> list;
+
+ +

The same applies to TQStringList, TQValueStack and TQMap. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qt.dcf b/doc/html/qt.dcf new file mode 100644 index 00000000..0ea63b12 --- /dev/null +++ b/doc/html/qt.dcf @@ -0,0 +1,10857 @@ + + +
+ QAccel + activated + activatedAmbiguously + clear + connectItem + count + disconnectItem + findKey + insertItem + isEnabled + isItemEnabled + key + removeItem + setEnabled + setItemEnabled + setWhatsThis + shortcutKey + whatsThis + ~QAccel +
+
+
+
+ QAccessible + Event + NavDirection + Role + State + Text + isActive + queryAccessibleInterface + updateAccessibility +
+
+
+
+ QAccessibleInterface + childCount + clearSelection + controlAt + doDefaultAction + isValid + navigate + queryChild + queryParent + rect + role + selection + setFocus + setSelected + setText + state + text +
+
+
+
+ QAccessibleObject + object + ~QAccessibleObject +
+
+
+
+ QAction + accel + accel + activate + activated + addTo + addedTo + clearStatusText + enabled + iconSet + iconSet + isEnabled + isOn + isToggleAction + isVisible + menuStatusText + menuText + menuText + on + removeFrom + setAccel + setDisabled + setEnabled + setIconSet + setMenuText + setOn + setStatusTip + setText + setToggleAction + setToolTip + setVisible + setWhatsThis + showStatusText + statusTip + statusTip + text + text + toggle + toggleAction + toggled + toolTip + toolTip + visible + whatsThis + whatsThis + ~QAction +
+
+
+
+ QActionGroup + add + addSeparator + addTo + exclusive + isExclusive + selected + setExclusive + setUsesDropDown + usesDropDown + usesDropDown + ~QActionGroup +
+
+
+
+ QApplication + ColorSpec + Encoding + Type + aboutQt + aboutToQuit + activeModalWidget + activePopupWidget + activeWindow + addLibraryPath + allWidgets + applicationDirPath + applicationFilePath + argc + argv + beep + clipboard + closeAllWindows + closingDown + colorSpec + commitData + cursorFlashTime + desktop + desktopSettingsAware + doubleClickInterval + eventLoop + exec + exit + flush + flushX + focusWidget + font + fontMetrics + globalStrut + guiThreadAwake + hasGlobalMouseTracking + hasPendingEvents + horizontalAlignment + initialize + installTranslator + isEffectEnabled + isSessionRestored + lastWindowClosed + libraryPaths + lock + locked + macEventFilter + mainWidget + notify + overrideCursor + palette + polish + postEvent + processEvents + tquit + qwsDecoration + qwsEventFilter + qwsSetCustomColors + qwsSetDecoration + removeLibraryPath + removePostedEvent + removePostedEvents + removeTranslator + restoreOverrideCursor + reverseLayout + saveState + sendEvent + sendPostedEvents + sessionId + sessionKey + setColorSpec + setCursorFlashTime + setDesktopSettingsAware + setDoubleClickInterval + setEffectEnabled + setFont + setGlobalMouseTracking + setGlobalStrut + setLibraryPaths + setMainWidget + setOverrideCursor + setPalette + setReverseLayout + setStartDragDistance + setStartDragTime + setStyle + setWheelScrollLines + startDragDistance + startDragTime + startingUp + style + syncX + topLevelWidgets + translate + tryLock + type + unlock + wakeUpGuiThread + wheelScrollLines + widgetAt + winEventFilter + winFocus + x11EventFilter + x11ProcessEvent + ~QApplication + Q_ASSERT + Q_CHECK_PTR + qAddPostRoutine + qDebug + qFatal + qInstallMsgHandler + qSysInfo + qSystemWarning + qVersion + qWarning +
+
+
+
+ QAsciiCache + clear + count + find + insert + isEmpty + maxCost + operator[] + remove + setMaxCost + size + statistics + take + totalCost + ~QAsciiCache +
+
+
+
+ QAsciiCacheIterator + atFirst + atLast + count + current + currentKey + isEmpty + operator type * + operator() + operator++ + operator+= + operator-- + operator-= + operator= + toFirst + toLast +
+
+
+
+ QAsciiDict + clear + count + find + insert + isEmpty + operator= + operator[] + read + remove + replace + resize + size + statistics + take + write + ~QAsciiDict +
+
+
+
+ QAsciiDictIterator + count + current + currentKey + isEmpty + operator type * + operator() + operator++ + operator+= + toFirst + ~QAsciiDictIterator +
+
+
+
+ QAssistantClient + assistantClosed + assistantOpened + closeAssistant + error + isOpen + open + openAssistant + setArguments + showPage + ~QAssistantClient +
+
+
+
+ connect + ready + ~QAsyncIO +
+
+
+
+ QAxAggregated + controllingUnknown + object + queryInterface + widget +
+
+
+
+ QAxBase + PropertyBag + asVariant + clear + control + control + disableClassInfo + disableEventSink + disableMetaObject + dynamicCall + exception + generateDocumentation + initialize + initializeActive + initializeLicensed + initializeRemote + isNull + propertyBag + propertyChanged + propertyWritable + queryInterface + querySubObject + setControl + setPropertyBag + setPropertyWritable + signal + ~QAxBase +
+
+
+
+ QAxBindable + clientSite + createAggregate + propertyChanged + reportError + requestPropertyChange + ~QAxBindable +
+
+
+
+ QAxFactory + ServerType + appID + classID + create + createObject + createObjectWrapper + eventsID + exposeToSuperClass + featureList + hasStockEvents + interfaceID + isServer + isService + metaObject + registerClass + serverDirPath + serverFilePath + startServer + stayTopLevel + stopServer + typeLibID + unregisterClass + validateLicenseKey + ~QAxFactory +
+
+
+
+ QAxObject + ~QAxObject +
+
+
+
+ QAxScript + FunctionFlags + call + entered + error + finished + functions + load + scriptCode + scriptEngine + scriptName + stateChanged + ~QAxScript +
+
+
+
+ QAxScriptEngine + State + addItem + hasIntrospection + isValid + queryInterface + scriptLanguage + setState + state + ~QAxScriptEngine +
+
+
+
+ QAxScriptManager + addObject + call + error + functions + load + registerEngine + script + scriptFileFilter + scriptNames + ~QAxScriptManager +
+
+
+
+ QAxWidget + createHostWindow + translateKeyEvent + ~QAxWidget +
+
+
+
+ QBig5Codec +
+
+
+
+ QBig5hkscsCodec +
+
+
+
+ QBitArray + at + clearBit + copy + detach + fill + operator&= + operator= + operator[] + operator^= + operator|= + operator~ + pad0 + resize + setBit + size + testBit + toggleBit + operator& + operator<< + operator>> + operator^ + operator| +
+
+
+
+ QBitmap + operator= + xForm +
+
+
+
+ QBitVal + operator int + operator= +
+
+
+
+ QBoxLayout + Direction + addItem + addLayout + addSpacing + addStretch + addStrut + addWidget + direction + expanding + findWidget + hasHeightForWidth + heightForWidth + insertItem + insertLayout + insertSpacing + insertStretch + insertWidget + invalidate + maximumSize + minimumSize + setDirection + setGeometry + setStretchFactor + sizeHint + ~QBoxLayout +
+
+
+
+ QBrush + color + copy + detach + operator!= + operator= + operator== + pixmap + setColor + setPixmap + setStyle + style + ~QBrush + operator<< + operator>> +
+
+
+
+ QBuffer + buffer + setBuffer + writeBlock + ~QBuffer +
+
+
+
+ QButton + ToggleState + ToggleType + accel + accel + animateClick + animateTimeout + autoRepeat + autoRepeat + autoRepeatTimeout + clicked + down + drawButton + drawButtonLabel + exclusiveToggle + group + hitButton + isDown + isExclusiveToggle + isOn + isToggleButton + on + paintEvent + pixmap + pixmap + pressed + released + setAccel + setAutoRepeat + setDown + setOn + setPixmap + setState + setText + setToggleButton + setToggleType + state + stateChanged + text + text + toggle + toggleButton + toggleState + toggleType + toggleType + toggled + ~QButton +
+
+
+
+ QButtonGroup + clicked + count + exclusive + find + id + init + insert + isExclusive + isRadioButtonExclusive + moveFocus + pressed + radioButtonExclusive + released + remove + selected + selectedId + selectedId + setButton + setExclusive + setRadioButtonExclusive +
+
+
+
+ QByteArray + qCompress + qUncompress +
+
+
+
+ QCache + clear + count + find + insert + isEmpty + maxCost + operator[] + remove + setMaxCost + size + statistics + take + totalCost + ~QCache +
+
+
+
+ QCacheIterator + atFirst + atLast + count + current + currentKey + isEmpty + operator type * + operator() + operator++ + operator+= + operator-- + operator-= + operator= + toFirst + toLast +
+
+
+
+ QCanvas + advance + allItems + backgroundColor + backgroundPixmap + chunkSize + collisions + drawArea + drawBackground + drawForeground + height + onCanvas + rect + resize + resized + retune + setAdvancePeriod + setAllChanged + setBackgroundColor + setBackgroundPixmap + setChanged + setDoubleBuffering + setTile + setTiles + setUnchanged + setUpdatePeriod + size + tile + tileHeight + tileWidth + tilesHorizontally + tilesVertically + update + validChunk + width + ~QCanvas +
+
+
+
+ QCanvasEllipse + angleLength + angleStart + drawShape + height + rtti + setAngles + setSize + width + ~QCanvasEllipse +
+
+
+
+ QCanvasItem + RttiValues + advance + animated + boundingRect + boundingRectAdvanced + canvas + collidesWith + collisions + draw + hide + isActive + isEnabled + isSelected + isVisible + move + moveBy + rtti + setActive + setAnimated + setCanvas + setEnabled + setSelected + setVelocity + setVisible + setX + setXVelocity + setY + setYVelocity + setZ + show + update + x + xVelocity + y + yVelocity + z + ~QCanvasItem +
+
+
+
+ QCanvasItemList + operator+ +
+
+
+
+ QCanvasLine + endPoint + rtti + setPoints + startPoint + ~QCanvasLine +
+
+
+
+ QCanvasPixmap + offsetX + offsetY + setOffset + ~QCanvasPixmap +
+
+
+
+ QCanvasPixmapArray + count + image + isValid + readCollisionMasks + readPixmaps + setImage + ~QCanvasPixmapArray +
+
+
+
+ QCanvasPolygon + areaPoints + drawShape + points + rtti + setPoints + ~QCanvasPolygon +
+
+
+
+ QCanvasPolygonalItem + areaPoints + areaPointsAdvanced + boundingRect + brush + draw + drawShape + invalidate + isValid + pen + rtti + setBrush + setPen + setWinding + winding + ~QCanvasPolygonalItem +
+
+
+
+ QCanvasRectangle + chunks + drawShape + height + rect + rtti + setSize + size + width + ~QCanvasRectangle +
+
+
+
+ QCanvasSpline + closed + controlPoints + rtti + setControlPoints + ~QCanvasSpline +
+
+
+
+ QCanvasSprite + FrameAnimationType + advance + bottomEdge + boundingRect + collidesWith + draw + frame + frameCount + height + image + imageAdvanced + leftEdge + move + rightEdge + rtti + setFrame + setFrameAnimation + setSequence + topEdge + width + ~QCanvasSprite +
+
+
+
+ QCanvasText + addToChunks + boundingRect + color + draw + font + removeFromChunks + rtti + setColor + setFont + setText + setTextFlags + text + textFlags + ~QCanvasText +
+
+
+
+ QCanvasView + canvas + drawContents + inverseWorldMatrix + setCanvas + setWorldMatrix + sizeHint + worldMatrix + ~QCanvasView +
+
+
+
+ QCDEStyle + ~QCDEStyle +
+
+
+
+ QChar + Category + CombiningClass + Decomposition + Direction + Joining + category + cell + combiningClass + decomposition + decompositionTag + digitValue + direction + isDigit + isLetter + isLetterOrNumber + isMark + isNull + isNumber + isPrint + isPunct + isSpace + isSymbol + joining + latin1 + lower + mirrored + mirroredChar + operator char + row + unicode + upper + operator!= + operator< + operator<= + operator== + operator> + operator>= +
+
+
+
+ QCharRef +
+
+
+
+ QCheckBox + autoMask + checked + isChecked + isTristate + setChecked + setNoChange + setTristate + tristate +
+
+
+
+ QCheckListItem + ToggleState + Type + activate + isOn + isTristate + paintCell + paintFocus + rtti + setOn + setState + setTristate + state + stateChange + text + turnOffChild + type + ~QCheckListItem +
+
+
+
+ QCheckTableItem + isChecked + rtti + setChecked +
+
+
+
+ QChildEvent + child + inserted + removed +
+
+
+
+ QClipboard + Mode + clear + data + dataChanged + image + ownsClipboard + ownsSelection + pixmap + selectionChanged + setData + setImage + setPixmap + setText + supportsSelection + text +
+
+
+
+ QCloseEvent + accept + ignore + isAccepted +
+
+
+
+ QColor + Spec + alloc + blue + cleanup + colorNames + currentAllocContext + dark + destroyAllocContext + enterAllocContext + getHsv + getRgb + green + initGlobalColors + initialize + isValid + leaveAllocContext + light + maxColors + name + numBitPlanes + operator!= + operator= + operator== + pixel + red + rgb + setHsv + setNamedColor + setRgb + operator<< + operator>> + qAlpha + qBlue + qGray + qGreen + qRed + qRgb + qRgba +
+
+
+
+ QColorDialog + color + customColor + customCount + getColor + getRgba + selectColor + selectedAlpha + setColor + setCustomColor + setSelectedAlpha + setStandardColor + ~QColorDialog +
+
+
+
+ QColorDrag + canDecode + decode + setColor +
+
+
+
+ QColorGroup + ColorRole + background + base + brightText + brush + button + buttonText + color + dark + foreground + highlight + highlightedText + light + link + linkVisited + mid + midlight + operator!= + operator= + operator== + setBrush + setColor + shadow + text + ~QColorGroup + operator<< +
+
+
+
+ QComboBox + Policy + activated + autoCompletion + autoCompletion + autoMask + changeItem + clear + clearEdit + clearValidator + completionIndex + count + count + currentItem + currentItem + currentText + currentText + duplicatesEnabled + duplicatesEnabled + editable + editable + highlighted + insertItem + insertStrList + insertStringList + insertionPolicy + insertionPolicy + lineEdit + listBox + maxCount + maxCount + pixmap + popup + removeItem + returnPressed + setAutoCompletion + setCurrentItem + setCurrentText + setDuplicatesEnabled + setEditText + setEditable + setFont + setInsertionPolicy + setLineEdit + setListBox + setMaxCount + setPalette + setSizeLimit + setValidator + sizeLimit + sizeLimit + text + textChanged + validator + ~QComboBox +
+
+
+
+ QComboTableItem + count + currentItem + currentText + isEditable + rtti + setCurrentItem + setEditable + setStringList + text + ~QComboTableItem +
+
+
+
+ QCommonStyle +
+
+
+
+ QConstString + string + ~QConstString +
+
+
+
+ QContextMenuEvent + Reason + accept + consume + globalPos + globalX + globalY + ignore + isAccepted + isConsumed + pos + reason + state + x + y +
+
+
+
+ QCopChannel + channel + isRegistered + receive + received + send + ~QCopChannel +
+
+
+
+ QCString + append + contains + copy + fill + find + findRev + insert + isEmpty + isNull + left + leftJustify + length + lower + mid + operator const char * + operator+= + operator= + prepend + remove + replace + resize + right + rightJustify + setExpand + setNum + setStr + simplifyWhiteSpace + sprintf + stripWhiteSpace + toDouble + toFloat + toInt + toLong + toShort + toUInt + toULong + toUShort + truncate + upper + operator!= + operator+ + operator< + operator<< + operator<= + operator== + operator> + operator>= + operator>> + qmemmove + qstrcmp + qstrcpy + qstrdup + qstricmp + qstrlen + qstrncmp + qstrncpy + qstrnicmp +
+
+
+
+ QCursor + bitmap + cleanup + handle + hotSpot + initialize + mask + operator= + pos + setPos + setShape + shape + ~QCursor + operator<< + operator>> +
+
+
+
+ QCustomEvent + data + setData +
+
+
+
+ QCustomMenuItem + fullSpan + isSeparator + paint + setFont + sizeHint + ~QCustomMenuItem +
+
+
+
+ QDataBrowser + Boundary + autoEdit + autoEdit + beforeDelete + beforeInsert + beforeUpdate + boundary + boundaryChecking + boundaryChecking + clearValues + confirmCancel + confirmCancels + confirmCancels + confirmDelete + confirmDelete + confirmEdit + confirmEdits + confirmEdits + confirmInsert + confirmInsert + confirmUpdate + confirmUpdate + currentChanged + currentEdited + cursorChanged + del + deleteCurrent + filter + filter + first + firstRecordAvailable + form + handleError + insert + insertCurrent + isReadOnly + last + lastRecordAvailable + next + nextRecordAvailable + prev + prevRecordAvailable + primeDelete + primeInsert + primeUpdate + readFields + readOnly + refresh + seek + setAutoEdit + setBoundaryChecking + setConfirmCancels + setConfirmDelete + setConfirmEdits + setConfirmInsert + setConfirmUpdate + setFilter + setForm + setReadOnly + setSort + setSqlCursor + sort + sort + sqlCursor + update + updateBoundary + updateCurrent + writeFields + ~QDataBrowser +
+
+
+
+
+
+
+
+ eof + maybeReady + readyToReceive + receive +
+
+
+
+ enableRewind + maybeReady + readyToSend + rewind + rewindable + sendTo +
+
+
+
+ QDataStream + ByteOrder + atEnd + byteOrder + device + isPrintableData + operator<< + operator>> + readBytes + readRawBytes + setByteOrder + setDevice + setPrintableData + setVersion + unsetDevice + version + writeBytes + writeRawBytes + ~QDataStream +
+
+
+
+ QDataTable + Refresh + addColumn + adjustColumn + autoDelete + autoEdit + autoEdit + beforeDelete + beforeInsert + beforeUpdate + beginInsert + beginUpdate + confirmCancel + confirmCancels + confirmCancels + confirmDelete + confirmDelete + confirmEdit + confirmEdits + confirmEdits + confirmInsert + confirmInsert + confirmUpdate + confirmUpdate + currentChanged + currentRecord + cursorChanged + dateFormat + dateFormat + deleteCurrent + falseText + falseText + fieldAlignment + filter + filter + find + handleError + indexOf + insertCurrent + installEditorFactory + installPropertyMap + nullText + nullText + numCols + numCols + numRows + numRows + paintField + primeDelete + primeInsert + primeUpdate + refresh + removeColumn + reset + setAutoDelete + setAutoEdit + setColumn + setColumnWidth + setConfirmCancels + setConfirmDelete + setConfirmEdits + setConfirmInsert + setConfirmUpdate + setDateFormat + setFalseText + setFilter + setNullText + setSize + setSort + setSqlCursor + setTrueText + sort + sort + sortAscending + sortColumn + sortDescending + sqlCursor + text + trueText + trueText + updateCurrent + value + ~QDataTable +
+
+
+
+ QDataView + clearValues + form + readFields + record + refresh + setForm + setRecord + writeFields + ~QDataView +
+
+
+
+ QDate + addDays + addMonths + addYears + currentDate + day + dayOfWeek + dayOfYear + daysInMonth + daysInYear + daysTo + fromString + isNull + isValid + leapYear + longDayName + longMonthName + month + operator!= + operator< + operator<= + operator== + operator> + operator>= + setYMD + shortDayName + shortMonthName + toString + weekNumber + year + operator<< + operator>> +
+
+
+
+ QDateEdit + Order + autoAdvance + autoAdvance + date + date + fix + maxValue + maxValue + minValue + minValue + order + order + sectionFormattedText + sectionLength + sectionText + separator + setAutoAdvance + setDate + setDay + setMaxValue + setMinValue + setMonth + setOrder + setRange + setSeparator + setYear + updateButtons + valueChanged + ~QDateEdit +
+
+
+
+ QDateTime + addDays + addMonths + addSecs + addYears + currentDateTime + date + daysTo + fromString + isNull + isValid + operator!= + operator< + operator<= + operator== + operator> + operator>= + secsTo + setDate + setTime + setTime_t + time + toString + toTime_t + operator<< + operator>> +
+
+
+
+ QDateTimeEdit + autoAdvance + dateEdit + dateTime + dateTime + setAutoAdvance + setDateTime + timeEdit + valueChanged + ~QDateTimeEdit +
+
+
+
+ QDateTimeEditBase +
+
+
+
+ QDeepCopy + operator T + operator= +
+
+
+
+ QDesktopWidget + availableGeometry + isVirtualDesktop + numScreens + primaryScreen + resized + screen + screenGeometry + screenNumber + ~QDesktopWidget +
+
+
+
+ QDial + addLine + addPage + dialMoved + dialPressed + dialReleased + lineStep + lineStep + maxValue + maxValue + minValue + minValue + notchSize + notchSize + notchTarget + notchTarget + notchesVisible + notchesVisible + pageStep + pageStep + rangeChange + repaintScreen + setLineStep + setMaxValue + setMinValue + setNotchTarget + setNotchesVisible + setPageStep + setTracking + setValue + setWrapping + subtractLine + subtractPage + tracking + tracking + value + value + valueChange + valueChanged + wrapping + wrapping + ~QDial +
+
+
+
+ QDialog + DialogCode + accept + done + exec + extension + isModal + isSizeGripEnabled + modal + orientation + reject + result + setExtension + setModal + setOrientation + setResult + setSizeGripEnabled + show + showExtension + sizeGripEnabled + ~QDialog +
+
+
+
+ QDict + clear + count + find + insert + isEmpty + operator= + operator[] + read + remove + replace + resize + size + statistics + take + write + ~QDict +
+
+
+
+ QDictIterator + count + current + currentKey + isEmpty + operator type * + operator() + operator++ + toFirst + ~QDictIterator +
+
+
+
+ QDir + FilterSpec + SortSpec + absFilePath + absPath + canonicalPath + cd + cdUp + cleanDirPath + convertSeparators + convertToAbs + count + current + currentDirPath + dirName + drives + entryInfoList + entryList + exists + filePath + filter + home + homeDirPath + isReadable + isRelative + isRelativePath + isRoot + match + matchAllDirs + mkdir + nameFilter + operator!= + operator= + operator== + operator[] + path + refresh + remove + rename + rmdir + root + rootDirPath + separator + setCurrent + setFilter + setMatchAllDirs + setNameFilter + setPath + setSorting + sorting + ~QDir +
+
+
+
+ QDirectPainter + depth + frameBuffer + height + lineStep + numRects + offset + rect + region + setAreaChanged + size + transformOrientation + width + xOffset + yOffset + ~QDirectPainter +
+
+
+
+ QDns + RecordType + addresses + canonicalName + hostNames + isWorking + label + mailServers + qualifiedNames + recordType + resultsReady + servers + setLabel + setRecordType + setStartQueryTimer + texts + ~QDns +
+
+
+
+ QDockArea + HandlePosition + count + count + dockWindowList + empty + handlePosition + handlePosition + hasDockWindow + isDockWindowAccepted + isEmpty + lineUp + moveDockWindow + orientation + orientation + removeDockWindow + setAcceptDockWindow + ~QDockArea + operator<< + operator>> +
+
+
+
+ QDockWindow + CloseMode + Place + area + boxLayout + closeMode + closeMode + dock + fixedExtent + horizontallyStretchable + isCloseEnabled + isHorizontallyStretchable + isMovingEnabled + isResizeEnabled + isStretchable + isVerticallyStretchable + movingEnabled + newLine + newLine + offset + offset + opaqueMoving + opaqueMoving + orientation + orientationChanged + place + placeChanged + resizeEnabled + setCloseMode + setFixedExtentHeight + setFixedExtentWidth + setHorizontallyStretchable + setMovingEnabled + setNewLine + setOffset + setOpaqueMoving + setOrientation + setResizeEnabled + setVerticallyStretchable + setWidget + stretchable + undock + verticallyStretchable + visibilityChanged + widget +
+
+
+
+ QDomAttr + isAttr + name + nodeType + operator= + ownerElement + setValue + specified + value + ~QDomAttr +
+
+
+
+ QDomCDATASection + isCDATASection + nodeType + operator= + ~QDomCDATASection +
+
+
+
+ QDomCharacterData + appendData + data + deleteData + insertData + isCharacterData + length + nodeType + operator= + replaceData + setData + substringData + ~QDomCharacterData +
+
+
+
+ QDomComment + isComment + nodeType + operator= + ~QDomComment +
+
+
+
+ QDomDocument + createAttribute + createAttributeNS + createCDATASection + createComment + createDocumentFragment + createElement + createElementNS + createEntityReference + createProcessingInstruction + createTextNode + doctype + documentElement + elementById + elementsByTagName + elementsByTagNameNS + implementation + importNode + isDocument + nodeType + operator= + setContent + toCString + toString + ~QDomDocument +
+
+
+
+ QDomDocumentFragment + isDocumentFragment + nodeType + operator= + ~QDomDocumentFragment +
+
+
+
+ QDomDocumentType + entities + internalSubset + isDocumentType + name + nodeType + notations + operator= + publicId + systemId + ~QDomDocumentType +
+
+
+
+ QDomElement + attribute + attributeNS + attributeNode + attributeNodeNS + attributes + elementsByTagName + elementsByTagNameNS + hasAttribute + hasAttributeNS + isElement + nodeType + operator= + removeAttribute + removeAttributeNS + removeAttributeNode + setAttribute + setAttributeNS + setAttributeNode + setAttributeNodeNS + setTagName + tagName + text + ~QDomElement +
+
+
+
+ QDomEntity + isEntity + nodeType + notationName + operator= + publicId + systemId + ~QDomEntity +
+
+
+
+ QDomEntityReference + isEntityReference + nodeType + operator= + ~QDomEntityReference +
+
+
+
+ QDomImplementation + createDocument + createDocumentType + hasFeature + isNull + operator!= + operator= + operator== + ~QDomImplementation +
+
+
+
+ QDomNamedNodeMap + contains + count + item + length + namedItem + namedItemNS + operator!= + operator= + operator== + removeNamedItem + removeNamedItemNS + setNamedItem + setNamedItemNS + ~QDomNamedNodeMap +
+
+
+
+ QDomNode + NodeType + appendChild + attributes + childNodes + clear + cloneNode + firstChild + hasAttributes + hasChildNodes + insertAfter + insertBefore + isAttr + isCDATASection + isCharacterData + isComment + isDocument + isDocumentFragment + isDocumentType + isElement + isEntity + isEntityReference + isNotation + isNull + isProcessingInstruction + isSupported + isText + lastChild + localName + namedItem + namespaceURI + nextSibling + nodeName + nodeType + nodeValue + normalize + operator!= + operator= + operator== + ownerDocument + parentNode + prefix + previousSibling + removeChild + replaceChild + save + setNodeValue + setPrefix + toAttr + toCDATASection + toCharacterData + toComment + toDocument + toDocumentFragment + toDocumentType + toElement + toEntity + toEntityReference + toNotation + toProcessingInstruction + toText + ~QDomNode + operator<< +
+
+
+
+ QDomNodeList + count + item + length + operator!= + operator= + operator== + ~QDomNodeList +
+
+
+
+ QDomNotation + isNotation + nodeType + operator= + publicId + systemId + ~QDomNotation +
+
+
+
+ QDomProcessingInstruction + data + isProcessingInstruction + nodeType + operator= + setData + target + ~QDomProcessingInstruction +
+
+
+
+ QDomText + isText + nodeType + operator= + splitText + ~QDomText +
+
+
+
+ QDoubleValidator + bottom + bottom + decimals + decimals + setBottom + setDecimals + setRange + setTop + top + top + validate + ~QDoubleValidator +
+
+
+
+ QDragEnterEvent +
+
+
+
+ QDragLeaveEvent +
+
+
+
+ QDragMoveEvent + accept + answerRect + ignore +
+
+
+
+ QDragObject + DragMode + drag + dragCopy + dragLink + dragMove + pixmap + pixmapHotSpot + setPixmap + source + target + ~QDragObject +
+
+
+
+ QDropEvent + Action + accept + acceptAction + action + encodedData + format + ignore + isAccepted + isActionAccepted + pos + provides + setAction + setPoint + source +
+
+
+
+ ~QDropSite +
+
+
+
+ QEditorFactory + createEditor + defaultFactory + installDefaultFactory + ~QEditorFactory +
+
+
+
+ QErrorMessage + message + qtHandler + ~QErrorMessage +
+
+
+
+ QEucJpCodec + mibEnum + mimeName + ~QEucJpCodec +
+
+
+
+ QEucKrCodec + mimeName +
+
+
+
+ QEvent + Type + spontaneous + type + ~QEvent +
+
+
+
+ QEventLoop + ProcessEvents + ProcessEventsFlags + aboutToBlock + activateSocketNotifiers + activateTimers + awake + enterLoop + exec + exit + exitLoop + hasPendingEvents + loopLevel + processEvents + registerSocketNotifier + setSocketNotifierPending + timeToWait + unregisterSocketNotifier + wakeUp + ~QEventLoop +
+
+
+
+ QFile + DecoderFn + EncoderFn + at + atEnd + close + decodeName + encodeName + errorString + exists + flush + getch + handle + name + open + putch + readLine + remove + setDecodingFunction + setEncodingFunction + setErrorString + setName + size + ungetch + writeBlock + ~QFile +
+
+
+
+ QFileDialog + Mode + PreviewMode + ViewMode + addFilter + addLeftWidget + addRightWidget + addToolButton + addWidgets + contentsPreview + dir + dirEntered + dirPath + dirPath + fileHighlighted + fileNameEditDone + fileSelected + filesSelected + filterSelected + fixupNameEdit + getExistingDirectory + getOpenFileName + getOpenFileNames + getSaveFileName + iconProvider + infoPreview + isContentsPreviewEnabled + isInfoPreviewEnabled + mode + mode + modeButtonsDestroyed + previewMode + previewMode + rereadDir + resortDir + selectAll + selectDirectoryOrFile + selectedFile + selectedFile + selectedFiles + selectedFiles + selectedFilter + selectedFilter + setContentsPreview + setContentsPreviewEnabled + setDir + setFilter + setFilters + setIconProvider + setInfoPreview + setInfoPreviewEnabled + setMode + setPreviewMode + setSelectedFilter + setSelection + setShowHiddenFiles + setUrl + setViewMode + showHiddenFiles + showHiddenFiles + stopCopy + updateFileNameEdit + updateGeometries + url + viewMode + viewMode + ~QFileDialog +
+
+
+
+ QFileIconProvider + pixmap +
+
+
+
+ QFileInfo + PermissionSpec + absFilePath + baseName + caching + convertToAbs + created + dir + dirPath + exists + extension + fileName + filePath + group + groupId + isDir + isExecutable + isFile + isHidden + isReadable + isRelative + isSymLink + isWritable + lastModified + lastRead + operator= + owner + ownerId + permission + readLink + refresh + setCaching + setFile + size + ~QFileInfo +
+
+
+
+ QFilePreview + previewUrl +
+
+
+
+ QFocusData + count + first + focusWidget + home + last + next + prev +
+
+
+
+ QFocusEvent + Reason + gotFocus + lostFocus + reason + resetReason + setReason +
+
+
+
+ QFont + Script + Stretch + StyleHint + StyleStrategy + Weight + bold + deciPointSize + defaultFamily + dirty + exactMatch + family + fixedPitch + fromString + handle + insertSubstitution + insertSubstitutions + isCopyOf + italic + key + lastResortFamily + lastResortFont + operator!= + operator= + operator== + overline + pixelSize + pointSize + pointSizeFloat + qwsRenderToDisk + rawMode + rawName + removeSubstitution + resolve + setBold + setFamily + setFixedPitch + setItalic + setOverline + setPixelSize + setPointSize + setPointSizeFloat + setRawMode + setRawName + setStretch + setStrikeOut + setStyleHint + setStyleStrategy + setUnderline + setWeight + stretch + strikeOut + styleHint + styleStrategy + substitute + substitutes + substitutions + toString + underline + weight + ~QFont + operator<< + operator>> +
+
+
+
+ QFontDatabase + bold + families + font + isBitmapScalable + isFixedPitch + isScalable + isSmoothlyScalable + italic + pointSizes + scriptName + scriptSample + smoothSizes + standardSizes + styleString + styles + weight +
+
+
+
+ QFontDialog + getFont +
+
+
+
+ QFontInfo + bold + exactMatch + family + fixedPitch + italic + operator= + pixelSize + pointSize + rawMode + styleHint + weight + ~QFontInfo +
+
+
+
+ QFontManager + cleanup + get + initialize + ~QFontManager +
+
+
+
+ QFontMetrics + ascent + boundingRect + charWidth + descent + height + inFont + leading + leftBearing + lineSpacing + lineWidth + maxWidth + minLeftBearing + minRightBearing + operator= + overlinePos + rightBearing + size + strikeOutPos + underlinePos + width + ~QFontMetrics +
+
+
+
+ QFrame + Shadow + Shape + contentsRect + contentsRect + drawContents + drawFrame + frameChanged + frameRect + frameRect + frameShadow + frameShadow + frameShape + frameShape + frameStyle + frameWidth + frameWidth + lineWidth + lineWidth + margin + margin + midLineWidth + midLineWidth + paintEvent + resizeEvent + setFrameRect + setFrameShadow + setFrameShape + setFrameStyle + setLineWidth + setMargin + setMidLineWidth +
+
+
+
+ QFtp + Command + Error + State + abort + bytesAvailable + cd + clearPendingCommands + close + commandFinished + commandStarted + connectToHost + currentCommand + currentDevice + currentId + dataTransferProgress + done + error + errorString + get + hasPendingCommands + list + listInfo + login + mkdir + put + rawCommand + rawCommandReply + readAll + readBlock + readyRead + remove + rename + rmdir + state + stateChanged + ~QFtp +
+
+
+
+ QGb18030Codec +
+
+
+
+ QGb2312Codec +
+
+
+
+ QGbkCodec +
+
+
+
+ QGfxDriverFactory + create + keys +
+
+
+
+ QGfxDriverPlugin + create + keys + ~QGfxDriverPlugin +
+
+
+
+ QGL + FormatOption +
+
+
+
+ QGLayoutIterator + current + next + takeCurrent + ~QGLayoutIterator +
+
+
+
+ QGLColormap + detach + entryColor + entryRgb + find + findNearest + isEmpty + operator= + setEntries + setEntry + size + ~QGLColormap +
+
+
+
+ QGLContext + chooseContext + chooseMacVisual + choosePixelFormat + chooseVisual + create + currentContext + device + deviceIsPixmap + doneCurrent + format + generateFontDisplayLists + initialized + isSharing + isValid + makeCurrent + overlayTransparentColor + requestedFormat + reset + setFormat + setInitialized + setWindowCreated + swapBuffers + windowCreated + ~QGLContext +
+
+
+
+ QGLFormat + accum + alpha + defaultFormat + defaultOverlayFormat + depth + directRendering + doubleBuffer + hasOpenGL + hasOpenGLOverlays + hasOverlay + plane + rgba + setAccum + setAlpha + setDefaultFormat + setDefaultOverlayFormat + setDepth + setDirectRendering + setDoubleBuffer + setOption + setOverlay + setPlane + setRgba + setStencil + setStereo + stencil + stereo + testOption +
+
+
+
+ QGLWidget + autoBufferSwap + colormap + context + convertToGLFormat + doneCurrent + doubleBuffer + format + glDraw + glInit + grabFrameBuffer + initializeGL + initializeOverlayGL + isSharing + isValid + makeCurrent + makeOverlayCurrent + overlayContext + paintEvent + paintGL + paintOverlayGL + qglClearColor + qglColor + renderPixmap + renderText + resizeEvent + resizeGL + resizeOverlayGL + setAutoBufferSwap + setColormap + swapBuffers + updateGL + updateOverlayGL + ~QGLWidget +
+
+
+
+ QGrid + setSpacing +
+
+
+
+ QGridLayout + Corner + add + addItem + addLayout + addMultiCell + addMultiCellLayout + addMultiCellWidget + addWidget + cellGeometry + colSpacing + colStretch + expand + expanding + findWidget + hasHeightForWidth + heightForWidth + init + invalidate + maximumSize + minimumSize + numCols + numRows + origin + rowSpacing + rowStretch + setColSpacing + setColStretch + setGeometry + setOrigin + setRowSpacing + setRowStretch + sizeHint + ~QGridLayout +
+
+
+
+ QGridView + cellGeometry + cellHeight + cellHeight + cellRect + cellWidth + cellWidth + columnAt + dimensionChange + ensureCellVisible + gridSize + numCols + numCols + numRows + numRows + paintCell + paintEmptyArea + repaintCell + rowAt + setCellHeight + setCellWidth + setNumCols + setNumRows + updateCell + ~QGridView +
+
+
+
+ QGroupBox + addSpace + alignment + alignment + checkable + checked + columns + columns + flat + insideMargin + insideSpacing + isCheckable + isChecked + isFlat + orientation + orientation + setAlignment + setCheckable + setChecked + setColumnLayout + setColumns + setFlat + setInsideMargin + setInsideSpacing + setOrientation + setTitle + title + title + toggled + ~QGroupBox +
+
+
+
+ QGuardedPtr + isNull + operator T * + operator!= + operator* + operator-> + operator= + operator== + ~QGuardedPtr +
+
+
+
+ QHBox + setSpacing + setStretchFactor +
+
+
+
+ QHBoxLayout + ~QHBoxLayout +
+
+
+
+ QHButtonGroup + ~QHButtonGroup +
+
+
+
+ QHeader + addLabel + adjustHeaderSize + clicked + count + count + handleAt + handleColumnMove + headerWidth + iconSet + indexChange + isClickEnabled + isMovingEnabled + isResizeEnabled + isStretchEnabled + label + mapToIndex + mapToSection + moveSection + moving + offset + offset + orientation + orientation + paintSection + paintSectionLabel + pressed + released + removeLabel + resizeSection + sRect + sectionAt + sectionHandleDoubleClicked + sectionPos + sectionRect + sectionSize + setClickEnabled + setLabel + setMovingEnabled + setOffset + setOrientation + setResizeEnabled + setSortIndicator + setStretchEnabled + setTracking + sizeChange + sortIndicatorOrder + sortIndicatorSection + stretching + tracking + tracking + ~QHeader +
+
+
+
+ QHebrewCodec + fromUnicode + mimeName +
+
+
+
+ QHGroupBox + ~QHGroupBox +
+
+
+
+ QHideEvent +
+
+
+
+ QHostAddress + isIPv4Address + isIPv6Address + isNull + operator= + operator== + setAddress + toIPv4Address + toIPv6Address + toString + ~QHostAddress +
+
+
+
+ QHttp + Error + State + abort + bytesAvailable + clearPendingRequests + closeConnection + currentDestinationDevice + currentId + currentRequest + currentSourceDevice + dataReadProgress + dataSendProgress + done + error + errorString + get + hasPendingRequests + head + post + readAll + readBlock + readyRead + request + requestFinished + requestStarted + responseHeaderReceived + setHost + state + stateChanged + ~QHttp +
+
+
+
+ QHttpHeader + contentLength + contentType + hasContentLength + hasContentType + hasKey + isValid + keys + majorVersion + minorVersion + operator= + removeValue + setContentLength + setContentType + setValue + toString + value + ~QHttpHeader +
+
+
+
+ QHttpRequestHeader + majorVersion + method + minorVersion + path + setRequest +
+
+
+
+ QHttpResponseHeader + majorVersion + minorVersion + reasonPhrase + setStatusLine + statusCode +
+
+
+
+ QIconDrag + append + canDecode + encodedData + ~QIconDrag +
+
+
+
+ QIconDragEvent + accept + ignore + isAccepted +
+
+
+
+ QIconDragItem + data + setData + ~QIconDragItem +
+
+
+
+ QIconFactory + autoDelete + createPixmap + defaultFactory + installDefaultFactory + setAutoDelete + ~QIconFactory +
+
+
+
+ QIconSet + Mode + Size + State + clearGenerated + createDisabled + createScaled + detach + iconSize + installIconFactory + isGenerated + isNull + operator= + pixmap + reset + setIconSize + setPixmap + ~QIconSet +
+
+
+
+ QIconView + Arrangement + ItemTextPos + ResizeMode + SelectionMode + adjustItems + arrangeItemsInGrid + arrangement + arrangement + autoArrange + autoArrange + clear + clearSelection + clicked + contextMenuRequested + count + count + currentChanged + currentItem + doAutoScroll + doubleClicked + dragObject + drawBackground + drawDragShapes + drawRubber + dropped + emitSelectionChanged + ensureItemVisible + findFirstVisibleItem + findItem + findLastVisibleItem + firstItem + gridX + gridX + gridY + gridY + index + initDragEnter + insertInGrid + insertItem + invertSelection + isRenaming + itemRenamed + itemTextBackground + itemTextBackground + itemTextPos + itemTextPos + itemsMovable + itemsMovable + lastItem + makeRowLayout + maxItemTextLength + maxItemTextLength + maxItemWidth + maxItemWidth + mouseButtonClicked + mouseButtonPressed + moved + onItem + onViewport + pressed + repaintItem + repaintSelectedItems + resizeMode + resizeMode + returnPressed + rightButtonClicked + rightButtonPressed + selectAll + selectionChanged + selectionMode + selectionMode + setArrangement + setAutoArrange + setCurrentItem + setGridX + setGridY + setItemTextBackground + setItemTextPos + setItemsMovable + setMaxItemTextLength + setMaxItemWidth + setResizeMode + setSelected + setSelectionMode + setShowToolTips + setSorting + setSpacing + setWordWrapIconText + showToolTips + showToolTips + slotUpdate + sort + sortDirection + sortDirection + sorting + sorting + spacing + spacing + startDrag + takeItem + wordWrapIconText + wordWrapIconText + ~QIconView +
+
+
+
+ QIconViewItem + acceptDrop + calcRect + cancelRenameItem + compare + contains + dragEnabled + dragEntered + dragLeft + dropEnabled + dropped + height + iconView + index + init + intersects + isSelectable + isSelected + key + move + moveBy + nextItem + paintFocus + paintItem + picture + pixmap + pixmapRect + pos + prevItem + rect + removeRenameBox + rename + renameEnabled + renameItem + repaint + rtti + setDragEnabled + setDropEnabled + setItemRect + setKey + setPicture + setPixmap + setPixmapRect + setRenameEnabled + setSelectable + setSelected + setText + setTextRect + size + text + textRect + width + x + y + ~QIconViewItem +
+
+
+
+ QImage + Endian + ScaleMode + allGray + bitOrder + bits + bytesPerLine + color + colorTable + convertBitOrder + convertDepth + convertDepthWithPalette + copy + create + createAlphaMask + createHeuristicMask + depth + detach + dotsPerMeterX + dotsPerMeterY + fill + fromMimeSource + hasAlphaBuffer + height + imageFormat + inputFormatList + inputFormats + invertPixels + isGrayscale + isNull + jumpTable + load + loadFromData + mirror + numBytes + numColors + offset + operator!= + operator= + operator== + outputFormatList + outputFormats + pixel + pixelIndex + rect + reset + save + scale + scaleHeight + scaleWidth + scanLine + setAlphaBuffer + setColor + setDotsPerMeterX + setDotsPerMeterY + setNumColors + setOffset + setPixel + setText + size + smoothScale + swapRGB + systemBitOrder + systemByteOrder + text + textKeys + textLanguages + textList + valid + width + xForm + ~QImage + bitBlt + operator<< + operator>> +
+
+
+
+ QImageConsumer + changed + end + frameDone + setFramePeriod + setLooping + setSize +
+
+
+
+ QImageDecoder + decode + format + formatName + image + inputFormats + registerDecoderFactory + unregisterDecoderFactory + ~QImageDecoder +
+
+
+
+ QImageDrag + canDecode + decode + setImage + ~QImageDrag +
+
+
+
+ QImageFormat + decode +
+
+
+
+ QImageFormatPlugin + installIOHandler + keys + ~QImageFormatPlugin +
+
+
+
+ QImageFormatType + decoderFor + formatName + ~QImageFormatType +
+
+
+
+ QImageIO + defineIOHandler + description + fileName + format + gamma + image + imageFormat + init + inputFormats + ioDevice + outputFormats + parameters + quality + read + setDescription + setFileName + setFormat + setGamma + setIODevice + setImage + setParameters + setQuality + setStatus + status + write + ~QImageIO +
+
+
+
+ QIMEvent + accept + cursorPos + ignore + isAccepted + selectionLength + text +
+
+
+
+ QInputDialog + Type + comboBox + editableComboBox + getDouble + getInteger + getItem + getText + lineEdit + setType + spinBox + type + ~QInputDialog +
+
+
+
+ QIntCache + clear + count + find + insert + isEmpty + maxCost + operator[] + remove + setMaxCost + size + statistics + take + totalCost + ~QIntCache +
+
+
+
+ QIntCacheIterator + atFirst + atLast + count + current + currentKey + isEmpty + operator type * + operator() + operator++ + operator+= + operator-- + operator-= + operator= + toFirst + toLast +
+
+
+
+ QIntDict + clear + count + find + insert + isEmpty + operator= + operator[] + read + remove + replace + resize + size + statistics + take + write + ~QIntDict +
+
+
+
+ QIntDictIterator + count + current + currentKey + isEmpty + operator type * + operator() + operator++ + operator+= + toFirst + ~QIntDictIterator +
+
+
+
+ QIntValidator + bottom + bottom + setBottom + setRange + setTop + top + top + validate + ~QIntValidator +
+
+
+
+ QIODevice + Offset + at + atEnd + close + flags + flush + getch + isAsynchronous + isBuffered + isCombinedAccess + isDirectAccess + isInactive + isOpen + isRaw + isReadWrite + isReadable + isSequentialAccess + isSynchronous + isTranslated + isWritable + mode + open + putch + readAll + readBlock + readLine + reset + resetStatus + setFlags + setMode + setState + setStatus + setType + size + state + status + ungetch + writeBlock + ~QIODevice +
+
+
+
+ enableRewind + readyToSend + rewind + rewindable + sendTo + ~QIODeviceSource +
+
+
+
+ QJisCodec + mimeName +
+
+
+
+ QKbdDriverFactory + create + keys +
+
+
+
+ QKbdDriverPlugin + create + keys + ~QKbdDriverPlugin +
+
+
+
+ QKeyEvent + accept + ascii + count + ignore + isAccepted + isAutoRepeat + key + state + stateAfter + text +
+
+
+
+ QKeySequence + assign + count + decodeString + encodeString + isEmpty + matches + operator QString + operator!= + operator= + operator== + operator[] + ~QKeySequence + operator<< + operator>> +
+
+
+
+ QLabel + alignment + alignment + backgroundMode + buddy + clear + drawContents + hasScaledContents + indent + indent + movie + picture + pixmap + pixmap + scaledContents + setAlignment + setBuddy + setFont + setIndent + setMovie + setNum + setPicture + setPixmap + setScaledContents + setText + setTextFormat + sizeForWidth + text + text + textFormat + textFormat + updateLabel + ~QLabel +
+
+
+
+ QLayout + ResizeMode + activate + add + addChildLayout + addItem + alignmentRect + autoAdd + deleteAllItems + expanding + invalidate + isEmpty + isEnabled + isTopLevel + iterator + mainWidget + margin + margin + maximumSize + menuBar + minimumSize + remove + removeItem + resizeMode + resizeMode + setAutoAdd + setEnabled + setGeometry + setMargin + setMenuBar + setResizeMode + setSpacing + setSupportsMargin + setWidgetLayout + spacing + spacing + supportsMargin +
+
+
+
+ QLayoutItem + alignment + expanding + geometry + hasHeightForWidth + heightForWidth + invalidate + isEmpty + iterator + layout + maximumSize + minimumSize + setAlignment + setGeometry + sizeHint + spacerItem + widget + ~QLayoutItem +
+
+
+
+ QLayoutIterator + current + deleteCurrent + operator++ + operator= + takeCurrent + ~QLayoutIterator +
+
+
+
+ QLCDNumber + Mode + SegmentStyle + checkOverflow + display + drawContents + intValue + intValue + mode + mode + numDigits + numDigits + overflow + segmentStyle + segmentStyle + setBinMode + setDecMode + setHexMode + setMode + setNumDigits + setOctMode + setSegmentStyle + setSmallDecimalPoint + smallDecimalPoint + smallDecimalPoint + value + value + ~QLCDNumber +
+
+
+
+ QLibrary + autoUnload + isLoaded + library + load + resolve + setAutoUnload + unload + ~QLibrary +
+
+
+
+ QLineEdit + EchoMode + acceptableInput + alignment + alignment + backspace + clear + clearModified + clearValidator + copy + createPopupMenu + cursorBackward + cursorForward + cursorPosition + cursorPosition + cursorWordBackward + cursorWordForward + cut + del + deselect + displayText + displayText + dragEnabled + dragEnabled + echoMode + echoMode + end + frame + frame + hasAcceptableInput + hasSelectedText + hasSelectedText + home + inputMask + inputMask + insert + isModified + isReadOnly + isRedoAvailable + isUndoAvailable + keyPressEvent + lostFocus + maxLength + maxLength + minimumSizeHint + modified + paste + readOnly + redo + redoAvailable + returnPressed + selectAll + selectedText + selectedText + selectionChanged + selectionStart + setAlignment + setCursorPosition + setDragEnabled + setEchoMode + setFrame + setInputMask + setMaxLength + setReadOnly + setSelection + setText + setValidator + sizeHint + text + text + textChanged + undo + undoAvailable + validator + ~QLineEdit +
+
+
+
+ QListBox + LayoutMode + SelectionMode + changeItem + clear + clearSelection + clicked + columnAt + columnMode + columnMode + contextMenuRequested + count + count + currentChanged + currentColumn + currentItem + currentItem + currentRow + currentText + currentText + doLayout + doubleClicked + ensureCurrentVisible + findItem + firstItem + highlighted + index + insertItem + insertStrList + insertStringList + invertSelection + isRubberSelecting + isSelected + item + itemAt + itemHeight + itemRect + itemVisible + maxItemWidth + mouseButtonClicked + mouseButtonPressed + numColumns + numColumns + numItemsVisible + numItemsVisible + numRows + numRows + onItem + onViewport + paintCell + pixmap + pressed + refreshSlot + removeItem + returnPressed + rightButtonClicked + rightButtonPressed + rowAt + rowMode + rowMode + selectAll + selected + selectedItem + selectionChanged + selectionMode + selectionMode + setBottomItem + setColumnMode + setCurrentItem + setRowMode + setSelected + setSelectionMode + setTopItem + setVariableHeight + setVariableWidth + sort + takeItem + text + toggleCurrentItem + topItem + topItem + triggerUpdate + tryGeometry + updateItem + variableHeight + variableHeight + variableWidth + variableWidth + ~QListBox +
+
+
+
+ QListBoxItem + height + isCurrent + isSelectable + isSelected + listBox + next + paint + pixmap + prev + rtti + setCustomHighlighting + setSelectable + setText + text + width + ~QListBoxItem +
+
+
+
+ QListBoxPixmap + height + paint + pixmap + width + ~QListBoxPixmap +
+
+
+
+ QListBoxText + height + paint + width + ~QListBoxText +
+
+
+
+ QListView + RenameAction + ResizeMode + SelectionMode + WidthMode + addColumn + adjustColumn + allColumnsShowFocus + allColumnsShowFocus + changeSortColumn + childCount + childCount + clear + clearSelection + clicked + collapsed + columnAlignment + columnText + columnWidth + columnWidthMode + columns + columns + contentsMouseDoubleClickEvent + contentsMouseMoveEvent + contentsMousePressEvent + contentsMouseReleaseEvent + contextMenuRequested + currentChanged + currentItem + defaultRenameAction + defaultRenameAction + doAutoScroll + doubleClicked + dragObject + drawContentsOffset + dropped + ensureItemVisible + eventFilter + expanded + findItem + firstChild + handleSizeChange + header + hideColumn + insertItem + invertSelection + isOpen + isRenaming + isSelected + itemAt + itemMargin + itemMargin + itemPos + itemRect + itemRenamed + lastItem + mouseButtonClicked + mouseButtonPressed + onItem + onViewport + paintEmptyArea + pressed + reconfigureItems + removeColumn + repaintItem + resizeEvent + resizeMode + resizeMode + returnPressed + rightButtonClicked + rightButtonPressed + rootIsDecorated + rootIsDecorated + selectAll + selectedItem + selectionChanged + selectionMode + selectionMode + setAllColumnsShowFocus + setColumnAlignment + setColumnText + setColumnWidth + setColumnWidthMode + setCurrentItem + setDefaultRenameAction + setItemMargin + setOpen + setResizeMode + setRootIsDecorated + setSelected + setSelectionAnchor + setSelectionMode + setShowSortIndicator + setShowToolTips + setSortColumn + setSortOrder + setSorting + setTreeStepSize + showSortIndicator + showSortIndicator + showToolTips + showToolTips + sort + sortColumn + sortOrder + spacePressed + startDrag + takeItem + treeStepSize + treeStepSize + triggerUpdate + updateContents + widthChanged + ~QListView +
+
+
+
+ QListViewItem + acceptDrop + activate + activatedPos + cancelRename + childCount + compare + depth + dragEnabled + dragEntered + dragLeft + dropEnabled + dropped + enforceSortOrder + firstChild + height + insertItem + invalidateHeight + isEnabled + isExpandable + isOpen + isSelectable + isSelected + isVisible + itemAbove + itemBelow + itemPos + key + listView + moveItem + multiLinesEnabled + nextSibling + okRename + paintBranches + paintCell + paintFocus + parent + pixmap + removeRenameBox + renameEnabled + repaint + rtti + setDragEnabled + setDropEnabled + setEnabled + setExpandable + setHeight + setMultiLinesEnabled + setOpen + setPixmap + setRenameEnabled + setSelectable + setSelected + setText + setVisible + setup + sort + sortChildItems + startRename + takeItem + text + totalHeight + width + widthChanged + ~QListViewItem +
+
+
+
+ QListViewItemIterator + IteratorFlag + current + operator* + operator++ + operator+= + operator-- + operator-= + operator= + ~QListViewItemIterator +
+
+
+
+ QLocale + Country + Language + c + country + countryToString + language + languageToString + name + operator= + setDefault + system + toDouble + toFloat + toInt + toLong + toLongLong + toShort + toString + toUInt + toULong + toULongLong + toUShort +
+
+
+
+ QLocalFs +
+
+
+
+ QMacMime + all + canConvert + convertFromMime + convertToMime + convertor + convertorName + countFlavors + flavor + flavorFor + flavorToMime + mimeFor + ~QMacMime +
+
+
+
+ QMacStyle + FocusRectPolicy + WidgetSizePolicy + focusRectPolicy + setFocusRectPolicy + setWidgetSizePolicy + widgetSizePolicy + ~QMacStyle +
+
+
+
+ QMainWindow + DockWindows + addDockWindow + appropriate + bottomDock + centralWidget + childEvent + createDockWindowMenu + customize + dockWindowPositionChanged + dockWindows + dockWindowsMovable + dockWindowsMovable + getLocation + hasDockWindow + isCustomizable + isDockEnabled + isDockMenuEnabled + leftDock + lineUpDockWindows + menuAboutToShow + menuBar + moveDockWindow + opaqueMoving + opaqueMoving + pixmapSizeChanged + removeDockWindow + rightDock + setAppropriate + setCentralWidget + setDockEnabled + setDockMenuEnabled + setDockWindowsMovable + setMenuBar + setOpaqueMoving + setStatusBar + setToolTipGroup + setUpLayout + setUsesBigPixmaps + setUsesTextLabel + showDockMenu + statusBar + toolBars + toolTipGroup + topDock + usesBigPixmaps + usesBigPixmaps + usesTextLabel + usesTextLabel + usesTextLabelChanged + whatsThis + ~QMainWindow + operator<< + operator>> +
+
+
+
+ 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 +
+
+
+
+ QMemArray + ConstIterator + Iterator + assign + at + begin + bsearch + contains + copy + count + data + detach + duplicate + end + fill + find + isEmpty + isNull + nrefs + operator const type * + operator!= + operator= + operator== + operator[] + resetRawData + resize + setRawData + size + sort + truncate + ~QMemArray + operator<< + operator>> + qChecksum +
+
+
+
+ QMenuBar + Separator + activated + defaultUp + drawContents + heightForWidth + hide + highlighted + isDefaultUp + menuContentsChanged + menuStateChanged + setDefaultUp + setupAccelerators + show + ~QMenuBar +
+
+
+
+ QMenuData + accel + activateItemAt + changeItem + changeItemIconSet + clear + connectItem + count + disconnectItem + findItem + iconSet + idAt + indexOf + insertItem + insertSeparator + isItemActive + isItemChecked + isItemEnabled + isItemVisible + itemParameter + menuContentsChanged + menuDelPopup + menuInsPopup + menuStateChanged + pixmap + removeItem + removeItemAt + setAccel + setId + setItemChecked + setItemEnabled + setItemParameter + setItemVisible + setWhatsThis + text + updateItem + whatsThis + ~QMenuData +
+
+
+
+ QMessageBox + Icon + about + aboutQt + adjustSize + buttonText + critical + icon + icon + iconPixmap + iconPixmap + information + question + setButtonText + setIcon + setIconPixmap + setText + setTextFormat + standardIcon + text + text + textFormat + textFormat + warning + ~QMessageBox +
+
+
+
+ QMetaObject + classInfo + className + findProperty + inherits + numClassInfo + numProperties + numSignals + numSlots + property + propertyNames + signalNames + slotNames + superClass + superClassName +
+
+
+
+ QMetaProperty + designable + enumKeys + isEnumType + isSetType + keyToValue + keysToValue + name + reset + scriptable + stored + type + valueToKey + valueToKeys + writable +
+
+
+
+ QMimeSource + encodedData + format + provides + serialNumber + ~QMimeSource +
+
+
+
+ QMimeSourceFactory + addFactory + addFilePath + data + defaultFactory + filePath + makeAbsolute + removeFactory + setData + setDefaultFactory + setExtensionType + setFilePath + setImage + setPixmap + setText + takeDefaultFactory + ~QMimeSourceFactory +
+
+
+
+ QMotif + applicationContext + x11Display + ~QMotif +
+
+
+
+ QMotifDialog + acceptCallback + dialog + rejectCallback + shell + ~QMotifDialog +
+
+
+
+ QMotifPlusStyle +
+
+
+
+ QMotifStyle + setUseHighlightColors + useHighlightColors +
+
+
+
+ QMotifWidget + motifWidget + ~QMotifWidget +
+
+
+
+ QMouseDriverFactory + create + keys +
+
+
+
+ QMouseDriverPlugin + create + keys + ~QMouseDriverPlugin +
+
+
+
+ QMouseEvent + accept + button + globalPos + globalX + globalY + ignore + isAccepted + pos + state + stateAfter + x + y +
+
+
+
+ QMoveEvent + oldPos + pos +
+
+
+
+ QMovie + Status + backgroundColor + connectResize + connectStatus + connectUpdate + disconnectResize + disconnectStatus + disconnectUpdate + finished + frameImage + frameNumber + framePixmap + getValidRect + isNull + operator= + pause + paused + pushData + pushSpace + restart + running + setBackgroundColor + setSpeed + speed + step + steps + unpause + ~QMovie +
+
+
+
+ alignment + alignment + atBeginning + atBeginning + atEnd + atEnd + backspace + cursorDown + cursorLeft + cursorPoint + cursorRight + cursorUp + cursorWordBackward + cursorWordForward + edited + edited + end + getMarkedRegion + hasMarkedText + home + insertAndMark + insertAt + insertLine + killLine + lineLength + markedText + newLine + numLines + numLines + pageDown + pageUp + removeLine + setAlignment + setCursorPosition + setEdited + textLine +
+
+
+
+ QMutex + lock + locked + tryLock + unlock + ~QMutex +
+
+
+
+ QMutexLocker + mutex + ~QMutexLocker +
+
+
+
+ QNetworkOperation + arg + errorCode + free + operation + protocolDetail + rawArg + setArg + setErrorCode + setProtocolDetail + setRawArg + setState + state + ~QNetworkOperation +
+
+
+
+ QNetworkProtocol + ConnectionState + Error + Operation + State + addOperation + autoDelete + checkConnection + clearOperationQueue + connectionStateChanged + createdDirectory + data + dataTransferProgress + finished + getNetworkProtocol + hasOnlyLocalFileSystem + itemChanged + newChild + newChildren + operationGet + operationInProgress + operationListChildren + operationMkDir + operationPut + operationRemove + operationRename + registerNetworkProtocol + removed + setAutoDelete + setUrl + start + stop + supportedOperations + url + ~QNetworkProtocol +
+
+
+
+ QNPInstance + InstanceMode + Reason + StreamMode + arg + argc + argn + argv + getJavaPeer + getURL + getURLNotify + mode + newStream + newStreamCreated + newWindow + notifyURL + postURL + print + printFullPage + status + streamAsFile + streamDestroyed + userAgent + widget + write + writeReady + ~QNPInstance +
+
+
+
+ QNPlugin + actual + create + getJavaClass + getJavaEnv + getMIMEDescription + getPluginDescriptionString + getPluginNameString + getVersionInfo + newInstance + unuseJavaClass + ~QNPlugin +
+
+
+
+ QNPStream + complete + end + instance + lastModified + okay + requestRead + seekable + type + url + write + ~QNPStream +
+
+
+
+ QNPWidget + enterInstance + instance + leaveInstance + ~QNPWidget +
+
+
+
+ QObject + activate_signal + blockSignals + checkConnectArgs + child + childEvent + children + className + cleanupEventFilter + connect + connectNotify + customEvent + deleteLater + destroyed + disconnect + disconnectNotify + dumpObjectInfo + dumpObjectTree + event + eventFilter + highPriority + inherits + insertChild + installEventFilter + isA + isWidgetType + killTimer + killTimers + metaObject + name + name + normalizeSignalSlot + objectTrees + parent + property + queryList + removeChild + removeEventFilter + sender + setName + setProperty + signalsBlocked + startTimer + timerEvent + tr + trUtf8 + ~QObject + qt_find_obj_child +
+
+
+
+ QObjectCleanupHandler + add + clear + isEmpty + remove + ~QObjectCleanupHandler +
+
+
+
+ QObjectList + operator= + ~QObjectList +
+
+
+
+ QObjectListIterator + operator= +
+
+
+
+ QPaintDevice + cmd + handle + isExtDev + paintingActive + x11AppCells + x11AppColormap + x11AppDefaultColormap + x11AppDefaultVisual + x11AppDepth + x11AppDisplay + x11AppDpiX + x11AppDpiY + x11AppRootWindow + x11AppScreen + x11AppVisual + x11Cells + x11Colormap + x11DefaultColormap + x11DefaultVisual + x11Depth + x11Display + x11Screen + x11SetAppDpiX + x11SetAppDpiY + x11Visual + ~QPaintDevice + bitBlt +
+
+
+
+ QPaintDeviceMetrics + depth + height + heightMM + logicalDpiX + logicalDpiY + numColors + width + widthMM +
+
+
+
+ QPainter + CoordinateMode + TextDirection + backgroundColor + backgroundMode + begin + boundingRect + brush + brushOrigin + clipRegion + device + drawArc + drawChord + drawConvexPolygon + drawCubicBezier + drawEllipse + drawImage + drawLine + drawLineSegments + drawPicture + drawPie + drawPixmap + drawPoint + drawPoints + drawPolygon + drawPolyline + drawRect + drawRoundRect + drawText + drawTiledPixmap + drawWinFocusRect + end + eraseRect + fillRect + flush + font + fontInfo + fontMetrics + handle + hasClipping + hasViewXForm + hasWorldXForm + isActive + lineTo + moveTo + pen + rasterOp + redirect + resetXForm + restore + rotate + save + scale + setBackgroundColor + setBackgroundMode + setBrush + setBrushOrigin + setClipRect + setClipRegion + setClipping + setFont + setPen + setRasterOp + setTabArray + setTabStops + setViewXForm + setViewport + setWindow + setWorldMatrix + setWorldXForm + shear + tabArray + tabStops + translate + viewport + window + worldMatrix + xForm + xFormDev + ~QPainter + qDrawPlainRect + qDrawShadeLine + qDrawShadePanel + qDrawShadeRect + qDrawWinButton + qDrawWinPanel +
+
+
+
+ QPaintEvent + erased + rect + region +
+
+
+
+ QPair + first_type + second_type + qMakePair +
+
+
+
+ QPalette + ColorGroup + active + brush + color + copy + detach + disabled + inactive + isCopyOf + operator!= + operator= + operator== + serialNumber + setActive + setBrush + setColor + setDisabled + setInactive + ~QPalette + operator<< + operator>> +
+
+
+
+ QPen + capStyle + color + copy + detach + joinStyle + operator!= + operator= + operator== + setCapStyle + setColor + setJoinStyle + setStyle + setWidth + style + width + ~QPen + operator<< + operator>> +
+
+
+
+ QPicture + boundingRect + copy + data + detach + isNull + load + metric + operator= + play + save + setBoundingRect + setData + size + ~QPicture + operator<< + operator>> +
+
+
+
+ QPixmap + ColorMode + Optimization + convertFromImage + convertToImage + copy + createHeuristicMask + defaultDepth + defaultOptimization + depth + detach + fill + fromMimeSource + grabWidget + grabWindow + hasAlpha + hasAlphaChannel + height + imageFormat + isNull + isQBitmap + load + loadFromData + mask + metric + operator= + optimization + rect + resize + save + selfMask + serialNumber + setDefaultOptimization + setMask + setOptimization + size + trueMatrix + width + xForm + ~QPixmap + copyBlt + operator<< + operator>> +
+
+
+
+ QPixmapCache + cacheLimit + clear + find + insert + remove + setCacheLimit +
+
+
+
+ QPlatinumStyle + drawRiffles + mixedColor +
+
+
+
+ QPNGImagePacker + packImage + setPixelAlignment +
+
+
+
+ QPoint + isNull + manhattanLength + operator*= + operator+= + operator-= + operator/= + rx + ry + setX + setY + x + y + operator!= + operator* + operator+ + operator- + operator/ + operator<< + operator== + operator>> +
+
+
+
+ QPointArray + boundingRect + copy + cubicBezier + makeArc + makeEllipse + operator= + point + putPoints + setPoint + setPoints + translate + ~QPointArray + operator<< + operator>> +
+
+
+
+ QPopupMenu + aboutToHide + aboutToShow + activated + checkable + columns + drawContents + drawItem + exec + highlighted + idAt + insertTearOffHandle + isCheckable + itemHeight + popup + setActiveItem + setCheckable + updateItem + ~QPopupMenu +
+
+
+
+ QPrinter + ColorMode + Orientation + PageOrder + PageSize + PaperSource + PrintRange + PrinterMode + PrinterOption + abort + aborted + colorMode + creator + docName + fromPage + fullPage + isOptionEnabled + margins + maxPage + minPage + newPage + numCopies + orientation + outputFileName + outputToFile + pageOrder + pageSize + paperSource + printProgram + printRange + printerName + printerSelectionOption + resolution + setColorMode + setCreator + setDocName + setFromTo + setFullPage + setMargins + setMinMax + setNumCopies + setOptionEnabled + setOrientation + setOutputFileName + setOutputToFile + setPageOrder + setPageSize + setPaperSource + setPrintProgram + setPrintRange + setPrinterName + setPrinterSelectionOption + setResolution + setWinPageSize + setup + toPage + winPageSize + ~QPrinter +
+
+
+
+ QProcess + Communication + addArgument + arguments + canReadLineStderr + canReadLineStdout + clearArguments + closeStdin + communication + exitStatus + isRunning + kill + launch + launchFinished + normalExit + processExited + processIdentifier + readLineStderr + readLineStdout + readStderr + readStdout + readyReadStderr + readyReadStdout + setArguments + setCommunication + setWorkingDirectory + start + tryTerminate + workingDirectory + writeToStdin + wroteToStdin + ~QProcess +
+
+
+
+ QProgressBar + centerIndicator + centerIndicator + indicatorFollowsStyle + indicatorFollowsStyle + percentageVisible + percentageVisible + progress + progress + progressString + progressString + reset + setCenterIndicator + setIndicator + setIndicatorFollowsStyle + setPercentageVisible + setProgress + setTotalSteps + totalSteps + totalSteps +
+
+
+
+ QProgressDialog + autoClose + autoClose + autoReset + autoReset + bar + cancel + canceled + forceShow + label + labelText + labelText + minimumDuration + minimumDuration + progress + progress + reset + setAutoClose + setAutoReset + setBar + setCancelButton + setCancelButtonText + setLabel + setLabelText + setMinimumDuration + setProgress + setTotalSteps + sizeHint + totalSteps + totalSteps + wasCanceled + wasCanceled + ~QProgressDialog +
+
+
+
+ QPtrCollection + Item + autoDelete + clear + count + deleteItem + newItem + setAutoDelete + ~QPtrCollection +
+
+
+
+ QPtrDict + clear + count + find + insert + isEmpty + operator= + operator[] + read + remove + replace + resize + size + statistics + take + write + ~QPtrDict +
+
+
+
+ QPtrDictIterator + count + current + currentKey + isEmpty + operator type * + operator() + operator++ + operator+= + toFirst + ~QPtrDictIterator +
+
+
+
+ QPtrList + append + at + clear + compareItems + contains + containsRef + count + current + currentNode + find + findNext + findNextRef + findRef + first + getFirst + getLast + inSort + insert + isEmpty + last + next + operator!= + operator= + operator== + prepend + prev + read + remove + removeFirst + removeLast + removeNode + removeRef + replace + sort + take + takeNode + toVector + write + ~QPtrList +
+
+
+
+ QPtrListIterator + atFirst + atLast + count + current + isEmpty + operator type * + operator() + operator* + operator++ + operator+= + operator-- + operator-= + operator= + toFirst + toLast + ~QPtrListIterator +
+
+
+
+ QPtrQueue + autoDelete + clear + count + current + dequeue + enqueue + head + isEmpty + operator type * + operator= + read + remove + setAutoDelete + write + ~QPtrQueue +
+
+
+
+ QPtrStack + autoDelete + clear + count + current + isEmpty + operator type * + operator= + pop + push + read + remove + setAutoDelete + top + write + ~QPtrStack +
+
+
+
+ QPtrVector + at + bsearch + clear + compareItems + contains + containsRef + count + data + fill + find + findRef + insert + isEmpty + isNull + operator= + operator== + operator[] + read + remove + resize + size + sort + take + write + ~QPtrVector +
+
+
+
+ QPushButton + autoDefault + autoDefault + autoMask + default + flat + iconSet + iconSet + isDefault + isFlat + on + popup + setAutoDefault + setDefault + setFlat + setIconSet + setOn + setPopup + setToggleButton + toggleButton + ~QPushButton +
+
+
+
+ QRadioButton + autoMask + checked + isChecked + setChecked +
+
+
+
+ QRangeControl + addLine + addPage + bound + directSetValue + lineStep + maxValue + minValue + pageStep + positionFromValue + prevValue + rangeChange + setMaxValue + setMinValue + setRange + setSteps + setValue + stepChange + subtractLine + subtractPage + value + valueChange + valueFromPosition + ~QRangeControl +
+
+
+
+ QRect + addCoords + bottom + bottomLeft + bottomRight + center + contains + coords + height + intersect + intersects + isEmpty + isNull + isValid + left + moveBottom + moveBottomLeft + moveBottomRight + moveBy + moveCenter + moveLeft + moveRight + moveTop + moveTopLeft + moveTopRight + normalize + operator& + operator&= + operator| + operator|= + rBottom + rLeft + rRight + rTop + rect + right + setBottom + setBottomLeft + setBottomRight + setCoords + setHeight + setLeft + setRect + setRight + setSize + setTop + setTopLeft + setTopRight + setWidth + setX + setY + size + top + topLeft + topRight + unite + width + x + y + operator!= + operator<< + operator== + operator>> +
+
+
+
+ QRegExp + CaretMode + cap + capturedTexts + caseSensitive + errorString + escape + exactMatch + isEmpty + isValid + matchedLength + minimal + numCaptures + operator!= + operator= + operator== + pattern + pos + search + searchRev + setCaseSensitive + setMinimal + setPattern + setWildcard + wildcard + ~QRegExp +
+
+
+
+ QRegExpValidator + regExp + setRegExp + validate + ~QRegExpValidator +
+
+
+
+ QRegion + RegionType + boundingRect + contains + copy + detach + eor + handle + intersect + isEmpty + isNull + operator!= + operator& + operator&= + operator+ + operator+= + operator- + operator-= + operator= + operator== + operator^ + operator^= + operator| + operator|= + rects + subtract + translate + unite + ~QRegion + operator<< + operator>> +
+
+
+
+ QResizeEvent + oldSize + size +
+
+
+
+ QScreen + alloc + base + blank + cache + clut + connect + createGfx + depth + deviceHeight + deviceWidth + disconnect + height + initCursor + initDevice + isInterlaced + isTransformed + lastOp + linestep + mapFromDevice + mapToDevice + numCols + onCard + opType + pixelType + pixmapDepth + pixmapLinestepAlignment + pixmapOffsetAlignment + restore + save + screenGfx + screenSize + set + setDirty + setMode + shutdownDevice + supportsDepth + totalSize + transformOrientation + uncache + width + ~QScreen +
+
+
+
+ QScrollBar + doAutoRepeat + draggingSlider + draggingSlider + hideEvent + lineStep + lineStep + maxValue + maxValue + minValue + minValue + nextLine + nextPage + orientation + orientation + pageStep + pageStep + prevLine + prevPage + setLineStep + setMaxValue + setMinValue + setOrientation + setPageStep + setPalette + setTracking + setValue + sliderMoved + sliderPressed + sliderRect + sliderReleased + sliderStart + startAutoRepeat + stopAutoRepeat + tracking + tracking + value + value + valueChanged + ~QScrollBar +
+
+
+
+ QScrollView + ResizePolicy + ScrollBarMode + addChild + bottomMargin + center + childX + childY + clipper + contentsContextMenuEvent + contentsDragEnterEvent + contentsDragLeaveEvent + contentsDragMoveEvent + contentsDropEvent + contentsHeight + contentsHeight + contentsMouseDoubleClickEvent + contentsMouseMoveEvent + contentsMousePressEvent + contentsMouseReleaseEvent + contentsMoving + contentsToViewport + contentsWheelEvent + contentsWidth + contentsWidth + contentsX + contentsX + contentsY + contentsY + cornerWidget + dragAutoScroll + dragAutoScroll + drawContents + drawContentsOffset + enableClipper + ensureVisible + eventFilter + hScrollBarMode + hScrollBarMode + hasStaticBackground + horizontalScrollBar + horizontalSliderPressed + horizontalSliderReleased + isHorizontalSliderPressed + isVerticalSliderPressed + leftMargin + moveChild + moveContents + removeChild + repaintContents + resizeContents + resizePolicy + resizePolicy + rightMargin + scrollBy + setContentsPos + setCornerWidget + setDragAutoScroll + setHBarGeometry + setHScrollBarMode + setMargins + setResizePolicy + setStaticBackground + setVBarGeometry + setVScrollBarMode + topMargin + updateContents + updateScrollBars + vScrollBarMode + vScrollBarMode + verticalScrollBar + verticalSliderPressed + verticalSliderReleased + viewport + viewportPaintEvent + viewportResizeEvent + viewportSize + viewportToContents + visibleHeight + visibleHeight + visibleWidth + visibleWidth + ~QScrollView +
+
+
+
+ QSemaphore + available + operator++ + operator+= + operator-- + operator-= + total + tryAccess + ~QSemaphore +
+
+
+
+ QServerSocket + address + newConnection + ok + port + setSocket + socket + socketDevice + ~QServerSocket +
+
+
+
+ QSessionManager + RestartHint + allowsErrorInteraction + allowsInteraction + cancel + discardCommand + handle + isPhase2 + release + requestPhase2 + restartCommand + restartHint + sessionId + sessionKey + setDiscardCommand + setManagerProperty + setRestartCommand + setRestartHint +
+
+
+
+ QSettings + Format + Scope + System + beginGroup + endGroup + entryList + group + insertSearchPath + readBoolEntry + readDoubleEntry + readEntry + readListEntry + readNumEntry + removeEntry + removeSearchPath + resetGroup + setPath + subkeyList + writeEntry + ~QSettings +
+
+
+
+ QSGIStyle + ~QSGIStyle +
+
+
+
+ QShowEvent +
+
+
+
+ QSignal + activate + connect + disconnect + setValue + value + ~QSignal +
+
+
+
+ QSignalMapper + map + mapped + removeMappings + setMapping + ~QSignalMapper +
+
+
+
+ QSimpleRichText + adjustSize + anchorAt + context + draw + height + inText + setDefaultFont + setWidth + width + widthUsed + ~QSimpleRichText +
+
+
+
+ QSize + ScaleMode + boundedTo + expandedTo + height + isEmpty + isNull + isValid + operator*= + operator+= + operator-= + operator/= + rheight + rwidth + scale + setHeight + setWidth + transpose + width + operator!= + operator* + operator+ + operator- + operator/ + operator<< + operator== + operator>> +
+
+
+
+ QSizeGrip + mouseMoveEvent + mousePressEvent + paintEvent + sizeHint + ~QSizeGrip +
+
+
+
+ QSizePolicy + ExpandData + SizeType + expanding + hasHeightForWidth + horData + horStretch + mayGrowHorizontally + mayGrowVertically + mayShrinkHorizontally + mayShrinkVertically + operator!= + operator== + setHeightForWidth + setHorData + setHorStretch + setVerData + setVerStretch + transpose + verData + verStretch +
+
+
+
+ QSjisCodec + mimeName + ~QSjisCodec +
+
+
+
+ QSlider + TickSetting + addStep + lineStep + lineStep + maxValue + maxValue + minValue + minValue + moveSlider + orientation + orientation + pageStep + pageStep + rangeChange + setLineStep + setMaxValue + setMinValue + setOrientation + setPageStep + setPalette + setTickInterval + setTickmarks + setTracking + setValue + sliderMoved + sliderPressed + sliderRect + sliderReleased + sliderStart + subtractStep + tickInterval + tickInterval + tickmarks + tickmarks + tracking + tracking + value + value + valueChange + valueChanged + ~QSlider +
+
+
+
+ QSocket + Error + State + address + at + atEnd + bytesAvailable + bytesToWrite + bytesWritten + canReadLine + clearPendingData + close + connectToHost + connected + connectionClosed + consumeWriteBuf + delayedCloseFinished + error + flush + getch + hostFound + open + peerAddress + peerName + peerPort + port + putch + readBlock + readBufferSize + readLine + readyRead + setReadBufferSize + setSocket + setSocketDevice + setSocketIntern + size + socket + socketDevice + state + tryConnecting + ungetch + waitForMore + writeBlock + ~QSocket +
+
+
+
+ QSocketDevice + Error + Protocol + Type + accept + address + addressReusable + bind + blocking + bytesAvailable + connect + createNewSocket + error + fetchConnectionParameters + isValid + listen + option + peerAddress + peerPort + port + protocol + readBlock + receiveBufferSize + sendBufferSize + setAddressReusable + setBlocking + setError + setOption + setReceiveBufferSize + setSendBufferSize + setSocket + socket + type + waitForMore + writeBlock + ~QSocketDevice +
+
+
+
+ QSocketNotifier + Type + activated + isEnabled + setEnabled + socket + type + ~QSocketNotifier +
+
+
+
+ operator= + ~QSortedList +
+
+
+
+ QSound + available + fileName + isAvailable + isFinished + loops + loopsRemaining + play + setLoops + stop + ~QSound +
+
+
+
+ QSpacerItem + changeSize + expanding + isEmpty + maximumSize + minimumSize + setGeometry + sizeHint +
+
+
+
+ QSpinBox + ButtonSymbols + buttonSymbols + buttonSymbols + cleanText + cleanText + currentValueText + downRect + editor + eventFilter + interpretText + lineStep + lineStep + mapTextToValue + mapValueToText + maxValue + maxValue + minValue + minValue + prefix + prefix + rangeChange + selectAll + setButtonSymbols + setLineStep + setMaxValue + setMinValue + setPrefix + setSpecialValueText + setSuffix + setValidator + setValue + setWrapping + specialValueText + specialValueText + stepDown + stepUp + suffix + suffix + text + text + textChanged + upRect + updateDisplay + validator + value + value + valueChange + valueChanged + wrapping + wrapping + ~QSpinBox +
+
+
+
+ QSplashScreen + clear + drawContents + finish + message + messageChanged + pixmap + repaint + setPixmap + ~QSplashScreen +
+
+
+
+ QSplitter + ResizeMode + adjustPos + childEvent + childrenCollapsible + childrenCollapsible + getRange + handleWidth + handleWidth + idAfter + moveSplitter + moveToFirst + moveToLast + opaqueResize + opaqueResize + orientation + orientation + processChildEvents + refresh + setChildrenCollapsible + setCollapsible + setHandleWidth + setOpaqueResize + setOrientation + setResizeMode + setRubberband + setSizes + sizes + ~QSplitter + operator<< + operator>> +
+
+
+
+ QSql + Confirm + Location + Op + ParameterType + TableType +
+
+
+
+ QSqlCursor + Mode + append + calculateField + canDelete + canInsert + canUpdate + clear + del + editBuffer + filter + index + insert + isCalculated + isNull + isReadOnly + isTrimmed + mode + name + operator= + primaryIndex + primeDelete + primeInsert + primeUpdate + remove + select + setCalculated + setFilter + setGenerated + setMode + setName + setPrimaryIndex + setSort + setTrimmed + sort + toString + update + ~QSqlCursor +
+
+
+
+ QSqlDatabase + addDatabase + close + commit + connectOptions + connectOptions + contains + database + databaseName + databaseName + driver + driverName + drivers + exec + hostName + hostName + isDriverAvailable + isOpen + isOpenError + lastError + open + password + password + port + port + primaryIndex + record + recordInfo + registerSqlDriver + removeDatabase + rollback + setConnectOptions + setDatabaseName + setHostName + setPassword + setPort + setUserName + tables + transaction + userName + userName + ~QSqlDatabase +
+
+
+
+ QSqlDriver + DriverFeature + beginTransaction + close + commitTransaction + createQuery + formatValue + hasFeature + isOpen + isOpenError + lastError + nullText + open + primaryIndex + record + recordInfo + rollbackTransaction + setLastError + setOpen + setOpenError + tables + ~QSqlDriver +
+
+
+
+ QSqlDriverPlugin + create + keys + ~QSqlDriverPlugin +
+
+
+
+ QSqlEditorFactory + createEditor + defaultFactory + installDefaultFactory + ~QSqlEditorFactory +
+
+
+
+ QSqlError + Type + databaseText + driverText + number + operator= + setDatabaseText + setDriverText + setNumber + setType + text + type + ~QSqlError +
+
+
+
+ QSqlField + clear + isNull + isReadOnly + name + operator= + operator== + setName + setNull + setReadOnly + setValue + type + value + ~QSqlField +
+
+
+
+ QSqlFieldInfo + defaultValue + isCalculated + isGenerated + isRetquired + isTrim + length + name + operator= + operator== + precision + setCalculated + setGenerated + setTrim + toField + type + typeID + ~QSqlFieldInfo +
+
+
+
+ QSqlForm + clear + clearValues + count + fieldToWidget + insert + installPropertyMap + readField + readFields + remove + setRecord + widget + widgetToField + writeField + writeFields + ~QSqlForm +
+
+
+
+ QSqlIndex + append + cursorName + fromStringList + isDescending + name + operator= + setCursorName + setDescending + setName + ~QSqlIndex +
+
+
+
+ QSqlPropertyMap + defaultMap + insert + installDefaultMap + property + remove + setProperty + ~QSqlPropertyMap +
+
+
+
+ QSqlQuery + addBindValue + afterSeek + at + beforeSeek + bindValue + boundValue + boundValues + driver + exec + executedQuery + first + isActive + isForwardOnly + isNull + isSelect + isValid + last + lastError + lastQuery + next + numRowsAffected + operator= + prepare + prev + result + seek + setForwardOnly + size + value + ~QSqlQuery +
+
+
+
+ QSqlRecord + append + clear + clearValues + contains + count + field + fieldName + insert + isEmpty + isGenerated + isNull + operator= + position + remove + setGenerated + setNull + setValue + toString + toStringList + value + ~QSqlRecord +
+
+
+
+ QSqlRecordInfo + contains + find + toRecord +
+
+
+
+ QSqlResult + at + data + driver + fetch + fetchFirst + fetchLast + fetchNext + fetchPrev + isActive + isForwardOnly + isNull + isSelect + isValid + lastError + lastQuery + numRowsAffected + reset + setActive + setAt + setForwardOnly + setLastError + setQuery + setSelect + size + ~QSqlResult +
+
+
+
+ QSqlSelectCursor + ~QSqlSelectCursor +
+
+
+
+ QStatusBar + addWidget + clear + hideOrShow + isSizeGripEnabled + message + messageChanged + paintEvent + reformat + removeWidget + setSizeGripEnabled + sizeGripEnabled + ~QStatusBar +
+
+
+
+ QStoredDrag + encodedData + setEncodedData + ~QStoredDrag +
+
+
+
+ QStrIList + ~QStrIList +
+
+
+
+ QString + SectionFlags + append + arg + ascii + at + capacity + compare + compose + constref + contains + detach + endsWith + fill + find + findRev + fromAscii + fromLatin1 + fromLocal8Bit + fromUcs2 + fromUtf8 + insert + isEmpty + isNull + latin1 + latin1ToUnicode + left + leftJustify + length + local8Bit + localeAwareCompare + lower + mid + number + operator const char * + string + operator! + operator+= + operator= + operator[] + prepend + real_detach + ref + remove + replace + reserve + right + rightJustify + section + setAscii + setLatin1 + setLength + setNum + setUnicode + setUnicodeCodes + simplifyWhiteSpace + sprintf + squeeze + startsWith + stripWhiteSpace + toDouble + toFloat + toInt + toLong + toLongLong + toShort + toUInt + toULong + toULongLong + toUShort + truncate + ucs2 + unicode + unicodeToLatin1 + upper + utf8 + ~QString + operator!= + operator+ + operator< + operator<< + operator<= + operator== + operator> + operator>= + operator>> +
+
+
+
+ QStringList + fromStrList + grep + gres + join + sort + split +
+
+
+
+ QStrList + operator= + ~QStrList +
+
+
+
+ QStrListIterator +
+
+
+
+ QStyle + ComplexControl + ContentsType + ControlElement + PixelMetric + PrimitiveElement + StyleFlags + StyleHint + StylePixmap + SubControl + SubRect + drawComplexControl + drawComplexControlMask + drawControl + drawControlMask + drawItem + drawPrimitive + itemRect + pixelMetric + polish + polishPopupMenu + querySubControl + querySubControlMetrics + sizeFromContents + styleHint + stylePixmap + subRect + unPolish + visualRect + ~QStyle +
+
+
+
+ QStyleFactory + create + keys +
+
+
+
+ QStyleOption + StyleOptionDefault + arrowType + checkListItem + color + day + frameShadow + frameShape + headerSection + isDefault + lineWidth + listViewItem + maxIconWidth + menuItem + midLineWidth + rect + tab + tabWidth + widget +
+
+
+
+ QStylePlugin + create + keys + ~QStylePlugin +
+
+
+
+ QStyleSheet + convertFromPlainText + defaultSheet + error + escape + item + mightBeRichText + scaleFont + setDefaultSheet + tag + ~QStyleSheet +
+
+
+
+ QStyleSheetItem + DisplayMode + ListStyle + Margin + VerticalAlignment + WhiteSpaceMode + alignment + allowedInContext + color + contexts + definesFontItalic + definesFontStrikeOut + definesFontUnderline + displayMode + fontFamily + fontItalic + fontSize + fontStrikeOut + fontUnderline + fontWeight + isAnchor + listStyle + logicalFontSize + logicalFontSizeStep + margin + name + operator= + selfNesting + setAlignment + setAnchor + setColor + setContexts + setDisplayMode + setFontFamily + setFontItalic + setFontSize + setFontStrikeOut + setFontUnderline + setFontWeight + setListStyle + setLogicalFontSize + setLogicalFontSizeStep + setMargin + setSelfNesting + setVerticalAlignment + setWhiteSpaceMode + styleSheet + verticalAlignment + whiteSpaceMode + ~QStyleSheetItem +
+
+
+
+ QSyntaxHighlighter + currentParagraph + highlightParagraph + rehighlight + setFormat + textEdit + ~QSyntaxHighlighter +
+
+
+
+ Qt + AlignmentFlags + AnchorAttribute + ArrowType + BGMode + BackgroundMode + BrushStyle + ButtonState + Corner + CursorShape + DateFormat + Dock + ImageConversionFlags + Key + MacintoshVersion + Modifier + Orientation + PaintUnit + PenCapStyle + PenJoinStyle + PenStyle + RasterOp + SequenceMatch + SortOrder + StringComparisonMode + TextFlags + TextFormat + TimeSpec + UIEffect + WidgetFlags + WidgetState + WindowState + WindowsVersion +
+
+
+
+ QTab + iconSet + identifier + isEnabled + rect + setEnabled + setIconSet + setIdentifier + setRect + setText + text + ~QTab +
+
+
+
+ QTabBar + Shape + addTab + count + count + currentTab + currentTab + indexOf + insertTab + isTabEnabled + keyboardFocusTab + keyboardFocusTab + layoutChanged + layoutTabs + paint + paintEvent + paintLabel + removeTab + removeToolTip + selectTab + selected + setCurrentTab + setShape + setTabEnabled + setToolTip + shape + shape + tab + tabAt + tabList + toolTip + ~QTabBar +
+
+
+
+ QTabDialog + aboutToShow + addTab + applyButtonPressed + cancelButtonPressed + changeTab + currentChanged + currentPage + defaultButtonPressed + hasApplyButton + hasCancelButton + hasDefaultButton + hasHelpButton + hasOkButton + helpButtonPressed + insertTab + isTabEnabled + removePage + setApplyButton + setCancelButton + setDefaultButton + setFont + setHelpButton + setOkButton + setSizes + setTabBar + setTabEnabled + setUpLayout + showPage + showTab + tabBar + tabLabel + ~QTabDialog +
+
+
+
+ QTable + EditMode + FocusStyle + SelectionMode + activateNextCell + addSelection + adjustColumn + adjustRow + beginEdit + cellGeometry + cellRect + cellWidget + clearCell + clearCellWidget + clearSelection + clicked + columnAt + columnClicked + columnIndexChanged + columnMovingEnabled + columnMovingEnabled + columnPos + columnWidth + columnWidthChanged + contentsDragEnterEvent + contentsDragLeaveEvent + contentsDragMoveEvent + contentsDropEvent + contextMenuRequested + createEditor + currEditCol + currEditRow + currentChanged + currentColumn + currentRow + currentSelection + doubleClicked + dragEnabled + dragObject + drawContents + dropped + editCell + editMode + endEdit + ensureCellVisible + focusStyle + focusStyle + hideColumn + hideRow + horizontalHeader + indexOf + insertColumns + insertRows + insertWidget + isColumnHidden + isColumnReadOnly + isColumnSelected + isColumnStretchable + isEditing + isReadOnly + isRowHidden + isRowReadOnly + isRowSelected + isRowStretchable + isSelected + item + numCols + numCols + numRows + numRows + numSelections + numSelections + paintCell + paintEmptyArea + paintFocus + pixmap + pressed + readOnly + removeColumn + removeColumns + removeRow + removeRows + removeSelection + repaintSelections + resizeData + rowAt + rowHeight + rowHeightChanged + rowIndexChanged + rowMovingEnabled + rowMovingEnabled + rowPos + selectCells + selectColumn + selectRow + selection + selectionChanged + selectionMode + selectionMode + setCellContentFromEditor + setCellWidget + setColumnLabels + setColumnMovingEnabled + setColumnReadOnly + setColumnStretchable + setColumnWidth + setCurrentCell + setDragEnabled + setEditMode + setFocusStyle + setItem + setLeftMargin + setNumCols + setNumRows + setPixmap + setReadOnly + setRowHeight + setRowLabels + setRowMovingEnabled + setRowReadOnly + setRowStretchable + setSelectionMode + setShowGrid + setSorting + setText + setTopMargin + showColumn + showGrid + showGrid + showRow + sortColumn + sorting + sorting + startDrag + swapCells + swapColumns + swapRows + tableSize + takeItem + text + updateCell + updateGeometries + updateHeaderStates + valueChanged + verticalHeader + ~QTable +
+
+
+
+ QTableItem + EditType + alignment + col + colSpan + createEditor + editType + isEnabled + isReplaceable + key + paint + pixmap + row + rowSpan + rtti + setCol + setContentFromEditor + setEnabled + setPixmap + setReplaceable + setRow + setSpan + setText + setWordWrap + sizeHint + table + text + wordWrap + ~QTableItem +
+
+
+
+ QTableSelection + anchorCol + anchorRow + bottomRow + expandTo + init + isActive + isEmpty + leftCol + numCols + numRows + operator!= + operator== + rightCol + topRow +
+
+
+
+ QTabletEvent + TabletDevice + accept + device + globalPos + globalX + globalY + ignore + isAccepted + pos + pressure + uniqueId + x + xTilt + y + yTilt +
+
+
+
+ QTabWidget + TabPosition + TabShape + addTab + autoMask + changeTab + cornerWidget + count + count + currentChanged + currentPage + currentPage + currentPageIndex + indexOf + insertTab + isTabEnabled + label + margin + margin + page + removePage + removeTabToolTip + setCornerWidget + setCurrentPage + setMargin + setTabBar + setTabEnabled + setTabIconSet + setTabLabel + setTabPosition + setTabShape + setTabToolTip + showPage + showTab + tabBar + tabIconSet + tabLabel + tabPosition + tabPosition + tabShape + tabShape + tabToolTip +
+
+
+
+ QTextBrowser + anchorClicked + backward + backwardAvailable + forward + forwardAvailable + highlighted + home + keyPressEvent + linkClicked + modified + overwriteMode + readOnly + reload + setSource + setText + source + source + sourceChanged + undoDepth + undoRedoEnabled +
+
+
+
+ QTextCodec + canEncode + codecForCStrings + codecForContent + codecForIndex + codecForLocale + codecForMib + codecForName + codecForTr + deleteAllCodecs + fromUnicode + heuristicContentMatch + heuristicNameMatch + loadCharmap + loadCharmapFile + locale + makeDecoder + makeEncoder + mibEnum + mimeName + name + setCodecForCStrings + setCodecForLocale + setCodecForTr + simpleHeuristicNameMatch + toUnicode + ~QTextCodec +
+
+
+
+ QTextCodecPlugin + createForMib + createForName + mibEnums + names + ~QTextCodecPlugin +
+
+
+
+ QTextDecoder + toUnicode + ~QTextDecoder +
+
+
+
+ QTextDrag + canDecode + decode + setSubtype + setText + ~QTextDrag +
+
+
+
+ QTextEdit + AutoFormatting + CursorAction + KeyboardAction + VerticalAlignment + WordWrap + WrapPolicy + alignment + anchorAt + append + autoFormatting + autoFormatting + bold + charAt + clear + clearParagraphBackground + clicked + color + context + copy + copyAvailable + createPopupMenu + currentAlignmentChanged + currentColorChanged + currentFont + currentFontChanged + currentVerticalAlignmentChanged + cursorPositionChanged + cut + del + doKeyboardAction + documentTitle + documentTitle + doubleClicked + ensureCursorVisible + family + find + focusNextPrevChild + getCursorPosition + getSelection + hasSelectedText + hasSelectedText + heightForWidth + insert + insertAt + insertParagraph + isModified + isOverwriteMode + isReadOnly + isRedoAvailable + isUndoAvailable + isUndoRedoEnabled + italic + keyPressEvent + length + length + lineOfChar + lines + linesOfParagraph + linkUnderline + linkUnderline + maxLogLines + mimeSourceFactory + modificationChanged + modified + moveCursor + optimCheckLimit + overwriteMode + paper + paper + paragraphAt + paragraphBackgroundColor + paragraphLength + paragraphRect + paragraphs + paste + pasteSpecial + pasteSubType + placeCursor + pointSize + readOnly + redo + redoAvailable + removeParagraph + removeSelectedText + removeSelection + repaintChanged + returnPressed + scrollToAnchor + scrollToBottom + selectAll + selectedText + selectedText + selectionChanged + setAlignment + setAutoFormatting + setBold + setColor + setCurrentFont + setCursorPosition + setFamily + setItalic + setLinkUnderline + setMaxLogLines + setMimeSourceFactory + setModified + setOverwriteMode + setPaper + setParagraphBackgroundColor + setPointSize + setReadOnly + setSelection + setSelectionAttributes + setStyleSheet + setTabChangesFocus + setTabStopWidth + setText + setTextFormat + setUnderline + setUndoDepth + setUndoRedoEnabled + setVerticalAlignment + setWordWrap + setWrapColumnOrWidth + setWrapPolicy + styleSheet + sync + syntaxHighlighter + tabChangesFocus + tabChangesFocus + tabStopWidth + tabStopWidth + text + text + textChanged + textCursor + textFormat + textFormat + underline + undo + undoAvailable + undoDepth + undoDepth + undoRedoEnabled + wordWrap + wordWrap + wrapColumnOrWidth + wrapColumnOrWidth + wrapPolicy + wrapPolicy + zoomIn + zoomOut + zoomTo +
+
+
+
+ QTextEncoder + fromUnicode + ~QTextEncoder +
+
+
+
+ QTextIStream +
+
+
+
+ QTextOStream +
+
+
+
+ QTextStream + Encoding + atEnd + codec + device + fill + flags + operator<< + operator>> + precision + read + readLine + readRawBytes + reset + setCodec + setDevice + setEncoding + setf + skipWhiteSpace + ts_getbuf + ts_getline + ts_putc + unsetDevice + unsetf + width + writeRawBytes + ~QTextStream +
+
+
+
+ modified + overwriteMode + readOnly + undoDepth + undoRedoEnabled +
+
+
+
+ QThread + Priority + currentThread + exit + finished + msleep + run + running + sleep + start + terminate + usleep + wait + ~QThread +
+
+
+
+ QThreadStorage + hasLocalData + localData + setLocalData + ~QThreadStorage +
+
+
+
+ QTime + addMSecs + addSecs + currentTime + elapsed + fromString + hour + isNull + isValid + minute + msec + msecsTo + operator!= + operator< + operator<= + operator== + operator> + operator>= + restart + second + secsTo + setHMS + start + toString + operator<< + operator>> +
+
+
+
+ QTimeEdit + Display + autoAdvance + autoAdvance + display + display + maxValue + maxValue + minValue + minValue + sectionFormattedText + separator + setAutoAdvance + setDisplay + setHour + setMaxValue + setMinValue + setMinute + setRange + setSecond + setSeparator + setTime + time + time + valueChanged + ~QTimeEdit +
+
+
+
+ QTimer + changeInterval + isActive + singleShot + start + stop + timeout + timerId + ~QTimer +
+
+
+
+ QTimerEvent + timerId +
+
+
+
+ QToolBar + addSeparator + clear + label + label + mainWindow + setLabel + setStretchableWidget +
+
+
+
+ QToolBox + addItem + count + count + currentChanged + currentIndex + currentIndex + currentItem + indexOf + insertItem + isItemEnabled + item + itemIconSet + itemInserted + itemLabel + itemRemoved + itemToolTip + removeItem + setCurrentIndex + setCurrentItem + setItemEnabled + setItemIconSet + setItemLabel + setItemToolTip +
+
+
+
+ QToolButton + TextPosition + autoRaise + autoRaise + backgroundMode + iconSet + iconSet + on + openPopup + pixmap + popup + popupDelay + popupDelay + setAutoRaise + setIconSet + setOn + setPopup + setPopupDelay + setTextLabel + setTextPosition + setToggleButton + setUsesBigPixmap + setUsesTextLabel + textLabel + textLabel + textPosition + textPosition + toggle + toggleButton + uses3D + usesBigPixmap + usesBigPixmap + usesTextLabel + usesTextLabel + ~QToolButton +
+
+
+
+ QToolTip + add + clear + font + group + hide + isGloballyEnabled + maybeTip + palette + parentWidget + remove + setFont + setGloballyEnabled + setPalette + setWakeUpDelay + textFor + tip +
+
+
+
+ QToolTipGroup + delay + delay + enabled + enabled + removeTip + setDelay + setEnabled + showTip + ~QToolTipGroup +
+
+
+
+ QTranslator + SaveMode + clear + contains + findMessage + insert + isEmpty + load + messages + remove + save + squeeze + unsqueeze + ~QTranslator +
+
+
+
+ QTranslatorMessage + Prefix + comment + commonPrefix + context + hash + operator!= + operator< + operator<= + operator= + operator== + operator> + operator>= + setTranslation + sourceText + translation + write +
+
+
+
+ QTsciiCodec +
+
+
+
+ QUriDrag + canDecode + decode + decodeLocalFiles + decodeToUnicodeUris + localFileToUri + setFileNames + setUnicodeUris + setUris + unicodeUriToUri + uriToLocalFile + uriToUnicodeUri + ~QUriDrag +
+
+
+
+ QUrl + addPath + cdUp + decode + dirPath + encode + encodedPathAndQuery + fileName + hasHost + hasPassword + hasPath + hasPort + hasRef + hasUser + host + isLocalFile + isRelativeUrl + isValid + operator QString + operator= + operator== + parse + password + path + port + protocol + query + ref + reset + setEncodedPathAndQuery + setFileName + setHost + setPassword + setPath + setPort + setProtocol + setQuery + setRef + setUser + toString + user + ~QUrl +
+
+
+
+ QUrlInfo + PermissionSpec + equal + greaterThan + group + isDir + isExecutable + isFile + isReadable + isSymLink + isValid + isWritable + lastModified + lastRead + lessThan + name + operator= + operator== + owner + permissions + setDir + setFile + setGroup + setLastModified + setName + setOwner + setPermissions + setReadable + setSize + setSymLink + setWritable + size + ~QUrlInfo +
+
+
+
+ QUrlOperator + addEntry + clearEntries + connectionStateChanged + copy + createdDirectory + data + dataTransferProgress + deleteNetworkProtocol + finished + get + getNetworkProtocol + info + isDir + itemChanged + listChildren + mkdir + nameFilter + newChildren + put + remove + removed + rename + setNameFilter + start + startOperation + startedNextCopy + stop + ~QUrlOperator + qInitNetworkProtocols +
+
+
+
+ QUuid + Variant + Version + createUuid + isNull + operator QString + operator!= + operator< + operator= + operator== + operator> + toString + variant + version + operator<< + operator>> +
+
+
+
+ QValidator + State + fixup + validate + ~QValidator +
+
+
+
+ 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 +
+
+
+
+ QVariant + Type + asBitArray + asBitmap + asBool + asBrush + asByteArray + asCString + asColor + asColorGroup + asCursor + asDate + asDateTime + asDouble + asFont + asIconSet + asImage + asInt + asKeySequence + asList + asLongLong + asMap + asPalette + asPen + asPixmap + asPoint + asPointArray + asRect + asRegion + asSize + asSizePolicy + asString + asStringList + asTime + asUInt + asULongLong + canCast + cast + clear + isNull + isValid + nameToType + operator!= + operator= + operator== + toBitArray + toBitmap + toBool + toBrush + toByteArray + toCString + toColor + toColorGroup + toCursor + toDate + toDateTime + toDouble + toFont + toIconSet + toImage + toInt + toKeySequence + toList + toLongLong + toMap + toPalette + toPen + toPixmap + toPoint + toPointArray + toRect + toRegion + toSize + toSizePolicy + toString + toStringList + toTime + toUInt + toULongLong + type + typeName + typeToName + ~QVariant +
+
+
+
+ QVBox +
+
+
+
+ QVBoxLayout + ~QVBoxLayout +
+
+
+
+ QVButtonGroup + ~QVButtonGroup +
+
+
+
+ QVGroupBox + ~QVGroupBox +
+
+
+
+ QWaitCondition + wait + wakeAll + wakeOne + ~QWaitCondition +
+
+
+
+ QWhatsThis + add + clicked + display + enterWhatsThisMode + inWhatsThisMode + leaveWhatsThisMode + remove + setFont + text + textFor + whatsThisButton + ~QWhatsThis +
+
+
+
+ QWheelEvent + accept + delta + globalPos + globalX + globalY + ignore + isAccepted + orientation + pos + state + x + y +
+
+
+
+ QWidget + BackgroundOrigin + FocusPolicy + acceptDrops + acceptDrops + adjustSize + autoMask + autoMask + backgroundBrush + backgroundBrush + backgroundMode + backgroundMode + backgroundOrigin + backgroundOrigin + baseSize + baseSize + caption + caption + childAt + childrenRect + childrenRect + childrenRegion + childrenRegion + clearFocus + clearMask + clearWFlags + clipRegion + close + closeEvent + colorGroup + colorGroup + constPolish + contextMenuEvent + create + cursor + cursor + customWhatsThis + customWhatsThis + destroy + dragEnterEvent + dragLeaveEvent + dragMoveEvent + drawText + dropEvent + enabled + enabledChange + enterEvent + erase + eraseColor + erasePixmap + event + find + focus + focusData + focusEnabled + focusInEvent + focusNextPrevChild + focusOutEvent + focusPolicy + focusPolicy + focusProxy + focusWidget + font + font + fontChange + fontInfo + fontMetrics + foregroundColor + frameGeometry + frameGeometry + frameSize + frameSize + fullScreen + geometry + geometry + getWFlags + grabKeyboard + grabMouse + hasFocus + hasMouse + hasMouseTracking + height + height + heightForWidth + hidden + hide + hideEvent + icon + icon + iconText + iconText + imComposeEvent + imEndEvent + imStartEvent + inputMethodEnabled + isActiveWindow + isActiveWindow + isDesktop + isDesktop + isDialog + isDialog + isEnabled + isEnabledTo + isFocusEnabled + isFullScreen + isHidden + isInputMethodEnabled + isMaximized + isMinimized + isModal + isModal + isPopup + isPopup + isShown + isTopLevel + isTopLevel + isUpdatesEnabled + isVisible + isVisibleTo + keyPressEvent + keyReleaseEvent + keyboardGrabber + layout + leaveEvent + lower + macEvent + mapFrom + mapFromGlobal + mapFromParent + mapTo + mapToGlobal + mapToParent + maximized + maximumHeight + maximumHeight + maximumSize + maximumSize + maximumWidth + maximumWidth + metric + microFocusHint + microFocusHint + minimized + minimumHeight + minimumHeight + minimumSize + minimumSize + minimumSizeHint + minimumSizeHint + minimumWidth + minimumWidth + mouseDoubleClickEvent + mouseGrabber + mouseMoveEvent + mousePressEvent + mouseReleaseEvent + mouseTracking + move + moveEvent + ownCursor + ownCursor + ownFont + ownFont + ownPalette + ownPalette + paintEvent + palette + palette + paletteBackgroundColor + paletteBackgroundColor + paletteBackgroundPixmap + paletteBackgroundPixmap + paletteChange + paletteForegroundColor + paletteForegroundColor + parentWidget + polish + pos + pos + qwsEvent + raise + rect + rect + releaseKeyboard + releaseMouse + repaint + reparent + resetInputContext + resize + resizeEvent + scroll + setAcceptDrops + setActiveWindow + setAutoMask + setBackgroundEmpty + setBackgroundMode + setBackgroundOrigin + setBaseSize + setCaption + setCursor + setDisabled + setEnabled + setEraseColor + setErasePixmap + setFixedHeight + setFixedSize + setFixedWidth + setFocus + setFocusPolicy + setFocusProxy + setFont + setGeometry + setHidden + setIcon + setIconText + setInputMethodEnabled + setKeyCompression + setMask + setMaximumHeight + setMaximumSize + setMaximumWidth + setMicroFocusHint + setMinimumHeight + setMinimumSize + setMinimumWidth + setMouseTracking + setPalette + setPaletteBackgroundColor + setPaletteBackgroundPixmap + setPaletteForegroundColor + setShown + setSizeIncrement + setSizePolicy + setStyle + setTabOrder + setUpdatesEnabled + setWFlags + setWindowOpacity + setWindowState + show + showEvent + showFullScreen + showMaximized + showMinimized + showNormal + shown + size + size + sizeHint + sizeHint + sizeIncrement + sizeIncrement + sizePolicy + sizePolicy + stackUnder + style + styleChange + tabletEvent + testWFlags + topLevelWidget + underMouse + unsetCursor + unsetFont + unsetPalette + update + updateGeometry + updateMask + updatesEnabled + visible + wheelEvent + width + width + winEvent + winId + windowActivationChange + windowOpacity + windowOpacity + windowState + x + x + x11Event + y + y + ~QWidget +
+
+
+
+ QWidgetFactory + addWidgetFactory + create + createWidget + loadImages + supportsWidget + widgets + ~QWidgetFactory +
+
+
+
+ QWidgetItem + expanding + isEmpty + maximumSize + minimumSize + setGeometry + sizeHint + widget +
+
+
+
+ QWidgetPlugin + create + group + iconSet + includeFile + isContainer + keys + toolTip + whatsThis + ~QWidgetPlugin +
+
+
+
+ QWidgetStack + aboutToShow + addWidget + id + raiseWidget + removeWidget + setChildGeometries + visibleWidget + widget + ~QWidgetStack +
+
+
+
+ QWindowsMime + all + canConvert + cf + cfFor + cfToMime + convertFromMime + convertToMime + convertor + convertorName + countCf + initialize + mimeFor + ~QWindowsMime +
+
+
+
+ QWindowsStyle +
+
+
+
+ QWizard + addPage + appropriate + back + backButton + cancelButton + currentPage + finishButton + help + helpButton + helpClicked + indexOf + insertPage + layOutButtonRow + layOutTitleRow + next + nextButton + page + pageCount + removePage + selected + setAppropriate + setBackEnabled + setFinishEnabled + setHelpEnabled + setNextEnabled + setTitle + setTitleFont + showPage + title + titleFont + titleFont + ~QWizard +
+
+
+
+ QWMatrix + TransformationMode + det + dx + dy + invert + isIdentity + isInvertible + m11 + m12 + m21 + m22 + map + mapRect + mapToPolygon + mapToRegion + operator!= + operator*= + operator== + reset + rotate + scale + setMatrix + setTransformationMode + shear + transformationMode + translate + operator* + operator<< + operator>> +
+
+
+
+ QWorkspace + WindowOrder + activateNextWindow + activatePrevWindow + activeWindow + cascade + closeActiveWindow + closeAllWindows + scrollBarsEnabled + scrollBarsEnabled + setScrollBarsEnabled + tile + windowActivated + windowList + ~QWorkspace +
+
+
+
+ QWSDecoration + Region + close + maximize + menu + minimize + paint + paintButton + region + ~QWSDecoration +
+
+
+
+ QWSInputMethod + filter + reset + sendIMEvent + setFont + setMicroFocus + ~QWSInputMethod +
+
+
+
+ QWSKeyboardHandler + processKeyEvent + ~QWSKeyboardHandler +
+
+
+
+ QWSMouseHandler + calibrate + clearCalibration + limitToScreen + mouseChanged + pos + ~QWSMouseHandler +
+
+
+
+ QWSServer + GUIMode + ServerFlags + WindowEvent + clientWindows + closeKeyboard + closeMouse + enablePainting + isCursorVisible + keyMap + keyboardHandler + manager + mouseHandler + newChannel + openKeyboard + openMouse + refresh + removedChannel + screenSaverActivate + screenSaverActive + sendIMEvent + sendKeyEvent + setCursorVisible + setDefaultKeyboard + setDefaultMouse + setDesktopBackground + setKeyboardFilter + setKeyboardHandler + setMaxWindowRect + setScreenSaverInterval + setScreenSaverIntervals + setWindowRegion + windowAt + windowEvent + ~QWSServer +
+
+
+
+ QWSWindow + allocation + caption + client + hide + isFullyObscured + isPartiallyObscured + isVisible + lower + name + raise + requested + setActiveWindow + show + winId + ~QWSWindow +
+
+
+
+ QXmlAttributes + append + clear + count + index + length + localName + qName + type + uri + value + ~QXmlAttributes +
+
+
+
+ QXmlContentHandler + characters + endDocument + endElement + endPrefixMapping + errorString + ignorableWhitespace + processingInstruction + setDocumentLocator + skippedEntity + startDocument + startElement + startPrefixMapping +
+
+
+
+ QXmlDeclHandler + attributeDecl + errorString + externalEntityDecl + internalEntityDecl +
+
+
+
+ QXmlDefaultHandler + ~QXmlDefaultHandler +
+
+
+
+ QXmlDTDHandler + errorString + notationDecl + unparsedEntityDecl +
+
+
+
+ QXmlEntityResolver + errorString + resolveEntity +
+
+
+
+ QXmlErrorHandler + error + errorString + fatalError + warning +
+
+
+
+ QXmlInputSource + data + fetchData + fromRawData + next + reset + setData + ~QXmlInputSource +
+
+
+
+ QXmlLexicalHandler + comment + endCDATA + endDTD + endEntity + errorString + startCDATA + startDTD + startEntity +
+
+
+
+ QXmlLocator + columnNumber + lineNumber + ~QXmlLocator +
+
+
+
+ QXmlNamespaceSupport + popContext + prefix + prefixes + processName + pushContext + reset + setPrefix + splitName + uri + ~QXmlNamespaceSupport +
+
+
+
+ QXmlParseException + columnNumber + lineNumber + message + publicId + systemId +
+
+
+
+ QXmlReader + DTDHandler + contentHandler + declHandler + entityResolver + errorHandler + feature + hasFeature + hasProperty + lexicalHandler + parse + property + setContentHandler + setDTDHandler + setDeclHandler + setEntityResolver + setErrorHandler + setFeature + setLexicalHandler + setProperty +
+
+
+
+ QXmlSimpleReader + parse + parseContinue + setFeature + ~QXmlSimpleReader +
+
+
+
+ isActiveWindow + setActiveWindow + x11Event + xtWidget + ~QXtWidget +
+
+
+
+ 3rd Party Licenses used in Qt +
+
+ A Complete Application Window +
+
+ A Complete Application Window with Actions +
+
+ A Complete Canvas Application +
+
+ A Directory Browser +
+
+ A Motif Dialog +
+
+ A Qt example as a scriptable ActiveX control (executable) +
+
+ A qt-interest mail archive search +
+
+ A Rectangle Draw "Benchmark" +
+
+ A simple ActiveQt control (executable) +
+
+ A simple demonstration of QFont member functions +
+
+ A simple HTTP daemon +
+
+ A simple mail client +
+
+ A simple NNTP implementation +
+
+ A Small Application for Testing Regular Expressions +
+
+ A small client-server example +
+
+ A standard ActiveX and the "simple" ActiveQt widget. +
+
+ A Tiny Example Featuring a Toggle Action +
+
+ A Tiny QTL Example +
+
+ A tiny SAX2 parser +
+
+ A Web Browser +
+
+ About Modules +
+
+ About Qt +
+
+ About the Visual Studio Integration Plugin +
+
+ About Unicode +
+
+ abstractwidgets +
+
+ ActiveQt Examples +
+
+ activeqt-tools +
+
+ Adding an accelerated graphics driver to Qt/Embedded +
+
+ Advanced use of tool tips +
+
+ advanced +
+
+ All Overviews and HOWTOs +
+
+ An ActiveX Test Container +
+
+ An Extension Dialog Example +
+
+ An FTP client +
+
+ An MDI Application +
+
+ Analog Clock +
+
+ Annotated Class Index +
+
+ basic +
+
+ Biff (UNIX only) +
+
+ Books about GUI +
+
+ Brief Technical FAQ +
+
+ Buttons and Groupboxes +
+
+ Canvas Control +
+
+ Canvas Example +
+
+ Canvas Module +
+
+ Character input in Qt/Embedded +
+
+ Class Inheritance Hierarchy +
+
+ collection +
+
+ Company Information +
+
+ Connect the Points +
+
+ Continuing Development +
+
+ Conway's Game of Life +
+
+ Cursors +
+
+ Customized Layoutmanager +
+
+ Data Elements +
+
+ database +
+
+ Debugging Techniques +
+
+ Demonstration of SAX2 features +
+
+ Deploying Qt Applications +
+
+ dialogs +
+
+ Digital Clock +
+
+ Drag and Drop +
+
+ Drag and Drop +
+
+ Drag and Drop (Simple) +
+
+ draganddrop +
+
+ Draw Demo +
+
+ Enabling the Linux Framebuffer +
+
+ environment +
+
+ events +
+
+ Events and Event Filters +
+
+ examples +
+
+ File Handling +
+
+ Font Displayer +
+
+ Fonts in Qt/Embedded +
+
+ Format of the QDataStream Operators +
+
+ Functions removed in Qt 2.0 +
+
+ Getting Started +
+
+ GNU General Public License +
+
+ Grapher Plugin +
+
+ graphics +
+
+ Grouped Classes +
+
+ Header File Index +
+
+ Hello, World +
+
+ helpsystem +
+
+ Helpsystem +
+
+ How to create a large, sparse QTable +
+
+ How to Learn Qt +
+
+ How to Report A Bug +
+
+ How to use X11 overlays with the Qt OpenGL extension +
+
+ Iconview +
+
+ IconView Module +
+
+ images +
+
+ shared +
+
+ In Sync with Outlook +
+
+ io +
+
+ Installation +
+
+ Installing Qt/Embedded +
+
+ Installing Qt/Mac +
+
+ Installing Qt/Windows +
+
+ Installing Qt/X11 +
+
+ Internationalization +
+
+ i18n +
+
+ Introduction +
+
+ Issues to be aware of when porting Qt/Embedded +
+
+ Key Features in Qt 3.0 +
+
+ Keyboard Focus Overview +
+
+ Layout Classes +
+
+ geomanagement +
+
+ Layout Managers +
+
+ Licenses for Code Used in Qt +
+
+ Line Edits +
+
+ Listbox Example +
+
+ Listboxes and Comboboxes +
+
+ Listviews +
+
+ Listviews with Checkable Items +
+
+ application +
+
+ Mainly Easy +
+
+ makeqpf +
+
+ Member Function Index +
+
+ Menubar merging +
+
+ Menubar merging +
+
+ Meta Object System +
+
+ misc +
+
+ Movies or the Story of the Animated GIF file +
+
+ multimedia +
+
+ nsplugin-examples +
+
+ network-examples +
+
+ Network Module +
+
+ tools +
+
+ objectmodel +
+
+ Object Trees and Object Ownership +
+
+ OpenGL Box Example +
+
+ opengl-examples +
+
+ OpenGL Gear Example +
+
+ OpenGL in an HTML page +
+
+ OpenGL Overlay Example +
+
+ OpenGL Overlay X11 Example +
+
+ OpenGL Pixmap Example +
+
+ OpenGL Shared Box Example +
+
+ OpenGL Texture Example +
+
+ organizers +
+
+ Outliner to show use of DOM +
+
+ Painting on the Desktop +
+
+ Picture +
+
+ Pictures of Most Qt Widgets +
+
+ Play Tetrix! +
+
+ plugins +
+
+ Popup Widgets +
+
+ Porting to Qt 2.x +
+
+ Porting to Qt 3.x +
+
+ Porting your applications to Qt/Embedded +
+
+ Preparing to Migrate the User Interface +
+
+ Presenting the GUI +
+
+ Progress Bar +
+
+ Progress Bar and Dialog Example +
+
+ Properties +
+
+ qaction-examples +
+
+ QArray Class Reference (obsolete) +
+
+ QCollection Class Reference (obsolete) +
+
+ QDir +
+
+ QEmbed - File and Image Embedder +
+
+ qfont-examples +
+
+ QList Class Reference (obsolete) +
+
+ QListIterator Class Reference (obsolete) +
+
+ QMag +
+
+ motif-examples +
+
+ qprocess-examples +
+
+ QQueue Class Reference (obsolete) +
+
+ QStack Class Reference (obsolete) +
+
+ Qt Commercial Editions +
+
+ Qt Demo +
+
+ Qt Distribution Example +
+
+ Qt Editions +
+
+ Qt Motif Extension +
+
+ Qt Motif Extension - A Migration Walkthrough +
+
+ Qt Netscape Plugin Extension +
+
+ Qt Object Model +
+
+ Qt Open Source Edition +
+
+ Qt Open Source Edition License Agreement +
+
+ Qt OpenGL 3D Graphics +
+
+ Qt Plugins HOWTO +
+
+ Qt Reference Documentation (Open Source Edition) +
+
+ sql-examples +
+
+ Qt Template Library +
+
+ qtl +
+
+ Qt Tutorial #1 - The 14 Steps +
+
+ Qt Tutorial - Chapter 10: Smooth as Silk +
+
+ Qt Tutorial - Chapter 11: Giving It a Shot +
+
+ Qt Tutorial - Chapter 12: Hanging in the Air the Way Bricks Don't +
+
+ Qt Tutorial - Chapter 13: Game Over +
+
+ Qt Tutorial - Chapter 14: Facing the Wall +
+
+ Qt Tutorial - Chapter 1: Hello, World! +
+
+ Qt Tutorial - Chapter 2: Calling it Quits +
+
+ Qt Tutorial - Chapter 3: Family Values +
+
+ Qt Tutorial - Chapter 4: Let There Be Widgets +
+
+ Qt Tutorial - Chapter 5: Building Blocks +
+
+ Qt Tutorial - Chapter 6: Building Blocks Galore! +
+
+ Qt Tutorial - Chapter 7: One Thing Leads to Another +
+
+ Qt Tutorial - Chapter 8: Preparing for Battle +
+
+ Qt Tutorial - Chapter 9: With Cannon You Can +
+
+ Qt Widget Hierarchy +
+
+ Qt Widget Hierarchy (in-process) +
+
+ xml-examples +
+
+ Qt' OpenGL widgets as an ActiveX (executable) +
+
+ Qt's Classes +
+
+ Qt's Main Classes +
+
+ Qt's Tools +
+
+ qws +
+
+ Qt/Embedded as a VNC Server +
+
+ Qt/Embedded environment variables +
+
+ Qt/Embedded Performance Tuning +
+
+ Qt/Embedded Pointer Handling +
+
+ Qt/Embedded Virtual Framebuffer +
+
+ Qt/Mac is Mac OS X Native +
+
+ Qt/Mac Issues +
+
+ QVector Class Reference (obsolete) +
+
+ Range controls +
+
+ Refactoring Existing Code +
+
+ Replacing the Print Dialog +
+
+ Replacing the View Widget +
+
+ Richtext +
+
+ Rot13 +
+
+ Running Qt/Embedded applications +
+
+ Scrollview +
+
+ Session Management +
+
+ Setting Options +
+
+ Setting the Application Icon +
+
+ Shared Classes +
+
+ Show Image +
+
+ Signals and Slots +
+
+ Simple Addressbook +
+
+ Simple editor that can load encodings +
+
+ Simple Filemanager +
+
+ Simple HTML Help Browser +
+
+ Simple Painting Application +
+
+ Small Table Example +
+
+ Sound Example +
+
+ Splitter +
+
+ SQL Module +
+
+ SQL Module - Drivers +
+
+ SQL Table +
+
+ Standard Accelerator Keys +
+
+ Standard Qt widgets as ActiveX controls (in-process) +
+
+ Standard Qt widgets in an HTML page +
+
+ Starting processes with IO redirection +
+
+ step-by-step-examples +
+
+ Style overview +
+
+ Tabdialog +
+
+ Table Example +
+
+ table-examples +
+
+ Table Module +
+
+ Table of Prime Numbers 2-9999 +
+
+ Tablet Example +
+
+ Taking Data +
+
+ Tetrix +
+
+ Text Edit Example +
+
+ text +
+
+ Thanks! +
+
+ The 'Big Picture' +
+
+ The ActiveQt framework +
+
+ The Coordinate System +
+
+ The DumpDoc Tool +
+
+ The Feature Definition File +
+
+ The IDC Tool +
+
+ The Project File +
+
+ qaxcontainer-examples +
+
+ The QAxContainer Module +
+
+ qaxserver-examples +
+
+ The QAxServer Module +
+
+ The Qt FAQ +
+
+ The Qt/Embedded-specific classes +
+
+ Themes (Styles) +
+
+ Thread Support in Qt +
+
+ thread +
+
+ Tic Tac Toe +
+
+ time +
+
+ Timers +
+
+ Toplevel Widgets +
+
+ Trademarks +
+
+ Transformed Graphics Demo +
+
+ Trivial Example +
+
+ Tutorial #2 +
+
+ Two simple Qt widgets +
+
+ Two simple Qt widgets (in-process) +
+
+ User Interface Compiler (uic) +
+
+ Using Custom QDialogs +
+
+ Using Existing Dialogs with QMotifDialog +
+
+ Using menus +
+
+ Using Qt Main Window Classes +
+
+ Using Qt Standard Dialogs +
+
+ Using the Meta Object Compiler +
+
+ Using the Motif Event Loop +
+
+ Walkthrough: A Simple Application +
+
+ Walkthrough: How to use the Qt SAX2 classes +
+
+ Walkthrough: Using Qt objects in Microsoft .NET +
+
+ Walkthrough: Using SAX2 features with the Qt XML classes +
+
+ Why doesn't Qt use templates for signals and slots? +
+
+ appearance +
+
+ Widgets Example +
+
+ Window Geometry +
+
+ Window System-specific Notes +
+
+ Wizard +
+
+ Workspace Module +
+
+ Wrapping Up +
+
+ Writing your own layout manager +
+
+ xml-tools +
+
+ XML Module +
+
+ Year 2000 Compliance Statement +
+
+ +
+
+ canvastext.h +
+
+ canvasview.cpp +
+
+ canvasview.h +
+
+ chart.pro +
+
+ chartform.cpp +
+
+ chartform.h +
+
+ chartform_canvas.cpp +
+
+ chartform_files.cpp +
+
+ element.cpp +
+
+ element.h +
+
+ main.cpp +
+
+ optionsform.cpp +
+
+ optionsform.h +
+
+ setdataform.cpp +
+
+ setdataform.h +
+
+ main.cpp +
+
+ main.h +
+
+ qnetwork.h +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.h +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.h +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.h +
+
+ main.cpp +
+
+ main.h +
+
+ main.cpp +
+
+ main.h +
+
+ main.cpp +
+
+ main.h +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.h +
+
+ main.cpp +
+
+ main.h +
+
+ main.cpp +
+
+ cannon.cpp +
+
+ cannon.h +
+
+ lcdrange.cpp +
+
+ lcdrange.h +
+
+ main.cpp +
+
+ cannon.cpp +
+
+ cannon.h +
+
+ lcdrange.cpp +
+
+ lcdrange.h +
+
+ main.cpp +
+
+ cannon.cpp +
+
+ cannon.h +
+
+ lcdrange.cpp +
+
+ lcdrange.h +
+
+ main.cpp +
+
+ cannon.cpp +
+
+ cannon.h +
+
+ gamebrd.cpp +
+
+ gamebrd.h +
+
+ lcdrange.cpp +
+
+ lcdrange.h +
+
+ main.cpp +
+
+ cannon.cpp +
+
+ cannon.h +
+
+ gamebrd.cpp +
+
+ gamebrd.h +
+
+ lcdrange.cpp +
+
+ lcdrange.h +
+
+ main.cpp +
+
+ lcdrange.cpp +
+
+ lcdrange.h +
+
+ main.cpp +
+
+ cannon.cpp +
+
+ cannon.h +
+
+ lcdrange.cpp +
+
+ lcdrange.h +
+
+ main.cpp +
+
+ cannon.cpp +
+
+ cannon.h +
+
+ lcdrange.cpp +
+
+ lcdrange.h +
+
+ main.cpp +
+
+ main.cpp +
+
+ main.cpp +
+
+ statistics.cpp +
+
+ wizard.cpp +
+
+ wizard.h +
+ diff --git a/doc/html/qt.html b/doc/html/qt.html new file mode 100644 index 00000000..1833b263 --- /dev/null +++ b/doc/html/qt.html @@ -0,0 +1,1026 @@ + + + + + +TQt Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Class Reference

+ +

The TQt class is a namespace for miscellaneous identifiers +that need to be global-like. +More... +

#include <qnamespace.h> +

Inherited by TQObject, TQPixmap, TQBrush, TQCanvasItem, TQCursor, TQPainter, TQEvent, TQIconViewItem, TQKeySequence, TQListViewItem, TQCustomMenuItem, TQPen, TQStyleSheetItem, TQSyntaxHighlighter, TQTab, TQTableItem, TQThread, TQToolTip, and TQWhatsThis. +

List of all member functions. +

Public Members

+
    +
  • enum ButtonState { NoButton = 0x0000, LeftButton = 0x0001, RightButton = 0x0002, MidButton = 0x0004, MouseButtonMask = 0x0007, ShiftButton = 0x0100, ControlButton = 0x0200, AltButton = 0x0400, MetaButton = 0x0800, KeyButtonMask = 0x0f00, Keypad = 0x4000 }
  • +
  • enum Orientation { Horizontal = 0, Vertical }
  • +
  • enum SortOrder { Ascending, Descending }
  • +
  • enum AlignmentFlags { AlignAuto = 0x0000, AlignLeft = 0x0001, AlignRight = 0x0002, AlignHCenter = 0x0004, AlignJustify = 0x0008, AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter | AlignJustify, AlignTop = 0x0010, AlignBottom = 0x0020, AlignVCenter = 0x0040, AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter, AlignCenter = AlignVCenter | AlignHCenter }
  • +
  • enum TextFlags { SingleLine = 0x0080, DontClip = 0x0100, ExpandTabs = 0x0200, ShowPrefix = 0x0400, WordBreak = 0x0800, BreakAnywhere = 0x1000, NoAccel = 0x4000 }
  • +
  • enum WidgetState { WState_Created = 0x00000001, WState_Disabled = 0x00000002, WState_Visible = 0x00000004, WState_ForceHide = 0x00000008, WState_OwnCursor = 0x00000010, WState_MouseTracking = 0x00000020, WState_CompressKeys = 0x00000040, WState_BlockUpdates = 0x00000080, WState_InPaintEvent = 0x00000100, WState_Reparented = 0x00000200, WState_ConfigPending = 0x00000400, WState_Resized = 0x00000800, WState_AutoMask = 0x00001000, WState_Polished = 0x00002000, WState_DND = 0x00004000, WState_Reserved0 = 0x00008000, WState_FullScreen = 0x00010000, WState_OwnSizePolicy = 0x00020000, WState_CreatedHidden = 0x00040000, WState_Maximized = 0x00080000, WState_Minimized = 0x00100000, WState_ForceDisabled = 0x00200000, WState_Exposed = 0x00400000, WState_HasMouse = 0x00800000 }
  • +
  • enum WidgetFlags { WType_TopLevel = 0x00000001, WType_Dialog = 0x00000002, WType_Popup = 0x00000004, WType_Desktop = 0x00000008, WType_Mask = 0x0000000f, WStyle_Customize = 0x00000010, WStyle_NormalBorder = 0x00000020, WStyle_DialogBorder = 0x00000040, WStyle_NoBorder = 0x00002000, WStyle_Title = 0x00000080, WStyle_SysMenu = 0x00000100, WStyle_Minimize = 0x00000200, WStyle_Maximize = 0x00000400, WStyle_MinMax = WStyle_Minimize | WStyle_Maximize, WStyle_Tool = 0x00000800, WStyle_StaysOnTop = 0x00001000, WStyle_ContextHelp = 0x00004000, WStyle_Reserved = 0x00008000, WStyle_Mask = 0x0000fff0, WDestructiveClose = 0x00010000, WPaintDesktop = 0x00020000, WPaintUnclipped = 0x00040000, WPaintClever = 0x00080000, WResizeNoErase = 0x00100000, WMouseNoMask = 0x00200000, WStaticContents = 0x00400000, WRepaintNoErase = 0x00800000, WX11BypassWM = 0x01000000, WWinOwnDC = 0x00000000, WMacNoSheet = 0x00000000, WMacDrawer = 0x00000000, WX11BypassWM = 0x00000000, WWinOwnDC = 0x01000000, WMacNoSheet = 0x00000000, WMacDrawer = 0x00000000, WGroupLeader = 0x02000000, WShowModal = 0x04000000, WNoMousePropagation = 0x08000000, WSubWindow = 0x10000000, WStyle_Splash = 0x20000000, WNoAutoErase = WRepaintNoErase | WResizeNoErase, WNorthWestGravity = WStaticContents, WType_Modal = WType_Dialog | WShowModal, WStyle_Dialog = WType_Dialog, WStyle_NoBorderEx = WStyle_NoBorder }
  • +
  • enum WindowState { WindowNoState = 0x00000000, WindowMinimized = 0x00000001, WindowMaximized = 0x00000002, WindowFullScreen = 0x00000004, WindowActive = 0x00000008 }
  • +
  • enum ImageConversionFlags { ColorMode_Mask = 0x00000003, AutoColor = 0x00000000, ColorOnly = 0x00000003, MonoOnly = 0x00000002, AlphaDither_Mask = 0x0000000c, ThresholdAlphaDither = 0x00000000, OrderedAlphaDither = 0x00000004, DiffuseAlphaDither = 0x00000008, NoAlpha = 0x0000000c, Dither_Mask = 0x00000030, DiffuseDither = 0x00000000, OrderedDither = 0x00000010, ThresholdDither = 0x00000020, DitherMode_Mask = 0x000000c0, AutoDither = 0x00000000, PreferDither = 0x00000040, AvoidDither = 0x00000080 }
  • +
  • enum BGMode { TransparentMode, OpaqueMode }
  • +
  • enum PaintUnit { PixelUnit, LoMetricUnit, HiMetricUnit, LoEnglishUnit, HiEnglishUnit, TwipsUnit }
  • +
  • enum GUIStyle { MacStyle, WindowsStyle, Win3Style, PMStyle, MotifStyle }  (obsolete)
  • +
  • enum SequenceMatch { NoMatch, PartialMatch, Identical }
  • +
  • enum Modifier { META = 0x00100000, SHIFT = 0x00200000, CTRL = 0x00400000, ALT = 0x00800000, MODIFIER_MASK = 0x00f00000, UNICODE_ACCEL = 0x10000000, ASCII_ACCEL = UNICODE_ACCEL }
  • +
  • enum Key { Key_Escape = 0x1000, Key_Tab = 0x1001, Key_Backtab = 0x1002, Key_BackTab = Key_Backtab, Key_Backspace = 0x1003, Key_BackSpace = Key_Backspace, Key_Return = 0x1004, Key_Enter = 0x1005, Key_Insert = 0x1006, Key_Delete = 0x1007, Key_Pause = 0x1008, Key_Print = 0x1009, Key_SysReq = 0x100a, Key_Clear = 0x100b, Key_Home = 0x1010, Key_End = 0x1011, Key_Left = 0x1012, Key_Up = 0x1013, Key_Right = 0x1014, Key_Down = 0x1015, Key_Prior = 0x1016, Key_PageUp = Key_Prior, Key_Next = 0x1017, Key_PageDown = Key_Next, Key_Shift = 0x1020, Key_Control = 0x1021, Key_Meta = 0x1022, Key_Alt = 0x1023, Key_CapsLock = 0x1024, Key_NumLock = 0x1025, Key_ScrollLock = 0x1026, Key_F1 = 0x1030, Key_F2 = 0x1031, Key_F3 = 0x1032, Key_F4 = 0x1033, Key_F5 = 0x1034, Key_F6 = 0x1035, Key_F7 = 0x1036, Key_F8 = 0x1037, Key_F9 = 0x1038, Key_F10 = 0x1039, Key_F11 = 0x103a, Key_F12 = 0x103b, Key_F13 = 0x103c, Key_F14 = 0x103d, Key_F15 = 0x103e, Key_F16 = 0x103f, Key_F17 = 0x1040, Key_F18 = 0x1041, Key_F19 = 0x1042, Key_F20 = 0x1043, Key_F21 = 0x1044, Key_F22 = 0x1045, Key_F23 = 0x1046, Key_F24 = 0x1047, Key_F25 = 0x1048, Key_F26 = 0x1049, Key_F27 = 0x104a, Key_F28 = 0x104b, Key_F29 = 0x104c, Key_F30 = 0x104d, Key_F31 = 0x104e, Key_F32 = 0x104f, Key_F33 = 0x1050, Key_F34 = 0x1051, Key_F35 = 0x1052, Key_Super_L = 0x1053, Key_Super_R = 0x1054, Key_Menu = 0x1055, Key_Hyper_L = 0x1056, Key_Hyper_R = 0x1057, Key_Help = 0x1058, Key_Direction_L = 0x1059, Key_Direction_R = 0x1060, Key_Space = 0x20, Key_Any = Key_Space, Key_Exclam = 0x21, Key_QuoteDbl = 0x22, Key_NumberSign = 0x23, Key_Dollar = 0x24, Key_Percent = 0x25, Key_Ampersand = 0x26, Key_Apostrophe = 0x27, Key_ParenLeft = 0x28, Key_ParenRight = 0x29, Key_Asterisk = 0x2a, Key_Plus = 0x2b, Key_Comma = 0x2c, Key_Minus = 0x2d, Key_Period = 0x2e, Key_Slash = 0x2f, Key_0 = 0x30, Key_1 = 0x31, Key_2 = 0x32, Key_3 = 0x33, Key_4 = 0x34, Key_5 = 0x35, Key_6 = 0x36, Key_7 = 0x37, Key_8 = 0x38, Key_9 = 0x39, Key_Colon = 0x3a, Key_Semicolon = 0x3b, Key_Less = 0x3c, Key_Equal = 0x3d, Key_Greater = 0x3e, Key_Question = 0x3f, Key_At = 0x40, Key_A = 0x41, Key_B = 0x42, Key_C = 0x43, Key_D = 0x44, Key_E = 0x45, Key_F = 0x46, Key_G = 0x47, Key_H = 0x48, Key_I = 0x49, Key_J = 0x4a, Key_K = 0x4b, Key_L = 0x4c, Key_M = 0x4d, Key_N = 0x4e, Key_O = 0x4f, Key_P = 0x50, Key_Q = 0x51, Key_R = 0x52, Key_S = 0x53, Key_T = 0x54, Key_U = 0x55, Key_V = 0x56, Key_W = 0x57, Key_X = 0x58, Key_Y = 0x59, Key_Z = 0x5a, Key_BracketLeft = 0x5b, Key_Backslash = 0x5c, Key_BracketRight = 0x5d, Key_AsciiCircum = 0x5e, Key_Underscore = 0x5f, Key_QuoteLeft = 0x60, Key_BraceLeft = 0x7b, Key_Bar = 0x7c, Key_BraceRight = 0x7d, Key_AsciiTilde = 0x7e, Key_nobreakspace = 0x0a0, Key_exclamdown = 0x0a1, Key_cent = 0x0a2, Key_sterling = 0x0a3, Key_currency = 0x0a4, Key_yen = 0x0a5, Key_brokenbar = 0x0a6, Key_section = 0x0a7, Key_diaeresis = 0x0a8, Key_copyright = 0x0a9, Key_ordfeminine = 0x0aa, Key_guillemotleft = 0x0ab, Key_notsign = 0x0ac, Key_hyphen = 0x0ad, Key_registered = 0x0ae, Key_macron = 0x0af, Key_degree = 0x0b0, Key_plusminus = 0x0b1, Key_twosuperior = 0x0b2, Key_threesuperior = 0x0b3, Key_acute = 0x0b4, Key_mu = 0x0b5, Key_paragraph = 0x0b6, Key_periodcentered = 0x0b7, Key_cedilla = 0x0b8, Key_onesuperior = 0x0b9, Key_masculine = 0x0ba, Key_guillemotright = 0x0bb, Key_onequarter = 0x0bc, Key_onehalf = 0x0bd, Key_threequarters = 0x0be, Key_questiondown = 0x0bf, Key_Agrave = 0x0c0, Key_Aacute = 0x0c1, Key_Acircumflex = 0x0c2, Key_Atilde = 0x0c3, Key_Adiaeresis = 0x0c4, Key_Aring = 0x0c5, Key_AE = 0x0c6, Key_Ccedilla = 0x0c7, Key_Egrave = 0x0c8, Key_Eacute = 0x0c9, Key_Ecircumflex = 0x0ca, Key_Ediaeresis = 0x0cb, Key_Igrave = 0x0cc, Key_Iacute = 0x0cd, Key_Icircumflex = 0x0ce, Key_Idiaeresis = 0x0cf, Key_ETH = 0x0d0, Key_Ntilde = 0x0d1, Key_Ograve = 0x0d2, Key_Oacute = 0x0d3, Key_Ocircumflex = 0x0d4, Key_Otilde = 0x0d5, Key_Odiaeresis = 0x0d6, Key_multiply = 0x0d7, Key_Ooblique = 0x0d8, Key_Ugrave = 0x0d9, Key_Uacute = 0x0da, Key_Ucircumflex = 0x0db, Key_Udiaeresis = 0x0dc, Key_Yacute = 0x0dd, Key_THORN = 0x0de, Key_ssharp = 0x0df, Key_agrave = 0x0e0, Key_aacute = 0x0e1, Key_acircumflex = 0x0e2, Key_atilde = 0x0e3, Key_adiaeresis = 0x0e4, Key_aring = 0x0e5, Key_ae = 0x0e6, Key_ccedilla = 0x0e7, Key_egrave = 0x0e8, Key_eacute = 0x0e9, Key_ecircumflex = 0x0ea, Key_ediaeresis = 0x0eb, Key_igrave = 0x0ec, Key_iacute = 0x0ed, Key_icircumflex = 0x0ee, Key_idiaeresis = 0x0ef, Key_eth = 0x0f0, Key_ntilde = 0x0f1, Key_ograve = 0x0f2, Key_oacute = 0x0f3, Key_ocircumflex = 0x0f4, Key_otilde = 0x0f5, Key_odiaeresis = 0x0f6, Key_division = 0x0f7, Key_oslash = 0x0f8, Key_ugrave = 0x0f9, Key_uacute = 0x0fa, Key_ucircumflex = 0x0fb, Key_udiaeresis = 0x0fc, Key_yacute = 0x0fd, Key_thorn = 0x0fe, Key_ydiaeresis = 0x0ff, Key_Back = 0x1061, Key_Forward = 0x1062, Key_Stop = 0x1063, Key_Refresh = 0x1064, Key_VolumeDown = 0x1070, Key_VolumeMute = 0x1071, Key_VolumeUp = 0x1072, Key_BassBoost = 0x1073, Key_BassUp = 0x1074, Key_BassDown = 0x1075, Key_TrebleUp = 0x1076, Key_TrebleDown = 0x1077, Key_MediaPlay = 0x1080, Key_MediaStop = 0x1081, Key_MediaPrev = 0x1082, Key_MediaNext = 0x1083, Key_MediaRecord = 0x1084, Key_HomePage = 0x1090, Key_Favorites = 0x1091, Key_Search = 0x1092, Key_Standby = 0x1093, Key_OpenUrl = 0x1094, Key_LaunchMail = 0x10a0, Key_LaunchMedia = 0x10a1, Key_Launch0 = 0x10a2, Key_Launch1 = 0x10a3, Key_Launch2 = 0x10a4, Key_Launch3 = 0x10a5, Key_Launch4 = 0x10a6, Key_Launch5 = 0x10a7, Key_Launch6 = 0x10a8, Key_Launch7 = 0x10a9, Key_Launch8 = 0x10aa, Key_Launch9 = 0x10ab, Key_LaunchA = 0x10ac, Key_LaunchB = 0x10ad, Key_LaunchC = 0x10ae, Key_LaunchD = 0x10af, Key_LaunchE = 0x10b0, Key_LaunchF = 0x10b1, Key_MediaLast = 0x1fff, Key_unknown = 0xffff }
  • +
  • enum ArrowType { UpArrow, DownArrow, LeftArrow, RightArrow }
  • +
  • enum RasterOp { CopyROP, OrROP, XorROP, NotAndROP, EraseROP = NotAndROP, NotCopyROP, NotOrROP, NotXorROP, AndROP, NotEraseROP = AndROP, NotROP, ClearROP, SetROP, NopROP, AndNotROP, OrNotROP, NandROP, NorROP, LastROP = NorROP }
  • +
  • enum PenStyle { NoPen, SolidLine, DashLine, DotLine, DashDotLine, DashDotDotLine, MPenStyle = 0x0f }
  • +
  • enum PenCapStyle { FlatCap = 0x00, SquareCap = 0x10, RoundCap = 0x20, MPenCapStyle = 0x30 }
  • +
  • enum PenJoinStyle { MiterJoin = 0x00, BevelJoin = 0x40, RoundJoin = 0x80, MPenJoinStyle = 0xc0 }
  • +
  • enum BrushStyle { NoBrush, SolidPattern, Dense1Pattern, Dense2Pattern, Dense3Pattern, Dense4Pattern, Dense5Pattern, Dense6Pattern, Dense7Pattern, HorPattern, VerPattern, CrossPattern, BDiagPattern, FDiagPattern, DiagCrossPattern, CustomPattern = 24 }
  • +
  • enum MacintoshVersion { MV_Unknown = 0x0000, MV_9 = 0x0001, MV_10_DOT_0 = 0x0002, MV_10_DOT_1 = 0x0003, MV_10_DOT_2 = 0x0004, MV_10_DOT_3 = 0x0005, MV_10_DOT_4 = 0x0006, MV_CHEETAH = MV_10_DOT_0, MV_PUMA = MV_10_DOT_1, MV_JAGUAR = MV_10_DOT_2, MV_PANTHER = MV_10_DOT_3, MV_TIGER = MV_10_DOT_4 }
  • +
  • enum WindowsVersion { WV_32s = 0x0001, WV_95 = 0x0002, WV_98 = 0x0003, WV_Me = 0x0004, WV_DOS_based = 0x000f, WV_NT = 0x0010, WV_2000 = 0x0020, WV_XP = 0x0030, WV_2003 = 0x0040, WV_VISTA = 0x0080, WV_NT_based = 0x00f0, WV_CE = 0x0100, WV_CENET = 0x0200, WV_CE_based = 0x0f00 }
  • +
  • enum UIEffect { UI_General, UI_AnimateMenu, UI_FadeMenu, UI_AnimateCombo, UI_AnimateTooltip, UI_FadeTooltip, UI_AnimateToolBox }
  • +
  • enum CursorShape { ArrowCursor, UpArrowCursor, CrossCursor, WaitCursor, IbeamCursor, SizeVerCursor, SizeHorCursor, SizeBDiagCursor, SizeFDiagCursor, SizeAllCursor, BlankCursor, SplitVCursor, SplitHCursor, PointingHandCursor, ForbiddenCursor, WhatsThisCursor, BusyCursor, LastCursor = BusyCursor, BitmapCursor = 24 }
  • +
  • enum TextFormat { PlainText, RichText, AutoText, LogText }
  • +
  • enum AnchorAttribute { AnchorName, AnchorHref }
  • +
  • enum Dock { DockUnmanaged, DockTornOff, DockTop, DockBottom, DockRight, DockLeft, DockMinimized, Unmanaged = DockUnmanaged, TornOff = DockTornOff, Top = DockTop, Bottom = DockBottom, Right = DockRight, Left = DockLeft, Minimized = DockMinimized }
  • +
  • enum DateFormat { TextDate, ISODate, LocalDate }
  • +
  • enum TimeSpec { LocalTime, UTC }
  • +
  • enum BackgroundMode { FixedColor, FixedPixmap, NoBackground, PaletteForeground, PaletteButton, PaletteLight, PaletteMidlight, PaletteDark, PaletteMid, PaletteText, PaletteBrightText, PaletteBase, PaletteBackground, PaletteShadow, PaletteHighlight, PaletteHighlightedText, PaletteButtonText, PaletteLink, PaletteLinkVisited, X11ParentRelative }
  • +
  • enum StringComparisonMode { CaseSensitive = 0x00001, BeginsWith = 0x00002, EndsWith = 0x00004, Contains = 0x00008, ExactMatch = 0x00010 }
  • +
  • enum Corner { TopLeft = 0x00000, TopRight = 0x00001, BottomLeft = 0x00002, BottomRight = 0x00003 }
  • +
  • typedef void * HANDLE
  • +
+

Detailed Description

+ + +

The TQt class is a namespace for miscellaneous identifiers +that need to be global-like. +

+

Normally, you can ignore this class. TQObject and a few other +classes inherit it, so all the identifiers in the TQt namespace are +normally usable without qualification. +

However, you may occasionally need to say TQt::black instead of +just black, particularly in static utility functions (such as +many class factories). +

See also Miscellaneous Classes. + +


Member Type Documentation

+

TQt::AlignmentFlags

+ +

This enum type is used to describe alignment. It contains +horizontal and vertical flags. +

The horizontal flags are: +

    +
  • TQt::AlignAuto - Aligns according to the language. Left for most, +right for Arabic and Hebrew. +
  • TQt::AlignLeft - Aligns with the left edge. +
  • TQt::AlignRight - Aligns with the right edge. +
  • TQt::AlignHCenter - Centers horizontally in the available space. +
  • TQt::AlignJustify - Justifies the text in the available space. +Does not work for everything and may be interpreted as +AlignAuto in some cases. +

The vertical flags are: +

    +
  • TQt::AlignTop - Aligns with the top. +
  • TQt::AlignBottom - Aligns with the bottom. +
  • TQt::AlignVCenter - Centers vertically in the available space. +

You can use only one of the horizontal flags at a time. There is +one two-dimensional flag: +

    +
  • TQt::AlignCenter - Centers in both dimensions. +

You can use at most one horizontal and one vertical flag at a time. AlignCenter counts as both horizontal and vertical. +

Masks: +

    +
  • TQt::AlignHorizontal_Mask +
  • TQt::AlignVertical_Mask +

Conflicting combinations of flags have undefined meanings. + +

TQt::AnchorAttribute

+ +

An anchor has one or more of the following attributes: +

    +
  • TQt::AnchorName - the name attribute of the anchor. This attribute is +used when scrolling to an anchor in the document. +
  • TQt::AnchorHref - the href attribute of the anchor. This attribute is +used when a link is clicked to determine what content to load. +
+

TQt::ArrowType

+ +
    +
  • TQt::UpArrow +
  • TQt::DownArrow +
  • TQt::LeftArrow +
  • TQt::RightArrow +

+

TQt::BGMode

+ +

Background mode +

    +
  • TQt::TransparentMode +
  • TQt::OpaqueMode +
+

TQt::BackgroundMode

+ +

This enum describes how the background of a widget changes, as the +widget's palette changes. +

The background is what the widget contains when paintEvent() is called. To minimize +flicker, this should be the most common color or pixmap in the +widget. For PaletteBackground, use colorGroup().brush( TQColorGroup::Background ), and so on. +

    +
  • TQt::PaletteForeground +
  • TQt::PaletteBackground +
  • TQt::PaletteButton +
  • TQt::PaletteLight +
  • TQt::PaletteMidlight +
  • TQt::PaletteDark +
  • TQt::PaletteMid +
  • TQt::PaletteText +
  • TQt::PaletteBrightText +
  • TQt::PaletteButtonText +
  • TQt::PaletteBase +
  • TQt::PaletteShadow +
  • TQt::PaletteHighlight +
  • TQt::PaletteHighlightedText +
  • TQt::PaletteLink +
  • TQt::PaletteLinkVisited +
  • TQt::X11ParentRelative - (internal use only) +

The final three values have special meaning: +

    +
  • TQt::NoBackground - the widget is not cleared before paintEvent(). +If the widget's paint event always draws on all the pixels, using +this mode can be both fast and flicker-free. +
  • TQt::FixedColor - the widget is cleared to a fixed color, normally +different from all the ones in the palette(). Set using setPaletteBackgroundColor(). +
  • TQt::FixedPixmap - the widget is cleared to a fixed pixmap, +normally different from all the ones in the palette(). Set using +setPaletteBackgroundPixmap(). +

Although FixedColor and FixedPixmap are sometimes just +right, if you use them, make sure that you test your application +when the desktop color scheme has been changed. (On X11, a tquick +way to test this is e.g. "./myapp -bg paleblue". On Windows, you +must use the control panel.) +

See also TQWidget::backgroundMode, TQWidget::backgroundMode, TQWidget::setBackgroundPixmap(), and TQWidget::paletteBackgroundColor. + +

TQt::BrushStyle

+ +
    +
  • TQt::NoBrush +
  • TQt::SolidPattern +
  • TQt::Dense1Pattern +
  • TQt::Dense2Pattern +
  • TQt::Dense3Pattern +
  • TQt::Dense4Pattern +
  • TQt::Dense5Pattern +
  • TQt::Dense6Pattern +
  • TQt::Dense7Pattern +
  • TQt::HorPattern +
  • TQt::VerPattern +
  • TQt::CrossPattern +
  • TQt::BDiagPattern +
  • TQt::FDiagPattern +
  • TQt::DiagCrossPattern +
  • TQt::CustomPattern +

Brush Styles
+

+

TQt::ButtonState

+ +

This enum type describes the state of the mouse and the modifier +buttons. +

    +
  • TQt::NoButton - used when the button state does not refer to any +button (see TQMouseEvent::button()). +
  • TQt::LeftButton - set if the left button is pressed, or if this +event refers to the left button. (The left button may be +the right button on left-handed mice.) +
  • TQt::RightButton - the right button. +
  • TQt::MidButton - the middle button. +
  • TQt::ShiftButton - a Shift key on the keyboard is also pressed. +
  • TQt::ControlButton - a Ctrl key on the keyboard is also pressed. +
  • TQt::AltButton - an Alt key on the keyboard is also pressed. +
  • TQt::MetaButton - a Meta key on the keyboard is also pressed. +
  • TQt::Keypad - a keypad button is pressed. +
  • TQt::KeyButtonMask - a mask for ShiftButton, ControlButton, +AltButton and MetaButton. +
  • TQt::MouseButtonMask - a mask for LeftButton, RightButton and MidButton. +
+

TQt::Corner

+ +This enum type specifies a corner in a rectangle: +
    +
  • TQt::TopLeft - top left corner +
  • TQt::TopRight - top right corner +
  • TQt::BottomLeft - bottom left corner +
  • TQt::BottomRight - bottom right corner +
+

TQt::CursorShape

+ +

This enum type defines the various cursors that can be used. +

    +
  • TQt::ArrowCursor - standard arrow cursor +
  • TQt::UpArrowCursor - upwards arrow +
  • TQt::CrossCursor - crosshair +
  • TQt::WaitCursor - hourglass/watch +
  • TQt::BusyCursor - standard arrow with hourglass/watch +
  • TQt::IbeamCursor - ibeam/text entry +
  • TQt::SizeVerCursor - vertical resize +
  • TQt::SizeHorCursor - horizontal resize +
  • TQt::SizeFDiagCursor - diagonal resize (\) +
  • TQt::SizeBDiagCursor - diagonal resize (/) +
  • TQt::SizeAllCursor - all directions resize +
  • TQt::BlankCursor - blank/invisible cursor +
  • TQt::SplitVCursor - vertical splitting +
  • TQt::SplitHCursor - horizontal splitting +
  • TQt::PointingHandCursor - a pointing hand +
  • TQt::ForbiddenCursor - a slashed circle +
  • TQt::WhatsThisCursor - an arrow with a question mark +
  • TQt::BitmapCursor +

ArrowCursor is the default for widgets in a normal state. +

Cursor Shapes
+

TQt::DateFormat

+ +
    +
  • TQt::TextDate - (default) TQt format +
  • TQt::ISODate - ISO 8601 extended format (YYYY-MM-DD, or with time, +YYYY-MM-DDTHH:MM:SS) +
  • TQt::LocalDate - locale dependent format +
+

TQt::Dock

+ +

Each dock window can be in one of the following positions: +

    +
  • TQt::DockTop - above the central widget, below the menu bar. +
  • TQt::DockBottom - below the central widget, above the status bar. +
  • TQt::DockLeft - to the left of the central widget. +
  • TQt::DockRight - to the right of the central widget. +
  • TQt::DockMinimized - the dock window is not shown (this is +effectively a 'hidden' dock area); the handles of all minimized +dock windows are drawn in one row below the menu bar. +
  • TQt::DockTornOff - the dock window floats as its own top level +window which always stays on top of the main window. +
  • TQt::DockUnmanaged - not managed by a TQMainWindow. +
+

TQt::GUIStyle

+ +

This type is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

    +
  • TQt::WindowsStyle +
  • TQt::MotifStyle +
  • TQt::MacStyle +
  • TQt::Win3Style +
  • TQt::PMStyle +
+

TQt::ImageConversionFlags

+ +

The conversion flag is a bitwise-OR of the following values. The +options marked "(default)" are set if no other values from the +list are included (since the defaults are zero): +

Color/Mono preference (ignored for TQBitmap) +

    +
  • TQt::AutoColor - (default) - If the image has depth 1 and contains only +black and white pixels, the pixmap becomes monochrome. +
  • TQt::ColorOnly - The pixmap is dithered/converted to the +native display depth. +
  • TQt::MonoOnly - The pixmap becomes monochrome. If necessary, +it is dithered using the chosen dithering algorithm. +

Dithering mode preference for RGB channels +

    +
  • TQt::DiffuseDither - (default) - A high-quality dither. +
  • TQt::OrderedDither - A faster, more ordered dither. +
  • TQt::ThresholdDither - No dithering; closest color is used. +

Dithering mode preference for alpha channel +

    +
  • TQt::ThresholdAlphaDither - (default) - No dithering. +
  • TQt::OrderedAlphaDither - A faster, more ordered dither. +
  • TQt::DiffuseAlphaDither - A high-quality dither. +
  • TQt::NoAlpha - Not supported. +

Color matching versus dithering preference +

    +
  • TQt::PreferDither - (default when converting to a pixmap) - Always dither +32-bit images when the image is converted to 8 bits. +
  • TQt::AvoidDither - (default when converting for the purpose of saving to +file) - Dither 32-bit images only if the image has more than 256 +colors and it is being converted to 8 bits. +
  • TQt::AutoDither - Not supported. +

The following are not values that are used directly, but masks for +the above classes: +

    +
  • TQt::ColorMode_Mask - Mask for the color mode. +
  • TQt::Dither_Mask - Mask for the dithering mode for RGB channels. +
  • TQt::AlphaDither_Mask - Mask for the dithering mode for the alpha channel. +
  • TQt::DitherMode_Mask - Mask for the mode that determines the preference of +color matching versus dithering. +

Using 0 as the conversion flag sets all the default options. + +

TQt::Key

+ +

The key names used by TQt. +

    +
  • TQt::Key_Escape +
  • TQt::Key_Tab +
  • TQt::Key_Backtab +
  • TQt::Key_Backspace +
  • TQt::Key_Return +
  • TQt::Key_Enter +
  • TQt::Key_Insert +
  • TQt::Key_Delete +
  • TQt::Key_Pause +
  • TQt::Key_Print +
  • TQt::Key_SysReq +
  • TQt::Key_Home +
  • TQt::Key_End +
  • TQt::Key_Left +
  • TQt::Key_Up +
  • TQt::Key_Right +
  • TQt::Key_Down +
  • TQt::Key_Prior +
  • TQt::Key_Next +
  • TQt::Key_Shift +
  • TQt::Key_Control +
  • TQt::Key_Meta +
  • TQt::Key_Alt +
  • TQt::Key_CapsLock +
  • TQt::Key_NumLock +
  • TQt::Key_ScrollLock +
  • TQt::Key_Clear +
  • TQt::Key_F1 +
  • TQt::Key_F2 +
  • TQt::Key_F3 +
  • TQt::Key_F4 +
  • TQt::Key_F5 +
  • TQt::Key_F6 +
  • TQt::Key_F7 +
  • TQt::Key_F8 +
  • TQt::Key_F9 +
  • TQt::Key_F10 +
  • TQt::Key_F11 +
  • TQt::Key_F12 +
  • TQt::Key_F13 +
  • TQt::Key_F14 +
  • TQt::Key_F15 +
  • TQt::Key_F16 +
  • TQt::Key_F17 +
  • TQt::Key_F18 +
  • TQt::Key_F19 +
  • TQt::Key_F20 +
  • TQt::Key_F21 +
  • TQt::Key_F22 +
  • TQt::Key_F23 +
  • TQt::Key_F24 +
  • TQt::Key_F25 +
  • TQt::Key_F26 +
  • TQt::Key_F27 +
  • TQt::Key_F28 +
  • TQt::Key_F29 +
  • TQt::Key_F30 +
  • TQt::Key_F31 +
  • TQt::Key_F32 +
  • TQt::Key_F33 +
  • TQt::Key_F34 +
  • TQt::Key_F35 +
  • TQt::Key_Super_L +
  • TQt::Key_Super_R +
  • TQt::Key_Menu +
  • TQt::Key_Hyper_L +
  • TQt::Key_Hyper_R +
  • TQt::Key_Help +
  • TQt::Key_Space +
  • TQt::Key_Any +
  • TQt::Key_Exclam +
  • TQt::Key_QuoteDbl +
  • TQt::Key_NumberSign +
  • TQt::Key_Dollar +
  • TQt::Key_Percent +
  • TQt::Key_Ampersand +
  • TQt::Key_Apostrophe +
  • TQt::Key_ParenLeft +
  • TQt::Key_ParenRight +
  • TQt::Key_Asterisk +
  • TQt::Key_Plus +
  • TQt::Key_Comma +
  • TQt::Key_Minus +
  • TQt::Key_Period +
  • TQt::Key_Slash +
  • TQt::Key_0 +
  • TQt::Key_1 +
  • TQt::Key_2 +
  • TQt::Key_3 +
  • TQt::Key_4 +
  • TQt::Key_5 +
  • TQt::Key_6 +
  • TQt::Key_7 +
  • TQt::Key_8 +
  • TQt::Key_9 +
  • TQt::Key_Colon +
  • TQt::Key_Semicolon +
  • TQt::Key_Less +
  • TQt::Key_Equal +
  • TQt::Key_Greater +
  • TQt::Key_Question +
  • TQt::Key_At +
  • TQt::Key_A +
  • TQt::Key_B +
  • TQt::Key_C +
  • TQt::Key_D +
  • TQt::Key_E +
  • TQt::Key_F +
  • TQt::Key_G +
  • TQt::Key_H +
  • TQt::Key_I +
  • TQt::Key_J +
  • TQt::Key_K +
  • TQt::Key_L +
  • TQt::Key_M +
  • TQt::Key_N +
  • TQt::Key_O +
  • TQt::Key_P +
  • TQt::Key_Q +
  • TQt::Key_R +
  • TQt::Key_S +
  • TQt::Key_T +
  • TQt::Key_U +
  • TQt::Key_V +
  • TQt::Key_W +
  • TQt::Key_X +
  • TQt::Key_Y +
  • TQt::Key_Z +
  • TQt::Key_BracketLeft +
  • TQt::Key_Backslash +
  • TQt::Key_BracketRight +
  • TQt::Key_AsciiCircum +
  • TQt::Key_Underscore +
  • TQt::Key_QuoteLeft +
  • TQt::Key_BraceLeft +
  • TQt::Key_Bar +
  • TQt::Key_BraceRight +
  • TQt::Key_AsciiTilde +
  • TQt::Key_nobreakspace +
  • TQt::Key_exclamdown +
  • TQt::Key_cent +
  • TQt::Key_sterling +
  • TQt::Key_currency +
  • TQt::Key_yen +
  • TQt::Key_brokenbar +
  • TQt::Key_section +
  • TQt::Key_diaeresis +
  • TQt::Key_copyright +
  • TQt::Key_ordfeminine +
  • TQt::Key_guillemotleft +
  • TQt::Key_notsign +
  • TQt::Key_hyphen +
  • TQt::Key_registered +
  • TQt::Key_macron +
  • TQt::Key_degree +
  • TQt::Key_plusminus +
  • TQt::Key_twosuperior +
  • TQt::Key_threesuperior +
  • TQt::Key_acute +
  • TQt::Key_mu +
  • TQt::Key_paragraph +
  • TQt::Key_periodcentered +
  • TQt::Key_cedilla +
  • TQt::Key_onesuperior +
  • TQt::Key_masculine +
  • TQt::Key_guillemotright +
  • TQt::Key_onequarter +
  • TQt::Key_onehalf +
  • TQt::Key_threequarters +
  • TQt::Key_questiondown +
  • TQt::Key_Agrave +
  • TQt::Key_Aacute +
  • TQt::Key_Acircumflex +
  • TQt::Key_Atilde +
  • TQt::Key_Adiaeresis +
  • TQt::Key_Aring +
  • TQt::Key_AE +
  • TQt::Key_Ccedilla +
  • TQt::Key_Egrave +
  • TQt::Key_Eacute +
  • TQt::Key_Ecircumflex +
  • TQt::Key_Ediaeresis +
  • TQt::Key_Igrave +
  • TQt::Key_Iacute +
  • TQt::Key_Icircumflex +
  • TQt::Key_Idiaeresis +
  • TQt::Key_ETH +
  • TQt::Key_Ntilde +
  • TQt::Key_Ograve +
  • TQt::Key_Oacute +
  • TQt::Key_Ocircumflex +
  • TQt::Key_Otilde +
  • TQt::Key_Odiaeresis +
  • TQt::Key_multiply +
  • TQt::Key_Ooblique +
  • TQt::Key_Ugrave +
  • TQt::Key_Uacute +
  • TQt::Key_Ucircumflex +
  • TQt::Key_Udiaeresis +
  • TQt::Key_Yacute +
  • TQt::Key_THORN +
  • TQt::Key_ssharp +
  • TQt::Key_agrave +
  • TQt::Key_aacute +
  • TQt::Key_acircumflex +
  • TQt::Key_atilde +
  • TQt::Key_adiaeresis +
  • TQt::Key_aring +
  • TQt::Key_ae +
  • TQt::Key_ccedilla +
  • TQt::Key_egrave +
  • TQt::Key_eacute +
  • TQt::Key_ecircumflex +
  • TQt::Key_ediaeresis +
  • TQt::Key_igrave +
  • TQt::Key_iacute +
  • TQt::Key_icircumflex +
  • TQt::Key_idiaeresis +
  • TQt::Key_eth +
  • TQt::Key_ntilde +
  • TQt::Key_ograve +
  • TQt::Key_oacute +
  • TQt::Key_ocircumflex +
  • TQt::Key_otilde +
  • TQt::Key_odiaeresis +
  • TQt::Key_division +
  • TQt::Key_oslash +
  • TQt::Key_ugrave +
  • TQt::Key_uacute +
  • TQt::Key_ucircumflex +
  • TQt::Key_udiaeresis +
  • TQt::Key_yacute +
  • TQt::Key_thorn +
  • TQt::Key_ydiaeresis +

Multimedia keys +

    +
  • TQt::Key_Back +
  • TQt::Key_Forward +
  • TQt::Key_Stop +
  • TQt::Key_Refresh +
  • TQt::Key_VolumeDown +
  • TQt::Key_VolumeMute +
  • TQt::Key_VolumeUp +
  • TQt::Key_BassBoost +
  • TQt::Key_BassUp +
  • TQt::Key_BassDown +
  • TQt::Key_TrebleUp +
  • TQt::Key_TrebleDown +
  • TQt::Key_MediaPlay +
  • TQt::Key_MediaStop +
  • TQt::Key_MediaPrev +
  • TQt::Key_MediaNext +
  • TQt::Key_MediaRecord +
  • TQt::Key_HomePage +
  • TQt::Key_Favorites +
  • TQt::Key_Search +
  • TQt::Key_Standby +
  • TQt::Key_OpenUrl +
  • TQt::Key_LaunchMail +
  • TQt::Key_LaunchMedia +
  • TQt::Key_Launch0 +
  • TQt::Key_Launch1 +
  • TQt::Key_Launch2 +
  • TQt::Key_Launch3 +
  • TQt::Key_Launch4 +
  • TQt::Key_Launch5 +
  • TQt::Key_Launch6 +
  • TQt::Key_Launch7 +
  • TQt::Key_Launch8 +
  • TQt::Key_Launch9 +
  • TQt::Key_LaunchA +
  • TQt::Key_LaunchB +
  • TQt::Key_LaunchC +
  • TQt::Key_LaunchD +
  • TQt::Key_LaunchE +
  • TQt::Key_LaunchF +
  • TQt::Key_MediaLast +
  • TQt::Key_unknown +
  • TQt::Key_Direction_L - internal use only +
  • TQt::Key_Direction_R - internal use only +

+

TQt::MacintoshVersion

+ +
    +
  • TQt::MV_Unknown - Version cannot be detected +
  • TQt::MV_9 - Mac OS 9 +
  • TQt::MV_10_DOT_3 - Mac OS X 10.3 +
  • TQt::MV_10_DOT_2 - Mac OS X 10.2 +
  • TQt::MV_10_DOT_1 - Mac OS X 10.1 +
  • TQt::MV_10_DOT_0 - Mac OS X 10.0 +
  • TQt::MV_10_DOT_4 - Mac OS X 10.4 +
  • TQt::MV_CHEETAH - 10.0 Codename +
  • TQt::MV_PUMA - 10.1 Codename +
  • TQt::MV_JAGUAR - 10.2 Codename +
  • TQt::MV_PANTHER - 10.3 Codename +
  • TQt::MV_TIGER - 10.4 Codename +
+

TQt::Modifier

+ +

This enum type describes the keyboard modifier keys supported by +TQt. +

    +
  • TQt::SHIFT - the Shift keys provided on all standard keyboards. +
  • TQt::META - the Meta keys. +
  • TQt::CTRL - the Ctrl keys. +
  • TQt::ALT - the normal Alt keys, but not e.g. AltGr. +
  • TQt::MODIFIER_MASK - is a mask of Shift, Ctrl, Alt and Meta. +
  • TQt::UNICODE_ACCEL - the accelerator is specified as a Unicode code +point, not as a TQt Key. +
+

TQt::Orientation

+ +

This type is used to signify an object's orientation. +

    +
  • TQt::Horizontal +
  • TQt::Vertical +

Orientation is used with TQScrollBar for example. + +

TQt::PaintUnit

+ +
    +
  • TQt::PixelUnit +
  • TQt::LoMetricUnit - obsolete +
  • TQt::HiMetricUnit - obsolete +
  • TQt::LoEnglishUnit - obsolete +
  • TQt::HiEnglishUnit - obsolete +
  • TQt::TwipsUnit - obsolete +
+

TQt::PenCapStyle

+ +

This enum type defines the pen cap styles supported by TQt, i.e. +the line end caps that can be drawn using TQPainter. +

    +
  • TQt::FlatCap - a square line end that does not cover the end +point of the line. +
  • TQt::SquareCap - a square line end that covers the end point and +extends beyond it with half the line width. +
  • TQt::RoundCap - a rounded line end. +
  • TQt::MPenCapStyle - mask of the pen cap styles. +

Pen Cap Styles
+

TQt::PenJoinStyle

+ +

This enum type defines the pen join styles supported by TQt, i.e. +which joins between two connected lines can be drawn using +TQPainter. +

    +
  • TQt::MiterJoin - The outer edges of the lines are extended to +meet at an angle, and this area is filled. +
  • TQt::BevelJoin - The triangular notch between the two lines is filled. +
  • TQt::RoundJoin - A circular arc between the two lines is filled. +
  • TQt::MPenJoinStyle - mask of the pen join styles. +

Pen Join Styles
+

TQt::PenStyle

+ +

This enum type defines the pen styles that can be drawn using +TQPainter. The styles are +

    +
  • TQt::NoPen - no line at all. For example, TQPainter::drawRect() +fills but does not draw any boundary line. +
  • TQt::SolidLine - a simple line. +
  • TQt::DashLine - dashes separated by a few pixels. +
  • TQt::DotLine - dots separated by a few pixels. +
  • TQt::DashDotLine - alternate dots and dashes. +
  • TQt::DashDotDotLine - one dash, two dots, one dash, two dots. +
  • TQt::MPenStyle - mask of the pen styles. +

Pen Styles
+

TQt::RasterOp

+ +

This enum type is used to describe the way things are written to +the paint device. Each bit of the src (what you write) +interacts with the corresponding bit of the dst pixel. +

    +
  • TQt::CopyROP - dst = src +
  • TQt::OrROP - dst = src OR dst +
  • TQt::XorROP - dst = src XOR dst +
  • TQt::NotAndROP - dst = (NOT src) AND dst +
  • TQt::EraseROP - an alias for NotAndROP +
  • TQt::NotCopyROP - dst = NOT src +
  • TQt::NotOrROP - dst = (NOT src) OR dst +
  • TQt::NotXorROP - dst = (NOT src) XOR dst +
  • TQt::AndROP - dst = src AND dst +
  • TQt::NotEraseROP - an alias for AndROP +
  • TQt::NotROP - dst = NOT dst +
  • TQt::ClearROP - dst = 0 +
  • TQt::SetROP - dst = 1 +
  • TQt::NopROP - dst = dst +
  • TQt::AndNotROP - dst = src AND (NOT dst) +
  • TQt::OrNotROP - dst = src OR (NOT dst) +
  • TQt::NandROP - dst = NOT (src AND dst) +
  • TQt::NorROP - dst = NOT (src OR dst) +

By far the most useful ones are CopyROP and XorROP. +

On TQt/Embedded, only CopyROP, XorROP, and NotROP are supported. + +

TQt::SequenceMatch

+ +
    +
  • TQt::NoMatch - Sequences have nothing in common +
  • TQt::PartialMatch - Sequences match partially, but are not complete +
  • TQt::Identical - Sequences do not differ +
+

TQt::SortOrder

+ +

This enum describes how the items in a widget are sorted. +

    +
  • TQt::Ascending - The items are sorted ascending e.g. starts with +'AAA' ends with 'ZZZ' in Latin-1 locales +
  • TQt::Descending - The items are sorted descending e.g. starts with +'ZZZ' ends with 'AAA' in Latin-1 locales +
+

TQt::StringComparisonMode

+ +

This enum type is used to set the string comparison mode when +searching for an item. It is used by TQListBox, TQListView and +TQIconView, for example. We'll refer to the string being searched +as the 'target' string. +

    +
  • TQt::CaseSensitive - The strings must match case sensitively. +
  • TQt::ExactMatch - The target and search strings must match exactly. +
  • TQt::BeginsWith - The target string begins with the search string. +
  • TQt::EndsWith - The target string ends with the search string. +
  • TQt::Contains - The target string contains the search string. +

If you OR these flags together (excluding CaseSensitive), the +search criteria be applied in the following order: ExactMatch, +BeginsWith, EndsWith, Contains. +

Matching is case-insensitive unless CaseSensitive is set. CaseSensitive can be OR-ed with any combination of the other +flags. +

+

TQt::TextFlags

+ +

This enum type is used to define some modifier flags. Some of +these flags only make sense in the context of printing: +

    +
  • TQt::SingleLine - Treats all whitespace as spaces and prints just +one line. +
  • TQt::DontClip - If it's impossible to stay within the given bounds, +it prints outside. +
  • TQt::ExpandTabs - Makes the U+0009 (ASCII tab) character move to +the next tab stop. +
  • TQt::ShowPrefix - Displays the string "&P" as P +(see TQButton for an example). For an ampersand, use "&&". +
  • TQt::WordBreak - Breaks lines at appropriate points, e.g. at word +boundaries. +
  • TQt::BreakAnywhere - Breaks lines anywhere, even within words. +
  • TQt::NoAccel - Same as ShowPrefix but doesn't draw the underlines. +

You can use as many modifier flags as you want, except that SingleLine and WordBreak cannot be combined. +

Flags that are inappropriate for a given use (e.g. ShowPrefix to +TQGridLayout::addWidget()) are generally ignored. +

+

TQt::TextFormat

+ +

This enum is used in widgets that can display both plain text and +rich text, e.g. TQLabel. It is used for deciding whether a text +string should be interpreted as one or the other. This is normally +done by passing one of the enum values to a setTextFormat() +function. +

    +
  • TQt::PlainText - The text string is interpreted as a plain text +string. +
  • TQt::RichText - The text string is interpreted as a rich text +string using the current TQStyleSheet::defaultSheet(). +
  • TQt::AutoText - The text string is interpreted as for RichText +if TQStyleSheet::mightBeRichText() returns TRUE, otherwise as +PlainText. +
  • TQt::LogText - A special, limited text format which is only used +by TQTextEdit in an optimized mode. +
+

TQt::TimeSpec

+ +
    +
  • TQt::LocalTime - Locale dependent time (Timezones and Daylight Savings Time) +
  • TQt::UTC - Coordinated Universal Time, replaces Greenwich Time +
+

TQt::UIEffect

+ +
    +
  • TQt::UI_General +
  • TQt::UI_AnimateMenu +
  • TQt::UI_FadeMenu +
  • TQt::UI_AnimateCombo +
  • TQt::UI_AnimateTooltip +
  • TQt::UI_FadeTooltip +
  • TQt::UI_AnimateToolBox - Reserved +
+

TQt::WidgetFlags

+ +

+

This enum type is used to specify various window-system properties +for the widget. They are fairly unusual but necessary in a few +cases. Some of these flags depend on whether the underlying window +manager supports them. (See the toplevel example for an explanation and example of their +use.) +

The main types are +

    +
  • TQt::WType_TopLevel - indicates that this widget is a top-level +widget, usually with a window-system frame and so on. +
  • TQt::WType_Dialog - indicates that this widget is a top-level +window that should be decorated as a dialog (i.e. typically no +maximize or minimize buttons in the title bar). If you want to use +it as a modal dialog it should be launched from another window, or +have a parent and this flag should be combined with WShowModal. +If you make it modal, the dialog will prevent other top-level +windows in the application from getting any input. WType_Dialog +implies WType_TopLevel. We refer to a top-level window that has +a parent as a secondary window. (See also WGroupLeader.) +
  • TQt::WType_Popup - indicates that this widget is a popup +top-level window, i.e. that it is modal, but has a window system +frame appropriate for popup menus. WType_Popup implies +WType_TopLevel. +
  • TQt::WType_Desktop - indicates that this widget is the desktop. +See also WPaintDesktop below. WType_Desktop implies WType_TopLevel. +

There are also a number of flags which you can use to customize +the appearance of top-level windows. These have no effect on other +windows: +

    +
  • TQt::WStyle_Customize - indicates that the WStyle_* flags +should be used to build the window instead of the default flags. +
  • TQt::WStyle_NormalBorder - gives the window a normal border. +This cannot be combined with WStyle_DialogBorder or WStyle_NoBorder. +
  • TQt::WStyle_DialogBorder - gives the window a thin dialog border. +This cannot be combined with WStyle_NormalBorder or WStyle_NoBorder. +
  • TQt::WStyle_NoBorder - produces a borderless window. Note that +the user cannot move or resize a borderless window via the window +system. This cannot be combined with WStyle_NormalBorder or WStyle_DialogBorder. On Windows, the flag works fine. On X11, the +result of the flag is dependent on the window manager and its +ability to understand MOTIF and/or NETWM hints: most existing +modern window managers can handle this. With WX11BypassWM, you +can bypass the window manager completely. This results in a +borderless window that is not managed at all (i.e. no keyboard +input unless you call setActiveWindow() manually). +
  • TQt::WStyle_NoBorderEx - this value is obsolete. It has the same +effect as using WStyle_NoBorder. +
  • TQt::WStyle_Title - gives the window a title bar. +
  • TQt::WStyle_SysMenu - adds a window system menu. +
  • TQt::WStyle_Minimize - adds a minimize button. Note that on +Windows this has to be combined with WStyle_SysMenu for it to +work. +
  • TQt::WStyle_Maximize - adds a maximize button. Note that on +Windows this has to be combined with WStyle_SysMenu for it to work. +
  • TQt::WStyle_MinMax - is equal to WStyle_Minimize|WStyle_Maximize. Note that on Windows this has to +be combined with WStyle_SysMenu to work. +
  • TQt::WStyle_ContextHelp - adds a context help button to dialogs. +
  • TQt::WStyle_Tool - makes the window a tool window. A tool window +is often a small window with a smaller than usual title bar and +decoration, typically used for collections of tool buttons. It +there is a parent, the tool window will always be kept on top of +it. If there isn't a parent, you may consider passing WStyle_StaysOnTop as well. If the window system supports it, a +tool window can be decorated with a somewhat lighter frame. It can +also be combined with WStyle_NoBorder. +
  • TQt::WStyle_StaysOnTop - informs the window system that the +window should stay on top of all other windows. Note that on some +window managers on X11 you also have to pass WX11BypassWM for +this flag to work correctly. +
  • TQt::WStyle_Dialog - indicates that the window is a logical +subwindow of its parent (i.e. a dialog). The window will not get +its own taskbar entry and will be kept on top of its parent by the +window system. Usually it will also be minimized when the parent +is minimized. If not customized, the window is decorated with a +slightly simpler title bar. This is the flag TQDialog uses. +
  • TQt::WStyle_Splash - indicates that the window is a splash screen. +On X11, we try to follow NETWM standard for a splash screen window if the +window manager supports is otherwise it is equivalent to WX11BypassWM. On +other platforms, it is equivalent to WStyle_NoBorder | WMacNoSheet | +WStyle_Tool | WWinOwnDC +

Modifier flags: +

    +
  • TQt::WDestructiveClose - makes TQt delete this widget when the +widget has accepted closeEvent(), or when the widget tried to +ignore closeEvent() but could not. +
  • TQt::WPaintDesktop - gives this widget paint events for the +desktop. +
  • TQt::WPaintUnclipped - makes all painters operating on this +widget unclipped. Children of this widget or other widgets in +front of it do not clip the area the painter can paint on. +
  • TQt::WPaintClever - indicates that TQt should not try to +optimize repainting for the widget, but instead pass on window +system repaint events directly. (This tends to produce more events +and smaller repaint regions.) +
  • TQt::WMouseNoMask - indicates that even if the widget has a mask, +it wants mouse events for its entire rectangle. +
  • TQt::WStaticContents - indicates that the widget contents are +north-west aligned and static. On resize, such a widget will +receive paint events only for the newly visible part of itself. +
  • TQt::WNoAutoErase - indicates that the widget paints all its +pixels. Updating, resizing, scrolling and focus changes should +therefore not erase the widget. This allows smart-repainting to +avoid flicker. +
  • TQt::WResizeNoErase - this value is obsolete; use WNoAutoErase instead. +
  • TQt::WRepaintNoErase - this value is obsolete; use WNoAutoErase instead. +
  • TQt::WGroupLeader - makes this window a group leader. A group +leader should not have a parent (i.e. it should be a top-level +window). Any decendant windows (direct or indirect) of a group +leader are in its group; other windows are not. If you show a +secondary window from the group (i.e. show a window whose top-most +parent is a group leader), that window will be modal with respect +to the other windows in the group, but modeless with respect to +windows in other groups. +

Miscellaneous flags +

    +
  • TQt::WShowModal - see WType_Dialog +

Internal flags. +

    +
  • TQt::WNoMousePropagation +
  • TQt::WStaticContents +
  • TQt::WStyle_Reserved +
  • TQt::WSubWindow +
  • TQt::WType_Modal +
  • TQt::WWinOwnDC +
  • TQt::WX11BypassWM +
  • TQt::WMacNoSheet +
  • TQt::WMacDrawer +
  • TQt::WStyle_Mask +
  • TQt::WType_Mask +

+

TQt::WidgetState

+ +

Internal flags. +

    +
  • TQt::WState_Created +
  • TQt::WState_Disabled +
  • TQt::WState_Visible +
  • TQt::WState_ForceHide +
  • TQt::WState_OwnCursor +
  • TQt::WState_MouseTracking +
  • TQt::WState_CompressKeys +
  • TQt::WState_BlockUpdates +
  • TQt::WState_InPaintEvent +
  • TQt::WState_Reparented +
  • TQt::WState_ConfigPending +
  • TQt::WState_Resized +
  • TQt::WState_AutoMask +
  • TQt::WState_Polished +
  • TQt::WState_DND +
  • TQt::WState_Reserved0 - internal +
  • TQt::WState_CreatedHidden +
  • TQt::WState_Maximized +
  • TQt::WState_Minimized +
  • TQt::WState_ForceDisabled +
  • TQt::WState_Exposed +
  • TQt::WState_HasMouse +
  • TQt::WState_CreatedHidden +
  • TQt::WState_OwnSizePolicy +
  • TQt::WState_FullScreen +
+

TQt::WindowState

+ +

+

This enum type is used to specify the current state of a top-level +window. +

The states are +

    +
  • TQt::WindowNoState - The window has no state set (in normal state). +
  • TQt::WindowMinimized - The window is minimized (i.e. iconified). +
  • TQt::WindowMaximized - The window is maximized with a frame around it. +
  • TQt::WindowFullScreen - The window fills the entire screen without any frame around it. +
  • TQt::WindowActive - The window is the active window, i.e. it has keyboard focus. +

+

TQt::WindowsVersion

+ +
    +
  • TQt::WV_32s - Windows 3.1 with Win 32s +
  • TQt::WV_95 - Windows 95 +
  • TQt::WV_98 - Windows 98 +
  • TQt::WV_Me - Windows Me +
  • TQt::WV_DOS_based +
  • TQt::WV_NT - Windows NT +
  • TQt::WV_2000 - Windows 2000 +
  • TQt::WV_XP - Windows XP +
  • TQt::WV_2003 - Windows Server 2003 +
  • TQt::WV_NT_based +
  • TQt::WV_VISTA - Windows Vista +
  • TQt::WV_CE - Windows CE +
  • TQt::WV_CENET - Windows CE .NET +
  • TQt::WV_CE_based +
+ +

+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/qt33-class-chart.png b/doc/html/qt33-class-chart.png new file mode 100644 index 00000000..18410834 Binary files /dev/null and b/doc/html/qt33-class-chart.png differ diff --git a/doc/html/qtab-members.html b/doc/html/qtab-members.html new file mode 100644 index 00000000..cdba6490 --- /dev/null +++ b/doc/html/qtab-members.html @@ -0,0 +1,58 @@ + + + + + +TQTab Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTab

+ +

This is the complete list of member functions for +TQTab, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtab.html b/doc/html/qtab.html new file mode 100644 index 00000000..eee12fbb --- /dev/null +++ b/doc/html/qtab.html @@ -0,0 +1,140 @@ + + + + + +TQTab Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTab Class Reference

+ +

The TQTab class provides the structures in a TQTabBar. +More... +

#include <qtabbar.h> +

Inherits TQt. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQTab class provides the structures in a TQTabBar. +

+

This class is used for custom TQTabBar tab headings. +

See also TQTabBar and Advanced Widgets. + +


Member Function Documentation

+

TQTab::TQTab () +

+Constructs an empty tab. All fields are set to empty. + +

TQTab::TQTab ( const TQString & text ) +

+Constructs a tab with the text text. + +

TQTab::TQTab ( const TQIconSet & icon, const TQString & text = TQString::null ) +

+Constructs a tab with an icon and the text, text. + +

TQTab::~TQTab () [virtual] +

+Destroys the tab and frees up all allocated resources. + +

TQIconSet * TQTab::iconSet () const +

+ +

Return the TQIconSet of the TQTab. + +

int TQTab::identifier () const +

+ +

Return the TQTab's identifier. + +

bool TQTab::isEnabled () const +

+ +

Returns TRUE if the TQTab is enabled; otherwise returns FALSE. + +

TQRect TQTab::rect () const +

+ +

Return the TQRect for the TQTab. + +

void TQTab::setEnabled ( bool enable ) +

+ +

If enable is TRUE enable the TQTab, otherwise disable it. + +

void TQTab::setIconSet ( const TQIconSet & icon ) +

+Sets the tab's iconset to icon + +

void TQTab::setIdentifier ( int i ) +

+ +

Set the identifier for the TQTab to i. Each TQTab's identifier +within a TQTabBar must be unique. + +

void TQTab::setRect ( const TQRect & rect ) +

+ +

Set the TQTab TQRect to rect. + +

void TQTab::setText ( const TQString & text ) +

+Sets the text of the tab to text. + +

TQString TQTab::text () const +

+ +

Returns the text of the TQTab label. + + +


+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/qtabbar-h.html b/doc/html/qtabbar-h.html new file mode 100644 index 00000000..ee53fb77 --- /dev/null +++ b/doc/html/qtabbar-h.html @@ -0,0 +1,231 @@ + + + + + +qtabbar.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtabbar.h

+ +

This is the verbatim text of the qtabbar.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtabbar.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of TQTab and TQTabBar classes
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQTABBAR_H
+#define TQTABBAR_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qptrlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_TABBAR
+
+class TQTabBar;
+class TQIconSet;
+
+class Q_EXPORT TQTab : public TQt
+{
+    friend class TQTabBar;
+    friend class TQTabWidget;
+
+public:
+    TQTab();
+    virtual ~TQTab();
+    TQTab( const TQString& text );
+    TQTab( const TQIconSet& icon, const TQString& text = TQString::null );
+
+    void setText( const TQString& text);
+    TQString text() const { return label; }
+    void setIconSet( const TQIconSet& icon );
+    TQIconSet* iconSet() const { return iconset; }
+    void setRect( const TQRect& rect ) { r = rect; }
+    TQRect rect() const { return r; }
+    void setEnabled( bool enable ) { enabled = enable; }
+    bool isEnabled() const { return enabled; }
+    void setIdentifier( int i ) { id = i; }
+    int identifier() const { return id; }
+
+private:
+    void setTabBar( TQTabBar *tb );
+    TQString label;
+    TQRect r; // the bounding rectangle of this (may overlap with others)
+    bool enabled;
+    int id;
+    TQIconSet* iconset; // optional iconset
+    TQTabBar *tb;
+};
+
+
+struct TQTabPrivate;
+//class *TQAccel;
+
+class Q_EXPORT TQTabBar: public TQWidget
+{
+    Q_OBJECT
+    Q_ENUMS( Shape )
+    Q_PROPERTY( Shape shape READ shape WRITE setShape )
+    Q_PROPERTY( int currentTab READ currentTab WRITE setCurrentTab )
+    Q_PROPERTY( int count READ count )
+    Q_PROPERTY( int keyboardFocusTab READ keyboardFocusTab )
+
+public:
+    TQTabBar( TQWidget* parent=0, const char* name=0 );
+    ~TQTabBar();
+
+    enum Shape { RoundedAbove, RoundedBelow,
+		 TriangularAbove, TriangularBelow };
+
+    Shape shape() const;
+    virtual void setShape( Shape );
+
+    void show();
+
+    virtual int addTab( TQTab * );
+    virtual int insertTab( TQTab *, int index = -1 );
+    virtual void removeTab( TQTab * );
+
+    virtual void setTabEnabled( int, bool );
+    bool isTabEnabled( int ) const;
+
+
+    TQSize sizeHint() const;
+    TQSize minimumSizeHint() const;
+
+    int currentTab() const;
+    int keyboardFocusTab() const;
+
+    TQTab * tab( int ) const;
+    TQTab * tabAt( int ) const;
+    int indexOf( int ) const;
+    int count() const;
+
+    virtual void layoutTabs();
+    virtual TQTab * selectTab( const TQPoint & p ) const;
+
+    void 	removeToolTip( int index );
+    void     	setToolTip( int index, const TQString & tip );
+    TQString 	toolTip( int index ) const;
+
+public slots:
+    virtual void setCurrentTab( int );
+    virtual void setCurrentTab( TQTab * );
+
+signals:
+    void selected( int );
+    void layoutChanged();
+
+protected:
+    virtual void paint( TQPainter *, TQTab *, bool ) const; // ### not const
+    virtual void paintLabel( TQPainter*, const TQRect&, TQTab*, bool ) const;
+
+    void focusInEvent( TQFocusEvent *e );
+    void focusOutEvent( TQFocusEvent *e );
+
+    void resizeEvent( TQResizeEvent * );
+    void paintEvent( TQPaintEvent * );
+    void mousePressEvent ( TQMouseEvent * );
+    void mouseMoveEvent ( TQMouseEvent * );
+    void mouseReleaseEvent ( TQMouseEvent * );
+    void keyPressEvent( TQKeyEvent * );
+    void styleChange( TQStyle& );
+    void fontChange ( const TQFont & );
+
+    bool event( TQEvent *e );
+    
+    TQPtrList<TQTab> * tabList();
+
+private slots:
+    void scrollTabs();
+
+private:
+    TQPtrList<TQTab> * l;
+    TQPtrList<TQTab> * lstatic;
+    void makeVisible( TQTab* t = 0 );
+    void updateArrowButtons();
+    TQTabPrivate * d;
+
+    friend class TQTabBarToolTip;
+    friend class TQTab;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQTabBar( const TQTabBar & );
+    TQTabBar& operator=( const TQTabBar & );
+#endif
+};
+
+
+#endif // QT_NO_TABBAR
+
+#endif // TQTABBAR_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtabbar-m.png b/doc/html/qtabbar-m.png new file mode 100644 index 00000000..81e2d7fa Binary files /dev/null and b/doc/html/qtabbar-m.png differ diff --git a/doc/html/qtabbar-members.html b/doc/html/qtabbar-members.html new file mode 100644 index 00000000..1f78c3c1 --- /dev/null +++ b/doc/html/qtabbar-members.html @@ -0,0 +1,362 @@ + + + + + +TQTabBar Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTabBar

+ +

This is the complete list of member functions for +TQTabBar, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtabbar-w.png b/doc/html/qtabbar-w.png new file mode 100644 index 00000000..938f25e4 Binary files /dev/null and b/doc/html/qtabbar-w.png differ diff --git a/doc/html/qtabbar.html b/doc/html/qtabbar.html new file mode 100644 index 00000000..174d3eca --- /dev/null +++ b/doc/html/qtabbar.html @@ -0,0 +1,345 @@ + + + + + +TQTabBar Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTabBar Class Reference

+ +

The TQTabBar class provides a tab bar, e.g. for use in tabbed dialogs. +More... +

#include <qtabbar.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • int count - the number of tabs in the tab bar  (read only)
  • +
  • int currentTab - the id of the tab bar's visible tab
  • +
  • int keyboardFocusTab - the id of the tab that has the keyboard focus  (read only)
  • +
  • Shape shape - the shape of the tabs in the tab bar
  • +
+

Protected Members

+
    +
  • virtual void paint ( TQPainter * p, TQTab * t, bool selected ) const
  • +
  • virtual void paintLabel ( TQPainter * p, const TQRect & br, TQTab * t, bool has_focus ) const
  • +
  • virtual void paintEvent ( TQPaintEvent * e )
  • +
  • TQPtrList<TQTab> * tabList ()
  • +
+

Detailed Description

+ + +The TQTabBar class provides a tab bar, e.g. for use in tabbed dialogs. +

+

TQTabBar is straightforward to use; it draws the tabs using one of +the predefined shapes, and emits a +signal when a tab is selected. It can be subclassed to tailor the +look and feel. TQt also provides a ready-made TQTabWidget and a +TQTabDialog. +

The choice of tab shape is a matter of taste, although tab dialogs +(for preferences and similar) invariably use RoundedAbove; +nobody uses TriangularAbove. Tab controls in windows other than +dialogs almost always use either RoundedBelow or TriangularBelow. Many spreadsheets and other tab controls in which +all the pages are essentially similar use TriangularBelow, +whereas RoundedBelow is used mostly when the pages are +different (e.g. a multi-page tool palette). +

The most important part of TQTabBar's API is the selected() signal. +This is emitted whenever the selected page changes (even at +startup, when the selected page changes from 'none'). There is +also a slot, setCurrentTab(), which can be used to select a page +programmatically. +

TQTabBar creates automatic accelerator keys in the manner of +TQButton; e.g. if a tab's label is "&Graphics", Alt+G becomes an +accelerator key for switching to that tab. +

The following virtual functions may need to be reimplemented: +

    +
  • paint() paints a single tab. paintEvent() calls paint() for +each tab so that any overlap will look right. +
  • addTab() creates a new tab and adds it to the bar. +
  • selectTab() decides which tab, if any, the user selects with the mouse. +
+

The index of the current tab is returned by currentTab(). The tab +with a particular index is returned by tabAt(), the tab with a +particular id is returned by tab(). The index of a tab is returned +by indexOf(). The current tab can be set by index or tab pointer +using one of the setCurrentTab() functions. +

+

See also Advanced Widgets. + +


Member Type Documentation

+

TQTabBar::Shape

+ +

This enum type lists the built-in shapes supported by TQTabBar: +

    +
  • TQTabBar::RoundedAbove - the normal rounded look above the pages +
  • TQTabBar::RoundedBelow - the normal rounded look below the pages +
  • TQTabBar::TriangularAbove - triangular tabs above the pages (very +unusual; included for completeness) +
  • TQTabBar::TriangularBelow - triangular tabs similar to those used in +the Excel spreadsheet, for example +
+

Member Function Documentation

+

TQTabBar::TQTabBar ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a new, empty tab bar; the parent and name +arguments are passed on to the TQWidget constructor. + +

TQTabBar::~TQTabBar () +

+Destroys the tab control, freeing memory used. + +

int TQTabBar::addTab ( TQTab * newTab ) [virtual] +

+Adds the tab, newTab, to the tab control. +

Sets newTab's id to a new id and places the tab just to the +right of the existing tabs. If the tab's label contains an +ampersand, the letter following the ampersand is used as an +accelerator for the tab, e.g. if the label is "Bro&wse" then +Alt+W becomes an accelerator which will move the focus to this +tab. Returns the id. +

See also insertTab(). + +

int TQTabBar::count () const +

Returns the number of tabs in the tab bar. +See the "count" property for details. +

int TQTabBar::currentTab () const +

Returns the id of the tab bar's visible tab. +See the "currentTab" property for details. +

int TQTabBar::indexOf ( int id ) const +

+Returns the position index of the tab with id id or -1 if no +tab has this id. +

See also tabAt(). + +

int TQTabBar::insertTab ( TQTab * newTab, int index = -1 ) [virtual] +

+Inserts the tab, newTab, into the tab control. +

If index is not specified, the tab is simply appended. +Otherwise it's inserted at the specified position. +

Sets newTab's id to a new id. If the tab's label contains an +ampersand, the letter following the ampersand is used as an +accelerator for the tab, e.g. if the label is "Bro&wse" then +Alt+W becomes an accelerator which will move the focus to this +tab. Returns the id. +

See also addTab(). + +

bool TQTabBar::isTabEnabled ( int id ) const +

+Returns TRUE if the tab with id id exists and is enabled; +otherwise returns FALSE. +

See also setTabEnabled(). + +

int TQTabBar::keyboardFocusTab () const +

Returns the id of the tab that has the keyboard focus. +See the "keyboardFocusTab" property for details. +

void TQTabBar::layoutChanged () [signal] +

+ +

TQTabBar emits the signal whenever the layout of the tab bar has +been recalculated, for example when the contents of a tab change. + +

void TQTabBar::layoutTabs () [virtual] +

+Lays out all existing tabs according to their label and their +iconset. + +

void TQTabBar::paint ( TQPainter * p, TQTab * t, bool selected ) const [virtual protected] +

+Paints the tab t using painter p. If and only if selected +is TRUE, t is drawn currently selected. +

This virtual function may be reimplemented to change the look of +TQTabBar. If you decide to reimplement it, you may also need to +reimplement sizeHint(). + +

void TQTabBar::paintEvent ( TQPaintEvent * e ) [virtual protected] +

+Repaints the tab row. All the painting is done by paint(); +paintEvent() only decides which tabs need painting and in what +order. The event is passed in e. +

See also paint(). + +

Reimplemented from TQWidget. +

void TQTabBar::paintLabel ( TQPainter * p, const TQRect & br, TQTab * t, bool has_focus ) const [virtual protected] +

+Paints the label of tab t centered in rectangle br using +painter p. A focus indication is drawn if has_focus is TRUE. + +

void TQTabBar::removeTab ( TQTab * t ) [virtual] +

+Removes tab t from the tab control, and deletes the tab. + +

void TQTabBar::removeToolTip ( int index ) +

+Removes the tool tip for the tab at index position index. + +

TQTab * TQTabBar::selectTab ( const TQPoint & p ) const [virtual] +

+This virtual function is called by the mouse event handlers to +determine which tab is pressed. The default implementation returns +a pointer to the tab whose bounding rectangle contains p, if +exactly one tab's bounding rectangle contains p. Otherwise it +returns 0. +

See also mousePressEvent() and mouseReleaseEvent(). + +

void TQTabBar::selected ( int id ) [signal] +

+ +

TQTabBar emits this signal whenever any tab is selected, whether by +the program or by the user. The argument id is the id of the +tab as returned by addTab(). +

show() is guaranteed to emit this signal; you can display your +page in a slot connected to this signal. + +

void TQTabBar::setCurrentTab ( int ) [virtual slot] +

Sets the id of the tab bar's visible tab. +See the "currentTab" property for details. +

void TQTabBar::setCurrentTab ( TQTab * tab ) [virtual slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Raises tab and emits the selected() signal unless the tab was +already current. +

See also currentTab and selected(). + +

void TQTabBar::setShape ( Shape ) [virtual] +

Sets the shape of the tabs in the tab bar. +See the "shape" property for details. +

void TQTabBar::setTabEnabled ( int id, bool enabled ) [virtual] +

+Enables tab id if enabled is TRUE or disables it if enabled is FALSE. If id is currently selected, +setTabEnabled(FALSE) makes another tab selected. +

setTabEnabled() updates the display if this causes a change in id's status. +

See also update() and isTabEnabled(). + +

void TQTabBar::setToolTip ( int index, const TQString & tip ) +

+Sets the tool tip for the tab at index position index to tip. + +

Shape TQTabBar::shape () const +

Returns the shape of the tabs in the tab bar. +See the "shape" property for details. +

TQTab * TQTabBar::tab ( int id ) const +

+Returns the tab with id id or 0 if there is no such tab. +

See also count. + +

TQTab * TQTabBar::tabAt ( int index ) const +

+Returns the tab at position index. +

See also indexOf(). + +

TQPtrList<TQTab> * TQTabBar::tabList () [protected] +

+The list of TQTab objects in the tab bar. +

This list is unlikely to be in the order that the TQTab elements +appear visually. One way of iterating over the tabs is like this: +

+    for ( uint i = 0; i < myTabBar->count(); ++i ) {
+        nextTab = myTabBar->tabAt( i );
+        // do something with nextTab
+    }
+    
+ + +

TQString TQTabBar::toolTip ( int index ) const +

+Returns the tool tip for the tab at index position index. + +

Property Documentation

+

int count

+

This property holds the number of tabs in the tab bar. +

Get this property's value with count(). +

See also tab(). + +

int currentTab

+

This property holds the id of the tab bar's visible tab. +

If no tab page is currently visible, the property's value is -1. +Even if the property's value is not -1, you cannot assume that the +user can see the relevant page, or that the tab is enabled. When +you need to display something the value of this property +represents the best page to display. +

When this property is set to id, it will raise the tab with the +id id and emit the selected() signal. +

See also selected() and isTabEnabled(). + +

Set this property's value with setCurrentTab() and get this property's value with currentTab(). +

int keyboardFocusTab

+

This property holds the id of the tab that has the keyboard focus. +

This property contains the id of the tab that has the keyboard +focus or -1 if the tab bar does not have the keyboard focus. + +

Get this property's value with keyboardFocusTab(). +

Shape shape

+

This property holds the shape of the tabs in the tab bar. +

The value of this property is one of the following: RoundedAbove (default), RoundedBelow, TriangularAbove or TriangularBelow. +

See also Shape. + +

Set this property's value with setShape() and get this property's value with shape(). + +


+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/qtabdialog-h.html b/doc/html/qtabdialog-h.html new file mode 100644 index 00000000..180edd67 --- /dev/null +++ b/doc/html/qtabdialog-h.html @@ -0,0 +1,191 @@ + + + + + +qtabdialog.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtabdialog.h

+ +

This is the verbatim text of the qtabdialog.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtabdialog.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQTabDialog class
+**
+** Created : 960825
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the dialogs 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 retquirements 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 TQTABDIALOG_H
+#define TQTABDIALOG_H
+
+#ifndef QT_H
+#include "qdialog.h"
+#include "qiconset.h"
+#endif // QT_H
+
+#ifndef QT_NO_TABDIALOG
+
+class  TQTabBar;
+class  TQTab;
+class  TQTabDialogPrivate;
+
+class Q_EXPORT TQTabDialog : public TQDialog
+{
+    Q_OBJECT
+public:
+    TQTabDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+		WFlags f=0 );
+    ~TQTabDialog();
+
+    void show();
+    void setFont( const TQFont & font );
+
+    void addTab( TQWidget *, const TQString &);
+    void addTab( TQWidget *child, const TQIconSet& iconset, const TQString &label);
+    void addTab( TQWidget *, TQTab* );
+
+    void insertTab( TQWidget *, const TQString &, int index = -1);
+    void insertTab( TQWidget *child, const TQIconSet& iconset, const TQString &label, int index = -1);
+    void insertTab( TQWidget *, TQTab*, int index = -1 );
+
+    void changeTab( TQWidget *, const TQString &);
+    void changeTab( TQWidget *child, const TQIconSet& iconset, const TQString &label);
+
+    bool isTabEnabled(  TQWidget * ) const;
+    void setTabEnabled( TQWidget *, bool );
+    bool isTabEnabled( const char* ) const; // compatibility
+    void setTabEnabled( const char*, bool ); // compatibility
+
+    void showPage( TQWidget * );
+    void removePage( TQWidget * );
+    TQString tabLabel( TQWidget * );
+
+    TQWidget * currentPage() const;
+
+    void setDefaultButton( const TQString &text );
+    void setDefaultButton();
+    bool hasDefaultButton() const;
+
+    void setHelpButton( const TQString &text );
+    void setHelpButton();
+    bool hasHelpButton() const;
+
+    void setCancelButton( const TQString &text );
+    void setCancelButton();
+    bool hasCancelButton() const;
+
+    void setApplyButton( const TQString &text );
+    void setApplyButton();
+    bool hasApplyButton() const;
+
+#ifndef Q_QDOC
+    void setOKButton( const TQString &text = TQString::null );
+#endif
+    void setOkButton( const TQString &text );
+    void setOkButton();
+    bool hasOkButton() const;
+
+protected:
+    void paintEvent( TQPaintEvent * );
+    void resizeEvent( TQResizeEvent * );
+    void styleChange( TQStyle& );
+    void setTabBar( TQTabBar* );
+    TQTabBar* tabBar() const;
+
+signals:
+    void aboutToShow();
+
+    void applyButtonPressed();
+    void cancelButtonPressed();
+    void defaultButtonPressed();
+    void helpButtonPressed();
+
+    void currentChanged( TQWidget * );
+    void selected( const TQString& ); // obsolete
+
+private slots:
+    void showTab( int i );
+
+private:
+    void setSizes();
+    void setUpLayout();
+
+    TQTabDialogPrivate *d;
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQTabDialog( const TQTabDialog & );
+    TQTabDialog& operator=( const TQTabDialog & );
+#endif
+};
+
+#endif // QT_NO_TABDIALOG
+
+#endif // TQTABDIALOG_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtabdialog-members.html b/doc/html/qtabdialog-members.html new file mode 100644 index 00000000..45448d9b --- /dev/null +++ b/doc/html/qtabdialog-members.html @@ -0,0 +1,380 @@ + + + + + +TQTabDialog Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTabDialog

+ +

This is the complete list of member functions for +TQTabDialog, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtabdialog.html b/doc/html/qtabdialog.html new file mode 100644 index 00000000..ccdb7481 --- /dev/null +++ b/doc/html/qtabdialog.html @@ -0,0 +1,506 @@ + + + + + +TQTabDialog Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTabDialog Class Reference

+ +

The TQTabDialog class provides a stack of tabbed widgets. +More... +

#include <qtabdialog.h> +

Inherits TQDialog. +

List of all member functions. +

Public Members

+ +

Signals

+ +

Protected Members

+ +

Detailed Description

+ + +

The TQTabDialog class provides a stack of tabbed widgets. +

+ +

A tabbed dialog is one in which several "tab pages" are available. +By clicking on a tab page's tab or by pressing the indicated +Alt+letter key combination, the user can select which tab page +they want to use. +

TQTabDialog provides a tab bar consisting of single row of tabs at +the top; each tab has an associated widget which is that tab's +tab page. In addition, TQTabDialog provides an OK button and the +following optional buttons: Apply, Cancel, Defaults and Help. +

The normal way to use TQTabDialog is to do the following in the +constructor: +

    +
  1. Create a TQTabDialog. +
  2. Create a TQWidget for each of the pages in the tab dialog, insert +children into it, set up geometry management for it, and use +addTab() (or insertTab()) to set up a tab and keyboard accelerator +for it. +
  3. Set up the buttons for the tab dialog using setOkButton(), +setApplyButton(), setDefaultsButton(), setCancelButton() and +setHelpButton(). +
  4. Connect to the signals and slots. +
+

If you don't call addTab() the page you have created will not be +visible. Don't confuse the object name you supply to the +TQWidget constructor and the tab label you supply to addTab(); +addTab() takes user-visible name that appears on the widget's tab +and may identify an accelerator, whereas the widget name is used +primarily for debugging. +

Almost all applications have to connect the applyButtonPressed() +signal to something. applyButtonPressed() is emitted when either OK +or Apply is clicked, and your slot must copy the dialog's state into +the application. +

There are also several other signals which may be useful: +

    +
  • cancelButtonPressed() is emitted when the user clicks Cancel. +
  • defaultButtonPressed() is emitted when the user clicks Defaults; +the slot it is connected to should reset the state of the dialog to +the application defaults. +
  • helpButtonPressed() is emitted when the user clicks Help. +
  • aboutToShow() is emitted at the start of show(); if there is any +chance that the state of the application may change between the +creation of the tab dialog and the time show() is called, you must +connect this signal to a slot that resets the state of the dialog. +
  • currentChanged() is emitted when the user selects a page. +
+

Each tab is either enabled or disabled at any given time (see +setTabEnabled()). If a tab is enabled the tab text is drawn in +black and the user can select that tab. If it is disabled the tab +is drawn in a different way and the user cannot select that tab. +Note that even if a tab is disabled, the page can still be visible; +for example, if all of the tabs happen to be disabled. +

You can change a tab's label and iconset using changeTab(). A tab +page can be removed with removePage() and shown with showPage(). The +current page is given by currentPage(). +

TQTabDialog does not support tabs on the sides or bottom, nor can +you set or retrieve the visible page. If you need more functionality +than TQTabDialog provides, consider creating a TQDialog and using a +TQTabBar with TQTabWidgets. +

Most of the functionality in TQTabDialog is provided by a TQTabWidget. +

+

See also TQDialog and Dialog Classes. + +


Member Function Documentation

+

TQTabDialog::TQTabDialog ( TQWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 ) +

+Constructs a TQTabDialog with only an OK button. +The parent, name, modal and widget flag, f, arguments +are passed on to the TQDialog constructor. + +

TQTabDialog::~TQTabDialog () +

+Destroys the tab dialog. + +

void TQTabDialog::aboutToShow () [signal] +

+ +

This signal is emitted by show() when it is time to set the state of +the dialog's contents. The dialog should reflect the current state +of the application when it appears; if there is any possibility that +the state of the application may change between the time you call +TQTabDialog::TQTabDialog() and TQTabDialog::show(), you should set the +dialog's state in a slot and connect this signal to it. +

This applies mainly to TQTabDialog objects that are kept around +hidden, rather than being created, shown, and deleted afterwards. +

See also applyButtonPressed(), show(), and cancelButtonPressed(). + +

void TQTabDialog::addTab ( TQWidget * child, const TQString & label ) +

+Adds another tab and page to the tab view. +

The new page is child; the tab's label is label. +Note the difference between the widget name (which you supply to +widget constructors and to setTabEnabled(), for example) and the tab +label. The name is internal to the program and invariant, whereas +the label is shown on-screen and may vary according to language and +other factors. +

If the tab's label contains an ampersand, the letter following +the ampersand is used as an accelerator for the tab, e.g. if the +label is "Bro&wse" then Alt+W becomes an accelerator which will +move the focus to this tab. +

If you call addTab() after show() the screen will flicker and the +user may be confused. +

See also insertTab(). + +

void TQTabDialog::addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This version of the function shows the iconset as well as the label on the tab of child. + +

void TQTabDialog::addTab ( TQWidget * child, TQTab * tab ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This is a lower-level method for adding tabs, similar to the other +addTab() method. It is useful if you are using setTabBar() to set a +TQTabBar subclass with an overridden TQTabBar::paint() function for a +subclass of TQTab. +

The child is the widget to be placed on the new tab page. The tab is the tab to display on the tab page -- normally this shows a +label or an icon that identifies the tab page. +

+

void TQTabDialog::applyButtonPressed () [signal] +

+ +

This signal is emitted when either the Apply or OK button is clicked. +

It should be connected to a slot (or several slots) that change the +application's state according to the state of the dialog. +

See also cancelButtonPressed(), defaultButtonPressed(), and setApplyButton(). + +

void TQTabDialog::cancelButtonPressed () [signal] +

+ +

This signal is emitted when the Cancel button is clicked. It is +automatically connected to TQDialog::reject(), which will hide the +dialog. +

The Cancel button should not change the application's state at all, +so you should generally not need to connect it to any slot. +

See also applyButtonPressed(), defaultButtonPressed(), and setCancelButton(). + +

void TQTabDialog::changeTab ( TQWidget * w, const TQIconSet & iconset, const TQString & label ) +

+Changes tab page w's iconset to iconset and label to label. +

+

void TQTabDialog::changeTab ( TQWidget * w, const TQString & label ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Defines a new label for the tab of page w + +

void TQTabDialog::currentChanged ( TQWidget * ) [signal] +

+

This signal is emitted whenever the current page changes. +

See also currentPage(), showPage(), and tabLabel(). + +

TQWidget * TQTabDialog::currentPage () const +

Returns a pointer to the page currently being displayed by the +tab dialog. The tab dialog does its best to make sure that this value +is never 0 (but if you try hard enough, it can be). + +

void TQTabDialog::defaultButtonPressed () [signal] +

+ +

This signal is emitted when the Defaults button is pressed. It +should reset the dialog (but not the application) to the "factory +defaults". +

The application's state should not be changed until the user clicks +Apply or OK. +

See also applyButtonPressed(), cancelButtonPressed(), and setDefaultButton(). + +

bool TQTabDialog::hasApplyButton () const +

+Returns TRUE if the tab dialog has an Apply button; otherwise +returns FALSE. +

See also setApplyButton(), applyButtonPressed(), hasCancelButton(), and hasDefaultButton(). + +

bool TQTabDialog::hasCancelButton () const +

+Returns TRUE if the tab dialog has a Cancel button; otherwise +returns FALSE. +

See also setCancelButton(), cancelButtonPressed(), hasApplyButton(), and hasDefaultButton(). + +

bool TQTabDialog::hasDefaultButton () const +

+Returns TRUE if the tab dialog has a Defaults button; otherwise +returns FALSE. +

See also setDefaultButton(), defaultButtonPressed(), hasApplyButton(), and hasCancelButton(). + +

bool TQTabDialog::hasHelpButton () const +

+Returns TRUE if the tab dialog has a Help button; otherwise returns +FALSE. +

See also setHelpButton(), helpButtonPressed(), hasApplyButton(), and hasCancelButton(). + +

bool TQTabDialog::hasOkButton () const +

+Returns TRUE if the tab dialog has an OK button; otherwise returns +FALSE. +

See also setOkButton(), hasApplyButton(), hasCancelButton(), and hasDefaultButton(). + +

void TQTabDialog::helpButtonPressed () [signal] +

+ +

This signal is emitted when the Help button is pressed. It +could be used to present information about how to use the dialog. +

See also applyButtonPressed(), cancelButtonPressed(), and setHelpButton(). + +

void TQTabDialog::insertTab ( TQWidget * child, const TQString & label, int index = -1 ) +

+Inserts another tab and page to the tab view. +

The new page is child; the tab's label is label. +Note the difference between the widget name (which you supply to +widget constructors and to setTabEnabled(), for example) and the tab +label. The name is internal to the program and invariant, whereas +the label is shown on-screen and may vary according to language and +other factors. +

If the tab's label contains an ampersand, the letter following +the ampersand is used as an accelerator for the tab, e.g. if the +label is "Bro&wse" then Alt+W becomes an accelerator which will +move the focus to this tab. +

If index is not specified, the tab is simply added. Otherwise +it is inserted at the specified position. +

If you call insertTab() after show(), the screen will flicker and the +user may be confused. +

See also addTab(). + +

void TQTabDialog::insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index = -1 ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This version of the function shows the iconset as well as the label on the tab of child. + +

void TQTabDialog::insertTab ( TQWidget * child, TQTab * tab, int index = -1 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This is a lower-level method for inserting tabs, similar to the other +insertTab() method. It is useful if you are using setTabBar() to set a +TQTabBar subclass with an overridden TQTabBar::paint() function for a +subclass of TQTab. +

The child is the widget to be placed on the new tab page. The tab is the tab to display on the tab page -- normally this shows a +label or an icon that identifies the tab page. The index is the +position where this tab page should be inserted. +

+

bool TQTabDialog::isTabEnabled ( TQWidget * w ) const +

+Returns TRUE if the page w is enabled; otherwise returns FALSE. +

See also setTabEnabled() and TQWidget::enabled. + +

bool TQTabDialog::isTabEnabled ( const char * name ) const +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns TRUE if the page with object name name is enabled and +FALSE if it is disabled. +

If name is 0 or not the name of any of the pages, isTabEnabled() +returns FALSE. +

See also setTabEnabled() and TQWidget::enabled. + +

void TQTabDialog::removePage ( TQWidget * w ) +

Removes page w from this stack of widgets. Does not +delete w. +

See also showPage(), TQTabWidget::removePage(), and TQWidgetStack::removeWidget(). + +

void TQTabDialog::selected ( const TQString & ) [signal] +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This signal is emitted whenever a tab is selected (raised), +including during the first show(). +

See also raise(). + +

void TQTabDialog::setApplyButton ( const TQString & text ) +

+Adds an Apply button to the dialog. The button's text is set to text. +

The Apply button should apply the current settings in the dialog box +to the application while keeping the dialog visible. +

When Apply is clicked, the applyButtonPressed() signal is emitted. +

If text is a +null string, +no button is shown. +

See also setCancelButton(), setDefaultButton(), and applyButtonPressed(). + +

void TQTabDialog::setApplyButton () +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Adds an Apply button to the dialog. The button's text is set to +a localizable "Apply". + +

void TQTabDialog::setCancelButton ( const TQString & text ) +

+Adds a Cancel button to the dialog. The button's text is set to text. +

The cancel button should always return the application to the state +it was in before the tab view popped up, or if the user has clicked +Apply, back to the state immediately after the last Apply. +

When Cancel is clicked, the cancelButtonPressed() signal is emitted. +The dialog is closed at the same time. +

If text is a +null string, +no button is shown. +

See also setApplyButton(), setDefaultButton(), and cancelButtonPressed(). + +

void TQTabDialog::setCancelButton () +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Adds a Cancel button to the dialog. The button's text is set to +a localizable "Cancel". + +

void TQTabDialog::setDefaultButton ( const TQString & text ) +

+Adds a Defaults button to the dialog. The button's text is set to text. +

The Defaults button should set the dialog (but not the application) +back to the application defaults. +

When Defaults is clicked, the defaultButtonPressed() signal is emitted. +

If text is a +null string, +no button is shown. +

See also setApplyButton(), setCancelButton(), and defaultButtonPressed(). + +

void TQTabDialog::setDefaultButton () +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Adds a Defaults button to the dialog. The button's text is set to +a localizable "Defaults". + +

void TQTabDialog::setFont ( const TQFont & font ) [virtual] +

+Sets the font for the tabs to font. +

If the widget is visible, the display is updated with the new font +immediately. There may be some geometry changes, depending on the +size of the old and new fonts. + +

Reimplemented from TQWidget. +

void TQTabDialog::setHelpButton ( const TQString & text ) +

+Adds a Help button to the dialog. The button's text is set to text. +

When Help is clicked, the helpButtonPressed() signal is emitted. +

If text is a +null string, +no button is shown. +

See also setApplyButton(), setCancelButton(), and helpButtonPressed(). + +

void TQTabDialog::setHelpButton () +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Adds a Help button to the dialog. The button's text is set to +a localizable "Help". + +

void TQTabDialog::setOkButton ( const TQString & text ) +

+Adds an OK button to the dialog and sets the button's text to text. +

When the OK button is clicked, the applyButtonPressed() signal is emitted, +and the current settings in the dialog box should be applied to +the application. The dialog then closes. +

If text is a +null string, +no button is shown. +

See also setCancelButton(), setDefaultButton(), and applyButtonPressed(). + +

void TQTabDialog::setOkButton () +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Adds an OK button to the dialog. The button's text is set to +a localizable "OK". + +

void TQTabDialog::setTabBar ( TQTabBar * tb ) [protected] +

+Replaces the TQTabBar heading the dialog by the given tab bar, tb. +Note that this must be called before any tabs have been added, +or the behavior is undefined. +

See also tabBar(). + +

void TQTabDialog::setTabEnabled ( TQWidget * w, bool enable ) +

+If enable is TRUE the page w is enabled; otherwise w is +disabled. The page's tab is redrawn appropriately. +

TQTabWidget uses TQWidget::setEnabled() internally, rather than keeping a +separate flag. +

Note that even a disabled tab and tab page may be visible. If the +page is already visible TQTabWidget will not hide it; if all the +pages are disabled TQTabWidget will show one of them. +

See also isTabEnabled() and TQWidget::enabled. + +

void TQTabDialog::setTabEnabled ( const char * name, bool enable ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Finds the page with object name name, enables/disables it +according to the value of enable and redraws the page's tab +appropriately. +

TQTabDialog uses TQWidget::setEnabled() internally, rather than keeping a +separate flag. +

Note that even a disabled tab/page may be visible. If the page is +already visible TQTabDialog will not hide it; if all the pages +are disabled TQTabDialog will show one of them. +

The object name is used (rather than the tab label) because the tab +text may not be invariant in multi-language applications. +

See also isTabEnabled() and TQWidget::enabled. + +

void TQTabDialog::showPage ( TQWidget * w ) +

Ensures that widget w is shown. This is mainly useful for accelerators. +

Warning: If used carelessly, this function can easily surprise or +confuse the user. +

See also TQTabBar::currentTab. + +

TQTabBar * TQTabDialog::tabBar () const [protected] +

+Returns the currently set TQTabBar. +

See also setTabBar(). + +

TQString TQTabDialog::tabLabel ( TQWidget * w ) +

Returns the text in the tab for page w. + + +

+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/qtabdlg-m.png b/doc/html/qtabdlg-m.png new file mode 100644 index 00000000..a833156b Binary files /dev/null and b/doc/html/qtabdlg-m.png differ diff --git a/doc/html/qtabdlg-w.png b/doc/html/qtabdlg-w.png new file mode 100644 index 00000000..80c09b56 Binary files /dev/null and b/doc/html/qtabdlg-w.png differ diff --git a/doc/html/qtable-h.html b/doc/html/qtable-h.html new file mode 100644 index 00000000..16e43523 --- /dev/null +++ b/doc/html/qtable-h.html @@ -0,0 +1,608 @@ + + + + + +qtable.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtable.h

+ +

This is the verbatim text of the qtable.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+**
+** Definition of TQTable widget class
+**
+** Created : 000607
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the table 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 retquirements 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 TQTABLE_H
+#define TQTABLE_H
+
+#ifndef QT_H
+#include "qscrollview.h"
+#include "qpixmap.h"
+#include "qptrvector.h"
+#include "qheader.h"
+#include "qmemarray.h"
+#include "qptrlist.h"
+#include "qguardedptr.h"
+#include "qshared.h"
+#include "qintdict.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+
+#ifndef QT_NO_TABLE
+
+#if !defined( QT_MODULE_TABLE ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_TABLE )
+#define TQM_EXPORT_TABLE
+#ifndef TQM_TEMPLATE_EXTERN_TABLE
+#   define TQM_TEMPLATE_EXTERN_TABLE
+#endif
+#else
+#define TQM_EXPORT_TABLE Q_EXPORT
+#define TQM_TEMPLATE_EXTERN_TABLE Q_TEMPLATE_EXTERN
+#endif
+
+class TQTableHeader;
+class TQValidator;
+class TQTable;
+class TQPaintEvent;
+class TQTimer;
+class TQResizeEvent;
+class TQComboBox;
+class TQCheckBox;
+class TQDragObject;
+
+struct TQTablePrivate;
+struct TQTableHeaderPrivate;
+
+
+class TQM_EXPORT_TABLE TQTableSelection
+{
+public:
+    TQTableSelection();
+    TQTableSelection( int start_row, int start_col, int end_row, int end_col );
+    void init( int row, int col );
+    void expandTo( int row, int col );
+    bool operator==( const TQTableSelection &s ) const;
+    bool operator!=( const TQTableSelection &s ) const { return !(operator==(s)); }
+
+    int topRow() const { return tRow; }
+    int bottomRow() const { return bRow; }
+    int leftCol() const { return lCol; }
+    int rightCol() const { return rCol; }
+    int anchorRow() const { return aRow; }
+    int anchorCol() const { return aCol; }
+    int numRows() const;
+    int numCols() const;
+
+    bool isActive() const { return active; }
+    bool isEmpty() const { return numRows() == 0; }
+
+private:
+    uint active : 1;
+    uint inited : 1;
+    int tRow, lCol, bRow, rCol;
+    int aRow, aCol;
+};
+
+#define Q_DEFINED_QTABLE_SELECTION
+#include "qwinexport.h"
+
+class TQM_EXPORT_TABLE TQTableItem : public TQt
+{
+    friend class TQTable;
+
+public:
+    enum EditType { Never, OnTyping, WhenCurrent, Always };
+
+    TQTableItem( TQTable *table, EditType et );
+    TQTableItem( TQTable *table, EditType et, const TQString &text );
+    TQTableItem( TQTable *table, EditType et, const TQString &text,
+                const TQPixmap &p );
+    virtual ~TQTableItem();
+
+    virtual TQPixmap pixmap() const;
+    virtual TQString text() const;
+    virtual void setPixmap( const TQPixmap &p );
+    virtual void setText( const TQString &t );
+    TQTable *table() const { return t; }
+
+    virtual int alignment() const;
+    virtual void setWordWrap( bool b );
+    bool wordWrap() const;
+
+    EditType editType() const;
+    virtual TQWidget *createEditor() const;
+    virtual void setContentFromEditor( TQWidget *w );
+    virtual void setReplaceable( bool );
+    bool isReplaceable() const;
+
+    virtual TQString key() const;
+    virtual TQSize sizeHint() const;
+
+    virtual void setSpan( int rs, int cs );
+    int rowSpan() const;
+    int colSpan() const;
+
+    virtual void setRow( int r );
+    virtual void setCol( int c );
+    int row() const;
+    int col() const;
+
+    virtual void paint( TQPainter *p, const TQColorGroup &cg,
+                        const TQRect &cr, bool selected );
+
+    void updateEditor( int oldRow, int oldCol );
+
+    virtual void setEnabled( bool b );
+    bool isEnabled() const;
+
+    virtual int rtti() const;
+    static int RTTI;
+
+private:
+    TQString txt;
+    TQPixmap pix;
+    TQTable *t;
+    EditType edType;
+    uint wordwrap : 1;
+    uint tcha : 1;
+    uint enabled : 1;
+    int rw, cl;
+    int rowspan, colspan;
+#if (QT_VERSION >= 0x040000)
+#error "Add a setAlignment() function in 4.0 (but no d pointer)"
+#endif
+};
+
+#define Q_DEFINED_QTABLE_ITEM
+#include "qwinexport.h"
+
+class TQM_EXPORT_TABLE TQComboTableItem : public TQTableItem
+{
+public:
+    TQComboTableItem( TQTable *table, const TQStringList &list, bool editable = FALSE );
+    ~TQComboTableItem();
+    virtual TQWidget *createEditor() const;
+    virtual void setContentFromEditor( TQWidget *w );
+    virtual void paint( TQPainter *p, const TQColorGroup &cg,
+                        const TQRect &cr, bool selected );
+    virtual void setCurrentItem( int i );
+    virtual void setCurrentItem( const TQString &i );
+    int currentItem() const;
+    TQString currentText() const;
+    int count() const;
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQTableItem::text;
+#endif
+    TQString text( int i ) const;
+    virtual void setEditable( bool b );
+    bool isEditable() const;
+    virtual void setStringList( const TQStringList &l );
+
+    int rtti() const;
+    static int RTTI;
+
+    TQSize sizeHint() const;
+
+private:
+    TQComboBox *cb;
+    TQStringList entries;
+    int current;
+    bool edit;
+    static TQComboBox *fakeCombo;
+    static TQWidget *fakeComboWidget;
+    static int fakeRef;
+
+};
+
+class TQM_EXPORT_TABLE TQCheckTableItem : public TQTableItem
+{
+public:
+    TQCheckTableItem( TQTable *table, const TQString &txt );
+    void setText( const TQString &t );
+    virtual TQWidget *createEditor() const;
+    virtual void setContentFromEditor( TQWidget *w );
+    virtual void paint( TQPainter *p, const TQColorGroup &cg,
+                        const TQRect &cr, bool selected );
+    virtual void setChecked( bool b );
+    bool isChecked() const;
+
+    int rtti() const;
+    static int RTTI;
+
+    TQSize sizeHint() const;
+
+private:
+    TQCheckBox *cb;
+    bool checked;
+
+};
+
+class TQM_EXPORT_TABLE TQTable : public TQScrollView
+{
+    Q_OBJECT
+    Q_ENUMS( SelectionMode FocusStyle )
+    Q_PROPERTY( int numRows READ numRows WRITE setNumRows )
+    Q_PROPERTY( int numCols READ numCols WRITE setNumCols )
+    Q_PROPERTY( bool showGrid READ showGrid WRITE setShowGrid )
+    Q_PROPERTY( bool rowMovingEnabled READ rowMovingEnabled WRITE setRowMovingEnabled )
+    Q_PROPERTY( bool columnMovingEnabled READ columnMovingEnabled WRITE setColumnMovingEnabled )
+    Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
+    Q_PROPERTY( bool sorting READ sorting WRITE setSorting )
+    Q_PROPERTY( SelectionMode selectionMode READ selectionMode WRITE setSelectionMode )
+    Q_PROPERTY( FocusStyle focusStyle READ focusStyle WRITE setFocusStyle )
+    Q_PROPERTY( int numSelections READ numSelections )
+
+    friend class TQTableHeader;
+    friend class TQComboTableItem;
+    friend class TQCheckTableItem;
+    friend class TQTableItem;
+
+public:
+    TQTable( TQWidget* parent=0, const char* name=0 );
+    TQTable( int numRows, int numCols,
+            TQWidget* parent=0, const char* name=0 );
+    ~TQTable();
+
+    TQHeader *horizontalHeader() const;
+    TQHeader *verticalHeader() const;
+
+    enum SelectionMode { Single, Multi, SingleRow, MultiRow, NoSelection };
+    virtual void setSelectionMode( SelectionMode mode );
+    SelectionMode selectionMode() const;
+
+    virtual void setItem( int row, int col, TQTableItem *item );
+    virtual void setText( int row, int col, const TQString &text );
+    virtual void setPixmap( int row, int col, const TQPixmap &pix );
+    virtual TQTableItem *item( int row, int col ) const;
+    virtual TQString text( int row, int col ) const;
+    virtual TQPixmap pixmap( int row, int col ) const;
+    virtual void clearCell( int row, int col );
+
+    virtual TQRect cellGeometry( int row, int col ) const;
+    virtual int columnWidth( int col ) const;
+    virtual int rowHeight( int row ) const;
+    virtual int columnPos( int col ) const;
+    virtual int rowPos( int row ) const;
+    virtual int columnAt( int x ) const;
+    virtual int rowAt( int y ) const;
+
+    virtual int numRows() const;
+    virtual int numCols() const;
+
+    void updateCell( int row, int col );
+
+    bool eventFilter( TQObject * o, TQEvent * );
+
+    int currentRow() const { return curRow; }
+    int currentColumn() const { return curCol; }
+    void ensureCellVisible( int row, int col );
+
+    bool isSelected( int row, int col ) const;
+    bool isRowSelected( int row, bool full = FALSE ) const;
+    bool isColumnSelected( int col, bool full = FALSE ) const;
+    int numSelections() const;
+    TQTableSelection selection( int num ) const;
+    virtual int addSelection( const TQTableSelection &s );
+    virtual void removeSelection( const TQTableSelection &s );
+    virtual void removeSelection( int num );
+    virtual int currentSelection() const;
+
+    void selectCells( int start_row, int start_col, int end_row, int end_col );
+    void selectRow( int row );
+    void selectColumn( int col );
+
+    bool showGrid() const;
+
+    bool columnMovingEnabled() const;
+    bool rowMovingEnabled() const;
+
+    virtual void sortColumn( int col, bool ascending = TRUE,
+                             bool wholeRows = FALSE );
+    bool sorting() const;
+
+    virtual void takeItem( TQTableItem *i );
+
+    virtual void setCellWidget( int row, int col, TQWidget *e );
+    virtual TQWidget *cellWidget( int row, int col ) const;
+    virtual void clearCellWidget( int row, int col );
+
+    virtual TQRect cellRect( int row, int col ) const;
+
+    virtual void paintCell( TQPainter *p, int row, int col,
+                            const TQRect &cr, bool selected );
+    virtual void paintCell( TQPainter *p, int row, int col,
+                            const TQRect &cr, bool selected, const TQColorGroup &cg );
+    virtual void paintFocus( TQPainter *p, const TQRect &r );
+    TQSize sizeHint() const;
+
+    bool isReadOnly() const;
+    bool isRowReadOnly( int row ) const;
+    bool isColumnReadOnly( int col ) const;
+
+    void setEnabled( bool b );
+
+    void repaintSelections();
+
+    enum FocusStyle { FollowStyle, SpreadSheet };
+    virtual void setFocusStyle( FocusStyle fs );
+    FocusStyle focusStyle() const;
+
+    void updateHeaderStates();
+
+public slots:
+    virtual void setNumRows( int r );
+    virtual void setNumCols( int r );
+    virtual void setShowGrid( bool b );
+    virtual void hideRow( int row );
+    virtual void hideColumn( int col );
+    virtual void showRow( int row );
+    virtual void showColumn( int col );
+    bool isRowHidden( int row ) const;
+    bool isColumnHidden( int col ) const;
+
+    virtual void setColumnWidth( int col, int w );
+    virtual void setRowHeight( int row, int h );
+
+    virtual void adjustColumn( int col );
+    virtual void adjustRow( int row );
+
+    virtual void setColumnStretchable( int col, bool stretch );
+    virtual void setRowStretchable( int row, bool stretch );
+    bool isColumnStretchable( int col ) const;
+    bool isRowStretchable( int row ) const;
+    virtual void setSorting( bool b );
+    virtual void swapRows( int row1, int row2, bool swapHeader = FALSE );
+    virtual void swapColumns( int col1, int col2, bool swapHeader = FALSE );
+    virtual void swapCells( int row1, int col1, int row2, int col2 );
+
+    virtual void setLeftMargin( int m );
+    virtual void setTopMargin( int m );
+    virtual void setCurrentCell( int row, int col );
+    void clearSelection( bool repaint = TRUE );
+    virtual void setColumnMovingEnabled( bool b );
+    virtual void setRowMovingEnabled( bool b );
+
+    virtual void setReadOnly( bool b );
+    virtual void setRowReadOnly( int row, bool ro );
+    virtual void setColumnReadOnly( int col, bool ro );
+
+    virtual void setDragEnabled( bool b );
+    bool dragEnabled() const;
+
+    virtual void insertRows( int row, int count = 1 );
+    virtual void insertColumns( int col, int count = 1 );
+    virtual void removeRow( int row );
+    virtual void removeRows( const TQMemArray<int> &rows );
+    virtual void removeColumn( int col );
+    virtual void removeColumns( const TQMemArray<int> &cols );
+
+    virtual void editCell( int row, int col, bool replace = FALSE );
+
+    void setRowLabels( const TQStringList &labels );
+    void setColumnLabels( const TQStringList &labels );
+
+protected:
+    enum EditMode { NotEditing, Editing, Replacing };
+    void drawContents( TQPainter *p, int cx, int cy, int cw, int ch );
+    void contentsMousePressEvent( TQMouseEvent* );
+    void contentsMouseMoveEvent( TQMouseEvent* );
+    void contentsMouseDoubleClickEvent( TQMouseEvent* );
+    void contentsMouseReleaseEvent( TQMouseEvent* );
+    void contentsContextMenuEvent( TQContextMenuEvent * e );
+    void keyPressEvent( TQKeyEvent* );
+    void focusInEvent( TQFocusEvent* );
+    void focusOutEvent( TQFocusEvent* );
+    void viewportResizeEvent( TQResizeEvent * );
+    void showEvent( TQShowEvent *e );
+    void paintEvent( TQPaintEvent *e );
+    void setEditMode( EditMode mode, int row, int col );
+#ifndef QT_NO_DRAGANDDROP
+    virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+    virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+    virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+    virtual void contentsDropEvent( TQDropEvent *e );
+    virtual TQDragObject *dragObject();
+    virtual void startDrag();
+#endif
+
+    virtual void paintEmptyArea( TQPainter *p, int cx, int cy, int cw, int ch );
+    virtual void activateNextCell();
+    virtual TQWidget *createEditor( int row, int col, bool initFromCell ) const;
+    virtual void setCellContentFromEditor( int row, int col );
+    virtual TQWidget *beginEdit( int row, int col, bool replace );
+    virtual void endEdit( int row, int col, bool accept, bool replace );
+
+    virtual void resizeData( int len );
+    virtual void insertWidget( int row, int col, TQWidget *w );
+    int indexOf( int row, int col ) const;
+
+    void windowActivationChange( bool );
+    bool isEditing() const;
+    EditMode editMode() const;
+    int currEditRow() const;
+    int currEditCol() const;
+
+protected slots:
+    virtual void columnWidthChanged( int col );
+    virtual void rowHeightChanged( int row );
+    virtual void columnIndexChanged( int section, int fromIndex, int toIndex );
+    virtual void rowIndexChanged( int section, int fromIndex, int toIndex );
+    virtual void columnClicked( int col );
+
+signals:
+    void currentChanged( int row, int col );
+    void clicked( int row, int col, int button, const TQPoint &mousePos );
+    void doubleClicked( int row, int col, int button, const TQPoint &mousePos );
+    void pressed( int row, int col, int button, const TQPoint &mousePos );
+    void selectionChanged();
+    void valueChanged( int row, int col );
+    void contextMenuRequested( int row, int col, const TQPoint &pos );
+#ifndef QT_NO_DRAGANDDROP
+    void dropped( TQDropEvent *e );
+#endif
+
+private slots:
+    void doAutoScroll();
+    void doValueChanged();
+    void updateGeometriesSlot();
+
+private:
+    void contentsMousePressEventEx( TQMouseEvent* );
+    void drawContents( TQPainter* );
+    void updateGeometries();
+    void repaintSelections( TQTableSelection *oldSelection,
+                            TQTableSelection *newSelection,
+                            bool updateVertical = TRUE,
+                            bool updateHorizontal = TRUE );
+    TQRect rangeGeometry( int topRow, int leftCol,
+                         int bottomRow, int rightCol, bool &optimize );
+    void fixRow( int &row, int y );
+    void fixCol( int &col, int x );
+
+    void init( int numRows, int numCols );
+    TQSize tableSize() const;
+    void repaintCell( int row, int col );
+    void contentsToViewport2( int x, int y, int& vx, int& vy );
+    TQPoint contentsToViewport2( const TQPoint &p );
+    void viewportToContents2( int vx, int vy, int& x, int& y );
+    TQPoint viewportToContents2( const TQPoint &p );
+
+    void updateRowWidgets( int row );
+    void updateColWidgets( int col );
+    bool isSelected( int row, int col, bool includeCurrent ) const;
+    void setCurrentCell( int row, int col, bool updateSelections, bool ensureVisible = FALSE );
+    void fixCell( int &row, int &col, int key );
+    void delayedUpdateGeometries();
+    struct TableWidget
+    {
+	TableWidget( TQWidget *w, int r, int c ) : wid( w ), row( r ), col ( c ) {}
+	TQWidget *wid;
+	int row, col;
+    };
+    void saveContents( TQPtrVector<TQTableItem> &tmp,
+		       TQPtrVector<TableWidget> &tmp2 );
+    void updateHeaderAndResizeContents( TQTableHeader *header,
+					int num, int colRow,
+					int width, bool &updateBefore );
+    void restoreContents( TQPtrVector<TQTableItem> &tmp,
+			  TQPtrVector<TableWidget> &tmp2 );
+    void finishContentsResze( bool updateBefore );
+
+private:
+    TQPtrVector<TQTableItem> contents;
+    TQPtrVector<TQWidget> widgets;
+    int curRow;
+    int curCol;
+    TQTableHeader *leftHeader, *topHeader;
+    EditMode edMode;
+    int editCol, editRow;
+    TQPtrList<TQTableSelection> selections;
+    TQTableSelection *currentSel;
+    TQTimer *autoScrollTimer;
+    int lastSortCol;
+    bool sGrid : 1;
+    bool mRows : 1;
+    bool mCols : 1;
+    bool asc : 1;
+    bool doSort : 1;
+    bool unused : 1;
+    bool readOnly : 1;
+    bool shouldClearSelection : 1;
+    bool dEnabled : 1;
+    bool context_menu : 1;
+    bool drawActiveSelection : 1;
+    bool was_visible : 1;
+    SelectionMode selMode;
+    int pressedRow, pressedCol;
+    TQTablePrivate *d;
+    TQIntDict<int> roRows;
+    TQIntDict<int> roCols;
+    int startDragRow;
+    int startDragCol;
+    TQPoint dragStartPos;
+    int oldCurrentRow, oldCurrentCol;
+    TQWidget *unused_topLeftCorner; //### remove in 4.0
+    FocusStyle focusStl;
+    TQSize unused_cachedSizeHint; // ### remove in 4.0
+
+#if defined(Q_DISABLE_COPY)
+    TQTable( const TQTable & );
+    TQTable &operator=( const TQTable & );
+#endif
+};
+
+#define Q_DEFINED_QTABLE
+#include "qwinexport.h"
+#endif // QT_NO_TABLE
+#endif // TABLE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtable-members.html b/doc/html/qtable-members.html new file mode 100644 index 00000000..8de558ee --- /dev/null +++ b/doc/html/qtable-members.html @@ -0,0 +1,548 @@ + + + + + +TQTable Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTable

+ +

This is the complete list of member functions for +TQTable, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtable.html b/doc/html/qtable.html new file mode 100644 index 00000000..c077e526 --- /dev/null +++ b/doc/html/qtable.html @@ -0,0 +1,1477 @@ + + + + + +TQTable Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTable Class Reference
[table module]

+ +

The TQTable class provides a flexible editable table widget. +More... +

#include <qtable.h> +

Inherits TQScrollView. +

Inherited by TQDataTable. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • bool columnMovingEnabled - whether columns can be moved by the user
  • +
  • FocusStyle focusStyle - how the current (focus) cell is drawn
  • +
  • int numCols - the number of columns in the table
  • +
  • int numRows - the number of rows in the table
  • +
  • int numSelections - the number of selections  (read only)
  • +
  • bool readOnly - whether the table is read-only
  • +
  • bool rowMovingEnabled - whether rows can be moved by the user
  • +
  • SelectionMode selectionMode - the current selection mode
  • +
  • bool showGrid - whether the table's grid is displayed
  • +
  • bool sorting - whether a click on the header of a column sorts that column
  • +
+

Protected Members

+ +

Protected Slots

+ +

Detailed Description

+ + +The TQTable class provides a flexible editable table widget. + +

+ + +

TQTable is easy to use, although it does have a large API because +of the comprehensive functionality that it provides. TQTable +includes functions for manipulating headers, rows and columns, +cells and selections. TQTable also provides in-place editing and +drag and drop, as well as a useful set of +signals. TQTable efficiently supports very +large tables, for example, tables one million by one million cells +are perfectly possible. TQTable is economical with memory, using +none for unused cells. +

+    TQTable *table = new TQTable( 100, 250, this );
+    table->setPixmap( 3, 2, pix );
+    table->setText( 3, 2, "A pixmap" );
+    
+ +

The first line constructs the table specifying its size in rows +and columns. We then insert a pixmap and some text into the same cell, with the pixmap appearing to the +left of the text. TQTable cells can be populated with +TQTableItems, TQComboTableItems or by TQCheckTableItems. +By default a vertical header appears at the left of the table +showing row numbers and a horizontal header appears at the top of +the table showing column numbers. (The numbers displayed start at +1, although row and column numbers within TQTable begin at 0.) +

If you want to use mouse tracking call setMouseTracking( TRUE ) on +the viewport; (see TQScrollView). +

Table Items
+

+

Headers +

+

TQTable supports a header column, e.g. to display row numbers, and +a header row, e.g to display column titles. To set row or column +labels use TQHeader::setLabel() on the pointers returned by +verticalHeader() and horizontalHeader() respectively. The vertical +header is displayed within the table's left margin whose width is +set with setLeftMargin(). The horizontal header is displayed +within the table's top margin whose height is set with +setTopMargin(). The table's grid can be switched off with +setShowGrid(). If you want to hide a horizontal header call +hide(), and call setTopMargin( 0 ) so that the area the header +would have occupied is reduced to zero size. +

Header labels are indexed via their section numbers. Note that the +default behavior of TQHeader regarding section numbers is overriden +for TQTable. See the explanation below in the Rows and Columns +section in the discussion of moving columns and rows. +

+

Rows and Columns +

+

Row and column sizes are set with setRowHeight() and +setColumnWidth(). If you want a row high enough to show the +tallest item in its entirety, use adjustRow(). Similarly, to make +a column wide enough to show the widest item use adjustColumn(). +If you want the row height and column width to adjust +automatically as the height and width of the table changes use +setRowStretchable() and setColumnStretchable(). +

Rows and columns can be hidden and shown with hideRow(), +hideColumn(), showRow() and showColumn(). New rows and columns are +inserted using insertRows() and insertColumns(). Additional rows +and columns are added at the bottom (rows) or right (columns) if +you set setNumRows() or setNumCols() to be larger than numRows() +or numCols(). Existing rows and columns are removed with +removeRow() and removeColumn(). Multiple rows and columns can be +removed with removeRows() and removeColumns(). +

Rows and columns can be set to be moveable using +rowMovingEnabled() and columnMovingEnabled(). The user can drag +them to reorder them holding down the Ctrl key and dragging the +mouse. For performance reasons, the default behavior of TQHeader +section numbers is overridden by TQTable. Currently in TQTable, when +a row or column is dragged and reordered, the section number is +also changed to its new position. Therefore, there is no +difference between the section and the index fields in TQHeader. +The TQTable TQHeader classes do not provide a mechanism for indexing +independently of the user interface ordering. +

The table can be sorted using sortColumn(). Users can sort a +column by clicking its header if setSorting() is set to TRUE. Rows +can be swapped with swapRows(), columns with swapColumns() and +cells with swapCells(). +

For editable tables (see setReadOnly()) you can set the read-only +property of individual rows and columns with setRowReadOnly() and +setColumnReadOnly(). (Whether a cell is editable or read-only +depends on these settings and the cell's TQTableItem::EditType.) +

The row and column which have the focus are returned by +currentRow() and currentColumn() respectively. +

Although many TQTable functions operate in terms of rows and +columns the indexOf() function returns a single integer +identifying a particular cell. +

+

Cells +

+

All of a TQTable's cells are empty when the table is constructed. +

There are two approaches to populating the table's cells. The +first and simplest approach is to use TQTableItems or TQTableItem +subclasses. The second approach doesn't use TQTableItems at all +which is useful for very large sparse tables but retquires you to +reimplement a number of functions. We'll look at each approach in +turn. +

To put a string in a cell use setText(). This function will create +a new TQTableItem for the cell if one doesn't already exist, and +displays the text in it. By default the table item's widget will +be a TQLineEdit. A pixmap may be put in a cell with setPixmap(), +which also creates a table item if retquired. A cell may contain both a pixmap and text; the pixmap is displayed to the left of the +text. Another approach is to construct a TQTableItem or TQTableItem +subclass, set its properties, then insert it into a cell with +setItem(). +

If you want cells which contain comboboxes use the TQComboTableItem +class. Similarly if you retquire cells containing checkboxes use +the TQCheckTableItem class. These table items look and behave just +like the combobox or checkbox widgets but consume far less memory. +

+ +

        for ( int j = 0; j < numRows; ++j )
+            table.setItem( j, 1, new TQCheckTableItem( &table, "Check me" ) );
+
In the example above we create a column of TQCheckTableItems and +insert them into the table using setItem(). +

TQTable takes ownership of its TQTableItems and will delete them +when the table itself is destroyed. You can take ownership of a +table item using takeItem() which you use to move a cell's +contents from one cell to another, either within the same table, +or from one table to another. (See also, swapCells()). +

In-place editing of the text in TQTableItems, and the values in +TQComboTableItems and TQCheckTableItems works automatically. Cells +may be editable or read-only, see TQTableItem::EditType. If you +want fine control over editing see beginEdit() and endEdit(). +

The contents of a cell can be retrieved as a TQTableItem using +item(), or as a string with text() or as a pixmap (if there is +one) with pixmap(). A cell's bounding rectangle is given by +cellGeometry(). Use updateCell() to repaint a cell, for example to +clear away a cell's visual representation after it has been +deleted with clearCell(). The table can be forced to scroll to +show a particular cell with ensureCellVisible(). The isSelected() +function indicates if a cell is selected. +

It is possible to use your own widget as a cell's widget using +setCellWidget(), but subclassing TQTableItem might be a simpler +approach. The cell's widget (if there is one) can be removed with +clearCellWidget(). +

+

Large tables +

+

For large, sparse, tables using TQTableItems or other widgets is +inefficient. The solution is to draw the cell as it should +appear and to create and destroy cell editors on demand. +

This approach retquires that you reimplement various functions. +Reimplement paintCell() to display your data, and createEditor() +and setCellContentFromEditor() to support in-place editing. It +is very important to reimplement resizeData() to have no +functionality, to prevent TQTable from attempting to create a huge +array. You will also need to reimplement item(), setItem(), +takeItem(), clearCell(), and insertWidget(), cellWidget() and +clearCellWidget(). In almost every circumstance (for sorting, +removing and inserting columns and rows, etc.), you also need +to reimplement swapRows(), swapCells() and swapColumns(), including +header handling. +

If you represent active cells with a dictionary of TQTableItems and +TQWidgets, i.e. only store references to cells that are actually +used, many of the functions can be implemented with a single line +of code. (See the table/bigtable/main.cpp example.) +

For more information on cells see the TQTableItem documenation. +

+

Selections +

+

TQTable's support single selection, multi-selection (multiple +cells) or no selection. The selection mode is set with +setSelectionMode(). Use isSelected() to determine if a particular +cell is selected, and isRowSelected() and isColumnSelected() to +see if a row or column is selected. +

TQTable's support many simultaneous selections. You can +programmatically select cells with addSelection(). The number of +selections is given by numSelections(). The current selection is +returned by currentSelection(). You can remove a selection with +removeSelection() and remove all selections with +clearSelection(). Selections are TQTableSelection objects. +

To easily add a new selection use selectCells(), selectRow() or +selectColumn(). +

Alternatively, use addSelection() to add new selections using +TQTableSelection objects. The advantage of using TQTableSelection +objects is that you can call TQTableSelection::expandTo() to resize +the selection and can query and compare them. +

The number of selections is given by numSelections(). The current +selection is returned by currentSelection(). You can remove a +selection with removeSelection() and remove all selections with +clearSelection(). +

+

Signals +

+

When the user clicks a cell the currentChanged() signal is +emitted. You can also connect to the lower level clicked(), +doubleClicked() and pressed() signals. If the user changes the +selection the selectionChanged() signal is emitted; similarly if +the user changes a cell's value the valueChanged() signal is +emitted. If the user right-clicks (or presses the appropriate +platform-specific key sequence) the contextMenuRequested() signal +is emitted. If the user drops a drag and drop object the dropped() +signal is emitted with the drop event. +

See also Advanced Widgets. + +


Member Type Documentation

+

TQTable::EditMode

+ +
    +
  • TQTable::NotEditing - No cell is currently being edited. +
  • TQTable::Editing - A cell is currently being edited. The editor was +initialised with the cell's contents. +
  • TQTable::Replacing - A cell is currently being edited. The editor was +not initialised with the cell's contents. +
+

TQTable::FocusStyle

+ +

Specifies how the current cell (focus cell) is drawn. +

    +
  • TQTable::FollowStyle - The current cell is drawn according to the +current style and the cell's background is also drawn selected, if +the current cell is within a selection +
  • TQTable::SpreadSheet - The current cell is drawn as in a spreadsheet. +This means, it is signified by a black rectangle around the cell, +and the background of the current cell is always drawn with the +widget's base color - even when selected. +

+

TQTable::SelectionMode

+ +
    +
  • TQTable::NoSelection - No cell can be selected by the user. +
  • TQTable::Single - The user may only select a single range of cells. +
  • TQTable::Multi - The user may select multiple ranges of cells. +
  • TQTable::SingleRow - The user may select one row at once. +
  • TQTable::MultiRow - The user may select multiple rows. +
+

Member Function Documentation

+

TQTable::TQTable ( TQWidget * parent = 0, const char * name = 0 ) +

+Creates an empty table object called name as a child of parent. +

Call setNumRows() and setNumCols() to set the table size before +populating the table if you're using TQTableItems. +

See also TQWidget::clearWFlags() and TQt::WidgetFlags. + +

TQTable::TQTable ( int numRows, int numCols, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs an empty table called name with numRows rows and +numCols columns. The table is a child of parent. +

If you're using TQTableItems to populate the table's cells, you +can create TQTableItem, TQComboTableItem and TQCheckTableItem items +and insert them into the table using setItem(). (See the notes on large tables for an alternative to using TQTableItems.) +

See also TQWidget::clearWFlags() and TQt::WidgetFlags. + +

TQTable::~TQTable () +

+Releases all the resources used by the TQTable object, +including all TQTableItems and their widgets. + +

void TQTable::activateNextCell () [virtual protected] +

+This function is called to activate the next cell if in-place +editing was finished by pressing the Enter key. +

The default behaviour is to move from top to bottom, i.e. move to +the cell beneath the cell being edited. Reimplement this function +if you want different behaviour, e.g. moving from left to right. + +

int TQTable::addSelection ( const TQTableSelection & s ) [virtual] +

+Adds a selection described by s to the table and returns its +number or -1 if the selection is invalid. +

Remember to call TQTableSelection::init() and +TQTableSelection::expandTo() to make the selection valid (see also +TQTableSelection::isActive(), or use the +TQTableSelection(int,int,int,int) constructor). +

See also numSelections, removeSelection(), and clearSelection(). + +

void TQTable::adjustColumn ( int col ) [virtual slot] +

+Resizes column col so that the column width is wide enough to +display the widest item the column contains. +

See also adjustRow(). + +

Example: regexptester/regexptester.cpp. +

Reimplemented in TQDataTable. +

void TQTable::adjustRow ( int row ) [virtual slot] +

+Resizes row row so that the row height is tall enough to +display the tallest item the row contains. +

See also adjustColumn(). + +

TQWidget * TQTable::beginEdit ( int row, int col, bool replace ) [virtual protected] +

+This function is called to start in-place editing of the cell at +row, col. Editing is achieved by creating an editor +(createEditor() is called) and setting the cell's editor with +setCellWidget() to the newly created editor. (After editing is +complete endEdit() will be called to replace the cell's content +with the editor's content.) If replace is TRUE the editor will +start empty; otherwise it will be initialized with the cell's +content (if any), i.e. the user will be modifying the original +cell content. +

See also endEdit(). + +

TQRect TQTable::cellGeometry ( int row, int col ) const [virtual] +

+Returns the bounding rectangle of the cell at row, col in +content coordinates. + +

TQRect TQTable::cellRect ( int row, int col ) const [virtual] +

+Returns the geometry of cell row, col in the cell's +coordinate system. This is a convenience function useful in +paintCell(). It is equivalent to TQRect( TQPoint(0,0), cellGeometry( +row, col).size() ); +

See also cellGeometry(). + +

Example: chart/setdataform.cpp. +

TQWidget * TQTable::cellWidget ( int row, int col ) const [virtual] +

+Returns the widget that has been set for the cell at row, col, or 0 if no widget has been set. +

If you don't use TQTableItems you may need to reimplement this +function: see the notes on large tables. +

See also clearCellWidget() and setCellWidget(). + +

Example: chart/setdataform.cpp. +

void TQTable::clearCell ( int row, int col ) [virtual] +

+Removes the TQTableItem at row, col. +

If you don't use TQTableItems you may need to reimplement this +function: see the notes on large tables. + +

void TQTable::clearCellWidget ( int row, int col ) [virtual] +

+Removes the widget (if there is one) set for the cell at row, +col. +

If you don't use TQTableItems you may need to reimplement this +function: see the notes on large tables. +

This function deletes the widget at row, col. Note that the +widget is not deleted immediately; instead TQObject::deleteLater() +is called on the widget to avoid problems with timing issues. +

See also cellWidget() and setCellWidget(). + +

void TQTable::clearSelection ( bool repaint = TRUE ) [slot] +

+Clears all selections and repaints the appropriate regions if repaint is TRUE. +

See also removeSelection(). + +

void TQTable::clicked ( int row, int col, int button, const TQPoint & mousePos ) [signal] +

+ +

This signal is emitted when mouse button button is clicked. The +cell where the event took place is at row, col, and the +mouse's position is in mousePos. +

See also TQt::ButtonState. + +

Example: chart/setdataform.cpp. +

int TQTable::columnAt ( int x ) const [virtual] +

+Returns the number of the column at position x. x must be +given in content coordinates. +

See also columnPos() and rowAt(). + +

void TQTable::columnClicked ( int col ) [virtual protected slot] +

+This function is called when the column col has been clicked. +The default implementation sorts this column if sorting() is TRUE. + +

void TQTable::columnIndexChanged ( int section, int fromIndex, int toIndex ) [virtual protected slot] +

+This function is called when column order is to be changed, i.e. +when the user moved the column header section from fromIndex +to toIndex. +

If you want to change the column order programmatically, call +swapRows() or swapColumns(); +

See also TQHeader::indexChange() and rowIndexChanged(). + +

bool TQTable::columnMovingEnabled () const +

Returns TRUE if columns can be moved by the user; otherwise returns FALSE. +See the "columnMovingEnabled" property for details. +

int TQTable::columnPos ( int col ) const [virtual] +

+Returns the x-coordinate of the column col in content +coordinates. +

See also columnAt() and rowPos(). + +

int TQTable::columnWidth ( int col ) const [virtual] +

+Returns the width of column col. +

See also setColumnWidth() and rowHeight(). + +

void TQTable::columnWidthChanged ( int col ) [virtual protected slot] +

+This function should be called whenever the column width of col +has been changed. It updates the geometry of any affected columns +and repaints the table to reflect the changes it has made. + +

void TQTable::contentsDragEnterEvent ( TQDragEnterEvent * e ) [virtual protected] +

+This event handler is called whenever a TQTable object receives a +TQDragEnterEvent e, i.e. when the user pressed the mouse +button to drag something. +

The focus is moved to the cell where the TQDragEnterEvent occurred. + +

Reimplemented from TQScrollView. +

void TQTable::contentsDragLeaveEvent ( TQDragLeaveEvent * e ) [virtual protected] +

+This event handler is called when a drag activity leaves this +TQTable object with event e. + +

Reimplemented from TQScrollView. +

void TQTable::contentsDragMoveEvent ( TQDragMoveEvent * e ) [virtual protected] +

+This event handler is called whenever a TQTable object receives a +TQDragMoveEvent e, i.e. when the user actually drags the +mouse. +

The focus is moved to the cell where the TQDragMoveEvent occurred. + +

Reimplemented from TQScrollView. +

void TQTable::contentsDropEvent ( TQDropEvent * e ) [virtual protected] +

+This event handler is called when the user ends a drag and drop by +dropping something onto this TQTable and thus triggers the drop +event, e. + +

Reimplemented from TQScrollView. +

void TQTable::contextMenuRequested ( int row, int col, const TQPoint & pos ) [signal] +

+ +

This signal is emitted when the user invokes a context menu with +the right mouse button (or with a system-specific keypress). The +cell where the event took place is at row, col. pos is +the position where the context menu will appear in the global +coordinate system. This signal is always emitted, even if the +contents of the cell are disabled. + +

TQWidget * TQTable::createEditor ( int row, int col, bool initFromCell ) const [virtual protected] +

+This function returns the widget which should be used as an editor +for the contents of the cell at row, col. +

If initFromCell is TRUE, the editor is used to edit the current +contents of the cell (so the editor widget should be initialized +with this content). If initFromCell is FALSE, the content of +the cell is replaced with the new content which the user entered +into the widget created by this function. +

The default functionality is as follows: if initFromCell is +TRUE or the cell has a TQTableItem and the table item's +TQTableItem::isReplaceable() is FALSE then the cell is asked to +create an appropriate editor (using TQTableItem::createEditor()). +Otherwise a TQLineEdit is used as the editor. +

If you want to create your own editor for certain cells, implement +a custom TQTableItem subclass and reimplement +TQTableItem::createEditor(). +

If you are not using TQTableItems and you don't want to use a +TQLineEdit as the default editor, subclass TQTable and reimplement +this function with code like this: +

+    TQTableItem *i = item( row, col );
+    if ( initFromCell || ( i && !i->isReplaceable() ) )
+        // If we had a TQTableItem ask the base class to create the editor
+        return TQTable::createEditor( row, col, initFromCell );
+    else
+        return ...(create your own editor)
+    
+ +Ownership of the editor widget is transferred to the caller. +

If you reimplement this function return 0 for read-only cells. You +will need to reimplement setCellContentFromEditor() to retrieve +the data the user entered. +

See also TQTableItem::createEditor(). + +

int TQTable::currEditCol () const [protected] +

+Returns the current edited column + +

int TQTable::currEditRow () const [protected] +

+Returns the current edited row + +

void TQTable::currentChanged ( int row, int col ) [signal] +

+ +

This signal is emitted when the current cell has changed to row, col. + +

Example: chart/setdataform.cpp. +

int TQTable::currentColumn () const +

+ +

Returns the current column. +

See also currentRow(). + +

Example: chart/setdataform.cpp. +

int TQTable::currentRow () const +

+ +

Returns the current row. +

See also currentColumn(). + +

Example: chart/setdataform.cpp. +

int TQTable::currentSelection () const [virtual] +

+Returns the number of the current selection or -1 if there is no +current selection. +

See also numSelections. + +

void TQTable::doubleClicked ( int row, int col, int button, const TQPoint & mousePos ) [signal] +

+ +

This signal is emitted when mouse button button is +double-clicked. The cell where the event took place is at row, +col, and the mouse's position is in mousePos. +

See also TQt::ButtonState. + +

bool TQTable::dragEnabled () const [slot] +

+If this function returns TRUE, the table supports dragging. +

See also setDragEnabled(). + +

TQDragObject * TQTable::dragObject () [virtual protected] +

+If the user presses the mouse on a selected cell, starts moving +(i.e. dragging), and dragEnabled() is TRUE, this function is +called to obtain a drag object. A drag using this object begins +immediately unless dragObject() returns 0. +

By default this function returns 0. You might reimplement it and +create a TQDragObject depending on the selected items. +

See also dropped(). + +

void TQTable::drawContents ( TQPainter * p, int cx, int cy, int cw, int ch ) [virtual protected] +

+Draws the table contents on the painter p. This function is +optimized so that it only draws the cells inside the cw pixels +wide and ch pixels high clipping rectangle at position cx, +cy. +

Additionally, drawContents() highlights the current cell. + +

Reimplemented from TQScrollView. +

void TQTable::dropped ( TQDropEvent * e ) [signal] +

+ +

This signal is emitted when a drop event occurred on the table. +

e contains information about the drop. + +

void TQTable::editCell ( int row, int col, bool replace = FALSE ) [virtual slot] +

+Starts editing the cell at row, col. +

If replace is TRUE the content of this cell will be replaced by +the content of the editor when editing is finished, i.e. the user +will be entering new data; otherwise the current content of the +cell (if any) will be modified in the editor. +

See also beginEdit(). + +

EditMode TQTable::editMode () const [protected] +

+Returns the current edit mode +

See also TQTable::EditMode. + +

void TQTable::endEdit ( int row, int col, bool accept, bool replace ) [virtual protected] +

+This function is called when in-place editing of the cell at row, col is requested to stop. +

If the cell is not being edited or accept is FALSE the function +returns and the cell's contents are left unchanged. +

If accept is TRUE the content of the editor must be transferred +to the relevant cell. If replace is TRUE the current content of +this cell should be replaced by the content of the editor (this +means removing the current TQTableItem of the cell and creating a +new one for the cell). Otherwise (if possible) the content of the +editor should just be set to the existing TQTableItem of this cell. +

setCellContentFromEditor() is called to replace the contents of +the cell with the contents of the cell's editor. +

Finally clearCellWidget() is called to remove the editor widget. +

See also setCellContentFromEditor() and beginEdit(). + +

void TQTable::ensureCellVisible ( int row, int col ) +

+Scrolls the table until the cell at row, col becomes +visible. + +

FocusStyle TQTable::focusStyle () const +

Returns how the current (focus) cell is drawn. +See the "focusStyle" property for details. +

void TQTable::hideColumn ( int col ) [virtual slot] +

+Hides column col. +

See also showColumn() and hideRow(). + +

void TQTable::hideRow ( int row ) [virtual slot] +

+Hides row row. +

See also showRow() and hideColumn(). + +

TQHeader * TQTable::horizontalHeader () const +

+Returns the table's top TQHeader. +

This header contains the column labels. +

To modify a column label use TQHeader::setLabel(), e.g. + + +

        horizontalHeader()->setLabel( 0, tr( "File" ) );
+
+

See also verticalHeader(), setTopMargin(), and TQHeader. + +

Examples: chart/setdataform.cpp, helpsystem/mainwindow.cpp, regexptester/regexptester.cpp, and table/small-table-demo/main.cpp. +

int TQTable::indexOf ( int row, int col ) const [protected] +

+Returns a single integer which identifies a particular row and col by mapping the 2D table to a 1D array. +

This is useful, for example, if you have a sparse table and want to +use a TQIntDict to map integers to the cells that are used. + +

void TQTable::insertColumns ( int col, int count = 1 ) [virtual slot] +

+Inserts count empty columns at column col. Also clears the selection(s). +

See also insertRows() and removeColumn(). + +

void TQTable::insertRows ( int row, int count = 1 ) [virtual slot] +

+Inserts count empty rows at row row. Also clears the selection(s). +

See also insertColumns() and removeRow(). + +

void TQTable::insertWidget ( int row, int col, TQWidget * w ) [virtual protected] +

+Inserts widget w at row, col into the internal +data structure. See the documentation of setCellWidget() for +further details. +

If you don't use TQTableItems you may need to reimplement this +function: see the notes on large tables. + +

bool TQTable::isColumnHidden ( int col ) const [slot] +

+Returns TRUE if column col is hidden; otherwise returns +FALSE. +

See also hideColumn() and isRowHidden(). + +

bool TQTable::isColumnReadOnly ( int col ) const +

+Returns TRUE if column col is read-only; otherwise returns +FALSE. +

Whether a cell in this column is editable or read-only depends on +the cell's EditType, and this setting: see TQTableItem::EditType. +

See also setColumnReadOnly() and isRowReadOnly(). + +

bool TQTable::isColumnSelected ( int col, bool full = FALSE ) const +

+Returns TRUE if column col is selected; otherwise returns FALSE. +

If full is FALSE (the default), 'column is selected' means that +at least one cell in the column is selected. If full is TRUE, +then 'column is selected' means every cell in the column is +selected. +

See also isRowSelected() and isSelected(). + +

bool TQTable::isColumnStretchable ( int col ) const [slot] +

+Returns TRUE if column col is stretchable; otherwise returns +FALSE. +

See also setColumnStretchable() and isRowStretchable(). + +

bool TQTable::isEditing () const [protected] +

+Returns TRUE if the EditMode is Editing or Replacing; +otherwise (i.e. the EditMode is NotEditing) returns FALSE. +

See also TQTable::EditMode. + +

bool TQTable::isReadOnly () const +

Returns TRUE if the table is read-only; otherwise returns FALSE. +See the "readOnly" property for details. +

bool TQTable::isRowHidden ( int row ) const [slot] +

+Returns TRUE if row row is hidden; otherwise returns +FALSE. +

See also hideRow() and isColumnHidden(). + +

bool TQTable::isRowReadOnly ( int row ) const +

+Returns TRUE if row row is read-only; otherwise returns FALSE. +

Whether a cell in this row is editable or read-only depends on the +cell's EditType, and this +setting: see TQTableItem::EditType. +

See also setRowReadOnly() and isColumnReadOnly(). + +

bool TQTable::isRowSelected ( int row, bool full = FALSE ) const +

+Returns TRUE if row row is selected; otherwise returns FALSE. +

If full is FALSE (the default), 'row is selected' means that at +least one cell in the row is selected. If full is TRUE, then 'row +is selected' means every cell in the row is selected. +

See also isColumnSelected() and isSelected(). + +

bool TQTable::isRowStretchable ( int row ) const [slot] +

+Returns TRUE if row row is stretchable; otherwise returns +FALSE. +

See also setRowStretchable() and isColumnStretchable(). + +

bool TQTable::isSelected ( int row, int col ) const +

+Returns TRUE if the cell at row, col is selected; otherwise +returns FALSE. +

See also isRowSelected() and isColumnSelected(). + +

TQTableItem * TQTable::item ( int row, int col ) const [virtual] +

+Returns the TQTableItem representing the contents of the cell at row, col. +

If row or col are out of range or no content has been set +for this cell, item() returns 0. +

If you don't use TQTableItems you may need to reimplement this +function: see the notes on large tables. +

See also setItem(). + +

Example: regexptester/regexptester.cpp. +

int TQTable::numCols () const [virtual] +

Returns the number of columns in the table. +See the "numCols" property for details. +

Reimplemented in TQDataTable. +

int TQTable::numRows () const [virtual] +

Returns the number of rows in the table. +See the "numRows" property for details. +

Reimplemented in TQDataTable. +

int TQTable::numSelections () const +

Returns the number of selections. +See the "numSelections" property for details. +

void TQTable::paintCell ( TQPainter * p, int row, int col, const TQRect & cr, bool selected, const TQColorGroup & cg ) [virtual] +

+Paints the cell at row, col on the painter p. The painter +has already been translated to the cell's origin. cr describes +the cell coordinates in the content coordinate system. +

If selected is TRUE the cell is highlighted. +

cg is the colorgroup which should be used to draw the cell +content. +

If you want to draw custom cell content, for example right-aligned +text, you must either reimplement paintCell(), or subclass +TQTableItem and reimplement TQTableItem::paint() to do the custom +drawing. +

If you're using a TQTableItem subclass, for example, to store a +data structure, then reimplementing TQTableItem::paint() may be the +best approach. For data you want to draw immediately, e.g. data +retrieved from a database, it is probably best to reimplement +paintCell(). Note that if you reimplement paintCell(), i.e. don't +use TQTableItems, you must reimplement other functions: see the +notes on large tables. +

Note that the painter is not clipped by default in order to get +maximum efficiency. If you want clipping, use code like this: +

+    p->setClipRect( cellRect(row, col), TQPainter::CoordPainter );
+    //... your drawing code
+    p->setClipping( FALSE );
+    
+ + +

void TQTable::paintCell ( TQPainter * p, int row, int col, const TQRect & cr, bool selected ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Use the other paintCell() function. This function is only included +for backwards compatibilty. + +

void TQTable::paintEmptyArea ( TQPainter * p, int cx, int cy, int cw, int ch ) [virtual protected] +

+This function fills the cw pixels wide and ch pixels high +rectangle starting at position cx, cy with the background +color using the painter p. +

paintEmptyArea() is invoked by drawContents() to erase or fill +unused areas. + +

void TQTable::paintFocus ( TQPainter * p, const TQRect & cr ) [virtual] +

+Draws the focus rectangle of the current cell (see currentRow(), +currentColumn()). +

The painter p is already translated to the cell's origin, while +cr specifies the cell's geometry in content coordinates. + +

TQPixmap TQTable::pixmap ( int row, int col ) const [virtual] +

+Returns the pixmap set for the cell at row, col, or a +null-pixmap if the cell contains no pixmap. +

See also setPixmap(). + +

Example: chart/setdataform.cpp. +

void TQTable::pressed ( int row, int col, int button, const TQPoint & mousePos ) [signal] +

+ +

This signal is emitted when mouse button button is pressed. The +cell where the event took place is at row, col, and the +mouse's position is in mousePos. +

See also TQt::ButtonState. + +

void TQTable::removeColumn ( int col ) [virtual slot] +

+Removes column col, and deletes all its cells including any +table items and widgets the cells may contain. Also clears the +selection(s). +

See also removeColumns(), hideColumn(), insertColumns(), and removeRow(). + +

void TQTable::removeColumns ( const TQMemArray<int> & cols ) [virtual slot] +

+Removes the columns listed in the array cols, and deletes all +their cells including any table items and widgets the cells may +contain. +

The array passed in must only contain valid columns (in the range +from 0 to numCols() - 1) with no duplicates, and must be sorted in +ascending order. Also clears the selection(s). +

See also removeColumn(), insertColumns(), and removeRows(). + +

void TQTable::removeRow ( int row ) [virtual slot] +

+Removes row row, and deletes all its cells including any table +items and widgets the cells may contain. Also clears the selection(s). +

See also hideRow(), insertRows(), removeColumn(), and removeRows(). + +

void TQTable::removeRows ( const TQMemArray<int> & rows ) [virtual slot] +

+Removes the rows listed in the array rows, and deletes all their +cells including any table items and widgets the cells may contain. +

The array passed in must only contain valid rows (in the range +from 0 to numRows() - 1) with no duplicates, and must be sorted in +ascending order. Also clears the selection(s). +

See also removeRow(), insertRows(), and removeColumns(). + +

void TQTable::removeSelection ( const TQTableSelection & s ) [virtual] +

+If the table has a selection, s, this selection is removed from +the table. +

See also addSelection() and numSelections. + +

void TQTable::removeSelection ( int num ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Removes selection number num from the table. +

See also numSelections, addSelection(), and clearSelection(). + +

void TQTable::repaintSelections () +

+Repaints all selections + +

void TQTable::resizeData ( int len ) [virtual protected] +

+This is called when TQTable's internal array needs to be resized to +len elements. +

If you don't use TQTableItems you should reimplement this as an +empty method to avoid wasting memory. See the notes on large tables for further details. + +

int TQTable::rowAt ( int y ) const [virtual] +

+Returns the number of the row at position y. y must be given +in content coordinates. +

See also rowPos() and columnAt(). + +

int TQTable::rowHeight ( int row ) const [virtual] +

+Returns the height of row row. +

See also setRowHeight() and columnWidth(). + +

Example: table/small-table-demo/main.cpp. +

void TQTable::rowHeightChanged ( int row ) [virtual protected slot] +

+This function should be called whenever the row height of row +has been changed. It updates the geometry of any affected rows and +repaints the table to reflect the changes it has made. + +

void TQTable::rowIndexChanged ( int section, int fromIndex, int toIndex ) [virtual protected slot] +

+This function is called when the order of the rows is to be +changed, i.e. the user moved the row header section section +from fromIndex to toIndex. +

If you want to change the order programmatically, call swapRows() +or swapColumns(); +

See also TQHeader::indexChange() and columnIndexChanged(). + +

bool TQTable::rowMovingEnabled () const +

Returns TRUE if rows can be moved by the user; otherwise returns FALSE. +See the "rowMovingEnabled" property for details. +

int TQTable::rowPos ( int row ) const [virtual] +

+Returns the y-coordinate of the row row in content coordinates. +

See also rowAt() and columnPos(). + +

void TQTable::selectCells ( int start_row, int start_col, int end_row, int end_col ) +

Selects the range starting at start_row and start_col and +ending at end_row and end_col. +

See also TQTableSelection. + +

void TQTable::selectColumn ( int col ) +

Selects the column col. +

See also TQTableSelection. + +

void TQTable::selectRow ( int row ) +

Selects the row row. +

See also TQTableSelection. + +

TQTableSelection TQTable::selection ( int num ) const +

+Returns selection number num, or an inactive TQTableSelection if num is out of range (see TQTableSelection::isActive()). + +

void TQTable::selectionChanged () [signal] +

+ +

This signal is emitted whenever a selection changes. +

See also TQTableSelection. + +

SelectionMode TQTable::selectionMode () const +

Returns the current selection mode. +See the "selectionMode" property for details. +

void TQTable::setCellContentFromEditor ( int row, int col ) [virtual protected] +

+This function is called to replace the contents of the cell at row, col with the contents of the cell's editor. +

If there already exists a TQTableItem for the cell, +it calls TQTableItem::setContentFromEditor() on this TQTableItem. +

If, for example, you want to create different TQTableItems +depending on the contents of the editor, you might reimplement +this function. +

If you want to work without TQTableItems, you will need to +reimplement this function to save the data the user entered into +your data structure. (See the notes on large tables.) +

See also TQTableItem::setContentFromEditor() and createEditor(). + +

void TQTable::setCellWidget ( int row, int col, TQWidget * e ) [virtual] +

+Sets the widget e to the cell at row, col and takes care of +placing and resizing the widget when the cell geometry changes. +

By default widgets are inserted into a vector with numRows() * +numCols() elements. In very large tables you will probably want to +store the widgets in a data structure that consumes less memory (see +the notes on large tables). To support the use of your own data +structure this function calls insertWidget() to add the widget to +the internal data structure. To use your own data structure +reimplement insertWidget(), cellWidget() and clearCellWidget(). +

Cell widgets are created dynamically with the new operator. The +cell widgets are destroyed automatically once the table is +destroyed; the table takes ownership of the widget when using +setCellWidget. +

+

Example: chart/setdataform.cpp. +

void TQTable::setColumnLabels ( const TQStringList & labels ) [slot] +

Sets the section labels of the horizontalHeader() to labels +

void TQTable::setColumnMovingEnabled ( bool b ) [virtual slot] +

Sets whether columns can be moved by the user to b. +See the "columnMovingEnabled" property for details. +

void TQTable::setColumnReadOnly ( int col, bool ro ) [virtual slot] +

+If ro is TRUE, column col is set to be read-only; otherwise +the column is set to be editable. +

Whether a cell in this column is editable or read-only depends on +the cell's EditType, and this setting: +see TQTableItem::EditType. +

See also isColumnReadOnly(), setRowReadOnly(), and readOnly. + +

+

Example: chart/setdataform.cpp. +

void TQTable::setColumnStretchable ( int col, bool stretch ) [virtual slot] +

+If stretch is TRUE, column col is set to be stretchable; +otherwise column col is set to be unstretchable. +

If the table widget's width decreases or increases stretchable +columns will grow narrower or wider to fit the space available as +completely as possible. The user cannot manually resize stretchable +columns. +

See also isColumnStretchable(), setRowStretchable(), and adjustColumn(). + +

void TQTable::setColumnWidth ( int col, int w ) [virtual slot] +

+Resizes column col to be w pixels wide. +

See also columnWidth() and setRowHeight(). + +

Example: chart/setdataform.cpp. +

Reimplemented in TQDataTable. +

void TQTable::setCurrentCell ( int row, int col ) [virtual slot] +

+Moves the focus to the cell at row, col. +

See also currentRow() and currentColumn(). + +

void TQTable::setDragEnabled ( bool b ) [virtual slot] +

+If b is TRUE, the table starts a drag (see dragObject()) when +the user presses and moves the mouse on a selected cell. + +

void TQTable::setEditMode ( EditMode mode, int row, int col ) [protected] +

+Sets the current edit mode to mode, the current edit row to row and the current edit column to col. +

See also EditMode. + +

void TQTable::setFocusStyle ( FocusStyle fs ) [virtual] +

Sets how the current (focus) cell is drawn to fs. +See the "focusStyle" property for details. +

void TQTable::setItem ( int row, int col, TQTableItem * item ) [virtual] +

+Inserts the table item item into the table at row row, +column col, and repaints the cell. If a table item already +exists in this cell it is deleted and replaced with item. The +table takes ownership of the table item. +

If you don't use TQTableItems you may need to reimplement this +function: see the notes on large tables. +

See also item() and takeItem(). + +

Examples: helpsystem/mainwindow.cpp and table/small-table-demo/main.cpp. +

void TQTable::setLeftMargin ( int m ) [virtual slot] +

+Sets the left margin to be m pixels wide. +

The verticalHeader(), which displays row labels, occupies this +margin. +

In an Arabic or Hebrew localization, the verticalHeader() will +appear on the right side of the table, and this call will set the +right margin. +

See also leftMargin(), setTopMargin(), and verticalHeader(). + +

Example: regexptester/regexptester.cpp. +

void TQTable::setNumCols ( int r ) [virtual slot] +

Sets the number of columns in the table to r. +See the "numCols" property for details. +

void TQTable::setNumRows ( int r ) [virtual slot] +

Sets the number of rows in the table to r. +See the "numRows" property for details. +

void TQTable::setPixmap ( int row, int col, const TQPixmap & pix ) [virtual] +

+Sets the pixmap in the cell at row, col to pix. +

If the cell does not contain a table item a TQTableItem is created +with an EditType of OnTyping, +otherwise the existing table item's pixmap (if any) is replaced +with pix. +

Note that TQComboTableItems and TQCheckTableItems don't show +pixmaps. +

See also pixmap(), setText(), setItem(), and TQTableItem::setPixmap(). + +

Examples: chart/setdataform.cpp and table/small-table-demo/main.cpp. +

void TQTable::setReadOnly ( bool b ) [virtual slot] +

Sets whether the table is read-only to b. +See the "readOnly" property for details. +

void TQTable::setRowHeight ( int row, int h ) [virtual slot] +

+Resizes row row to be h pixels high. +

See also rowHeight() and setColumnWidth(). + +

void TQTable::setRowLabels ( const TQStringList & labels ) [slot] +

Sets the section labels of the verticalHeader() to labels +

void TQTable::setRowMovingEnabled ( bool b ) [virtual slot] +

Sets whether rows can be moved by the user to b. +See the "rowMovingEnabled" property for details. +

void TQTable::setRowReadOnly ( int row, bool ro ) [virtual slot] +

+If ro is TRUE, row row is set to be read-only; otherwise the +row is set to be editable. +

Whether a cell in this row is editable or read-only depends on the +cell's EditType, and this setting: +see TQTableItem::EditType. +

See also isRowReadOnly(), setColumnReadOnly(), and readOnly. + +

void TQTable::setRowStretchable ( int row, bool stretch ) [virtual slot] +

+If stretch is TRUE, row row is set to be stretchable; +otherwise row row is set to be unstretchable. +

If the table widget's height decreases or increases stretchable +rows will grow shorter or taller to fit the space available as +completely as possible. The user cannot manually resize +stretchable rows. +

See also isRowStretchable() and setColumnStretchable(). + +

void TQTable::setSelectionMode ( SelectionMode mode ) [virtual] +

Sets the current selection mode to mode. +See the "selectionMode" property for details. +

void TQTable::setShowGrid ( bool b ) [virtual slot] +

Sets whether the table's grid is displayed to b. +See the "showGrid" property for details. +

void TQTable::setSorting ( bool b ) [virtual slot] +

Sets whether a click on the header of a column sorts that column to b. +See the "sorting" property for details. +

void TQTable::setText ( int row, int col, const TQString & text ) [virtual] +

+Sets the text in the cell at row, col to text. +

If the cell does not contain a table item a TQTableItem is created +with an EditType of OnTyping, +otherwise the existing table item's text (if any) is replaced with +text. +

See also text(), setPixmap(), setItem(), and TQTableItem::setText(). + +

Examples: chart/setdataform.cpp, helpsystem/mainwindow.cpp, regexptester/regexptester.cpp, and table/small-table-demo/main.cpp. +

void TQTable::setTopMargin ( int m ) [virtual slot] +

+Sets the top margin to be m pixels high. +

The horizontalHeader(), which displays column labels, occupies +this margin. +

See also topMargin() and setLeftMargin(). + +

Example: regexptester/regexptester.cpp. +

void TQTable::showColumn ( int col ) [virtual slot] +

+Shows column col. +

See also hideColumn() and showRow(). + +

bool TQTable::showGrid () const +

Returns TRUE if the table's grid is displayed; otherwise returns FALSE. +See the "showGrid" property for details. +

void TQTable::showRow ( int row ) [virtual slot] +

+Shows row row. +

See also hideRow() and showColumn(). + +

void TQTable::sortColumn ( int col, bool ascending = TRUE, bool wholeRows = FALSE ) [virtual] +

+Sorts column col. If ascending is TRUE the sort is in +ascending order, otherwise the sort is in descending order. +

If wholeRows is TRUE, entire rows are sorted using swapRows(); +otherwise only cells in the column are sorted using swapCells(). +

Note that if you are not using TQTableItems you will need to +reimplement swapRows() and swapCells(). (See the notes on large tables.) +

See also swapRows(). + +

Example: table/statistics/statistics.cpp. +

Reimplemented in TQDataTable. +

bool TQTable::sorting () const +

Returns TRUE if a click on the header of a column sorts that column; otherwise returns FALSE. +See the "sorting" property for details. +

void TQTable::startDrag () [virtual protected] +

+Starts a drag. +

Usually you don't need to call or reimplement this function yourself. +

See also dragObject(). + +

void TQTable::swapCells ( int row1, int col1, int row2, int col2 ) [virtual slot] +

+Swaps the contents of the cell at row1, col1 with the +contents of the cell at row2, col2. +

This function is also called when the table is sorted. +

If you don't use TQTableItems and want your users to be able to +swap cells, you will need to reimplement this function. (See the +notes on large tables.) +

See also swapColumns() and swapRows(). + +

void TQTable::swapColumns ( int col1, int col2, bool swapHeader = FALSE ) [virtual slot] +

+Swaps the data in col1 with col2. +

This function is used to swap the positions of two columns. It is +called when the user changes the order of columns (see +setColumnMovingEnabled(), and when columns are sorted. +

If you don't use TQTableItems and want your users to be able to +swap columns you will need to reimplement this function. (See the +notes on large tables.) +

If swapHeader is TRUE, the columns' header contents is also +swapped. +

See also swapCells(). + +

void TQTable::swapRows ( int row1, int row2, bool swapHeader = FALSE ) [virtual slot] +

+Swaps the data in row1 and row2. +

This function is used to swap the positions of two rows. It is +called when the user changes the order of rows (see +setRowMovingEnabled()), and when rows are sorted. +

If you don't use TQTableItems and want your users to be able to +swap rows, e.g. for sorting, you will need to reimplement this +function. (See the notes on large tables.) +

If swapHeader is TRUE, the rows' header contents is also +swapped. +

This function will not update the TQTable, you will have to do +this manually, e.g. by calling updateContents(). +

See also swapColumns() and swapCells(). + +

void TQTable::takeItem ( TQTableItem * i ) [virtual] +

+Takes the table item i out of the table. This function does not delete the table item. You must either delete the table item +yourself or put it into a table (using setItem()) which will then +take ownership of it. +

Use this function if you want to move an item from one cell in a +table to another, or to move an item from one table to another, +reinserting the item with setItem(). +

If you want to exchange two cells use swapCells(). + +

TQString TQTable::text ( int row, int col ) const [virtual] +

+Returns the text in the cell at row, col, or TQString::null +if the relevant item does not exist or has no text. +

See also setText() and setPixmap(). + +

Example: chart/setdataform.cpp. +

Reimplemented in TQDataTable. +

void TQTable::updateCell ( int row, int col ) +

+Repaints the cell at row, col. + +

void TQTable::updateHeaderStates () +

+This functions updates all the header states to be in sync with +the current selections. This should be called after +programatically changing, adding or removing selections, so that +the headers are updated. + +

void TQTable::valueChanged ( int row, int col ) [signal] +

+ +

This signal is emitted when the user changed the value in the cell +at row, col. + +

Example: chart/setdataform.cpp. +

TQHeader * TQTable::verticalHeader () const +

+Returns the table's vertical TQHeader. +

This header contains the row labels. +

See also horizontalHeader(), setLeftMargin(), and TQHeader. + +

Examples: helpsystem/mainwindow.cpp and regexptester/regexptester.cpp. +


Property Documentation

+

bool columnMovingEnabled

+

This property holds whether columns can be moved by the user. +

The default is FALSE. Columns are moved by dragging whilst holding +down the Ctrl key. +

Warning: If TQTable is used to move header sections as a result of user +interaction, the mapping between header indexes and section exposed by +TQHeader will not reflect the order of the headers in the table; i.e., +TQTable does not call TQHeader::moveSection() to move sections but handles +move operations internally. +

See also rowMovingEnabled. + +

Set this property's value with setColumnMovingEnabled() and get this property's value with columnMovingEnabled(). +

FocusStyle focusStyle

+

This property holds how the current (focus) cell is drawn. +

The default style is SpreadSheet. +

See also TQTable::FocusStyle. + +

Set this property's value with setFocusStyle() and get this property's value with focusStyle(). +

int numCols

+

This property holds the number of columns in the table. +

Set this property's value with setNumCols() and get this property's value with numCols(). +

See also numRows. + +

int numRows

+

This property holds the number of rows in the table. +

Set this property's value with setNumRows() and get this property's value with numRows(). +

See also numCols. + +

int numSelections

+

This property holds the number of selections. +

Get this property's value with numSelections(). +

See also currentSelection(). + +

bool readOnly

+

This property holds whether the table is read-only. +

Whether a cell in the table is editable or read-only depends on +the cell's EditType, and this setting: +see TQTableItem::EditType. +

See also TQWidget::enabled, setColumnReadOnly(), and setRowReadOnly(). + +

Set this property's value with setReadOnly() and get this property's value with isReadOnly(). +

bool rowMovingEnabled

+

This property holds whether rows can be moved by the user. +

The default is FALSE. Rows are moved by dragging whilst holding +down the Ctrl key. +

Warning: If TQTable is used to move header sections as a result of user +interaction, the mapping between header indexes and section exposed by +TQHeader will not reflect the order of the headers in the table; i.e., +TQTable does not call TQHeader::moveSection() to move sections but handles +move operations internally. +

See also columnMovingEnabled. + +

Set this property's value with setRowMovingEnabled() and get this property's value with rowMovingEnabled(). +

SelectionMode selectionMode

+

This property holds the current selection mode. +

The default mode is Multi which allows the user to select +multiple ranges of cells. +

See also SelectionMode and selectionMode. + +

Set this property's value with setSelectionMode() and get this property's value with selectionMode(). +

bool showGrid

+

This property holds whether the table's grid is displayed. +

The grid is shown by default. + +

Set this property's value with setShowGrid() and get this property's value with showGrid(). +

bool sorting

+

This property holds whether a click on the header of a column sorts that column. +

Set this property's value with setSorting() and get this property's value with sorting(). +

See also sortColumn(). + + +


+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/qtable.png b/doc/html/qtable.png new file mode 100644 index 00000000..f606feef Binary files /dev/null and b/doc/html/qtable.png differ diff --git a/doc/html/qtableitem-members.html b/doc/html/qtableitem-members.html new file mode 100644 index 00000000..233e7025 --- /dev/null +++ b/doc/html/qtableitem-members.html @@ -0,0 +1,74 @@ + + + + + +TQTableItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTableItem

+ +

This is the complete list of member functions for +TQTableItem, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtableitem.html b/doc/html/qtableitem.html new file mode 100644 index 00000000..17764576 --- /dev/null +++ b/doc/html/qtableitem.html @@ -0,0 +1,497 @@ + + + + + +TQTableItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTableItem Class Reference
[table module]

+ +

The TQTableItem class provides the cell content for TQTable cells. +More... +

#include <qtable.h> +

Inherits TQt. +

Inherited by TQComboTableItem and TQCheckTableItem. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQTableItem class provides the cell content for TQTable cells. + +

+ +

For many applications TQTableItems are ideal for presenting and +editing the contents of TQTable cells. In situations where you need +to create very large tables you may prefer an alternative approach +to using TQTableItems: see the notes on large tables. +

A TQTableItem contains a cell's data, by default, a string and a +pixmap. The table item also holds the cell's display size and how +the data should be aligned. The table item specifies the cell's +EditType and the editor used for in-place editing (by default a +TQLineEdit). If you want checkboxes use TQCheckTableItem, and if +you want comboboxes use TQComboTableItem. The EditType (set +in the constructor) determines whether the cell's contents may be +edited. +

If a pixmap is specified it is displayed to the left of any text. +You can change the text or pixmap with setText() and setPixmap() +respectively. For text you can use setWordWrap(). +

When sorting table items the key() function is used; by default +this returns the table item's text(). Reimplement key() to +customize how your table items will sort. +

Table items are inserted into a table using TQTable::setItem(). If +you insert an item into a cell that already contains a table item +the original item will be deleted. +

Example: +

+    for ( int row = 0; row < table->numRows(); row++ ) {
+        for ( int col = 0; col < table->numCols(); col++ ) {
+            table->setItem( row, col,
+                new TQTableItem( table, TQTableItem::WhenCurrent, TQString::number( row * col ) ) );
+        }
+    }
+    
+ +

You can move a table item from one cell to another, in the same or +a different table, using TQTable::takeItem() and TQTable::setItem() +but see also TQTable::swapCells(). +

Table items can be deleted with delete in the standard way; the +table and cell will be updated accordingly. +

Note, that if you have a table item that is not currently in a table +then anything you do to that item other than insert it into a table +will result in undefined behaviour. +

Reimplement createEditor() and setContentFromEditor() if you want +to use your own widget instead of a TQLineEdit for editing cell +contents. Reimplement paint() if you want to display custom +content. +

It is important to ensure that your custom widget can accept the +keyboard focus, so that the user can use the tab key to navigate the +table as normal. Therefore, if the widget returned by createEditor() +does not itself accept the keyboard focus, it is necessary to +nominate a child widget to do so on its behalf. For example, a +TQHBox with two child TQLineEdit widgets may use one of them to +accept the keyboard focus: +

+    TQWidget* MyTableItem::createEditor() const
+    {
+        TQHBox* hbox = new TQHBox( table()->viewport() );
+        hbox->setFocusProxy(new TQLineEdit( hbox ));
+        new TQLineEdit( hbox );
+        return hbox;
+    }
+    
+ +

By default, table items may be replaced by new TQTableItems +during the lifetime of a TQTable. Therefore, if you create your +own subclass of TQTableItem, and you want to ensure that +this does not happen, you must call setReplaceable(FALSE) +in the constructor of your subclass. +

Table Items
+

See also TQCheckTableItem, TQComboTableItem, and Advanced Widgets. + +

+


Member Type Documentation

+

TQTableItem::EditType

+ +

+This enum is used to define whether a cell is editable or +read-only (in conjunction with other settings), and how the cell +should be displayed. +

    +
  • TQTableItem::Always - +The cell always looks editable. +

Using this EditType ensures that the editor created with +createEditor() (by default a TQLineEdit) is always visible. This +has implications for the alignment of the content: the default +editor aligns everything (even numbers) to the left whilst +numerical values in the cell are by default aligned to the right. +

If a cell with the edit type Always looks misaligned you could +reimplement createEditor() for these items. +

    +
  • TQTableItem::WhenCurrent - +The cell looks editable only when it has keyboard focus (see +TQTable::setCurrentCell()). +
  • TQTableItem::OnTyping - +The cell looks editable only when the user types in it or +double-clicks it. It resembles the WhenCurrent functionality +but is, perhaps, nicer. +

The OnTyping edit type is the default when TQTableItem objects +are created by the convenience functions TQTable::setText() and +TQTable::setPixmap(). +

    +
  • TQTableItem::Never - The cell is not editable. +

The cell is actually editable only if TQTable::isRowReadOnly() is +FALSE for its row, TQTable::isColumnReadOnly() is FALSE for its +column, and TQTable::isReadOnly() is FALSE. +

TQComboTableItems have an isEditable() property. This property is +used to indicate whether the user may enter their own text or are +restricted to choosing one of the choices in the list. +TQComboTableItems may be interacted with only if they are editable +in accordance with their EditType as described above. +

+


Member Function Documentation

+

TQTableItem::TQTableItem ( TQTable * table, EditType et ) +

+Creates a table item that is a child of table table with no +text. The item has the EditType et. +

The table item will use a TQLineEdit for its editor, will not +word-wrap and will occupy a single cell. Insert the table item +into a table with TQTable::setItem(). +

The table takes ownership of the table item, so a table item +should not be inserted into more than one table at a time. + +

TQTableItem::TQTableItem ( TQTable * table, EditType et, const TQString & text ) +

+Creates a table item that is a child of table table with text +text. The item has the EditType et. +

The table item will use a TQLineEdit for its editor, will not +word-wrap and will occupy a single cell. Insert the table item +into a table with TQTable::setItem(). +

The table takes ownership of the table item, so a table item +should not be inserted into more than one table at a time. + +

TQTableItem::TQTableItem ( TQTable * table, EditType et, const TQString & text, const TQPixmap & p ) +

+Creates a table item that is a child of table table with text +text and pixmap p. The item has the EditType et. +

The table item will display the pixmap to the left of the text. It +will use a TQLineEdit for editing the text, will not word-wrap and +will occupy a single cell. Insert the table item into a table with +TQTable::setItem(). +

The table takes ownership of the table item, so a table item +should not be inserted in more than one table at a time. + +

TQTableItem::~TQTableItem () [virtual] +

+The destructor deletes this item and frees all allocated +resources. +

If the table item is in a table (i.e. was inserted with +setItem()), it will be removed from the table and the cell it +occupied. + +

int TQTableItem::alignment () const [virtual] +

+The alignment function returns how the text contents of the cell +are aligned when drawn. The default implementation aligns numbers +to the right and any other text to the left. +

See also TQt::AlignmentFlags. + +

int TQTableItem::col () const +

+Returns the column where the table item is located. If the cell +spans multiple columns, this function returns the left-most +column. +

See also row() and setCol(). + +

Example: table/bigtable/main.cpp. +

int TQTableItem::colSpan () const +

+Returns the column span of the table item, usually 1. +

See also setSpan() and rowSpan(). + +

TQWidget * TQTableItem::createEditor () const [virtual] +

+This virtual function creates an editor which the user can +interact with to edit the cell's contents. The default +implementation creates a TQLineEdit. +

If the function returns 0, the cell is read-only. +

The returned widget should preferably be invisible, ideally with +TQTable::viewport() as parent. +

If you reimplement this function you'll almost certainly need to +reimplement setContentFromEditor(), and may need to reimplement +sizeHint(). +

+ +

    TQWidget *ComboItem::createEditor() const
+    {
+        // create an editor - a combobox in our case
+        ( (ComboItem*)this )->cb = new TQComboBox( table()->viewport() );
+        TQObject::connect( cb, SIGNAL( activated( int ) ), table(), SLOT( doValueChanged() ) );
+        cb->insertItem( "Yes" );
+        cb->insertItem( "No" );
+        // and initialize it
+        cb->setCurrentItem( text() == "No" ? 1 : 0 );
+        return cb;
+
+

See also TQTable::createEditor(), setContentFromEditor(), TQTable::viewport(), and setReplaceable(). + +

Example: table/statistics/statistics.cpp. +

EditType TQTableItem::editType () const +

+Returns the table item's edit type. +

This is set when the table item is constructed. +

See also EditType and TQTableItem(). + +

bool TQTableItem::isEnabled () const +

+Returns TRUE if the table item is enabled; otherwise returns FALSE. +

See also setEnabled(). + +

bool TQTableItem::isReplaceable () const +

+This function returns whether the contents of the cell may be +replaced with the contents of another table item. Regardless of +this setting, table items that span more than one cell may not +have their contents replaced by another table item. +

(This differs from EditType because EditType is concerned with +whether the user is able to change the contents of a cell.) +

See also setReplaceable() and EditType. + +

TQString TQTableItem::key () const [virtual] +

+This virtual function returns the key that should be used for +sorting. The default implementation returns the text() of the +relevant item. +

See also TQTable::sorting. + +

void TQTableItem::paint ( TQPainter * p, const TQColorGroup & cg, const TQRect & cr, bool selected ) [virtual] +

+This virtual function is used to paint the contents of an item +using the painter p in the rectangular area cr using the +color group cg. +

If selected is TRUE the cell is displayed in a way that +indicates that it is highlighted. +

You don't usually need to use this function but if you want to +draw custom content in a cell you will need to reimplement it. +

The painter passed to this function is translated so that 0, 0 +is the top-left corner of the item that is being painted. +

Note that the painter is not clipped by default in order to get +maximum efficiency. If you want clipping, use +

+    p->setClipRect( table()->cellRect(row, col), TQPainter::ClipPainter );
+    //... your drawing code
+    p->setClipping( FALSE );
+    
+ +

+

Example: table/statistics/statistics.cpp. +

TQPixmap TQTableItem::pixmap () const [virtual] +

+Returns the table item's pixmap or a null pixmap if no pixmap has +been set. +

See also setPixmap() and text(). + +

int TQTableItem::row () const +

+Returns the row where the table item is located. If the cell spans +multiple rows, this function returns the top-most row. +

See also col() and setRow(). + +

Example: table/bigtable/main.cpp. +

int TQTableItem::rowSpan () const +

+Returns the row span of the table item, usually 1. +

See also setSpan() and colSpan(). + +

int TQTableItem::rtti () const [virtual] +

+Returns the Run Time Type Identification value for this table item +which for TQTableItems is 0. +

When you create subclasses based on TQTableItem make sure that each +subclass returns a unique rtti() value. It is advisable to use +values greater than 1000, preferably large random numbers, to +allow for extensions to this class. +

See also TQCheckTableItem::rtti() and TQComboTableItem::rtti(). + +

Reimplemented in TQComboTableItem and TQCheckTableItem. +

void TQTableItem::setCol ( int c ) [virtual] +

+Sets column c as the table item's column. Usually you will not +need to call this function. +

If the cell spans multiple columns, this function sets the +left-most column and retains the width of the multi-cell table +item. +

See also col(), setRow(), and colSpan(). + +

void TQTableItem::setContentFromEditor ( TQWidget * w ) [virtual] +

+Whenever the content of a cell has been edited by the editor w, +TQTable calls this virtual function to copy the new values into the +TQTableItem. +

If you reimplement createEditor() and return something that is not +a TQLineEdit you will need to reimplement this function. +

+ +

    void ComboItem::setContentFromEditor( TQWidget *w )
+    {
+        // the user changed the value of the combobox, so synchronize the
+        // value of the item (its text), with the value of the combobox
+        if ( w->inherits( "TQComboBox" ) )
+            setText( ( (TQComboBox*)w )->currentText() );
+        else
+            TQTableItem::setContentFromEditor( w );
+
+

See also TQTable::setCellContentFromEditor(). + +

Example: table/statistics/statistics.cpp. +

void TQTableItem::setEnabled ( bool b ) [virtual] +

+If b is TRUE, the table item is enabled; if b is FALSE the +table item is disabled. +

A disabled item doesn't respond to user interaction. +

See also isEnabled(). + +

void TQTableItem::setPixmap ( const TQPixmap & p ) [virtual] +

+Sets pixmap p to be this item's pixmap. +

Note that setPixmap() does not update the cell the table item +belongs to. Use TQTable::updateCell() to repaint the cell's +contents. +

For TQComboTableItems and TQCheckTableItems this function +has no visible effect. +

See also TQTable::setPixmap(), pixmap(), and setText(). + +

void TQTableItem::setReplaceable ( bool b ) [virtual] +

+If b is TRUE it is acceptable to replace the contents of the +cell with the contents of another TQTableItem. If b is FALSE the +contents of the cell may not be replaced by the contents of +another table item. Table items that span more than one cell may +not have their contents replaced by another table item. +

(This differs from EditType because EditType is concerned with +whether the user is able to change the contents of a cell.) +

See also isReplaceable(). + +

void TQTableItem::setRow ( int r ) [virtual] +

+Sets row r as the table item's row. Usually you do not need to +call this function. +

If the cell spans multiple rows, this function sets the top row +and retains the height of the multi-cell table item. +

See also row(), setCol(), and rowSpan(). + +

void TQTableItem::setSpan ( int rs, int cs ) [virtual] +

+Changes the extent of the TQTableItem so that it spans multiple +cells covering rs rows and cs columns. The top left cell is +the original cell. +

Warning: This function only works if the item has already been +inserted into the table using e.g. TQTable::setItem(). This +function also checks to make sure if rs and cs are within +the bounds of the table and returns without changing the span if +they are not. In addition swapping, inserting or removing rows and +columns that cross TQTableItems spanning more than one cell is not +supported. +

See also rowSpan() and colSpan(). + +

void TQTableItem::setText ( const TQString & str ) [virtual] +

+Changes the table item's text to str. +

Note that setText() does not update the cell the table item +belongs to. Use TQTable::updateCell() to repaint the cell's +contents. +

See also TQTable::setText(), text(), setPixmap(), and TQTable::updateCell(). + +

Example: table/statistics/statistics.cpp. +

void TQTableItem::setWordWrap ( bool b ) [virtual] +

+If b is TRUE, the cell's text will be wrapped over multiple +lines, when necessary, to fit the width of the cell; otherwise the +text will be written as a single line. +

See also wordWrap(), TQTable::adjustColumn(), and TQTable::setColumnStretchable(). + +

TQSize TQTableItem::sizeHint () const [virtual] +

+This virtual function returns the size a cell needs to show its +entire content. +

If you subclass TQTableItem you will often need to reimplement this +function. + +

TQTable * TQTableItem::table () const +

+ +

Returns the TQTable the table item belongs to. +

See also TQTable::setItem() and TQTableItem(). + +

TQString TQTableItem::text () const [virtual] +

+Returns the text of the table item or TQString::null if there is no +text. +

To ensure that the current value of the editor is returned, +setContentFromEditor() is called: +

    +
  1. if the editMode() is Always, or +
  2. if editMode() is not Always but the editor of the cell is +active and the editor is not a TQLineEdit. +
+

This means that text() returns the original text value of the item +if the editor is a line edit, until the user commits an edit (e.g. +by pressing Enter or Tab) in which case the new text is returned. +For other editors (e.g. a combobox) setContentFromEditor() is +always called so the currently display value is the one returned. +

See also setText() and pixmap(). + +

bool TQTableItem::wordWrap () const +

+Returns TRUE if word wrap is enabled for the cell; otherwise +returns FALSE. +

See also setWordWrap(). + + +


+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/qtableitems.png b/doc/html/qtableitems.png new file mode 100644 index 00000000..e1bca0fd Binary files /dev/null and b/doc/html/qtableitems.png differ diff --git a/doc/html/qtableselection-members.html b/doc/html/qtableselection-members.html new file mode 100644 index 00000000..de4816b5 --- /dev/null +++ b/doc/html/qtableselection-members.html @@ -0,0 +1,61 @@ + + + + + +TQTableSelection Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTableSelection

+ +

This is the complete list of member functions for +TQTableSelection, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtableselection.html b/doc/html/qtableselection.html new file mode 100644 index 00000000..d6a92fe8 --- /dev/null +++ b/doc/html/qtableselection.html @@ -0,0 +1,188 @@ + + + + + +TQTableSelection Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTableSelection Class Reference
[table module]

+ +

The TQTableSelection class provides access to a selected area in a +TQTable. +More... +

#include <qtable.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQTableSelection class provides access to a selected area in a +TQTable. + +

+ +

The selection is a rectangular set of cells in a TQTable. One of +the rectangle's cells is called the anchor cell; this is the cell +that was selected first. The init() function sets the anchor and +the selection rectangle to exactly this cell; the expandTo() +function expands the selection rectangle to include additional +cells. +

There are various access functions to find out about the area: +anchorRow() and anchorCol() return the anchor's position; +leftCol(), rightCol(), topRow() and bottomRow() return the +rectangle's four edges. All four are part of the selection. +

A newly created TQTableSelection is inactive -- isActive() returns +FALSE. You must use init() and expandTo() to activate it. +

See also TQTable, TQTable::addSelection(), TQTable::selection(), TQTable::selectCells(), TQTable::selectRow(), TQTable::selectColumn(), and Advanced Widgets. + +


Member Function Documentation

+

TQTableSelection::TQTableSelection () +

+Creates an inactive selection. Use init() and expandTo() to +activate it. + +

TQTableSelection::TQTableSelection ( int start_row, int start_col, int end_row, int end_col ) +

+Creates an active selection, starting at start_row and start_col, ending at end_row and end_col. + +

int TQTableSelection::anchorCol () const +

+ +

Returns the anchor column of the selection. +

See also anchorRow() and expandTo(). + +

int TQTableSelection::anchorRow () const +

+ +

Returns the anchor row of the selection. +

See also anchorCol() and expandTo(). + +

int TQTableSelection::bottomRow () const +

+ +

Returns the bottom row of the selection. +

See also topRow(), leftCol(), and rightCol(). + +

void TQTableSelection::expandTo ( int row, int col ) +

+Expands the selection to include cell row, col. The new +selection rectangle is the bounding rectangle of row, col +and the previous selection rectangle. After calling this function +the selection is active. +

If you haven't called init(), this function does nothing. +

See also init() and isActive(). + +

void TQTableSelection::init ( int row, int col ) +

+Sets the selection anchor to cell row, col and the selection +to only contain this cell. The selection is not active until +expandTo() is called. +

To extend the selection to include additional cells, call +expandTo(). +

See also isActive(). + +

bool TQTableSelection::isActive () const +

+ +

Returns whether the selection is active or not. A selection is +active after init() and expandTo() have been called. + +

bool TQTableSelection::isEmpty () const +

+ +

Returns whether the selection is empty or not. +

See also numRows() and numCols(). + +

int TQTableSelection::leftCol () const +

+ +

Returns the left column of the selection. +

See also topRow(), bottomRow(), and rightCol(). + +

int TQTableSelection::numCols () const +

+Returns the number of columns in the selection. +

See also numRows(). + +

int TQTableSelection::numRows () const +

+ +

Returns the number of rows in the selection. +

See also numCols(). + +

bool TQTableSelection::operator!= ( const TQTableSelection & s ) const +

+ +

Returns TRUE if s does not include the same cells as the +selection; otherwise returns FALSE. + +

bool TQTableSelection::operator== ( const TQTableSelection & s ) const +

+Returns TRUE if s includes the same cells as the selection; +otherwise returns FALSE. + +

int TQTableSelection::rightCol () const +

+ +

Returns the right column of the selection. +

See also topRow(), bottomRow(), and leftCol(). + +

int TQTableSelection::topRow () const +

+ +

Returns the top row of the selection. +

See also bottomRow(), leftCol(), and rightCol(). + + +


+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/qtabletevent-members.html b/doc/html/qtabletevent-members.html new file mode 100644 index 00000000..3ef4b4ef --- /dev/null +++ b/doc/html/qtabletevent-members.html @@ -0,0 +1,63 @@ + + + + + +TQTabletEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTabletEvent

+ +

This is the complete list of member functions for +TQTabletEvent, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtabletevent.html b/doc/html/qtabletevent.html new file mode 100644 index 00000000..2eff7b1b --- /dev/null +++ b/doc/html/qtabletevent.html @@ -0,0 +1,251 @@ + + + + + +TQTabletEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTabletEvent Class Reference

+ +

The TQTabletEvent class contains parameters that describe a Tablet +event. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+
    +
  • enum TabletDevice { NoDevice = -1, Puck, Stylus, Eraser }
  • +
  • TQTabletEvent ( Type t, const TQPoint & pos, const TQPoint & globalPos, int device, int pressure, int xTilt, int yTilt, const TQPair<int, int> & uId )
  • +
  • TQTabletEvent ( const TQPoint & pos, const TQPoint & globalPos, int device, int pressure, int xTilt, int yTilt, const TQPair<int, int> & uId )  (obsolete)
  • +
  • int pressure () const
  • +
  • int xTilt () const
  • +
  • int yTilt () const
  • +
  • const TQPoint & pos () const
  • +
  • const TQPoint & globalPos () const
  • +
  • int x () const
  • +
  • int y () const
  • +
  • int globalX () const
  • +
  • int globalY () const
  • +
  • TabletDevice device () const
  • +
  • int isAccepted () const
  • +
  • void accept ()
  • +
  • void ignore ()
  • +
  • TQPair<int, int> uniqueId ()
  • +
+

Detailed Description

+ + +The TQTabletEvent class contains parameters that describe a Tablet +event. +

+

Tablet Events are generated from a Wacom© tablet. Most of +the time you will want to deal with events from the tablet as if +they were events from a mouse, for example retrieving the position +with x(), y(), pos(), globalX(), globalY() and globalPos(). In +some situations you may wish to retrieve the extra information +provided by the tablet device driver, for example, you might want +to adjust color brightness based on pressure. TQTabletEvent allows +you to get the pressure(), the xTilt() and yTilt(), as well as the +type of device being used with device() (see TabletDevice). +

A tablet event contains a special accept flag that indicates +whether the receiver wants the event. You should call +TQTabletEvent::accept() if you handle the tablet event; otherwise +it will be sent to the parent widget. +

The TQWidget::setEnabled() function can be used to enable or +disable mouse and keyboard events for a widget. +

The event handler TQWidget::tabletEvent() receives all three types of tablet +events. TQt will first send a tabletEvent and then, if it is not accepted, +it will send a mouse event. This allows applications that don't utilize +tablets to use a tablet like a mouse while also enabling those who want to +use both tablets and mouses differently. +

See also Event Classes. + +


Member Type Documentation

+

TQTabletEvent::TabletDevice

+ +

This enum defines what type of device is generating the event. +

    +
  • TQTabletEvent::NoDevice - No device, or an unknown device. +
  • TQTabletEvent::Puck - A Puck (a device that is similar to a flat mouse with +a transparent circle with cross-hairs). +
  • TQTabletEvent::Stylus - A Stylus (the narrow end of the pen). +
  • 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 ) +

+ +Construct a tablet event of type t. The position of when the event occurred is given +int pos and globalPos. device contains the device type, +pressure contains the pressure exerted on the device, xTilt and yTilt contain +device's degree of tilt from the X and Y axis respectively. The uId contains an +event id. +

On Irix, globalPos will contain the high-resolution coordinates received from the +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 ) +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

Constructs a tablet event object. The position when the event +occurred is is given in pos and globalPos. device +contains the device type, pressure +contains the pressure exerted on the device, xTilt and yTilt contain the device's degrees of tilt from the X and Y +axis respectively. The uId contains an event id. +

On Irix, globalPos will contain the high-resolution coordinates +received from the tablet device driver, instead of from the +windowing system. +

See also pos(), globalPos(), device(), pressure(), xTilt(), and yTilt(). + +

void TQTabletEvent::accept () +

+ +

Sets the accept flag of the tablet event object. +

Setting the accept flag indicates that the receiver of the event +wants the tablet event. Unwanted tablet events are sent to the +parent widget. +

The accept flag is set by default. +

See also ignore(). + +

TabletDevice TQTabletEvent::device () const +

+ +

Returns the type of device that generated the event. Useful if you +want one end of the pen to do something different than the other. +

See also TabletDevice. + +

const TQPoint & TQTabletEvent::globalPos () const +

+ +

Returns the global position of the device at the time of the event. This is important on asynchronous windows systems like X11; +whenever you move your widgets around in response to mouse events, +globalPos() can differ significantly from the current position +TQCursor::pos(). +

See also globalX() and globalY(). + +

int TQTabletEvent::globalX () const +

+ +

Returns the global x-position of the mouse pointer at the time of +the event. +

See also globalY() and globalPos(). + +

int TQTabletEvent::globalY () const +

+ +

Returns the global y-position of the mouse pointer at the time of +the event. +

See also globalX() and globalPos(). + +

void TQTabletEvent::ignore () +

+ +

Clears the accept flag parameter of the tablet event object. +

Clearing the accept flag indicates that the event receiver does +not want the tablet event. Unwanted tablet events are sent to the +parent widget. +

The accept flag is set by default. +

See also accept(). + +

int TQTabletEvent::isAccepted () const +

+ +

Returns TRUE if the receiver of the event handles the tablet +event; otherwise returns FALSE. + +

const TQPoint & TQTabletEvent::pos () const +

+ +

Returns the position of the device, relative to the widget that +received the event. +

If you move widgets around in response to mouse events, use +globalPos() instead of this function. +

See also x(), y(), and globalPos(). + +

int TQTabletEvent::pressure () const +

+ +

Returns the pressure that is exerted on the device. This number is +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 () +

+ +

Returns a unique ID for the current device. It is possible to +generate a unique ID for any Wacom© device. This makes it +possible to differentiate between multiple devices being used at +the same time on the tablet. The first member contains a value +for the type, the second member contains a physical ID obtained +from the device. Each combination of these values is unique. Note: +for different platforms, the first value is different due to +different driver implementations. + +

int TQTabletEvent::x () const +

+ +

Returns the x-position of the device, relative to the widget that +received the event. +

See also y() and pos(). + +

int TQTabletEvent::xTilt () const +

+ +

Returns the difference from the perpendicular in the X Axis. +Positive values are towards the tablet's physical right. The angle +is in the range -60 to +60 degrees. +

See also yTilt(). + +

int TQTabletEvent::y () const +

+ +

Returns the y-position of the device, relative to the widget that +received the event. +

See also x() and pos(). + +

int TQTabletEvent::yTilt () const +

+ +

Returns the difference from the perpendicular in the Y Axis. +Positive values are towards the bottom of the tablet. The angle is +within the range -60 to +60 degrees. +

See also xTilt(). + + +


+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/qtabwidget-h.html b/doc/html/qtabwidget-h.html new file mode 100644 index 00000000..c330e15e --- /dev/null +++ b/doc/html/qtabwidget-h.html @@ -0,0 +1,207 @@ + + + + + +qtabwidget.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtabwidget.h

+ +

This is the verbatim text of the qtabwidget.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtabwidget.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of TQTabWidget class
+**
+** Created : 990318
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQTABWIDGET_H
+#define TQTABWIDGET_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qiconset.h"
+#endif // QT_H
+
+#ifndef QT_NO_TABWIDGET
+
+class TQTabBar;
+class TQTabWidgetData;
+class TQTab;
+class TQWidgetStack;
+
+
+class Q_EXPORT TQTabWidget : public TQWidget
+{
+    Q_OBJECT
+    Q_ENUMS( TabPosition )
+    Q_ENUMS( TabShape )
+    Q_PROPERTY( TabPosition tabPosition READ tabPosition WRITE setTabPosition )
+    Q_PROPERTY( TabShape tabShape READ tabShape WRITE setTabShape )
+    Q_PROPERTY( int margin READ margin WRITE setMargin )
+    Q_PROPERTY( int currentPage READ currentPageIndex WRITE setCurrentPage )
+    Q_PROPERTY( int count READ count )
+    Q_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
+
+public:
+    TQTabWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+    ~TQTabWidget();
+
+    virtual void addTab( TQWidget *, const TQString & ); // ### make these inline in 4.0
+    virtual void addTab( TQWidget *child, const TQIconSet& iconset,
+			 const TQString &label );
+    virtual void addTab( TQWidget *, TQTab* );
+
+    virtual void insertTab( TQWidget *, const TQString &, int index = -1 );
+    virtual void insertTab( TQWidget *child, const TQIconSet& iconset,
+			    const TQString &label, int index = -1 );
+    virtual void insertTab( TQWidget *, TQTab*, int index = -1 );
+
+    void changeTab( TQWidget *, const TQString &);
+    void changeTab( TQWidget *child, const TQIconSet& iconset,
+		    const TQString &label );
+
+    bool isTabEnabled(  TQWidget * ) const;
+    void setTabEnabled( TQWidget *, bool );
+
+    void setCornerWidget( TQWidget * w, TQt::Corner corner = TQt::TopRight );
+    TQWidget * cornerWidget( TQt::Corner corner = TQt::TopRight ) const;
+
+    TQString tabLabel( TQWidget * ) const;
+    void setTabLabel( TQWidget *p, const TQString &l );
+
+    TQIconSet tabIconSet( TQWidget * w ) const;
+    void setTabIconSet( TQWidget * w, const TQIconSet & iconset );
+
+    void removeTabToolTip( TQWidget * w );
+    void setTabToolTip( TQWidget * w, const TQString & tip );
+    TQString tabToolTip( TQWidget * w ) const;
+
+    TQWidget * currentPage() const;
+    TQWidget *page( int ) const;
+    TQString label( int ) const;
+    int currentPageIndex() const;
+    int indexOf( TQWidget * ) const;
+
+    TQSize sizeHint() const;
+    TQSize minimumSizeHint() const;
+
+    enum TabPosition { Top, Bottom };
+    TabPosition tabPosition() const;
+    void setTabPosition( TabPosition );
+
+    enum TabShape { Rounded, Triangular };
+    TabShape tabShape() const;
+    void setTabShape( TabShape s );
+
+    int margin() const;
+    void setMargin( int );
+
+    int count() const;
+
+public slots:
+    void setCurrentPage( int );
+    virtual void showPage( TQWidget * );
+    virtual void removePage( TQWidget * );
+
+protected:
+    void showEvent( TQShowEvent * );
+    void resizeEvent( TQResizeEvent * );
+    void setTabBar( TQTabBar * );
+    TQTabBar* tabBar() const;
+    void styleChange( TQStyle& );
+    void updateMask();
+    bool eventFilter( TQObject *, TQEvent * );
+
+signals:
+    void currentChanged( TQWidget * );
+#ifndef Q_QDOC
+    void selected( const TQString& );
+#endif
+
+private slots:
+    void showTab( int );
+
+private:
+    TQTabWidgetData *d;
+    void setUpLayout( bool = FALSE );
+    friend class TQTabDialog;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQTabWidget( const TQTabWidget & );
+    TQTabWidget& operator=( const TQTabWidget & );
+#endif
+};
+
+#endif // QT_NO_TABWIDGET
+
+#endif // TQTABWIDGET_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtabwidget-m.png b/doc/html/qtabwidget-m.png new file mode 100644 index 00000000..e2d023b2 Binary files /dev/null and b/doc/html/qtabwidget-m.png differ diff --git a/doc/html/qtabwidget-members.html b/doc/html/qtabwidget-members.html new file mode 100644 index 00000000..31a7d2bb --- /dev/null +++ b/doc/html/qtabwidget-members.html @@ -0,0 +1,369 @@ + + + + + +TQTabWidget Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTabWidget

+ +

This is the complete list of member functions for +TQTabWidget, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtabwidget-w.png b/doc/html/qtabwidget-w.png new file mode 100644 index 00000000..7599fb6d Binary files /dev/null and b/doc/html/qtabwidget-w.png differ diff --git a/doc/html/qtabwidget.html b/doc/html/qtabwidget.html new file mode 100644 index 00000000..b0ffb7b9 --- /dev/null +++ b/doc/html/qtabwidget.html @@ -0,0 +1,440 @@ + + + + + +TQTabWidget Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTabWidget Class Reference

+ +

The TQTabWidget class provides a stack of tabbed widgets. +More... +

#include <qtabwidget.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+
    +
  • TQTabWidget ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )
  • +
  • virtual void addTab ( TQWidget * child, const TQString & label )
  • +
  • virtual void addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label )
  • +
  • virtual void addTab ( TQWidget * child, TQTab * tab )
  • +
  • virtual void insertTab ( TQWidget * child, const TQString & label, int index = -1 )
  • +
  • virtual void insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index = -1 )
  • +
  • virtual void insertTab ( TQWidget * child, TQTab * tab, int index = -1 )
  • +
  • void changeTab ( TQWidget * w, const TQString & label )
  • +
  • void changeTab ( TQWidget * w, const TQIconSet & iconset, const TQString & label )
  • +
  • bool isTabEnabled ( TQWidget * w ) const
  • +
  • void setTabEnabled ( TQWidget * w, bool enable )
  • +
  • void setCornerWidget ( TQWidget * w, TQt::Corner corner = TQt::TopRight )
  • +
  • TQWidget * cornerWidget ( TQt::Corner corner = TQt::TopRight ) const
  • +
  • TQString tabLabel ( TQWidget * w ) const
  • +
  • void setTabLabel ( TQWidget * w, const TQString & l )
  • +
  • TQIconSet tabIconSet ( TQWidget * w ) const
  • +
  • void setTabIconSet ( TQWidget * w, const TQIconSet & iconset )
  • +
  • void removeTabToolTip ( TQWidget * w )
  • +
  • void setTabToolTip ( TQWidget * w, const TQString & tip )
  • +
  • TQString tabToolTip ( TQWidget * w ) const
  • +
  • TQWidget * currentPage () const
  • +
  • TQWidget * page ( int index ) const
  • +
  • TQString label ( int index ) const
  • +
  • int currentPageIndex () const
  • +
  • int indexOf ( TQWidget * w ) const
  • +
  • enum TabPosition { Top, Bottom }
  • +
  • TabPosition tabPosition () const
  • +
  • void setTabPosition ( TabPosition )
  • +
  • enum TabShape { Rounded, Triangular }
  • +
  • TabShape tabShape () const
  • +
  • void setTabShape ( TabShape s )
  • +
  • int margin () const
  • +
  • void setMargin ( int )
  • +
  • int count () const
  • +
+

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • bool autoMask - whether the tab widget is automatically masked  (read only)
  • +
  • int count - the number of tabs in the tab bar  (read only)
  • +
  • int currentPage - the index position of the current tab page
  • +
  • int margin - the margin in this tab widget
  • +
  • TabPosition tabPosition - the position of the tabs in this tab widget
  • +
  • TabShape tabShape - the shape of the tabs in this tab widget
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQTabWidget class provides a stack of tabbed widgets. +

+ + +

A tab widget provides a tab bar of tabs and a `page area' below +(or above, see TabPosition) the tabs. Each tab is associated +with a different widget (called a `page'). Only the current tab's +page is shown in the page area; all the other tabs' pages are +hidden. The user can show a different page by clicking on its tab +or by pressing its Alt+letter accelerator if it has one. +

The normal way to use TQTabWidget is to do the following in the +constructor: +

    +
  1. Create a TQTabWidget. +
  2. Create a TQWidget for each of the pages in the tab dialog, +insert children into it, set up geometry management for it and use +addTab() (or insertTab()) to set up a tab and keyboard accelerator +for it. +
  3. Connect to the signals and slots. +
+

The position of the tabs is set with setTabPosition(), their shape +with setTabShape(), and their margin with setMargin(). +

If you don't call addTab() and the TQTabWidget is already visible, +then the page you have created will not be visible. Don't +confuse the object name you supply to the TQWidget constructor and +the tab label you supply to addTab(). addTab() takes a name which +indicates an accelerator and is meaningful and descriptive to the +user, whereas the widget name is used primarily for debugging. +

The signal currentChanged() is emitted when the user selects a +page. +

The current page is available as an index position with +currentPageIndex() or as a wiget pointer with currentPage(). You +can retrieve a pointer to a page with a given index using page(), +and can find the index position of a page with indexOf(). Use +setCurrentPage() to show a particular page by index, or showPage() +to show a page by widget pointer. +

You can change a tab's label and iconset using changeTab() or +setTabLabel() and setTabIconSet(). A tab page can be removed with +removePage(). +

Each tab is either enabled or disabled at any given time (see +setTabEnabled()). If a tab is enabled, the tab text is drawn +normally and the user can select that tab. If it is disabled, the +tab is drawn in a different way and the user cannot select that +tab. Note that even if a tab is disabled, the page can still be +visible, for example if all of the tabs happen to be disabled. +

Although tab widgets can be a very good way to split up a complex +dialog, it's also very easy to get into a mess. See TQTabDialog for +some design hints. An alternative is to use a TQWidgetStack for +which you provide some means of navigating between pages, for +example, a TQToolBar or a TQListBox. +

Most of the functionality in TQTabWidget is provided by a TQTabBar +(at the top, providing the tabs) and a TQWidgetStack (most of the +area, organizing the individual pages). +

+

See also TQTabDialog, TQToolBox, Advanced Widgets, and Organizers. + +


Member Type Documentation

+

TQTabWidget::TabPosition

+ +

This enum type defines where TQTabWidget draws the tab row: +

    +
  • TQTabWidget::Top - above the pages +
  • TQTabWidget::Bottom - below the pages +
+

TQTabWidget::TabShape

+ +

This enum type defines the shape of the tabs: +

    +
  • TQTabWidget::Rounded - rounded look (normal) +
  • TQTabWidget::Triangular - triangular look (very unusual, included for completeness) +
+

Member Function Documentation

+

TQTabWidget::TQTabWidget ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

+Constructs a tabbed widget called name with parent parent, +and widget flags f. + +

void TQTabWidget::addTab ( TQWidget * child, const TQString & label ) [virtual] +

+Adds another tab and page to the tab view. +

The new page is child; the tab's label is label. Note the +difference between the widget name (which you supply to widget +constructors and to setTabEnabled(), for example) and the tab +label. The name is internal to the program and invariant, whereas +the label is shown on-screen and may vary according to language +and other factors. +

If the tab's label contains an ampersand, the letter following +the ampersand is used as an accelerator for the tab, e.g. if the +label is "Bro&wse" then Alt+W becomes an accelerator which will +move the focus to this tab. +

If you call addTab() after show() the screen will flicker and the +user may be confused. +

Adding the same child twice will have undefined behavior. +

See also insertTab(). + +

Examples: addressbook/centralwidget.cpp and themes/themes.cpp. +

void TQTabWidget::addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Adds another tab and page to the tab view. +

This function is the same as addTab(), but with an additional iconset. + +

void TQTabWidget::addTab ( TQWidget * child, TQTab * tab ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This is a low-level function for adding tabs. It is useful if you +are using setTabBar() to set a TQTabBar subclass with an overridden +TQTabBar::paint() function for a subclass of TQTab. The child is +the new page and tab is the tab to put the child on. + +

void TQTabWidget::changeTab ( TQWidget * w, const TQString & label ) +

+Defines a new label for page w's tab. + +

void TQTabWidget::changeTab ( TQWidget * w, const TQIconSet & iconset, const TQString & label ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Defines a new iconset and a new label for page w's tab. + +

TQWidget * TQTabWidget::cornerWidget ( TQt::Corner corner = TQt::TopRight ) const +

+Returns the widget shown in the corner of the tab widget or 0. + +

int TQTabWidget::count () const +

Returns the number of tabs in the tab bar. +See the "count" property for details. +

void TQTabWidget::currentChanged ( TQWidget * ) [signal] +

+ +

This signal is emitted whenever the current page changes. The +parameter is the new current page. +

See also currentPage(), showPage(), and tabLabel(). + +

TQWidget * TQTabWidget::currentPage () const +

+Returns a pointer to the page currently being displayed by the tab +dialog. The tab dialog does its best to make sure that this value +is never 0 (but if you try hard enough, it can be). + +

int TQTabWidget::currentPageIndex () const +

Returns the index position of the current tab page. +See the "currentPage" property for details. +

int TQTabWidget::indexOf ( TQWidget * w ) const +

+Returns the index position of page w, or -1 if the widget +cannot be found. + +

void TQTabWidget::insertTab ( TQWidget * child, const TQString & label, int index = -1 ) [virtual] +

+Inserts another tab and page to the tab view. +

The new page is child; the tab's label is label. Note the +difference between the widget name (which you supply to widget +constructors and to setTabEnabled(), for example) and the tab +label. The name is internal to the program and invariant, whereas +the label is shown on-screen and may vary according to language +and other factors. +

If the tab's label contains an ampersand, the letter following +the ampersand is used as an accelerator for the tab, e.g. if the +label is "Bro&wse" then Alt+W becomes an accelerator which will +move the focus to this tab. +

If index is not specified, the tab is simply appended. +Otherwise it is inserted at the specified position. +

If you call insertTab() after show(), the screen will flicker and +the user may be confused. +

See also addTab(). + +

void TQTabWidget::insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index = -1 ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts another tab and page to the tab view. +

This function is the same as insertTab(), but with an additional +iconset. + +

void TQTabWidget::insertTab ( TQWidget * child, TQTab * tab, int index = -1 ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This is a lower-level method for inserting tabs, similar to the +other insertTab() method. It is useful if you are using +setTabBar() to set a TQTabBar subclass with an overridden +TQTabBar::paint() function for a subclass of TQTab. The child is +the new page, tab is the tab to put the child on and index is the position in the tab bar that this page should occupy. + +

bool TQTabWidget::isTabEnabled ( TQWidget * w ) const +

+Returns TRUE if the page w is enabled; otherwise returns FALSE. +

See also setTabEnabled() and TQWidget::enabled. + +

TQString TQTabWidget::label ( int index ) const +

+Returns the label of the tab at index position index or +TQString::null if the index is out of range. + +

int TQTabWidget::margin () const +

Returns the margin in this tab widget. +See the "margin" property for details. +

TQWidget * TQTabWidget::page ( int index ) const +

+Returns the tab page at index position index or 0 if the index is out of range. + +

void TQTabWidget::removePage ( TQWidget * w ) [virtual slot] +

+Removes page w from this stack of widgets. Does not delete w. +

See also addTab(), showPage(), and TQWidgetStack::removeWidget(). + +

void TQTabWidget::removeTabToolTip ( TQWidget * w ) +

+Removes the tab tool tip for page w. If the page does not have +a tip, nothing happens. +

See also setTabToolTip() and tabToolTip(). + +

void TQTabWidget::setCornerWidget ( TQWidget * w, TQt::Corner corner = TQt::TopRight ) +

+Sets widget w to be the shown in the specified corner of the +tab widget. +

Only the horizontal element of the corner will be used. +

See also cornerWidget() and tabPosition. + +

void TQTabWidget::setCurrentPage ( int ) [slot] +

Sets the index position of the current tab page. +See the "currentPage" property for details. +

void TQTabWidget::setMargin ( int ) +

Sets the margin in this tab widget. +See the "margin" property for details. +

void TQTabWidget::setTabBar ( TQTabBar * tb ) [protected] +

+Replaces the dialog's TQTabBar heading with the tab bar tb. Note +that this must be called before any tabs have been added, or +the behavior is undefined. +

See also tabBar(). + +

void TQTabWidget::setTabEnabled ( TQWidget * w, bool enable ) +

+If enable is TRUE, page w is enabled; otherwise page w is +disabled. The page's tab is redrawn appropriately. +

TQTabWidget uses TQWidget::setEnabled() internally, rather than +keeping a separate flag. +

Note that even a disabled tab/page may be visible. If the page is +visible already, TQTabWidget will not hide it; if all the pages are +disabled, TQTabWidget will show one of them. +

See also isTabEnabled() and TQWidget::enabled. + +

void TQTabWidget::setTabIconSet ( TQWidget * w, const TQIconSet & iconset ) +

+Sets the iconset for page w to iconset. + +

void TQTabWidget::setTabLabel ( TQWidget * w, const TQString & l ) +

+Sets the tab label for page w to l + +

void TQTabWidget::setTabPosition ( TabPosition ) +

Sets the position of the tabs in this tab widget. +See the "tabPosition" property for details. +

void TQTabWidget::setTabShape ( TabShape s ) +

Sets the shape of the tabs in this tab widget to s. +See the "tabShape" property for details. +

void TQTabWidget::setTabToolTip ( TQWidget * w, const TQString & tip ) +

+Sets the tab tool tip for page w to tip. +

See also removeTabToolTip() and tabToolTip(). + +

void TQTabWidget::showPage ( TQWidget * w ) [virtual slot] +

+Ensures that page w is shown. This is useful mainly for +accelerators. +

Warning: Used carelessly, this function can easily surprise or +confuse the user. +

See also TQTabBar::currentTab. + +

TQTabBar * TQTabWidget::tabBar () const [protected] +

+Returns the current TQTabBar. +

See also setTabBar(). + +

TQIconSet TQTabWidget::tabIconSet ( TQWidget * w ) const +

+Returns the iconset of page w or a null iconset if w is not a tab page or does not have an +iconset. + +

TQString TQTabWidget::tabLabel ( TQWidget * w ) const +

+Returns the label text for the tab on page w. + +

TabPosition TQTabWidget::tabPosition () const +

Returns the position of the tabs in this tab widget. +See the "tabPosition" property for details. +

TabShape TQTabWidget::tabShape () const +

Returns the shape of the tabs in this tab widget. +See the "tabShape" property for details. +

TQString TQTabWidget::tabToolTip ( TQWidget * w ) const +

+Returns the tab tool tip for page w or TQString::null if no tool +tip has been set. +

See also setTabToolTip() and removeTabToolTip(). + +


Property Documentation

+

bool autoMask

+

This property holds whether the tab widget is automatically masked. +

See also TQWidget::autoMask. + +

int count

+

This property holds the number of tabs in the tab bar. +

+

Get this property's value with count(). +

int currentPage

+

This property holds the index position of the current tab page. +

Set this property's value with setCurrentPage() and get this property's value with currentPageIndex(). +

See also TQTabBar::currentTab. + +

int margin

+

This property holds the margin in this tab widget. +

The margin is the distance between the innermost pixel of the +frame and the outermost pixel of the pages. + +

Set this property's value with setMargin() and get this property's value with margin(). +

TabPosition tabPosition

+

This property holds the position of the tabs in this tab widget. +

Possible values for this property are TQTabWidget::Top and TQTabWidget::Bottom. +

See also TabPosition. + +

Set this property's value with setTabPosition() and get this property's value with tabPosition(). +

TabShape tabShape

+

This property holds the shape of the tabs in this tab widget. +

Possible values for this property are TQTabWidget::Rounded +(default) or TQTabWidget::Triangular. +

See also TabShape. + +

Set this property's value with setTabShape() and get this property's value with tabShape(). + +


+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/qtextbrowser-h.html b/doc/html/qtextbrowser-h.html new file mode 100644 index 00000000..a6f6642d --- /dev/null +++ b/doc/html/qtextbrowser-h.html @@ -0,0 +1,152 @@ + + + + + +qtextbrowser.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtextbrowser.h

+ +

This is the verbatim text of the qtextbrowser.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtextbrowser.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of the TQTextBrowser class
+**
+** Created : 990101
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQTEXTBROWSER_H
+#define TQTEXTBROWSER_H
+
+#ifndef QT_H
+#include "qptrlist.h"
+#include "qpixmap.h"
+#include "qcolor.h"
+#include "qtextedit.h"
+#endif // QT_H
+
+#ifndef QT_NO_TEXTBROWSER
+
+class TQTextBrowserData;
+
+class Q_EXPORT TQTextBrowser : public TQTextEdit
+{
+    Q_OBJECT
+    Q_PROPERTY( TQString source READ source WRITE setSource )
+    Q_OVERRIDE( int undoDepth DESIGNABLE false SCRIPTABLE false )
+    Q_OVERRIDE( bool overwriteMode DESIGNABLE false SCRIPTABLE false )
+    Q_OVERRIDE( bool modified SCRIPTABLE false)
+    Q_OVERRIDE( bool readOnly DESIGNABLE false SCRIPTABLE false )
+    Q_OVERRIDE( bool undoRedoEnabled DESIGNABLE false SCRIPTABLE false )
+
+public:
+    TQTextBrowser( TQWidget* parent=0, const char* name=0 );
+    ~TQTextBrowser();
+
+    TQString source() const;
+
+public slots:
+    virtual void setSource(const TQString& name);
+    virtual void backward();
+    virtual void forward();
+    virtual void home();
+    virtual void reload();
+    void setText( const TQString &txt ) { setText( txt, TQString::null ); }
+    virtual void setText( const TQString &txt, const TQString &context );
+
+signals:
+    void backwardAvailable( bool );
+    void forwardAvailable( bool );
+    void sourceChanged( const TQString& );
+    void highlighted( const TQString& );
+    void linkClicked( const TQString& );
+    void anchorClicked( const TQString&, const TQString& );
+
+protected:
+    void keyPressEvent( TQKeyEvent * e);
+
+private:
+    void popupDetail( const TQString& contents, const TQPoint& pos );
+    bool linksEnabled() const { return TRUE; }
+    void emitHighlighted( const TQString &s );
+    void emitLinkClicked( const TQString &s );
+    TQTextBrowserData *d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQTextBrowser( const TQTextBrowser & );
+    TQTextBrowser& operator=( const TQTextBrowser & );
+#endif
+};
+
+#endif // QT_NO_TEXTBROWSER
+
+#endif // TQTEXTBROWSER_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextbrowser-m.png b/doc/html/qtextbrowser-m.png new file mode 100644 index 00000000..92f7f9d2 Binary files /dev/null and b/doc/html/qtextbrowser-m.png differ diff --git a/doc/html/qtextbrowser-members.html b/doc/html/qtextbrowser-members.html new file mode 100644 index 00000000..f279c8b6 --- /dev/null +++ b/doc/html/qtextbrowser-members.html @@ -0,0 +1,556 @@ + + + + + +TQTextBrowser Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTextBrowser

+ +

This is the complete list of member functions for +TQTextBrowser, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextbrowser-w.png b/doc/html/qtextbrowser-w.png new file mode 100644 index 00000000..b91bf69c Binary files /dev/null and b/doc/html/qtextbrowser-w.png differ diff --git a/doc/html/qtextbrowser.html b/doc/html/qtextbrowser.html new file mode 100644 index 00000000..c0d94088 --- /dev/null +++ b/doc/html/qtextbrowser.html @@ -0,0 +1,265 @@ + + + + + +TQTextBrowser Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTextBrowser Class Reference

+ +

The TQTextBrowser class provides a rich text browser with hypertext navigation. +More... +

#include <qtextbrowser.h> +

Inherits TQTextEdit. +

List of all member functions. +

Public Members

+
    +
  • TQTextBrowser ( TQWidget * parent = 0, const char * name = 0 )
  • +
  • TQString source () const
  • +
+

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • bool modified - whether the contents have been modified  (read only)
  • +
  • bool overwriteMode - this text browser's overwrite mode  (read only)
  • +
  • bool readOnly - whether the contents are read only  (read only)
  • +
  • TQString source - the name of the displayed document
  • +
  • int undoDepth - this text browser's undo depth  (read only)
  • +
  • bool undoRedoEnabled - whether undo and redo are enabled  (read only)
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQTextBrowser class provides a rich text browser with hypertext navigation. +

+ + + +

This class extends TQTextEdit (in read-only mode), adding some +navigation functionality so that users can follow links in +hypertext documents. The contents of TQTextEdit is set with +setText(), but TQTextBrowser has an additional function, +setSource(), which makes it possible to set the text to a named +document. The name is looked up in the text view's mime source +factory. If a document name ends with an anchor (for example, "#anchor"), the text browser automatically scrolls to that position +(using scrollToAnchor()). When the user clicks on a hyperlink, the +browser will call setSource() itself, with the link's href +value as argument. You can track the current source by connetion +to the sourceChanged() signal. +

TQTextBrowser provides backward() and forward() slots which you can +use to implement Back and Forward buttons. The home() slot sets +the text to the very first document displayed. The linkClicked() +signal is emitted when the user clicks a link. +

By using TQTextEdit::setMimeSourceFactory() you can provide your +own subclass of TQMimeSourceFactory. This makes it possible to +access data from anywhere, for example from a network or from a +database. See TQMimeSourceFactory::data() for details. +

If you intend using the mime factory to read the data directly +from the file system, you may have to specify the encoding for the +file extension you are using. For example: +

+    mimeSourceFactory()->setExtensionType("qml", "text/utf8");
+    
+ +This is to ensure that the factory is able to resolve the document +names. +

TQTextBrowser interprets the tags it processes in accordance with +the default style sheet. Change the style sheet with +setStyleSheet(); see TQStyleSheet for details. +

If you want to provide your users with editable rich text use +TQTextEdit. If you want a text browser without hypertext navigation +use TQTextEdit, and use TQTextEdit::setReadOnly() to disable +editing. If you just need to display a small piece of rich text +use TQSimpleRichText or TQLabel. +

+

See also Advanced Widgets, Help System, and Text Related Classes. + +


Member Function Documentation

+

TQTextBrowser::TQTextBrowser ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs an empty TQTextBrowser called name, with parent parent. + +

void TQTextBrowser::anchorClicked ( const TQString & name, const TQString & link ) [signal] +

+ +

This signal is emitted when the user clicks an anchor. The link is +the value of the href i.e. the name of the target document. The name +is the name of the anchor. +

See also linkClicked(). + +

void TQTextBrowser::backward () [virtual slot] +

+Changes the document displayed to the previous document in the +list of documents built by navigating links. Does nothing if there +is no previous document. +

See also forward() and backwardAvailable(). + +

Example: helpviewer/helpwindow.cpp. +

void TQTextBrowser::backwardAvailable ( bool available ) [signal] +

+ +

This signal is emitted when the availability of backward() +changes. available is FALSE when the user is at home(); +otherwise it is TRUE. + +

Example: helpviewer/helpwindow.cpp. +

void TQTextBrowser::forward () [virtual slot] +

+Changes the document displayed to the next document in the list of +documents built by navigating links. Does nothing if there is no +next document. +

See also backward() and forwardAvailable(). + +

Example: helpviewer/helpwindow.cpp. +

void TQTextBrowser::forwardAvailable ( bool available ) [signal] +

+ +

This signal is emitted when the availability of forward() changes. +available is TRUE after the user navigates backward() and FALSE +when the user navigates or goes forward(). + +

Example: helpviewer/helpwindow.cpp. +

void TQTextBrowser::highlighted ( const TQString & link ) [signal] +

+

This signal is emitted when the user has selected but not +activated a link in the document. link is the value of the href i.e. the name of the target document. + +

Example: helpviewer/helpwindow.cpp. +

void TQTextBrowser::home () [virtual slot] +

+Changes the document displayed to be the first document the +browser displayed. + +

Example: helpviewer/helpwindow.cpp. +

void TQTextBrowser::keyPressEvent ( TQKeyEvent * e ) [virtual protected] +

+The event e is used to provide the following keyboard shortcuts: +
+
Keypress Action +
Alt+Left Arrow backward() +
Alt+Right Arrow forward() +
Alt+Up Arrow home() +
+ +

Reimplemented from TQTextEdit. +

void TQTextBrowser::linkClicked ( const TQString & link ) [signal] +

+ +

This signal is emitted when the user clicks a link. The link is +the value of the href i.e. the name of the target document. +

The link will be the absolute location of the document, based +on the value of the anchor's href tag and the current context of +the document. +

See also anchorClicked() and context(). + +

void TQTextBrowser::reload () [virtual slot] +

+Reloads the current set source. + +

void TQTextBrowser::setSource ( const TQString & name ) [virtual slot] +

Sets the name of the displayed document to name. +See the "source" property for details. +

TQString TQTextBrowser::source () const +

Returns the name of the displayed document. +See the "source" property for details. +

void TQTextBrowser::sourceChanged ( const TQString & src ) [signal] +

+ +

This signal is emitted when the mime source has changed, src +being the new source. +

Source changes happen both programmatically when calling +setSource(), forward(), backword() or home() or when the user +clicks on links or presses the equivalent key sequences. + +

Example: helpviewer/helpwindow.cpp. +


Property Documentation

+

bool modified

+

This property holds whether the contents have been modified. +

+

bool overwriteMode

+

This property holds this text browser's overwrite mode. +

+

bool readOnly

+

This property holds whether the contents are read only. +

+

TQString source

+

This property holds the name of the displayed document. +

This is a TQString::null if no document is displayed or if the +source is unknown. +

Setting this property uses the mimeSourceFactory() to lookup the +named document. It also checks for optional anchors and scrolls +the document accordingly. +

If the first tag in the document is <qt type=detail>, the +document is displayed as a popup rather than as new document in +the browser window itself. Otherwise, the document is displayed +normally in the text browser with the text set to the contents of +the named document with setText(). +

If you are using the filesystem access capabilities of the mime +source factory, you must ensure that the factory knows about the +encoding of specified files; otherwise no data will be available. +The default factory handles a couple of common file extensions +such as *.html and *.txt with reasonable defaults. See +TQMimeSourceFactory::data() for details. + +

Set this property's value with setSource() and get this property's value with source(). +

int undoDepth

+

This property holds this text browser's undo depth. +

+

bool undoRedoEnabled

+

This property holds whether undo and redo are enabled. +

+

+


+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/qtextcodec-h.html b/doc/html/qtextcodec-h.html new file mode 100644 index 00000000..6b93949d --- /dev/null +++ b/doc/html/qtextcodec-h.html @@ -0,0 +1,179 @@ + + + + + +qtextcodec.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtextcodec.h

+ +

This is the verbatim text of the qtextcodec.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtextcodec.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQTextCodec class
+**
+** Created : 981015
+**
+** Copyright (C) 1998-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 retquirements 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 TQTEXTCODEC_H
+#define TQTEXTCODEC_H
+
+#ifndef QT_H
+#include "qstring.h"
+#endif // QT_H
+
+#ifndef QT_NO_TEXTCODEC
+
+class TQTextCodec;
+class TQIODevice;
+class TQFont;
+
+class Q_EXPORT TQTextEncoder {
+public:
+    virtual ~TQTextEncoder();
+    virtual TQCString fromUnicode(const TQString& uc, int& lenInOut) = 0;
+};
+
+class Q_EXPORT TQTextDecoder {
+public:
+    virtual ~TQTextDecoder();
+    virtual TQString toUnicode(const char* chars, int len) = 0;
+};
+
+class Q_EXPORT TQTextCodec {
+public:
+    virtual ~TQTextCodec();
+
+#ifndef QT_NO_CODECS
+    static TQTextCodec* loadCharmap(TQIODevice*);
+    static TQTextCodec* loadCharmapFile(TQString filename);
+#endif //QT_NO_CODECS
+    static TQTextCodec* codecForMib(int mib);
+    static TQTextCodec* codecForName(const char* hint, int accuracy=0);
+    static TQTextCodec* codecForContent(const char* chars, int len);
+    static TQTextCodec* codecForIndex(int i);
+    static TQTextCodec* codecForLocale();
+    static void setCodecForLocale(TQTextCodec *c);
+
+    static TQTextCodec* codecForTr();
+    static void setCodecForTr(TQTextCodec *c);
+    static TQTextCodec* codecForCStrings();
+    static void setCodecForCStrings(TQTextCodec *c);
+
+    static void deleteAllCodecs();
+
+    static const char* locale();
+
+    virtual const char* name() const = 0;
+    virtual const char* mimeName() const;
+    virtual int mibEnum() const = 0;
+
+    virtual TQTextDecoder* makeDecoder() const;
+    virtual TQTextEncoder* makeEncoder() const;
+
+    virtual TQString toUnicode(const char* chars, int len) const;
+    virtual TQCString fromUnicode(const TQString& uc, int& lenInOut) const;
+
+    TQCString fromUnicode(const TQString& uc) const;
+    TQString toUnicode(const TQByteArray&, int len) const;
+    TQString toUnicode(const TQByteArray&) const;
+    TQString toUnicode(const TQCString&, int len) const;
+    TQString toUnicode(const TQCString&) const;
+    TQString toUnicode(const char* chars) const;
+    virtual bool canEncode( TQChar ) const;
+    virtual bool canEncode( const TQString& ) const;
+
+    virtual int heuristicContentMatch(const char* chars, int len) const = 0;
+    virtual int heuristicNameMatch(const char* hint) const;
+
+    virtual TQByteArray fromUnicode(const TQString& uc, int from, int len) const;
+    virtual unsigned short characterFromUnicode(const TQString &str, int pos) const;
+
+protected:
+    TQTextCodec();
+    static int simpleHeuristicNameMatch(const char* name, const char* hint);
+
+private:
+    friend class TQFont;
+    friend class TQFontEngineXLFD;
+    void fromUnicodeInternal( const TQChar *in, unsigned short *out,  int length );
+
+    static TQTextCodec *cftr;
+    static TQTextCodec *cfcs;
+};
+
+inline TQTextCodec* TQTextCodec::codecForTr() { return cftr; }
+inline void TQTextCodec::setCodecForTr(TQTextCodec *c) { cftr = c; }
+inline TQTextCodec* TQTextCodec::codecForCStrings() { return cfcs; }
+inline void TQTextCodec::setCodecForCStrings(TQTextCodec *c) { cfcs = c; }
+
+#endif // QT_NO_TEXTCODEC
+#endif // TQTEXTCODEC_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextcodec-members.html b/doc/html/qtextcodec-members.html new file mode 100644 index 00000000..c0759eff --- /dev/null +++ b/doc/html/qtextcodec-members.html @@ -0,0 +1,73 @@ + + + + + +TQTextCodec Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTextCodec

+ +

This is the complete list of member functions for +TQTextCodec, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextcodec.html b/doc/html/qtextcodec.html new file mode 100644 index 00000000..b2345532 --- /dev/null +++ b/doc/html/qtextcodec.html @@ -0,0 +1,611 @@ + + + + + +TQTextCodec Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTextCodec Class Reference

+ +

The TQTextCodec class provides conversion between text encodings. +More... +

Almost all the functions in this class are reentrant when TQt is built with thread support. The exceptions are ~TQTextCodec(), setCodecForTr(), setCodecForCStrings(), and TQTextCodec(). +

#include <qtextcodec.h> +

Inherited by TQBig5Codec, TQBig5hkscsCodec, TQEucJpCodec, TQEucKrCodec, TQGb18030Codec, TQJisCodec, TQHebrewCodec, TQSjisCodec, and TQTsciiCodec. +

List of all member functions. +

Public Members

+
    +
  • virtual ~TQTextCodec ()
  • +
  • virtual const char * name () const = 0
  • +
  • virtual const char * mimeName () const
  • +
  • virtual int mibEnum () const = 0
  • +
  • virtual TQTextDecoder * makeDecoder () const
  • +
  • virtual TQTextEncoder * makeEncoder () const
  • +
  • virtual TQString toUnicode ( const char * chars, int len ) const
  • +
  • virtual TQCString fromUnicode ( const TQString & uc, int & lenInOut ) const
  • +
  • TQCString fromUnicode ( const TQString & uc ) const
  • +
  • TQString toUnicode ( const TQByteArray & a, int len ) const
  • +
  • TQString toUnicode ( const TQByteArray & a ) const
  • +
  • TQString toUnicode ( const TQCString & a, int len ) const
  • +
  • TQString toUnicode ( const TQCString & a ) const
  • +
  • TQString toUnicode ( const char * chars ) const
  • +
  • virtual bool canEncode ( TQChar ch ) const
  • +
  • virtual bool canEncode ( const TQString & s ) const
  • +
  • virtual int heuristicContentMatch ( const char * chars, int len ) const = 0
  • +
  • virtual int heuristicNameMatch ( const char * hint ) const
  • +
+

Static Public Members

+ +

Protected Members

+ +

Static Protected Members

+ +

Detailed Description

+ + +The TQTextCodec class provides conversion between text encodings. + + +

TQt uses Unicode to store, draw and manipulate strings. In many +situations you may wish to deal with data that uses a different +encoding. For example, most Japanese documents are still stored in +Shift-JIS or ISO2022, while Russian users often have their +documents in KOI8-R or CP1251. +

TQt provides a set of TQTextCodec classes to help with converting +non-Unicode formats to and from Unicode. You can also create your +own codec classes (see later). +

The supported encodings are: +

    +
  • Latin1 +
  • Big5 -- Chinese +
  • Big5-HKSCS -- Chinese +
  • eucJP -- Japanese +
  • eucKR -- Korean +
  • GB2312 -- Chinese +
  • GBK -- Chinese +
  • GB18030 -- Chinese +
  • JIS7 -- Japanese +
  • Shift-JIS -- Japanese +
  • TSCII -- Tamil +
  • utf8 -- Unicode, 8-bit +
  • utf16 -- Unicode +
  • KOI8-R -- Russian +
  • KOI8-U -- Ukrainian +
  • ISO8859-1 -- Western +
  • ISO8859-2 -- Central European +
  • ISO8859-3 -- Central European +
  • ISO8859-4 -- Baltic +
  • ISO8859-5 -- Cyrillic +
  • ISO8859-6 -- Arabic +
  • ISO8859-7 -- Greek +
  • ISO8859-8 -- Hebrew, visually ordered +
  • ISO8859-8-i -- Hebrew, logically ordered +
  • ISO8859-9 -- Turkish +
  • ISO8859-10 +
  • ISO8859-13 +
  • ISO8859-14 +
  • ISO8859-15 -- Western +
  • IBM 850 +
  • IBM 866 +
  • CP874 +
  • CP1250 -- Central European +
  • CP1251 -- Cyrillic +
  • CP1252 -- Western +
  • CP1253 -- Greek +
  • CP1254 -- Turkish +
  • CP1255 -- Hebrew +
  • CP1256 -- Arabic +
  • CP1257 -- Baltic +
  • CP1258 +
  • Apple Roman +
  • TIS-620 -- Thai +
+

TQTextCodecs can be used as follows to convert some locally encoded +string to Unicode. Suppose you have some string encoded in Russian +KOI8-R encoding, and want to convert it to Unicode. The simple way +to do this is: +

+    TQCString locallyEncoded = "..."; // text to convert
+    TQTextCodec *codec = TQTextCodec::codecForName("KOI8-R"); // get the codec for KOI8-R
+    TQString unicodeString = codec->toUnicode( locallyEncoded );
+    
+ +

After this, unicodeString holds the text converted to Unicode. +Converting a string from Unicode to the local encoding is just as +easy: +

+    TQString unicodeString = "..."; // any Unicode text
+    TQTextCodec *codec = TQTextCodec::codecForName("KOI8-R"); // get the codec for KOI8-R
+    TQCString locallyEncoded = codec->fromUnicode( unicodeString );
+    
+ +

Some care must be taken when trying to convert the data in chunks, +for example, when receiving it over a network. In such cases it is +possible that a multi-byte character will be split over two +chunks. At best this might result in the loss of a character and +at worst cause the entire conversion to fail. +

The approach to use in these situations is to create a TQTextDecoder +object for the codec and use this TQTextDecoder for the whole +decoding process, as shown below: +

+    TQTextCodec *codec = TQTextCodec::codecForName( "Shift-JIS" );
+    TQTextDecoder *decoder = codec->makeDecoder();
+
+    TQString unicodeString;
+    while( receiving_data ) {
+        TQByteArray chunk = new_data;
+        unicodeString += decoder->toUnicode( chunk.data(), chunk.length() );
+    }
+    
+ +

The TQTextDecoder object maintains state between chunks and therefore +works correctly even if a multi-byte character is split between +chunks. +

+

Creating your own Codec class +

+

Support for new text encodings can be added to TQt by creating +TQTextCodec subclasses. +

Built-in codecs can be overridden by custom codecs since more +recently created TQTextCodec objects take precedence over earlier +ones. +

You may find it more convenient to make your codec class available +as a plugin; see the plugin + documentation for more details. +

The abstract virtual functions describe the encoder to the +system and the coder is used as retquired in the different +text file formats supported by TQTextStream, and under X11, for the +locale-specific character input and output. +

To add support for another 8-bit encoding to TQt, make a subclass +of TQTextCodec and implement at least the following methods: +

+    const char* name() const
+    
+ +Return the official name for the encoding. +

+    int mibEnum() const
+    
+ +Return the MIB enum for the encoding if it is listed in the +IANA character-sets encoding file. +

If the encoding is multi-byte then it will have "state"; that is, +the interpretation of some bytes will be dependent on some preceding +bytes. For such encodings, you must implement: +

+    TQTextDecoder* makeDecoder() const
+    
+ +Return a TQTextDecoder that remembers incomplete multi-byte sequence +prefixes or other retquired state. +

If the encoding does not retquire state, you should implement: +

+    TQString toUnicode(const char* chars, int len) const
+    
+ +Converts len characters from chars to Unicode. +

The base TQTextCodec class has default implementations of the above +two functions, but they are mutually recursive, so you must +re-implement at least one of them, or both for improved efficiency. +

For conversion from Unicode to 8-bit encodings, it is rarely necessary +to maintain state. However, two functions similar to the two above +are used for encoding: +

+    TQTextEncoder* makeEncoder() const
+    
+ +Return a TQTextEncoder. +

+    TQCString fromUnicode(const TQString& uc, int& lenInOut ) const
+    
+ +Converts lenInOut characters (of type TQChar) from the start of +the string uc, returning a TQCString result, and also returning +the length of the result in +lenInOut. +

Again, these are mutually recursive so only one needs to be implemented, +or both if greater efficiency is possible. +

Finally, you must implement: +

+    int heuristicContentMatch(const char* chars, int len) const
+    
+ +Gives a value indicating how likely it is that len characters +from chars are in the encoding. +

A good model for this function is the +TQWindowsLocalCodec::heuristicContentMatch function found in the TQt +sources. +

A TQTextCodec subclass might have improved performance if you also +re-implement: +

+    bool canEncode( TQChar ) const
+    
+ +Test if a Unicode character can be encoded. +

+    bool canEncode( const TQString& ) const
+    
+ +Test if a string of Unicode characters can be encoded. +

+    int heuristicNameMatch(const char* hint) const
+    
+ +Test if a possibly non-standard name is referring to the codec. +

Codecs can also be created as plugins. +

See also Internationalization with TQt. + +


Member Function Documentation

+

TQTextCodec::TQTextCodec () [protected] +

Warning: This function is not reentrant.

+ + +

Constructs a TQTextCodec, and gives it the highest precedence. The +TQTextCodec should always be constructed on the heap (i.e. with new). TQt takes ownership and will delete it when the application +terminates. + +

TQTextCodec::~TQTextCodec () [virtual] +

Warning: This function is not reentrant.

+ + +

Destroys the TQTextCodec. Note that you should not delete codecs +yourself: once created they become TQt's responsibility. + +

bool TQTextCodec::canEncode ( TQChar ch ) const [virtual] +

+Returns TRUE if the Unicode character ch can be fully encoded +with this codec; otherwise returns FALSE. The default +implementation tests if the result of toUnicode(fromUnicode(ch)) +is the original ch. Subclasses may be able to improve the +efficiency. + +

bool TQTextCodec::canEncode ( const TQString & s ) const [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

s contains the string being tested for encode-ability. + +

TQTextCodec * TQTextCodec::codecForCStrings () [static] +

+ +

Returns the codec used by TQString to convert to and from const +char* and TQCStrings. If this function returns 0 (the default), +TQString assumes Latin-1. +

See also setCodecForCStrings(). + +

TQTextCodec * TQTextCodec::codecForContent ( const char * chars, int len ) [static] +

+Searches all installed TQTextCodec objects, returning the one which +most recognizes the given content. May return 0. +

Note that this is often a poor choice, since character encodings +often use most of the available character sequences, and so only +by linguistic analysis could a true match be made. +

chars contains the string to check, and len contains the +number of characters in the string to use. +

See also heuristicContentMatch(). + +

Example: qwerty/qwerty.cpp. +

TQTextCodec * TQTextCodec::codecForIndex ( int i ) [static] +

+Returns the TQTextCodec i positions from the most recently +inserted codec, or 0 if there is no such TQTextCodec. Thus, +codecForIndex(0) returns the most recently created TQTextCodec. + +

Example: qwerty/qwerty.cpp. +

TQTextCodec * TQTextCodec::codecForLocale () [static] +

Returns a pointer to the codec most suitable for this locale. +

Example: qwerty/qwerty.cpp. +

TQTextCodec * TQTextCodec::codecForMib ( int mib ) [static] +

+Returns the TQTextCodec which matches the MIBenum mib. + +

TQTextCodec * TQTextCodec::codecForName ( const char * name, int accuracy = 0 ) [static] +

+Searches all installed TQTextCodec objects and returns the one +which best matches name; the match is case-insensitive. Returns +0 if no codec's heuristicNameMatch() reports a match better than +accuracy, or if name is a null string. +

See also heuristicNameMatch(). + +

TQTextCodec * TQTextCodec::codecForTr () [static] +

+ +

Returns the codec used by TQObject::tr() on its argument. If this +function returns 0 (the default), tr() assumes Latin-1. +

See also setCodecForTr(). + +

void TQTextCodec::deleteAllCodecs () [static] +

+Deletes all the created codecs. +

Warning: Do not call this function. +

TQApplication calls this function just before exiting to delete +any TQTextCodec objects that may be lying around. Since various +other classes hold pointers to TQTextCodec objects, it is not safe +to call this function earlier. +

If you are using the utility classes (like TQString) but not using +TQApplication, calling this function at the very end of your +application may be helpful for chasing down memory leaks by +eliminating any TQTextCodec objects. + +

TQCString TQTextCodec::fromUnicode ( const TQString & uc, int & lenInOut ) const [virtual] +

+TQTextCodec subclasses must reimplement either this function or +makeEncoder(). It converts the first lenInOut characters of uc from Unicode to the encoding of the subclass. If lenInOut is +negative or too large, the length of uc is used instead. +

Converts lenInOut characters (not bytes) from uc, producing +a TQCString. lenInOut will be set to the length of the result (in bytes). +

The default implementation makes an encoder with makeEncoder() and +converts the input with that. Note that the default makeEncoder() +implementation makes an encoder that simply calls this function, +hence subclasses must reimplement one function or the other to +avoid infinite recursion. + +

Reimplemented in TQHebrewCodec. +

TQCString TQTextCodec::fromUnicode ( const TQString & uc ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

uc is the unicode source string. + +

int TQTextCodec::heuristicContentMatch ( const char * chars, int len ) const [pure virtual] +

+ +

TQTextCodec subclasses must reimplement this function. It examines +the first len bytes of chars and returns a value indicating +how likely it is that the string is a prefix of text encoded in +the encoding of the subclass. A negative return value indicates +that the text is detectably not in the encoding (e.g. it contains +characters undefined in the encoding). A return value of 0 +indicates that the text should be decoded with this codec rather +than as ASCII, but there is no particular evidence. The value +should range up to len. Thus, most decoders will return -1, 0, +or -len. +

The characters are not null terminated. +

See also codecForContent(). + +

int TQTextCodec::heuristicNameMatch ( const char * hint ) const [virtual] +

+Returns a value indicating how likely it is that this decoder is +appropriate for decoding some format that has the given name. The +name is compared with the hint. +

A good match returns a positive number around the length of the +string. A bad match is negative. +

The default implementation calls simpleHeuristicNameMatch() with +the name of the codec. + +

TQTextCodec * TQTextCodec::loadCharmap ( TQIODevice * iod ) [static] +

+Reads a POSIX2 charmap definition from iod. +The parser recognizes the following lines: +

+  <code_set_name> name
+  <escape_char> character
+  % alias alias
+  CHARMAP
+  <token> /xhexbyte <Uunicode> ...
+  <token> /ddecbyte <Uunicode> ...
+  <token> /octbyte <Uunicode> ...
+  <token> /any/any... <Uunicode> ...
+  END CHARMAP
+
+

The resulting TQTextCodec is returned (and also added to the global +list of codecs). The name() of the result is taken from the +code_set_name. +

Note that a codec constructed in this way uses much more memory +and is slower than a hand-written TQTextCodec subclass, since +tables in code are kept in memory shared by all TQt applications. +

See also loadCharmapFile(). + +

Example: qwerty/qwerty.cpp. +

TQTextCodec * TQTextCodec::loadCharmapFile ( TQString filename ) [static] +

+A convenience function for loadCharmap() that loads the charmap +definition from the file filename. + +

const char * TQTextCodec::locale () [static] +

+Returns a string representing the current language and +sublanguage, e.g. "pt" for Portuguese, or "pt_br" for Portuguese/Brazil. + +

Example: i18n/main.cpp. +

TQTextDecoder * TQTextCodec::makeDecoder () const [virtual] +

+Creates a TQTextDecoder which stores enough state to decode chunks +of char* data to create chunks of Unicode data. The default +implementation creates a stateless decoder, which is only +sufficient for the simplest encodings where each byte corresponds +to exactly one Unicode character. +

The caller is responsible for deleting the returned object. + +

TQTextEncoder * TQTextCodec::makeEncoder () const [virtual] +

+Creates a TQTextEncoder which stores enough state to encode chunks +of Unicode data as char* data. The default implementation creates +a stateless encoder, which is only sufficient for the simplest +encodings where each Unicode character corresponds to exactly one +character. +

The caller is responsible for deleting the returned object. + +

int TQTextCodec::mibEnum () const [pure virtual] +

+ +

Subclasses of TQTextCodec must reimplement this function. It +returns the MIBenum (see the + IANA character-sets encoding file for more information). +It is important that each TQTextCodec subclass returns the correct +unique value for this function. + +

Reimplemented in TQEucJpCodec. +

const char * TQTextCodec::mimeName () const [virtual] +

+Returns the preferred mime name of the encoding as defined in the +IANA character-sets encoding file. + +

Reimplemented in TQEucJpCodec, TQEucKrCodec, TQJisCodec, TQHebrewCodec, and TQSjisCodec. +

const char * TQTextCodec::name () const [pure virtual] +

+ +

TQTextCodec subclasses must reimplement this function. It returns +the name of the encoding supported by the subclass. When choosing +a name for an encoding, consider these points: +

    +
  • On X11, heuristicNameMatch( const char * hint ) +is used to test if a the TQTextCodec +can convert between Unicode and the encoding of a font +with encoding hint, such as "iso8859-1" for Latin-1 fonts, +"koi8-r" for Russian KOI8 fonts. +The default algorithm of heuristicNameMatch() uses name(). +
  • Some applications may use this function to present +encodings to the end user. +
+ +

Example: qwerty/qwerty.cpp. +

void TQTextCodec::setCodecForCStrings ( TQTextCodec * c ) [static] +

Warning: This function is not reentrant.

+ + + +

Sets the codec used by TQString to convert to and from const char* +and TQCStrings. If c is 0 (the default), TQString assumes Latin-1. +

Warning: Some codecs do not preserve the characters in the ascii +range (0x00 to 0x7f). For example, the Japanese Shift-JIS +encoding maps the backslash character (0x5a) to the Yen character. +This leads to unexpected results when using the backslash +character to escape characters in strings used in e.g. regular +expressions. Use TQString::fromLatin1() to preserve characters in +the ascii range when needed. +

See also codecForCStrings() and setCodecForTr(). + +

void TQTextCodec::setCodecForLocale ( TQTextCodec * c ) [static] +

+Set the codec to c; this will be returned by codecForLocale(). +This might be needed for some applications that want to use their +own mechanism for setting the locale. +

See also codecForLocale(). + +

void TQTextCodec::setCodecForTr ( TQTextCodec * c ) [static] +

Warning: This function is not reentrant.

+ + + +

Sets the codec used by TQObject::tr() on its argument to c. If +c is 0 (the default), tr() assumes Latin-1. +

If the literal quoted text in the program is not in the Latin-1 +encoding, this function can be used to set the appropriate +encoding. For example, software developed by Korean programmers +might use eucKR for all the text in the program, in which case the +main() function might look like this: +

+    int main(int argc, char** argv)
+    {
+        TQApplication app(argc, argv);
+        ... install any additional codecs ...
+        TQTextCodec::setCodecForTr( TQTextCodec::codecForName("eucKR") );
+        ...
+    }
+    
+ +

Note that this is not the way to select the encoding that the user has chosen. For example, to convert an application containing +literal English strings to Korean, all that is needed is for the +English strings to be passed through tr() and for translation +files to be loaded. For details of internationalization, see the +TQt internationalization documentation. +

See also codecForTr() and setCodecForCStrings(). + +

int TQTextCodec::simpleHeuristicNameMatch ( const char * name, const char * hint ) [static protected] +

+A simple utility function for heuristicNameMatch(): it does some +very minor character-skipping so that almost-exact matches score +high. name is the text we're matching and hint is used for +the comparison. + +

TQString TQTextCodec::toUnicode ( const char * chars, int len ) const [virtual] +

+TQTextCodec subclasses must reimplement this function or +makeDecoder(). It converts the first len characters of chars +to Unicode. +

The default implementation makes a decoder with makeDecoder() and +converts the input with that. Note that the default makeDecoder() +implementation makes a decoder that simply calls +this function, hence subclasses must reimplement one function or +the other to avoid infinite recursion. + +

TQString TQTextCodec::toUnicode ( const TQByteArray & a, int len ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

a contains the source characters; len contains the number of +characters in a to use. + +

TQString TQTextCodec::toUnicode ( const TQByteArray & a ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

a contains the source characters. + +

TQString TQTextCodec::toUnicode ( const TQCString & a, int len ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

a contains the source characters; len contains the number of +characters in a to use. + +

TQString TQTextCodec::toUnicode ( const TQCString & a ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

a contains the source characters. + +

TQString TQTextCodec::toUnicode ( const char * chars ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

chars contains the source characters. + + +


+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/qtextcodecplugin-h.html b/doc/html/qtextcodecplugin-h.html new file mode 100644 index 00000000..d98d65f4 --- /dev/null +++ b/doc/html/qtextcodecplugin-h.html @@ -0,0 +1,115 @@ + + + + + +qtextcodecplugin.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtextcodecplugin.h

+ +

This is the verbatim text of the qtextcodecplugin.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtextcodecplugin.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQTextCodecPlugin class
+**
+** Created : 010920
+**
+** Copyright (C) 2005-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 retquirements 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 TQTEXTCODECPLUGIN_H
+#define TQTEXTCODECPLUGIN_H
+
+#ifndef QT_H
+#include "qgplugin.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_TEXTCODECPLUGIN
+class TQTextCodec;
+class TQTextCodecPluginPrivate;
+
+class Q_EXPORT TQTextCodecPlugin : public TQGPlugin
+{
+    Q_OBJECT
+public:
+    TQTextCodecPlugin();
+    ~TQTextCodecPlugin();
+
+    virtual TQStringList names() const = 0;
+    virtual TQTextCodec *createForName( const TQString &name ) = 0;
+    
+    virtual TQValueList<int> mibEnums() const = 0;
+    virtual TQTextCodec *createForMib( int mib ) = 0;
+
+private:
+    TQTextCodecPluginPrivate *d;
+};
+#endif // QT_NO_TEXTCODECPLUGIN
+#endif // TQTEXTCODECPLUGIN_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextcodecplugin-members.html b/doc/html/qtextcodecplugin-members.html new file mode 100644 index 00000000..7fbe1d6c --- /dev/null +++ b/doc/html/qtextcodecplugin-members.html @@ -0,0 +1,52 @@ + + + + + +TQTextCodecPlugin Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTextCodecPlugin

+ +

This is the complete list of member functions for +TQTextCodecPlugin, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextcodecplugin.html b/doc/html/qtextcodecplugin.html new file mode 100644 index 00000000..8a4f85af --- /dev/null +++ b/doc/html/qtextcodecplugin.html @@ -0,0 +1,114 @@ + + + + + +TQTextCodecPlugin Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTextCodecPlugin Class Reference

+ +

The TQTextCodecPlugin class provides an abstract base for custom TQTextCodec plugins. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qtextcodecplugin.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQTextCodecPlugin class provides an abstract base for custom TQTextCodec plugins. + + +

The text codec plugin is a simple plugin interface that makes it +easy to create custom text codecs that can be loaded dynamically +into applications. +

Writing a text codec plugin is achieved by subclassing this base +class, reimplementing the pure virtual functions names(), +createForName(), mibEnums() and createForMib(), and exporting the +class with the Q_EXPORT_PLUGIN macro. See the TQt Plugins documentation for details. +

See the IANA + character-sets encoding file for more information on mime +names and mib enums. +

See also Plugins. + +


Member Function Documentation

+

TQTextCodecPlugin::TQTextCodecPlugin () +

+Constructs a text codec plugin. This is invoked automatically by +the Q_EXPORT_PLUGIN macro. + +

TQTextCodecPlugin::~TQTextCodecPlugin () +

+Destroys the text codec plugin. +

You never have to call this explicitly. TQt destroys a plugin +automatically when it is no longer used. + +

TQTextCodec * TQTextCodecPlugin::createForMib ( int mib ) [pure virtual] +

+ +

Creates a TQTextCodec object for the mib enum mib. +

(See the + IANA character-sets encoding file for more information) +

See also mibEnums(). + +

TQTextCodec * TQTextCodecPlugin::createForName ( const TQString & name ) [pure virtual] +

+ +

Creates a TQTextCodec object for the codec called name. +

See also names(). + +

TQValueList<int> TQTextCodecPlugin::mibEnums () const [pure virtual] +

+ +

Returns the list of mib enums supported by this plugin. +

See also createForMib(). + +

TQStringList TQTextCodecPlugin::names () const [pure virtual] +

+ +

Returns the list of mime names supported by this plugin. +

See also createForName(). + + +


+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/qtextdecoder-members.html b/doc/html/qtextdecoder-members.html new file mode 100644 index 00000000..6e06f9f5 --- /dev/null +++ b/doc/html/qtextdecoder-members.html @@ -0,0 +1,48 @@ + + + + + +TQTextDecoder Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTextDecoder

+ +

This is the complete list of member functions for +TQTextDecoder, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextdecoder.html b/doc/html/qtextdecoder.html new file mode 100644 index 00000000..06bbb8f3 --- /dev/null +++ b/doc/html/qtextdecoder.html @@ -0,0 +1,78 @@ + + + + + +TQTextDecoder Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTextDecoder Class Reference

+ +

The TQTextDecoder class provides a state-based decoder. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qtextcodec.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQTextDecoder class provides a state-based decoder. + + +

The decoder converts a text format into Unicode, remembering any +state that is retquired between calls. +

See also TQTextCodec::makeEncoder() and Internationalization with TQt. + +


Member Function Documentation

+

TQTextDecoder::~TQTextDecoder () [virtual] +

+Destroys the decoder. + +

TQString TQTextDecoder::toUnicode ( const char * chars, int len ) [pure virtual] +

+ +

Converts the first len bytes in chars to Unicode, returning +the result. +

If not all characters are used (e.g. if only part of a multi-byte +encoding is at the end of the characters), the decoder remembers +enough state to continue with the next call to this function. + + +


+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/qtextdrag-members.html b/doc/html/qtextdrag-members.html new file mode 100644 index 00000000..8d283664 --- /dev/null +++ b/doc/html/qtextdrag-members.html @@ -0,0 +1,107 @@ + + + + + +TQTextDrag Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTextDrag

+ +

This is the complete list of member functions for +TQTextDrag, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextdrag.html b/doc/html/qtextdrag.html new file mode 100644 index 00000000..0522993a --- /dev/null +++ b/doc/html/qtextdrag.html @@ -0,0 +1,129 @@ + + + + + +TQTextDrag Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTextDrag Class Reference

+ +

The TQTextDrag class is a drag and drop object for +transferring plain and Unicode text. +More... +

#include <qdragobject.h> +

Inherits TQDragObject. +

List of all member functions. +

Public Members

+
    +
  • TQTextDrag ( const TQString & text, TQWidget * dragSource = 0, const char * name = 0 )
  • +
  • TQTextDrag ( TQWidget * dragSource = 0, const char * name = 0 )
  • +
  • ~TQTextDrag ()
  • +
  • virtual void setText ( const TQString & text )
  • +
  • virtual void setSubtype ( const TQCString & st )
  • +
+

Static Public Members

+
    +
  • bool canDecode ( const TQMimeSource * e )
  • +
  • bool decode ( const TQMimeSource * e, TQString & str )
  • +
  • bool decode ( const TQMimeSource * e, TQString & str, TQCString & subtype )
  • +
+

Detailed Description

+ + +

The TQTextDrag class is a drag and drop object for +transferring plain and Unicode text. +

+

Plain text is passed in a TQString which may contain multiple lines +(i.e. may contain newline characters). The drag target will receive +the newlines according to the runtime environment, e.g. LF on Unix, +and CRLF on Windows. +

TQt provides no built-in mechanism for delivering only a single-line. +

For more information about drag and drop, see the TQDragObject class +and the drag and drop documentation. +

See also Drag And Drop Classes. + +


Member Function Documentation

+

TQTextDrag::TQTextDrag ( const TQString & text, TQWidget * dragSource = 0, const char * name = 0 ) +

+Constructs a text drag object and sets its data to text. dragSource must be the drag source; name is the object name. + +

TQTextDrag::TQTextDrag ( TQWidget * dragSource = 0, const char * name = 0 ) +

+Constructs a default text drag object. dragSource must be the +drag source; name is the object name. + +

TQTextDrag::~TQTextDrag () +

+Destroys the text drag object and frees up all allocated +resources. + +

bool TQTextDrag::canDecode ( const TQMimeSource * e ) [static] +

+Returns TRUE if the information in e can be decoded into a +TQString; otherwise returns FALSE. +

See also decode(). + +

Example: iconview/simple_dd/main.cpp. +

bool TQTextDrag::decode ( const TQMimeSource * e, TQString & str ) [static] +

+Attempts to decode the dropped information in e into str. +Returns TRUE if successful; otherwise returns FALSE. +

See also canDecode(). + +

Example: iconview/simple_dd/main.cpp. +

bool TQTextDrag::decode ( const TQMimeSource * e, TQString & str, TQCString & subtype ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Attempts to decode the dropped information in e into str. +Returns TRUE if successful; otherwise returns FALSE. If subtype +is null, any text subtype is accepted; otherwise only the +specified subtype is accepted. +

See also canDecode(). + +

void TQTextDrag::setSubtype ( const TQCString & st ) [virtual] +

+Sets the MIME subtype of the text being dragged to st. The +default subtype is "plain", so the default MIME type of the text +is "text/plain". You might use this to declare that the text is +"text/html" by calling setSubtype("html"). + +

void TQTextDrag::setText ( const TQString & text ) [virtual] +

+Sets the text to be dragged to text. You will need to call this +if you did not pass the text during construction. + + +

+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextedit-h.html b/doc/html/qtextedit-h.html new file mode 100644 index 00000000..1133b5e7 --- /dev/null +++ b/doc/html/qtextedit-h.html @@ -0,0 +1,658 @@ + + + + + +qtextedit.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtextedit.h

+ +

This is the verbatim text of the qtextedit.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtextedit.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of the TQTextEdit class
+**
+** Created : 990101
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQTEXTEDIT_H
+#define TQTEXTEDIT_H
+
+#ifndef QT_H
+#include "qscrollview.h"
+#include "qstylesheet.h"
+#include "qptrvector.h"
+#include "qvaluelist.h"
+#include "qptrlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_TEXTEDIT
+// uncomment below to enable optimization mode - also uncomment the
+// optimDoAutoScroll() private slot since moc ignores #ifdefs..
+#define QT_TEXTEDIT_OPTIMIZATION
+
+class TQPainter;
+class TQTextDocument;
+class TQTextCursor;
+class TQKeyEvent;
+class TQResizeEvent;
+class TQMouseEvent;
+class TQTimer;
+class TQTextString;
+class TQTextCommand;
+class TQTextParagraph;
+class TQTextFormat;
+class TQFont;
+class TQColor;
+class TQTextEdit;
+class TQTextBrowser;
+class TQTextString;
+struct TQUndoRedoInfoPrivate;
+class TQPopupMenu;
+class TQTextEditPrivate;
+class TQSyntaxHighlighter;
+
+#ifdef QT_TEXTEDIT_OPTIMIZATION
+class TQTextEditOptimPrivate
+{
+public:
+    // Note: no left-tag has any value for leftTag or parent, and
+    // no right-tag has any formatting flags set.
+    enum TagType { Color = 0, Format = 1 };
+    struct Tag {
+	TagType type:2;
+	bool bold:1;
+	bool italic:1;
+	bool underline:1;
+	int line;
+	int index;
+	Tag * leftTag; // ptr to left-tag in a left-right tag pair
+	Tag * parent;  // ptr to parent left-tag in a nested tag
+	Tag * prev;
+	Tag * next;
+	TQString tag;
+    };
+    TQTextEditOptimPrivate()
+    {
+	len = numLines = maxLineWidth = 0;
+	selStart.line = selStart.index = -1;
+	selEnd.line = selEnd.index = -1;
+	search.line = search.index = 0;
+	tags = lastTag = 0;
+    }
+    void clearTags()
+    {
+	Tag * itr = tags;
+	while ( tags ) {
+	    itr  = tags;
+	    tags = tags->next;
+	    delete itr;
+	}
+	tags = lastTag = 0;
+	tagIndex.clear();
+    }
+    ~TQTextEditOptimPrivate()
+    {
+	clearTags();
+    }
+    int len;
+    int numLines;
+    int maxLineWidth;
+    struct Selection {
+	int line;
+	int index;
+    };
+    Selection selStart, selEnd, search;
+    Tag * tags, * lastTag;
+    TQMap<int, TQString> lines;
+    TQMap<int, Tag *> tagIndex;
+};
+#endif
+
+class Q_EXPORT TQTextEdit : public TQScrollView
+{
+    friend class TQTextBrowser;
+    friend class TQSyntaxHighlighter;
+
+    Q_OBJECT
+    Q_ENUMS( WordWrap WrapPolicy )
+    Q_SETS( AutoFormatting )
+    Q_PROPERTY( TextFormat textFormat READ textFormat WRITE setTextFormat )
+    Q_PROPERTY( TQString text READ text WRITE setText )
+    Q_PROPERTY( TQBrush paper READ paper WRITE setPaper )
+    Q_PROPERTY( bool linkUnderline READ linkUnderline WRITE setLinkUnderline )
+    Q_PROPERTY( TQString documentTitle READ documentTitle )
+    Q_PROPERTY( int length READ length )
+    Q_PROPERTY( WordWrap wordWrap READ wordWrap WRITE setWordWrap )
+    Q_PROPERTY( int wrapColumnOrWidth READ wrapColumnOrWidth WRITE setWrapColumnOrWidth )
+    Q_PROPERTY( WrapPolicy wrapPolicy READ wrapPolicy WRITE setWrapPolicy )
+    Q_PROPERTY( bool hasSelectedText READ hasSelectedText )
+    Q_PROPERTY( TQString selectedText READ selectedText )
+    Q_PROPERTY( int undoDepth READ undoDepth WRITE setUndoDepth )
+    Q_PROPERTY( bool overwriteMode READ isOverwriteMode WRITE setOverwriteMode )
+    Q_PROPERTY( bool modified READ isModified WRITE setModified DESIGNABLE false )
+    Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
+    Q_PROPERTY( bool undoRedoEnabled READ isUndoRedoEnabled WRITE setUndoRedoEnabled )
+    Q_PROPERTY( int tabStopWidth READ tabStopWidth WRITE setTabStopWidth )
+    Q_PROPERTY( bool tabChangesFocus READ tabChangesFocus WRITE setTabChangesFocus )
+    Q_PROPERTY( AutoFormatting autoFormatting READ autoFormatting WRITE setAutoFormatting )
+
+public:
+    enum WordWrap {
+	NoWrap,
+	WidgetWidth,
+	FixedPixelWidth,
+	FixedColumnWidth
+    };
+
+    enum WrapPolicy {
+	AtWordBoundary,
+	AtWhiteSpace = AtWordBoundary, // AtWhiteSpace is deprecated
+	Anywhere,
+	AtWordOrDocumentBoundary
+    };
+
+    enum AutoFormatting {
+	AutoNone = 0,
+	AutoBulletList = 0x00000001,
+	AutoAll = 0xffffffff
+    };
+
+    enum KeyboardAction {
+	ActionBackspace,
+	ActionDelete,
+	ActionReturn,
+	ActionKill,
+	ActionWordBackspace,
+	ActionWordDelete
+    };
+
+    enum CursorAction {
+	MoveBackward,
+	MoveForward,
+	MoveWordBackward,
+	MoveWordForward,
+	MoveUp,
+	MoveDown,
+	MoveLineStart,
+	MoveLineEnd,
+	MoveHome,
+	MoveEnd,
+	MovePgUp,
+	MovePgDown
+    };
+
+    enum VerticalAlignment {
+	AlignNormal,
+	AlignSuperScript,
+	AlignSubScript
+    };
+
+    enum TextInsertionFlags {
+	RedoIndentation = 0x0001,
+	CheckNewLines = 0x0002,
+	RemoveSelected = 0x0004
+    };
+
+    TQTextEdit( const TQString& text, const TQString& context = TQString::null,
+	       TQWidget* parent=0, const char* name=0);
+    TQTextEdit( TQWidget* parent=0, const char* name=0 );
+    virtual ~TQTextEdit();
+    void setPalette( const TQPalette & );
+
+    TQString text() const;
+    TQString text( int para ) const;
+    TextFormat textFormat() const;
+    TQString context() const;
+    TQString documentTitle() const;
+
+    void getSelection( int *paraFrom, int *indexFrom,
+		    int *paraTo, int *indexTo, int selNum = 0 ) const;
+    virtual bool find( const TQString &expr, bool cs, bool wo, bool forward = TRUE,
+		       int *para = 0, int *index = 0 );
+
+    int paragraphs() const;
+    int lines() const;
+    int linesOfParagraph( int para ) const;
+    int lineOfChar( int para, int chr );
+    int length() const;
+    TQRect paragraphRect( int para ) const;
+    int paragraphAt( const TQPoint &pos ) const;
+    int charAt( const TQPoint &pos, int *para ) const;
+    int paragraphLength( int para ) const;
+
+    TQStyleSheet* styleSheet() const;
+#ifndef QT_NO_MIME
+    TQMimeSourceFactory* mimeSourceFactory() const;
+#endif
+    TQBrush paper() const;
+    bool linkUnderline() const;
+
+    int heightForWidth( int w ) const;
+
+    bool hasSelectedText() const;
+    TQString selectedText() const;
+    bool isUndoAvailable() const;
+    bool isRedoAvailable() const;
+
+    WordWrap wordWrap() const;
+    int wrapColumnOrWidth() const;
+    WrapPolicy wrapPolicy() const;
+
+    int tabStopWidth() const;
+
+    TQString anchorAt( const TQPoint& pos );
+    TQString anchorAt( const TQPoint& pos, AnchorAttribute a );
+
+    TQSize sizeHint() const;
+
+    bool isReadOnly() const { return readonly; }
+
+    void getCursorPosition( int *parag, int *index ) const;
+
+    bool isModified() const;
+    bool italic() const;
+    bool bold() const;
+    bool underline() const;
+    TQString family() const;
+    int pointSize() const;
+    TQColor color() const;
+    TQFont font() const;
+    TQFont currentFont() const;
+    int alignment() const;
+    int undoDepth() const;
+
+    // do not use, will go away
+    virtual bool getFormat( int para, int index, TQFont *font, TQColor *color, VerticalAlignment *verticalAlignment );
+    // do not use, will go away
+    virtual bool getParagraphFormat( int para, TQFont *font, TQColor *color,
+				     VerticalAlignment *verticalAlignment, int *alignment,
+				     TQStyleSheetItem::DisplayMode *displayMode,
+				     TQStyleSheetItem::ListStyle *listStyle,
+				     int *listDepth );
+
+
+    bool isOverwriteMode() const { return overWrite; }
+    TQColor paragraphBackgroundColor( int para ) const;
+
+    bool isUndoRedoEnabled() const;
+    bool eventFilter( TQObject *o, TQEvent *e );
+    bool tabChangesFocus() const;
+
+    void setAutoFormatting( uint features );
+    uint autoFormatting() const;
+    TQSyntaxHighlighter *syntaxHighlighter() const;
+
+public slots:
+    void setEnabled( bool );
+#ifndef QT_NO_MIME
+    virtual void setMimeSourceFactory( TQMimeSourceFactory* factory );
+#endif
+    virtual void setStyleSheet( TQStyleSheet* styleSheet );
+    virtual void scrollToAnchor( const TQString& name );
+    virtual void setPaper( const TQBrush& pap );
+    virtual void setLinkUnderline( bool );
+
+    virtual void setWordWrap( WordWrap mode );
+    virtual void setWrapColumnOrWidth( int );
+    virtual void setWrapPolicy( WrapPolicy policy );
+
+    virtual void copy();
+    virtual void append( const TQString& text );
+
+    void setText( const TQString &txt ) { setText( txt, TQString::null ); }
+    virtual void setText( const TQString &txt, const TQString &context );
+    virtual void setTextFormat( TextFormat f );
+
+    virtual void selectAll( bool select = TRUE );
+    virtual void setTabStopWidth( int ts );
+    virtual void zoomIn( int range );
+    virtual void zoomIn() { zoomIn( 1 ); }
+    virtual void zoomOut( int range );
+    virtual void zoomOut() { zoomOut( 1 ); }
+    virtual void zoomTo( int size );
+
+    virtual void sync();
+    virtual void setReadOnly( bool b );
+
+    virtual void undo();
+    virtual void redo();
+    virtual void cut();
+    virtual void paste();
+#ifndef QT_NO_CLIPBOARD
+    virtual void pasteSubType( const TQCString &subtype );
+#endif
+    virtual void clear();
+    virtual void del();
+    virtual void indent();
+    virtual void setItalic( bool b );
+    virtual void setBold( bool b );
+    virtual void setUnderline( bool b );
+    virtual void setFamily( const TQString &f );
+    virtual void setPointSize( int s );
+    virtual void setColor( const TQColor &c );
+    virtual void setFont( const TQFont &f );
+    virtual void setVerticalAlignment( VerticalAlignment a );
+    virtual void setAlignment( int a );
+
+    // do not use, will go away
+    virtual void setParagType( TQStyleSheetItem::DisplayMode dm, TQStyleSheetItem::ListStyle listStyle );
+
+    virtual void setCursorPosition( int parag, int index );
+    virtual void setSelection( int parag_from, int index_from, int parag_to, int index_to, int selNum = 0 );
+    virtual void setSelectionAttributes( int selNum, const TQColor &back, bool invertText );
+    virtual void setModified( bool m );
+    virtual void resetFormat();
+    virtual void setUndoDepth( int d );
+    virtual void setFormat( TQTextFormat *f, int flags );
+    virtual void ensureCursorVisible();
+    virtual void placeCursor( const TQPoint &pos, TQTextCursor *c = 0 );
+    virtual void moveCursor( CursorAction action, bool select );
+    virtual void doKeyboardAction( KeyboardAction action );
+    virtual void removeSelectedText( int selNum = 0 );
+    virtual void removeSelection( int selNum = 0 );
+    virtual void setCurrentFont( const TQFont &f );
+    virtual void setOverwriteMode( bool b ) { overWrite = b; }
+
+    virtual void scrollToBottom();
+
+    void insert( const TQString &text, uint insertionFlags = CheckNewLines | RemoveSelected ); // ## virtual in 4.0
+
+    // obsolete
+    virtual void insert( const TQString &text, bool, bool = TRUE, bool = TRUE );
+
+    virtual void insertAt( const TQString &text, int para, int index );
+    virtual void removeParagraph( int para );
+    virtual void insertParagraph( const TQString &text, int para );
+
+    virtual void setParagraphBackgroundColor( int para, const TQColor &bg );
+    virtual void clearParagraphBackground( int para );
+
+    virtual void setUndoRedoEnabled( bool b );
+    void setTabChangesFocus( bool b ); // ### make virtual in 4.0
+
+#ifdef QT_TEXTEDIT_OPTIMIZATION
+    void polish();
+    void setMaxLogLines( int numLines );
+    int maxLogLines();
+#endif
+
+signals:
+    void textChanged();
+    void selectionChanged();
+    void copyAvailable( bool );
+    void undoAvailable( bool yes );
+    void redoAvailable( bool yes );
+    void currentFontChanged( const TQFont &f );
+    void currentColorChanged( const TQColor &c );
+    void currentAlignmentChanged( int a );
+    void currentVerticalAlignmentChanged( VerticalAlignment a );
+    void cursorPositionChanged( TQTextCursor *c );
+    void cursorPositionChanged( int para, int pos );
+    void returnPressed();
+    void modificationChanged( bool m );
+    void clicked( int parag, int index );
+    void doubleClicked( int parag, int index );
+
+protected:
+    void repaintChanged();
+    void updateStyles();
+    void drawContents( TQPainter *p, int cx, int cy, int cw, int ch );
+    bool event( TQEvent *e );
+    void keyPressEvent( TQKeyEvent *e );
+    void resizeEvent( TQResizeEvent *e );
+    void viewportResizeEvent( TQResizeEvent* );
+    void contentsMousePressEvent( TQMouseEvent *e );
+    void contentsMouseMoveEvent( TQMouseEvent *e );
+    void contentsMouseReleaseEvent( TQMouseEvent *e );
+    void contentsMouseDoubleClickEvent( TQMouseEvent *e );
+#ifndef QT_NO_WHEELEVENT
+    void contentsWheelEvent( TQWheelEvent *e );
+#endif
+    void imStartEvent( TQIMEvent * );
+    void imComposeEvent( TQIMEvent * );
+    void imEndEvent( TQIMEvent * );
+#ifndef QT_NO_DRAGANDDROP
+    void contentsDragEnterEvent( TQDragEnterEvent *e );
+    void contentsDragMoveEvent( TQDragMoveEvent *e );
+    void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+    void contentsDropEvent( TQDropEvent *e );
+#endif
+    void contentsContextMenuEvent( TQContextMenuEvent *e );
+    bool focusNextPrevChild( bool next );
+    TQTextDocument *document() const;
+    TQTextCursor *textCursor() const;
+    void setDocument( TQTextDocument *doc );
+    virtual TQPopupMenu *createPopupMenu( const TQPoint& pos );
+    virtual TQPopupMenu *createPopupMenu();
+    void drawCursor( bool visible );
+
+    void windowActivationChange( bool );
+
+protected slots:
+    virtual void doChangeInterval();
+    void sliderReleased(); // ### make virtual in 4.0
+#if (QT_VERSION >= 0x040000)
+#error "Some functions need to be changed to virtual for TQt 4.0"
+#endif
+
+private slots:
+    void formatMore();
+    void doResize();
+    void autoScrollTimerDone();
+    void blinkCursor();
+    void setModified();
+    void startDrag();
+    void documentWidthChanged( int w );
+    void clipboardChanged();
+
+private:
+    struct Q_EXPORT UndoRedoInfo {
+	enum Type { Invalid, Insert, Delete, Backspace, Return, RemoveSelected, Format, Style, IME };
+
+	UndoRedoInfo( TQTextDocument *dc );
+	~UndoRedoInfo();
+	void clear();
+	bool valid() const;
+
+	TQUndoRedoInfoPrivate *d;
+	int id;
+	int index;
+	int eid;
+	int eindex;
+	TQTextFormat *format;
+	int flags;
+	Type type;
+	TQTextDocument *doc;
+	TQByteArray styleInformation;
+    };
+
+private:
+    void updateCursor( const TQPoint & pos );
+    void handleMouseMove( const TQPoint& pos );
+    void drawContents( TQPainter * );
+    virtual bool linksEnabled() const { return FALSE; }
+    void init();
+    void checkUndoRedoInfo( UndoRedoInfo::Type t );
+    void updateCurrentFormat();
+    bool handleReadOnlyKeyEvent( TQKeyEvent *e );
+    void makeParagVisible( TQTextParagraph *p );
+    void normalCopy();
+    void copyToClipboard();
+#ifndef QT_NO_MIME
+    TQCString pickSpecial(TQMimeSource* ms, bool always_ask, const TQPoint&);
+    TQTextDrag *dragObject( TQWidget *parent = 0 ) const;
+#endif
+#ifndef QT_NO_MIMECLIPBOARD
+    void pasteSpecial(const TQPoint&);
+#endif
+    void setFontInternal( const TQFont &f );
+
+    virtual void emitHighlighted( const TQString & ) {}
+    virtual void emitLinkClicked( const TQString & ) {}
+
+    void readFormats( TQTextCursor &c1, TQTextCursor &c2, TQTextString &text, bool fillStyles = FALSE );
+    void clearUndoRedo();
+    void paintDocument( bool drawAll, TQPainter *p, int cx = -1, int cy = -1, int cw = -1, int ch = -1 );
+    void moveCursor( CursorAction action );
+    void ensureFormatted( TQTextParagraph *p );
+    void placeCursor( const TQPoint &pos, TQTextCursor *c, bool link );
+    void updateMicroFocusHint();
+
+#ifdef QT_TEXTEDIT_OPTIMIZATION
+    bool checkOptimMode();
+    TQString optimText() const;
+    void optimSetText( const TQString &str );
+    void optimAppend( const TQString &str );
+    void optimInsert( const TQString &str, int line, int index );
+    void optimDrawContents( TQPainter * p, int cx, int cy, int cw, int ch );
+    void optimMousePressEvent( TQMouseEvent * e );
+    void optimMouseReleaseEvent( TQMouseEvent * e );
+    void optimMouseMoveEvent( TQMouseEvent * e );
+    int  optimCharIndex( const TQString &str, int mx ) const;
+    void optimSelectAll();
+    void optimRemoveSelection();
+    void optimSetSelection( int startLine, int startIdx, int endLine,
+			    int endIdx );
+    bool optimHasSelection() const;
+    TQString optimSelectedText() const;
+    bool optimFind( const TQString & str, bool, bool, bool, int *, int * );
+    void optimParseTags( TQString * str, int lineNo = -1, int indexOffset = 0 );
+    TQTextEditOptimPrivate::Tag * optimPreviousLeftTag( int line );
+    void optimSetTextFormat( TQTextDocument *, TQTextCursor *, TQTextFormat * f,
+			     int, int, TQTextEditOptimPrivate::Tag * t );
+    TQTextEditOptimPrivate::Tag * optimAppendTag( int index, const TQString & tag );
+    TQTextEditOptimPrivate::Tag * optimInsertTag( int line, int index, const TQString & tag );
+    void optimCheckLimit( const TQString& str );
+    bool optimHasBoldMetrics( int line );
+
+private slots:
+    void optimDoAutoScroll();
+#endif // QT_TEXTEDIT_OPTIMIZATION
+
+private:
+#ifndef QT_NO_CLIPBOARD
+    void pasteSubType( const TQCString &subtype, TQMimeSource *m );
+#endif
+
+private:
+    TQTextDocument *doc;
+    TQTextCursor *cursor;
+    TQTimer *formatTimer, *scrollTimer, *changeIntervalTimer, *blinkTimer, *dragStartTimer;
+    TQTextParagraph *lastFormatted;
+    int interval;
+    UndoRedoInfo undoRedoInfo;
+    TQTextFormat *currentFormat;
+    int currentAlignment;
+    TQPoint oldMousePos, mousePos;
+    TQPoint dragStartPos;
+    TQString onLink;
+    WordWrap wrapMode;
+    WrapPolicy wPolicy;
+    int wrapWidth;
+    TQString pressedLink;
+    TQTextEditPrivate *d;
+    bool inDoubleClick : 1;
+    bool mousePressed : 1;
+    bool cursorVisible : 1;
+    bool blinkCursorVisible : 1;
+    bool readOnly : 1;
+    bool modified : 1;
+    bool mightStartDrag : 1;
+    bool inDnD : 1;
+    bool readonly : 1;
+    bool undoEnabled : 1;
+    bool overWrite : 1;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQTextEdit( const TQTextEdit & );
+    TQTextEdit &operator=( const TQTextEdit & );
+#endif
+};
+
+inline TQTextDocument *TQTextEdit::document() const
+{
+    return doc;
+}
+
+inline TQTextCursor *TQTextEdit::textCursor() const
+{
+    return cursor;
+}
+
+inline void TQTextEdit::setCurrentFont( const TQFont &f )
+{
+    TQTextEdit::setFontInternal( f );
+}
+
+#endif //QT_NO_TEXTEDIT
+#endif //TQTEXTVIEW_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextedit-members.html b/doc/html/qtextedit-members.html new file mode 100644 index 00000000..2629de32 --- /dev/null +++ b/doc/html/qtextedit-members.html @@ -0,0 +1,544 @@ + + + + + +TQTextEdit Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTextEdit

+ +

This is the complete list of member functions for +TQTextEdit, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextedit.html b/doc/html/qtextedit.html new file mode 100644 index 00000000..5b632601 --- /dev/null +++ b/doc/html/qtextedit.html @@ -0,0 +1,1626 @@ + + + + + +TQTextEdit Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTextEdit Class Reference

+ +

The TQTextEdit widget provides a powerful single-page rich text editor. +More... +

#include <qtextedit.h> +

Inherits TQScrollView. +

Inherited by TQMultiLineEdit, TQTextBrowser, and TQTextView. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • AutoFormatting autoFormatting - the enabled set of auto formatting features
  • +
  • TQString documentTitle - the title of the document parsed from the text  (read only)
  • +
  • bool hasSelectedText - whether some text is selected in selection 0  (read only)
  • +
  • int length - the number of characters in the text  (read only)
  • +
  • bool linkUnderline - whether hypertext links will be underlined
  • +
  • bool modified - whether the document has been modified by the user
  • +
  • bool overwriteMode - the text edit's overwrite mode
  • +
  • TQBrush paper - the background (paper) brush
  • +
  • bool readOnly - whether the text edit is read-only
  • +
  • TQString selectedText - the selected text (from selection 0) or an empty string if there is no currently selected text (in selection 0)  (read only)
  • +
  • bool tabChangesFocus - whether TAB changes focus or is accepted as input
  • +
  • int tabStopWidth - the tab stop width in pixels
  • +
  • TQString text - the text edit's text
  • +
  • TextFormat textFormat - the text format: rich text, plain text, log text or auto text
  • +
  • int undoDepth - the depth of the undo history
  • +
  • bool undoRedoEnabled - whether undo/redo is enabled
  • +
  • WordWrap wordWrap - the word wrap mode
  • +
  • int wrapColumnOrWidth - the position (in pixels or columns depending on the wrap mode) where text will be wrapped
  • +
  • WrapPolicy wrapPolicy - the word wrap policy, at whitespace or anywhere
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQTextEdit widget provides a powerful single-page rich text editor. +

+ + +

+

+ + +

Introduction and Concepts +

+

TQTextEdit is an advanced WYSIWYG viewer/editor supporting rich +text formatting using HTML-style tags. It is optimized to handle +large documents and to respond tquickly to user input. +

TQTextEdit has four modes of operation: +

+
Mode Command Notes +
Plain Text Editor setTextFormat(PlainText) +Set text with setText(); text() returns plain text. Text +attributes (e.g. colors) can be set, but plain text is always +returned. +
Rich Text Editor setTextFormat(RichText) +Set text with setText(); text() returns rich text. Rich +text editing is fairly limited. You can't set margins or +insert images for example (although you can read and +correctly display files that have margins set and that +include images). This mode is mostly useful for editing small +amounts of rich text. 1. +
Text Viewer setReadOnly(TRUE) +Set text with setText() or append() (which has no undo +history so is faster and uses less memory); text() returns +plain or rich text depending on the textFormat(). This mode +can correctly display a large subset of HTML tags. +
Log Viewer setTextFormat(LogText) +Append text using append(). The widget is set to be read +only and rich text support is disabled although a few HTML +tags (for color, bold, italic and underline) may be used. +(See LogText mode for details.) +
+

1.A more complete API that supports setting +margins, images, etc., is planned for a later TQt release. +

TQTextEdit can be used as a syntax highlighting editor when used in +conjunction with TQSyntaxHighlighter. +

We recommend that you always call setTextFormat() to set the mode +you want to use. If you use AutoText then setText() and +append() will try to determine whether the text they are given is +plain text or rich text. If you use RichText then setText() and +append() will assume that the text they are given is rich text. +insert() simply inserts the text it is given. +

TQTextEdit works on paragraphs and characters. A paragraph is a +formatted string which is word-wrapped to fit into the width of +the widget. By default when reading plain text, one newline +signify a paragraph. A document consists of zero or more +paragraphs, indexed from 0. Characters are indexed on a +per-paragraph basis, also indexed from 0. The words in the +paragraph are aligned in accordance with the paragraph's +alignment(). Paragraphs are separated by hard line breaks. Each +character within a paragraph has its own attributes, for example, +font and color. +

The text edit documentation uses the following concepts: +

    +
  • current format -- +this is the format at the current cursor position, and it +is the format of the selected text if any. +
  • current paragraph -- the paragraph which contains the +cursor. +
+

TQTextEdit can display images (using TQMimeSourceFactory), lists and +tables. If the text is too large to view within the text edit's +viewport, scrollbars will appear. The text edit can load both +plain text and HTML files (a subset of HTML 3.2 and 4). The +rendering style and the set of valid tags are defined by a +styleSheet(). Custom tags can be created and placed in a custom +style sheet. Change the style sheet with setStyleSheet(); see +TQStyleSheet for details. The images identified by image tags are +displayed if they can be interpreted using the text edit's +TQMimeSourceFactory; see setMimeSourceFactory(). +

If you want a text browser with more navigation use TQTextBrowser. +If you just need to display a small piece of rich text use TQLabel +or TQSimpleRichText. +

If you create a new TQTextEdit, and want to allow the user to edit +rich text, call setTextFormat(TQt::RichText) to ensure that the +text is treated as rich text. (Rich text uses HTML tags to set +text formatting attributes. See TQStyleSheet for information on the +HTML tags that are supported.). If you don't call setTextFormat() +explicitly the text edit will guess from the text itself whether +it is rich text or plain text. This means that if the text looks +like HTML or XML it will probably be interpreted as rich text, so +you should call setTextFormat(TQt::PlainText) to preserve such +text. +

Note that we do not intend to add a full-featured web browser +widget to TQt (because that would easily double TQt's size and only +a few applications would benefit from it). The rich +text support in TQt is designed to provide a fast, portable and +efficient way to add reasonable online help facilities to +applications, and to provide a basis for rich text editors. +

Using TQTextEdit as a Display Widget +

+

TQTextEdit can display a large HTML subset, including tables and +images. +

The text is set or replaced using setText() which deletes any +existing text and replaces it with the text passed in the +setText() call. If you call setText() with legacy HTML (with +setTextFormat(RichText) in force), and then call text(), the text +that is returned may have different markup, but will render the +same. Text can be inserted with insert(), paste(), pasteSubType() +and append(). Text that is appended does not go into the undo +history; this makes append() faster and consumes less memory. Text +can also be cut(). The entire text is deleted with clear() and the +selected text is deleted with removeSelectedText(). Selected +(marked) text can also be deleted with del() (which will delete +the character to the right of the cursor if no text is selected). +

Loading and saving text is achieved using setText() and text(), +for example: +

+    TQFile file( fileName ); // Read the text from a file
+    if ( file.open( IO_ReadOnly ) ) {
+        TQTextStream stream( &file );
+        textEdit->setText( stream.read() );
+    }
+
+    TQFile file( fileName ); // Write the text to a file
+    if ( file.open( IO_WriteOnly ) ) {
+        TQTextStream stream( &file );
+        stream << textEdit->text();
+        textEdit->setModified( FALSE );
+    }
+    
+ +

By default the text edit wraps words at whitespace to fit within +the text edit widget. The setWordWrap() function is used to +specify the kind of word wrap you want, or NoWrap if you don't +want any wrapping. Call setWordWrap() to set a fixed pixel width +FixedPixelWidth, or character column (e.g. 80 column) FixedColumnWidth with the pixels or columns specified with +setWrapColumnOrWidth(). If you use word wrap to the widget's width +WidgetWidth, you can specify whether to break on whitespace or +anywhere with setWrapPolicy(). +

The background color is set differently than other widgets, using +setPaper(). You specify a brush style which could be a plain color +or a complex pixmap. +

Hypertext links are automatically underlined; this can be changed +with setLinkUnderline(). The tab stop width is set with +setTabStopWidth(). +

The zoomIn() and zoomOut() functions can be used to resize the +text by increasing (decreasing for zoomOut()) the point size used. +Images are not affected by the zoom functions. +

The lines() function returns the number of lines in the text and +paragraphs() returns the number of paragraphs. The number of lines +within a particular paragraph is returned by linesOfParagraph(). +The length of the entire text in characters is returned by +length(). +

You can scroll to an anchor in the text, e.g. +<a name="anchor"> with scrollToAnchor(). The find() function +can be used to find and select a given string within the text. +

A read-only TQTextEdit provides the same functionality as the +(obsolete) TQTextView. (TQTextView is still supplied for +compatibility with old code.) +

Read-only key bindings +

+

When TQTextEdit is used read-only the key-bindings are limited to +navigation, and text may only be selected with the mouse: +

+
Keypresses Action +
UpArrow Move one line up +
DownArrow Move one line down +
LeftArrow Move one character left +
RightArrow Move one character right +
PageUp Move one (viewport) page up +
PageDown Move one (viewport) page down +
Home Move to the beginning of the text +
End Move to the end of the text +
Shift+Wheel +Scroll the page horizontally (the Wheel is the mouse wheel) +
Ctrl+Wheel Zoom the text +
+

The text edit may be able to provide some meta-information. For +example, the documentTitle() function will return the text from +within HTML <title> tags. +

The text displayed in a text edit has a context. The context is +a path which the text edit's TQMimeSourceFactory uses to resolve +the locations of files and images. It is passed to the +mimeSourceFactory() when quering data. (See TQTextEdit() and +context().) +

+

Using TQTextEdit in LogText Mode +

+

Setting the text format to LogText puts the widget in a special +mode which is optimized for very large texts. Editing, word wrap, +and rich text support are disabled in this mode (the widget is +explicitly made read-only). This allows the text to be stored in a +different, more memory efficient manner. However, a certain degree +of text formatting is supported through the use of formatting tags. +A tag is delimited by < and >. The characters <, > +and & are escaped by using &lt;, &gt; and &amp;. +A tag pair consists of a left and a right tag (or open/close tags). +Left-tags mark the starting point for formatting, while right-tags +mark the ending point. A right-tag always start with a / before +the tag keyword. For example <b> and </b> are a tag pair. +Tags can be nested, but they have to be closed in the same order as +they are opened. For example, <b><u></u></b> is valid, while <b><u></b></u> will output an error message. +

By using tags it is possible to change the color, bold, italic and +underline settings for a piece of text. A color can be specified +by using the HTML font tag <font color=colorname>. The color +name can be one of the color names from the X11 color database, or +a RGB hex value (e.g #00ff00). Example of valid color tags: +<font color=red>, <font color="light blue">, <font color="#223344">. Bold, italic and underline settings can be +specified by the tags <b>, <i> and <u>. Note that a +tag does not necessarily have to be closed. A valid example: +

+    This is <font color=red>red</font> while <b>this</b> is <font color=blue>blue</font>.
+    <font color=green><font color=yellow>Yellow,</font> and <u>green</u>.
+    
+ +

Stylesheets can also be used in LogText mode. To create and use a +custom tag, you could do the following: +

+    TQTextEdit * log = new TQTextEdit( this );
+    log->setTextFormat( TQt::LogText );
+    TQStyleSheetItem * item = new TQStyleSheetItem( log->styleSheet(), "mytag" );
+    item->setColor( "red" );
+    item->setFontWeight( TQFont::Bold );
+    item->setFontUnderline( TRUE );
+    log->append( "This is a <mytag>custom tag</mytag>!" );
+    
+ +Note that only the color, bold, underline and italic attributes of +a TQStyleSheetItem is used in LogText mode. +

Note that you can use setMaxLogLines() to limit the number of +lines the widget can hold in LogText mode. +

There are a few things that you need to be aware of when the +widget is in this mode: +

    +
  • Functions that deal with rich text formatting and cursor +movement will not work or return anything valid. +
  • Lines are equivalent to paragraphs. +
+

Using TQTextEdit as an Editor +

+

All the information about using TQTextEdit as a display widget also +applies here. +

The current format's attributes are set with setItalic(), +setBold(), setUnderline(), setFamily() (font family), +setPointSize(), setColor() and setCurrentFont(). The current +paragraph's alignment is set with setAlignment(). +

Use setSelection() to select text. The setSelectionAttributes() +function is used to indicate how selected text should be +displayed. Use hasSelectedText() to find out if any text is +selected. The currently selected text's position is available +using getSelection() and the selected text itself is returned by +selectedText(). The selection can be copied to the clipboard with +copy(), or cut to the clipboard with cut(). It can be deleted with +removeSelectedText(). The entire text can be selected (or +unselected) using selectAll(). TQTextEdit supports multiple +selections. Most of the selection functions operate on the default +selection, selection 0. If the user presses a non-selecting key, +e.g. a cursor key without also holding down Shift, all selections +are cleared. +

Set and get the position of the cursor with setCursorPosition() +and getCursorPosition() respectively. When the cursor is moved, +the signals currentFontChanged(), currentColorChanged() and +currentAlignmentChanged() are emitted to reflect the font, color +and alignment at the new cursor position. +

If the text changes, the textChanged() signal is emitted, and if +the user inserts a new line by pressing Return or Enter, +returnPressed() is emitted. The isModified() function will return +TRUE if the text has been modified. +

TQTextEdit provides command-based undo and redo. To set the depth +of the command history use setUndoDepth() which defaults to 100 +steps. To undo or redo the last operation call undo() or redo(). +The signals undoAvailable() and redoAvailable() indicate whether +the undo and redo operations can be executed. +

The indent() function is used to reindent a paragraph. It is +useful for code editors, for example in TQt Designer's code editor Ctrl+I invokes the indent() +function. +

Editing key bindings +

+

The list of key-bindings which are implemented for editing: +

+
Keypresses Action +
Backspace Delete the character to the left of the cursor +
Delete Delete the character to the right of the cursor +
Ctrl+A Move the cursor to the beginning of the line +
Ctrl+B Move the cursor one character left +
Ctrl+C Copy the marked text to the clipboard (also +Ctrl+Insert under Windows) +
Ctrl+D Delete the character to the right of the cursor +
Ctrl+E Move the cursor to the end of the line +
Ctrl+F Move the cursor one character right +
Ctrl+H Delete the character to the left of the cursor +
Ctrl+K Delete to end of line +
Ctrl+N Move the cursor one line down +
Ctrl+P Move the cursor one line up +
Ctrl+V Paste the clipboard text into line edit +(also Shift+Insert under Windows) +
Ctrl+X Cut the marked text, copy to clipboard +(also Shift+Delete under Windows) +
Ctrl+Z Undo the last operation +
Ctrl+Y Redo the last operation +
LeftArrow Move the cursor one character left +
Ctrl+LeftArrow Move the cursor one word left +
RightArrow Move the cursor one character right +
Ctrl+RightArrow Move the cursor one word right +
UpArrow Move the cursor one line up +
Ctrl+UpArrow Move the cursor one word up +
DownArrow Move the cursor one line down +
Ctrl+Down Arrow Move the cursor one word down +
PageUp Move the cursor one page up +
PageDown Move the cursor one page down +
Home Move the cursor to the beginning of the line +
Ctrl+Home Move the cursor to the beginning of the text +
End Move the cursor to the end of the line +
Ctrl+End Move the cursor to the end of the text +
Shift+Wheel Scroll the page horizontally +(the Wheel is the mouse wheel) +
Ctrl+Wheel Zoom the text +
+

To select (mark) text hold down the Shift key whilst pressing one +of the movement keystrokes, for example, Shift+Right Arrow +will select the character to the right, and Shift+Ctrl+Right Arrow will select the word to the right, etc. +

By default the text edit widget operates in insert mode so all +text that the user enters is inserted into the text edit and any +text to the right of the cursor is moved out of the way. The mode +can be changed to overwrite, where new text overwrites any text to +the right of the cursor, using setOverwriteMode(). +

See also Basic Widgets and Text Related Classes. + +


Member Type Documentation

+

TQTextEdit::AutoFormatting

+ +
    +
  • TQTextEdit::AutoNone - Do not perform any automatic formatting +
  • TQTextEdit::AutoBulletList - Only automatically format bulletted lists +
  • TQTextEdit::AutoAll - Apply all available autoformatting +
+

TQTextEdit::CursorAction

+ +

This enum is used by moveCursor() to specify in which direction +the cursor should be moved: +

    +
  • TQTextEdit::MoveBackward - Moves the cursor one character backward +
  • TQTextEdit::MoveWordBackward - Moves the cursor one word backward +
  • TQTextEdit::MoveForward - Moves the cursor one character forward +
  • TQTextEdit::MoveWordForward - Moves the cursor one word forward +
  • TQTextEdit::MoveUp - Moves the cursor up one line +
  • TQTextEdit::MoveDown - Moves the cursor down one line +
  • TQTextEdit::MoveLineStart - Moves the cursor to the beginning of the line +
  • TQTextEdit::MoveLineEnd - Moves the cursor to the end of the line +
  • TQTextEdit::MoveHome - Moves the cursor to the beginning of the document +
  • TQTextEdit::MoveEnd - Moves the cursor to the end of the document +
  • TQTextEdit::MovePgUp - Moves the cursor one viewport page up +
  • TQTextEdit::MovePgDown - Moves the cursor one viewport page down +
+

TQTextEdit::KeyboardAction

+ +

This enum is used by doKeyboardAction() to specify which action +should be executed: +

    +
  • TQTextEdit::ActionBackspace - Delete the character to the left of the +cursor. +
  • TQTextEdit::ActionDelete - Delete the character to the right of the +cursor. +
  • TQTextEdit::ActionReturn - Split the paragraph at the cursor position. +
  • TQTextEdit::ActionKill - If the cursor is not at the end of the +paragraph, delete the text from the cursor position until the end +of the paragraph. If the cursor is at the end of the paragraph, +delete the hard line break at the end of the paragraph: this will +cause this paragraph to be joined with the following paragraph. +
  • TQTextEdit::ActionWordBackspace - Delete the word to the left of the +cursor position. +
  • TQTextEdit::ActionWordDelete - Delete the word to the right of the +cursor position +

+

TQTextEdit::VerticalAlignment

+ +

This enum is used to set the vertical alignment of the text. +

    +
  • TQTextEdit::AlignNormal - Normal alignment +
  • TQTextEdit::AlignSuperScript - Superscript +
  • TQTextEdit::AlignSubScript - Subscript +
+

TQTextEdit::WordWrap

+ +

This enum defines the TQTextEdit's word wrap modes. +

    +
  • TQTextEdit::NoWrap - Do not wrap the text. +
  • TQTextEdit::WidgetWidth - Wrap the text at the current width of the +widget (this is the default). Wrapping is at whitespace by +default; this can be changed with setWrapPolicy(). +
  • TQTextEdit::FixedPixelWidth - Wrap the text at a fixed number of pixels +from the widget's left side. The number of pixels is set with +wrapColumnOrWidth(). +
  • TQTextEdit::FixedColumnWidth - Wrap the text at a fixed number of +character columns from the widget's left side. The number of +characters is set with wrapColumnOrWidth(). This is useful if you +need formatted text that can also be displayed gracefully on +devices with monospaced fonts, for example a standard VT100 +terminal, where you might set wrapColumnOrWidth() to 80. +

See also wordWrap and wordWrap. + +

TQTextEdit::WrapPolicy

+ +

This enum defines where text can be wrapped in word wrap mode. +

    +
  • TQTextEdit::AtWhiteSpace - Don't use this deprecated value (it is a +synonym for AtWordBoundary which you should use instead). +
  • TQTextEdit::Anywhere - Break anywhere, including within words. +
  • TQTextEdit::AtWordBoundary - Break lines at word boundaries, e.g. spaces or +newlines +
  • TQTextEdit::AtWordOrDocumentBoundary - Break lines at whitespace, e.g. +spaces or newlines if possible. Break it anywhere otherwise. +

See also wrapPolicy. + +


Member Function Documentation

+

TQTextEdit::TQTextEdit ( const TQString & text, const TQString & context = TQString::null, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a TQTextEdit called name, with parent parent. The +text edit will display the text text using context context. +

The context is a path which the text edit's TQMimeSourceFactory +uses to resolve the locations of files and images. It is passed to +the mimeSourceFactory() when quering data. +

For example if the text contains an image tag, +<img src="image.png">, and the context is "path/to/look/in", the +TQMimeSourceFactory will try to load the image from +"path/to/look/in/image.png". If the tag was +<img src="/image.png">, the context will not be used (because +TQMimeSourceFactory recognizes that we have used an absolute path) +and will try to load "/image.png". The context is applied in exactly +the same way to hrefs, for example, +<a href="target.html">Target</a>, would resolve to +"path/to/look/in/target.html". + +

TQTextEdit::TQTextEdit ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs an empty TQTextEdit called name, with parent parent. + +

int TQTextEdit::alignment () const +

+Returns the alignment of the current paragraph. +

See also setAlignment(). + +

TQString TQTextEdit::anchorAt ( const TQPoint & pos, AnchorAttribute attr ) +

+If there is an anchor at position pos (in contents +coordinates), the text for attribute attr is returned, +otherwise TQString::null is returned. + +

TQString TQTextEdit::anchorAt ( const TQPoint & pos ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

If there is an anchor at position pos (in contents +coordinates), its href is returned, otherwise TQString::null is +returned. + +

void TQTextEdit::append ( const TQString & text ) [virtual slot] +

+Appends a new paragraph with text to the end of the text edit. Note that +the undo/redo history is cleared by this function, and no undo +history is kept for appends which makes them faster than +insert()s. If you want to append text which is added to the +undo/redo history as well, use insertParagraph(). + +

Examples: network/clientserver/client/client.cpp, network/clientserver/server/server.cpp, network/httpd/httpd.cpp, and process/process.cpp. +

uint TQTextEdit::autoFormatting () const +

Returns the enabled set of auto formatting features. +See the "autoFormatting" property for details. +

bool TQTextEdit::bold () const +

+Returns TRUE if the current format is bold; otherwise returns FALSE. +

See also setBold(). + +

int TQTextEdit::charAt ( const TQPoint & pos, int * para ) const +

+Returns the index of the character (relative to its paragraph) at +position pos (in contents coordinates). If para is not 0, +*para is set to the character's paragraph. + +

void TQTextEdit::clear () [virtual slot] +

+Deletes all the text in the text edit. +

See also cut(), removeSelectedText(), and text. + +

void TQTextEdit::clearParagraphBackground ( int para ) [virtual slot] +

+Clears the background color of the paragraph para, so that the +default color is used again. + +

void TQTextEdit::clicked ( int para, int pos ) [signal] +

+ +

This signal is emitted when the mouse is clicked on the paragraph +para at character position pos. +

See also doubleClicked(). + +

TQColor TQTextEdit::color () const +

+Returns the color of the current format. +

See also setColor() and paper. + +

TQString TQTextEdit::context () const +

+Returns the context of the text edit. The context is a path which +the text edit's TQMimeSourceFactory uses to resolve the locations +of files and images. +

See also text. + +

Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, mdi/application.cpp, and qdir/qdir.cpp. +

void TQTextEdit::copy () [virtual slot] +

+Copies any selected text (from selection 0) to the clipboard. +

See also hasSelectedText and copyAvailable(). + +

void TQTextEdit::copyAvailable ( bool yes ) [signal] +

+ +

This signal is emitted when text is selected or de-selected in the +text edit. +

When text is selected this signal will be emitted with yes set +to TRUE. If no text has been selected or if the selected text is +de-selected this signal is emitted with yes set to FALSE. +

If yes is TRUE then copy() can be used to copy the selection to +the clipboard. If yes is FALSE then copy() does nothing. +

See also selectionChanged(). + +

TQPopupMenu * TQTextEdit::createPopupMenu ( const TQPoint & pos ) [virtual protected] +

+This function is called to create a right mouse button popup menu +at the document position pos. If you want to create a custom +popup menu, reimplement this function and return the created popup +menu. Ownership of the popup menu is transferred to the caller. +

Warning: The TQPopupMenu ID values 0-7 are reserved, and they map to the +standard operations. When inserting items into your custom popup menu, be +sure to specify ID values larger than 7. + +

TQPopupMenu * TQTextEdit::createPopupMenu () [virtual protected] +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This function is called to create a right mouse button popup menu. +If you want to create a custom popup menu, reimplement this function +and return the created popup menu. Ownership of the popup menu is +transferred to the caller. +

This function is only called if createPopupMenu( const TQPoint & ) +returns 0. + +

void TQTextEdit::currentAlignmentChanged ( int a ) [signal] +

+ +

This signal is emitted if the alignment of the current paragraph +has changed. +

The new alignment is a. +

See also setAlignment(). + +

void TQTextEdit::currentColorChanged ( const TQColor & c ) [signal] +

+ +

This signal is emitted if the color of the current format has +changed. +

The new color is c. +

See also setColor(). + +

TQFont TQTextEdit::currentFont () const +

+Returns the font of the current format. +

See also setCurrentFont(), setFamily(), and setPointSize(). + +

void TQTextEdit::currentFontChanged ( const TQFont & f ) [signal] +

+ +

This signal is emitted if the font of the current format has +changed. +

The new font is f. +

See also setCurrentFont(). + +

void TQTextEdit::currentVerticalAlignmentChanged ( VerticalAlignment a ) [signal] +

+ +

This signal is emitted if the vertical alignment of the current +format has changed. +

The new vertical alignment is a. +

See also setVerticalAlignment(). + +

void TQTextEdit::cursorPositionChanged ( int para, int pos ) [signal] +

+ +

This signal is emitted if the position of the cursor has changed. +para contains the paragraph index and pos contains the +character position within the paragraph. +

See also setCursorPosition(). + +

void TQTextEdit::cut () [virtual slot] +

+Copies the selected text (from selection 0) to the clipboard and +deletes it from the text edit. +

If there is no selected text (in selection 0) nothing happens. +

See also TQTextEdit::copy(), paste(), and pasteSubType(). + +

void TQTextEdit::del () [virtual slot] +

+If there is some selected text (in selection 0) it is deleted. If +there is no selected text (in selection 0) the character to the +right of the text cursor is deleted. +

See also removeSelectedText() and cut(). + +

void TQTextEdit::doKeyboardAction ( KeyboardAction action ) [virtual slot] +

+Executes keyboard action action. This is normally called by a +key event handler. + +

TQString TQTextEdit::documentTitle () const +

Returns the title of the document parsed from the text. +See the "documentTitle" property for details. +

void TQTextEdit::doubleClicked ( int para, int pos ) [signal] +

+

This signal is emitted when the mouse is double-clicked on the +paragraph para at character position pos. +

See also clicked(). + +

void TQTextEdit::ensureCursorVisible () [virtual slot] +

+Ensures that the cursor is visible by scrolling the text edit if +necessary. +

See also setCursorPosition(). + +

TQString TQTextEdit::family () const +

+Returns the font family of the current format. +

See also setFamily(), setCurrentFont(), and setPointSize(). + +

bool TQTextEdit::find ( const TQString & expr, bool cs, bool wo, bool forward = TRUE, int * para = 0, int * index = 0 ) [virtual] +

+Finds the next occurrence of the string, expr. Returns TRUE if +expr was found; otherwise returns FALSE. +

If para and index are both 0 the search begins from the +current cursor position. If para and index are both not 0, +the search begins from the *index character position in the +*para paragraph. +

If cs is TRUE the search is case sensitive, otherwise it is +case insensitive. If wo is TRUE the search looks for whole word +matches only; otherwise it searches for any matching text. If forward is TRUE (the default) the search works forward from the +starting position to the end of the text, otherwise it works +backwards to the beginning of the text. +

If expr is found the function returns TRUE. If index and para are not 0, the number of the paragraph in which the first +character of the match was found is put into *para, and the +index position of that character within the paragraph is put into +*index. +

If expr is not found the function returns FALSE. If index +and para are not 0 and expr is not found, *index +and *para are undefined. +

Please note that this function will make the next occurrence of +the string (if found) the current selection, and will thus +modify the cursor position. +

Using the para and index parameters will not work correctly +in case the document contains tables. + +

bool TQTextEdit::focusNextPrevChild ( bool n ) [virtual protected] +

+Reimplemented to allow tabbing through links. If n is TRUE the +tab moves the focus to the next child; if n is FALSE the tab +moves the focus to the previous child. Returns TRUE if the focus +was moved; otherwise returns FALSE. + +

TQFont TQTextEdit::font () const +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Returns TQScrollView::font() +

Warning: In previous versions this function returned the font of +the current format. This lead to confusion. Please use +currentFont() instead. + +

Example: qwerty/qwerty.cpp. +

void TQTextEdit::getCursorPosition ( int * para, int * index ) const +

+This function sets the *para and *index parameters to the +current cursor position. para and index must not be 0. +

See also setCursorPosition(). + +

void TQTextEdit::getSelection ( int * paraFrom, int * indexFrom, int * paraTo, int * indexTo, int selNum = 0 ) const +

+If there is a selection, *paraFrom is set to the number of the +paragraph in which the selection begins and *paraTo is set to +the number of the paragraph in which the selection ends. (They +could be the same.) *indexFrom is set to the index at which the +selection begins within *paraFrom, and *indexTo is set to +the index at which the selection ends within *paraTo. +

If there is no selection, *paraFrom, *indexFrom, *paraTo +and *indexTo are all set to -1. +

If paraFrom, indexFrom, paraTo or indexTo is 0 this +function does nothing. +

The selNum is the number of the selection (multiple selections +are supported). It defaults to 0 (the default selection). +

See also setSelection() and selectedText. + +

bool TQTextEdit::hasSelectedText () const +

Returns TRUE if some text is selected in selection 0; otherwise returns FALSE. +See the "hasSelectedText" property for details. +

int TQTextEdit::heightForWidth ( int w ) const [virtual] +

+Returns how many pixels high the text edit needs to be to display +all the text if the text edit is w pixels wide. + +

Reimplemented from TQWidget. +

void TQTextEdit::insert ( const TQString & text, uint insertionFlags = CheckNewLines | RemoveSelected ) [slot] +

+Inserts text at the current cursor position. +

The insertionFlags define how the text is inserted. If RedoIndentation is set, the paragraph is re-indented. If CheckNewLines is set, newline characters in text result in hard +line breaks (i.e. new paragraphs). If checkNewLine is not set, +the behaviour of the editor is undefined if the text contains +newlines. (It is not possible to change TQTextEdit's newline handling +behavior, but you can use TQString::replace() to preprocess text +before inserting it.) If RemoveSelected is set, any selected +text (in selection 0) is removed before the text is inserted. +

The default flags are CheckNewLines | RemoveSelected. +

If the widget is in LogText mode this function will do nothing. +

See also paste() and pasteSubType(). + +

void TQTextEdit::insert ( const TQString & text, bool indent, bool checkNewLine = TRUE, bool removeSelected = TRUE ) [virtual slot] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

void TQTextEdit::insertAt ( const TQString & text, int para, int index ) [virtual slot] +

+Inserts text in the paragraph para at position index. + +

void TQTextEdit::insertParagraph ( const TQString & text, int para ) [virtual slot] +

+Inserts text as a new paragraph at position para. If para +is -1, the text is appended. Use append() if the append operation +is performance critical. + +

bool TQTextEdit::isModified () const +

Returns TRUE if the document has been modified by the user; otherwise returns FALSE. +See the "modified" property for details. +

bool TQTextEdit::isOverwriteMode () const +

Returns the text edit's overwrite mode. +See the "overwriteMode" property for details. +

bool TQTextEdit::isReadOnly () const +

Returns TRUE if the text edit is read-only; otherwise returns FALSE. +See the "readOnly" property for details. +

bool TQTextEdit::isRedoAvailable () const +

+Returns TRUE if redo is available; otherwise returns FALSE. + +

bool TQTextEdit::isUndoAvailable () const +

+Returns TRUE if undo is available; otherwise returns FALSE. + +

bool TQTextEdit::isUndoRedoEnabled () const +

Returns TRUE if undo/redo is enabled; otherwise returns FALSE. +See the "undoRedoEnabled" property for details. +

bool TQTextEdit::italic () const +

+Returns TRUE if the current format is italic; otherwise returns FALSE. +

See also setItalic(). + +

void TQTextEdit::keyPressEvent ( TQKeyEvent * e ) [virtual protected] +

+Processes the key event, e. By default key events are used to +provide keyboard navigation and text editing. + +

Reimplemented from TQWidget. +

Reimplemented in TQTextBrowser. +

int TQTextEdit::length () const +

Returns the number of characters in the text. +See the "length" property for details. +

int TQTextEdit::lineOfChar ( int para, int index ) +

+Returns the line number of the line in paragraph para in which +the character at position index appears. The index position is +relative to the beginning of the paragraph. If there is no such +paragraph or no such character at the index position (e.g. the +index is out of range) -1 is returned. + +

int TQTextEdit::lines () const +

+Returns the number of lines in the text edit; this could be 0. +

Warning: This function may be slow. Lines change all the time +during word wrapping, so this function has to iterate over all the +paragraphs and get the number of lines from each one individually. + +

int TQTextEdit::linesOfParagraph ( int para ) const +

+Returns the number of lines in paragraph para, or -1 if there +is no paragraph with index para. + +

bool TQTextEdit::linkUnderline () const +

Returns TRUE if hypertext links will be underlined; otherwise returns FALSE. +See the "linkUnderline" property for details. +

int TQTextEdit::maxLogLines () [slot] +

+Returns the maximum number of lines TQTextEdit can hold in LogText mode. By default the number of lines is unlimited, which +is signified by a value of -1. + +

TQMimeSourceFactory * TQTextEdit::mimeSourceFactory () const +

+Returns the TQMimeSourceFactory which is being used by this text +edit. +

See also setMimeSourceFactory(). + +

Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, mdi/application.cpp, and qdir/qdir.cpp. +

void TQTextEdit::modificationChanged ( bool m ) [signal] +

+ +

This signal is emitted when the modification status of the +document has changed. If m is TRUE, the document was modified, +otherwise the modification state has been reset to unmodified. +

See also modified. + +

void TQTextEdit::moveCursor ( CursorAction action, bool select ) [virtual slot] +

+Moves the text cursor according to action. This is normally +used by some key event handler. select specifies whether the +text between the current cursor position and the new position +should be selected. + +

TQBrush TQTextEdit::paper () const +

Returns the background (paper) brush. +See the "paper" property for details. +

int TQTextEdit::paragraphAt ( const TQPoint & pos ) const +

+Returns the paragraph which is at position pos (in contents +coordinates). + +

TQColor TQTextEdit::paragraphBackgroundColor ( int para ) const +

+Returns the background color of the paragraph para or an +invalid color if para is out of range or the paragraph has no +background set + +

int TQTextEdit::paragraphLength ( int para ) const +

+Returns the length of the paragraph para (i.e. the number of +characters), or -1 if there is no paragraph with index para. +

This function ignores newlines. + +

TQRect TQTextEdit::paragraphRect ( int para ) const +

+Returns the rectangle of the paragraph para in contents +coordinates, or an invalid rectangle if para is out of range. + +

int TQTextEdit::paragraphs () const +

+Returns the number of paragraphs in the text; an empty textedit is always +considered to have one paragraph, so 1 is returned in this case. + +

void TQTextEdit::paste () [virtual slot] +

+Pastes the text from the clipboard into the text edit at the +current cursor position. Only plain text is pasted. +

If there is no text in the clipboard nothing happens. +

See also pasteSubType(), cut(), and TQTextEdit::copy(). + +

void TQTextEdit::pasteSubType ( const TQCString & subtype ) [virtual slot] +

+Pastes the text with format subtype from the clipboard into the +text edit at the current cursor position. The subtype can be +"plain" or "html". +

If there is no text with format subtype in the clipboard +nothing happens. +

See also paste(), cut(), and TQTextEdit::copy(). + +

void TQTextEdit::placeCursor ( const TQPoint & pos, TQTextCursor * c = 0 ) [virtual slot] +

+Places the cursor c at the character which is closest to position +pos (in contents coordinates). If c is 0, the default text +cursor is used. +

See also setCursorPosition(). + +

int TQTextEdit::pointSize () const +

+Returns the point size of the font of the current format. +

See also setFamily(), setCurrentFont(), and setPointSize(). + +

void TQTextEdit::redo () [virtual slot] +

+Redoes the last operation. +

If there is no operation to redo, i.e. there is no redo step in +the undo/redo history, nothing happens. +

See also redoAvailable(), undo(), and undoDepth. + +

void TQTextEdit::redoAvailable ( bool yes ) [signal] +

+ +

This signal is emitted when the availability of redo changes. If +yes is TRUE, then redo() will work until redoAvailable( FALSE ) +is next emitted. +

See also redo() and undoDepth. + +

void TQTextEdit::removeParagraph ( int para ) [virtual slot] +

+Removes the paragraph para. + +

void TQTextEdit::removeSelectedText ( int selNum = 0 ) [virtual slot] +

+Deletes the text of selection selNum (by default, the default +selection, 0). If there is no selected text nothing happens. +

See also selectedText and removeSelection(). + +

void TQTextEdit::removeSelection ( int selNum = 0 ) [virtual slot] +

+Removes the selection selNum (by default 0). This does not +remove the selected text. +

See also removeSelectedText(). + +

void TQTextEdit::repaintChanged () [protected] +

+Repaints any paragraphs that have changed. +

Although used extensively internally you shouldn't need to call +this yourself. + +

void TQTextEdit::returnPressed () [signal] +

+ +

This signal is emitted if the user pressed the Return or the Enter +key. + +

void TQTextEdit::scrollToAnchor ( const TQString & name ) [virtual slot] +

+Scrolls the text edit to make the text at the anchor called name visible, if it can be found in the document. If the anchor +isn't found no scrolling will occur. An anchor is defined using +the HTML anchor tag, e.g. <a name="target">. + +

void TQTextEdit::scrollToBottom () [virtual slot] +

+Scrolls to the bottom of the document and does formatting if +retquired. + +

void TQTextEdit::selectAll ( bool select = TRUE ) [virtual slot] +

+If select is TRUE (the default), all the text is selected as +selection 0. If select is FALSE any selected text is +unselected, i.e. the default selection (selection 0) is cleared. +

See also selectedText. + +

TQString TQTextEdit::selectedText () const +

Returns the selected text (from selection 0) or an empty string if there is no currently selected text (in selection 0). +See the "selectedText" property for details. +

void TQTextEdit::selectionChanged () [signal] +

+ +

This signal is emitted whenever the selection changes. +

See also setSelection() and copyAvailable(). + +

void TQTextEdit::setAlignment ( int a ) [virtual slot] +

+Sets the alignment of the current paragraph to a. Valid +alignments are TQt::AlignLeft, TQt::AlignRight, +TQt::AlignJustify and TQt::AlignCenter (which centers +horizontally). + +

Reimplemented in TQMultiLineEdit. +

void TQTextEdit::setAutoFormatting ( uint features ) +

Sets the enabled set of auto formatting features to features. +See the "autoFormatting" property for details. +

void TQTextEdit::setBold ( bool b ) [virtual slot] +

+If b is TRUE sets the current format to bold; otherwise sets +the current format to non-bold. +

See also bold(). + +

void TQTextEdit::setColor ( const TQColor & c ) [virtual slot] +

+Sets the color of the current format, i.e. of the text, to c. +

See also color() and paper. + +

void TQTextEdit::setCurrentFont ( const TQFont & f ) [virtual slot] +

+ +

Sets the font of the current format to f. +

If the widget is in LogText mode this function will do +nothing. Use setFont() instead. +

See also currentFont(), setPointSize(), and setFamily(). + +

void TQTextEdit::setCursorPosition ( int para, int index ) [virtual slot] +

+Sets the cursor to position index in paragraph para. +

See also getCursorPosition(). + +

void TQTextEdit::setFamily ( const TQString & fontFamily ) [virtual slot] +

+Sets the font family of the current format to fontFamily. +

See also family() and setCurrentFont(). + +

void TQTextEdit::setItalic ( bool b ) [virtual slot] +

+If b is TRUE sets the current format to italic; otherwise sets +the current format to non-italic. +

See also italic(). + +

void TQTextEdit::setLinkUnderline ( bool ) [virtual slot] +

Sets whether hypertext links will be underlined. +See the "linkUnderline" property for details. +

void TQTextEdit::setMaxLogLines ( int limit ) [slot] +

+Sets the maximum number of lines a TQTextEdit can hold in LogText mode to limit. If limit is -1 (the default), this +signifies an unlimited number of lines. +

Warning: Never use formatting tags that span more than one line +when the maximum log lines is set. When lines are removed from the +top of the buffer it could result in an unbalanced tag pair, i.e. +the left formatting tag is removed before the right one. + +

void TQTextEdit::setMimeSourceFactory ( TQMimeSourceFactory * factory ) [virtual slot] +

+Sets the text edit's mimesource factory to factory. See +TQMimeSourceFactory for further details. +

See also mimeSourceFactory(). + +

void TQTextEdit::setModified ( bool m ) [virtual slot] +

Sets whether the document has been modified by the user to m. +See the "modified" property for details. +

void TQTextEdit::setOverwriteMode ( bool b ) [virtual slot] +

Sets the text edit's overwrite mode to b. +See the "overwriteMode" property for details. +

void TQTextEdit::setPaper ( const TQBrush & pap ) [virtual slot] +

Sets the background (paper) brush to pap. +See the "paper" property for details. +

void TQTextEdit::setParagraphBackgroundColor ( int para, const TQColor & bg ) [virtual slot] +

+Sets the background color of the paragraph para to bg. + +

void TQTextEdit::setPointSize ( int s ) [virtual slot] +

+Sets the point size of the current format to s. +

Note that if s is zero or negative, the behaviour of this +function is not defined. +

See also pointSize(), setCurrentFont(), and setFamily(). + +

void TQTextEdit::setReadOnly ( bool b ) [virtual slot] +

Sets whether the text edit is read-only to b. +See the "readOnly" property for details. +

void TQTextEdit::setSelection ( int paraFrom, int indexFrom, int paraTo, int indexTo, int selNum = 0 ) [virtual slot] +

+Sets a selection which starts at position indexFrom in +paragraph paraFrom and ends at position indexTo in paragraph +paraTo. +

Any existing selections which have a different id (selNum) are +left alone, but if an existing selection has the same id as selNum it is removed and replaced by this selection. +

Uses the selection settings of selection selNum. If selNum +is 0, this is the default selection. +

The cursor is moved to the end of the selection if selNum is 0, +otherwise the cursor position remains unchanged. +

See also getSelection() and selectedText. + +

void TQTextEdit::setSelectionAttributes ( int selNum, const TQColor & back, bool invertText ) [virtual slot] +

+Sets the background color of selection number selNum to back +and specifies whether the text of this selection should be +inverted with invertText. +

This only works for selNum > 0. The default selection (selNum == 0) gets its attributes from the text edit's +colorGroup(). + +

void TQTextEdit::setStyleSheet ( TQStyleSheet * styleSheet ) [virtual slot] +

+Sets the stylesheet to use with this text edit to styleSheet. +Changes will only take effect for new text added with setText() or +append(). +

See also styleSheet(). + +

void TQTextEdit::setTabChangesFocus ( bool b ) [slot] +

Sets whether TAB changes focus or is accepted as input to b. +See the "tabChangesFocus" property for details. +

void TQTextEdit::setTabStopWidth ( int ts ) [virtual slot] +

Sets the tab stop width in pixels to ts. +See the "tabStopWidth" property for details. +

void TQTextEdit::setText ( const TQString & txt ) [slot] +

Sets the text edit's text to txt. +See the "text" property for details. +

void TQTextEdit::setText ( const TQString & text, const TQString & context ) [virtual slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Changes the text of the text edit to the string text and the +context to context. Any previous text is removed. +

text may be interpreted either as plain text or as rich text, +depending on the textFormat(). The default setting is AutoText, +i.e. the text edit auto-detects the format from text. +

For rich text the rendering style and available tags are defined +by a styleSheet(); see TQStyleSheet for details. +

The optional context is a path which the text edit's +TQMimeSourceFactory uses to resolve the locations of files and +images. (See TQTextEdit::TQTextEdit().) It is passed to the text +edit's TQMimeSourceFactory when quering data. +

Note that the undo/redo history is cleared by this function. +

See also text and textFormat. + +

void TQTextEdit::setTextFormat ( TextFormat f ) [virtual slot] +

Sets the text format: rich text, plain text, log text or auto text to f. +See the "textFormat" property for details. +

void TQTextEdit::setUnderline ( bool b ) [virtual slot] +

+If b is TRUE sets the current format to underline; otherwise +sets the current format to non-underline. +

See also underline(). + +

void TQTextEdit::setUndoDepth ( int d ) [virtual slot] +

Sets the depth of the undo history to d. +See the "undoDepth" property for details. +

void TQTextEdit::setUndoRedoEnabled ( bool b ) [virtual slot] +

Sets whether undo/redo is enabled to b. +See the "undoRedoEnabled" property for details. +

void TQTextEdit::setVerticalAlignment ( VerticalAlignment a ) [virtual slot] +

+Sets the vertical alignment of the current format, i.e. of the +text, to a. +

See also color() and paper. + +

void TQTextEdit::setWordWrap ( WordWrap mode ) [virtual slot] +

Sets the word wrap mode to mode. +See the "wordWrap" property for details. +

void TQTextEdit::setWrapColumnOrWidth ( int ) [virtual slot] +

Sets the position (in pixels or columns depending on the wrap mode) where text will be wrapped. +See the "wrapColumnOrWidth" property for details. +

void TQTextEdit::setWrapPolicy ( WrapPolicy policy ) [virtual slot] +

Sets the word wrap policy, at whitespace or anywhere to policy. +See the "wrapPolicy" property for details. +

TQStyleSheet * TQTextEdit::styleSheet () const +

+Returns the TQStyleSheet which is being used by this text edit. +

See also setStyleSheet(). + +

Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. +

void TQTextEdit::sync () [virtual slot] +

+TQTextEdit is optimized for large amounts text. One of its +optimizations is to format only the visible text, formatting the rest +on demand, e.g. as the user scrolls, so you don't usually need to +call this function. +

In some situations you may want to force the whole text +to be formatted. For example, if after calling setText(), you wanted +to know the height of the document (using contentsHeight()), you +would call this function first. + +

TQSyntaxHighlighter * TQTextEdit::syntaxHighlighter () const +

+Returns the TQSyntaxHighlighter set on this TQTextEdit. 0 is +returned if no syntax highlighter is set. + +

bool TQTextEdit::tabChangesFocus () const +

Returns TRUE if TAB changes focus or is accepted as input; otherwise returns FALSE. +See the "tabChangesFocus" property for details. +

int TQTextEdit::tabStopWidth () const +

Returns the tab stop width in pixels. +See the "tabStopWidth" property for details. +

TQString TQTextEdit::text () const +

Returns the text edit's text. +See the "text" property for details. +

TQString TQTextEdit::text ( int para ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the text of paragraph para. +

If textFormat() is RichText the text will contain HTML +formatting tags. + +

void TQTextEdit::textChanged () [signal] +

+ +

This signal is emitted whenever the text in the text edit changes. +

See also text and append(). + +

Examples: qwerty/qwerty.cpp and rot13/rot13.cpp. +

TQTextCursor * TQTextEdit::textCursor () const [protected] +

+ +

Returns the text edit's text cursor. +

Warning: TQTextCursor is not in the public API, but in special +circumstances you might wish to use it. + +

TextFormat TQTextEdit::textFormat () const +

Returns the text format: rich text, plain text, log text or auto text. +See the "textFormat" property for details. +

bool TQTextEdit::underline () const +

+Returns TRUE if the current format is underlined; otherwise returns +FALSE. +

See also setUnderline(). + +

void TQTextEdit::undo () [virtual slot] +

+Undoes the last operation. +

If there is no operation to undo, i.e. there is no undo step in +the undo/redo history, nothing happens. +

See also undoAvailable(), redo(), and undoDepth. + +

void TQTextEdit::undoAvailable ( bool yes ) [signal] +

+ +

This signal is emitted when the availability of undo changes. If +yes is TRUE, then undo() will work until undoAvailable( FALSE ) +is next emitted. +

See also undo() and undoDepth. + +

int TQTextEdit::undoDepth () const +

Returns the depth of the undo history. +See the "undoDepth" property for details. +

WordWrap TQTextEdit::wordWrap () const +

Returns the word wrap mode. +See the "wordWrap" property for details. +

int TQTextEdit::wrapColumnOrWidth () const +

Returns the position (in pixels or columns depending on the wrap mode) where text will be wrapped. +See the "wrapColumnOrWidth" property for details. +

WrapPolicy TQTextEdit::wrapPolicy () const +

Returns the word wrap policy, at whitespace or anywhere. +See the "wrapPolicy" property for details. +

void TQTextEdit::zoomIn ( int range ) [virtual slot] +

+Zooms in on the text by making the base font size range +points larger and recalculating all font sizes to be the new size. +This does not change the size of any images. +

See also zoomOut(). + +

void TQTextEdit::zoomIn () [virtual slot] +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Zooms in on the text by making the base font size one point +larger and recalculating all font sizes to be the new size. This +does not change the size of any images. +

See also zoomOut(). + +

void TQTextEdit::zoomOut ( int range ) [virtual slot] +

+Zooms out on the text by making the base font size range points +smaller and recalculating all font sizes to be the new size. This +does not change the size of any images. +

See also zoomIn(). + +

void TQTextEdit::zoomOut () [virtual slot] +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Zooms out on the text by making the base font size one point +smaller and recalculating all font sizes to be the new size. This +does not change the size of any images. +

See also zoomIn(). + +

void TQTextEdit::zoomTo ( int size ) [virtual slot] +

+Zooms the text by making the base font size size points and +recalculating all font sizes to be the new size. This does not +change the size of any images. + +

Property Documentation

+

AutoFormatting autoFormatting

+

This property holds the enabled set of auto formatting features. +

The value can be any combination of the values in the AutoFormatting enum. The default is AutoAll. Choose AutoNone +to disable all automatic formatting. +

Currently, the only automatic formatting feature provided is AutoBulletList; future versions of TQt may offer more. + +

Set this property's value with setAutoFormatting() and get this property's value with autoFormatting(). +

TQString documentTitle

+

This property holds the title of the document parsed from the text. +

For PlainText the title will be an empty string. For RichText the title will be the text between the <title> tags, +if present, otherwise an empty string. + +

Get this property's value with documentTitle(). +

bool hasSelectedText

+

This property holds whether some text is selected in selection 0. +

+

Get this property's value with hasSelectedText(). +

int length

+

This property holds the number of characters in the text. +

+

Get this property's value with length(). +

bool linkUnderline

+

This property holds whether hypertext links will be underlined. +

If TRUE (the default) hypertext links will be displayed +underlined. If FALSE links will not be displayed underlined. + +

Set this property's value with setLinkUnderline() and get this property's value with linkUnderline(). +

bool modified

+

This property holds whether the document has been modified by the user. +

+

Set this property's value with setModified() and get this property's value with isModified(). +

bool overwriteMode

+

This property holds the text edit's overwrite mode. +

If FALSE (the default) characters entered by the user are inserted +with any characters to the right being moved out of the way. If +TRUE, the editor is in overwrite mode, i.e. characters entered by +the user overwrite any characters to the right of the cursor +position. + +

Set this property's value with setOverwriteMode() and get this property's value with isOverwriteMode(). +

TQBrush paper

+

This property holds the background (paper) brush. +

The brush that is currently used to draw the background of the +text edit. The initial setting is an empty brush. + +

Set this property's value with setPaper() and get this property's value with paper(). +

bool readOnly

+

This property holds whether the text edit is read-only. +

In a read-only text edit the user can only navigate through the +text and select text; modifying the text is not possible. +

This property's default is FALSE. + +

Set this property's value with setReadOnly() and get this property's value with isReadOnly(). +

TQString selectedText

+

This property holds the selected text (from selection 0) or an empty string if there is no currently selected text (in selection 0). +

The text is always returned as PlainText if the textFormat() is +PlainText or AutoText, otherwise it is returned as HTML. +

See also hasSelectedText. + +

Get this property's value with selectedText(). +

bool tabChangesFocus

This property holds whether TAB changes focus or is accepted as input. +

In some occasions text edits should not allow the user to input +tabulators or change indentation using the TAB key, as this breaks +the focus chain. The default is FALSE. +

+

Set this property's value with setTabChangesFocus() and get this property's value with tabChangesFocus(). +

int tabStopWidth

+

This property holds the tab stop width in pixels. +

+

Set this property's value with setTabStopWidth() and get this property's value with tabStopWidth(). +

TQString text

+

This property holds the text edit's text. +

There is no default text. +

On setting, any previous text is deleted. +

The text may be interpreted either as plain text or as rich text, +depending on the textFormat(). The default setting is AutoText, +i.e. the text edit auto-detects the format of the text. +

For richtext, calling text() on an editable TQTextEdit will cause +the text to be regenerated from the textedit. This may mean that +the TQString returned may not be exactly the same as the one that +was set. +

See also textFormat. + +

Set this property's value with setText() and get this property's value with text(). +

TextFormat textFormat

+

This property holds the text format: rich text, plain text, log text or auto text. +

The text format is one of the following: +

    +
  • PlainText - all characters, except newlines, are displayed +verbatim, including spaces. Whenever a newline appears in the text +the text edit inserts a hard line break and begins a new +paragraph. +
  • RichText - rich text rendering. The available styles are +defined in the default stylesheet TQStyleSheet::defaultSheet(). +
  • LogText - optimized mode for very large texts. Supports a very +limited set of formatting tags (color, bold, underline and italic +settings). +
  • AutoText - this is the default. The text edit autodetects which +rendering style is best, PlainText or RichText. This is done +by using the TQStyleSheet::mightBeRichText() function. +
+ +

Set this property's value with setTextFormat() and get this property's value with textFormat(). +

int undoDepth

+

This property holds the depth of the undo history. +

The maximum number of steps in the undo/redo history. The default +is 100. +

See also undo() and redo(). + +

Set this property's value with setUndoDepth() and get this property's value with undoDepth(). +

bool undoRedoEnabled

+

This property holds whether undo/redo is enabled. +

When changing this property, the undo/redo history is cleared. +

The default is TRUE. + +

Set this property's value with setUndoRedoEnabled() and get this property's value with isUndoRedoEnabled(). +

WordWrap wordWrap

+

This property holds the word wrap mode. +

The default mode is WidgetWidth which causes words to be +wrapped at the right edge of the text edit. Wrapping occurs at +whitespace, keeping whole words intact. If you want wrapping to +occur within words use setWrapPolicy(). If you set a wrap mode of +FixedPixelWidth or FixedColumnWidth you should also call +setWrapColumnOrWidth() with the width you want. +

See also WordWrap, wrapColumnOrWidth, and wrapPolicy. + +

Set this property's value with setWordWrap() and get this property's value with wordWrap(). +

int wrapColumnOrWidth

+

This property holds the position (in pixels or columns depending on the wrap mode) where text will be wrapped. +

If the wrap mode is FixedPixelWidth, the value is the number of +pixels from the left edge of the text edit at which text should be +wrapped. If the wrap mode is FixedColumnWidth, the value is the +column number (in character columns) from the left edge of the +text edit at which text should be wrapped. +

See also wordWrap. + +

Set this property's value with setWrapColumnOrWidth() and get this property's value with wrapColumnOrWidth(). +

WrapPolicy wrapPolicy

+

This property holds the word wrap policy, at whitespace or anywhere. +

Defines where text can be wrapped when word wrap mode is not NoWrap. The choices are AtWordBoundary (the default), Anywhere and AtWordOrDocumentBoundary +

See also wordWrap. + +

Set this property's value with setWrapPolicy() and get this property's value with wrapPolicy(). + +


+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/qtextencoder-members.html b/doc/html/qtextencoder-members.html new file mode 100644 index 00000000..bed22595 --- /dev/null +++ b/doc/html/qtextencoder-members.html @@ -0,0 +1,48 @@ + + + + + +TQTextEncoder Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTextEncoder

+ +

This is the complete list of member functions for +TQTextEncoder, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextencoder.html b/doc/html/qtextencoder.html new file mode 100644 index 00000000..69db0084 --- /dev/null +++ b/doc/html/qtextencoder.html @@ -0,0 +1,79 @@ + + + + + +TQTextEncoder Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTextEncoder Class Reference

+ +

The TQTextEncoder class provides a state-based encoder. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qtextcodec.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQTextEncoder class provides a state-based encoder. + + +

The encoder converts Unicode into another format, remembering any +state that is retquired between calls. +

See also TQTextCodec::makeEncoder() and Internationalization with TQt. + +


Member Function Documentation

+

TQTextEncoder::~TQTextEncoder () [virtual] +

+Destroys the encoder. + +

TQCString TQTextEncoder::fromUnicode ( const TQString & uc, int & lenInOut ) [pure virtual] +

+ +

Converts lenInOut characters (not bytes) from uc, producing +a TQCString. lenInOut will be set to the length of the result (in bytes). +

The encoder is free to record state to use when subsequent calls +are made to this function (for example, it might change modes with +escape sequences if needed during the encoding of one string, then +assume that mode applies when a subsequent call begins). + + +


+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/qtextistream-members.html b/doc/html/qtextistream-members.html new file mode 100644 index 00000000..54c51627 --- /dev/null +++ b/doc/html/qtextistream-members.html @@ -0,0 +1,69 @@ + + + + + +TQTextIStream Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTextIStream

+ +

This is the complete list of member functions for +TQTextIStream, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextistream.html b/doc/html/qtextistream.html new file mode 100644 index 00000000..efaba34a --- /dev/null +++ b/doc/html/qtextistream.html @@ -0,0 +1,91 @@ + + + + + +TQTextIStream Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTextIStream Class Reference

+ +

The TQTextIStream class is a convenience class for input streams. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qtextstream.h> +

Inherits TQTextStream. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQTextIStream class is a convenience class for input streams. +

+ +

This class provides a shorthand for creating simple input +TQTextStreams without having to pass a mode argument to the +constructor. +

This class makes it easy, for example, to write things like this: +

+    TQString data = "123 456";
+    int a, b;
+    TQTextIStream(&data) >> a >> b;
+    
+ +

See also TQTextOStream, Input/Output and Networking, and Text Related Classes. + +


Member Function Documentation

+

TQTextIStream::TQTextIStream ( const TQString * s ) +

+ +

Constructs a stream to read from the string s. + +

TQTextIStream::TQTextIStream ( TQByteArray ba ) +

+ +

Constructs a stream to read from the array ba. + +

TQTextIStream::TQTextIStream ( FILE * f ) +

+ +

Constructs a stream to read from the file f. + + +


+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/qtextostream-members.html b/doc/html/qtextostream-members.html new file mode 100644 index 00000000..bd11d90d --- /dev/null +++ b/doc/html/qtextostream-members.html @@ -0,0 +1,69 @@ + + + + + +TQTextOStream Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTextOStream

+ +

This is the complete list of member functions for +TQTextOStream, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextostream.html b/doc/html/qtextostream.html new file mode 100644 index 00000000..e56fcf4e --- /dev/null +++ b/doc/html/qtextostream.html @@ -0,0 +1,90 @@ + + + + + +TQTextOStream Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTextOStream Class Reference

+ +

The TQTextOStream class is a convenience class for output streams. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qtextstream.h> +

Inherits TQTextStream. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQTextOStream class is a convenience class for output streams. +

+ +

This class provides a shorthand for creating simple output +TQTextStreams without having to pass a mode argument to the +constructor. +

This makes it easy for example, to write things like this: +

+    TQString result;
+    TQTextOStream(&result) << "pi = " << 3.14;
+    
+ +

See also Input/Output and Networking and Text Related Classes. + +


Member Function Documentation

+

TQTextOStream::TQTextOStream ( TQString * s ) +

+ +

Constructs a stream to write to string s. + +

TQTextOStream::TQTextOStream ( TQByteArray ba ) +

+ +

Constructs a stream to write to the array ba. + +

TQTextOStream::TQTextOStream ( FILE * f ) +

+ +

Constructs a stream to write to the file f. + + +


+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/qtextstream-h.html b/doc/html/qtextstream-h.html new file mode 100644 index 00000000..1d381671 --- /dev/null +++ b/doc/html/qtextstream-h.html @@ -0,0 +1,383 @@ + + + + + +qtextstream.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtextstream.h

+ +

This is the verbatim text of the qtextstream.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtextstream.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQTextStream class
+**
+** Created : 940922
+**
+** 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 retquirements 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 TQTEXTSTREAM_H
+#define TQTEXTSTREAM_H
+
+#ifndef QT_H
+#include "qiodevice.h"
+#include "qstring.h"
+#include <stdio.h>
+#endif // QT_H
+
+#ifndef QT_NO_TEXTSTREAM
+class TQTextCodec;
+class TQTextDecoder;
+
+class TQTextStreamPrivate;
+
+class Q_EXPORT TQTextStream				// text stream class
+{
+public:
+    enum Encoding { Locale, Latin1, Unicode, UnicodeNetworkOrder,
+		    UnicodeReverse, RawUnicode, UnicodeUTF8 };
+
+    void	setEncoding( Encoding );
+#ifndef QT_NO_TEXTCODEC
+    void	setCodec( TQTextCodec* );
+    TQTextCodec *codec();
+#endif
+
+    TQTextStream();
+    TQTextStream( TQIODevice * );
+    TQTextStream( TQString*, int mode );
+    TQTextStream( TQString&, int mode );		// obsolete
+    TQTextStream( TQByteArray, int mode );
+    TQTextStream( FILE *, int mode );
+    virtual ~TQTextStream();
+
+    TQIODevice	*device() const;
+    void	 setDevice( TQIODevice * );
+    void	 unsetDevice();
+
+    bool	 atEnd() const;
+    bool	 eof() const;
+
+    TQTextStream &operator>>( TQChar & );
+    TQTextStream &operator>>( char & );
+    TQTextStream &operator>>( signed short & );
+    TQTextStream &operator>>( unsigned short & );
+    TQTextStream &operator>>( signed int & );
+    TQTextStream &operator>>( unsigned int & );
+    TQTextStream &operator>>( signed long & );
+    TQTextStream &operator>>( unsigned long & );
+    TQTextStream &operator>>( float & );
+    TQTextStream &operator>>( double & );
+    TQTextStream &operator>>( char * );
+    TQTextStream &operator>>( TQString & );
+    TQTextStream &operator>>( TQCString & );
+
+    TQTextStream &operator<<( TQChar );
+    TQTextStream &operator<<( char );
+    TQTextStream &operator<<( signed short );
+    TQTextStream &operator<<( unsigned short );
+    TQTextStream &operator<<( signed int );
+    TQTextStream &operator<<( unsigned int );
+    TQTextStream &operator<<( signed long );
+    TQTextStream &operator<<( unsigned long );
+    TQTextStream &operator<<( float );
+    TQTextStream &operator<<( double );
+    TQTextStream &operator<<( const char* );
+    TQTextStream &operator<<( const TQString & );
+    TQTextStream &operator<<( const TQCString & );
+    TQTextStream &operator<<( void * );		// any pointer
+
+    TQTextStream &readRawBytes( char *, uint len );
+    TQTextStream &writeRawBytes( const char* , uint len );
+
+    TQString	readLine();
+    TQString	read();
+    void	skipWhiteSpace();
+
+    enum {
+	skipws	  = 0x0001,			// skip whitespace on input
+	left	  = 0x0002,			// left-adjust output
+	right	  = 0x0004,			// right-adjust output
+	internal  = 0x0008,			// pad after sign
+	bin	  = 0x0010,			// binary format integer
+	oct	  = 0x0020,			// octal format integer
+	dec	  = 0x0040,			// decimal format integer
+	hex	  = 0x0080,			// hex format integer
+	showbase  = 0x0100,			// show base indicator
+	showpoint = 0x0200,			// force decimal point (float)
+	uppercase = 0x0400,			// upper-case hex output
+	showpos	  = 0x0800,			// add '+' to positive integers
+	scientific= 0x1000,			// scientific float output
+	fixed	  = 0x2000			// fixed float output
+    };
+
+    static const int basefield;			// bin | oct | dec | hex
+    static const int adjustfield;		// left | right | internal
+    static const int floatfield;		// scientific | fixed
+
+    int	  flags() const;
+    int	  flags( int f );
+    int	  setf( int bits );
+    int	  setf( int bits, int mask );
+    int	  unsetf( int bits );
+
+    void  reset();
+
+    int	  width()	const;
+    int	  width( int );
+    int	  fill()	const;
+    int	  fill( int );
+    int	  precision()	const;
+    int	  precision( int );
+
+private:
+    long	input_int();
+    void	init();
+    TQTextStream &output_int( int, ulong, bool );
+    TQIODevice	*dev;
+
+    int		fflags;
+    int		fwidth;
+    int		fillchar;
+    int		fprec;
+    bool	doUnicodeHeader;
+    bool	owndev;
+    TQTextCodec 	*mapper;
+    TQTextStreamPrivate * d;
+    TQChar	unused1; // ### remove in TQt 4.0
+    bool	latin1;
+    bool 	internalOrder;
+    bool	networkOrder;
+    void	*unused2; // ### remove in TQt 4.0
+
+    TQChar	eat_ws();
+    uint 	ts_getline( TQChar* );
+    void	ts_ungetc( TQChar );
+    TQChar	ts_getc();
+    uint	ts_getbuf( TQChar*, uint );
+    void	ts_putc(int);
+    void	ts_putc(TQChar);
+    bool	ts_isspace(TQChar);
+    bool	ts_isdigit(TQChar);
+    ulong	input_bin();
+    ulong	input_oct();
+    ulong	input_dec();
+    ulong	input_hex();
+    double	input_double();
+    TQTextStream &writeBlock( const char* p, uint len );
+    TQTextStream &writeBlock( const TQChar* p, uint len );
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQTextStream( const TQTextStream & );
+    TQTextStream &operator=( const TQTextStream & );
+#endif
+};
+
+typedef TQTextStream TQTS;
+
+class Q_EXPORT TQTextIStream : public TQTextStream {
+public:
+    TQTextIStream( const TQString* s ) :
+	TQTextStream((TQString*)s,IO_ReadOnly) { }
+    TQTextIStream( TQByteArray ba ) :
+	TQTextStream(ba,IO_ReadOnly) { }
+    TQTextIStream( FILE *f ) :
+	TQTextStream(f,IO_ReadOnly) { }
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQTextIStream( const TQTextIStream & );
+    TQTextIStream &operator=( const TQTextIStream & );
+#endif
+};
+
+class Q_EXPORT TQTextOStream : public TQTextStream {
+public:
+    TQTextOStream( TQString* s ) :
+	TQTextStream(s,IO_WriteOnly) { }
+    TQTextOStream( TQByteArray ba ) :
+	TQTextStream(ba,IO_WriteOnly) { }
+    TQTextOStream( FILE *f ) :
+	TQTextStream(f,IO_WriteOnly) { }
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQTextOStream( const TQTextOStream & );
+    TQTextOStream &operator=( const TQTextOStream & );
+#endif
+};
+
+/*****************************************************************************
+  TQTextStream inline functions
+ *****************************************************************************/
+
+inline TQIODevice *TQTextStream::device() const
+{ return dev; }
+
+inline bool TQTextStream::atEnd() const
+{ return dev ? dev->atEnd() : FALSE; }
+
+inline bool TQTextStream::eof() const
+{ return atEnd(); }
+
+inline int TQTextStream::flags() const
+{ return fflags; }
+
+inline int TQTextStream::flags( int f )
+{ int oldf = fflags;  fflags = f;  return oldf; }
+
+inline int TQTextStream::setf( int bits )
+{ int oldf = fflags;  fflags |= bits;  return oldf; }
+
+inline int TQTextStream::setf( int bits, int mask )
+{ int oldf = fflags;  fflags = (fflags & ~mask) | (bits & mask); return oldf; }
+
+inline int TQTextStream::unsetf( int bits )
+{ int oldf = fflags;  fflags &= ~bits;	return oldf; }
+
+inline int TQTextStream::width() const
+{ return fwidth; }
+
+inline int TQTextStream::width( int w )
+{ int oldw = fwidth;  fwidth = w;  return oldw;	 }
+
+inline int TQTextStream::fill() const
+{ return fillchar; }
+
+inline int TQTextStream::fill( int f )
+{ int oldc = fillchar;	fillchar = f;  return oldc;  }
+
+inline int TQTextStream::precision() const
+{ return fprec; }
+
+inline int TQTextStream::precision( int p )
+{ int oldp = fprec;  fprec = p;	 return oldp;  }
+
+/*!
+  Returns one character from the stream, or EOF.
+*/
+inline TQChar TQTextStream::ts_getc()
+{ TQChar r; return ( ts_getbuf( &r,1 ) == 1 ? r : TQChar((ushort)0xffff) ); }
+
+/*****************************************************************************
+  TQTextStream manipulators
+ *****************************************************************************/
+
+typedef TQTextStream & (*TQTSFUNC)(TQTextStream &);// manipulator function
+typedef int (TQTextStream::*TQTSMFI)(int);	// manipulator w/int argument
+
+class Q_EXPORT TQTSManip {			// text stream manipulator
+public:
+    TQTSManip( TQTSMFI m, int a ) { mf=m; arg=a; }
+    void exec( TQTextStream &s ) { (s.*mf)(arg); }
+private:
+    TQTSMFI mf;					// TQTextStream member function
+    int	   arg;					// member function argument
+};
+
+Q_EXPORT inline TQTextStream &operator>>( TQTextStream &s, TQTSFUNC f )
+{ return (*f)( s ); }
+
+Q_EXPORT inline TQTextStream &operator<<( TQTextStream &s, TQTSFUNC f )
+{ return (*f)( s ); }
+
+Q_EXPORT inline TQTextStream &operator<<( TQTextStream &s, TQTSManip m )
+{ m.exec(s); return s; }
+
+Q_EXPORT TQTextStream &bin( TQTextStream &s );	// set bin notation
+Q_EXPORT TQTextStream &oct( TQTextStream &s );	// set oct notation
+Q_EXPORT TQTextStream &dec( TQTextStream &s );	// set dec notation
+Q_EXPORT TQTextStream &hex( TQTextStream &s );	// set hex notation
+Q_EXPORT TQTextStream &endl( TQTextStream &s );	// insert EOL ('\n')
+Q_EXPORT TQTextStream &flush( TQTextStream &s );	// flush output
+Q_EXPORT TQTextStream &ws( TQTextStream &s );	// eat whitespace on input
+Q_EXPORT TQTextStream &reset( TQTextStream &s );	// set default flags
+
+Q_EXPORT inline TQTSManip qSetW( int w )
+{
+    TQTSMFI func = &TQTextStream::width;
+    return TQTSManip(func,w);
+}
+
+Q_EXPORT inline TQTSManip qSetFill( int f )
+{
+    TQTSMFI func = &TQTextStream::fill;
+    return TQTSManip(func,f);
+}
+
+Q_EXPORT inline TQTSManip qSetPrecision( int p )
+{
+    TQTSMFI func = &TQTextStream::precision;
+    return TQTSManip(func,p);
+}
+
+#endif // QT_NO_TEXTSTREAM
+#endif // TQTEXTSTREAM_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextstream-members.html b/doc/html/qtextstream-members.html new file mode 100644 index 00000000..e7f9f511 --- /dev/null +++ b/doc/html/qtextstream-members.html @@ -0,0 +1,70 @@ + + + + + +TQTextStream Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTextStream

+ +

This is the complete list of member functions for +TQTextStream, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextstream.html b/doc/html/qtextstream.html new file mode 100644 index 00000000..cc9227df --- /dev/null +++ b/doc/html/qtextstream.html @@ -0,0 +1,667 @@ + + + + + +TQTextStream Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTextStream Class Reference

+ +

The TQTextStream class provides basic functions for reading +and writing text using a TQIODevice. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qtextstream.h> +

Inherited by TQTextIStream and TQTextOStream. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQTextStream class provides basic functions for reading +and writing text using a TQIODevice. +

+ + +

The text stream class has a functional interface that is very +similar to that of the standard C++ iostream class. +

TQt provides several global functions similar to the ones in iostream: +

+
Function Meaning +
bin sets the TQTextStream to read/write binary numbers +
oct sets the TQTextStream to read/write octal numbers +
dec sets the TQTextStream to read/write decimal numbers +
hex sets the TQTextStream to read/write hexadecimal numbers +
endl forces a line break +
flush forces the TQIODevice to flush any buffered data +
ws eats any available whitespace (on input) +
reset resets the TQTextStream to its default mode (see reset()) +
qSetW(int) sets the field width +to the given argument +
qSetFill(int) sets the fill character to the given argument +
qSetPrecision(int) sets the precision to the given argument +
+

Warning: By default TQTextStream will automatically detect whether +integers in the stream are in decimal, octal, hexadecimal or +binary format when reading from the stream. In particular, a +leading '0' signifies octal, i.e. the sequence "0100" will be +interpreted as 64. +

The TQTextStream class reads and writes text; it is not appropriate +for dealing with binary data (but TQDataStream is). +

By default, output of Unicode text (i.e. TQString) is done using +the local 8-bit encoding. This can be changed using the +setEncoding() method. For input, the TQTextStream will auto-detect +standard Unicode "byte order marked" text files; otherwise the +local 8-bit encoding is used. +

The TQIODevice is set in the constructor, or later using +setDevice(). If the end of the input is reached atEnd() returns +TRUE. Data can be read into variables of the appropriate type +using the operator>>() overloads, or read in its entirety into a +single string using read(), or read a line at a time using +readLine(). Whitespace can be skipped over using skipWhiteSpace(). +You can set flags for the stream using flags() or setf(). The +stream also supports width(), precision() and fill(); use reset() +to reset the defaults. +

See also TQDataStream, Input/Output and Networking, and Text Related Classes. + +


Member Type Documentation

+

TQTextStream::Encoding

+ +
    +
  • TQTextStream::Locale +
  • TQTextStream::Latin1 +
  • TQTextStream::Unicode +
  • TQTextStream::UnicodeNetworkOrder +
  • TQTextStream::UnicodeReverse +
  • TQTextStream::RawUnicode +
  • TQTextStream::UnicodeUTF8 +

See setEncoding() for an explanation of the encodings. + +


Member Function Documentation

+

TQTextStream::TQTextStream () +

+Constructs a data stream that has no IO device. + +

TQTextStream::TQTextStream ( TQIODevice * iod ) +

+Constructs a text stream that uses the IO device iod. + +

TQTextStream::TQTextStream ( TQString * str, int filemode ) +

+Constructs a text stream that operates on the Unicode TQString, str, through an internal device. The filemode argument is +passed to the device's open() function; see TQIODevice::mode(). +

If you set an encoding or codec with setEncoding() or setCodec(), +this setting is ignored for text streams that operate on TQString. +

Example: +

+    TQString str;
+    TQTextStream ts( &str, IO_WriteOnly );
+    ts << "pi = " << 3.14; // str == "pi = 3.14"
+    
+ +

Writing data to the text stream will modify the contents of the +string. The string will be expanded when data is written beyond +the end of the string. Note that the string will not be truncated: +

+    TQString str = "pi = 3.14";
+    TQTextStream ts( &str, IO_WriteOnly );
+    ts <<  "2+2 = " << 2+2; // str == "2+2 = 414"
+    
+ +

Note that because TQString is Unicode, you should not use +readRawBytes() or writeRawBytes() on such a stream. + +

TQTextStream::TQTextStream ( TQString & str, int filemode ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This constructor is equivalent to the constructor taking a TQString* +parameter. + +

TQTextStream::TQTextStream ( TQByteArray a, int mode ) +

+Constructs a text stream that operates on the byte array, a, +through an internal TQBuffer device. The mode argument is passed +to the device's open() function; see TQIODevice::mode(). +

Example: +

+    TQByteArray array;
+    TQTextStream ts( array, IO_WriteOnly );
+    ts << "pi = " << 3.14 << '\0'; // array == "pi = 3.14"
+    
+ +

Writing data to the text stream will modify the contents of the +array. The array will be expanded when data is written beyond the +end of the string. +

Same example, using a TQBuffer: +

+    TQByteArray array;
+    TQBuffer buf( array );
+    buf.open( IO_WriteOnly );
+    TQTextStream ts( &buf );
+    ts << "pi = " << 3.14 << '\0'; // array == "pi = 3.14"
+    buf.close();
+    
+ + +

TQTextStream::TQTextStream ( FILE * fh, int mode ) +

+Constructs a text stream that operates on an existing file handle +fh through an internal TQFile device. The mode argument is +passed to the device's open() function; see TQIODevice::mode(). +

Note that if you create a TQTextStream cout or another name that +is also used for another variable of a different type, some +linkers may confuse the two variables, which will often cause +crashes. + +

TQTextStream::~TQTextStream () [virtual] +

+Destroys the text stream. +

The destructor does not affect the current IO device. + +

bool TQTextStream::atEnd () const +

+ +

Returns TRUE if the IO device has reached the end position (end of +the stream or file) or if there is no IO device set; otherwise +returns FALSE. +

See also TQIODevice::atEnd(). + +

Examples: addressbook/centralwidget.cpp and grapher/grapher.cpp. +

TQTextCodec * TQTextStream::codec () +

+Returns the codec actually used for this stream. +

If Unicode is automatically detected in input, a codec with name() "ISO-10646-UCS-2" is returned. +

See also setCodec(). + +

TQIODevice * TQTextStream::device () const +

+ +

Returns the IO device currently set. +

See also setDevice() and unsetDevice(). + +

bool TQTextStream::eof () const +

+

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This function has been renamed to atEnd(). +

See also TQIODevice::atEnd(). + +

Example: chart/chartform_files.cpp. +

int TQTextStream::fill () const +

+ +

Returns the fill character. The default value is ' ' (space). + +

int TQTextStream::fill ( int f ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the fill character to f. Returns the previous fill character. + +

int TQTextStream::flags () const +

+ +

Returns the current stream flags. The default value is 0. +

+
Flag Meaning +
skipws Not currently used; whitespace always skipped +
left Numeric fields are left-aligned +
right +Not currently used (by default, numerics are right-aligned) +
internal Puts any padding spaces between +/- and value +
bin Output and input only in binary +
oct Output and input only in octal +
dec Output and input only in decimal +
hex Output and input only in hexadecimal +
showbase +Annotates numeric outputs with 0b, 0, or 0x if in bin, +oct, or hex format +
showpoint Not currently used +
uppercase Uses 0B and 0X rather than 0b and 0x +
showpos Shows + for positive numeric values +
scientific Uses scientific notation for floating point values +
fixed Uses fixed-point notation for floating point values +
+

Note that unless bin, oct, dec, or hex is set, the +input base is octal if the value starts with 0, hexadecimal if it +starts with 0x, binary if it starts with 0b, and decimal +otherwise. +

See also setf() and unsetf(). + +

int TQTextStream::flags ( int f ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the stream flags to f. Returns the previous stream flags. +

See also setf() and unsetf(). + +

TQTextStream & TQTextStream::operator<< ( TQChar c ) +

+Writes character char to the stream and returns a reference to +the stream. +

The character c is assumed to be Latin1 encoded independent of +the Encoding set for the TQTextStream. + +

TQTextStream & TQTextStream::operator<< ( char c ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes character c to the stream and returns a reference to the +stream. + +

TQTextStream & TQTextStream::operator<< ( signed short i ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes a short integer i to the stream and returns a +reference to the stream. + +

TQTextStream & TQTextStream::operator<< ( unsigned short i ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes an unsigned short integer i to the stream and +returns a reference to the stream. + +

TQTextStream & TQTextStream::operator<< ( signed int i ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes an int i to the stream and returns a reference to the +stream. + +

TQTextStream & TQTextStream::operator<< ( unsigned int i ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes an unsigned int i to the stream and returns a +reference to the stream. + +

TQTextStream & TQTextStream::operator<< ( signed long i ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes a long int i to the stream and returns a reference +to the stream. + +

TQTextStream & TQTextStream::operator<< ( unsigned long i ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes an unsigned long int i to the stream and +returns a reference to the stream. + +

TQTextStream & TQTextStream::operator<< ( float f ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes a float f to the stream and returns a reference to +the stream. + +

TQTextStream & TQTextStream::operator<< ( double f ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes a double f to the stream and returns a reference to +the stream. + +

TQTextStream & TQTextStream::operator<< ( const char * s ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes a string to the stream and returns a reference to the +stream. +

The string s is assumed to be Latin1 encoded independent of the +Encoding set for the TQTextStream. + +

TQTextStream & TQTextStream::operator<< ( const TQString & s ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes s to the stream and returns a reference to the stream. + +

TQTextStream & TQTextStream::operator<< ( const TQCString & s ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes s to the stream and returns a reference to the stream. +

The string s is assumed to be Latin1 encoded independent of the +Encoding set for the TQTextStream. + +

TQTextStream & TQTextStream::operator<< ( void * ptr ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Writes a pointer to the stream and returns a reference to the +stream. +

The ptr is output as an unsigned long hexadecimal integer. + +

TQTextStream & TQTextStream::operator>> ( TQChar & c ) +

+Reads a char c from the stream and returns a reference to the +stream. Note that whitespace is not skipped. + +

TQTextStream & TQTextStream::operator>> ( char & c ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Reads a char c from the stream and returns a reference to the +stream. Note that whitespace is skipped. + +

TQTextStream & TQTextStream::operator>> ( signed short & i ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Reads a signed short integer i from the stream and returns a +reference to the stream. See flags() for an explanation of the +expected input format. + +

TQTextStream & TQTextStream::operator>> ( unsigned short & i ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Reads an unsigned short integer i from the stream and +returns a reference to the stream. See flags() for an explanation +of the expected input format. + +

TQTextStream & TQTextStream::operator>> ( signed int & i ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Reads a signed int i from the stream and returns a reference +to the stream. See flags() for an explanation of the expected +input format. + +

TQTextStream & TQTextStream::operator>> ( unsigned int & i ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Reads an unsigned int i from the stream and returns a +reference to the stream. See flags() for an explanation of the +expected input format. + +

TQTextStream & TQTextStream::operator>> ( signed long & i ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Reads a signed long int i from the stream and returns a +reference to the stream. See flags() for an explanation of the +expected input format. + +

TQTextStream & TQTextStream::operator>> ( unsigned long & i ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Reads an unsigned long int i from the stream and returns a +reference to the stream. See flags() for an explanation of the +expected input format. + +

TQTextStream & TQTextStream::operator>> ( float & f ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Reads a float f from the stream and returns a reference to +the stream. See flags() for an explanation of the expected input +format. + +

TQTextStream & TQTextStream::operator>> ( double & f ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Reads a double f from the stream and returns a reference to +the stream. See flags() for an explanation of the expected input +format. + +

TQTextStream & TQTextStream::operator>> ( char * s ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Reads a "word" from the stream into s and returns a reference +to the stream. +

A word consists of characters for which isspace() returns FALSE. + +

TQTextStream & TQTextStream::operator>> ( TQString & str ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Reads a "word" from the stream into str and returns a reference +to the stream. +

A word consists of characters for which isspace() returns FALSE. + +

TQTextStream & TQTextStream::operator>> ( TQCString & str ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Reads a "word" from the stream into str and returns a reference +to the stream. +

A word consists of characters for which isspace() returns FALSE. + +

int TQTextStream::precision () const +

+ +

Returns the precision. The default value is 6. + +

int TQTextStream::precision ( int p ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the precision to p. Returns the previous precision setting. + +

TQString TQTextStream::read () +

+Reads the entire stream from the current position, and returns a string +containing the text. +

See also TQIODevice::readLine(). + +

Examples: action/application.cpp, application/application.cpp, mdi/application.cpp, qdir/qdir.cpp, and qwerty/qwerty.cpp. +

TQString TQTextStream::readLine () +

+Reads a line from the stream and returns a string containing the +text. +

The returned string does not contain any trailing newline or +carriage return. Note that this is different from +TQIODevice::readLine(), which does not strip the newline at the end +of the line. +

On EOF you will get a TQString that is null. On reading an empty +line the returned TQString is empty but not null. +

See also TQIODevice::readLine(). + +

Examples: addressbook/centralwidget.cpp, chart/element.cpp, and network/clientserver/server/server.cpp. +

TQTextStream & TQTextStream::readRawBytes ( char * s, uint len ) +

+Reads len bytes from the stream into s and returns a +reference to the stream. +

The buffer s must be preallocated. +

Note that no encoding is done by this function. +

Warning: The behavior of this function is undefined unless the +stream's encoding is set to Unicode or Latin1. +

See also TQIODevice::readBlock(). + +

void TQTextStream::reset () +

+Resets the text stream. +

    +
  • All flags are set to 0. +
  • The field width is set to 0. +
  • The fill character is set to ' ' (Space). +
  • The precision is set to 6. +
+

See also setf(), width(), fill(), and precision(). + +

void TQTextStream::setCodec ( TQTextCodec * codec ) +

+Sets the codec for this stream to codec. Will not try to +autodetect Unicode. +

Note that this function should be called before any data is read +to/written from the stream. +

See also setEncoding() and codec(). + +

Example: qwerty/qwerty.cpp. +

void TQTextStream::setDevice ( TQIODevice * iod ) +

+Sets the IO device to iod. +

See also device() and unsetDevice(). + +

void TQTextStream::setEncoding ( Encoding e ) +

+Sets the encoding of this stream to e, where e is one of the +following values: +
+
Encoding Meaning +
Locale +Uses local file format (Latin1 if locale is not set), but +autodetecting Unicode(utf16) on input. +
Unicode +Uses Unicode(utf16) for input and output. Output will be +written in the order most efficient for the current platform +(i.e. the order used internally in TQString). +
UnicodeUTF8 +Using Unicode(utf8) for input and output. If you use it for +input it will autodetect utf16 and use it instead of utf8. +
Latin1 +ISO-8859-1. Will not autodetect utf16. +
UnicodeNetworkOrder +Uses network order Unicode(utf16) for input and output. +Useful when reading Unicode data that does not start with the +byte order marker. +
UnicodeReverse +Uses reverse network order Unicode(utf16) for input and +output. Useful when reading Unicode data that does not start +with the byte order marker or when writing data that should be +read by buggy Windows applications. +
RawUnicode +Like Unicode, but does not write the byte order marker nor +does it auto-detect the byte order. Useful only when writing to +non-persistent storage used by a single process. +
+

Locale and all Unicode encodings, except RawUnicode, will look +at the first two bytes in an input stream to determine the byte +order. The initial byte order marker will be stripped off before +data is read. +

Note that this function should be called before any data is read to +or written from the stream. +

See also setCodec(). + +

Examples: addressbook/centralwidget.cpp, network/httpd/httpd.cpp, and qwerty/qwerty.cpp. +

int TQTextStream::setf ( int bits ) +

+ +

Sets the stream flag bits bits. Returns the previous stream +flags. +

Equivalent to flags( flags() | bits ). +

See also unsetf(). + +

int TQTextStream::setf ( int bits, int mask ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the stream flag bits bits with a bit mask mask. Returns +the previous stream flags. +

Equivalent to flags( (flags() & ~mask) | (bits & mask) ). +

See also unsetf(). + +

void TQTextStream::skipWhiteSpace () +

+Positions the read pointer at the first non-whitespace character. + +

void TQTextStream::unsetDevice () +

+Unsets the IO device. Equivalent to setDevice( 0 ). +

See also device() and setDevice(). + +

int TQTextStream::unsetf ( int bits ) +

+ +

Clears the stream flag bits bits. Returns the previous stream +flags. +

Equivalent to flags( flags() & ~mask ). +

See also setf(). + +

int TQTextStream::width () const +

+ +

Returns the field width. The default value is 0. + +

int TQTextStream::width ( int w ) +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the field width to w. Returns the previous field width. + +

TQTextStream & TQTextStream::writeRawBytes ( const char * s, uint len ) +

+Writes the len bytes from s to the stream and returns a +reference to the stream. +

Note that no encoding is done by this function. +

See also TQIODevice::writeBlock(). + + +


+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/qtextview-h.html b/doc/html/qtextview-h.html new file mode 100644 index 00000000..f9589ef4 --- /dev/null +++ b/doc/html/qtextview-h.html @@ -0,0 +1,119 @@ + + + + + +qtextview.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtextview.h

+ +

This is the verbatim text of the qtextview.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtextview.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of the TQTextView class
+**
+** Created : 990101
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQTEXTVIEW_H
+#define TQTEXTVIEW_H
+
+#ifndef QT_H
+#include "qtextedit.h"
+#endif // QT_H
+
+#ifndef QT_NO_TEXTVIEW
+
+class Q_EXPORT TQTextView : public TQTextEdit
+{
+    Q_OBJECT
+    Q_OVERRIDE( int undoDepth DESIGNABLE false SCRIPTABLE false )
+    Q_OVERRIDE( bool overwriteMode DESIGNABLE false SCRIPTABLE false )
+    Q_OVERRIDE( bool modified SCRIPTABLE false)
+    Q_OVERRIDE( bool readOnly DESIGNABLE false SCRIPTABLE false )
+    Q_OVERRIDE( bool undoRedoEnabled DESIGNABLE false SCRIPTABLE false )
+
+public:
+    TQTextView( const TQString& text, const TQString& context = TQString::null,
+	       TQWidget* parent=0, const char* name=0);
+    TQTextView( TQWidget* parent=0, const char* name=0 );
+
+    virtual ~TQTextView();
+
+private:
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    TQTextView( const TQTextView & );
+    TQTextView &operator=( const TQTextView & );
+#endif
+};
+
+#endif //QT_NO_TEXTVIEW
+#endif //TQTEXTVIEW_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextview-members.html b/doc/html/qtextview-members.html new file mode 100644 index 00000000..27ae6ad5 --- /dev/null +++ b/doc/html/qtextview-members.html @@ -0,0 +1,543 @@ + + + + + +TQTextView Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTextView

+ +

This is the complete list of member functions for +TQTextView, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtextview.html b/doc/html/qtextview.html new file mode 100644 index 00000000..3895fbe9 --- /dev/null +++ b/doc/html/qtextview.html @@ -0,0 +1,81 @@ + + + + + +TQTextView Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTextView Class Reference
[obsolete]

+ +

The TQTextView class provides a rich-text viewer. +More... +

#include <qtextview.h> +

Inherits TQTextEdit. +

List of all member functions. +

Properties

+
    +
  • bool modified - whether the text view's contents have been modified  (read only)
  • +
  • bool overwriteMode - whether new text overwrites or pushes aside existing text  (read only)
  • +
  • bool readOnly - whether the text view's contents are read only  (read only)
  • +
  • int undoDepth - the number of undoable steps  (read only)
  • +
  • bool undoRedoEnabled - whether undo and redo are enabled  (read only)
  • +
+

Detailed Description

+ +The TQTextView class provides a rich-text viewer. +

This class is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This class wraps a read-only TQTextEdit. +Use a TQTextEdit instead, and call setReadOnly(TRUE) +to disable editing. + +


Property Documentation

+

bool modified

+

This property holds whether the text view's contents have been modified. +

+

bool overwriteMode

+

This property holds whether new text overwrites or pushes aside existing text. +

+

bool readOnly

+

This property holds whether the text view's contents are read only. +

+

int undoDepth

+

This property holds the number of undoable steps. +

+

bool undoRedoEnabled

+

This property holds whether undo and redo are enabled. +

+

+


+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/qthread-h.html b/doc/html/qthread-h.html new file mode 100644 index 00000000..b67a9fff --- /dev/null +++ b/doc/html/qthread-h.html @@ -0,0 +1,175 @@ + + + + + +qthread.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qthread.h

+ +

This is the verbatim text of the qthread.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qthread.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQThread class
+**
+** Created : 931107
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQTHREAD_H
+#define TQTHREAD_H
+
+#if defined(QT_THREAD_SUPPORT)
+
+#ifndef QT_H
+#include "qwindowdefs.h"
+#ifndef QT_NO_COMPAT
+#include "qmutex.h"
+#include "qsemaphore.h"
+#include "qwaitcondition.h"
+#endif // QT_NO_COMPAT
+#endif // QT_H
+
+#include <limits.h>
+
+class TQThreadInstance;
+
+class Q_EXPORT TQThread : public TQt
+{
+public:
+    static TQt::HANDLE currentThread();
+
+#ifndef QT_NO_COMPAT
+    static void postEvent( TQObject *,TQEvent * );
+#endif
+
+    static void initialize();
+    static void cleanup();
+
+    static void exit();
+
+#ifdef Q_QDOC
+    TQThread( unsigned int stackSize = 0 );
+#else
+    TQThread( unsigned int stackSize );
+    TQThread();
+#endif
+
+    virtual ~TQThread();
+
+    // default argument causes thread to block indefinately
+    bool wait( unsigned long time = ULONG_MAX );
+
+    enum Priority {
+	IdlePriority,
+
+	LowestPriority,
+	LowPriority,
+	NormalPriority,
+	HighPriority,
+	HighestPriority,
+
+	TimeCriticalPriority,
+
+	InheritPriority
+    };
+
+#ifdef Q_QDOC
+    void start( Priority = InheritPriority );
+#else
+    void start( Priority );
+    void start();
+#endif
+
+    void terminate();
+
+    bool finished() const;
+    bool running() const;
+
+protected:
+    virtual void run() = 0;
+
+    static void sleep( unsigned long );
+    static void msleep( unsigned long );
+    static void usleep( unsigned long );
+
+private:
+    TQThreadInstance * d;
+    friend class TQThreadInstance;
+
+#if defined(Q_DISABLE_COPY)
+    TQThread( const TQThread & );
+    TQThread &operator=( const TQThread & );
+#endif // Q_DISABLE_COPY
+};
+
+#endif // QT_THREAD_SUPPORT
+
+#endif // TQTHREAD_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qthread-members.html b/doc/html/qthread-members.html new file mode 100644 index 00000000..37a80561 --- /dev/null +++ b/doc/html/qthread-members.html @@ -0,0 +1,60 @@ + + + + + +TQThread Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQThread

+ +

This is the complete list of member functions for +TQThread, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qthread.html b/doc/html/qthread.html new file mode 100644 index 00000000..ac75c3ad --- /dev/null +++ b/doc/html/qthread.html @@ -0,0 +1,252 @@ + + + + + +TQThread Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQThread Class Reference

+ +

The TQThread class provides platform-independent threads. +More... +

All the functions in this class are thread-safe when TQt is built with thread support.

+

#include <qthread.h> +

Inherits TQt. +

List of all member functions. +

Public Members

+
    +
  • TQThread ( unsigned int stackSize = 0 )
  • +
  • virtual ~TQThread ()
  • +
  • bool wait ( unsigned long time = ULONG_MAX )
  • +
  • enum Priority { IdlePriority, LowestPriority, LowPriority, NormalPriority, HighPriority, HighestPriority, TimeCriticalPriority, InheritPriority }
  • +
  • void start ( Priority priority = InheritPriority )
  • +
  • void terminate ()
  • +
  • bool finished () const
  • +
  • bool running () const
  • +
+

Static Public Members

+
    +
  • TQt::HANDLE currentThread ()
  • +
  • void postEvent ( TQObject * receiver, TQEvent * event )  (obsolete)
  • +
  • void exit ()
  • +
+

Protected Members

+
    +
  • virtual void run () = 0
  • +
+

Static Protected Members

+
    +
  • void sleep ( unsigned long secs )
  • +
  • void msleep ( unsigned long msecs )
  • +
  • void usleep ( unsigned long usecs )
  • +
+

Detailed Description

+ + + +The TQThread class provides platform-independent threads. +

+ +

A TQThread represents a separate thread of control within the +program; it shares data with all the other threads within the +process but executes independently in the way that a separate +program does on a multitasking operating system. Instead of +starting in main(), TQThreads begin executing in run(). You inherit +run() to include your code. For example: +

+    class MyThread : public TQThread {
+
+    public:
+
+        virtual void run();
+
+    };
+
+    void MyThread::run()
+    {
+        for( int count = 0; count < 20; count++ ) {
+            sleep( 1 );
+            qDebug( "Ping!" );
+        }
+    }
+
+    int main()
+    {
+        MyThread a;
+        MyThread b;
+        a.start();
+        b.start();
+        a.wait();
+        b.wait();
+    }
+    
+ +

This will start two threads, each of which writes Ping! 20 times +to the screen and exits. The wait() calls at the end of main() are +necessary because exiting main() ends the program, unceremoniously +killing all other threads. Each MyThread stops executing when it +reaches the end of MyThread::run(), just as an application does +when it leaves main(). +

See also Thread Support in TQt, Environment Classes, and Threading. + +


Member Type Documentation

+

TQThread::Priority

+ +

This enum type indicates how the operating system should schedule +newly created threads. +

    +
  • TQThread::IdlePriority - scheduled only when no other threads are +running. +
  • TQThread::LowestPriority - scheduled less often than LowPriority. +
  • TQThread::LowPriority - scheduled less often than NormalPriority. +
  • TQThread::NormalPriority - the default priority of the operating +system. +
  • TQThread::HighPriority - scheduled more often than NormalPriority. +
  • TQThread::HighestPriority - scheduled more often then HighPriority. +
  • TQThread::TimeCriticalPriority - scheduled as often as possible. +
  • TQThread::InheritPriority - use the same priority as the creating +thread. This is the default. +
+

Member Function Documentation

+

TQThread::TQThread ( unsigned int stackSize = 0 ) +

+Constructs a new thread. The thread does not begin executing until +start() is called. +

If stackSize is greater than zero, the maximum stack size is +set to stackSize bytes, otherwise the maximum stack size is +automatically determined by the operating system. +

Warning: Most operating systems place minimum and maximum limits +on thread stack sizes. The thread will fail to start if the stack +size is outside these limits. + +

TQThread::~TQThread () [virtual] +

+TQThread destructor. +

Note that deleting a TQThread object will not stop the execution of +the thread it represents. Deleting a running TQThread (i.e. +finished() returns FALSE) will probably result in a program crash. +You can wait() on a thread to make sure that it has finished. + +

TQt::HANDLE TQThread::currentThread () [static] +

+This returns the thread handle of the currently executing thread. +

Warning: The handle returned by this function is used for internal +purposes and should not be used in any application code. On +Windows, the returned value is a pseudo handle for the current +thread, and it cannot be used for numerical comparison. + +

void TQThread::exit () [static] +

+Ends the execution of the calling thread and wakes up any threads +waiting for its termination. + +

bool TQThread::finished () const +

+Returns TRUE if the thread is finished; otherwise returns FALSE. + +

void TQThread::msleep ( unsigned long msecs ) [static protected] +

+System independent sleep. This causes the current thread to sleep +for msecs milliseconds + +

void TQThread::postEvent ( TQObject * receiver, TQEvent * event ) [static] +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Use TQApplication::postEvent() instead. + +

void TQThread::run () [pure virtual protected] +

+ +

This method is pure virtual, and must be implemented in derived +classes in order to do useful work. Returning from this method +will end the execution of the thread. +

See also wait(). + +

bool TQThread::running () const +

+Returns TRUE if the thread is running; otherwise returns FALSE. + +

void TQThread::sleep ( unsigned long secs ) [static protected] +

+System independent sleep. This causes the current thread to sleep +for secs seconds. + +

void TQThread::start ( Priority priority = InheritPriority ) +

+Begins execution of the thread by calling run(), which should be +reimplemented in a TQThread subclass to contain your code. The +operating system will schedule the thread according to the priority argument. +

If you try to start a thread that is already running, this +function will wait until the the thread has finished and then +restart the thread. +

See also Priority. + +

void TQThread::terminate () +

+This function terminates the execution of the thread. The thread +may or may not be terminated immediately, depending on the +operating system's scheduling policies. Use TQThread::wait() +after terminate() for synchronous termination. +

When the thread is terminated, all threads waiting for the +the thread to finish will be woken up. +

Warning: This function is dangerous, and its use is discouraged. +The thread can be terminated at any point in its code path. Threads +can be terminated while modifying data. There is no chance for +the thread to cleanup after itself, unlock any held mutexes, etc. +In short, use this function only if absolutely necessary. + +

void TQThread::usleep ( unsigned long usecs ) [static protected] +

+System independent sleep. This causes the current thread to sleep +for usecs microseconds + +

bool TQThread::wait ( unsigned long time = ULONG_MAX ) +

+A thread calling this function will block until either of these +conditions is met: +

    +
  • The thread associated with this TQThread object has finished +execution (i.e. when it returns from run()). This function +will return TRUE if the thread has finished. It also returns +TRUE if the thread has not been started yet. +
  • time milliseconds has elapsed. If time is ULONG_MAX (the +default), then the wait will never timeout (the thread must +return from run()). This function will return FALSE if the +wait timed out. +
+

This provides similar functionality to the POSIX pthread_join() function. + + +


+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/qthreadstorage-h.html b/doc/html/qthreadstorage-h.html new file mode 100644 index 00000000..2ebd20cd --- /dev/null +++ b/doc/html/qthreadstorage-h.html @@ -0,0 +1,140 @@ + + + + + +qthreadstorage.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qthreadstorage.h

+ +

This is the verbatim text of the qthreadstorage.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qthreadstorage.h   3.3.8   edited Jan 11 14:46 $
+**
+** ...
+**
+** Copyright (C) 2005-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 retquirements 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 TQTHREADSTORAGE_H
+#define TQTHREADSTORAGE_H
+
+#ifdef QT_THREAD_SUPPORT
+
+#ifndef QT_H
+#include "qglobal.h"
+#endif // QT_H
+
+class Q_EXPORT TQThreadStorageData
+{
+public:
+    TQThreadStorageData( void (*func)(void *) );
+    ~TQThreadStorageData();
+
+    void** get() const;
+    void** set( void* p );
+
+    static void finish( void** );
+    int id;
+};
+
+
+template <class T>
+class TQThreadStorage
+{
+private:
+    TQThreadStorageData d;
+
+#if defined(Q_DISABLE_COPY)
+    // disable copy constructor and operator=
+    TQThreadStorage( const TQThreadStorage & );
+    TQThreadStorage &operator=( const TQThreadStorage & );
+#endif // Q_DISABLE_COPY
+
+    static void deleteData( void *x ) { delete (T)x; }
+
+public:
+    inline TQThreadStorage() : d( deleteData ) {  }
+    inline ~TQThreadStorage() { }
+
+    inline bool hasLocalData() const
+    { return d.get() != 0; }
+
+    inline T& localData()
+    { void **v = d.get(); if ( !v ) v = d.set( 0 ); return *(T*)v; }
+
+    inline T localData() const
+    { void **v = d.get(); return ( v ? *(T*)v : 0 ); }
+
+    inline void setLocalData( T t )
+    { (void) d.set( t ); }
+};
+
+#endif // QT_THREAD_SUPPORT
+
+#endif // TQTHREADSTORAGE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qthreadstorage-members.html b/doc/html/qthreadstorage-members.html new file mode 100644 index 00000000..893e45df --- /dev/null +++ b/doc/html/qthreadstorage-members.html @@ -0,0 +1,51 @@ + + + + + +TQThreadStorage Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQThreadStorage

+ +

This is the complete list of member functions for +TQThreadStorage, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qthreadstorage.html b/doc/html/qthreadstorage.html new file mode 100644 index 00000000..8a1b4cce --- /dev/null +++ b/doc/html/qthreadstorage.html @@ -0,0 +1,189 @@ + + + + + +TQThreadStorage Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQThreadStorage Class Reference

+ +

The TQThreadStorage class provides per-thread data storage. +More... +

All the functions in this class are thread-safe when TQt is built with thread support.

+

#include <qthreadstorage.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQThreadStorage class provides per-thread data storage. +

+ + +

TQThreadStorage is a template class that provides per-thread data +storage. +

Note that due to compiler limitations, TQThreadStorage can only store pointers. +

The setLocalData() function stores a single thread-specific value +for the calling thread. The data can be accessed later using the +localData() functions. TQThreadStorage takes ownership of the +data (which must be created on the heap with new) and deletes +it when the thread exits (either normally or via termination). +

The hasLocalData() function allows the programmer to determine if +data has previously been set using the setLocalData() function. +This is useful for lazy initializiation. +

For example, the following code uses TQThreadStorage to store a +single cache for each thread that calls the cacheObject() and +removeFromCache() functions. The cache is automatically +deleted when the calling thread exits (either normally or via +termination). +

+    TQThreadStorage<TQCache<SomeClass> *> caches;
+
+    void cacheObject( const TQString &key, SomeClass *object )
+    {
+        if ( ! caches.hasLocalData() )
+            caches.setLocalData( new TQCache<SomeClass> );
+
+        caches.localData()->insert( key, object );
+    }
+
+    void removeFromCache( const TQString &key )
+    {
+        if ( ! caches.hasLocalData() )
+            return; // nothing to do
+
+        caches.localData()->remove( key );
+    }
+    
+ +

Caveats +

+

    +

  • As noted above, TQThreadStorage can only store pointers due to +compiler limitations. Support for value-based objects will be +added when the majority of compilers are able to support partial +template specialization. +

  • The destructor does not +delete per-thread data. TQThreadStorage only deletes per-thread +data when the thread exits or when setLocalData() is called +multiple times. +

  • TQThreadStorage can only be used with threads started with +TQThread. It cannot be used with threads started with +platform-specific APIs. +

  • As a corollary to the above, platform-specific APIs cannot be +used to exit or terminate a TQThread using TQThreadStorage. Doing so +will cause all per-thread data to be leaked. See TQThread::exit() +and TQThread::terminate(). +

  • TQThreadStorage can be used to store data for the main() +thread after TQApplication has been constructed. TQThreadStorage +deletes all data set for the main() thread when TQApplication is +destroyed, regardless of whether or not the main() thread has +actually finished. +

  • The implementation of TQThreadStorage limits the total number of +TQThreadStorage objects to 256. An unlimited number of threads +can store per-thread data in each TQThreadStorage object. +

+

See also Environment Classes and Threading. + +


Member Function Documentation

+

TQThreadStorage::TQThreadStorage () +

+ +

Constructs a new per-thread data storage object. + +

TQThreadStorage::~TQThreadStorage () +

+ +

Destroys the per-thread data storage object. +

Note: The per-thread data stored is not deleted. Any data left +in TQThreadStorage is leaked. Make sure that all threads using +TQThreadStorage have exited before deleting the TQThreadStorage. +

See also hasLocalData(). + +

bool TQThreadStorage::hasLocalData () const +

+ +

Returns TRUE if the calling thread has non-zero data available; +otherwise returns FALSE. +

See also localData(). + +

T & TQThreadStorage::localData () +

+ +

Returns a reference to the data that was set by the calling +thread. +

Note: TQThreadStorage can only store pointers. This function +returns a reference to the pointer that was set by the calling +thread. The value of this reference is 0 if no data was set by +the calling thread, +

See also hasLocalData(). + +

T TQThreadStorage::localData () const +

+ +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a copy of the data that was set by the calling thread. +

Note: TQThreadStorage can only store pointers. This function +returns a pointer to the data that was set by the calling thread. +If no data was set by the calling thread, this function returns 0. +

See also hasLocalData(). + +

void TQThreadStorage::setLocalData ( T data ) +

+ +

Sets the local data for the calling thread to data. It can be +accessed later using the localData() functions. +

If data is 0, this function deletes the previous data (if +any) and returns immediately. +

If data is non-zero, TQThreadStorage takes ownership of the data and deletes it automatically either when the thread exits +(either normally or via termination) or when setLocalData() is +called again. +

Note: TQThreadStorage can only store pointers. The data +argument must be either a pointer to an object created on the heap +(i.e. using new) or 0. You should not delete data +yourself; TQThreadStorage takes ownership and will delete the data itself. +

See also localData() and hasLocalData(). + + +


+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/qtime-members.html b/doc/html/qtime-members.html new file mode 100644 index 00000000..e6318038 --- /dev/null +++ b/doc/html/qtime-members.html @@ -0,0 +1,70 @@ + + + + + +TQTime Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTime

+ +

This is the complete list of member functions for +TQTime, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtime.html b/doc/html/qtime.html new file mode 100644 index 00000000..856ba1da --- /dev/null +++ b/doc/html/qtime.html @@ -0,0 +1,393 @@ + + + + + +TQTime Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTime Class Reference

+ +

The TQTime class provides clock time functions. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qdatetime.h> +

List of all member functions. +

Public Members

+ +

Static Public Members

+
    +
  • TQTime currentTime ()
  • +
  • TQTime currentTime ( TQt::TimeSpec ts )
  • +
  • TQTime fromString ( const TQString & s, TQt::DateFormat f = TQt::TextDate )
  • +
  • bool isValid ( int h, int m, int s, int ms = 0 )
  • +
+

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQTime & t )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQTime & t )
  • +
+

Detailed Description

+ + + +

The TQTime class provides clock time functions. +

+ +

A TQTime object contains a clock time, i.e. the number of hours, +minutes, seconds, and milliseconds since midnight. It can read the +current time from the system clock and measure a span of elapsed +time. It provides functions for comparing times and for +manipulating a time by adding a number of (milli)seconds. +

TQTime uses the 24-hour clock format; it has no concept of AM/PM. +It operates in local time; it knows nothing about time zones or +daylight savings time. +

A TQTime object is typically created either by giving the number of +hours, minutes, seconds, and milliseconds explicitly, or by using +the static function currentTime(), which creates a TQTime object +that contains the system's clock time. Note that the accuracy +depends on the accuracy of the underlying operating system; not +all systems provide 1-millisecond accuracy. +

The hour(), minute(), second(), and msec() functions provide +access to the number of hours, minutes, seconds, and milliseconds +of the time. The same information is provided in textual format by +the toString() function. +

TQTime provides a full set of operators to compare two TQTime +objects. One time is considered smaller than another if it is +earlier than the other. +

The time a given number of seconds or milliseconds later than a +given time can be found using the addSecs() or addMSecs() +functions. Correspondingly, the number of (milli)seconds between +two times can be found using the secsTo() or msecsTo() functions. +

TQTime can be used to measure a span of elapsed time using the +start(), restart(), and elapsed() functions. +

See also TQDate, TQDateTime, and Time and Date. + +


Member Function Documentation

+

TQTime::TQTime () +

+ +

Constructs the time 0 hours, minutes, seconds and milliseconds, +i.e. 00:00:00.000 (midnight). This is a valid time. +

See also isValid(). + +

TQTime::TQTime ( int h, int m, int s = 0, int ms = 0 ) +

+Constructs a time with hour h, minute m, seconds s and +milliseconds ms. +

h must be in the range 0..23, m and s must be in the +range 0..59, and ms must be in the range 0..999. +

See also isValid(). + +

TQTime TQTime::addMSecs ( int ms ) const +

+Returns a TQTime object containing a time ms milliseconds later +than the time of this object (or earlier if ms is negative). +

Note that the time will wrap if it passes midnight. See addSecs() +for an example. +

See also addSecs() and msecsTo(). + +

TQTime TQTime::addSecs ( int nsecs ) const +

+Returns a TQTime object containing a time nsecs seconds later +than the time of this object (or earlier if nsecs is negative). +

Note that the time will wrap if it passes midnight. +

Example: +

+    TQTime n( 14, 0, 0 );                // n == 14:00:00
+    TQTime t;
+    t = n.addSecs( 70 );                // t == 14:01:10
+    t = n.addSecs( -70 );               // t == 13:58:50
+    t = n.addSecs( 10*60*60 + 5 );      // t == 00:00:05
+    t = n.addSecs( -15*60*60 );         // t == 23:00:00
+    
+ +

See also addMSecs(), secsTo(), and TQDateTime::addSecs(). + +

TQTime TQTime::currentTime ( TQt::TimeSpec ts ) [static] +

+Returns the current time as reported by the system clock, for the +TimeSpec ts. The default TimeSpec is LocalTime. +

Note that the accuracy depends on the accuracy of the underlying +operating system; not all systems provide 1-millisecond accuracy. +

See also TQt::TimeSpec. + +

Examples: aclock/aclock.cpp, dclock/dclock.cpp, t12/cannon.cpp, and tictac/tictac.cpp. +

TQTime TQTime::currentTime () [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the current time as reported by the system clock. +

Note that the accuracy depends on the accuracy of the underlying +operating system; not all systems provide 1-millisecond accuracy. + +

int TQTime::elapsed () const +

+Returns the number of milliseconds that have elapsed since the +last time start() or restart() was called. +

Note that the counter wraps to zero 24 hours after the last call +to start() or restart. +

Note that the accuracy depends on the accuracy of the underlying +operating system; not all systems provide 1-millisecond accuracy. +

Warning: If the system's clock setting has been changed since the +last time start() or restart() was called, the result is +undefined. This can happen when daylight savings time is turned on +or off. +

See also start() and restart(). + +

TQTime TQTime::fromString ( const TQString & s, TQt::DateFormat f = TQt::TextDate ) [static] +

+Returns the representation s as a TQTime using the format f, +or an invalid time if this is not possible. +

Warning: Note that TQt::LocalDate cannot be used here. + +

int TQTime::hour () const +

+Returns the hour part (0..23) of the time. + +

Examples: aclock/aclock.cpp and tictac/tictac.cpp. +

bool TQTime::isNull () const +

+ +

Returns TRUE if the time is equal to 00:00:00.000; otherwise +returns FALSE. A null time is valid. +

See also isValid(). + +

bool TQTime::isValid () const +

+Returns TRUE if the time is valid; otherwise returns FALSE. The +time 23:30:55.746 is valid, whereas 24:12:30 is invalid. +

See also isNull(). + +

bool TQTime::isValid ( int h, int m, int s, int ms = 0 ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns TRUE if the specified time is valid; otherwise returns +FALSE. +

The time is valid if h is in the range 0..23, m and s are +in the range 0..59, and ms is in the range 0..999. +

Example: +

+    TQTime::isValid(21, 10, 30); // returns TRUE
+    TQTime::isValid(22, 5,  62); // returns FALSE
+    
+ + +

int TQTime::minute () const +

+Returns the minute part (0..59) of the time. + +

Examples: aclock/aclock.cpp and tictac/tictac.cpp. +

int TQTime::msec () const +

+Returns the millisecond part (0..999) of the time. + +

int TQTime::msecsTo ( const TQTime & t ) const +

+Returns the number of milliseconds from this time to t (which +is negative if t is earlier than this time). +

Because TQTime measures time within a day and there are 86400 +seconds in a day, the result is always between -86400000 and +86400000 msec. +

See also secsTo(). + +

bool TQTime::operator!= ( const TQTime & t ) const +

+ +

Returns TRUE if this time is different from t; otherwise returns FALSE. + +

bool TQTime::operator< ( const TQTime & t ) const +

+ +

Returns TRUE if this time is earlier than t; otherwise returns FALSE. + +

bool TQTime::operator<= ( const TQTime & t ) const +

+ +

Returns TRUE if this time is earlier than or equal to t; +otherwise returns FALSE. + +

bool TQTime::operator== ( const TQTime & t ) const +

+ +

Returns TRUE if this time is equal to t; otherwise returns FALSE. + +

bool TQTime::operator> ( const TQTime & t ) const +

+ +

Returns TRUE if this time is later than t; otherwise returns FALSE. + +

bool TQTime::operator>= ( const TQTime & t ) const +

+ +

Returns TRUE if this time is later than or equal to t; +otherwise returns FALSE. + +

int TQTime::restart () +

+Sets this time to the current time and returns the number of +milliseconds that have elapsed since the last time start() or +restart() was called. +

This function is guaranteed to be atomic and is thus very handy +for repeated measurements. Call start() to start the first +measurement and then restart() for each later measurement. +

Note that the counter wraps to zero 24 hours after the last call +to start() or restart(). +

Warning: If the system's clock setting has been changed since the +last time start() or restart() was called, the result is +undefined. This can happen when daylight savings time is turned on +or off. +

See also start(), elapsed(), and currentTime(). + +

int TQTime::second () const +

+Returns the second part (0..59) of the time. + +

Example: tictac/tictac.cpp. +

int TQTime::secsTo ( const TQTime & t ) const +

+Returns the number of seconds from this time to t (which is +negative if t is earlier than this time). +

Because TQTime measures time within a day and there are 86400 +seconds in a day, the result is always between -86400 and 86400. +

See also addSecs() and TQDateTime::secsTo(). + +

Example: t12/cannon.cpp. +

bool TQTime::setHMS ( int h, int m, int s, int ms = 0 ) +

+Sets the time to hour h, minute m, seconds s and +milliseconds ms. +

h must be in the range 0..23, m and s must be in the +range 0..59, and ms must be in the range 0..999. Returns TRUE +if the set time is valid; otherwise returns FALSE. +

See also isValid(). + +

void TQTime::start () +

+Sets this time to the current time. This is practical for timing: +

+    TQTime t;
+    t.start();
+    some_lengthy_task();
+    qDebug( "Time elapsed: %d ms", t.elapsed() );
+    
+ +

See also restart(), elapsed(), and currentTime(). + +

TQString TQTime::toString ( const TQString & format ) const +

+Returns the time as a string. The format parameter determines +the format of the result string. +

These expressions may be used: +

+
Expression Output +
h +the hour without a leading zero (0..23 or 1..12 if AM/PM display) +
hh +the hour with a leading zero (00..23 or 01..12 if AM/PM display) +
m the minute without a leading zero (0..59) +
mm the minute with a leading zero (00..59) +
s the second whithout a leading zero (0..59) +
ss the second whith a leading zero (00..59) +
z the milliseconds without leading zeroes (0..999) +
zzz the milliseconds with leading zeroes (000..999) +
AP +use AM/PM display. AP will be replaced by either "AM" or "PM". +
ap +use am/pm display. ap will be replaced by either "am" or "pm". +
+

All other input characters will be ignored. +

Example format strings (assuming that the TQTime is 14:13:09.042) +

+
Format Result +
hh:mm:ss.zzz 14:13:09.042 +
h:m:s ap 2:13:9 pm +
+

If the time is an invalid time, then TQString::null will be returned. +

See also TQDate::toString() and TQDateTime::toString(). + +

TQString TQTime::toString ( TQt::DateFormat f = TQt::TextDate ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the time as a string. Milliseconds are not included. The +f parameter determines the format of the string. +

If f is TQt::TextDate, the string format is HH:MM:SS; e.g. 1 +second before midnight would be "23:59:59". +

If f is TQt::ISODate, the string format corresponds to the +ISO 8601 extended specification for representations of dates, +which is also HH:MM:SS. +

If f is TQt::LocalDate, the string format depends on the locale +settings of the system. +

If the time is an invalid time, then TQString::null will be returned. + +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQTime & t ) +

+ +

Writes time t to the stream s. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQTime & t ) +

+ +

Reads a time from the stream s into t. +

See also Format of the TQDataStream operators. + + +


+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/qtimeedit-members.html b/doc/html/qtimeedit-members.html new file mode 100644 index 00000000..c1355f97 --- /dev/null +++ b/doc/html/qtimeedit-members.html @@ -0,0 +1,356 @@ + + + + + +TQTimeEdit Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTimeEdit

+ +

This is the complete list of member functions for +TQTimeEdit, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtimeedit.html b/doc/html/qtimeedit.html new file mode 100644 index 00000000..169c9c47 --- /dev/null +++ b/doc/html/qtimeedit.html @@ -0,0 +1,256 @@ + + + + + +TQTimeEdit Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTimeEdit Class Reference

+ +

The TQTimeEdit class provides a time editor. +More... +

#include <qdatetimeedit.h> +

Inherits TQDateTimeEditBase. +

List of all member functions. +

Public Members

+ +

Public Slots

+
    +
  • virtual void setTime ( const TQTime & time )
  • +
+

Signals

+ +

Properties

+
    +
  • bool autoAdvance - whether the editor automatically advances to the next section
  • +
  • Display display - the sections that are displayed in the time edit
  • +
  • TQTime maxValue - the maximum time value
  • +
  • TQTime minValue - the minimum time value
  • +
  • TQTime time - the editor's time value
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQTimeEdit class provides a time editor. +

+ + +

TQTimeEdit allows the user to edit times by using the keyboard or +the arrow keys to increase/decrease time values. The arrow keys +can be used to move from section to section within the TQTimeEdit +box. The user can automatically be moved to the next section once +they complete a section using setAutoAdvance(). Times appear in +hour, minute, second order. It is recommended that the TQTimeEdit +is initialised with a time, e.g. +

+    TQTime timeNow = TQTime::currentTime();
+    TQTimeEdit *timeEdit = new TQTimeEdit( timeNow, this );
+    timeEdit->setRange( timeNow, timeNow.addSecs( 60 * 60 ) );
+    
+ +Here we've created a TQTimeEdit widget set to the current time. +We've also set the minimum value to the current time and the +maximum time to one hour from now. +

The maximum and minimum values for a time value in the time editor +default to the maximum and minimum values for a TQTime. You can +change this by calling setMinValue(), setMaxValue() or setRange(). +

Terminology: A TQTimeWidget consists of three sections, one each +for the hour, minute and second. You can change the separator +character using setSeparator(), by default the separator is read +from the system's settings. +

Date Time Widgets
+

See also TQTime, TQDateEdit, TQDateTimeEdit, Advanced Widgets, and Time and Date. + +


Member Type Documentation

+

TQTimeEdit::Display

+ +

This enum defines the sections that comprise a time +

    +
  • TQTimeEdit::Hours - The hours section +
  • TQTimeEdit::Minutes - The minutes section +
  • TQTimeEdit::Seconds - The seconds section +
  • TQTimeEdit::AMPM - The AM/PM section +

The values can be or'ed together to show any combination. + +


Member Function Documentation

+

TQTimeEdit::TQTimeEdit ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs an empty time edit with parent parent and called name. + +

TQTimeEdit::TQTimeEdit ( const TQTime & time, TQWidget * parent = 0, const char * name = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Constructs a time edit with the initial time value, time, +parent parent and called name. + +

TQTimeEdit::~TQTimeEdit () +

+Destroys the object and frees any allocated resources. + +

bool TQTimeEdit::autoAdvance () const +

Returns TRUE if the editor automatically advances to the next section; otherwise returns FALSE. +See the "autoAdvance" property for details. +

uint TQTimeEdit::display () const +

Returns the sections that are displayed in the time edit. +See the "display" property for details. +

TQTime TQTimeEdit::maxValue () const +

Returns the maximum time value. +See the "maxValue" property for details. +

TQTime TQTimeEdit::minValue () const +

Returns the minimum time value. +See the "minValue" property for details. +

TQString TQTimeEdit::sectionFormattedText ( int sec ) [virtual protected] +

+Returns the formatted number for section sec. This will +correspond to either the hour, minute or second section, depending +on sec. + +

TQString TQTimeEdit::separator () const +

+Returns the editor's separator. + +

void TQTimeEdit::setAutoAdvance ( bool advance ) [virtual] +

Sets whether the editor automatically advances to the next section to advance. +See the "autoAdvance" property for details. +

void TQTimeEdit::setDisplay ( uint disp ) +

Sets the sections that are displayed in the time edit to disp. +See the "display" property for details. +

void TQTimeEdit::setHour ( int h ) [virtual protected] +

+Sets the hour to h, which must be a valid hour, i.e. in the +range 0..24. + +

void TQTimeEdit::setMaxValue ( const TQTime & d ) [virtual] +

Sets the maximum time value to d. +See the "maxValue" property for details. +

void TQTimeEdit::setMinValue ( const TQTime & d ) [virtual] +

Sets the minimum time value to d. +See the "minValue" property for details. +

void TQTimeEdit::setMinute ( int m ) [virtual protected] +

+Sets the minute to m, which must be a valid minute, i.e. in the +range 0..59. + +

void TQTimeEdit::setRange ( const TQTime & min, const TQTime & max ) [virtual] +

+Sets the valid input range for the editor to be from min to max inclusive. If min is invalid no minimum time is set. +Similarly, if max is invalid no maximum time is set. + +

void TQTimeEdit::setSecond ( int s ) [virtual protected] +

+Sets the second to s, which must be a valid second, i.e. in the +range 0..59. + +

void TQTimeEdit::setSeparator ( const TQString & s ) [virtual] +

+Sets the separator to s. Note that currently only the first +character of s is used. + +

void TQTimeEdit::setTime ( const TQTime & time ) [virtual slot] +

Sets the editor's time value to time. +See the "time" property for details. +

TQTime TQTimeEdit::time () const +

Returns the editor's time value. +See the "time" property for details. +

void TQTimeEdit::valueChanged ( const TQTime & time ) [signal] +

+ +

This signal is emitted whenever the editor's value changes. The time parameter is the new value. + +


Property Documentation

+

bool autoAdvance

+

This property holds whether the editor automatically advances to the next section. +

If autoAdvance is TRUE, the editor will automatically advance +focus to the next time section if a user has completed a section. +The default is FALSE. + +

Set this property's value with setAutoAdvance() and get this property's value with autoAdvance(). +

Display display

+

This property holds the sections that are displayed in the time edit. +

The value can be any combination of the values in the Display enum. +By default, the widget displays hours, minutes and seconds. + +

Set this property's value with setDisplay() and get this property's value with display(). +

TQTime maxValue

+

This property holds the maximum time value. +

Setting the maximum time value is equivalent to calling +TQTimeEdit::setRange( minValue(), t ), where t is the maximum +time. The default maximum time is 23:59:59. +

See also minValue and setRange(). + +

Set this property's value with setMaxValue() and get this property's value with maxValue(). +

TQTime minValue

+

This property holds the minimum time value. +

Setting the minimum time value is equivalent to calling +TQTimeEdit::setRange( t, maxValue() ), where t is the minimum +time. The default minimum time is 00:00:00. +

See also maxValue and setRange(). + +

Set this property's value with setMinValue() and get this property's value with minValue(). +

TQTime time

+

This property holds the editor's time value. +

When changing the time property, if the time is less than +minValue(), or is greater than maxValue(), nothing happens. + +

Set this property's value with setTime() and get this property's value with time(). + +


+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/qtimer-h.html b/doc/html/qtimer-h.html new file mode 100644 index 00000000..c1d7277f --- /dev/null +++ b/doc/html/qtimer-h.html @@ -0,0 +1,136 @@ + + + + + +qtimer.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtimer.h

+ +

This is the verbatim text of the qtimer.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtimer.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQTimer class
+**
+** Created : 931111
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQTIMER_H
+#define TQTIMER_H
+
+#ifndef QT_H
+#include "qobject.h"
+#endif // QT_H
+
+
+class Q_EXPORT TQTimer : public TQObject
+{
+    Q_OBJECT
+public:
+    TQTimer( TQObject *parent=0, const char *name=0 );
+   ~TQTimer();
+
+    bool	isActive() const;
+
+    int		start( int msec, bool sshot = FALSE );
+    void	changeInterval( int msec );
+    void	stop();
+
+    static void singleShot( int msec, TQObject *receiver, const char *member );
+
+    int		timerId() const	{ return id; }
+
+signals:
+    void	timeout();
+
+protected:
+    bool	event( TQEvent * );
+
+private:
+    int id;
+    uint single : 1;
+    uint nulltimer : 1;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQTimer( const TQTimer & );
+    TQTimer &operator=( const TQTimer & );
+#endif
+};
+
+
+inline bool TQTimer::isActive() const
+{
+    return id >= 0;
+}
+
+
+#endif // TQTIMER_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtimer-members.html b/doc/html/qtimer-members.html new file mode 100644 index 00000000..aab9723d --- /dev/null +++ b/doc/html/qtimer-members.html @@ -0,0 +1,97 @@ + + + + + +TQTimer Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTimer

+ +

This is the complete list of member functions for +TQTimer, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtimer.html b/doc/html/qtimer.html new file mode 100644 index 00000000..db1f7910 --- /dev/null +++ b/doc/html/qtimer.html @@ -0,0 +1,199 @@ + + + + + +TQTimer Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTimer Class Reference

+ +

The TQTimer class provides timer signals and single-shot timers. +More... +

#include <qtimer.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Signals

+ +

Static Public Members

+
    +
  • void singleShot ( int msec, TQObject * receiver, const char * member )
  • +
+

Detailed Description

+ + +The TQTimer class provides timer signals and single-shot timers. +

+ + +

It uses timer events internally to +provide a more versatile timer. TQTimer is very easy to use: +create a TQTimer, call start() to start it and connect its +timeout() to the appropriate slots. When the time is up it will +emit the timeout() signal. +

Note that a TQTimer object is destroyed automatically when its +parent object is destroyed. +

Example: +

+        TQTimer *timer = new TQTimer( myObject );
+        connect( timer, SIGNAL(timeout()), myObject, SLOT(timerDone()) );
+        timer->start( 2000, TRUE ); // 2 seconds single-shot timer
+    
+ +

You can also use the static singleShot() function to create a +single shot timer. +

As a special case, a TQTimer with timeout 0 times out as soon as +all the events in the window system's event queue have been +processed. +

This can be used to do heavy work while providing a snappy +user interface: +

+        TQTimer *t = new TQTimer( myObject );
+        connect( t, SIGNAL(timeout()), SLOT(processOneThing()) );
+        t->start( 0, FALSE );
+    
+ +

myObject->processOneThing() will be called repeatedly and should +return tquickly (typically after processing one data item) so that +TQt can deliver events to widgets and stop the timer as soon as it +has done all its work. This is the traditional way of +implementing heavy work in GUI applications; multi-threading is +now becoming available on more and more platforms, and we expect +that null events will eventually be replaced by threading. +

Note that TQTimer's accuracy depends on the underlying operating +system and hardware. Most platforms support an accuracy of 20ms; +some provide more. If TQt is unable to deliver the requested +number of timer clicks, it will silently discard some. +

An alternative to using TQTimer is to call TQObject::startTimer() +for your object and reimplement the TQObject::timerEvent() event +handler in your class (which must, of course, inherit TQObject). +The disadvantage is that timerEvent() does not support such +high-level features as single-shot timers or signals. +

Some operating systems limit the number of timers that may be +used; TQt tries to work around these limitations. +

See also Event Classes and Time and Date. + +


Member Function Documentation

+

TQTimer::TQTimer ( TQObject * parent = 0, const char * name = 0 ) +

+Constructs a timer called name, with the parent parent. +

Note that the parent object's destructor will destroy this timer +object. + +

TQTimer::~TQTimer () +

+Destroys the timer. + +

void TQTimer::changeInterval ( int msec ) +

+Changes the timeout interval to msec milliseconds. +

If the timer signal is pending, it will be stopped and restarted; +otherwise it will be started. +

See also start() and isActive(). + +

bool TQTimer::isActive () const +

+ +

Returns TRUE if the timer is running (pending); otherwise returns +FALSE. + +

Example: t11/cannon.cpp. +

void TQTimer::singleShot ( int msec, TQObject * receiver, const char * member ) [static] +

+This static function calls a slot after a given time interval. +

It is very convenient to use this function because you do not need +to bother with a timerEvent or +to create a local TQTimer object. +

Example: +

+        #include <qapplication.h>
+        #include <qtimer.h>
+
+        int main( int argc, char **argv )
+        {
+            TQApplication a( argc, argv );
+            TQTimer::singleShot( 10*60*1000, &a, SLOT(tquit()) );
+                ... // create and show your widgets
+            return a.exec();
+        }
+    
+ +

This sample program automatically terminates after 10 minutes (i.e. +600000 milliseconds). +

The receiver is the receiving object and the member is the +slot. The time interval is msec. + +

int TQTimer::start ( int msec, bool sshot = FALSE ) +

+Starts the timer with a msec milliseconds timeout, and returns +the ID of the timer, or zero when starting the timer failed. +

If sshot is TRUE, the timer will be activated only once; +otherwise it will continue until it is stopped. +

Any pending timer will be stopped. +

See also singleShot(), stop(), changeInterval(), and isActive(). + +

Examples: aclock/aclock.cpp, dirview/dirview.cpp, distributor/distributor.ui.h, forever/forever.cpp, hello/hello.cpp, t11/cannon.cpp, and t13/cannon.cpp. +

void TQTimer::stop () +

+Stops the timer. +

See also start(). + +

Examples: dirview/dirview.cpp, t11/cannon.cpp, t12/cannon.cpp, and t13/cannon.cpp. +

void TQTimer::timeout () [signal] +

+ +

This signal is emitted when the timer is activated. + +

Examples: aclock/aclock.cpp, dirview/dirview.cpp, distributor/distributor.ui.h, forever/forever.cpp, hello/hello.cpp, and t11/cannon.cpp. +

int TQTimer::timerId () const +

+ +

Returns the ID of the timer if the timer is running; otherwise returns +-1. + + +


+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/qtimerevent-members.html b/doc/html/qtimerevent-members.html new file mode 100644 index 00000000..814e47dc --- /dev/null +++ b/doc/html/qtimerevent-members.html @@ -0,0 +1,50 @@ + + + + + +TQTimerEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTimerEvent

+ +

This is the complete list of member functions for +TQTimerEvent, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtimerevent.html b/doc/html/qtimerevent.html new file mode 100644 index 00000000..b9d541d7 --- /dev/null +++ b/doc/html/qtimerevent.html @@ -0,0 +1,83 @@ + + + + + +TQTimerEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTimerEvent Class Reference

+ +

The TQTimerEvent class contains parameters that describe a +timer event. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQTimerEvent class contains parameters that describe a +timer event. +

+

Timer events are sent at regular intervals to objects that have +started one or more timers. Each timer has a unique identifier. A +timer is started with TQObject::startTimer(). +

The TQTimer class provides a high-level programming interface that +uses signals instead of events. It also provides one-shot timers. +

The event handler TQObject::timerEvent() receives timer events. +

See also TQTimer, TQObject::timerEvent(), TQObject::startTimer(), TQObject::killTimer(), TQObject::killTimers(), and Event Classes. + +


Member Function Documentation

+

TQTimerEvent::TQTimerEvent ( int timerId ) +

+ +

Constructs a timer event object with the timer identifier set to +timerId. + +

int TQTimerEvent::timerId () const +

+ +

Returns the unique timer identifier, which is the same identifier +as returned from TQObject::startTimer(). + +

Example: dclock/dclock.cpp. + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtl-qvaluelist-example.html b/doc/html/qtl-qvaluelist-example.html new file mode 100644 index 00000000..fa73c304 --- /dev/null +++ b/doc/html/qtl-qvaluelist-example.html @@ -0,0 +1,108 @@ + + + + + +A Tiny TQTL Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A Tiny TQTL Example

+ + +

+This tiny example shows a TQValueListIterator. +


+

Implementation: +

/****************************************************************************
+** $Id: qt/qvaluelistiterator.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qvaluelist.h>
+#include <qstring.h>
+#include <qwindowdefs.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; }
+
+    // this is here to support very old compilers
+    Q_DUMMY_COMPARISON_OPERATOR( Employee )
+
+private:
+    TQString n;
+    int s;
+};
+
+
+int main( int, char** )
+{
+    typedef TQValueList<Employee> 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;
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtl.html b/doc/html/qtl.html new file mode 100644 index 00000000..8a2be8cb --- /dev/null +++ b/doc/html/qtl.html @@ -0,0 +1,57 @@ + + + + + +TQt Template Library Classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Template Library Classes

+ + +

The TQt Template Library (TQTL) is a set of templates that provide +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 +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtmac-as-native.html b/doc/html/qtmac-as-native.html new file mode 100644 index 00000000..bafba120 --- /dev/null +++ b/doc/html/qtmac-as-native.html @@ -0,0 +1,138 @@ + + + + + +TQt/Mac is Mac OS X Native + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt/Mac is Mac OS X Native

+ + +

+

This document explains what makes an application "native" on Mac OS X. +It shows the areas where TQt/Mac is compliant, and the grey areas where +compliance is more questionable. (See also the document +TQt/Mac Issues.) +

Normally when referring to a native application, one really means an +application that talks directly to the underlying window system and +operating system, rather than one that uses some intermediary (for +example the X11 server, or a web browser). TQt/Mac applications run as +first class citizens, just like Cocoa, Java, and Carbon applications. +

When an application is running as a first class citizen it means that +it can interact with specific components of the Mac OS X experience: +

    +
  • The global menubar
    +

    TQt/Mac does this via the TQMenuBar abstraction. Mac users expect to +have a menubar at the top of the screen and TQt/Mac honors this. +

    Additionally, users expect certain conventions to be respected, for +example the application menu should contain About, Preferences, +Quit, etc. TQt/Mac handles this automatically, although it does not +provide a means of interacting directly with the application menu. +(By doing this automatically, TQt/Mac makes it easier to port TQt/Mac +applications to other platforms.) +

  • Aqua
    +

    This is a critical piece of Mac OS X (documentation can be found at +http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html). +It is a huge topic, but the most important guidelines for GUI +design are probably these: +

      +
    • Aqua look
      +

      As with Cocoa/Carbon TQt/Mac provides widgets that look like +those described in the Human Interface Descriptions. TQt/Mac's +widgets use the Appearance Manager to implement the look, so +Apple's own API's are doing the rendering (TQt/Mac <3.1 used an +emulation style with pixmaps, however this tquickly proved to be +cumbersome, and unable to keep up with style changes at Apple). +

    • Aqua feel
      +

      This is a bit more subjective, but certainly TQt/Mac strives to +provide the same feel as any Mac OS X application (and we +consider situations where it doesn't achieve this to be bugs). +Of course TQt has other concerns to bear in mind, especially +remaining multiplatform. Some "baggage" that TQt carries is in +an effort to provide a widget on a platform for which an +equivelant doesn't exist, or so that a single API can be used to +do something, even if the API doesn't make entire sense for a +specific widget (for example pushbuttons with a popup menu are +really bevel buttons in Mac OS X, but TQt/Mac cannot guess that +this bevel button is right next to other real pushbuttons). +

    • Aqua guides
      +

      This is the most subjective, but there are many suggestions and +guidelines in the Aqua style guidelines. This is the area where +TQt/Mac is of least assistance. The decisions that must be made +to conform (widget sizes, widget layouts with respect to other +widgets, window margins, etc) must be made based on the user +experience demanded by your application. If your user base is +small or mostly comes from the Windows or Unix worlds, these are +minor issues much less important than trying to make a mass +market product. TQt/Mac is fully API compatible with TQt/Windows +and TQt/X11, but Mac OS X is a significantly different platform +to Windows and some special considerations must be made based on +your audience. +

    +

  • Dock
    +

    Interaction with the dock is limited, but at the very least the icon +should be able to be interacted with. This can be achieved with +TQWidget::setIcon(). The setIcon() call can be made as often as +necessary, so can be used to provide a constantly updating pixmap +that works as expected. +

  • Accessiblity
    +

    Although many users never use this, some users will only interact +with your applications via assistive devices. With TQt the aim is to +make this automatic in your application so that it conforms to +accepted practice on its platform (X11 accessiblity support is +still in the works due to the developing nature of its +accessibility design). With TQt 3.3 TQt/Mac will support +accessiblity, and hopefully a host of assistive devices. +

  • Build tools
    +

    Mac OS X developers expect a certain level of interopability +between their development toolkit and the platform's developer +tools (for example MSVC, gmake, etc). TQt/Mac supports both Unix +style Makefiles, and ProjectBuilder/Xcode project files by using +the qmake tool. For example: +

    +   qmake -spec macx-pbuilder project.pro
    +   
    + +

    will generate an Xcode project file from project.pro. With qmake +you do not have to worry about rules for TQt's preprocessors (moc +and uic) since qmake automatically handles them and ensures that +everything necessary is linked into your application. +

    TQt does not entirely interact with the development environment (for +example plugins to set a file to 'mocable' from within the Xcode +user interface). Trolltech is actively working on improving TQt's +interoperability with various IDEs, so hopefully this will be +supported soon. +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtoolbar-h.html b/doc/html/qtoolbar-h.html new file mode 100644 index 00000000..fd8ac53f --- /dev/null +++ b/doc/html/qtoolbar-h.html @@ -0,0 +1,162 @@ + + + + + +qtoolbar.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtoolbar.h

+ +

This is the verbatim text of the qtoolbar.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtoolbar.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of TQToolBar class
+**
+** Created : 980306
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQTOOLBAR_H
+#define TQTOOLBAR_H
+
+#ifndef QT_H
+#include "qdockwindow.h"
+#endif // QT_H
+
+#ifndef QT_NO_TOOLBAR
+
+class TQMainWindow;
+class TQButton;
+class TQBoxLayout;
+class TQToolBarPrivate;
+
+class Q_EXPORT TQToolBar: public TQDockWindow
+{
+    Q_OBJECT
+    Q_PROPERTY( TQString label READ label WRITE setLabel )
+
+public:
+    TQToolBar( const TQString &label,
+	      TQMainWindow *, ToolBarDock = DockTop,
+	      bool newLine = FALSE, const char* name=0 );
+    TQToolBar( const TQString &label, TQMainWindow *, TQWidget *,
+	      bool newLine = FALSE, const char* name=0, WFlags f = 0 );
+    TQToolBar( TQMainWindow* parent=0, const char* name=0 );
+    ~TQToolBar();
+
+    void addSeparator();
+
+    void show();
+    void hide();
+
+    TQMainWindow * mainWindow() const;
+
+    virtual void setStretchableWidget( TQWidget * );
+
+    bool event( TQEvent * e );
+
+    virtual void setLabel( const TQString & );
+    TQString label() const;
+
+    virtual void clear();
+
+    TQSize minimumSize() const;
+    TQSize minimumSizeHint() const;
+
+    void setOrientation( Orientation o );
+    void setMinimumSize( int minw, int minh );
+
+protected:
+    void resizeEvent( TQResizeEvent *e );
+    void styleChange( TQStyle & );
+
+private slots:
+    void createPopup();
+
+private:
+    void init();
+    void checkForExtension( const TQSize &sz );
+    TQToolBarPrivate * d;
+    TQMainWindow * mw;
+    TQWidget * sw;
+    TQString l;
+
+    friend class TQMainWindow;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQToolBar( const TQToolBar & );
+    TQToolBar& operator=( const TQToolBar & );
+#endif
+};
+
+#endif // QT_NO_TOOLBAR
+
+#endif // TQTOOLBAR_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtoolbar-members.html b/doc/html/qtoolbar-members.html new file mode 100644 index 00000000..2cc7e31f --- /dev/null +++ b/doc/html/qtoolbar-members.html @@ -0,0 +1,399 @@ + + + + + +TQToolBar Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQToolBar

+ +

This is the complete list of member functions for +TQToolBar, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtoolbar.html b/doc/html/qtoolbar.html new file mode 100644 index 00000000..f9be074f --- /dev/null +++ b/doc/html/qtoolbar.html @@ -0,0 +1,197 @@ + + + + + +TQToolBar Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQToolBar Class Reference

+ +

The TQToolBar class provides a movable panel containing +widgets such as tool buttons. +More... +

#include <qtoolbar.h> +

Inherits TQDockWindow. +

List of all member functions. +

Public Members

+
    +
  • TQToolBar ( const TQString & label, TQMainWindow *, ToolBarDock = DockTop, bool newLine = FALSE, const char * name = 0 )  (obsolete)
  • +
  • TQToolBar ( const TQString & label, TQMainWindow * mainWindow, TQWidget * parent, bool newLine = FALSE, const char * name = 0, WFlags f = 0 )
  • +
  • TQToolBar ( TQMainWindow * parent = 0, const char * name = 0 )
  • +
  • void addSeparator ()
  • +
  • TQMainWindow * mainWindow () const
  • +
  • virtual void setStretchableWidget ( TQWidget * w )
  • +
  • virtual void setLabel ( const TQString & )
  • +
  • TQString label () const
  • +
  • virtual void clear ()
  • +
+

Properties

+
    +
  • TQString label - the toolbar's label
  • +
+

Detailed Description

+ + +The TQToolBar class provides a movable panel containing +widgets such as tool buttons. +

+ +

A toolbar is a panel that contains a set of controls, usually +represented by small icons. It's purpose is to provide tquick +access to frequently used commands or options. Within a +TQMainWindow the user can drag toolbars within and between the +dock areas. Toolbars can also be dragged +out of any dock area to float freely as top-level windows. +

TQToolBar is a specialization of TQDockWindow, and so provides all +the functionality of a TQDockWindow. +

To use TQToolBar you simply create a TQToolBar as a child of a +TQMainWindow, create a number of TQToolButton widgets (or other +widgets) in left to right (or top to bottom) order and call +addSeparator() when you want a separator. When a toolbar is +floated the caption used is the label given in the constructor +call. This can be changed with setLabel(). +

+ +

        TQToolBar * fileTools = new TQToolBar( this, "file operations" );
+        fileTools->setLabel( "File Operations" );
+        fileOpenAction->addTo( fileTools );
+        fileSaveAction->addTo( fileTools );
+
+

This extract from the application/application.cpp example shows +the creation of a new toolbar as a child of a TQMainWindow and +adding two TQActions. +

You may use most widgets within a toolbar, with TQToolButton and +TQComboBox being the most common. +

If you create a new widget on an already visible TQToolBar, this +widget will automatically become visible without needing a show() +call. (This differs from every other TQt widget container. We +recommend calling show() anyway since we hope to fix this anomaly +in a future release.) +

TQToolBars, like TQDockWindows, are located in TQDockAreas or +float as top-level windows. TQMainWindow provides four TQDockAreas +(top, left, right and bottom). When you create a new toolbar (as +in the example above) as a child of a TQMainWindow the toolbar will +be added to the top dock area. You can move it to another dock +area (or float it) by calling TQMainWindow::moveDockWindow(). TQDock +areas lay out their windows in Lines. +

If the main window is resized so that the area occupied by the +toolbar is too small to show all its widgets a little arrow button +(which looks like a right-pointing chevron, '»') will appear +at the right or bottom of the toolbar depending on its +orientation. Clicking this button pops up a menu that shows the +'overflowing' items. TQToolButtons are represented in the menu using +their textLabel property, other TQButton subclasses are represented +using their text property, and TQComboBoxes are represented as submenus, +with the caption text being used in the submenu item. +

Usually a toolbar will get precisely the space it needs. However, +with setHorizontalStretchable(), setVerticalStretchable() or +setStretchableWidget() you can tell the main window to expand the +toolbar to fill all available space in the specified orientation. +

The toolbar arranges its buttons either horizontally or vertically +(see orientation() for details). Generally, TQDockArea will set the +orientation correctly for you, but you can set it yourself with +setOrientation() and track any changes by connecting to the +orientationChanged() signal. +

You can use the clear() method to remove all items from a toolbar. +

Toolbar (dock window)

A floating TQToolbar (dock window) +

+

See also TQToolButton, TQMainWindow, Parts of Isys on Visual Design, GUI Design Handbook: Tool Bar, and Main Window and Related Classes. + +


Member Function Documentation

+

TQToolBar::TQToolBar ( const TQString & label, TQMainWindow *, ToolBarDock = DockTop, bool newLine = FALSE, const char * name = 0 ) +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

TQToolBar::TQToolBar ( const TQString & label, TQMainWindow * mainWindow, TQWidget * parent, bool newLine = FALSE, const char * name = 0, WFlags f = 0 ) +

+Constructs an empty horizontal toolbar. +

The toolbar is called name and is a child of parent and is +managed by mainWindow. The label and newLine parameters +are passed straight to TQMainWindow::addDockWindow(). name and +the widget flags f are passed on to the TQDockWindow constructor. +

Use this constructor if you want to create torn-off (undocked, +floating) toolbars or toolbars in the status + bar. + +

TQToolBar::TQToolBar ( TQMainWindow * parent = 0, const char * name = 0 ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Constructs an empty toolbar called name, with parent parent, +in its parent's top dock area, without any label and without +retquiring a newline. + +

void TQToolBar::addSeparator () +

+Adds a separator to the right/bottom of the toolbar. + +

Examples: chart/chartform.cpp, fileiconview/mainwindow.cpp, helpviewer/helpwindow.cpp, qfd/fontdisplayer.cpp, and scribble/scribble.cpp. +

void TQToolBar::clear () [virtual] +

+Deletes all the toolbar's child widgets. + +

TQString TQToolBar::label () const +

Returns the toolbar's label. +See the "label" property for details. +

TQMainWindow * TQToolBar::mainWindow () const +

+Returns a pointer to the TQMainWindow which manages this toolbar. + +

void TQToolBar::setLabel ( const TQString & ) [virtual] +

Sets the toolbar's label. +See the "label" property for details. +

void TQToolBar::setStretchableWidget ( TQWidget * w ) [virtual] +

+Sets the widget w to be expanded if this toolbar is requested +to stretch. +

The request to stretch might occur because TQMainWindow +right-justifies the dock area the toolbar is in, or because this +toolbar's isVerticalStretchable() or isHorizontalStretchable() is +set to TRUE. +

If you call this function and the toolbar is not yet stretchable, +setStretchable() is called. +

See also TQMainWindow::rightJustification, setVerticalStretchable(), and setHorizontalStretchable(). + +

Examples: fileiconview/mainwindow.cpp and helpviewer/helpwindow.cpp. +


Property Documentation

+

TQString label

+

This property holds the toolbar's label. +

If the toolbar is floated the label becomes the toolbar window's +caption. There is no default label text. + +

Set this property's value with setLabel() and get this property's value with label(). + +


+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/qtoolbox-h.html b/doc/html/qtoolbox-h.html new file mode 100644 index 00000000..b04fca16 --- /dev/null +++ b/doc/html/qtoolbox-h.html @@ -0,0 +1,171 @@ + + + + + +qtoolbox.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtoolbox.h

+ +

This is the verbatim text of the qtoolbox.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtoolbox.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of TQToolBox widget class
+**
+** Created : 961105
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQTOOLBOX_H
+#define TQTOOLBOX_H
+
+#ifndef QT_H
+#include <qframe.h>
+#include <qiconset.h>
+#endif // QT_H
+
+#ifndef QT_NO_TOOLBOX
+
+class TQToolBoxPrivate;
+class TQWidgetList;
+
+class Q_EXPORT TQToolBox : public TQFrame
+{
+    Q_OBJECT
+    Q_PROPERTY( int currentIndex READ currentIndex WRITE setCurrentIndex )
+    Q_PROPERTY( int count READ count )
+
+public:
+    TQToolBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+    ~TQToolBox();
+
+    int addItem( TQWidget *item, const TQString &label );
+    int addItem( TQWidget *item, const TQIconSet &iconSet, const TQString &label );
+    int insertItem( int index, TQWidget *item, const TQString &label );
+    int insertItem( int index, TQWidget *item, const TQIconSet &iconSet, const TQString &label );
+
+    int removeItem( TQWidget *item );
+
+    void setItemEnabled( int index, bool enabled );
+    bool isItemEnabled( int index ) const;
+
+    void setItemLabel( int index, const TQString &label );
+    TQString itemLabel( int index ) const;
+
+    void setItemIconSet( int index, const TQIconSet &iconSet );
+    TQIconSet itemIconSet( int index ) const;
+
+    void setItemToolTip( int index, const TQString &toolTip );
+    TQString itemToolTip( int index ) const;
+
+    TQWidget *currentItem() const;
+    void setCurrentItem( TQWidget *item );
+
+    int currentIndex() const;
+    TQWidget *item( int index ) const;
+    int indexOf( TQWidget *item ) const;
+    int count() const;
+
+public slots:
+    void setCurrentIndex( int index );
+
+signals:
+    void currentChanged( int index );
+
+private slots:
+    void buttonClicked();
+    void itemDestroyed(TQObject*);
+
+protected:
+    virtual void itemInserted( int index );
+    virtual void itemRemoved( int index );
+    void showEvent( TQShowEvent *e );
+    void frameChanged();
+    void styleChange(TQStyle&);
+
+private:
+    void relayout();
+
+private:
+    TQToolBoxPrivate *d;
+
+};
+
+
+inline int TQToolBox::addItem( TQWidget *item, const TQString &label )
+{ return insertItem( -1, item, TQIconSet(), label ); }
+inline int TQToolBox::addItem( TQWidget *item, const TQIconSet &iconSet,
+			      const TQString &label )
+{ return insertItem( -1, item, iconSet, label ); }
+inline int TQToolBox::insertItem( int index, TQWidget *item, const TQString &label )
+{ return insertItem( index, item, TQIconSet(), label ); }
+
+#endif // QT_NO_TOOLBOX
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtoolbox-members.html b/doc/html/qtoolbox-members.html new file mode 100644 index 00000000..c027c58b --- /dev/null +++ b/doc/html/qtoolbox-members.html @@ -0,0 +1,377 @@ + + + + + +TQToolBox Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQToolBox

+ +

This is the complete list of member functions for +TQToolBox, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtoolbox.html b/doc/html/qtoolbox.html new file mode 100644 index 00000000..9a043695 --- /dev/null +++ b/doc/html/qtoolbox.html @@ -0,0 +1,248 @@ + + + + + +TQToolBox Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQToolBox Class Reference

+ +

The TQToolBox class provides a column of tabbed widget +items. +More... +

#include <qtoolbox.h> +

Inherits TQFrame. +

List of all member functions. +

Public Members

+
    +
  • TQToolBox ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )
  • +
  • int addItem ( TQWidget * w, const TQString & label )
  • +
  • int addItem ( TQWidget * item, const TQIconSet & iconSet, const TQString & label )
  • +
  • int insertItem ( int index, TQWidget * item, const TQString & label )
  • +
  • int insertItem ( int index, TQWidget * item, const TQIconSet & iconSet, const TQString & label )
  • +
  • int removeItem ( TQWidget * item )
  • +
  • void setItemEnabled ( int index, bool enabled )
  • +
  • bool isItemEnabled ( int index ) const
  • +
  • void setItemLabel ( int index, const TQString & label )
  • +
  • TQString itemLabel ( int index ) const
  • +
  • void setItemIconSet ( int index, const TQIconSet & iconSet )
  • +
  • TQIconSet itemIconSet ( int index ) const
  • +
  • void setItemToolTip ( int index, const TQString & toolTip )
  • +
  • TQString itemToolTip ( int index ) const
  • +
  • TQWidget * currentItem () const
  • +
  • void setCurrentItem ( TQWidget * item )
  • +
  • int currentIndex () const
  • +
  • TQWidget * item ( int index ) const
  • +
  • int indexOf ( TQWidget * item ) const
  • +
  • int count () const
  • +
+

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • int count - the number of items contained in the toolbox  (read only)
  • +
  • int currentIndex - the index of the current item, or -1 if the toolbox is empty
  • +
+

Protected Members

+ +

Detailed Description

+ + +

The TQToolBox class provides a column of tabbed widget +items. +

+ +

A toolbox is a widget that displays a column of tabs one above the +other, with the current item displayed below the current tab. +Every tab has an index position within the column of tabs. A tab's +item is a TQWidget. +

Each item has an itemLabel(), an optional icon, itemIconSet(), an +optional itemToolTip(), and a widget. The +item's attributes can be changed with setItemLabel(), +setItemIconSet() and setItemToolTip(). +

Items are added using addItem(), or inserted at particular +positions using insertItem(). The total number of items is given +by count(). Items can be deleted with delete, or removed from the +toolbox with removeItem(). Combining removeItem() and insertItem() +allows to move items to different positions. +

The current item widget is returned by currentItem() and set with +setCurrentItem(). If you prefer you can work in terms of indexes +using currentIndex(), setCurrentIndex(), indexOf() and item(). +

The currentChanged() signal is emitted when the current item is +changed. +

See also TQTabWidget and Advanced Widgets. + +


Member Function Documentation

+

TQToolBox::TQToolBox ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

+Constructs a toolbox called name with parent parent and flags f. + +

int TQToolBox::addItem ( TQWidget * item, const TQIconSet & iconSet, const TQString & label ) +

+ +Adds the widget item in a new tab at bottom of the toolbox. The +new tab's label is set to label, and the iconSet is +displayed to the left of the label. Returns the new tab's index. + +

int TQToolBox::addItem ( TQWidget * w, const TQString & label ) +

+ +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Adds the widget w in a new tab at bottom of the toolbox. The +new tab's label is set to label. Returns the new tab's index. + +

int TQToolBox::count () const +

Returns the number of items contained in the toolbox. +See the "count" property for details. +

void TQToolBox::currentChanged ( int index ) [signal] +

+ +

This signal is emitted when the current item changed. The new +current item's index is passed in index, or -1 if there is no +current item. + +

int TQToolBox::currentIndex () const +

Returns the index of the current item, or -1 if the toolbox is empty. +See the "currentIndex" property for details. +

TQWidget * TQToolBox::currentItem () const +

+Returns the toolbox's current item, or 0 if the toolbox is empty. + +

int TQToolBox::indexOf ( TQWidget * item ) const +

+Returns the index of item item, or -1 if the item does not +exist. + +

int TQToolBox::insertItem ( int index, TQWidget * item, const TQIconSet & iconSet, const TQString & label ) +

+Inserts the widget item at position index, or at the bottom +of the toolbox if index is out of range. The new item's label +is set to label, and the iconSet is displayed to the left of +the label. Returns the new item's index. + +

int TQToolBox::insertItem ( int index, TQWidget * item, const TQString & label ) +

+ +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Inserts the widget item at position index, or at the bottom +of the toolbox if index is out of range. The new item's label is +set to label. Returns the new item's index. + +

bool TQToolBox::isItemEnabled ( int index ) const +

+Returns TRUE if the item at position index is enabled; otherwise returns FALSE. + +

TQWidget * TQToolBox::item ( int index ) const +

+Returns the item at position index, or 0 if there is no such +item. + +

TQIconSet TQToolBox::itemIconSet ( int index ) const +

+Returns the icon of the item at position index, or a null +icon if index is out of range. + +

void TQToolBox::itemInserted ( int index ) [virtual protected] +

+This virtual handler is called after a new item was added or +inserted at position index. + +

TQString TQToolBox::itemLabel ( int index ) const +

+Returns the label of the item at position index, or a null string if +index is out of range. + +

void TQToolBox::itemRemoved ( int index ) [virtual protected] +

+This virtual handler is called after an item was removed from +position index. + +

TQString TQToolBox::itemToolTip ( int index ) const +

+Returns the tooltip of the item at position index, or a null +string if index is out of range. + +

int TQToolBox::removeItem ( TQWidget * item ) +

+Removes the widget item from the toolbox. Note that the widget +is not deleted. Returns the removed widget's index, or -1 if +the widget was not in this tool box. + +

void TQToolBox::setCurrentIndex ( int index ) [slot] +

Sets the index of the current item, or -1 if the toolbox is empty to index. +See the "currentIndex" property for details. +

void TQToolBox::setCurrentItem ( TQWidget * item ) +

+Sets the current item to be item. + +

void TQToolBox::setItemEnabled ( int index, bool enabled ) +

+If enabled is TRUE then the item at position index is enabled; otherwise item +index is disabled. + +

void TQToolBox::setItemIconSet ( int index, const TQIconSet & iconSet ) +

+Sets the icon of the item at position index to iconSet. + +

void TQToolBox::setItemLabel ( int index, const TQString & label ) +

+Sets the label of the item at position index to label. + +

void TQToolBox::setItemToolTip ( int index, const TQString & toolTip ) +

+Sets the tooltip of the item at position index to toolTip. + +

Property Documentation

+

int count

+

This property holds the number of items contained in the toolbox. +

+

Get this property's value with count(). +

int currentIndex

+

This property holds the index of the current item, or -1 if the toolbox is empty. +

Set this property's value with setCurrentIndex() and get this property's value with currentIndex(). +

See also currentItem(), indexOf(), and item(). + + +


+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/qtoolbutton-h.html b/doc/html/qtoolbutton-h.html new file mode 100644 index 00000000..b7952e3c --- /dev/null +++ b/doc/html/qtoolbutton-h.html @@ -0,0 +1,237 @@ + + + + + +qtoolbutton.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtoolbutton.h

+ +

This is the verbatim text of the qtoolbutton.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtoolbutton.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of TQToolButton class
+**
+** Created : 979899
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQTOOLBUTTON_H
+#define TQTOOLBUTTON_H
+
+#ifndef QT_H
+#include "qbutton.h"
+#include "qstring.h"
+#include "qpixmap.h"
+#include "qiconset.h"
+#endif // QT_H
+
+#ifndef QT_NO_TOOLBUTTON
+
+class TQToolButtonPrivate;
+class TQToolBar;
+class TQPopupMenu;
+
+class Q_EXPORT TQToolButton : public TQButton
+{
+    Q_OBJECT
+    Q_ENUMS( TextPosition )
+
+    Q_PROPERTY( TQIconSet iconSet READ iconSet WRITE setIconSet )
+    Q_PROPERTY( TQIconSet onIconSet READ onIconSet WRITE setOnIconSet DESIGNABLE false STORED false )
+    Q_PROPERTY( TQIconSet offIconSet READ offIconSet WRITE setOffIconSet DESIGNABLE false STORED false )
+    Q_PROPERTY( bool usesBigPixmap READ usesBigPixmap WRITE setUsesBigPixmap )
+    Q_PROPERTY( bool usesTextLabel READ usesTextLabel WRITE setUsesTextLabel )
+    Q_PROPERTY( TQString textLabel READ textLabel WRITE setTextLabel )
+    Q_PROPERTY( int popupDelay READ popupDelay WRITE setPopupDelay )
+    Q_PROPERTY( bool autoRaise READ autoRaise WRITE setAutoRaise )
+    Q_PROPERTY( TextPosition textPosition READ textPosition WRITE setTextPosition )
+
+    Q_OVERRIDE( bool toggleButton WRITE setToggleButton )
+    Q_OVERRIDE( bool on WRITE setOn )
+    Q_OVERRIDE( TQPixmap pixmap DESIGNABLE false STORED false )
+    Q_OVERRIDE( BackgroundMode backgroundMode DESIGNABLE true)
+
+public:
+    enum TextPosition {
+	BesideIcon,
+	BelowIcon,
+	Right = BesideIcon, // obsolete
+	Under = BelowIcon // obsolete
+    };
+    TQToolButton( TQWidget * parent, const char* name=0 );
+#ifndef QT_NO_TOOLBAR
+    TQToolButton( const TQIconSet& s, const TQString &textLabel,
+		 const TQString& grouptext,
+		 TQObject * receiver, const char* slot,
+		 TQToolBar * parent, const char* name=0 );
+#endif
+    TQToolButton( ArrowType type, TQWidget *parent, const char* name=0 );
+    ~TQToolButton();
+
+    TQSize sizeHint() const;
+    TQSize minimumSizeHint() const;
+
+#ifndef QT_NO_COMPAT
+    void setOnIconSet( const TQIconSet& );
+    void setOffIconSet( const TQIconSet& );
+    void setIconSet( const TQIconSet &, bool on );
+    TQIconSet onIconSet() const;
+    TQIconSet offIconSet( ) const;
+    TQIconSet iconSet( bool on ) const;
+#endif
+    virtual void setIconSet( const TQIconSet & );
+    TQIconSet iconSet() const;
+
+    bool usesBigPixmap() const { return ubp; }
+    bool usesTextLabel() const { return utl; }
+    TQString textLabel() const { return tl; }
+
+#ifndef QT_NO_POPUPMENU
+    void setPopup( TQPopupMenu* popup );
+    TQPopupMenu* popup() const;
+
+    void setPopupDelay( int delay );
+    int popupDelay() const;
+
+    void openPopup();
+#endif
+
+    void setAutoRaise( bool enable );
+    bool autoRaise() const;
+    TextPosition textPosition() const;
+
+    void setText( const TQString &txt );
+
+public slots:
+    virtual void setUsesBigPixmap( bool enable );
+    virtual void setUsesTextLabel( bool enable );
+    virtual void setTextLabel( const TQString &, bool );
+
+    virtual void setToggleButton( bool enable );
+
+    virtual void setOn( bool enable );
+    void toggle();
+    void setTextLabel( const TQString & );
+    void setTextPosition( TextPosition pos );
+
+protected:
+    void mousePressEvent( TQMouseEvent * );
+    void drawButton( TQPainter * );
+    void drawButtonLabel(TQPainter *);
+
+    void enterEvent( TQEvent * );
+    void leaveEvent( TQEvent * );
+    void moveEvent( TQMoveEvent * );
+
+    // ### Make virtual in 4.0, maybe act like TQPushButton with
+    // regards to setFlat() instead?  Andy
+    bool uses3D() const;
+#if (QT_VERSION >= 0x040000)
+#error "Some functions need to be changed to virtual for TQt 4.0"
+#endif
+
+    bool eventFilter( TQObject *o, TQEvent *e );
+
+#ifndef QT_NO_PALETTE
+    void paletteChange( const TQPalette & );
+#endif
+
+private slots:
+    void popupTimerDone();
+    void popupPressed();
+
+private:
+    void init();
+
+    TQPixmap bp;
+    int bpID;
+    TQPixmap sp;
+    int spID;
+
+    TQString tl;
+
+    TQToolButtonPrivate *d;
+    TQIconSet *s;
+
+    uint utl : 1;
+    uint ubp : 1;
+    uint hasArrow : 1;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQToolButton( const TQToolButton & );
+    TQToolButton& operator=( const TQToolButton & );
+#endif
+};
+
+#endif // QT_NO_TOOLBUTTON
+
+#endif // TQTOOLBUTTON_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtoolbutton-members.html b/doc/html/qtoolbutton-members.html new file mode 100644 index 00000000..671d3508 --- /dev/null +++ b/doc/html/qtoolbutton-members.html @@ -0,0 +1,392 @@ + + + + + +TQToolButton Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQToolButton

+ +

This is the complete list of member functions for +TQToolButton, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtoolbutton.html b/doc/html/qtoolbutton.html new file mode 100644 index 00000000..d3c8cdae --- /dev/null +++ b/doc/html/qtoolbutton.html @@ -0,0 +1,392 @@ + + + + + +TQToolButton Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQToolButton Class Reference

+ +

The TQToolButton class provides a tquick-access button to +commands or options, usually used inside a TQToolBar. +More... +

#include <qtoolbutton.h> +

Inherits TQButton. +

List of all member functions. +

Public Members

+
    +
  • enum TextPosition { BesideIcon, BelowIcon, Right = BesideIcon, Under = BelowIcon }
  • +
  • TQToolButton ( TQWidget * parent, const char * name = 0 )
  • +
  • TQToolButton ( const TQIconSet & iconSet, const TQString & textLabel, const TQString & grouptext, TQObject * receiver, const char * slot, TQToolBar * parent, const char * name = 0 )
  • +
  • TQToolButton ( ArrowType type, TQWidget * parent, const char * name = 0 )
  • +
  • ~TQToolButton ()
  • +
  • void setOnIconSet ( const TQIconSet & )  (obsolete)
  • +
  • void setOffIconSet ( const TQIconSet & )  (obsolete)
  • +
  • void setIconSet ( const TQIconSet & set, bool on )  (obsolete)
  • +
  • TQIconSet onIconSet () const  (obsolete)
  • +
  • TQIconSet offIconSet () const  (obsolete)
  • +
  • TQIconSet iconSet ( bool on ) const  (obsolete)
  • +
  • virtual void setIconSet ( const TQIconSet & )
  • +
  • TQIconSet iconSet () const
  • +
  • bool usesBigPixmap () const
  • +
  • bool usesTextLabel () const
  • +
  • TQString textLabel () const
  • +
  • void setPopup ( TQPopupMenu * popup )
  • +
  • TQPopupMenu * popup () const
  • +
  • void setPopupDelay ( int delay )
  • +
  • int popupDelay () const
  • +
  • void openPopup ()
  • +
  • void setAutoRaise ( bool enable )
  • +
  • bool autoRaise () const
  • +
  • TextPosition textPosition () const
  • +
+

Public Slots

+ +

Properties

+
    +
  • bool autoRaise - whether auto-raising is enabled
  • +
  • BackgroundMode backgroundMode - the toolbutton's background mode  (read only)
  • +
  • TQIconSet iconSet - the icon set providing the icon shown on the button
  • +
  • TQIconSet offIconSet - the icon set that is used when the button is in an "off" state  (obsolete)
  • +
  • bool on - whether this tool button is on
  • +
  • TQIconSet onIconSet - the icon set that is used when the button is in an "on" state  (obsolete)
  • +
  • TQPixmap pixmap - the pixmap of the button  (read only)
  • +
  • int popupDelay - the time delay between pressing the button and the appearance of the associated popup menu in milliseconds
  • +
  • TQString textLabel - the label of this button
  • +
  • TextPosition textPosition - the position of the text label of this button
  • +
  • bool toggleButton - whether this tool button is a toggle button
  • +
  • bool usesBigPixmap - whether this toolbutton uses big pixmaps
  • +
  • bool usesTextLabel - whether the toolbutton displays a text label below the button pixmap
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQToolButton class provides a tquick-access button to +commands or options, usually used inside a TQToolBar. +

+ +

A tool button is a special button that provides tquick-access to +specific commands or options. As opposed to a normal command +button, a tool button usually doesn't show a text label, but shows +an icon instead. Its classic usage is to select tools, for example +the "pen" tool in a drawing program. This would be implemented +with a TQToolButton as toggle button (see setToggleButton() ). +

TQToolButton supports auto-raising. In auto-raise mode, the button +draws a 3D frame only when the mouse points at it. The feature is +automatically turned on when a button is used inside a TQToolBar. +Change it with setAutoRaise(). +

A tool button's icon is set as TQIconSet. This makes it possible to +specify different pixmaps for the disabled and active state. The +disabled pixmap is used when the button's functionality is not +available. The active pixmap is displayed when the button is +auto-raised because the mouse pointer is hovering over it. +

The button's look and dimension is adjustable with +setUsesBigPixmap() and setUsesTextLabel(). When used inside a +TQToolBar in a TQMainWindow, the button automatically adjusts to +TQMainWindow's settings (see TQMainWindow::setUsesTextLabel() and +TQMainWindow::setUsesBigPixmaps()). The pixmap set on a TQToolButton +will be set to 22x22 if it is bigger than this size. If +usesBigPixmap() is TRUE, then the pixmap will be set to 32x32. +

A tool button can offer additional choices in a popup menu. The +feature is sometimes used with the "Back" button in a web browser. +After pressing and holding the button down for a while, a menu +pops up showing a list of possible pages to jump to. With +TQToolButton you can set a popup menu using setPopup(). The default +delay is 600ms; you can adjust it with setPopupDelay(). +

Toolbar with Toolbuttons \caption A floating
TQToolbar with TQToolbuttons +

See also TQPushButton, TQToolBar, TQMainWindow, GUI Design Handbook: Push Button, and Basic Widgets. + +


Member Type Documentation

+

TQToolButton::TextPosition

+ +

The position of the tool button's textLabel in relation to the +tool button's icon. +

    +
  • TQToolButton::BesideIcon - The text appears beside the icon. +
  • TQToolButton::BelowIcon - The text appears below the icon. +
+

Member Function Documentation

+

TQToolButton::TQToolButton ( TQWidget * parent, const char * name = 0 ) +

+Constructs an empty tool button called name, with parent parent. + +

TQToolButton::TQToolButton ( const TQIconSet & iconSet, const TQString & textLabel, const TQString & grouptext, TQObject * receiver, const char * slot, TQToolBar * parent, const char * name = 0 ) +

+Constructs a tool button called name, that is a child of parent (which must be a TQToolBar). +

The tool button will display iconSet, with its text label and +tool tip set to textLabel and its status bar message set to grouptext. It will be connected to the slot in object receiver. + +

TQToolButton::TQToolButton ( ArrowType type, TQWidget * parent, const char * name = 0 ) +

+Constructs a tool button as an arrow button. The ArrowType type defines the arrow direction. Possible values are LeftArrow, RightArrow, UpArrow and DownArrow. +

An arrow button has auto-repeat turned on by default. +

The parent and name arguments are sent to the TQWidget +constructor. + +

TQToolButton::~TQToolButton () +

+Destroys the object and frees any allocated resources. + +

bool TQToolButton::autoRaise () const +

Returns TRUE if auto-raising is enabled; otherwise returns FALSE. +See the "autoRaise" property for details. +

TQIconSet TQToolButton::iconSet () const +

Returns the icon set providing the icon shown on the button. +See the "iconSet" property for details. +

TQIconSet TQToolButton::iconSet ( bool on ) const +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Since TQt 3.0, TQIconSet contains both the On and Off icons. +

For ease of porting, this function ignores the on parameter and +returns the iconSet property. If you relied on the on +parameter, you probably want to update your code to use the TQIconSet +On/Off mechanism. + +

TQIconSet TQToolButton::offIconSet () const +

Returns the icon set that is used when the button is in an "off" state. +See the "offIconSet" property for details. +

TQIconSet TQToolButton::onIconSet () const +

Returns the icon set that is used when the button is in an "on" state. +See the "onIconSet" property for details. +

void TQToolButton::openPopup () +

+Opens (pops up) the associated popup menu. If there is no such +menu, this function does nothing. This function does not return +until the popup menu has been closed by the user. + +

TQPopupMenu * TQToolButton::popup () const +

+Returns the associated popup menu, or 0 if no popup menu has been +defined. +

See also setPopup(). + +

int TQToolButton::popupDelay () const +

Returns the time delay between pressing the button and the appearance of the associated popup menu in milliseconds. +See the "popupDelay" property for details. +

void TQToolButton::setAutoRaise ( bool enable ) +

Sets whether auto-raising is enabled to enable. +See the "autoRaise" property for details. +

void TQToolButton::setIconSet ( const TQIconSet & ) [virtual] +

Sets the icon set providing the icon shown on the button. +See the "iconSet" property for details. +

void TQToolButton::setIconSet ( const TQIconSet & set, bool on ) +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Since TQt 3.0, TQIconSet contains both the On and Off icons. +

For ease of porting, this function ignores the on parameter and +sets the iconSet property. If you relied on the on parameter, +you probably want to update your code to use the TQIconSet On/Off +mechanism. +

See also iconSet and TQIconSet::State. + +

void TQToolButton::setOffIconSet ( const TQIconSet & ) +

Sets the icon set that is used when the button is in an "off" state. +See the "offIconSet" property for details. +

void TQToolButton::setOn ( bool enable ) [virtual slot] +

Sets whether this tool button is on to enable. +See the "on" property for details. +

void TQToolButton::setOnIconSet ( const TQIconSet & ) +

Sets the icon set that is used when the button is in an "on" state. +See the "onIconSet" property for details. +

void TQToolButton::setPopup ( TQPopupMenu * popup ) +

+Associates the popup menu popup with this tool button. +

The popup will be shown each time the tool button has been pressed +down for a certain amount of time. A typical application example +is the "back" button in some web browsers's tool bars. If the user +clicks it, the browser simply browses back to the previous page. +If the user presses and holds the button down for a while, the +tool button shows a menu containing the current history list. +

Ownership of the popup menu is not transferred to the tool button. +

See also popup(). + +

void TQToolButton::setPopupDelay ( int delay ) +

Sets the time delay between pressing the button and the appearance of the associated popup menu in milliseconds to delay. +See the "popupDelay" property for details. +

void TQToolButton::setTextLabel ( const TQString & ) [slot] +

Sets the label of this button. +See the "textLabel" property for details. +

void TQToolButton::setTextLabel ( const TQString & newLabel, bool tipToo ) [virtual slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the label of this button to newLabel and automatically +sets it as a tool tip if tipToo is TRUE. + +

void TQToolButton::setTextPosition ( TextPosition pos ) [slot] +

Sets the position of the text label of this button to pos. +See the "textPosition" property for details. +

void TQToolButton::setToggleButton ( bool enable ) [virtual slot] +

Sets whether this tool button is a toggle button to enable. +See the "toggleButton" property for details. +

void TQToolButton::setUsesBigPixmap ( bool enable ) [virtual slot] +

Sets whether this toolbutton uses big pixmaps to enable. +See the "usesBigPixmap" property for details. +

void TQToolButton::setUsesTextLabel ( bool enable ) [virtual slot] +

Sets whether the toolbutton displays a text label below the button pixmap to enable. +See the "usesTextLabel" property for details. +

TQString TQToolButton::textLabel () const +

Returns the label of this button. +See the "textLabel" property for details. +

TextPosition TQToolButton::textPosition () const +

Returns the position of the text label of this button. +See the "textPosition" property for details. +

void TQToolButton::toggle () [slot] +

+Toggles the state of this tool button. +

This function has no effect on non-toggling + buttons. +

See also toggleButton and toggled(). + +

bool TQToolButton::uses3D () const [protected] +

+Returns TRUE if this button should be drawn using raised edges; +otherwise returns FALSE. +

See also drawButton(). + +

bool TQToolButton::usesBigPixmap () const +

Returns TRUE if this toolbutton uses big pixmaps; otherwise returns FALSE. +See the "usesBigPixmap" property for details. +

bool TQToolButton::usesTextLabel () const +

Returns TRUE if the toolbutton displays a text label below the button pixmap; otherwise returns FALSE. +See the "usesTextLabel" property for details. +


Property Documentation

+

bool autoRaise

+

This property holds whether auto-raising is enabled. +

The default is disabled (i.e. FALSE). + +

Set this property's value with setAutoRaise() and get this property's value with autoRaise(). +

BackgroundMode backgroundMode

+

This property holds the toolbutton's background mode. +

Get this property with backgroundMode(). +

See also TQWidget::backgroundMode. + +

TQIconSet iconSet

+

This property holds the icon set providing the icon shown on the button. +

Setting this property sets TQToolButton::pixmap to a null +pixmap. There is no default iconset. +

See also pixmap, toggleButton, and on. + +

Set this property's value with setIconSet() and get this property's value with iconSet(). +

TQIconSet offIconSet

+

This property holds the icon set that is used when the button is in an "off" state. +

This property is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Since TQt 3.0, TQIconSet contains both the On and Off icons. There is +now an TQToolButton::iconSet property that replaces both TQToolButton::onIconSet and TQToolButton::offIconSet. +

For ease of porting, this property is a synonym for TQToolButton::iconSet. You probably want to go over your application +code and use the TQIconSet On/Off mechanism. +

See also iconSet and TQIconSet::State. + +

Set this property's value with setOffIconSet() and get this property's value with offIconSet(). +

bool on

+

This property holds whether this tool button is on. +

This property has no effect on non-toggling + buttons. The default is FALSE (i.e. off). +

See also toggleButton and toggle(). + +

Set this property's value with setOn(). +

TQIconSet onIconSet

+

This property holds the icon set that is used when the button is in an "on" state. +

This property is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Since TQt 3.0, TQIconSet contains both the On and Off icons. There is +now an TQToolButton::iconSet property that replaces both TQToolButton::onIconSet and TQToolButton::offIconSet. +

For ease of porting, this property is a synonym for TQToolButton::iconSet. You probably want to go over your application +code and use the TQIconSet On/Off mechanism. +

See also iconSet and TQIconSet::State. + +

Set this property's value with setOnIconSet() and get this property's value with onIconSet(). +

TQPixmap pixmap

This property holds the pixmap of the button. +

The pixmap property has no meaning for tool buttons. Use the +iconSet property instead. + +

int popupDelay

+

This property holds the time delay between pressing the button and the appearance of the associated popup menu in milliseconds. +

Usually this is around half a second. A value of 0 draws the down +arrow button to the side of the button which can be used to open +up the popup menu. +

See also setPopup(). + +

Set this property's value with setPopupDelay() and get this property's value with popupDelay(). +

TQString textLabel

+

This property holds the label of this button. +

Setting this property automatically sets the text as a tool tip +too. There is no default text. + +

Set this property's value with setTextLabel() and get this property's value with textLabel(). +

TextPosition textPosition

+

This property holds the position of the text label of this button. +

+

Set this property's value with setTextPosition() and get this property's value with textPosition(). +

bool toggleButton

+

This property holds whether this tool button is a toggle button. +

Toggle buttons have an on/off state similar to check boxes. A tool button is not a toggle button by +default. +

See also on and toggle(). + +

Set this property's value with setToggleButton(). +

bool usesBigPixmap

+

This property holds whether this toolbutton uses big pixmaps. +

TQToolButton automatically connects this property to the relevant +signal in the TQMainWindow in which it resides. We strongly +recommend that you use TQMainWindow::setUsesBigPixmaps() instead. +

This property's default is TRUE. +

Warning: If you set some buttons (in a TQMainWindow) to have big +pixmaps and others to have small pixmaps, TQMainWindow may not get +the geometry right. + +

Set this property's value with setUsesBigPixmap() and get this property's value with usesBigPixmap(). +

bool usesTextLabel

+

This property holds whether the toolbutton displays a text label below the button pixmap. +

The default is FALSE. +

TQToolButton automatically connects this slot to the relevant +signal in the TQMainWindow in which is resides. + +

Set this property's value with setUsesTextLabel() and get this property's value with usesTextLabel(). + +


+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/qtooltip-h.html b/doc/html/qtooltip-h.html new file mode 100644 index 00000000..44bc63b1 --- /dev/null +++ b/doc/html/qtooltip-h.html @@ -0,0 +1,194 @@ + + + + + +qtooltip.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtooltip.h

+ +

This is the verbatim text of the qtooltip.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtooltip.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of Tool Tips (or Balloon Help) for any widget or rectangle
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQTOOLTIP_H
+#define TQTOOLTIP_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#endif // QT_H
+
+#ifndef QT_NO_TOOLTIP
+
+#if __GNUC__  - 0 > 3
+#pragma GCC system_header
+#endif
+
+class TQTipManager;
+class TQIconViewToolTip;
+class TQListViewToolTip;
+
+class Q_EXPORT TQToolTipGroup: public TQObject
+{
+    Q_OBJECT
+    Q_PROPERTY( bool delay READ delay WRITE setDelay )
+    Q_PROPERTY( bool enabled READ enabled WRITE setEnabled )
+
+public:
+    TQToolTipGroup( TQObject *parent, const char *name = 0 );
+   ~TQToolTipGroup();
+
+    bool delay() const;
+    bool enabled() const;
+
+public slots:
+    void setDelay( bool );
+    void setEnabled( bool );
+
+signals:
+    void showTip( const TQString &);
+    void removeTip();
+
+private:
+    uint del:1;
+    uint ena:1;
+
+    friend class TQTipManager;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQToolTipGroup( const TQToolTipGroup & );
+    TQToolTipGroup& operator=( const TQToolTipGroup & );
+#endif
+};
+
+
+class Q_EXPORT TQToolTip: public TQt
+{
+public:
+    TQToolTip( TQWidget *, TQToolTipGroup * = 0 );
+    //### add virtual d'tor for 4.0
+
+    static void add( TQWidget *, const TQString &);
+    static void add( TQWidget *, const TQString &,
+		     TQToolTipGroup *, const TQString& );
+    static void remove( TQWidget * );
+
+    static void add( TQWidget *, const TQRect &, const TQString &);
+    static void add( TQWidget *, const TQRect &, const TQString &,
+		     TQToolTipGroup *, const TQString& );
+    static void remove( TQWidget *, const TQRect & );
+
+    static TQString textFor( TQWidget *, const TQPoint & pos = TQPoint() );
+
+    static void hide();
+
+    static TQFont    font();
+    static void	    setFont( const TQFont & );
+    static TQPalette palette();
+    static void	    setPalette( const TQPalette & );
+
+#ifndef QT_NO_COMPAT
+    static void	    setEnabled( bool enable ) { setGloballyEnabled( enable ); }
+    static bool	    enabled() { return isGloballyEnabled(); }
+#endif
+    static void	    setGloballyEnabled( bool );
+    static bool	    isGloballyEnabled();
+    static void	    setWakeUpDelay(int);
+
+protected:
+    virtual void maybeTip( const TQPoint & ) = 0;
+    void    tip( const TQRect &, const TQString &);
+    void    tip( const TQRect &, const TQString& , const TQString &);
+    void    tip( const TQRect &, const TQString &, const TQRect & );
+    void    tip( const TQRect &, const TQString&, const TQString &, const TQRect &);
+
+    void    clear();
+
+public:
+    TQWidget	  *parentWidget() const { return p; }
+    TQToolTipGroup *group()	  const { return g; }
+
+private:
+    TQWidget	    *p;
+    TQToolTipGroup   *g;
+    static TQFont    *ttFont;
+    static TQPalette *ttPalette;
+
+    friend class TQTipManager;
+};
+
+
+#endif // QT_NO_TOOLTIP
+
+#endif // TQTOOLTIP_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtooltip-members.html b/doc/html/qtooltip-members.html new file mode 100644 index 00000000..a0ca1b0c --- /dev/null +++ b/doc/html/qtooltip-members.html @@ -0,0 +1,65 @@ + + + + + +TQToolTip Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQToolTip

+ +

This is the complete list of member functions for +TQToolTip, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtooltip.html b/doc/html/qtooltip.html new file mode 100644 index 00000000..7f501c2a --- /dev/null +++ b/doc/html/qtooltip.html @@ -0,0 +1,376 @@ + + + + + +TQToolTip Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQToolTip Class Reference

+ +

The TQToolTip class provides tool tips (balloon help) for +any widget or rectangular part of a widget. +More... +

#include <qtooltip.h> +

Inherits TQt. +

List of all member functions. +

Public Members

+
    +
  • TQToolTip ( TQWidget * widget, TQToolTipGroup * group = 0 )
  • +
  • TQWidget * parentWidget () const
  • +
  • TQToolTipGroup * group () const
  • +
+

Static Public Members

+
    +
  • void add ( TQWidget * widget, const TQString & text )
  • +
  • void add ( TQWidget * widget, const TQString & text, TQToolTipGroup * group, const TQString & longText )
  • +
  • void remove ( TQWidget * widget )
  • +
  • void add ( TQWidget * widget, const TQRect & rect, const TQString & text )
  • +
  • void add ( TQWidget * widget, const TQRect & rect, const TQString & text, TQToolTipGroup * group, const TQString & groupText )
  • +
  • void remove ( TQWidget * widget, const TQRect & rect )
  • +
  • TQString textFor ( TQWidget * widget, const TQPoint & pos = TQPoint ( ) )
  • +
  • void hide ()
  • +
  • TQFont font ()
  • +
  • void setFont ( const TQFont & font )
  • +
  • TQPalette palette ()
  • +
  • void setPalette ( const TQPalette & palette )
  • +
  • void setEnabled ( bool enable )  (obsolete)
  • +
  • bool enabled ()  (obsolete)
  • +
  • void setGloballyEnabled ( bool enable )
  • +
  • bool isGloballyEnabled ()
  • +
  • void setWakeUpDelay ( int i )
  • +
+

Protected Members

+
    +
  • virtual void maybeTip ( const TQPoint & p ) = 0
  • +
  • void tip ( const TQRect & rect, const TQString & text )
  • +
  • void tip ( const TQRect & rect, const TQString & text, const TQString & groupText )
  • +
  • void tip ( const TQRect & rect, const TQString & text, const TQRect & geometry )
  • +
  • void tip ( const TQRect & rect, const TQString & text, const TQString & groupText, const TQRect & geometry )
  • +
  • void clear ()
  • +
+

Detailed Description

+ + +The TQToolTip class provides tool tips (balloon help) for +any widget or rectangular part of a widget. +

+ +

The tip is a short, single line of text reminding the user of the +widget's or rectangle's function. It is drawn immediately below +the region in a distinctive black-on-yellow combination. +

The tip can be any Rich-Text formatted string. +

TQToolTipGroup provides a way for tool tips to display another text +elsewhere (most often in a status bar). +

At any point in time, TQToolTip is either dormant or active. In +dormant mode the tips are not shown and in active mode they are. +The mode is global, not particular to any one widget. +

TQToolTip switches from dormant to active mode when the user hovers +the mouse on a tip-etquipped region for a second or so and remains +active until the user either clicks a mouse button, presses a key, +lets the mouse hover for five seconds or moves the mouse outside +all tip-etquipped regions for at least a second. +

The TQToolTip class can be used in three different ways: +

    +
  1. Adding a tip to an entire widget. +
  2. Adding a tip to a fixed rectangle within a widget. +
  3. Adding a tip to a dynamic rectangle within a widget. +
+

To add a tip to a widget, call the static function +TQToolTip::add() with the widget and tip as arguments: +

+        TQToolTip::add( tquitButton, "Leave the application" );
+    
+ +

This is the simplest and most common use of TQToolTip. The tip +will be deleted automatically when tquitButton is deleted, but +you can remove it yourself, too: +

+        TQToolTip::remove( tquitButton );
+    
+ +

You can also display another text (typically in a status bar), courtesy of TQToolTipGroup. This example +assumes that grp is a TQToolTipGroup * and is already +connected to the appropriate status bar: +

+        TQToolTip::add( tquitButton, "Leave the application", grp,
+                       "Leave the application, prompting to save if necessary" );
+        TQToolTip::add( closeButton, "Close this window", grp,
+                       "Close this window, prompting to save if necessary" );
+    
+ +

To add a tip to a fixed rectangle within a widget, call the static +function TQToolTip::add() with the widget, rectangle and tip as +arguments. (See the tooltip/tooltip.cpp example.) Again, you +can supply a TQToolTipGroup * and another text if you want. +

Both of these are one-liners and cover the majority of cases. The +third and most general way to use TQToolTip retquires you to +reimplement a pure virtual function to decide whether to pop up a +tool tip. The tooltip/tooltip.cpp example demonstrates this +too. This mode can be used to implement tips for text that can +move as the user scrolls, for example. +

To use TQToolTip like this, you must subclass TQToolTip and +reimplement maybeTip(). TQToolTip calls maybeTip() when a tip +should pop up, and maybeTip() decides whether to show a tip. +

Tool tips can be globally disabled using +TQToolTip::setGloballyEnabled() or disabled in groups with +TQToolTipGroup::setEnabled(). +

You can retrieve the text of a tooltip for a given position within +a widget using textFor(). +

The global tooltip font and palette can be set with the static +setFont() and setPalette() functions respectively. +

See also TQStatusBar, TQWhatsThis, TQToolTipGroup, GUI Design Handbook: Tool Tip, and Help System. + +


Member Function Documentation

+

TQToolTip::TQToolTip ( TQWidget * widget, TQToolTipGroup * group = 0 ) +

+Constructs a tool tip object. This is only necessary if you need +tool tips on regions that can move within the widget (most often +because the widget's contents can scroll). +

widget is the widget you want to add dynamic tool tips to and +group (optional) is the tool tip group they should belong to. +

Warning: TQToolTip is not a subclass of TQObject, so the instance of +TQToolTip is not deleted when widget is deleted. +

Warning: If you delete the tool tip before you have deleted +widget then you need to make sure you call remove() yourself from +widget in your reimplemented TQToolTip destructor. +

+        MyToolTip::~MyToolTip()
+        {
+            remove( widget );
+        }
+    
+ +

See also maybeTip(). + +

void TQToolTip::add ( TQWidget * widget, const TQString & text ) [static] +

+Adds a tool tip to widget. text is the text to be shown in +the tool tip. +

This is the most common entry point to the TQToolTip class; it is +suitable for adding tool tips to buttons, checkboxes, comboboxes +and so on. + +

Examples: helpsystem/mainwindow.cpp, qdir/qdir.cpp, scribble/scribble.cpp, and tooltip/tooltip.cpp. +

void TQToolTip::add ( TQWidget * widget, const TQString & text, TQToolTipGroup * group, const TQString & longText ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Adds a tool tip to widget and to tool tip group group. +

text is the text shown in the tool tip and longText is the +text emitted from group. +

Normally, longText is shown in a status + bar or similar. + +

void TQToolTip::add ( TQWidget * widget, const TQRect & rect, const TQString & text ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Adds a tool tip to a fixed rectangle, rect, within widget. +text is the text shown in the tool tip. + +

void TQToolTip::add ( TQWidget * widget, const TQRect & rect, const TQString & text, TQToolTipGroup * group, const TQString & groupText ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Adds a tool tip to an entire widget and to tool tip group group. The tooltip will disappear when the mouse leaves the rect. +

text is the text shown in the tool tip and groupText is the +text emitted from group. +

Normally, groupText is shown in a status + bar or similar. + +

void TQToolTip::clear () [protected] +

+Immediately removes all tool tips for this tooltip's parent +widget. + +

bool TQToolTip::enabled () [static] +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

TQFont TQToolTip::font () [static] +

+Returns the font common to all tool tips. +

See also setFont(). + +

TQToolTipGroup * TQToolTip::group () const +

+ +

Returns the tool tip group this TQToolTip is a member of or 0 if it +isn't a member of any group. +

The tool tip group is the object responsible for maintaining +contact between tool tips and a status + bar or something else which can show the longer help text. +

See also parentWidget() and TQToolTipGroup. + +

void TQToolTip::hide () [static] +

+Hides any tip that is currently being shown. +

Normally, there is no need to call this function; TQToolTip takes +care of showing and hiding the tips as the user moves the mouse. + +

bool TQToolTip::isGloballyEnabled () [static] +

+Returns whether tool tips are enabled globally. +

See also setGloballyEnabled(). + +

void TQToolTip::maybeTip ( const TQPoint & p ) [pure virtual protected] +

+ +

This pure virtual function is half of the most versatile interface +TQToolTip offers. +

It is called when there is a possibility that a tool tip should be +shown and must decide whether there is a tool tip for the point p in the widget that this TQToolTip object relates to. If so, +maybeTip() must call tip() with the rectangle the tip applies to, +the tip's text and optionally the TQToolTipGroup details and the +geometry in screen coordinates. +

p is given in that widget's local coordinates. Most maybeTip() +implementations will be of the form: +

+        if ( <something> ) {
+            tip( <something>, <something> );
+        }
+    
+ +

The first argument to tip() (a rectangle) must encompass p, +i.e. the tip must apply to the current mouse position; otherwise +TQToolTip's operation is undefined. +

Note that the tip will disappear once the mouse moves outside the +rectangle you give to tip(), and will not reappear if the mouse +moves back in: maybeTip() is called again instead. +

See also tip(). + +

Examples: helpsystem/tooltip.cpp and tooltip/tooltip.cpp. +

TQPalette TQToolTip::palette () [static] +

+Returns the palette common to all tool tips. +

See also setPalette(). + +

TQWidget * TQToolTip::parentWidget () const +

+ +

Returns the widget this TQToolTip applies to. +

The tool tip is destroyed automatically when the parent widget is +destroyed. +

See also group(). + +

void TQToolTip::remove ( TQWidget * widget ) [static] +

+Removes the tool tip from widget. +

If there is more than one tool tip on widget, only the one +covering the entire widget is removed. + +

void TQToolTip::remove ( TQWidget * widget, const TQRect & rect ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Removes any tool tip for rect from widget. +

If there is more than one tool tip on widget, only the one +covering rectangle rect is removed. + +

void TQToolTip::setEnabled ( bool enable ) [static] +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

void TQToolTip::setFont ( const TQFont & font ) [static] +

+Sets the font for all tool tips to font. +

See also font(). + +

void TQToolTip::setGloballyEnabled ( bool enable ) [static] +

+If enable is TRUE sets all tool tips to be enabled (shown when +needed); if enable is FALSE sets all tool tips to be disabled +(never shown). +

By default, tool tips are enabled. Note that this function affects +all tool tips in the entire application. +

See also TQToolTipGroup::enabled. + +

void TQToolTip::setPalette ( const TQPalette & palette ) [static] +

+Sets the palette for all tool tips to palette. +

See also palette(). + +

void TQToolTip::setWakeUpDelay ( int i ) [static] +

+Sets the wakeup delay for all tooltips to i +milliseconds. + +

TQString TQToolTip::textFor ( TQWidget * widget, const TQPoint & pos = TQPoint ( ) ) [static] +

+Returns the tool tip text for widget at position pos, or +TQString::null if there is no tool tip for the given widget and +position. + +

void TQToolTip::tip ( const TQRect & rect, const TQString & text ) [protected] +

+Immediately pops up a tip saying text and removes the tip once +the cursor moves out of rectangle rect (which is given in the +coordinate system of the widget this TQToolTip relates to). +

The tip will not reappear if the cursor moves back; your +maybeTip() must reinstate it each time. + +

void TQToolTip::tip ( const TQRect & rect, const TQString & text, const TQString & groupText ) [protected] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Immediately pops up a tip saying text and removes that tip once +the cursor moves out of rectangle rect (which is given in the +coordinate system of the widget this TQToolTip relates to). groupText is the text emitted from the group. +

The tip will not reappear if the cursor moves back; your +maybeTip() must reinstate it each time. + +

void TQToolTip::tip ( const TQRect & rect, const TQString & text, const TQRect & geometry ) [protected] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Immediately pops up a tip within the rectangle geometry, saying +text and removes the tip once the cursor moves out of rectangle +rect. Both rectangles are given in the coordinate system of the +widget this TQToolTip relates to. +

The tip will not reappear if the cursor moves back; your +maybeTip() must reinstate it each time. +

If the tip does not fit inside geometry, the tip expands. + +

void TQToolTip::tip ( const TQRect & rect, const TQString & text, const TQString & groupText, const TQRect & geometry ) [protected] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Immediately pops up a tip within the rectangle geometry, saying +text and removes the tip once the cursor moves out of rectangle +rect. groupText is the text emitted from the group. Both +rectangles are given in the coordinate system of the widget this +TQToolTip relates to. +

The tip will not reappear if the cursor moves back; your +maybeTip() must reinstate it each time. +

If the tip does not fit inside geometry, the tip expands. + + +


+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/qtooltipgroup-members.html b/doc/html/qtooltipgroup-members.html new file mode 100644 index 00000000..0e1dac2f --- /dev/null +++ b/doc/html/qtooltipgroup-members.html @@ -0,0 +1,96 @@ + + + + + +TQToolTipGroup Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQToolTipGroup

+ +

This is the complete list of member functions for +TQToolTipGroup, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtooltipgroup.html b/doc/html/qtooltipgroup.html new file mode 100644 index 00000000..fb4e80b0 --- /dev/null +++ b/doc/html/qtooltipgroup.html @@ -0,0 +1,152 @@ + + + + + +TQToolTipGroup Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQToolTipGroup Class Reference

+ +

The TQToolTipGroup class collects tool tips into related groups. +More... +

#include <qtooltip.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+
    +
  • bool delay - whether the display of the group text is delayed
  • +
  • bool enabled - whether tool tips in the group are enabled
  • +
+

Detailed Description

+ + +The TQToolTipGroup class collects tool tips into related groups. +

+

Tool tips can display two texts: one in the tip and +(optionally) one that is typically in a status + bar. TQToolTipGroup provides a way to link tool tips to +this status bar. +

TQToolTipGroup has practically no API; it is only used as an +argument to TQToolTip's member functions, for example like this: +

+        TQToolTipGroup * grp = new TQToolTipGroup( this, "tool tip relay" );
+        connect( grp, SIGNAL(showTip(const TQString&)),
+                 myLabel, SLOT(setText(const TQString&)) );
+        connect( grp, SIGNAL(removeTip()),
+                 myLabel, SLOT(clear()) );
+        TQToolTip::add( giraffeButton, "feed giraffe",
+                       grp, "Give the giraffe a meal" );
+        TQToolTip::add( gorillaButton, "feed gorilla",
+                       grp, "Give the gorilla a meal" );
+    
+ +

This example makes the object myLabel (which you must supply) +display (one assumes, though you can make myLabel do anything, of +course) the strings "Give the giraffe a meal" and "Give the +gorilla a meal" while the relevant tool tips are being displayed. +

Deleting a tool tip group removes the tool tips in it. +

See also Help System. + +


Member Function Documentation

+

TQToolTipGroup::TQToolTipGroup ( TQObject * parent, const char * name = 0 ) +

+Constructs a tool tip group called name, with parent parent. + +

TQToolTipGroup::~TQToolTipGroup () +

+Destroys this tool tip group and all tool tips in it. + +

bool TQToolTipGroup::delay () const +

Returns TRUE if the display of the group text is delayed; otherwise returns FALSE. +See the "delay" property for details. +

bool TQToolTipGroup::enabled () const +

Returns TRUE if tool tips in the group are enabled; otherwise returns FALSE. +See the "enabled" property for details. +

void TQToolTipGroup::removeTip () [signal] +

+ +

This signal is emitted when a tool tip in this group is hidden. +See the TQToolTipGroup documentation for an example of use. +

See also showTip(). + +

Example: helpsystem/mainwindow.cpp. +

void TQToolTipGroup::setDelay ( bool ) [slot] +

Sets whether the display of the group text is delayed. +See the "delay" property for details. +

void TQToolTipGroup::setEnabled ( bool ) [slot] +

Sets whether tool tips in the group are enabled. +See the "enabled" property for details. +

void TQToolTipGroup::showTip ( const TQString & longText ) [signal] +

+ +

This signal is emitted when one of the tool tips in the group is +displayed. longText is the extra text for the displayed tool +tip. +

See also removeTip(). + +

Example: helpsystem/mainwindow.cpp. +


Property Documentation

+

bool delay

+

This property holds whether the display of the group text is delayed. +

If set to TRUE (the default), the group text is displayed at the +same time as the tool tip. Otherwise, the group text is displayed +immediately when the cursor enters the widget. + +

Set this property's value with setDelay() and get this property's value with delay(). +

bool enabled

+

This property holds whether tool tips in the group are enabled. +

This property's default is TRUE. + +

Set this property's value with setEnabled() and get this property's value with enabled(). + +


+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/qtranslator-h.html b/doc/html/qtranslator-h.html new file mode 100644 index 00000000..7e845d2c --- /dev/null +++ b/doc/html/qtranslator-h.html @@ -0,0 +1,212 @@ + + + + + +qtranslator.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtranslator.h

+ +

This is the verbatim text of the qtranslator.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtranslator.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of the translator class
+**
+** Created : 980906
+**
+** Copyright (C) 1998-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQTRANSLATOR_H
+#define TQTRANSLATOR_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qvaluelist.h"
+#endif // QT_H
+
+#ifndef QT_NO_TRANSLATION
+
+class TQTranslatorPrivate;
+
+class Q_EXPORT TQTranslatorMessage
+{
+public:
+    TQTranslatorMessage();
+    TQTranslatorMessage( const char * context,
+			const char * sourceText,
+			const char * comment,
+			const TQString& translation = TQString::null );
+    TQTranslatorMessage( TQDataStream & );
+    TQTranslatorMessage( const TQTranslatorMessage & m );
+
+    TQTranslatorMessage & operator=( const TQTranslatorMessage & m );
+
+    uint hash() const { return h; }
+    const char *context() const { return cx; }
+    const char *sourceText() const { return st; }
+    const char *comment() const { return cm; }
+
+    void setTranslation( const TQString & translation ) { tn = translation; }
+    TQString translation() const { return tn; }
+
+    enum Prefix { NoPrefix, Hash, HashContext, HashContextSourceText,
+		  HashContextSourceTextComment };
+    void write( TQDataStream & s, bool strip = FALSE,
+		Prefix prefix = HashContextSourceTextComment ) const;
+    Prefix commonPrefix( const TQTranslatorMessage& ) const;
+
+    bool operator==( const TQTranslatorMessage& m ) const;
+    bool operator!=( const TQTranslatorMessage& m ) const
+    { return !operator==( m ); }
+    bool operator<( const TQTranslatorMessage& m ) const;
+    bool operator<=( const TQTranslatorMessage& m ) const
+    { return !m.operator<( *this ); }
+    bool operator>( const TQTranslatorMessage& m ) const
+    { return m.operator<( *this ); }
+    bool operator>=( const TQTranslatorMessage& m ) const
+    { return !operator<( m ); }
+
+private:
+    uint h;
+    TQCString cx;
+    TQCString st;
+    TQCString cm;
+    TQString tn;
+
+    enum Tag { Tag_End = 1, Tag_SourceText16, Tag_Translation, Tag_Context16,
+	       Tag_Hash, Tag_SourceText, Tag_Context, Tag_Comment,
+	       Tag_Obsolete1 };
+};
+
+
+class Q_EXPORT TQTranslator: public TQObject
+{
+    Q_OBJECT
+public:
+    TQTranslator( TQObject * parent = 0, const char * name = 0 );
+    ~TQTranslator();
+
+#ifndef QT_NO_COMPAT
+    TQString find( const char *context, const char *sourceText, const char * comment = 0 ) const {
+	return findMessage( context, sourceText, comment ).translation();
+    }
+#endif
+    virtual TQTranslatorMessage findMessage( const char *, const char *,
+					    const char * = 0 ) const;
+
+    bool load( const TQString & filename,
+	       const TQString & directory = TQString::null,
+	       const TQString & search_delimiters = TQString::null,
+	       const TQString & suffix = TQString::null );
+    bool load( const uchar *data, int len ) {
+	clear();
+	return do_load( data, len );
+    }
+
+    void clear();
+
+#ifndef QT_NO_TRANSLATION_BUILDER
+    enum SaveMode { Everything, Stripped };
+
+    bool save( const TQString & filename, SaveMode mode = Everything );
+
+    void insert( const TQTranslatorMessage& );
+    void insert( const char *context, const char *sourceText, const TQString &translation ) {
+	insert( TQTranslatorMessage(context, sourceText, "", translation) );
+    }
+    void remove( const TQTranslatorMessage& );
+    void remove( const char *context, const char *sourceText ) {
+	remove( TQTranslatorMessage(context, sourceText, "") );
+    }
+    bool contains( const char *, const char *, const char * comment = 0 ) const;
+
+    void squeeze( SaveMode = Everything );
+    void unsqueeze();
+
+    TQValueList<TQTranslatorMessage> messages() const;
+#endif
+
+    bool isEmpty() const;
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQTranslator( const TQTranslator & );
+    TQTranslator &operator=( const TQTranslator & );
+#endif
+
+    bool do_load( const uchar *data, int len );
+
+    TQTranslatorPrivate * d;
+};
+
+#endif // QT_NO_TRANSLATION
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtranslator-members.html b/doc/html/qtranslator-members.html new file mode 100644 index 00000000..18d15c3d --- /dev/null +++ b/doc/html/qtranslator-members.html @@ -0,0 +1,102 @@ + + + + + +TQTranslator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTranslator

+ +

This is the complete list of member functions for +TQTranslator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtranslator.html b/doc/html/qtranslator.html new file mode 100644 index 00000000..512bd88e --- /dev/null +++ b/doc/html/qtranslator.html @@ -0,0 +1,326 @@ + + + + + +TQTranslator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTranslator Class Reference

+ +

The TQTranslator class provides internationalization support for text +output. +More... +

#include <qtranslator.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+
    +
  • TQTranslator ( TQObject * parent = 0, const char * name = 0 )
  • +
  • ~TQTranslator ()
  • +
  • TQString find ( const char * context, const char * sourceText, const char * comment = 0 ) const  (obsolete)
  • +
  • virtual TQTranslatorMessage findMessage ( const char * context, const char * sourceText, const char * comment = 0 ) const
  • +
  • bool load ( const TQString & filename, const TQString & directory = TQString::null, const TQString & search_delimiters = TQString::null, const TQString & suffix = TQString::null )
  • +
  • bool load ( const uchar * data, int len )
  • +
  • void clear ()
  • +
  • enum SaveMode { Everything, Stripped }
  • +
  • bool save ( const TQString & filename, SaveMode mode = Everything )
  • +
  • void insert ( const TQTranslatorMessage & message )
  • +
  • void insert ( const char * context, const char * sourceText, const TQString & translation )  (obsolete)
  • +
  • void remove ( const TQTranslatorMessage & message )
  • +
  • void remove ( const char * context, const char * sourceText )  (obsolete)
  • +
  • bool contains ( const char * context, const char * sourceText, const char * comment = 0 ) const
  • +
  • void squeeze ( SaveMode mode = Everything )
  • +
  • void unsqueeze ()
  • +
  • TQValueList<TQTranslatorMessage> messages () const
  • +
  • bool isEmpty () const
  • +
+

Detailed Description

+ + +

The TQTranslator class provides internationalization support for text +output. +

+ + +

An object of this class contains a set of TQTranslatorMessage +objects, each of which specifies a translation from a source +language to a target language. TQTranslator provides functions to +look up translations, add new ones, remove them, load and save +them, etc. +

The most common use of TQTranslator is to: load a translator file +created with TQt Linguist, +install it using TQApplication::installTranslator(), and use it via +TQObject::tr(). For example: +

+    int main( int argc, char ** argv )
+    {
+        TQApplication app( argc, argv );
+
+        TQTranslator translator( 0 );
+        translator.load( "french.qm", "." );
+        app.installTranslator( &translator );
+
+        MyWidget m;
+        app.setMainWidget( &m );
+        m.show();
+
+        return app.exec();
+    }
+    
+ +Note that the translator must be created before the +application's main window. +

Most applications will never need to do anything else with this +class. The other functions provided by this class are useful for +applications that work on translator files. +

We call a translation a "messsage". For this reason, translation +files are sometimes referred to as "message files". +

It is possible to lookup a translation using findMessage() (as +tr() and TQApplication::translate() do) and contains(), to insert a +new translation messsage using insert(), and to remove one using +remove(). +

Translation tools often need more information than the bare source +text and translation, for example, context information to help +the translator. But end-user programs that are using translations +usually only need lookup. To cater for these different needs, +TQTranslator can use stripped translator files that use the minimum +of memory and which support little more functionality than +findMessage(). +

Thus, load() may not load enough information to make anything more +than findMessage() work. save() has an argument indicating +whether to save just this minimum of information or to save +everything. +

"Everything" means that for each translation item the following +information is kept: +

    +
  • The translated text - the return value from tr(). +
  • The input key: +
      +
    • The source text - usually the argument to tr(). +
    • The context - usually the class name for the tr() caller. +
    • The comment - a comment that helps disambiguate different uses +of the same text in the same context. +
    +
+

The minimum for each item is just the information necessary for +findMessage() to return the right text. This may include the +source, context and comment, but usually it is just a hash value +and the translated text. +

For example, the "Cancel" in a dialog might have "Anuluj" when the +program runs in Polish (in this case the source text would be +"Cancel"). The context would (normally) be the dialog's class +name; there would normally be no comment, and the translated text +would be "Anuluj". +

But it's not always so simple. The Spanish version of a printer +dialog with settings for two-sided printing and binding would +probably retquire both "Activado" and "Activada" as translations +for "Enabled". In this case the source text would be "Enabled" in +both cases, and the context would be the dialog's class name, but +the two items would have disambiguating comments such as +"two-sided printing" for one and "binding" for the other. The +comment enables the translator to choose the appropriate gender +for the Spanish version, and enables TQt to distinguish between +translations. +

Note that when TQTranslator loads a stripped file, most functions +do not work. The functions that do work with stripped files are +explicitly documented as such. +

See also TQTranslatorMessage, TQApplication::installTranslator(), TQApplication::removeTranslator(), TQObject::tr(), TQApplication::translate(), Environment Classes, and Internationalization with TQt. + +


Member Type Documentation

+

TQTranslator::SaveMode

+ +

This enum type defines how TQTranslator writes translation +files. There are two modes: +

    +
  • TQTranslator::Everything - files are saved with all available information +
  • TQTranslator::Stripped - files are saved with just enough information for +end-user applications +

Note that when TQTranslator loads a stripped file, most functions do +not work. The functions that do work with stripped files are +explicitly documented as such. + +


Member Function Documentation

+

TQTranslator::TQTranslator ( TQObject * parent = 0, const char * name = 0 ) +

+Constructs an empty message file object that is not connected to +any file. The object is called name with parent parent. + +

TQTranslator::~TQTranslator () +

+Destroys the object and frees any allocated resources. + +

void TQTranslator::clear () +

+Empties this translator of all contents. +

This function works with stripped translator files. + +

bool TQTranslator::contains ( const char * context, const char * sourceText, const char * comment = 0 ) const +

+Returns TRUE if this message file contains a message with the key +(context, sourceText, comment); otherwise returns FALSE. +

This function works with stripped translator files. +

(This is is a one-liner that calls findMessage().) + +

TQString TQTranslator::find ( const char * context, const char * sourceText, const char * comment = 0 ) const +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Please use findMessage() instead. +

Returns the translation for the key (context, sourceText, +comment) or TQString::null if there is none in this translator. + +

TQTranslatorMessage TQTranslator::findMessage ( const char * context, const char * sourceText, const char * comment = 0 ) const [virtual] +

Returns the TQTranslatorMessage for the key +(context, sourceText, comment). If none is found, +also tries (context, sourceText, ""). + +

void TQTranslator::insert ( const TQTranslatorMessage & message ) +

+Inserts message into this message file. +

This function does not work with stripped translator files. It +may appear to, but that is not dependable. +

See also remove(). + +

void TQTranslator::insert ( const char * context, const char * sourceText, const TQString & translation ) +

+ +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

bool TQTranslator::isEmpty () const +

+Returns TRUE if this translator is empty, otherwise returns FALSE. +This function works with stripped and unstripped translation files. + +

bool TQTranslator::load ( const TQString & filename, const TQString & directory = TQString::null, const TQString & search_delimiters = TQString::null, const TQString & suffix = TQString::null ) +

+Loads filename, which may be an absolute file name or relative +to directory. The previous contents of this translator object +is discarded. Returns TRUE if the file is loaded successfully; +otherwise returns FALSE. +

If the full file name does not exist, other file names are tried +in the following order: +

    +
  1. File name with suffix appended (".qm" if the suffix is +TQString::null). +
  2. File name with text after a character in search_delimiters +stripped ("_." is the default for search_delimiters if it is +TQString::null). +
  3. File name stripped and suffix appended. +
  4. File name stripped further, etc. +
+

For example, an application running in the fr_CA locale +(French-speaking Canada) might call load("foo.fr_ca", +"/opt/foolib"). load() would then try to open the first existing +readable file from this list: +

    +
  1. /opt/foolib/foo.fr_ca +
  2. /opt/foolib/foo.fr_ca.qm +
  3. /opt/foolib/foo.fr +
  4. /opt/foolib/foo.fr.qm +
  5. /opt/foolib/foo +
  6. /opt/foolib/foo.qm +
+

See also save(). + +

Example: i18n/main.cpp. +

bool TQTranslator::load ( const uchar * data, int len ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+

Loads the .qm file data data of length len into the +translator. Returns TRUE if the data is loaded successfully; +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 +

+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. +

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() ) {
+        process_message( *it );
+        ++it;
+    }
+  
+ + +

void TQTranslator::remove ( const TQTranslatorMessage & message ) +

+Removes message from this translator. +

This function works with stripped translator files. +

See also insert(). + +

void TQTranslator::remove ( const char * context, const char * sourceText ) +

+ +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Removes the translation associated to the key (context, sourceText, +"") from this translator. + +

bool TQTranslator::save ( const TQString & filename, SaveMode mode = Everything ) +

+Saves this message file to filename, overwriting the previous +contents of filename. If mode is Everything (the +default), all the information is preserved. If mode is Stripped, any information that is not necessary for findMessage() +is stripped away. +

See also load(). + +

void TQTranslator::squeeze ( SaveMode mode = Everything ) +

+Converts this message file to the compact format used to store +message files on disk. +

You should never need to call this directly; save() and other +functions call it as necessary. mode is for internal use. +

See also save() and unsqueeze(). + +

void TQTranslator::unsqueeze () +

+Converts this message file into an easily modifiable data +structure, less compact than the format used in the files. +

You should never need to call this function; it is called by +insert() and friends as necessary. +

See also squeeze(). + + +


+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/qtranslatormessage-members.html b/doc/html/qtranslatormessage-members.html new file mode 100644 index 00000000..273a242b --- /dev/null +++ b/doc/html/qtranslatormessage-members.html @@ -0,0 +1,62 @@ + + + + + +TQTranslatorMessage Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTranslatorMessage

+ +

This is the complete list of member functions for +TQTranslatorMessage, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtranslatormessage.html b/doc/html/qtranslatormessage.html new file mode 100644 index 00000000..e1d0191f --- /dev/null +++ b/doc/html/qtranslatormessage.html @@ -0,0 +1,226 @@ + + + + + +TQTranslatorMessage Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTranslatorMessage Class Reference

+ +

The TQTranslatorMessage class contains a translator message and its +properties. +More... +

#include <qtranslator.h> +

List of all member functions. +

Public Members

+
    +
  • TQTranslatorMessage ()
  • +
  • TQTranslatorMessage ( const char * context, const char * sourceText, const char * comment, const TQString & translation = TQString::null )
  • +
  • TQTranslatorMessage ( TQDataStream & stream )
  • +
  • TQTranslatorMessage ( const TQTranslatorMessage & m )
  • +
  • TQTranslatorMessage & operator= ( const TQTranslatorMessage & m )
  • +
  • uint hash () const
  • +
  • const char * context () const
  • +
  • const char * sourceText () const
  • +
  • const char * comment () const
  • +
  • void setTranslation ( const TQString & translation )
  • +
  • TQString translation () const
  • +
  • enum Prefix { NoPrefix, Hash, HashContext, HashContextSourceText, HashContextSourceTextComment }
  • +
  • void write ( TQDataStream & stream, bool strip = FALSE, Prefix prefix = HashContextSourceTextComment ) const
  • +
  • Prefix commonPrefix ( const TQTranslatorMessage & m ) const
  • +
  • bool operator== ( const TQTranslatorMessage & m ) const
  • +
  • bool operator!= ( const TQTranslatorMessage & m ) const
  • +
  • bool operator< ( const TQTranslatorMessage & m ) const
  • +
  • bool operator<= ( const TQTranslatorMessage & m ) const
  • +
  • bool operator> ( const TQTranslatorMessage & m ) const
  • +
  • bool operator>= ( const TQTranslatorMessage & m ) const
  • +
+

Detailed Description

+ + +

The TQTranslatorMessage class contains a translator message and its +properties. +

+ +

This class is of no interest to most applications. It is useful +for translation tools such as TQt + Linguist. It is provided simply to make the API complete +and regular. +

For a TQTranslator object, a lookup key is a triple (context, source text, comment) that uniquely identifies a message. An +extended key is a quadruple (hash, context, source text, comment), where hash is computed from the source text +and the comment. Unless you plan to read and write messages +yourself, you need not worry about the hash value. +

TQTranslatorMessage stores this triple or quadruple and the relevant +translation if there is any. +

See also TQTranslator, Environment Classes, and Internationalization with TQt. + +


Member Type Documentation

+

TQTranslatorMessage::Prefix

+ +

Let (h, c, s, m) be the extended key. The possible +prefixes are +

    +
  • TQTranslatorMessage::NoPrefix - no prefix +
  • TQTranslatorMessage::Hash - only (h) +
  • TQTranslatorMessage::HashContext - only (h, c) +
  • TQTranslatorMessage::HashContextSourceText - only (h, c, s) +
  • TQTranslatorMessage::HashContextSourceTextComment - the whole extended key, (h, c, s, m) +

See also write() and commonPrefix(). + +


Member Function Documentation

+

TQTranslatorMessage::TQTranslatorMessage () +

+Constructs a translator message with the extended key (0, 0, 0, 0) +and TQString::null as translation. + +

TQTranslatorMessage::TQTranslatorMessage ( const char * context, const char * sourceText, const char * comment, const TQString & translation = TQString::null ) +

+Constructs an translator message with the extended key (h, context, sourceText, comment), where h is computed from +sourceText and comment, and possibly with a translation. + +

TQTranslatorMessage::TQTranslatorMessage ( TQDataStream & stream ) +

+Constructs a translator message read from the stream. The +resulting message may have any combination of content. +

See also TQTranslator::save(). + +

TQTranslatorMessage::TQTranslatorMessage ( const TQTranslatorMessage & m ) +

+Constructs a copy of translator message m. + +

const char * TQTranslatorMessage::comment () const +

+ +

Returns the comment for this message (e.g. "File|Save"). +

Warning: This may return 0 if the TQTranslator object is stripped +(compressed). + +

Prefix TQTranslatorMessage::commonPrefix ( const TQTranslatorMessage & m ) const +

+Returns the widest lookup prefix that is common to this translator +message and to message m. +

For example, if the extended key is for this message is (71, +"PrintDialog", "Yes", "Print?") and that for m is (71, +"PrintDialog", "No", "Print?"), this function returns HashContext. +

See also write(). + +

const char * TQTranslatorMessage::context () const +

+ +

Returns the context for this message (e.g. "MyDialog"). +

Warning: This may return 0 if the TQTranslator object is stripped +(compressed). + +

uint TQTranslatorMessage::hash () const +

+ +

Returns the hash value used internally to represent the lookup +key. This value is zero only if this translator message was +constructed from a stream containing invalid data. +

The hashing function is unspecified, but it will remain unchanged +in future versions of TQt. + +

bool TQTranslatorMessage::operator!= ( const TQTranslatorMessage & m ) const +

+ +

Returns TRUE if the extended key of this object is different from +that of m; otherwise returns FALSE. + +

bool TQTranslatorMessage::operator< ( const TQTranslatorMessage & m ) const +

+Returns TRUE if the extended key of this object is +lexicographically before than that of m; otherwise returns +FALSE. + +

bool TQTranslatorMessage::operator<= ( const TQTranslatorMessage & m ) const +

+ +

Returns TRUE if the extended key of this object is +lexicographically before that of m or if they are equal; +otherwise returns FALSE. + +

TQTranslatorMessage & TQTranslatorMessage::operator= ( const TQTranslatorMessage & m ) +

+Assigns message m to this translator message and returns a +reference to this translator message. + +

bool TQTranslatorMessage::operator== ( const TQTranslatorMessage & m ) const +

+Returns TRUE if the extended key of this object is equal to that of +m; otherwise returns FALSE. + +

bool TQTranslatorMessage::operator> ( const TQTranslatorMessage & m ) const +

+ +

Returns TRUE if the extended key of this object is +lexicographically after that of m; otherwise returns FALSE. + +

bool TQTranslatorMessage::operator>= ( const TQTranslatorMessage & m ) const +

+ +

Returns TRUE if the extended key of this object is +lexicographically after that of m or if they are equal; +otherwise returns FALSE. + +

void TQTranslatorMessage::setTranslation ( const TQString & translation ) +

+ +

Sets the translation of the source text to translation. +

See also translation(). + +

const char * TQTranslatorMessage::sourceText () const +

+ +

Returns the source text of this message (e.g. "&Save"). +

Warning: This may return 0 if the TQTranslator object is stripped +(compressed). + +

TQString TQTranslatorMessage::translation () const +

+ +

Returns the translation of the source text (e.g., "&Sauvegarder"). +

See also setTranslation(). + +

void TQTranslatorMessage::write ( TQDataStream & stream, bool strip = FALSE, Prefix prefix = HashContextSourceTextComment ) const +

+Writes this translator message to the stream. If strip is +FALSE (the default), all the information in the message is +written. If strip is TRUE, only the part of the extended key +specified by prefix is written with the translation (HashContextSourceTextComment by default). +

See also commonPrefix(). + + +


+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/qtsciicodec-h.html b/doc/html/qtsciicodec-h.html new file mode 100644 index 00000000..1c8f4f54 --- /dev/null +++ b/doc/html/qtsciicodec-h.html @@ -0,0 +1,139 @@ + + + + + +qtsciicodec.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qtsciicodec.h

+ +

This is the verbatim text of the qtsciicodec.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qtsciicodec.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQTsciiCodec class
+**
+** Copyright (C) 2000-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 retquirements 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.
+**
+**********************************************************************/
+
+// Most of the code here was originally written by Hans Petter Bieker,
+// and is included in TQt with the author's permission, and the grateful
+// thanks of the Trolltech team.
+
+/*
+ * Copyright (C) 2000 Hans Petter Bieker. All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef TQTSCIICODEC_H
+#define TQTSCIICODEC_H
+
+#ifndef QT_H
+#include "qtextcodec.h"
+#endif // QT_H
+
+#ifndef QT_NO_CODECS
+
+class Q_EXPORT TQTsciiCodec : public TQTextCodec {
+public:
+    virtual int mibEnum() const;
+    const char* name() const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+    using TQTextCodec::fromUnicode;
+#endif
+    TQCString fromUnicode(const TQString& uc, int& lenInOut) const;
+    TQString toUnicode(const char* chars, int len) const;
+
+    int heuristicContentMatch(const char* chars, int len) const;
+    int heuristicNameMatch(const char* hint) const;
+};
+
+#endif
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtsciicodec-members.html b/doc/html/qtsciicodec-members.html new file mode 100644 index 00000000..d63c36c3 --- /dev/null +++ b/doc/html/qtsciicodec-members.html @@ -0,0 +1,71 @@ + + + + + +TQTsciiCodec Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQTsciiCodec

+ +

This is the complete list of member functions for +TQTsciiCodec, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qtsciicodec.html b/doc/html/qtsciicodec.html new file mode 100644 index 00000000..dc5f6556 --- /dev/null +++ b/doc/html/qtsciicodec.html @@ -0,0 +1,94 @@ + + + + + +TQTsciiCodec Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQTsciiCodec Class Reference

+ +

The TQTsciiCodec class provides conversion to and from the Tamil TSCII encoding. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qtsciicodec.h> +

Inherits TQTextCodec. +

List of all member functions. +


Detailed Description

+ + + +

The TQTsciiCodec class provides conversion to and from the Tamil TSCII encoding. +

TSCII, formally the Tamil Standard Code Information Interchange +specification, is a commonly used charset for Tamils. The +official page for the standard is at +http://www.tamil.net/tscii/ +

This codec uses the mapping table found at +http://www.geocities.com/Athens/5180/tsciiset.html. +Tamil uses composed Unicode which might cause some +problems if you are using Unicode fonts instead of TSCII fonts. +

Most of the code here was written by Hans Petter Bieker +and is included in TQt with the author's permission and the +grateful thanks of the Trolltech team. +Here is the copyright statement for the code as it was at the +point of contribution. Trolltech's subsequent modifications +are covered by the usual copyright for TQt. +

+

Copyright (C) 2000 Hans Petter Bieker. All rights reserved. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +

    +
  1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +
  2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSETQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. +

See also Internationalization with TQt. + + +


+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/quridrag-members.html b/doc/html/quridrag-members.html new file mode 100644 index 00000000..b44a2d7a --- /dev/null +++ b/doc/html/quridrag-members.html @@ -0,0 +1,116 @@ + + + + + +TQUriDrag Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQUriDrag

+ +

This is the complete list of member functions for +TQUriDrag, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/quridrag.html b/doc/html/quridrag.html new file mode 100644 index 00000000..35967eae --- /dev/null +++ b/doc/html/quridrag.html @@ -0,0 +1,187 @@ + + + + + +TQUriDrag Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQUriDrag Class Reference

+ +

The TQUriDrag class provides a drag object for a list of URI references. +More... +

#include <qdragobject.h> +

Inherits TQStoredDrag. +

List of all member functions. +

Public Members

+
    +
  • TQUriDrag ( TQStrList uris, TQWidget * dragSource = 0, const char * name = 0 )
  • +
  • TQUriDrag ( TQWidget * dragSource = 0, const char * name = 0 )
  • +
  • ~TQUriDrag ()
  • +
  • void setFilenames ( const TQStringList & fnames )  (obsolete)
  • +
  • void setFileNames ( const TQStringList & fnames )
  • +
  • void setUnicodeUris ( const TQStringList & uuris )
  • +
  • virtual void setUris ( TQStrList uris )
  • +
+

Static Public Members

+ +

Detailed Description

+ + +The TQUriDrag class provides a drag object for a list of URI references. +

+

URIs are a useful way to refer to files that may be distributed +across multiple machines. A URI will often refer to a file on a +machine local to both the drag source and the drop target, so the +URI can be equivalent to passing a file name but is more +extensible. +

Use URIs in Unicode form so that the user can comfortably edit and +view them. For use in HTTP or other protocols, use the correctly +escaped ASCII form. +

You can convert a list of file names to file URIs using +setFileNames(), or into human-readble form with setUnicodeUris(). +

Static functions are provided to convert between filenames and +URIs, e.g. uriToLocalFile() and localFileToUri(), and to and from +human-readable form, e.g. uriToUnicodeUri(), unicodeUriToUri(). +You can also decode URIs from a mimesource into a list with +decodeLocalFiles() and decodeToUnicodeUris(). +

See also Drag And Drop Classes. + +


Member Function Documentation

+

TQUriDrag::TQUriDrag ( TQStrList uris, TQWidget * dragSource = 0, const char * name = 0 ) +

+Constructs an object to drag the list of URIs in uris. The dragSource and name arguments are passed on to TQStoredDrag. +Note that URIs are always in escaped UTF8 encoding. + +

TQUriDrag::TQUriDrag ( TQWidget * dragSource = 0, const char * name = 0 ) +

+Constructs an object to drag. You must call setUris() before you +start the drag(). Passes dragSource and name to the +TQStoredDrag constructor. + +

TQUriDrag::~TQUriDrag () +

+Destroys the object. + +

bool TQUriDrag::canDecode ( const TQMimeSource * e ) [static] +

+Returns TRUE if decode() would be able to decode e; otherwise +returns FALSE. + +

bool TQUriDrag::decode ( const TQMimeSource * e, TQStrList & l ) [static] +

+Decodes URIs from e, placing the result in l (which is first +cleared). +

Returns TRUE if e contained a valid list of URIs; otherwise +returns FALSE. + +

Example: dirview/dirview.cpp. +

bool TQUriDrag::decodeLocalFiles ( const TQMimeSource * e, TQStringList & l ) [static] +

+Decodes URIs from the mime source event e, converts them to +local files if they refer to local files, and places them in l +(which is first cleared). +

Returns TRUE if contained a valid list of URIs; otherwise +returns FALSE. The list will be empty if no URIs were local files. + +

Example: fileiconview/qfileiconview.cpp. +

bool TQUriDrag::decodeToUnicodeUris ( const TQMimeSource * e, TQStringList & l ) [static] +

+Decodes URIs from the mime source event e, converts them to +Unicode URIs (only useful for displaying to humans), placing them +in l (which is first cleared). +

Returns TRUE if contained a valid list of URIs; otherwise +returns FALSE. + +

TQCString TQUriDrag::localFileToUri ( const TQString & filename ) [static] +

+Returns the URI equivalent to the absolute local file filename. +

See also uriToLocalFile(). + +

void TQUriDrag::setFileNames ( const TQStringList & fnames ) +

+Sets the URIs to be the local-file URIs equivalent to fnames. +

See also localFileToUri() and setUris(). + +

Example: dirview/dirview.cpp. +

void TQUriDrag::setFilenames ( const TQStringList & fnames ) +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Use setFileNames() instead (notice the N). + +

void TQUriDrag::setUnicodeUris ( const TQStringList & uuris ) +

+Sets the URIs in uuris to be the Unicode URIs (only useful for +displaying to humans). +

See also localFileToUri() and setUris(). + +

void TQUriDrag::setUris ( TQStrList uris ) [virtual] +

+Changes the list of uris to be dragged. +

Note that URIs are always in escaped UTF8 encoding. + +

TQCString TQUriDrag::unicodeUriToUri ( const TQString & uuri ) [static] +

+Returns the URI equivalent of the Unicode URI given in uuri +(only useful for displaying to humans). +

See also uriToLocalFile(). + +

TQString TQUriDrag::uriToLocalFile ( const char * uri ) [static] +

+Returns the name of a local file equivalent to uri or a null +string if uri is not a local file. +

Note that URIs are always in escaped UTF8 encoding. +

See also localFileToUri(). + +

Example: dirview/dirview.cpp. +

TQString TQUriDrag::uriToUnicodeUri ( const char * uri ) [static] +

+Returns the Unicode URI (only useful for displaying to humans) +equivalent of uri. +

Note that URIs are always in escaped UTF8 encoding. +

See also localFileToUri(). + + +


+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/qurl-h.html b/doc/html/qurl-h.html new file mode 100644 index 00000000..397bc5ee --- /dev/null +++ b/doc/html/qurl-h.html @@ -0,0 +1,175 @@ + + + + + +qurl.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qurl.h

+ +

This is the verbatim text of the qurl.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qurl.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQUrl class
+**
+** Created : 950429
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQURL_H
+#define TQURL_H
+
+#ifndef QT_H
+#include "qstring.h"
+#endif // QT_H
+
+#ifndef QT_NO_URL
+
+class TQUrlPrivate;
+
+class Q_EXPORT TQUrl
+{
+public:
+    TQUrl();
+    TQUrl( const TQString& url );
+    TQUrl( const TQUrl& url );
+    TQUrl( const TQUrl& url, const TQString& relUrl, bool checkSlash = FALSE );
+    virtual ~TQUrl();
+
+    TQString protocol() const;
+    virtual void setProtocol( const TQString& protocol );
+
+    TQString user() const;
+    virtual void setUser( const TQString& user );
+    bool hasUser() const;
+
+    TQString password() const;
+    virtual void setPassword( const TQString& pass );
+    bool hasPassword() const;
+
+    TQString host() const;
+    virtual void setHost( const TQString& user );
+    bool hasHost() const;
+
+    int port() const;
+    virtual void setPort( int port );
+    bool hasPort() const;
+
+    TQString path( bool correct = TRUE ) const;
+    virtual void setPath( const TQString& path );
+    bool hasPath() const;
+
+    virtual void setEncodedPathAndQuery( const TQString& enc );
+    TQString encodedPathAndQuery();
+
+    virtual void setQuery( const TQString& txt );
+    TQString query() const;
+
+    TQString ref() const;
+    virtual void setRef( const TQString& txt );
+    bool hasRef() const;
+
+    bool isValid() const;
+    bool isLocalFile() const;
+
+    virtual void addPath( const TQString& path );
+    virtual void setFileName( const TQString& txt );
+
+    TQString fileName() const;
+    TQString dirPath() const;
+
+    TQUrl& operator=( const TQUrl& url );
+    TQUrl& operator=( const TQString& url );
+
+    bool operator==( const TQUrl& url ) const;
+    bool operator==( const TQString& url ) const;
+
+    static void decode( TQString& url );
+    static void encode( TQString& url );
+
+    operator TQString() const;
+    virtual TQString toString( bool encodedPath = FALSE, bool forcePrependProtocol = TRUE ) const;
+
+    virtual bool cdUp();
+
+    static bool isRelativeUrl( const TQString &url );
+
+protected:
+    virtual void reset();
+    virtual bool parse( const TQString& url );
+
+private:
+    TQUrlPrivate *d;
+
+};
+
+#endif //QT_NO_URL
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qurl-members.html b/doc/html/qurl-members.html new file mode 100644 index 00000000..a08237c2 --- /dev/null +++ b/doc/html/qurl-members.html @@ -0,0 +1,88 @@ + + + + + +TQUrl Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQUrl

+ +

This is the complete list of member functions for +TQUrl, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qurl.html b/doc/html/qurl.html new file mode 100644 index 00000000..8464f882 --- /dev/null +++ b/doc/html/qurl.html @@ -0,0 +1,478 @@ + + + + + +TQUrl Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQUrl Class Reference
[network module]

+ +

The TQUrl class provides a URL parser and simplifies working with URLs. +More... +

#include <qurl.h> +

Inherited by TQUrlOperator. +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Protected Members

+
    +
  • virtual void reset ()
  • +
  • virtual bool parse ( const TQString & url )
  • +
+

Detailed Description

+ + +

The TQUrl class provides a URL parser and simplifies working with URLs. + +

+ + +

+

The TQUrl class is provided for simple work with URLs. It can +parse, decode, encode, etc. +

TQUrl works with the decoded path and encoded query in turn. +

Example: +

http://www.trolltech.com:80/cgi-bin/test%20me.pl?cmd=Hello%20you +

+
Function Returns +
protocol() "http" +
host() "www.trolltech.com" +
port() 80 +
path() "/cgi-bin/test me.pl" +
fileName() "test me.pl" +
query() "cmd=Hello%20you" +
+

Example: +

http://doc.trolltech.com/qdockarea.html#lines +

+
Function Returns +
protocol() "http" +
host() "doc.trolltech.com" +
fileName() "qdockarea.html" +
ref() "lines" +
+

The individual parts of a URL can be set with setProtocol(), +setHost(), setPort(), setPath(), setFileName(), setRef() and +setQuery(). A URL could contain, for example, an ftp address which +retquires a user name and password; these can be set with setUser() +and setPassword(). +

Because path is always encoded internally you must not use "%00" +in the path, although this is okay (but not recommended) for the +query. +

TQUrl is normally used like this: +

+    TQUrl url( "http://www.trolltech.com" );
+    // or
+    TQUrl url( "file:/home/myself/Mail", "Inbox" );
+    
+ +

You can then access and manipulate the various parts of the URL. +

To make it easy to work with TQUrls and TQStrings, TQUrl implements +the necessary cast and assignment operators so you can do +following: +

+    TQUrl url( "http://www.trolltech.com" );
+    TQString s = url;
+    // or
+    TQString s( "http://www.trolltech.com" );
+    TQUrl url( s );
+    
+ +

Use the static functions, encode() and decode() to encode or +decode a URL in a string. (They operate on the string in-place.) +The isRelativeUrl() static function returns TRUE if the given +string is a relative URL. +

If you want to use a URL to work on a hierarchical structure (e.g. +a local or remote filesystem), you might want to use the subclass +TQUrlOperator. +

See also TQUrlOperator, Input/Output and Networking, and Miscellaneous Classes. + +


Member Function Documentation

+

TQUrl::TQUrl () +

+Constructs an empty URL that is invalid. + +

TQUrl::TQUrl ( const TQString & url ) +

+Constructs a URL by parsing the string url. +

If you pass a string like "/home/qt", the "file" protocol is +assumed. + +

TQUrl::TQUrl ( const TQUrl & url ) +

+Copy constructor. Copies the data of url. + +

TQUrl::TQUrl ( const TQUrl & url, const TQString & relUrl, bool checkSlash = FALSE ) +

+Constructs an URL taking url as the base (context) and +relUrl as a relative URL to url. If relUrl is not relative, +relUrl is taken as the new URL. +

For example, the path of +

+    TQUrl url( "ftp://ftp.trolltech.com/qt/source", "qt-2.1.0.tar.gz" );
+    
+ +will be "/qt/srource/qt-2.1.0.tar.gz". +

On the other hand, +

+    TQUrl url( "ftp://ftp.trolltech.com/qt/source", "/usr/local" );
+    
+ +will result in a new URL, "ftp://ftp.trolltech.com/usr/local", +because "/usr/local" isn't relative. +

Similarly, +

+    TQUrl url( "ftp://ftp.trolltech.com/qt/source", "file:/usr/local" );
+    
+ +will result in a new URL, with "/usr/local" as the path +and "file" as the protocol. +

Normally it is expected that the path of url points to a +directory, even if the path has no slash at the end. But if you +want the constructor to handle the last part of the path as a file +name if there is no slash at the end, and to let it be replaced by +the file name of relUrl (if it contains one), set checkSlash +to TRUE. + +

TQUrl::~TQUrl () [virtual] +

+Destructor. + +

void TQUrl::addPath ( const TQString & pa ) [virtual] +

+Adds the path pa to the path of the URL. +

See also setPath() and hasPath(). + +

bool TQUrl::cdUp () [virtual] +

+Changes the directory to one directory up. +

See also setPath(). + +

void TQUrl::decode ( TQString & url ) [static] +

+Decodes the url in-place into UTF-8. For example +

+        TQString url = "http%3A//www%20trolltech%20com"
+        TQUrl::decode( url );
+        // url is now "http://www.trolltech.com"
+    
+ +

See also encode(). + +

TQString TQUrl::dirPath () const +

+Returns the directory path of the URL. This is the part of the +path of the URL without the fileName(). See the documentation of +fileName() for a discussion of what is handled as file name and +what is handled as directory path. +

See also setPath() and hasPath(). + +

Example: network/networkprotocol/nntp.cpp. +

void TQUrl::encode ( TQString & url ) [static] +

+Encodes the url in-place into UTF-8. For example +

+        TQString url = http://www.trolltech.com
+        TQUrl::encode( url );
+        // url is now "http%3A//www%20trolltech%20com"
+    
+ +

See also decode(). + +

Example: network/archivesearch/archivedialog.ui.h. +

TQString TQUrl::encodedPathAndQuery () +

+Returns the encoded path and query. +

See also decode(). + +

TQString TQUrl::fileName () const +

+Returns the file name of the URL. If the path of the URL doesn't +have a slash at the end, the part between the last slash and the +end of the path string is considered to be the file name. If the +path has a slash at the end, an empty string is returned here. +

See also setFileName(). + +

Example: network/networkprotocol/nntp.cpp. +

bool TQUrl::hasHost () const +

+Returns TRUE if the URL contains a hostname; otherwise returns +FALSE. +

See also setHost(). + +

bool TQUrl::hasPassword () const +

+Returns TRUE if the URL contains a password; otherwise returns +FALSE. +

Warning: Passwords passed in URLs are normally insecure; this +is due to the mechanism, not because of TQt. +

See also setPassword() and setUser(). + +

bool TQUrl::hasPath () const +

+Returns TRUE if the URL contains a path; otherwise returns FALSE. +

See also path() and setPath(). + +

bool TQUrl::hasPort () const +

+Returns TRUE if the URL contains a port; otherwise returns FALSE. +

See also setPort(). + +

bool TQUrl::hasRef () const +

+Returns TRUE if the URL has a reference; otherwise returns FALSE. +

See also setRef(). + +

bool TQUrl::hasUser () const +

+Returns TRUE if the URL contains a username; otherwise returns +FALSE. +

See also setUser() and setPassword(). + +

TQString TQUrl::host () const +

+Returns the hostname of the URL. +

See also setHost() and hasHost(). + +

Example: network/archivesearch/archivedialog.ui.h. +

bool TQUrl::isLocalFile () const +

+Returns TRUE if the URL is a local file; otherwise returns FALSE. + +

Example: qdir/qdir.cpp. +

bool TQUrl::isRelativeUrl ( const TQString & url ) [static] +

+Returns TRUE if url is relative; otherwise returns FALSE. + +

bool TQUrl::isValid () const +

+Returns TRUE if the URL is valid; otherwise returns FALSE. A URL +is invalid if it cannot be parsed, for example. + +

TQUrl::operator TQString () const +

+Composes a string version of the URL and returns it. +

See also TQUrl::toString(). + +

TQUrl & TQUrl::operator= ( const TQUrl & url ) +

+Assigns the data of url to this class. + +

TQUrl & TQUrl::operator= ( const TQString & url ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Parses url and assigns the resulting data to this class. +

If you pass a string like "/home/qt" the "file" protocol will be +assumed. + +

bool TQUrl::operator== ( const TQUrl & url ) const +

+Compares this URL with url and returns TRUE if they are equal; +otherwise returns FALSE. + +

bool TQUrl::operator== ( const TQString & url ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Compares this URL with url. url is parsed first. Returns +TRUE if url is equal to this url; otherwise returns FALSE. + +

bool TQUrl::parse ( const TQString & url ) [virtual protected] +

+Parses the url. + +

TQString TQUrl::password () const +

+Returns the password of the URL. +

Warning: Passwords passed in URLs are normally insecure; this +is due to the mechanism, not because of TQt. +

See also setPassword() and setUser(). + +

TQString TQUrl::path ( bool correct = TRUE ) const +

+Returns the path of the URL. If correct is TRUE, the path is +cleaned (deals with too many or too few slashes, cleans things +like "/../..", etc). Otherwise path() returns exactly the path +that was parsed or set. +

See also setPath() and hasPath(). + +

Example: qdir/qdir.cpp. +

int TQUrl::port () const +

+Returns the port of the URL or -1 if no port has been set. +

See also setPort(). + +

TQString TQUrl::protocol () const +

+Returns the protocol of the URL. Typically, "file", "http", "ftp", +etc. +

See also setProtocol(). + +

TQString TQUrl::query () const +

+Returns the (encoded) query of the URL. +

See also setQuery() and decode(). + +

TQString TQUrl::ref () const +

+Returns the (encoded) reference of the URL. +

See also setRef(), hasRef(), and decode(). + +

void TQUrl::reset () [virtual protected] +

+Resets all parts of the URL to their default values and +invalidates it. + +

void TQUrl::setEncodedPathAndQuery ( const TQString & pathAndQuery ) [virtual] +

+Parses pathAndQuery for a path and query and sets those values. +The whole string must be encoded. +

See also encode(). + +

void TQUrl::setFileName ( const TQString & name ) [virtual] +

+Sets the file name of the URL to name. If this URL contains a +fileName(), the original file name is replaced by name. +

See the documentation of fileName() for a more detailed discussion +of what is handled as file name and what is handled as a directory +path. +

See also fileName(). + +

void TQUrl::setHost ( const TQString & host ) [virtual] +

+Sets the hostname of the URL to host. +

See also host() and hasHost(). + +

void TQUrl::setPassword ( const TQString & pass ) [virtual] +

+Sets the password of the URL to pass. +

Warning: Passwords passed in URLs are normally insecure; this +is due to the mechanism, not because of TQt. +

See also password() and setUser(). + +

void TQUrl::setPath ( const TQString & path ) [virtual] +

+Sets the path of the URL to path. +

See also path() and hasPath(). + +

void TQUrl::setPort ( int port ) [virtual] +

+Sets the port of the URL to port. +

See also port(). + +

void TQUrl::setProtocol ( const TQString & protocol ) [virtual] +

+Sets the protocol of the URL to protocol. Typically, "file", +"http", "ftp", etc. +

See also protocol(). + +

void TQUrl::setQuery ( const TQString & txt ) [virtual] +

+Sets the query of the URL to txt. txt must be encoded. +

See also query() and encode(). + +

void TQUrl::setRef ( const TQString & txt ) [virtual] +

+Sets the reference of the URL to txt. txt must be encoded. +

See also ref(), hasRef(), and encode(). + +

void TQUrl::setUser ( const TQString & user ) [virtual] +

+Sets the username of the URL to user. +

See also user() and setPassword(). + +

TQString TQUrl::toString ( bool encodedPath = FALSE, bool forcePrependProtocol = TRUE ) const [virtual] +

+Composes a string version of the URL and returns it. If encodedPath is TRUE the path in the returned string is encoded. If +forcePrependProtocol is TRUE and encodedPath looks like a +local filename, the "file:/" protocol is also prepended. +

See also encode() and decode(). + +

TQString TQUrl::user () const +

+Returns the username of the URL. +

See also setUser() and setPassword(). + + +


+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/qurlinfo-h.html b/doc/html/qurlinfo-h.html new file mode 100644 index 00000000..ccb38487 --- /dev/null +++ b/doc/html/qurlinfo-h.html @@ -0,0 +1,189 @@ + + + + + +qurlinfo.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qurlinfo.h

+ +

This is the verbatim text of the qurlinfo.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qurlinfo.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQUrlInfo class
+**
+** Created : 950429
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQURLINFO_H
+#define TQURLINFO_H
+
+#ifndef QT_H
+#include "qdatetime.h"
+#include "qstring.h"
+#if defined(QT_ABI_QT4)
+#include "qiodevice.h"
+#endif
+#endif // QT_H
+
+class TQUrlOperator;
+class TQUrl;
+class TQUrlInfoPrivate;
+
+class Q_EXPORT TQUrlInfo
+{
+public:
+    enum PermissionSpec {
+	ReadOwner = 00400, WriteOwner = 00200, ExeOwner = 00100,
+	ReadGroup = 00040, WriteGroup = 00020, ExeGroup = 00010,
+	ReadOther = 00004, WriteOther = 00002, ExeOther = 00001 };
+
+    TQUrlInfo();
+    TQUrlInfo( const TQUrlOperator &path, const TQString &file );
+    TQUrlInfo( const TQUrlInfo &ui );
+#if (QT_VERSION-0 >= 0x040000)
+#error "TQUrlInfo::TQUrlInfo() should accept TQIODevice::Offset instead of uint"
+#elif defined(QT_ABI_QT4)
+    TQUrlInfo( const TQString &name, int permissions, const TQString &owner,
+	      const TQString &group, TQIODevice::Offset size, const TQDateTime &lastModified,
+	      const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,
+	      bool isWritable, bool isReadable, bool isExecutable );
+    TQUrlInfo( const TQUrl &url, int permissions, const TQString &owner,
+	      const TQString &group, TQIODevice::Offset size, const TQDateTime &lastModified,
+	      const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,
+	      bool isWritable, bool isReadable, bool isExecutable );
+#else
+    TQUrlInfo( const TQString &name, int permissions, const TQString &owner,
+	      const TQString &group, uint size, const TQDateTime &lastModified,
+	      const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,
+	      bool isWritable, bool isReadable, bool isExecutable );
+    TQUrlInfo( const TQUrl &url, int permissions, const TQString &owner,
+	      const TQString &group, uint size, const TQDateTime &lastModified,
+	      const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,
+	      bool isWritable, bool isReadable, bool isExecutable );
+#endif
+    TQUrlInfo &operator=( const TQUrlInfo &ui );
+    virtual ~TQUrlInfo();
+
+    virtual void setName( const TQString &name );
+    virtual void setDir( bool b );
+    virtual void setFile( bool b );
+    virtual void setSymLink( bool b );
+    virtual void setOwner( const TQString &s );
+    virtual void setGroup( const TQString &s );
+#if (QT_VERSION-0 >= 0x040000)
+#error "TQUrlInfo::setSize() should accept TQIODevice::Offset instead of uint"
+#elif defined(QT_ABI_QT4)
+    virtual void setSize( TQIODevice::Offset size );
+#else
+    virtual void setSize( uint size );
+#endif
+    virtual void setWritable( bool b );
+    virtual void setReadable( bool b );
+    virtual void setPermissions( int p );
+    virtual void setLastModified( const TQDateTime &dt );
+
+    bool isValid() const;
+
+    TQString name() const;
+    int permissions() const;
+    TQString owner() const;
+    TQString group() const;
+#if (QT_VERSION-0 >= 0x040000)
+#error "TQUrlInfo::size() should return TQIODevice::Offset instead of uint"
+#elif defined(QT_ABI_QT4)
+    TQIODevice::Offset size() const;
+#else
+    uint size() const;
+#endif
+    TQDateTime lastModified() const;
+    TQDateTime lastRead() const;
+    bool isDir() const;
+    bool isFile() const;
+    bool isSymLink() const;
+    bool isWritable() const;
+    bool isReadable() const;
+    bool isExecutable() const;
+
+    static bool greaterThan( const TQUrlInfo &i1, const TQUrlInfo &i2,
+			     int sortBy );
+    static bool lessThan( const TQUrlInfo &i1, const TQUrlInfo &i2,
+			  int sortBy );
+    static bool equal( const TQUrlInfo &i1, const TQUrlInfo &i2,
+		       int sortBy );
+
+    bool operator==( const TQUrlInfo &i ) const;
+private:
+    TQUrlInfoPrivate *d;
+
+};
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qurlinfo-members.html b/doc/html/qurlinfo-members.html new file mode 100644 index 00000000..5ce5034a --- /dev/null +++ b/doc/html/qurlinfo-members.html @@ -0,0 +1,78 @@ + + + + + +TQUrlInfo Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQUrlInfo

+ +

This is the complete list of member functions for +TQUrlInfo, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qurlinfo.html b/doc/html/qurlinfo.html new file mode 100644 index 00000000..002f313f --- /dev/null +++ b/doc/html/qurlinfo.html @@ -0,0 +1,367 @@ + + + + + +TQUrlInfo Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQUrlInfo Class Reference

+ +

The TQUrlInfo class stores information about URLs. +More... +

#include <qurlinfo.h> +

List of all member functions. +

Public Members

+
    +
  • enum PermissionSpec { ReadOwner = 00400, WriteOwner = 00200, ExeOwner = 00100, ReadGroup = 00040, WriteGroup = 00020, ExeGroup = 00010, ReadOther = 00004, WriteOther = 00002, ExeOther = 00001 }
  • +
  • TQUrlInfo ()
  • +
  • TQUrlInfo ( const TQUrlOperator & path, const TQString & file )
  • +
  • TQUrlInfo ( const TQUrlInfo & ui )
  • +
  • TQUrlInfo ( const TQString & name, int permissions, const TQString & owner, const TQString & group, uint size, const TQDateTime & lastModified, const TQDateTime & lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable )
  • +
  • TQUrlInfo ( const TQUrl & url, int permissions, const TQString & owner, const TQString & group, uint size, const TQDateTime & lastModified, const TQDateTime & lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable )
  • +
  • TQUrlInfo & operator= ( const TQUrlInfo & ui )
  • +
  • virtual ~TQUrlInfo ()
  • +
  • virtual void setName ( const TQString & name )
  • +
  • virtual void setDir ( bool b )
  • +
  • virtual void setFile ( bool b )
  • +
  • virtual void setSymLink ( bool b )
  • +
  • virtual void setOwner ( const TQString & s )
  • +
  • virtual void setGroup ( const TQString & s )
  • +
  • virtual void setSize ( uint size )
  • +
  • virtual void setWritable ( bool b )
  • +
  • virtual void setReadable ( bool b )
  • +
  • virtual void setPermissions ( int p )
  • +
  • virtual void setLastModified ( const TQDateTime & dt )
  • +
  • bool isValid () const
  • +
  • TQString name () const
  • +
  • int permissions () const
  • +
  • TQString owner () const
  • +
  • TQString group () const
  • +
  • uint size () const
  • +
  • TQDateTime lastModified () const
  • +
  • TQDateTime lastRead () const
  • +
  • bool isDir () const
  • +
  • bool isFile () const
  • +
  • bool isSymLink () const
  • +
  • bool isWritable () const
  • +
  • bool isReadable () const
  • +
  • bool isExecutable () const
  • +
  • bool operator== ( const TQUrlInfo & i ) const
  • +
+

Static Public Members

+
    +
  • bool greaterThan ( const TQUrlInfo & i1, const TQUrlInfo & i2, int sortBy )
  • +
  • bool lessThan ( const TQUrlInfo & i1, const TQUrlInfo & i2, int sortBy )
  • +
  • bool equal ( const TQUrlInfo & i1, const TQUrlInfo & i2, int sortBy )
  • +
+

Detailed Description

+ + +The TQUrlInfo class stores information about URLs. +

+ +

This class is just a container for storing information about URLs, +which is why all information must be passed in the constructor. +

Unless you're reimplementing a network protocol you're unlikely to +create TQUrlInfo objects yourself, but you may receive TQUrlInfo +objects from functions, e.g. TQUrlOperator::info(). +

The information that can be retrieved includes name(), +permissions(), owner(), group(), size(), lastModified(), +lastRead(), isDir(), isFile(), isSymLink(), isWritable(), +isReadable() and isExecutable(). +

See also Input/Output and Networking and Miscellaneous Classes. + +


Member Type Documentation

+

TQUrlInfo::PermissionSpec

+ +

This enum is used by the permissions() function to report the +permissions of a file. +

    +
  • TQUrlInfo::ReadOwner - The file is readable by the owner of the file. +
  • TQUrlInfo::WriteOwner - The file is writable by the owner of the file. +
  • TQUrlInfo::ExeOwner - The file is executable by the owner of the file. +
  • TQUrlInfo::ReadGroup - The file is readable by the group. +
  • TQUrlInfo::WriteGroup - The file is writable by the group. +
  • TQUrlInfo::ExeGroup - The file is executable by the group. +
  • TQUrlInfo::ReadOther - The file is readable by anyone. +
  • TQUrlInfo::WriteOther - The file is writable by anyone. +
  • TQUrlInfo::ExeOther - The file is executable by anyone. +
+

Member Function Documentation

+

TQUrlInfo::TQUrlInfo () +

+Constructs an invalid TQUrlInfo object with default values. +

See also isValid(). + +

TQUrlInfo::TQUrlInfo ( const TQUrlOperator & path, const TQString & file ) +

+Constructs a TQUrlInfo object with information about the file file in the path. It tries to find the information about the file in the TQUrlOperator path. +

If the information is not found, this constructor creates an +invalid TQUrlInfo, i.e. isValid() returns FALSE. You should always +check if the URL info is valid before relying on the return values +of any getter functions. +

If file is empty, it defaults to the TQUrlOperator path, i.e. +to the directory. +

See also isValid() and TQUrlOperator::info(). + +

TQUrlInfo::TQUrlInfo ( const TQUrlInfo & ui ) +

+Copy constructor, copies ui to this URL info object. + +

TQUrlInfo::TQUrlInfo ( const TQString & name, int permissions, const TQString & owner, const TQString & group, uint size, const TQDateTime & lastModified, const TQDateTime & lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable ) +

+Constructs a TQUrlInfo object by specifying all the URL's +information. +

The information that is passed is the name, file permissions, owner and group and the file's size. Also +passed is the lastModified date/time and the lastRead +date/time. Flags are also passed, specifically, isDir, isFile, isSymLink, isWritable, isReadable and isExecutable. + +

TQUrlInfo::TQUrlInfo ( const TQUrl & url, int permissions, const TQString & owner, const TQString & group, uint size, const TQDateTime & lastModified, const TQDateTime & lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable ) +

+Constructs a TQUrlInfo object by specifying all the URL's +information. +

The information that is passed is the url, file permissions, owner and group and the file's size. Also +passed is the lastModified date/time and the lastRead +date/time. Flags are also passed, specifically, isDir, isFile, isSymLink, isWritable, isReadable and isExecutable. + +

TQUrlInfo::~TQUrlInfo () [virtual] +

+Destroys the URL info object. +

The TQUrlOperator object to which this URL referred (if any) is not +affected. + +

bool TQUrlInfo::equal ( const TQUrlInfo & i1, const TQUrlInfo & i2, int sortBy ) [static] +

+Returns TRUE if i1 equals to i2; otherwise returns FALSE. +The objects are compared by the value, which is specified by sortBy. This must be one of TQDir::Name, TQDir::Time or TQDir::Size. + +

bool TQUrlInfo::greaterThan ( const TQUrlInfo & i1, const TQUrlInfo & i2, int sortBy ) [static] +

+Returns TRUE if i1 is greater than i2; otherwise returns +FALSE. The objects are compared by the value, which is specified +by sortBy. This must be one of TQDir::Name, TQDir::Time or +TQDir::Size. + +

TQString TQUrlInfo::group () const +

+Returns the group of the URL. +

See also isValid(). + +

bool TQUrlInfo::isDir () const +

+Returns TRUE if the URL is a directory; otherwise returns FALSE. +

See also isValid(). + +

Examples: network/ftpclient/ftpmainwindow.ui.h and network/networkprotocol/nntp.cpp. +

bool TQUrlInfo::isExecutable () const +

+Returns TRUE if the URL is executable; otherwise returns FALSE. +

See also isValid(). + +

bool TQUrlInfo::isFile () const +

+Returns TRUE if the URL is a file; otherwise returns FALSE. +

See also isValid(). + +

bool TQUrlInfo::isReadable () const +

+Returns TRUE if the URL is readable; otherwise returns FALSE. +

See also isValid(). + +

bool TQUrlInfo::isSymLink () const +

+Returns TRUE if the URL is a symbolic link; otherwise returns FALSE. +

See also isValid(). + +

bool TQUrlInfo::isValid () const +

+Returns TRUE if the URL info is valid; otherwise returns FALSE. +Valid means that the TQUrlInfo contains real information. For +example, a call to TQUrlOperator::info() might return a an invalid +TQUrlInfo, if no information about the requested entry is +available. +

You should always check if the URL info is valid before relying on +the values. + +

bool TQUrlInfo::isWritable () const +

+Returns TRUE if the URL is writable; otherwise returns FALSE. +

See also isValid(). + +

TQDateTime TQUrlInfo::lastModified () const +

+Returns the last modification date of the URL. +

See also isValid(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

TQDateTime TQUrlInfo::lastRead () const +

+Returns the date when the URL was last read. +

See also isValid(). + +

bool TQUrlInfo::lessThan ( const TQUrlInfo & i1, const TQUrlInfo & i2, int sortBy ) [static] +

+Returns TRUE if i1 is less than i2; otherwise returns FALSE. +The objects are compared by the value, which is specified by sortBy. This must be one of TQDir::Name, TQDir::Time or TQDir::Size. + +

TQString TQUrlInfo::name () const +

+Returns the file name of the URL. +

See also isValid(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. +

TQUrlInfo & TQUrlInfo::operator= ( const TQUrlInfo & ui ) +

+Assigns the values of ui to this TQUrlInfo object. + +

bool TQUrlInfo::operator== ( const TQUrlInfo & i ) const +

+Compares this TQUrlInfo with i and returns TRUE if they are +equal; otherwise returns FALSE. + +

TQString TQUrlInfo::owner () const +

+Returns the owner of the URL. +

See also isValid(). + +

int TQUrlInfo::permissions () const +

+Returns the permissions of the URL. You can use the PermissionSpec flags +to test for certain permissions. +

See also isValid(). + +

void TQUrlInfo::setDir ( bool b ) [virtual] +

+If b is TRUE then the URL is set to be a directory; if \b is +FALSE then the URL is set not to be a directory (which normally +means it is a file). (Note that a URL can refer to both a file and +a directory even though most file systems do not support this.) +

If you call this function for an invalid URL info, this function +turns it into a valid one. +

See also isValid(). + +

Example: network/networkprotocol/nntp.cpp. +

void TQUrlInfo::setFile ( bool b ) [virtual] +

+If b is TRUE then the URL is set to be a file; if \b is FALSE +then the URL is set not to be a file (which normally means it is a +directory). (Note that a URL can refer to both a file and a +directory even though most file systems do not support this.) +

If you call this function for an invalid URL info, this function +turns it into a valid one. +

See also isValid(). + +

Example: network/networkprotocol/nntp.cpp. +

void TQUrlInfo::setGroup ( const TQString & s ) [virtual] +

+Specifies that the owning group of the URL is called s. +

If you call this function for an invalid URL info, this function +turns it into a valid one. +

See also isValid(). + +

void TQUrlInfo::setLastModified ( const TQDateTime & dt ) [virtual] +

+Specifies that the object the URL refers to was last modified at +dt. +

If you call this function for an invalid URL info, this function +turns it into a valid one. +

See also isValid(). + +

void TQUrlInfo::setName ( const TQString & name ) [virtual] +

+Sets the name of the URL to name. The name is the full text, +for example, "http://doc.trolltech.com/qurlinfo.html". +

If you call this function for an invalid URL info, this function +turns it into a valid one. +

See also isValid(). + +

Example: network/networkprotocol/nntp.cpp. +

void TQUrlInfo::setOwner ( const TQString & s ) [virtual] +

+Specifies that the owner of the URL is called s. +

If you call this function for an invalid URL info, this function +turns it into a valid one. +

See also isValid(). + +

void TQUrlInfo::setPermissions ( int p ) [virtual] +

+Specifies that the URL has access permisions, p. +

If you call this function for an invalid URL info, this function +turns it into a valid one. +

See also isValid(). + +

void TQUrlInfo::setReadable ( bool b ) [virtual] +

+Specifies that the URL is readable if b is TRUE and not +readable if b is FALSE. +

If you call this function for an invalid URL info, this function +turns it into a valid one. +

See also isValid(). + +

Example: network/networkprotocol/nntp.cpp. +

void TQUrlInfo::setSize ( uint size ) [virtual] +

+Specifies the size of the URL. +

If you call this function for an invalid URL info, this function +turns it into a valid one. +

See also isValid(). + +

void TQUrlInfo::setSymLink ( bool b ) [virtual] +

+Specifies that the URL refers to a symbolic link if b is TRUE +and that it does not if b is FALSE. +

If you call this function for an invalid URL info, this function +turns it into a valid one. +

See also isValid(). + +

Example: network/networkprotocol/nntp.cpp. +

void TQUrlInfo::setWritable ( bool b ) [virtual] +

+Specifies that the URL is writable if b is TRUE and not +writable if b is FALSE. +

If you call this function for an invalid URL info, this function +turns it into a valid one. +

See also isValid(). + +

Example: network/networkprotocol/nntp.cpp. +

uint TQUrlInfo::size () const +

+Returns the size of the URL. +

See also isValid(). + +

Example: network/ftpclient/ftpmainwindow.ui.h. + +


+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/qurloperator-h.html b/doc/html/qurloperator-h.html new file mode 100644 index 00000000..cf302d9d --- /dev/null +++ b/doc/html/qurloperator-h.html @@ -0,0 +1,174 @@ + + + + + +qurloperator.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qurloperator.h

+ +

This is the verbatim text of the qurloperator.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qurloperator.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQUrlOperator class
+**
+** Created : 950429
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQURLOPERATOR_H
+#define TQURLOPERATOR_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qurl.h"
+#include "qptrlist.h"
+#include "qnetworkprotocol.h"
+#include "qstringlist.h" // TQString->TQStringList conversion
+#endif // QT_H
+
+#ifndef QT_NO_NETWORKPROTOCOL
+
+class TQUrlInfo;
+class TQUrlOperatorPrivate;
+
+class Q_EXPORT TQUrlOperator : public TQObject, public TQUrl
+{
+    friend class TQNetworkProtocol;
+
+    Q_OBJECT
+
+public:
+    TQUrlOperator();
+    TQUrlOperator( const TQString &urL );
+    TQUrlOperator( const TQUrlOperator& url );
+    TQUrlOperator( const TQUrlOperator& url, const TQString& relUrl, bool checkSlash = FALSE );
+    virtual ~TQUrlOperator();
+
+    virtual void setPath( const TQString& path );
+    virtual bool cdUp();
+
+    virtual const TQNetworkOperation *listChildren();
+    virtual const TQNetworkOperation *mkdir( const TQString &dirname );
+    virtual const TQNetworkOperation *remove( const TQString &filename );
+    virtual const TQNetworkOperation *rename( const TQString &oldname, const TQString &newname );
+    virtual const TQNetworkOperation *get( const TQString &location = TQString::null );
+    virtual const TQNetworkOperation *put( const TQByteArray &data, const TQString &location = TQString::null  );
+    virtual TQPtrList<TQNetworkOperation> copy( const TQString &from, const TQString &to, bool move = FALSE, bool toPath = TRUE );
+    virtual void copy( const TQStringList &files, const TQString &dest, bool move = FALSE );
+    virtual bool isDir( bool *ok = 0 );
+
+    virtual void setNameFilter( const TQString &nameFilter );
+    TQString nameFilter() const;
+
+    virtual TQUrlInfo info( const TQString &entry ) const;
+
+    TQUrlOperator& operator=( const TQUrlOperator &url );
+    TQUrlOperator& operator=( const TQString &url );
+
+    virtual void stop();
+
+signals:
+    void newChildren( const TQValueList<TQUrlInfo> &, TQNetworkOperation *res );
+    void finished( TQNetworkOperation *res );
+    void start( TQNetworkOperation *res );
+    void createdDirectory( const TQUrlInfo &, TQNetworkOperation *res );
+    void removed( TQNetworkOperation *res );
+    void itemChanged( TQNetworkOperation *res );
+    void data( const TQByteArray &, TQNetworkOperation *res );
+    void dataTransferProgress( int bytesDone, int bytesTotal, TQNetworkOperation *res );
+    void startedNextCopy( const TQPtrList<TQNetworkOperation> &lst );
+    void connectionStateChanged( int state, const TQString &data );
+
+protected:
+    void reset();
+    bool parse( const TQString& url );
+    virtual bool checkValid();
+    virtual void clearEntries();
+    void getNetworkProtocol();
+    void deleteNetworkProtocol();
+
+private slots:
+    const TQNetworkOperation *startOperation( TQNetworkOperation *op );
+    void copyGotData( const TQByteArray &data, TQNetworkOperation *op );
+    void continueCopy( TQNetworkOperation *op );
+    void finishedCopy();
+    void addEntry( const TQValueList<TQUrlInfo> &i );
+    void slotItemChanged( TQNetworkOperation *op );
+
+private:
+    void deleteOperation( TQNetworkOperation *op );
+
+    TQUrlOperatorPrivate *d;
+};
+
+#endif // QT_NO_NETWORKPROTOCOL
+
+#endif // TQURLOPERATOR_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qurloperator-members.html b/doc/html/qurloperator-members.html new file mode 100644 index 00000000..9c3d3cc5 --- /dev/null +++ b/doc/html/qurloperator-members.html @@ -0,0 +1,155 @@ + + + + + +TQUrlOperator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQUrlOperator

+ +

This is the complete list of member functions for +TQUrlOperator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qurloperator.html b/doc/html/qurloperator.html new file mode 100644 index 00000000..e4b08ec8 --- /dev/null +++ b/doc/html/qurloperator.html @@ -0,0 +1,513 @@ + + + + + +TQUrlOperator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQUrlOperator Class Reference
[network module]

+ +

The TQUrlOperator class provides common operations on URLs. +More... +

#include <qurloperator.h> +

Inherits TQObject and TQUrl. +

List of all member functions. +

Public Members

+
    +
  • TQUrlOperator ()
  • +
  • TQUrlOperator ( const TQString & url )
  • +
  • TQUrlOperator ( const TQUrlOperator & url )
  • +
  • TQUrlOperator ( const TQUrlOperator & url, const TQString & relUrl, bool checkSlash = FALSE )
  • +
  • virtual ~TQUrlOperator ()
  • +
  • virtual const TQNetworkOperation * listChildren ()
  • +
  • virtual const TQNetworkOperation * mkdir ( const TQString & dirname )
  • +
  • virtual const TQNetworkOperation * remove ( const TQString & filename )
  • +
  • virtual const TQNetworkOperation * rename ( const TQString & oldname, const TQString & newname )
  • +
  • virtual const TQNetworkOperation * get ( const TQString & location = TQString::null )
  • +
  • virtual const TQNetworkOperation * put ( const TQByteArray & data, const TQString & location = TQString::null )
  • +
  • virtual TQPtrList<TQNetworkOperation> copy ( const TQString & from, const TQString & to, bool move = FALSE, bool toPath = TRUE )
  • +
  • virtual void copy ( const TQStringList & files, const TQString & dest, bool move = FALSE )
  • +
  • virtual bool isDir ( bool * ok = 0 )
  • +
  • virtual void setNameFilter ( const TQString & nameFilter )
  • +
  • TQString nameFilter () const
  • +
  • virtual TQUrlInfo info ( const TQString & entry ) const
  • +
  • virtual void stop ()
  • +
+

Signals

+
    +
  • void newChildren ( const TQValueList<TQUrlInfo> & i, TQNetworkOperation * op )
  • +
  • void finished ( TQNetworkOperation * op )
  • +
  • void start ( TQNetworkOperation * op )
  • +
  • void createdDirectory ( const TQUrlInfo & i, TQNetworkOperation * op )
  • +
  • void removed ( TQNetworkOperation * op )
  • +
  • void itemChanged ( TQNetworkOperation * op )
  • +
  • void data ( const TQByteArray & data, TQNetworkOperation * op )
  • +
  • void dataTransferProgress ( int bytesDone, int bytesTotal, TQNetworkOperation * op )
  • +
  • void startedNextCopy ( const TQPtrList<TQNetworkOperation> & lst )
  • +
  • void connectionStateChanged ( int state, const TQString & data )
  • +
+

Protected Members

+ +

Related Functions

+ +

Detailed Description

+ + +

The TQUrlOperator class provides common operations on URLs. + +

+ + +

+

This class operates on hierarchical structures (such as +filesystems) using URLs. Its API facilitates all the common +operations: +

+
Operation Function +
List files listChildren() +
Make a directory mkdir() +
Remove a file remove() +
Rename a file rename() +
Get a file get() +
Put a file put() +
Copy a file copy() +
+

You can obtain additional information about the URL with isDir() +and info(). If a directory is to be traversed using +listChildren(), a name filter can be set with setNameFilter(). +

A TQUrlOperator can be used like this, for example to download a +file (and assuming that the FTP protocol is registered): +

+    TQUrlOperator *op = new TQUrlOperator();
+    op->copy( TQString("ftp://ftp.trolltech.com/qt/source/qt-2.1.0.tar.gz"),
+             "file:/tmp" );
+    
+ +

If you want to be notified about success/failure, progress, etc., +you can connect to TQUrlOperator's signals, e.g. to start(), +newChildren(), createdDirectory(), removed(), data(), +dataTransferProgress(), startedNextCopy(), +connectionStateChanged(), finished(), etc. A network operation can +be stopped with stop(). +

The class uses the functionality of registered network protocols +to perform these operations. Depending of the protocol of the URL, +it uses an appropriate network protocol class for the operations. +Each of the operation functions of TQUrlOperator creates a +TQNetworkOperation object that describes the operation and puts it +into the operation queue for the network protocol used. If no +suitable protocol could be found (because no implementation of the +necessary network protocol is registered), the URL operator emits +errors. Not every protocol supports every operation, but error +handling deals with this problem. +

To register the available network protocols, use the +qInitNetworkProtocols() function. The protocols currently +supported are: +

+

For more information about the TQt Network Architecture see the +TQt Network Documentation. +

See also TQNetworkProtocol, TQNetworkOperation, Input/Output and Networking, and Miscellaneous Classes. + +


Member Function Documentation

+

TQUrlOperator::TQUrlOperator () +

+Constructs a TQUrlOperator with an empty (i.e. invalid) URL. + +

TQUrlOperator::TQUrlOperator ( const TQString & url ) +

+Constructs a TQUrlOperator using url and parses this string. +

If you pass strings like "/home/qt" the "file" protocol is +assumed. + +

TQUrlOperator::TQUrlOperator ( const TQUrlOperator & url ) +

+Constructs a copy of url. + +

TQUrlOperator::TQUrlOperator ( const TQUrlOperator & url, const TQString & relUrl, bool checkSlash = FALSE ) +

+Constructs a TQUrlOperator. The URL on which this TQUrlOperator +operates is constructed out of the arguments url, relUrl and +checkSlash: see the corresponding TQUrl constructor for an +explanation of these arguments. + +

TQUrlOperator::~TQUrlOperator () [virtual] +

+Destructor. + +

void TQUrlOperator::clearEntries () [virtual protected] +

+Clears the cache of children. + +

void TQUrlOperator::connectionStateChanged ( int state, const TQString & data ) [signal] +

+ +

This signal is emitted whenever the URL operator's connection +state changes. state describes the new state, which is a +TQNetworkProtocol::ConnectionState value. +

data is a string that describes the change of the connection. +This can be used to display a message to the user. + +

TQPtrList<TQNetworkOperation> TQUrlOperator::copy ( const TQString & from, const TQString & to, bool move = FALSE, bool toPath = TRUE ) [virtual] +

+Copies the file from to to. If move is TRUE, the file is +moved (copied and removed). from must point to a file and to +must point to a directory (into which from is copied) unless toPath is set to FALSE. If toPath is set to FALSE then the to variable is assumed to be the absolute file path (destination +file path + file name). The copying is done using the get() and +put() operations. If you want to be notified about the progress of +the operation, connect to the dataTransferProgress() signal. Bear +in mind that the get() and put() operations emit this signal +through the TQUrlOperator. The number of transferred bytes and the +total bytes that you receive as arguments in this signal do not +relate to the the whole copy operation; they relate first to the +get() and then to the put() operation. Always check what type of +operation the signal comes from; this is given in the signal's +last argument. +

At the end, finished() (with success or failure) is emitted, so +check the state of the network operation object to see whether or +not the operation was successful. +

Because a move or copy operation consists of multiple operations +(get(), put() and maybe remove()), this function doesn't return a +single TQNetworkOperation, but rather a list of them. They are in +the order: get(), put() and (if applicable) remove(). +

See also get() and put(). + +

void TQUrlOperator::copy ( const TQStringList & files, const TQString & dest, bool move = FALSE ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Copies the files to the directory dest. If move is TRUE +the files are moved, not copied. dest must point to a +directory. +

This function calls copy() for each entry in files in turn. You +don't get a result from this function; each time a new copy +begins, startedNextCopy() is emitted, with a list of +TQNetworkOperations that describe the new copy operation. + +

void TQUrlOperator::createdDirectory ( const TQUrlInfo & i, TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted when mkdir() succeeds and the directory has +been created. i holds the information about the new directory. +

op is a pointer to the operation object, which contains all the +information about the operation, including the state. +op->arg(0) holds the new directory's name. +

See also TQNetworkOperation and TQNetworkProtocol. + +

void TQUrlOperator::data ( const TQByteArray & data, TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted when new data has been received after calling +get() or put(). +op is a pointer to the operation object which contains all +the information about the operation, including the state. +op->arg(0) holds the name of the file whose data is retrieved +and op->rawArg(1) holds the (raw) data. +

See also TQNetworkOperation and TQNetworkProtocol. + +

void TQUrlOperator::dataTransferProgress ( int bytesDone, int bytesTotal, TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted during data transfer (using put() or +get()). bytesDone specifies how many bytes of bytesTotal have +been transferred. More information about the operation is stored in +op, a pointer to the network operation that is processed. +bytesTotal may be -1, which means that the total number of bytes +is not known. +

See also TQNetworkOperation and TQNetworkProtocol. + +

void TQUrlOperator::deleteNetworkProtocol () [protected] +

+Deletes the currently used network protocol. + +

void TQUrlOperator::finished ( TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted when an operation of some sort finishes, +whether with success or failure. op is a pointer to the +operation object, which contains all the information, including +the state, of the operation which has been finished. Check the +state and error code of the operation object to see whether or not +the operation was successful. +

See also TQNetworkOperation and TQNetworkProtocol. + +

const TQNetworkOperation * TQUrlOperator::get ( const TQString & location = TQString::null ) [virtual] +

+Tells the network protocol to get data from location or, if +this is TQString::null, to get data from the location to which this +URL points (see TQUrl::fileName() and TQUrl::encodedPathAndQuery()). +What happens then depends on the network protocol. The data() +signal is emitted when data comes in. Because it's unlikely that +all data will come in at once, it is common for multiple data() +signals to be emitted. The dataTransferProgress() signal is +emitted while processing the operation. At the end, finished() +(with success or failure) is emitted, so check the state of the +network operation object to see whether or not the operation was +successful. +

If location is TQString::null, the path of this TQUrlOperator +should point to a file when you use this operation. If location +is not empty, it can be a relative URL (a child of the path to +which the TQUrlOperator points) or an absolute URL. +

For example, to get a web page you might do something like this: +

+    TQUrlOperator op( "http://www.whatever.org/cgi-bin/search.pl?cmd=Hello" );
+    op.get();
+    
+ +

For most other operations, the path of the TQUrlOperator must point +to a directory. If you want to download a file you could do the +following: +

+    TQUrlOperator op( "ftp://ftp.whatever.org/pub" );
+    // do some other stuff like op.listChildren() or op.mkdir( "new_dir" )
+    op.get( "a_file.txt" );
+    
+ +

This will get the data of ftp://ftp.whatever.org/pub/a_file.txt. +

Never do anything like this: +

+    TQUrlOperator op( "http://www.whatever.org/cgi-bin" );
+    op.get( "search.pl?cmd=Hello" ); // WRONG!
+    
+ +

If location is not empty and relative it must not contain any +queries or references, just the name of a child. So if you need to +specify a query or reference, do it as shown in the first example +or specify the full URL (such as +http://www.whatever.org/cgi-bin/search.pl?cmd=Hello) as location. +

See also copy(). + +

void TQUrlOperator::getNetworkProtocol () [protected] +

+Finds a network protocol for the URL and deletes the old network protocol. + +

TQUrlInfo TQUrlOperator::info ( const TQString & entry ) const [virtual] +

+Returns the URL information for the child entry, or returns an +empty TQUrlInfo object if there is no information available about +entry. Information about entry is only available after a successfully +finished listChildren() operation. + +

bool TQUrlOperator::isDir ( bool * ok = 0 ) [virtual] +

+Returns TRUE if the URL is a directory; otherwise returns FALSE. +This may not always work correctly, if the protocol of the URL is +something other than file (local filesystem). If you pass a bool +pointer as the ok argument, *ok is set to TRUE if the result +of this function is known to be correct, and to FALSE otherwise. + +

void TQUrlOperator::itemChanged ( TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted whenever a file which is a child of the URL +has been changed, for example by successfully calling rename(). +op is a pointer to the operation object which contains all the +information about the operation, including the state. +op->arg(0) holds the original file name and op->arg(1) holds +the new file name (if it was changed). +

See also TQNetworkOperation and TQNetworkProtocol. + +

const TQNetworkOperation * TQUrlOperator::listChildren () [virtual] +

+Starts listing the children of this URL (e.g. the files in the +directory). The start() signal is emitted before the first entry +is listed and finished() is emitted after the last one. The +newChildren() signal is emitted for each list of new entries. If +an error occurs, the signal finished() is emitted, so be sure to +check the state of the network operation pointer. +

Because the operation may not be executed immediately, a pointer +to the TQNetworkOperation object created by this function is +returned. This object contains all the data about the operation +and is used to refer to this operation later (e.g. in the signals +that are emitted by the TQUrlOperator). The return value can also +be 0 if the operation object couldn't be created. +

The path of this TQUrlOperator must to point to a directory +(because the children of this directory will be listed), not to a +file. + +

const TQNetworkOperation * TQUrlOperator::mkdir ( const TQString & dirname ) [virtual] +

+Tries to create a directory (child) with the name dirname. If +it is successful, a newChildren() signal with the new child is +emitted, and the createdDirectory() signal with the information +about the new child is also emitted. The finished() signal (with +success or failure) is emitted after the operation has been +processed, so check the state of the network operation object to +see whether or not the operation was successful. +

Because the operation will not be executed immediately, a pointer +to the TQNetworkOperation object created by this function is +returned. This object contains all the data about the operation +and is used to refer to this operation later (e.g. in the signals +that are emitted by the TQUrlOperator). The return value can also +be 0 if the operation object couldn't be created. +

The path of this TQUrlOperator must to point to a directory (not a +file) because the new directory will be created in this path. + +

TQString TQUrlOperator::nameFilter () const +

+Returns the name filter of the URL. +

See also TQUrlOperator::setNameFilter() and TQDir::nameFilter(). + +

void TQUrlOperator::newChildren ( const TQValueList<TQUrlInfo> & i, TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted after listChildren() was called and new +children (i.e. files) have been read from a list of files. i +holds the information about the new files. op is a pointer +to the operation object which contains all the information about +the operation, including the state. +

See also TQNetworkOperation and TQNetworkProtocol. + +

const TQNetworkOperation * TQUrlOperator::put ( const TQByteArray & data, const TQString & location = TQString::null ) [virtual] +

+This function tells the network protocol to put data in location. If location is empty (TQString::null), it puts the data in the location to which the URL points. What happens depends +on the network protocol. Depending on the network protocol, some +data might come back after putting data, in which case the data() +signal is emitted. The dataTransferProgress() signal is emitted +during processing of the operation. At the end, finished() (with +success or failure) is emitted, so check the state of the network +operation object to see whether or not the operation was +successful. +

If location is TQString::null, the path of this TQUrlOperator +should point to a file when you use this operation. If location +is not empty, it can be a relative (a child of the path to which +the TQUrlOperator points) or an absolute URL. +

For putting some data to a file you can do the following: +

+    TQUrlOperator op( "ftp://ftp.whatever.com/home/me/filename.dat" );
+    op.put( data );
+    
+ +

For most other operations, the path of the TQUrlOperator must point +to a directory. If you want to upload data to a file you could do +the following: +

+    TQUrlOperator op( "ftp://ftp.whatever.com/home/me" );
+    // do some other stuff like op.listChildren() or op.mkdir( "new_dir" )
+    op.put( data, "filename.dat" );
+    
+ +

This will upload the data to ftp://ftp.whatever.com/home/me/filename.dat. +

See also copy(). + +

const TQNetworkOperation * TQUrlOperator::remove ( const TQString & filename ) [virtual] +

+Tries to remove the file (child) filename. If it succeeds the +removed() signal is emitted. finished() (with success or failure) +is also emitted after the operation has been processed, so check +the state of the network operation object to see whether or not +the operation was successful. +

Because the operation will not be executed immediately, a pointer +to the TQNetworkOperation object created by this function is +returned. This object contains all the data about the operation +and is used to refer to this operation later (e.g. in the signals +that are emitted by the TQUrlOperator). The return value can also +be 0 if the operation object couldn't be created. +

The path of this TQUrlOperator must point to a directory; because +if filename is relative, it will try to remove it in this +directory. + +

void TQUrlOperator::removed ( TQNetworkOperation * op ) [signal] +

+ +

This signal is emitted when remove() has been succesful and the +file has been removed. +

op is a pointer to the operation object which contains all the +information about the operation, including the state. +op->arg(0) holds the name of the file that was removed. +

See also TQNetworkOperation and TQNetworkProtocol. + +

const TQNetworkOperation * TQUrlOperator::rename ( const TQString & oldname, const TQString & newname ) [virtual] +

+Tries to rename the file (child) called oldname to newname. +If it succeeds, the itemChanged() signal is emitted. finished() +(with success or failure) is also emitted after the operation has +been processed, so check the state of the network operation object +to see whether or not the operation was successful. +

Because the operation may not be executed immediately, a pointer +to the TQNetworkOperation object created by this function is +returned. This object contains all the data about the operation +and is used to refer to this operation later (e.g. in the signals +that are emitted by the TQUrlOperator). The return value can also +be 0 if the operation object couldn't be created. +

This path of this TQUrlOperator must to point to a directory +because oldname and newname are handled relative to this +directory. + +

void TQUrlOperator::setNameFilter ( const TQString & nameFilter ) [virtual] +

+Sets the name filter of the URL to nameFilter. +

See also TQDir::setNameFilter(). + +

void TQUrlOperator::start ( TQNetworkOperation * op ) [signal] +

+ +

Some operations (such as listChildren()) emit this signal when +they start processing the operation. op is a pointer to the +operation object which contains all the information about the +operation, including the state. +

See also TQNetworkOperation and TQNetworkProtocol. + +

void TQUrlOperator::startedNextCopy ( const TQPtrList<TQNetworkOperation> & lst ) [signal] +

+ +

This signal is emitted if copy() starts a new copy operation. lst contains all TQNetworkOperations related to this copy +operation. +

See also copy(). + +

void TQUrlOperator::stop () [virtual] +

+Stops the current network operation and removes all this +TQUrlOperator's waiting network operations. + +

Related Functions

+

void qInitNetworkProtocols () +

+ +

This function registers the network protocols for FTP and HTTP. +You must call this function before you use TQUrlOperator for +these protocols. +

This function is declared in qnetwork.h. + + +


+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/quuid-h.html b/doc/html/quuid-h.html new file mode 100644 index 00000000..394ade8f --- /dev/null +++ b/doc/html/quuid-h.html @@ -0,0 +1,239 @@ + + + + + +quuid.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

quuid.h

+ +

This is the verbatim text of the quuid.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/quuid.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQUuid class
+**
+** Created : 010523
+**
+** 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 retquirements 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 TQUUID_H
+#define TQUUID_H
+
+#ifndef QT_H
+#include "qstring.h"
+#endif // QT_H
+
+#include <string.h>
+
+#if defined(Q_OS_WIN32)
+#ifndef GUID_DEFINED
+#define GUID_DEFINED
+typedef struct _GUID
+{
+    ulong   Data1;
+    ushort  Data2;
+    ushort  Data3;
+    uchar   Data4[ 8 ];
+} GUID, *REFGUID, *LPGUID;
+#endif
+#endif
+
+
+struct Q_EXPORT TQUuid
+{
+    enum Variant {
+	VarUnknown	=-1,
+	NCS		= 0, // 0 - -
+	DCE		= 2, // 1 0 -
+	Microsoft	= 6, // 1 1 0
+	Reserved	= 7  // 1 1 1
+    };
+
+    enum Version {
+	VerUnknown	=-1,
+	Time		= 1, // 0 0 0 1
+	EmbeddedPOSIX	= 2, // 0 0 1 0
+	Name		= 3, // 0 0 1 1
+	Random		= 4  // 0 1 0 0
+    };
+
+    TQUuid()
+    {
+	memset( this, 0, sizeof(TQUuid) );
+    }
+    TQUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 )
+    {
+	data1 = l;
+	data2 = w1;
+	data3 = w2;
+	data4[0] = b1;
+	data4[1] = b2;
+	data4[2] = b3;
+	data4[3] = b4;
+	data4[4] = b5;
+	data4[5] = b6;
+	data4[6] = b7;
+	data4[7] = b8;
+    }
+    TQUuid( const TQUuid &uuid )
+    {
+	memcpy( this, &uuid, sizeof(TQUuid) );
+    }
+#ifndef QT_NO_QUUID_STRING
+    TQUuid( const TQString & );
+    TQUuid( const char * );
+    TQString toString() const;
+    operator TQString() const { return toString(); }
+#endif
+    bool isNull() const;
+
+    TQUuid &operator=(const TQUuid &orig )
+    {
+	memcpy( this, &orig, sizeof(TQUuid) );
+	return *this;
+    }
+
+    bool operator==(const TQUuid &orig ) const
+    {
+	uint i;
+	if ( data1 != orig.data1 || data2 != orig.data2 || 
+	     data3 != orig.data3 )
+	    return FALSE;
+
+	for( i = 0; i < 8; i++ )
+	    if ( data4[i] != orig.data4[i] )
+		return FALSE;
+	
+	return TRUE;
+    }
+
+    bool operator!=(const TQUuid &orig ) const
+    {
+	return !( *this == orig );
+    }
+
+    bool operator<(const TQUuid &other ) const;
+    bool operator>(const TQUuid &other ) const;
+
+#if defined(Q_OS_WIN32)
+    // On Windows we have a type GUID that is used by the platform API, so we
+    // provide convenience operators to cast from and to this type.
+    TQUuid( const GUID &guid )
+    {
+	memcpy( this, &guid, sizeof(GUID) );
+    }
+
+    TQUuid &operator=(const GUID &orig )
+    {
+	memcpy( this, &orig, sizeof(TQUuid) );
+	return *this;
+    }
+
+    operator GUID() const
+    {
+	GUID guid = { data1, data2, data3, { data4[0], data4[1], data4[2], data4[3], data4[4], data4[5], data4[6], data4[7] } };
+	return guid;
+    }
+
+    bool operator==( const GUID &guid ) const
+    {
+	uint i;
+	if ( data1 != guid.Data1 || data2 != guid.Data2 || 
+	     data3 != guid.Data3 )
+	    return FALSE;
+
+	for( i = 0; i < 8; i++ )
+	    if ( data4[i] != guid.Data4[i] )
+		return FALSE;
+	
+	return TRUE;
+    }
+
+    bool operator!=( const GUID &guid ) const
+    {
+	return !( *this == guid );
+    }
+#endif
+    static TQUuid createUuid();
+    TQUuid::Variant variant() const;
+    TQUuid::Version version() const;
+
+    uint    data1;
+    ushort  data2;
+    ushort  data3;
+    uchar   data4[ 8 ];
+};
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQUuid & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQUuid & );
+#endif
+
+#endif //TQUUID_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/quuid-members.html b/doc/html/quuid-members.html new file mode 100644 index 00000000..5271d318 --- /dev/null +++ b/doc/html/quuid-members.html @@ -0,0 +1,58 @@ + + + + + +TQUuid Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQUuid

+ +

This is the complete list of member functions for +TQUuid, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/quuid.html b/doc/html/quuid.html new file mode 100644 index 00000000..dd16a14c --- /dev/null +++ b/doc/html/quuid.html @@ -0,0 +1,236 @@ + + + + + +TQUuid Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQUuid Class Reference

+ +

The TQUuid class defines a Universally Unique Identifier (UUID). +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <quuid.h> +

List of all member functions. +

Public Members

+
    +
  • enum Variant { VarUnknown = -1, NCS = 0, DCE = 2, Microsoft = 6, Reserved = 7 }
  • +
  • enum Version { VerUnknown = -1, Time = 1, EmbeddedPOSIX = 2, Name = 3, Random = 4 }
  • +
  • TQUuid ()
  • +
  • TQUuid ( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 )
  • +
  • TQUuid ( const TQUuid & orig )
  • +
  • TQUuid ( const TQString & text )
  • +
  • TQString toString () const
  • +
  • operator TQString () const
  • +
  • bool isNull () const
  • +
  • TQUuid & operator= ( const TQUuid & uuid )
  • +
  • bool operator== ( const TQUuid & other ) const
  • +
  • bool operator!= ( const TQUuid & other ) const
  • +
  • bool operator< ( const TQUuid & other ) const
  • +
  • bool operator> ( const TQUuid & other ) const
  • +
  • TQUuid::Variant variant () const
  • +
  • TQUuid::Version version () const
  • +
+

Static Public Members

+ +

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQUuid & id )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQUuid & id )
  • +
+

Detailed Description

+ + +The TQUuid class defines a Universally Unique Identifier (UUID). +

+

For objects or declarations that must be uniquely identified, +UUIDs (also known as GUIDs) are widely used in order to assign a +fixed and easy to compare value to the object or declaration. The +128-bit value of a UUID is generated by an algorithm that +guarantees that the value is unique. +

In TQt, UUIDs are wrapped by the TQUuid struct which provides +convenience functions for handling UUIDs. Most platforms provide a +tool to generate new UUIDs, for example, uuidgen and guidgen. +

UUIDs generated by TQUuid, are based on the Random version of the +DCE (Distributed Computing Environment) standard. +

UUIDs can be constructed from numeric values or from strings, or +using the static createUuid() function. They can be converted to a +string with toString(). UUIDs have a variant() and a version(), +and null UUIDs return TRUE from isNull(). + +


Member Type Documentation

+

TQUuid::Variant

+ +

This enum defines the variant of the UUID, which is the scheme +which defines the layout of the 128-bits value. +

    +
  • TQUuid::VarUnknown - Variant is unknown +
  • TQUuid::NCS - Reserved for NCS (Network Computing System) backward compatibility +
  • TQUuid::DCE - Distributed Computing Environment, the scheme used by TQUuid +
  • TQUuid::Microsoft - Reserved for Microsoft backward compatibility (GUID) +
  • TQUuid::Reserved - Reserved for future definition +
+

TQUuid::Version

+ +

This enum defines the version of the UUID. +

    +
  • TQUuid::VerUnknown - Version is unknown +
  • TQUuid::Time - Time-based, by using timestamp, clock sequence, and +MAC network card address (if available) for the node sections +
  • TQUuid::EmbeddedPOSIX - DCE Security version, with embedded POSIX UUIDs +
  • TQUuid::Name - Name-based, by using values from a name for all sections +
  • TQUuid::Random - Random-based, by using random numbers for all sections +
+

Member Function Documentation

+

TQUuid::TQUuid () +

+ +

Creates the null UUID {00000000-0000-0000-0000-000000000000}. + +

TQUuid::TQUuid ( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 ) +

+ +

Creates a UUID with the value specified by the parameters, l, +w1, w2, b1, b2, b3, b4, b5, b6, b7, b8. +

Example: +

+    // {67C8770B-44F1-410A-AB9A-F9B5446F13EE}
+    TQUuid IID_MyInterface( 0x67c8770b, 0x44f1, 0x410a, 0xab, 0x9a, 0xf9, 0xb5, 0x44, 0x6f, 0x13, 0xee )
+    
+ + +

TQUuid::TQUuid ( const TQUuid & orig ) +

+ +

Creates a copy of the TQUuid orig. + +

TQUuid::TQUuid ( const TQString & text ) +

+Creates a TQUuid object from the string text. The function can +only convert a string in the format +{HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH} (where 'H' stands for a hex +digit). If the conversion fails a null UUID is created. + +

TQUuid TQUuid::createUuid () [static] +

+ +

Returns a new UUID of DCE variant, and Random type. The +UUIDs generated are based on the platform specific pseudo-random +generator, which is usually not a cryptographic-quality random +number generator. Therefore, a UUID is not guaranteed to be unique +cross application instances. +

On Windows, the new UUID is extremely likely to be unique on the +same or any other system, networked or not. +

See also variant() and version(). + +

bool TQUuid::isNull () const +

+Returns TRUE if this is the null UUID +{00000000-0000-0000-0000-000000000000}; otherwise returns FALSE. + +

TQUuid::operator TQString () const +

+ +

Returns the string representation of the uuid. +

See also toString(). + +

bool TQUuid::operator!= ( const TQUuid & other ) const +

+ +

Returns TRUE if this TQUuid and the other TQUuid are different; +otherwise returns FALSE. + +

bool TQUuid::operator< ( const TQUuid & other ) const +

+ +

Returns TRUE if this TQUuid is of the same variant, +and lexicographically before the other TQUuid; +otherwise returns FALSE. +

See also variant(). + +

TQUuid & TQUuid::operator= ( const TQUuid & uuid ) +

+ +

Assigns the value of uuid to this TQUuid object. + +

bool TQUuid::operator== ( const TQUuid & other ) const +

+ +

Returns TRUE if this TQUuid and the other TQUuid are identical; +otherwise returns FALSE. + +

bool TQUuid::operator> ( const TQUuid & other ) const +

+ +

Returns TRUE if this TQUuid is of the same variant, +and lexicographically after the other TQUuid; +otherwise returns FALSE. +

See also variant(). + +

TQString TQUuid::toString () const +

+TQString TQUuid::toString() const +

Returns the string representation of the uuid. + +

TQUuid::Variant TQUuid::variant () const +

+ +

Returns the variant of the UUID. +The null UUID is considered to be of an unknown variant. +

See also version(). + +

TQUuid::Version TQUuid::version () const +

+ +

Returns the version of the UUID, if the UUID is of the DCE +variant; otherwise returns VerUnknown. +

See also variant(). + +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQUuid & id ) +

+ +Writes the uuid id to the datastream s. + +

TQDataStream & operator>> ( TQDataStream & s, TQUuid & id ) +

+ +Reads uuid from from the stream s into id. + + +

+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/qvalidator-h.html b/doc/html/qvalidator-h.html new file mode 100644 index 00000000..b30e3e4c --- /dev/null +++ b/doc/html/qvalidator-h.html @@ -0,0 +1,214 @@ + + + + + +qvalidator.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qvalidator.h

+ +

This is the verbatim text of the qvalidator.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qvalidator.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of validator classes
+**
+** Created : 970610
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQVALIDATOR_H
+#define TQVALIDATOR_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qstring.h" // char*->TQString conversion
+#include "qregexp.h" // TQString->TQRegExp conversion
+#endif // QT_H
+
+#ifndef QT_NO_VALIDATOR
+
+
+class Q_EXPORT TQValidator : public TQObject
+{
+    Q_OBJECT
+public:
+    TQValidator( TQObject * parent, const char *name = 0 );
+    ~TQValidator();
+
+    enum State { Invalid, Intermediate, Valid=Intermediate, Acceptable };
+
+    virtual State validate( TQString &, int & ) const = 0;
+    virtual void fixup( TQString & ) const;
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQValidator( const TQValidator & );
+    TQValidator& operator=( const TQValidator & );
+#endif
+};
+
+
+class Q_EXPORT TQIntValidator : public TQValidator
+{
+    Q_OBJECT
+    Q_PROPERTY( int bottom READ bottom WRITE setBottom )
+    Q_PROPERTY( int top READ top WRITE setTop )
+
+public:
+    TQIntValidator( TQObject * parent, const char *name = 0 );
+    TQIntValidator( int bottom, int top,
+		   TQObject * parent, const char *name = 0 );
+    ~TQIntValidator();
+
+    TQValidator::State validate( TQString &, int & ) const;
+
+    void setBottom( int );
+    void setTop( int );
+    virtual void setRange( int bottom, int top );
+
+    int bottom() const { return b; }
+    int top() const { return t; }
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQIntValidator( const TQIntValidator & );
+    TQIntValidator& operator=( const TQIntValidator & );
+#endif
+
+    int b, t;
+};
+
+#ifndef QT_NO_REGEXP
+
+class Q_EXPORT TQDoubleValidator : public TQValidator
+{
+    Q_OBJECT
+    Q_PROPERTY( double bottom READ bottom WRITE setBottom )
+    Q_PROPERTY( double top READ top WRITE setTop )
+    Q_PROPERTY( int decimals READ decimals WRITE setDecimals )
+
+public:
+    TQDoubleValidator( TQObject * parent, const char *name = 0 );
+    TQDoubleValidator( double bottom, double top, int decimals,
+		      TQObject * parent, const char *name = 0 );
+    ~TQDoubleValidator();
+
+    TQValidator::State validate( TQString &, int & ) const;
+
+    virtual void setRange( double bottom, double top, int decimals = 0 );
+    void setBottom( double );
+    void setTop( double );
+    void setDecimals( int );
+
+    double bottom() const { return b; }
+    double top() const { return t; }
+    int decimals() const { return d; }
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQDoubleValidator( const TQDoubleValidator & );
+    TQDoubleValidator& operator=( const TQDoubleValidator & );
+#endif
+
+    double b, t;
+    int d;
+};
+
+
+class Q_EXPORT TQRegExpValidator : public TQValidator
+{
+    Q_OBJECT
+    // Q_PROPERTY( TQRegExp regExp READ regExp WRITE setRegExp )
+
+public:
+    TQRegExpValidator( TQObject *parent, const char *name = 0 );
+    TQRegExpValidator( const TQRegExp& rx, TQObject *parent,
+		      const char *name = 0 );
+    ~TQRegExpValidator();
+
+    virtual TQValidator::State validate( TQString& input, int& pos ) const;
+
+    void setRegExp( const TQRegExp& rx );
+    const TQRegExp& regExp() const { return r; }
+
+private:
+#if defined(Q_DISABLE_COPY)
+    TQRegExpValidator( const TQRegExpValidator& );
+    TQRegExpValidator& operator=( const TQRegExpValidator& );
+#endif
+
+    TQRegExp r;
+};
+#endif // QT_NO_REGEXP
+
+
+#endif // QT_NO_VALIDATOR
+
+#endif // TQVALIDATOR_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qvalidator-members.html b/doc/html/qvalidator-members.html new file mode 100644 index 00000000..c6b16910 --- /dev/null +++ b/doc/html/qvalidator-members.html @@ -0,0 +1,92 @@ + + + + + +TQValidator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQValidator

+ +

This is the complete list of member functions for +TQValidator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qvalidator.html b/doc/html/qvalidator.html new file mode 100644 index 00000000..78766fed --- /dev/null +++ b/doc/html/qvalidator.html @@ -0,0 +1,153 @@ + + + + + +TQValidator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQValidator Class Reference

+ +

The TQValidator class provides validation of input text. +More... +

#include <qvalidator.h> +

Inherits TQObject. +

Inherited by TQIntValidator, TQDoubleValidator, and TQRegExpValidator. +

List of all member functions. +

Public Members

+
    +
  • TQValidator ( TQObject * parent, const char * name = 0 )
  • +
  • ~TQValidator ()
  • +
  • enum State { Invalid, Intermediate, Valid = Intermediate, Acceptable }
  • +
  • virtual State validate ( TQString & input, int & pos ) const = 0
  • +
  • virtual void fixup ( TQString & input ) const
  • +
+

Detailed Description

+ + +The TQValidator class provides validation of input text. +

+ +

The class itself is abstract. Two subclasses, TQIntValidator and +TQDoubleValidator, provide basic numeric-range checking, and TQRegExpValidator provides general checking using a custom regular expression. +

If the built-in validators aren't sufficient, you can subclass +TQValidator. The class has two virtual functions: validate() and +fixup(). +

validate() must be implemented by every subclass. It returns +Invalid, Intermediate or Acceptable depending on whether +its argument is valid (for the subclass's definition of valid). +

These three states retquire some explanation. An Invalid string +is clearly invalid. Intermediate is less obvious: the +concept of validity is slippery when the string is incomplete +(still being edited). TQValidator defines Intermediate as the +property of a string that is neither clearly invalid nor +acceptable as a final result. Acceptable means that the string +is acceptable as a final result. One might say that any string +that is a plausible intermediate state during entry of an Acceptable string is Intermediate. +

Here are some examples: +

    +

  • For a line edit that accepts integers from 0 to 999 inclusive, +42 and 123 are Acceptable, the empty string and 1114 are Intermediate and asdf is Invalid. +

  • For an editable combobox that accepts URLs, any well-formed URL +is Acceptable, "http://www.trolltech.com/," is Intermediate +(it might be a cut and paste operation that accidentally took in a +comma at the end), the empty string is Intermediate (the user +might select and delete all of the text in preparation for entering +a new URL), and "http:///./" is Invalid. +

  • For a spin box that accepts lengths, "11cm" and "1in" are Acceptable, "11" and the empty string are Intermediate and +"http://www.trolltech.com" and "hour" are Invalid. +

+

fixup() is provided for validators that can repair some user +errors. The default implementation does nothing. TQLineEdit, for +example, will call fixup() if the user presses Enter (or Return) +and the content is not currently valid. This allows the fixup() +function the opportunity of performing some magic to make an Invalid string Acceptable. +

TQValidator is typically used with TQLineEdit, TQSpinBox and +TQComboBox. +

See also Miscellaneous Classes. + +


Member Type Documentation

+

TQValidator::State

+ +

This enum type defines the states in which a validated string can +exist. +

    +
  • TQValidator::Invalid - the string is clearly invalid. +
  • TQValidator::Intermediate - the string is a plausible intermediate value +during editing. +
  • TQValidator::Acceptable - the string is acceptable as a final result, +i.e. it is valid. +
+

Member Function Documentation

+

TQValidator::TQValidator ( TQObject * parent, const char * name = 0 ) +

+Sets up the validator. The parent and name parameters are +passed on to the TQObject constructor. + +

TQValidator::~TQValidator () +

+Destroys the validator, freeing any storage and other resources +used. + +

void TQValidator::fixup ( TQString & input ) const [virtual] +

+ +

This function attempts to change input to be valid according to +this validator's rules. It need not result in a valid string: +callers of this function must re-test afterwards; the default does +nothing. +

Reimplementations of this function can change input even if +they do not produce a valid string. For example, an ISBN validator +might want to delete every character except digits and "-", even +if the result is still not a valid ISBN; a surname validator might +want to remove whitespace from the start and end of the string, +even if the resulting string is not in the list of accepted +surnames. + +

State TQValidator::validate ( TQString & input, int & pos ) const [pure virtual] +

+ +

This pure virtual function returns Invalid if input is +invalid according to this validator's rules, Intermediate if it +is likely that a little more editing will make the input +acceptable (e.g. the user types '4' into a widget which accepts +integers between 10 and 99) and Acceptable if the input is +valid. +

The function can change input and pos (the cursor position) +if it wants to. + +

Reimplemented in TQIntValidator, TQDoubleValidator, and TQRegExpValidator. + +


+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/qvaluelist-h.html b/doc/html/qvaluelist-h.html new file mode 100644 index 00000000..98d304e7 --- /dev/null +++ b/doc/html/qvaluelist-h.html @@ -0,0 +1,714 @@ + + + + + +qvaluelist.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qvaluelist.h

+ +

This is the verbatim text of the qvaluelist.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qvaluelist.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 retquirements 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 "qtl.h"
+#include "qshared.h"
+#include "qdatastream.h"
+#endif // QT_H
+
+#ifndef QT_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 QT_NO_STL
+    typedef std::bidirectional_iterator_tag  iterator_category;
+#endif
+    typedef T        value_type;
+    typedef size_t size_type;
+#ifndef QT_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 QT_NO_STL
+    typedef std::bidirectional_iterator_tag  iterator_category;
+#endif
+    typedef T        value_type;
+    typedef size_t size_type;
+#ifndef QT_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>
+Q_INLINE_TEMPLATES TQValueListPrivate<T>::TQValueListPrivate()
+{
+    node = new Node; node->next = node->prev = node; nodes = 0;
+}
+
+template <class T>
+Q_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>
+Q_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>
+Q_INLINE_TEMPLATES Q_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPrivate<T>::insert( Q_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>
+Q_INLINE_TEMPLATES Q_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPrivate<T>::remove( Q_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>
+Q_INLINE_TEMPLATES Q_TYPENAME TQValueListPrivate<T>::NodePtr TQValueListPrivate<T>::find( Q_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>
+Q_INLINE_TEMPLATES int TQValueListPrivate<T>::findIndex( Q_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>
+Q_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>
+Q_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>
+Q_INLINE_TEMPLATES Q_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>
+Q_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( QT_NO_DEBUG ) && defined( QT_CHECK_VALUELIST_RANGE )
+#  define QT_CHECK_INVALID_LIST_ELEMENT if ( empty() ) qWarning( "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 QT_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 QT_NO_STL
+    TQValueList( const std::list<T>& l )
+    {
+	sh = new TQValueListPrivate<T>;
+	qCopy( 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 QT_NO_STL
+    TQValueList<T>& operator= ( const std::list<T>& l )
+    {
+	detach();
+	qCopy( 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>
+Q_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>
+Q_INLINE_TEMPLATES void TQValueList<T>::clear()
+{
+    if ( sh->count == 1 ) sh->clear(); else { sh->deref(); sh = new TQValueListPrivate<T>; }
+}
+
+template <class T>
+Q_INLINE_TEMPLATES Q_TYPENAME TQValueList<T>::iterator TQValueList<T>::erase( Q_TYPENAME TQValueList<T>::iterator first, Q_TYPENAME TQValueList<T>::iterator last )
+{
+    while ( first != last )
+	erase( first++ );
+    return last;
+}
+
+
+template <class T>
+Q_INLINE_TEMPLATES void TQValueList<T>::insert( Q_TYPENAME TQValueList<T>::iterator pos, size_type n, const T& x )
+{
+    for ( ; n > 0; --n )
+	insert( pos, x );
+}
+
+template <class T>
+Q_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>
+Q_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>
+Q_INLINE_TEMPLATES void TQValueList<T>::detachInternal()
+{
+    sh->deref(); sh = new TQValueListPrivate<T>( *sh );
+}
+
+#ifndef QT_NO_DATASTREAM
+template <class T>
+Q_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueList<T>& l )
+{
+    l.clear();
+    Q_UINT32 c;
+    s >> c;
+    for( Q_UINT32 i = 0; i < c; ++i )
+    {
+	T t;
+	s >> t;
+	l.append( t );
+	if ( s.atEnd() )
+	    break;
+    }
+    return s;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueList<T>& l )
+{
+    s << (Q_UINT32)l.size();
+    TQValueListConstIterator<T> it = l.begin();
+    for( ; it != l.end(); ++it )
+	s << *it;
+    return s;
+}
+#endif // QT_NO_DATASTREAM
+
+#define Q_DEFINED_QVALUELIST
+#define Q_DEFINED_QVALUELIST
+#include "qwinexport.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 new file mode 100644 index 00000000..4d0d9e4b --- /dev/null +++ b/doc/html/qvaluelist-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/qvaluelist.html b/doc/html/qvaluelist.html new file mode 100644 index 00000000..8407b3dd --- /dev/null +++ b/doc/html/qvaluelist.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 <qvaluelist.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 retquire 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 qFind() algorithm. For example: +

+    TQValueList<int> list;
+    ...
+    TQValueList<int>::iterator it = qFind( 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/qvaluelistconstiterator-members.html b/doc/html/qvaluelistconstiterator-members.html new file mode 100644 index 00000000..d50c18c1 --- /dev/null +++ b/doc/html/qvaluelistconstiterator-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/qvaluelistconstiterator.html b/doc/html/qvaluelistconstiterator.html new file mode 100644 index 00000000..d1f2739b --- /dev/null +++ b/doc/html/qvaluelistconstiterator.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 <qvaluelist.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 new file mode 100644 index 00000000..01472b76 --- /dev/null +++ b/doc/html/qvaluelistiterator-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/qvaluelistiterator.html b/doc/html/qvaluelistiterator.html new file mode 100644 index 00000000..e8e944b0 --- /dev/null +++ b/doc/html/qvaluelistiterator.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 <qvaluelist.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 new file mode 100644 index 00000000..6010eed6 --- /dev/null +++ b/doc/html/qvaluestack-h.html @@ -0,0 +1,112 @@ + + + + + +qvaluestack.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qvaluestack.h

+ +

This is the verbatim text of the qvaluestack.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qvaluestack.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 retquirements 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 "qvaluelist.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 new file mode 100644 index 00000000..4bcff57e --- /dev/null +++ b/doc/html/qvaluestack-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/qvaluestack.html b/doc/html/qvaluestack.html new file mode 100644 index 00000000..9697d889 --- /dev/null +++ b/doc/html/qvaluestack.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 <qvaluestack.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/qvaluevector-h.html b/doc/html/qvaluevector-h.html new file mode 100644 index 00000000..f80ff85f --- /dev/null +++ b/doc/html/qvaluevector-h.html @@ -0,0 +1,620 @@ + + + + + +qvaluevector.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qvaluevector.h

+ +

This is the verbatim text of the qvaluevector.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qvaluevector.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 retquirements 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 "qtl.h"
+#include "qshared.h"
+#include "qdatastream.h"
+#endif // QT_H
+
+#ifndef QT_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>
+Q_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
+	qCopy( (pointer)x.start, (pointer)x.finish, start );
+#else
+	qCopy( x.start, x.finish, start );
+#endif
+    } else {
+	start = 0;
+	finish = 0;
+	end = 0;
+    }
+}
+
+template <class T>
+Q_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>
+Q_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;
+    qCopy( start, pos, newStart );
+    *newFinish = x;
+    qCopy( pos, finish, ++newFinish );
+    delete[] start;
+    start = newStart;
+    finish = newStart + lastSize + 1;
+    end = newStart + n;
+}
+
+template <class T>
+Q_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 ) {
+	    qCopy( finish - n, finish, finish );
+	    finish += n;
+	    qCopyBackward( pos, old_finish - n, old_finish );
+	    qFill( 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;
+	    qCopy( pos, old_finish, finish );
+	    finish += elems_after;
+	    qFill( 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 = qCopy( start, pos, newStart );
+	// fill up inserted space
+	size_t i = n;
+	for ( ; i > 0; --i, ++newFinish )
+	    *newFinish = x;
+	newFinish = qCopy( pos, finish, newFinish );
+	delete[] start;
+	start = newStart;
+	finish = newFinish;
+	end = newStart + len;
+    }
+}
+
+template <class T>
+Q_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>
+Q_INLINE_TEMPLATES Q_TYPENAME TQValueVectorPrivate<T>::pointer TQValueVectorPrivate<T>::growAndCopy( size_t n, pointer s, pointer f )
+{
+    pointer newStart = new T[n];
+    qCopy( 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 QT_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 QT_NO_STL
+    TQValueVector( std::vector<T>& v ) // ### remove in 4.0
+    {
+	sh = new TQValueVectorPrivate<T>( v.size() );
+	qCopy( v.begin(), v.end(), begin() );
+    }
+
+    TQValueVector( const std::vector<T>& v )
+    {
+	sh = new TQValueVectorPrivate<T>( v.size() );
+	qCopy( 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 QT_NO_STL
+    TQValueVector<T>& operator= ( const std::vector<T>& v )
+    {
+	clear();
+	resize( v.size() );
+	qCopy( 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() )
+	    qCopy( pos + 1, sh->finish, pos );
+	--sh->finish;
+	return pos;
+    }
+
+    iterator erase( iterator first, iterator last )
+    {
+	detach();
+	qCopy( 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() ? qEqual( constBegin(), constEnd(), x.begin()) : FALSE;
+    }
+
+    bool operator==( const TQValueVector<T>& x ) const
+    {
+	return size()==x.size() ? qEqual( 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>
+Q_INLINE_TEMPLATES TQValueVector<T>::TQValueVector( size_type n, const T& val )
+{
+    sh = new TQValueVectorPrivate<T>( n );
+    qFill( begin(), end(), val );
+}
+
+template <class T>
+Q_INLINE_TEMPLATES void TQValueVector<T>::detachInternal()
+{
+    sh->deref();
+    sh = new TQValueVectorPrivate<T>( *sh );
+}
+
+template <class T>
+Q_INLINE_TEMPLATES Q_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;
+	    qCopyBackward( pos, sh->finish - 2, sh->finish - 1 );
+	    *pos = x;
+	}
+    }
+    return begin() + offset;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES Q_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 QT_NO_DATASTREAM
+template<class T>
+Q_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueVector<T>& v )
+{
+    v.clear();
+    Q_UINT32 c;
+    s >> c;
+    v.resize( c );
+    for( Q_UINT32 i = 0; i < c; ++i )
+    {
+	T t;
+	s >> t;
+	v[i] = t;
+    }
+    return s;
+}
+
+template<class T>
+Q_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueVector<T>& v )
+{
+    s << (Q_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 // QT_NO_DATASTREAM
+
+#define Q_DEFINED_QVALUEVECTOR
+#include "qwinexport.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 new file mode 100644 index 00000000..1a9fba40 --- /dev/null +++ b/doc/html/qvaluevector-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/qvaluevector.html b/doc/html/qvaluevector.html new file mode 100644 index 00000000..fadb68f0 --- /dev/null +++ b/doc/html/qvaluevector.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 <qvaluevector.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 <qvaluevector.h>
+    #include <qstring.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 qFind() algorithms. +For example: +

+    TQValueVector<int> vec;
+    ...
+    TQValueVector<int>::const_iterator it = qFind( 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 retquires 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/qvariant-h.html b/doc/html/qvariant-h.html new file mode 100644 index 00000000..f009f3e9 --- /dev/null +++ b/doc/html/qvariant-h.html @@ -0,0 +1,441 @@ + + + + + +qvariant.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qvariant.h

+ +

This is the verbatim text of the qvariant.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qvariant.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQVariant class
+**
+** Created : 990414
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQVARIANT_H
+#define TQVARIANT_H
+
+#ifndef QT_H
+#include "qstring.h"
+#endif // QT_H
+
+#ifndef QT_NO_VARIANT
+class TQString;
+class TQCString;
+class TQFont;
+class TQPixmap;
+class TQBrush;
+class TQRect;
+class TQPoint;
+class TQImage;
+class TQSize;
+class TQColor;
+class TQPalette;
+class TQColorGroup;
+class TQIconSet;
+class TQDataStream;
+class TQPointArray;
+class TQRegion;
+class TQBitmap;
+class TQCursor;
+class TQStringList;
+class TQSizePolicy;
+class TQDate;
+class TQTime;
+class TQDateTime;
+class TQBitArray;
+class TQKeySequence;
+class TQPen;
+// Some headers rejected after TQVariant declaration for GCC 2.7.* compatibility
+class TQVariant;
+#ifndef QT_NO_TEMPLATE_VARIANT
+template <class T> class TQValueList;
+template <class T> class TQValueListConstIterator;
+template <class T> class TQValueListNode;
+template <class Key, class T> class TQMap;
+template <class Key, class T> class TQMapConstIterator;
+#endif
+
+class Q_EXPORT TQVariant
+{
+public:
+    enum Type {
+	Invalid,
+	Map,
+	List,
+	String,
+	StringList,
+	Font,
+	Pixmap,
+	Brush,
+	Rect,
+	Size,
+	Color,
+	Palette,
+	ColorGroup,
+	IconSet,
+	Point,
+	Image,
+	Int,
+	UInt,
+	Bool,
+	Double,
+	CString,
+	PointArray,
+	Region,
+	Bitmap,
+	Cursor,
+	SizePolicy,
+	Date,
+	Time,
+	DateTime,
+	ByteArray,
+	BitArray,
+	KeySequence,
+	Pen,
+	LongLong,
+	ULongLong
+    };
+
+    TQVariant();
+    ~TQVariant();
+    TQVariant( const TQVariant& );
+#ifndef QT_NO_DATASTREAM
+    TQVariant( TQDataStream& s );
+#endif
+    TQVariant( const TQString& );
+    TQVariant( const TQCString& );
+    TQVariant( const char* );
+#ifndef QT_NO_STRINGLIST
+    TQVariant( const TQStringList& );
+#endif
+    TQVariant( const TQFont& );
+    TQVariant( const TQPixmap& );
+    TQVariant( const TQImage& );
+    TQVariant( const TQBrush& );
+    TQVariant( const TQPoint& );
+    TQVariant( const TQRect& );
+    TQVariant( const TQSize& );
+    TQVariant( const TQColor& );
+    TQVariant( const TQPalette& );
+    TQVariant( const TQColorGroup& );
+    TQVariant( const TQIconSet& );
+    TQVariant( const TQPointArray& );
+    TQVariant( const TQRegion& );
+    TQVariant( const TQBitmap& );
+    TQVariant( const TQCursor& );
+    TQVariant( const TQDate& );
+    TQVariant( const TQTime& );
+    TQVariant( const TQDateTime& );
+    TQVariant( const TQByteArray& );
+    TQVariant( const TQBitArray& );
+#ifndef QT_NO_ACCEL
+    TQVariant( const TQKeySequence& );
+#endif
+    TQVariant( const TQPen& );
+#ifndef QT_NO_TEMPLATE_VARIANT
+    TQVariant( const TQValueList<TQVariant>& );
+    TQVariant( const TQMap<TQString,TQVariant>& );
+#endif
+    TQVariant( int );
+    TQVariant( uint );
+    TQVariant( Q_LLONG );
+    TQVariant( Q_ULLONG );
+    // ### Problems on some compilers ?
+    TQVariant( bool, int );
+    TQVariant( double );
+    TQVariant( TQSizePolicy );
+
+    TQVariant& operator= ( const TQVariant& );
+    bool operator==( const TQVariant& ) const;
+    bool operator!=( const TQVariant& ) const;
+
+    Type type() const;
+    const char* typeName() const;
+
+    bool canCast( Type ) const;
+    bool cast( Type );
+
+    bool isValid() const;
+    bool isNull() const;
+
+    void clear();
+
+    const TQString toString() const;
+    const TQCString toCString() const;
+#ifndef QT_NO_STRINGLIST
+    const TQStringList toStringList() const;
+#endif
+    const TQFont toFont() const;
+    const TQPixmap toPixmap() const;
+    const TQImage toImage() const;
+    const TQBrush toBrush() const;
+    const TQPoint toPoint() const;
+    const TQRect toRect() const;
+    const TQSize toSize() const;
+    const TQColor toColor() const;
+    const TQPalette toPalette() const;
+    const TQColorGroup toColorGroup() const;
+    const TQIconSet toIconSet() const;
+    const TQPointArray toPointArray() const;
+    const TQBitmap toBitmap() const;
+    const TQRegion toRegion() const;
+    const TQCursor toCursor() const;
+    const TQDate toDate() const;
+    const TQTime toTime() const;
+    const TQDateTime toDateTime() const;
+    const TQByteArray toByteArray() const;
+    const TQBitArray toBitArray() const;
+#ifndef QT_NO_ACCEL
+    const TQKeySequence toKeySequence() const;
+#endif
+    const TQPen toPen() const;
+    int toInt( bool * ok=0 ) const;
+    uint toUInt( bool * ok=0 ) const;
+    Q_LLONG toLongLong( bool * ok=0 ) const;
+    Q_ULLONG toULongLong( bool * ok=0 ) const;
+    bool toBool() const;
+    double toDouble( bool * ok=0 ) const;
+#ifndef QT_NO_TEMPLATE_VARIANT
+    const TQValueList<TQVariant> toList() const;
+    const TQMap<TQString,TQVariant> toMap() const;
+#endif
+    TQSizePolicy toSizePolicy() const;
+
+#ifndef QT_NO_TEMPLATE_VARIANT
+    TQValueListConstIterator<TQString> stringListBegin() const;
+    TQValueListConstIterator<TQString> stringListEnd() const;
+    TQValueListConstIterator<TQVariant> listBegin() const;
+    TQValueListConstIterator<TQVariant> listEnd() const;
+    TQMapConstIterator<TQString,TQVariant> mapBegin() const;
+    TQMapConstIterator<TQString,TQVariant> mapEnd() const;
+    TQMapConstIterator<TQString,TQVariant> mapFind( const TQString& ) const;
+#endif
+    TQString& asString();
+    TQCString& asCString();
+#ifndef QT_NO_STRINGLIST
+    TQStringList& asStringList();
+#endif
+    TQFont& asFont();
+    TQPixmap& asPixmap();
+    TQImage& asImage();
+    TQBrush& asBrush();
+    TQPoint& asPoint();
+    TQRect& asRect();
+    TQSize& asSize();
+    TQColor& asColor();
+    TQPalette& asPalette();
+    TQColorGroup& asColorGroup();
+    TQIconSet& asIconSet();
+    TQPointArray& asPointArray();
+    TQBitmap& asBitmap();
+    TQRegion& asRegion();
+    TQCursor& asCursor();
+    TQDate& asDate();
+    TQTime& asTime();
+    TQDateTime& asDateTime();
+    TQByteArray& asByteArray();
+    TQBitArray& asBitArray();
+#ifndef QT_NO_ACCEL
+    TQKeySequence& asKeySequence();
+#endif
+    TQPen& asPen();
+    int& asInt();
+    uint& asUInt();
+    Q_LLONG& asLongLong();
+    Q_ULLONG& asULongLong();
+    bool& asBool();
+    double& asDouble();
+#ifndef QT_NO_TEMPLATE_VARIANT
+    TQValueList<TQVariant>& asList();
+    TQMap<TQString,TQVariant>& asMap();
+#endif
+    TQSizePolicy& asSizePolicy();
+
+#ifndef QT_NO_DATASTREAM
+    void load( TQDataStream& );
+    void save( TQDataStream& ) const;
+#endif
+    static const char* typeToName( Type typ );
+    static Type nameToType( const char* name );
+
+private:
+    void detach();
+
+    class Private : public TQShared
+    {
+    public:
+	Private();
+	Private( Private* );
+	~Private();
+
+	void clear();
+
+	Type typ;
+	union
+	{
+	    uint u;
+	    int i;
+	    Q_LLONG ll;
+	    Q_ULLONG ull;
+	    bool b;
+	    double d;
+	    void *ptr;
+	} value;
+	uint is_null : 1; // ## 4.0 merge with typ
+    };
+
+    Private* d;
+
+public:
+    void* rawAccess( void* ptr = 0, Type typ = Invalid, bool deepCopy = FALSE );
+};
+
+// down here for GCC 2.7.* compatibility
+#ifndef QT_H
+#include "qvaluelist.h"
+#include "qstringlist.h"
+#include "qmap.h"
+#endif // QT_H
+
+inline TQVariant::Type TQVariant::type() const
+{
+    return d->typ;
+}
+
+inline bool TQVariant::isValid() const
+{
+    return (d->typ != Invalid);
+}
+
+#ifndef QT_NO_TEMPLATE_VARIANT
+inline TQValueListConstIterator<TQString> TQVariant::stringListBegin() const
+{
+    if ( d->typ != StringList )
+	return TQValueListConstIterator<TQString>();
+    return ((const TQStringList*)d->value.ptr)->begin();
+}
+
+inline TQValueListConstIterator<TQString> TQVariant::stringListEnd() const
+{
+    if ( d->typ != StringList )
+	return TQValueListConstIterator<TQString>();
+    return ((const TQStringList*)d->value.ptr)->end();
+}
+
+inline TQValueListConstIterator<TQVariant> TQVariant::listBegin() const
+{
+    if ( d->typ != List )
+	return TQValueListConstIterator<TQVariant>();
+    return ((const TQValueList<TQVariant>*)d->value.ptr)->begin();
+}
+
+inline TQValueListConstIterator<TQVariant> TQVariant::listEnd() const
+{
+    if ( d->typ != List )
+	return TQValueListConstIterator<TQVariant>();
+    return ((const TQValueList<TQVariant>*)d->value.ptr)->end();
+}
+
+inline TQMapConstIterator<TQString,TQVariant> TQVariant::mapBegin() const
+{
+    if ( d->typ != Map )
+	return TQMapConstIterator<TQString,TQVariant>();
+    return ((const TQMap<TQString,TQVariant>*)d->value.ptr)->begin();
+}
+
+inline TQMapConstIterator<TQString,TQVariant> TQVariant::mapEnd() const
+{
+    if ( d->typ != Map )
+	return TQMapConstIterator<TQString,TQVariant>();
+    return ((const TQMap<TQString,TQVariant>*)d->value.ptr)->end();
+}
+
+inline TQMapConstIterator<TQString,TQVariant> TQVariant::mapFind( const TQString& key ) const
+{
+    if ( d->typ != Map )
+	return TQMapConstIterator<TQString,TQVariant>();
+    return ((const TQMap<TQString,TQVariant>*)d->value.ptr)->find( key );
+}
+#endif
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT TQDataStream& operator>> ( TQDataStream& s, TQVariant& p );
+Q_EXPORT TQDataStream& operator<< ( TQDataStream& s, const TQVariant& p );
+Q_EXPORT TQDataStream& operator>> ( TQDataStream& s, TQVariant::Type& p );
+Q_EXPORT TQDataStream& operator<< ( TQDataStream& s, const TQVariant::Type p );
+#endif
+
+#endif //QT_NO_VARIANT
+#endif // TQVARIANT_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qvariant-members.html b/doc/html/qvariant-members.html new file mode 100644 index 00000000..11393551 --- /dev/null +++ b/doc/html/qvariant-members.html @@ -0,0 +1,135 @@ + + + + + +TQVariant Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQVariant

+ +

This is the complete list of member functions for +TQVariant, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qvariant.html b/doc/html/qvariant.html new file mode 100644 index 00000000..517bf76b --- /dev/null +++ b/doc/html/qvariant.html @@ -0,0 +1,1149 @@ + + + + + +TQVariant Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQVariant Class Reference

+ +

The TQVariant class acts like a union for the most common TQt data types. +More... +

#include <qvariant.h> +

List of all member functions. +

Public Members

+ +

Static Public Members

+ +

Detailed Description

+ + +The TQVariant class acts like a union for the most common TQt data types. +

+ + +

Because C++ forbids unions from including types that have +non-default constructors or destructors, most interesting TQt +classes cannot be used in unions. Without TQVariant, this would be +a problem for TQObject::property() and for database work, etc. +

A TQVariant object holds a single value of a single type() at a +time. (Some type()s are multi-valued, for example a string list.) +You can find out what type, T, the variant holds, convert it to a +different type using one of the asT() functions, e.g. asSize(), +get its value using one of the toT() functions, e.g. toSize(), and +check whether the type can be converted to a particular type using +canCast(). +

The methods named toT() (for any supported T, see the Type +documentation for a list) are const. If you ask for the stored +type, they return a copy of the stored object. If you ask for a +type that can be generated from the stored type, toT() copies and +converts and leaves the object itself unchanged. If you ask for a +type that cannot be generated from the stored type, the result +depends on the type (see the function documentation for details). +

Note that three data types supported by TQVariant are explicitly shared, namely TQImage, TQPointArray, and TQCString, and in these +cases the toT() methods return a shallow copy. In almost all cases +you must make a deep copy of the returned values before modifying +them. +

The asT() functions are not const. They do conversion like the +toT() methods, set the variant to hold the converted value, and +return a reference to the new contents of the variant. +

Here is some example code to demonstrate the use of TQVariant: +

+    TQDataStream out(...);
+    TQVariant v(123);          // The variant now contains an int
+    int x = v.toInt();        // x = 123
+    out << v;                 // Writes a type tag and an int to out
+    v = TQVariant("hello");    // The variant now contains a TQCString
+    v = TQVariant(tr("hello"));// The variant now contains a TQString
+    int y = v.toInt();        // y = 0 since v cannot be converted to an int
+    TQString s = v.toString(); // s = tr("hello")  (see TQObject::tr())
+    out << v;                 // Writes a type tag and a TQString to out
+    ...
+    TQDataStream in(...);      // (opening the previously written stream)
+    in >> v;                  // Reads an Int variant
+    int z = v.toInt();        // z = 123
+    qDebug("Type is %s",      // prints "Type is int"
+            v.typeName());
+    v.asInt() += 100;         // The variant now hold the value 223.
+    v = TQVariant( TQStringList() );
+    v.asStringList().append( "Hello" );
+    
+ +

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. +

TQVariant also supports the notion of NULL values, where you have a +defined type with no value set. +

+    TQVariant x, y( TQString() ), z( TQString("") );
+    x.asInt();
+    // x.isNull() == TRUE, y.isNull() == TRUE, z.isNull() == FALSE
+    
+ +

See the Collection Classes. +

See also Miscellaneous Classes and Object Model. + +


Member Type Documentation

+

TQVariant::Type

+ +

This enum type defines the types of variable that a TQVariant can +contain. +

Note that TQt's definition of bool depends on the compiler. +qglobal.h has the system-dependent definition of bool. + +


Member Function Documentation

+

TQVariant::TQVariant () +

+Constructs an invalid variant. + +

TQVariant::TQVariant ( bool val, int ) +

+Constructs a new variant with a boolean value, val. The integer +argument is a dummy, necessary for compatibility with some +compilers. + +

TQVariant::TQVariant ( double val ) +

+Constructs a new variant with a floating point value, val. + +

TQVariant::TQVariant ( TQSizePolicy val ) +

+Constructs a new variant with a size policy value, val. + +

TQVariant::TQVariant ( const TQVariant & p ) +

+Constructs a copy of the variant, p, passed as the argument to +this constructor. Usually this is a deep copy, but a shallow copy +is made if the stored data type is explicitly shared, as e.g. +TQImage is. + +

TQVariant::TQVariant ( TQDataStream & s ) +

+Reads the variant from the data stream, s. + +

TQVariant::TQVariant ( const TQString & val ) +

+Constructs a new variant with a string value, val. + +

TQVariant::TQVariant ( const TQCString & val ) +

+Constructs a new variant with a C-string value, val. +

If you want to modify the TQCString after you've passed it to this +constructor, we recommend passing a deep copy (see +TQCString::copy()). + +

TQVariant::TQVariant ( const char * val ) +

+Constructs a new variant with a C-string value of val if val +is non-null. The variant creates a deep copy of val. +

If val is null, the resulting variant has type Invalid. + +

TQVariant::TQVariant ( const TQStringList & val ) +

+Constructs a new variant with a string list value, val. + +

TQVariant::TQVariant ( const TQFont & val ) +

+Constructs a new variant with a font value, val. + +

TQVariant::TQVariant ( const TQPixmap & val ) +

+Constructs a new variant with a pixmap value, val. + +

TQVariant::TQVariant ( const TQImage & val ) +

+Constructs a new variant with an image value, val. +

Because TQImage is explicitly shared, you may need to pass a deep copy to the variant using TQImage::copy(), e.g. if you intend +changing the image you've passed later on. + +

TQVariant::TQVariant ( const TQBrush & val ) +

+Constructs a new variant with a brush value, val. + +

TQVariant::TQVariant ( const TQPoint & val ) +

+Constructs a new variant with a point value, val. + +

TQVariant::TQVariant ( const TQRect & val ) +

+Constructs a new variant with a rect value, val. + +

TQVariant::TQVariant ( const TQSize & val ) +

+Constructs a new variant with a size value, val. + +

TQVariant::TQVariant ( const TQColor & val ) +

+Constructs a new variant with a color value, val. + +

TQVariant::TQVariant ( const TQPalette & val ) +

+Constructs a new variant with a color palette value, val. + +

TQVariant::TQVariant ( const TQColorGroup & val ) +

+Constructs a new variant with a color group value, val. + +

TQVariant::TQVariant ( const TQIconSet & val ) +

+Constructs a new variant with an icon set value, val. + +

TQVariant::TQVariant ( const TQPointArray & val ) +

+Constructs a new variant with a point array value, val. +

Because TQPointArray is explicitly shared, you may need to pass a +deep copy to the variant using TQPointArray::copy(), e.g. if you +intend changing the point array you've passed later on. + +

TQVariant::TQVariant ( const TQRegion & val ) +

+Constructs a new variant with a region value, val. + +

TQVariant::TQVariant ( const TQBitmap & val ) +

+Constructs a new variant with a bitmap value, val. + +

TQVariant::TQVariant ( const TQCursor & val ) +

+Constructs a new variant with a cursor value, val. + +

TQVariant::TQVariant ( const TQDate & val ) +

+Constructs a new variant with a date value, val. + +

TQVariant::TQVariant ( const TQTime & val ) +

+Constructs a new variant with a time value, val. + +

TQVariant::TQVariant ( const TQDateTime & val ) +

+Constructs a new variant with a date/time value, val. + +

TQVariant::TQVariant ( const TQByteArray & val ) +

+Constructs a new variant with a bytearray value, val. + +

TQVariant::TQVariant ( const TQBitArray & val ) +

+Constructs a new variant with a bitarray value, val. + +

TQVariant::TQVariant ( const TQKeySequence & val ) +

+Constructs a new variant with a key sequence value, val. + +

TQVariant::TQVariant ( const TQPen & val ) +

+Constructs a new variant with a pen value, val. + +

TQVariant::TQVariant ( const TQValueList<TQVariant> & val ) +

+Constructs a new variant with a list value, val. + +

TQVariant::TQVariant ( const TQMap<TQString, TQVariant> & val ) +

+Constructs a new variant with a map of TQVariants, val. + +

TQVariant::TQVariant ( int val ) +

+Constructs a new variant with an integer value, val. + +

TQVariant::TQVariant ( uint val ) +

+Constructs a new variant with an unsigned integer value, val. + +

TQVariant::TQVariant ( Q_LLONG val ) +

+Constructs a new variant with a long long integer value, val. + +

TQVariant::TQVariant ( Q_ULLONG val ) +

+Constructs a new variant with an unsigned long long integer value, val. + +

TQVariant::~TQVariant () +

+Destroys the TQVariant and the contained object. +

Note that subclasses that reimplement clear() should reimplement +the destructor to call clear(). This destructor calls clear(), but +because it is the destructor, TQVariant::clear() is called rather +than a subclass's clear(). + +

TQBitArray & TQVariant::asBitArray () +

+ +

Tries to convert the variant to hold a TQBitArray value. If that is +not possible then the variant is set to an empty bitarray. +

Returns a reference to the stored bitarray. +

See also toBitArray(). + +

TQBitmap & TQVariant::asBitmap () +

+ +

Tries to convert the variant to hold a bitmap value. If that is +not possible the variant is set to a null bitmap. +

Returns a reference to the stored bitmap. +

See also toBitmap(). + +

bool & TQVariant::asBool () +

+Returns the variant's value as bool reference. + +

TQBrush & TQVariant::asBrush () +

+ +

Tries to convert the variant to hold a brush value. If that is not +possible the variant is set to a default black brush. +

Returns a reference to the stored brush. +

See also toBrush(). + +

TQByteArray & TQVariant::asByteArray () +

+ +

Tries to convert the variant to hold a TQByteArray value. If that +is not possible then the variant is set to an empty bytearray. +

Returns a reference to the stored bytearray. +

See also toByteArray(). + +

TQCString & TQVariant::asCString () +

+ +

Tries to convert the variant to hold a string value. If that is +not possible the variant is set to an empty string. +

Returns a reference to the stored string. +

See also toCString(). + +

TQColor & TQVariant::asColor () +

+ +

Tries to convert the variant to hold a TQColor value. If that is +not possible the variant is set to an invalid color. +

Returns a reference to the stored color. +

See also toColor() and TQColor::isValid(). + +

TQColorGroup & TQVariant::asColorGroup () +

+ +

Tries to convert the variant to hold a TQColorGroup value. If that +is not possible the variant is set to a color group of all black +colors. +

Returns a reference to the stored color group. +

See also toColorGroup(). + +

TQCursor & TQVariant::asCursor () +

+ +

Tries to convert the variant to hold a TQCursor value. If that is +not possible the variant is set to a default arrow cursor. +

Returns a reference to the stored cursor. +

See also toCursor(). + +

TQDate & TQVariant::asDate () +

+ +

Tries to convert the variant to hold a TQDate value. If that is not +possible then the variant is set to an invalid date. +

Returns a reference to the stored date. +

See also toDate(). + +

TQDateTime & TQVariant::asDateTime () +

+ +

Tries to convert the variant to hold a TQDateTime value. If that is +not possible then the variant is set to an invalid date/time. +

Returns a reference to the stored date/time. +

See also toDateTime(). + +

double & TQVariant::asDouble () +

+Returns the variant's value as double reference. + +

TQFont & TQVariant::asFont () +

+ +

Tries to convert the variant to hold a TQFont. If that is not +possible the variant is set to the application's default font. +

Returns a reference to the stored font. +

See also toFont(). + +

TQIconSet & TQVariant::asIconSet () +

+ +

Tries to convert the variant to hold a TQIconSet value. If that is +not possible the variant is set to an empty iconset. +

Returns a reference to the stored iconset. +

See also toIconSet(). + +

TQImage & TQVariant::asImage () +

+ +

Tries to convert the variant to hold an image value. If that is +not possible the variant is set to a null image. +

Returns a reference to the stored image. +

See also toImage(). + +

int & TQVariant::asInt () +

+Returns the variant's value as int reference. + +

TQKeySequence & TQVariant::asKeySequence () +

+ +

Tries to convert the variant to hold a TQKeySequence value. If that +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 () +

+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() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ + +

Q_LLONG & TQVariant::asLongLong () +

+Returns the variant's value as long long reference. + +

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() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ + +

TQPalette & TQVariant::asPalette () +

+ +

Tries to convert the variant to hold a TQPalette value. If that is +not possible the variant is set to a palette of black colors. +

Returns a reference to the stored palette. +

See also toString(). + +

TQPen & TQVariant::asPen () +

+

Tries to convert the variant to hold a TQPen value. If that +is not possible then the variant is set to an empty pen. +

Returns a reference to the stored pen. +

See also toPen(). + +

TQPixmap & TQVariant::asPixmap () +

+ +

Tries to convert the variant to hold a pixmap value. If that is +not possible the variant is set to a null pixmap. +

Returns a reference to the stored pixmap. +

See also toPixmap(). + +

TQPoint & TQVariant::asPoint () +

+ +

Tries to convert the variant to hold a point value. If that is not +possible the variant is set to a (0, 0) point. +

Returns a reference to the stored point. +

See also toPoint(). + +

TQPointArray & TQVariant::asPointArray () +

+ +

Tries to convert the variant to hold a TQPointArray value. If that +is not possible the variant is set to an empty point array. +

Returns a reference to the stored point array. +

See also toPointArray(). + +

TQRect & TQVariant::asRect () +

+ +

Tries to convert the variant to hold a rectangle value. If that is +not possible the variant is set to an empty rectangle. +

Returns a reference to the stored rectangle. +

See also toRect(). + +

TQRegion & TQVariant::asRegion () +

+ +

Tries to convert the variant to hold a TQRegion value. If that is +not possible the variant is set to a null region. +

Returns a reference to the stored region. +

See also toRegion(). + +

TQSize & TQVariant::asSize () +

+ +

Tries to convert the variant to hold a TQSize value. If that is not +possible the variant is set to an invalid size. +

Returns a reference to the stored size. +

See also toSize() and TQSize::isValid(). + +

TQSizePolicy & TQVariant::asSizePolicy () +

+ +

Tries to convert the variant to hold a TQSizePolicy value. If that +fails, the variant is set to an arbitrary (valid) size policy. + +

TQString & TQVariant::asString () +

+ +

Tries to convert the variant to hold a string value. If that is +not possible the variant is set to an empty string. +

Returns a reference to the stored string. +

See also toString(). + +

TQStringList & TQVariant::asStringList () +

+ +

Tries to convert the variant to hold a TQStringList value. If that +is not possible the variant is set to an empty string list. +

Returns a reference to the stored string list. +

Note that if you want to iterate over the list, you should +iterate over a copy, e.g. +

+    TQStringList list = myVariant.asStringList();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also toStringList(). + +

TQTime & TQVariant::asTime () +

+ +

Tries to convert the variant to hold a TQTime value. If that is not +possible then the variant is set to an invalid time. +

Returns a reference to the stored time. +

See also toTime(). + +

uint & TQVariant::asUInt () +

+Returns the variant's value as unsigned int reference. + +

Q_ULLONG & TQVariant::asULongLong () +

+Returns the variant's value as unsigned long long reference. + +

bool TQVariant::canCast ( Type t ) const +

+Returns TRUE if the variant's type can be cast to the requested +type, t. Such casting is done automatically when calling the +toInt(), toBool(), ... or asInt(), asBool(), ... methods. +

The following casts are done automatically: +

+
Type Automatically Cast To +
Bool Double, Int, UInt, LongLong, ULongLong, String, CString, ByteArray +
Color String. CString. ByteArray +
Date String, CString, ByteArray, DateTime +
DateTime String, CString, ByteArray, Date, Time +
Double String, CString, ByteArray, Int, Bool, UInt, LongLong, ULongLong +
Font String, CString, ByteArray +
Int String, CString, ByteArray, Double, Bool, UInt, LongLong, ULongLong, KeySequence +
LongLong String, CString, ByteArray, Double, Bool, UInt, LongLong, ULongLong, KeySequence +
ULongLong String, CString, ByteArray, Double, Bool, UInt, LongLong, ULongLong, KeySequence +
List StringList (if the list contains only strings or +something that can be cast to a string) +
String CString, ByteArray, CString, Int, UInt, Bool, Double, Date, +Time, DateTime, KeySequence, Font, Color +
CString String, ByteArray, Int, UInt, Bool, Double, Date, ULongLong, LongLong +
ByteArray String, CString, Int, UInt, Bool, Double, Date, ULongLong, LongLong +
StringList List +
Time String +
Int String, CString, ByteArray, Double, Bool, UInt, LongLong, ULongLong, KeySequence +
KeySequence String, CString, ByteArray, Int, UInt, LongLong, ULongLong +
+ +

bool TQVariant::cast ( Type t ) +

+Casts the variant to the requested type. If the cast cannot be +done, the variant is set to the default value of the requested +type (e.g. an empty string if the requested type t is +TQVariant::String, an empty point array if the requested type t +is TQVariant::PointArray, etc). Returns TRUE if the current type of +the variant was successfully cast; otherwise returns FALSE. +

See also canCast(). + +

void TQVariant::clear () +

+Convert this variant to type Invalid and free up any resources +used. + +

bool TQVariant::isNull () const +

+Returns TRUE if this is a NULL variant, FALSE otherwise. + +

bool TQVariant::isValid () const +

+ +

Returns TRUE if the storage type of this variant is not +TQVariant::Invalid; otherwise returns FALSE. + +

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 +

+ +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 +

+ +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 +

+ +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 +

+ +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 item in the map with key as key, if +the variant's type is appropriate and key is a valid key; +otherwise returns a null iterator. + +

Type TQVariant::nameToType ( const char * name ) [static] +

+Converts the string representation of the storage type given in name, to its enum representation. +

If the string representation cannot be converted to any enum +representation, the variant is set to Invalid. + +

bool TQVariant::operator!= ( const TQVariant & v ) const +

+Compares this TQVariant with v and returns TRUE if they are not +equal; otherwise returns FALSE. + +

TQVariant & TQVariant::operator= ( const TQVariant & variant ) +

+Assigns the value of the variant variant 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. + +

bool TQVariant::operator== ( const TQVariant & v ) const +

+Compares this TQVariant with v and returns TRUE if they are +equal; otherwise returns FALSE. + +

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 +

+ +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 +StringList; otherwise returns a null iterator. + +

const TQBitArray TQVariant::toBitArray () const +

+Returns the variant as a TQBitArray if the variant has type() +BitArray; otherwise returns an empty bitarray. +

See also asBitArray(). + +

const TQBitmap TQVariant::toBitmap () const +

+Returns the variant as a TQBitmap if the variant has type() Bitmap; +otherwise returns a null TQBitmap. +

See also asBitmap(). + +

bool TQVariant::toBool () const +

+Returns the variant as a bool if the variant can be cast to Bool; +otherWise returns FALSE. +

Returns TRUE if the variant has a numeric type and its value is +non-zero, or if the variant has type String, ByteArray or CString +and its lower-case content is not empty, "0" or "false"; otherwise +returns FALSE. +

See also asBool() and canCast(). + +

const TQBrush TQVariant::toBrush () const +

+Returns the variant as a TQBrush if the variant has type() Brush; +otherwise returns a default brush (with all black colors). +

See also asBrush(). + +

const TQByteArray TQVariant::toByteArray () const +

+Returns the variant as a TQByteArray if the variant can be cast to +a ByteArray; otherwise returns an empty bytearray. +

See also asByteArray() and canCast(). + +

const TQCString TQVariant::toCString () const +

+Returns the variant as a TQCString if the variant can be cast to a +CString; otherwise returns 0. +

See also asCString() and canCast(). + +

const TQColor TQVariant::toColor () const +

+Returns the variant as a TQColor if the variant can be cast to Color; +otherwise returns an invalid color. +

See also asColor() and canCast(). + +

const TQColorGroup TQVariant::toColorGroup () const +

+Returns the variant as a TQColorGroup if the variant has type() +ColorGroup; otherwise returns a completely black color group. +

See also asColorGroup(). + +

const TQCursor TQVariant::toCursor () const +

+Returns the variant as a TQCursor if the variant has type() Cursor; +otherwise returns the default arrow cursor. +

See also asCursor(). + +

const TQDate TQVariant::toDate () const +

+Returns the variant as a TQDate if the variant can be cast to Date; +otherwise returns an invalid date. +

Note that if the type() is String, CString or ByteArray an invalid +date will be returned if the string cannot be parsed as a +TQt::ISODate format date. +

See also asDate() and canCast(). + +

const TQDateTime TQVariant::toDateTime () const +

+Returns the variant as a TQDateTime if the variant can be cast to +DateTime; otherwise returns an invalid TQDateTime. +

Note that if the type() is String, CString or ByteArray an invalid +TQDateTime will be returned if the string cannot be parsed as a +TQt::ISODate format date/time. +

See also asDateTime(). + +

double TQVariant::toDouble ( bool * ok = 0 ) const +

+Returns the variant as a double if the variant can be cast to +Double; otherwise returns 0.0. +

If ok is non-null: *ok is set to TRUE if the value could be +converted to a double; otherwise *ok is set to FALSE. +

See also asDouble() and canCast(). + +

const TQFont TQVariant::toFont () const +

+Returns the variant as a TQFont if the variant can be cast to Font; +otherwise returns the application's default font. +

See also asFont() and canCast(). + +

const TQIconSet TQVariant::toIconSet () const +

+Returns the variant as a TQIconSet if the variant has type() +IconSet; otherwise returns an icon set of null pixmaps. +

See also asIconSet(). + +

const TQImage TQVariant::toImage () const +

+Returns the variant as a TQImage if the variant has type() Image; +otherwise returns a null image. +

See also asImage(). + +

int TQVariant::toInt ( bool * ok = 0 ) const +

+Returns the variant as an int if the variant can be cast to Int; +otherwise returns 0. +

If ok is non-null: *ok is set to TRUE if the value could be +converted to an int; otherwise *ok is set to FALSE. +

See also asInt() and canCast(). + +

const TQKeySequence TQVariant::toKeySequence () const +

+Returns the variant as a TQKeySequence if the variant can be cast +to a KeySequence; otherwise returns an empty key sequence. +

See also asKeySequence() and canCast(). + +

const TQValueList<TQVariant> TQVariant::toList () const +

+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() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also asList(). + +

Q_LLONG TQVariant::toLongLong ( bool * ok = 0 ) const +

+Returns the variant as a long long int if the variant can be cast +to LongLong; otherwise returns 0. +

If ok is non-null: *ok is set to TRUE if the value could be +converted to an int; otherwise *ok is set to FALSE. +

See also asLongLong() and canCast(). + +

const TQMap<TQString, TQVariant> TQVariant::toMap () const +

+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() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also asMap(). + +

const TQPalette TQVariant::toPalette () const +

+Returns the variant as a TQPalette if the variant has type() +Palette; otherwise returns a completely black palette. +

See also asPalette(). + +

const TQPen TQVariant::toPen () const +

+Returns the variant as a TQPen if the variant has type() +Pen; otherwise returns an empty TQPen. +

See also asPen(). + +

const TQPixmap TQVariant::toPixmap () const +

+Returns the variant as a TQPixmap if the variant has type() Pixmap; +otherwise returns a null pixmap. +

See also asPixmap(). + +

const TQPoint TQVariant::toPoint () const +

+Returns the variant as a TQPoint if the variant has type() Point; +otherwise returns a point (0, 0). +

See also asPoint(). + +

const TQPointArray TQVariant::toPointArray () const +

+Returns the variant as a TQPointArray if the variant has type() +PointArray; otherwise returns an empty TQPointArray. +

See also asPointArray(). + +

const TQRect TQVariant::toRect () const +

+Returns the variant as a TQRect if the variant has type() Rect; +otherwise returns an empty rectangle. +

See also asRect(). + +

const TQRegion TQVariant::toRegion () const +

+Returns the variant as a TQRegion if the variant has type() Region; +otherwise returns an empty TQRegion. +

See also asRegion(). + +

const TQSize TQVariant::toSize () const +

+Returns the variant as a TQSize if the variant has type() Size; +otherwise returns an invalid size. +

See also asSize(). + +

TQSizePolicy TQVariant::toSizePolicy () const +

+Returns the variant as a TQSizePolicy if the variant has type() +SizePolicy; otherwise returns an undefined (but legal) size +policy. + +

const TQString TQVariant::toString () const +

+Returns the variant as a TQString if the variant can be cast to +String, otherwise returns TQString::null. +

See also asString() and canCast(). + +

const TQStringList TQVariant::toStringList () const +

+Returns the variant as a TQStringList if the variant has type() +StringList or List of a type that can be converted to TQString; +otherwise returns an empty list. +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+    TQStringList list = myVariant.toStringList();
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ +

See also asStringList(). + +

const TQTime TQVariant::toTime () const +

+Returns the variant as a TQTime if the variant can be cast to Time; +otherwise returns an invalid date. +

Note that if the type() is String, CString or ByteArray an invalid +time will be returned if the string cannot be parsed as a +TQt::ISODate format time. +

See also asTime(). + +

uint TQVariant::toUInt ( bool * ok = 0 ) const +

+Returns the variant as an unsigned int if the variant can be cast +to UInt; otherwise returns 0. +

If ok is non-null: *ok is set to TRUE if the value could be +converted to an unsigned int; otherwise *ok is set to FALSE. +

See also asUInt() and canCast(). + +

Q_ULLONG TQVariant::toULongLong ( bool * ok = 0 ) const +

+Returns the variant as as an unsigned long long int if the variant +can be cast to ULongLong; otherwise returns 0. +

If ok is non-null: *ok is set to TRUE if the value could be +converted to an int; otherwise *ok is set to FALSE. +

See also asULongLong() and canCast(). + +

Type TQVariant::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. + +

const char * TQVariant::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, "TQFont", "TQString", or "TQValueList". An Invalid +variant returns 0. + +

const char * TQVariant::typeToName ( Type typ ) [static] +

+Converts the enum representation of the storage type, typ, to +its string representation. + + +

+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/qvbox-h.html b/doc/html/qvbox-h.html new file mode 100644 index 00000000..76a18163 --- /dev/null +++ b/doc/html/qvbox-h.html @@ -0,0 +1,110 @@ + + + + + +qvbox.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qvbox.h

+ +

This is the verbatim text of the qvbox.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qvbox.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of vertical box layout widget class
+**
+** Created : 990124
+**
+** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQVBOX_H
+#define TQVBOX_H
+
+#ifndef QT_H
+#include "qhbox.h"
+#endif // QT_H
+
+#ifndef QT_NO_VBOX
+
+class Q_EXPORT TQVBox : public TQHBox
+{
+    Q_OBJECT
+public:
+    TQVBox( TQWidget* parent=0, const char* name=0, WFlags f=0 );
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQVBox( const TQVBox & );
+    TQVBox& operator=( const TQVBox & );
+#endif
+};
+
+#endif // QT_NO_VBOX
+
+#endif // TQVBOX_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qvbox-m.png b/doc/html/qvbox-m.png new file mode 100644 index 00000000..95527a2b Binary files /dev/null and b/doc/html/qvbox-m.png differ diff --git a/doc/html/qvbox-members.html b/doc/html/qvbox-members.html new file mode 100644 index 00000000..c4784efc --- /dev/null +++ b/doc/html/qvbox-members.html @@ -0,0 +1,358 @@ + + + + + +TQVBox Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQVBox

+ +

This is the complete list of member functions for +TQVBox, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qvbox.html b/doc/html/qvbox.html new file mode 100644 index 00000000..eb3e8f77 --- /dev/null +++ b/doc/html/qvbox.html @@ -0,0 +1,73 @@ + + + + + +TQVBox Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQVBox Class Reference

+ +

The TQVBox widget provides vertical geometry management of +its child widgets. +More... +

#include <qvbox.h> +

Inherits TQHBox. +

List of all member functions. +

Public Members

+
    +
  • TQVBox ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )
  • +
+

Detailed Description

+ + +The TQVBox widget provides vertical geometry management of +its child widgets. +

+ + +

All its child widgets will be placed vertically and sized +according to their sizeHint()s. +

TQVBox
+

See also TQHBox, Widget Appearance and Style, Layout Management, and Organizers. + +


Member Function Documentation

+

TQVBox::TQVBox ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

+Constructs a vbox widget called name with parent parent and +widget flags f. + + +

+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/qvboxlayout-members.html b/doc/html/qvboxlayout-members.html new file mode 100644 index 00000000..063fc26f --- /dev/null +++ b/doc/html/qvboxlayout-members.html @@ -0,0 +1,144 @@ + + + + + +TQVBoxLayout Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQVBoxLayout

+ +

This is the complete list of member functions for +TQVBoxLayout, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qvboxlayout.html b/doc/html/qvboxlayout.html new file mode 100644 index 00000000..0db8acff --- /dev/null +++ b/doc/html/qvboxlayout.html @@ -0,0 +1,106 @@ + + + + + +TQVBoxLayout Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQVBoxLayout Class Reference

+ +

The TQVBoxLayout class lines up widgets vertically. +More... +

#include <qlayout.h> +

Inherits TQBoxLayout. +

List of all member functions. +

Public Members

+
    +
  • TQVBoxLayout ( TQWidget * parent, int margin = 0, int spacing = -1, const char * name = 0 )
  • +
  • TQVBoxLayout ( TQLayout * parentLayout, int spacing = -1, const char * name = 0 )
  • +
  • TQVBoxLayout ( int spacing = -1, const char * name = 0 )
  • +
  • ~TQVBoxLayout ()
  • +
+

Detailed Description

+ + +

The TQVBoxLayout class lines up widgets vertically. +

+ + +

This class is used to construct vertical box layout objects. See +TQBoxLayout for more details. +

The simplest use of the class is like this: +

+        TQBoxLayout * l = new TQVBoxLayout( widget );
+        l->addWidget( aWidget );
+        l->addWidget( anotherWidget );
+    
+ +

TQVBox
+

See also TQHBoxLayout, TQGridLayout, the Layout overview, Widget Appearance and Style, and Layout Management. + +


Member Function Documentation

+

TQVBoxLayout::TQVBoxLayout ( TQWidget * parent, int margin = 0, int spacing = -1, const char * name = 0 ) +

+Constructs a new top-level vertical box called name, with +parent parent. +

The margin is the number of pixels between the edge of the +widget and its managed children. The spacing is the default +number of pixels between neighboring children. If spacing is -1 +the value of margin is used for spacing. + +

TQVBoxLayout::TQVBoxLayout ( TQLayout * parentLayout, int spacing = -1, const char * name = 0 ) +

+Constructs a new vertical box called name name and adds it to +parentLayout. +

The spacing is the default number of pixels between neighboring +children. If spacing is -1, this TQVBoxLayout will inherit its +parent's spacing(). + +

TQVBoxLayout::TQVBoxLayout ( int spacing = -1, const char * name = 0 ) +

+Constructs a new vertical box called name name. You must add +it to another layout. +

The spacing is the default number of pixels between neighboring +children. If spacing is -1, this TQVBoxLayout will inherit its +parent's spacing(). + +

TQVBoxLayout::~TQVBoxLayout () +

+Destroys this box layout. +

The layout's widgets aren't destroyed. + + +


+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/qvboxlayout.png b/doc/html/qvboxlayout.png new file mode 100644 index 00000000..35281965 Binary files /dev/null and b/doc/html/qvboxlayout.png differ diff --git a/doc/html/qvbuttongroup-h.html b/doc/html/qvbuttongroup-h.html new file mode 100644 index 00000000..d10597fd --- /dev/null +++ b/doc/html/qvbuttongroup-h.html @@ -0,0 +1,114 @@ + + + + + +qvbuttongroup.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qvbuttongroup.h

+ +

This is the verbatim text of the qvbuttongroup.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qvbuttongroup.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQVButtonGroup class
+**
+** Created : 990602
+**
+** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQVBUTTONGROUP_H
+#define TQVBUTTONGROUP_H
+
+#ifndef QT_H
+#include "qbuttongroup.h"
+#endif // QT_H
+
+#ifndef QT_NO_VBUTTONGROUP
+
+class Q_EXPORT TQVButtonGroup : public TQButtonGroup
+{
+    Q_OBJECT
+public:
+    TQVButtonGroup( TQWidget* parent=0, const char* name=0 );
+    TQVButtonGroup( const TQString &title, TQWidget* parent=0, const char* name=0 );
+
+    ~TQVButtonGroup();
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQVButtonGroup( const TQVButtonGroup & );
+    TQVButtonGroup &operator=( const TQVButtonGroup & );
+#endif
+};
+
+
+#endif // QT_NO_VBUTTONGROUP
+
+#endif // TQVBUTTONGROUP_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qvbuttongroup-members.html b/doc/html/qvbuttongroup-members.html new file mode 100644 index 00000000..ed97f441 --- /dev/null +++ b/doc/html/qvbuttongroup-members.html @@ -0,0 +1,393 @@ + + + + + +TQVButtonGroup Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQVButtonGroup

+ +

This is the complete list of member functions for +TQVButtonGroup, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qvbuttongroup.html b/doc/html/qvbuttongroup.html new file mode 100644 index 00000000..77c086b7 --- /dev/null +++ b/doc/html/qvbuttongroup.html @@ -0,0 +1,87 @@ + + + + + +TQVButtonGroup Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQVButtonGroup Class Reference

+ +

The TQVButtonGroup widget organizes TQButton widgets in a +vertical column. +More... +

#include <qvbuttongroup.h> +

Inherits TQButtonGroup. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQVButtonGroup widget organizes TQButton widgets in a +vertical column. +

+ + +

TQVButtonGroup is a convenience class that offers a thin layer on top +of TQButtonGroup. Think of it as a TQVBox that offers a frame with a +title and is specifically designed for buttons. +

TQButtonGroup
+

See also TQHButtonGroup, Widget Appearance and Style, Layout Management, and Organizers. + +


Member Function Documentation

+

TQVButtonGroup::TQVButtonGroup ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a vertical button group with no title. +

The parent and name arguments are passed on to the TQWidget +constructor. + +

TQVButtonGroup::TQVButtonGroup ( const TQString & title, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a vertical button group with the title title. +

The parent and name arguments are passed on to the TQWidget +constructor. + +

TQVButtonGroup::~TQVButtonGroup () +

+Destroys the vertical button group, deleting its child widgets. + + +

+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/qvector.html b/doc/html/qvector.html new file mode 100644 index 00000000..3ad0f2e4 --- /dev/null +++ b/doc/html/qvector.html @@ -0,0 +1,47 @@ + + + + + +TQVector Class Reference (obsolete) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQVector Class Reference (obsolete)

+ + +

+#include <qvector.h>
+ +

The TQVector class has been renamed TQPtrVector in TQt 3.0. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qvgroupbox-h.html b/doc/html/qvgroupbox-h.html new file mode 100644 index 00000000..c351dcab --- /dev/null +++ b/doc/html/qvgroupbox-h.html @@ -0,0 +1,113 @@ + + + + + +qvgroupbox.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qvgroupbox.h

+ +

This is the verbatim text of the qvgroupbox.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/**********************************************************************
+** $Id: qt/qvgroupbox.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQVGroupBox widget class
+**
+** Created : 990602
+**
+** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQVGROUPBOX_H
+#define TQVGROUPBOX_H
+
+#ifndef QT_H
+#include "qgroupbox.h"
+#endif // QT_H
+
+#ifndef QT_NO_VGROUPBOX
+
+class Q_EXPORT TQVGroupBox : public TQGroupBox
+{
+    Q_OBJECT
+public:
+    TQVGroupBox( TQWidget* parent=0, const char* name=0 );
+    TQVGroupBox( const TQString &title, TQWidget* parent=0, const char* name=0 );
+
+    ~TQVGroupBox();
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQVGroupBox( const TQVGroupBox & );
+    TQVGroupBox &operator=( const TQVGroupBox & );
+#endif
+};
+
+#endif // QT_NO_VGROUPBOX
+
+#endif // TQVGROUPBOX_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qvgroupbox-members.html b/doc/html/qvgroupbox-members.html new file mode 100644 index 00000000..fec65b33 --- /dev/null +++ b/doc/html/qvgroupbox-members.html @@ -0,0 +1,378 @@ + + + + + +TQVGroupBox Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQVGroupBox

+ +

This is the complete list of member functions for +TQVGroupBox, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qvgroupbox.html b/doc/html/qvgroupbox.html new file mode 100644 index 00000000..656a1f90 --- /dev/null +++ b/doc/html/qvgroupbox.html @@ -0,0 +1,86 @@ + + + + + +TQVGroupBox Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQVGroupBox Class Reference

+ +

The TQVGroupBox widget organizes a group of widgets in a +vertical column. +More... +

#include <qvgroupbox.h> +

Inherits TQGroupBox. +

List of all member functions. +

Public Members

+
    +
  • TQVGroupBox ( TQWidget * parent = 0, const char * name = 0 )
  • +
  • TQVGroupBox ( const TQString & title, TQWidget * parent = 0, const char * name = 0 )
  • +
  • ~TQVGroupBox ()
  • +
+

Detailed Description

+ + +The TQVGroupBox widget organizes a group of widgets in a +vertical column. +

+ + +

TQVGroupBox is a convenience class that offers a thin layer on top of +TQGroupBox. Think of it as a TQVBox that offers a frame with a title. +

Group Boxes
+

See also TQHGroupBox, Widget Appearance and Style, Layout Management, and Organizers. + +


Member Function Documentation

+

TQVGroupBox::TQVGroupBox ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a vertical group box with no title. +

The parent and name arguments are passed on to the TQWidget +constructor. + +

TQVGroupBox::TQVGroupBox ( const TQString & title, TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a vertical group box with the title title. +

The parent and name arguments are passed on to the TQWidget +constructor. + +

TQVGroupBox::~TQVGroupBox () +

+Destroys the vertical group box, deleting its child widgets. + + +

+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/qwaitcondition-h.html b/doc/html/qwaitcondition-h.html new file mode 100644 index 00000000..39faea56 --- /dev/null +++ b/doc/html/qwaitcondition-h.html @@ -0,0 +1,124 @@ + + + + + +qwaitcondition.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qwaitcondition.h

+ +

This is the verbatim text of the qwaitcondition.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qwaitcondition.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQWaitCondition class
+**
+** Created : 931107
+**
+** 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 retquirements 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 TQWAITCONDITION_H
+#define TQWAITCONDITION_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#endif // QT_H
+
+#if defined(QT_THREAD_SUPPORT)
+
+#include <limits.h>
+
+class TQWaitConditionPrivate;
+class TQMutex;
+
+class Q_EXPORT TQWaitCondition
+{
+public:
+    TQWaitCondition();
+    virtual ~TQWaitCondition();
+
+    // default argument causes thread to block indefinately
+    bool wait( unsigned long time = ULONG_MAX );
+    bool wait( TQMutex *mutex, unsigned long time = ULONG_MAX );
+
+    void wakeOne();
+    void wakeAll();
+
+private:
+    TQWaitConditionPrivate * d;
+
+#if defined(Q_DISABLE_COPY)
+    TQWaitCondition( const TQWaitCondition & );
+    TQWaitCondition &operator=( const TQWaitCondition & );
+#endif
+};
+
+#endif
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwaitcondition-members.html b/doc/html/qwaitcondition-members.html new file mode 100644 index 00000000..8399b28f --- /dev/null +++ b/doc/html/qwaitcondition-members.html @@ -0,0 +1,51 @@ + + + + + +TQWaitCondition Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWaitCondition

+ +

This is the complete list of member functions for +TQWaitCondition, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwaitcondition.html b/doc/html/qwaitcondition.html new file mode 100644 index 00000000..be0ad3af --- /dev/null +++ b/doc/html/qwaitcondition.html @@ -0,0 +1,197 @@ + + + + + +TQWaitCondition Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWaitCondition Class Reference

+ +

The TQWaitCondition class allows waiting/waking for conditions between threads. +More... +

All the functions in this class are thread-safe when TQt is built with thread support.

+

#include <qwaitcondition.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQWaitCondition class allows waiting/waking for conditions between threads. +

+ +

TQWaitConditions allow a thread to tell other threads that some +sort of condition has been met; one or many threads can block +waiting for a TQWaitCondition to set a condition with wakeOne() or +wakeAll(). Use wakeOne() to wake one randomly selected event or +wakeAll() to wake them all. For example, say we have three tasks +that should be performed every time the user presses a key; each +task could be split into a thread, each of which would have a +run() body like this: +

+    TQWaitCondition key_pressed;
+
+    for (;;) {
+        key_pressed.wait(); // This is a TQWaitCondition global variable
+        // Key was pressed, do something interesting
+        do_something();
+    }
+    
+ +

A fourth thread would read key presses and wake the other three +threads up every time it receives one, like this: +

+    TQWaitCondition key_pressed;
+
+    for (;;) {
+        getchar();
+        // Causes any thread in key_pressed.wait() to return from
+        // that method and continue processing
+        key_pressed.wakeAll();
+    }
+    
+ +

Note that the order the three threads are woken up in is +undefined, and that if some or all of the threads are still in +do_something() when the key is pressed, they won't be woken up +(since they're not waiting on the condition variable) and so the +task will not be performed for that key press. This can be +avoided by, for example, doing something like this: +

+    TQMutex mymutex;
+    TQWaitCondition key_pressed;
+    int mycount=0;
+
+    // Worker thread code
+    for (;;) {
+        key_pressed.wait(); // This is a TQWaitCondition global variable
+        mymutex.lock();
+        mycount++;
+        mymutex.unlock();
+        do_something();
+        mymutex.lock();
+        mycount--;
+        mymutex.unlock();
+    }
+
+    // Key reading thread code
+    for (;;) {
+        getchar();
+        mymutex.lock();
+        // Sleep until there are no busy worker threads
+        while( mycount > 0 ) {
+            mymutex.unlock();
+            sleep( 1 );
+            mymutex.lock();
+        }
+        mymutex.unlock();
+        key_pressed.wakeAll();
+    }
+    
+ +

The mutexes are necessary because the results of two threads +attempting to change the value of the same variable simultaneously +are unpredictable. +

See also Environment Classes and Threading. + +


Member Function Documentation

+

TQWaitCondition::TQWaitCondition () +

+Constructs a new event signalling, i.e. wait condition, object. + +

TQWaitCondition::~TQWaitCondition () [virtual] +

+Deletes the event signalling, i.e. wait condition, object. + +

bool TQWaitCondition::wait ( unsigned long time = ULONG_MAX ) +

+Wait on the thread event object. The thread calling this will +block until either of these conditions is met: +
    +
  • Another thread signals it using wakeOne() or wakeAll(). This +function will return TRUE in this case. +
  • time milliseconds has elapsed. If time is ULONG_MAX (the +default), then the wait will never timeout (the event must be +signalled). This function will return FALSE if the wait timed +out. +
+

See also wakeOne() and wakeAll(). + +

bool TQWaitCondition::wait ( TQMutex * mutex, unsigned long time = ULONG_MAX ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Release the locked mutex and wait on the thread event object. +The mutex must be initially locked by the calling thread. If mutex is not in a locked state, this function returns immediately. +If mutex is a recursive mutex, this function returns +immediately. The mutex will be unlocked, and the calling thread +will block until either of these conditions is met: +

    +
  • Another thread signals it using wakeOne() or wakeAll(). This +function will return TRUE in this case. +
  • time milliseconds has elapsed. If time is ULONG_MAX (the +default), then the wait will never timeout (the event must be +signalled). This function will return FALSE if the wait timed +out. +
+

The mutex will be returned to the same locked state. This function +is provided to allow the atomic transition from the locked state +to the wait state. +

See also wakeOne() and wakeAll(). + +

void TQWaitCondition::wakeAll () +

+This wakes all threads waiting on the TQWaitCondition. The order in +which the threads are woken up depends on the operating system's +scheduling policies, and cannot be controlled or predicted. +

See also wakeOne(). + +

void TQWaitCondition::wakeOne () +

+This wakes one thread waiting on the TQWaitCondition. The thread +that is woken up depends on the operating system's scheduling +policies, and cannot be controlled or predicted. +

See also wakeAll(). + + +


+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/qwerty-example.html b/doc/html/qwerty-example.html new file mode 100644 index 00000000..b9d16bd8 --- /dev/null +++ b/doc/html/qwerty-example.html @@ -0,0 +1,509 @@ + + + + + +Simple editor that can load encodings + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Simple editor that can load encodings

+ + +

+


+

Header file: +

/****************************************************************************
+** $Id: qt/qwerty.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef TQWERTY_H
+#define TQWERTY_H
+
+#include <qwidget.h>
+#include <qmenubar.h>
+#include <qmultilineedit.h>
+#include <qprinter.h>
+
+class Editor : public TQWidget
+{
+    Q_OBJECT
+public:
+    Editor( TQWidget *parent=0, const char *name="qwerty" );
+   ~Editor();
+
+    void load( const TQString& fileName, int code=-1 );
+
+public slots:
+    void newDoc();
+    void load();
+    bool save();
+    void print();
+    void addEncoding();
+    void toUpper();
+    void toLower();
+    void font();
+protected:
+    void resizeEvent( TQResizeEvent * );
+    void closeEvent( TQCloseEvent * );
+
+private slots:
+    void saveAsEncoding( int );
+    void openAsEncoding( int );
+    void textChanged();
+
+private:
+    bool saveAs( const TQString& fileName, int code=-1 );
+    void rebuildCodecList();
+    TQMenuBar       *m;
+    TQMultiLineEdit *e;
+#ifndef QT_NO_PRINTER
+    TQPrinter        printer;
+#endif
+    TQPopupMenu     *save_as;
+    TQPopupMenu     *open_as;
+    bool changed;
+};
+
+#endif // TQWERTY_H
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/qwerty.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "qwerty.h"
+#include <qapplication.h>
+#include <qfile.h>
+#include <qfiledialog.h>
+#include <qpopupmenu.h>
+#include <qtextstream.h>
+#include <qpainter.h>
+#include <qmessagebox.h>
+#include <qpaintdevicemetrics.h>
+#include <qptrlist.h>
+#include <qfontdialog.h>
+
+#include <qtextcodec.h>
+
+const bool no_writing = FALSE;
+
+static TQPtrList<TQTextCodec> *codecList = 0;
+
+enum { Uni = 0, MBug = 1, Lat1 = 2, Local = 3, Guess = 4, Codec = 5 };
+
+
+Editor::Editor( TQWidget * parent , const char * name )
+    : TQWidget( parent, name, WDestructiveClose )
+{
+    m = new TQMenuBar( this, "menu" );
+
+    TQPopupMenu * file = new TQPopupMenu();
+    Q_CHECK_PTR( file );
+    m->insertItem( "&File", file );
+
+    file->insertItem( "&New",   this, SLOT(newDoc()),   ALT+Key_N );
+    file->insertItem( "&Open...",  this, SLOT(load()),     ALT+Key_O );
+    file->insertItem( "&Save...",  this, SLOT(save()),     ALT+Key_S );
+    file->insertSeparator();
+    open_as = new TQPopupMenu();
+    file->insertItem( "Open &As",  open_as );
+    save_as = new TQPopupMenu();
+    file->insertItem( "Sa&ve As",  save_as );
+    file->insertItem( "Add &Encoding", this, SLOT(addEncoding()) );
+#ifndef QT_NO_PRINTER
+    file->insertSeparator();
+    file->insertItem( "&Print...", this, SLOT(print()),    ALT+Key_P );
+#endif
+    file->insertSeparator();
+    file->insertItem( "&Close", this, SLOT(close()),ALT+Key_W );
+    file->insertItem( "&Quit",  qApp, SLOT(closeAllWindows()),     ALT+Key_Q );
+
+    connect( save_as, SIGNAL(activated(int)), this, SLOT(saveAsEncoding(int)) );
+    connect( open_as, SIGNAL(activated(int)), this, SLOT(openAsEncoding(int)) );
+    rebuildCodecList();
+
+    TQPopupMenu * edit = new TQPopupMenu();
+    Q_CHECK_PTR( edit );
+    m->insertItem( "&Edit", edit );
+
+    edit->insertItem( "To &Uppercase",   this, SLOT(toUpper()),   ALT+Key_U );
+    edit->insertItem( "To &Lowercase",   this, SLOT(toLower()),   ALT+Key_L );
+#ifndef QT_NO_FONTDIALOG
+    edit->insertSeparator();
+    edit->insertItem( "&Select Font" ,   this, SLOT(font()),     ALT+Key_T );
+#endif
+    changed = FALSE;
+    e = new TQMultiLineEdit( this, "editor" );
+    connect( e, SIGNAL( textChanged() ), this, SLOT( textChanged() ) );
+
+    // We use Unifont - if you have it installed you'll see all
+    // Unicode character glyphs.
+    //
+    // Unifont only comes in one pixel size, so we cannot let
+    // it change pixel size as the display DPI changes.
+    //
+    TQFont unifont("unifont",16,50); unifont.setPixelSize(16);
+    e->setFont( unifont );
+
+    e->setFocus();
+}
+
+Editor::~Editor()
+{
+}
+
+void Editor::font()
+{
+#ifndef QT_NO_FONTDIALOG
+    bool ok;
+    TQFont f = TQFontDialog::getFont( &ok, e->font() );
+    if ( ok ) {
+        e->setFont( f );
+    }
+#endif
+}
+
+
+
+void Editor::rebuildCodecList()
+{
+    delete codecList;
+    codecList = new TQPtrList<TQTextCodec>;
+    TQTextCodec *codec;
+    int i;
+    for (i = 0; (codec = TQTextCodec::codecForIndex(i)); i++)
+        codecList->append( codec );
+    int n = codecList->count();
+    for (int pm=0; pm<2; pm++) {
+        TQPopupMenu* menu = pm ? open_as : save_as;
+        menu->clear();
+        TQString local = "Local (";
+        local += TQTextCodec::codecForLocale()->name();
+        local += ")";
+        menu->insertItem( local, Local );
+        menu->insertItem( "Unicode", Uni );
+        menu->insertItem( "Latin1", Lat1 );
+        menu->insertItem( "Microsoft Unicode", MBug );
+        if ( pm )
+            menu->insertItem( "[guess]", Guess );
+        for ( i = 0; i < n; i++ )
+            menu->insertItem( codecList->at(i)->name(), Codec + i );
+    }
+}
+
+void Editor::newDoc()
+{
+    Editor *ed = new Editor;
+    if ( qApp->desktop()->size().width() < 450
+         || qApp->desktop()->size().height() < 450 ) {
+        ed->showMaximized();
+    } else {
+        ed->resize( 400, 400 );
+        ed->show();
+    }
+}
+
+
+void Editor::load()
+{
+#ifndef QT_NO_FILEDIALOG
+    TQString fn = TQFileDialog::getOpenFileName( TQString::null, TQString::null, this );
+    if ( !fn.isEmpty() )
+        load( fn, -1 );
+#endif
+}
+
+void Editor::load( const TQString& fileName, int code )
+{
+    TQFile f( fileName );
+    if ( !f.open( IO_ReadOnly ) )
+        return;
+
+    e->setAutoUpdate( FALSE );
+
+    TQTextStream t(&f);
+    if ( code >= Codec )
+        t.setCodec( codecList->at(code-Codec) );
+    else if ( code == Uni )
+        t.setEncoding( TQTextStream::Unicode );
+    else if ( code == MBug )
+        t.setEncoding( TQTextStream::UnicodeReverse );
+    else if ( code == Lat1 )
+        t.setEncoding( TQTextStream::Latin1 );
+    else if ( code == Guess ) {
+        TQFile f(fileName);
+        f.open(IO_ReadOnly);
+        char buffer[256];
+        int l = 256;
+        l=f.readBlock(buffer,l);
+        TQTextCodec* codec = TQTextCodec::codecForContent(buffer, l);
+        if ( codec ) {
+            TQMessageBox::information(this,"Encoding",TQString("Codec: ")+codec->name());
+            t.setCodec( codec );
+        }
+    }
+    e->setText( t.read() );
+    f.close();
+
+    e->setAutoUpdate( TRUE );
+    e->repaint();
+    setCaption( fileName );
+
+    changed = FALSE;
+}
+
+void Editor::openAsEncoding( int code )
+{
+#ifndef QT_NO_FILEDIALOG
+    //storing filename (proper save) is left as an exercise...
+    TQString fn = TQFileDialog::getOpenFileName( TQString::null, TQString::null, this );
+    if ( !fn.isEmpty() )
+        (void) load( fn, code );
+#endif
+}
+
+bool Editor::save()
+{
+#ifndef QT_NO_FILEDIALOG
+    //storing filename (proper save) is left as an exercise...
+    TQString fn = TQFileDialog::getSaveFileName( TQString::null, TQString::null, this );
+    if ( !fn.isEmpty() )
+        return saveAs( fn );
+    return FALSE;
+#endif
+}
+
+void Editor::saveAsEncoding( int code )
+{
+#ifndef QT_NO_FILEDIALOG
+    //storing filename (proper save) is left as an exercise...
+    TQString fn = TQFileDialog::getSaveFileName( TQString::null, TQString::null, this );
+    if ( !fn.isEmpty() )
+        (void) saveAs( fn, code );
+#endif
+}
+
+void Editor::addEncoding()
+{
+#ifndef QT_NO_FILEDIALOG
+    TQString fn = TQFileDialog::getOpenFileName( TQString::null, "*.map", this );
+    if ( !fn.isEmpty() ) {
+        TQFile f(fn);
+        if (f.open(IO_ReadOnly)) {
+            if (TQTextCodec::loadCharmap(&f)) {
+                rebuildCodecList();
+            } else {
+                TQMessageBox::warning(0,"Charmap error",
+                    "The file did not contain a valid charmap.\n\n"
+                    "A charmap file should look like this:\n"
+                       "  <code_set_name> thename\n"
+                       "  <escape_char> /\n"
+                       "  % alias thealias\n"
+                       "  CHARMAP\n"
+                       "  <tokenname> /x12 <U3456>\n"
+                       "  <tokenname> /xAB/x12 <U0023>\n"
+                       "  ...\n"
+                       "  END CHARMAP\n"
+                );
+            }
+        }
+    }
+#endif
+}
+
+
+bool Editor::saveAs( const TQString& fileName, int code )
+{
+    TQFile f( fileName );
+    if ( no_writing || !f.open( IO_WriteOnly ) ) {
+        TQMessageBox::warning(this,"I/O Error",
+                    TQString("The file could not be opened.\n\n")
+                        +fileName);
+        return FALSE;
+    }
+    TQTextStream t(&f);
+    if ( code >= Codec )
+        t.setCodec( codecList->at(code-Codec) );
+    else if ( code == Uni )
+        t.setEncoding( TQTextStream::Unicode );
+    else if ( code == MBug )
+        t.setEncoding( TQTextStream::UnicodeReverse );
+    else if ( code == Lat1 )
+        t.setEncoding( TQTextStream::Latin1 );
+    t << e->text();
+    f.close();
+    setCaption( fileName );
+    changed = FALSE;
+    return TRUE;
+}
+
+void Editor::print()
+{
+#ifndef QT_NO_PRINTER
+    if ( printer.setup(this) ) {                // opens printer dialog
+        printer.setFullPage(TRUE);              // we'll set our own margins
+        TQPainter p;
+        p.begin( &printer );                    // paint on printer
+        p.setFont( e->font() );
+        TQFontMetrics fm = p.fontMetrics();
+        TQPaintDeviceMetrics metrics( &printer ); // need width/height
+                                                 // of printer surface
+        const int MARGIN = metrics.logicalDpiX() / 2; // half-inch margin
+        int yPos        = MARGIN;               // y position for each line
+
+        for( int i = 0 ; i < e->numLines() ; i++ ) {
+            if ( printer.aborted() )
+                break;
+            if ( yPos + fm.lineSpacing() > metrics.height() - MARGIN ) {
+                // no more room on this page
+                if ( !printer.newPage() )          // start new page
+                    break;                           // some error
+                yPos = MARGIN;                   // back to top of page
+            }
+            p.drawText( MARGIN, yPos, metrics.width() - 2*MARGIN,
+                        fm.lineSpacing(), ExpandTabs, e->textLine( i ) );
+            yPos += fm.lineSpacing();
+        }
+        p.end();                                // send job to printer
+    }
+#endif
+}
+
+void Editor::resizeEvent( TQResizeEvent * )
+{
+    if ( e && m )
+        e->setGeometry( 0, m->height(), width(), height() - m->height() );
+}
+
+void Editor::closeEvent( TQCloseEvent *event )
+{
+    event->accept();
+
+    if ( changed ) { // the text has been changed
+        switch ( TQMessageBox::warning( this, "Qwerty",
+                                        "Save changes to Document?",
+                                        tr("&Yes"),
+                                        tr("&No"),
+                                        tr("Cancel"),
+                                        0, 2) ) {
+        case 0: // yes
+            if ( save() )
+                event->accept();
+            else
+                event->ignore();
+            break;
+        case 1: // no
+            event->accept();
+            break;
+        default: // cancel
+            event->ignore();
+            break;
+        }
+    }
+}
+
+void Editor::toUpper()
+{
+    e->setText(e->text().upper());
+}
+
+void Editor::toLower()
+{
+    e->setText(e->text().lower());
+}
+
+void Editor::textChanged()
+{
+    changed = TRUE;
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include "qwerty.h"
+
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+
+    bool isSmall =  qApp->desktop()->size().width() < 450
+                  || qApp->desktop()->size().height() < 450;
+
+    int i;
+    for ( i= argc <= 1 ? 0 : 1; i<argc; i++ ) {
+        Editor *e = new Editor;
+        e->setCaption("TQt Example - TQWERTY");
+        if ( i > 0 )
+            e->load( argv[i] );
+        if ( isSmall ) {
+            e->showMaximized();
+        } else {
+            e->resize( 400, 400 );
+            e->show();
+        }
+    }
+    a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(tquit()) );
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwhatsthis-h.html b/doc/html/qwhatsthis-h.html new file mode 100644 index 00000000..68af6fc5 --- /dev/null +++ b/doc/html/qwhatsthis-h.html @@ -0,0 +1,126 @@ + + + + + +qwhatsthis.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qwhatsthis.h

+ +

This is the verbatim text of the qwhatsthis.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qwhatsthis.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of TQWhatsThis class
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements will be met:
+** http://trolltech.com/products/qt/licenses/licensing/opensource/.
+** If you are unsure which license is appropriate for your use, please
+** review the following information:
+** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
+** or contact the sales department at sales@trolltech.com.
+**
+** This file may be used under the terms of the Q Public License as
+** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
+** included in the packaging of this file.  Licensees holding valid TQt
+** Commercial licenses may use this file in accordance with the TQt
+** Commercial License Agreement provided with the Software.
+**
+** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
+** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
+** herein.
+**
+**********************************************************************/
+
+#ifndef TQWHATSTHIS_H
+#define TQWHATSTHIS_H
+
+#ifndef QT_H
+#include "qobject.h"
+#endif // QT_H
+
+#ifndef QT_NO_WHATSTHIS
+
+#include "qcursor.h"
+
+class TQToolButton;
+class TQPopupMenu;
+class TQStyleSheet;
+
+class Q_EXPORT TQWhatsThis: public TQt
+{
+public:
+    TQWhatsThis( TQWidget *);
+    virtual ~TQWhatsThis();
+
+    virtual TQString text( const TQPoint & );
+    virtual bool clicked( const TQString& href );
+
+    // the common static functions
+    static void setFont( const TQFont &font );    
+    
+    static void add( TQWidget *, const TQString &);
+    static void remove( TQWidget * );
+    static TQString textFor( TQWidget *, const TQPoint & pos = TQPoint(), bool includeParents = FALSE );
+
+    static TQToolButton * whatsThisButton( TQWidget * parent );
+
+    static void enterWhatsThisMode();
+    static bool inWhatsThisMode();
+    static void leaveWhatsThisMode( const TQString& = TQString::null, const TQPoint& pos = TQCursor::pos(), TQWidget* w = 0 );
+
+    static void display( const TQString& text, const TQPoint& pos = TQCursor::pos(), TQWidget* w = 0 );
+};
+
+#endif // QT_NO_WHATSTHIS
+
+#endif // TQWHATSTHIS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwhatsthis-members.html b/doc/html/qwhatsthis-members.html new file mode 100644 index 00000000..03d94051 --- /dev/null +++ b/doc/html/qwhatsthis-members.html @@ -0,0 +1,59 @@ + + + + + +TQWhatsThis Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWhatsThis

+ +

This is the complete list of member functions for +TQWhatsThis, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwhatsthis.html b/doc/html/qwhatsthis.html new file mode 100644 index 00000000..5425599e --- /dev/null +++ b/doc/html/qwhatsthis.html @@ -0,0 +1,239 @@ + + + + + +TQWhatsThis Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWhatsThis Class Reference

+ +

The TQWhatsThis class provides a simple description of any +widget, i.e. answering the question "What's this?". +More... +

#include <qwhatsthis.h> +

Inherits TQt. +

List of all member functions. +

Public Members

+ +

Static Public Members

+
    +
  • void setFont ( const TQFont & font )
  • +
  • void add ( TQWidget * widget, const TQString & text )
  • +
  • void remove ( TQWidget * widget )
  • +
  • TQString textFor ( TQWidget * w, const TQPoint & pos = TQPoint ( ), bool includeParents = FALSE )
  • +
  • TQToolButton * whatsThisButton ( TQWidget * parent )
  • +
  • void enterWhatsThisMode ()
  • +
  • bool inWhatsThisMode ()
  • +
  • void leaveWhatsThisMode ( const TQString & text = TQString::null, const TQPoint & pos = TQCursor::pos ( ), TQWidget * w = 0 )
  • +
  • void display ( const TQString & text, const TQPoint & pos = TQCursor::pos ( ), TQWidget * w = 0 )
  • +
+

Detailed Description

+ + +The TQWhatsThis class provides a simple description of any +widget, i.e. answering the question "What's this?". +

+ +

"What's this?" help is part of an application's online help system +that provides users with information about functionality, usage, +background etc., in various levels of detail from short tool tips +to full text browsing help windows. +

TQWhatsThis provides a single window with an explanatory text that +pops up when the user asks "What's this?". The default way to do +this is to focus the relevant widget and press Shift+F1. The help +text appears immediately; it goes away as soon as the user does +something else. +

(Note that if there is an accelerator for Shift+F1, this mechanism +will not work.) +

To add "What's this?" text to a widget you simply call +TQWhatsThis::add() for the widget. For example, to assign text to a +menu item, call TQMenuData::setWhatsThis(); for a global +accelerator key, call TQAccel::setWhatsThis() and If you're using +actions, use TQAction::setWhatsThis(). +

The text can be either rich text or plain text. If you specify a +rich text formatted string, it will be rendered using the default +stylesheet. This makes it possible to embed images. See +TQStyleSheet::defaultSheet() for details. +

+ +

        const char * fileOpenText = "<p><img source=\"fileopen\"> "
+                         "Click this button to open a <em>new file</em>. <br>"
+                         "You can also select the <b>Open</b> command "
+                         "from the <b>File</b> menu.</p>";
+        TQMimeSourceFactory::defaultFactory()->setPixmap( "fileopen",
+                              fileOpenAction->iconSet().pixmap() );
+        fileOpenAction->setWhatsThis( fileOpenText );
+
+

An alternative way to enter "What's this?" mode is to use the +ready-made tool bar tool button from +TQWhatsThis::whatsThisButton(). By invoking this context help +button (in the picture below the first one from the right) the +user switches into "What's this?" mode. If they now click on a +widget the appropriate help text is shown. The mode is left when +help is given or when the user presses Esc. +

+

If you are using TQMainWindow you can also use the +TQMainWindow::whatsThis() slot to invoke the mode from a menu item. +

For more control you can create a dedicated TQWhatsThis object for +a special widget. By subclassing and reimplementing +TQWhatsThis::text() it is possible to have different help texts, +depending on the position of the mouse click. By reimplementing +TQWhatsThis::clicked() it is possible to have hyperlinks inside the +help texts. +

If you wish to control the "What's this?" behavior of a widget +manually see TQWidget::customWhatsThis(). +

The What's This object can be removed using TQWhatsThis::remove(), +although this is rarely necessary because it is automatically +removed when the widget is destroyed. +

See also TQToolTip and Help System. + +


Member Function Documentation

+

TQWhatsThis::TQWhatsThis ( TQWidget * widget ) +

+Constructs a dynamic "What's this?" object for widget. The +object is deleted when the widget is destroyed. +

When the widget is queried by the user the text() function of this +TQWhatsThis will be called to provide the appropriate text, rather +than using the text assigned by add(). + +

TQWhatsThis::~TQWhatsThis () [virtual] +

+Destroys the object and frees any allocated resources. + +

void TQWhatsThis::add ( TQWidget * widget, const TQString & text ) [static] +

+Adds text as "What's this" help for widget. If the text is +rich text formatted (i.e. it contains markup) it will be rendered +with the default stylesheet TQStyleSheet::defaultSheet(). +

The text is destroyed if the widget is later destroyed, so it need +not be explicitly removed. +

See also remove(). + +

Examples: application/application.cpp, helpsystem/mainwindow.cpp, and mdi/application.cpp. +

bool TQWhatsThis::clicked ( const TQString & href ) [virtual] +

+ +

This virtual function is called when the user clicks inside the +"What's this?" window. href is the link the user clicked on, or +TQString::null if there was no link. +

If the function returns TRUE (the default), the "What's this?" +window is closed, otherwise it remains visible. +

The default implementation ignores href and returns TRUE. + +

void TQWhatsThis::display ( const TQString & text, const TQPoint & pos = TQCursor::pos ( ), TQWidget * w = 0 ) [static] +

+Display text in a help window at the global screen position pos. +

If widget w is not 0 and has its own dedicated TQWhatsThis +object, this object will receive clicked() messages when the user +clicks on hyperlinks inside the help text. +

See also TQWhatsThis::clicked(). + +

void TQWhatsThis::enterWhatsThisMode () [static] +

+Enters "What's this?" mode and returns immediately. +

TQt will install a special cursor and take over mouse input until +the user clicks somewhere. It then shows any help available and +ends "What's this?" mode. Finally, TQt removes the special cursor +and help window and then restores ordinary event processing, at +which point the left mouse button is no longer pressed. +

The user can also use the Esc key to leave "What's this?" mode. +

See also inWhatsThisMode() and leaveWhatsThisMode(). + +

bool TQWhatsThis::inWhatsThisMode () [static] +

+Returns TRUE if the application is in "What's this?" mode; +otherwise returns FALSE. +

See also enterWhatsThisMode() and leaveWhatsThisMode(). + +

void TQWhatsThis::leaveWhatsThisMode ( const TQString & text = TQString::null, const TQPoint & pos = TQCursor::pos ( ), TQWidget * w = 0 ) [static] +

+Leaves "What's this?" question mode. +

This function is used internally by widgets that support +TQWidget::customWhatsThis(); applications do not usually call it. +An example of such a widget is TQPopupMenu: menus still work +normally in "What's this?" mode but also provide help texts for +individual menu items. +

If text is not TQString::null, a "What's this?" help window is +displayed at the global screen position pos. If widget w is +not 0 and has its own dedicated TQWhatsThis object, this object +will receive clicked() messages when the user clicks on hyperlinks +inside the help text. +

See also inWhatsThisMode(), enterWhatsThisMode(), and TQWhatsThis::clicked(). + +

void TQWhatsThis::remove ( TQWidget * widget ) [static] +

+Removes the "What's this?" help associated with the widget. +This happens automatically if the widget is destroyed. +

See also add(). + +

void TQWhatsThis::setFont ( const TQFont & font ) [static] +

+Sets the font for all "What's this?" helps to font. + +

TQString TQWhatsThis::text ( const TQPoint & ) [virtual] +

+This virtual function returns the text for position p in the +widget that this "What's this?" object documents. If there is no +"What's this?" text for the position, TQString::null is returned. +

The default implementation returns TQString::null. + +

TQString TQWhatsThis::textFor ( TQWidget * w, const TQPoint & pos = TQPoint ( ), bool includeParents = FALSE ) [static] +

+Returns the what's this text for widget w or TQString::null if +there is no "What's this?" help for the widget. pos contains +the mouse position; this is useful, for example, if you've +subclassed to make the text that is displayed position dependent. +

If includeParents is TRUE, parent widgets are taken into +consideration as well when looking for what's this help text. +

See also add(). + +

TQToolButton * TQWhatsThis::whatsThisButton ( TQWidget * parent ) [static] +

+Creates a TQToolButton preconfigured to enter "What's this?" mode +when clicked. You will often use this with a tool bar as parent: +
+        (void) TQWhatsThis::whatsThisButton( my_help_tool_bar );
+    
+ + +

Example: helpsystem/mainwindow.cpp. + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwheelevent-members.html b/doc/html/qwheelevent-members.html new file mode 100644 index 00000000..d283936f --- /dev/null +++ b/doc/html/qwheelevent-members.html @@ -0,0 +1,61 @@ + + + + + +TQWheelEvent Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWheelEvent

+ +

This is the complete list of member functions for +TQWheelEvent, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwheelevent.html b/doc/html/qwheelevent.html new file mode 100644 index 00000000..c248926f --- /dev/null +++ b/doc/html/qwheelevent.html @@ -0,0 +1,203 @@ + + + + + +TQWheelEvent Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWheelEvent Class Reference

+ +

The TQWheelEvent class contains parameters that describe a wheel event. +More... +

#include <qevent.h> +

Inherits TQEvent. +

List of all member functions. +

Public Members

+
    +
  • TQWheelEvent ( const TQPoint & pos, int delta, int state, Orientation orient = Vertical )
  • +
  • TQWheelEvent ( const TQPoint & pos, const TQPoint & globalPos, int delta, int state, Orientation orient = Vertical )
  • +
  • int delta () const
  • +
  • const TQPoint & pos () const
  • +
  • const TQPoint & globalPos () const
  • +
  • int x () const
  • +
  • int y () const
  • +
  • int globalX () const
  • +
  • int globalY () const
  • +
  • ButtonState state () const
  • +
  • Orientation orientation () const
  • +
  • bool isAccepted () const
  • +
  • void accept ()
  • +
  • void ignore ()
  • +
+

Detailed Description

+ + +The TQWheelEvent class contains parameters that describe a wheel event. +

+

Wheel events are sent to the widget under the mouse, and if that widget +does not handle the event they are sent to the focus widget. The rotation +distance is provided by delta(). The functions pos() and globalPos() return +the mouse pointer location at the time of the event. +

A wheel event contains a special accept flag that indicates +whether the receiver wants the event. You should call +TQWheelEvent::accept() if you handle the wheel event; otherwise it +will be sent to the parent widget. +

The TQWidget::setEnable() function can be used to enable or disable +mouse and keyboard events for a widget. +

The event handler TQWidget::wheelEvent() receives wheel events. +

See also TQMouseEvent, TQWidget::grabMouse(), and Event Classes. + +


Member Function Documentation

+

TQWheelEvent::TQWheelEvent ( const TQPoint & pos, int delta, int state, Orientation orient = Vertical ) +

+ +

Constructs a wheel event object. +

The globalPos() is initialized to TQCursor::pos(), i.e. pos, +which is usually (but not always) right. Use the other constructor +if you need to specify the global position explicitly. delta +contains the rotation distance, state holds the keyboard +modifier flags at the time of the event and orient holds the +wheel's orientation. +

See also pos(), delta(), and state(). + +

TQWheelEvent::TQWheelEvent ( const TQPoint & pos, const TQPoint & globalPos, int delta, int state, Orientation orient = Vertical ) +

+ +

Constructs a wheel event object. The position when the event +occurred is given in pos and globalPos. delta contains +the rotation distance, state holds the keyboard modifier flags +at the time of the event and orient holds the wheel's +orientation. +

See also pos(), globalPos(), delta(), and state(). + +

void TQWheelEvent::accept () +

+ +

Sets the accept flag of the wheel event object. +

Setting the accept parameter indicates that the receiver of the +event wants the wheel event. Unwanted wheel events are sent to the +parent widget. +

The accept flag is set by default. +

See also ignore(). + +

int TQWheelEvent::delta () const +

+ +

Returns the distance that the wheel is rotated expressed in +multiples or divisions of the wheel delta, which is currently +defined to be 120. A positive value indicates that the wheel was +rotated forwards away from the user; a negative value indicates +that the wheel was rotated backwards toward the user. +

The wheel delta constant was defined to be 120 by wheel mouse +vendors to allow building finer-resolution wheels in the future, +including perhaps a freely rotating wheel with no notches. The +expectation is that such a device would send more messages per +rotation but with a smaller value in each message. + +

const TQPoint & TQWheelEvent::globalPos () const +

+ +

Returns the global position of the mouse pointer at the time of the event. This is important on asynchronous window systems +such as X11; whenever you move your widgets around in response to +mouse events, globalPos() can differ a lot from the current +pointer position TQCursor::pos(). +

See also globalX() and globalY(). + +

int TQWheelEvent::globalX () const +

+ +

Returns the global x-position of the mouse pointer at the time of +the event. +

See also globalY() and globalPos(). + +

int TQWheelEvent::globalY () const +

+ +

Returns the global y-position of the mouse pointer at the time of +the event. +

See also globalX() and globalPos(). + +

void TQWheelEvent::ignore () +

+ +

Clears the accept flag parameter of the wheel event object. +

Clearing the accept parameter indicates that the event receiver +does not want the wheel event. Unwanted wheel events are sent to +the parent widget. The accept flag is set by default. +

See also accept(). + +

bool TQWheelEvent::isAccepted () const +

+ +

Returns TRUE if the receiver of the event handles the wheel event; +otherwise returns FALSE. + +

Orientation TQWheelEvent::orientation () const +

+ +

Returns the wheel's orientation. + +

const TQPoint & TQWheelEvent::pos () const +

+ +

Returns the position of the mouse pointer, relative to the widget +that received the event. +

If you move your widgets around in response to mouse +events, use globalPos() instead of this function. +

See also x(), y(), and globalPos(). + +

ButtonState TQWheelEvent::state () const +

+ +

Returns the keyboard modifier flags of the event. +

The returned value is ShiftButton, ControlButton, and AltButton OR'ed together. + +

int TQWheelEvent::x () const +

+ +

Returns the x-position of the mouse pointer, relative to the +widget that received the event. +

See also y() and pos(). + +

int TQWheelEvent::y () const +

+ +

Returns the y-position of the mouse pointer, relative to the +widget that received the event. +

See also x() and pos(). + + +


+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/qwidget-h.html b/doc/html/qwidget-h.html new file mode 100644 index 00000000..10aa5595 --- /dev/null +++ b/doc/html/qwidget-h.html @@ -0,0 +1,1071 @@ + + + + + +qwidget.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qwidget.h

+ +

This is the verbatim text of the qwidget.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qwidget.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQWidget class
+**
+** Created : 931029
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQWIDGET_H
+#define TQWIDGET_H
+
+#ifndef QT_H
+#include "qwindowdefs.h"
+#include "qobject.h"
+#include "qpaintdevice.h"
+#include "qpalette.h"
+#include "qfont.h"
+#include "qfontmetrics.h"
+#include "qfontinfo.h"
+#include "qsizepolicy.h"
+#endif // QT_H
+
+class TQLayout;
+struct TQWExtra;
+struct TQTLWExtra;
+class TQFocusData;
+class TQCursor;
+class TQWSRegionManager;
+class TQStyle;
+
+class Q_EXPORT TQWidget : public TQObject, public TQPaintDevice
+{
+    Q_OBJECT
+    Q_ENUMS( BackgroundMode FocusPolicy BackgroundOrigin )
+    Q_PROPERTY( bool isTopLevel READ isTopLevel )
+    Q_PROPERTY( bool isDialog READ isDialog )
+    Q_PROPERTY( bool isModal READ isModal )
+    Q_PROPERTY( bool isPopup READ isPopup )
+    Q_PROPERTY( bool isDesktop READ isDesktop )
+    Q_PROPERTY( bool enabled READ isEnabled WRITE setEnabled )
+    Q_PROPERTY( TQRect geometry READ geometry WRITE setGeometry )
+    Q_PROPERTY( TQRect frameGeometry READ frameGeometry )
+    Q_PROPERTY( int x READ x )
+    Q_PROPERTY( int y READ y )
+    Q_PROPERTY( TQPoint pos READ pos WRITE move DESIGNABLE false STORED false )
+    Q_PROPERTY( TQSize frameSize READ frameSize )
+    Q_PROPERTY( TQSize size READ size WRITE resize DESIGNABLE false STORED false )
+    Q_PROPERTY( int width READ width )
+    Q_PROPERTY( int height READ height )
+    Q_PROPERTY( TQRect rect READ rect )
+    Q_PROPERTY( TQRect childrenRect READ childrenRect )
+    Q_PROPERTY( TQRegion childrenRegion READ childrenRegion )
+    Q_PROPERTY( TQSizePolicy sizePolicy READ sizePolicy WRITE setSizePolicy )
+    Q_PROPERTY( TQSize minimumSize READ minimumSize WRITE setMinimumSize )
+    Q_PROPERTY( TQSize maximumSize READ maximumSize WRITE setMaximumSize )
+    Q_PROPERTY( int minimumWidth READ minimumWidth WRITE setMinimumWidth STORED false DESIGNABLE false )
+    Q_PROPERTY( int minimumHeight READ minimumHeight WRITE setMinimumHeight STORED false DESIGNABLE false )
+    Q_PROPERTY( int maximumWidth READ maximumWidth WRITE setMaximumWidth STORED false DESIGNABLE false )
+    Q_PROPERTY( int maximumHeight READ maximumHeight WRITE setMaximumHeight STORED false DESIGNABLE false )
+    Q_PROPERTY( TQSize sizeIncrement READ sizeIncrement WRITE setSizeIncrement )
+    Q_PROPERTY( TQSize baseSize READ baseSize WRITE setBaseSize )
+    Q_PROPERTY( BackgroundMode backgroundMode READ backgroundMode WRITE setBackgroundMode DESIGNABLE false )
+    Q_PROPERTY( TQColor paletteForegroundColor READ paletteForegroundColor WRITE setPaletteForegroundColor RESET unsetPalette )
+    Q_PROPERTY( TQColor paletteBackgroundColor READ paletteBackgroundColor WRITE setPaletteBackgroundColor RESET unsetPalette )
+    Q_PROPERTY( TQPixmap paletteBackgroundPixmap READ paletteBackgroundPixmap WRITE setPaletteBackgroundPixmap RESET unsetPalette )
+    Q_PROPERTY( TQBrush backgroundBrush READ backgroundBrush )
+    Q_PROPERTY( TQColorGroup colorGroup READ colorGroup )
+    Q_PROPERTY( TQPalette palette READ palette WRITE setPalette RESET unsetPalette  STORED ownPalette )
+    Q_PROPERTY( BackgroundOrigin backgroundOrigin READ backgroundOrigin WRITE setBackgroundOrigin )
+    Q_PROPERTY( bool ownPalette READ ownPalette )
+    Q_PROPERTY( TQFont font READ font WRITE setFont RESET unsetFont STORED ownFont )
+    Q_PROPERTY( bool ownFont READ ownFont )
+#ifndef QT_NO_CURSOR
+    Q_PROPERTY( TQCursor cursor READ cursor WRITE setCursor RESET unsetCursor STORED ownCursor )
+    Q_PROPERTY( bool ownCursor READ ownCursor )
+#endif
+#ifndef QT_NO_WIDGET_TOPEXTRA
+    Q_PROPERTY( TQString caption READ caption WRITE setCaption )
+    Q_PROPERTY( TQPixmap icon READ icon WRITE setIcon )
+    Q_PROPERTY( TQString iconText READ iconText WRITE setIconText )
+#endif
+    Q_PROPERTY( bool mouseTracking READ hasMouseTracking WRITE setMouseTracking )
+    Q_PROPERTY( bool underMouse READ hasMouse )
+    Q_PROPERTY( bool isActiveWindow READ isActiveWindow )
+    Q_PROPERTY( bool focusEnabled READ isFocusEnabled )
+    Q_PROPERTY( FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy )
+    Q_PROPERTY( bool focus READ hasFocus )
+    Q_PROPERTY( bool updatesEnabled READ isUpdatesEnabled WRITE setUpdatesEnabled DESIGNABLE false )
+    Q_PROPERTY( bool visible READ isVisible )
+    Q_PROPERTY( TQRect visibleRect READ visibleRect ) // obsolete
+    Q_PROPERTY( bool hidden READ isHidden WRITE setHidden DESIGNABLE false SCRIPTABLE false )
+    Q_PROPERTY( bool shown READ isShown WRITE setShown DESIGNABLE false SCRIPTABLE false )
+    Q_PROPERTY( bool minimized READ isMinimized )
+    Q_PROPERTY( bool maximized READ isMaximized )
+    Q_PROPERTY( bool fullScreen READ isFullScreen )
+    Q_PROPERTY( TQSize sizeHint READ sizeHint )
+    Q_PROPERTY( TQSize minimumSizeHint READ minimumSizeHint )
+    Q_PROPERTY( TQRect microFocusHint READ microFocusHint )
+    Q_PROPERTY( bool acceptDrops READ acceptDrops WRITE setAcceptDrops )
+    Q_PROPERTY( bool autoMask READ autoMask WRITE setAutoMask DESIGNABLE false SCRIPTABLE false )
+    Q_PROPERTY( bool customWhatsThis READ customWhatsThis )
+    Q_PROPERTY( bool inputMethodEnabled READ isInputMethodEnabled WRITE setInputMethodEnabled DESIGNABLE false SCRIPTABLE false )
+    Q_PROPERTY( double windowOpacity READ windowOpacity WRITE setWindowOpacity DESIGNABLE false )
+
+public:
+    Q_EXPLICIT TQWidget( TQWidget* parent=0, const char* name=0, WFlags f=0 );
+    ~TQWidget();
+
+    WId		 winId() const;
+    void	 setName( const char *name );
+#ifndef QT_NO_STYLE
+    // GUI style setting
+
+    TQStyle     &style() const;
+    void        setStyle( TQStyle * );
+    TQStyle*	setStyle( const TQString& );
+#endif
+    // Widget types and states
+
+    bool	 isTopLevel()	const;
+    bool	 isDialog()	const;
+    bool	 isPopup()	const;
+    bool	 isDesktop()	const;
+    bool	 isModal()	const;
+
+    bool	 isEnabled()	const;
+    bool	 isEnabledTo(TQWidget*) const;
+    bool	 isEnabledToTLW() const;
+
+public slots:
+    virtual void setEnabled( bool );
+    void setDisabled( bool );
+
+    // Widget coordinates
+
+public:
+    TQRect	 frameGeometry() const;
+    const TQRect &geometry()	const;
+    int		 x()		const;
+    int		 y()		const;
+    TQPoint	 pos()		const;
+    TQSize	 frameSize()    const;
+    TQSize	 size()		const;
+    int		 width()	const;
+    int		 height()	const;
+    TQRect	 rect()		const;
+    TQRect	 childrenRect() const;
+    TQRegion	 childrenRegion() const;
+
+    TQSize	 minimumSize()	 const;
+    TQSize	 maximumSize()	 const;
+    int		 minimumWidth()	 const;
+    int		 minimumHeight() const;
+    int		 maximumWidth()	 const;
+    int		 maximumHeight() const;
+    void	 setMinimumSize( const TQSize & );
+    virtual void setMinimumSize( int minw, int minh );
+    void	 setMaximumSize( const TQSize & );
+    virtual void setMaximumSize( int maxw, int maxh );
+    void	 setMinimumWidth( int minw );
+    void	 setMinimumHeight( int minh );
+    void	 setMaximumWidth( int maxw );
+    void	 setMaximumHeight( int maxh );
+
+    TQSize	 sizeIncrement() const;
+    void	 setSizeIncrement( const TQSize & );
+    virtual void setSizeIncrement( int w, int h );
+    TQSize	 baseSize() const;
+    void	 setBaseSize( const TQSize & );
+    void	 setBaseSize( int basew, int baseh );
+
+    void	setFixedSize( const TQSize & );
+    void	setFixedSize( int w, int h );
+    void	setFixedWidth( int w );
+    void	setFixedHeight( int h );
+
+    // Widget coordinate mapping
+
+    TQPoint	 mapToGlobal( const TQPoint & )	 const;
+    TQPoint	 mapFromGlobal( const TQPoint & ) const;
+    TQPoint	 mapToParent( const TQPoint & )	 const;
+    TQPoint	 mapFromParent( const TQPoint & ) const;
+    TQPoint	 mapTo( TQWidget *, const TQPoint & ) const;
+    TQPoint	 mapFrom( TQWidget *, const TQPoint & ) const;
+
+    TQWidget	*topLevelWidget()   const;
+
+    // Widget attribute functions
+
+    BackgroundMode	backgroundMode() const;
+    virtual void	setBackgroundMode( BackgroundMode );
+    void 		setBackgroundMode( BackgroundMode, BackgroundMode );
+
+    const TQColor &	foregroundColor() const;
+
+    const TQColor &	eraseColor() const;
+    virtual void	setEraseColor( const TQColor & );
+
+    const TQPixmap *	erasePixmap() const;
+    virtual void	setErasePixmap( const TQPixmap & );
+
+#ifndef QT_NO_PALETTE
+    const TQColorGroup & colorGroup() const;
+    const TQPalette &	palette()    const;
+    bool		ownPalette() const;
+    virtual void	setPalette( const TQPalette & );
+    void		unsetPalette();
+#endif
+
+    const TQColor &	paletteForegroundColor() const;
+    void		setPaletteForegroundColor( const TQColor & );
+
+    const TQColor &	paletteBackgroundColor() const;
+    virtual void	setPaletteBackgroundColor( const TQColor & );
+
+    const TQPixmap *	paletteBackgroundPixmap() const;
+    virtual void 	setPaletteBackgroundPixmap( const TQPixmap & );
+
+    const TQBrush&	backgroundBrush() const;
+
+    TQFont		font() const;
+    bool		ownFont() const;
+    virtual void	setFont( const TQFont & );
+    void		unsetFont();
+    TQFontMetrics	fontMetrics() const;
+    TQFontInfo	 	fontInfo() const;
+
+#ifndef QT_NO_CURSOR
+    const TQCursor      &cursor() const;
+    bool		ownCursor() const;
+    virtual void	setCursor( const TQCursor & );
+    virtual void	unsetCursor();
+#endif
+#ifndef QT_NO_WIDGET_TOPEXTRA
+    TQString		caption() const;
+    const TQPixmap      *icon() const;
+    TQString		iconText() const;
+#endif
+    bool		hasMouseTracking() const;
+    bool		hasMouse() const;
+
+    virtual void	setMask( const TQBitmap & );
+    virtual void	setMask( const TQRegion & );
+    void		clearMask();
+
+    const TQColor &	backgroundColor() const; // obsolete, use eraseColor()
+    virtual void	setBackgroundColor( const TQColor & ); // obsolete, use setEraseColor()
+    const TQPixmap *	backgroundPixmap() const; // obsolete, use erasePixmap()
+    virtual void	setBackgroundPixmap( const TQPixmap & ); // obsolete, use setErasePixmap()
+
+public slots:
+#ifndef QT_NO_WIDGET_TOPEXTRA
+    virtual void	setCaption( const TQString &);
+    virtual void	setIcon( const TQPixmap & );
+    virtual void	setIconText( const TQString &);
+#endif
+    virtual void	setMouseTracking( bool enable );
+
+    // Keyboard input focus functions
+
+    virtual void	setFocus();
+    void		clearFocus();
+
+public:
+    enum FocusPolicy {
+	NoFocus = 0,
+	TabFocus = 0x1,
+	ClickFocus = 0x2,
+	StrongFocus = TabFocus | ClickFocus | 0x8,
+	WheelFocus = StrongFocus | 0x4
+    };
+
+    bool		isActiveWindow() const;
+    virtual void	setActiveWindow();
+    bool		isFocusEnabled() const;
+
+    FocusPolicy		focusPolicy() const;
+    virtual void	setFocusPolicy( FocusPolicy );
+    bool		hasFocus() const;
+    static void		setTabOrder( TQWidget *, TQWidget * );
+    virtual void	setFocusProxy( TQWidget * );
+    TQWidget *		focusProxy() const;
+
+    void setInputMethodEnabled( bool b );
+    bool isInputMethodEnabled() const;
+    // Grab functions
+
+    void		grabMouse();
+#ifndef QT_NO_CURSOR
+    void		grabMouse( const TQCursor & );
+#endif
+    void		releaseMouse();
+    void		grabKeyboard();
+    void		releaseKeyboard();
+    static TQWidget *	mouseGrabber();
+    static TQWidget *	keyboardGrabber();
+
+    // Update/refresh functions
+
+    bool	 	isUpdatesEnabled() const;
+
+#if 0 //def Q_WS_QWS
+    void		repaintUnclipped( const TQRegion &, bool erase = TRUE );
+#endif
+public slots:
+    virtual void	setUpdatesEnabled( bool enable );
+    void		update();
+    void		update( int x, int y, int w, int h );
+    void		update( const TQRect& );
+    void		repaint();
+    void		repaint( bool erase );
+    void		repaint( int x, int y, int w, int h, bool erase=TRUE );
+    void		repaint( const TQRect &, bool erase = TRUE );
+    void		repaint( const TQRegion &, bool erase = TRUE );
+
+    // Widget management functions
+
+    virtual void	show();
+    virtual void	hide();
+    void		setShown( bool show );
+    void		setHidden( bool hide );
+#ifndef QT_NO_COMPAT
+    void		iconify() { showMinimized(); }
+#endif
+    virtual void	showMinimized();
+    virtual void	showMaximized();
+    void		showFullScreen();
+    virtual void	showNormal();
+    virtual void	polish();
+    void 		constPolish() const;
+    bool		close();
+
+    void		raise();
+    void		lower();
+    void		stackUnder( TQWidget* );
+    virtual void	move( int x, int y );
+    void		move( const TQPoint & );
+    virtual void	resize( int w, int h );
+    void		resize( const TQSize & );
+    virtual void	setGeometry( int x, int y, int w, int h );
+    virtual void	setGeometry( const TQRect & ); // ### make non virtual in TQt 4?
+
+public:
+    virtual bool	close( bool alsoDelete );
+    bool		isVisible()	const;
+    bool		isVisibleTo(TQWidget*) const;
+    bool		isVisibleToTLW() const; // obsolete
+    TQRect		visibleRect() const; // obsolete
+    bool 		isHidden() const;
+    bool 		isShown() const;
+    bool		isMinimized() const;
+    bool		isMaximized() const;
+    bool		isFullScreen() const;
+
+    uint windowState() const;
+    void setWindowState(uint windowState);
+
+    virtual TQSize	sizeHint() const;
+    virtual TQSize	minimumSizeHint() const;
+    virtual TQSizePolicy	sizePolicy() const;
+    virtual void	setSizePolicy( TQSizePolicy );
+    void 		setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw = FALSE );
+    virtual int heightForWidth(int) const;
+
+    TQRegion	clipRegion() const;
+
+// ### move together with other slots in TQt 4.0
+public slots:
+    virtual void  	adjustSize();
+
+public:
+#ifndef QT_NO_LAYOUT
+    TQLayout *		layout() const { return lay_out; }
+#endif
+    void		updateGeometry();
+    virtual void 	reparent( TQWidget *parent, WFlags, const TQPoint &,
+				  bool showIt=FALSE );
+    void		reparent( TQWidget *parent, const TQPoint &,
+				  bool showIt=FALSE );
+#ifndef QT_NO_COMPAT
+    void		recreate( TQWidget *parent, WFlags f, const TQPoint & p,
+				  bool showIt=FALSE ) { reparent(parent,f,p,showIt); }
+#endif
+
+    void		erase();
+    void		erase( int x, int y, int w, int h );
+    void		erase( const TQRect & );
+    void		erase( const TQRegion & );
+    void		scroll( int dx, int dy );
+    void		scroll( int dx, int dy, const TQRect& );
+
+    void		drawText( int x, int y, const TQString &);
+    void		drawText( const TQPoint &, const TQString &);
+
+    // Misc. functions
+
+    TQWidget *		focusWidget() const;
+    TQRect               microFocusHint() const;
+
+    // drag and drop
+
+    bool		acceptDrops() const;
+    virtual void	setAcceptDrops( bool on );
+
+    // transparency and pseudo transparency
+
+    virtual void	setAutoMask(bool);
+    bool		autoMask() const;
+
+    enum BackgroundOrigin { WidgetOrigin, ParentOrigin, WindowOrigin, AncestorOrigin };
+
+    virtual void setBackgroundOrigin( BackgroundOrigin );
+    BackgroundOrigin backgroundOrigin() const;
+    TQPoint backgroundOffset() const;
+
+    // whats this help
+    virtual bool customWhatsThis() const;
+
+    TQWidget *		parentWidget( bool sameWindow = FALSE ) const;
+    WState		testWState( WState s ) const;
+    WFlags		testWFlags( WFlags f ) const;
+    static TQWidget *	find( WId );
+    static TQWidgetMapper *wmapper();
+
+    TQWidget  *childAt( int x, int y, bool includeThis = FALSE ) const;
+    TQWidget  *childAt( const TQPoint &, bool includeThis = FALSE ) const;
+
+#if defined(Q_WS_QWS)
+    virtual TQGfx * graphicsContext(bool clip_children=TRUE) const;
+#endif
+#if defined(Q_WS_MAC)
+    TQRegion clippedRegion(bool do_children=TRUE);
+    uint clippedSerial(bool do_children=TRUE);
+#ifndef TQMAC_NO_QUARTZ
+    CGContextRef macCGContext(bool clipped=TRUE) const;
+#endif
+#endif
+
+    void setWindowOpacity(double level);
+    double windowOpacity() const;
+
+protected:
+    // Event handlers
+    bool	 event( TQEvent * );
+    virtual void mousePressEvent( TQMouseEvent * );
+    virtual void mouseReleaseEvent( TQMouseEvent * );
+    virtual void mouseDoubleClickEvent( TQMouseEvent * );
+    virtual void mouseMoveEvent( TQMouseEvent * );
+#ifndef QT_NO_WHEELEVENT
+    virtual void wheelEvent( TQWheelEvent * );
+#endif
+    virtual void keyPressEvent( TQKeyEvent * );
+    virtual void keyReleaseEvent( TQKeyEvent * );
+    virtual void focusInEvent( TQFocusEvent * );
+    virtual void focusOutEvent( TQFocusEvent * );
+    virtual void enterEvent( TQEvent * );
+    virtual void leaveEvent( TQEvent * );
+    virtual void paintEvent( TQPaintEvent * );
+    virtual void moveEvent( TQMoveEvent * );
+    virtual void resizeEvent( TQResizeEvent * );
+    virtual void closeEvent( TQCloseEvent * );
+    virtual void contextMenuEvent( TQContextMenuEvent * );
+    virtual void imStartEvent( TQIMEvent * );
+    virtual void imComposeEvent( TQIMEvent * );
+    virtual void imEndEvent( TQIMEvent * );
+    virtual void tabletEvent( TQTabletEvent * );
+
+#ifndef QT_NO_DRAGANDDROP
+    virtual void dragEnterEvent( TQDragEnterEvent * );
+    virtual void dragMoveEvent( TQDragMoveEvent * );
+    virtual void dragLeaveEvent( TQDragLeaveEvent * );
+    virtual void dropEvent( TQDropEvent * );
+#endif
+
+    virtual void showEvent( TQShowEvent * );
+    virtual void hideEvent( TQHideEvent * );
+
+#if defined(Q_WS_MAC)
+    virtual bool macEvent( MSG * );
+#endif
+#if defined(Q_WS_WIN)
+    virtual bool winEvent( MSG * );
+#endif
+#if defined(Q_WS_X11)
+    virtual bool x11Event( XEvent * );
+#endif
+#if defined(Q_WS_QWS)
+    virtual bool qwsEvent( TQWSEvent * );
+    virtual unsigned char *scanLine( int ) const;
+    virtual int bytesPerLine() const;
+#endif
+
+    virtual void updateMask();
+
+    // Misc. protected functions
+
+#ifndef QT_NO_STYLE
+    virtual void styleChange( TQStyle& );
+#endif
+    virtual void enabledChange( bool oldEnabled );
+#ifndef QT_NO_PALETTE
+    virtual void paletteChange( const TQPalette & );
+#endif
+    virtual void fontChange( const TQFont & );
+    virtual void windowActivationChange( bool oldActive );
+
+    int		 metric( int )	const;
+
+    void	 resetInputContext();
+
+    virtual void create( WId = 0, bool initializeWindow = TRUE,
+			 bool destroyOldWindow = TRUE );
+    virtual void destroy( bool destroyWindow = TRUE,
+			  bool destroySubWindows = TRUE );
+    uint	 getWState() const;
+    virtual void setWState( uint );
+    void	 clearWState( uint n );
+    WFlags	 getWFlags() const;
+    virtual void setWFlags( WFlags );
+    void	 clearWFlags( WFlags n );
+
+    virtual bool focusNextPrevChild( bool next );
+
+    TQWExtra	*extraData();
+    TQTLWExtra	*topData();
+    TQFocusData	*focusData();
+
+    virtual void setKeyCompression(bool);
+    virtual void setMicroFocusHint(int x, int y, int w, int h, bool text=TRUE, TQFont *f = 0);
+
+#if defined(Q_WS_MAC)
+    void dirtyClippedRegion(bool);
+    bool isClippedRegionDirty();
+    virtual void setRegionDirty(bool);
+    virtual void macWidgetChangedWindow();
+#endif
+
+private slots:
+    void	 focusProxyDestroyed();
+
+private:
+    void	 setFontSys( TQFont *f = 0 );
+#if defined(Q_WS_X11)
+    void	 createInputContext();
+    void	 destroyInputContext();
+    void	 focusInputContext();
+    void	 checkChildrenDnd();
+#elif defined(Q_WS_MAC)
+    uint    own_id : 1, macDropEnabled : 1;
+    EventHandlerRef window_event;
+    //mac event functions
+    void    propagateUpdates(bool update_rgn=TRUE);
+    void    update( const TQRegion& );
+    //friends, way too many - fix this immediately!
+    friend void qt_clean_root_win();
+    friend bool qt_recreate_root_win();
+    friend TQPoint posInWindow(TQWidget *);
+    friend bool qt_mac_update_sizer(TQWidget *, int);
+    friend TQWidget *qt_recursive_match(TQWidget *widg, int x, int y);
+    friend bool qt_paint_children(TQWidget *,TQRegion &, uchar ops);
+    friend TQMAC_PASCAL OSStatus qt_window_event(EventHandlerCallRef er, EventRef event, void *);
+    friend void qt_event_request_updates(TQWidget *, const TQRegion &, bool subtract);
+    friend bool qt_window_rgn(WId, short, RgnHandle, bool);
+    friend class TQDragManager;
+#endif
+
+#ifndef QT_NO_LAYOUT
+    void 	 setLayout( TQLayout *l );
+#endif
+    void	 setWinId( WId );
+    void	 showWindow();
+    void	 hideWindow();
+    void	 showChildren( bool spontaneous );
+    void	 hideChildren( bool spontaneous );
+    void	 reparentSys( TQWidget *parent, WFlags, const TQPoint &,  bool showIt);
+    void	 createTLExtra();
+    void	 createExtra();
+    void	 deleteExtra();
+    void	 createSysExtra();
+    void	 deleteSysExtra();
+    void	 createTLSysExtra();
+    void	 deleteTLSysExtra();
+    void	 deactivateWidgetCleanup();
+    void	 internalSetGeometry( int, int, int, int, bool );
+    void	 reparentFocusWidgets( TQWidget * );
+    TQFocusData	*focusData( bool create );
+    void         setBackgroundFromMode();
+    void         setBackgroundColorDirect( const TQColor & );
+    void   	 setBackgroundPixmapDirect( const TQPixmap & );
+    void         setBackgroundModeDirect( BackgroundMode );
+    void         setBackgroundEmpty();
+    void	 updateFrameStrut() const;
+#if defined(Q_WS_X11)
+    void         setBackgroundX11Relative();
+#endif
+
+    WId		 winid;
+    uint	 widget_state;
+    uint	 widget_flags;
+    uint	 focus_policy : 4;
+    uint 	 own_font :1;
+    uint 	 own_palette :1;
+    uint 	 sizehint_forced :1;
+    uint 	 is_closing :1;
+    uint 	 in_show : 1;
+    uint 	 in_show_maximized : 1;
+    uint	 fstrut_dirty : 1;
+    uint	 im_enabled : 1;
+    TQRect	 crect;
+    TQColor	 bg_col;
+#ifndef QT_NO_PALETTE
+    TQPalette	 pal;
+#endif
+    TQFont	 fnt;
+#ifndef QT_NO_LAYOUT
+    TQLayout 	*lay_out;
+#endif
+    TQWExtra	*extra;
+#if defined(Q_WS_QWS)
+    TQRegion	 req_region;			// Requested region
+    mutable TQRegion	 paintable_region;	// Paintable region
+    mutable bool         paintable_region_dirty;// needs to be recalculated
+    mutable TQRegion      alloc_region;          // Allocated region
+    mutable bool         alloc_region_dirty;    // needs to be recalculated
+    mutable int          overlapping_children;  // Handle overlapping children
+
+    int		 alloc_region_index;
+    int		 alloc_region_revision;
+
+    void updateOverlappingChildren() const;
+    void setChildrenAllocatedDirty();
+    void setChildrenAllocatedDirty( const TQRegion &r, const TQWidget *dirty=0 );
+    bool isAllocatedRegionDirty() const;
+    void updateRequestedRegion( const TQPoint &gpos );
+    TQRegion requestedRegion() const;
+    TQRegion allocatedRegion() const;
+    TQRegion paintableRegion() const;
+
+    void updateGraphicsContext( TQGfx *qgfx_qws, bool clip_children ) const;
+#ifndef QT_NO_CURSOR
+    void updateCursor( const TQRegion &r ) const;
+#endif
+
+    // used to accumulate dirty region when children moved/resized.
+    TQRegion dirtyChildren;
+    bool isSettingGeometry;
+    friend class TQWSManager;
+#endif
+    static int instanceCounter;  // Current number of widget instances
+    static int maxInstances;     // Maximum number of widget instances
+
+    static void	 createMapper();
+    static void	 destroyMapper();
+    static TQWidgetList	 *wList();
+    static TQWidgetList	 *tlwList();
+    static TQWidgetMapper *mapper;
+    friend class TQApplication;
+    friend class TQBaseApplication;
+    friend class TQPainter;
+    friend class TQFontMetrics;
+    friend class TQFontInfo;
+    friend class TQETWidget;
+    friend class TQLayout;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQWidget( const TQWidget & );
+    TQWidget &operator=( const TQWidget & );
+#endif
+
+public: // obsolete functions to dissappear or to become inline in 3.0
+#ifndef QT_NO_PALETTE
+    void setPalette( const TQPalette &p, bool ) { setPalette( p ); }
+#endif
+    void setFont( const TQFont &f, bool ) { setFont( f ); }
+};
+
+
+inline TQt::WState TQWidget::testWState( WState s ) const
+{ return (widget_state & s); }
+
+inline TQt::WFlags TQWidget::testWFlags( WFlags f ) const
+{ return (widget_flags & f); }
+
+
+inline WId TQWidget::winId() const
+{ return winid; }
+
+inline bool TQWidget::isTopLevel() const
+{ return testWFlags(WType_TopLevel); }
+
+inline bool TQWidget::isDialog() const
+{ return testWFlags(WType_Dialog); }
+
+inline bool TQWidget::isPopup() const
+{ return testWFlags(WType_Popup); }
+
+inline bool TQWidget::isDesktop() const
+{ return testWFlags(WType_Desktop); }
+
+inline bool TQWidget::isEnabled() const
+{ return !testWState(WState_Disabled); }
+
+inline bool TQWidget::isModal() const
+{ return testWFlags(WShowModal); }
+
+inline bool TQWidget::isEnabledToTLW() const
+{ return isEnabled(); }
+
+inline const TQRect &TQWidget::geometry() const
+{ return crect; }
+
+inline TQSize TQWidget::size() const
+{ return crect.size(); }
+
+inline int TQWidget::width() const
+{ return crect.width(); }
+
+inline int TQWidget::height() const
+{ return crect.height(); }
+
+inline TQRect TQWidget::rect() const
+{ return TQRect(0,0,crect.width(),crect.height()); }
+
+inline int TQWidget::minimumWidth() const
+{ return minimumSize().width(); }
+
+inline int TQWidget::minimumHeight() const
+{ return minimumSize().height(); }
+
+inline int TQWidget::maximumWidth() const
+{ return maximumSize().width(); }
+
+inline int TQWidget::maximumHeight() const
+{ return maximumSize().height(); }
+
+inline void TQWidget::setMinimumSize( const TQSize &s )
+{ setMinimumSize(s.width(),s.height()); }
+
+inline void TQWidget::setMaximumSize( const TQSize &s )
+{ setMaximumSize(s.width(),s.height()); }
+
+inline void TQWidget::setSizeIncrement( const TQSize &s )
+{ setSizeIncrement(s.width(),s.height()); }
+
+inline void TQWidget::setBaseSize( const TQSize &s )
+{ setBaseSize(s.width(),s.height()); }
+
+inline const TQColor &TQWidget::eraseColor() const
+{ return bg_col; }
+
+#ifndef QT_NO_PALETTE
+inline const TQPalette &TQWidget::palette() const
+{ return pal; }
+#endif
+
+inline TQFont TQWidget::font() const
+{ return fnt; }
+
+inline TQFontMetrics TQWidget::fontMetrics() const
+{ return TQFontMetrics(font()); }
+
+inline TQFontInfo TQWidget::fontInfo() const
+{ return TQFontInfo(font()); }
+
+inline bool TQWidget::hasMouseTracking() const
+{ return testWState(WState_MouseTracking); }
+
+inline bool TQWidget::hasMouse() const
+{ return testWState(WState_HasMouse); }
+
+inline bool  TQWidget::isFocusEnabled() const
+{ return (FocusPolicy)focus_policy != NoFocus; }
+
+inline TQWidget::FocusPolicy TQWidget::focusPolicy() const
+{ return (FocusPolicy)focus_policy; }
+
+inline bool TQWidget::isUpdatesEnabled() const
+{ return !testWState(WState_BlockUpdates); }
+
+inline void TQWidget::update( const TQRect &r )
+{ update( r.x(), r.y(), r.width(), r.height() ); }
+
+inline void TQWidget::repaint()
+{ repaint( TRUE ); }
+
+inline void TQWidget::repaint( const TQRect &r, bool erase )
+{ repaint( r.x(), r.y(), r.width(), r.height(), erase ); }
+
+inline void TQWidget::erase()
+{ erase( 0, 0, crect.width(), crect.height() ); }
+
+inline void TQWidget::erase( const TQRect &r )
+{ erase( r.x(), r.y(), r.width(), r.height() ); }
+
+inline bool TQWidget::close()
+{ return close( FALSE ); }
+
+inline bool TQWidget::isVisible() const
+{ return testWState(WState_Visible); }
+
+inline bool TQWidget::isVisibleToTLW() const // obsolete
+{ return isVisible(); }
+
+inline bool TQWidget::isHidden() const
+{ return testWState(WState_ForceHide); }
+
+inline bool TQWidget::isShown() const
+{ return !testWState(WState_ForceHide); }
+
+inline void TQWidget::move( const TQPoint &p )
+{ move( p.x(), p.y() ); }
+
+inline void TQWidget::resize( const TQSize &s )
+{ resize( s.width(), s.height()); }
+
+inline void TQWidget::setGeometry( const TQRect &r )
+{ setGeometry( r.left(), r.top(), r.width(), r.height() ); }
+
+inline void TQWidget::drawText( const TQPoint &p, const TQString &s )
+{ drawText( p.x(), p.y(), s ); }
+
+inline TQWidget *TQWidget::parentWidget( bool sameWindow ) const
+{
+    if ( sameWindow )
+	return isTopLevel() ? 0 : (TQWidget *)TQObject::parent();
+    return (TQWidget *)TQObject::parent();
+}
+
+inline TQWidgetMapper *TQWidget::wmapper()
+{ return mapper; }
+
+inline uint TQWidget::getWState() const
+{ return widget_state; }
+
+inline void TQWidget::setWState( uint f )
+{ widget_state |= f; }
+
+inline void TQWidget::clearWState( uint f )
+{ widget_state &= ~f; }
+
+inline TQt::WFlags TQWidget::getWFlags() const
+{ return widget_flags; }
+
+inline void TQWidget::setWFlags( WFlags f )
+{ widget_flags |= f; }
+
+inline void TQWidget::clearWFlags( WFlags f )
+{ widget_flags &= ~f; }
+
+inline void TQWidget::constPolish() const
+{
+    if ( !testWState(WState_Polished) ) {
+	TQWidget* that = (TQWidget*) this;
+	that->polish();
+        that->setWState(WState_Polished); // be on the safe side...
+    }
+}
+#ifndef QT_NO_CURSOR
+inline bool TQWidget::ownCursor() const
+{
+    return testWState( WState_OwnCursor );
+}
+#endif
+inline bool TQWidget::ownFont() const
+{
+    return own_font;
+}
+#ifndef QT_NO_PALETTE
+inline bool TQWidget::ownPalette() const
+{
+    return own_palette;
+}
+#endif
+
+inline void TQWidget::setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw )
+{
+    setSizePolicy( TQSizePolicy( hor, ver, hfw) );
+}
+
+inline bool TQWidget::isInputMethodEnabled() const
+{
+    return (bool)im_enabled;
+}
+
+// Extra TQWidget data
+//  - to minimize memory usage for members that are seldom used.
+//  - top-level widgets have extra extra data to reduce cost further
+
+class TQFocusData;
+class TQWSManager;
+#if defined(Q_WS_WIN)
+class TQOleDropTarget;
+#endif
+#if defined(Q_WS_MAC)
+class TQMacDndExtra;
+#endif
+
+struct Q_EXPORT TQTLWExtra {
+#ifndef QT_NO_WIDGET_TOPEXTRA
+    TQString  caption;				// widget caption
+    TQString  iconText;				// widget icon text
+    TQPixmap *icon;				// widget icon
+#endif
+    TQFocusData *focusData;			// focus data (for TLW)
+    short    incw, inch;			// size increments
+    // frame strut
+    ulong    fleft, fright, ftop, fbottom;
+    uint     unused : 8;                       // not used at this point...
+#if defined( Q_WS_WIN ) || defined( Q_WS_MAC )
+    uint     opacity : 8;		       // Stores opacity level on Windows/Mac OS X.
+#endif
+    uint     savedFlags;			// Save widgetflags while showing fullscreen
+    short    basew, baseh;			// base sizes
+#if defined(Q_WS_X11)
+    WId  parentWinId;				// parent window Id (valid after reparenting)
+    uint     embedded : 1;			// window is embedded in another TQt application
+    uint     spont_unmapped: 1;			// window was spontaneously unmapped
+    uint     reserved: 1;			// reserved
+    uint     dnd : 1;				// DND properties installed
+    uint     uspos : 1;				// User defined position
+    uint     ussize : 1;			// User defined size
+    void    *xic;				// XIM Input Context
+#endif
+#if defined(Q_WS_MAC)
+    WindowGroupRef group;
+    uint     is_moved: 1;
+    uint     resizer : 4;
+#endif
+#if defined(Q_WS_QWS) && !defined ( QT_NO_QWS_MANAGER )
+    TQRegion decor_allocated_region;		// decoration allocated region
+    TQWSManager *qwsManager;
+#endif
+#if defined(Q_WS_WIN)
+    HICON    winIcon;				// internal Windows icon
+#endif
+    TQRect    normalGeometry;			// used by showMin/maximized/FullScreen
+#ifdef Q_WS_WIN
+    uint style, exstyle;
+#endif
+};
+
+
+#define TQWIDGETSIZE_MAX 32767
+
+// dear user: you can see this struct, but it is internal. do not touch.
+
+struct Q_EXPORT TQWExtra {
+    Q_INT16  minw, minh;			// minimum size
+    Q_INT16  maxw, maxh;			// maximum size
+    TQPixmap *bg_pix;				// background pixmap
+    TQWidget *focus_proxy;
+#ifndef QT_NO_CURSOR
+    TQCursor *curs;
+#endif
+    TQTLWExtra *topextra;			// only useful for TLWs
+#if defined(Q_WS_WIN)
+    TQOleDropTarget *dropTarget;			// drop target
+#endif
+#if defined(Q_WS_X11)
+    WId xDndProxy;				// XDND forwarding to embedded windows
+#endif
+#if defined(Q_WS_MAC)
+    TQRegion clip_saved, clip_sibs, clip_children;
+    TQMacDndExtra *macDndExtra;
+    TQRegion dirty_area;
+    uint clip_dirty : 1, clip_serial : 15;
+    uint child_dirty : 1, child_serial : 15;
+#ifndef TQMAC_NO_QUARTZ
+    uint ctx_children_clipped:1;
+#endif // TQMAC_NO_QUARTZ
+    uint has_dirty_area:1;
+#endif // Q_WS_MAC
+    uint bg_origin : 2;
+#if defined(Q_WS_X11)
+    uint children_use_dnd : 1;
+    uint compress_events : 1;
+#endif
+#if defined(Q_WS_QWS) || defined(Q_WS_MAC)
+    TQRegion mask;				// widget mask
+#endif
+    char     bg_mode;				// background mode
+    char     bg_mode_visual;			// visual background mode
+#ifndef QT_NO_STYLE
+    TQStyle* style;
+#endif
+    TQRect micro_focus_hint;			// micro focus hint
+    TQSizePolicy size_policy;
+};
+
+#define Q_DEFINED_QWIDGET
+#include "qwinexport.h"
+
+#endif // TQWIDGET_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwidget-members.html b/doc/html/qwidget-members.html new file mode 100644 index 00000000..234f4bb4 --- /dev/null +++ b/doc/html/qwidget-members.html @@ -0,0 +1,338 @@ + + + + + +TQWidget Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWidget

+ +

This is the complete list of member functions for +TQWidget, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwidget.html b/doc/html/qwidget.html new file mode 100644 index 00000000..982c0a19 --- /dev/null +++ b/doc/html/qwidget.html @@ -0,0 +1,3256 @@ + + + + + +TQWidget Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWidget Class Reference

+ +

The TQWidget class is the base class of all user interface objects. +More... +

#include <qwidget.h> +

Inherits TQObject and TQPaintDevice. +

Inherited by TQAxWidget, TQButton, TQFrame, TQDialog, TQComboBox, TQDataBrowser, TQDataView, TQDateTimeEditBase, TQDateTimeEdit, TQDesktopWidget, TQDial, TQDockArea, TQGLWidget, TQHeader, TQMainWindow, TQMotifWidget, TQNPWidget, TQScrollBar, TQSizeGrip, TQSlider, TQSpinBox, TQSplashScreen, TQStatusBar, TQTabBar, TQTabWidget, TQWorkspace, and TQXtWidget. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Static Public Members

+ +

Properties

+
    +
  • bool acceptDrops - whether drop events are enabled for this widget
  • +
  • bool autoMask - whether the auto mask feature is enabled for the widget
  • +
  • TQBrush backgroundBrush - the widget's background brush  (read only)
  • +
  • BackgroundMode backgroundMode - the color role used for painting the background of the widget
  • +
  • BackgroundOrigin backgroundOrigin - the origin of the widget's background
  • +
  • TQSize baseSize - the base size of the widget
  • +
  • TQString caption - the window caption (title)
  • +
  • TQRect childrenRect - the bounding rectangle of the widget's children  (read only)
  • +
  • TQRegion childrenRegion - the combined region occupied by the widget's children  (read only)
  • +
  • TQColorGroup colorGroup - the current color group of the widget palette  (read only)
  • +
  • TQCursor cursor - the cursor shape for this widget
  • +
  • bool customWhatsThis - whether the widget wants to handle What's This help manually  (read only)
  • +
  • bool enabled - whether the widget is enabled
  • +
  • bool focus - whether this widget (or its focus proxy) has the keyboard input focus  (read only)
  • +
  • bool focusEnabled - whether the widget accepts keyboard focus  (read only)
  • +
  • FocusPolicy focusPolicy - the way the widget accepts keyboard focus
  • +
  • TQFont font - the font currently set for the widget
  • +
  • TQRect frameGeometry - geometry of the widget relative to its parent including any window frame  (read only)
  • +
  • TQSize frameSize - the size of the widget including any window frame  (read only)
  • +
  • bool fullScreen - whether the widget is full screen  (read only)
  • +
  • TQRect geometry - the geometry of the widget relative to its parent and excluding the window frame
  • +
  • int height - the height of the widget excluding any window frame  (read only)
  • +
  • bool hidden - whether the widget is explicitly hidden
  • +
  • TQPixmap icon - the widget's icon
  • +
  • TQString iconText - the widget's icon text
  • +
  • bool inputMethodEnabled - enables or disables the use of input methods for this widget
  • +
  • bool isActiveWindow - whether this widget is the active window  (read only)
  • +
  • bool isDesktop - whether the widget is a desktop widget, i.e. represents the desktop  (read only)
  • +
  • bool isDialog - whether the widget is a dialog widget  (read only)
  • +
  • bool isModal - whether the widget is a modal widget  (read only)
  • +
  • bool isPopup - whether the widget is a popup widget  (read only)
  • +
  • bool isTopLevel - whether the widget is a top-level widget  (read only)
  • +
  • bool maximized - whether this widget is maximized  (read only)
  • +
  • int maximumHeight - the widget's maximum height
  • +
  • TQSize maximumSize - the widget's maximum size
  • +
  • int maximumWidth - the widget's maximum width
  • +
  • TQRect microFocusHint - the currently set micro focus hint for this widget  (read only)
  • +
  • bool minimized - whether this widget is minimized (iconified)  (read only)
  • +
  • int minimumHeight - the widget's minimum height
  • +
  • TQSize minimumSize - the widget's minimum size
  • +
  • TQSize minimumSizeHint - the recommended minimum size for the widget  (read only)
  • +
  • int minimumWidth - the widget's minimum width
  • +
  • bool mouseTracking - whether mouse tracking is enabled for the widget
  • +
  • bool ownCursor - whether the widget uses its own cursor  (read only)
  • +
  • bool ownFont - whether the widget uses its own font  (read only)
  • +
  • bool ownPalette - whether the widget uses its own palette  (read only)
  • +
  • TQPalette palette - the widget's palette
  • +
  • TQColor paletteBackgroundColor - the background color of the widget
  • +
  • TQPixmap paletteBackgroundPixmap - the background pixmap of the widget
  • +
  • TQColor paletteForegroundColor - the foreground color of the widget
  • +
  • TQPoint pos - the position of the widget within its parent widget
  • +
  • TQRect rect - the internal geometry of the widget excluding any window frame  (read only)
  • +
  • bool shown - whether the widget is shown
  • +
  • TQSize size - the size of the widget excluding any window frame
  • +
  • TQSize sizeHint - the recommended size for the widget  (read only)
  • +
  • TQSize sizeIncrement - the size increment of the widget
  • +
  • TQSizePolicy sizePolicy - the default layout behavior of the widget
  • +
  • bool underMouse - whether the widget is under the mouse cursor  (read only)
  • +
  • bool updatesEnabled - whether updates are enabled
  • +
  • bool visible - whether the widget is visible  (read only)
  • +
  • TQRect visibleRect - the visible rectangle  (read only)  (obsolete)
  • +
  • int width - the width of the widget excluding any window frame  (read only)
  • +
  • double windowOpacity - the level of opacity for the window
  • +
  • int x - the x coordinate of the widget relative to its parent including any window frame  (read only)
  • +
  • int y - the y coordinate of the widget relative to its parent and including any window frame  (read only)
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQWidget class is the base class of all user interface objects. +

+ +

The widget is the atom of the user interface: it receives mouse, +keyboard and other events from the window system, and paints a +representation of itself on the screen. Every widget is +rectangular, and they are sorted in a Z-order. A widget is +clipped by its parent and by the widgets in front of it. +

A widget that isn't embedded in a parent widget is called a +top-level widget. Usually, top-level widgets are windows with a +frame and a title bar (although it is also possible to create +top-level widgets without such decoration if suitable widget flags +are used). In TQt, TQMainWindow and the various subclasses of +TQDialog are the most common top-level windows. +

A widget without a parent widget is always a top-level widget. +

Non-top-level widgets are child widgets. These are child windows +in their parent widgets. You cannot usually distinguish a child +widget from its parent visually. Most other widgets in TQt are +useful only as child widgets. (It is possible to make, say, a +button into a top-level widget, but most people prefer to put +their buttons inside other widgets, e.g. TQDialog.) +

If you want to use a TQWidget to hold child widgets you will +probably want to add a layout to the parent TQWidget. (See Layouts.) +

TQWidget has many member functions, but some of them have little +direct functionality: for example, TQWidget has a font property, +but never uses this itself. There are many subclasses which +provide real functionality, such as TQPushButton, TQListBox and +TQTabDialog, etc. +

Groups of functions: +

+

+
Context Functions +
Window functions +show(), +hide(), +raise(), +lower(), +close(). +
Top level windows +caption(), +setCaption(), +icon(), +setIcon(), +iconText(), +setIconText(), +isActiveWindow(), +setActiveWindow(), +showMinimized(). +showMaximized(), +showFullScreen(), +showNormal(). +
Window contents +update(), +repaint(), +erase(), +scroll(), +updateMask(). +
Geometry +pos(), +size(), +rect(), +x(), +y(), +width(), +height(), +sizePolicy(), +setSizePolicy(), +sizeHint(), +updateGeometry(), +layout(), +move(), +resize(), +setGeometry(), +frameGeometry(), +geometry(), +childrenRect(), +adjustSize(), +mapFromGlobal(), +mapFromParent() +mapToGlobal(), +mapToParent(), +maximumSize(), +minimumSize(), +sizeIncrement(), +setMaximumSize(), +setMinimumSize(), +setSizeIncrement(), +setBaseSize(), +setFixedSize() +
Mode +isVisible(), +isVisibleTo(), +isMinimized(), +isDesktop(), +isEnabled(), +isEnabledTo(), +isModal(), +isPopup(), +isTopLevel(), +setEnabled(), +hasMouseTracking(), +setMouseTracking(), +isUpdatesEnabled(), +setUpdatesEnabled(), +clipRegion(). +
Look and feel +style(), +setStyle(), +cursor(), +setCursor() +font(), +setFont(), +palette(), +setPalette(), +backgroundMode(), +setBackgroundMode(), +colorGroup(), +fontMetrics(), +fontInfo(). +
Keyboard focus
functions
+isFocusEnabled(), +setFocusPolicy(), +focusPolicy(), +hasFocus(), +setFocus(), +clearFocus(), +setTabOrder(), +setFocusProxy(). +
Mouse and
keyboard grabbing
+grabMouse(), +releaseMouse(), +grabKeyboard(), +releaseKeyboard(), +mouseGrabber(), +keyboardGrabber(). +
Event handlers +event(), +mousePressEvent(), +mouseReleaseEvent(), +mouseDoubleClickEvent(), +mouseMoveEvent(), +keyPressEvent(), +keyReleaseEvent(), +focusInEvent(), +focusOutEvent(), +wheelEvent(), +enterEvent(), +leaveEvent(), +paintEvent(), +moveEvent(), +resizeEvent(), +closeEvent(), +dragEnterEvent(), +dragMoveEvent(), +dragLeaveEvent(), +dropEvent(), +childEvent(), +showEvent(), +hideEvent(), +customEvent(). +
Change handlers +enabledChange(), +fontChange(), +paletteChange(), +styleChange(), +windowActivationChange(). +
System functions +parentWidget(), +topLevelWidget(), +reparent(), +polish(), +winId(), +find(), +metric(). +
What's this help +customWhatsThis() +
Internal kernel
functions
+focusNextPrevChild(), +wmapper(), +clearWFlags(), +getWFlags(), +setWFlags(), +testWFlags(). +

+

Every widget's constructor accepts two or three standard arguments: +

    +
  1. TQWidget *parent = 0 is the parent of the new widget. +If it is 0 (the default), the new widget will be a top-level window. +If not, it will be a child of parent, and be constrained by parent's geometry (unless you specify WType_TopLevel as +widget flag). +
  2. const char *name = 0 is the widget name of the new +widget. You can access it using name(). The widget name is little +used by programmers but is tquite useful with GUI builders such as +TQt Designer (you can name a widget in TQt Designer, and +connect() to it using the name in your code). The dumpObjectTree() +debugging function also uses it. +
  3. WFlags f = 0 (where available) sets the widget flags; the +default is suitable for almost all widgets, but to get, for +example, a top-level widget without a window system frame, you +must use special flags. +
+

The tictac/tictac.cpp example program is good example of a simple +widget. It contains a few event handlers (as all widgets must), a +few custom routines that are specific to it (as all useful widgets +do), and has a few children and connections. Everything it does +is done in response to an event: this is by far the most common way +to design GUI applications. +

You will need to supply the content for your widgets yourself, but +here is a brief run-down of the events, starting with the most common +ones: +

    +

  • paintEvent() - called whenever the widget needs to be +repainted. Every widget which displays output must implement it, +and it is wise not to paint on the screen outside +paintEvent(). +

  • resizeEvent() - called when the widget has been resized. +

  • mousePressEvent() - called when a mouse button is pressed. +There are six mouse-related events, but the mouse press and mouse +release events are by far the most important. A widget receives +mouse press events when the mouse is inside it, or when it has +grabbed the mouse using grabMouse(). +

  • mouseReleaseEvent() - called when a mouse button is released. +A widget receives mouse release events when it has received the +corresponding mouse press event. This means that if the user +presses the mouse inside your widget, then drags the mouse to +somewhere else, then releases, your widget receives the release +event. There is one exception: if a popup menu appears while the +mouse button is held down, this popup immediately steals the mouse +events. +

  • mouseDoubleClickEvent() - not tquite as obvious as it might seem. +If the user double-clicks, the widget receives a mouse press event +(perhaps a mouse move event or two if they don't hold the mouse +tquite steady), a mouse release event and finally this event. It is +not possible to distinguish a click from a double click until you've +seen whether the second click arrives. (This is one reason why most GUI +books recommend that double clicks be an extension of single clicks, +rather than trigger a different action.) +

+

If your widget only contains child widgets, you probably do not need to +implement any event handlers. If you want to detect a mouse click in +a child widget call the child's hasMouse() function inside the +parent widget's mousePressEvent(). +

Widgets that accept keyboard input need to reimplement a few more +event handlers: +

    +

  • keyPressEvent() - called whenever a key is pressed, and again +when a key has been held down long enough for it to auto-repeat. +Note that the Tab and Shift+Tab keys are only passed to the widget +if they are not used by the focus-change mechanisms. To force those +keys to be processed by your widget, you must reimplement +TQWidget::event(). +

  • focusInEvent() - called when the widget gains keyboard focus +(assuming you have called setFocusPolicy()). Well written widgets +indicate that they own the keyboard focus in a clear but discreet +way. +

  • focusOutEvent() - called when the widget loses keyboard focus. +

+

Some widgets will also need to reimplement some of the less common +event handlers: +

    +

  • mouseMoveEvent() - called whenever the mouse moves while a +button is held down. This is useful for, for example, dragging. If +you call setMouseTracking(TRUE), you get mouse move events even +when no buttons are held down. (Note that applications which make +use of mouse tracking are often not very useful on low-bandwidth X +connections.) (See also the drag and drop +information.) +

  • keyReleaseEvent() - called whenever a key is released, and also +while it is held down if the key is auto-repeating. In that case +the widget receives a key release event and immediately a key press +event for every repeat. Note that the Tab and Shift+Tab keys are +only passed to the widget if they are not used by the focus-change +mechanisms. To force those keys to be processed by your widget, you +must reimplement TQWidget::event(). +

  • wheelEvent() -- called whenever the user turns the mouse wheel +while the widget has the focus. +

  • enterEvent() - called when the mouse enters the widget's screen +space. (This excludes screen space owned by any children of the +widget.) +

  • leaveEvent() - called when the mouse leaves the widget's screen +space. +

  • moveEvent() - called when the widget has been moved relative to its +parent. +

  • closeEvent() - called when the user closes the widget (or when +close() is called). +

+

There are also some rather obscure events. They are listed in +qevent.h and you need to reimplement event() to handle them. +The default implementation of event() handles Tab and Shift+Tab +(to move the keyboard focus), and passes on most other events to +one of the more specialized handlers above. +

When implementing a widget, there are a few more things to +consider. +

    +

  • In the constructor, be sure to set up your member variables +early on, before there's any chance that you might receive an event. +

  • It is almost always useful to reimplement sizeHint() and to set +the correct size policy with setSizePolicy(), so users of your class +can set up layout management more easily. A size policy lets you +supply good defaults for the layout management handling, so that +other widgets can contain and manage yours easily. sizeHint() +indicates a "good" size for the widget. +

  • If your widget is a top-level window, setCaption() and setIcon() set +the title bar and icon respectively. +

+

See also TQEvent, TQPainter, TQGridLayout, TQBoxLayout, and Abstract Widget Classes. + +


Member Type Documentation

+

TQWidget::BackgroundOrigin

+ +

This enum defines the origin used to draw a widget's background +pixmap. +

The pixmap is drawn using the: +

    +
  • TQWidget::WidgetOrigin - widget's coordinate system. +
  • TQWidget::ParentOrigin - parent's coordinate system. +
  • TQWidget::WindowOrigin - top-level window's coordinate system. +
  • TQWidget::AncestorOrigin - same origin as the parent uses. +
+

TQWidget::FocusPolicy

+ +

This enum type defines the various policies a widget can have with +respect to actquiring keyboard focus. +

    +
  • TQWidget::TabFocus - the widget accepts focus by tabbing. +
  • TQWidget::ClickFocus - the widget accepts focus by clicking. +
  • TQWidget::StrongFocus - the widget accepts focus by both tabbing +and clicking. On Mac OS X this will also +be indicate that the widget accepts tab focus +when in 'Text/List focus mode'. +
  • TQWidget::WheelFocus - like StrongFocus plus the widget accepts +focus by using the mouse wheel. +
  • TQWidget::NoFocus - the widget does not accept focus. +

+


Member Function Documentation

+

explicit TQWidget::TQWidget ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) +

+Constructs a widget which is a child of parent, with the name +name and widget flags set to f. +

If parent is 0, the new widget becomes a top-level window. If +parent is another widget, this widget becomes a child window +inside parent. The new widget is deleted when its parent is +deleted. +

The name is sent to the TQObject constructor. +

The widget flags argument, f, is normally 0, but it can be set +to customize the window frame of a top-level widget (i.e. parent must be 0). To customize the frame, set the WStyle_Customize flag OR'ed with any of the TQt::WidgetFlags. +

If you add a child widget to an already visible widget you must +explicitly show the child to make it visible. +

Note that the X11 version of TQt may not be able to deliver all +combinations of style flags on all systems. This is because on +X11, TQt can only ask the window manager, and the window manager +can override the application's settings. On Windows, TQt can set +whatever flags you want. +

Example: +

+    TQLabel *splashScreen = new TQLabel( 0, "mySplashScreen",
+                                WStyle_Customize | WStyle_Splash );
+    
+ + +

TQWidget::~TQWidget () +

+Destroys the widget. +

All this widget's children are deleted first. The application +exits if this widget is the main widget. + +

bool TQWidget::acceptDrops () const +

Returns TRUE if drop events are enabled for this widget; otherwise returns FALSE. +See the "acceptDrops" property for details. +

void TQWidget::adjustSize () [virtual slot] +

+Adjusts the size of the widget to fit the contents. +

Uses sizeHint() if valid (i.e if the size hint's width and height +are >= 0), otherwise sets the size to the children rectangle (the +union of all child widget geometries). +

See also sizeHint and childrenRect. + +

Example: xform/xform.cpp. +

Reimplemented in TQMessageBox. +

bool TQWidget::autoMask () const +

Returns TRUE if the auto mask feature is enabled for the widget; otherwise returns FALSE. +See the "autoMask" property for details. +

const TQBrush & TQWidget::backgroundBrush () const +

Returns the widget's background brush. +See the "backgroundBrush" property for details. +

const TQColor & TQWidget::backgroundColor () const +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +Use paletteBackgroundColor() or eraseColor() instead. +

BackgroundMode TQWidget::backgroundMode () const +

Returns the color role used for painting the background of the widget. +See the "backgroundMode" property for details. +

BackgroundOrigin TQWidget::backgroundOrigin () const +

Returns the origin of the widget's background. +See the "backgroundOrigin" property for details. +

const TQPixmap * TQWidget::backgroundPixmap () const +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +Use paletteBackgroundPixmap() or erasePixmap() instead. +

Examples: themes/metal.cpp and themes/wood.cpp. +

TQSize TQWidget::baseSize () const +

Returns the base size of the widget. +See the "baseSize" property for details. +

TQString TQWidget::caption () const +

Returns the window caption (title). +See the "caption" property for details. +

TQWidget * TQWidget::childAt ( int x, int y, bool includeThis = FALSE ) const +

+Returns the visible child widget at pixel position (x, y) in +the widget's own coordinate system. +

If includeThis is TRUE, and there is no child visible at (x, y), the widget itself is returned. + +

TQWidget * TQWidget::childAt ( const TQPoint & p, bool includeThis = FALSE ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the visible child widget at point p in the widget's own +coordinate system. +

If includeThis is TRUE, and there is no child visible at p, +the widget itself is returned. +

+

TQRect TQWidget::childrenRect () const +

Returns the bounding rectangle of the widget's children. +See the "childrenRect" property for details. +

TQRegion TQWidget::childrenRegion () const +

Returns the combined region occupied by the widget's children. +See the "childrenRegion" property for details. +

void TQWidget::clearFocus () [slot] +

+Takes keyboard input focus from the widget. +

If the widget has active focus, a focus out + event is sent to this widget to tell it that it is about +to lose the focus. +

This widget must enable focus setting in order to get the keyboard +input focus, i.e. it must call setFocusPolicy(). +

See also focus, setFocus(), focusInEvent(), focusOutEvent(), focusPolicy, and TQApplication::focusWidget(). + +

void TQWidget::clearMask () +

+Removes any mask set by setMask(). +

See also setMask(). + +

void TQWidget::clearWFlags ( WFlags f ) [protected] +

+ +

Clears the widget flags f. +

Widget flags are a combination of TQt::WidgetFlags. +

See also testWFlags(), getWFlags(), and setWFlags(). + +

TQRegion TQWidget::clipRegion () const +

+Returns the unobscured region where paint events can occur. +

For visible widgets, this is an approximation of the area not +covered by other widgets; otherwise, this is an empty region. +

The repaint() function calls this function if necessary, so in +general you do not need to call it. +

+

bool TQWidget::close () [slot] +

+ +

Closes this widget. Returns TRUE if the widget was closed; +otherwise returns FALSE. +

First it sends the widget a TQCloseEvent. The widget is hidden if it accepts the close event. The default implementation of +TQWidget::closeEvent() accepts the close event. +

The TQApplication::lastWindowClosed() signal is emitted when the +last visible top level widget is closed. +

+

Examples: dialog/mainwindow.cpp, mdi/application.cpp, popup/popup.cpp, and toplevel/options.ui.h. +

bool TQWidget::close ( bool alsoDelete ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Closes this widget. Returns TRUE if the widget was closed; +otherwise returns FALSE. +

If alsoDelete is TRUE or the widget has the WDestructiveClose widget flag, the widget is also deleted. The +widget can prevent itself from being closed by rejecting the +TQCloseEvent it gets. A close events is delivered to the widget +no matter if the widget is visible or not. +

The TQApplication::lastWindowClosed() signal is emitted when the +last visible top level widget is closed. +

Note that closing the TQApplication::mainWidget() terminates the +application. +

See also closeEvent(), TQCloseEvent, hide(), TQApplication::tquit(), TQApplication::setMainWidget(), and TQApplication::lastWindowClosed(). + +

void TQWidget::closeEvent ( TQCloseEvent * e ) [virtual protected] +

+This event handler, for event e, can be reimplemented in a +subclass to receive widget close events. +

The default implementation calls e->accept(), which hides this +widget. See the TQCloseEvent documentation for more details. +

See also event(), hide(), close(), and TQCloseEvent. + +

Examples: action/application.cpp, application/application.cpp, chart/chartform.cpp, i18n/mywidget.cpp, mdi/application.cpp, popup/popup.cpp, and qwerty/qwerty.cpp. +

const TQColorGroup & TQWidget::colorGroup () const +

Returns the current color group of the widget palette. +See the "colorGroup" property for details. +

void TQWidget::constPolish () const [slot] +

+ +

Ensures that the widget is properly initialized by calling +polish(). +

Call constPolish() from functions like sizeHint() that depends on +the widget being initialized, and that may be called before +show(). +

Warning: Do not call constPolish() on a widget from inside that +widget's constructor. +

See also polish(). + +

void TQWidget::contextMenuEvent ( TQContextMenuEvent * e ) [virtual protected] +

+This event handler, for event e, can be reimplemented in a +subclass to receive widget context menu events. +

The default implementation calls e->ignore(), which rejects the +context event. See the TQContextMenuEvent documentation for +more details. +

See also event() and TQContextMenuEvent. + +

Example: menu/menu.cpp. +

void TQWidget::create ( WId window = 0, bool initializeWindow = TRUE, bool destroyOldWindow = TRUE ) [virtual protected] +

+Creates a new widget window if window is 0, otherwise sets the +widget's window to window. +

Initializes the window (sets the geometry etc.) if initializeWindow is TRUE. If initializeWindow is FALSE, no +initialization is performed. This parameter only makes sense if window is a valid window. +

Destroys the old window if destroyOldWindow is TRUE. If destroyOldWindow is FALSE, you are responsible for destroying the +window yourself (using platform native code). +

The TQWidget constructor calls create(0,TRUE,TRUE) to create a +window for this widget. + +

const TQCursor & TQWidget::cursor () const +

Returns the cursor shape for this widget. +See the "cursor" property for details. +

bool TQWidget::customWhatsThis () const [virtual] +

Returns TRUE if the widget wants to handle What's This help manually; otherwise returns FALSE. +See the "customWhatsThis" property for details. +

void TQWidget::destroy ( bool destroyWindow = TRUE, bool destroySubWindows = TRUE ) [virtual protected] +

+Frees up window system resources. Destroys the widget window if destroyWindow is TRUE. +

destroy() calls itself recursively for all the child widgets, +passing destroySubWindows for the destroyWindow parameter. +To have more control over destruction of subwidgets, destroy +subwidgets selectively first. +

This function is usually called from the TQWidget destructor. + +

void TQWidget::dragEnterEvent ( TQDragEnterEvent * ) [virtual protected] +

+This event handler is called when a drag is in progress and the +mouse enters this widget. +

See the Drag-and-drop documentation for an +overview of how to provide drag-and-drop in your application. +

See also TQTextDrag, TQImageDrag, and TQDragEnterEvent. + +

Example: iconview/simple_dd/main.cpp. +

void TQWidget::dragLeaveEvent ( TQDragLeaveEvent * ) [virtual protected] +

+This event handler is called when a drag is in progress and the +mouse leaves this widget. +

See the Drag-and-drop documentation for an +overview of how to provide drag-and-drop in your application. +

See also TQTextDrag, TQImageDrag, and TQDragLeaveEvent. + +

void TQWidget::dragMoveEvent ( TQDragMoveEvent * ) [virtual protected] +

+This event handler is called when a drag is in progress and the +mouse enters this widget, and whenever it moves within the widget. +

See the Drag-and-drop documentation for an +overview of how to provide drag-and-drop in your application. +

See also TQTextDrag, TQImageDrag, and TQDragMoveEvent. + +

void TQWidget::drawText ( int x, int y, const TQString & str ) +

+Draws the string str at position (x, y). +

The y position is the base line position of the text. The text +is drawn using the default font and the default foreground color. +

This function is provided for convenience. You will generally get +more flexible results and often higher speed by using a a painter instead. +

See also font, foregroundColor(), and TQPainter::drawText(). + +

void TQWidget::drawText ( const TQPoint & pos, const TQString & str ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Draws the string str at position pos. + +

void TQWidget::dropEvent ( TQDropEvent * ) [virtual protected] +

+This event handler is called when the drag is dropped on this +widget. +

See the Drag-and-drop documentation for an +overview of how to provide drag-and-drop in your application. +

See also TQTextDrag, TQImageDrag, and TQDropEvent. + +

Example: iconview/simple_dd/main.cpp. +

void TQWidget::enabledChange ( bool oldEnabled ) [virtual protected] +

+ +

This virtual function is called from setEnabled(). oldEnabled +is the previous setting; you can get the new setting from +isEnabled(). +

Reimplement this function if your widget needs to know when it +becomes enabled or disabled. You will almost certainly need to +update the widget using update(). +

The default implementation repaints the visible part of the +widget. +

See also enabled, enabled, repaint(), update(), and clipRegion(). + +

void TQWidget::enterEvent ( TQEvent * ) [virtual protected] +

+This event handler can be reimplemented in a subclass to receive +widget enter events. +

An event is sent to the widget when the mouse cursor enters the +widget. +

See also leaveEvent(), mouseMoveEvent(), and event(). + +

void TQWidget::erase ( int x, int y, int w, int h ) +

+Erases the specified area (x, y, w, h) in the widget without +generating a paint event. +

If w is negative, it is replaced with width() - x. If h +is negative, it is replaced width height() - y. +

Child widgets are not affected. +

See also repaint(). + +

void TQWidget::erase () +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This version erases the entire widget. + +

void TQWidget::erase ( const TQRect & r ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Erases the specified area r in the widget without generating a +paint event. + +

void TQWidget::erase ( const TQRegion & reg ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Erases the area defined by reg, without generating a paint event. +

Child widgets are not affected. + +

const TQColor & TQWidget::eraseColor () const +

+ +

Returns the erase color of the widget. +

See also setEraseColor(), setErasePixmap(), and backgroundColor(). + +

const TQPixmap * TQWidget::erasePixmap () const +

+Returns the widget's erase pixmap. +

See also setErasePixmap() and eraseColor(). + +

bool TQWidget::event ( TQEvent * e ) [virtual protected] +

+This is the main event handler; it handles event e. You can +reimplement this function in a subclass, but we recommend using +one of the specialized event handlers instead. +

The main event handler first passes an event through all event filters that have been +installed. If none of the filters intercept the event, it calls +one of the specialized event handlers. +

Key press and release events are treated differently from other +events. event() checks for Tab and Shift+Tab and tries to move the +focus appropriately. If there is no widget to move the focus to +(or the key press is not Tab or Shift+Tab), event() calls +keyPressEvent(). +

This function returns TRUE if it is able to pass the event over to +someone (i.e. someone wanted the event); otherwise returns FALSE. +

See also closeEvent(), focusInEvent(), focusOutEvent(), enterEvent(), keyPressEvent(), keyReleaseEvent(), leaveEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), moveEvent(), paintEvent(), resizeEvent(), TQObject::event(), and TQObject::timerEvent(). + +

Reimplemented from TQObject. +

TQWidget * TQWidget::find ( WId id ) [static] +

+Returns a pointer to the widget with window identifer/handle id. +

The window identifier type depends on the underlying window +system, see qwindowdefs.h for the actual definition. If there +is no widget with this identifier, 0 is returned. + +

TQFocusData * TQWidget::focusData () [protected] +

+Returns the focus data for this widget's top-level widget. +

Focus data always belongs to the top-level widget. The focus data +list contains all the widgets in this top-level widget that can +accept focus, in tab order. An iterator points to the current +focus widget (focusWidget() returns a pointer to this widget). +

This information is useful for implementing advanced versions of +focusNextPrevChild(). + +

void TQWidget::focusInEvent ( TQFocusEvent * ) [virtual protected] +

+This event handler can be reimplemented in a subclass to receive +keyboard focus events (focus received) for the widget. +

A widget normally must setFocusPolicy() to something other than +NoFocus in order to receive focus events. (Note that the +application programmer can call setFocus() on any widget, even +those that do not normally accept focus.) +

The default implementation updates the widget (except for toplevel +widgets that do not specify a focusPolicy() ). It also calls +setMicroFocusHint(), hinting any system-specific input tools about +the focus of the user's attention. +

See also focusOutEvent(), focusPolicy, keyPressEvent(), keyReleaseEvent(), event(), and TQFocusEvent. + +

bool TQWidget::focusNextPrevChild ( bool next ) [virtual protected] +

+Finds a new widget to give the keyboard focus to, as appropriate +for Tab and Shift+Tab, and returns TRUE if is can find a new +widget and FALSE if it can't, +

If next is TRUE, this function searches "forwards", if next +is FALSE, it searches "backwards". +

Sometimes, you will want to reimplement this function. For +example, a web browser might reimplement it to move its "current +active link" forwards or backwards, and call +TQWidget::focusNextPrevChild() only when it reaches the last or +first link on the "page". +

Child widgets call focusNextPrevChild() on their parent widgets, +but only the top-level widget decides where to redirect focus. By +overriding this method for an object, you thus gain control of +focus traversal for all child widgets. +

Warning: TQScrollView uses it own logic for this function, which +does the right thing in most cases. But if you are using a +TQScrollView and want complete control of the focus chain you'll +need to override TQScrollView::focusNextPrevChild() and your +top-level widgets' focusNextPrevChild() functions. +

See also focusData(). + +

void TQWidget::focusOutEvent ( TQFocusEvent * ) [virtual protected] +

+This event handler can be reimplemented in a subclass to receive +keyboard focus events (focus lost) for the widget. +

A widget normally must setFocusPolicy() to something other than +NoFocus in order to receive focus events. (Note that the +application programmer can call setFocus() on any widget, even +those that do not normally accept focus.) +

The default implementation updates the widget (except for toplevel +widgets that do not specify a focusPolicy() ). It also calls +setMicroFocusHint(), hinting any system-specific input tools about +the focus of the user's attention. +

See also focusInEvent(), focusPolicy, keyPressEvent(), keyReleaseEvent(), event(), and TQFocusEvent. + +

Example: qmag/qmag.cpp. +

FocusPolicy TQWidget::focusPolicy () const +

Returns the way the widget accepts keyboard focus. +See the "focusPolicy" property for details. +

TQWidget * TQWidget::focusProxy () const +

+Returns the focus proxy, or 0 if there is no focus proxy. +

See also setFocusProxy(). + +

TQWidget * TQWidget::focusWidget () const +

+Returns the focus widget in this widget's window. This is not the +same as TQApplication::focusWidget(), which returns the focus +widget in the currently active window. + +

TQFont TQWidget::font () const +

Returns the font currently set for the widget. +See the "font" property for details. +

void TQWidget::fontChange ( const TQFont & oldFont ) [virtual protected] +

+ +

This virtual function is called from setFont(). oldFont is the +previous font; you can get the new font from font(). +

Reimplement this function if your widget needs to know when its +font changes. You will almost certainly need to update the widget +using update(). +

The default implementation updates the widget including its +geometry. +

See also font, font, update(), and updateGeometry(). + +

TQFontInfo TQWidget::fontInfo () const +

+ +

Returns the font info for the widget's current font. +Equivalent to TQFontInto(widget->font()). +

See also font, fontMetrics(), and font. + +

TQFontMetrics TQWidget::fontMetrics () const +

+ +

Returns the font metrics for the widget's current font. +Equivalent to TQFontMetrics(widget->font()). +

See also font, fontInfo(), and font. + +

Examples: drawdemo/drawdemo.cpp and qmag/qmag.cpp. +

const TQColor & TQWidget::foregroundColor () const +

+Same as paletteForegroundColor() + +

TQRect TQWidget::frameGeometry () const +

Returns geometry of the widget relative to its parent including any window frame. +See the "frameGeometry" property for details. +

TQSize TQWidget::frameSize () const +

Returns the size of the widget including any window frame. +See the "frameSize" property for details. +

const TQRect & TQWidget::geometry () const +

Returns the geometry of the widget relative to its parent and excluding the window frame. +See the "geometry" property for details. +

WFlags TQWidget::getWFlags () const [protected] +

+ +

Returns the widget flags for this this widget. +

Widget flags are a combination of TQt::WidgetFlags. +

See also testWFlags(), setWFlags(), and clearWFlags(). + +

void TQWidget::grabKeyboard () +

+Grabs the keyboard input. +

This widget reveives all keyboard events until releaseKeyboard() +is called; other widgets get no keyboard events at all. Mouse +events are not affected. Use grabMouse() if you want to grab that. +

The focus widget is not affected, except that it doesn't receive +any keyboard events. setFocus() moves the focus as usual, but the +new focus widget receives keyboard events only after +releaseKeyboard() is called. +

If a different widget is currently grabbing keyboard input, that +widget's grab is released first. +

See also releaseKeyboard(), grabMouse(), releaseMouse(), and focusWidget(). + +

void TQWidget::grabMouse () +

+Grabs the mouse input. +

This widget receives all mouse events until releaseMouse() is +called; other widgets get no mouse events at all. Keyboard +events are not affected. Use grabKeyboard() if you want to grab +that. +

Warning: Bugs in mouse-grabbing applications very often lock the +terminal. Use this function with extreme caution, and consider +using the -nograb command line option while debugging. +

It is almost never necessary to grab the mouse when using TQt, as +TQt grabs and releases it sensibly. In particular, TQt grabs the +mouse when a mouse button is pressed and keeps it until the last +button is released. +

Note that only visible widgets can grab mouse input. If +isVisible() returns FALSE for a widget, that widget cannot call +grabMouse(). +

See also releaseMouse(), grabKeyboard(), releaseKeyboard(), grabKeyboard(), and focusWidget(). + +

void TQWidget::grabMouse ( const TQCursor & cursor ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Grabs the mouse input and changes the cursor shape. +

The cursor will assume shape cursor (for as long as the mouse +focus is grabbed) and this widget will be the only one to receive +mouse events until releaseMouse() is called(). +

Warning: Grabbing the mouse might lock the terminal. +

See also releaseMouse(), grabKeyboard(), releaseKeyboard(), and cursor. + +

bool TQWidget::hasFocus () const +

Returns TRUE if this widget (or its focus proxy) has the keyboard input focus; otherwise returns FALSE. +See the "focus" property for details. +

bool TQWidget::hasMouse () const +

Returns TRUE if the widget is under the mouse cursor; otherwise returns FALSE. +See the "underMouse" property for details. +

bool TQWidget::hasMouseTracking () const +

Returns TRUE if mouse tracking is enabled for the widget; otherwise returns FALSE. +See the "mouseTracking" property for details. +

int TQWidget::height () const +

Returns the height of the widget excluding any window frame. +See the "height" property for details. +

int TQWidget::heightForWidth ( int w ) const [virtual] +

+Returns the preferred height for this widget, given the width w. The default implementation returns 0, indicating that the +preferred height does not depend on the width. +

Warning: Does not look at the widget's layout. + +

Reimplemented in TQMenuBar and TQTextEdit. +

void TQWidget::hide () [virtual slot] +

+Hides the widget. +

You almost never have to reimplement this function. If you need to +do something after a widget is hidden, use hideEvent() instead. +

See also hideEvent(), hidden, show(), showMinimized(), visible, and close(). + +

Examples: mdi/application.cpp, popup/popup.cpp, progress/progress.cpp, scrollview/scrollview.cpp, webbrowser/mainwindow.ui.h, and xform/xform.cpp. +

Reimplemented in TQMenuBar. +

void TQWidget::hideEvent ( TQHideEvent * ) [virtual protected] +

+This event handler can be reimplemented in a subclass to receive +widget hide events. +

Hide events are sent to widgets immediately after they have been +hidden. +

See also event() and TQHideEvent. + +

Reimplemented in TQScrollBar. +

const TQPixmap * TQWidget::icon () const +

Returns the widget's icon. +See the "icon" property for details. +

TQString TQWidget::iconText () const +

Returns the widget's icon text. +See the "iconText" property for details. +

void TQWidget::iconify () [slot] +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

void TQWidget::imComposeEvent ( TQIMEvent * e ) [virtual protected] +

+This event handler, for event e, can be reimplemented in a +subclass to receive Input Method composition events. This handler +is called when the user has entered some text using an Input Method. +

The default implementation calls e->ignore(), which rejects the +Input Method event. See the TQIMEvent documentation for more +details. +

See also event() and TQIMEvent. + +

void TQWidget::imEndEvent ( TQIMEvent * e ) [virtual protected] +

+This event handler, for event e, can be reimplemented in a +subclass to receive Input Method composition events. This handler +is called when the user has finished inputting text via an Input +Method. +

The default implementation calls e->ignore(), which rejects the +Input Method event. See the TQIMEvent documentation for more +details. +

See also event() and TQIMEvent. + +

void TQWidget::imStartEvent ( TQIMEvent * e ) [virtual protected] +

+This event handler, for event e, can be reimplemented in a +subclass to receive Input Method composition events. This handler +is called when the user begins entering text using an Input Method. +

The default implementation calls e->ignore(), which rejects the +Input Method event. See the TQIMEvent documentation for more +details. +

See also event() and TQIMEvent. + +

bool TQWidget::isActiveWindow () const +

Returns TRUE if this widget is the active window; otherwise returns FALSE. +See the "isActiveWindow" property for details. +

bool TQWidget::isDesktop () const +

Returns TRUE if the widget is a desktop widget, i.e. represents the desktop; otherwise returns FALSE. +See the "isDesktop" property for details. +

bool TQWidget::isDialog () const +

Returns TRUE if the widget is a dialog widget; otherwise returns FALSE. +See the "isDialog" property for details. +

bool TQWidget::isEnabled () const +

Returns TRUE if the widget is enabled; otherwise returns FALSE. +See the "enabled" property for details. +

bool TQWidget::isEnabledTo ( TQWidget * ancestor ) const +

+Returns TRUE if this widget would become enabled if ancestor is +enabled; otherwise returns FALSE. +

This is the case if neither the widget itself nor every parent up +to but excluding ancestor has been explicitly disabled. +

isEnabledTo(0) is equivalent to isEnabled(). +

See also enabled and enabled. + +

bool TQWidget::isEnabledToTLW () const +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This function is deprecated. It is equivalent to isEnabled() + +

bool TQWidget::isFocusEnabled () const +

Returns TRUE if the widget accepts keyboard focus; otherwise returns FALSE. +See the "focusEnabled" property for details. +

bool TQWidget::isFullScreen () const +

Returns TRUE if the widget is full screen; otherwise returns FALSE. +See the "fullScreen" property for details. +

bool TQWidget::isHidden () const +

Returns TRUE if the widget is explicitly hidden; otherwise returns FALSE. +See the "hidden" property for details. +

bool TQWidget::isInputMethodEnabled () const +

Returns enables or disables the use of input methods for this widget. +See the "inputMethodEnabled" property for details. +

bool TQWidget::isMaximized () const +

Returns TRUE if this widget is maximized; otherwise returns FALSE. +See the "maximized" property for details. +

bool TQWidget::isMinimized () const +

Returns TRUE if this widget is minimized (iconified); otherwise returns FALSE. +See the "minimized" property for details. +

bool TQWidget::isModal () const +

Returns TRUE if the widget is a modal widget; otherwise returns FALSE. +See the "isModal" property for details. +

bool TQWidget::isPopup () const +

Returns TRUE if the widget is a popup widget; otherwise returns FALSE. +See the "isPopup" property for details. +

bool TQWidget::isShown () const +

Returns TRUE if the widget is shown; otherwise returns FALSE. +See the "shown" property for details. +

bool TQWidget::isTopLevel () const +

Returns TRUE if the widget is a top-level widget; otherwise returns FALSE. +See the "isTopLevel" property for details. +

bool TQWidget::isUpdatesEnabled () const +

Returns TRUE if updates are enabled; otherwise returns FALSE. +See the "updatesEnabled" property for details. +

bool TQWidget::isVisible () const +

Returns TRUE if the widget is visible; otherwise returns FALSE. +See the "visible" property for details. +

bool TQWidget::isVisibleTo ( TQWidget * ancestor ) const +

+Returns TRUE if this widget would become visible if ancestor is +shown; otherwise returns FALSE. +

The TRUE case occurs if neither the widget itself nor any parent +up to but excluding ancestor has been explicitly hidden. +

This function will still return TRUE if the widget is obscured by +other windows on the screen, but could be physically visible if it +or they were to be moved. +

isVisibleTo(0) is identical to isVisible(). +

See also show(), hide(), and visible. + +

bool TQWidget::isVisibleToTLW () const +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This function is deprecated. It is equivalent to isVisible() + +

void TQWidget::keyPressEvent ( TQKeyEvent * e ) [virtual protected] +

+This event handler, for event e, can be reimplemented in a +subclass to receive key press events for the widget. +

A widget must call setFocusPolicy() to accept focus initially and +have focus in order to receive a key press event. +

If you reimplement this handler, it is very important that you +explicitly ignore the event +if you do not understand it, so that the widget's parent can +interpret it; otherwise, the event will be implicitly accepted. +Although top-level widgets are able to choose whether to accept +or ignore unknown events because they have no parent widgets that +could otherwise handle them, it is good practice to explicitly +ignore events to make widgets as reusable as possible. +

The default implementation closes popup widgets if the user +presses Esc. Otherwise the event is ignored. +

See also keyReleaseEvent(), TQKeyEvent::ignore(), focusPolicy, focusInEvent(), focusOutEvent(), event(), and TQKeyEvent. + +

Example: picture/picture.cpp. +

Reimplemented in TQLineEdit and TQTextEdit. +

void TQWidget::keyReleaseEvent ( TQKeyEvent * e ) [virtual protected] +

+This event handler, for event e, can be reimplemented in a +subclass to receive key release events for the widget. +

A widget must accept focus +initially and have focus in order to +receive a key release event. +

If you reimplement this handler, it is very important that you +ignore() the release if you do not +understand it, so that the widget's parent can interpret it. +

The default implementation ignores the event. +

See also keyPressEvent(), TQKeyEvent::ignore(), focusPolicy, focusInEvent(), focusOutEvent(), event(), and TQKeyEvent. + +

TQWidget * TQWidget::keyboardGrabber () [static] +

+Returns the widget that is currently grabbing the keyboard input. +

If no widget in this application is currently grabbing the +keyboard, 0 is returned. +

See also grabMouse() and mouseGrabber(). + +

TQLayout * TQWidget::layout () const +

+ +

Returns the layout engine that manages the geometry of this +widget's children. +

If the widget does not have a layout, layout() returns 0. +

See also sizePolicy. + +

Examples: chart/optionsform.cpp and fonts/simple-qfont-demo/viewer.cpp. +

void TQWidget::leaveEvent ( TQEvent * ) [virtual protected] +

+This event handler can be reimplemented in a subclass to receive +widget leave events. +

A leave event is sent to the widget when the mouse cursor leaves +the widget. +

See also enterEvent(), mouseMoveEvent(), and event(). + +

void TQWidget::lower () [slot] +

+Lowers the widget to the bottom of the parent widget's stack. +

After this call the widget will be visually behind (and therefore +obscured by) any overlapping sibling widgets. +

See also raise() and stackUnder(). + +

bool TQWidget::macEvent ( MSG * ) [virtual protected] +

+This special event handler can be reimplemented in a subclass to +receive native Macintosh events. +

In your reimplementation of this function, if you want to stop the +event being handled by TQt, return TRUE. If you return FALSE, this +native event is passed back to TQt, which translates the event into +a TQt event and sends it to the widget. +

Warning: This function is not portable. +

See also TQApplication::macEventFilter(). + +

TQPoint TQWidget::mapFrom ( TQWidget * parent, const TQPoint & pos ) const +

+Translates the widget coordinate pos from the coordinate system +of parent to this widget's coordinate system. The parent +must not be 0 and must be a parent of the calling widget. +

See also mapTo(), mapFromParent(), mapFromGlobal(), and underMouse. + +

TQPoint TQWidget::mapFromGlobal ( const TQPoint & pos ) const +

+Translates the global screen coordinate pos to widget +coordinates. +

See also mapToGlobal(), mapFrom(), and mapFromParent(). + +

TQPoint TQWidget::mapFromParent ( const TQPoint & pos ) const +

+Translates the parent widget coordinate pos to widget +coordinates. +

Same as mapFromGlobal() if the widget has no parent. +

See also mapToParent(), mapFrom(), mapFromGlobal(), and underMouse. + +

TQPoint TQWidget::mapTo ( TQWidget * parent, const TQPoint & pos ) const +

+Translates the widget coordinate pos to the coordinate system +of parent. The parent must not be 0 and must be a parent +of the calling widget. +

See also mapFrom(), mapToParent(), mapToGlobal(), and underMouse. + +

TQPoint TQWidget::mapToGlobal ( const TQPoint & pos ) const +

+Translates the widget coordinate pos to global screen +coordinates. For example, mapToGlobal(TQPoint(0,0)) would give +the global coordinates of the top-left pixel of the widget. +

See also mapFromGlobal(), mapTo(), and mapToParent(). + +

Example: scribble/scribble.cpp. +

TQPoint TQWidget::mapToParent ( const TQPoint & pos ) const +

+Translates the widget coordinate pos to a coordinate in the +parent widget. +

Same as mapToGlobal() if the widget has no parent. +

See also mapFromParent(), mapTo(), mapToGlobal(), and underMouse. + +

int TQWidget::maximumHeight () const +

Returns the widget's maximum height. +See the "maximumHeight" property for details. +

TQSize TQWidget::maximumSize () const +

Returns the widget's maximum size. +See the "maximumSize" property for details. +

int TQWidget::maximumWidth () const +

Returns the widget's maximum width. +See the "maximumWidth" property for details. +

int TQWidget::metric ( int m ) const [virtual protected] +

+Internal implementation of the virtual TQPaintDevice::metric() +function. +

Use the TQPaintDeviceMetrics class instead. +

m is the metric to get. + +

TQRect TQWidget::microFocusHint () const +

Returns the currently set micro focus hint for this widget. +See the "microFocusHint" property for details. +

int TQWidget::minimumHeight () const +

Returns the widget's minimum height. +See the "minimumHeight" property for details. +

TQSize TQWidget::minimumSize () const +

Returns the widget's minimum size. +See the "minimumSize" property for details. +

TQSize TQWidget::minimumSizeHint () const [virtual] +

Returns the recommended minimum size for the widget. +See the "minimumSizeHint" property for details. +

Reimplemented in TQLineEdit. +

int TQWidget::minimumWidth () const +

Returns the widget's minimum width. +See the "minimumWidth" property for details. +

void TQWidget::mouseDoubleClickEvent ( TQMouseEvent * e ) [virtual protected] +

+This event handler, for event e, can be reimplemented in a +subclass to receive mouse double click events for the widget. +

The default implementation generates a normal mouse press event. +

Note that the widgets gets a mousePressEvent() and a +mouseReleaseEvent() before the mouseDoubleClickEvent(). +

See also mousePressEvent(), mouseReleaseEvent(), mouseMoveEvent(), event(), and TQMouseEvent. + +

TQWidget * TQWidget::mouseGrabber () [static] +

+Returns the widget that is currently grabbing the mouse input. +

If no widget in this application is currently grabbing the mouse, +0 is returned. +

See also grabMouse() and keyboardGrabber(). + +

void TQWidget::mouseMoveEvent ( TQMouseEvent * e ) [virtual protected] +

+This event handler, for event e, can be reimplemented in a +subclass to receive mouse move events for the widget. +

If mouse tracking is switched off, mouse move events only occur if +a mouse button is pressed while the mouse is being moved. If mouse +tracking is switched on, mouse move events occur even if no mouse +button is pressed. +

TQMouseEvent::pos() reports the position of the mouse cursor, +relative to this widget. For press and release events, the +position is usually the same as the position of the last mouse +move event, but it might be different if the user's hand shakes. +This is a feature of the underlying window system, not TQt. +

See also mouseTracking, mousePressEvent(), mouseReleaseEvent(), mouseDoubleClickEvent(), event(), and TQMouseEvent. + +

Examples: aclock/aclock.cpp, drawlines/connect.cpp, iconview/simple_dd/main.cpp, life/life.cpp, popup/popup.cpp, qmag/qmag.cpp, and scribble/scribble.cpp. +

Reimplemented in TQSizeGrip. +

void TQWidget::mousePressEvent ( TQMouseEvent * e ) [virtual protected] +

+This event handler, for event e, can be reimplemented in a +subclass to receive mouse press events for the widget. +

If you create new widgets in the mousePressEvent() the +mouseReleaseEvent() may not end up where you expect, depending on +the underlying window system (or X11 window manager), the widgets' +location and maybe more. +

The default implementation implements the closing of popup widgets +when you click outside the window. For other widget types it does +nothing. +

See also mouseReleaseEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), event(), and TQMouseEvent. + +

Examples: biff/biff.cpp, drawlines/connect.cpp, iconview/simple_dd/main.cpp, life/life.cpp, qmag/qmag.cpp, scribble/scribble.cpp, and tooltip/tooltip.cpp. +

Reimplemented in TQSizeGrip. +

void TQWidget::mouseReleaseEvent ( TQMouseEvent * e ) [virtual protected] +

+This event handler, for event e, can be reimplemented in a +subclass to receive mouse release events for the widget. +

See also mouseDoubleClickEvent(), mouseMoveEvent(), event(), and TQMouseEvent. + +

Examples: drawlines/connect.cpp, hello/hello.cpp, popup/popup.cpp, qmag/qmag.cpp, scribble/scribble.cpp, showimg/showimg.cpp, and t14/cannon.cpp. +

void TQWidget::move ( const TQPoint & ) [slot] +

Sets the position of the widget within its parent widget. +See the "pos" property for details. +

void TQWidget::move ( int x, int y ) [virtual slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This corresponds to move( TQPoint(x, y) ). + +

void TQWidget::moveEvent ( TQMoveEvent * ) [virtual protected] +

+This event handler can be reimplemented in a subclass to receive +widget move events. When the widget receives this event, it is +already at the new position. +

The old position is accessible through TQMoveEvent::oldPos(). +

See also resizeEvent(), event(), pos, and TQMoveEvent. + +

bool TQWidget::ownCursor () const +

Returns TRUE if the widget uses its own cursor; otherwise returns FALSE. +See the "ownCursor" property for details. +

bool TQWidget::ownFont () const +

Returns TRUE if the widget uses its own font; otherwise returns FALSE. +See the "ownFont" property for details. +

bool TQWidget::ownPalette () const +

Returns TRUE if the widget uses its own palette; otherwise returns FALSE. +See the "ownPalette" property for details. +

void TQWidget::paintEvent ( TQPaintEvent * ) [virtual protected] +

+This event handler can be reimplemented in a subclass to receive +paint events. +

A paint event is a request to repaint all or part of the widget. +It can happen as a result of repaint() or update(), or because the +widget was obscured and has now been uncovered, or for many other +reasons. +

Many widgets can simply repaint their entire surface when asked +to, but some slow widgets need to optimize by painting only the +requested region: TQPaintEvent::region(). This speed optimization +does not change the result, as painting is clipped to that region +during event processing. TQListView and TQCanvas do this, for +example. +

TQt also tries to speed up painting by merging multiple paint +events into one. When update() is called several times or the +window system sends several paint events, TQt merges these events +into one event with a larger region (see TQRegion::unite()). +repaint() does not permit this optimization, so we suggest using +update() when possible. +

When the paint event occurs, the update region has normally been +erased, so that you're painting on the widget's background. There +are a couple of exceptions and TQPaintEvent::erased() tells you +whether the widget has been erased or not. +

The background can be set using setBackgroundMode(), +setPaletteBackgroundColor() or setBackgroundPixmap(). The +documentation for setBackgroundMode() elaborates on the +background; we recommend reading it. +

See also event(), repaint(), update(), TQPainter, TQPixmap, and TQPaintEvent. + +

Examples: drawlines/connect.cpp, forever/forever.cpp, qmag/qmag.cpp, scribble/scribble.cpp, splitter/splitter.cpp, t8/cannon.cpp, and t9/cannon.cpp. +

Reimplemented in TQButton, TQFrame, TQGLWidget, TQSizeGrip, TQStatusBar, and TQTabBar. +

const TQPalette & TQWidget::palette () const +

Returns the widget's palette. +See the "palette" property for details. +

const TQColor & TQWidget::paletteBackgroundColor () const +

Returns the background color of the widget. +See the "paletteBackgroundColor" property for details. +

const TQPixmap * TQWidget::paletteBackgroundPixmap () const +

Returns the background pixmap of the widget. +See the "paletteBackgroundPixmap" property for details. +

void TQWidget::paletteChange ( const TQPalette & oldPalette ) [virtual protected] +

+ +

This virtual function is called from setPalette(). oldPalette +is the previous palette; you can get the new palette from +palette(). +

Reimplement this function if your widget needs to know when its +palette changes. +

See also palette and palette. + +

const TQColor & TQWidget::paletteForegroundColor () const +

Returns the foreground color of the widget. +See the "paletteForegroundColor" property for details. +

TQWidget * TQWidget::parentWidget ( bool sameWindow = FALSE ) const +

+ +

Returns the parent of this widget, or 0 if it does not have any +parent widget. If sameWindow is TRUE and the widget is top +level returns 0; otherwise returns the widget's parent. + +

Example: mdi/application.cpp. +

void TQWidget::polish () [virtual slot] +

+Delayed initialization of a widget. +

This function will be called after a widget has been fully +created and before it is shown the very first time. +

Polishing is useful for final initialization which depends on +having an instantiated widget. This is something a constructor +cannot guarantee since the initialization of the subclasses might +not be finished. +

After this function, the widget has a proper font and palette and +TQApplication::polish() has been called. +

Remember to call TQWidget's implementation first when reimplementing this +function to ensure that your program does not end up in infinite recursion. +

See also constPolish() and TQApplication::polish(). + +

Example: menu/menu.cpp. +

TQPoint TQWidget::pos () const +

Returns the position of the widget within its parent widget. +See the "pos" property for details. +

bool TQWidget::qwsEvent ( TQWSEvent * ) [virtual protected] +

+This special event handler can be reimplemented in a subclass to +receive native TQt/Embedded events. +

In your reimplementation of this function, if you want to stop the +event being handled by TQt, return TRUE. If you return FALSE, this +native event is passed back to TQt, which translates the event into +a TQt event and sends it to the widget. +

Warning: This function is not portable. +

See also TQApplication::qwsEventFilter(). + +

void TQWidget::raise () [slot] +

+Raises this widget to the top of the parent widget's stack. +

After this call the widget will be visually in front of any +overlapping sibling widgets. +

See also lower() and stackUnder(). + +

Example: showimg/showimg.cpp. +

void TQWidget::recreate ( TQWidget * parent, WFlags f, const TQPoint & p, bool showIt = FALSE ) +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This method is provided to aid porting from TQt 1.0 to 2.0. It has +been renamed reparent() in TQt 2.0. + +

TQRect TQWidget::rect () const +

Returns the internal geometry of the widget excluding any window frame. +See the "rect" property for details. +

void TQWidget::releaseKeyboard () +

+Releases the keyboard grab. +

See also grabKeyboard(), grabMouse(), and releaseMouse(). + +

void TQWidget::releaseMouse () +

+Releases the mouse grab. +

See also grabMouse(), grabKeyboard(), and releaseKeyboard(). + +

void TQWidget::repaint ( int x, int y, int w, int h, bool erase = TRUE ) [slot] +

+Repaints the widget directly by calling paintEvent() immediately, +unless updates are disabled or the widget is hidden. +

If erase is TRUE, TQt erases the area (x, y, w, h) before the +paintEvent() call. +

If w is negative, it is replaced with width() - x, and if +h is negative, it is replaced width height() - y. +

We suggest only using repaint() if you need an immediate repaint, +for example during animation. In almost all circumstances update() +is better, as it permits TQt to optimize for speed and minimize +flicker. +

Warning: If you call repaint() in a function which may itself be +called from paintEvent(), you may get infinite recursion. The +update() function never causes recursion. +

See also update(), paintEvent(), updatesEnabled, and erase(). + +

Example: qwerty/qwerty.cpp. +

void TQWidget::repaint () [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This version erases and repaints the entire widget. + +

void TQWidget::repaint ( bool erase ) [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This version repaints the entire widget. + +

void TQWidget::repaint ( const TQRect & r, bool erase = TRUE ) [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Repaints the widget directly by calling paintEvent() directly, +unless updates are disabled or the widget is hidden. +

Erases the widget region r if erase is TRUE. + +

void TQWidget::repaint ( const TQRegion & reg, bool erase = TRUE ) [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Repaints the widget directly by calling paintEvent() directly, +unless updates are disabled or the widget is hidden. +

Erases the widget region reg if erase is TRUE. +

Only use repaint if your widget needs to be repainted immediately, +for example when doing some animation. In all other cases, use +update(). Calling update() many times in a row will generate a +single paint event. +

Warning: If you call repaint() in a function which may itself be +called from paintEvent(), you may get infinite recursion. The +update() function never causes recursion. +

See also update(), paintEvent(), updatesEnabled, and erase(). + +

void TQWidget::reparent ( TQWidget * parent, WFlags f, const TQPoint & p, bool showIt = FALSE ) [virtual] +

+Reparents the widget. The widget gets a new parent, new widget +flags (f, but as usual, use 0) at a new position in its new +parent (p). +

If showIt is TRUE, show() is called once the widget has been +reparented. +

If the new parent widget is in a different top-level widget, the +reparented widget and its children are appended to the end of the +tab chain of the new parent +widget, in the same internal order as before. If one of the moved +widgets had keyboard focus, reparent() calls clearFocus() for that +widget. +

If the new parent widget is in the same top-level widget as the +old parent, reparent doesn't change the tab order or keyboard +focus. +

Warning: It is extremely unlikely that you will ever need this +function. If you have a widget that changes its content +dynamically, it is far easier to use TQWidgetStack or TQWizard. +

See also getWFlags(). + +

Example: toplevel/options.ui.h. +

void TQWidget::reparent ( TQWidget * parent, const TQPoint & p, bool showIt = FALSE ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

A convenience version of reparent that does not take widget flags +as argument. +

Calls reparent(parent, getWFlags() & ~WType_Mask, p, showIt). + +

void TQWidget::resetInputContext () [protected] +

+This function is called when the user finishes input composition, +e.g. changes focus to another widget, moves the cursor, etc. + +

void TQWidget::resize ( const TQSize & ) [slot] +

Sets the size of the widget excluding any window frame. +See the "size" property for details. +

void TQWidget::resize ( int w, int h ) [virtual slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This corresponds to resize( TQSize(w, h) ). + +

void TQWidget::resizeEvent ( TQResizeEvent * ) [virtual protected] +

+This event handler can be reimplemented in a subclass to receive +widget resize events. When resizeEvent() is called, the widget +already has its new geometry. The old size is accessible through +TQResizeEvent::oldSize(). +

The widget will be erased and receive a paint event immediately +after processing the resize event. No drawing need be (or should +be) done inside this handler. +

Widgets that have been created with the WNoAutoErase flag +will not be erased. Nevertheless, they will receive a paint event +for their entire area afterwards. Again, no drawing needs to be +done inside this handler. +

The default implementation calls updateMask() if the widget has +automatic masking enabled. +

See also moveEvent(), event(), size, TQResizeEvent, and paintEvent(). + +

Examples: drawdemo/drawdemo.cpp, menu/menu.cpp, qmag/qmag.cpp, scribble/scribble.cpp, showimg/showimg.cpp, tooltip/tooltip.cpp, and xform/xform.cpp. +

Reimplemented in TQFrame and TQGLWidget. +

void TQWidget::scroll ( int dx, int dy ) +

+Scrolls the widget including its children dx pixels to the +right and dy downwards. Both dx and dy may be negative. +

After scrolling, scroll() sends a paint event for the the part +that is read but not written. For example, when scrolling 10 +pixels rightwards, the leftmost ten pixels of the widget need +repainting. The paint event may be delivered immediately or later, +depending on some heuristics (note that you might have to force +processing of paint events using TQApplication::sendPostedEvents() +when using scroll() and move() in combination). +

See also TQScrollView, erase(), and bitBlt(). + +

void TQWidget::scroll ( int dx, int dy, const TQRect & r ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This version only scrolls r and does not move the children of +the widget. +

If r is empty or invalid, the result is undefined. +

See also TQScrollView, erase(), and bitBlt(). + +

void TQWidget::setAcceptDrops ( bool on ) [virtual] +

Sets whether drop events are enabled for this widget to on. +See the "acceptDrops" property for details. +

void TQWidget::setActiveWindow () [virtual] +

+Sets the top-level widget containing this widget to be the active +window. +

An active window is a visible top-level window that has the +keyboard input focus. +

This function performs the same operation as clicking the mouse on +the title bar of a top-level window. On X11, the result depends on +the Window Manager. If you want to ensure that the window is +stacked on top as well you should also call raise(). Note that the +window must be visible, otherwise setActiveWindow() has no effect. +

On Windows, if you are calling this when the application is not +currently the active one then it will not make it the active +window. It will flash the task bar entry blue to indicate that +the window has done something. This is because Microsoft do not +allow an application to interrupt what the user is currently doing +in another application. +

See also isActiveWindow, topLevelWidget(), and show(). + +

Reimplemented in TQXtWidget. +

void TQWidget::setAutoMask ( bool ) [virtual] +

Sets whether the auto mask feature is enabled for the widget. +See the "autoMask" property for details. +

void TQWidget::setBackgroundColor ( const TQColor & c ) [virtual] +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +Use setPaletteBackgroundColor() or setEraseColor() instead. +

Examples: customlayout/main.cpp, desktop/desktop.cpp, hello/main.cpp, movies/main.cpp, and splitter/splitter.cpp. +

void TQWidget::setBackgroundMode ( BackgroundMode ) [virtual] +

Sets the color role used for painting the background of the widget. +See the "backgroundMode" property for details. +

void TQWidget::setBackgroundMode ( BackgroundMode m, BackgroundMode visual ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the widget's own background mode to m and the visual +background mode to visual. The visual background mode is used +with the designable properties backgroundColor, foregroundColor and backgroundPixmap. +

For complex controls, the logical background mode sometimes +differs from a widget's own background mode. A spinbox for example +has PaletteBackground as background mode (typically dark gray), +while it's embedded lineedit control uses PaletteBase +(typically white). Since the lineedit covers most of the visual +area of a spinbox, it defines PaletteBase to be its visual +background mode. Changing the backgroundColor property thus +changes the lineedit control's background, which is exactly what +the user expects in TQt Designer. + +

void TQWidget::setBackgroundOrigin ( BackgroundOrigin ) [virtual] +

Sets the origin of the widget's background. +See the "backgroundOrigin" property for details. +

void TQWidget::setBackgroundPixmap ( const TQPixmap & pm ) [virtual] +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +Use setPaletteBackgroundPixmap() or setErasePixmap() instead. +

Example: desktop/desktop.cpp. +

void TQWidget::setBaseSize ( const TQSize & ) +

Sets the base size of the widget. +See the "baseSize" property for details. +

void TQWidget::setBaseSize ( int basew, int baseh ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This corresponds to setBaseSize( TQSize(basew, baseh) ). Sets +the widgets base size to width basew and height baseh. + +

void TQWidget::setCaption ( const TQString & ) [virtual slot] +

Sets the window caption (title). +See the "caption" property for details. +

void TQWidget::setCursor ( const TQCursor & ) [virtual] +

Sets the cursor shape for this widget. +See the "cursor" property for details. +

void TQWidget::setDisabled ( bool disable ) [slot] +

+Disables widget input events if disable is TRUE; otherwise +enables input events. +

See the enabled documentation for more information. +

See also isEnabledTo(), TQKeyEvent, TQMouseEvent, and enabledChange(). + +

void TQWidget::setEnabled ( bool ) [virtual slot] +

Sets whether the widget is enabled. +See the "enabled" property for details. +

void TQWidget::setEraseColor ( const TQColor & color ) [virtual] +

+Sets the erase color of the widget to color. +

The erase color is the color the widget is to be cleared to before +paintEvent() is called. If there is an erase pixmap (set using +setErasePixmap()), then this property has an indeterminate value. +

See also erasePixmap(), backgroundColor(), backgroundMode, and palette. + +

void TQWidget::setErasePixmap ( const TQPixmap & pixmap ) [virtual] +

+Sets the widget's erase pixmap to pixmap. +

This pixmap is used to clear the widget before paintEvent() is +called. + +

void TQWidget::setFixedHeight ( int h ) +

+Sets both the minimum and maximum heights of the widget to h +without changing the widths. Provided for convenience. +

See also sizeHint, minimumSize, maximumSize, and setFixedSize(). + +

Examples: fonts/simple-qfont-demo/viewer.cpp, layout/layout.cpp, qdir/qdir.cpp, and showimg/showimg.cpp. +

void TQWidget::setFixedSize ( const TQSize & s ) +

+Sets both the minimum and maximum sizes of the widget to s, +thereby preventing it from ever growing or shrinking. +

See also maximumSize and minimumSize. + +

void TQWidget::setFixedSize ( int w, int h ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the width of the widget to w and the height to h. + +

void TQWidget::setFixedWidth ( int w ) +

+Sets both the minimum and maximum width of the widget to w +without changing the heights. Provided for convenience. +

See also sizeHint, minimumSize, maximumSize, and setFixedSize(). + +

Examples: progressbar/progressbar.cpp and qdir/qdir.cpp. +

void TQWidget::setFocus () [virtual slot] +

+Gives the keyboard input focus to this widget (or its focus +proxy) if this widget or one of its parents is the active window. +

First, a focus out event is sent to the focus widget (if any) to +tell it that it is about to lose the focus. Then a focus in event +is sent to this widget to tell it that it just received the focus. +(Nothing happens if the focus in and focus out widgets are the +same.) +

setFocus() gives focus to a widget regardless of its focus policy, +but does not clear any keyboard grab (see grabKeyboard()). +

Be aware that if the widget is hidden, it will not accept focus. +

Warning: If you call setFocus() in a function which may itself be +called from focusOutEvent() or focusInEvent(), you may get an +infinite recursion. +

See also focus, clearFocus(), focusInEvent(), focusOutEvent(), focusPolicy, TQApplication::focusWidget(), grabKeyboard(), and grabMouse(). + +

Examples: addressbook/centralwidget.cpp, lineedits/lineedits.cpp, mdi/application.cpp, popup/popup.cpp, rot13/rot13.cpp, t8/main.cpp, and wizard/wizard.cpp. +

void TQWidget::setFocusPolicy ( FocusPolicy ) [virtual] +

Sets the way the widget accepts keyboard focus. +See the "focusPolicy" property for details. +

void TQWidget::setFocusProxy ( TQWidget * w ) [virtual] +

+Sets the widget's focus proxy to widget w. If w is 0, the +function resets this widget to have no focus proxy. +

Some widgets, such as TQComboBox, can "have focus", but create a +child widget to actually handle the focus. TQComboBox, for example, +creates a TQLineEdit which handles the focus. +

setFocusProxy() sets the widget which will actually get focus when +"this widget" gets it. If there is a focus proxy, focusPolicy(), +setFocusPolicy(), setFocus() and hasFocus() all operate on the +focus proxy. +

See also focusProxy(). + +

void TQWidget::setFont ( const TQFont & ) [virtual] +

Sets the font currently set for the widget. +See the "font" property for details. +

Reimplemented in TQComboBox, TQLabel, and TQTabDialog. +

void TQWidget::setFont ( const TQFont & f, bool ) +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Use setFont(const TQFont& font) instead. + +

void TQWidget::setGeometry ( const TQRect & ) [virtual slot] +

Sets the geometry of the widget relative to its parent and excluding the window frame. +See the "geometry" property for details. +

void TQWidget::setGeometry ( int x, int y, int w, int h ) [virtual slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This corresponds to setGeometry( TQRect(x, y, w, h) ). + +

void TQWidget::setHidden ( bool hide ) [slot] +

Sets whether the widget is explicitly hidden to hide. +See the "hidden" property for details. +

void TQWidget::setIcon ( const TQPixmap & ) [virtual slot] +

Sets the widget's icon. +See the "icon" property for details. +

void TQWidget::setIconText ( const TQString & ) [virtual slot] +

Sets the widget's icon text. +See the "iconText" property for details. +

void TQWidget::setInputMethodEnabled ( bool b ) +

Sets enables or disables the use of input methods for this widget to b. +See the "inputMethodEnabled" property for details. +

void TQWidget::setKeyCompression ( bool compress ) [virtual protected] +

+Enables key event compression, if compress is TRUE, and +disables it if compress is FALSE. +

Key compression is off by default (except for TQLineEdit and +TQTextEdit), so widgets receive one key press event for each key +press (or more, since autorepeat is usually on). If you turn it on +and your program doesn't keep up with key input, TQt may try to +compress key events so that more than one character can be +processed in each event. +

For example, a word processor widget might receive 2, 3 or more +characters in each TQKeyEvent::text(), if the layout recalculation +takes too long for the CPU. +

If a widget supports multiple character unicode input, it is +always safe to turn the compression on. +

TQt performs key event compression only for printable characters. +Modifier keys, cursor movement keys, function keys and +miscellaneous action keys (e.g. Escape, Enter, Backspace, +PrintScreen) will stop key event compression, even if there are +more compressible key events available. +

Not all platforms support this compression, in which case turning +it on will have no effect. +

See also TQKeyEvent::text(). + +

void TQWidget::setMask ( const TQBitmap & bitmap ) [virtual] +

+Causes only the pixels of the widget for which bitmap has a +corresponding 1 bit to be visible. Use TQt::color0 to draw +transparent regions and TQt::color1 to draw opaque regions of the +bitmap. +

If the region includes pixels outside the rect() of the widget, +window system controls in that area may or may not be visible, +depending on the platform. +

Note that this effect can be slow if the region is particularly +complex. +

See examples/tux for an example of masking for transparency. +

See also clearMask(). + +

void TQWidget::setMask ( const TQRegion & region ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Causes only the parts of the widget which overlap region to be +visible. If the region includes pixels outside the rect() of the +widget, window system controls in that area may or may not be +visible, depending on the platform. +

Note that this effect can be slow if the region is particularly +complex. +

See also clearMask(). + +

void TQWidget::setMaximumHeight ( int maxh ) +

Sets the widget's maximum height to maxh. +See the "maximumHeight" property for details. +

void TQWidget::setMaximumSize ( const TQSize & ) +

Sets the widget's maximum size. +See the "maximumSize" property for details. +

void TQWidget::setMaximumSize ( int maxw, int maxh ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function corresponds to setMaximumSize( TQSize(maxw, maxh) ). Sets the maximum width to maxw and the maximum height +to maxh. + +

void TQWidget::setMaximumWidth ( int maxw ) +

Sets the widget's maximum width to maxw. +See the "maximumWidth" property for details. +

void TQWidget::setMicroFocusHint ( int x, int y, int width, int height, bool text = TRUE, TQFont * f = 0 ) [virtual protected] +

+When a widget gets focus, it should call setMicroFocusHint() with +some appropriate position and size, x, y, width and height. This has no visual effect, it just provides hints to +any system-specific input handling tools. +

The text argument should be TRUE if this is a position for text +input. +

In the Windows version of TQt, this method sets the system caret, +which is used for user Accessibility focus handling. If text +is TRUE, it also sets the IME composition window in Far East Asian +language input systems. +

In the X11 version of TQt, if text is TRUE, this method sets the +XIM "spot" point for complex language input handling. +

The font f is a rendering hint to the currently active input method. +If f is 0 the widget's font is used. +

See also microFocusHint. + +

void TQWidget::setMinimumHeight ( int minh ) +

Sets the widget's minimum height to minh. +See the "minimumHeight" property for details. +

void TQWidget::setMinimumSize ( const TQSize & ) +

Sets the widget's minimum size. +See the "minimumSize" property for details. +

void TQWidget::setMinimumSize ( int minw, int minh ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This function corresponds to setMinimumSize( TQSize(minw, minh) ). +Sets the minimum width to minw and the minimum height to minh. + +

void TQWidget::setMinimumWidth ( int minw ) +

Sets the widget's minimum width to minw. +See the "minimumWidth" property for details. +

void TQWidget::setMouseTracking ( bool enable ) [virtual slot] +

Sets whether mouse tracking is enabled for the widget to enable. +See the "mouseTracking" property for details. +

void TQWidget::setPalette ( const TQPalette & ) [virtual] +

Sets the widget's palette. +See the "palette" property for details. +

Reimplemented in TQComboBox, TQScrollBar, and TQSlider. +

void TQWidget::setPalette ( const TQPalette & p, bool ) +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Use setPalette( const TQPalette& p ) instead. + +

void TQWidget::setPaletteBackgroundColor ( const TQColor & ) [virtual] +

Sets the background color of the widget. +See the "paletteBackgroundColor" property for details. +

void TQWidget::setPaletteBackgroundPixmap ( const TQPixmap & ) [virtual] +

Sets the background pixmap of the widget. +See the "paletteBackgroundPixmap" property for details. +

void TQWidget::setPaletteForegroundColor ( const TQColor & ) +

Sets the foreground color of the widget. +See the "paletteForegroundColor" property for details. +

void TQWidget::setShown ( bool show ) [slot] +

Sets whether the widget is shown to show. +See the "shown" property for details. +

void TQWidget::setSizeIncrement ( const TQSize & ) +

Sets the size increment of the widget. +See the "sizeIncrement" property for details. +

void TQWidget::setSizeIncrement ( int w, int h ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the x (width) size increment to w and the y (height) size +increment to h. + +

void TQWidget::setSizePolicy ( TQSizePolicy ) [virtual] +

Sets the default layout behavior of the widget. +See the "sizePolicy" property for details. +

void TQWidget::setSizePolicy ( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw = FALSE ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the size policy of the widget to hor, ver and hfw +(height for width). +

See also TQSizePolicy::TQSizePolicy(). + +

void TQWidget::setStyle ( TQStyle * style ) +

+Sets the widget's GUI style to style. Ownership of the style +object is not transferred. +

If no style is set, the widget uses the application's style, +TQApplication::style() instead. +

Setting a widget's style has no effect on existing or future child +widgets. +

Warning: This function is particularly useful for demonstration +purposes, where you want to show TQt's styling capabilities. Real +applications should avoid it and use one consistent GUI style +instead. +

See also style(), TQStyle, TQApplication::style(), and TQApplication::setStyle(). + +

Examples: grapher/grapher.cpp and progressbar/progressbar.cpp. +

TQStyle * TQWidget::setStyle ( const TQString & style ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the widget's GUI style to style using the TQStyleFactory. + +

void TQWidget::setTabOrder ( TQWidget * first, TQWidget * second ) [static] +

+Moves the second widget around the ring of focus widgets so +that keyboard focus moves from the first widget to the second widget when the Tab key is pressed. +

Note that since the tab order of the second widget is changed, +you should order a chain like this: +

+        setTabOrder( a, b ); // a to b
+        setTabOrder( b, c ); // a to b to c
+        setTabOrder( c, d ); // a to b to c to d
+    
+ +

not like this: +

+        setTabOrder( c, d ); // c to d   WRONG
+        setTabOrder( a, b ); // a to b AND c to d
+        setTabOrder( b, c ); // a to b to c, but not c to d
+    
+ +

If first or second has a focus proxy, setTabOrder() +correctly substitutes the proxy. +

See also focusPolicy and setFocusProxy(). + +

Example: customlayout/main.cpp. +

void TQWidget::setUpdatesEnabled ( bool enable ) [virtual slot] +

Sets whether updates are enabled to enable. +See the "updatesEnabled" property for details. +

void TQWidget::setWFlags ( WFlags f ) [virtual protected] +

+ +

Sets the widget flags f. +

Widget flags are a combination of TQt::WidgetFlags. +

See also testWFlags(), getWFlags(), and clearWFlags(). + +

void TQWidget::setWindowOpacity ( double level ) +

Sets the level of opacity for the window to level. +See the "windowOpacity" property for details. +

void TQWidget::setWindowState ( uint windowState ) +

+ +

Sets the window state to windowState. The window state is a OR'ed +combination of TQt::WindowState: WindowMinimized, WindowMaximized, WindowFullScreen and WindowActive. +

If the window is not visible (i.e. isVisible() returns FALSE), the +window state will take effect when show() is called. For visible +windows, the change is immediate. For example, to toggle between +full-screen and mormal mode, use the following code: +

+        w->setWindowState(w->windowState() ^ WindowFullScreen);
+  
+ +

In order to restore and activate a minimized window (while +preserving its maximized and/or full-screen state), use the following: +

+        w->setWindowState(w->windowState() & ~WindowMinimized | WindowActive);
+  
+ +

Note: On some window systems WindowActive is not immediate, and may be +ignored in certain cases. +

See also TQt::WindowState and windowState(). + +

void TQWidget::show () [virtual slot] +

+Shows the widget and its child widgets. +

If its size or position has changed, TQt guarantees that a widget +gets move and resize events just before it is shown. +

You almost never have to reimplement this function. If you need to +change some settings before a widget is shown, use showEvent() +instead. If you need to do some delayed initialization use +polish(). +

See also showEvent(), hide(), showMinimized(), showMaximized(), showNormal(), visible, and polish(). + +

Examples: aclock/main.cpp, life/main.cpp, popup/popup.cpp, t1/main.cpp, t3/main.cpp, t4/main.cpp, and toplevel/options.ui.h. +

Reimplemented in TQDialog and TQMenuBar. +

void TQWidget::showEvent ( TQShowEvent * ) [virtual protected] +

+This event handler can be reimplemented in a subclass to receive +widget show events. +

Non-spontaneous show events are sent to widgets immediately before +they are shown. The spontaneous show events of top-level widgets +are delivered afterwards. +

See also event() and TQShowEvent. + +

Example: qdir/qdir.cpp. +

void TQWidget::showFullScreen () [slot] +

+Shows the widget in full-screen mode. +

Calling this function only affects top-level widgets. +

To return from full-screen mode, call showNormal(). +

Full-screen mode works fine under Windows, but has certain +problems under X. These problems are due to limitations of the +ICCCM protocol that specifies the communication between X11 +clients and the window manager. ICCCM simply does not understand +the concept of non-decorated full-screen windows. Therefore, the +best we can do is to request a borderless window and place and +resize it to fill the entire screen. Depending on the window +manager, this may or may not work. The borderless window is +requested using MOTIF hints, which are at least partially +supported by virtually all modern window managers. +

An alternative would be to bypass the window manager entirely and +create a window with the WX11BypassWM flag. This has other severe +problems though, like totally broken keyboard focus and very +strange effects on desktop changes or when the user raises other +windows. +

X11 window managers that follow modern post-ICCCM specifications +support full-screen mode properly. +

See also showNormal(), showMaximized(), show(), hide(), and visible. + +

void TQWidget::showMaximized () [virtual slot] +

+Shows the widget maximized. +

Calling this function only affects top-level + widgets. +

On X11, this function may not work properly with certain window +managers. See the Window Geometry + documentation for an explanation. +

See also setWindowState(), showNormal(), showMinimized(), show(), hide(), and visible. + +

Examples: canvas/main.cpp, helpviewer/main.cpp, mdi/application.cpp, qwerty/main.cpp, qwerty/qwerty.cpp, and scribble/main.cpp. +

void TQWidget::showMinimized () [virtual slot] +

+Shows the widget minimized, as an icon. +

Calling this function only affects top-level + widgets. +

See also showNormal(), showMaximized(), show(), hide(), visible, and minimized. + +

void TQWidget::showNormal () [virtual slot] +

+Restores the widget after it has been maximized or minimized. +

Calling this function only affects top-level + widgets. +

See also setWindowState(), showMinimized(), showMaximized(), show(), hide(), and visible. + +

Example: mdi/application.cpp. +

TQSize TQWidget::size () const +

Returns the size of the widget excluding any window frame. +See the "size" property for details. +

TQSize TQWidget::sizeHint () const [virtual] +

Returns the recommended size for the widget. +See the "sizeHint" property for details. +

Reimplemented in TQSizeGrip. +

TQSize TQWidget::sizeIncrement () const +

Returns the size increment of the widget. +See the "sizeIncrement" property for details. +

TQSizePolicy TQWidget::sizePolicy () const [virtual] +

Returns the default layout behavior of the widget. +See the "sizePolicy" property for details. +

void TQWidget::stackUnder ( TQWidget * w ) [slot] +

+Places the widget under w in the parent widget's stack. +

To make this work, the widget itself and w must be siblings. +

See also raise() and lower(). + +

TQStyle & TQWidget::style () const +

+Returns the GUI style for this widget +

See also TQWidget::setStyle(), TQApplication::setStyle(), and TQApplication::style(). + +

void TQWidget::styleChange ( TQStyle & oldStyle ) [virtual protected] +

+This virtual function is called when the style of the widgets +changes. oldStyle is the previous GUI style; you can get the +new style from style(). +

Reimplement this function if your widget needs to know when its +GUI style changes. You will almost certainly need to update the +widget using update(). +

The default implementation updates the widget including its +geometry. +

See also TQApplication::setStyle(), style(), update(), and updateGeometry(). + +

void TQWidget::tabletEvent ( TQTabletEvent * e ) [virtual protected] +

+This event handler, for event e, can be reimplemented in a +subclass to receive tablet events for the widget. +

If you reimplement this handler, it is very important that you +ignore() the event if you do not handle +it, so that the widget's parent can interpret it. +

The default implementation ignores the event. +

See also TQTabletEvent::ignore(), TQTabletEvent::accept(), event(), and TQTabletEvent. + +

WFlags TQWidget::testWFlags ( WFlags f ) const +

+ +

Returns the bitwise AND of the widget flags and f. +

Widget flags are a combination of TQt::WidgetFlags. +

If you want to test for the presence of multiple flags (or +composite flags such as WStyle_Splash), test the +return value for equality against the argument. For example: +

+    int flags = WStyle_Tool | WStyle_NoBorder;
+    if ( testWFlags(flags) )
+        ... // WStyle_Tool or WStyle_NoBorder or both are set
+    if ( testWFlags(flags) == flags )
+        ... // both WStyle_Tool and WStyle_NoBorder are set
+    
+ +

See also getWFlags(), setWFlags(), and clearWFlags(). + +

TQWidget * TQWidget::topLevelWidget () const +

+Returns the top-level widget for this widget, i.e. the next +ancestor widget that has (or could have) a window-system frame. +

If the widget is a top-level, the widget itself is returned. +

Typical usage is changing the window caption: +

+        aWidget->topLevelWidget()->setCaption( "New Caption" );
+    
+ +

See also isTopLevel. + +

void TQWidget::unsetCursor () [virtual] +

Resets the cursor shape for this widget. +See the "cursor" property for details. +

void TQWidget::unsetFont () +

Resets the font currently set for the widget. +See the "font" property for details. +

void TQWidget::unsetPalette () +

Resets the widget's palette. +See the "palette" property for details. +

void TQWidget::update () [slot] +

+Updates the widget unless updates are disabled or the widget is +hidden. +

This function does not cause an immediate repaint; instead it +schedules a paint event for processing when TQt returns to the main +event loop. This permits TQt to optimize for more speed and less +flicker than a call to repaint() does. +

Calling update() several times normally results in just one +paintEvent() call. +

TQt normally erases the widget's area before the paintEvent() call. +If the WRepaintNoErase widget flag is set, the widget is +responsible for painting all its pixels itself. +

See also repaint(), paintEvent(), updatesEnabled, erase(), and setWFlags(). + +

Examples: desktop/desktop.cpp and scrollview/scrollview.cpp. +

void TQWidget::update ( int x, int y, int w, int h ) [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Updates a rectangle (x, y, w, h) inside the widget +unless updates are disabled or the widget is hidden. +

This function does not cause an immediate repaint; instead it +schedules a paint event for processing when TQt returns to the main +event loop. This permits TQt to optimize for more speed and less +flicker and a call to repaint() does. +

Calling update() several times normally results in just one +paintEvent() call. +

If w is negative, it is replaced with width() - x. If h +is negative, it is replaced width height() - y. +

TQt normally erases the specified area before the paintEvent() +call. If the WRepaintNoErase widget flag is set, the widget is +responsible for painting all its pixels itself. +

See also repaint(), paintEvent(), updatesEnabled, and erase(). + +

void TQWidget::update ( const TQRect & r ) [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Updates a rectangle r inside the widget unless updates are +disabled or the widget is hidden. +

This function does not cause an immediate repaint; instead it +schedules a paint event for processing when TQt returns to the main +event loop. This permits TQt to optimize for more speed and less +flicker and a call to repaint() does. +

Calling update() several times normally results in just one +paintEvent() call. + +

void TQWidget::updateGeometry () +

+Notifies the layout system that this widget has changed and may +need to change geometry. +

Call this function if the sizeHint() or sizePolicy() have changed. +

For explicitly hidden widgets, updateGeometry() is a no-op. The +layout system will be notified as soon as the widget is shown. + +

void TQWidget::updateMask () [virtual protected] +

+This function can be reimplemented in a subclass to support +transparent widgets. It should be called whenever a widget changes +state in a way that means that the shape mask must be recalculated. +

See also autoMask, setMask(), and clearMask(). + +

TQRect TQWidget::visibleRect () const +

Returns the visible rectangle. +See the "visibleRect" property for details. +

void TQWidget::wheelEvent ( TQWheelEvent * e ) [virtual protected] +

+This event handler, for event e, can be reimplemented in a +subclass to receive wheel events for the widget. +

If you reimplement this handler, it is very important that you +ignore() the event if you do not handle +it, so that the widget's parent can interpret it. +

The default implementation ignores the event. +

See also TQWheelEvent::ignore(), TQWheelEvent::accept(), event(), and TQWheelEvent. + +

int TQWidget::width () const +

Returns the width of the widget excluding any window frame. +See the "width" property for details. +

bool TQWidget::winEvent ( MSG * ) [virtual protected] +

+This special event handler can be reimplemented in a subclass to +receive native Windows events. +

In your reimplementation of this function, if you want to stop the +event being handled by TQt, return TRUE. If you return FALSE, this +native event is passed back to TQt, which translates the event into +a TQt event and sends it to the widget. +

Warning: This function is not portable. +

See also TQApplication::winEventFilter(). + +

WId TQWidget::winId () const +

+ +

Returns the window system identifier of the widget. +

Portable in principle, but if you use it you are probably about to +do something non-portable. Be careful. +

See also find(). + +

void TQWidget::windowActivationChange ( bool oldActive ) [virtual protected] +

+ +

This virtual function is called for a widget when its window is +activated or deactivated by the window system. oldActive is the +previous state; you can get the new setting from isActiveWindow(). +

Reimplement this function if your widget needs to know when its +window becomes activated or deactivated. +

The default implementation updates the visible part of the widget +if the inactive and the active colorgroup are different for colors +other than the highlight and link colors. +

See also setActiveWindow(), isActiveWindow, update(), and palette. + +

double TQWidget::windowOpacity () const +

Returns the level of opacity for the window. +See the "windowOpacity" property for details. +

uint TQWidget::windowState () const +

Returns the current window state. The window state is a OR'ed +combination of TQt::WindowState: WindowMinimized, WindowMaximized, WindowFullScreen and WindowActive. +

See also TQt::WindowState and setWindowState(). + +

int TQWidget::x () const +

Returns the x coordinate of the widget relative to its parent including any window frame. +See the "x" property for details. +

bool TQWidget::x11Event ( XEvent * ) [virtual protected] +

+This special event handler can be reimplemented in a subclass to +receive native X11 events. +

In your reimplementation of this function, if you want to stop the +event being handled by TQt, return TRUE. If you return FALSE, this +native event is passed back to TQt, which translates the event into +a TQt event and sends it to the widget. +

Warning: This function is not portable. +

See also TQApplication::x11EventFilter(). + +

Reimplemented in TQXtWidget. +

int TQWidget::y () const +

Returns the y coordinate of the widget relative to its parent and including any window frame. +See the "y" property for details. +


Property Documentation

+

bool acceptDrops

+

This property holds whether drop events are enabled for this widget. +

Setting this property to TRUE announces to the system that this +widget may be able to accept drop events. +

If the widget is the desktop (TQWidget::isDesktop()), this may +fail if another application is using the desktop; you can call +acceptDrops() to test if this occurs. +

Warning: +Do not modify this property in a Drag&Drop event handler. + +

Set this property's value with setAcceptDrops() and get this property's value with acceptDrops(). +

bool autoMask

+

This property holds whether the auto mask feature is enabled for the widget. +

Transparent widgets use a mask to define their visible region. +TQWidget has some built-in support to make the task of +recalculating the mask easier. When setting auto mask to TRUE, +updateMask() will be called whenever the widget is resized or +changes its focus state. Note that you must reimplement +updateMask() (which should include a call to setMask()) or nothing +will happen. +

Note: when you re-implement resizeEvent(), focusInEvent() or +focusOutEvent() in your custom widgets and still want to ensure +that the auto mask calculation works, you should add: +

+        if ( autoMask() )
+            updateMask();
+    
+ +

at the end of your event handlers. This is true for all member +functions that change the appearance of the widget in a way that +retquires a recalculation of the mask. +

While being a technically appealing concept, masks have a big +drawback: when using complex masks that cannot be expressed easily +with relatively simple regions, they can be very slow on some +window systems. The classic example is a transparent label. The +complex shape of its contents makes it necessary to represent its +mask by a bitmap, which consumes both memory and time. If all you +want is to blend the background of several neighboring widgets +together seamlessly, you will probably want to use +setBackgroundOrigin() rather than a mask. +

See also updateMask(), setMask(), clearMask(), and backgroundOrigin. + +

Set this property's value with setAutoMask() and get this property's value with autoMask(). +

TQBrush backgroundBrush

+

This property holds the widget's background brush. +

The background brush depends on a widget's palette and its +background mode. +

See also backgroundColor(), backgroundPixmap(), eraseColor(), palette, and TQApplication::setPalette(). + +

Get this property's value with backgroundBrush(). +

BackgroundMode backgroundMode

+

This property holds the color role used for painting the background of the widget. +

setPaletteBackgroundColor() reads this property to determine which +entry of the palette to set. +

For most widgets the default suffices (PaletteBackground, +typically gray), but some need to use PaletteBase (the +background color for text output, typically white) or another +role. +

TQListBox, which is "sunken" and uses the base color to contrast +with its environment, does this in its constructor: +

+    setBackgroundMode( PaletteBase );
+    
+ +

You will never need to set the background mode of a built-in +widget in TQt, but you might consider setting it in your custom +widgets, so that setPaletteBackgroundColor() works as expected. +

Note that two of the BackgroundMode values make no sense for +setBackgroundMode(), namely FixedPixmap and FixedColor. You +must call setBackgroundPixmap() and setPaletteBackgroundColor() +instead. + +

Set this property's value with setBackgroundMode() and get this property's value with backgroundMode(). +

BackgroundOrigin backgroundOrigin

+

This property holds the origin of the widget's background. +

The origin is either WidgetOrigin (the default), ParentOrigin, +WindowOrigin or AncestorOrigin. +

This only makes a difference if the widget has a background +pixmap, in which case positioning matters. Using WindowOrigin +for several neighboring widgets makes the background blend +together seamlessly. AncestorOrigin allows blending backgrounds +seamlessly when an ancestor of the widget has an origin other than +WindowOrigin. +

See also backgroundPixmap() and backgroundMode. + +

Set this property's value with setBackgroundOrigin() and get this property's value with backgroundOrigin(). +

TQSize baseSize

+

This property holds the base size of the widget. +

The base size is used to calculate a proper widget size if the +widget defines sizeIncrement(). +

See also sizeIncrement. + +

Set this property's value with setBaseSize() and get this property's value with baseSize(). +

TQString caption

+

This property holds the window caption (title). +

This property only makes sense for top-level widgets. If no +caption has been set, the caption is TQString::null. +

See also icon and iconText. + +

Set this property's value with setCaption() and get this property's value with caption(). +

TQRect childrenRect

+

This property holds the bounding rectangle of the widget's children. +

Hidden children are excluded. +

See also childrenRegion and geometry. + +

Get this property's value with childrenRect(). +

TQRegion childrenRegion

+

This property holds the combined region occupied by the widget's children. +

Hidden children are excluded. +

See also childrenRect and geometry. + +

Get this property's value with childrenRegion(). +

TQColorGroup colorGroup

+

This property holds the current color group of the widget palette. +

The color group is determined by the state of the widget. A +disabled widget has the TQPalette::disabled() color group, a widget +with keyboard focus has the TQPalette::active() color group, and an +inactive widget has the TQPalette::inactive() color group. +

See also palette. + +

Get this property's value with colorGroup(). +

TQCursor cursor

+

This property holds the cursor shape for this widget. +

The mouse cursor will assume this shape when it's over this +widget. See the list of predefined cursor + objects for a range of useful shapes. +

An editor widget might use an I-beam cursor: +

+        setCursor( IbeamCursor );
+    
+ +

If no cursor has been set, or after a call to unsetCursor(), the +parent's cursor is used. The function unsetCursor() has no effect +on top-level widgets. +

See also TQApplication::setOverrideCursor(). + +

Set this property's value with setCursor(), get this property's value with cursor(), and reset this property's value with unsetCursor(). +

bool customWhatsThis

+

This property holds whether the widget wants to handle What's This help manually. +

The default implementation of customWhatsThis() returns FALSE, +which means the widget will not receive any events in Whats This +mode. +

The widget may leave What's This mode by calling +TQWhatsThis::leaveWhatsThisMode(), with or without actually +displaying any help text. +

You can also reimplement customWhatsThis() if your widget is a +"passive interactor" supposed to work under all circumstances. +Simply don't call TQWhatsThis::leaveWhatsThisMode() in that case. +

See also TQWhatsThis::inWhatsThisMode() and TQWhatsThis::leaveWhatsThisMode(). + +

Get this property's value with customWhatsThis(). +

bool enabled

+

This property holds whether the widget is enabled. +

An enabled widget receives keyboard and mouse events; a disabled +widget does not. In fact, an enabled widget only receives keyboard +events when it is in focus. +

Some widgets display themselves differently when they are +disabled. For example a button might draw its label grayed out. If +your widget needs to know when it becomes enabled or disabled, you +can reimplement the enabledChange() function. +

Disabling a widget implicitly disables all its children. Enabling +respectively enables all child widgets unless they have been +explicitly disabled. +

See also enabled, isEnabledTo(), TQKeyEvent, TQMouseEvent, and enabledChange(). + +

Set this property's value with setEnabled() and get this property's value with isEnabled(). +

bool focus

+

This property holds whether this widget (or its focus proxy) has the keyboard input focus. +

Effectively equivalent to qApp->focusWidget() == this. +

See also setFocus(), clearFocus(), focusPolicy, and TQApplication::focusWidget(). + +

Get this property's value with hasFocus(). +

bool focusEnabled

+

This property holds whether the widget accepts keyboard focus. +

Keyboard focus is initially disabled (i.e. focusPolicy() == +TQWidget::NoFocus). +

You must enable keyboard focus for a widget if it processes +keyboard events. This is normally done from the widget's +constructor. For instance, the TQLineEdit constructor calls +setFocusPolicy(TQWidget::StrongFocus). +

See also focusPolicy, focusInEvent(), focusOutEvent(), keyPressEvent(), keyReleaseEvent(), and enabled. + +

Get this property's value with isFocusEnabled(). +

FocusPolicy focusPolicy

+

This property holds the way the widget accepts keyboard focus. +

The policy is TQWidget::TabFocus if the widget accepts keyboard +focus by tabbing, TQWidget::ClickFocus if the widget accepts +focus by clicking, TQWidget::StrongFocus if it accepts both, and +TQWidget::NoFocus (the default) if it does not accept focus at +all. +

You must enable keyboard focus for a widget if it processes +keyboard events. This is normally done from the widget's +constructor. For instance, the TQLineEdit constructor calls +setFocusPolicy(TQWidget::StrongFocus). +

See also focusEnabled, focusInEvent(), focusOutEvent(), keyPressEvent(), keyReleaseEvent(), and enabled. + +

Set this property's value with setFocusPolicy() and get this property's value with focusPolicy(). +

TQFont font

+

This property holds the font currently set for the widget. +

The fontInfo() function reports the actual font that is being used +by the widget. +

As long as no special font has been set, or after unsetFont() is +called, this is either a special font for the widget class, the +parent's font or (if this widget is a top level widget), the +default application font. +

This code fragment sets a 12 point helvetica bold font: +

+    TQFont f( "Helvetica", 12, TQFont::Bold );
+    setFont( f );
+    
+ +

In addition to setting the font, setFont() informs all children +about the change. +

See also fontChange(), fontInfo(), fontMetrics(), and ownFont. + +

Set this property's value with setFont(), get this property's value with font(), and reset this property's value with unsetFont(). +

TQRect frameGeometry

+

This property holds geometry of the widget relative to its parent including any window frame. +

See the Window Geometry documentation +for an overview of geometry issues with top-level widgets. +

See also geometry, x, y, and pos. + +

Get this property's value with frameGeometry(). +

TQSize frameSize

+

This property holds the size of the widget including any window frame. +

+

Get this property's value with frameSize(). +

bool fullScreen

+

This property holds whether the widget is full screen. +

Get this property's value with isFullScreen(). +

See also windowState(), minimized, and maximized. + +

TQRect geometry

+

This property holds the geometry of the widget relative to its parent and excluding the window frame. +

When changing the geometry, the widget, if visible, receives a +move event (moveEvent()) and/or a resize event (resizeEvent()) +immediately. If the widget is not currently visible, it is +guaranteed to receive appropriate events before it is shown. +

The size component is adjusted if it lies outside the range +defined by minimumSize() and maximumSize(). +

setGeometry() is virtual, and all other overloaded setGeometry() +implementations in TQt call it. +

Warning: Calling setGeometry() inside resizeEvent() or moveEvent() +can lead to infinite recursion. +

See the Window Geometry documentation +for an overview of top-level widget geometry. +

See also frameGeometry, rect, pos, size, moveEvent(), resizeEvent(), minimumSize, and maximumSize. + +

Set this property's value with setGeometry() and get this property's value with geometry(). +

int height

+

This property holds the height of the widget excluding any window frame. +

See the Window Geometry documentation +for an overview of top-level widget geometry. +

See also geometry, width, and size. + +

Get this property's value with height(). +

bool hidden

+

This property holds whether the widget is explicitly hidden. +

If FALSE, the widget is visible or would become visible if all its +ancestors became visible. +

See also hide(), show(), visible, isVisibleTo(), and shown. + +

Set this property's value with setHidden() and get this property's value with isHidden(). +

TQPixmap icon

+

This property holds the widget's icon. +

This property only makes sense for top-level widgets. If no icon +has been set, icon() returns 0. +

See also iconText, caption, and Setting the Application Icon. + +

Set this property's value with setIcon() and get this property's value with icon(). +

TQString iconText

+

This property holds the widget's icon text. +

This property only makes sense for top-level widgets. If no icon +text has been set, this functions returns TQString::null. +

See also icon and caption. + +

Set this property's value with setIconText() and get this property's value with iconText(). +

bool inputMethodEnabled

+

This property holds enables or disables the use of input methods for this widget. +

Most Widgets (as eg. buttons) that do not handle text input should have +the input method disabled if they have focus. This is the default. +

If a widget handles text input it should set this property to TRUE. + +

Set this property's value with setInputMethodEnabled() and get this property's value with isInputMethodEnabled(). +

bool isActiveWindow

+

This property holds whether this widget is the active window. +

The active window is the window that contains the widget +that has keyboard focus. +

When popup windows are visible, this property is TRUE for both the +active window and for the popup. +

See also setActiveWindow() and TQApplication::activeWindow(). + +

Get this property's value with isActiveWindow(). +

bool isDesktop

+

This property holds whether the widget is a desktop widget, i.e. represents the desktop. +

A desktop widget is also a top-level widget. +

See also isTopLevel and TQApplication::desktop(). + +

Get this property's value with isDesktop(). +

bool isDialog

+

This property holds whether the widget is a dialog widget. +

A dialog widget is a secondary top-level widget, i.e. a top-level +widget with a parent. +

See also isTopLevel and TQDialog. + +

Get this property's value with isDialog(). +

bool isModal

+

This property holds whether the widget is a modal widget. +

This property only makes sense for top-level widgets. A modal +widget prevents widgets in all other top-level widgets from +getting any input. +

See also isTopLevel, isDialog, and TQDialog. + +

Get this property's value with isModal(). +

bool isPopup

+

This property holds whether the widget is a popup widget. +

A popup widget is created by specifying the widget flag WType_Popup to the widget constructor. A popup widget is also a +top-level widget. +

See also isTopLevel. + +

Get this property's value with isPopup(). +

bool isTopLevel

+

This property holds whether the widget is a top-level widget. +

A top-level widget is a widget which usually has a frame and a +caption (title). Popup and desktop widgets are also top-level widgets. +

A top-level widget can have a parent + widget. It will then be grouped with its parent and deleted +when the parent is deleted, minimized when the parent is minimized +etc. If supported by the window manager, it will also have a +common taskbar entry with its parent. +

TQDialog and TQMainWindow widgets are by default top-level, even if +a parent widget is specified in the constructor. This behavior is +specified by the WType_TopLevel widget flag. +

See also topLevelWidget(), isDialog, isModal, isPopup, isDesktop, and parentWidget(). + +

Get this property's value with isTopLevel(). +

bool maximized

+

This property holds whether this widget is maximized. +

This property is only relevant for top-level widgets. +

Note that due to limitations in some window-systems, this does not +always report the expected results (e.g. if the user on X11 +maximizes the window via the window manager, TQt has no way of +distinguishing this from any other resize). This is expected to +improve as window manager protocols evolve. +

See also windowState(), showMaximized(), visible, show(), hide(), showNormal(), and minimized. + +

Get this property's value with isMaximized(). +

int maximumHeight

+

This property holds the widget's maximum height. +

This property corresponds to maximumSize().height(). +

See also maximumSize and maximumWidth. + +

Set this property's value with setMaximumHeight() and get this property's value with maximumHeight(). +

TQSize maximumSize

+

This property holds the widget's maximum size. +

The widget cannot be resized to a larger size than the maximum +widget size. +

See also maximumWidth, maximumHeight, maximumSize, minimumSize, and sizeIncrement. + +

Set this property's value with setMaximumSize() and get this property's value with maximumSize(). +

int maximumWidth

+

This property holds the widget's maximum width. +

This property corresponds to maximumSize().width(). +

See also maximumSize and maximumHeight. + +

Set this property's value with setMaximumWidth() and get this property's value with maximumWidth(). +

TQRect microFocusHint

+

This property holds the currently set micro focus hint for this widget. +

See the documentation of setMicroFocusHint() for more information. + +

Get this property's value with microFocusHint(). +

bool minimized

+

This property holds whether this widget is minimized (iconified). +

This property is only relevant for top-level widgets. +

See also showMinimized(), visible, show(), hide(), showNormal(), and maximized. + +

Get this property's value with isMinimized(). +

int minimumHeight

+

This property holds the widget's minimum height. +

This property corresponds to minimumSize().height(). +

See also minimumSize and minimumWidth. + +

Set this property's value with setMinimumHeight() and get this property's value with minimumHeight(). +

TQSize minimumSize

+

This property holds the widget's minimum size. +

The widget cannot be resized to a smaller size than the minimum +widget size. The widget's size is forced to the minimum size if +the current size is smaller. +

If you use a layout inside the widget, the minimum size will be +set by the layout and not by setMinimumSize(), unless you set the +layout's resize mode to TQLayout::FreeResize. +

See also minimumWidth, minimumHeight, maximumSize, sizeIncrement, and TQLayout::resizeMode. + +

Set this property's value with setMinimumSize() and get this property's value with minimumSize(). +

TQSize minimumSizeHint

+

This property holds the recommended minimum size for the widget. +

If the value of this property is an invalid size, no minimum size +is recommended. +

The default implementation of minimumSizeHint() returns an invalid +size if there is no layout for this widget, and returns the +layout's minimum size otherwise. Most built-in widgets reimplement +minimumSizeHint(). +

TQLayout will never resize a widget to a size smaller than +minimumSizeHint. +

See also TQSize::isValid(), size, minimumSize, and sizePolicy. + +

Get this property's value with minimumSizeHint(). +

int minimumWidth

+

This property holds the widget's minimum width. +

This property corresponds to minimumSize().width(). +

See also minimumSize and minimumHeight. + +

Set this property's value with setMinimumWidth() and get this property's value with minimumWidth(). +

bool mouseTracking

+

This property holds whether mouse tracking is enabled for the widget. +

If mouse tracking is disabled (the default), the widget only +receives mouse move events when at least one mouse button is +pressed while the mouse is being moved. +

If mouse tracking is enabled, the widget receives mouse move +events even if no buttons are pressed. +

See also mouseMoveEvent() and TQApplication::setGlobalMouseTracking(). + +

Set this property's value with setMouseTracking() and get this property's value with hasMouseTracking(). +

bool ownCursor

+

This property holds whether the widget uses its own cursor. +

If FALSE, the widget uses its parent widget's cursor. +

See also cursor. + +

Get this property's value with ownCursor(). +

bool ownFont

+

This property holds whether the widget uses its own font. +

If FALSE, the widget uses its parent widget's font. +

See also font. + +

Get this property's value with ownFont(). +

bool ownPalette

+

This property holds whether the widget uses its own palette. +

If FALSE, the widget uses its parent widget's palette. +

See also palette. + +

Get this property's value with ownPalette(). +

TQPalette palette

+

This property holds the widget's palette. +

As long as no special palette has been set, or after unsetPalette() +has been called, this is either a special palette for the widget +class, the parent's palette or (if this widget is a top level +widget), the default application palette. +

Instead of defining an entirely new palette, you can also use the +paletteBackgroundColor, +paletteBackgroundPixmap and +paletteForegroundColor +convenience properties to change a widget's +background and foreground appearance only. +

See also ownPalette, colorGroup, and TQApplication::palette(). + +

Set this property's value with setPalette(), get this property's value with palette(), and reset this property's value with unsetPalette(). +

TQColor paletteBackgroundColor

+

This property holds the background color of the widget. +

The palette background color is usually set implicitly by +setBackgroundMode(), although it can also be set explicitly by +setPaletteBackgroundColor(). setPaletteBackgroundColor() is a +convenience function that creates and sets a modified TQPalette +with setPalette(). The palette is modified according to the +widget's background mode. For example, if the background mode is +PaletteButton the color used for the palette's TQColorGroup::Button color entry is set. +

If there is a background pixmap (set using +setPaletteBackgroundPixmap()), then the return value of this +function is indeterminate. +

See also paletteBackgroundPixmap, paletteForegroundColor, palette, and colorGroup. + +

Set this property's value with setPaletteBackgroundColor(), get this property's value with paletteBackgroundColor(), and reset this property's value with unsetPalette(). +

TQPixmap paletteBackgroundPixmap

+

This property holds the background pixmap of the widget. +

The palette background pixmap is usually set implicitly by +setBackgroundMode(), although it can also be set explicitly by +setPaletteBackgroundPixmap(). setPaletteBackgroundPixmap() is a +convenience function that creates and sets a modified TQPalette +with setPalette(). The palette is modified according to the +widget's background mode. For example, if the background mode is +PaletteButton the pixmap used for the palette's +TQColorGroup::Button color entry is set. +

If there is a plain background color (set using +setPaletteBackgroundColor()), then this function returns 0. +

See also paletteBackgroundColor, paletteForegroundColor, palette, and colorGroup. + +

Set this property's value with setPaletteBackgroundPixmap(), get this property's value with paletteBackgroundPixmap(), and reset this property's value with unsetPalette(). +

TQColor paletteForegroundColor

+

This property holds the foreground color of the widget. +

setPaletteForegroundColor() is a convenience function that creates +and sets a modified TQPalette with setPalette(). The palette is +modified according to the widget's background mode. For +example, if the background mode is PaletteButton the palette entry +TQColorGroup::ButtonText is set to color. +

See also palette, TQApplication::setPalette(), backgroundMode, foregroundColor(), backgroundMode, and setEraseColor(). + +

Set this property's value with setPaletteForegroundColor(), get this property's value with paletteForegroundColor(), and reset this property's value with unsetPalette(). +

TQPoint pos

+

This property holds the position of the widget within its parent widget. +

If the widget is a top-level widget, the position is that of the +widget on the desktop, including its frame. +

When changing the position, the widget, if visible, receives a +move event (moveEvent()) immediately. If the widget is not +currently visible, it is guaranteed to receive an event before it +is shown. +

move() is virtual, and all other overloaded move() implementations +in TQt call it. +

Warning: Calling move() or setGeometry() inside moveEvent() can +lead to infinite recursion. +

See the Window Geometry documentation +for an overview of top-level widget geometry. +

See also frameGeometry, size, x, and y. + +

Set this property's value with move() and get this property's value with pos(). +

TQRect rect

+

This property holds the internal geometry of the widget excluding any window frame. +

The rect property equals TQRect(0, 0, width(), height()). +

See the Window Geometry documentation +for an overview of top-level widget geometry. +

See also size. + +

Get this property's value with rect(). +

bool shown

+

This property holds whether the widget is shown. +

If TRUE, the widget is visible or would become visible if all its +ancestors became visible. +

See also hide(), show(), visible, isVisibleTo(), and hidden. + +

Set this property's value with setShown() and get this property's value with isShown(). +

TQSize size

+

This property holds the size of the widget excluding any window frame. +

When resizing, the widget, if visible, receives a resize event +(resizeEvent()) immediately. If the widget is not currently +visible, it is guaranteed to receive an event before it is shown. +

The size is adjusted if it lies outside the range defined by +minimumSize() and maximumSize(). Furthermore, the size is always +at least TQSize(1, 1). For toplevel widgets, the minimum size +might be larger, depending on the window manager. +

If you want a top-level window to have a fixed size, call +setResizeMode( TQLayout::FreeResize ) on its layout. +

resize() is virtual, and all other overloaded resize() +implementations in TQt call it. +

Warning: Calling resize() or setGeometry() inside resizeEvent() can +lead to infinite recursion. +

See also pos, geometry, minimumSize, maximumSize, and resizeEvent(). + +

Set this property's value with resize() and get this property's value with size(). +

TQSize sizeHint

+

This property holds the recommended size for the widget. +

If the value of this property is an invalid size, no size is +recommended. +

The default implementation of sizeHint() returns an invalid size +if there is no layout for this widget, and returns the layout's +preferred size otherwise. +

See also TQSize::isValid(), minimumSizeHint, sizePolicy, minimumSize, and updateGeometry(). + +

Get this property's value with sizeHint(). +

TQSize sizeIncrement

+

This property holds the size increment of the widget. +

When the user resizes the window, the size will move in steps of +sizeIncrement().width() pixels horizontally and +sizeIncrement.height() pixels vertically, with baseSize() as the +basis. Preferred widget sizes are for non-negative integers i +and j: +

+        width = baseSize().width() + i * sizeIncrement().width();
+        height = baseSize().height() + j * sizeIncrement().height();
+    
+ +

Note that while you can set the size increment for all widgets, it +only affects top-level widgets. +

Warning: The size increment has no effect under Windows, and may +be disregarded by the window manager on X. +

See also size, minimumSize, and maximumSize. + +

Set this property's value with setSizeIncrement() and get this property's value with sizeIncrement(). +

TQSizePolicy sizePolicy

+

This property holds the default layout behavior of the widget. +

If there is a TQLayout that manages this widget's children, the +size policy specified by that layout is used. If there is no such +TQLayout, the result of this function is used. +

The default policy is Preferred/Preferred, which means that the +widget can be freely resized, but prefers to be the size +sizeHint() returns. Button-like widgets set the size policy to +specify that they may stretch horizontally, but are fixed +vertically. The same applies to lineedit controls (such as +TQLineEdit, TQSpinBox or an editable TQComboBox) and other +horizontally orientated widgets (such as TQProgressBar). +TQToolButton's are normally square, so they allow growth in both +directions. Widgets that support different directions (such as +TQSlider, TQScrollBar or TQHeader) specify stretching in the +respective direction only. Widgets that can provide scrollbars +(usually subclasses of TQScrollView) tend to specify that they can +use additional space, and that they can make do with less than +sizeHint(). +

See also sizeHint, TQLayout, TQSizePolicy, and updateGeometry(). + +

Set this property's value with setSizePolicy() and get this property's value with sizePolicy(). +

bool underMouse

+

This property holds whether the widget is under the mouse cursor. +

This value is not updated properly during drag and drop +operations. +

See also TQEvent::Enter and TQEvent::Leave. + +

Get this property's value with hasMouse(). +

bool updatesEnabled

+

This property holds whether updates are enabled. +

Calling update() and repaint() has no effect if updates are +disabled. Paint events from the window system are processed +normally even if updates are disabled. +

setUpdatesEnabled() is normally used to disable updates for a +short period of time, for instance to avoid screen flicker during +large changes. +

Example: +

+        setUpdatesEnabled( FALSE );
+        bigVisualChanges();
+        setUpdatesEnabled( TRUE );
+        repaint();
+    
+ +

See also update(), repaint(), and paintEvent(). + +

Set this property's value with setUpdatesEnabled() and get this property's value with isUpdatesEnabled(). +

bool visible

+

This property holds whether the widget is visible. +

Calling show() sets the widget to visible status if all its parent +widgets up to the top-level widget are visible. If an ancestor is +not visible, the widget won't become visible until all its +ancestors are shown. +

Calling hide() hides a widget explicitly. An explicitly hidden +widget will never become visible, even if all its ancestors become +visible, unless you show it. +

A widget receives show and hide events when its visibility status +changes. Between a hide and a show event, there is no need to +waste CPU cycles preparing or displaying information to the user. +A video application, for example, might simply stop generating new +frames. +

A widget that happens to be obscured by other windows on the +screen is considered to be visible. The same applies to iconified +top-level widgets and windows that exist on another virtual +desktop (on platforms that support this concept). A widget +receives spontaneous show and hide events when its mapping status +is changed by the window system, e.g. a spontaneous hide event +when the user minimizes the window, and a spontaneous show event +when the window is restored again. +

See also show(), hide(), hidden, isVisibleTo(), minimized, showEvent(), and hideEvent(). + +

Get this property's value with isVisible(). +

TQRect visibleRect

+

This property holds the visible rectangle. +

This property is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

No longer necessary, you can simply call repaint(). If you do not +need the rectangle for repaint(), use clipRegion() instead. + +

Get this property's value with visibleRect(). +

int width

+

This property holds the width of the widget excluding any window frame. +

See the Window Geometry documentation +for an overview of top-level widget geometry. +

See also geometry, height, and size. + +

Get this property's value with width(). +

double windowOpacity

+

This property holds the level of opacity for the window. +

The valid range of opacity is from 1.0 (completely opaque) to +0.0 (completely transparent). +

By default the value of this property is 1.0. +

This feature is only present on Mac OS X and Windows 2000 and up. +

Warning: Changing this property from opaque to transparent might issue a +paint event that needs to be processed before the window is displayed +correctly. This affects mainly the use of TQPixmap::grabWindow(). Also note +that semi-transparent windows update and resize significantely slower than +opaque windows. + +

Set this property's value with setWindowOpacity() and get this property's value with windowOpacity(). +

int x

This property holds the x coordinate of the widget relative to its parent including any window frame. +

See the Window Geometry documentation +for an overview of top-level widget geometry. +

See also frameGeometry, y, and pos. + +

Get this property's value with x(). +

int y

+

This property holds the y coordinate of the widget relative to its parent and including any window frame. +

See the Window Geometry documentation +for an overview of top-level widget geometry. +

See also frameGeometry, x, and pos. + +

Get this property's value with y(). + +


+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/qwidgetfactory-h.html b/doc/html/qwidgetfactory-h.html new file mode 100644 index 00000000..13bf5e9f --- /dev/null +++ b/doc/html/qwidgetfactory-h.html @@ -0,0 +1,231 @@ + + + + + +qwidgetfactory.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qwidgetfactory.h

+ +

This is the verbatim text of the qwidgetfactory.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/**********************************************************************
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of TQt Designer.
+**
+** 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 retquirements 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.
+**
+** 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 TQWIDGETFACTORY_H
+#define TQWIDGETFACTORY_H
+
+#ifndef QT_H
+#include <qstring.h>
+#include <qptrlist.h>
+#include <qimage.h>
+#include <qpixmap.h>
+#include <qvaluelist.h>
+#include <qmap.h>
+#include <qaction.h>
+#endif // QT_H
+
+class TQDomDocument;
+class TQDomElement;
+class TQLayout;
+class TQListView;
+class TQListViewItem;
+class TQMenuBar;
+class TQTable;
+class TQWidget;
+class TQWidgetFactoryPrivate;
+class UibStrTable;
+
+class TQWidgetFactory
+{
+public:
+    TQWidgetFactory();
+    virtual ~TQWidgetFactory();
+
+    static TQWidget *create( const TQString &uiFile, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 );
+    static TQWidget *create( TQIODevice *dev, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 );
+    static void addWidgetFactory( TQWidgetFactory *factory );
+    static void loadImages( const TQString &dir );
+
+    virtual TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name ) const;
+    static TQStringList widgets();
+    static bool supportsWidget( const TQString &widget );
+
+private:
+    enum LayoutType { HBox, VBox, Grid, NoLayout };
+    void loadImageCollection( const TQDomElement &e );
+    void loadConnections( const TQDomElement &e, TQObject *connector );
+    void loadTabOrder( const TQDomElement &e );
+    TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg );
+    TQLayout *createLayout( TQWidget *widget, TQLayout*  layout, LayoutType type, bool isTQLayoutWidget = FALSE );
+    LayoutType layoutType( TQLayout *l ) const;
+    void setProperty( TQObject* widget, const TQString &prop, TQVariant value );
+    void setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e );
+    void createSpacer( const TQDomElement &e, TQLayout *layout );
+    TQImage loadFromCollection( const TQString &name );
+    TQPixmap loadPixmap( const TQString &name );
+    TQPixmap loadPixmap( const TQDomElement &e );
+    TQColorGroup loadColorGroup( const TQDomElement &e );
+    void createListViewColumn( TQListView *lv, const TQString& txt,
+			       const TQPixmap& pix, bool clickable,
+			       bool resizable );
+#ifndef QT_NO_TABLE
+    void createTableColumnOrRow( TQTable *table, const TQString& txt,
+				 const TQPixmap& pix, const TQString& field,
+				 bool isRow );
+#endif
+    void createColumn( const TQDomElement &e, TQWidget *widget );
+    void loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap );
+    void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 );
+    void loadChildAction( TQObject *parent, const TQDomElement &e );
+    void loadActions( const TQDomElement &e );
+    void loadToolBars( const TQDomElement &e );
+    void loadMenuBar( const TQDomElement &e );
+    void loadPopupMenu( TQPopupMenu *p, const TQDomElement &e );
+    void loadFunctions( const TQDomElement &e );
+    TQAction *findAction( const TQString &name );
+    void loadExtraSource();
+    TQString translate( const char *sourceText, const char *comment = "" );
+    TQString translate( const TQString& sourceText, const TQString& comment = TQString::null );
+
+    void unpackUInt16( TQDataStream& in, Q_UINT16& n );
+    void unpackUInt32( TQDataStream& in, Q_UINT32& n );
+    void unpackByteArray( TQDataStream& in, TQByteArray& array );
+    void unpackCString( const UibStrTable& strings, TQDataStream& in,
+			TQCString& cstr );
+    void unpackString( const UibStrTable& strings, TQDataStream& in,
+		       TQString& str );
+    void unpackStringSplit( const UibStrTable& strings, TQDataStream& in,
+			    TQString& str );
+    void unpackVariant( const UibStrTable& strings, TQDataStream& in,
+			TQVariant& value );
+    void inputSpacer( const UibStrTable& strings, TQDataStream& in,
+		      TQLayout *parent );
+    void inputColumnOrRow( const UibStrTable& strings, TQDataStream& in,
+			   TQObject *parent, bool isRow );
+    void inputItem( const UibStrTable& strings, TQDataStream& in,
+		    TQObject *parent, TQListViewItem *parentItem = 0 );
+    void inputMenuItem( TQObject **objects, const UibStrTable& strings,
+			TQDataStream& in, TQMenuBar *menuBar );
+    TQObject *inputObject( TQObject **objects, int& numObjects,
+			  const UibStrTable& strings, TQDataStream& in,
+			  TQWidget *ancestorWidget, TQObject *parent,
+			  TQCString className = "" );
+    TQWidget *createFromUiFile( TQDomDocument doc, TQObject *connector,
+			       TQWidget *parent, const char *name );
+    TQWidget *createFromUibFile( TQDataStream& in, TQObject *connector,
+				TQWidget *parent, const char *name );
+
+private:
+    struct Image {
+	TQImage img;
+	TQString name;
+	bool operator==(  const Image &i ) const {
+	    return ( i.name == name &&
+		     i.img == img );
+	}
+    };
+
+    struct Field
+    {
+	Field() {}
+	Field( const TQString &s1, const TQPixmap &p, const TQString &s2 ) : name( s1 ), pix( p ), field( s2 ) {}
+	TQString name;
+	TQPixmap pix;
+	TQString field;
+	Q_DUMMY_COMPARISON_OPERATOR( Field )
+    };
+
+    struct SqlWidgetConnection
+    {
+	SqlWidgetConnection() {}
+	SqlWidgetConnection( const TQString &c, const TQString &t )
+	    : conn( c ), table( t ), dbControls( new TQMap<TQString, TQString>() ) {}
+	TQString conn;
+	TQString table;
+	TQMap<TQString, TQString> *dbControls;
+	Q_DUMMY_COMPARISON_OPERATOR( SqlWidgetConnection )
+    };
+
+    TQValueList<Image> images;
+    TQWidget *toplevel;
+    TQWidgetFactoryPrivate *d;
+    TQMap<TQString, TQString> *dbControls;
+    TQMap<TQString, TQStringList> dbTables;
+    TQMap<TQWidget*, SqlWidgetConnection> sqlWidgetConnections;
+    TQMap<TQString, TQString> buddies;
+    TQMap<TQTable*, TQValueList<Field> > fieldMaps;
+    TQPtrList<TQAction> actionList;
+    TQMap<TQString, TQString> languageSlots;
+    TQStringList noDatabaseWidgets;
+    bool usePixmapCollection;
+    int defMargin;
+    int defSpacing;
+    TQString code;
+    TQString uiFileVersion;
+};
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwidgetfactory-members.html b/doc/html/qwidgetfactory-members.html new file mode 100644 index 00000000..d55953c0 --- /dev/null +++ b/doc/html/qwidgetfactory-members.html @@ -0,0 +1,54 @@ + + + + + +TQWidgetFactory Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWidgetFactory

+ +

This is the complete list of member functions for +TQWidgetFactory, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwidgetfactory.html b/doc/html/qwidgetfactory.html new file mode 100644 index 00000000..26dea608 --- /dev/null +++ b/doc/html/qwidgetfactory.html @@ -0,0 +1,168 @@ + + + + + +TQWidgetFactory Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWidgetFactory Class Reference

+ +

The TQWidgetFactory class provides for the dynamic creation of widgets +from TQt Designer .ui files. +More... +

#include <qwidgetfactory.h> +

List of all member functions. +

Public Members

+ +

Static Public Members

+
    +
  • TQWidget * create ( const TQString & uiFile, TQObject * connector = 0, TQWidget * parent = 0, const char * name = 0 )
  • +
  • TQWidget * create ( TQIODevice * dev, TQObject * connector = 0, TQWidget * parent = 0, const char * name = 0 )
  • +
  • void addWidgetFactory ( TQWidgetFactory * factory )
  • +
  • void loadImages ( const TQString & dir )
  • +
  • TQStringList widgets ()
  • +
  • bool supportsWidget ( const TQString & widget )
  • +
+

Detailed Description

+ + +

The TQWidgetFactory class provides for the dynamic creation of widgets +from TQt Designer .ui files. +

This class basically offers two things: +

    +

  • Dynamically creating widgets from TQt + Designer user interface description files. +You can do this using the static function TQWidgetFactory::create(). +This function also performs signal and slot connections, tab +ordering, etc., as defined in the .ui file, and returns the +top-level widget in the .ui file. After creating the widget you can +use TQObject::child() and TQObject::queryList() to access child +widgets of this returned widget. +

  • Adding additional widget factories to be able to create custom +widgets. See createWidget() for details. +

+

This class is not included in the TQt library itself. To use it you +must link against libtqui.so (Unix) or tqui.lib (Windows), which is +built into INSTALL/lib if you built TQt Designer (INSTALL is +the directory where TQt is installed ). +

If you create a TQMainWindow using a TQWidgetFactory, be aware that +it already has a central widget. Therefore, you need to delete this +one before setting another one. +

See the "Creating Dynamic Dialogs from .ui Files" section of the TQt Designer manual for an example. See +also the TQWidgetPlugin class and the Plugins documentation. + +


Member Function Documentation

+

TQWidgetFactory::TQWidgetFactory () +

Constructs a TQWidgetFactory. +

TQWidgetFactory::~TQWidgetFactory () [virtual] +

+Destructor. + +

void TQWidgetFactory::addWidgetFactory ( TQWidgetFactory * factory ) [static] +

Installs a widget factory factory, which normally contains +additional widgets that can then be created using a TQWidgetFactory. +See createWidget() for further details. + +

TQWidget * TQWidgetFactory::create ( const TQString & uiFile, TQObject * connector = 0, TQWidget * parent = 0, const char * name = 0 ) [static] +

+

Loads the TQt Designer user interface description file uiFile +and returns the top-level widget in that description. parent and +name are passed to the constructor of the top-level widget. +

This function also performs signal and slot connections, tab +ordering, etc., as described in the .ui file. In TQt Designer it +is possible to add custom slots to a form and connect to them. If +you want these connections to be made, you must create a class +derived from TQObject, which implements all these slots. Then pass an +instance of the object as connector to this function. If you do +this, the connections to the custom slots will be done using the connector as slot. +

If something fails, 0 is returned. +

The ownership of the returned widget is passed to the caller. + +

TQWidget * TQWidgetFactory::create ( TQIODevice * dev, TQObject * connector = 0, TQWidget * parent = 0, const char * name = 0 ) [static] +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Loads the user interface description from device dev. + +

TQWidget * TQWidgetFactory::createWidget ( const TQString & className, TQWidget * parent, const char * name ) const [virtual] +

+Creates a widget of the type className passing parent and name to its constructor. +

If className is a widget in the TQt library, it is directly +created by this function. If the widget isn't in the TQt library, +each of the installed widget plugins is asked, in turn, to create +the widget. As soon as a plugin says it can create the widget it +is asked to do so. It may occur that none of the plugins can +create the widget, in which case each installed widget factory is +asked to create the widget (see addWidgetFactory()). If the widget +cannot be created by any of these means, 0 is returned. +

If you have a custom widget, and want it to be created using the +widget factory, there are two approaches you can use: +

    +

  1. Write a widget plugin. This allows you to use the widget in +TQt Designer and in this TQWidgetFactory. See the widget plugin +documentation for further details. (See the "Creating Custom +Widgets with Plugins" section of the TQt + Designer manual for an example. +

  2. Subclass TQWidgetFactory. Then reimplement this function to +create and return an instance of your custom widget if className equals the name of your widget, otherwise return 0. Then +at the beginning of your program where you want to use the widget +factory to create widgets do a: +
    +    TQWidgetFactory::addWidgetFactory( new MyWidgetFactory );
    +    
    + +where MyWidgetFactory is your TQWidgetFactory subclass. +

+ +

void TQWidgetFactory::loadImages ( const TQString & dir ) [static] +

+If you use a pixmap collection (which is the default for new +projects) rather than saving the pixmaps within the .ui XML file, +you must load the pixmap collection. TQWidgetFactory looks in the +default TQMimeSourceFactory for the pixmaps. Either add it there +manually, or call this function and specify the directory where +the images can be found, as dir. This is normally the +directory called images in the project's directory. + +

bool TQWidgetFactory::supportsWidget ( const TQString & widget ) [static] +

Returns TRUE if the widget factory can create the specified widget; +otherwise returns FALSE. +

TQStringList TQWidgetFactory::widgets () [static] +

Returns the names of the widgets this factory can create. + +

+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/qwidgetitem-members.html b/doc/html/qwidgetitem-members.html new file mode 100644 index 00000000..fb480ad9 --- /dev/null +++ b/doc/html/qwidgetitem-members.html @@ -0,0 +1,63 @@ + + + + + +TQWidgetItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWidgetItem

+ +

This is the complete list of member functions for +TQWidgetItem, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwidgetitem.html b/doc/html/qwidgetitem.html new file mode 100644 index 00000000..7d5572cc --- /dev/null +++ b/doc/html/qwidgetitem.html @@ -0,0 +1,116 @@ + + + + + +TQWidgetItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWidgetItem Class Reference

+ +

The TQWidgetItem class is a layout item that represents a widget. +More... +

#include <qlayout.h> +

Inherits TQLayoutItem. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + + +The TQWidgetItem class is a layout item that represents a widget. +

This is used by custom layouts. +

See also TQLayout, TQLayout::widget(), Widget Appearance and Style, and Layout Management. + +


Member Function Documentation

+

TQWidgetItem::TQWidgetItem ( TQWidget * w ) +

+ +

Creates an item containing widget w. + +

TQSizePolicy::ExpandData TQWidgetItem::expanding () const [virtual] +

+Returns whether this item's widget can make use of more space than +sizeHint(). A value of Vertical or Horizontal means that it wants +to grow in only one dimension, whereas BothDirections means that +it wants to grow in both dimensions and NoDirection means that +it doesn't want to grow at all. + +

Reimplemented from TQLayoutItem. +

bool TQWidgetItem::isEmpty () const [virtual] +

+Returns TRUE if the widget has been hidden; otherwise returns +FALSE. + +

Reimplemented from TQLayoutItem. +

TQSize TQWidgetItem::maximumSize () const [virtual] +

+Returns the maximum size of this item. + +

Reimplemented from TQLayoutItem. +

TQSize TQWidgetItem::minimumSize () const [virtual] +

+Returns the minimum size of this item. + +

Reimplemented from TQLayoutItem. +

void TQWidgetItem::setGeometry ( const TQRect & r ) [virtual] +

+Sets the geometry of this item's widget to be contained within +rect r, taking alignment and maximum size into account. + +

Reimplemented from TQLayoutItem. +

TQSize TQWidgetItem::sizeHint () const [virtual] +

+Returns the preferred size of this item. + +

Reimplemented from TQLayoutItem. +

TQWidget * TQWidgetItem::widget () [virtual] +

+Returns the widget managed by this item. + +

Reimplemented from TQLayoutItem. + +


+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/qwidgetplugin-h.html b/doc/html/qwidgetplugin-h.html new file mode 100644 index 00000000..397433e5 --- /dev/null +++ b/doc/html/qwidgetplugin-h.html @@ -0,0 +1,165 @@ + + + + + +qwidgetplugin.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qwidgetplugin.h

+ +

This is the verbatim text of the qwidgetplugin.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qwidgetplugin.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of TQWidgetPlugin class
+**
+** Created : 010920
+**
+** Copyright (C) 2001-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQWIDGETPLUGIN_H
+#define TQWIDGETPLUGIN_H
+
+#ifndef QT_H
+#include "qgplugin.h"
+#include "qstringlist.h"
+#include "qiconset.h"
+#endif // QT_H
+#ifndef QT_NO_WIDGETPLUGIN
+
+#ifdef Q_WS_WIN
+#ifdef QT_PLUGIN
+#define QT_WIDGET_PLUGIN_EXPORT __declspec(dllexport)
+#else
+#define QT_WIDGET_PLUGIN_EXPORT __declspec(dllimport)
+#endif
+#else
+#define QT_WIDGET_PLUGIN_EXPORT
+#endif
+
+class TQWidgetPluginPrivate;
+class TQWidget;
+
+class Q_EXPORT TQWidgetPlugin : public TQGPlugin
+{
+    Q_OBJECT
+public:
+    TQWidgetPlugin();
+    ~TQWidgetPlugin();
+
+    virtual TQStringList keys() const = 0;
+    virtual TQWidget *create( const TQString &key, TQWidget *parent = 0, const char *name = 0 ) = 0;
+
+    virtual TQString group( const TQString &key ) const;
+    virtual TQIconSet iconSet( const TQString &key ) const;
+    virtual TQString includeFile( const TQString &key ) const;
+    virtual TQString toolTip( const TQString &key ) const;
+    virtual TQString whatsThis( const TQString &key ) const;
+    virtual bool isContainer( const TQString &key ) const;
+
+private:
+    TQWidgetPluginPrivate *d;
+};
+
+#ifdef QT_CONTAINER_CUSTOM_WIDGETS
+
+class TQWidgetContainerPluginPrivate;
+
+class Q_EXPORT TQWidgetContainerPlugin : public TQWidgetPlugin
+{
+
+public:
+    TQWidgetContainerPlugin();
+    ~TQWidgetContainerPlugin();
+
+    virtual TQWidget* containerOfWidget( const TQString &key, TQWidget *container ) const;
+    virtual bool isPassiveInteractor( const TQString &key, TQWidget *container ) const;
+
+    virtual bool supportsPages( const TQString &key ) const;
+
+    virtual TQWidget *addPage( const TQString &key, TQWidget *container,
+			      const TQString &name, int index ) const;
+    virtual void insertPage( const TQString &key, TQWidget *container,
+			     const TQString &name, int index, TQWidget *page ) const;
+    virtual void removePage( const TQString &key, TQWidget *container, int index ) const;
+    virtual void movePage( const TQString &key, TQWidget *container, int fromIndex, int toIndex ) const;
+    virtual int count( const TQString &key, TQWidget *container ) const;
+    virtual int currentIndex( const TQString &key, TQWidget *container ) const;
+    virtual TQString pageLabel( const TQString &key, TQWidget *container, int index ) const;
+    virtual TQWidget *page( const TQString &key, TQWidget *container, int index ) const;
+    virtual void renamePage( const TQString &key, TQWidget *container,
+			     int index, const TQString &newName ) const;
+    virtual TQWidgetList pages( const TQString &key, TQWidget *container ) const;
+    virtual TQString createCode( const TQString &key, const TQString &container,
+				const TQString &page, const TQString &pageName ) const;
+};
+
+#endif // QT_CONTAINER_CUSTOM_WIDGETS
+#endif // QT_NO_WIDGETPLUGIN
+#endif // TQWIDGETPLUGIN_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwidgetplugin-members.html b/doc/html/qwidgetplugin-members.html new file mode 100644 index 00000000..b77a68c8 --- /dev/null +++ b/doc/html/qwidgetplugin-members.html @@ -0,0 +1,56 @@ + + + + + +TQWidgetPlugin Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWidgetPlugin

+ +

This is the complete list of member functions for +TQWidgetPlugin, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwidgetplugin.html b/doc/html/qwidgetplugin.html new file mode 100644 index 00000000..87b4f72d --- /dev/null +++ b/doc/html/qwidgetplugin.html @@ -0,0 +1,146 @@ + + + + + +TQWidgetPlugin Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWidgetPlugin Class Reference

+ +

The TQWidgetPlugin class provides an abstract base for custom TQWidget plugins. +More... +

#include <qwidgetplugin.h> +

List of all member functions. +

Public Members

+
    +
  • TQWidgetPlugin ()
  • +
  • ~TQWidgetPlugin ()
  • +
  • virtual TQStringList keys () const = 0
  • +
  • virtual TQWidget * create ( const TQString & key, TQWidget * parent = 0, const char * name = 0 ) = 0
  • +
  • virtual TQString group ( const TQString & key ) const
  • +
  • virtual TQIconSet iconSet ( const TQString & key ) const
  • +
  • virtual TQString includeFile ( const TQString & key ) const
  • +
  • virtual TQString toolTip ( const TQString & key ) const
  • +
  • virtual TQString whatsThis ( const TQString & key ) const
  • +
  • virtual bool isContainer ( const TQString & key ) const
  • +
+

Detailed Description

+ + +The TQWidgetPlugin class provides an abstract base for custom TQWidget plugins. +

+

The widget plugin is a simple plugin interface that makes it easy +to create custom widgets that can be included in forms using TQt Designer and used by applications. +

Writing a widget plugin is achieved by subclassing this base +class, reimplementing the pure virtual functions keys(), create(), +group(), iconSet(), includeFile(), toolTip(), whatsThis() and +isContainer(), and exporting the class with the Q_EXPORT_PLUGIN +macro. +

See the TQt Designer manual's, +'Creating Custom Widgets' section in the 'Creating Custom Widgets' +chapter, for a complete example of a TQWidgetPlugin. +

See also the Plugins + documentation and the TQWidgetFactory class that is +supplied with TQt Designer. +

See also Plugins. + +


Member Function Documentation

+

TQWidgetPlugin::TQWidgetPlugin () +

+Constructs a widget plugin. This is invoked automatically by the +Q_EXPORT_PLUGIN macro. + +

TQWidgetPlugin::~TQWidgetPlugin () +

+Destroys the widget plugin. +

You never have to call this explicitly. TQt destroys a plugin +automatically when it is no longer used. + +

TQWidget * TQWidgetPlugin::create ( const TQString & key, TQWidget * parent = 0, const char * name = 0 ) [pure virtual] +

+ +

Creates and returns a TQWidget object for the widget key key. +The widget key is the class name of the retquired widget. The name and parent arguments are passed to the custom widget's +constructor. +

See also keys(). + +

TQString TQWidgetPlugin::group ( const TQString & key ) const [virtual] +

+Returns the group (toolbar name) that the custom widget of class +key should be part of when TQt Designer loads it. +

The default implementation returns TQString::null. + +

TQIconSet TQWidgetPlugin::iconSet ( const TQString & key ) const [virtual] +

+Returns the iconset that TQt Designer should use to represent +the custom widget of class key in the toolbar. +

The default implementation returns an null iconset. + +

TQString TQWidgetPlugin::includeFile ( const TQString & key ) const [virtual] +

+Returns the name of the include file that TQt Designer and uic should use to include the custom widget of class key in +generated code. +

The default implementation returns TQString::null. + +

bool TQWidgetPlugin::isContainer ( const TQString & key ) const [virtual] +

+Returns TRUE if the custom widget of class key can contain +other widgets, e.g. like TQFrame; otherwise returns FALSE. +

The default implementation returns FALSE. + +

TQStringList TQWidgetPlugin::keys () const [pure virtual] +

+ +

Returns the list of widget keys this plugin supports. +

These keys must be the class names of the custom widgets that are +implemented in the plugin. +

See also create(). + +

TQString TQWidgetPlugin::toolTip ( const TQString & key ) const [virtual] +

+Returns the text of the tooltip that TQt Designer should use +for the custom widget of class key's toolbar button. +

The default implementation returns TQString::null. + +

TQString TQWidgetPlugin::whatsThis ( const TQString & key ) const [virtual] +

+Returns the text of the whatsThis text that TQt Designer should +use when the user requests whatsThis help for the custom widget of +class key. +

The default implementation returns TQString::null. + + +


+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/qwidgetstack-h.html b/doc/html/qwidgetstack-h.html new file mode 100644 index 00000000..d6570cd3 --- /dev/null +++ b/doc/html/qwidgetstack-h.html @@ -0,0 +1,157 @@ + + + + + +qwidgetstack.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qwidgetstack.h

+ +

This is the verbatim text of the qwidgetstack.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qwidgetstack.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of TQWidgetStack class
+**
+** Created : 980306
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQWIDGETSTACK_H
+#define TQWIDGETSTACK_H
+
+#ifndef QT_H
+#include "qframe.h"
+#include "qintdict.h"
+#include "qptrdict.h"
+#endif // QT_H
+
+#ifndef QT_NO_WIDGETSTACK
+
+
+class TQWidgetStackPrivate;
+
+
+class Q_EXPORT TQWidgetStack: public TQFrame
+{
+    Q_OBJECT
+public:
+    TQWidgetStack( TQWidget* parent=0, const char* name=0 );
+    TQWidgetStack( TQWidget* parent, const char* name, WFlags f);
+
+    ~TQWidgetStack();
+
+    int addWidget( TQWidget *, int = -1 );
+    void removeWidget( TQWidget * );
+
+    TQSize sizeHint() const;
+    TQSize minimumSizeHint() const;
+    void show();
+
+    TQWidget * widget( int ) const;
+    int id( TQWidget * ) const;
+
+    TQWidget * visibleWidget() const;
+
+    void setFrameRect( const TQRect & );
+
+signals:
+    void aboutToShow( int );
+    void aboutToShow( TQWidget * );
+
+public slots:
+    void raiseWidget( int );
+    void raiseWidget( TQWidget * );
+
+protected:
+    void frameChanged();
+    void resizeEvent( TQResizeEvent * );
+
+    virtual void setChildGeometries();
+    void childEvent( TQChildEvent * );
+
+private:
+    void init();
+
+    TQWidgetStackPrivate * d;
+    TQIntDict<TQWidget> * dict;
+    TQPtrDict<TQWidget> * focusWidgets;
+    TQWidget * topWidget;
+    TQWidget * invisible;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQWidgetStack( const TQWidgetStack & );
+    TQWidgetStack& operator=( const TQWidgetStack & );
+#endif
+};
+
+#endif // QT_NO_WIDGETSTACK
+
+#endif // TQWIDGETSTACK_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwidgetstack-members.html b/doc/html/qwidgetstack-members.html new file mode 100644 index 00000000..4b06da4d --- /dev/null +++ b/doc/html/qwidgetstack-members.html @@ -0,0 +1,365 @@ + + + + + +TQWidgetStack Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWidgetStack

+ +

This is the complete list of member functions for +TQWidgetStack, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwidgetstack.html b/doc/html/qwidgetstack.html new file mode 100644 index 00000000..aaf90fe9 --- /dev/null +++ b/doc/html/qwidgetstack.html @@ -0,0 +1,193 @@ + + + + + +TQWidgetStack Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWidgetStack Class Reference

+ +

The TQWidgetStack class provides a stack of widgets of which +only the top widget is user-visible. +More... +

#include <qwidgetstack.h> +

Inherits TQFrame. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Protected Members

+ +

Detailed Description

+ + +The TQWidgetStack class provides a stack of widgets of which +only the top widget is user-visible. +

+ +

The application programmer can move any widget to the top of the +stack at any time using raiseWidget(), and add or remove widgets +using addWidget() and removeWidget(). It is not sufficient to pass +the widget stack as parent to a widget which should be inserted into +the widgetstack. +

visibleWidget() is the get equivalent of raiseWidget(); it +returns a pointer to the widget that is currently at the top of +the stack. +

TQWidgetStack also provides the ability to manipulate widgets +through application-specified integer IDs. You can also translate +from widget pointers to IDs using id() and from IDs to widget +pointers using widget(). These numeric IDs are unique (per +TQWidgetStack, not globally), but TQWidgetStack does not attach any +additional meaning to them. +

The default widget stack is frameless, but you can use the usual +TQFrame functions (such as setFrameStyle()) to add a frame. +

TQWidgetStack provides a signal, aboutToShow(), which is emitted +just before a managed widget is shown. +

See also TQTabDialog, TQTabBar, TQFrame, and Organizers. + +


Member Function Documentation

+

TQWidgetStack::TQWidgetStack ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs an empty widget stack. +

The parent and name arguments are passed to the TQFrame +constructor. + +

TQWidgetStack::TQWidgetStack ( TQWidget * parent, const char * name, WFlags f ) +

+Constructs an empty widget stack. +

The parent, name and f arguments are passed to the TQFrame +constructor. + +

TQWidgetStack::~TQWidgetStack () +

+Destroys the object and frees any allocated resources. + +

void TQWidgetStack::aboutToShow ( int ) [signal] +

+ +

This signal is emitted just before a managed widget is shown if +that managed widget has an ID != -1. The argument is the numeric +ID of the widget. +

If you call visibleWidget() in a slot connected to aboutToShow(), +the widget it returns is the one that is currently visible, not +the one that is about to be shown. + +

void TQWidgetStack::aboutToShow ( TQWidget * ) [signal] +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

This signal is emitted just before a managed widget is shown. The +argument is a pointer to the widget. +

If you call visibleWidget() in a slot connected to aboutToShow(), +the widget returned is the one that is currently visible, not the +one that is about to be shown. + +

int TQWidgetStack::addWidget ( TQWidget * w, int id = -1 ) +

+Adds widget w to this stack of widgets, with ID id. +

If you pass an id >= 0 this ID is used. If you pass an id of +-1 (the default), the widgets will be numbered automatically. If +you pass -2 a unique negative integer will be generated. No widget +has an ID of -1. Returns the ID or -1 on failure (e.g. w is 0). +

If you pass an id that is already used, then a unique negative +integer will be generated to prevent two widgets having the same +id. +

If w already exists in the stack the widget will be removed first. +

If w is not a child of this TQWidgetStack moves it using +reparent(). + +

Example: xform/xform.cpp. +

int TQWidgetStack::id ( TQWidget * widget ) const +

+Returns the ID of the widget. Returns -1 if widget is 0 or +is not being managed by this widget stack. +

See also widget() and addWidget(). + +

void TQWidgetStack::raiseWidget ( int id ) [slot] +

+Raises the widget with ID id to the top of the widget stack. +

See also visibleWidget(). + +

Example: xform/xform.cpp. +

void TQWidgetStack::raiseWidget ( TQWidget * w ) [slot] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Raises widget w to the top of the widget stack. + +

void TQWidgetStack::removeWidget ( TQWidget * w ) +

+Removes widget w from this stack of widgets. Does not delete w. If w is the currently visible widget, no other widget is +substituted. +

See also visibleWidget() and raiseWidget(). + +

void TQWidgetStack::setChildGeometries () [virtual protected] +

+Fixes up the children's geometries. + +

TQWidget * TQWidgetStack::visibleWidget () const +

+Returns the currently visible widget (the one at the top of the +stack), or 0 if nothing is currently being shown. +

See also aboutToShow(), id(), and raiseWidget(). + +

TQWidget * TQWidgetStack::widget ( int id ) const +

+Returns the widget with ID id. Returns 0 if this widget stack +does not manage a widget with ID id. +

See also id() and addWidget(). + + +


+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/qwindowdefs-h.html b/doc/html/qwindowdefs-h.html new file mode 100644 index 00000000..1c3be79b --- /dev/null +++ b/doc/html/qwindowdefs-h.html @@ -0,0 +1,242 @@ + + + + + +qwindowdefs.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qwindowdefs.h

+ +

This is the verbatim text of the qwindowdefs.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qwindowdefs.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of general window system dependent functions, types and
+** constants
+**
+** Created : 931029
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQWINDOWDEFS_H
+#define TQWINDOWDEFS_H
+
+#ifndef QT_H
+#include "qobjectdefs.h"
+#include "qstring.h"
+#include "qnamespace.h"
+#endif // QT_H
+
+// Class forward definitions
+
+class TQPaintDevice;
+class TQPaintDeviceMetrics;
+class TQWidget;
+class TQWidgetMapper;
+class TQDialog;
+class TQColor;
+class TQColorGroup;
+class TQPalette;
+class TQCursor;
+class TQPoint;
+class TQSize;
+class TQRect;
+class TQPointArray;
+class TQPainter;
+class TQRegion;
+class TQFont;
+class TQFontMetrics;
+class TQFontInfo;
+class TQPen;
+class TQBrush;
+class TQWMatrix;
+class TQPixmap;
+class TQBitmap;
+class TQMovie;
+class TQImage;
+class TQImageIO;
+class TQPicture;
+class TQPrinter;
+class TQAccel;
+class TQTimer;
+class TQTime;
+class TQClipboard;
+
+
+// Widget list (defined in qwidgetlist.h)
+
+class TQWidgetList;
+class TQWidgetListIt;
+
+
+// Window system dependent definitions
+
+#if defined(Q_WS_MAC)
+#if QT_MACOSX_VERSION < 0x1020
+typedef struct OpaqueEventLoopTimerRef* EventLoopTimerRef;
+typedef struct OpaqueMenuHandle *MenuRef;
+#else
+typedef struct __EventLoopTimer*        EventLoopTimerRef;
+typedef struct OpaqueMenuRef*        MenuRef;
+#endif
+
+#ifndef Q_WS_MACX
+typedef struct CGContext *CGContextRef;
+#endif
+typedef struct OpaqueWindowGroupRef *WindowGroupRef;
+typedef struct OpaqueGrafPtr *CGrafPtr;
+typedef struct OpaquePMPrintSession *PMPrintSession;
+typedef struct OpaquePMPrintSettings *PMPrintSettings;
+typedef struct OpaquePMPageFormat *PMPageFormat;
+typedef struct Point Point;
+typedef struct OpaqueEventHandlerRef*   EventHandlerRef;
+typedef struct OpaqueEventHandlerCallRef*  EventHandlerCallRef;
+typedef struct OpaqueEventRef*          EventRef;
+typedef long int OSStatus;
+typedef struct OpaqueScrapRef *ScrapRef;
+typedef struct OpaqueRgnHandle *RgnHandle;
+typedef struct OpaqueWindowPtr *WindowPtr;
+typedef WindowPtr WindowRef;
+typedef struct OpaqueGrafPtr *GWorldPtr;
+typedef GWorldPtr GrafPtr;
+typedef struct GDevice **GDHandle;
+typedef struct ColorTable ColorTable;
+typedef struct BitMap BitMap;
+typedef struct EventRecord EventRecord;
+typedef void * MSG;
+typedef int WId;
+typedef struct AEDesc AppleEvent;
+
+#endif // Q_WS_MAC
+
+#if defined(Q_WS_WIN)
+#include "qwindowdefs_win.h"
+#endif // Q_WS_WIN
+
+
+#if defined(Q_OS_TEMP)
+#include "qwinfunctions_wce.h"
+#endif // Q_OS_TEMP
+
+#if defined(Q_WS_X11)
+
+typedef struct _XDisplay Display;
+typedef union  _XEvent XEvent;
+typedef struct _XGC *GC;
+typedef struct _XRegion *Region;
+typedef unsigned long  WId;
+
+Q_EXPORT Display *qt_xdisplay();
+Q_EXPORT int	 qt_xscreen();
+Q_EXPORT WId	 qt_xrootwin(); // ### REMOVE 4.0
+Q_EXPORT WId	 qt_xrootwin( int scrn ); // ### 4.0 add default arg of -1
+Q_EXPORT GC	 qt_xget_readonly_gc( int scrn, bool monochrome );
+Q_EXPORT GC	 qt_xget_temp_gc( int scrn, bool monochrome );
+
+Q_EXPORT const char *qAppClass();		// get application class
+
+#endif // Q_WS_X11
+
+#if defined(Q_WS_QWS)
+
+typedef unsigned long  WId;
+struct TQWSEvent;
+class TQGfx;
+
+#endif // Q_WS_QWS
+
+class TQApplication;
+
+#if defined(NEEDS_QMAIN)
+#define main qMain
+#endif
+
+// Global platform-independent types and functions
+
+typedef Q_INT32 TQCOORD;				// coordinate type
+const TQCOORD TQCOORD_MAX =  2147483647;
+const TQCOORD TQCOORD_MIN = -TQCOORD_MAX - 1;
+
+typedef unsigned int TQRgb;			// RGB triplet
+
+Q_EXPORT const char *qAppName();		// get application name
+
+// Misc functions
+
+typedef void (*TQtCleanUpFunction)();
+Q_EXPORT void qAddPostRoutine( TQtCleanUpFunction );
+Q_EXPORT void qRemovePostRoutine( TQtCleanUpFunction );
+
+#if !defined(QT_CLEAN_NAMESPACE)
+// source compatibility with TQt 2.x
+typedef TQtCleanUpFunction Q_CleanUpFunction;
+#endif
+
+
+#endif // TQWINDOWDEFS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwindowsmime-members.html b/doc/html/qwindowsmime-members.html new file mode 100644 index 00000000..839174a3 --- /dev/null +++ b/doc/html/qwindowsmime-members.html @@ -0,0 +1,60 @@ + + + + + +TQWindowsMime Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWindowsMime

+ +

This is the complete list of member functions for +TQWindowsMime, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwindowsmime.html b/doc/html/qwindowsmime.html new file mode 100644 index 00000000..5cfdf4bd --- /dev/null +++ b/doc/html/qwindowsmime.html @@ -0,0 +1,196 @@ + + + + + +TQWindowsMime Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWindowsMime Class Reference

+ +

The TQWindowsMime class maps open-standard MIME to Window Clipboard formats. +More... +

#include <qmime.h> +

List of all member functions. +

Public Members

+
    +
  • TQWindowsMime ()
  • +
  • virtual ~TQWindowsMime ()
  • +
  • virtual const char * convertorName () = 0
  • +
  • virtual int countCf () = 0
  • +
  • virtual int cf ( int index ) = 0
  • +
  • virtual bool canConvert ( const char * mime, int cf ) = 0
  • +
  • virtual const char * mimeFor ( int cf ) = 0
  • +
  • virtual int cfFor ( const char * mime ) = 0
  • +
  • virtual TQByteArray convertToMime ( TQByteArray data, const char * mime, int cf ) = 0
  • +
  • virtual TQByteArray convertFromMime ( TQByteArray data, const char * mime, int cf ) = 0
  • +
+

Static Public Members

+
    +
  • void initialize ()
  • +
  • TQPtrList<TQWindowsMime> all ()
  • +
  • TQWindowsMime * convertor ( const char * mime, int cf )
  • +
  • const char * cfToMime ( int cf )
  • +
+

Detailed Description

+ + +The TQWindowsMime class maps open-standard MIME to Window Clipboard formats. + + + +

TQt's drag-and-drop and clipboard facilities use the MIME standard. +On X11, this maps trivially to the Xdnd protocol, but on Windows +although some applications use MIME types to describe clipboard +formats, others use arbitrary non-standardized naming conventions, +or unnamed built-in formats of Windows. +

By instantiating subclasses of TQWindowsMime that provide conversions +between Windows Clipboard and MIME formats, you can convert +proprietary clipboard formats to MIME formats. +

TQt has predefined support for the following Windows Clipboard formats: +

    +
  • CF_UNICODETEXT - converted to "text/plain;charset=ISO-10646-UCS-2" +and supported by TQTextDrag. +
  • CF_TEXT - converted to "text/plain;charset=system" or "text/plain" +and supported by TQTextDrag. +
  • CF_DIB - converted to "image/*", where * is +a TQt image format, +and supported by TQImageDrag. +
  • CF_HDROP - converted to "text/uri-list", +and supported by TQUriDrag. +
+

An example use of this class would be to map the Windows Metafile +clipboard format (CF_METAFILEPICT) to and from the MIME type "image/x-wmf". +This conversion might simply be adding or removing a header, or even +just passing on the data. See the +Drag-and-Drop documentation for more information +on choosing and definition MIME types. +

You can check if a MIME type is convertible using canConvert() and +can perform conversions with convertToMime() and convertFromMime(). +

See also Drag And Drop Classes, Input/Output and Networking, and Miscellaneous Classes. + +


Member Function Documentation

+

TQWindowsMime::TQWindowsMime () +

+Constructs a new conversion object, adding it to the globally accessed +list of available convertors. + +

TQWindowsMime::~TQWindowsMime () [virtual] +

+Destroys a conversion object, removing it from the global +list of available convertors. + +

TQPtrList<TQWindowsMime> TQWindowsMime::all () [static] +

+Returns a list of all currently defined TQWindowsMime objects. + +

bool TQWindowsMime::canConvert ( const char * mime, int cf ) [pure virtual] +

+ +

Returns TRUE if the convertor can convert (both ways) between +mime and cf; otherwise returns FALSE. +

All subclasses must reimplement this pure virtual function. + +

int TQWindowsMime::cf ( int index ) [pure virtual] +

+ +

Returns the Windows Clipboard format supported by this convertor +that is ordinarily at position index. This means that cf(0) +returns the first Windows Clipboard format supported, and +cf(countCf()-1) returns the last. If index is out of range the +return value is undefined. +

All subclasses must reimplement this pure virtual function. + +

int TQWindowsMime::cfFor ( const char * mime ) [pure virtual] +

+ +

Returns the Windows Clipboard type used for MIME type mime, or +0 if this convertor does not support mime. +

All subclasses must reimplement this pure virtual function. + +

const char * TQWindowsMime::cfToMime ( int cf ) [static] +

+Returns a MIME type for cf, or 0 if none exists. + +

TQByteArray TQWindowsMime::convertFromMime ( TQByteArray data, const char * mime, int cf ) [pure virtual] +

+ +

Returns data converted from MIME type mime +to Windows Clipboard format cf. +

Note that Windows Clipboard formats must all be self-terminating. The +return value may contain trailing data. +

All subclasses must reimplement this pure virtual function. + +

TQByteArray TQWindowsMime::convertToMime ( TQByteArray data, const char * mime, int cf ) [pure virtual] +

+ +

Returns data converted from Windows Clipboard format cf +to MIME type mime. +

Note that Windows Clipboard formats must all be self-terminating. The +input data may contain trailing data. +

All subclasses must reimplement this pure virtual function. + +

TQWindowsMime * TQWindowsMime::convertor ( const char * mime, int cf ) [static] +

+Returns the most-recently created TQWindowsMime that can convert +between the mime and cf formats. Returns 0 if no such convertor +exists. + +

const char * TQWindowsMime::convertorName () [pure virtual] +

+ +

Returns a name for the convertor. +

All subclasses must reimplement this pure virtual function. + +

int TQWindowsMime::countCf () [pure virtual] +

+ +

Returns the number of Windows Clipboard formats supported by this +convertor. +

All subclasses must reimplement this pure virtual function. + +

void TQWindowsMime::initialize () [static] +

+This is an internal function. + +

const char * TQWindowsMime::mimeFor ( int cf ) [pure virtual] +

+ +

Returns the MIME type used for Windows Clipboard format cf, or +0 if this convertor does not support cf. +

All subclasses must reimplement this pure virtual function. + + +


+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/qwindowsstyle-h.html b/doc/html/qwindowsstyle-h.html new file mode 100644 index 00000000..5921b03a --- /dev/null +++ b/doc/html/qwindowsstyle-h.html @@ -0,0 +1,180 @@ + + + + + +qwindowsstyle.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qwindowsstyle.h

+ +

This is the verbatim text of the qwindowsstyle.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qwindowsstyle.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of Windows-like style class
+**
+** Created : 981231
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the widgets module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQWINDOWSSTYLE_H
+#define TQWINDOWSSTYLE_H
+
+#ifndef QT_H
+#include "qcommonstyle.h"
+#endif // QT_H
+
+#if !defined(QT_NO_STYLE_WINDOWS) || defined(QT_PLUGIN)
+
+#if defined(QT_PLUGIN)
+#define Q_EXPORT_STYLE_WINDOWS
+#else
+#define Q_EXPORT_STYLE_WINDOWS Q_EXPORT
+#endif
+
+
+class Q_EXPORT_STYLE_WINDOWS TQWindowsStyle : public TQCommonStyle
+{
+    Q_OBJECT
+public:
+    TQWindowsStyle();
+    ~TQWindowsStyle();
+
+    void polish(TQApplication*);
+    void unPolish(TQApplication*);
+
+    void polish(TQWidget*);
+    void unPolish(TQWidget*);
+
+    void polish( TQPalette & );
+
+    virtual void polishPopupMenu( TQPopupMenu* );
+
+    // new stuff
+    void drawPrimitive( PrimitiveElement pe,
+			TQPainter *p,
+			const TQRect &r,
+			const TQColorGroup &cg,
+			SFlags flags = Style_Default,
+			const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawControl( ControlElement element,
+		      TQPainter *p,
+		      const TQWidget *widget,
+		      const TQRect &r,
+		      const TQColorGroup &cg,
+		      SFlags flags = Style_Default,
+		      const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawComplexControl( ComplexControl control,
+			     TQPainter* p,
+			     const TQWidget* widget,
+			     const TQRect& r,
+			     const TQColorGroup& cg,
+			     SFlags flags = Style_Default,
+#ifdef Q_QDOC
+			     SCFlags sub = SC_All,
+#else
+			     SCFlags sub = (uint)SC_All,
+#endif
+			     SCFlags subActive = SC_None,
+			     const TQStyleOption& = TQStyleOption::Default ) const;
+
+    int pixelMetric( PixelMetric metric,
+		     const TQWidget *widget = 0 ) const;
+
+    TQSize sizeFromContents( ContentsType contents,
+			    const TQWidget *widget,
+			    const TQSize &contentsSize,
+			    const TQStyleOption& = TQStyleOption::Default ) const;
+
+    int styleHint(StyleHint sh, const TQWidget *, const TQStyleOption & = TQStyleOption::Default,
+		  TQStyleHintReturn* = 0) const;
+
+    TQPixmap stylePixmap( StylePixmap stylepixmap,
+			 const TQWidget *widget = 0,
+			 const TQStyleOption& = TQStyleOption::Default ) const;
+
+    TQRect subRect( SubRect r, const TQWidget *widget ) const;
+
+
+private:
+    class Private;
+    Private *d;
+
+    // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQWindowsStyle( const TQWindowsStyle & );
+    TQWindowsStyle& operator=( const TQWindowsStyle & );
+#endif
+};
+
+#endif // QT_NO_STYLE_WINDOWS
+
+#endif // TQWINDOWSSTYLE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwindowsstyle-members.html b/doc/html/qwindowsstyle-members.html new file mode 100644 index 00000000..d917f2ce --- /dev/null +++ b/doc/html/qwindowsstyle-members.html @@ -0,0 +1,110 @@ + + + + + +TQWindowsStyle Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWindowsStyle

+ +

This is the complete list of member functions for +TQWindowsStyle, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwindowsstyle.html b/doc/html/qwindowsstyle.html new file mode 100644 index 00000000..a86171af --- /dev/null +++ b/doc/html/qwindowsstyle.html @@ -0,0 +1,67 @@ + + + + + +TQWindowsStyle Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWindowsStyle Class Reference

+ +

The TQWindowsStyle class provides a Microsoft Windows-like look and feel. +More... +

#include <qwindowsstyle.h> +

Inherits TQCommonStyle. +

Inherited by TQMacStyle and TQPlatinumStyle. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQWindowsStyle class provides a Microsoft Windows-like look and feel. +

+

This style is TQt's default GUI style on Windows. +

See also Widget Appearance and Style. + +


Member Function Documentation

+

TQWindowsStyle::TQWindowsStyle () +

+Constructs a TQWindowsStyle + + +

+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/qwindowsystem_qws-h.html b/doc/html/qwindowsystem_qws-h.html new file mode 100644 index 00000000..7e46ef33 --- /dev/null +++ b/doc/html/qwindowsystem_qws-h.html @@ -0,0 +1,621 @@ + + + + + +qwindowsystem_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qwindowsystem_qws.h

+ +

This is the verbatim text of the qwindowsystem_qws.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qwindowsystem_qws.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQt/FB central server classes
+**
+** Created : 991025
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQWINDOWSYSTEM_QWS_H
+#define TQWINDOWSYSTEM_QWS_H
+
+#ifndef QT_H
+#include "qwssocket_qws.h"
+#include "qmap.h"
+#include "qdatetime.h"
+#include "qptrlist.h"
+#include "qimage.h"
+
+#include "qwsproperty_qws.h"
+#include "qwscommand_qws.h"
+#include "qwsevent_qws.h"
+#endif // QT_H
+
+#include "qkbd_qws.h"
+
+struct SWCursorData;
+class TQWSCursor;
+class TQWSClient;
+class TQWSRegionManager;
+class TQGfx;
+class TQWSServerData;
+
+class TQWSInternalWindowInfo
+{
+
+public:
+
+    int winid;
+    unsigned int clientid;
+    TQString name;   // Corresponds to TQObject name of top-level widget
+
+};
+
+struct TQWSWindowData;
+
+class TQWSScreenSaver
+{
+public:
+    virtual ~TQWSScreenSaver();
+    virtual void restore()=0;
+    virtual bool save(int level)=0;
+};
+
+class TQWSWindow
+{
+    friend class TQWSServer;
+public:
+    TQWSWindow(int i, TQWSClient* client);
+    ~TQWSWindow();
+
+    int winId() const { return id; }
+    const TQString &name() const { return rgnName; }
+    const TQString &caption() const { return rgnCaption; }
+    TQWSClient* client() const { return c; }
+    TQRegion requested() const { return requested_region; }
+    TQRegion allocation() const { return allocated_region; }
+    bool isVisible() const { return !requested_region.isEmpty(); }
+    bool isPartiallyObscured() const { return requested_region!=allocated_region; }
+    bool isFullyObscured() const { return allocated_region.isEmpty(); }
+
+    void raise();
+    void lower();
+    void show();
+    void hide();
+    void setActiveWindow();
+
+private:
+    bool hidden() const { return requested_region.isEmpty(); }
+    bool forClient(const TQWSClient* cl) const { return cl==c; }
+
+    void setName( const TQString &n );
+    void setCaption( const TQString &c );
+
+    void addAllocation( TQWSRegionManager *, const TQRegion & );
+    void removeAllocation( TQWSRegionManager *, const TQRegion & );
+
+    int  allocationIndex() const { return alloc_region_idx; }
+    void setAllocationIndex( int i ) { alloc_region_idx = i; modified = TRUE; }
+    void updateAllocation();
+
+    void setNeedAck( bool n ) { needAck = n; }
+
+    void focus(bool get);
+    int focusPriority() const { return last_focus_time; }
+    void operation( TQWSWindowOperationEvent::Operation o );
+    void shuttingDown() { last_focus_time=0; }
+
+private:
+    int id;
+    TQString rgnName;
+    TQString rgnCaption;
+    int alloc_region_idx;
+    bool modified;
+    bool needAck;
+    bool onTop;
+    TQWSClient* c;
+    TQRegion requested_region;
+    TQRegion allocated_region;
+    TQRegion exposed;
+    int last_focus_time;
+    TQWSWindowData *d;
+};
+
+#ifndef QT_NO_SOUND
+class TQWSSoundServer;
+#ifdef QT_USE_OLD_QWS_SOUND
+class TQWSSoundServerData;
+
+class TQWSSoundServer : public TQObject {
+    Q_OBJECT
+public:
+    TQWSSoundServer(TQObject* parent);
+    ~TQWSSoundServer();
+    void playFile(const TQString& filename);
+private slots:
+    void feedDevice(int fd);
+private:
+    TQWSSoundServerData* d;
+};
+#endif
+#endif
+
+
+
+
+
+
+
+/*********************************************************************
+ *
+ * Class: TQWSServer
+ *
+ *********************************************************************/
+
+class TQWSMouseHandler;
+struct TQWSCommandStruct;
+
+#ifndef QT_NO_QWS_MULTIPROCESS
+class TQWSServer : public TQWSServerSocket
+#else
+class TQWSServer : public TQObject
+#endif
+{
+    friend class TQCopChannel;
+    friend class TQWSMouseHandler;
+    friend class TQWSWindow;
+    friend class TQWSDisplay;
+    friend class TQWSInputMethod;
+    Q_OBJECT
+
+public:
+    TQWSServer( int flags = 0, TQObject *parent=0, const char *name=0 );
+    ~TQWSServer();
+    enum ServerFlags { DisableKeyboard = 0x01,
+		       DisableMouse = 0x02 };
+
+
+    enum GUIMode { NoGui = FALSE, NormalGUI = TRUE, Server };
+
+    static void sendKeyEvent(int unicode, int keycode, int modifiers, bool isPress,
+			     bool autoRepeat);
+    static void processKeyEvent(int unicode, int keycode, int modifiers, bool isPress,
+				bool autoRepeat);
+
+#ifndef QT_NO_QWS_IM
+    enum IMState { IMStart, IMCompose, IMEnd };
+
+    void sendIMEvent( IMState state, const TQString& txt, int cpos, int selLen );
+#endif
+
+#ifndef QT_NO_QWS_KEYBOARD    
+    typedef struct KeyMap {
+	int  key_code;
+	ushort unicode;
+	ushort shift_unicode;
+	ushort ctrl_unicode;
+    };
+
+    typedef struct KeyOverride {
+	ushort scan_code;
+	KeyMap map;
+    };
+
+    static const KeyMap *keyMap();
+
+    static void setOverrideKeys( const KeyOverride* );
+
+    class KeyboardFilter
+    {
+    public:
+	virtual bool filter(int unicode, int keycode, int modifiers, 
+			    bool isPress, bool autoRepeat)=0;
+    };
+
+    static void setKeyboardFilter( KeyboardFilter *f );
+#endif    
+#ifndef QT_NO_QWS_IM
+    static void setCurrentInputMethod( TQWSInputMethod *im );
+    static void resetInputMethod();
+    static void setMicroFocus( int x, int y );
+#endif
+
+    static void setDefaultMouse( const char * );
+    static void setDefaultKeyboard( const char * );
+    static void setMaxWindowRect(const TQRect&);
+    static void sendMouseEvent(const TQPoint& pos, int state);
+
+    static void setDesktopBackground( const TQImage &img );
+    static void setDesktopBackground( const TQColor & );
+    static TQWSMouseHandler *mouseHandler();
+    static void setMouseHandler(TQWSMouseHandler*);
+#ifndef QT_NO_QWS_KEYBOARD
+    static TQWSKeyboardHandler* keyboardHandler();
+    static void setKeyboardHandler(TQWSKeyboardHandler* kh);
+#endif
+    TQWSWindow *windowAt( const TQPoint& pos );
+
+    // For debugging only at this time
+    const TQPtrList<TQWSWindow> &clientWindows() { return windows; }
+
+    void openMouse();
+    void closeMouse();
+#ifndef QT_NO_QWS_KEYBOARD
+    void openKeyboard();
+    void closeKeyboard();
+#endif
+
+    static void setScreenSaver(TQWSScreenSaver*);
+    static void setScreenSaverIntervals(int* ms);
+    static void setScreenSaverInterval(int);
+    static bool screenSaverActive();
+    static void screenSaverActivate(bool);
+
+    // the following are internal.
+    void refresh();
+    void refresh(TQRegion &);
+
+    void enablePainting(bool);
+    static void processEventQueue();
+    static TQPtrList<TQWSInternalWindowInfo> * windowList();
+
+    void sendPropertyNotifyEvent( int property, int state );
+#ifndef QT_NO_QWS_PROPERTIES
+    TQWSPropertyManager *manager() {
+	return &propertyManager;
+    }
+#endif
+    
+    static TQPoint mousePosition;
+
+    static void startup( int flags );
+    static void closedown();
+
+    static void beginDisplayReconfigure();
+    static void endDisplayReconfigure();
+
+#ifndef QT_NO_QWS_CURSOR
+    static void setCursorVisible( bool );
+    static bool isCursorVisible();
+#endif
+
+    enum WindowEvent { Create=0x0001, Destroy=0x0002, Hide=0x0004, Show=0x0008,
+		       Raise=0x0010, Lower=0x0020, Geometry=0x0040, Active = 0x0080,
+		       Name=0x0100 };
+
+signals:
+    void windowEvent( TQWSWindow *w, TQWSServer::WindowEvent e );
+
+#ifndef QT_NO_COP
+    void newChannel( const TQString& channel);
+    void removedChannel(const TQString& channel);
+
+#endif    
+private:
+#ifndef QT_NO_COP
+    static void sendTQCopEvent( TQWSClient *c, const TQCString &ch,
+			       const TQCString &msg, const TQByteArray &data,
+			       bool response = FALSE );
+#endif
+    void move_region( const TQWSRegionMoveCommand * );
+    void set_altitude( const TQWSChangeAltitudeCommand * );
+    void request_focus( const TQWSRequestFocusCommand * );
+    void request_region( int, TQRegion );
+    void destroy_region( const TQWSRegionDestroyCommand * );
+    void name_region( const TQWSRegionNameCommand * );
+    void set_identity( const TQWSIdentifyCommand * );
+#ifndef QT_NO_QWS_IM
+    void set_micro_focus( const TQWSSetMicroFocusCommand * );
+    void reset_im( const TQWSResetIMCommand * );
+    static void sendKeyEventUnfiltered(int unicode, int keycode, 
+				       int modifiers, bool isPress,
+				       bool autoRepeat);
+
+#endif
+    static void emergency_cleanup();
+
+    static TQColor *bgColor;
+    static TQImage *bgImage;
+
+    void sendMaxWindowRectEvents();
+#ifndef QT_NO_QWS_MULTIPROCESS
+    void newConnection( int socket );
+#endif
+    void invokeIdentify( const TQWSIdentifyCommand *cmd, TQWSClient *client );
+    void invokeCreate( TQWSCreateCommand *cmd, TQWSClient *client );
+    void invokeRegionName( const TQWSRegionNameCommand *cmd, TQWSClient *client );
+    void invokeRegion( TQWSRegionCommand *cmd, TQWSClient *client );
+    void invokeRegionMove( const TQWSRegionMoveCommand *cmd, TQWSClient *client );
+    void invokeRegionDestroy( const TQWSRegionDestroyCommand *cmd, TQWSClient *client );
+    void invokeSetAltitude( const TQWSChangeAltitudeCommand *cmd, TQWSClient *client );
+#ifndef QT_NO_QWS_PROPERTIES
+    void invokeAddProperty( TQWSAddPropertyCommand *cmd );
+    void invokeSetProperty( TQWSSetPropertyCommand *cmd );
+    void invokeRemoveProperty( TQWSRemovePropertyCommand *cmd );
+    void invokeGetProperty( TQWSGetPropertyCommand *cmd, TQWSClient *client );
+#endif //QT_NO_QWS_PROPERTIES
+    void invokeSetSelectionOwner( TQWSSetSelectionOwnerCommand *cmd );
+    void invokeConvertSelection( TQWSConvertSelectionCommand *cmd );
+    void invokeSetFocus( const TQWSRequestFocusCommand *cmd, TQWSClient *client );
+
+    void initIO();
+    void setFocus( TQWSWindow*, bool gain );
+#ifndef QT_NO_QWS_CURSOR
+    void invokeDefineCursor( TQWSDefineCursorCommand *cmd, TQWSClient *client );
+    void invokeSelectCursor( TQWSSelectCursorCommand *cmd, TQWSClient *client );
+#endif
+    void invokeGrabMouse( TQWSGrabMouseCommand *cmd, TQWSClient *client );
+    void invokeGrabKeyboard( TQWSGrabKeyboardCommand *cmd, TQWSClient *client );
+#ifndef QT_NO_SOUND
+    void invokePlaySound( TQWSPlaySoundCommand *cmd, TQWSClient *client );
+#endif
+#ifndef QT_NO_COP
+    void invokeRegisterChannel( TQWSQCopRegisterChannelCommand *cmd,
+				TQWSClient *client );
+    void invokeTQCopSend( TQWSQCopSendCommand *cmd, TQWSClient *client );
+#endif
+    void invokeRepaintRegion( TQWSRepaintRegionCommand *cmd, 
+			      TQWSClient *client );
+#ifndef QT_NO_QWS_IM
+        void invokeSetMicroFocus( const TQWSSetMicroFocusCommand *cmd,
+                                TQWSClient *client );
+        void invokeResetIM( const TQWSResetIMCommand *cmd,
+                                TQWSClient *client );
+#endif
+
+    TQWSMouseHandler* newMouseHandler(const TQString& spec);
+    void openDisplay();
+    void closeDisplay();
+
+    void showCursor();
+    void hideCursor();
+    void initializeCursor();
+    void paintServerRegion();
+    void paintBackground( const TQRegion & );
+    void clearRegion( const TQRegion &r, const TQColor &c );
+    void refreshBackground();
+    void resetGfx();
+
+private slots:
+#ifndef QT_NO_QWS_MULTIPROCESS
+    void clientClosed();
+    void doClient();
+    void deleteWindowsLater();
+#endif
+
+    void screenSaverWake();
+    void screenSaverSleep();
+    void screenSaverTimeout();
+
+private:
+    void disconnectClient( TQWSClient * );
+    void screenSave(int level);
+    void doClient( TQWSClient * );
+    typedef TQMapIterator<int,TQWSClient*> ClientIterator;
+    typedef TQMap<int,TQWSClient*> ClientMap;
+    void releaseMouse(TQWSWindow* w);
+    void releaseKeyboard(TQWSWindow* w);
+    void updateClientCursorPos();
+
+    uchar* sharedram;
+    int ramlen;
+
+    TQGfx *gfx;
+
+    ClientMap client;
+#ifndef QT_NO_QWS_PROPERTIES
+    TQWSPropertyManager propertyManager;
+#endif
+    struct SelectionOwner {
+	int windowid;
+	struct Time {
+	    void set( int h, int m, int s, int s2 ) {
+		hour = h; minute = m; sec = s; ms = s2;
+	    }
+	    int hour, minute, sec, ms;
+	} time;
+    } selectionOwner;
+    TQTime timer;
+    TQWSServerData* d;
+    int* screensaverinterval;
+
+    TQWSWindow *focusw;
+    TQWSWindow *mouseGrabber;
+    bool mouseGrabbing;
+    int swidth, sheight, sdepth;
+#ifndef QT_NO_QWS_CURSOR
+    bool haveviscurs;
+    TQWSCursor *cursor;	    // cursor currently shown
+    TQWSCursor *nextCursor;  // cursor to show once grabbing is off
+#endif
+    TQRegion screenRegion;   // the entire display region
+    TQRegion serverRegion;
+    TQRegion dirtyBackground;
+    bool disablePainting;
+    TQPtrList<TQWSMouseHandler> mousehandlers;
+#ifndef QT_NO_QWS_KEYBOARD
+    TQPtrList<TQWSKeyboardHandler> keyboardhandlers;
+#endif
+
+    TQPtrList<TQWSCommandStruct> commandQueue;
+    TQWSRegionManager *rgnMan;
+
+    // Window management
+    TQPtrList<TQWSWindow> windows; // first=topmost
+    TQWSWindow* newWindow(int id, TQWSClient* client);
+    TQWSWindow* findWindow(int windowid, TQWSClient* client);
+    void moveWindowRegion(TQWSWindow*, int dx, int dy );
+    TQRegion setWindowRegion(TQWSWindow*, TQRegion r );
+    void raiseWindow( TQWSWindow *, int = 0);
+    void lowerWindow( TQWSWindow *, int = -1);
+    void exposeRegion( TQRegion , int index = 0 );
+    void notifyModified( TQWSWindow *active = 0 );
+    void syncRegions( TQWSWindow *active = 0 );
+
+    void setCursor(TQWSCursor *curs);
+
+    // multimedia
+#ifndef QT_NO_SOUND
+    TQWSSoundServer *soundserver;
+#endif
+#ifndef QT_NO_COP
+    TQMap<TQString, TQPtrList<TQWSClient> > channels;
+#endif
+#ifndef QT_NO_QWS_IM
+    bool microF;
+    int microX;
+    int microY;
+#endif
+};
+
+extern TQWSServer *qwsServer; //there can be only one
+
+
+#ifndef QT_NO_QWS_IM
+    class TQWSInputMethod
+    {
+    public:
+	TQWSInputMethod();
+	virtual ~TQWSInputMethod();
+	virtual bool filter(int unicode, int keycode, int modifiers, 
+			    bool isPress, bool autoRepeat)=0;
+	virtual void reset();
+	virtual void setMicroFocus( int x, int y );
+	virtual void setFont( const TQFont& );
+    protected:
+	void sendIMEvent( TQWSServer::IMState, const TQString& txt, int cpos, int selLen = 0 );
+	//void sendKeyEvent( int unicode, int keycode, int modifiers, 
+	//		    bool isPress, bool autoRepeat);
+    };
+
+inline void TQWSInputMethod::sendIMEvent( TQWSServer::IMState state, const TQString &txt, int cpos, int selLen )
+{
+    qwsServer->sendIMEvent( state, txt, cpos, selLen );
+
+}
+
+
+#endif
+
+
+
+
+/*********************************************************************
+ *
+ * Class: TQWSClient
+ *
+ *********************************************************************/
+
+struct TQWSMouseEvent;
+
+typedef TQMap<int, TQWSCursor*> TQWSCursorMap;
+
+class TQWSClient : public TQObject
+{
+    Q_OBJECT
+public:
+    TQWSClient( TQObject* parent, int socket, int id );
+    ~TQWSClient();
+
+    int socket() const;
+
+    void setIdentity(const TQString&);
+    TQString identity() const { return id; }
+
+    void sendEvent( TQWSEvent* event );
+    void sendConnectedEvent( const char *display_spec );
+    void sendMaxWindowRectEvent();
+    void sendRegionModifyEvent( int winid, TQRegion exposed, bool ack );
+    void sendFocusEvent( int winid, bool get );
+    void sendPropertyNotifyEvent( int property, int state );
+    void sendPropertyReplyEvent( int property, int len, char *data );
+    void sendSelectionClearEvent( int windowid );
+    void sendSelectionRequestEvent( TQWSConvertSelectionCommand *cmd, int windowid );
+    TQWSCommand* readMoreCommand();
+
+    int clientId() const { return cid; }
+
+    TQWSCursorMap cursors;	// cursors defined by this client
+signals:
+    void connectionClosed();
+    void readyRead();
+private slots:
+    void closeHandler();
+    void errorHandler( int );
+private:
+    int s; // XXX csocket->d->socket->socket() is this value
+#ifndef QT_NO_QWS_MULTIPROCESS
+    TQWSSocket *csocket;
+#endif
+    TQWSCommand* command;
+    uint isClosed : 1;
+    TQString id;
+    int cid;
+};
+
+#endif // TQWINDOWSYSTEM_QWS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwizard-h.html b/doc/html/qwizard-h.html new file mode 100644 index 00000000..9695054a --- /dev/null +++ b/doc/html/qwizard-h.html @@ -0,0 +1,187 @@ + + + + + +qwizard.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qwizard.h

+ +

This is the verbatim text of the qwizard.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qwizard.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of the TQWizard class.
+**
+** Created : 990101
+**
+** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the dialogs 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 retquirements 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 TQWIZARDDIALOG_H
+#define TQWIZARDDIALOG_H
+
+
+#ifndef QT_H
+#include "qdialog.h"
+#endif // QT_H
+
+#ifndef QT_NO_WIZARD
+
+class TQHBoxLayout;
+class TQWizardPrivate;
+
+class Q_EXPORT TQWizard : public TQDialog
+{
+    Q_OBJECT
+    Q_PROPERTY( TQFont titleFont READ titleFont WRITE setTitleFont )
+
+public:
+    TQWizard( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+	     WFlags f=0 );
+    ~TQWizard();
+
+    void show();
+
+    void setFont( const TQFont & font );
+
+    virtual void addPage( TQWidget *, const TQString & );
+    virtual void insertPage( TQWidget*, const TQString&, int );
+    virtual void removePage( TQWidget * );
+
+    TQString title( TQWidget * ) const;
+    void setTitle( TQWidget *, const TQString & );
+    TQFont titleFont() const;
+    void setTitleFont( const TQFont & );
+
+    virtual void showPage( TQWidget * );
+
+    TQWidget * currentPage() const;
+
+    TQWidget* page( int ) const;
+    int pageCount() const;
+    int indexOf( TQWidget* ) const;
+
+    virtual bool appropriate( TQWidget * ) const;
+    virtual void setAppropriate( TQWidget *, bool );
+
+    TQPushButton * backButton() const;
+    TQPushButton * nextButton() const;
+    TQPushButton * finishButton() const;
+    TQPushButton * cancelButton() const;
+    TQPushButton * helpButton() const;
+
+    bool eventFilter( TQObject *, TQEvent * );
+
+public slots:
+    virtual void setBackEnabled( TQWidget *, bool );
+    virtual void setNextEnabled( TQWidget *, bool );
+    virtual void setFinishEnabled( TQWidget *, bool );
+
+    virtual void setHelpEnabled( TQWidget *, bool );
+
+    // obsolete
+    virtual void setFinish(  TQWidget *, bool ) {}
+
+protected slots:
+    virtual void back();
+    virtual void next();
+    virtual void help();
+
+signals:
+    void helpClicked();
+    void selected( const TQString& );
+
+protected:
+    virtual void layOutButtonRow( TQHBoxLayout * );
+    virtual void layOutTitleRow( TQHBoxLayout *, const TQString & );
+
+private:
+    void setBackEnabled( bool );
+    void setNextEnabled( bool );
+
+    void setHelpEnabled( bool );
+
+    void setNextPage( TQWidget * );
+
+    void updateButtons();
+
+    void layOut();
+
+    TQWizardPrivate *d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQWizard( const TQWizard & );
+    TQWizard& operator=( const TQWizard & );
+#endif
+};
+
+#endif // QT_NO_WIZARD
+
+#endif // TQWIZARD_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwizard-members.html b/doc/html/qwizard-members.html new file mode 100644 index 00000000..51626ee5 --- /dev/null +++ b/doc/html/qwizard-members.html @@ -0,0 +1,383 @@ + + + + + +TQWizard Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWizard

+ +

This is the complete list of member functions for +TQWizard, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwizard.html b/doc/html/qwizard.html new file mode 100644 index 00000000..4420c040 --- /dev/null +++ b/doc/html/qwizard.html @@ -0,0 +1,337 @@ + + + + + +TQWizard Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWizard Class Reference

+ +

The TQWizard class provides a framework for wizard dialogs. +More... +

#include <qwizard.h> +

Inherits TQDialog. +

List of all member functions. +

Public Members

+
    +
  • TQWizard ( TQWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 )
  • +
  • ~TQWizard ()
  • +
  • virtual void addPage ( TQWidget * page, const TQString & title )
  • +
  • virtual void insertPage ( TQWidget * page, const TQString & title, int index )
  • +
  • virtual void removePage ( TQWidget * page )
  • +
  • TQString title ( TQWidget * page ) const
  • +
  • void setTitle ( TQWidget * page, const TQString & title )
  • +
  • TQFont titleFont () const
  • +
  • void setTitleFont ( const TQFont & )
  • +
  • virtual void showPage ( TQWidget * page )
  • +
  • TQWidget * currentPage () const
  • +
  • TQWidget * page ( int index ) const
  • +
  • int pageCount () const
  • +
  • int indexOf ( TQWidget * page ) const
  • +
  • virtual bool appropriate ( TQWidget * page ) const
  • +
  • virtual void setAppropriate ( TQWidget * page, bool appropriate )
  • +
  • TQPushButton * backButton () const
  • +
  • TQPushButton * nextButton () const
  • +
  • TQPushButton * finishButton () const
  • +
  • TQPushButton * cancelButton () const
  • +
  • TQPushButton * helpButton () const
  • +
+

Public Slots

+
    +
  • virtual void setBackEnabled ( TQWidget * page, bool enable )
  • +
  • virtual void setNextEnabled ( TQWidget * page, bool enable )
  • +
  • virtual void setFinishEnabled ( TQWidget * page, bool enable )
  • +
  • virtual void setHelpEnabled ( TQWidget * page, bool enable )
  • +
  • virtual void setFinish ( TQWidget *, bool )  (obsolete)
  • +
+

Signals

+ +

Properties

+
    +
  • TQFont titleFont - the font used for page titles
  • +
+

Protected Members

+ +

Protected Slots

+
    +
  • virtual void back ()
  • +
  • virtual void next ()
  • +
  • virtual void help ()
  • +
+

Detailed Description

+ + +The TQWizard class provides a framework for wizard dialogs. +

+ + + +

A wizard is a special type of input dialog that consists of a +sequence of dialog pages. A wizard's purpose is to walk the user +through a process step by step. Wizards are useful for complex or +infrequently occurring tasks that people may find difficult to +learn or do. +

TQWizard provides page titles and displays Next, Back, Finish, +Cancel, and Help push buttons, as appropriate to the current +position in the page sequence. These buttons can be +enabled/disabled using setBackEnabled(), setNextEnabled(), +setFinishEnabled() and setHelpEnabled(). +

Create and populate dialog pages that inherit from TQWidget and add +them to the wizard using addPage(). Use insertPage() to add a +dialog page at a certain position in the page sequence. Use +removePage() to remove a page from the page sequence. +

Use currentPage() to retrieve a pointer to the currently displayed +page. page() returns a pointer to the page at a certain position +in the page sequence. +

Use pageCount() to retrieve the total number of pages in the page +sequence. indexOf() will return the index of a page in the page +sequence. +

TQWizard provides functionality to mark pages as appropriate (or +not) in the current context with setAppropriate(). The idea is +that a page may be irrelevant and should be skipped depending on +the data entered by the user on a preceding page. +

It is generally considered good design to provide a greater number +of simple pages with fewer choices rather than a smaller number of +complex pages. +

Example code is available here: wizard/wizard.cpp wizard/wizard.h +

A TQWizard page

A TQWizard page +

+

See also Abstract Widget Classes, Dialog Classes, and Organizers. + +


Member Function Documentation

+

TQWizard::TQWizard ( TQWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0 ) +

+Constructs an empty wizard dialog. The parent, name, modal and f arguments are passed to the TQDialog constructor. + +

TQWizard::~TQWizard () +

+Destroys the object and frees any allocated resources, including +all pages and controllers. + +

void TQWizard::addPage ( TQWidget * page, const TQString & title ) [virtual] +

+Adds page to the end of the page sequence, with the title, title. + +

bool TQWizard::appropriate ( TQWidget * page ) const [virtual] +

+Called when the Next button is clicked; this virtual function +returns TRUE if page is relevant for display in the current +context; otherwise it is ignored by TQWizard and returns FALSE. The +default implementation returns the value set using +setAppropriate(). The ultimate default is TRUE. +

Warning: The last page of the wizard will be displayed if no page +is relevant in the current context. + +

void TQWizard::back () [virtual protected slot] +

+Called when the user clicks the Back button; this function shows +the preceding relevant page in the sequence. +

See also appropriate(). + +

TQPushButton * TQWizard::backButton () const +

+Returns a pointer to the dialog's Back button +

By default, this button is connected to the back() slot, which is +virtual so you can reimplement it in a TQWizard subclass. Use +setBackEnabled() to enable/disable this button. + +

TQPushButton * TQWizard::cancelButton () const +

+Returns a pointer to the dialog's Cancel button +

By default, this button is connected to the TQDialog::reject() +slot, which is virtual so you can reimplement it in a TQWizard +subclass. + +

TQWidget * TQWizard::currentPage () const +

+Returns a pointer to the current page in the sequence. Although +the wizard does its best to make sure that this value is never 0, +it can be if you try hard enough. + +

TQPushButton * TQWizard::finishButton () const +

+Returns a pointer to the dialog's Finish button +

By default, this button is connected to the TQDialog::accept() +slot, which is virtual so you can reimplement it in a TQWizard +subclass. Use setFinishEnabled() to enable/disable this button. + +

void TQWizard::help () [virtual protected slot] +

+Called when the user clicks the Help button, this function emits +the helpClicked() signal. + +

TQPushButton * TQWizard::helpButton () const +

+Returns a pointer to the dialog's Help button +

By default, this button is connected to the help() slot, which is +virtual so you can reimplement it in a TQWizard subclass. Use +setHelpEnabled() to enable/disable this button. + +

void TQWizard::helpClicked () [signal] +

+ +

This signal is emitted when the user clicks on the Help button. + +

int TQWizard::indexOf ( TQWidget * page ) const +

+Returns the position of page page. If the page is not part of +the wizard -1 is returned. + +

void TQWizard::insertPage ( TQWidget * page, const TQString & title, int index ) [virtual] +

+Inserts page at position index into the page sequence, with +title title. If index is -1, the page will be appended to +the end of the wizard's page sequence. + +

void TQWizard::layOutButtonRow ( TQHBoxLayout * layout ) [virtual protected] +

+This virtual function is responsible for adding the buttons below +the bottom divider. +

layout is the horizontal layout of the entire wizard. + +

void TQWizard::layOutTitleRow ( TQHBoxLayout * layout, const TQString & title ) [virtual protected] +

+This virtual function is responsible for laying out the title row. +

layout is the horizontal layout for the wizard, and title is the title for this page. This function is called every +time title changes. + +

void TQWizard::next () [virtual protected slot] +

+Called when the user clicks the Next button, this function shows +the next relevant page in the sequence. +

See also appropriate(). + +

TQPushButton * TQWizard::nextButton () const +

+Returns a pointer to the dialog's Next button +

By default, this button is connected to the next() slot, which is +virtual so you can reimplement it in a TQWizard subclass. Use +setNextEnabled() to enable/disable this button. + +

TQWidget * TQWizard::page ( int index ) const +

+Returns a pointer to the page at position index in the +sequence, or 0 if index is out of range. The first page has +index 0. + +

int TQWizard::pageCount () const +

+Returns the number of pages in the wizard. + +

void TQWizard::removePage ( TQWidget * page ) [virtual] +

+Removes page from the page sequence but does not delete the +page. If page is currently being displayed, TQWizard will +display the page that precedes it, or the first page if this was +the first page. + +

void TQWizard::selected ( const TQString & ) [signal] +

+ +

This signal is emitted when the current page changes. The +parameter contains the title of the selected page. + +

void TQWizard::setAppropriate ( TQWidget * page, bool appropriate ) [virtual] +

+If appropriate is TRUE then page page is considered relevant +in the current context and should be displayed in the page +sequence; otherwise page should not be displayed in the page +sequence. +

See also appropriate(). + +

void TQWizard::setBackEnabled ( TQWidget * page, bool enable ) [virtual slot] +

+If enable is TRUE, page page has a Back button; otherwise page has no Back button. By default all pages have this button. + +

void TQWizard::setFinish ( TQWidget *, bool ) [virtual slot] +

+ +This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Use setFinishEnabled instead + +

void TQWizard::setFinishEnabled ( TQWidget * page, bool enable ) [virtual slot] +

+If enable is TRUE, page page has a Finish button; otherwise +page has no Finish button. By default no page has this +button. + +

void TQWizard::setHelpEnabled ( TQWidget * page, bool enable ) [virtual slot] +

+If enable is TRUE, page page has a Help button; otherwise page has no Help button. By default all pages have this button. + +

void TQWizard::setNextEnabled ( TQWidget * page, bool enable ) [virtual slot] +

+If enable is TRUE, page page has a Next button; otherwise +the Next button on page is disabled. By default all pages have +this button. + +

void TQWizard::setTitle ( TQWidget * page, const TQString & title ) +

+Sets the title for page page to title. + +

void TQWizard::setTitleFont ( const TQFont & ) +

Sets the font used for page titles. +See the "titleFont" property for details. +

void TQWizard::showPage ( TQWidget * page ) [virtual] +

+Makes page the current page and emits the selected() signal. +

This virtual function is called whenever a different page is to +be shown, including the first time the TQWizard is shown. +By reimplementing it (and calling TQWizard::showPage()), +you can prepare each page prior to it being shown. + +

Examples: distributor/distributor.ui.h and wizard/wizard.cpp. +

TQString TQWizard::title ( TQWidget * page ) const +

+Returns the title of page page. + +

TQFont TQWizard::titleFont () const +

Returns the font used for page titles. +See the "titleFont" property for details. +


Property Documentation

+

TQFont titleFont

+

This property holds the font used for page titles. +

The default is TQApplication::font(). + +

Set this property's value with setTitleFont() and get this property's value with titleFont(). + +


+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/qwizard.png b/doc/html/qwizard.png new file mode 100644 index 00000000..2824bffe Binary files /dev/null and b/doc/html/qwizard.png differ diff --git a/doc/html/qwmatrix-h.html b/doc/html/qwmatrix-h.html new file mode 100644 index 00000000..6893311d --- /dev/null +++ b/doc/html/qwmatrix-h.html @@ -0,0 +1,174 @@ + + + + + +qwmatrix.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qwmatrix.h

+ +

This is the verbatim text of the qwmatrix.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qwmatrix.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQWMatrix class
+**
+** Created : 941020
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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 TQWMATRIX_H
+#define TQWMATRIX_H
+
+#ifndef QT_H
+#include "qwindowdefs.h"
+#include "qpointarray.h"
+#include "qrect.h"
+#include "qregion.h"
+#endif // QT_H
+
+#ifndef QT_NO_WMATRIX
+
+
+class Q_EXPORT TQWMatrix					// 2D transform matrix
+{
+public:
+    TQWMatrix();
+    TQWMatrix( double m11, double m12, double m21, double m22,
+	      double dx, double dy );
+
+    void	setMatrix( double m11, double m12, double m21, double m22,
+			   double dx,  double dy );
+
+    double	m11() const { return _m11; }
+    double	m12() const { return _m12; }
+    double	m21() const { return _m21; }
+    double	m22() const { return _m22; }
+    double	dx()  const { return _dx; }
+    double	dy()  const { return _dy; }
+
+    void	map( int x, int y, int *tx, int *ty )	      const;
+    void	map( double x, double y, double *tx, double *ty ) const;
+    TQRect	mapRect( const TQRect & )	const;
+
+    TQPoint	map( const TQPoint &p )	const { return operator *( p ); }
+    TQRect	map( const TQRect &r )	const { return mapRect ( r ); }
+    TQPointArray map( const TQPointArray &a ) const { return operator * ( a ); }
+    TQRegion     map( const TQRegion &r ) const { return operator *( r ); }
+    TQRegion     mapToRegion( const TQRect &r ) const { return operator *( r ); }
+    TQPointArray	mapToPolygon( const TQRect &r )	const;
+
+    void	reset();
+    bool	isIdentity() const;
+
+    TQWMatrix   &translate( double dx, double dy );
+    TQWMatrix   &scale( double sx, double sy );
+    TQWMatrix   &shear( double sh, double sv );
+    TQWMatrix   &rotate( double a );
+
+    bool isInvertible() const { return (_m11*_m22 - _m12*_m21) != 0; }
+    double det() const { return _m11*_m22 - _m12*_m21; }
+
+    TQWMatrix	invert( bool * = 0 ) const;
+
+    bool	operator==( const TQWMatrix & ) const;
+    bool	operator!=( const TQWMatrix & ) const;
+    TQWMatrix   &operator*=( const TQWMatrix & );
+
+    /* we use matrix multiplication semantics here */
+    TQPoint operator * (const TQPoint & ) const;
+    TQRegion operator * (const TQRect & ) const;
+    TQRegion operator * (const TQRegion & ) const;
+    TQPointArray operator *  ( const TQPointArray &a ) const;
+
+    enum TransformationMode {
+	Points, Areas
+    };
+    static void setTransformationMode( TQWMatrix::TransformationMode m );
+    static TransformationMode transformationMode();
+private:
+    double	_m11, _m12;
+    double	_m21, _m22;
+    double	_dx,  _dy;
+};
+
+Q_EXPORT TQWMatrix operator*( const TQWMatrix &, const TQWMatrix & );
+
+
+/*****************************************************************************
+  TQWMatrix stream functions
+ *****************************************************************************/
+
+Q_EXPORT TQDataStream &operator<<( TQDataStream &, const TQWMatrix & );
+Q_EXPORT TQDataStream &operator>>( TQDataStream &, TQWMatrix & );
+
+
+#endif // QT_NO_WMATRIX
+
+#endif // TQWMATRIX_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwmatrix-members.html b/doc/html/qwmatrix-members.html new file mode 100644 index 00000000..f1a683c4 --- /dev/null +++ b/doc/html/qwmatrix-members.html @@ -0,0 +1,72 @@ + + + + + +TQWMatrix Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWMatrix

+ +

This is the complete list of member functions for +TQWMatrix, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwmatrix.html b/doc/html/qwmatrix.html new file mode 100644 index 00000000..10488978 --- /dev/null +++ b/doc/html/qwmatrix.html @@ -0,0 +1,449 @@ + + + + + +TQWMatrix Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWMatrix Class Reference

+ +

The TQWMatrix class specifies 2D transformations of a +coordinate system. +More... +

#include <qwmatrix.h> +

List of all member functions. +

Public Members

+
    +
  • TQWMatrix ()
  • +
  • TQWMatrix ( double m11, double m12, double m21, double m22, double dx, double dy )
  • +
  • void setMatrix ( double m11, double m12, double m21, double m22, double dx, double dy )
  • +
  • double m11 () const
  • +
  • double m12 () const
  • +
  • double m21 () const
  • +
  • double m22 () const
  • +
  • double dx () const
  • +
  • double dy () const
  • +
  • void map ( int x, int y, int * tx, int * ty ) const
  • +
  • void map ( double x, double y, double * tx, double * ty ) const
  • +
  • TQRect mapRect ( const TQRect & rect ) const
  • +
  • TQPoint map ( const TQPoint & p ) const
  • +
  • TQRect map ( const TQRect & r ) const  (obsolete)
  • +
  • TQPointArray map ( const TQPointArray & a ) const
  • +
  • TQRegion map ( const TQRegion & r ) const
  • +
  • TQRegion mapToRegion ( const TQRect & rect ) const
  • +
  • TQPointArray mapToPolygon ( const TQRect & rect ) const
  • +
  • void reset ()
  • +
  • bool isIdentity () const
  • +
  • TQWMatrix & translate ( double dx, double dy )
  • +
  • TQWMatrix & scale ( double sx, double sy )
  • +
  • TQWMatrix & shear ( double sh, double sv )
  • +
  • TQWMatrix & rotate ( double a )
  • +
  • bool isInvertible () const
  • +
  • double det () const
  • +
  • TQWMatrix invert ( bool * invertible = 0 ) const
  • +
  • bool operator== ( const TQWMatrix & m ) const
  • +
  • bool operator!= ( const TQWMatrix & m ) const
  • +
  • TQWMatrix & operator*= ( const TQWMatrix & m )
  • +
  • enum TransformationMode { Points, Areas }
  • +
+

Static Public Members

+ +

Related Functions

+
    +
  • TQDataStream & operator<< ( TQDataStream & s, const TQWMatrix & m )
  • +
  • TQDataStream & operator>> ( TQDataStream & s, TQWMatrix & m )
  • +
+

Detailed Description

+ + +The TQWMatrix class specifies 2D transformations of a +coordinate system. +

+ +

The standard coordinate system of a paint + device has the origin located at the top-left position. X +values increase to the right; Y values increase downward. +

This coordinate system is the default for the TQPainter, which +renders graphics in a paint device. A user-defined coordinate +system can be specified by setting a TQWMatrix for the painter. +

Example: +

+        MyWidget::paintEvent( TQPaintEvent * )
+        {
+            TQPainter p;                      // our painter
+            TQWMatrix m;                      // our transformation matrix
+            m.rotate( 22.5 );                // rotated coordinate system
+            p.begin( this );                 // start painting
+            p.setWorldMatrix( m );           // use rotated coordinate system
+            p.drawText( 30,20, "detator" );  // draw rotated text at 30,20
+            p.end();                         // painting done
+        }
+    
+ +

A matrix specifies how to translate, scale, shear or rotate the +graphics; the actual transformation is performed by the drawing +routines in TQPainter and by TQPixmap::xForm(). +

The TQWMatrix class contains a 3x3 matrix of the form: + + + + +
m11m12 0
m21m22 0
dx dy  1
+

A matrix transforms a point in the plane to another point: +

+        x' = m11*x + m21*y + dx
+        y' = m22*y + m12*x + dy
+    
+ +

The point (x, y) is the original point, and (x', y') is the +transformed point. (x', y') can be transformed back to (x, y) by performing the same operation on the inverted matrix. +

The elements dx and dy specify horizontal and vertical +translation. The elements m11 and m22 specify horizontal and +vertical scaling. The elements m12 and m21 specify +horizontal and vertical shearing. +

The identity matrix has m11 and m22 set to 1; all others are +set to 0. This matrix maps a point to itself. +

Translation is the simplest transformation. Setting dx and dy will move the coordinate system dx units along the X axis +and dy units along the Y axis. +

Scaling can be done by setting m11 and m22. For example, +setting m11 to 2 and m22 to 1.5 will double the height and +increase the width by 50%. +

Shearing is controlled by m12 and m21. Setting these +elements to values different from zero will twist the coordinate +system. +

Rotation is achieved by carefully setting both the shearing +factors and the scaling factors. The TQWMatrix also has a function +that sets rotation directly. +

TQWMatrix lets you combine transformations like this: +

+        TQWMatrix m;           // identity matrix
+        m.translate(10, -20); // first translate (10,-20)
+        m.rotate(25);         // then rotate 25 degrees
+        m.scale(1.2, 0.7);    // finally scale it
+    
+ +

Here's the same example using basic matrix operations: +

+        double a    = pi/180 * 25;         // convert 25 to radians
+        double sina = sin(a);
+        double cosa = cos(a);
+        TQWMatrix m1(1, 0, 0, 1, 10, -20);  // translation matrix
+        TQWMatrix m2( cosa, sina,           // rotation matrix
+                    -sina, cosa, 0, 0 );
+        TQWMatrix m3(1.2, 0, 0, 0.7, 0, 0); // scaling matrix
+        TQWMatrix m;
+        m = m3 * m2 * m1;                  // combine all transformations
+    
+ +

TQPainter has functions to translate, scale, shear and rotate the +coordinate system without using a TQWMatrix. Although these +functions are very convenient, it can be more efficient to build a +TQWMatrix and call TQPainter::setWorldMatrix() if you want to perform +more than a single transform operation. +

See also TQPainter::setWorldMatrix(), TQPixmap::xForm(), Graphics Classes, and Image Processing Classes. + +


Member Type Documentation

+

TQWMatrix::TransformationMode

+ +

+

TQWMatrix offers two transformation modes. Calculations can either +be done in terms of points (Points mode, the default), or in +terms of area (Area mode). +

In Points mode the transformation is applied to the points that +mark out the shape's bounding line. In Areas mode the +transformation is applied in such a way that the area of the +contained region is correctly transformed under the matrix. +

    +
  • TQWMatrix::Points - transformations are applied to the shape's points. +
  • TQWMatrix::Areas - transformations are applied (e.g. to the width and +height) so that the area is transformed. +

Example: +

Suppose we have a rectangle, +TQRect( 10, 20, 30, 40 ) and a transformation matrix +TQWMatrix( 2, 0, 0, 2, 0, 0 ) to double the rectangle's size. +

In Points mode, the matrix will transform the top-left (10,20) and +the bottom-right (39,59) points producing a rectangle with its +top-left point at (20,40) and its bottom-right point at (78,118), +i.e. with a width of 59 and a height of 79. +

In Areas mode, the matrix will transform the top-left point in +the same way as in Points mode to (20/40), and double the width +and height, so the bottom-right will become (69,99), i.e. a width +of 60 and a height of 80. +

Because integer arithmetic is used (for speed), rounding +differences mean that the modes will produce slightly different +results given the same shape and the same transformation, +especially when scaling up. This also means that some operations +are not commutative. +

Under Points mode, matrix * ( region1 | region2 ) is not equal to +matrix * region1 | matrix * region2. Under Area mode, matrix * (pointarray[i]) is not neccesarily equal to +(matrix * pointarry)[i]. +

Comparison of Points and Areas TransformationModes
+

Member Function Documentation

+

TQWMatrix::TQWMatrix () +

+Constructs an identity matrix. All elements are set to zero except +m11 and m22 (scaling), which are set to 1. + +

TQWMatrix::TQWMatrix ( double m11, double m12, double m21, double m22, double dx, double dy ) +

+Constructs a matrix with the elements, m11, m12, m21, m22, dx and dy. + +

double TQWMatrix::det () const +

+ +

Returns the matrix's determinant. + +

double TQWMatrix::dx () const +

+ +

Returns the horizontal translation. + +

double TQWMatrix::dy () const +

+ +

Returns the vertical translation. + +

TQWMatrix TQWMatrix::invert ( bool * invertible = 0 ) const +

+Returns the inverted matrix. +

If the matrix is singular (not invertible), the identity matrix is +returned. +

If invertible is not 0: the value of *invertible is set +to TRUE if the matrix is invertible; otherwise *invertible is +set to FALSE. +

See also isInvertible(). + +

Example: t14/cannon.cpp. +

bool TQWMatrix::isIdentity () const +

+Returns TRUE if the matrix is the identity matrix; otherwise returns FALSE. +

See also reset(). + +

bool TQWMatrix::isInvertible () const +

+ +

Returns TRUE if the matrix is invertible; otherwise returns FALSE. +

See also invert(). + +

double TQWMatrix::m11 () const +

+ +

Returns the X scaling factor. + +

double TQWMatrix::m12 () const +

+ +

Returns the vertical shearing factor. + +

double TQWMatrix::m21 () const +

+ +

Returns the horizontal shearing factor. + +

double TQWMatrix::m22 () const +

+ +

Returns the Y scaling factor. + +

void TQWMatrix::map ( int x, int y, int * tx, int * ty ) const +

+Transforms ( x, y ) to ( *tx, *ty ) using the formulae: +

+        *tx = m11*x + m21*y + dx  (rounded to the nearest integer)
+        *ty = m22*y + m12*x + dy  (rounded to the nearest integer)
+    
+ + +

Examples: t14/cannon.cpp and xform/xform.cpp. +

void TQWMatrix::map ( double x, double y, double * tx, double * ty ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Transforms ( x, y ) to ( *tx, *ty ) using the +following formulae: +

+        *tx = m11*x + m21*y + dx
+        *ty = m22*y + m12*x + dy
+    
+ + +

TQPoint TQWMatrix::map ( const TQPoint & p ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Transforms p to using the formulae: +

+        retx = m11*px + m21*py + dx  (rounded to the nearest integer)
+        rety = m22*py + m12*px + dy  (rounded to the nearest integer)
+    
+ + +

TQRect TQWMatrix::map ( const TQRect & r ) const +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Please use TQWMatrix::mapRect() instead. +

Note that this method does return the bounding rectangle of the r, when +shearing or rotations are used. + +

TQPointArray TQWMatrix::map ( const TQPointArray & a ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns the point array a transformed by calling map for each point. + +

TQRegion TQWMatrix::map ( const TQRegion & r ) const +

+ +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Transforms the region r. +

Calling this method can be rather expensive, if rotations or +shearing are used. + +

TQRect TQWMatrix::mapRect ( const TQRect & rect ) const +

+Returns the transformed rectangle rect. +

The bounding rectangle is returned if rotation or shearing has +been specified. +

If you need to know the exact region rect maps to use operator*(). +

See also operator*(). + +

Example: xform/xform.cpp. +

TQPointArray TQWMatrix::mapToPolygon ( const TQRect & rect ) const +

+Returns the transformed rectangle rect as a polygon. +

Polygons and rectangles behave slightly differently +when transformed (due to integer rounding), so +matrix.map( TQPointArray( rect ) ) is not always the same as +matrix.mapToPolygon( rect ). + +

TQRegion TQWMatrix::mapToRegion ( const TQRect & rect ) const +

+ +

Returns the transformed rectangle rect. +

A rectangle which has been rotated or sheared may result in a +non-rectangular region being returned. +

Calling this method can be expensive, if rotations or shearing are +used. If you just need to know the bounding rectangle of the +returned region, use mapRect() which is a lot faster than this +function. +

See also TQWMatrix::mapRect(). + +

bool TQWMatrix::operator!= ( const TQWMatrix & m ) const +

+Returns TRUE if this matrix is not equal to m; otherwise returns FALSE. + +

TQWMatrix & TQWMatrix::operator*= ( const TQWMatrix & m ) +

+Returns the result of multiplying this matrix by matrix m. + +

bool TQWMatrix::operator== ( const TQWMatrix & m ) const +

+Returns TRUE if this matrix is equal to m; otherwise returns FALSE. + +

void TQWMatrix::reset () +

+Resets the matrix to an identity matrix. +

All elements are set to zero, except m11 and m22 (scaling) +which are set to 1. +

See also isIdentity(). + +

TQWMatrix & TQWMatrix::rotate ( double a ) +

+Rotates the coordinate system a degrees counterclockwise. +

Returns a reference to the matrix. +

See also translate(), scale(), and shear(). + +

Examples: canvas/canvas.cpp, desktop/desktop.cpp, drawdemo/drawdemo.cpp, t14/cannon.cpp, and xform/xform.cpp. +

TQWMatrix & TQWMatrix::scale ( double sx, double sy ) +

+Scales the coordinate system unit by sx horizontally and sy +vertically. +

Returns a reference to the matrix. +

See also translate(), shear(), and rotate(). + +

Examples: canvas/canvas.cpp, fileiconview/qfileiconview.cpp, movies/main.cpp, qmag/qmag.cpp, showimg/showimg.cpp, and xform/xform.cpp. +

void TQWMatrix::setMatrix ( double m11, double m12, double m21, double m22, double dx, double dy ) +

+Sets the matrix elements to the specified values, m11, m12, +m21, m22, dx and dy. + +

void TQWMatrix::setTransformationMode ( TQWMatrix::TransformationMode m ) [static] +

+Sets the transformation mode that TQWMatrix and painter +transformations use to m. +

See also TQWMatrix::TransformationMode. + +

TQWMatrix & TQWMatrix::shear ( double sh, double sv ) +

+Shears the coordinate system by sh horizontally and sv +vertically. +

Returns a reference to the matrix. +

See also translate(), scale(), and rotate(). + +

Examples: drawdemo/drawdemo.cpp and xform/xform.cpp. +

TransformationMode TQWMatrix::transformationMode () [static] +

+Returns the current transformation mode. +

See also TQWMatrix::TransformationMode. + +

TQWMatrix & TQWMatrix::translate ( double dx, double dy ) +

+Moves the coordinate system dx along the X-axis and dy along +the Y-axis. +

Returns a reference to the matrix. +

See also scale(), shear(), and rotate(). + +

Examples: canvas/canvas.cpp, drawdemo/drawdemo.cpp, t14/cannon.cpp, and xform/xform.cpp. +


Related Functions

+

TQDataStream & operator<< ( TQDataStream & s, const TQWMatrix & m ) +

+ +

Writes the matrix m to the stream s and returns a reference +to the stream. +

See also Format of the TQDataStream operators. + +

TQDataStream & operator>> ( TQDataStream & s, TQWMatrix & m ) +

+ +

Reads the matrix m from the stream s and returns a reference +to the stream. +

See also Format of the TQDataStream operators. + + +


+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/qworkspace-h.html b/doc/html/qworkspace-h.html new file mode 100644 index 00000000..9c8cadc4 --- /dev/null +++ b/doc/html/qworkspace-h.html @@ -0,0 +1,214 @@ + + + + + +qworkspace.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qworkspace.h

+ +

This is the verbatim text of the qworkspace.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qworkspace.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of the TQWorkspace class
+**
+** Created : 990210
+**
+** Copyright (C) 1999-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the workspace 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 retquirements 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 TQWORKSPACE_H
+#define TQWORKSPACE_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qwidgetlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_WORKSPACE
+
+#if !defined( QT_MODULE_WORKSPACE ) || defined( QT_INTERNAL_WORKSPACE )
+#define TQM_EXPORT_WORKSPACE
+#else
+#define TQM_EXPORT_WORKSPACE Q_EXPORT
+#endif
+
+class TQWorkspaceChild;
+class TQShowEvent;
+class TQWorkspacePrivate;
+class TQPopupMenu;
+class TQDockWindow;
+
+class TQM_EXPORT_WORKSPACE TQWorkspace : public TQWidget
+{
+    Q_OBJECT
+    Q_PROPERTY( bool scrollBarsEnabled READ scrollBarsEnabled WRITE setScrollBarsEnabled )
+
+#ifdef QT_WORKSPACE_WINDOWMODE
+public:
+#endif
+    enum WindowMode { TopLevel, MDI, AutoDetect };
+    WindowMode windowMode() const;
+#ifdef QT_WORKSPACE_WINDOWMODE
+private:
+#endif
+
+public:
+#ifdef QT_WORKSPACE_WINDOWMODE
+    TQWorkspace( WindowMode mode, TQWidget* parent=0, const char* name=0 );
+#endif
+    TQWorkspace( TQWidget* parent=0, const char* name=0 );
+
+    ~TQWorkspace();
+
+    enum WindowOrder { CreationOrder, StackingOrder };
+
+    TQWidget* activeWindow() const;
+    TQWidgetList windowList() const; // ### merge with below in 4.0
+    TQWidgetList windowList( WindowOrder order ) const;
+
+    TQSize sizeHint() const;
+
+    bool scrollBarsEnabled() const;
+    void setScrollBarsEnabled( bool enable );
+
+    void setPaletteBackgroundColor( const TQColor & );
+    void setPaletteBackgroundPixmap( const TQPixmap & );
+
+signals:
+    void windowActivated( TQWidget* w);
+
+public slots:
+    void cascade();
+    void tile();
+    void closeActiveWindow();
+    void closeAllWindows();
+    void activateNextWindow();
+    void activatePrevWindow();
+
+protected:
+#ifndef QT_NO_STYLE
+    void styleChange( TQStyle& );
+#endif
+    void childEvent( TQChildEvent * );
+    void resizeEvent( TQResizeEvent * );
+    bool eventFilter( TQObject *, TQEvent * );
+    void showEvent( TQShowEvent *e );
+    void hideEvent( TQHideEvent *e );
+#ifndef QT_NO_WHEELEVENT
+    void wheelEvent( TQWheelEvent *e );
+#endif
+
+private slots:
+    void normalizeActiveWindow();
+    void minimizeActiveWindow();
+    void showOperationMenu();
+    void popupOperationMenu( const TQPoint& );
+    void operationMenuActivated( int );
+    void operationMenuAboutToShow();
+    void toolMenuAboutToShow();
+    void activatePreviousWindow(); // ### remove in TQt 4.0
+    void dockWindowsShow();
+    void scrollBarChanged();
+
+private:
+    void init();
+    void handleUndock( TQDockWindow* w);
+    void insertIcon( TQWidget* w);
+    void removeIcon( TQWidget* w);
+    void place( TQWidget* );
+
+    TQWorkspaceChild* findChild( TQWidget* w);
+    void showMaximizeControls();
+    void hideMaximizeControls();
+    void activateWindow( TQWidget* w, bool change_focus = TRUE );
+    void showWindow( TQWidget* w);
+    void maximizeWindow( TQWidget* w);
+    void minimizeWindow( TQWidget* w);
+    void normalizeWindow( TQWidget* w);
+
+    TQRect updateWorkspace();
+
+    TQPopupMenu* popup;
+    TQWorkspacePrivate* d;
+
+    friend class TQWorkspacePrivate;
+    friend class TQWorkspaceChild;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    TQWorkspace( const TQWorkspace & );
+    TQWorkspace& operator=( const TQWorkspace & );
+#endif
+};
+
+
+#endif // QT_NO_WORKSPACE
+
+#endif // TQWORKSPACE_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qworkspace-members.html b/doc/html/qworkspace-members.html new file mode 100644 index 00000000..a7b2b9bf --- /dev/null +++ b/doc/html/qworkspace-members.html @@ -0,0 +1,349 @@ + + + + + +TQWorkspace Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWorkspace

+ +

This is the complete list of member functions for +TQWorkspace, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qworkspace.html b/doc/html/qworkspace.html new file mode 100644 index 00000000..bae61a2a --- /dev/null +++ b/doc/html/qworkspace.html @@ -0,0 +1,223 @@ + + + + + +TQWorkspace Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWorkspace Class Reference
[workspace module]

+ +

The TQWorkspace widget provides a workspace window that can +contain decorated windows, e.g. for MDI. +More... +

#include <qworkspace.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+ +

Public Slots

+ +

Signals

+ +

Properties

+ +

Detailed Description

+ + +The TQWorkspace widget provides a workspace window that can +contain decorated windows, e.g. for MDI. +

+

+ + +

MDI (multiple document interface) applications typically have one +main window with a menu bar and toolbar, and a central widget that +is a TQWorkspace. The workspace itself contains zero, one or more +document windows, each of which is a widget. +

The workspace itself is an ordinary TQt widget. It has a standard +constructor that takes a parent widget and an object name. The +parent window is usually a TQMainWindow, but it need not be. +

Document windows (i.e. MDI windows) are also ordinary TQt widgets +which have the workspace as their parent widget. When you call +show(), hide(), showMaximized(), setCaption(), etc. on a document +window, it is shown, hidden, etc. with a frame, caption, icon and +icon text, just as you'd expect. You can provide widget flags +which will be used for the layout of the decoration or the +behaviour of the widget itself. +

To change or retrieve the geometry of MDI windows you must operate +on the MDI widget's parentWidget(). (The parentWidget() provides +access to the decorated window in which the MDI window's widget is +shown.) +

A document window becomes active when it gets the keyboard focus. +You can also activate a window in code using setFocus(). The user +can activate a window by moving focus in the usual ways, for +example by clicking a window or by pressing Tab. The workspace +emits a signal windowActivated() when it detects the activation +change, and the function activeWindow() always returns a pointer +to the active document window. +

The convenience function windowList() returns a list of all +document windows. This is useful to create a popup menu +"Windows" on the fly, for example. +

TQWorkspace provides two built-in layout strategies for child +windows: cascade() and tile(). Both are slots so you can easily +connect menu entries to them. +

If you want your users to be able to work with document windows +larger than the actual workspace, set the scrollBarsEnabled +property to TRUE. +

If the top-level window contains a menu bar and a document window +is maximised, TQWorkspace moves the document window's minimize, +restore and close buttons from the document window's frame to the +workspace window's menu bar. It then inserts a window operations +menu at the far left of the menu bar. +

See also Main Window and Related Classes and Organizers. + +


Member Type Documentation

+

TQWorkspace::WindowOrder

+ +

Specifies the order in which windows are returned from windowList(). +

    +
  • TQWorkspace::CreationOrder - The windows are returned in the order of their creation +
  • TQWorkspace::StackingOrder - The windows are returned in the order of their stacking +
+

Member Function Documentation

+

TQWorkspace::TQWorkspace ( TQWidget * parent = 0, const char * name = 0 ) +

+Constructs a workspace with a parent and a name. + +

TQWorkspace::~TQWorkspace () +

Destroys the workspace and frees any allocated resources. +

void TQWorkspace::activateNextWindow () [slot] +

+Activates the next window in the child window chain. +

See also activatePrevWindow(). + +

void TQWorkspace::activatePrevWindow () [slot] +

+Activates the previous window in the child window chain. +

See also activateNextWindow(). + +

TQWidget * TQWorkspace::activeWindow () const +

+Returns the active window, or 0 if no window is active. + +

Example: mdi/application.cpp. +

void TQWorkspace::cascade () [slot] +

+Arranges all the child windows in a cascade pattern. +

See also tile(). + +

Example: mdi/application.cpp. +

void TQWorkspace::closeActiveWindow () [slot] +

+Closes the child window that is currently active. +

See also closeAllWindows(). + +

void TQWorkspace::closeAllWindows () [slot] +

+Closes all child windows. +

The windows are closed in random order. The operation stops if a +window does not accept the close event. +

See also closeActiveWindow(). + +

bool TQWorkspace::scrollBarsEnabled () const +

Returns TRUE if the workspace provides scrollbars; otherwise returns FALSE. +See the "scrollBarsEnabled" property for details. +

void TQWorkspace::setScrollBarsEnabled ( bool enable ) +

Sets whether the workspace provides scrollbars to enable. +See the "scrollBarsEnabled" property for details. +

void TQWorkspace::tile () [slot] +

+Arranges all child windows in a tile pattern. +

See also cascade(). + +

Example: mdi/application.cpp. +

void TQWorkspace::windowActivated ( TQWidget * w ) [signal] +

+ +

This signal is emitted when the window widget w becomes active. +Note that w can be null, and that more than one signal may be +emitted for a single activation event. +

See also activeWindow() and windowList(). + +

TQWidgetList TQWorkspace::windowList ( WindowOrder order ) const +

+Returns a list of all windows. If order is CreationOrder +(the default) the windows are listed in the order in which they +had been inserted into the workspace. If order is StackingOrder +the windows are listed in their stacking order, with the topmost window +being the last window in the list. +

TQWidgetList is the same as TQPtrList. +

See also TQPtrList. + +

Example: mdi/application.cpp. +

TQWidgetList TQWorkspace::windowList () const +

+This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

+


Property Documentation

+

bool scrollBarsEnabled

+

This property holds whether the workspace provides scrollbars. +

If this property is set to TRUE, it is possible to resize child +windows over the right or the bottom edge out of the visible area +of the workspace. The workspace shows scrollbars to make it +possible for the user to access those windows. If this property is +set to FALSE (the default), resizing windows out of the visible +area of the workspace is not permitted. + +

Set this property's value with setScrollBarsEnabled() and get this property's value with scrollBarsEnabled(). + +


+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/qws.html b/doc/html/qws.html new file mode 100644 index 00000000..cfb58032 --- /dev/null +++ b/doc/html/qws.html @@ -0,0 +1,55 @@ + + + + + +TQt/Embedded + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt/Embedded

+ + +

These classes are relevant to TQt/Embedded users. + +

+
TQFontManagerImplements font management in TQt/Embedded +
TQScreenAnd its descendants manage the framebuffer and palette +
TQWSDecorationAllows the appearance of the TQt/Embedded Window Manager to be customized +
TQWSInputMethodInternational input methods for TQt/Embedded +
TQWSKeyboardHandlerImplements the keyboard driver for TQt/Embedded +
TQWSMouseHandlerMouse driver for TQt/Embedded +
TQWSServerServer-specific functionality in TQt/Embedded +
TQWSServer::KeyboardFilterGlobal keyboard event filter +
TQWSWindowServer-specific functionality in TQt/Embedded +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwsdecoration-members.html b/doc/html/qwsdecoration-members.html new file mode 100644 index 00000000..a1bf624e --- /dev/null +++ b/doc/html/qwsdecoration-members.html @@ -0,0 +1,55 @@ + + + + + +TQWSDecoration Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWSDecoration

+ +

This is the complete list of member functions for +TQWSDecoration, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwsdecoration.html b/doc/html/qwsdecoration.html new file mode 100644 index 00000000..d610ff28 --- /dev/null +++ b/doc/html/qwsdecoration.html @@ -0,0 +1,160 @@ + + + + + +TQWSDecoration Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWSDecoration Class Reference

+ +

The TQWSDecoration class allows the appearance of the TQt/Embedded Window +Manager to be customized. +More... +

#include <qwsdecoration_qws.h> +

List of all member functions. +

Public Members

+
    +
  • TQWSDecoration ()
  • +
  • virtual ~TQWSDecoration ()
  • +
  • enum Region { None = 0, All = 1, Title = 2, Top = 3, Bottom = 4, Left = 5, Right = 6, TopLeft = 7, TopRight = 8, BottomLeft = 9, BottomRight = 10, Close = 11, Minimize = 12, Maximize = 13, Normalize = 14, Menu = 15, LastRegion = Menu }
  • +
  • virtual TQRegion region ( const TQWidget * widget, const TQRect & rect, Region type = All ) = 0
  • +
  • virtual void close ( TQWidget * widget )
  • +
  • virtual void minimize ( TQWidget * widget )
  • +
  • virtual void maximize ( TQWidget * widget )
  • +
  • virtual TQPopupMenu * menu ( const TQWidget *, const TQPoint & )
  • +
  • virtual void paint ( TQPainter * painter, const TQWidget * widget ) = 0
  • +
  • virtual void paintButton ( TQPainter * painter, const TQWidget * widget, Region type, int state ) = 0
  • +
+

Detailed Description

+ + +The TQWSDecoration class allows the appearance of the TQt/Embedded Window +Manager to be customized. +

+

TQt/Embedded provides window management to top level windows. The +appearance of the borders and buttons (the decoration) around the +managed windows can be customized by creating your own class +derived from TQWSDecoration and overriding a few methods. +

This class is non-portable. It is available only in TQt/Embedded. +

See also TQApplication::qwsSetDecoration() and TQt/Embedded. + +


Member Type Documentation

+

TQWSDecoration::Region

+ +

This enum describes the regions in the window decorations. +

    +
  • TQWSDecoration::None - used internally. +
  • TQWSDecoration::All - the entire region used by the window decoration. +
  • TQWSDecoration::Title - Displays the window title and allows the window to be +moved by dragging. +
  • TQWSDecoration::Top - allows the top of the window to be resized. +
  • TQWSDecoration::Bottom - allows the bottom of the window to be resized. +
  • TQWSDecoration::Left - allows the left edge of the window to be resized. +
  • TQWSDecoration::Right - allows the right edge of the window to be resized. +
  • TQWSDecoration::TopLeft - allows the top-left of the window to be resized. +
  • TQWSDecoration::TopRight - allows the top-right of the window to be resized. +
  • TQWSDecoration::BottomLeft - allows the bottom-left of the window to be resized. +
  • TQWSDecoration::BottomRight - allows the bottom-right of the window to be resized. +
  • TQWSDecoration::Close - clicking in this region closes the window. +
  • TQWSDecoration::Minimize - clicking in this region minimizes the window. +
  • TQWSDecoration::Maximize - clicking in this region maximizes the window. +
  • TQWSDecoration::Normalize - returns a maximized window to its previous size. +
  • TQWSDecoration::Menu - clicking in this region opens the window operations +(system) menu. +
+

Member Function Documentation

+

TQWSDecoration::TQWSDecoration () +

+ +

Constructs a decorator. + +

TQWSDecoration::~TQWSDecoration () [virtual] +

+ +

Destroys a decorator. + +

void TQWSDecoration::close ( TQWidget * widget ) [virtual] +

+Called when the user clicks in the Close region. +

widget is the widget to be closed. +

The default behaviour is to close the widget. + +

void TQWSDecoration::maximize ( TQWidget * widget ) [virtual] +

+Called when the user clicks in the Maximize region. +

widget is the widget to be maximized. +

The default behaviour is to resize the widget to be full-screen. +This method can be overridden e.g. to allow room for launch +panels. + +

TQPopupMenu * TQWSDecoration::menu ( const TQWidget *, const TQPoint & ) [virtual] +

+Called to create a TQPopupMenu containing the valid menu operations. +

The default implementation adds all possible window operations. + +

void TQWSDecoration::minimize ( TQWidget * widget ) [virtual] +

+Called when the user clicks in the Minimize region. +

widget is the widget to be minimized. +

The default behaviour is to ignore this action. + +

void TQWSDecoration::paint ( TQPainter * painter, const TQWidget * widget ) [pure virtual] +

+ +

Override to paint the border and title decoration around widget +using painter. + +

void TQWSDecoration::paintButton ( TQPainter * painter, const TQWidget * widget, Region type, int state ) [pure virtual] +

+ +

Override to paint a button of type type using painter. +

widget is the widget whose button is to be drawn. +state is the state of the button. It can be a combination of the +following OR-ed together: +

    +
  • TQWSButton::MouseOver +
  • TQWSButton::Clicked +
  • TQWSButton::On +
+ +

TQRegion TQWSDecoration::region ( const TQWidget * widget, const TQRect & rect, Region type = All ) [pure virtual] +

+ +

Returns the requested region type which will contain widget +with geometry rect. + + +


+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/qwsdecoration_qws-h.html b/doc/html/qwsdecoration_qws-h.html new file mode 100644 index 00000000..f9516095 --- /dev/null +++ b/doc/html/qwsdecoration_qws-h.html @@ -0,0 +1,118 @@ + + + + + +qwsdecoration_qws.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qwsdecoration_qws.h

+ +

This is the verbatim text of the qwsdecoration_qws.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qwsdecoration_qws.h   3.3.8   edited Jan 11 14:38 $
+**
+** Definition of TQWSDecoration class.
+**
+** Created : 20000308
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the kernel module of the TQt GUI Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Alternatively you may (at your option) use any
+** later version of the GNU General Public License if such license has
+** been publicly approved by Trolltech ASA (or its successors, if any)
+** and the KDE Free TQt Foundation.
+**
+** Please review the following information to ensure GNU General
+** Public Licensing retquirements 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.
+**
+** 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 TQWSDECORATION_QWS_H
+#define TQWSDECORATION_QWS_H
+
+#ifndef QT_H
+#include "qregion.h"
+#endif // QT_H
+
+class TQPopupMenu;
+
+/*
+ Implements decoration styles
+*/
+class TQWSDecoration
+{
+public:
+    TQWSDecoration() {}
+    virtual ~TQWSDecoration() {}
+
+    enum Region { None=0, All=1, Title=2, Top=3, Bottom=4, Left=5, Right=6,
+		TopLeft=7, TopRight=8, BottomLeft=9, BottomRight=10,
+		Close=11, Minimize=12, Maximize=13, Normalize=14,
+		Menu=15, LastRegion=Menu };
+
+    virtual TQRegion region(const TQWidget *, const TQRect &rect, Region r=All) = 0;
+    virtual void close( TQWidget * );
+    virtual void minimize( TQWidget * );
+    virtual void maximize( TQWidget * );
+#ifndef QT_NO_POPUPMENU
+    virtual TQPopupMenu *menu(const TQWidget *, const TQPoint &);
+#endif
+    virtual void paint(TQPainter *, const TQWidget *) = 0;
+    virtual void paintButton(TQPainter *, const TQWidget *, Region, int state) = 0;
+};
+
+#endif // TQWSDECORATION_QWS_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwsinputmethod-members.html b/doc/html/qwsinputmethod-members.html new file mode 100644 index 00000000..b15db0b6 --- /dev/null +++ b/doc/html/qwsinputmethod-members.html @@ -0,0 +1,53 @@ + + + + + +TQWSInputMethod Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWSInputMethod

+ +

This is the complete list of member functions for +TQWSInputMethod, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwsinputmethod.html b/doc/html/qwsinputmethod.html new file mode 100644 index 00000000..1295e887 --- /dev/null +++ b/doc/html/qwsinputmethod.html @@ -0,0 +1,133 @@ + + + + + +TQWSInputMethod Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWSInputMethod Class Reference

+ +

The TQWSInputMethod class provides international input methods +for TQt/Embedded. +More... +

#include <qwindowsystem_qws.h> +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • void sendIMEvent ( TQWSServer::IMState state, const TQString & txt, int cpos, int selLen = 0 )
  • +
+

Detailed Description

+ + +The TQWSInputMethod class provides international input methods +for TQt/Embedded. +

+

Subclass this class to implement your own input method. +

An input methods consists of a keyboard filter and optionally a +graphical interface. The keyboard filter intercepts key events +from physical or virtual keyboards by implementing the filter() +function. +

Use sendIMEvent() to send composition events. Composition starts +with the input method sending an IMStart event, followed by a +number of IMCompose events and ending with an IMEnd event or +when the virtual reset() function is called. +

The functions setMicroFocus() and setFont() can be reimplemented +to receive more information about the state of the focus widget. +

Use TQWSServer::setCurrentInputMethod() to install an input method. +

See also TQt/Embedded. + +


Member Function Documentation

+

TQWSInputMethod::TQWSInputMethod () +

+Constructs a new input method + +

TQWSInputMethod::~TQWSInputMethod () [virtual] +

+Destructs the input method uninstalling it if it is currently installed. + +

bool TQWSInputMethod::filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) [pure virtual] +

+ +

This function must be implemented in subclasses to handle key +input from physical or virtual keyboards. Returning TRUE will +block the event from further processing. +

The Unicode value is given in unicode and the key code in keycode. Keyboard modifiers are OR-ed together in modifiers. +If isPress is TRUE this is a key press; otherwise it is a key +release. If autoRepeat is TRUE this is an auto-repeated key +press. +

All normal key events should be blocked while in compose mode +(i.e., between IMStart and IMEnd). +

+

void TQWSInputMethod::reset () [virtual] +

+Implemented in subclasses to reset the state of the input method. + +

void TQWSInputMethod::sendIMEvent ( TQWSServer::IMState state, const TQString & txt, int cpos, int selLen = 0 ) [protected] +

+ +

Causes a TQIMEvent to be sent to the focus widget. state may be +one of TQWSServer::IMStart, TQWSServer::IMCompose or TQWSServer::IMEnd. +

txt is the text being composed (or the finished text if state +is IMEnd). cpos is the current cursor position. +

If state is IMCompose, selLen is the number of characters in +the composition string (starting at cpos) that should be +marked as selected by the input widget receiving the event. + +

void TQWSInputMethod::setFont ( const TQFont & ) [virtual] +

+Implemented in subclasses to handle font changes in the focus +widget. +

This functionality is provided for future expansion; it is not +used in this version of TQt/Embedded. + +

void TQWSInputMethod::setMicroFocus ( int x, int y ) [virtual] +

+ +

Implemented in subclasses to handle microFocusHint changes in the +focus widget. x and y are the global coordinates of the +text cursor. +

+ +


+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/qwskeyboardhandler-members.html b/doc/html/qwskeyboardhandler-members.html new file mode 100644 index 00000000..286f94bc --- /dev/null +++ b/doc/html/qwskeyboardhandler-members.html @@ -0,0 +1,91 @@ + + + + + +TQWSKeyboardHandler Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWSKeyboardHandler

+ +

This is the complete list of member functions for +TQWSKeyboardHandler, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwskeyboardhandler.html b/doc/html/qwskeyboardhandler.html new file mode 100644 index 00000000..2fc066c4 --- /dev/null +++ b/doc/html/qwskeyboardhandler.html @@ -0,0 +1,106 @@ + + + + + +TQWSKeyboardHandler Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWSKeyboardHandler Class Reference

+ +

The TQWSKeyboardHandler class implements the keyboard driver +for TQt/Embedded. +More... +

#include <qkeyboard_qws.h> +

Inherits TQObject. +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • virtual void processKeyEvent ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat )
  • +
+

Detailed Description

+ + +The TQWSKeyboardHandler class implements the keyboard driver +for TQt/Embedded. +

+

The keyboard driver handles events from system devices and +generates key events. +

A TQWSKeyboardHandler will usually open some system device in its +constructor, create a TQSocketNotifier on that opened device and +when it receives data, it will call processKeyEvent() to send the +event to TQt/Embedded for relaying to clients. +

See also TQt/Embedded. + +


Member Function Documentation

+

TQWSKeyboardHandler::TQWSKeyboardHandler () +

+Constructs a keyboard handler. The handler may be passed to the +system for later destruction with TQWSServer::setKeyboardHandler(), +although even without doing this, the handler can function, +calling processKeyEvent() to emit events. + +

TQWSKeyboardHandler::~TQWSKeyboardHandler () [virtual] +

+Destroys a keyboard handler. Note that if you have called +TQWSServer::setKeyboardHandler(), you must not delete the handler. + +

void TQWSKeyboardHandler::processKeyEvent ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) [virtual protected] +

+Subclasses call this function to send a key event. The server may +additionally filter the event before sending it on to +applications. +

+
Parameter Meaning +
unicode +The Unicode value for the key, or 0xFFFF is none is appropriate. +
keycode +The TQt keycode for the key (see TQt::Key for the list of codes). +
modifiers +The set of modifier keys (see TQt::Modifier). +
isPress +Whether this is a press or a release. +
autoRepeat +Whether this event was generated by an auto-repeat +mechanism, or an actual key press. +
+ + +

+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/qwsmousehandler-members.html b/doc/html/qwsmousehandler-members.html new file mode 100644 index 00000000..e1bb383f --- /dev/null +++ b/doc/html/qwsmousehandler-members.html @@ -0,0 +1,53 @@ + + + + + +TQWSMouseHandler Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWSMouseHandler

+ +

This is the complete list of member functions for +TQWSMouseHandler, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwsmousehandler.html b/doc/html/qwsmousehandler.html new file mode 100644 index 00000000..916387bb --- /dev/null +++ b/doc/html/qwsmousehandler.html @@ -0,0 +1,113 @@ + + + + + +TQWSMouseHandler Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWSMouseHandler Class Reference

+ +

The TQWSMouseHandler class is a mouse driver for TQt/Embedded. +More... +

#include <qmouse_qws.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQWSMouseHandler class is a mouse driver for TQt/Embedded. +

+

The mouse driver handles events from system devices and generates +mouse events. +

A TQWSMouseHandler will usually open some system device in its +constructor, create a TQSocketNotifier on that opened device and +when it receives data, it will call mouseChanged() to send the +event to TQt/Embedded for relaying to clients. +

See also TQt/Embedded. + +


Member Function Documentation

+

TQWSMouseHandler::TQWSMouseHandler ( const TQString & driver = TQString::null, const TQString & device = TQString::null ) +

+Constructs a mouse handler. This becomes the primary mouse +handler. +

Note that once created, mouse handlers are controlled by the +system and should not be deleted. +

The driver and device arguments are not used by this base +class. + +

TQWSMouseHandler::~TQWSMouseHandler () [virtual] +

+Destroys the mouse handler. You should not call this directly. + +

void TQWSMouseHandler::calibrate ( TQWSPointerCalibrationData * ) [virtual] +

+ +

This method is reimplemented in the calibrated mouse handler to +set calibration information (from, for instance, the TQtopia +calibration screen). This version does nothing. + +

void TQWSMouseHandler::clearCalibration () [virtual] +

+ +

This method is reimplemented in the calibrated mouse handler to +clear calibration information. This version does nothing. + +

void TQWSMouseHandler::limitToScreen ( TQPoint & pt ) +

+Ensures that the given point, pt is within the screen's +boundaries, changing pt if necessary. + +

void TQWSMouseHandler::mouseChanged ( const TQPoint & pos, int bstate ) +

+When a mouse event occurs this function is called with the mouse's +position in pos, and the state of its buttons in bstate. + +

const TQPoint & TQWSMouseHandler::pos () const +

+ +

Returns the mouse position. + + +


+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/qwsserver-members.html b/doc/html/qwsserver-members.html new file mode 100644 index 00000000..d30312af --- /dev/null +++ b/doc/html/qwsserver-members.html @@ -0,0 +1,77 @@ + + + + + +TQWSServer Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWSServer

+ +

This is the complete list of member functions for +TQWSServer, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwsserver.html b/doc/html/qwsserver.html new file mode 100644 index 00000000..b6d134a2 --- /dev/null +++ b/doc/html/qwsserver.html @@ -0,0 +1,344 @@ + + + + + +TQWSServer Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWSServer Class Reference

+ +

The TQWSServer class provides server-specific functionality in TQt/Embedded. +More... +

#include <qwindowsystem_qws.h> +

List of all member functions. +

Public Members

+ +

Signals

+ +

Static Public Members

+ +

Detailed Description

+ + +The TQWSServer class provides server-specific functionality in TQt/Embedded. +

+

When you run a TQt/Embedded application, it either runs as a server +or connects to an existing server. If it runs as a server, some +additional operations are provided by this class. +

This class is instantiated by TQApplication for TQt/Embedded server +processes. You should never construct this class yourself. +

A pointer to the TQWSServer instance can be obtained via the global +qwsServer variable. +

The mouse and keyboard devices can be opened with openMouse() and +openKeyboard(). (Close them with closeMouse() and +closeKeyboard().) +

The display is refreshed with refresh(), and painting can be +enabled or disabled with enablePainting(). +

Obtain the list of client windows with clientWindows() and find +out which window is at a particular point with windowAt(). +

Many static functions are provided, for example, +setKeyboardFilter(), setKeyboardHandler(), setDefaultKeyboard() +and setDefaultMouse(). +

The size of the window rectangle can be set with +setMaxWindowRect(), and the desktop's background can be set with +setDesktopBackground(). +

The screen saver is controlled with setScreenSaverInterval() and +screenSaverActivate(). +

See also TQt/Embedded. + +


Member Type Documentation

+

TQWSServer::GUIMode

+ +

This determines what sort of TQWS server to create: +

    +
  • TQWSServer::NoGui - This is used for non-graphical TQt applications. +
  • TQWSServer::NormalGUI - A normal TQt/Embedded application (not the server). +
  • TQWSServer::Server - A TQt/Embedded server (e.g. if -qws has been specified +on the command line. +
+

TQWSServer::ServerFlags

+ +

This enum is used to pass various options to the window system +server. +

    +
  • TQWSServer::DisableKeyboard - Ignore all keyboard input. +
  • TQWSServer::DisableMouse - Ignore all mouse input. +
+

TQWSServer::WindowEvent

+ +

This specifies what sort of event has occurred to a top-level window: +

    +
  • TQWSServer::Create - A new window has been created (TQWidget constructor). +
  • TQWSServer::Destroy - The window has been closed and deleted (TQWidget destructor). +
  • TQWSServer::Hide - The window has been hidden with TQWidget::hide(). +
  • TQWSServer::Show - The window has been shown with TQWidget::show() or similar. +
  • TQWSServer::Raise - The window has been raised to the top of the desktop. +
  • TQWSServer::Lower - The window has been lowered. +
  • TQWSServer::Geometry - The window has changed size or position. +
  • TQWSServer::Active - The window has become the active window (has keyboard focus). +
  • TQWSServer::Name - The window has been named. +
+

Member Function Documentation

+

TQWSServer::TQWSServer ( int flags = 0, TQObject * parent = 0, const char * name = 0 ) +

+Construct a TQWSServer object. +

Warning: This class is instantiated by TQApplication for +TQt/Embedded server processes. You should never construct this +class yourself. +

The flags are used for keyboard and mouse setting. The server's +parent is parent and it is called name. + +

TQWSServer::~TQWSServer () +

+Destruct TQWSServer + +

const TQPtrList<TQWSWindow> & TQWSServer::clientWindows () +

+ +

Returns the list of top-level windows. This list will change as +applications add and remove wigdets so it should not be stored for +future use. The windows are sorted in stacking order from +top-most to bottom-most. + +

void TQWSServer::closeKeyboard () +

+Closes keyboard device(s). + +

void TQWSServer::closeMouse () +

+Closes the pointer device(s). + +

void TQWSServer::enablePainting ( bool e ) +

+If e is TRUE, painting on the display is enabled; if e is +FALSE, painting is disabled. + +

bool TQWSServer::isCursorVisible () [static] +

+Returns TRUE if the cursor is visible; otherwise returns FALSE. +

See also setCursorVisible(). + +

const KeyMap * TQWSServer::keyMap () [static] +

+ +

Returns the keyboard mapping table used to convert keyboard +scancodes to TQt keycodes and Unicode values. It's used by the +keyboard driver in qkeyboard_qws.cpp. + +

TQWSKeyboardHandler * TQWSServer::keyboardHandler () [static] +

+Returns the primary keyboard handler. + +

TQWSPropertyManager * TQWSServer::manager () +

+ +

Returns the TQWSPropertyManager, which is used for implementing +X11-style window properties. + +

TQWSMouseHandler * TQWSServer::mouseHandler () [static] +

+Returns the primary mouse handler. + +

void TQWSServer::newChannel ( const TQString & channel ) [signal] +

+ +

This signal is emitted when the TQCopChannel channel is created. + +

void TQWSServer::openKeyboard () +

+Opens the keyboard device(s). + +

void TQWSServer::openMouse () +

+Opens the mouse device(s). + +

void TQWSServer::refresh () +

+Refreshes the entire display. + +

void TQWSServer::refresh ( TQRegion & r ) +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Refreshes the region r. + +

void TQWSServer::removedChannel ( const TQString & channel ) [signal] +

+ +

This signal is emitted immediately after the TQCopChannel channel is destroyed. Note that a channel is not destroyed until +all its listeners have unregistered. + +

void TQWSServer::screenSaverActivate ( bool activate ) [static] +

+If activate is TRUE the screensaver is activated immediately; +if activate is FALSE the screensaver is deactivated. + +

bool TQWSServer::screenSaverActive () [static] +

+Returns TRUE if the screensaver is active (i.e. the screen is +blanked); otherwise returns FALSE. + +

void TQWSServer::sendIMEvent ( IMState state, const TQString & txt, int cpos, int selLen ) +

+This function sends an input method event to the server. The +current state is passed in state and the current text in txt. The cursor's position in the text is given by cpos, and +the selection length (which could be 0) is given in selLen. + +

void TQWSServer::sendKeyEvent ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) [static] +

+Send a key event. You can use this to send key events generated by +"virtual keyboards". unicode is the Unicode value of the key to +send, keycode the TQt keycode (e.g. Key_Left), modifiers +indicates whether, Shift/Alt/Ctrl keys are pressed, isPress is +TRUE if this is a key down event and FALSE if it's a key up event, +and autoRepeat is TRUE if this is an autorepeat event (i.e. the +user has held the key down and this is the second or subsequent +key event being sent). + +

void TQWSServer::setCursorVisible ( bool vis ) [static] +

+If vis is TRUE, makes the cursor visible; if vis is FALSE, +makes the cursor invisible. +

See also isCursorVisible(). + +

void TQWSServer::setDefaultKeyboard ( const char * k ) [static] +

+Set the keyboard driver to k, e.g. if $TQWS_KEYBOARD is not +defined. The default is platform-dependent. + +

void TQWSServer::setDefaultMouse ( const char * m ) [static] +

+Set the mouse driver m to use if $TQWS_MOUSE_PROTO is not +defined. The default is platform-dependent. + +

void TQWSServer::setDesktopBackground ( const TQImage & img ) [static] +

+Sets the image img to be used as the background in the absence +of obscuring windows. + +

void TQWSServer::setDesktopBackground ( const TQColor & c ) [static] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Sets the color c to be used as the background in the absence of +obscuring windows. + +

void TQWSServer::setKeyboardFilter ( KeyboardFilter * f ) [static] +

+Adds a filter f to be invoked for all key events from physical +keyboard drivers (events sent via processKeyEvent()). +

The filter is not invoked for keys generated by virtual keyboard +drivers (events sent via sendKeyEvent()). +

If f is 0, the most-recently added filter is removed and deleted. +The caller is responsible for matching each addition with a +corresponding removal. + +

void TQWSServer::setKeyboardHandler ( TQWSKeyboardHandler * kh ) [static] +

+Sets the primary keyboard handler to kh. + +

void TQWSServer::setMaxWindowRect ( const TQRect & r ) [static] +

+Sets the area of the screen which TQt/Embedded applications will +consider to be the maximum area to use for windows to r. +

See also TQWidget::showMaximized(). + +

void TQWSServer::setScreenSaverInterval ( int ms ) [static] +

+Sets the timeout for the screensaver to ms milliseconds. A +setting of zero turns off the screensaver. + +

void TQWSServer::setScreenSaverIntervals ( int * ms ) [static] +

+Sets an array of timeouts for the screensaver to a list of ms +milliseconds. A setting of zero turns off the screensaver. The +array must be 0-terminated. + +

TQWSWindow * TQWSServer::windowAt ( const TQPoint & pos ) +

+Returns the window containing the point pos or 0 if there is no +window under the point. + +

void TQWSServer::windowEvent ( TQWSWindow * w, TQWSServer::WindowEvent e ) [signal] +

+ +

This signal is emitted whenever something happens to a top-level +window (e.g. it's created or destroyed). w is the window to +which the event of type e has occurred. + + +


+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/qwswindow-members.html b/doc/html/qwswindow-members.html new file mode 100644 index 00000000..bafddc08 --- /dev/null +++ b/doc/html/qwswindow-members.html @@ -0,0 +1,62 @@ + + + + + +TQWSWindow Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQWSWindow

+ +

This is the complete list of member functions for +TQWSWindow, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qwswindow.html b/doc/html/qwswindow.html new file mode 100644 index 00000000..4600a7d7 --- /dev/null +++ b/doc/html/qwswindow.html @@ -0,0 +1,171 @@ + + + + + +TQWSWindow Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQWSWindow Class Reference

+ +

The TQWSWindow class provides server-specific functionality in TQt/Embedded. +More... +

#include <qwindowsystem_qws.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + +The TQWSWindow class provides server-specific functionality in TQt/Embedded. +

+

When you run a TQt/Embedded application, it either runs as a server +or connects to an existing server. If it runs as a server, some +additional functionality is provided by the TQWSServer class. +

This class maintains information about each window and allows +operations to be performed on the windows. +

You can get the window's name(), caption() and winId(), along with +the client() that owns the window. +

The region the window wants to draw on is returned by requested(); +the region that the window is allowed to draw on is returned by +allocation(). +

The visibility of the window can be determined using isVisible(), +isPartiallyObscured() and isFullyObscured(). Visibility can be +changed using raise(), lower(), show(), hide() and +setActiveWindow(). +

See also TQt/Embedded. + +


Member Function Documentation

+

TQWSWindow::TQWSWindow ( int i, TQWSClient * client ) +

+ +

Constructs a new top-level window, associated with the client client and giving it the id i. + +

TQWSWindow::~TQWSWindow () +

+Destructor. + +

TQRegion TQWSWindow::allocation () const +

+ +

Returns the region that the window is allowed to draw onto, +including any window decorations but excluding regions covered by +other windows. +

See also requested(). + +

const TQString & TQWSWindow::caption () const +

+ +

Returns the window's caption. + +

TQWSClient * TQWSWindow::client () const +

+ +

Returns the TQWSClient that owns this window. + +

void TQWSWindow::hide () +

+Hides the window. + +

bool TQWSWindow::isFullyObscured () const +

+ +

Returns TRUE if the window is completely obsured by another window +or by the bounds of the screen; otherwise returns FALSE. + +

bool TQWSWindow::isPartiallyObscured () const +

+ +

Returns TRUE if the window is partially obsured by another window +or by the bounds of the screen; otherwise returns FALSE. + +

bool TQWSWindow::isVisible () const +

+ +

Returns TRUE if the window is visible; otherwise returns FALSE. + +

void TQWSWindow::lower () +

+Lowers the window below other windows. + +

const TQString & TQWSWindow::name () const +

+ +

Returns the window's name. + +

void TQWSWindow::raise () +

+Raises the window above all other windows except "Stay on top" windows. + +

TQRegion TQWSWindow::requested () const +

+ +

Returns the region that the window has requested to draw onto, +including any window decorations. +

See also allocation(). + +

void TQWSWindow::setActiveWindow () +

+Make this the active window (i.e. sets the keyboard focus to this +window). + +

void TQWSWindow::show () +

+Shows the window. + +

int TQWSWindow::winId () const +

+ +

Returns the window's Id. + + +


+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/qxml-h.html b/doc/html/qxml-h.html new file mode 100644 index 00000000..efca6e7f --- /dev/null +++ b/doc/html/qxml-h.html @@ -0,0 +1,576 @@ + + + + + +qxml.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qxml.h

+ +

This is the verbatim text of the qxml.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qxml.h   3.3.8   edited Jan 11 14:39 $
+**
+** Definition of TQXmlSimpleReader and related classes.
+**
+** Created : 000518
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the xml 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 retquirements 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 TQXML_H
+#define TQXML_H
+
+#ifndef QT_H
+#include "qtextstream.h"
+#include "qfile.h"
+#include "qstring.h"
+#include "qstringlist.h"
+#include "qvaluevector.h"
+#endif // QT_H
+
+#if !defined(QT_MODULE_XML) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_XML )
+#define TQM_EXPORT_XML
+#else
+#define TQM_EXPORT_XML Q_EXPORT
+#endif
+
+#ifndef QT_NO_XML
+
+class TQXmlNamespaceSupport;
+class TQXmlAttributes;
+class TQXmlContentHandler;
+class TQXmlDefaultHandler;
+class TQXmlDTDHandler;
+class TQXmlEntityResolver;
+class TQXmlErrorHandler;
+class TQXmlLexicalHandler;
+class TQXmlDeclHandler;
+class TQXmlInputSource;
+class TQXmlLocator;
+class TQXmlNamespaceSupport;
+class TQXmlParseException;
+
+class TQXmlReader;
+class TQXmlSimpleReader;
+
+class TQXmlSimpleReaderPrivate;
+class TQXmlNamespaceSupportPrivate;
+class TQXmlAttributesPrivate;
+class TQXmlInputSourcePrivate;
+class TQXmlParseExceptionPrivate;
+class TQXmlLocatorPrivate;
+class TQXmlDefaultHandlerPrivate;
+
+
+//
+// SAX Namespace Support
+//
+
+class TQM_EXPORT_XML TQXmlNamespaceSupport
+{
+public:
+    TQXmlNamespaceSupport();
+    ~TQXmlNamespaceSupport();
+
+    void setPrefix( const TQString&, const TQString& );
+
+    TQString prefix( const TQString& ) const;
+    TQString uri( const TQString& ) const;
+    void splitName( const TQString&, TQString&, TQString& ) const;
+    void processName( const TQString&, bool, TQString&, TQString& ) const;
+    TQStringList prefixes() const;
+    TQStringList prefixes( const TQString& ) const;
+
+    void pushContext();
+    void popContext();
+    void reset();
+
+private:
+    TQXmlNamespaceSupportPrivate *d;
+
+    friend class TQXmlSimpleReader;
+};
+
+
+//
+// SAX Attributes
+//
+
+class TQM_EXPORT_XML TQXmlAttributes
+{
+public:
+    TQXmlAttributes() {}
+    virtual ~TQXmlAttributes() {}
+
+    int index( const TQString& qName ) const;
+    int index( const TQString& uri, const TQString& localPart ) const;
+    int length() const;
+    int count() const;
+    TQString localName( int index ) const;
+    TQString qName( int index ) const;
+    TQString uri( int index ) const;
+    TQString type( int index ) const;
+    TQString type( const TQString& qName ) const;
+    TQString type( const TQString& uri, const TQString& localName ) const;
+    TQString value( int index ) const;
+    TQString value( const TQString& qName ) const;
+    TQString value( const TQString& uri, const TQString& localName ) const;
+
+    void clear();
+    void append( const TQString &qName, const TQString &uri, const TQString &localPart, const TQString &value );
+
+private:
+    TQStringList qnameList;
+    TQStringList uriList;
+    TQStringList localnameList;
+    TQStringList valueList;
+
+    TQXmlAttributesPrivate *d;
+};
+
+//
+// SAX Input Source
+//
+
+class TQM_EXPORT_XML TQXmlInputSource
+{
+public:
+    TQXmlInputSource();
+    TQXmlInputSource( TQIODevice *dev );
+    TQXmlInputSource( TQFile& file ); // obsolete
+    TQXmlInputSource( TQTextStream& stream ); // obsolete
+    virtual ~TQXmlInputSource();
+
+    virtual void setData( const TQString& dat );
+    virtual void setData( const TQByteArray& dat );
+    virtual void fetchData();
+    virtual TQString data();
+    virtual TQChar next();
+    virtual void reset();
+
+    static const TQChar EndOfData;
+    static const TQChar EndOfDocument;
+
+protected:
+    virtual TQString fromRawData( const TQByteArray &data, bool beginning = FALSE );
+
+private:
+    void init();
+
+    TQIODevice *inputDevice;
+    TQTextStream *inputStream;
+
+    TQString str;
+    const TQChar *unicode;
+    int pos;
+    int length;
+    bool nextReturnedEndOfData;
+    TQTextDecoder *encMapper;
+
+    TQXmlInputSourcePrivate *d;
+};
+
+//
+// SAX Exception Classes
+//
+
+class TQM_EXPORT_XML TQXmlParseException
+{
+public:
+    TQXmlParseException( const TQString& name="", int c=-1, int l=-1, const TQString& p="", const TQString& s="" )
+	: msg( name ), column( c ), line( l ), pub( p ), sys( s )
+    { }
+
+    int columnNumber() const;
+    int lineNumber() const;
+    TQString publicId() const;
+    TQString systemId() const;
+    TQString message() const;
+
+private:
+    TQString msg;
+    int column;
+    int line;
+    TQString pub;
+    TQString sys;
+
+    TQXmlParseExceptionPrivate *d;
+};
+
+
+//
+// XML Reader
+//
+
+class TQM_EXPORT_XML TQXmlReader
+{
+public:
+    virtual bool feature( const TQString& name, bool *ok = 0 ) const = 0;
+    virtual void setFeature( const TQString& name, bool value ) = 0;
+    virtual bool hasFeature( const TQString& name ) const = 0;
+    virtual void* property( const TQString& name, bool *ok = 0 ) const = 0;
+    virtual void setProperty( const TQString& name, void* value ) = 0;
+    virtual bool hasProperty( const TQString& name ) const = 0;
+    virtual void setEntityResolver( TQXmlEntityResolver* handler ) = 0;
+    virtual TQXmlEntityResolver* entityResolver() const = 0;
+    virtual void setDTDHandler( TQXmlDTDHandler* handler ) = 0;
+    virtual TQXmlDTDHandler* DTDHandler() const = 0;
+    virtual void setContentHandler( TQXmlContentHandler* handler ) = 0;
+    virtual TQXmlContentHandler* contentHandler() const = 0;
+    virtual void setErrorHandler( TQXmlErrorHandler* handler ) = 0;
+    virtual TQXmlErrorHandler* errorHandler() const = 0;
+    virtual void setLexicalHandler( TQXmlLexicalHandler* handler ) = 0;
+    virtual TQXmlLexicalHandler* lexicalHandler() const = 0;
+    virtual void setDeclHandler( TQXmlDeclHandler* handler ) = 0;
+    virtual TQXmlDeclHandler* declHandler() const = 0;
+    virtual bool parse( const TQXmlInputSource& input ) = 0;
+    virtual bool parse( const TQXmlInputSource* input ) = 0;
+};
+
+class TQM_EXPORT_XML TQXmlSimpleReader : public TQXmlReader
+{
+public:
+    TQXmlSimpleReader();
+    virtual ~TQXmlSimpleReader();
+
+    bool feature( const TQString& name, bool *ok = 0 ) const;
+    void setFeature( const TQString& name, bool value );
+    bool hasFeature( const TQString& name ) const;
+
+    void* property( const TQString& name, bool *ok = 0 ) const;
+    void setProperty( const TQString& name, void* value );
+    bool hasProperty( const TQString& name ) const;
+
+    void setEntityResolver( TQXmlEntityResolver* handler );
+    TQXmlEntityResolver* entityResolver() const;
+    void setDTDHandler( TQXmlDTDHandler* handler );
+    TQXmlDTDHandler* DTDHandler() const;
+    void setContentHandler( TQXmlContentHandler* handler );
+    TQXmlContentHandler* contentHandler() const;
+    void setErrorHandler( TQXmlErrorHandler* handler );
+    TQXmlErrorHandler* errorHandler() const;
+    void setLexicalHandler( TQXmlLexicalHandler* handler );
+    TQXmlLexicalHandler* lexicalHandler() const;
+    void setDeclHandler( TQXmlDeclHandler* handler );
+    TQXmlDeclHandler* declHandler() const;
+
+    bool parse( const TQXmlInputSource& input );
+    bool parse( const TQXmlInputSource* input );
+    virtual bool parse( const TQXmlInputSource* input, bool incremental );
+    virtual bool parseContinue();
+
+private:
+    // variables
+    TQXmlContentHandler *contentHnd;
+    TQXmlErrorHandler   *errorHnd;
+    TQXmlDTDHandler     *dtdHnd;
+    TQXmlEntityResolver *entityRes;
+    TQXmlLexicalHandler *lexicalHnd;
+    TQXmlDeclHandler    *declHnd;
+
+    TQXmlInputSource *inputSource;
+
+    TQChar c; // the character at reading position
+    int   lineNr; // number of line
+    int   columnNr; // position in line
+
+    int     nameArrayPos;
+    TQChar   nameArray[256]; // only used for names
+    TQString nameValue; // only used for names
+    int     refArrayPos;
+    TQChar   refArray[256]; // only used for references
+    TQString refValue; // only used for references
+    int     stringArrayPos;
+    TQChar   stringArray[256]; // used for any other strings that are parsed
+    TQString stringValue; // used for any other strings that are parsed
+
+    TQXmlSimpleReaderPrivate* d;
+
+    const TQString &string();
+    void stringClear();
+    inline void stringAddC() { stringAddC(c); }
+    void stringAddC(const TQChar&);
+    const TQString& name();
+    void nameClear();
+    inline void nameAddC() { nameAddC(c); }
+    void nameAddC(const TQChar&);
+    const TQString& ref();
+    void refClear();
+    inline void refAddC() { refAddC(c); }
+    void refAddC(const TQChar&);
+
+    // used by parseReference() and parsePEReference()
+    enum EntityRecognitionContext { InContent, InAttributeValue, InEntityValue, InDTD };
+
+    // private functions
+    bool eat_ws();
+    bool next_eat_ws();
+
+    void next();
+    bool atEnd();
+
+    void init( const TQXmlInputSource* i );
+    void initData();
+
+    bool entityExist( const TQString& ) const;
+
+    bool parseBeginOrContinue( int state, bool incremental );
+
+    bool parseProlog();
+    bool parseElement();
+    bool processElementEmptyTag();
+    bool processElementETagBegin2();
+    bool processElementAttribute();
+    bool parseMisc();
+    bool parseContent();
+
+    bool parsePI();
+    bool parseDoctype();
+    bool parseComment();
+
+    bool parseName();
+    bool parseNmtoken();
+    bool parseAttribute();
+    bool parseReference();
+    bool processReference();
+
+    bool parseExternalID();
+    bool parsePEReference();
+    bool parseMarkupdecl();
+    bool parseAttlistDecl();
+    bool parseAttType();
+    bool parseAttValue();
+    bool parseElementDecl();
+    bool parseNotationDecl();
+    bool parseChoiceSeq();
+    bool parseEntityDecl();
+    bool parseEntityValue();
+
+    bool parseString();
+
+    bool insertXmlRef( const TQString&, const TQString&, bool );
+
+    bool reportEndEntities();
+    void reportParseError( const TQString& error );
+
+    typedef bool (TQXmlSimpleReader::*ParseFunction) ();
+    void unexpectedEof( ParseFunction where, int state );
+    void parseFailed( ParseFunction where, int state );
+    void pushParseState( ParseFunction function, int state );
+
+    void setUndefEntityInAttrHack(bool b);
+
+    friend class TQXmlSimpleReaderPrivate;
+    friend class TQXmlSimpleReaderLocator;
+    friend class TQDomDocumentPrivate;
+};
+
+//
+// SAX Locator
+//
+
+class TQM_EXPORT_XML TQXmlLocator
+{
+public:
+    TQXmlLocator();
+    virtual ~TQXmlLocator();
+
+    virtual int columnNumber() = 0;
+    virtual int lineNumber() = 0;
+//    TQString getPublicId()
+//    TQString getSystemId()
+};
+
+//
+// SAX handler classes
+//
+
+class TQM_EXPORT_XML TQXmlContentHandler
+{
+public:
+    virtual void setDocumentLocator( TQXmlLocator* locator ) = 0;
+    virtual bool startDocument() = 0;
+    virtual bool endDocument() = 0;
+    virtual bool startPrefixMapping( const TQString& prefix, const TQString& uri ) = 0;
+    virtual bool endPrefixMapping( const TQString& prefix ) = 0;
+    virtual bool startElement( const TQString& namespaceURI, const TQString& localName, const TQString& qName, const TQXmlAttributes& atts ) = 0;
+    virtual bool endElement( const TQString& namespaceURI, const TQString& localName, const TQString& qName ) = 0;
+    virtual bool characters( const TQString& ch ) = 0;
+    virtual bool ignorableWhitespace( const TQString& ch ) = 0;
+    virtual bool processingInstruction( const TQString& target, const TQString& data ) = 0;
+    virtual bool skippedEntity( const TQString& name ) = 0;
+    virtual TQString errorString() = 0;
+};
+
+class TQM_EXPORT_XML TQXmlErrorHandler
+{
+public:
+    virtual bool warning( const TQXmlParseException& exception ) = 0;
+    virtual bool error( const TQXmlParseException& exception ) = 0;
+    virtual bool fatalError( const TQXmlParseException& exception ) = 0;
+    virtual TQString errorString() = 0;
+};
+
+class TQM_EXPORT_XML TQXmlDTDHandler
+{
+public:
+    virtual bool notationDecl( const TQString& name, const TQString& publicId, const TQString& systemId ) = 0;
+    virtual bool unparsedEntityDecl( const TQString& name, const TQString& publicId, const TQString& systemId, const TQString& notationName ) = 0;
+    virtual TQString errorString() = 0;
+};
+
+class TQM_EXPORT_XML TQXmlEntityResolver
+{
+public:
+    virtual bool resolveEntity( const TQString& publicId, const TQString& systemId, TQXmlInputSource*& ret ) = 0;
+    virtual TQString errorString() = 0;
+};
+
+class TQM_EXPORT_XML TQXmlLexicalHandler
+{
+public:
+    virtual bool startDTD( const TQString& name, const TQString& publicId, const TQString& systemId ) = 0;
+    virtual bool endDTD() = 0;
+    virtual bool startEntity( const TQString& name ) = 0;
+    virtual bool endEntity( const TQString& name ) = 0;
+    virtual bool startCDATA() = 0;
+    virtual bool endCDATA() = 0;
+    virtual bool comment( const TQString& ch ) = 0;
+    virtual TQString errorString() = 0;
+};
+
+class TQM_EXPORT_XML TQXmlDeclHandler
+{
+public:
+    virtual bool attributeDecl( const TQString& eName, const TQString& aName, const TQString& type, const TQString& valueDefault, const TQString& value ) = 0;
+    virtual bool internalEntityDecl( const TQString& name, const TQString& value ) = 0;
+    virtual bool externalEntityDecl( const TQString& name, const TQString& publicId, const TQString& systemId ) = 0;
+    virtual TQString errorString() = 0;
+};
+
+
+class TQM_EXPORT_XML TQXmlDefaultHandler : public TQXmlContentHandler, public TQXmlErrorHandler, public TQXmlDTDHandler, public TQXmlEntityResolver, public TQXmlLexicalHandler, public TQXmlDeclHandler
+{
+public:
+    TQXmlDefaultHandler() { }
+    virtual ~TQXmlDefaultHandler() { }
+
+    void setDocumentLocator( TQXmlLocator* locator );
+    bool startDocument();
+    bool endDocument();
+    bool startPrefixMapping( const TQString& prefix, const TQString& uri );
+    bool endPrefixMapping( const TQString& prefix );
+    bool startElement( const TQString& namespaceURI, const TQString& localName, const TQString& qName, const TQXmlAttributes& atts );
+    bool endElement( const TQString& namespaceURI, const TQString& localName, const TQString& qName );
+    bool characters( const TQString& ch );
+    bool ignorableWhitespace( const TQString& ch );
+    bool processingInstruction( const TQString& target, const TQString& data );
+    bool skippedEntity( const TQString& name );
+
+    bool warning( const TQXmlParseException& exception );
+    bool error( const TQXmlParseException& exception );
+    bool fatalError( const TQXmlParseException& exception );
+
+    bool notationDecl( const TQString& name, const TQString& publicId, const TQString& systemId );
+    bool unparsedEntityDecl( const TQString& name, const TQString& publicId, const TQString& systemId, const TQString& notationName );
+
+    bool resolveEntity( const TQString& publicId, const TQString& systemId, TQXmlInputSource*& ret );
+
+    bool startDTD( const TQString& name, const TQString& publicId, const TQString& systemId );
+    bool endDTD();
+    bool startEntity( const TQString& name );
+    bool endEntity( const TQString& name );
+    bool startCDATA();
+    bool endCDATA();
+    bool comment( const TQString& ch );
+
+    bool attributeDecl( const TQString& eName, const TQString& aName, const TQString& type, const TQString& valueDefault, const TQString& value );
+    bool internalEntityDecl( const TQString& name, const TQString& value );
+    bool externalEntityDecl( const TQString& name, const TQString& publicId, const TQString& systemId );
+
+    TQString errorString();
+
+private:
+    TQXmlDefaultHandlerPrivate *d;
+};
+
+
+//
+// inlines
+//
+
+inline bool TQXmlSimpleReader::atEnd()
+{ return (c.unicode()|0x0001) == 0xffff; }
+inline int TQXmlAttributes::count() const
+{ return length(); }
+
+
+#endif //QT_NO_XML
+
+#endif
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmlattributes-members.html b/doc/html/qxmlattributes-members.html new file mode 100644 index 00000000..70927c2b --- /dev/null +++ b/doc/html/qxmlattributes-members.html @@ -0,0 +1,58 @@ + + + + + +TQXmlAttributes Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlAttributes

+ +

This is the complete list of member functions for +TQXmlAttributes, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmlattributes.html b/doc/html/qxmlattributes.html new file mode 100644 index 00000000..99fa2a4c --- /dev/null +++ b/doc/html/qxmlattributes.html @@ -0,0 +1,200 @@ + + + + + +TQXmlAttributes Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlAttributes Class Reference
[XML module]

+ +

The TQXmlAttributes class provides XML attributes. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

List of all member functions. +

Public Members

+
    +
  • TQXmlAttributes ()
  • +
  • virtual ~TQXmlAttributes ()
  • +
  • int index ( const TQString & qName ) const
  • +
  • int index ( const TQString & uri, const TQString & localPart ) const
  • +
  • int length () const
  • +
  • int count () const
  • +
  • TQString localName ( int index ) const
  • +
  • TQString qName ( int index ) const
  • +
  • TQString uri ( int index ) const
  • +
  • TQString type ( int index ) const
  • +
  • TQString type ( const TQString & qName ) const
  • +
  • TQString type ( const TQString & uri, const TQString & localName ) const
  • +
  • TQString value ( int index ) const
  • +
  • TQString value ( const TQString & qName ) const
  • +
  • TQString value ( const TQString & uri, const TQString & localName ) const
  • +
  • void clear ()
  • +
  • void append ( const TQString & qName, const TQString & uri, const TQString & localPart, const TQString & value )
  • +
+

Detailed Description

+ + + +The TQXmlAttributes class provides XML attributes. + +

+ +

If attributes are reported by TQXmlContentHandler::startElement() +this class is used to pass the attribute values. +

Use index() to locate the position of an attribute in the list, +count() to retrieve the number of attributes, and clear() to +remove the attributes. New attributes can be added with append(). +Use type() to get an attribute's type and value() to get its +value. The attribute's name is available from localName() or +qName(), and its namespace URI from uri(). +

See also XML. + +


Member Function Documentation

+

TQXmlAttributes::TQXmlAttributes () +

+ +

Constructs an empty attribute list. + +

TQXmlAttributes::~TQXmlAttributes () [virtual] +

+ +

Destroys the attributes object. + +

void TQXmlAttributes::append ( const TQString & qName, const TQString & uri, const TQString & localPart, const TQString & value ) +

+Appends a new attribute entry to the list of attributes. The +qualified name of the attribute is qName, the namespace URI is +uri and the local name is localPart. The value of the +attribute is value. +

See also qName(), uri(), localName(), and value(). + +

void TQXmlAttributes::clear () +

+Clears the list of attributes. +

See also append(). + +

int TQXmlAttributes::count () const +

+ +

Returns the number of attributes in the list. This function is +equivalent to length(). + +

int TQXmlAttributes::index ( const TQString & qName ) const +

+Looks up the index of an attribute by the qualified name qName. +

Returns the index of the attribute or -1 if it wasn't found. +

See also the namespace description. + +

int TQXmlAttributes::index ( const TQString & uri, const TQString & localPart ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Looks up the index of an attribute by a namespace name. +

uri specifies the namespace URI, or an empty string if the name +has no namespace URI. localPart specifies the attribute's local +name. +

Returns the index of the attribute, or -1 if it wasn't found. +

See also the namespace description. + +

int TQXmlAttributes::length () const +

+Returns the number of attributes in the list. +

See also count(). + +

Example: xml/tagreader-with-features/structureparser.cpp. +

TQString TQXmlAttributes::localName ( int index ) const +

+Looks up an attribute's local name for the attribute at position +index. If no namespace processing is done, the local name is +TQString::null. +

See also the namespace description. + +

TQString TQXmlAttributes::qName ( int index ) const +

+Looks up an attribute's XML 1.0 qualified name for the attribute +at position index. +

See also the namespace description. + +

Example: xml/tagreader-with-features/structureparser.cpp. +

TQString TQXmlAttributes::type ( int index ) const +

+Looks up an attribute's type for the attribute at position index. +

Currently only "CDATA" is returned. + +

TQString TQXmlAttributes::type ( const TQString & qName ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Looks up an attribute's type for the qualified name qName. +

Currently only "CDATA" is returned. + +

TQString TQXmlAttributes::type ( const TQString & uri, const TQString & localName ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Looks up an attribute's type by namespace name. +

uri specifies the namespace URI and localName specifies the +local name. If the name has no namespace URI, use an empty string +for uri. +

Currently only "CDATA" is returned. + +

TQString TQXmlAttributes::uri ( int index ) const +

+Looks up an attribute's namespace URI for the attribute at +position index. If no namespace processing is done or if the +attribute has no namespace, the namespace URI is TQString::null. +

See also the namespace description. + +

Example: xml/tagreader-with-features/structureparser.cpp. +

TQString TQXmlAttributes::value ( int index ) const +

+Looks up an attribute's value for the attribute at position index. + +

TQString TQXmlAttributes::value ( const TQString & qName ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Looks up an attribute's value for the qualified name qName. +

See also the namespace description. + +

TQString TQXmlAttributes::value ( const TQString & uri, const TQString & localName ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Looks up an attribute's value by namespace name. +

uri specifies the namespace URI, or an empty string if the name +has no namespace URI. localName specifies the attribute's local +name. +

See also the namespace description. + + +


+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/qxmlcontenthandler-members.html b/doc/html/qxmlcontenthandler-members.html new file mode 100644 index 00000000..6e192beb --- /dev/null +++ b/doc/html/qxmlcontenthandler-members.html @@ -0,0 +1,58 @@ + + + + + +TQXmlContentHandler Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlContentHandler

+ +

This is the complete list of member functions for +TQXmlContentHandler, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmlcontenthandler.html b/doc/html/qxmlcontenthandler.html new file mode 100644 index 00000000..9b914abd --- /dev/null +++ b/doc/html/qxmlcontenthandler.html @@ -0,0 +1,266 @@ + + + + + +TQXmlContentHandler Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlContentHandler Class Reference
[XML module]

+ +

The TQXmlContentHandler class provides an interface to +report the logical content of XML data. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

Inherited by TQXmlDefaultHandler. +

List of all member functions. +

Public Members

+
    +
  • virtual void setDocumentLocator ( TQXmlLocator * locator ) = 0
  • +
  • virtual bool startDocument () = 0
  • +
  • virtual bool endDocument () = 0
  • +
  • virtual bool startPrefixMapping ( const TQString & prefix, const TQString & uri ) = 0
  • +
  • virtual bool endPrefixMapping ( const TQString & prefix ) = 0
  • +
  • virtual bool startElement ( const TQString & namespaceURI, const TQString & localName, const TQString & qName, const TQXmlAttributes & atts ) = 0
  • +
  • virtual bool endElement ( const TQString & namespaceURI, const TQString & localName, const TQString & qName ) = 0
  • +
  • virtual bool characters ( const TQString & ch ) = 0
  • +
  • virtual bool ignorableWhitespace ( const TQString & ch ) = 0
  • +
  • virtual bool processingInstruction ( const TQString & target, const TQString & data ) = 0
  • +
  • virtual bool skippedEntity ( const TQString & name ) = 0
  • +
  • virtual TQString errorString () = 0
  • +
+

Detailed Description

+ + + +The TQXmlContentHandler class provides an interface to +report the logical content of XML data. + +

+ +

If the application needs to be informed of basic parsing events, +it can implement this interface and activate it using +TQXmlReader::setContentHandler(). The reader can then report basic +document-related events like the start and end of elements and +character data through this interface. +

The order of events in this interface is very important, and +mirrors the order of information in the document itself. For +example, all of an element's content (character data, processing +instructions, and sub-elements) appears, in order, between the +startElement() event and the corresponding endElement() event. +

The class TQXmlDefaultHandler provides a default implementation for +this interface; subclassing from the TQXmlDefaultHandler class is +very convenient if you only want to be informed of some parsing +events. +

The startDocument() function is called at the start of the +document, and endDocument() is called at the end. Before parsing +begins setDocumentLocator() is called. For each element +startElement() is called, with endElement() being called at the +end of each element. The characters() function is called with +chunks of character data; ignorableWhitespace() is called with +chunks of whitespace and processingInstruction() is called with +processing instructions. If an entity is skipped skippedEntity() +is called. At the beginning of prefix-URI scopes +startPrefixMapping() is called. +

See also the Introduction to SAX2. +

See also TQXmlDTDHandler, TQXmlDeclHandler, TQXmlEntityResolver, TQXmlErrorHandler, TQXmlLexicalHandler, and XML. + +


Member Function Documentation

+

bool TQXmlContentHandler::characters ( const TQString & ch ) [pure virtual] +

+ +

The reader calls this function when it has parsed a chunk of +character data (either normal character data or character data +inside a CDATA section; if you need to distinguish between those +two types you must use TQXmlLexicalHandler::startCDATA() and +TQXmlLexicalHandler::endCDATA()). The character data is reported in +ch. +

Some readers report whitespace in element content using the +ignorableWhitespace() function rather than using this one. +

A reader may report the character data of an element in more than +one chunk; e.g. a reader might want to report "a<b" in three +characters() events ("a ", "<" and " b"). +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. + +

bool TQXmlContentHandler::endDocument () [pure virtual] +

+ +

The reader calls this function after it has finished parsing. It +is called just once, and is the last handler function called. It +is called after the reader has read all input or has abandoned +parsing because of a fatal error. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. +

See also startDocument(). + +

bool TQXmlContentHandler::endElement ( const TQString & namespaceURI, const TQString & localName, const TQString & qName ) [pure virtual] +

+ +

The reader calls this function when it has parsed an end element +tag with the qualified name qName, the local name localName +and the namespace URI namespaceURI. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. +

See also the namespace description. +

See also startElement(). + +

Example: xml/tagreader/structureparser.cpp. +

bool TQXmlContentHandler::endPrefixMapping ( const TQString & prefix ) [pure virtual] +

+ +

The reader calls this function to signal the end of a prefix +mapping for the prefix prefix. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. +

See also the namespace description. +

See also startPrefixMapping(). + +

TQString TQXmlContentHandler::errorString () [pure virtual] +

+ +

The reader calls this function to get an error string, e.g. if any +of the handler functions returns FALSE. + +

bool TQXmlContentHandler::ignorableWhitespace ( const TQString & ch ) [pure virtual] +

+ +

Some readers may use this function to report each chunk of +whitespace in element content. The whitespace is reported in ch. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. + +

bool TQXmlContentHandler::processingInstruction ( const TQString & target, const TQString & data ) [pure virtual] +

+ +

The reader calls this function when it has parsed a processing +instruction. +

target is the target name of the processing instruction and data is the data in the processing instruction. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. + +

void TQXmlContentHandler::setDocumentLocator ( TQXmlLocator * locator ) [pure virtual] +

+ +

The reader calls this function before it starts parsing the +document. The argument locator is a pointer to a TQXmlLocator +which allows the application to get the parsing position within +the document. +

Do not destroy the locator; it is destroyed when the reader is +destroyed. (Do not use the locator after the reader is +destroyed). + +

bool TQXmlContentHandler::skippedEntity ( const TQString & name ) [pure virtual] +

+ +

Some readers may skip entities if they have not seen the +declarations (e.g. because they are in an external DTD). If they +do so they report that they skipped the entity called name by +calling this function. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. + +

bool TQXmlContentHandler::startDocument () [pure virtual] +

+ +

The reader calls this function when it starts parsing the +document. The reader calls this function just once, after the call +to setDocumentLocator(), and before any other functions in this +class or in the TQXmlDTDHandler class are called. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. +

See also endDocument(). + +

Example: xml/tagreader/structureparser.cpp. +

bool TQXmlContentHandler::startElement ( const TQString & namespaceURI, const TQString & localName, const TQString & qName, const TQXmlAttributes & atts ) [pure virtual] +

+ +

The reader calls this function when it has parsed a start element +tag. +

There is a corresponding endElement() call when the corresponding +end element tag is read. The startElement() and endElement() calls +are always nested correctly. Empty element tags (e.g. <x/>) +cause a startElement() call to be immediately followed by an +endElement() call. +

The attribute list provided only contains attributes with explicit +values. The attribute list contains attributes used for namespace +declaration (i.e. attributes starting with xmlns) only if the +namespace-prefix property of the reader is TRUE. +

The argument namespaceURI is the namespace URI, or +TQString::null if the element has no namespace URI or if no +namespace processing is done. localName is the local name +(without prefix), or TQString::null if no namespace processing is +done, qName is the qualified name (with prefix) and atts are +the attributes attached to the element. If there are no +attributes, atts is an empty attributes object. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. +

See also the namespace description. +

See also endElement(). + +

Example: xml/tagreader/structureparser.cpp. +

bool TQXmlContentHandler::startPrefixMapping ( const TQString & prefix, const TQString & uri ) [pure virtual] +

+ +

The reader calls this function to signal the begin of a prefix-URI +namespace mapping scope. This information is not necessary for +normal namespace processing since the reader automatically +replaces prefixes for element and attribute names. +

Note that startPrefixMapping() and endPrefixMapping() calls are +not guaranteed to be properly nested relative to each other: all +startPrefixMapping() events occur before the corresponding +startElement() event, and all endPrefixMapping() events occur +after the corresponding endElement() event, but their order is not +otherwise guaranteed. +

The argument prefix is the namespace prefix being declared and +the argument uri is the namespace URI the prefix is mapped to. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. +

See also the namespace description. +

See also endPrefixMapping(). + + +


+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/qxmldeclhandler-members.html b/doc/html/qxmldeclhandler-members.html new file mode 100644 index 00000000..d8ceff88 --- /dev/null +++ b/doc/html/qxmldeclhandler-members.html @@ -0,0 +1,50 @@ + + + + + +TQXmlDeclHandler Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlDeclHandler

+ +

This is the complete list of member functions for +TQXmlDeclHandler, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmldeclhandler.html b/doc/html/qxmldeclhandler.html new file mode 100644 index 00000000..a7c4b2d2 --- /dev/null +++ b/doc/html/qxmldeclhandler.html @@ -0,0 +1,124 @@ + + + + + +TQXmlDeclHandler Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlDeclHandler Class Reference
[XML module]

+ +

The TQXmlDeclHandler class provides an interface to report declaration +content of XML data. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

Inherited by TQXmlDefaultHandler. +

List of all member functions. +

Public Members

+
    +
  • virtual bool attributeDecl ( const TQString & eName, const TQString & aName, const TQString & type, const TQString & valueDefault, const TQString & value ) = 0
  • +
  • virtual bool internalEntityDecl ( const TQString & name, const TQString & value ) = 0
  • +
  • virtual bool externalEntityDecl ( const TQString & name, const TQString & publicId, const TQString & systemId ) = 0
  • +
  • virtual TQString errorString () = 0
  • +
+

Detailed Description

+ + + +The TQXmlDeclHandler class provides an interface to report declaration +content of XML data. + +

+ +

You can set the declaration handler with +TQXmlReader::setDeclHandler(). +

This interface is based on the SAX2 extension DeclHandler. +

The interface provides attributeDecl(), internalEntityDecl() and +externalEntityDecl() functions. +

See also the Introduction to SAX2. +

See also TQXmlDTDHandler, TQXmlContentHandler, TQXmlEntityResolver, TQXmlErrorHandler, TQXmlLexicalHandler, and XML. + +


Member Function Documentation

+

bool TQXmlDeclHandler::attributeDecl ( const TQString & eName, const TQString & aName, const TQString & type, const TQString & valueDefault, const TQString & value ) [pure virtual] +

+ +

The reader calls this function to report an attribute type +declaration. Only the effective (first) declaration for an +attribute is reported. +

The reader passes the name of the associated element in eName +and the name of the attribute in aName. It passes a string that +represents the attribute type in type and a string that +represents the attribute default in valueDefault. This string +is one of "#IMPLIED", "#RETQUIRED", "#FIXED" or TQString::null (if +none of the others applies). The reader passes the attribute's +default value in value. If no default value is specified in the +XML file, value is TQString::null. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. + +

TQString TQXmlDeclHandler::errorString () [pure virtual] +

+ +

The reader calls this function to get an error string if any of +the handler functions returns FALSE. + +

bool TQXmlDeclHandler::externalEntityDecl ( const TQString & name, const TQString & publicId, const TQString & systemId ) [pure virtual] +

+ +

The reader calls this function to report a parsed external entity +declaration. Only the effective (first) declaration for each +entity is reported. +

The reader passes the name of the entity in name, the public +identifier in publicId and the system identifier in systemId. If there is no public identifier specified, it passes +TQString::null in publicId. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. + +

bool TQXmlDeclHandler::internalEntityDecl ( const TQString & name, const TQString & value ) [pure virtual] +

+ +

The reader calls this function to report an internal entity +declaration. Only the effective (first) declaration is reported. +

The reader passes the name of the entity in name and the value +of the entity in value. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. + + +


+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/qxmldefaulthandler-members.html b/doc/html/qxmldefaulthandler-members.html new file mode 100644 index 00000000..9cfd438d --- /dev/null +++ b/doc/html/qxmldefaulthandler-members.html @@ -0,0 +1,76 @@ + + + + + +TQXmlDefaultHandler Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlDefaultHandler

+ +

This is the complete list of member functions for +TQXmlDefaultHandler, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmldefaulthandler.html b/doc/html/qxmldefaulthandler.html new file mode 100644 index 00000000..e99a4802 --- /dev/null +++ b/doc/html/qxmldefaulthandler.html @@ -0,0 +1,84 @@ + + + + + +TQXmlDefaultHandler Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlDefaultHandler Class Reference
[XML module]

+ +

The TQXmlDefaultHandler class provides a default implementation of all +the XML handler classes. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

Inherits TQXmlContentHandler, TQXmlErrorHandler, TQXmlDTDHandler, TQXmlEntityResolver, TQXmlLexicalHandler, and TQXmlDeclHandler. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQXmlDefaultHandler class provides a default implementation of all +the XML handler classes. + +

+ +

Very often we are only interested in parts of the things that the +reader reports. This class implements a default behaviour for the +handler classes (i.e. most of the time do nothing). Usually this +is the class you subclass for implementing your own customized +handler. +

See also the Introduction to SAX2. +

See also TQXmlDTDHandler, TQXmlDeclHandler, TQXmlContentHandler, TQXmlEntityResolver, TQXmlErrorHandler, TQXmlLexicalHandler, and XML. + +


Member Function Documentation

+

TQXmlDefaultHandler::TQXmlDefaultHandler () +

+ +

Constructor. + +

TQXmlDefaultHandler::~TQXmlDefaultHandler () [virtual] +

+ +

Destructor. + + +


+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/qxmldtdhandler-members.html b/doc/html/qxmldtdhandler-members.html new file mode 100644 index 00000000..69c724ce --- /dev/null +++ b/doc/html/qxmldtdhandler-members.html @@ -0,0 +1,49 @@ + + + + + +TQXmlDTDHandler Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlDTDHandler

+ +

This is the complete list of member functions for +TQXmlDTDHandler, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmldtdhandler.html b/doc/html/qxmldtdhandler.html new file mode 100644 index 00000000..6a6ad46a --- /dev/null +++ b/doc/html/qxmldtdhandler.html @@ -0,0 +1,108 @@ + + + + + +TQXmlDTDHandler Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlDTDHandler Class Reference
[XML module]

+ +

The TQXmlDTDHandler class provides an interface to report +DTD content of XML data. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

Inherited by TQXmlDefaultHandler. +

List of all member functions. +

Public Members

+
    +
  • virtual bool notationDecl ( const TQString & name, const TQString & publicId, const TQString & systemId ) = 0
  • +
  • virtual bool unparsedEntityDecl ( const TQString & name, const TQString & publicId, const TQString & systemId, const TQString & notationName ) = 0
  • +
  • virtual TQString errorString () = 0
  • +
+

Detailed Description

+ + + +The TQXmlDTDHandler class provides an interface to report +DTD content of XML data. + +

+ +

If an application needs information about notations and unparsed +entities, it can implement this interface and register an instance +with TQXmlReader::setDTDHandler(). +

Note that this interface includes only those DTD events that the +XML recommendation retquires processors to report, i.e. notation +and unparsed entity declarations using notationDecl() and +unparsedEntityDecl() respectively. +

See also the Introduction to SAX2. +

See also TQXmlDeclHandler, TQXmlContentHandler, TQXmlEntityResolver, TQXmlErrorHandler, TQXmlLexicalHandler, and XML. + +


Member Function Documentation

+

TQString TQXmlDTDHandler::errorString () [pure virtual] +

+ +

The reader calls this function to get an error string if any of +the handler functions returns FALSE. + +

bool TQXmlDTDHandler::notationDecl ( const TQString & name, const TQString & publicId, const TQString & systemId ) [pure virtual] +

+ +

The reader calls this function when it has parsed a notation +declaration. +

The argument name is the notation name, publicId is the +notation's public identifier and systemId is the notation's +system identifier. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. + +

bool TQXmlDTDHandler::unparsedEntityDecl ( const TQString & name, const TQString & publicId, const TQString & systemId, const TQString & notationName ) [pure virtual] +

+ +

The reader calls this function when it finds an unparsed entity +declaration. +

The argument name is the unparsed entity's name, publicId is +the entity's public identifier, systemId is the entity's system +identifier and notationName is the name of the associated +notation. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. + + +


+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/qxmlentityresolver-members.html b/doc/html/qxmlentityresolver-members.html new file mode 100644 index 00000000..f115f883 --- /dev/null +++ b/doc/html/qxmlentityresolver-members.html @@ -0,0 +1,48 @@ + + + + + +TQXmlEntityResolver Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlEntityResolver

+ +

This is the complete list of member functions for +TQXmlEntityResolver, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmlentityresolver.html b/doc/html/qxmlentityresolver.html new file mode 100644 index 00000000..ee8de6ec --- /dev/null +++ b/doc/html/qxmlentityresolver.html @@ -0,0 +1,99 @@ + + + + + +TQXmlEntityResolver Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlEntityResolver Class Reference
[XML module]

+ +

The TQXmlEntityResolver class provides an interface to +resolve external entities contained in XML data. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

Inherited by TQXmlDefaultHandler. +

List of all member functions. +

Public Members

+
    +
  • virtual bool resolveEntity ( const TQString & publicId, const TQString & systemId, TQXmlInputSource *& ret ) = 0
  • +
  • virtual TQString errorString () = 0
  • +
+

Detailed Description

+ + + +The TQXmlEntityResolver class provides an interface to +resolve external entities contained in XML data. + +

+ +

If an application needs to implement customized handling for +external entities, it must implement this interface, i.e. +resolveEntity(), and register it with +TQXmlReader::setEntityResolver(). +

See also the Introduction to SAX2. +

See also TQXmlDTDHandler, TQXmlDeclHandler, TQXmlContentHandler, TQXmlErrorHandler, TQXmlLexicalHandler, and XML. + +


Member Function Documentation

+

TQString TQXmlEntityResolver::errorString () [pure virtual] +

+ +

The reader calls this function to get an error string if any of +the handler functions returns FALSE. + +

bool TQXmlEntityResolver::resolveEntity ( const TQString & publicId, const TQString & systemId, TQXmlInputSource *& ret ) [pure virtual] +

+ +

The reader calls this function before it opens any external +entity, except the top-level document entity. The application may +request the reader to resolve the entity itself (ret is 0) or +to use an entirely different input source (ret points to the +input source). +

The reader deletes the input source ret when it no longer needs +it, so you should allocate it on the heap with new. +

The argument publicId is the public identifier of the external +entity, systemId is the system identifier of the external +entity and ret is the return value of this function. If ret +is 0 the reader should resolve the entity itself, if it is +non-zero it must point to an input source which the reader uses +instead. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. + + +


+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/qxmlerrorhandler-members.html b/doc/html/qxmlerrorhandler-members.html new file mode 100644 index 00000000..72040d8e --- /dev/null +++ b/doc/html/qxmlerrorhandler-members.html @@ -0,0 +1,50 @@ + + + + + +TQXmlErrorHandler Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlErrorHandler

+ +

This is the complete list of member functions for +TQXmlErrorHandler, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmlerrorhandler.html b/doc/html/qxmlerrorhandler.html new file mode 100644 index 00000000..3d8c9ce1 --- /dev/null +++ b/doc/html/qxmlerrorhandler.html @@ -0,0 +1,114 @@ + + + + + +TQXmlErrorHandler Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlErrorHandler Class Reference
[XML module]

+ +

The TQXmlErrorHandler class provides an interface to report +errors in XML data. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

Inherited by TQXmlDefaultHandler. +

List of all member functions. +

Public Members

+
    +
  • virtual bool warning ( const TQXmlParseException & exception ) = 0
  • +
  • virtual bool error ( const TQXmlParseException & exception ) = 0
  • +
  • virtual bool fatalError ( const TQXmlParseException & exception ) = 0
  • +
  • virtual TQString errorString () = 0
  • +
+

Detailed Description

+ + + +The TQXmlErrorHandler class provides an interface to report +errors in XML data. + +

+ +

If you want your application to report errors to the user or to +perform customized error handling, you should subclass this class. +

You can set the error handler with TQXmlReader::setErrorHandler(). +

Errors can be reported using warning(), error() and fatalError(), +with the error text being reported with errorString(). +

See also the Introduction to SAX2. +

See also TQXmlDTDHandler, TQXmlDeclHandler, TQXmlContentHandler, TQXmlEntityResolver, TQXmlLexicalHandler, and XML. + +


Member Function Documentation

+

bool TQXmlErrorHandler::error ( const TQXmlParseException & exception ) [pure virtual] +

+ +

A reader might use this function to report a recoverable error. A +recoverable error corresponds to the definiton of "error" in +section 1.2 of the XML 1.0 specification. Details of the error are +stored in exception. +

The reader must continue to provide normal parsing events after +invoking this function. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. + +

TQString TQXmlErrorHandler::errorString () [pure virtual] +

+ +

The reader calls this function to get an error string if any of +the handler functions returns FALSE. + +

bool TQXmlErrorHandler::fatalError ( const TQXmlParseException & exception ) [pure virtual] +

+ +

A reader must use this function to report a non-recoverable error. +Details of the error are stored in exception. +

If this function returns TRUE the reader might try to go on +parsing and reporting further errors; but no regular parsing +events are reported. + +

bool TQXmlErrorHandler::warning ( const TQXmlParseException & exception ) [pure virtual] +

+ +

A reader might use this function to report a warning. Warnings are +conditions that are not errors or fatal errors as defined by the +XML 1.0 specification. Details of the warning are stored in exception. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. + + +


+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/qxmlinputsource-members.html b/doc/html/qxmlinputsource-members.html new file mode 100644 index 00000000..db82fef6 --- /dev/null +++ b/doc/html/qxmlinputsource-members.html @@ -0,0 +1,54 @@ + + + + + +TQXmlInputSource Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlInputSource

+ +

This is the complete list of member functions for +TQXmlInputSource, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmlinputsource.html b/doc/html/qxmlinputsource.html new file mode 100644 index 00000000..5f66d40f --- /dev/null +++ b/doc/html/qxmlinputsource.html @@ -0,0 +1,193 @@ + + + + + +TQXmlInputSource Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlInputSource Class Reference
[XML module]

+ +

The TQXmlInputSource class provides the input data for the +TQXmlReader subclasses. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • virtual TQString fromRawData ( const TQByteArray & data, bool beginning = FALSE )
  • +
+

Detailed Description

+ + + +The TQXmlInputSource class provides the input data for the +TQXmlReader subclasses. + +

+ +

All subclasses of TQXmlReader read the input XML document from this +class. +

This class recognizes the encoding of the data by reading the +encoding declaration in the XML file if it finds one, and reading +the data using the corresponding encoding. If it does not find an +encoding declaration, then it assumes that the data is either in +UTF-8 or UTF-16, depending on whether it can find a byte-order +mark. +

There are two ways to populate the input source with data: you can +construct it with a TQIODevice* so that the input source reads the +data from that device. Or you can set the data explicitly with one +of the setData() functions. +

Usually you either construct a TQXmlInputSource that works on a +TQIODevice* or you construct an empty TQXmlInputSource and set the +data with setData(). There are only rare occasions where you would +want to mix both methods. +

The TQXmlReader subclasses use the next() function to read the +input character by character. If you want to start from the +beginning again, use reset(). +

The functions data() and fetchData() are useful if you want to do +something with the data other than parsing, e.g. displaying the +raw XML file. The benefit of using the TQXmlInputClass in such +cases is that it tries to use the correct encoding. +

See also TQXmlReader, TQXmlSimpleReader, and XML. + +


Member Function Documentation

+

TQXmlInputSource::TQXmlInputSource () +

+Constructs an input source which contains no data. +

See also setData(). + +

TQXmlInputSource::TQXmlInputSource ( TQIODevice * dev ) +

+Constructs an input source and gets the data from device dev. +If dev is not open, it is opened in read-only mode. If dev +is 0 or it is not possible to read from the device, the input +source will contain no data. +

See also setData(), fetchData(), and TQIODevice. + +

TQXmlInputSource::TQXmlInputSource ( TQFile & file ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Constructs an input source and gets the data from the file file. If the +file cannot be read the input source is empty. + +

TQXmlInputSource::TQXmlInputSource ( TQTextStream & stream ) +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

Constructs an input source and gets the data from the text stream stream. + +

TQXmlInputSource::~TQXmlInputSource () [virtual] +

+Destructor. + +

TQString TQXmlInputSource::data () [virtual] +

+Returns the data the input source contains or TQString::null if the +input source does not contain any data. +

See also setData(), TQXmlInputSource(), and fetchData(). + +

void TQXmlInputSource::fetchData () [virtual] +

+This function reads more data from the device that was set during +construction. If the input source already contained data, this +function deletes that data first. +

This object contains no data after a call to this function if the +object was constructed without a device to read data from or if +this function was not able to get more data from the device. +

There are two occasions where a fetch is done implicitly by +another function call: during construction (so that the object +starts out with some initial data where available), and during a +call to next() (if the data had run out). +

You don't normally need to use this function if you use next(). +

See also data(), next(), and TQXmlInputSource(). + +

TQString TQXmlInputSource::fromRawData ( const TQByteArray & data, bool beginning = FALSE ) [virtual protected] +

+This function reads the XML file from data and tries to +recognize the encoding. It converts the raw data data into a +TQString and returns it. It tries its best to get the correct +encoding for the XML file. +

If beginning is TRUE, this function assumes that the data +starts at the beginning of a new XML document and looks for an +encoding declaration. If beginning is FALSE, it converts the +raw data using the encoding determined from prior calls. + +

TQChar TQXmlInputSource::next () [virtual] +

+Returns the next character of the input source. If this function +reaches the end of available data, it returns +TQXmlInputSource::EndOfData. If you call next() after that, it +tries to fetch more data by calling fetchData(). If the +fetchData() call results in new data, this function returns the +first character of that data; otherwise it returns +TQXmlInputSource::EndOfDocument. +

See also reset(), fetchData(), TQXmlSimpleReader::parse(), and TQXmlSimpleReader::parseContinue(). + +

void TQXmlInputSource::reset () [virtual] +

+This function sets the position used by next() to the beginning of +the data returned by data(). This is useful if you want to use the +input source for more than one parse. +

See also next(). + +

Example: xml/tagreader-with-features/tagreader.cpp. +

void TQXmlInputSource::setData ( const TQString & dat ) [virtual] +

+Sets the data of the input source to dat. +

If the input source already contains data, this function deletes +that data first. +

See also data(). + +

void TQXmlInputSource::setData ( const TQByteArray & dat ) [virtual] +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

The data dat is passed through the correct text-codec, before +it is set. + + +


+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/qxmllexicalhandler-members.html b/doc/html/qxmllexicalhandler-members.html new file mode 100644 index 00000000..c28d9c1a --- /dev/null +++ b/doc/html/qxmllexicalhandler-members.html @@ -0,0 +1,54 @@ + + + + + +TQXmlLexicalHandler Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlLexicalHandler

+ +

This is the complete list of member functions for +TQXmlLexicalHandler, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmllexicalhandler.html b/doc/html/qxmllexicalhandler.html new file mode 100644 index 00000000..b906714d --- /dev/null +++ b/doc/html/qxmllexicalhandler.html @@ -0,0 +1,177 @@ + + + + + +TQXmlLexicalHandler Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlLexicalHandler Class Reference
[XML module]

+ +

The TQXmlLexicalHandler class provides an interface to +report the lexical content of XML data. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

Inherited by TQXmlDefaultHandler. +

List of all member functions. +

Public Members

+
    +
  • virtual bool startDTD ( const TQString & name, const TQString & publicId, const TQString & systemId ) = 0
  • +
  • virtual bool endDTD () = 0
  • +
  • virtual bool startEntity ( const TQString & name ) = 0
  • +
  • virtual bool endEntity ( const TQString & name ) = 0
  • +
  • virtual bool startCDATA () = 0
  • +
  • virtual bool endCDATA () = 0
  • +
  • virtual bool comment ( const TQString & ch ) = 0
  • +
  • virtual TQString errorString () = 0
  • +
+

Detailed Description

+ + + +The TQXmlLexicalHandler class provides an interface to +report the lexical content of XML data. + +

+ +

The events in the lexical handler apply to the entire document, +not just to the document element, and all lexical handler events +appear between the content handler's startDocument and endDocument +events. +

You can set the lexical handler with +TQXmlReader::setLexicalHandler(). +

This interface's design is based on the the SAX2 extension +LexicalHandler. +

The interface provides the startDTD(), endDTD(), startEntity(), +endEntity(), startCDATA(), endCDATA() and comment() functions. +

See also the Introduction to SAX2. +

See also TQXmlDTDHandler, TQXmlDeclHandler, TQXmlContentHandler, TQXmlEntityResolver, TQXmlErrorHandler, and XML. + +


Member Function Documentation

+

bool TQXmlLexicalHandler::comment ( const TQString & ch ) [pure virtual] +

+ +

The reader calls this function to report an XML comment anywhere +in the document. It reports the text of the comment in ch. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. + +

bool TQXmlLexicalHandler::endCDATA () [pure virtual] +

+ +

The reader calls this function to report the end of a CDATA +section. +

If this function returns FALSE the reader stops parsing and reports +an error. The reader uses the function errorString() to get the error +message. +

See also startCDATA() and TQXmlContentHandler::characters(). + +

bool TQXmlLexicalHandler::endDTD () [pure virtual] +

+ +

The reader calls this function to report the end of a DTD +declaration, if any. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. +

See also startDTD(). + +

bool TQXmlLexicalHandler::endEntity ( const TQString & name ) [pure virtual] +

+ +

The reader calls this function to report the end of an entity +called name. +

For every startEntity() call, there is a corresponding endEntity() +call. The calls to startEntity() and endEntity() are properly +nested. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. +

See also startEntity(), TQXmlContentHandler::skippedEntity(), and TQXmlSimpleReader::setFeature(). + +

TQString TQXmlLexicalHandler::errorString () [pure virtual] +

+ +

The reader calls this function to get an error string if any of +the handler functions returns FALSE. + +

bool TQXmlLexicalHandler::startCDATA () [pure virtual] +

+ +

The reader calls this function to report the start of a CDATA +section. The content of the CDATA section is reported through the +TQXmlContentHandler::characters() function. This function is +intended only to report the boundary. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. +

See also endCDATA(). + +

bool TQXmlLexicalHandler::startDTD ( const TQString & name, const TQString & publicId, const TQString & systemId ) [pure virtual] +

+ +

The reader calls this function to report the start of a DTD +declaration, if any. It reports the name of the document type in +name, the public identifier in publicId and the system +identifier in systemId. +

If the public identifier is missing, publicId is set to +TQString::null. If the system identifier is missing, systemId is +set to TQString::null. Note that it is not valid XML to have a +public identifier but no system identifier; in such cases a parse +error will occur. +

All declarations reported through TQXmlDTDHandler or +TQXmlDeclHandler appear between the startDTD() and endDTD() calls. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. +

See also endDTD(). + +

bool TQXmlLexicalHandler::startEntity ( const TQString & name ) [pure virtual] +

+ +

The reader calls this function to report the start of an entity +called name. +

Note that if the entity is unknown, the reader reports it through +TQXmlContentHandler::skippedEntity() and not through this +function. +

If this function returns FALSE the reader stops parsing and +reports an error. The reader uses the function errorString() to +get the error message. +

See also endEntity() and TQXmlSimpleReader::setFeature(). + + +


+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/qxmllocator-members.html b/doc/html/qxmllocator-members.html new file mode 100644 index 00000000..7a1cf3b8 --- /dev/null +++ b/doc/html/qxmllocator-members.html @@ -0,0 +1,50 @@ + + + + + +TQXmlLocator Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlLocator

+ +

This is the complete list of member functions for +TQXmlLocator, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmllocator.html b/doc/html/qxmllocator.html new file mode 100644 index 00000000..366ed1b7 --- /dev/null +++ b/doc/html/qxmllocator.html @@ -0,0 +1,94 @@ + + + + + +TQXmlLocator Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlLocator Class Reference
[XML module]

+ +

The TQXmlLocator class provides the XML handler classes with +information about the parsing position within a file. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQXmlLocator class provides the XML handler classes with +information about the parsing position within a file. + +

+ +

The reader reports a TQXmlLocator to the content handler before it +starts to parse the document. This is done with the +TQXmlContentHandler::setDocumentLocator() function. The handler +classes can now use this locator to get the position (lineNumber() +and columnNumber()) that the reader has reached. +

See also XML. + +


Member Function Documentation

+

TQXmlLocator::TQXmlLocator () +

+Constructor. + +

TQXmlLocator::~TQXmlLocator () [virtual] +

+Destructor. + +

int TQXmlLocator::columnNumber () [pure virtual] +

+ +

Returns the column number (starting at 1) or -1 if there is no +column number available. + +

int TQXmlLocator::lineNumber () [pure virtual] +

+ +

Returns the line number (starting at 1) or -1 if there is no line +number available. + + +


+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/qxmlnamespacesupport-members.html b/doc/html/qxmlnamespacesupport-members.html new file mode 100644 index 00000000..50210ec9 --- /dev/null +++ b/doc/html/qxmlnamespacesupport-members.html @@ -0,0 +1,57 @@ + + + + + +TQXmlNamespaceSupport Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlNamespaceSupport

+ +

This is the complete list of member functions for +TQXmlNamespaceSupport, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmlnamespacesupport.html b/doc/html/qxmlnamespacesupport.html new file mode 100644 index 00000000..8c09edc9 --- /dev/null +++ b/doc/html/qxmlnamespacesupport.html @@ -0,0 +1,201 @@ + + + + + +TQXmlNamespaceSupport Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlNamespaceSupport Class Reference
[XML module]

+ +

The TQXmlNamespaceSupport class is a helper class for XML +readers which want to include namespace support. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQXmlNamespaceSupport class is a helper class for XML +readers which want to include namespace support. + +

+ +

You can set the prefix for the current namespace with setPrefix(), +and get the list of current prefixes (or those for a given URI) +with prefixes(). The namespace URI is available from uri(). Use +pushContext() to start a new namespace context, and popContext() +to return to the previous namespace context. Use splitName() or +processName() to split a name into its prefix and local name. +

See also the namespace description. +

See also XML. + +


Member Function Documentation

+

TQXmlNamespaceSupport::TQXmlNamespaceSupport () +

+Constructs a TQXmlNamespaceSupport. + +

TQXmlNamespaceSupport::~TQXmlNamespaceSupport () +

+Destroys a TQXmlNamespaceSupport. + +

void TQXmlNamespaceSupport::popContext () +

+Reverts to the previous namespace context. +

Normally, you should pop the context at the end of each XML +element. After popping the context, all namespace prefix mappings +that were previously in force are restored. +

See also pushContext(). + +

TQString TQXmlNamespaceSupport::prefix ( const TQString & uri ) const +

+Returns one of the prefixes mapped to the namespace URI uri. +

If more than one prefix is currently mapped to the same URI, this +function makes an arbitrary selection; if you want all of the +prefixes, use prefixes() instead. +

Note: to check for a default prefix, use the uri() function with +an argument of "". + +

TQStringList TQXmlNamespaceSupport::prefixes () const +

+Returns a list of all the prefixes currently declared. +

If there is a default prefix, this function does not return it in +the list; check for the default prefix using uri() with an +argument of "". +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+    TQStringList list = myXmlNamespaceSupport.prefixes();
+    TQStringList::iterator it = list.begin();
+    while ( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ + +

TQStringList TQXmlNamespaceSupport::prefixes ( const TQString & uri ) const +

+This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

Returns a list of all prefixes currently declared for the +namespace URI uri. +

The "xml:" prefix is included. If you only want one prefix that is +mapped to the namespace URI, and you don't care which one you get, +use the prefix() function instead. +

Note: the empty (default) prefix is never included in this list; +to check for the presence of a default namespace, use uri() with +an argument of "". +

Note that if you want to iterate over the list, you should iterate +over a copy, e.g. +

+    TQStringList list = myXmlNamespaceSupport.prefixes( "" );
+    TQStringList::Iterator it = list.begin();
+    while( it != list.end() ) {
+        myProcessing( *it );
+        ++it;
+    }
+    
+ + +

void TQXmlNamespaceSupport::processName ( const TQString & qname, bool isAttribute, TQString & nsuri, TQString & localname ) const +

+Processes a raw XML 1.0 name in the current context by removing +the prefix and looking it up among the prefixes currently +declared. +

qname is the raw XML 1.0 name to be processed. isAttribute +is TRUE if the name is an attribute name. +

This function stores the namespace URI in nsuri (which will be +set to TQString::null if the raw name has an undeclared prefix), +and stores the local name (without prefix) in localname (which +will be set to TQString::null if no namespace is in use). +

Note that attribute names are processed differently than element +names: an unprefixed element name gets the default namespace (if +any), while an unprefixed element name does not. + +

void TQXmlNamespaceSupport::pushContext () +

+Starts a new namespace context. +

Normally, you should push a new context at the beginning of each +XML element: the new context automatically inherits the +declarations of its parent context, and it also keeps track of +which declarations were made within this context. +

See also popContext(). + +

void TQXmlNamespaceSupport::reset () +

+Resets this namespace support object ready for reuse. + +

void TQXmlNamespaceSupport::setPrefix ( const TQString & pre, const TQString & uri ) +

+This function declares a prefix pre in the current namespace +context to be the namespace URI uri. The prefix remains in +force until this context is popped, unless it is shadowed in a +descendant context. +

Note that there is an asymmetry in this library. prefix() does not +return the default "" prefix, even if you have declared one; to +check for a default prefix, you must look it up explicitly using +uri(). This asymmetry exists to make it easier to look up prefixes +for attribute names, where the default prefix is not allowed. + +

void TQXmlNamespaceSupport::splitName ( const TQString & qname, TQString & prefix, TQString & localname ) const +

+Splits the name qname at the ':' and returns the prefix in prefix and the local name in localname. +

See also processName(). + +

TQString TQXmlNamespaceSupport::uri ( const TQString & prefix ) const +

+Looks up the prefix prefix in the current context and returns +the currently-mapped namespace URI. Use the empty string ("") for +the default namespace. + + +

+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/qxmlparseexception-members.html b/doc/html/qxmlparseexception-members.html new file mode 100644 index 00000000..0ec53847 --- /dev/null +++ b/doc/html/qxmlparseexception-members.html @@ -0,0 +1,52 @@ + + + + + +TQXmlParseException Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlParseException

+ +

This is the complete list of member functions for +TQXmlParseException, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmlparseexception.html b/doc/html/qxmlparseexception.html new file mode 100644 index 00000000..85562884 --- /dev/null +++ b/doc/html/qxmlparseexception.html @@ -0,0 +1,102 @@ + + + + + +TQXmlParseException Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlParseException Class Reference
[XML module]

+ +

The TQXmlParseException class is used to report errors with +the TQXmlErrorHandler interface. +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQXmlParseException class is used to report errors with +the TQXmlErrorHandler interface. + +

+ +

The XML subsystem constructs an instance of this class when it +detects an error. You can retrieve the place where the error +occurred using systemId(), publicId(), lineNumber() and +columnNumber(), along with the error message(). +

See also TQXmlErrorHandler, TQXmlReader, and XML. + +


Member Function Documentation

+

TQXmlParseException::TQXmlParseException ( const TQString & name = "", int c = -1, int l = -1, const TQString & p = "", const TQString & s = "" ) +

+ +

Constructs a parse exception with the error string name for +column c and line l for the public identifier p and the +system identifier s. + +

int TQXmlParseException::columnNumber () const +

+Returns the column number where the error occurred. + +

int TQXmlParseException::lineNumber () const +

+Returns the line number where the error occurred. + +

TQString TQXmlParseException::message () const +

+Returns the error message. + +

TQString TQXmlParseException::publicId () const +

+Returns the public identifier where the error occurred. + +

TQString TQXmlParseException::systemId () const +

+Returns the system identifier where the error occurred. + + +

+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/qxmlreader-members.html b/doc/html/qxmlreader-members.html new file mode 100644 index 00000000..2d4631eb --- /dev/null +++ b/doc/html/qxmlreader-members.html @@ -0,0 +1,65 @@ + + + + + +TQXmlReader Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlReader

+ +

This is the complete list of member functions for +TQXmlReader, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmlreader.html b/doc/html/qxmlreader.html new file mode 100644 index 00000000..16a2ee49 --- /dev/null +++ b/doc/html/qxmlreader.html @@ -0,0 +1,247 @@ + + + + + +TQXmlReader Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlReader Class Reference
[XML module]

+ +

The TQXmlReader class provides an interface for XML readers (i.e. +parsers). +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

Inherited by TQXmlSimpleReader. +

List of all member functions. +

Public Members

+
    +
  • virtual bool feature ( const TQString & name, bool * ok = 0 ) const = 0
  • +
  • virtual void setFeature ( const TQString & name, bool value ) = 0
  • +
  • virtual bool hasFeature ( const TQString & name ) const = 0
  • +
  • virtual void * property ( const TQString & name, bool * ok = 0 ) const = 0
  • +
  • virtual void setProperty ( const TQString & name, void * value ) = 0
  • +
  • virtual bool hasProperty ( const TQString & name ) const = 0
  • +
  • virtual void setEntityResolver ( TQXmlEntityResolver * handler ) = 0
  • +
  • virtual TQXmlEntityResolver * entityResolver () const = 0
  • +
  • virtual void setDTDHandler ( TQXmlDTDHandler * handler ) = 0
  • +
  • virtual TQXmlDTDHandler * DTDHandler () const = 0
  • +
  • virtual void setContentHandler ( TQXmlContentHandler * handler ) = 0
  • +
  • virtual TQXmlContentHandler * contentHandler () const = 0
  • +
  • virtual void setErrorHandler ( TQXmlErrorHandler * handler ) = 0
  • +
  • virtual TQXmlErrorHandler * errorHandler () const = 0
  • +
  • virtual void setLexicalHandler ( TQXmlLexicalHandler * handler ) = 0
  • +
  • virtual TQXmlLexicalHandler * lexicalHandler () const = 0
  • +
  • virtual void setDeclHandler ( TQXmlDeclHandler * handler ) = 0
  • +
  • virtual TQXmlDeclHandler * declHandler () const = 0
  • +
  • virtual bool parse ( const TQXmlInputSource & input ) = 0  (obsolete)
  • +
  • virtual bool parse ( const TQXmlInputSource * input ) = 0
  • +
+

Detailed Description

+ + + +The TQXmlReader class provides an interface for XML readers (i.e. +parsers). + +

+ +

This abstract class provides an interface for all of TQt's XML +readers. Currently there is only one implementation of a reader +included in TQt's XML module: TQXmlSimpleReader. In future releases +there might be more readers with different properties available +(e.g. a validating parser). +

The design of the XML classes follows the SAX2 Java interface, with +the names adapted to fit TQt naming conventions. It should be very +easy for anybody who has worked with SAX2 to get started with the +TQt XML classes. +

All readers use the class TQXmlInputSource to read the input +document. Since you are normally interested in particular content +in the XML document, the reader reports the content through +special handler classes (TQXmlDTDHandler, TQXmlDeclHandler, +TQXmlContentHandler, TQXmlEntityResolver, TQXmlErrorHandler and +TQXmlLexicalHandler), which you must subclass, if you want to +process the contents. +

Since the handler classes only describe interfaces you must +implement all the functions. We provide the TQXmlDefaultHandler +class to make this easier: it implements a default behaviour (do +nothing) for all functions, so you can subclass it and just +implement the functions you are interested in. +

Features and properties of the reader can be set with setFeature() +and setProperty() respectively. You can set the reader to use your +own subclasses with setEntityResolver(), setDTDHandler(), +setContentHandler(), setErrorHandler(), setLexicalHandler() and +setDeclHandler(). The parse itself is started with a call to +parse(). +

See also TQXmlSimpleReader and XML. + +


Member Function Documentation

+

TQXmlDTDHandler * TQXmlReader::DTDHandler () const [pure virtual] +

+ +

Returns the DTD handler or 0 if none was set. +

See also setDTDHandler(). + +

TQXmlContentHandler * TQXmlReader::contentHandler () const [pure virtual] +

+ +

Returns the content handler or 0 if none was set. +

See also setContentHandler(). + +

TQXmlDeclHandler * TQXmlReader::declHandler () const [pure virtual] +

+ +

Returns the declaration handler or 0 if none was set. +

See also setDeclHandler(). + +

TQXmlEntityResolver * TQXmlReader::entityResolver () const [pure virtual] +

+ +

Returns the entity resolver or 0 if none was set. +

See also setEntityResolver(). + +

TQXmlErrorHandler * TQXmlReader::errorHandler () const [pure virtual] +

+ +

Returns the error handler or 0 if none is set. +

See also setErrorHandler(). + +

bool TQXmlReader::feature ( const TQString & name, bool * ok = 0 ) const [pure virtual] +

+ +

If the reader has the feature called name, the feature's value +is returned. If no such feature exists the return value is +undefined. +

If ok is not 0: *ok is set to TRUE if the reader has the +feature called name; otherwise *ok is set to FALSE. +

See also setFeature() and hasFeature(). + +

bool TQXmlReader::hasFeature ( const TQString & name ) const [pure virtual] +

+ +

Returns TRUE if the reader has the feature called name; +otherwise returns FALSE. +

See also feature() and setFeature(). + +

bool TQXmlReader::hasProperty ( const TQString & name ) const [pure virtual] +

+ +

Returns TRUE if the reader has the property name; otherwise +returns FALSE. +

See also property() and setProperty(). + +

TQXmlLexicalHandler * TQXmlReader::lexicalHandler () const [pure virtual] +

+ +

Returns the lexical handler or 0 if none was set. +

See also setLexicalHandler(). + +

bool TQXmlReader::parse ( const TQXmlInputSource * input ) [pure virtual] +

+ +

Reads an XML document from input and parses it. Returns TRUE if +the parsing was successful; otherwise returns FALSE. + +

Example: xml/tagreader/tagreader.cpp. +

bool TQXmlReader::parse ( const TQXmlInputSource & input ) [pure virtual] +

+ +

This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

void * TQXmlReader::property ( const TQString & name, bool * ok = 0 ) const [pure virtual] +

+ +

If the reader has the property name, this function returns the +value of the property; otherwise the return value is undefined. +

If ok is not 0: if the reader has the name property *ok +is set to TRUE; otherwise *ok is set to FALSE. +

See also setProperty() and hasProperty(). + +

void TQXmlReader::setContentHandler ( TQXmlContentHandler * handler ) [pure virtual] +

+ +

Sets the content handler to handler. +

See also contentHandler(). + +

Example: xml/tagreader/tagreader.cpp. +

void TQXmlReader::setDTDHandler ( TQXmlDTDHandler * handler ) [pure virtual] +

+ +

Sets the DTD handler to handler. +

See also DTDHandler(). + +

void TQXmlReader::setDeclHandler ( TQXmlDeclHandler * handler ) [pure virtual] +

+ +

Sets the declaration handler to handler. +

See also declHandler(). + +

void TQXmlReader::setEntityResolver ( TQXmlEntityResolver * handler ) [pure virtual] +

+ +

Sets the entity resolver to handler. +

See also entityResolver(). + +

void TQXmlReader::setErrorHandler ( TQXmlErrorHandler * handler ) [pure virtual] +

+ +

Sets the error handler to handler. Clears the error handler if +handler is 0. +

See also errorHandler(). + +

void TQXmlReader::setFeature ( const TQString & name, bool value ) [pure virtual] +

+ +

Sets the feature called name to the given value. If the +reader doesn't have the feature nothing happens. +

See also feature() and hasFeature(). + +

Reimplemented in TQXmlSimpleReader. +

void TQXmlReader::setLexicalHandler ( TQXmlLexicalHandler * handler ) [pure virtual] +

+ +

Sets the lexical handler to handler. +

See also lexicalHandler(). + +

void TQXmlReader::setProperty ( const TQString & name, void * value ) [pure virtual] +

+ +

Sets the property name to value. If the reader doesn't have +the property nothing happens. +

See also property() and hasProperty(). + + +


+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/qxmlsimplereader-members.html b/doc/html/qxmlsimplereader-members.html new file mode 100644 index 00000000..69c22a59 --- /dev/null +++ b/doc/html/qxmlsimplereader-members.html @@ -0,0 +1,68 @@ + + + + + +TQXmlSimpleReader Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXmlSimpleReader

+ +

This is the complete list of member functions for +TQXmlSimpleReader, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxmlsimplereader.html b/doc/html/qxmlsimplereader.html new file mode 100644 index 00000000..fa9092dd --- /dev/null +++ b/doc/html/qxmlsimplereader.html @@ -0,0 +1,179 @@ + + + + + +TQXmlSimpleReader Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXmlSimpleReader Class Reference
[XML module]

+ +

The TQXmlSimpleReader class provides an implementation of a +simple XML reader (parser). +More... +

All the functions in this class are reentrant when TQt is built with thread support.

+

#include <qxml.h> +

Inherits TQXmlReader. +

List of all member functions. +

Public Members

+ +

Detailed Description

+ + + +The TQXmlSimpleReader class provides an implementation of a +simple XML reader (parser). + +

+ + +

This XML reader is sufficient for simple parsing tasks. The reader: +

    +
  • provides a well-formed parser; +
  • does not parse any external entities; +
  • can do namespace processing. +
+

Documents are parsed with a call to parse(). +

See also XML. + +


Member Function Documentation

+

TQXmlSimpleReader::TQXmlSimpleReader () +

+Constructs a simple XML reader with the following feature settings: +
+
Feature Setting +
http://xml.org/sax/features/namespaces TRUE +
http://xml.org/sax/features/namespace-prefixes FALSE +
http://trolltech.com/xml/features/report-whitespace-only-CharData +TRUE +
http://trolltech.com/xml/features/report-start-end-entity FALSE +
+

More information about features can be found in the TQt SAX2 overview. +

See also setFeature(). + +

TQXmlSimpleReader::~TQXmlSimpleReader () [virtual] +

+Destroys the simple XML reader. + +

bool TQXmlSimpleReader::parse ( const TQXmlInputSource * input, bool incremental ) [virtual] +

+Reads an XML document from input and parses it. Returns FALSE +if the parsing detects an error; otherwise returns TRUE. +

If incremental is TRUE, the parser does not return FALSE when +it reaches the end of the input without reaching the end of the +XML file. Instead it stores the state of the parser so that +parsing can be continued at a later stage when more data is +available. You can use the function parseContinue() to continue +with parsing. This class stores a pointer to the input source input and the parseContinue() function tries to read from that +input souce. This means that you should not delete the input +source input until you've finished your calls to +parseContinue(). If you call this function with incremental +TRUE whilst an incremental parse is in progress a new parsing +session will be started and the previous session lost. +

If incremental is FALSE, this function behaves like the normal +parse function, i.e. it returns FALSE when the end of input is +reached without reaching the end of the XML file and the parsing +cannot be continued. +

See also parseContinue() and TQSocket. + +

Examples: xml/tagreader-with-features/tagreader.cpp and xml/tagreader/tagreader.cpp. +

bool TQXmlSimpleReader::parseContinue () [virtual] +

+Continues incremental parsing; this function reads the input from +the TQXmlInputSource that was specified with the last parse() +command. To use this function, you must have called parse() +with the incremental argument set to TRUE. +

Returns FALSE if a parsing error occurs; otherwise returns TRUE. +

If the input source returns an empty string for the function +TQXmlInputSource::data(), then this means that the end of the XML +file has been reached; this is tquite important, especially if you +want to use the reader to parse more than one XML file. +

The case of the end of the XML file being reached without having +finished parsing is not considered to be an error: you can +continue parsing at a later stage by calling this function again +when there is more data available to parse. +

This function assumes that the end of the XML document is reached +if the TQXmlInputSource::next() function returns +TQXmlInputSource::EndOfDocument. If the parser has not finished +parsing when it encounters this symbol, it is an error and FALSE +is returned. +

See also parse() and TQXmlInputSource::next(). + +

void TQXmlSimpleReader::setFeature ( const TQString & name, bool value ) [virtual] +

+Sets the state of the feature name to value: +

If the feature is not recognized, it is ignored. +

The following features are supported: +

+
Feature Notes +
http://xml.org/sax/features/namespaces +If this feature is TRUE, namespace processing is +performed. +
http://xml.org/sax/features/namespace-prefixes +If this feature is TRUE, the the original prefixed names +and attributes used for namespace declarations are +reported. +
http://trolltech.com/xml/features/report-whitespace-only-CharData +If this feature is TRUE, CharData that only contain +whitespace are not ignored, but are reported via +TQXmlContentHandler::characters(). +
http://trolltech.com/xml/features/report-start-end-entity +If this feature is TRUE, the parser reports +TQXmlContentHandler::startEntity() and +TQXmlContentHandler::endEntity() events. So character data +might be reported in chunks. If this feature is FALSE, the +parser does not report those events, but rather silently +substitutes the entities and reports the character data in +one chunk. +
+

+ +

    ** $Id: qt/tagreader.cpp   3.3.8   edited Jan 11 14:46 $
+
        reader.setFeature( "http://xml.org/sax/features/namespace-prefixes",
+                           TRUE );
+
+

(Code taken from xml/tagreader-with-features/tagreader.cpp) +

See also feature() and hasFeature(). + +

Example: xml/tagreader-with-features/tagreader.cpp. +

Reimplemented from TQXmlReader. + +


+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/qxtwidget-h.html b/doc/html/qxtwidget-h.html new file mode 100644 index 00000000..de65d3ed --- /dev/null +++ b/doc/html/qxtwidget-h.html @@ -0,0 +1,110 @@ + + + + + +qxtwidget.h Include File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

qxtwidget.h

+ +

This is the verbatim text of the qxtwidget.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


+
+/****************************************************************************
+** $Id: qt/qxtwidget.h   3.3.8   edited Jan 11 14:37 $
+**
+** Definition of TQt extension classes for Xt/Motif support.
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the TQt extension for Xt/Motif support.
+**
+** Licensees holding valid TQt Enterprise Edition licenses for X11 may use
+** this file in accordance with the TQt Commercial License Agreement provided
+** with the Software.
+**
+** This file is not available for use under any other license without
+** express written permission from the copyright holder.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about TQt Commercial License Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef TQXTWIDGET_H
+#define TQXTWIDGET_H
+
+#include <qwidget.h>
+
+#include <X11/Intrinsic.h>
+
+
+class TQXtWidget : public TQWidget {
+    Q_OBJECT
+    Widget xtw;
+    Widget xtparent;
+    bool   need_reroot;
+    void init(const char* name, WidgetClass widget_class,
+	      Widget parent, TQWidget* qparent,
+	      ArgList args, Cardinal num_args,
+	      bool managed);
+    friend void qwidget_realize( Widget widget, XtValueMask* mask,
+				 XSetWindowAttributes* attributes );
+
+public:
+    TQXtWidget(const char* name, Widget parent, bool managed=FALSE);
+    TQXtWidget(const char* name, WidgetClass widget_class,
+	      TQWidget *parent=0, ArgList args=0, Cardinal num_args=0,
+	      bool managed=FALSE);
+    ~TQXtWidget();
+
+    Widget xtWidget() const { return xtw; }
+    bool isActiveWindow() const;
+    void setActiveWindow();
+
+protected:
+    void moveEvent( TQMoveEvent* );
+    void resizeEvent( TQResizeEvent* );
+    bool x11Event( XEvent * );
+};
+
+#endif // TQXTWIDGET_H
+
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxtwidget-members.html b/doc/html/qxtwidget-members.html new file mode 100644 index 00000000..b6fe6dc5 --- /dev/null +++ b/doc/html/qxtwidget-members.html @@ -0,0 +1,339 @@ + + + + + +TQXtWidget Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQXtWidget

+ +

This is the complete list of member functions for +TQXtWidget, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qxtwidget.html b/doc/html/qxtwidget.html new file mode 100644 index 00000000..46f5a182 --- /dev/null +++ b/doc/html/qxtwidget.html @@ -0,0 +1,147 @@ + + + + + +TQXtWidget Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQXtWidget Class Reference
[obsolete]

+ +

The TQXtWidget class allows mixing of Xt/Motif and TQt widgets. +This class is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +More... +

This class is part of the TQt Motif Extension. +

#include <qxtwidget.h> +

Inherits TQWidget. +

List of all member functions. +

Public Members

+ +

Protected Members

+
    +
  • virtual bool x11Event ( XEvent * e )
  • +
+

Detailed Description

+

This class is defined in the TQt Motif Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API. +

+ +The TQXtWidget class allows mixing of Xt/Motif and TQt widgets. +This class is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

+

TQXtWidget acts as a bridge between Xt and TQt. For utilizing old Xt +widgets, it can be a TQWidget based on a Xt widget class. For +including TQt widgets in an existing Xt/Motif application, it can be +a special Xt widget class that is a TQWidget. See the constructors +for the different behaviors. +

Known TQXtWidget Problems +

+

This class is unsupported and has many known problems and +limitations. It is provided only to keep existing source working; +it should not be used in new code. Note: These problems will not +be fixed in future releases. +

Below is an imcomplete list of know issues: +

    +

  1. Keyboard focus navigation is impossible when using TQXtWidget. +The mouse must be used to focus widgets in both TQt and Xt/Motif +widgets. For example, when embedding a TQXtWidget into an Xt/Motif +widget, key events will go to the TQXtWidget (and its children) while +the mouse is over the TQXtWidget, regardless of where Xt/Motif has +placed the focus. +

  2. Reparenting does not work. You cannot use +TQWidget::reparent(). This includes the functions +TQWidget::showFullScreen() and TQWidget::showNormal(), which use +TQWidget::reparent(). +

+ +

Member Function Documentation

+

TQXtWidget::TQXtWidget ( const char * name, Widget parent, bool managed = FALSE ) +

+Constructs a TQXtWidget of the special Xt widget class known as +"TQWidget" to the resource manager. +

Use this constructor to utilize TQt widgets in an Xt/Motif +application. The TQXtWidget is a TQWidget, so you can create +subwidgets, layouts, etc. using TQt functionality. +

The name is the object name passed to the TQWidget constructor. +The widget's parent is parent. +

If the managed parameter is TRUE and parent in not null, +XtManageChild it used to manage the child. + +

TQXtWidget::TQXtWidget ( const char * name, WidgetClass widget_class, TQWidget * parent = 0, ArgList args = 0, Cardinal num_args = 0, bool managed = FALSE ) +

+Constructs a TQXtWidget of the given widget_class called name. +

Use this constructor to utilize Xt or Motif widgets in a TQt +application. The TQXtWidget looks and behaves +like the Xt class, but can be used like any TQWidget. +

Note that Xt retquires that the most top level Xt widget is a shell. +This means, if parent is a TQXtWidget, the widget_class can be +of any kind. If there isn't a parent or the parent is just a normal +TQWidget, widget_class should be something like topLevelShellWidgetClass. +

The arguments, args, num_args are passed on to XtCreateWidget. +

If the managed parameter is TRUE and parent in not null, +XtManageChild it used to manage the child. + +

TQXtWidget::~TQXtWidget () +

+Destructs the TQXtWidget. + +

bool TQXtWidget::isActiveWindow () const +

+Different from TQWidget::isActiveWindow() + +

void TQXtWidget::setActiveWindow () [virtual] +

+Implement a degree of focus handling for Xt widgets. + +

Reimplemented from TQWidget. +

bool TQXtWidget::x11Event ( XEvent * e ) [virtual protected] +

+Reimplemented to produce the Xt effect of getting focus when the +mouse enters the widget. The event is passed in e. + +

Reimplemented from TQWidget. +

Widget TQXtWidget::xtWidget () const +

+ +

Returns the Xt widget equivalent for the TQt widget. + + +


+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/rangecontrols-example.html b/doc/html/rangecontrols-example.html new file mode 100644 index 00000000..57e4e720 --- /dev/null +++ b/doc/html/rangecontrols-example.html @@ -0,0 +1,184 @@ + + + + + +Range controls + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Range controls

+ + +

+This examples shows various types of range controls that +are supported by TQt: dials, spin boxes and sliders. +


+

Header file: +

/****************************************************************************
+** $Id: qt/rangecontrols.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef RANGECONTROLS_H
+#define RANGECONTROLS_H
+
+#include <qvbox.h>
+
+class TQCheckBox;
+
+class RangeControls : public TQVBox
+{
+    Q_OBJECT
+
+public:
+    RangeControls( TQWidget *parent = 0, const char *name = 0 );
+
+private:
+    TQCheckBox *notches, *wrapping;
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/rangecontrols.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "rangecontrols.h"
+
+#include <qhbox.h>
+#include <qlcdnumber.h>
+#include <qspinbox.h>
+#include <qlabel.h>
+#include <qstring.h>
+#include <qslider.h>
+#include <qcheckbox.h>
+
+#include <limits.h>
+
+RangeControls::RangeControls( TQWidget *parent, const char *name )
+    : TQVBox( parent, name )
+{
+    TQHBox *row1 = new TQHBox( this );
+
+    TQVBox *cell2 = new TQVBox( row1 );
+    cell2->setMargin( 10 );
+    cell2->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
+
+    (void)new TQWidget( cell2 );
+
+    TQLabel *label1 = new TQLabel( TQString( "Enter a value between\n%1 and %2:" ).arg( -INT_MAX ).arg( INT_MAX ), cell2 );
+    label1->setMaximumHeight( label1->sizeHint().height() );
+    TQSpinBox *sb1 = new TQSpinBox( -INT_MAX, INT_MAX, 1, cell2 );
+    sb1->setValue( 0 );
+
+    TQLabel *label2 = new TQLabel( "Enter a zoom value:", cell2 );
+    label2->setMaximumHeight( label2->sizeHint().height() );
+    TQSpinBox *sb2 = new TQSpinBox( 0, 1000, 10, cell2 );
+    sb2->setSuffix( " %" );
+    sb2->setSpecialValueText( "Automatic" );
+
+    TQLabel *label3 = new TQLabel( "Enter a price:", cell2 );
+    label3->setMaximumHeight( label3->sizeHint().height() );
+    TQSpinBox *sb3 = new TQSpinBox( 0, INT_MAX, 1, cell2 );
+    sb3->setPrefix( "$" );
+    sb3->setValue( 355 );
+
+    (void)new TQWidget( cell2 );
+
+    TQHBox *row2 = new TQHBox( this );
+
+    TQVBox *cell3 = new TQVBox( row2 );
+    cell3->setMargin( 10 );
+    cell3->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
+    TQSlider *hslider = new TQSlider( 0, 64, 1, 33, TQt::Horizontal, cell3, "horizontal_s" );
+    TQLCDNumber *lcd2 = new TQLCDNumber( 2, cell3 );
+    lcd2->display( 33 );
+    lcd2->setSegmentStyle( TQLCDNumber::Filled );
+    connect( hslider, SIGNAL( valueChanged( int ) ), lcd2, SLOT( display( int ) ) );
+
+    TQHBox *cell4 = new TQHBox( row2 );
+    cell4->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
+    cell4->setMargin( 10 );
+    TQSlider *vslider = new TQSlider( 0, 64, 1, 8, TQt::Vertical, cell4 );
+    TQLCDNumber *lcd3 = new TQLCDNumber( 3, cell4 );
+    lcd3->display( 8 );
+    connect( vslider, SIGNAL( valueChanged( int ) ), lcd3, SLOT( display( int ) ) );
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "rangecontrols.h"
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    RangeControls rangecontrols;
+    rangecontrols.resize( 500, 300 );
+    rangecontrols.setCaption( "TQt Example - Range Control Widgets" );
+    a.setMainWidget( &rangecontrols );
+    rangecontrols.show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/rd-add.png b/doc/html/rd-add.png new file mode 100644 index 00000000..b7912ed0 Binary files /dev/null and b/doc/html/rd-add.png differ diff --git a/doc/html/rd-chooseanimage.png b/doc/html/rd-chooseanimage.png new file mode 100644 index 00000000..dce7f360 Binary files /dev/null and b/doc/html/rd-chooseanimage.png differ diff --git a/doc/html/rd-chooseapixmap.png b/doc/html/rd-chooseapixmap.png new file mode 100644 index 00000000..fecec20b Binary files /dev/null and b/doc/html/rd-chooseapixmap.png differ diff --git a/doc/html/rd-configmf.png b/doc/html/rd-configmf.png new file mode 100644 index 00000000..43698aea Binary files /dev/null and b/doc/html/rd-configmf.png differ diff --git a/doc/html/rd-configtb.png b/doc/html/rd-configtb.png new file mode 100644 index 00000000..98e7158a Binary files /dev/null and b/doc/html/rd-configtb.png differ diff --git a/doc/html/rd-cwidgdef.png b/doc/html/rd-cwidgdef.png new file mode 100644 index 00000000..4a419ece Binary files /dev/null and b/doc/html/rd-cwidgdef.png differ diff --git a/doc/html/rd-cwidgprop.png b/doc/html/rd-cwidgprop.png new file mode 100644 index 00000000..bc344553 Binary files /dev/null and b/doc/html/rd-cwidgprop.png differ diff --git a/doc/html/rd-cwidgsig.png b/doc/html/rd-cwidgsig.png new file mode 100644 index 00000000..788441cc Binary files /dev/null and b/doc/html/rd-cwidgsig.png differ diff --git a/doc/html/rd-cwidgslot.png b/doc/html/rd-cwidgslot.png new file mode 100644 index 00000000..6860bbf0 Binary files /dev/null and b/doc/html/rd-cwidgslot.png differ diff --git a/doc/html/rd-dbconn.png b/doc/html/rd-dbconn.png new file mode 100644 index 00000000..82bb406a Binary files /dev/null and b/doc/html/rd-dbconn.png differ diff --git a/doc/html/rd-ediconview.png b/doc/html/rd-ediconview.png new file mode 100644 index 00000000..97249447 Binary files /dev/null and b/doc/html/rd-ediconview.png differ diff --git a/doc/html/rd-editincdec.png b/doc/html/rd-editincdec.png new file mode 100644 index 00000000..225622dd Binary files /dev/null and b/doc/html/rd-editincdec.png differ diff --git a/doc/html/rd-edittext1.png b/doc/html/rd-edittext1.png new file mode 100644 index 00000000..a76b21fd Binary files /dev/null and b/doc/html/rd-edittext1.png differ diff --git a/doc/html/rd-edittext2.png b/doc/html/rd-edittext2.png new file mode 100644 index 00000000..0de7746e Binary files /dev/null and b/doc/html/rd-edittext2.png differ diff --git a/doc/html/rd-edlistbox.png b/doc/html/rd-edlistbox.png new file mode 100644 index 00000000..f7569b2f Binary files /dev/null and b/doc/html/rd-edlistbox.png differ diff --git a/doc/html/rd-edlistview.png b/doc/html/rd-edlistview.png new file mode 100644 index 00000000..5a8582fc Binary files /dev/null and b/doc/html/rd-edlistview.png differ diff --git a/doc/html/rd-edlistview2.png b/doc/html/rd-edlistview2.png new file mode 100644 index 00000000..5ae555da Binary files /dev/null and b/doc/html/rd-edlistview2.png differ diff --git a/doc/html/rd-edpalette.png b/doc/html/rd-edpalette.png new file mode 100644 index 00000000..754f8f50 Binary files /dev/null and b/doc/html/rd-edpalette.png differ diff --git a/doc/html/rd-edtablecol.png b/doc/html/rd-edtablecol.png new file mode 100644 index 00000000..d530c0c9 Binary files /dev/null and b/doc/html/rd-edtablecol.png differ diff --git a/doc/html/rd-edtablerow.png b/doc/html/rd-edtablerow.png new file mode 100644 index 00000000..5410ff38 Binary files /dev/null and b/doc/html/rd-edtablerow.png differ diff --git a/doc/html/rd-find.png b/doc/html/rd-find.png new file mode 100644 index 00000000..4f5ac5c4 Binary files /dev/null and b/doc/html/rd-find.png differ diff --git a/doc/html/rd-formset.png b/doc/html/rd-formset.png new file mode 100644 index 00000000..de9c8e04 Binary files /dev/null and b/doc/html/rd-formset.png differ diff --git a/doc/html/rd-goto.png b/doc/html/rd-goto.png new file mode 100644 index 00000000..4dd7a379 Binary files /dev/null and b/doc/html/rd-goto.png differ diff --git a/doc/html/rd-image.png b/doc/html/rd-image.png new file mode 100644 index 00000000..88ea411f Binary files /dev/null and b/doc/html/rd-image.png differ diff --git a/doc/html/rd-open.png b/doc/html/rd-open.png new file mode 100644 index 00000000..b7be4f83 Binary files /dev/null and b/doc/html/rd-open.png differ diff --git a/doc/html/rd-pagetitle.png b/doc/html/rd-pagetitle.png new file mode 100644 index 00000000..29d15151 Binary files /dev/null and b/doc/html/rd-pagetitle.png differ diff --git a/doc/html/rd-prefedit1.png b/doc/html/rd-prefedit1.png new file mode 100644 index 00000000..10f6892e Binary files /dev/null and b/doc/html/rd-prefedit1.png differ diff --git a/doc/html/rd-projset.png b/doc/html/rd-projset.png new file mode 100644 index 00000000..d4b19841 Binary files /dev/null and b/doc/html/rd-projset.png differ diff --git a/doc/html/rd-projset2.png b/doc/html/rd-projset2.png new file mode 100644 index 00000000..a75e7c41 Binary files /dev/null and b/doc/html/rd-projset2.png differ diff --git a/doc/html/rd-replace.png b/doc/html/rd-replace.png new file mode 100644 index 00000000..1f85fc00 Binary files /dev/null and b/doc/html/rd-replace.png differ diff --git a/doc/html/rd-saveas.png b/doc/html/rd-saveas.png new file mode 100644 index 00000000..1025608f Binary files /dev/null and b/doc/html/rd-saveas.png differ diff --git a/doc/html/rd-saveform.png b/doc/html/rd-saveform.png new file mode 100644 index 00000000..a5ce8b7c Binary files /dev/null and b/doc/html/rd-saveform.png differ diff --git a/doc/html/rd-saveformas.png b/doc/html/rd-saveformas.png new file mode 100644 index 00000000..ee483e28 Binary files /dev/null and b/doc/html/rd-saveformas.png differ diff --git a/doc/html/rd-saveprojset.png b/doc/html/rd-saveprojset.png new file mode 100644 index 00000000..c8a62b5f Binary files /dev/null and b/doc/html/rd-saveprojset.png differ diff --git a/doc/html/rd-selcolor.png b/doc/html/rd-selcolor.png new file mode 100644 index 00000000..a1168417 Binary files /dev/null and b/doc/html/rd-selcolor.png differ diff --git a/doc/html/rd-selfont.png b/doc/html/rd-selfont.png new file mode 100644 index 00000000..8d396949 Binary files /dev/null and b/doc/html/rd-selfont.png differ diff --git a/doc/html/rd-startdesigntab2.png b/doc/html/rd-startdesigntab2.png new file mode 100644 index 00000000..1443e1b6 Binary files /dev/null and b/doc/html/rd-startdesigntab2.png differ diff --git a/doc/html/rd-template.png b/doc/html/rd-template.png new file mode 100644 index 00000000..bfd546e6 Binary files /dev/null and b/doc/html/rd-template.png differ diff --git a/doc/html/rd-text.png b/doc/html/rd-text.png new file mode 100644 index 00000000..87e67308 Binary files /dev/null and b/doc/html/rd-text.png differ diff --git a/doc/html/rd-title.png b/doc/html/rd-title.png new file mode 100644 index 00000000..a7de1ceb Binary files /dev/null and b/doc/html/rd-title.png differ diff --git a/doc/html/rd-tunepalette.png b/doc/html/rd-tunepalette.png new file mode 100644 index 00000000..3c5ec07a Binary files /dev/null and b/doc/html/rd-tunepalette.png differ diff --git a/doc/html/regexptester-example.html b/doc/html/regexptester-example.html new file mode 100644 index 00000000..4e16660b --- /dev/null +++ b/doc/html/regexptester-example.html @@ -0,0 +1,299 @@ + + + + + +A Small Application for Testing Regular Expressions + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A Small Application for Testing Regular Expressions

+ + + +

+

Regular expressions can sometimes be tricky to get right, +especially those that use the * quantifier. This application lets +you type in a regexp (without doubling the backslashes) and some +test text, and to execute the regexp and see the results. If you +click the Copy button the regexp will be copied to the clipboard +(with the backslashes doubled, ready for you to paste into your +program). Previous regexps and test texts are remembered +throughout the session and can be accessed by dropping down the +comboboxes. +


+

Header file: +

#ifndef REGEXPTESTER_H
+#define REGEXPTESTER_H
+
+#include <qdialog.h>
+
+class TQCheckBox;
+class TQComboBox;
+class TQLabel;
+class TQPushButton;
+class TQStatusBar;
+class TQTable;
+
+class RegexpTester : public TQDialog
+{
+    Q_OBJECT
+
+public:
+    RegexpTester(TQWidget* parent=0, const char* name=0, bool modal=false,
+                 WFlags f=0);
+
+    TQLabel *regexLabel;
+    TQComboBox *regexComboBox;
+    TQLabel *textLabel;
+    TQComboBox *textComboBox;
+    TQCheckBox *caseSensitiveCheckBox;
+    TQCheckBox *minimalCheckBox;
+    TQCheckBox *wildcardCheckBox;
+    TQTable *resultTable;
+    TQPushButton *executePushButton;
+    TQPushButton *copyPushButton;
+    TQPushButton *tquitPushButton;
+    TQStatusBar *statusBar;
+
+public slots:
+    void copy();
+    void execute();
+
+private:
+    void languageChange();
+};
+
+#endif // REGEXPTESTER_H
+
+ +


+

Implementation: +

#include <qapplication.h>
+#include <qcheckbox.h>
+#include <qclipboard.h>
+#include <qcombobox.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qpushbutton.h>
+#include <qregexp.h>
+#include <qstatusbar.h>
+#include <qtable.h>
+
+#include "regexptester.h"
+
+
+RegexpTester::RegexpTester(TQWidget* parent, const char* name, bool modal,
+                           WFlags f)
+    : TQDialog(parent, name, modal, f)
+{
+    regexLabel = new TQLabel(this);
+    regexComboBox = new TQComboBox(this);
+    regexComboBox->setEditable(true);
+    regexComboBox->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
+    regexLabel->setBuddy(regexComboBox);
+    textLabel = new TQLabel(this);
+    textComboBox = new TQComboBox(this);
+    textComboBox->setEditable(true);
+    textComboBox->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
+    textLabel->setBuddy(textComboBox);
+    caseSensitiveCheckBox = new TQCheckBox(this);
+    caseSensitiveCheckBox->setChecked(true);
+    minimalCheckBox = new TQCheckBox(this);
+    wildcardCheckBox = new TQCheckBox(this);
+    resultTable = new TQTable(3, 3, this);
+    resultTable->verticalHeader()->hide();
+    resultTable->setLeftMargin(0);
+    resultTable->horizontalHeader()->hide();
+    resultTable->setTopMargin(0);
+    resultTable->setReadOnly(true);
+    executePushButton = new TQPushButton(this);
+    executePushButton->setDefault(true);
+    copyPushButton = new TQPushButton(this);
+    tquitPushButton = new TQPushButton(this);
+    statusBar = new TQStatusBar(this);
+
+    TQGridLayout *gridLayout = new TQGridLayout(2, 2, 6);
+    gridLayout->addWidget(regexLabel, 0, 0);
+    gridLayout->addWidget(regexComboBox, 0, 1);
+    gridLayout->addWidget(textLabel, 1, 0);
+    gridLayout->addWidget(textComboBox, 1, 1);
+    TQHBoxLayout *checkboxLayout = new TQHBoxLayout(0, 6, 6);
+    checkboxLayout->addWidget(caseSensitiveCheckBox);
+    checkboxLayout->addWidget(minimalCheckBox);
+    checkboxLayout->addWidget(wildcardCheckBox);
+    checkboxLayout->addStretch(1);
+    TQVBoxLayout *buttonLayout = new TQVBoxLayout(0, 6, 6);
+    buttonLayout->addWidget(executePushButton);
+    buttonLayout->addWidget(copyPushButton);
+    buttonLayout->addWidget(tquitPushButton);
+    buttonLayout->addStretch(1);
+    TQHBoxLayout *middleLayout = new TQHBoxLayout(0, 6, 6);
+    middleLayout->addWidget(resultTable);
+    middleLayout->addLayout(buttonLayout);
+    TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 6, 6);
+    mainLayout->addLayout(gridLayout);
+    mainLayout->addLayout(checkboxLayout);
+    mainLayout->addLayout(middleLayout);
+    mainLayout->addWidget(statusBar);
+
+    resize(TQSize(500, 350).expandedTo(minimumSizeHint()));
+
+    languageChange();
+
+    connect(copyPushButton, SIGNAL(clicked()), this, SLOT(copy()));
+    connect(executePushButton, SIGNAL(clicked()), this, SLOT(execute()));
+    connect(tquitPushButton, SIGNAL(clicked()), this, SLOT(accept()));
+
+    execute();
+}
+
+void RegexpTester::execute()
+{
+    TQString regex = regexComboBox->currentText();
+    TQString text = textComboBox->currentText();
+    if (!regex.isEmpty() && !text.isEmpty()) {
+        TQRegExp re(regex);
+        re.setCaseSensitive(caseSensitiveCheckBox->isChecked());
+        re.setMinimal(minimalCheckBox->isChecked());
+        bool wildcard = wildcardCheckBox->isChecked();
+        re.setWildcard(wildcard);
+        if (!re.isValid()) {
+            statusBar->message(tr("Invalid regular expression: %1")
+                                .arg(re.errorString()));
+            return;
+        }
+        int offset = re.search(text);
+        int captures = re.numCaptures();
+        int row = 0;
+        const int OFFSET = 5;
+        resultTable->setNumRows(0);
+        resultTable->setNumRows(captures + OFFSET);
+        resultTable->setText(row, 0, tr("Regex"));
+        TQString escaped = regex;
+        escaped = escaped.replace("\\", "\\\\");
+        resultTable->setText(row, 1, escaped);
+        resultTable->item(row, 1)->setSpan(1, 2);
+        if (offset != -1) {
+            ++row;
+            resultTable->setText(row, 0, tr("Offset"));
+            resultTable->setText(row, 1, TQString::number(offset));
+            resultTable->item(row, 1)->setSpan(1, 2);
+            if (!wildcard) {
+                ++row;
+                resultTable->setText(row, 0, tr("Captures"));
+                resultTable->setText(row, 1, TQString::number(captures));
+                resultTable->item(row, 1)->setSpan(1, 2);
+                ++row;
+                resultTable->setText(row, 1, tr("Text"));
+                resultTable->setText(row, 2, tr("Characters"));
+            }
+            ++row;
+            resultTable->setText(row, 0, tr("Match"));
+            resultTable->setText(row, 1, re.cap(0));
+            resultTable->setText(row, 2, TQString::number(re.matchedLength()));
+            if (!wildcard) {
+                for (int i = 1; i <= captures; ++i) {
+                    resultTable->setText(row + i, 0, tr("Capture #%1").arg(i));
+                    resultTable->setText(row + i, 1, re.cap(i));
+                    resultTable->setText(row + i, 2,
+                                        TQString::number(re.cap(i).length()));
+                }
+            }
+            else
+                resultTable->setNumRows(3);
+        }
+        else {
+            resultTable->setNumRows(2);
+            ++row;
+            resultTable->setText(row, 0, tr("No matches"));
+            resultTable->item(row, 0)->setSpan(1, 3);
+        }
+        resultTable->adjustColumn(0);
+        resultTable->adjustColumn(1);
+        resultTable->adjustColumn(2);
+        statusBar->message(tr("Executed \"%1\" on \"%2\"")
+                                .arg(escaped).arg(text));
+    }
+    else
+        statusBar->message(tr("A regular expression and a text must be given"));
+}
+
+void RegexpTester::copy()
+{
+    TQString escaped = regexComboBox->currentText();
+    if (!escaped.isEmpty()) {
+        escaped = escaped.replace("\\", "\\\\");
+        TQClipboard *cb = TQApplication::clipboard();
+        cb->setText(escaped, TQClipboard::Clipboard);
+        if (cb->supportsSelection())
+            cb->setText(escaped, TQClipboard::Selection);
+        statusBar->message(tr("Copied \"%1\" to the clipboard")
+                                .arg(escaped));
+    }
+}
+
+void RegexpTester::languageChange()
+{
+    setCaption(tr("Regex Tester"));
+    regexLabel->setText(tr("&Regex:"));
+    regexComboBox->insertItem(tr("[A-Z]+=(\\d+):(\\d*)"));
+    textLabel->setText(tr("&Text:"));
+    textComboBox->insertItem(tr("ABC=12:3456"));
+    caseSensitiveCheckBox->setText(tr("Case &Sensitive"));
+    minimalCheckBox->setText(tr("&Minimal"));
+    wildcardCheckBox->setText(tr("&Wildcard"));
+    copyPushButton->setText(tr("&Copy"));
+    executePushButton->setText(tr("&Execute"));
+    tquitPushButton->setText(tr("&Quit"));
+}
+
+
+ +


+

Main: +

#include <qapplication.h>
+#include "regexptester.h"
+
+int main(int argc, char **argv)
+{
+    TQApplication app(argc, argv);
+    RegexpTester form;
+    form.show();
+    app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(tquit()));
+    return app.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/removed20.html b/doc/html/removed20.html new file mode 100644 index 00000000..8aa303f0 --- /dev/null +++ b/doc/html/removed20.html @@ -0,0 +1,379 @@ + + + + + +Functions removed in TQt 2.0 + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Functions removed in TQt 2.0

+ + +

+
+TQFileDialog::fileHighlighted(const char *)
+TQFileDialog::fileSelected(const char *)
+TQFileDialog::dirEntered(const char *)
+TQFileDialog::updatePathBox(const char *)
+TQObject::name(void) const
+TQFileDialog::getOpenFileName(const char *, const char *, TQWidget *, const char *)
+TQFileDialog::getSaveFileName(const char *, const char *, TQWidget *, const char *)
+TQFileDialog::getExistingDirectory(const char *, TQWidget *, const char *)
+TQFileDialog::getOpenFileNames(const char *, const char *, TQWidget *, const char *)
+TQFileDialog::setSelection(const char *)
+TQFileDialog::setDir(const char *)
+TQMessageBox::setText(const char *)
+TQMessageBox::setButtonText(const char *)
+TQMessageBox::setButtonText(int, const char *)
+TQMessageBox::setStyle(GUIStyle)
+TQMessageBox::standardIcon(TQMessageBox::Icon, GUIStyle)
+TQMessageBox::information(TQWidget *, const char *, const char *, const char *, const char *, const char *, int, int)
+TQMessageBox::information(TQWidget *, const char *, const char *, int, int, int)
+TQMessageBox::warning(TQWidget *, const char *, const char *, const char *, const char *, const char *, int, int)
+TQMessageBox::warning(TQWidget *, const char *, const char *, int, int, int)
+TQMessageBox::critical(TQWidget *, const char *, const char *, const char *, const char *, const char *, int, int)
+TQMessageBox::critical(TQWidget *, const char *, const char *, int, int, int)
+TQMessageBox::about(TQWidget *, const char *, const char *)
+TQMessageBox::aboutTQt(TQWidget *, const char *)
+TQMessageBox::message(const char *, const char *, const char *, TQWidget *, const char *)
+TQMessageBox::buttonText(void) const
+TQMessageBox::query(const char *, const char *, const char *, const char *, TQWidget *, const char *)
+TQProgressDialog::setLabelText(const char *)
+TQProgressDialog::setCancelButtonText(const char *)
+TQProgressDialog::styleChange(GUIStyle)
+TQProgressDialog::init(TQWidget *, const char *, const char *, int)
+TQTabDialog::addTab(TQWidget *, const char *)
+TQTabDialog::isTabEnabled(const char *) const
+TQTabDialog::setTabEnabled(const char *, bool)
+TQTabDialog::setDefaultButton(const char *)
+TQTabDialog::setCancelButton(const char *)
+TQTabDialog::setApplyButton(const char *)
+TQTabDialog::setOKButton(const char *)
+TQTabDialog::setOkButton(const char *)
+TQTabDialog::styleChange(GUIStyle)
+TQTabDialog::selected(const char *)
+TQObject::name(void) const
+TQApplication::setStyle(GUIStyle)
+TQApplication::palette(void)
+TQApplication::setPalette(const TQPalette &, bool)
+TQApplication::font(void)
+TQApplication::setFont(const TQFont &, bool)
+TQBrush::setStyle(BrushStyle)
+TQBrush::init(const TQColor &, BrushStyle)
+TQObject::name(void) const
+TQClipboard::data(const char *) const
+TQClipboard::setData(const char *, void *)
+TQClipboard::setText(const char *)
+TQUrlDrag::decodeLocalFiles(TQDropEvent *, TQStrList &)
+TQObject::name(void) const
+TQStoredDrag::setEncodedData(TQArrayT const &)
+TQTextDrag::setText(const char *)
+TQImageDrag::canDecode(TQDragMoveEvent *)
+TQTextDrag::canDecode(TQDragMoveEvent *)
+TQUrlDrag::canDecode(TQDragMoveEvent *)
+TQImageDrag::decode(TQDropEvent *, TQImage &)
+TQImageDrag::decode(TQDropEvent *, TQPixmap &)
+TQTextDrag::decode(TQDropEvent *, TQString &)
+TQUrlDrag::decode(TQDropEvent *, TQStrList &)
+TQDragMoveEvent::format(int)
+TQDragMoveEvent::provides(const char *)
+TQDragMoveEvent::data(const char *)
+TQDropEvent::data(const char *)
+TQEvent::peErrMsg(void)
+TQFont::substitute(const char *)
+TQFont::insertSubstitution(const char *, const char *)
+TQFont::removeSubstitution(const char *)
+TQFont::load(unsigned int) const
+TQFont::setFamily(const char *)
+TQFont::bold(void) const
+TQFont::setBold(bool)
+TQFont::handle(unsigned int) const
+TQFont::bold(void) const
+TQFontInfo::font(void) const
+TQFontInfo::reset(const TQWidget *)
+TQFontInfo::type(void) const
+TQFontMetrics::inFont(char) const
+TQFontMetrics::leftBearing(char) const
+TQFontMetrics::rightBearing(char) const
+TQFontMetrics::width(char) const
+TQFontMetrics::width(const char *, int) const
+TQFontMetrics::boundingRect(char) const
+TQFontMetrics::boundingRect(const char *, int) const
+TQFontMetrics::boundingRect(int, int, int, int, int, const char *, int, int, int *, char **) const
+TQFontMetrics::size(int, const char *, int, int, int *, char **) const
+TQFontMetrics::font(void) const
+TQFontMetrics::reset(const TQWidget *)
+TQFontMetrics::type(void) const
+TQObject::name(void) const
+TQGManager::setBorder(int)
+TQGManager::newSerChain(TQGManager::Direction)
+TQGManager::newParChain(TQGManager::Direction)
+TQGManager::add(TQChain *, TQChain *, int)
+TQGManager::addWidget(TQChain *, TQWidget *, int)
+TQGManager::addSpacing(TQChain *, int, int, int)
+TQGManager::addBranch(TQChain *, TQChain *, int, int)
+TQGManager::setStretch(TQChain *, int)
+TQGManager::activate(void)
+TQGManager::unFreeze(void)
+TQGManager::xChain(void)
+TQGManager::yChain(void)
+TQGManager::setMenuBar(TQWidget *)
+TQGManager::mainWidget(void)
+TQGManager::remove(TQWidget *)
+TQGManager::setName(TQChain *, const char *)
+TQGManager::eventFilter(TQObject *, TQEvent *)
+TQGManager::resizeHandle(TQWidget *, const TQSize &)
+TQGManager::resizeAll(void)
+TQIconSet::setPixmap(const char *, TQIconSet::Size, TQIconSet::Mode)
+TQImage::imageFormat(const char *)
+TQImageIO::imageFormat(const char *)
+TQImage::load(const char *, const char *)
+TQImage::loadFromData(TQArrayT, const char *)
+TQImage::save(const char *, const char *) const
+TQImageIO::setFileName(const char *)
+TQImageIO::setDescription(const char *)
+TQBoxLayout::addB(TQLayout *, int)
+TQObject::name(void) const
+TQLayout::basicManager(void)
+TQLayout::verChain(TQLayout *)
+TQLayout::horChain(TQLayout *)
+TQObject::name(void) const
+TQObject::tr(const char *) const
+TQPaintDevice::x11Screen(voidTQPaintDevice::x11Depth(voidTQPaintDevice::x11Cells(voidTQPaintDevice::x11Colormap(voidTQPaintDevice::x11DefaultColormap(void) TQPaintDevice::x11Visual(voidTQPaintDevice::x11DefaultVisual(void)
+TQPainter::translate(float, float)
+TQPainter::scale(float, float)
+TQPainter::shear(float, float)
+TQPainter::rotate(float)
+TQPainter::drawText(const TQPoint &, const char *, int)
+TQPainter::drawText(const TQRect &, int, const char *, int, TQRect *, char **)
+TQPainter::drawText(int, int, const char *, int)
+TQPainter::drawText(int, int, int, int, int, const char *, int, TQRect *, char **)
+TQPainter::boundingRect(int, int, int, int, int, const char *, int, char **)
+TQPainter::testf(unsigned short) const
+TQPainter::setf(unsigned short)
+TQPainter::setf(unsigned short, bool)
+TQPainter::clearf(unsigned short)
+TQPainter::setPen(PenStyle)
+TQPainter::setBrush(BrushStyle)
+TQPainter::setBackgroundMode(BGMode)
+TQPen::setStyle(PenStyle)
+TQPen::init(const TQColor &, unsigned int, PenStyle)
+TQPicture::load(const char *)
+TQPicture::save(const char *)
+TQPixmap::isOptimized(void) const
+TQPixmap::optimize(bool)
+TQPixmap::isGloballyOptimized(void)
+TQPixmap::optimizeGlobally(bool)
+TQPixmap::imageFormat(const char *)
+TQPixmap::load(const char *, const char *, TQPixmap::ColorMode)
+TQPixmap::load(const char *, const char *, int)
+TQPixmap::loadFromData(TQArrayT, const char *, int)
+TQPixmap::save(const char *, const char *) const
+TQPixmapCache::find(const char *)
+TQPixmapCache::find(const char *, TQPixmap &)
+TQPixmapCache::insert(const char *, TQPixmap *)
+TQPixmapCache::insert(const char *, const TQPixmap &)
+TQPrinter::setPrinterName(const char *)
+TQPrinter::setOutputFileName(const char *)
+TQPrinter::setPrintProgram(const char *)
+TQPrinter::setDocName(const char *)
+TQPrinter::setCreator(const char *)
+TQRect::setX(int)
+TQRect::setY(int)
+TQRegion::exec(TQArrayT const &)
+TQObject::name(void) const
+TQObject::name(void) const
+TQSignalMapper::setMapping(const TQObject *, const char *)
+TQSignalMapper::mapped(const char *)
+TQObject::name(void) const
+TQObject::name(void) const
+TQWidget::setCaption(const char *)
+TQWidget::setIconText(const char *)
+TQWidget::drawText(const TQPoint &, const char *)
+TQWidget::drawText(int, int, const char *)
+TQWidget::acceptFocus(void) const
+TQWidget::setAcceptFocus(bool)
+TQWidget::create(unsigned int)
+TQWidget::create(void)
+TQWidget::internalMove(int, int)
+TQWidget::internalResize(int, int)
+TQWidget::internalSetGeometry(int, int, int, int)
+TQWidget::deferMove(const TQPoint &)
+TQWidget::deferResize(const TQSize &)
+TQWidget::cancelMove(voidTQWidget::cancelResize(voidTQWidget::sendDeferredEvents(voidTQWidget::setBackgroundColorFromMode(voidTQObject::name(void) const TQWidget::setMask(TQBitmapTQWMatrix::setMatrix(float, float, float, float, float, float)
+TQWMatrix::map(float, float, float *, float *) const
+TQWMatrix::translate(float, float)
+TQWMatrix::scale(float, float)
+TQWMatrix::shear(float, float)
+TQWMatrix::rotate(float)
+TQBuffer::setBuffer(TQArrayT)
+TQDir::entryList(const char *, int, int) const
+TQDir::entryInfoList(const char *, int, int) const
+TQDir::mkdir(const char *, bool) const
+TQDir::rmdir(const char *, bool) const
+TQDir::exists(const char *, bool)
+TQDir::remove(const char *, bool)
+TQDir::rename(const char *, const char *, bool)
+TQDir::setCurrent(const char *)
+TQDir::match(const char *, const char *)
+TQDir::cleanDirPath(const char *)
+TQDir::isRelativePath(const char *)
+TQDir::setPath(const char *)
+TQDir::filePath(const char *, bool) const
+TQDir::absFilePath(const char *, bool) const
+TQDir::convertSeparators(const char *)
+TQDir::cd(const char *, bool)
+TQDir::setNameFilter(const char *)
+TQFile::setName(const char *)
+TQFile::exists(const char *)
+TQFile::remove(const char *)
+TQFileInfo::setFile(const TQDir &, const char *)
+TQFileInfo::setFile(const char *)
+TQFile::exists(const char *)
+TQFileInfo::extension(void) const
+TQRegExp::match(const char *, int, int *) const
+TQRegExp::matchstr(unsigned short *, char *, char *) const
+TQString::resize(unsigned int)
+TQString::fill(char, int)
+TQString::find(const char *, int, bool) const
+TQString::findRev(const char *, int, bool) const
+TQString::leftJustify(unsigned int, char, bool) const
+TQString::rightJustify(unsigned int, char, bool) const
+TQString::insert(unsigned int, const char *)
+TQString::append(const char *)
+TQString::prepend(const char *)
+TQString::replace(const TQRegExp &, const char *)
+TQString::replace(unsigned int, unsigned int, const char *)
+TQString::setStr(const char *)
+TQString::setNum(int)
+TQString::setNum(unsigned long)
+TQString::setExpand(unsigned int, char)
+TQButton::setText(const char *)
+TQComboBox::setEditText(const char *)
+TQComboBox::activated(const char *)
+TQComboBox::highlighted(const char *)
+TQComboBox::insertItem(const char *, int)
+TQComboBox::changeItem(const char *, int)
+TQComboBox::setStyle(GUIStyle)
+TQComboBox::setValidator(TQValidator *)
+TQGroupBox::setTitle(const char *)
+TQHeader::moveAround(int, int)
+TQHeader::addLabel(const char *, int)
+TQHeader::setLabel(int, const char *, int)
+TQHeader::setOrientation(TQHeader::Orientation)
+TQHeader::resizeEvent(TQResizeEvent *TQHeader::paintCell(TQPainter *, int, intTQHeader::setupPainter(TQPainter *TQHeader::cellHeight(intTQHeader::cellWidth(int) TQLabel::setText(const char *TQLCDNumber::display(const char *)
+TQLCDNumber::resizeEvent(TQResizeEvent *)
+TQLCDNumber::internalDisplay(const char *)
+TQLCDNumber::drawString(const char *, TQPainter &, TQBitArray *, bool)
+TQLCDNumber::drawDigit(const TQPoint &, TQPainter &, int, char, char)
+TQLCDNumber::drawSegment(const TQPoint &, char, TQPainter &, int, bool)
+TQLineEdit::event(TQEvent *)
+TQLineEdit::setValidator(TQValidator *)
+TQLineEdit::validateAndSet(const char *, int, int, int)
+TQLineEdit::setText(const char *)
+TQLineEdit::insert(const char *)
+TQLineEdit::textChanged(const char *)
+TQListBox::insertItem(const char *, int)
+TQListBox::inSort(const char *)
+TQListBox::changeItem(const char *, int)
+TQListBox::maxItemWidth(void)
+TQListBox::highlighted(const char *)
+TQListBoxItem::setText(const char *)
+TQListBox::selected(const char *)
+TQListViewItem::isExpandable(void)
+TQListView::setStyle(GUIStyle)
+TQMainWindow::addToolBar(TQToolBar *, const char *, TQMainWindow::ToolBarDock, bool)
+TQMenuData::insertItem(const TQPixmap &, const TQObject *, const char *, int)
+TQMenuData::insertItem(const TQPixmap &, const char *, TQPopupMenu *, int, int)
+TQMenuData::insertItem(const TQPixmap &, const char *, const TQObject *, const char *, int)
+TQMenuData::insertItem(const TQPixmap &, const char *, const TQObject *, const char *, int, int, int)
+TQMenuData::insertItem(const TQPixmap &, const char *, int, int)
+TQMenuData::insertItem(const char *, TQPopupMenu *, int, int)
+TQMenuData::insertItem(const char *, const TQObject *, const char *, int)
+TQMenuData::insertItem(const char *, const TQObject *, const char *, int, int, int)
+TQMenuData::insertItem(const char *, int, int)
+TQMenuData::changeItem(const TQPixmap &, const char *, int)
+TQMenuData::changeItem(const char *, int)
+TQMenuData::insertAny(const char *, const TQPixmap *, TQPopupMenu *, int, int)
+TQMenuItem::setText(const char *)
+TQMultiLineEdit::textWidth(TQString *)
+TQMultiLineEdit::repaintAll(void)
+TQMultiLineEdit::repaintDelayed(void)
+TQMultiLineEdit::setText(const char *)
+TQMultiLineEdit::append(const char *)
+TQPopupMenu::itemAtPos(const TQPoint &)
+TQPopupMenu::actSig(int)
+TQRadioButton::mouseReleaseEvent(TQMouseEvent *)
+TQRadioButton::keyPressEvent(TQKeyEvent *)
+TQRangeControl::adjustValue(void)
+TQScrollBar::setOrientation(TQScrollBar::Orientation)
+TQScrollView::horizontalScrollBar(void)
+TQScrollView::verticalScrollBar(void)
+TQScrollView::viewport(void)
+TQSlider::setOrientation(TQSlider::Orientation)
+TQSpinBox::setSpecialValueText(const char *)
+TQSpinBox::setValidator(TQValidator *)
+TQSpinBox::valueChanged(const char *)
+TQSpinBox::paletteChange(const TQPalette &)
+TQSpinBox::enabledChange(bool)
+TQSpinBox::fontChange(const TQFont &)
+TQSpinBox::styleChange(GUIStyle)
+TQSplitter::setOrientation(TQSplitter::Orientation)
+TQSplitter::event(TQEvent *)
+TQSplitter::childInsertEvent(TQChildEvent *)
+TQSplitter::childRemoveEvent(TQChildEvent *)
+TQSplitter::moveSplitter(short)
+TQSplitter::adjustPos(int)
+TQSplitter::splitterWidget(void)
+TQSplitter::startMoving(void)
+TQSplitter::moveTo(TQPoint)
+TQSplitter::stopMoving(void)
+TQSplitter::newpos(void) const
+TQStatusBar::message(const char *)
+TQStatusBar::message(const char *, int)
+TQObject::name(void) const
+TQToolTipGroup::showTip(const char *)
+TQToolTip::add(TQWidget *, const TQRect &, const char *)
+TQToolTip::add(TQWidget *, const TQRect &, const char *, TQToolTipGroup *, const char *)
+TQToolTip::add(TQWidget *, const char *)
+TQToolTip::add(TQWidget *, const char *, TQToolTipGroup *, const char *)
+TQToolTip::tip(const TQRect &, const char *)
+TQToolTip::tip(const TQRect &, const char *, const char *)
+TQObject::name(void) const
+TQWhatsThis::add(TQWidget *, const TQPixmap &, const char *, const char *, bool)
+TQWhatsThis::add(TQWidget *, const char *, bool)
+TQWhatsThis::textFor(TQWidget *)
+TQWidgetStack::event(TQEvent *)
+
+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/richtext-example.html b/doc/html/richtext-example.html new file mode 100644 index 00000000..692e7a48 --- /dev/null +++ b/doc/html/richtext-example.html @@ -0,0 +1,264 @@ + + + + + +Richtext + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Richtext

+ + +

+In this example we demonstrate how to display rich text +in a widget. To do this some sayings taken from the famous +Unix "fortune" are displayed nicely formatted. +


+

Header file: +

/****************************************************************************
+** $Id: qt/richtext.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef RICHTEXT_H
+#define RICHTEXT_H
+
+#include <qvbox.h>
+
+class TQTextView;
+class TQPushButton;
+
+class MyRichText : public TQVBox
+{
+    Q_OBJECT
+
+public:
+    MyRichText( TQWidget *parent = 0, const char *name = 0 );
+
+protected:
+    TQTextView *view;
+    TQPushButton *bClose, *bNext, *bPrev;
+    int num;
+
+protected slots:
+    void prev();
+    void next();
+
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/richtext.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "richtext.h"
+
+#include <qhbox.h>
+#include <qhbox.h>
+#include <qpushbutton.h>
+#include <qtextview.h>
+#include <qbrush.h>
+#include <qapplication.h>
+
+static const char* sayings[] = {
+    "<b>Saying 1:</b><br>"
+    "<hr><br><br>"
+    "<big>Evil is that which one believes of others.  It is a sin to believe evil "
+    "of others, but it is seldom a mistake.</big><br><br>"
+    "<center><i>-- H.L. Mencken</i></center>",
+
+    "<b>Saying 2:</b><br>"
+    "<hr><br><br>"
+    "<big>A well-used door needs no oil on its hinges.<br>"
+    "A swift-flowing steam does not grow stagnant.<br>"
+    "Neither sound nor thoughts can travel through a vacuum.<br>"
+    "Software rots if not used.<br><br>"
+    "These are great mysteries.</big><br><br>"
+    "<center><i>-- Geoffrey James, \"The Tao of Programming\"</i></center>",
+
+    "<b>Saying 3:</b><br>"
+    "<hr><br><br>"
+    "<big>Show business is just like high school, except you get paid.</big><br><br>"
+    "<center><i>-- Martin Mull</i></center>",
+
+    "<b>Saying 4:</b><br>"
+    "<hr><br><br>"
+    "<big><b>The Least Successful Executions</b><br>"
+    "<twocolumn><p>      History has furnished us with two executioners worthy of attention. "
+    "The first performed in Sydney in Australia.  In 1803 three attempts were "
+    "made to hang a Mr. Joseph Samuels.  On the first two of these the rope "
+    "snapped, while on the third Mr. Samuels just hung there peacefully until he "
+    "and everyone else got bored.  Since he had proved unsusceptible to capital "
+    "punishment, he was reprieved.</p>"
+    "<p>        The most important British executioner was Mr. James Berry who "
+    "tried three times in 1885 to hang Mr. John Lee at Exeter Jail, but on each "
+    "occasion failed to get the trap door open.<!p>"
+    "<p>        In recognition of this achievement, the Home Secretary commuted "
+    "Lee's sentence to \"life\" imprisonment.  He was released in 1917, emigrated "
+    "to America and lived until 1933.</p></twocolumn></big><br><br>"
+    "<center><i>-- Stephen Pile, \"The Book of Heroic Failures\"</i></center>",
+
+    "<b>Saying 5:</b><br>"
+    "<hr><br><br>"
+    "<big>If you can, help others.  If you can't, at least don't hurt others.</big><br><br>"
+    "<center><i>-- the Dalai Lama</i></center>",
+
+    "<b>Saying 6:</b><br>"
+    "<hr><br><br>"
+    "<big>Television has brought back murder into the home -- where it belongs.</big><br><br>"
+    "<center><i>-- Alfred Hitchcock</i></center>",
+
+    "<b>Saying 7:</b><br>"
+    "<hr><br><br>"
+    "<big>I don't know who my grandfather was; I am much more concerned to know "
+    "what his grandson will be.</big><br><br>"
+    "<center><i>-- Abraham Lincoln</i></center>",
+
+    0
+};
+
+
+MyRichText::MyRichText( TQWidget *parent, const char *name )
+    : TQVBox( parent, name )
+{
+    setMargin( 5 );
+
+    view = new TQTextView( this );
+    view->setText( "This is a <b>Test</b> with <i>italic</i> <u>stuff</u>" );
+    TQBrush paper;
+    paper.setPixmap( TQPixmap( "../richtext/marble.png" ) );
+    if ( paper.pixmap() != 0 )
+        view->setPaper( paper );
+    else
+        view->setPaper( white );
+
+    view->setText( sayings[0] );
+    view->setMinimumSize( 450, 250 );
+
+    TQHBox *buttons = new TQHBox( this );
+    buttons->setMargin( 5 );
+
+    bClose = new TQPushButton( "&Close", buttons );
+    bPrev = new TQPushButton( "<< &Prev", buttons );
+    bNext = new TQPushButton( "&Next >>", buttons );
+
+    bPrev->setEnabled( FALSE );
+
+    connect( bClose, SIGNAL( clicked() ), qApp, SLOT( tquit() ) );
+    connect( bPrev, SIGNAL( clicked() ), this, SLOT( prev() ) );
+    connect( bNext, SIGNAL( clicked() ), this, SLOT( next() ) );
+
+    num = 0;
+}
+
+void MyRichText::prev()
+{
+    if ( num <= 0 )
+        return;
+
+    num--;
+
+    view->setText( sayings[num] );
+
+    if ( num == 0 )
+        bPrev->setEnabled( FALSE );
+
+    bNext->setEnabled( TRUE );
+}
+
+void MyRichText::next()
+{
+    if ( !sayings[++num] )
+        return;
+
+    view->setText( sayings[num] );
+
+    if ( !sayings[num + 1] )
+        bNext->setEnabled( FALSE );
+
+    bPrev->setEnabled( TRUE );
+}
+
+
+
+
+
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "richtext.h"
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    MyRichText richtext;
+    richtext.resize( 450, 350 );
+    richtext.setCaption( "TQt Example - Richtext" );
+    a.setMainWidget( &richtext );
+    richtext.show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/rintersect.png b/doc/html/rintersect.png new file mode 100644 index 00000000..3848c0ac Binary files /dev/null and b/doc/html/rintersect.png differ diff --git a/doc/html/rmo-editmenu.png b/doc/html/rmo-editmenu.png new file mode 100644 index 00000000..bcc01e5f Binary files /dev/null and b/doc/html/rmo-editmenu.png differ diff --git a/doc/html/rmo-filemenu.png b/doc/html/rmo-filemenu.png new file mode 100644 index 00000000..83661a76 Binary files /dev/null and b/doc/html/rmo-filemenu.png differ diff --git a/doc/html/rmo-helpmenu.png b/doc/html/rmo-helpmenu.png new file mode 100644 index 00000000..89e77389 Binary files /dev/null and b/doc/html/rmo-helpmenu.png differ diff --git a/doc/html/rmo-layoutmenu.png b/doc/html/rmo-layoutmenu.png new file mode 100644 index 00000000..a29deda1 Binary files /dev/null and b/doc/html/rmo-layoutmenu.png differ diff --git a/doc/html/rmo-previewmenu.png b/doc/html/rmo-previewmenu.png new file mode 100644 index 00000000..391ac937 Binary files /dev/null and b/doc/html/rmo-previewmenu.png differ diff --git a/doc/html/rmo-projectmenu.png b/doc/html/rmo-projectmenu.png new file mode 100644 index 00000000..24a4bf34 Binary files /dev/null and b/doc/html/rmo-projectmenu.png differ diff --git a/doc/html/rmo-searchmenu.png b/doc/html/rmo-searchmenu.png new file mode 100644 index 00000000..d0e48216 Binary files /dev/null and b/doc/html/rmo-searchmenu.png differ diff --git a/doc/html/rmo-toolsmenu.png b/doc/html/rmo-toolsmenu.png new file mode 100644 index 00000000..d158e2ae Binary files /dev/null and b/doc/html/rmo-toolsmenu.png differ diff --git a/doc/html/rmo-windowmenu.png b/doc/html/rmo-windowmenu.png new file mode 100644 index 00000000..cfa20f06 Binary files /dev/null and b/doc/html/rmo-windowmenu.png differ diff --git a/doc/html/rot-example.html b/doc/html/rot-example.html new file mode 100644 index 00000000..91835dc2 --- /dev/null +++ b/doc/html/rot-example.html @@ -0,0 +1,172 @@ + + + + + +Rot13 + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Rot13

+ + +

+This example lets you enter a text into a mulitilineedit widget. +It will be displayed in the edit widget to the right transformed using +the rot13 algorithm. +


+

Header file: +

/****************************************************************************
+** $Id: qt/rot13.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of something or other
+**
+** Created : 979899
+**
+** Copyright (C) 1997-2007 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.
+**
+*****************************************************************************/
+
+#ifndef ROT13_H
+#define ROT13_H
+
+#include <qwidget.h>
+
+class TQMultiLineEdit;
+
+class Rot13: public TQWidget {
+    Q_OBJECT
+public:
+    Rot13();
+
+    TQString rot13( const TQString & ) const;
+
+private slots:
+    void changeLeft();
+    void changeRight();
+
+private:
+    TQMultiLineEdit * left, * right;
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/rot13.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "rot13.h"
+
+#include <qmultilineedit.h>
+#include <qpushbutton.h>
+#include <qapplication.h>
+#include <qlayout.h>
+
+Rot13::Rot13()
+{
+    left = new TQMultiLineEdit( this, "left" );
+    right = new TQMultiLineEdit( this, "right" );
+    connect( left, SIGNAL(textChanged()), this, SLOT(changeRight()) );
+    connect( right, SIGNAL(textChanged()), this, SLOT(changeLeft()) );
+
+    TQPushButton * tquit = new TQPushButton( "&Quit", this );
+    tquit->setFocusPolicy( NoFocus );
+    connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+
+    TQGridLayout * l = new TQGridLayout( this, 2, 2, 5 );
+    l->addWidget( left, 0, 0 );
+    l->addWidget( right, 0, 1 );
+    l->addWidget( tquit, 1, 1, AlignRight );
+
+    left->setFocus();
+}
+
+
+void Rot13::changeLeft()
+{
+    left->blockSignals( TRUE );
+    left->setText( rot13( right->text() ) );
+    left->blockSignals( FALSE );
+}
+
+
+void Rot13::changeRight()
+{
+    right->blockSignals( TRUE );
+    right->setText( rot13( left->text() ) );
+    right->blockSignals( FALSE );
+}
+
+
+TQString Rot13::rot13( const TQString & input ) const
+{
+    TQString r = input;
+    int i = r.length();
+    while( i-- ) {
+        if ( r[i] >= TQChar('A') && r[i] <= TQChar('M') ||
+             r[i] >= TQChar('a') && r[i] <= TQChar('m') )
+            r[i] = (char)((int)TQChar(r[i]) + 13);
+        else if  ( r[i] >= TQChar('N') && r[i] <= TQChar('Z') ||
+                   r[i] >= TQChar('n') && r[i] <= TQChar('z') )
+            r[i] = (char)((int)TQChar(r[i]) - 13);
+    }
+    return r;
+}
+
+
+int main( int argc, char ** argv )
+{
+    TQApplication a( argc, argv );
+    Rot13 r;
+    r.resize( 400, 400 );
+    a.setMainWidget( &r );
+    r.setCaption("TQt Example - ROT13");
+    r.show();
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/rsubtract.png b/doc/html/rsubtract.png new file mode 100644 index 00000000..d8ea26ca Binary files /dev/null and b/doc/html/rsubtract.png differ diff --git a/doc/html/rtb-edit.png b/doc/html/rtb-edit.png new file mode 100644 index 00000000..2f2eb5db Binary files /dev/null and b/doc/html/rtb-edit.png differ diff --git a/doc/html/rtb-file.png b/doc/html/rtb-file.png new file mode 100644 index 00000000..0e0ee98f Binary files /dev/null and b/doc/html/rtb-file.png differ diff --git a/doc/html/rtb-layout.png b/doc/html/rtb-layout.png new file mode 100644 index 00000000..710fe5a7 Binary files /dev/null and b/doc/html/rtb-layout.png differ diff --git a/doc/html/rtb-search.png b/doc/html/rtb-search.png new file mode 100644 index 00000000..f5b00d46 Binary files /dev/null and b/doc/html/rtb-search.png differ diff --git a/doc/html/rtb-tbbuttons.png b/doc/html/rtb-tbbuttons.png new file mode 100644 index 00000000..7044d9b5 Binary files /dev/null and b/doc/html/rtb-tbbuttons.png differ diff --git a/doc/html/rtb-tbcontain.png b/doc/html/rtb-tbcontain.png new file mode 100644 index 00000000..4d4692ae Binary files /dev/null and b/doc/html/rtb-tbcontain.png differ diff --git a/doc/html/rtb-tbcustom.png b/doc/html/rtb-tbcustom.png new file mode 100644 index 00000000..6a00997f Binary files /dev/null and b/doc/html/rtb-tbcustom.png differ diff --git a/doc/html/rtb-tbdatabase.png b/doc/html/rtb-tbdatabase.png new file mode 100644 index 00000000..a694fd4f Binary files /dev/null and b/doc/html/rtb-tbdatabase.png differ diff --git a/doc/html/rtb-tbdisplay.png b/doc/html/rtb-tbdisplay.png new file mode 100644 index 00000000..b417ecd5 Binary files /dev/null and b/doc/html/rtb-tbdisplay.png differ diff --git a/doc/html/rtb-tbinput.png b/doc/html/rtb-tbinput.png new file mode 100644 index 00000000..f37579d2 Binary files /dev/null and b/doc/html/rtb-tbinput.png differ diff --git a/doc/html/rtb-tbviews.png b/doc/html/rtb-tbviews.png new file mode 100644 index 00000000..45b89eba Binary files /dev/null and b/doc/html/rtb-tbviews.png differ diff --git a/doc/html/rtb-toolbox.png b/doc/html/rtb-toolbox.png new file mode 100644 index 00000000..78801a53 Binary files /dev/null and b/doc/html/rtb-toolbox.png differ diff --git a/doc/html/rtb-tools.png b/doc/html/rtb-tools.png new file mode 100644 index 00000000..c25047ba Binary files /dev/null and b/doc/html/rtb-tools.png differ diff --git a/doc/html/runion.png b/doc/html/runion.png new file mode 100644 index 00000000..0aafb4af Binary files /dev/null and b/doc/html/runion.png differ diff --git a/doc/html/rxor.png b/doc/html/rxor.png new file mode 100644 index 00000000..3a374e29 Binary files /dev/null and b/doc/html/rxor.png differ diff --git a/doc/html/scaling.png b/doc/html/scaling.png new file mode 100644 index 00000000..7ded27d2 Binary files /dev/null and b/doc/html/scaling.png differ diff --git a/doc/html/scribble-example.html b/doc/html/scribble-example.html new file mode 100644 index 00000000..d116a98d --- /dev/null +++ b/doc/html/scribble-example.html @@ -0,0 +1,365 @@ + + + + + +Simple Painting Application + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Simple Painting Application

+ + +

+This example implements the famous scribble example. You can draw around +in the canvas with different pens and save the result as picture. +


+

Header file: +

/****************************************************************************
+** $Id: qt/scribble.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef SCRIBBLE_H
+#define SCRIBBLE_H
+
+#include <qmainwindow.h>
+#include <qpen.h>
+#include <qpoint.h>
+#include <qpixmap.h>
+#include <qwidget.h>
+#include <qstring.h>
+#include <qpointarray.h>
+
+class TQMouseEvent;
+class TQResizeEvent;
+class TQPaintEvent;
+class TQToolButton;
+class TQSpinBox;
+
+class Canvas : public TQWidget
+{
+    Q_OBJECT
+
+public:
+    Canvas( TQWidget *parent = 0, const char *name = 0 );
+
+    void setPenColor( const TQColor &c )
+    { pen.setColor( c ); }
+
+    void setPenWidth( int w )
+    { pen.setWidth( w ); }
+
+    TQColor penColor()
+    { return pen.color(); }
+
+    int penWidth()
+    { return pen.width(); }
+
+    void save( const TQString &filename, const TQString &format );
+
+    void clearScreen();
+
+protected:
+    void mousePressEvent( TQMouseEvent *e );
+    void mouseReleaseEvent( TQMouseEvent *e );
+    void mouseMoveEvent( TQMouseEvent *e );
+    void resizeEvent( TQResizeEvent *e );
+    void paintEvent( TQPaintEvent *e );
+
+    TQPen pen;
+    TQPointArray polyline;
+
+    bool mousePressed;
+
+    TQPixmap buffer;
+
+};
+
+class Scribble : public TQMainWindow
+{
+    Q_OBJECT
+
+public:
+    Scribble( TQWidget *parent = 0, const char *name = 0 );
+
+protected:
+    Canvas* canvas;
+
+    TQSpinBox *bPWidth;
+    TQToolButton *bPColor, *bSave, *bClear;
+
+protected slots:
+    void slotSave();
+    void slotColor();
+    void slotWidth( int );
+    void slotClear();
+
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/scribble.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "scribble.h"
+
+#include <qapplication.h>
+#include <qevent.h>
+#include <qpainter.h>
+#include <qtoolbar.h>
+#include <qtoolbutton.h>
+#include <qspinbox.h>
+#include <qtooltip.h>
+#include <qrect.h>
+#include <qpoint.h>
+#include <qcolordialog.h>
+#include <qfiledialog.h>
+#include <qcursor.h>
+#include <qimage.h>
+#include <qstrlist.h>
+#include <qpopupmenu.h>
+#include <qintdict.h>
+
+const bool no_writing = FALSE;
+
+Canvas::Canvas( TQWidget *parent, const char *name )
+    : TQWidget( parent, name, WStaticContents ), pen( TQt::red, 3 ), polyline(3),
+      mousePressed( FALSE ), buffer( width(), height() )
+{
+
+    if ((qApp->argc() > 0) && !buffer.load(qApp->argv()[1]))
+        buffer.fill( colorGroup().base() );
+    setBackgroundMode( TQWidget::PaletteBase );
+#ifndef QT_NO_CURSOR
+    setCursor( TQt::crossCursor );
+#endif
+}
+
+void Canvas::save( const TQString &filename, const TQString &format )
+{
+    if ( !no_writing )
+        buffer.save( filename, format.upper() );
+}
+
+void Canvas::clearScreen()
+{
+    buffer.fill( colorGroup().base() );
+    repaint( FALSE );
+}
+
+void Canvas::mousePressEvent( TQMouseEvent *e )
+{
+    mousePressed = TRUE;
+    polyline[2] = polyline[1] = polyline[0] = e->pos();
+}
+
+void Canvas::mouseReleaseEvent( TQMouseEvent * )
+{
+    mousePressed = FALSE;
+}
+
+void Canvas::mouseMoveEvent( TQMouseEvent *e )
+{
+    if ( mousePressed ) {
+        TQPainter painter;
+        painter.begin( &buffer );
+        painter.setPen( pen );
+        polyline[2] = polyline[1];
+        polyline[1] = polyline[0];
+        polyline[0] = e->pos();
+        painter.drawPolyline( polyline );
+        painter.end();
+
+        TQRect r = polyline.boundingRect();
+        r = r.normalize();
+        r.setLeft( r.left() - penWidth() );
+        r.setTop( r.top() - penWidth() );
+        r.setRight( r.right() + penWidth() );
+        r.setBottom( r.bottom() + penWidth() );
+
+        bitBlt( this, r.x(), r.y(), &buffer, r.x(), r.y(), r.width(), r.height() );
+    }
+}
+
+void Canvas::resizeEvent( TQResizeEvent *e )
+{
+    TQWidget::resizeEvent( e );
+
+    int w = width() > buffer.width() ?
+            width() : buffer.width();
+    int h = height() > buffer.height() ?
+            height() : buffer.height();
+
+    TQPixmap tmp( buffer );
+    buffer.resize( w, h );
+    buffer.fill( colorGroup().base() );
+    bitBlt( &buffer, 0, 0, &tmp, 0, 0, tmp.width(), tmp.height() );
+}
+
+void Canvas::paintEvent( TQPaintEvent *e )
+{
+    TQWidget::paintEvent( e );
+
+    TQMemArray<TQRect> rects = e->region().rects();
+    for ( uint i = 0; i < rects.count(); i++ ) {
+        TQRect r = rects[(int)i];
+        bitBlt( this, r.x(), r.y(), &buffer, r.x(), r.y(), r.width(), r.height() );
+    }
+}
+
+//------------------------------------------------------
+
+Scribble::Scribble( TQWidget *parent, const char *name )
+    : TQMainWindow( parent, name )
+{
+    canvas = new Canvas( this );
+    setCentralWidget( canvas );
+
+    TQToolBar *tools = new TQToolBar( this );
+
+    bSave = new TQToolButton( TQPixmap(), "Save", "Save as PNG image", this, SLOT( slotSave() ), tools );
+    bSave->setText( "Save as..." );
+
+    tools->addSeparator();
+
+    bPColor = new TQToolButton( TQPixmap(), "Choose Pen Color", "Choose Pen Color", this, SLOT( slotColor() ), tools );
+    bPColor->setText( "Choose Pen Color..." );
+
+    tools->addSeparator();
+
+    bPWidth = new TQSpinBox( 1, 20, 1, tools );
+    TQToolTip::add( bPWidth, "Choose Pen Width" );
+    connect( bPWidth, SIGNAL( valueChanged( int ) ), this, SLOT( slotWidth( int ) ) );
+    bPWidth->setValue( 3 );
+
+    tools->addSeparator();
+
+    bClear = new TQToolButton( TQPixmap(), "Clear Screen", "Clear Screen", this, SLOT( slotClear() ), tools );
+    bClear->setText( "Clear Screen" );
+}
+
+void Scribble::slotSave()
+{
+    TQPopupMenu *menu = new TQPopupMenu( 0 );
+    TQIntDict<TQString> formats;
+    formats.setAutoDelete( TRUE );
+
+    for ( unsigned int i = 0; i < TQImageIO::outputFormats().count(); i++ ) {
+        TQString str = TQString( TQImageIO::outputFormats().at( i ) );
+        formats.insert( menu->insertItem( TQString( "%1..." ).arg( str ) ), new TQString( str ) );
+    }
+
+    menu->setMouseTracking( TRUE );
+    int id = menu->exec( bSave->mapToGlobal( TQPoint( 0, bSave->height() + 1 ) ) );
+
+    if ( id != -1 ) {
+        TQString format = *formats[ id ];
+
+        TQString filename = TQFileDialog::getSaveFileName( TQString::null, TQString( "*.%1" ).arg( format.lower() ), this );
+        if ( !filename.isEmpty() )
+            canvas->save( filename, format );
+    }
+
+    delete menu;
+}
+
+void Scribble::slotColor()
+{
+    TQColor c = TQColorDialog::getColor( canvas->penColor(), this );
+    if ( c.isValid() )
+        canvas->setPenColor( c );
+}
+
+void Scribble::slotWidth( int w )
+{
+    canvas->setPenWidth( w );
+}
+
+void Scribble::slotClear()
+{
+    canvas->clearScreen();
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "scribble.h"
+#include <qapplication.h>
+
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    Scribble scribble;
+
+    scribble.resize( 500, 350 );
+    scribble.setCaption("TQt Example - Scribble");
+    a.setMainWidget( &scribble );
+    if ( TQApplication::desktop()->width() > 550
+         && TQApplication::desktop()->height() > 366 )
+        scribble.show();
+    else
+        scribble.showMaximized();
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/scrollview-example.html b/doc/html/scrollview-example.html new file mode 100644 index 00000000..eb78ca25 --- /dev/null +++ b/doc/html/scrollview-example.html @@ -0,0 +1,493 @@ + + + + + +Scrollview + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Scrollview

+ + +

+This example shows how to use TQt's scrollview. This is a widget +optimized for very large contents. +


+

Implementation: +

/****************************************************************************
+** $Id: qt/scrollview.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qscrollview.h>
+#include <qapplication.h>
+#include <qmenubar.h>
+#include <qpopupmenu.h>
+#include <qpushbutton.h>
+#include <qpainter.h>
+#include <qpixmap.h>
+#include <qmessagebox.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qmultilineedit.h>
+#include <qsizegrip.h>
+#include <stdlib.h>
+
+
+static const int style_id       = 0x1000;
+static const int lw_id          = 0x2000;
+static const int mlw_id         = 0x4000;
+static const int mw_id          = 0x8000;
+static const int max_lw         = 16;
+static const int max_mlw        = 5;
+static const int max_mw         = 10;
+
+
+class BigShrinker : public TQFrame {
+    Q_OBJECT
+public:
+    BigShrinker(TQWidget* parent) :
+        TQFrame(parent)
+    {
+        setFrameStyle(TQFrame::Box|TQFrame::Sunken);
+        int h=35;
+        int b=0;
+        for (int y=0; y<2000-h; y+=h+10) {
+            if (y == 0) {
+                TQButton* q=new TQPushButton("Quit", this);
+                connect(q, SIGNAL(clicked()), qApp, SLOT(tquit()));
+            } else {
+                TQString str;
+                if ( b > 0 ) {
+                    str.sprintf("Button %d", b++);
+                } else {
+                    str = "I'm shrinking!";
+                    ++b;
+                }
+                (new TQPushButton(str, this))->move(y/2,y);
+            }
+        }
+        resize(1000,2000);
+
+        startTimer(250);
+    }
+
+    void timerEvent(TQTimerEvent*)
+    {
+        int w=width();
+        int h=height();
+        if ( w > 50 ) w -= 1;
+        if ( h > 50 ) h -= 2;
+        resize(w,h);
+    }
+
+    void mouseReleaseEvent(TQMouseEvent* e)
+    {
+        emit clicked(e->x(), e->y());
+    }
+
+signals:
+    void clicked(int,int);
+};
+
+class BigMatrix : public TQScrollView {
+    TQMultiLineEdit *dragging;
+public:
+    BigMatrix(TQWidget* parent) :
+        TQScrollView(parent,"matrix", WStaticContents),
+        bg("bg.ppm")
+    {
+        bg.load("bg.ppm");
+        resizeContents(400000,300000);
+
+        dragging = 0;
+    }
+
+    void viewportMousePressEvent(TQMouseEvent* e)
+    {
+        int x, y;
+        viewportToContents( e->x(),  e->y(), x, y );
+        dragging = new TQMultiLineEdit(viewport(),"Another");
+        dragging->setText("Thanks!");
+        dragging->resize(100,100);
+        addChild(dragging, x, y);
+        showChild(dragging);
+    }
+
+    void viewportMouseReleaseEvent(TQMouseEvent*)
+    {
+        dragging = 0;
+    }
+
+    void viewportMouseMoveEvent(TQMouseEvent* e)
+    {
+        if ( dragging ) {
+            int mx, my;
+            viewportToContents( e->x(),  e->y(), mx, my );
+            int cx = childX(dragging);
+            int cy = childY(dragging);
+            int w = mx - cx + 1;
+            int h = my - cy + 1;
+            TQString msg;
+            msg.sprintf("at (%d,%d) %d by %d",cx,cy,w,h);
+            dragging->setText(msg);
+            dragging->resize(w,h);
+        }
+    }
+
+protected:
+    void drawContents(TQPainter* p, int cx, int cy, int cw, int ch)
+    {
+        // The Background
+        if ( !bg.isNull() ) {
+            int rowheight=bg.height();
+            int toprow=cy/rowheight;
+            int bottomrow=(cy+ch+rowheight-1)/rowheight;
+            int colwidth=bg.width();
+            int leftcol=cx/colwidth;
+            int rightcol=(cx+cw+colwidth-1)/colwidth;
+            for (int r=toprow; r<=bottomrow; r++) {
+                int py=r*rowheight;
+                for (int c=leftcol; c<=rightcol; c++) {
+                    int px=c*colwidth;
+                    p->drawPixmap(px, py, bg);
+                }
+            }
+        } else {
+            p->fillRect(cx, cy, cw, ch, TQColor(240,222,208));
+        }
+
+        // The Numbers
+        {
+            TQFontMetrics fm=p->fontMetrics();
+            int rowheight=fm.lineSpacing();
+            int toprow=cy/rowheight;
+            int bottomrow=(cy+ch+rowheight-1)/rowheight;
+            int colwidth=fm.width("00000,000000 ")+3;
+            int leftcol=cx/colwidth;
+            int rightcol=(cx+cw+colwidth-1)/colwidth;
+            TQString str;
+            for (int r=toprow; r<=bottomrow; r++) {
+                int py=r*rowheight;
+                for (int c=leftcol; c<=rightcol; c++) {
+                    int px=c*colwidth;
+                    str.sprintf("%d,%d",c,r);
+                    p->drawText(px+3, py+fm.ascent(), str);
+                }
+            }
+
+            // The Big Hint
+            if (leftcol<10 && toprow<5) {
+                p->setFont(TQFont("Charter",30));
+                p->setPen(red);
+                TQString text;
+                text.sprintf("HINT:  Look at %d,%d",215000/colwidth,115000/rowheight);
+                p->drawText(100,50,text);
+            }
+        }
+
+        // The Big X
+        {
+            if (cx+cw>200000 && cy+ch>100000 && cx<230000 && cy<130000) {
+                // Note that some X server cannot even handle co-ordinates
+                // beyond about 4000, so you might not see this.
+                p->drawLine(200000,100000,229999,129999);
+                p->drawLine(229999,100000,200000,129999);
+
+                // X marks the spot!
+                p->setFont(TQFont("Charter",100));
+                p->setPen(blue);
+                p->drawText(215000-500,115000-100,1000,200,AlignCenter,"YOU WIN!!!!!");
+            }
+        }
+    }
+
+private:
+    TQPixmap bg;
+};
+
+class ScrollViewExample : public TQWidget {
+    Q_OBJECT
+
+public:
+    ScrollViewExample(int technique, TQWidget* parent=0, const char* name=0) :
+        TQWidget(parent,name)
+    {
+        TQMenuBar* menubar = new TQMenuBar(this);
+        Q_CHECK_PTR( menubar );
+
+        TQPopupMenu* file = new TQPopupMenu( menubar );
+        Q_CHECK_PTR( file );
+        menubar->insertItem( "&File", file );
+        file->insertItem( "Quit", qApp,  SLOT(tquit()) );
+
+        vp_options = new TQPopupMenu( menubar );
+        Q_CHECK_PTR( vp_options );
+        vp_options->setCheckable( TRUE );
+        menubar->insertItem( "&ScrollView", vp_options );
+        connect( vp_options, SIGNAL(activated(int)),
+            this, SLOT(doVPMenuItem(int)) );
+
+        vauto_id = vp_options->insertItem( "Vertical Auto" );
+        vaoff_id = vp_options->insertItem( "Vertical AlwaysOff" );
+        vaon_id = vp_options->insertItem( "Vertical AlwaysOn" );
+        vp_options->insertSeparator();
+        hauto_id = vp_options->insertItem( "Horizontal Auto" );
+        haoff_id = vp_options->insertItem( "Horizontal AlwaysOff" );
+        haon_id = vp_options->insertItem( "Horizontal AlwaysOn" );
+        vp_options->insertSeparator();
+        corn_id = vp_options->insertItem( "cornerWidget" );
+
+        if (technique == 1) {
+            vp = new TQScrollView(this);
+            BigShrinker *bs = new BigShrinker(0);//(vp->viewport());
+            vp->addChild(bs);
+            bs->setAcceptDrops(TRUE);
+            TQObject::connect(bs, SIGNAL(clicked(int,int)),
+                            vp, SLOT(center(int,int)));
+        } else {
+            vp = new BigMatrix(this);
+            if ( technique == 3 )
+                vp->enableClipper(TRUE);
+            srand(1);
+            for (int i=0; i<30; i++) {
+                TQMultiLineEdit *l = new TQMultiLineEdit(vp->viewport(),"First");
+                l->setText("Drag out more of these.");
+                l->resize(100,100);
+                vp->addChild(l, rand()%800, rand()%10000);
+            }
+            vp->viewport()->setBackgroundMode(NoBackground);
+        }
+
+        f_options = new TQPopupMenu( menubar );
+        Q_CHECK_PTR( f_options );
+        f_options->setCheckable( TRUE );
+        menubar->insertItem( "F&rame", f_options );
+        connect( f_options, SIGNAL(activated(int)),
+            this, SLOT(doFMenuItem(int)) );
+
+        f_options->insertItem( "No Frame", style_id );
+        f_options->insertItem( "Box", style_id|TQFrame::Box );
+        f_options->insertItem( "Panel", style_id|TQFrame::Panel );
+        f_options->insertItem( "WinPanel", style_id|TQFrame::WinPanel );
+        f_options->insertSeparator();
+        f_options->insertItem( "Plain", style_id|TQFrame::Plain );
+        f_options->insertItem( "Raised", style_id|TQFrame::Raised );
+        f_laststyle = f_options->indexOf(
+            f_options->insertItem( "Sunken", style_id|TQFrame::Sunken ));
+        f_options->insertSeparator();
+        lw_options = new TQPopupMenu( menubar );
+        Q_CHECK_PTR( lw_options );
+        lw_options->setCheckable( TRUE );
+        for (int lw = 1; lw <= max_lw; lw++) {
+            TQString str;
+            str.sprintf("%d Pixels", lw);
+            lw_options->insertItem( str, lw_id | lw );
+        }
+        f_options->insertItem( "Line Width", lw_options );
+        connect( lw_options, SIGNAL(activated(int)),
+            this, SLOT(doFMenuItem(int)) );
+        mlw_options = new TQPopupMenu( menubar );
+        Q_CHECK_PTR( mlw_options );
+        mlw_options->setCheckable( TRUE );
+        for (int mlw = 0; mlw <= max_mlw; mlw++) {
+            TQString str;
+            str.sprintf("%d Pixels", mlw);
+            mlw_options->insertItem( str, mlw_id | mlw );
+        }
+        f_options->insertItem( "Midline Width", mlw_options );
+        connect( mlw_options, SIGNAL(activated(int)),
+            this, SLOT(doFMenuItem(int)) );
+        mw_options = new TQPopupMenu( menubar );
+        Q_CHECK_PTR( mw_options );
+        mw_options->setCheckable( TRUE );
+        for (int mw = 0; mw <= max_mw; mw++) {
+            TQString str;
+            str.sprintf("%d Pixels", mw);
+            mw_options->insertItem( str, mw_id | mw );
+        }
+        f_options->insertItem( "Margin Width", mw_options );
+        connect( mw_options, SIGNAL(activated(int)),
+            this, SLOT(doFMenuItem(int)) );
+
+        setVPMenuItems();
+        setFMenuItems();
+
+        TQVBoxLayout* vbox = new TQVBoxLayout(this);
+        vbox->setMenuBar(menubar);
+        menubar->setSeparator(TQMenuBar::InWindowsStyle);
+        vbox->addWidget(vp);
+        vbox->activate();
+
+        corner = new TQSizeGrip(this);
+        corner->hide();
+    }
+
+private slots:
+    void doVPMenuItem(int id)
+    {
+        if (id == vauto_id ) {
+            vp->setVScrollBarMode(TQScrollView::Auto);
+        } else if (id == vaoff_id) {
+            vp->setVScrollBarMode(TQScrollView::AlwaysOff);
+        } else if (id == vaon_id) {
+            vp->setVScrollBarMode(TQScrollView::AlwaysOn);
+        } else if (id == hauto_id) {
+            vp->setHScrollBarMode(TQScrollView::Auto);
+        } else if (id == haoff_id) {
+            vp->setHScrollBarMode(TQScrollView::AlwaysOff);
+        } else if (id == haon_id) {
+            vp->setHScrollBarMode(TQScrollView::AlwaysOn);
+        } else if (id == corn_id) {
+            bool corn = !vp->cornerWidget();
+            vp->setCornerWidget(corn ? corner : 0);
+        } else {
+            return; // Not for us to process.
+        }
+        setVPMenuItems();
+    }
+
+    void setVPMenuItems()
+    {
+        TQScrollView::ScrollBarMode vm = vp->vScrollBarMode();
+        vp_options->setItemChecked( vauto_id, vm == TQScrollView::Auto );
+        vp_options->setItemChecked( vaoff_id, vm == TQScrollView::AlwaysOff );
+        vp_options->setItemChecked( vaon_id, vm == TQScrollView::AlwaysOn );
+
+        TQScrollView::ScrollBarMode hm = vp->hScrollBarMode();
+        vp_options->setItemChecked( hauto_id, hm == TQScrollView::Auto );
+        vp_options->setItemChecked( haoff_id, hm == TQScrollView::AlwaysOff );
+        vp_options->setItemChecked( haon_id, hm == TQScrollView::AlwaysOn );
+
+        vp_options->setItemChecked( corn_id, !!vp->cornerWidget() );
+    }
+
+    void doFMenuItem(int id)
+    {
+        if (id & style_id) {
+            int sty;
+
+            if (id == style_id) {
+                sty = 0;
+            } else if (id & TQFrame::MShape) {
+                sty = vp->frameStyle()&TQFrame::MShadow;
+                sty = (sty ? sty : TQFrame::Plain) | (id&TQFrame::MShape);
+            } else {
+                sty = vp->frameStyle()&TQFrame::MShape;
+                sty = (sty ? sty : TQFrame::Box) | (id&TQFrame::MShadow);
+            }
+            vp->setFrameStyle(sty);
+        } else if (id & lw_id) {
+            vp->setLineWidth(id&~lw_id);
+        } else if (id & mlw_id) {
+            vp->setMidLineWidth(id&~mlw_id);
+        } else {
+            vp->setMargin(id&~mw_id);
+        }
+
+        vp->update();
+        setFMenuItems();
+    }
+
+    void setFMenuItems()
+    {
+        int sty = vp->frameStyle();
+
+        f_options->setItemChecked( style_id, !sty );
+
+        for (int i=1; i <= f_laststyle; i++) {
+            int id = f_options->idAt(i);
+            if (id & TQFrame::MShape)
+                f_options->setItemChecked( id,
+                    ((id&TQFrame::MShape) == (sty&TQFrame::MShape)) );
+            else
+                f_options->setItemChecked( id,
+                    ((id&TQFrame::MShadow) == (sty&TQFrame::MShadow)) );
+        }
+
+        for (int lw=1; lw<=max_lw; lw++)
+            lw_options->setItemChecked( lw_id|lw, vp->lineWidth() == lw );
+
+        for (int mlw=0; mlw<=max_mlw; mlw++)
+            mlw_options->setItemChecked( mlw_id|mlw, vp->midLineWidth() == mlw );
+
+        for (int mw=0; mw<=max_mw; mw++)
+            mw_options->setItemChecked( mw_id|mw, vp->margin() == mw );
+    }
+
+private:
+    TQScrollView* vp;
+    TQPopupMenu* vp_options;
+    TQPopupMenu* f_options;
+    TQPopupMenu* lw_options;
+    TQPopupMenu* mlw_options;
+    TQPopupMenu* mw_options;
+    TQSizeGrip* corner;
+
+    int vauto_id, vaoff_id, vaon_id,
+        hauto_id, haoff_id, haon_id,
+        corn_id;
+
+    int f_laststyle;
+};
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    ScrollViewExample ve1(1,0,"ve1");
+    ScrollViewExample ve2(2,0,"ve2");
+    ScrollViewExample ve3(3,0,"ve3");
+    ve1.setCaption("TQt Example - Scrollviews");
+    ve1.show();
+    ve2.setCaption("TQt Example - Scrollviews");
+    ve2.show();
+    ve3.setCaption("TQt Example - Scrollviews");
+    ve3.show();
+
+    TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(tquit()));
+
+    return a.exec();
+}
+
+#include "scrollview.moc"
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/search.png b/doc/html/search.png new file mode 100644 index 00000000..667a4a62 Binary files /dev/null and b/doc/html/search.png differ diff --git a/doc/html/session.html b/doc/html/session.html new file mode 100644 index 00000000..3cd66010 --- /dev/null +++ b/doc/html/session.html @@ -0,0 +1,152 @@ + + + + + +Session Management + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Session Management

+ + + +

Definitions +

+

A session is a group of running applications, each of which has a +particular state. The session is controlled by a service called the session manager. The applications participating in the session are +called session clients. +

The session manager issues commands to its clients on behalf of the +user. These commands may cause clients to commit unsaved changes (for +example by saving open files), to preserve their state for future +sessions, or to terminate gracefully. The set of these operations is +called session management. +

In the common case, a session consists of all applications that a +user runs on their desktop at a time. Under Unix/X11, however, a +session may include applications running on different computers and +may span multiple displays. +

Shutting a session down +

+

A session is shut down by the session manager, usually on behalf of +the user when they want to log out. A system might also perform an +automatic shutdown in an emergency situation, for example, if power is +about to be lost. Clearly there is a significant difference between +these types of shutdown. During the first, the user may want to +interact with the application, specifying exactly which files should +be saved and which should be discarded. In the latter case, there's no +time for interaction. There may not even be a user sitting in front of +the machine! +

Protocols and support on different platforms +

+

On Mac OS X and MS-Windows, there is nothing like complete session +management for applications yet, i.e. no restoring of previous +sessions. They do support graceful logouts where applications +have the opportunity to cancel the process after getting confirmation +from the user. This is the functionality that corresponds to the TQApplication::commitData() method. +

X11 has supported complete session management since X11R6. +

Getting session management to work with TQt +

+

Start by reimplementing TQApplication::commitData() to +enable your application to take part in the graceful logout process. If +you are only targeting the MS-Windows platform, this is all you can +and must provide. Ideally, your application should provide a shutdown +dialog similar to the following: +

A typical dialog on shutdown
+

Example code to this dialog can be found in the documentation of TQSessionManager::allowsInteraction(). +

For complete session management (only supported on X11R6 at present), +you must also take care of saving the application's state, and +potentially of restoring the state in the next life cycle of the +session. This saving is done by reimplementing TQApplication::saveState(). All state data you are saving in this +function, should be marked with the session identifier TQApplication::sessionId(). This application specific identifier is +globally unique, so no clashes will occur. (See TQSessionManager for +information on saving/restoring the state of a particular TQt +application.) +

Restoration is usually done in the application's main() +function. Check if TQApplication::isSessionRestored() is TRUE. If +that's the case, use the session identifier TQApplication::sessionId() again to access your state data and restore +the state of the application. +

Important: In order to allow the window manager to +restore window attributes such as stacking order or geometry +information, you must identify your top level widgets with +unique application-wide object names (see TQObject::setName()). When +restoring the application, you must ensure that all restored +top level widgets are given the same unique names they had before. +

Testing and debugging session management +

+

Session management support on Mac OS X and Windows is fairly limited +due to the lack of this functionality in the operating system +itself. Simply shut the session down and verify that your application +behaves as expected. It may be useful to launch another application, +usually the integrated development environment, before starting your +application. This other application will get the shutdown message +afterwards, thus permitting you to cancel the shutdown. Otherwise you +would have to log in again after each test run, which is not a problem +per se, but is time consuming. +

On Unix you can either use a desktop environment that supports +standard X11R6 session management or, the recommended method, use the +session manager reference implementation provided by the X Consortium. +This sample manager is called xsm and is part of a standard X11R6 +installation. As always with X11, a useful and informative manual page +is provided. Using xsm is straightforward (apart from the clumsy +Athena-based user interface). Here's a simple approach: +

    +
  • Run X11R6. +
  • Create a dot file .xsmstartup in your home directory which +contains the single line +
    +xterm
    +
    + +This tells xsm that the default/failsafe session is just an xterm +and nothing else. Otherwise xsm would try to invoke lots of +clients including the windowmanager twm, which isn't very helpful. +
  • Now launch xsm from another terminal window. Both a session +manager window and the xterm will appear. The xterm has a nice +property that sets it apart from all the other shells you are +currently running: within its shell, the SESSION_MANAGER +environment variable points to the session manager you just started. +
  • Launch your application from the new xterm window. It will connect +itself automatically to the session manager. You can check with the ClientList push button whether the connect was successful.
    +Note: Never keep the ClientList open when you +start or end session managed clients! Otherwise xsm is likely to +crash. +
  • Use the session manager's Checkpoint and Shutdown buttons +with different settings and see how your application behaves. The save +type local means that the clients should save their state. It +corresponds to the TQApplication::saveState() function. The global save type asks applications to save their unsaved changes in +permanent, globally accessible storage. It invokes TQApplication::commitData(). +
  • Whenever something crashes, blame xsm and not TQt. xsm is far +from being a usable session manager on a user's desktop. It is, +however, stable and useful enough to serve as testing environment. +
+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/session.png b/doc/html/session.png new file mode 100644 index 00000000..8a37490c Binary files /dev/null and b/doc/html/session.png differ diff --git a/doc/html/shared.html b/doc/html/shared.html new file mode 100644 index 00000000..599a8535 --- /dev/null +++ b/doc/html/shared.html @@ -0,0 +1,75 @@ + + + + + +Implicitly and Explicitly Shared Classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Implicitly and Explicitly Shared Classes

+ + +

These classes are normally-heavy classes which in TQt have been +optimized by the use of reference counter and common data so they can +be passed around. +

The only important effect is that the classes listed here can +be passed around as arguments efficiently, even though they may +seem heavyweight. +

+

+
TQBitArrayArray of bits +
TQBitmapMonochrome (1-bit depth) pixmaps +
TQBrushDefines the fill pattern of shapes drawn by a TQPainter +
TQCStringAbstraction of the classic C zero-terminated char array (char *) +
TQCursorMouse cursor with an arbitrary shape +
TQDeepCopyTemplate class which ensures that implicitly shared and explicitly shared classes reference unique data +
TQFontFont used for drawing text +
TQFontInfoGeneral information about fonts +
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 +
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 +
TQPixmapOff-screen, pixel-based paint device +
TQPointArrayArray of points +
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 +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/shclass.html b/doc/html/shclass.html new file mode 100644 index 00000000..416c211a --- /dev/null +++ b/doc/html/shclass.html @@ -0,0 +1,236 @@ + + + + + +Shared Classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Shared Classes

+ + + +

+

Many C++ classes in TQt use explicit and implicit data sharing +to maximize resource usage and minimize copying of data. +

+

+ + +

Overview +

+

A shared class consists of a pointer to a shared data block that +contains a reference count and the data. +

When a shared object is created, it sets the reference count to 1. The +reference count is incremented whenever a new object references the +shared data, and decremented when the object dereferences the shared +data. The shared data is deleted when the reference count becomes +zero. +

+

When dealing with shared objects, there are two ways of copying an +object. We usually speak about deep and shallow copies. A deep +copy implies duplicating an object. A shallow copy is a reference +copy, i.e. just a pointer to a shared data block. Making a deep copy +can be expensive in terms of memory and CPU. Making a shallow copy is +very fast, because it only involves setting a pointer and incrementing +the reference count. +

Object assignment (with operator=()) for implicitly and explicitly +shared objects is implemented using shallow copies. A deep copy can be +made by calling a copy() function or by using TQDeepCopy. +

The benefit of sharing is that a program does not need to duplicate +data unnecessarily, which results in lower memory use and less copying +of data. Objects can easily be assigned, sent as function arguments, +and returned from functions. +

Now comes the distinction between explicit and implicit sharing. +Explicit sharing means that the programmer must be aware of the fact +that objects share common data. Implicit sharing means that the +sharing mechanism takes place behind the scenes and the programmer +does not need to worry about it. +

A TQByteArray Example +

+

TQByteArray is an example of a shared class that uses explicit sharing. +Example: +

+                          //Line    a=         b=         c=
+    TQByteArray a(3),b(2)  // 1:     {?,?,?}    {?,?}
+    b[0] = 12; b[1] = 34; // 2:     {?,?,?}    {12,34}
+    a = b;                // 3:     {12,34}    {12,34}
+    a[1] = 56;            // 4:     {12,56}    {12,56}
+    TQByteArray c = a;     // 5:     {12,56}    {12,56}    {12,56}
+    a.detach();           // 6:     {12,56}    {12,56}    {12,56}
+    a[1] = 78;            // 7:     {12,78}    {12,56}    {12,56}
+    b = a.copy();         // 8:     {12,78}    {12,78}    {12,56}
+    a[1] = 90;            // 9:     {12,90}    {12,78}    {12,56}
+
+ +

The assignment a = b on line 3 throws away a's original shared +block (the reference count becomes zero), sets a's shared block to +point to b's shared block and increments the reference count. +

On line 4, the contents of a is modified. b is also modified, +because a and b refer to the same data block. This is the +difference between explicit and implicit sharing (explained below). +

The a object detaches from the common data on line 6. Detaching +means that the shared data is copied to make sure that an object has +its own private data. Therefore, modifying a on line 7 does not +affect b or c. +

Finally, on line 8 we make a deep copy of a and assign it to b, +so that when a is modified on line 9, b remains unchanged. +

Explicit vs. Implicit Sharing +

+

Implicit sharing automatically detaches the object from a shared block +if the object is about to change and the reference count is greater +than one. (This is often called "copy-on-write".) Explicit sharing +leaves this job to the programmer. If an explicitly shared object is +not detached, changing an object will change all other objects that +refer to the same data. +

Implicit sharing optimizes memory use and copying of data without +this side effect. So why didn't we implement implicit sharing for all +shared classes? The answer is that a class that allows direct access +to its internal data (for efficiency reasons), like TQByteArray, cannot +be implicitly shared, because it can be changed without letting +TQByteArray know. +

An implicitly shared class has total control of its internal data. In +any member functions that modify its data, it automatically detaches +before modifying the data. +

The TQPen class, which uses implicit sharing, detaches from the shared +data in all member functions that change the internal data. +

Code fragment: +

+    void TQPen::setStyle( PenStyle s )
+    {
+        detach();        // detach from common data
+        data->style = s; // set the style member
+    }
+
+    void TQPen::detach()
+    {
+        if ( data->count != 1 ) // only if >1 reference
+            *this = copy();
+    }
+
+ +

This is clearly not possible for TQByteArray, because the programmer +can do the following: +

+    TQByteArray array( 10 );
+    array.fill( 'a' );
+    array[0] = 'f';        // will modify array
+    array.data()[1] = 'i'; // will modify array
+
+ +

If we monitor changes in a TQByteArray, the TQByteArray class would +become unacceptably slow. +

Explicitly Shared Classes +

+

All classes that are instances of the TQMemArray template class are +explicitly shared: +

+

These classes have a detach() function that can be called if you want +your object to get a private copy of the shared data. They also have a +copy() function that returns a deep copy with a reference count of 1. +

The same is true for TQImage, which does not inherit TQMemArray. TQMovie is also explicitly shared, but it does not support detach() or +copy(). +

Implicitly Shared Classes +

+

The TQt classes that are implicitly shared are: +

+

These classes automatically detach from common data if an object is +about to be changed. The programmer will not even notice that the +objects are shared. Thus you should treat separate instances of them +as separate objects. They will always behave as separate objects but +with the added benefit of sharing data whenever possible. For this +reason, you can pass instances of these classes as arguments to +functions by value without concern for the copying overhead. +

Example: +

+    TQPixmap p1, p2;
+    p1.load( "image.bmp" );
+    p2 = p1;                    // p1 and p2 share data
+    TQPainter paint;
+    paint.begin( &p2 );         // cuts p2 loose from p1
+    paint.drawText( 0,50, "Hi" );
+    paint.end();
+
+ +

In this example, p1 and p2 share data until TQPainter::begin() is +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. +

TQCString: implicit or explicit? +

+

TQCString uses a mixture of implicit and explicit sharing. Functions +inherited from TQByteArray, such as data(), employ explicit sharing, while +those only in TQCString detach automatically. Thus, TQCString is rather an +"experts only" class, provided mainly to ease porting from TQt 1.x to TQt 2.0. +We recommend that you use TQString, a purely implicitly shared class. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/showimg-example.html b/doc/html/showimg-example.html new file mode 100644 index 00000000..ff42ab33 --- /dev/null +++ b/doc/html/showimg-example.html @@ -0,0 +1,883 @@ + + + + + +Show Image + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Show Image

+ + +

+This example reads and displays an image in any supported image +format (GIF, BMP, PPM, XMP, etc.). +


+

Header file: +

/****************************************************************************
+** $Id: qt/showimg.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef SHOWIMG_H
+#define SHOWIMG_H
+
+#include <qwidget.h>
+#include <qimage.h>
+
+
+class TQLabel;
+class TQMenuBar;
+class TQPopupMenu;
+
+class ImageViewer : public TQWidget
+{
+    Q_OBJECT
+public:
+    ImageViewer( TQWidget *parent=0, const char *name=0, int wFlags=0 );
+    ~ImageViewer();
+    bool        loadImage( const TQString& );
+protected:
+    void        paintEvent( TQPaintEvent * );
+    void        resizeEvent( TQResizeEvent * );
+    void        mousePressEvent( TQMouseEvent * );
+    void        mouseReleaseEvent( TQMouseEvent * );
+    void        mouseMoveEvent( TQMouseEvent * );
+
+private:
+    void        scale();
+    int         conversion_flags;
+    bool        smooth() const;
+    bool        useColorContext() const;
+    int         alloc_context;
+    bool        convertEvent( TQMouseEvent* e, int& x, int& y );
+    TQString     filename;
+    TQImage      image;                  // the loaded image
+    TQPixmap     pm;                     // the converted pixmap
+    TQPixmap     pmScaled;               // the scaled pixmap
+
+    TQMenuBar   *menubar;
+    TQPopupMenu  *file;
+    TQPopupMenu   *saveimage;
+    TQPopupMenu   *savepixmap;
+    TQPopupMenu  *edit;
+    TQPopupMenu  *options;
+
+    TQWidget    *helpmsg;
+    TQLabel     *status;
+    int         si, sp, ac, co, mo, fd, bd, // Menu item ids
+                td, ta, ba, fa, au, ad, dd,
+                ss, cc, t1, t8, t32;
+    void        updateStatus();
+    void        setMenuItemFlags();
+    bool        reconvertImage();
+    int         pickx, picky;
+    int         clickx, clicky;
+    bool        may_be_other;
+    static ImageViewer* other;
+    void        setImage(const TQImage& newimage);
+
+private slots:
+    void        to1Bit();
+    void        to8Bit();
+    void        to32Bit();
+    void        toBitDepth(int);
+
+    void        copy();
+    void        paste();
+
+    void        hFlip();
+    void        vFlip();
+    void        rot180();
+
+    void        editText();
+
+    void        newWindow();
+    void        openFile();
+    void        saveImage(int);
+    void        savePixmap(int);
+    void        giveHelp();
+    void        doOption(int);
+    void        copyFrom(ImageViewer*);
+};
+
+
+#endif // SHOWIMG_H
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/showimg.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "showimg.h"
+#include "imagetexteditor.h"
+#include <qmenubar.h>
+#include <qfiledialog.h>
+#include <qmessagebox.h>
+#include <qpopupmenu.h>
+#include <qlabel.h>
+#include <qpainter.h>
+#include <qapplication.h>
+#include <qclipboard.h>
+
+
+/*
+  In the constructor, we just pass the standard parameters on to
+  TQWidget.
+
+  The menu uses a single slot to simplify the process of adding
+  more items to the options menu.
+*/
+ImageViewer::ImageViewer( TQWidget *parent, const char *name, int wFlags )
+    : TQWidget( parent, name, wFlags ),
+      conversion_flags( PreferDither ),
+      helpmsg( 0 )
+{
+    pickx = -1;
+    picky = -1;
+    clickx = -1;
+    clicky = -1;
+    alloc_context = 0;
+
+    menubar = new TQMenuBar(this);
+    menubar->setSeparator( TQMenuBar::InWindowsStyle );
+
+    TQStrList fmt = TQImage::outputFormats();
+    saveimage = new TQPopupMenu( menubar );
+    savepixmap = new TQPopupMenu( menubar );
+    for (const char* f = fmt.first(); f; f = fmt.next()) {
+        saveimage->insertItem( f );
+        savepixmap->insertItem( f );
+    }
+    connect( saveimage, SIGNAL(activated(int)), this, SLOT(saveImage(int)) );
+    connect( savepixmap, SIGNAL(activated(int)), this, SLOT(savePixmap(int)) );
+
+    file = new TQPopupMenu( menubar );
+    menubar->insertItem( "&File", file );
+    file->insertItem( "&New window", this,  SLOT(newWindow()), CTRL+Key_N );
+    file->insertItem( "&Open...", this,  SLOT(openFile()), CTRL+Key_O );
+    si = file->insertItem( "Save image", saveimage );
+    sp = file->insertItem( "Save pixmap", savepixmap );
+    file->insertSeparator();
+    file->insertItem( "E&xit", qApp,  SLOT(tquit()), CTRL+Key_Q );
+
+    edit =  new TQPopupMenu( menubar );
+    menubar->insertItem( "&Edit", edit );
+    edit->insertItem("&Copy", this, SLOT(copy()), CTRL+Key_C);
+    edit->insertItem("&Paste", this, SLOT(paste()), CTRL+Key_V);
+    edit->insertSeparator();
+    edit->insertItem("&Horizontal flip", this, SLOT(hFlip()), ALT+Key_H);
+    edit->insertItem("&Vertical flip", this, SLOT(vFlip()), ALT+Key_V);
+    edit->insertItem("&Rotate 180", this, SLOT(rot180()), ALT+Key_R);
+    edit->insertSeparator();
+    edit->insertItem("&Text...", this, SLOT(editText()));
+    edit->insertSeparator();
+    t1 = edit->insertItem( "Convert to &1 bit", this, SLOT(to1Bit()) );
+    t8 = edit->insertItem( "Convert to &8 bit", this, SLOT(to8Bit()) );
+    t32 = edit->insertItem( "Convert to &32 bit", this, SLOT(to32Bit()) );
+
+    options =  new TQPopupMenu( menubar );
+    menubar->insertItem( "&Options", options );
+    ac = options->insertItem( "AutoColor" );
+    co = options->insertItem( "ColorOnly" );
+    mo = options->insertItem( "MonoOnly" );
+    options->insertSeparator();
+    fd = options->insertItem( "DiffuseDither" );
+    bd = options->insertItem( "OrderedDither" );
+    td = options->insertItem( "ThresholdDither" );
+    options->insertSeparator();
+    ta = options->insertItem( "ThresholdAlphaDither" );
+    ba = options->insertItem( "OrderedAlphaDither" );
+    fa = options->insertItem( "DiffuseAlphaDither" );
+    options->insertSeparator();
+    ad = options->insertItem( "PreferDither" );
+    dd = options->insertItem( "AvoidDither" );
+    options->insertSeparator();
+    ss = options->insertItem( "Smooth scaling" );
+    cc = options->insertItem( "Use color context" );
+    if ( TQApplication::colorSpec() == TQApplication::ManyColor )
+        options->setItemEnabled( cc, FALSE );
+    options->setCheckable( TRUE );
+    setMenuItemFlags();
+
+    menubar->insertSeparator();
+
+    TQPopupMenu* help = new TQPopupMenu( menubar );
+    menubar->insertItem( "&Help", help );
+    help->insertItem( "Help!", this, SLOT(giveHelp()), CTRL+Key_H );
+
+    connect( options, SIGNAL(activated(int)), this, SLOT(doOption(int)) );
+
+    status = new TQLabel(this);
+    status->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
+    status->setFixedHeight( fontMetrics().height() + 4 );
+
+    setMouseTracking( TRUE );
+}
+
+ImageViewer::~ImageViewer()
+{
+    if ( alloc_context )
+        TQColor::destroyAllocContext( alloc_context );
+    if ( other == this )
+        other = 0;
+}
+
+/*
+  This function modifies the conversion_flags when an options menu item
+  is selected, then ensures all menu items are up to date, and reconverts
+  the image if possibly necessary.
+*/
+void ImageViewer::doOption(int item)
+{
+    if ( item == ss || item == cc ) {
+        // Toggle
+        bool newbool = !options->isItemChecked(item);
+        options->setItemChecked(item, newbool);
+        // And reconvert...
+        reconvertImage();
+        repaint(image.hasAlphaBuffer());        // show image in widget
+        return;
+    }
+
+    if ( options->isItemChecked( item ) ) return; // They are all radio buttons
+
+    int ocf = conversion_flags;
+
+    if ( item == ac ) {
+        conversion_flags = ( conversion_flags & ~ColorMode_Mask ) | AutoColor;
+    } else if ( item == co ) {
+        conversion_flags = ( conversion_flags & ~ColorMode_Mask ) | ColorOnly;
+    } else if ( item == mo ) {
+        conversion_flags = ( conversion_flags & ~ColorMode_Mask ) | MonoOnly;
+    } else if ( item == fd ) {
+        conversion_flags = ( conversion_flags & ~Dither_Mask ) | DiffuseDither;
+    } else if ( item == bd ) {
+        conversion_flags = ( conversion_flags & ~Dither_Mask ) | OrderedDither;
+    } else if ( item == td ) {
+        conversion_flags = ( conversion_flags & ~Dither_Mask ) | ThresholdDither;
+    } else if ( item == ta ) {
+        conversion_flags = ( conversion_flags & ~AlphaDither_Mask ) | ThresholdAlphaDither;
+    } else if ( item == fa ) {
+        conversion_flags = ( conversion_flags & ~AlphaDither_Mask ) | DiffuseAlphaDither;
+    } else if ( item == ba ) {
+        conversion_flags = ( conversion_flags & ~AlphaDither_Mask ) | OrderedAlphaDither;
+    } else if ( item == ad ) {
+        conversion_flags = ( conversion_flags & ~DitherMode_Mask ) | PreferDither;
+    } else if ( item == dd ) {
+        conversion_flags = ( conversion_flags & ~DitherMode_Mask ) | AvoidDither;
+    }
+
+    if ( ocf != conversion_flags ) {
+        setMenuItemFlags();
+        // And reconvert...
+        reconvertImage();
+        repaint(image.hasAlphaBuffer());        // show image in widget
+    }
+}
+
+/*
+  Set the options menu to reflect the conversion_flags value.
+*/
+void ImageViewer::setMenuItemFlags()
+{
+    // File
+    bool valid_image = pm.size() != TQSize( 0, 0 );
+    file->setItemEnabled( si, valid_image );
+    file->setItemEnabled( sp, valid_image );
+
+    // Edit
+    edit->setItemEnabled( t1, image.depth() != 1 );
+    edit->setItemEnabled( t8, image.depth() != 8 );
+    edit->setItemEnabled( t32, image.depth() != 32 );
+
+    // Options
+    bool may_need_color_dithering =
+            !valid_image
+        || image.depth() == 32 && TQPixmap::defaultDepth() < 24;
+    bool may_need_dithering = may_need_color_dithering
+         || image.depth() > 1 && options->isItemChecked(mo)
+         || image.depth() > 1 && TQPixmap::defaultDepth() == 1;
+    bool has_alpha_mask = !valid_image || image.hasAlphaBuffer();
+
+    options->setItemEnabled( fd, may_need_dithering );
+    options->setItemEnabled( bd, may_need_dithering );
+    options->setItemEnabled( td, may_need_dithering );
+
+    options->setItemEnabled( ta, has_alpha_mask );
+    options->setItemEnabled( fa, has_alpha_mask );
+    options->setItemEnabled( ba, has_alpha_mask );
+
+    options->setItemEnabled( ad, may_need_color_dithering );
+    options->setItemEnabled( dd, may_need_color_dithering );
+
+    options->setItemChecked( ac, (conversion_flags & ColorMode_Mask) == AutoColor );
+    options->setItemChecked( co, (conversion_flags & ColorMode_Mask) == ColorOnly );
+    options->setItemChecked( mo, (conversion_flags & ColorMode_Mask) == MonoOnly );
+    options->setItemChecked( fd, (conversion_flags & Dither_Mask) == DiffuseDither );
+    options->setItemChecked( bd, (conversion_flags & Dither_Mask) == OrderedDither );
+    options->setItemChecked( td, (conversion_flags & Dither_Mask) == ThresholdDither );
+    options->setItemChecked( ta, (conversion_flags & AlphaDither_Mask) == ThresholdAlphaDither );
+    options->setItemChecked( fa, (conversion_flags & AlphaDither_Mask) == DiffuseAlphaDither );
+    options->setItemChecked( ba, (conversion_flags & AlphaDither_Mask) == OrderedAlphaDither );
+    options->setItemChecked( ad, (conversion_flags & DitherMode_Mask) == PreferDither );
+    options->setItemChecked( dd, (conversion_flags & DitherMode_Mask) == AvoidDither );
+}
+
+void ImageViewer::updateStatus()
+{
+    if ( pm.size() == TQSize( 0, 0 ) ) {
+        if ( !filename.isEmpty() )
+            status->setText("Could not load image");
+        else
+            status->setText("No image - select Open from File menu.");
+    } else {
+        TQString message, moremsg;
+        message.sprintf("%dx%d", image.width(), image.height());
+        if ( pm.size() != pmScaled.size() ) {
+            moremsg.sprintf(" [%dx%d]", pmScaled.width(),
+                pmScaled.height());
+            message += moremsg;
+        }
+        moremsg.sprintf(", %d bits ", image.depth());
+        message += moremsg;
+        if (image.valid(pickx,picky)) {
+            moremsg.sprintf("(%d,%d)=#%0*x ",
+                          pickx, picky,
+                          image.hasAlphaBuffer() ? 8 : 6,
+                          image.pixel(pickx,picky));
+            message += moremsg;
+        }
+        if ( image.numColors() > 0 ) {
+            if (image.valid(pickx,picky)) {
+                moremsg.sprintf(", %d/%d colors", image.pixelIndex(pickx,picky),
+                    image.numColors());
+            } else {
+                moremsg.sprintf(", %d colors", image.numColors());
+            }
+            message += moremsg;
+        }
+        if ( image.hasAlphaBuffer() ) {
+            if ( image.depth() == 8 ) {
+                int i;
+                bool alpha[256];
+                int nalpha=0;
+
+                for (i=0; i<256; i++)
+                    alpha[i] = FALSE;
+
+                for (i=0; i<image.numColors(); i++) {
+                    int alevel = image.color(i) >> 24;
+                    if (!alpha[alevel]) {
+                        alpha[alevel] = TRUE;
+                        nalpha++;
+                    }
+                }
+                moremsg.sprintf(", %d alpha levels", nalpha);
+            } else {
+                // Too many pixels to bother counting.
+                moremsg = ", 8-bit alpha channel";
+            }
+            message += moremsg;
+        }
+        status->setText(message);
+    }
+}
+
+/*
+  This function saves the image.
+*/
+void ImageViewer::saveImage( int item )
+{
+    const char* fmt = saveimage->text(item);
+    TQString savefilename = TQFileDialog::getSaveFileName(TQString::null, TQString::null,
+                                        this, filename);
+    if ( !savefilename.isEmpty() )
+        if ( !image.save( savefilename, fmt ) )
+            TQMessageBox::warning( this, "Save failed", "Error saving file" );
+}
+
+/*
+  This function saves the converted image.
+*/
+void ImageViewer::savePixmap( int item )
+{
+    const char* fmt = savepixmap->text(item);
+    TQString savefilename = TQFileDialog::getSaveFileName(TQString::null,
+                                        TQString::null, this, filename);
+    if ( !savefilename.isEmpty() )
+        if ( !pmScaled.save( savefilename, fmt ) )
+            TQMessageBox::warning( this, "Save failed", "Error saving file" );
+}
+
+
+void ImageViewer::newWindow()
+{
+    ImageViewer* that = new ImageViewer(0, "new window", WDestructiveClose);
+    that->options->setItemChecked( that->cc, useColorContext() );
+    that->show();
+}
+
+/*
+  This function is the slot for processing the Open menu item.
+*/
+void ImageViewer::openFile()
+{
+    TQString newfilename = TQFileDialog::getOpenFileName( TQString::null,
+                                                        TQString::null,
+                                                        this );
+    if ( !newfilename.isEmpty() ) {
+        loadImage( newfilename ) ;
+        repaint();                      // show image in widget
+    }
+}
+
+/*
+  This function loads an image from a file and resizes the widget to
+  exactly fit the image size. If the file was not found or the image
+  format was unknown it will resize the widget to fit the errorText
+  message (see above) displayed in the current font.
+
+  Returns TRUE if the image was successfully loaded.
+*/
+
+bool ImageViewer::loadImage( const TQString& fileName )
+{
+    filename = fileName;
+    bool ok = FALSE;
+    if ( !filename.isEmpty() ) {
+        TQApplication::setOverrideCursor( waitCursor ); // this might take time
+        ok = image.load(filename, 0);
+        pickx = -1;
+        clickx = -1;
+        if ( ok )
+            ok = reconvertImage();
+        if ( ok ) {
+            setCaption( filename );                     // set window caption
+            int w = pm.width();
+            int h = pm.height();
+
+            const int reasonable_width = 128;
+            if ( w < reasonable_width ) {
+                // Integer scale up to something reasonable
+                int multiply = ( reasonable_width + w - 1 ) / w;
+                w *= multiply;
+                h *= multiply;
+            }
+
+            h += menubar->heightForWidth(w) + status->height();
+            resize( w, h );                             // we resize to fit image
+        } else {
+            pm.resize(0,0);                             // couldn't load image
+            update();
+        }
+        TQApplication::restoreOverrideCursor();  // restore original cursor
+    }
+    updateStatus();
+    setMenuItemFlags();
+    return ok;
+}
+
+bool ImageViewer::reconvertImage()
+{
+    bool success = FALSE;
+
+    if ( image.isNull() ) return FALSE;
+
+    if ( alloc_context ) {
+        TQColor::destroyAllocContext( alloc_context );
+        alloc_context = 0;
+    }
+    if ( useColorContext() ) {
+        alloc_context = TQColor::enterAllocContext();
+        // Clear the image to hide flickering palette
+        TQPainter painter(this);
+        painter.eraseRect(0, menubar->heightForWidth( width() ), width(), height());
+    }
+
+    TQApplication::setOverrideCursor( waitCursor ); // this might take time
+    if ( pm.convertFromImage(image, conversion_flags) )
+    {
+        pmScaled = TQPixmap();
+        scale();
+        resize( width(), height() );
+        success = TRUE;                         // load successful
+    } else {
+        pm.resize(0,0);                         // couldn't load image
+    }
+    updateStatus();
+    setMenuItemFlags();
+    TQApplication::restoreOverrideCursor();      // restore original cursor
+
+    if ( useColorContext() )
+        TQColor::leaveAllocContext();
+
+    return success;                             // TRUE if loaded OK
+}
+
+bool ImageViewer::smooth() const
+{
+    return options->isItemChecked(ss);
+}
+
+bool ImageViewer::useColorContext() const
+{
+    return options->isItemChecked(cc);
+}
+
+/*
+  This functions scales the pixmap in the member variable "pm" to fit the
+  widget size and  puts the resulting pixmap in the member variable "pmScaled".
+*/
+
+void ImageViewer::scale()
+{
+    int h = height() - menubar->heightForWidth( width() ) - status->height();
+
+    if ( image.isNull() ) return;
+
+    TQApplication::setOverrideCursor( waitCursor ); // this might take time
+    if ( width() == pm.width() && h == pm.height() )
+    {                                           // no need to scale if widget
+        pmScaled = pm;                          // size equals pixmap size
+    } else {
+        if (smooth()) {
+            pmScaled.convertFromImage(image.smoothScale(width(), h),
+                conversion_flags);
+        } else {
+            TQWMatrix m;                         // transformation matrix
+            m.scale(((double)width())/pm.width(),// define scale factors
+                    ((double)h)/pm.height());
+            pmScaled = pm.xForm( m );           // create scaled pixmap
+        }
+    }
+    TQApplication::restoreOverrideCursor();      // restore original cursor
+}
+
+/*
+  The resize event handler, if a valid pixmap was loaded it will call
+  scale() to fit the pixmap to the new widget size.
+*/
+
+void ImageViewer::resizeEvent( TQResizeEvent * )
+{
+    status->setGeometry(0, height() - status->height(),
+                        width(), status->height());
+
+    if ( pm.size() == TQSize( 0, 0 ) )           // we couldn't load the image
+        return;
+
+    int h = height() - menubar->heightForWidth( width() ) - status->height();
+    if ( width() != pmScaled.width() || h != pmScaled.height())
+    {                                           // if new size,
+        scale();                                // scale pmScaled to window
+        updateStatus();
+    }
+    if ( image.hasAlphaBuffer() )
+        erase();
+}
+
+bool ImageViewer::convertEvent( TQMouseEvent* e, int& x, int& y)
+{
+    if ( pm.size() != TQSize( 0, 0 ) ) {
+        int h = height() - menubar->heightForWidth( width() ) - status->height();
+        int nx = e->x() * image.width() / width();
+        int ny = (e->y()-menubar->heightForWidth( width() )) * image.height() / h;
+        if (nx != x || ny != y ) {
+            x = nx;
+            y = ny;
+            updateStatus();
+            return TRUE;
+        }
+    }
+    return FALSE;
+}
+
+void ImageViewer::mousePressEvent( TQMouseEvent *e )
+{
+    may_be_other = convertEvent(e, clickx, clicky);
+}
+
+void ImageViewer::mouseReleaseEvent( TQMouseEvent * )
+{
+    if ( may_be_other )
+        other = this;
+}
+
+/*
+  Record the pixel position of interest.
+*/
+void ImageViewer::mouseMoveEvent( TQMouseEvent *e )
+{
+    if (convertEvent(e,pickx,picky)) {
+        updateStatus();
+        if ((e->state()&LeftButton)) {
+            may_be_other = FALSE;
+            if ( clickx >= 0 && other) {
+                copyFrom(other);
+            }
+        }
+    }
+}
+
+/*
+  Draws the portion of the scaled pixmap that needs to be updated or prints
+  an error message if no legal pixmap has been loaded.
+*/
+
+void ImageViewer::paintEvent( TQPaintEvent *e )
+{
+    if ( pm.size() != TQSize( 0, 0 ) ) {         // is an image loaded?
+        TQPainter painter(this);
+        painter.setClipRect(e->rect());
+        painter.drawPixmap(0, menubar->heightForWidth( width() ), pmScaled);
+    }
+}
+
+
+/*
+  Explain anything that might be confusing.
+*/
+void ImageViewer::giveHelp()
+{
+    if (!helpmsg) {
+        TQString helptext =
+            "<b>Usage:</b> <tt>showimg [-m] <i>filename ...</i></tt>"
+            "<blockquote>"
+                "<tt>-m</tt> - use <i>ManyColor</i> color spec"
+            "</blockquote>"
+            "<p>Supported input formats:"
+            "<blockquote>";
+        helptext += TQImage::inputFormatList().join(", ");
+        helptext += "</blockquote>";
+
+        helpmsg = new TQMessageBox( "Help", helptext,
+            TQMessageBox::Information, TQMessageBox::Ok, 0, 0, 0, 0, FALSE );
+    }
+    helpmsg->show();
+    helpmsg->raise();
+}
+
+void ImageViewer::copyFrom(ImageViewer* s)
+{
+    if ( clickx >= 0 ) {
+        int dx = clickx;
+        int dy = clicky;
+        int sx = s->clickx;
+        int sy = s->clicky;
+        int sw = TQABS(clickx - pickx)+1;
+        int sh = TQABS(clicky - picky)+1;
+        if ( clickx > pickx ) {
+            dx = pickx;
+            sx -= sw-1;
+        }
+        if ( clicky > picky ) {
+            dy = picky;
+            sy -= sh-1;
+        }
+        bitBlt( &image, dx, dy, &s->image, sx, sy, sw, sh );
+        reconvertImage();
+        repaint( image.hasAlphaBuffer() );
+    }
+}
+ImageViewer* ImageViewer::other = 0;
+
+void ImageViewer::hFlip()
+{
+    setImage(image.mirror(TRUE,FALSE));
+}
+
+void ImageViewer::vFlip()
+{
+    setImage(image.mirror(FALSE,TRUE));
+}
+
+void ImageViewer::rot180()
+{
+    setImage(image.mirror(TRUE,TRUE));
+}
+
+void ImageViewer::copy()
+{
+#ifndef QT_NO_MIMECLIPBOARD
+    TQApplication::clipboard()->setImage(image); // Less information loss
+#endif
+}
+
+void ImageViewer::paste()
+{
+#ifndef QT_NO_MIMECLIPBOARD
+    TQImage p = TQApplication::clipboard()->image();
+    if ( !p.isNull() ) {
+        filename = "pasted";
+        setImage(p);
+    }
+#endif
+}
+
+void ImageViewer::setImage(const TQImage& newimage)
+{
+    image = newimage;
+
+    pickx = -1;
+    clickx = -1;
+    setCaption( filename );                     // set window caption
+    int w = image.width();
+    int h = image.height();
+    if ( !w )
+        return;
+
+    const int reasonable_width = 128;
+    if ( w < reasonable_width ) {
+        // Integer scale up to something reasonable
+        int multiply = ( reasonable_width + w - 1 ) / w;
+        w *= multiply;
+        h *= multiply;
+    }
+
+    h += menubar->heightForWidth(w) + status->height();
+    resize( w, h );                             // we resize to fit image
+
+    reconvertImage();
+    repaint( image.hasAlphaBuffer() );
+
+    updateStatus();
+    setMenuItemFlags();
+}
+
+void ImageViewer::editText()
+{
+    ImageTextEditor editor(image,this);
+    editor.exec();
+}
+
+void ImageViewer::to1Bit()
+{
+    toBitDepth(1);
+}
+
+void ImageViewer::to8Bit()
+{
+    toBitDepth(8);
+}
+
+void ImageViewer::to32Bit()
+{
+    toBitDepth(32);
+}
+
+void ImageViewer::toBitDepth(int d)
+{
+    image = image.convertDepth(d);
+    reconvertImage();
+    repaint( image.hasAlphaBuffer() );
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "showimg.h"
+#include "imagefip.h"
+#include <qapplication.h>
+#include <qimage.h>
+
+int main( int argc, char **argv )
+{
+    if ( argc > 1 && TQString(argv[1]) == "-m" ) {
+        TQApplication::setColorSpec( TQApplication::ManyColor );
+        argc--;
+        argv++;
+    }
+    else if ( argc > 1 && TQString(argv[1]) == "-n" ) {
+        TQApplication::setColorSpec( TQApplication::NormalColor );
+        argc--;
+        argv++;
+    }
+    else {
+        TQApplication::setColorSpec( TQApplication::CustomColor );
+    }
+
+    TQApplication a( argc, argv );
+
+    ImageIconProvider iip;
+    TQFileDialog::setIconProvider( &iip );
+
+    if ( argc <= 1 ) {
+        // Create a window which looks after its own existence.
+        ImageViewer *w =
+            new ImageViewer(0, "new window", TQt::WDestructiveClose | TQt::WResizeNoErase );
+        w->setCaption("TQt Example - Image Viewer");
+        w->show();
+    } else {
+        for ( int i=1; i<argc; i++ ) {
+            // Create a window which looks after its own existence.
+            ImageViewer *w =
+                new ImageViewer(0, argv[i], TQt::WDestructiveClose | TQt::WResizeNoErase );
+            w->setCaption("TQt Example - Image Viewer");
+            w->loadImage( argv[i] );
+            w->show();
+        }
+    }
+
+    TQObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(tquit()));
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sidebar.png b/doc/html/sidebar.png new file mode 100644 index 00000000..7e005cd0 Binary files /dev/null and b/doc/html/sidebar.png differ diff --git a/doc/html/signalsandslots.html b/doc/html/signalsandslots.html new file mode 100644 index 00000000..02a0d156 --- /dev/null +++ b/doc/html/signalsandslots.html @@ -0,0 +1,356 @@ + + + + + +Signals and Slots + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Signals and Slots

+ + +

Signals and slots are used for communication between objects. The +signal/slot mechanism is a central feature of TQt and probably the +part that differs most from other toolkits. +

In GUI programming we often want a change in one widget to be notified +to another widget. More generally, we want objects of any kind to be +able to communicate with one another. For example if we were parsing +an XML file we might want to notify a list view that we're using to +represent the XML file's structure whenever we encounter a new tag. +

Older toolkits achieve this kind of communication using callbacks. A +callback is a pointer to a function, so if you want a processing +function to notify you about some event you pass a pointer to another +function (the callback) to the processing function. The processing +function then calls the callback when appropriate. Callbacks have two +fundamental flaws. Firstly they are not type safe. We can never be +certain that the processing function will call the callback with the +correct arguments. Secondly the callback is strongly coupled to the +processing function since the processing function must know which +callback to call. +

An abstract view of some signals and slots connections +

+

In TQt we have an alternative to the callback technique. We use signals +and slots. A signal is emitted when a particular event occurs. TQt's +widgets have many pre-defined signals, but we can always subclass to +add our own. A slot is a function that is called in reponse to a +particular signal. TQt's widgets have many pre-defined slots, but it is +common practice to add your own slots so that you can handle the +signals that you are interested in. +

The signals and slots mechanism is type safe: the signature of a +signal must match the signature of the receiving slot. (In fact a slot +may have a shorter signature than the signal it receives because it +can ignore extra arguments.) Since the signatures are compatible, the +compiler can help us detect type mismatches. Signals and slots are +loosely coupled: a class which emits a signal neither knows nor cares +which slots receive the signal. TQt's signals and slots mechanism +ensures that if you connect a signal to a slot, the slot will be +called with the signal's parameters at the right time. Signals and +slots can take any number of arguments of any type. They are +completely typesafe: no more callback core dumps! +

All classes that inherit from TQObject or one of its subclasses +(e.g. TQWidget) can contain signals and slots. Signals are emitted by +objects when they change their state in a way that may be interesting +to the outside world. This is all the object does to communicate. It +does not know or care whether anything is receiving the signals it +emits. This is true information encapsulation, and ensures that the +object can be used as a software component. +

An example of signals and slots connections +

+

Slots can be used for receiving signals, but they are also normal +member functions. Just as an object does not know if anything receives +its signals, a slot does not know if it has any signals connected to +it. This ensures that truly independent components can be created with +TQt. +

You can connect as many signals as you want to a single slot, and a +signal can be connected to as many slots as you desire. It is even +possible to connect a signal directly to another signal. (This will +emit the second signal immediately whenever the first is emitted.) +

Together, signals and slots make up a powerful component programming +mechanism. +

A Small Example +

+

A minimal C++ class declaration might read: +

+    class Foo
+    {
+    public:
+        Foo();
+        int value() const { return val; }
+        void setValue( int );
+    private:
+        int val;
+    };
+
+ +

A small TQt class might read: +

+    class Foo : public TQObject
+    {
+        Q_OBJECT
+    public:
+        Foo();
+        int value() const { return val; }
+    public slots:
+        void setValue( int );
+    signals:
+        void valueChanged( int );
+    private:
+        int val;
+    };
+
+ +

This class has the same internal state, and public methods to access the +state, but in addition it has support for component programming using +signals and slots: this class can tell the outside world that its state +has changed by emitting a signal, valueChanged(), and it has +a slot which other objects can send signals to. +

All classes that contain signals or slots must mention Q_OBJECT in +their declaration. +

Slots are implemented by the application programmer. +Here is a possible implementation of Foo::setValue(): +

+    void Foo::setValue( int v )
+    {
+        if ( v != val ) {
+            val = v;
+            emit valueChanged(v);
+        }
+    }
+
+ +

The line emit valueChanged(v) emits the signal +valueChanged from the object. As you can see, you emit a +signal by using emit signal(arguments). +

Here is one way to connect two of these objects together: +

+    Foo a, b;
+    connect(&a, SIGNAL(valueChanged(int)), &b, SLOT(setValue(int)));
+    b.setValue( 11 ); // a == undefined  b == 11
+    a.setValue( 79 ); // a == 79         b == 79
+    b.value();        // returns 79        
+
+ +

Calling a.setValue(79) will make a emit a valueChanged() +signal, which b will receive in its setValue() slot, +i.e. b.setValue(79) is called. b will then, in turn, +emit the same valueChanged() signal, but since no slot has been +connected to b's valueChanged() signal, nothing happens (the +signal is ignored). +

Note that the setValue() function sets the value and emits +the signal only if v != val. This prevents infinite looping +in the case of cyclic connections (e.g. if b.valueChanged() +were connected to a.setValue()). +

A signal is emitted for every connection you make, so if you +duplicate a connection, two signals will be emitted. You can always +break a connection using TQObject::disconnect(). +

This example illustrates that objects can work together without knowing +about each other, as long as there is someone around to set up a +connection between them initially. +

The preprocessor changes or removes the signals, slots and +emit keywords so that the compiler is presented with standard C++. +

Run the moc on class definitions that contain +signals or slots. This produces a C++ source file which should be compiled +and linked with the other object files for the application. If you use +qmake, the makefile rules to +automatically invoke the moc will be added to +your makefile for you. +

Signals +

+

Signals are emitted by an object when its internal state has changed +in some way that might be interesting to the object's client or owner. +Only the class that defines a signal and its subclasses can emit the +signal. +

A list box, for example, emits both clicked() and +currentChanged() signals. Most objects will probably only be +interested in currentChanged() which gives the current list item +whether the user clicked it or used the arrow keys to move to it. But +some objects may only want to know which item was clicked. If the +signal is interesting to two different objects you just connect the +signal to slots in both objects. +

When a signal is emitted, the slots connected to it are executed +immediately, just like a normal function call. The signal/slot +mechanism is totally independent of any GUI event loop. The +emit will return when all slots have returned. +

If several slots are connected to one signal, the slots will be +executed one after the other, in an arbitrary order, when the signal +is emitted. +

Signals are automatically generated by the moc +and must not be implemented in the .cpp file. They can never have +return types (i.e. use void). +

A note about arguments. Our experience shows that signals and slots +are more reusable if they do not use special types. If TQScrollBar::valueChanged() were to use a special type such as the +hypothetical TQRangeControl::Range, it could only be connected to +slots designed specifically for TQRangeControl. Something as simple as +the program in Tutorial #1 part 5 +would be impossible. +

Slots +

+

A slot is called when a signal connected to it is emitted. Slots are +normal C++ functions and can be called normally; their only special +feature is that signals can be connected to them. A slot's arguments +cannot have default values, and, like signals, it is rarely wise to +use your own custom types for slot arguments. +

Since slots are normal member functions with just a little extra +spice, they have access rights like ordinary member functions. A +slot's access right determines who can connect to it: +

A public slots section contains slots that anyone can connect +signals to. This is very useful for component programming: you create +objects that know nothing about each other, connect their signals and +slots so that information is passed correctly, and, like a model +railway, turn it on and leave it running. +

A protected slots section contains slots that this class and its +subclasses may connect signals to. This is intended for slots that are +part of the class's implementation rather than its interface to the +rest of the world. +

A private slots section contains slots that only the class itself +may connect signals to. This is intended for very tightly connected +classes, where even subclasses aren't trusted to get the connections +right. +

You can also define slots to be virtual, which we have found tquite +useful in practice. +

The signals and slots mechanism is efficient, but not tquite as fast as +"real" callbacks. Signals and slots are slightly slower because of the +increased flexibility they provide, although the difference for real +applications is insignificant. In general, emitting a signal that is +connected to some slots, is approximately ten times slower than +calling the receivers directly, with non-virtual function calls. This +is the overhead retquired to locate the connection object, to safely +iterate over all connections (i.e. checking that subsequent receivers +have not been destroyed during the emission) and to marshall any +parameters in a generic fashion. While ten non-virtual function calls +may sound like a lot, it's much less overhead than any 'new' or +'delete' operation, for example. As soon as you perform a string, +vector or list operation that behind the scene retquires 'new' or +'delete', the signals and slots overhead is only responsible for a +very small proportion of the complete function call costs. The same is +true whenever you do a system call in a slot; or indirectly call more +than ten functions. On an i586-500, you can emit around 2,000,000 +signals per second connected to one receiver, or around 1,200,000 per +second connected to two receivers. The simplicity and flexibility of +the signals and slots mechanism is well worth the overhead, which your +users won't even notice. +

Meta Object Information +

+

The meta object compiler (moc) parses the class +declaration in a C++ file and generates C++ code that initializes the +meta object. The meta object contains the names of all the signal and +slot members, as well as pointers to these functions. (For more +information on TQt's Meta Object System, see Why +doesn't TQt use templates for signals and slots?.) +

The meta object contains additional information such as the object's class name. You can also check if an object +inherits a specific class, for example: +

+  if ( widget->inherits("TQButton") ) {
+        // yes, it is a push button, radio button etc.
+  }
+
+ +

A Real Example +

+

Here is a simple commented example (code fragments from qlcdnumber.h ). +

+    #include "qframe.h"
+    #include "qbitarray.h"
+
+    class TQLCDNumber : public TQFrame
+
+ +

TQLCDNumber inherits TQObject, which has most of the signal/slot +knowledge, via TQFrame and TQWidget, and #include's the relevant +declarations. +

+    {
+        Q_OBJECT
+
+ +

Q_OBJECT is expanded by the preprocessor to declare several member +functions that are implemented by the moc; if you get compiler errors +along the lines of "virtual function TQButton::className not defined" +you have probably forgotten to run the moc or to +include the moc output in the link command. +

+    public:
+        TQLCDNumber( TQWidget *parent=0, const char *name=0 );
+        TQLCDNumber( uint numDigits, TQWidget *parent=0, const char *name=0 );
+
+ +

It's not obviously relevant to the moc, but if you inherit TQWidget you +almost certainly want to have the parent and name +arguments in your constructors, and pass them to the parent +constructor. +

Some destructors and member functions are omitted here; the moc +ignores member functions. +

+    signals:
+        void    overflow();
+
+ +

TQLCDNumber emits a signal when it is asked to show an impossible +value. +

If you don't care about overflow, or you know that overflow cannot +occur, you can ignore the overflow() signal, i.e. don't connect it to +any slot. +

If, on the other hand, you want to call two different error functions +when the number overflows, simply connect the signal to two different +slots. TQt will call both (in arbitrary order). +

+    public slots:
+        void    display( int num );
+        void    display( double num );
+        void    display( const char *str );
+        void    setHexMode();
+        void    setDecMode();
+        void    setOctMode();
+        void    setBinMode();
+        void    smallDecimalPoint( bool );
+
+ +

A slot is a receiving function, used to get information about state +changes in other widgets. TQLCDNumber uses it, as the code above +indicates, to set the displayed number. Since display() is part +of the class's interface with the rest of the program, the slot is +public. +

Several of the example programs connect the newValue() signal of a +TQScrollBar to the display() slot, so the LCD number continuously shows +the value of the scroll bar. +

Note that display() is overloaded; TQt will select the appropriate version +when you connect a signal to the slot. With callbacks, you'd have to find +five different names and keep track of the types yourself. +

Some irrelevant member functions have been omitted from this +example. +

+    };
+
+ +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/simple-application-example.html b/doc/html/simple-application-example.html new file mode 100644 index 00000000..0eb57587 --- /dev/null +++ b/doc/html/simple-application-example.html @@ -0,0 +1,425 @@ + + + + + +A Complete Application Window + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A Complete Application Window

+ + +

+

This example program looks like a complete modern application. It +has a menu bar, it has a tool bar, it has a status bar and works +like a simple text editor. +

There is a walkthrough of +this example. +


+

Header file: +

/****************************************************************************
+** $Id: qt/application.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef APPLICATION_H
+#define APPLICATION_H
+
+#include <qmainwindow.h>
+
+class TQTextEdit;
+
+class ApplicationWindow: public TQMainWindow
+{
+    Q_OBJECT
+
+public:
+    ApplicationWindow();
+    ~ApplicationWindow();
+
+protected:
+    void closeEvent( TQCloseEvent* );
+
+private slots:
+    void newDoc();
+    void choose();
+    void load( const TQString &fileName );
+    void save();
+    void saveAs();
+    void print();
+
+    void about();
+    void aboutTQt();
+
+private:
+    TQPrinter *printer;
+    TQTextEdit *e;
+    TQString filename;
+};
+
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/application.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "application.h"
+
+#include <qimage.h>
+#include <qpixmap.h>
+#include <qtoolbar.h>
+#include <qtoolbutton.h>
+#include <qpopupmenu.h>
+#include <qmenubar.h>
+#include <qtextedit.h>
+#include <qfile.h>
+#include <qfiledialog.h>
+#include <qstatusbar.h>
+#include <qmessagebox.h>
+#include <qprinter.h>
+#include <qapplication.h>
+#include <qaccel.h>
+#include <qtextstream.h>
+#include <qpainter.h>
+#include <qpaintdevicemetrics.h>
+#include <qwhatsthis.h>
+#include <qsimplerichtext.h>
+
+#include "filesave.xpm"
+#include "fileopen.xpm"
+#include "fileprint.xpm"
+
+ApplicationWindow::ApplicationWindow()
+    : TQMainWindow( 0, "example application main window", WDestructiveClose | WGroupLeader )
+{
+    printer = new TQPrinter( TQPrinter::HighResolution );
+    TQPixmap openIcon, saveIcon, printIcon;
+
+    TQToolBar * fileTools = new TQToolBar( this, "file operations" );
+    fileTools->setLabel( "File Operations" );
+
+    openIcon = TQPixmap( fileopen );
+    TQToolButton * fileOpen
+        = new TQToolButton( openIcon, "Open File", TQString::null,
+                           this, SLOT(choose()), fileTools, "open file" );
+
+    saveIcon = TQPixmap( filesave );
+    TQToolButton * fileSave
+        = new TQToolButton( saveIcon, "Save File", TQString::null,
+                           this, SLOT(save()), fileTools, "save file" );
+
+    printIcon = TQPixmap( fileprint );
+    TQToolButton * filePrint
+        = new TQToolButton( printIcon, "Print File", TQString::null,
+                           this, SLOT(print()), fileTools, "print file" );
+
+
+    (void)TQWhatsThis::whatsThisButton( fileTools );
+
+    const char * fileOpenText = "<p><img source=\"fileopen\"> "
+                 "Click this button to open a <em>new file</em>.<br>"
+                 "You can also select the <b>Open</b> command "
+                 "from the <b>File</b> menu.</p>";
+
+    TQWhatsThis::add( fileOpen, fileOpenText );
+
+    TQMimeSourceFactory::defaultFactory()->setPixmap( "fileopen", openIcon );
+
+    const char * fileSaveText = "<p>Click this button to save the file you "
+                 "are editing. You will be prompted for a file name.\n"
+                 "You can also select the <b>Save</b> command "
+                 "from the <b>File</b> menu.</p>";
+
+    TQWhatsThis::add( fileSave, fileSaveText );
+
+    const char * filePrintText = "Click this button to print the file you "
+                 "are editing.\n"
+                 "You can also select the Print command "
+                 "from the File menu.";
+
+    TQWhatsThis::add( filePrint, filePrintText );
+
+
+    TQPopupMenu * file = new TQPopupMenu( this );
+    menuBar()->insertItem( "&File", file );
+
+
+    file->insertItem( "&New", this, SLOT(newDoc()), CTRL+Key_N );
+
+    int id;
+    id = file->insertItem( openIcon, "&Open...",
+                           this, SLOT(choose()), CTRL+Key_O );
+    file->setWhatsThis( id, fileOpenText );
+
+    id = file->insertItem( saveIcon, "&Save",
+                           this, SLOT(save()), CTRL+Key_S );
+    file->setWhatsThis( id, fileSaveText );
+
+    id = file->insertItem( "Save &As...", this, SLOT(saveAs()) );
+    file->setWhatsThis( id, fileSaveText );
+
+    file->insertSeparator();
+
+    id = file->insertItem( printIcon, "&Print...",
+                           this, SLOT(print()), CTRL+Key_P );
+    file->setWhatsThis( id, filePrintText );
+
+    file->insertSeparator();
+
+    file->insertItem( "&Close", this, SLOT(close()), CTRL+Key_W );
+
+    file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
+
+    menuBar()->insertSeparator();
+
+    TQPopupMenu * help = new TQPopupMenu( this );
+    menuBar()->insertItem( "&Help", help );
+
+    help->insertItem( "&About", this, SLOT(about()), Key_F1 );
+    help->insertItem( "About &TQt", this, SLOT(aboutTQt()) );
+    help->insertSeparator();
+    help->insertItem( "What's &This", this, SLOT(whatsThis()), SHIFT+Key_F1 );
+
+    e = new TQTextEdit( this, "editor" );
+    e->setFocus();
+    setCentralWidget( e );
+    statusBar()->message( "Ready", 2000 );
+
+    resize( 450, 600 );
+}
+
+
+ApplicationWindow::~ApplicationWindow()
+{
+    delete printer;
+}
+
+
+
+void ApplicationWindow::newDoc()
+{
+    ApplicationWindow *ed = new ApplicationWindow;
+    ed->setCaption("TQt Example - Application");
+    ed->show();
+}
+
+void ApplicationWindow::choose()
+{
+    TQString fn = TQFileDialog::getOpenFileName( TQString::null, TQString::null,
+                                               this);
+    if ( !fn.isEmpty() )
+        load( fn );
+    else
+        statusBar()->message( "Loading aborted", 2000 );
+}
+
+
+void ApplicationWindow::load( const TQString &fileName )
+{
+    TQFile f( fileName );
+    if ( !f.open( IO_ReadOnly ) )
+        return;
+
+    TQTextStream ts( &f );
+    e->setText( ts.read() );
+    e->setModified( FALSE );
+    setCaption( fileName );
+    statusBar()->message( "Loaded document " + fileName, 2000 );
+}
+
+
+void ApplicationWindow::save()
+{
+    if ( filename.isEmpty() ) {
+        saveAs();
+        return;
+    }
+
+    TQString text = e->text();
+    TQFile f( filename );
+    if ( !f.open( IO_WriteOnly ) ) {
+        statusBar()->message( TQString("Could not write to %1").arg(filename),
+                              2000 );
+        return;
+    }
+
+    TQTextStream t( &f );
+    t << text;
+    f.close();
+
+    e->setModified( FALSE );
+
+    setCaption( filename );
+
+    statusBar()->message( TQString( "File %1 saved" ).arg( filename ), 2000 );
+}
+
+
+void ApplicationWindow::saveAs()
+{
+    TQString fn = TQFileDialog::getSaveFileName( TQString::null, TQString::null,
+                                               this );
+    if ( !fn.isEmpty() ) {
+        filename = fn;
+        save();
+    } else {
+        statusBar()->message( "Saving aborted", 2000 );
+    }
+}
+
+
+void ApplicationWindow::print()
+{
+    printer->setFullPage( TRUE );
+    if ( printer->setup(this) ) {               // printer dialog
+        statusBar()->message( "Printing..." );
+        TQPainter p;
+        if( !p.begin( printer ) ) {               // paint on printer
+            statusBar()->message( "Printing aborted", 2000 );
+            return;
+        }
+
+        TQPaintDeviceMetrics metrics( p.device() );
+        int dpiy = metrics.logicalDpiY();
+        int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins
+        TQRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin );
+        TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()),
+                                  TQFont(),
+                                  e->context(),
+                                  e->styleSheet(),
+                                  e->mimeSourceFactory(),
+                                  view.height() );
+        richText.setWidth( &p, view.width() );
+        int page = 1;
+        do {
+            richText.draw( &p, margin, margin, view, colorGroup() );
+            view.moveBy( 0, view.height() );
+            p.translate( 0 , -view.height() );
+            p.drawText( view.right() - p.fontMetrics().width( TQString::number( page ) ),
+                        view.bottom() + p.fontMetrics().ascent() + 5, TQString::number( page ) );
+            if ( view.top() - margin >= richText.height() )
+                break;
+            printer->newPage();
+            page++;
+        } while (TRUE);
+
+        statusBar()->message( "Printing completed", 2000 );
+    } else {
+        statusBar()->message( "Printing aborted", 2000 );
+    }
+}
+
+void ApplicationWindow::closeEvent( TQCloseEvent* ce )
+{
+    if ( !e->isModified() ) {
+        ce->accept();
+        return;
+    }
+
+    switch( TQMessageBox::information( this, "TQt Application Example",
+                                      "Do you want to save the changes"
+                                      " to the document?",
+                                      "Yes", "No", "Cancel",
+                                      0, 1 ) ) {
+    case 0:
+        save();
+        ce->accept();
+        break;
+    case 1:
+        ce->accept();
+        break;
+    case 2:
+    default: // just for sanity
+        ce->ignore();
+        break;
+    }
+}
+
+
+void ApplicationWindow::about()
+{
+    TQMessageBox::about( this, "TQt Application Example",
+                        "This example demonstrates simple use of "
+                        "TQMainWindow,\nTQMenuBar and TQToolBar.");
+}
+
+
+void ApplicationWindow::aboutTQt()
+{
+    TQMessageBox::aboutTQt( this, "TQt Application Example" );
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include "application.h"
+
+int main( int argc, char ** argv ) {
+    TQApplication a( argc, argv );
+    ApplicationWindow *mw = new ApplicationWindow();
+    mw->setCaption( "TQt Example - Application" );
+    mw->show();
+    a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(tquit()) );
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/simple-application.html b/doc/html/simple-application.html new file mode 100644 index 00000000..239908cd --- /dev/null +++ b/doc/html/simple-application.html @@ -0,0 +1,575 @@ + + + + + +Walkthrough: A Simple Application + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Walkthrough: A Simple Application

+ + + +

+

This walkthrough shows simple use of TQMainWindow, TQMenuBar, TQPopupMenu, TQToolBar and TQStatusBar - classes that every +modern application window tends to use. (See also Tutorial #2.) +

It also illustrates some aspects of TQWhatsThis (for simple help) and a +typical main() using TQApplication. +

Finally, it shows a typical print function based on TQPrinter. +

The declaration of ApplicationWindow +

+

Here's the header file in full: +

/****************************************************************************
+** $Id: qt/application.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef APPLICATION_H
+#define APPLICATION_H
+
+#include <qmainwindow.h>
+
+class TQTextEdit;
+
+class ApplicationWindow: public TQMainWindow
+{
+    Q_OBJECT
+
+public:
+    ApplicationWindow();
+    ~ApplicationWindow();
+
+protected:
+    void closeEvent( TQCloseEvent* );
+
+private slots:
+    void newDoc();
+    void choose();
+    void load( const TQString &fileName );
+    void save();
+    void saveAs();
+    void print();
+
+    void about();
+    void aboutTQt();
+
+private:
+    TQPrinter *printer;
+    TQTextEdit *e;
+    TQString filename;
+};
+
+
+#endif
+
+ +

It declares a class that inherits TQMainWindow, with slots and private +variables. The class pre-declaration of TQTextEdit at the beginning +(instead of an include) helps to speed up compilation. With this +trick, make depend won't insist on recompiling every .cpp file that +includes application.h when qtextedit.h changes. +

+

A simple main() +

+

Here is main.cpp in full: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include "application.h"
+
+int main( int argc, char ** argv ) {
+    TQApplication a( argc, argv );
+    ApplicationWindow *mw = new ApplicationWindow();
+    mw->setCaption( "TQt Example - Application" );
+    mw->show();
+    a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(tquit()) );
+    return a.exec();
+}
+
+ +

Now we'll look at main.cpp in detail. +

+ +

    int main( int argc, char ** argv ) {
+        TQApplication a( argc, argv );
+
+

With the above line, we create a TQApplication object with the usual +constructor and let it +parse argc and argv. TQApplication itself takes care of X11-specific +command-line options like -geometry, so the program will automatically +behave the way X clients are expected to. +

        ApplicationWindow *mw = new ApplicationWindow();
+        mw->setCaption( "TQt Example - Application" );
+        mw->show();
+
+

We create an ApplicationWindow as a top-level widget, set its window +system caption to "Document 1", and show() it. +

+

        a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(tquit()) );
+
+

When the application's last window is closed, it should tquit. Both +the signal and the slot are predefined members of TQApplication. +

        return a.exec();
+
+

Having completed the application's initialization, we start the main +event loop (the GUI), and eventually return the error code +that TQApplication returns when it leaves the event loop. +

    }
+
+

+

The Implementation of ApplicationWindow +

+

+ +

Since the implementation is tquite large (almost 300 lines) we +won't list the whole thing. (The source code is included in the +examples/application directory.) Before we start with the constructor +there are three #includes worth mentioning: +

    #include "filesave.xpm"
+    #include "fileopen.xpm"
+    #include "fileprint.xpm"
+
+

The tool buttons in our application wouldn't look good without icons! +These icons can be found in the XPM files included above. If you ever +moved a program to a different location and wondered why icons were +missing afterwards you will probably agree that it is a good idea to +compile them into the binary. This is what we are doing here. +

    ApplicationWindow::ApplicationWindow()
+        : TQMainWindow( 0, "example application main window", WDestructiveClose | WGroupLeader )
+    {
+
+

ApplicationWindow inherits TQMainWindow, the TQt class that provides +typical application main windows, with menu bars, toolbars, etc. +

        printer = new TQPrinter( TQPrinter::HighResolution );
+
+

The application example can print things, and we chose to have a +TQPrinter object lying around so that when the user changes a setting +during one printing, the new setting will be the default next time. +

        TQPixmap openIcon, saveIcon, printIcon;
+
+

For the sake of simplicity, our example only has a few commands in the +toolbar. The above variables are used to hold an icon for each of +them. +

        TQToolBar * fileTools = new TQToolBar( this, "file operations" );
+
+

We create a toolbar in this window ... +

        fileTools->setLabel( "File Operations" );
+
+

... and define a title for it. When a user drags the toolbar out of +its location and floats it over the desktop, the toolbar-window will +show "File Operations" as caption. +

        openIcon = TQPixmap( fileopen );
+        TQToolButton * fileOpen
+            = new TQToolButton( openIcon, "Open File", TQString::null,
+                               this, SLOT(choose()), fileTools, "open file" );
+
+

Now we create the first tool button for the fileTools toolbar +with the appropriate icon and the tool-tip text "Open File". +The fileopen.xpm we included at the beginning +contains the definition of a pixmap called fileopen. +We use this icon to illustrate our first tool button. +

        saveIcon = TQPixmap( filesave );
+        TQToolButton * fileSave
+            = new TQToolButton( saveIcon, "Save File", TQString::null,
+                               this, SLOT(save()), fileTools, "save file" );
+
+        printIcon = TQPixmap( fileprint );
+        TQToolButton * filePrint
+            = new TQToolButton( printIcon, "Print File", TQString::null,
+                               this, SLOT(print()), fileTools, "print file" );
+
+

In a similar way we create two more tool buttons in this toolbar, each with +appropriate icons and tool-tip text. All three buttons are connected +to appropriate slots in this object; for example, the "Print File" button +to ApplicationWindow::print(). +

        (void)TQWhatsThis::whatsThisButton( fileTools );
+
+

The fourth button in the toolbar is somewhat peculiar: it's the one that +provides "What's This?" help. This must be set up using a special +function, as its mouse interface is unusual. +

        const char * fileOpenText = "<p><img source=\"fileopen\"> "
+                     "Click this button to open a <em>new file</em>.<br>"
+                     "You can also select the <b>Open</b> command "
+                     "from the <b>File</b> menu.</p>";
+
+        TQWhatsThis::add( fileOpen, fileOpenText );
+
+

With the above line we add the "What's This?" help-text to the +fileOpen button... +

        TQMimeSourceFactory::defaultFactory()->setPixmap( "fileopen", openIcon );
+
+

... and tell the rich-text engine that when a help-text (like the one +saved in fileOpenText) requests an image named "fileopen", the openIcon pixmap is used. +

        const char * fileSaveText = "<p>Click this button to save the file you "
+                     "are editing. You will be prompted for a file name.\n"
+                     "You can also select the <b>Save</b> command "
+                     "from the <b>File</b> menu.</p>";
+
+        TQWhatsThis::add( fileSave, fileSaveText );
+        const char * filePrintText = "Click this button to print the file you "
+                     "are editing.\n"
+                     "You can also select the Print command "
+                     "from the File menu.";
+
+        TQWhatsThis::add( filePrint, filePrintText );
+
+

The "What's This?" help of the remaining two buttons doesn't make use +of pixmaps, therefore all we need to do is to add the help-text to the +button. Be careful though: To invoke the rich-text elements in fileSaveText(), the entire string must be surrounded by <p> and +</p>. In filePrintText(), we don't have rich-text elements, so +this is not necessary. +

        TQPopupMenu * file = new TQPopupMenu( this );
+        menuBar()->insertItem( "&File", file );
+
+

Next we create a TQPopupMenu for the File menu and +add it to the menu bar. With the ampersand in front of the letter F, +we allow the user to use the shortcut Alt+F to pop up this menu. +

        file->insertItem( "&New", this, SLOT(newDoc()), CTRL+Key_N );
+
+

Its first entry is connected to the (yet to be implemented) slot newDoc(). When the user chooses this New entry (e.g. by typing the +letter N as marked by the ampersand) or uses the +Ctrl+N accelerator, a new editor-window will pop up. +

        int id;
+        id = file->insertItem( openIcon, "&Open...",
+                               this, SLOT(choose()), CTRL+Key_O );
+        file->setWhatsThis( id, fileOpenText );
+
+        id = file->insertItem( saveIcon, "&Save",
+                               this, SLOT(save()), CTRL+Key_S );
+        file->setWhatsThis( id, fileSaveText );
+
+        id = file->insertItem( "Save &As...", this, SLOT(saveAs()) );
+        file->setWhatsThis( id, fileSaveText );
+
+

We populate the File menu with three more commands (Open, Save and +Save As), and set "What's This?" help for them. Note in particular +that "What's This?" help and pixmaps are used in both the toolbar (above) +and the menu bar (here). (See TQAction and the examples/action +example for a shorter and easier approach.) +

        file->insertSeparator();
+
+

Then we insert a separator, ... +

        id = file->insertItem( printIcon, "&Print...",
+                               this, SLOT(print()), CTRL+Key_P );
+        file->setWhatsThis( id, filePrintText );
+
+        file->insertSeparator();
+
+        file->insertItem( "&Close", this, SLOT(close()), CTRL+Key_W );
+        file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
+
+

... the Print command with "What's This?" help, another separator and +two more commands (Close and Quit) without "What's This?" and pixmaps. +In case of the Close command, the signal is connected +to the close() slot of the respective ApplicationWindow object whilst +the Quit command affects the entire application. +

Because ApplicationWindow is a TQWidget, the close() function +triggers a call to closeEvent() which we +will implement later. +

+

        menuBar()->insertSeparator();
+
+

Now that we have done the File menu we shift our focus back to the +menu bar and insert a separator. From now on further menu bar entries +will be aligned to the right if the windows system style retquires it. +

        TQPopupMenu * help = new TQPopupMenu( this );
+        menuBar()->insertItem( "&Help", help );
+
+        help->insertItem( "&About", this, SLOT(about()), Key_F1 );
+        help->insertItem( "About &TQt", this, SLOT(aboutTQt()) );
+        help->insertSeparator();
+        help->insertItem( "What's &This", this, SLOT(whatsThis()), SHIFT+Key_F1 );
+
+

We create a Help menu, add it to the menu bar, and insert a few +commands. Depending on the style it will appear on the right hand +side of the menu bar or not. +

        e = new TQTextEdit( this, "editor" );
+        e->setFocus();
+        setCentralWidget( e );
+
+

Now we create a simple text-editor, set the initial focus to it, +and make it the window's central widget. +

TQMainWindow::centralWidget() is the heart of the entire application: +It's what menu bar, statusbar and toolbars are all arranged around. Since +the central widget is a text editing widget, we can now reveal that +our simple application is a text editor. :) +

        statusBar()->message( "Ready", 2000 );
+
+

We make the statusbar say "Ready" for two seconds at startup, just to +tell the user that the window has finished initialization and can be +used. +

        resize( 450, 600 );
+
+

Finally it's time to resize the new window to a a nice default size. +

    }
+
+

We have now finished with the constructor. Now we'll deal with the +destructor. +

    ApplicationWindow::~ApplicationWindow()
+    {
+        delete printer;
+    }
+
+

The only thing an ApplicationWindow widget needs to do in its +destructor is to delete the printer it created. All other objects are +child widgets, which TQt will delete when appropriate. +

Now our task is to implement all the slots mentioned in the header file +and used in the constructor. +

+

    void ApplicationWindow::newDoc()
+    {
+        ApplicationWindow *ed = new ApplicationWindow;
+        ed->setCaption("TQt Example - Application");
+        ed->show();
+    }
+
+

This slot, connected to the File|New menu item, simply creates a +new ApplicationWindow and shows it. +

+

    void ApplicationWindow::choose()
+    {
+        TQString fn = TQFileDialog::getOpenFileName( TQString::null, TQString::null,
+                                                   this);
+        if ( !fn.isEmpty() )
+            load( fn );
+        else
+            statusBar()->message( "Loading aborted", 2000 );
+    }
+
+

The choose() slot is connected to the Open menu item and +tool button. With a little help from TQFileDialog::getOpenFileName(), it +asks the user for a file name and then either loads that file or gives an +error message in the statusbar. +

    void ApplicationWindow::load( const TQString &fileName )
+    {
+        TQFile f( fileName );
+        if ( !f.open( IO_ReadOnly ) )
+            return;
+
+        TQTextStream ts( &f );
+        e->setText( ts.read() );
+        e->setModified( FALSE );
+        setCaption( fileName );
+        statusBar()->message( "Loaded document " + fileName, 2000 );
+    }
+
+

This function loads a file into the editor. When it's done, it sets the +window system caption to the file name and displays a success message in +the statusbar for two seconds. With files that exist but are not +readable, nothing happens. +

+

    void ApplicationWindow::save()
+    {
+        if ( filename.isEmpty() ) {
+            saveAs();
+            return;
+        }
+
+        TQString text = e->text();
+        TQFile f( filename );
+        if ( !f.open( IO_WriteOnly ) ) {
+            statusBar()->message( TQString("Could not write to %1").arg(filename),
+                                  2000 );
+            return;
+        }
+
+        TQTextStream t( &f );
+        t << text;
+        f.close();
+
+

As its name suggests, this function saves the current file. If no +filename has been specified so far, the saveAs() function is called. Unwritable files cause the ApplicationWindow object to provide an error-message in the statusbar. +Note that there is more than one way to do this: +compare the above statusBar()->message() line with the equivalent +code in the load() function. +

        e->setModified( FALSE );
+
+

Tell the editor that the contents haven't been edited since the last +save. When the user does some further editing and wishes to close the +window without explicit saving, ApplicationWindow::closeEvent() will ask about it. +

        setCaption( filename );
+
+

It may be that the document was saved under a different name than the +old caption suggests, so we set the window caption just to be sure. +

        statusBar()->message( TQString( "File %1 saved" ).arg( filename ), 2000 );
+    }
+
+

With a message in the statusbar, we inform the user that the file +was saved successfully. +

+

    void ApplicationWindow::saveAs()
+    {
+        TQString fn = TQFileDialog::getSaveFileName( TQString::null, TQString::null,
+                                                   this );
+        if ( !fn.isEmpty() ) {
+            filename = fn;
+            save();
+        } else {
+            statusBar()->message( "Saving aborted", 2000 );
+        }
+    }
+
+

This function asks for a new name, saves the document under that name, +and implicitly changes the window system caption to the new name. +

+

    void ApplicationWindow::print()
+    {
+        printer->setFullPage( TRUE );
+        if ( printer->setup(this) ) {               // printer dialog
+            statusBar()->message( "Printing..." );
+            TQPainter p;
+            if( !p.begin( printer ) ) {               // paint on printer
+                statusBar()->message( "Printing aborted", 2000 );
+                return;
+            }
+
+            TQPaintDeviceMetrics metrics( p.device() );
+            int dpiy = metrics.logicalDpiY();
+            int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins
+            TQRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin );
+            TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()),
+                                      TQFont(),
+                                      e->context(),
+                                      e->styleSheet(),
+                                      e->mimeSourceFactory(),
+                                      view.height() );
+            richText.setWidth( &p, view.width() );
+            int page = 1;
+            do {
+                richText.draw( &p, margin, margin, view, colorGroup() );
+                view.moveBy( 0, view.height() );
+                p.translate( 0 , -view.height() );
+                p.drawText( view.right() - p.fontMetrics().width( TQString::number( page ) ),
+                            view.bottom() + p.fontMetrics().ascent() + 5, TQString::number( page ) );
+                if ( view.top() - margin >= richText.height() )
+                    break;
+                printer->newPage();
+                page++;
+            } while (TRUE);
+
+            statusBar()->message( "Printing completed", 2000 );
+        } else {
+            statusBar()->message( "Printing aborted", 2000 );
+        }
+    }
+
+

print() is called by the File|Print menu item and the filePrint +tool button. +

We present the user with the print setup dialog, and abandon printing +if they cancel. +

We create a TQSimpleRichText object and give it the text. This object +is able to format the text nicely as one long page. We achieve +pagination by printing one paper page's worth of text from the +TQSimpleRichText page at a time. +

Now let's see what happens when a user wishes to close() +an ApplicationWindow. +

+

    void ApplicationWindow::closeEvent( TQCloseEvent* ce )
+    {
+
+

This event gets to process window system close events. A close event is +subtly different from a hide event: hide often means "iconify" whereas +close means that the window is going away for good. +

        if ( !e->isModified() ) {
+            ce->accept();
+            return;
+        }
+
+

If the text hasn't been edited, we just accept the event. The window +will be closed, and because we used the WDestructiveClose widget flag in the ApplicationWindow() constructor, +the widget will be deleted. +

        switch( TQMessageBox::information( this, "TQt Application Example",
+                                          "Do you want to save the changes"
+                                          " to the document?",
+                                          "Yes", "No", "Cancel",
+                                          0, 1 ) ) {
+
+

Otherwise we ask the user: What do you want to do? +

        case 0:
+            save();
+            ce->accept();
+            break;
+
+

If they want to save and then exit, we do that. +

        case 1:
+            ce->accept();
+            break;
+
+

If the user doesn't want to exit, we ignore the close event (there is +a chance that we can't block it but we try). +

        case 2:
+        default: // just for sanity
+            ce->ignore();
+            break;
+
+

The last case -- the user wants to abandon the edits and exit -- is very +simple. +

        }
+    }
+
+

Last but not least we implement the slots used by the help menu entries. +

    void ApplicationWindow::about()
+    {
+        TQMessageBox::about( this, "TQt Application Example",
+                            "This example demonstrates simple use of "
+                            "TQMainWindow,\nTQMenuBar and TQToolBar.");
+    }
+
+    void ApplicationWindow::aboutTQt()
+    {
+        TQMessageBox::aboutTQt( this, "TQt Application Example" );
+    }
+
+

These two slots use ready-made "about" functions to provide some +information about this program and the GUI toolkit it uses. (Although you +don't need to provide an About TQt in your programs, if you use TQt for free +we would appreciate it if you tell people what you're using.) +

That was all we needed to write a complete, almost useful application with +nice help-functions, almost as good as the "editors" some computer vendors +ship with their desktops, and in less than 300 lines of code! +

See also Step-by-step Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/simple-font-demo-example.html b/doc/html/simple-font-demo-example.html new file mode 100644 index 00000000..eacba8f3 --- /dev/null +++ b/doc/html/simple-font-demo-example.html @@ -0,0 +1,273 @@ + + + + + +A simple demonstration of TQFont member functions + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A simple demonstration of TQFont member functions

+ + +

+

This example demonstrates the use of various +TQFont member functions. +


+

The main window API (viewer.h): +

/* $Id: qt/viewer.h   3.3.8   edited May 27 2003 $ */
+
+#ifndef VIEWER_H
+#define VIEWER_H
+
+
+#include <qwidget.h>
+#include <qfont.h>
+
+class TQTextView;
+class TQPushButton;
+
+class Viewer : public TQWidget
+{
+Q_OBJECT
+
+public:
+    Viewer();
+
+private slots:
+    void setDefault();
+    void setSansSerif();
+    void setItalics();
+
+private:
+    void setFontSubstitutions();
+    void layout();
+    void showFontInfo( TQFont & );
+
+    TQTextView * greetings;
+    TQTextView * fontInfo;
+
+    TQPushButton * defaultButton;
+    TQPushButton * sansSerifButton;
+    TQPushButton * italicsButton;
+};
+
+#endif
+
+ +


+

The main window implementation (viewer.cpp): +

/* $Id: qt/viewer.cpp   3.3.8   edited May 27 2003 $ */
+
+#include "viewer.h"
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qtextview.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+
+Viewer::Viewer()
+       :TQWidget()
+{
+    setFontSubstitutions();
+
+    TQString greeting_heb = TQString::fromUtf8( "\327\251\327\234\327\225\327\235" );
+    TQString greeting_ru = TQString::fromUtf8( "\320\227\320\264\321\200\320\260\320\262\321\201\321\202\320\262\321\203\320\271\321\202\320\265" );
+    TQString greeting_en( "Hello" );
+
+    greetings = new TQTextView( this, "textview" );
+
+    greetings->setText( greeting_en + "\n" +
+                       greeting_ru + "\n" +
+                       greeting_heb );
+
+    fontInfo = new TQTextView( this, "fontinfo" );
+
+    setDefault();
+
+    defaultButton = new TQPushButton( "Default", this,
+                                                   "pushbutton1" );
+    defaultButton->setFont( TQFont( "times" ) );
+    connect( defaultButton, SIGNAL( clicked() ),
+             this, SLOT( setDefault() ) );
+
+    sansSerifButton = new TQPushButton( "Sans Serif", this,
+                                                     "pushbutton2" );
+    sansSerifButton->setFont( TQFont( "Helvetica", 12 ) );
+    connect( sansSerifButton, SIGNAL( clicked() ),
+             this, SLOT( setSansSerif() ) );
+
+    italicsButton = new TQPushButton( "Italics", this,
+                                                   "pushbutton3" );
+    italicsButton->setFont( TQFont( "lucida", 12, TQFont::Bold, TRUE ) );
+    connect( italicsButton, SIGNAL( clicked() ),
+             this, SLOT( setItalics() ) );
+
+    layout();
+}
+
+void Viewer::setDefault()
+{
+    TQFont font( "Bavaria" );
+    font.setPointSize( 24 );
+
+    font.setWeight( TQFont::Bold );
+    font.setUnderline( TRUE );
+
+    greetings->setFont( font );
+
+    showFontInfo( font );
+}
+
+void Viewer::setSansSerif()
+{
+    TQFont font( "Newyork", 18 );
+    font.setStyleHint( TQFont::SansSerif );
+    greetings->setFont( font );
+
+    showFontInfo( font );
+}
+
+void Viewer::setItalics()
+{
+    TQFont font( "Tokyo" );
+    font.setPointSize( 32 );
+    font.setWeight( TQFont::Bold );
+    font.setItalic( TRUE );
+
+    greetings->setFont( font );
+
+    showFontInfo( font );
+}
+
+void Viewer::showFontInfo( TQFont & font )
+{
+    TQFontInfo info( font );
+
+    TQString messageText;
+    messageText = "Font requested: \"" +
+                  font.family() + "\" " +
+                  TQString::number( font.pointSize() ) + "pt<BR>" +
+                  "Font used: \"" +
+                  info.family() + "\" " +
+                  TQString::number( info.pointSize() ) + "pt<P>";
+
+    TQStringList substitutions = TQFont::substitutes( font.family() );
+
+    if ( ! substitutions.isEmpty() ){
+        messageText += "The following substitutions exist for " + \
+                       font.family() + ":<UL>";
+
+        TQStringList::Iterator i = substitutions.begin();
+        while ( i != substitutions.end() ){
+            messageText += "<LI>\"" + (* i) + "\"";
+            i++;
+        }
+         messageText += "</UL>";
+    } else {
+        messageText += "No substitutions exist for " + \
+                       font.family() + ".";
+    }
+
+    fontInfo->setText( messageText );
+}
+
+void Viewer::setFontSubstitutions()
+{
+    TQStringList substitutes;
+    substitutes.append( "Times" );
+    substitutes +=  "Mincho",
+    substitutes << "Arabic Newspaper" << "crox";
+
+    TQFont::insertSubstitutions( "Bavaria", substitutes );
+
+    TQFont::insertSubstitution( "Tokyo", "Lucida" );
+}
+
+
+// For those who prefer to use TQt Designer for creating GUIs
+// the following function might not be of particular interest:
+// all it does is creating the widget layout.
+
+void Viewer::layout()
+{
+    TQHBoxLayout * textViewContainer = new TQHBoxLayout();
+    textViewContainer->addWidget( greetings );
+    textViewContainer->addWidget( fontInfo );
+
+    TQHBoxLayout * buttonContainer = new TQHBoxLayout();
+
+    buttonContainer->addWidget( defaultButton );
+    buttonContainer->addWidget( sansSerifButton );
+    buttonContainer->addWidget( italicsButton );
+
+    int maxButtonHeight = defaultButton->height();
+
+    if ( sansSerifButton->height() > maxButtonHeight )
+        maxButtonHeight = sansSerifButton->height();
+    if ( italicsButton->height() > maxButtonHeight )
+        maxButtonHeight = italicsButton->height();
+
+    defaultButton->setFixedHeight( maxButtonHeight );
+    sansSerifButton->setFixedHeight( maxButtonHeight );
+    italicsButton->setFixedHeight( maxButtonHeight );
+
+    TQVBoxLayout * container = new TQVBoxLayout( this );
+    container->addLayout( textViewContainer );
+    container->addLayout( buttonContainer );
+
+    resize( 700, 250 );
+}
+
+ +


+

main() program (simple-qfont-demo.cpp): +

/* $Id: qt/simple-qfont-demo.cpp   3.3.8   edited May 27 2003 $ */
+
+#include "viewer.h"
+
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+    TQApplication app( argc, argv );
+    Viewer * textViewer = new Viewer();
+    textViewer->setCaption( "TQt Example - Simple TQFont Demo" );
+    app.setMainWidget( textViewer );
+    textViewer->show();
+    return app.exec();
+}
+
+ +

See also TQFont Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/simple_dd-example.html b/doc/html/simple_dd-example.html new file mode 100644 index 00000000..c64ea32d --- /dev/null +++ b/doc/html/simple_dd-example.html @@ -0,0 +1,305 @@ + + + + + +Drag and Drop (Simple) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Drag and Drop (Simple)

+ + +

+This provides a very simple example of TQt's drag and drop +functionality. +

For a more complete example see the Drag and Drop example. +


+

Header file: +

/****************************************************************************
+** $Id: qt/main.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qcursor.h>
+#include <qsplitter.h>
+#include <qlistbox.h>
+#include <qiconview.h>
+#include <qpixmap.h>
+
+class TQDragEnterEvent;
+class TQDragDropEvent;
+
+
+class DDListBox : public TQListBox
+{
+    Q_OBJECT
+public:
+    DDListBox( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+    // Low-level drag and drop
+    void dragEnterEvent( TQDragEnterEvent *evt );
+    void dropEvent( TQDropEvent *evt );
+    void mousePressEvent( TQMouseEvent *evt );
+    void mouseMoveEvent( TQMouseEvent * );
+private:
+    int dragging;
+};
+
+
+class DDIconViewItem : public TQIconViewItem
+{
+public:
+    DDIconViewItem( TQIconView *parent, const TQString& text, const TQPixmap& icon ) :
+        TQIconViewItem( parent, text, icon ) {}
+    DDIconViewItem( TQIconView *parent, const TQString &text ) :
+        TQIconViewItem( parent, text ) {}
+    // High-level drag and drop
+    bool acceptDrop( const TQMimeSource *mime ) const;
+    void dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& );
+};
+
+
+class DDIconView : public TQIconView
+{
+    Q_OBJECT
+public:
+    DDIconView( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) :
+        TQIconView( parent, name, f ) {}
+    // High-level drag and drop
+    TQDragObject *dragObject();
+public slots:
+    void slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem>& list );
+};
+
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "main.h"
+
+const char* red_icon[]={
+"16 16 2 1",
+"r c red",
+". c None",
+"................",
+"................",
+"..rrrrrrrrrrrr..",
+"..rrrrrrrrrrrr..",
+"..rrrrrrrrrrrr..",
+"..rrr......rrr..",
+"..rrr......rrr..",
+"..rrr......rrr..",
+"..rrr......rrr..",
+"..rrr......rrr..",
+"..rrr......rrr..",
+"..rrrrrrrrrrrr..",
+"..rrrrrrrrrrrr..",
+"..rrrrrrrrrrrr..",
+"................",
+"................"};
+
+const char* blue_icon[]={
+"16 16 2 1",
+"b c blue",
+". c None",
+"................",
+"................",
+"..bbbbbbbbbbbb..",
+"..bbbbbbbbbbbb..",
+"..bbbbbbbbbbbb..",
+"..bbb......bbb..",
+"..bbb......bbb..",
+"..bbb......bbb..",
+"..bbb......bbb..",
+"..bbb......bbb..",
+"..bbb......bbb..",
+"..bbbbbbbbbbbb..",
+"..bbbbbbbbbbbb..",
+"..bbbbbbbbbbbb..",
+"................",
+"................"};
+
+const char* green_icon[]={
+"16 16 2 1",
+"g c green",
+". c None",
+"................",
+"................",
+"..gggggggggggg..",
+"..gggggggggggg..",
+"..gggggggggggg..",
+"..ggg......ggg..",
+"..ggg......ggg..",
+"..ggg......ggg..",
+"..ggg......ggg..",
+"..ggg......ggg..",
+"..ggg......ggg..",
+"..gggggggggggg..",
+"..gggggggggggg..",
+"..gggggggggggg..",
+"................",
+"................"};
+
+
+// ListBox -- low level drag and drop
+
+DDListBox::DDListBox( TQWidget * parent, const char * name, WFlags f ) :
+    TQListBox( parent, name, f )
+{
+    setAcceptDrops( TRUE );
+    dragging = FALSE;
+}
+
+
+void DDListBox::dragEnterEvent( TQDragEnterEvent *evt )
+{
+    if ( TQTextDrag::canDecode( evt ) )
+        evt->accept();
+}
+
+
+void DDListBox::dropEvent( TQDropEvent *evt )
+{
+    TQString text;
+
+    if ( TQTextDrag::decode( evt, text ) )
+        insertItem( text );
+}
+
+
+void DDListBox::mousePressEvent( TQMouseEvent *evt )
+{
+    TQListBox::mousePressEvent( evt );
+    dragging = TRUE;
+}
+
+
+void DDListBox::mouseMoveEvent( TQMouseEvent * )
+{
+    if ( dragging ) {
+        TQDragObject *d = new TQTextDrag( currentText(), this );
+        d->dragCopy(); // do NOT delete d.
+        dragging = FALSE;
+    }
+}
+
+
+// IconViewIcon -- high level drag and drop
+
+
+bool DDIconViewItem::acceptDrop( const TQMimeSource *mime ) const
+{
+    if ( mime->provides( "text/plain" ) )
+        return TRUE;
+    return FALSE;
+}
+
+
+void DDIconViewItem::dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& )
+{
+    TQString label;
+
+    if ( TQTextDrag::decode( evt, label ) )
+        setText( label );
+}
+
+
+// IconView -- high level drag and drop
+
+TQDragObject *DDIconView::dragObject()
+{
+  return new TQTextDrag( currentItem()->text(), this );
+}
+
+void DDIconView::slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem>& )
+{
+    TQString label;
+
+    if ( TQTextDrag::decode( evt, label ) ) {
+        DDIconViewItem *item = new DDIconViewItem( this, label );
+        item->setRenameEnabled( TRUE );
+    }
+}
+
+
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    // Create and show the widgets
+    TQSplitter *split = new TQSplitter();
+    DDIconView *iv   = new DDIconView( split );
+    (void)             new DDListBox( split );
+    app.setMainWidget( split );
+    split->resize( 600, 400 );
+    split->show();
+
+    // Set up the connection so that we can drop items into the icon view
+    TQObject::connect(
+        iv, SIGNAL(dropped(TQDropEvent*, const TQValueList<TQIconDragItem>&)),
+        iv, SLOT(slotNewItem(TQDropEvent*, const TQValueList<TQIconDragItem>&)));
+
+    // Populate the TQIconView with icons
+    DDIconViewItem *item;
+    item = new DDIconViewItem( iv, "Red",   TQPixmap( red_icon ) );
+    item->setRenameEnabled( TRUE );
+    item = new DDIconViewItem( iv, "Green", TQPixmap( green_icon ) );
+    item->setRenameEnabled( TRUE );
+    item = new DDIconViewItem( iv, "Blue",  TQPixmap( blue_icon ) );
+    item->setRenameEnabled( TRUE );
+
+    return app.exec();
+}
+
+
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/small-table-example-example.html b/doc/html/small-table-example-example.html new file mode 100644 index 00000000..39cab28e --- /dev/null +++ b/doc/html/small-table-example-example.html @@ -0,0 +1,108 @@ + + + + + +Small Table Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Small Table Example

+ + +

+This example displays a TQTable and some TQTableItems. +


+

Implementation: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qtable.h>
+#include <qimage.h>
+#include <qpixmap.h>
+#include <qstringlist.h>
+
+// TQt logo: static const char *qtlogo_xpm[]
+#include "qtlogo.xpm"
+
+// Table size
+
+const int numRows = 30;
+const int numCols = 10;
+
+// The program starts here.
+
+int main( int argc, char **argv )
+{
+    TQApplication app( argc, argv );
+
+    TQTable table( numRows, numCols );
+
+    TQHeader *header = table.horizontalHeader();
+    header->setLabel( 0, TQObject::tr( "Tiny" ), 40 );
+    header->setLabel( 1, TQObject::tr( "Checkboxes" ) );
+    header->setLabel( 5, TQObject::tr( "Combos" ) );
+    table.setColumnMovingEnabled(TRUE);
+
+    TQImage img( qtlogo_xpm );
+    TQPixmap pix = img.scaleHeight( table.rowHeight(3) );
+    table.setPixmap( 3, 2, pix );
+    table.setText( 3, 2, "A Pixmap" );
+
+    TQStringList comboEntries;
+    comboEntries << "one" << "two" << "three" << "four";
+
+    for ( int i = 0; i < numRows; ++i ){
+        TQComboTableItem * item = new TQComboTableItem( &table, comboEntries, FALSE );
+        item->setCurrentItem( i % 4 );
+        table.setItem( i, 5, item );
+    }
+    for ( int j = 0; j < numRows; ++j )
+        table.setItem( j, 1, new TQCheckTableItem( &table, "Check me" ) );
+
+    app.setMainWidget( &table );
+    table.show();
+    return app.exec();
+}
+
+ +

See also Table Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/smooth.png b/doc/html/smooth.png new file mode 100644 index 00000000..192da2b3 Binary files /dev/null and b/doc/html/smooth.png differ diff --git a/doc/html/sound-example.html b/doc/html/sound-example.html new file mode 100644 index 00000000..0ebf892e --- /dev/null +++ b/doc/html/sound-example.html @@ -0,0 +1,192 @@ + + + + + +Sound Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Sound Example

+ + +

+This example shows how easy it is to play sounds, e.g. .WAV files, +if your machine is set up to play audio. +


+

Header file: +

/****************************************************************************
+** $Id: qt/sound.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+#ifndef PLAY_H
+#define PLAY_H
+
+#include "qsound.h"
+#include <qmainwindow.h>
+
+class SoundPlayer : public TQMainWindow {
+    Q_OBJECT
+public:
+    SoundPlayer();
+
+public slots:
+    void doPlay1();
+    void doPlay2();
+    void doPlay3();
+    void doPlay4();
+    void doPlay34();
+    void doPlay1234();
+
+private:
+    TQSound bucket3;
+    TQSound bucket4;
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/sound.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+//
+// Very simple example of TQSound::play(filename)
+//
+// 99% of this program is just boilerplate TQt code to put up a nice
+// window so you think something special is happening.
+//
+
+#include "sound.h"
+#include <qapplication.h>
+#include <qmessagebox.h>
+#include <qmenubar.h>
+
+SoundPlayer::SoundPlayer() :
+    TQMainWindow(),
+    bucket3("sounds/3.wav"),
+    bucket4("sounds/4.wav")
+{
+    if (!TQSound::isAvailable()) {
+        // Bail out.  Programs in which sound is not critical
+        // could just silently (hehe) ignore the lack of a server.
+        //
+        TQMessageBox::warning(this,"No Sound",
+                "<p><b>Sorry, you are not running the Network Audio System.</b>"
+                "<p>If you have the `au' command, run it in the background before this program. "
+                "The latest release of the Network Audio System can be obtained from:"
+                "<pre>\n"
+                " &nbsp;\n"
+                "   ftp.ncd.com:/pub/ncd/technology/src/nas\n"
+                "   ftp.x.org:/contrib/audio/nas\n"
+                "</pre>"
+                "<p>Release 1.2 of NAS is also included with the X11R6"
+                "contrib distribution."
+                "<p>After installing NAS, you will then need to reconfigure TQt with NAS sound support");
+    }
+
+    TQPopupMenu *file = new TQPopupMenu;
+    file->insertItem("Play &1",  this, SLOT(doPlay1()), CTRL+Key_1);
+    file->insertItem("Play &2",  this, SLOT(doPlay2()), CTRL+Key_2);
+    file->insertItem("Play from bucket &3",  this, SLOT(doPlay3()), CTRL+Key_3);
+    file->insertItem("Play from bucket &4",  this, SLOT(doPlay4()), CTRL+Key_4);
+    file->insertSeparator();
+    file->insertItem("Play 3 and 4 together",  this, SLOT(doPlay34()));
+    file->insertItem("Play all together",  this, SLOT(doPlay1234()));
+    file->insertSeparator();
+    file->insertItem("E&xit",  qApp, SLOT(tquit()));
+    menuBar()->insertItem("&File", file);
+}
+
+void SoundPlayer::doPlay1()
+{
+    TQSound::play("sounds/1.wav");
+}
+
+void SoundPlayer::doPlay2()
+{
+    TQSound::play("sounds/2.wav");
+}
+
+void SoundPlayer::doPlay3()
+{
+    bucket3.play();
+}
+
+void SoundPlayer::doPlay4()
+{
+    bucket4.play();
+}
+
+void SoundPlayer::doPlay34()
+{
+    // Some sound platforms will only play one sound at a time
+    bucket3.play();
+    bucket4.play();
+}
+
+void SoundPlayer::doPlay1234()
+{
+    // Some sound platforms will only play one sound at a time
+    TQSound::play("sounds/1.wav");
+    TQSound::play("sounds/2.wav");
+    bucket3.play();
+    bucket4.play();
+}
+
+int main(int argc, char** argv)
+{
+    TQApplication app(argc,argv);
+    SoundPlayer sp;
+    app.setMainWidget(&sp);
+    sp.setCaption("TQt Example - Sounds");
+    sp.show();
+    return app.exec();
+}
+
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/splitter-example.html b/doc/html/splitter-example.html new file mode 100644 index 00000000..4cc0022f --- /dev/null +++ b/doc/html/splitter-example.html @@ -0,0 +1,151 @@ + + + + + +Splitter + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Splitter

+ + +

+This example shows how to use splitters. With their help users can +decide for themselves how much space each child item should get. +


+

Implementation: +

/****************************************************************************
+** $Id: qt/splitter.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qlabel.h>
+#include <qsplitter.h>
+#include <qmultilineedit.h>
+
+#include <qpainter.h>
+
+
+class Test : public TQWidget {
+public:
+    Test(TQWidget* parent=0, const char* name=0, int f=0);
+    void paintEvent(TQPaintEvent* e);
+private:
+};
+
+
+
+Test::Test(TQWidget* parent, const char* name, int f) :
+    TQWidget(parent, name, f)
+{
+
+}
+
+void Test::paintEvent(TQPaintEvent* e)
+{
+    TQPainter p(this);
+    p.setClipRect(e->rect());
+    const int d = 1000; //large number
+    int x1 = 0;
+    int x2 = width()-1;
+    int y1 = 0;
+    int y2 = height()-1;
+
+    int x = (x1+x2)/2;
+    p.drawLine( x, y1, x+d, y1+d   );
+    p.drawLine( x, y1, x-d, y1+d   );
+    p.drawLine( x, y2, x+d, y2-d   );
+    p.drawLine( x, y2, x-d, y2-d   );
+
+    int y = (y1+y2)/2;
+    p.drawLine( x1, y, x1+d, y+d   );
+    p.drawLine( x1, y, x1+d, y-d   );
+    p.drawLine( x2, y, x2-d, y+d   );
+    p.drawLine( x2, y, x2-d, y-d   );
+}
+
+
+int main( int argc, char ** argv )
+{
+    TQApplication a( argc, argv );
+
+    TQSplitter *s1 = new TQSplitter( TQSplitter::Vertical, 0 , "main" );
+
+    TQSplitter *s2 = new TQSplitter( TQSplitter::Horizontal, s1, "top" );
+
+    Test *t1 = new Test( s2, "topLeft" );
+    t1->setBackgroundColor( TQt::blue.light( 180 ) );
+    t1->setMinimumSize( 50, 0 );
+
+    Test *t2 = new Test( s2, "topRight" );
+    t2->setBackgroundColor( TQt::green.light( 180 ) );
+    s2->setResizeMode( t2, TQSplitter::KeepSize );
+    s2->moveToFirst( t2 );
+
+    TQSplitter *s3 = new TQSplitter( TQSplitter::Horizontal,  s1, "bottom" );
+
+    Test *t3 = new Test( s3, "bottomLeft" );
+    t3->setBackgroundColor( TQt::red );
+    Test *t4 = new Test( s3, "bottomMiddle" );
+    t4->setBackgroundColor( TQt::white );
+
+    Test *t5 = new Test( s3, "bottomRight" );
+    t5->setMaximumHeight( 250 );
+    t5->setMinimumSize( 80, 50 );
+    t5->setBackgroundColor( TQt::yellow );
+
+#ifdef Q_WS_QWS
+    // TQt/Embedded XOR drawing not yet implemented.
+    s1->setOpaqueResize( TRUE );
+#endif
+    s2->setOpaqueResize( TRUE );
+    s3->setOpaqueResize( TRUE );
+
+    a.setMainWidget( s1 );
+    s1->setCaption("TQt Example - Splitters");
+    s1->show();
+    int result = a.exec();
+    delete s1;
+    return result;
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/splitter-views-w.png b/doc/html/splitter-views-w.png new file mode 100644 index 00000000..b7e09a5a Binary files /dev/null and b/doc/html/splitter-views-w.png differ diff --git a/doc/html/sql-driver.html b/doc/html/sql-driver.html new file mode 100644 index 00000000..03ea5800 --- /dev/null +++ b/doc/html/sql-driver.html @@ -0,0 +1,635 @@ + + + + + +SQL Module - Drivers + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

SQL Module - Drivers

+ + +

+

+

Introduction +

+

The SQL Module uses driver plugins in order to communicate with +different database APIs. Since the SQL Module API is +database-independent, all database-specific code is contained within +these drivers. Several drivers are supplied with TQt and other drivers +can be added. The driver source code is supplied and can be used as a +model for writing your own drivers. +

Note: To build a driver plugin you need to have the appropriate +client library for your Database Management System (DBMS). This provides +access to the API exposed by the DBMS, and is typically shipped with it. +Most installation programs also allow you to install "development +libraries", and these are what you need. These libraries are responsible +for the low-level communication with the DBMS. +

The drivers shipped with TQt are: +

    +
  • TQDB2 - IBM DB2 Driver (v7.1 and higher) +
  • TQIBASE - Borland Interbase Driver +
  • TQMYSQL3 - MySQL Driver +
  • TQOCI8 - Oracle Call Interface Driver, version 8, 9 and 10 +
  • TQODBC3 - Open Database Connectivity Driver +
  • TQPSQL7 - PostgreSQL v6.x and v7.x Driver +
  • TQSQLITE - SQLite Driver +
  • TQTDS7 - Sybase Adaptive Server +
+

Note that not all of the plugins are shipped with the TQt Open Source Edition +due to license incompatibilities with the GPL. +

+

Building the drivers using configure +

+

The TQt configure script automatically detects the available client +libraries on your machine. Run "configure -help" to see what drivers +can be built. You should get an output similar to this: +

+Possible values for <driver>: [ mysql oci odbc psql tds ]
+Auto-Detected on this system: [ mysql psql ]
+
+ +

Note that on Windows, the configure script doesn't do any +auto-detection. +

The configure script cannot detect the neccessary libraries and include +files if they are not in the standard paths, so it may be necessary to +specify these paths using the "-I" and "-L" switches. For example, if +your MySQL include files are installed in /usr/local/mysql (or in +C:\mysql\include + +configure: -I/usr/local/mysql (or -I C:\mysql\include + +Windows). +

On Windows the -I parameter doesn't accept spaces in +filenames, so use the 8.3 name instead, i.e. use C:\progra~1\mysql +instead of C:\program files\mysql. +

Use the -qt-sql-<driver> parameter to build the database driver +statically into your TQt library or -plugin-sql-<driver> to build +the driver as a plugin. Look at the sections that follow for +additional information about retquired libraries. +

+

Building the plugins manually +

+

+

TQMYSQL3 - MySQL 3.x and MySQL 4.x +

+

+

General information +

+

MySQL 3.x doesn't support SQL transactions by default. There are some +backends which offer this functionality. Recent versions of the MySQL +client libraries (>3.23.34) allow you to use transactions on those +modified servers. +

If you have a recent client library and connect to a +transaction-enabled MySQL server, a call to the +TQSqlDriver::hasFeature( TQSqlDriver::Transactions ) function returns +TRUE and SQL transactions can be used. +

If the plugin is compiled against MySQL 4.x client libraries, +transactions are enabled by default. +

You can find information about MySQL on http://www.mysql.com +

How to build the plugin on Unix/Linux +

+

You need the MySQL header files and as well as the shared library +libmysqlclient.so. Depending on your Linux distribution you need to +install a package which is usually called "mysql-devel". +

Tell qmake where to find the MySQL +header files and shared libraries (here it is assumed that MySQL is +installed in /usr/local) and run make: +

+cd $QTDIR/plugins/src/sqldrivers/mysql
+qmake -o Makefile "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient" mysql.pro
+make
+
+ +

How to build the plugin on Windows +

+

You need to get the MySQL installation files. Run SETUP.EXE and +choose "Custom Install". Install the "Libs & Include Files" Module. +Build the plugin as follows (here it is assumed that MySQL is +installed in C:\MYSQL): +

+cd %QTDIR%\plugins\src\sqldrivers\mysql
+qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE" "LIBS+=C:\MYSQL\LIB\OPT\LIBMYSQL.LIB" mysql.pro
+nmake
+
+ +

If you are not using a Microsoft compiler, replace nmake with make in the statement above. +

+

TQOCI8 - Oracle Call Interface (OCI) +

+

+

General information +

+

The TQt OCI plugin supports both Oracle 8 and Oracle 9. After +connecting to the Oracle server, the plugin will auto-detect the +database version and enable features accordingly. +

Unicode support +

+

If the Oracle server supports Unicode, the OCI plugin will use UTF-8 +encoding to communicate with the server. +

BLOB/LOB support +

+

Binary Large Objects (BLOBs) can be read and written, but be aware +that this process may retquire a lot of memory. +

Note that Oracle 9 doesn't support scrollable result sets with LOB +columns, you have to use a forward only query to select LOB fields +(see TQSqlQuery::setForwardOnly()). +

Inserting BLOBs should be done using either a prepared query where the +BLOBs are bound to placeholders, or TQSqlCursor which uses a prepared +query to do this internally (see $QTDIR/examples/sql/blob). +

Know problems +

+

When a query is in forward only mode a call to TQSqlQuery::last() will +position the query on the last record and return TRUE, but subsequent +calls to TQSqlQuery::value() will only return NULLs. +

How to build the plugin on Unix/Linux +

+

All files retquired to build driver should ship with the standard Oracle +Client install. +

Oracle library files retquired to build driver: +

    +
  • libclntsh.so (all versions) +
  • libwtc8.so (only Oracle 8) or libwtc9.so (only Oracle 9) +
+

Tell qmake where to find the Oracle header files and shared +libraries (it is assumed that the variable $ORACLE_HOME points to +the directory where Oracle is installed) and run make: +

If you are using Oracle 8: +

+cd $QTDIR/plugins/src/sqldrivers/oci
+qmake -o Makefile "INCLUDEPATH+=$ORACLE_HOME/rdbms/public $ORACLE_HOME/rdbms/demo" "LIBS+=-L$ORACLE_HOME/lib -lclntsh -lwtc8" oci.pro
+make
+
+ +

For Oracle version 9: +

+cd $QTDIR/plugins/src/sqldrivers/oci
+qmake -o Makefile "INCLUDEPATH+=$ORACLE_HOME/rdbms/public $ORACLE_HOME/rdbms/demo" "LIBS+=-L$ORACLE_HOME/lib -lclntsh -lwtc9" oci.pro
+make
+
+ +

For Oracle version 10: +

+cd $QTDIR/plugins/src/sqldrivers/oci
+qmake -o Makefile "INCLUDEPATH+=$ORACLE_HOME/rdbms/public $ORACLE_HOME/rdbms/demo" "LIBS+=-L$ORACLE_HOME/lib -lclntsh" oci.pro
+make
+
+ +

Note that some versions of the OCI client libraries contain a bug +that makes programs linked to these libraries segfault on exit. This +only happens if the TQOCI8 driver is compiled as a plugin. To work +around this problem, either compile the driver into the TQt libray +itself, or configure TQt with the option '-DQT_NO_LIBRARY_UNLOAD'. +For Oracle 9, it is possible to link to the static OCI library by +using "LIBS+=$ORACLE_HOME/lib/libclntst9.a". +

How to build the plugin on Windows +

+

Choosing the option "Programmer" in the Oracle Client Installer from +the Oracle Client Installation CD is sufficient to build the plugin. +

Build the plugin as follows (here it is assumed that Oracle Client is +installed in C:\oracle): +

+set INCLUDE=%INCLUDE%;c:\oracle\oci\include
+set LIB=%LIB%;c:\oracle\oci\lib\msvc
+cd %QTDIR%\plugins\src\sqldrivers\oci
+qmake -o Makefile oci.pro
+nmake
+
+ +

When you run your application you will also need to add the oci.dll +path to your PATH environment variable: +

+set PATH=%PATH%;c:\oracle\bin
+
+ +

If you are not using a Microsoft compiler, replace nmake with make in the statement above. +

+

TQODBC3 - Open Database Connectivity (ODBC) +

+

+

General information +

+

ODBC is a general interface that allows you to connect to multiple +DBMS using a common interface. The TQODBC3 driver allows you to connect +to an ODBC driver manager and access the available data sources. Note +that you also need to install and configure ODBC drivers for the ODBC +driver manager that is installed on your system. The TQODBC3 plugin +then allows you to use these data sources in your TQt project. +

On Windows systems after 95 an ODBC driver manager should be installed +by default, for Unix systems there are some implementations which must +be installed first. Note that every client that uses your application +is retquired to have an ODBC driver manager installed, otherwise the +TQODBC3 plugin will not work. +

Be aware that when connecting to an ODBC datasource you must pass in +the name of the ODBC datasource to the TQSqlDatabase::setDatabaseName() +function: not the actual database name. +

The TQODBC3 Plugin needs an ODBC compliant driver manager version 2.0 or +later to work. Some ODBC drivers claim to be version 2.0 compliant, +but do not offer all the necessary functionality. The TQODBC3 plugin +therefore checks whether the data source can be used after a +connection has been established and refuses to work if the check +fails. If you don't like this behaviour, you can remove the #define ODBC_CHECK_DRIVER line from the file qsql_odbc.cpp. Do this at +your own risk! +

If you experience very slow access of the ODBC datasource, make sure +that ODBC call tracing is turned off in the ODBC datasource manager. +

Unicode support +

+

The TQODBC3 Plugin will use the Unicode API if UNICODE is defined. On +Windows NT based systems, this is the default. Note that the ODBC +driver and the DBMS have to support Unicode as well. +

For the Oracle 9 ODBC driver (Windows), it is neccessary to check +"SQL_WCHAR support" in the ODBC driver manager otherwise Oracle +will convert all Unicode strings to local 8 bit. +

How to build the plugin on Unix/Linux +

+

It is recommended that you use unixODBC. You can find the latest +version and ODBC drivers at http://www.unixodbc.org. +You need the unixODBC header files and shared libraries. +

Tell qmake where to find the unixODBC header files and shared +libraries (here it is assumed that unixODBC is installed in +/usr/local/unixODBC) and run make: +

+cd $QTDIR/plugins/src/sqldrivers/odbc
+qmake "INCLUDEPATH+=/usr/local/unixODBC/include" "LIBS+=-L/usr/local/unixODBC/lib -lodbc"
+make
+
+ +

How to build the plugin on Windows +

+

The ODBC header and include files should already be installed in the +right directories. You just have to build the plugin as follows: +

+cd %QTDIR%\plugins\src\sqldrivers\odbc
+qmake -o Makefile odbc.pro
+nmake
+
+ +

If you are not using a Microsoft compiler, replace nmake with make in the statement above. +

+

TQPSQL7 - PostgreSQL version 6 and 7 +

+

+

General information +

+

The TQPSQL7 driver supports both version 6 and 7 of PostgreSQL. We +recommend compiling the plugin with a recent version of the PostgreSQL +client library (libpq) because it is more stable and still backwards +compatible. +

If you want to link the plugin against the libpq shipped with version +6 we recommend a recent version like PostgreSQL 6.5.3, otherwise a +connection to a version 7 server may not work. +

The driver auto-detects the server version of PostgreSQL after a +connection was successful. If the server is too old or the version +information cannot be determined a warning is issued. +

For more information about PostgreSQL visit http://www.postgresql.org. +

Unicode support +

+

The TQPSQL7 driver automatically detects whether the PostgreSQL +database you are connecting to supports Unicode or not. Unicode is +automatically used if the server supports it. Note that the driver +only supports the UTF-8 encoding. If your database uses any other +encoding, the server must be compiled with Unicode conversion +support. +

Unicode support was introduced in PostgreSQL version 7.1 and it will +only work if both the server and the client library have been compiled +with multibyte support. More information about how to set up a +multibyte enabled PostgreSQL server can be found in the PostgreSQL +Administrator Guide, Chapter 5. +

BLOB support +

+

Binary Large Objects are supported through the BYTEA field type in +PostgreSQL versions >= 7.1. Fields of type OID can be read, but not +written. Use the PostgreSQL command lo_import to insert binary data +into OID fields. +

How to build the plugin on Unix/Linux +

+

Just installing the pq client library and the corresponding header +files is not sufficient. You have to get the PostgreSQL source +distribution and run the configure script. If you've already installed +a binary distribution you don't need to build it. The source +distribution is needed because the TQPSQL7 plugin relies on a couple of +header files that are usually not a part of the binary distribution. +

To make qmake find the PostgreSQL header files and shared +libraries, run qmake the following way (assuming that the +PostgreSQL sources can be found in /usr/src/psql): +

+cd $QTDIR/plugins/src/sqldrivers/psql
+qmake -o Makefile "INCLUDEPATH+=/usr/src/psql/src/include /usr/src/psql/src/interfaces/libpq" "LIBS+=-L/usr/lib -lpq" psql.pro
+make
+
+ +

How to build the plugin on Windows +

+

Unpack and build the PostgreSQL source distribution as described in +the PostgreSQL documentation. Assuming the PostgreSQL sources resides +in C:\psql, build the plugin as follows: +

+cd %QTDIR%\plugins\src\sqldrivers\psql
+qmake -o Makefile "INCLUDEPATH+=C:\psql\src\include C:\psql\src\interfaces\libpq" psql.pro
+nmake
+
+ +

Remember to add the path to the libpq.dll library to your PATH +environment variable so that Windows can find it. In this case that +would be C:\psql\src\interfaces\libpq\Release. If you are not using a +Microsoft compiler, replace nmake with make in the statement +above. +

+

TQTDS7 - Sybase Adaptive Server +

+

+

How to build the plugin on Unix/Linux +

+

Under Unix, two libraries are available which support the TDS protocol: +

- FreeTDS, a free implementation of the TDS protocol +(http://www.freetds.org). Note that FreeTDS is not yet stable, +so some functionality may not work as expected. +

- Sybase Open Client, available from http://www.sybase.com. +Note for Linux users: Get the Open Client RPM from +http://linux.sybase.com. +

Regardless of which library you use, the shared object file +libsybdb.so is needed. Set the SYBASE environment variable to +point to the directory where you installed the client library and +execute qmake: +

+cd $QTDIR/plugins/src/sqldrivers/tds
+qmake -o Makefile "INCLUDEPATH=$SYBASE/include" "LIBS=-L$SYBASE/lib -lsybdb"
+make
+
+ +

How to build the plugin on Windows +

+

You can either use the DB-Library supplied by Microsoft or the Sybase +Open Client (http://www.sybase.com). You must include NTWDBLIB.LIB to build the plugin: +

+cd %QTDIR%\plugins\src\sqldrivers\tds
+qmake -o Makefile "LIBS+=NTWDBLIB.LIB" tds.pro
+nmake
+
+ +

By default the Microsoft library is used on Windows, if you want to force +the use of the Sybase Open Client, you must define +Q_USE_SYBASE in %QTDIR%\src\sql\drivers\tds\qsql_tds.cpp. +

+

TQDB2 - IBM DB2 Driver (v7.1 or higher) +

+

+

General information +

+

The TQt DB2 plugin makes it possible to access IBM DB2 databases. It +has been tested with IBM DB2 v7.1 and 7.2. You have to install the IBM +DB2 development client library, which contains the header and library +files necessary for compiling the TQDB2 plugin. +

The TQDB2 driver supports prepared queries, reading/writing of Unicode +strings and reading/writing of BLOBs. +

We suggest using a forward-only query when calling stored procedures +in DB2 (see TQSqlQuery::setForwardOnly()). +

How to build the plugin on Unix/Linux +

+

+cd $QTDIR/plugins/src/sqldrivers/db2
+qmake -o Makefile "INCLUDEPATH+=$DB2DIR/include" "LIBS+=-L$DB2DIR/lib -ldb2"
+make
+
+ +

How to build the plugin on Windows +

+

The DB2 header and include files should already be installed in the +right directories. You just have to build the plugin as follows: +

+cd %QTDIR%\plugins\src\sqldrivers\db2
+qmake -o Makefile "INCLUDEPATH+=<DB2 home>/sqllib/include" "LIBS+=<DB2 home>/sqllib/lib/db2cli.lib"
+nmake
+
+ +

If you are not using a Microsoft compiler, replace nmake +with make in the statement above. +

+

TQSQLITE - SQLite Driver +

+

+

The TQt SQLite plugin makes it possible to access SQLite databases. +SQLite is an in-process database, meaning that it is not necessary +to have a database server. SQLite operates on a single file, which has +to be set as database name when opening a connection. If the file does +not exist, SQLite will try to create it. SQLite also supports in-memory +databases, simply pass ":memory:" as the database name. +

SQLite has some restrictions regarding multiple users and +multiple transactions. If you try to read/write on a resource from different +transactions, your application might freeze until one transaction commits +or rolls back. +

SQLite has no support for types, every value is treated as character data. +BLOBs are therefore not supported. +

You can find information about SQLite on http://www.sqlite.org. +

SQLite is shipped as third party library within TQt. It can be built by +passing the following parameters to the configure script: +-plugin-sql-sqlite (as plugin) or -qt-sql-sqlite (linked +directly into the TQt library). +

If you don't want to use the SQLite library shipped with TQt, you can +build it manually (replace $SQLITE by the directory where SQLite +resides): +

+cd $QTDIR/plugins/src/sqldrivers/sqlite
+qmake -o Makefile "INCLUDEPATH+=$SQLITE/include" "LIBS+=-L$SQLITE/lib -lsqlite"
+make
+
+ +

+

TQIBASE - Borland Interbase Driver +

+

+

General information +

+

The TQt Interbase plugin makes it possible to access the Interbase and +Firebird databases. Interbase can either be used as a client/server or +without a server operating on local files. The database file must +exist before a connection can be established. +

Note that Interbase retquires you to specify the full path to the +database file, no matter whether it is stored locally or on another +server. +

+    myDatabase->setHostName("MyServer");
+    myDatabase->setDatabaseName("C:\\test.gdb");
+
+ +

You need the Interbase/Firebird development headers and libraries +to build this plugin. +

Due to the GPL, users of the TQt Open Source Edition are not allowed to link +this plugin to the commercial editions of Interbase. Please use Firebird +or the free edition of Interbase. +

How to build the plugin on Unix/Linux +

+

The following assumes Interbase or Firebird is installed in +/opt/interbase: +

+cd $QTDIR/plugins/src/sqldrivers/ibase
+qmake -o Makefile "INCLUDEPATH+=/opt/interbase/include" "LIBS+=-L/opt/interbase/lib" ibase.pro
+make
+
+ +

How to build the plugin on Windows +

+

The following assumes Interbase or Firebird is installed in +C:\interbase: +

+cd %QTDIR%\plugins\src\sqldrivers\ibase
+qmake -o Makefile "INCLUDEPATH+=C:\interbase\include" ibase.pro
+nmake
+
+ +

If you are not using a Microsoft compiler, replace nmake +with make in the statement above. +

Note that C:\interbase\bin must be in the PATH. +

+

Troubleshooting +

+

You should always use client libraries that have been compiled with +the same compiler as you are using for your project. If you cannot get +a source distibution to compile the client libraries yourself, you +must make sure that the pre-compiled library is compatible with +your compiler, otherwise you will get a lot of "undefined symbols" +errors. Some compilers have tools to convert libraries, e.g. Borland +ships the tool COFF2OMF.EXE to convert libraries that have been +generated with Microsoft Visual C++. +

If the compilation of a plugin succeeds but it cannot be loaded, +make sure that the following retquirements are met: +

    +
  • Ensure that you are using a shared TQt library; you cannot use the +plugins with a static build. +
  • Ensure that the environment variable QTDIR points to the right +directory. Go to the $QTDIR/plugins/sqldrivers directory and +make sure that the plugin exists in that directory. +
  • Ensure that the client libraries of the DBMS are available on the +system. On Unix, run the command ldd and pass the name of the +plugin as parameter, for example ldd libqsqlmysql.so. You will +get a warning if any of the client libraries couldn't be found. +On Windows, you can use the dependency walker of Visual Studio. +
+

If you are experiencing problems with loading plugins, and see output +like this +

+TQSqlDatabase warning: TQMYSQL3 driver not loaded
+TQSqlDatabase: available drivers: TQMYSQL3
+
+ +

the problem is probably that the plugin had the wrong build key. For +debugging purposes, remove the corresponding entry in the +$HOME/.qt/qt_plugins_(qtversion).rc file. +

The next time you try to load this plugin, it will give you a more detailed +error message. +

+

How to write your own database driver +

+

TQSqlDatabase is responsible for loading and managing database driver +plugins. When a database is added (see TQSqlDatabase::addDatabase()), +the appropriate driver plugin is loaded (using TQSqlDriverPlugin). +TQSqlDatabase relies on the driver plugin to provide interfaces for +TQSqlDriver and TQSqlResult. +

TQSqlDriver is an abstract base class which defines the functionality +of a SQL database driver. This includes functions such as +TQSqlDriver::open() and TQSqlDriver::close(). TQSqlDriver is responsible +for connecting to a database, establish the proper environment, etc. +In addition, TQSqlDriver can create TQSqlQuery objects appropriate for +the particular database API. TQSqlDatabase forwards many of its +function calls directly to TQSqlDriver which provides the concrete +implementation. +

TQSqlResult is an abstract base class which defines the functionality +of a SQL database query. This includes statements such as SELECT, +UPDATE, and ALTER TABLE. TQSqlResult contains functions such as +TQSqlResult::next() and TQSqlResult::value(). TQSqlResult is responsible +for sending queries to the database, returning result data, etc. +TQSqlQuery forwards many of its function calls directly to TQSqlResult +which provides the concrete implementation. +

TQSqlDriver and TQSqlResult are closely connected. When implementing a +TQt SQL driver, both of these classes must to be subclassed and the +abstract virtual methods in each class must be implemented. +

To implement a TQt SQL driver as a plugin (so that it is recognized and +loaded by the TQt library at runtime), the driver must use the +Q_EXPORT_PLUGIN macro. Read the TQt +Plugin documentation for more information on this. You can +also check out how this is done in the SQL plugins that is provided +with TQt in QTDIR/plugins/src/sqldrivers and +QTDIR/src/sql/drivers. +

The following code can be used as a skeleton for a SQL driver: +

+class TQNullResult : public TQSqlResult
+{
+public:
+    TQNullResult( const TQSqlDriver* d ): TQSqlResult( d ) {}
+    ~TQNullResult() {}
+protected:
+    TQVariant    data( int ) { return TQVariant(); }
+    bool        reset ( const TQString& ) { return FALSE; }
+    bool        fetch( int ) { return FALSE; }
+    bool        fetchFirst() { return FALSE; }
+    bool        fetchLast() { return FALSE; }
+    bool        isNull( int ) { return FALSE; }
+    TQSqlRecord  record() { return TQSqlRecord(); }
+    int         size()  { return 0; }
+    int         numRowsAffected() { return 0; }
+};
+
+class TQNullDriver : public TQSqlDriver
+{
+public:
+    TQNullDriver(): TQSqlDriver() {}
+    ~TQNullDriver() {}
+    bool    hasFeature( DriverFeature ) const { return FALSE; }
+    bool    open( const TQString&,
+                  const TQString&,
+                  const TQString&,
+                  const TQString&,
+                  int ) { return FALSE; }
+    void    close() {}
+    TQSqlQuery createQuery() const { return TQSqlQuery( new TQNullResult( this ) ); }
+};
+
+ +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-examples.html b/doc/html/sql-examples.html new file mode 100644 index 00000000..979e4b09 --- /dev/null +++ b/doc/html/sql-examples.html @@ -0,0 +1,48 @@ + + + + + +TQt SQL Examples + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt SQL Examples

+ + +

The following example programs show how to use the +TQt SQL classes. +

+

+
SQL Table +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-basicbrowsing-main-cpp.html b/doc/html/sql-overview-basicbrowsing-main-cpp.html new file mode 100644 index 00000000..9cef6894 --- /dev/null +++ b/doc/html/sql-overview-basicbrowsing-main-cpp.html @@ -0,0 +1,78 @@ + + + + + +sql/overview/basicbrowsing/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/basicbrowsing/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlquery.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv, FALSE );
+
+    if ( createConnections() ) {
+        TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" );
+        // Copy data from the oracle database to the ODBC (default)
+        // database
+        TQSqlQuery target;
+        TQSqlQuery query( "SELECT id, name FROM people", oracledb );
+        if ( query.isActive() ) {
+            while ( query.next() ) {
+                target.exec( "INSERT INTO people ( id, name ) VALUES ( " +
+                              query.value(0).toString() +
+                              ", '" + query.value(1).toString() +  "' )" );
+            }
+        }
+    }
+
+    return 0;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-basicbrowsing2-main-cpp.html b/doc/html/sql-overview-basicbrowsing2-main-cpp.html new file mode 100644 index 00000000..44b84009 --- /dev/null +++ b/doc/html/sql-overview-basicbrowsing2-main-cpp.html @@ -0,0 +1,86 @@ + + + + + +sql/overview/basicbrowsing2/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/basicbrowsing2/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlquery.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv, FALSE );
+
+    if ( createConnections() ) {
+        TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" );
+        // Copy data from the oracle database to the ODBC (default)
+        // database
+        TQSqlQuery target;
+        TQSqlQuery query( "SELECT id, name FROM people", oracledb );
+        int count = 0;
+        if ( query.isActive() ) {
+            while ( query.next() ) {
+                target.exec( "INSERT INTO people ( id, name ) VALUES ( " +
+                              query.value(0).toString() +
+                              ", '" + query.value(1).toString() +  "' )" );
+                if ( target.isActive() )
+                    count += target.numRowsAffected();
+            }
+        }
+    }
+
+    return 0;
+}
+
+
+
+
+
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-basicdatamanip-main-cpp.html b/doc/html/sql-overview-basicdatamanip-main-cpp.html new file mode 100644 index 00000000..33332fb0 --- /dev/null +++ b/doc/html/sql-overview-basicdatamanip-main-cpp.html @@ -0,0 +1,83 @@ + + + + + +sql/overview/basicdatamanip/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/basicdatamanip/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlquery.h>
+#include "../connection.h"
+
+bool createConnections();
+
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv, FALSE );
+
+    int rows = 0;
+
+    if ( createConnections() ) {
+        TQSqlQuery query( "INSERT INTO staff ( id, forename, surname, salary ) "
+                     "VALUES ( 1155, 'Ginger', 'Davis', 50000 )" );
+        if ( query.isActive() ) rows += query.numRowsAffected() ;
+
+        query.exec( "UPDATE staff SET salary=60000 WHERE id=1155" );
+        if ( query.isActive() ) rows += query.numRowsAffected() ;
+
+        query.exec( "DELETE FROM staff WHERE id=1155" );
+        if ( query.isActive() ) rows += query.numRowsAffected() ;
+    }
+
+    return ( rows == 3 ) ? 0 : 1;
+}
+
+
+
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-connect1-main-cpp.html b/doc/html/sql-overview-connect1-main-cpp.html new file mode 100644 index 00000000..98e1a8b5 --- /dev/null +++ b/doc/html/sql-overview-connect1-main-cpp.html @@ -0,0 +1,74 @@ + + + + + +sql/overview/connect1/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/connect1/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include "../connection.h"
+
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv, FALSE );
+
+    TQSqlDatabase *defaultDB = TQSqlDatabase::addDatabase( DB_SALES_DRIVER );
+    defaultDB->setDatabaseName( DB_SALES_DBNAME );
+    defaultDB->setUserName( DB_SALES_USER );
+    defaultDB->setPassword( DB_SALES_PASSWD );
+    defaultDB->setHostName( DB_SALES_HOST );
+
+    if ( defaultDB->open() ) {
+        // Database successfully opened; we can now issue SQL commands.
+    }
+
+    return 0;
+}
+
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-create_connections-main-cpp.html b/doc/html/sql-overview-create_connections-main-cpp.html new file mode 100644 index 00000000..de9b9621 --- /dev/null +++ b/doc/html/sql-overview-create_connections-main-cpp.html @@ -0,0 +1,69 @@ + + + + + +sql/overview/create_connections/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/create_connections/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv, FALSE );
+
+    if ( createConnections() ) {
+        // Databases successfully opened; get pointers to them:
+        TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" );
+        // Now we can now issue SQL commands to the oracle connection
+        // or to the default connection
+    }
+
+    return 0;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-custom1-main-cpp.html b/doc/html/sql-overview-custom1-main-cpp.html new file mode 100644 index 00000000..87f8f279 --- /dev/null +++ b/doc/html/sql-overview-custom1-main-cpp.html @@ -0,0 +1,152 @@ + + + + + +sql/overview/custom1/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/custom1/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "main.h"
+
+
+CustomEdit::CustomEdit( TQWidget *parent, const char *name ) :
+    TQLineEdit( parent, name )
+{
+    connect( this, SIGNAL(textChanged(const TQString &)),
+             this, SLOT(changed(const TQString &)) );
+}
+
+
+void CustomEdit::changed( const TQString &line )
+{
+    setUpperLine( line );
+}
+
+
+void CustomEdit::setUpperLine( const TQString &line )
+{
+    upperLineText = line.upper();
+    setText( upperLineText );
+}
+
+
+TQString CustomEdit::upperLine() const
+{
+    return upperLineText;
+}
+
+
+FormDialog::FormDialog()
+{
+    TQLabel      *forenameLabel  = new TQLabel( "Forename:", this );
+    CustomEdit  *forenameEdit   = new CustomEdit( this );
+    TQLabel      *surnameLabel   = new TQLabel( "Surname:", this );
+    CustomEdit  *surnameEdit    = new CustomEdit( this );
+    TQLabel      *salaryLabel    = new TQLabel( "Salary:", this );
+    TQLineEdit   *salaryEdit     = new TQLineEdit( this );
+    salaryEdit->setAlignment( TQt::AlignRight );
+    TQPushButton *saveButton     = new TQPushButton( "&Save", this );
+    connect( saveButton, SIGNAL(clicked()), this, SLOT(save()) );
+
+    TQGridLayout *grid = new TQGridLayout( this );
+    grid->addWidget( forenameLabel, 0, 0 );
+    grid->addWidget( forenameEdit,  0, 1 );
+    grid->addWidget( surnameLabel,  1, 0 );
+    grid->addWidget( surnameEdit,   1, 1 );
+    grid->addWidget( salaryLabel,   2, 0 );
+    grid->addWidget( salaryEdit,    2, 1 );
+    grid->addWidget( saveButton,    3, 0 );
+    grid->activate();
+
+    staffCursor = new TQSqlCursor( "staff" );
+    staffCursor->setTrimmed( "forename", TRUE );
+    staffCursor->setTrimmed( "surname",  TRUE );
+    idIndex = staffCursor->index( "id" );
+    staffCursor->select( idIndex );
+    staffCursor->first();
+
+    propMap = new TQSqlPropertyMap;
+    propMap->insert( forenameEdit->className(), "upperLine" );
+
+    sqlForm = new TQSqlForm( this );
+    sqlForm->setRecord( staffCursor->primeUpdate() );
+    sqlForm->installPropertyMap( propMap );
+    sqlForm->insert( forenameEdit, "forename" );
+    sqlForm->insert( surnameEdit, "surname" );
+    sqlForm->insert( salaryEdit, "salary" );
+    sqlForm->readFields();
+}
+
+
+FormDialog::~FormDialog()
+{
+    delete staffCursor;
+}
+
+
+void FormDialog::save()
+{
+    sqlForm->writeFields();
+    staffCursor->update();
+    staffCursor->select( idIndex );
+    staffCursor->first();
+}
+
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    if ( ! createConnections() )
+        return 1;
+
+    FormDialog *formDialog = new FormDialog();
+    formDialog->show();
+    app.setMainWidget( formDialog );
+
+    return app.exec();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-custom1-main-h.html b/doc/html/sql-overview-custom1-main-h.html new file mode 100644 index 00000000..673c4030 --- /dev/null +++ b/doc/html/sql-overview-custom1-main-h.html @@ -0,0 +1,95 @@ + + + + + +sql/overview/custom1/main.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/custom1/main.h Example File

+ + +
/****************************************************************************
+** $Id: qt/main.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qdialog.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include <qsqlform.h>
+#include <qsqlpropertymap.h>
+#include "../connection.h"
+
+class CustomEdit : public TQLineEdit
+{
+    Q_OBJECT
+    Q_PROPERTY( TQString upperLine READ upperLine WRITE setUpperLine )
+    public:
+        CustomEdit( TQWidget *parent=0, const char *name=0 );
+        TQString upperLine() const;
+        void setUpperLine( const TQString &line );
+    public slots:
+        void changed( const TQString &line );
+    private:
+        TQString upperLineText;
+};
+
+
+class FormDialog : public TQDialog
+{
+    Q_OBJECT
+    public:
+        FormDialog();
+        ~FormDialog();
+    public slots:
+        void save();
+    private:
+        TQSqlCursor *staffCursor;
+        TQSqlForm *sqlForm;
+        TQSqlPropertyMap *propMap;
+        TQSqlIndex idIndex;
+};
+
+
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-delete-main-cpp.html b/doc/html/sql-overview-delete-main-cpp.html new file mode 100644 index 00000000..af8cb1f0 --- /dev/null +++ b/doc/html/sql-overview-delete-main-cpp.html @@ -0,0 +1,72 @@ + + + + + +sql/overview/delete/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/delete/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv, FALSE );
+
+    if ( createConnections() ) {
+        TQSqlCursor cur( "prices" );
+        cur.select( "id=999" );
+        if ( cur.next() ) {
+            cur.primeDelete();
+            cur.del();
+        }
+    }
+
+    return 0;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-extract-main-cpp.html b/doc/html/sql-overview-extract-main-cpp.html new file mode 100644 index 00000000..68bdc82c --- /dev/null +++ b/doc/html/sql-overview-extract-main-cpp.html @@ -0,0 +1,84 @@ + + + + + +sql/overview/extract/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/extract/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv, FALSE );
+
+    if ( createConnections() ) {
+        TQSqlCursor cur( "creditors" );
+
+        TQStringList orderFields = TQStringList() << "surname" << "forename";
+        TQSqlIndex order = cur.index( orderFields );
+
+        TQStringList filterFields = TQStringList() << "surname" << "city";
+        TQSqlIndex filter = cur.index( filterFields );
+        cur.setValue( "surname", "Chirac" );
+        cur.setValue( "city", "Paris" );
+
+        cur.select( filter, order );
+
+        while ( cur.next() ) {
+            int id = cur.value( "id" ).toInt();
+            TQString name = cur.value( "forename" ).toString() + " " +
+                           cur.value( "surname" ).toString();
+            qDebug( TQString::number( id ) + ": " + name );
+        }
+    }
+
+    return 0;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-form1-main-cpp.html b/doc/html/sql-overview-form1-main-cpp.html new file mode 100644 index 00000000..a9b1fd62 --- /dev/null +++ b/doc/html/sql-overview-form1-main-cpp.html @@ -0,0 +1,112 @@ + + + + + +sql/overview/form1/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/form1/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qdialog.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qlineedit.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include <qsqlform.h>
+#include "../connection.h"
+
+class FormDialog : public TQDialog
+{
+    public:
+        FormDialog();
+};
+
+
+FormDialog::FormDialog()
+{
+    TQLabel *forenameLabel   = new TQLabel( "Forename:", this );
+    TQLabel *forenameDisplay = new TQLabel( this );
+    TQLabel *surnameLabel    = new TQLabel( "Surname:", this );
+    TQLabel *surnameDisplay  = new TQLabel( this );
+    TQLabel *salaryLabel     = new TQLabel( "Salary:", this );
+    TQLineEdit *salaryEdit   = new TQLineEdit( this );
+
+    TQGridLayout *grid = new TQGridLayout( this );
+    grid->addWidget( forenameLabel,     0, 0 );
+    grid->addWidget( forenameDisplay,   0, 1 );
+    grid->addWidget( surnameLabel,      1, 0 );
+    grid->addWidget( surnameDisplay,    1, 1 );
+    grid->addWidget( salaryLabel,       2, 0 );
+    grid->addWidget( salaryEdit,        2, 1 );
+    grid->activate();
+
+    TQSqlCursor staffCursor( "staff" );
+    staffCursor.select();
+    staffCursor.next();
+
+    TQSqlForm sqlForm( this );
+    sqlForm.setRecord( staffCursor.primeUpdate() );
+    sqlForm.insert( forenameDisplay, "forename" );
+    sqlForm.insert( surnameDisplay, "surname" );
+    sqlForm.insert( salaryEdit, "salary" );
+    sqlForm.readFields();
+}
+
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    if ( ! createConnections() ) return 1;
+
+    FormDialog *formDialog = new FormDialog();
+    formDialog->show();
+    app.setMainWidget( formDialog );
+
+    return app.exec();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-form2-main-h.html b/doc/html/sql-overview-form2-main-h.html new file mode 100644 index 00000000..8931d7d3 --- /dev/null +++ b/doc/html/sql-overview-form2-main-h.html @@ -0,0 +1,76 @@ + + + + + +sql/overview/form2/main.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/form2/main.h Example File

+ + +
/****************************************************************************
+** $Id: qt/main.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qdialog.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include <qsqlform.h>
+#include "../connection.h"
+
+class FormDialog : public TQDialog
+{
+    Q_OBJECT
+    public:
+        FormDialog();
+        ~FormDialog();
+    public slots:
+        void save();
+    private:
+        TQSqlCursor staffCursor;
+        TQSqlForm *sqlForm;
+        TQSqlIndex idIndex;
+};
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-insert-main-cpp.html b/doc/html/sql-overview-insert-main-cpp.html new file mode 100644 index 00000000..477c1d84 --- /dev/null +++ b/doc/html/sql-overview-insert-main-cpp.html @@ -0,0 +1,80 @@ + + + + + +sql/overview/insert/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/insert/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv, FALSE );
+
+    if ( createConnections() ) {
+        int count = 0;
+        TQSqlCursor cur( "prices" );
+        TQStringList names = TQStringList() <<
+            "Screwdriver" << "Hammer" << "Wrench" << "Saw";
+        int id = 20;
+        for ( TQStringList::Iterator name = names.begin();
+              name != names.end(); ++name ) {
+            TQSqlRecord *buffer = cur.primeInsert();
+            buffer->setValue( "id", id );
+            buffer->setValue( "name", *name );
+            buffer->setValue( "price", 100.0 + (double)id );
+            count += cur.insert();
+            id++;
+        }
+    }
+
+    return 0;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-navigating-main-cpp.html b/doc/html/sql-overview-navigating-main-cpp.html new file mode 100644 index 00000000..0da2adf1 --- /dev/null +++ b/doc/html/sql-overview-navigating-main-cpp.html @@ -0,0 +1,76 @@ + + + + + +sql/overview/navigating/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/navigating/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlquery.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv, FALSE );
+
+    if ( createConnections() ) {
+        TQSqlQuery query( "SELECT id, name FROM people ORDER BY name" );
+        if ( ! query.isActive() ) return 1; // Query failed
+        int i;
+        i = query.size();               // In this example we have 9 records; i == 9.
+        query.first();                  // Moves to the first record.
+        i = query.at();                 // i == 0
+        query.last();                   // Moves to the last record.
+        i = query.at();                 // i == 8
+        query.seek( query.size() / 2 ); // Moves to the middle record.
+        i = query.at();                 // i == 4
+    }
+
+    return 0;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-order1-main-cpp.html b/doc/html/sql-overview-order1-main-cpp.html new file mode 100644 index 00000000..65b7291a --- /dev/null +++ b/doc/html/sql-overview-order1-main-cpp.html @@ -0,0 +1,75 @@ + + + + + +sql/overview/order1/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/order1/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv, FALSE );
+
+    if ( createConnections() ) {
+        TQSqlCursor cur( "staff" );
+        TQStringList fields = TQStringList() << "surname" << "forename";
+        TQSqlIndex order = cur.index( fields );
+        cur.select( order );
+        while ( cur.next() ) {
+            qDebug( cur.value( "id" ).toString() + ": " +
+                    cur.value( "surname" ).toString() + " " +
+                    cur.value( "forename" ).toString() );
+        }
+    }
+
+    return 0;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-order2-main-cpp.html b/doc/html/sql-overview-order2-main-cpp.html new file mode 100644 index 00000000..dcbfad20 --- /dev/null +++ b/doc/html/sql-overview-order2-main-cpp.html @@ -0,0 +1,77 @@ + + + + + +sql/overview/order2/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/order2/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv, FALSE );
+
+    if ( createConnections() ) {
+        TQSqlCursor cur( "staff" );
+        TQStringList fields = TQStringList() << "id" << "forename";
+        TQSqlIndex order = cur.index( fields );
+        TQSqlIndex filter = cur.index( "surname" );
+        cur.setValue( "surname", "Bloggs" );
+        cur.select( filter, order );
+        while ( cur.next() ) {
+            qDebug( cur.value( "id" ).toString() + ": " +
+                    cur.value( "surname" ).toString() + " " +
+                    cur.value( "forename" ).toString() );
+        }
+    }
+
+    return 0;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-retrieve1-main-cpp.html b/doc/html/sql-overview-retrieve1-main-cpp.html new file mode 100644 index 00000000..934567c6 --- /dev/null +++ b/doc/html/sql-overview-retrieve1-main-cpp.html @@ -0,0 +1,73 @@ + + + + + +sql/overview/retrieve1/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/retrieve1/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlquery.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv, FALSE );
+
+    if ( createConnections() ) {
+        TQSqlQuery query( "SELECT id, surname FROM staff" );
+        if ( query.isActive() ) {
+            while ( query.next() ) {
+                qDebug( query.value(0).toString() + ": " +
+                        query.value(1).toString() );
+            }
+        }
+    }
+
+    return 0;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-retrieve2-main-cpp.html b/doc/html/sql-overview-retrieve2-main-cpp.html new file mode 100644 index 00000000..144166f1 --- /dev/null +++ b/doc/html/sql-overview-retrieve2-main-cpp.html @@ -0,0 +1,73 @@ + + + + + +sql/overview/retrieve2/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/retrieve2/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    if ( createConnections() ) {
+        TQSqlCursor cur( "staff" ); // Specify the table/view name
+        cur.select(); // We'll retrieve every record
+        while ( cur.next() ) {
+            qDebug( cur.value( "id" ).toString() + ": " +
+                    cur.value( "surname" ).toString() + " " +
+                    cur.value( "salary" ).toString() );
+        }
+    }
+
+    return 0;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-subclass1-main-cpp.html b/doc/html/sql-overview-subclass1-main-cpp.html new file mode 100644 index 00000000..b58fb916 --- /dev/null +++ b/doc/html/sql-overview-subclass1-main-cpp.html @@ -0,0 +1,81 @@ + + + + + +sql/overview/subclass1/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/subclass1/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include <qdatatable.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    if ( createConnections() ) {
+        TQSqlCursor invoiceItemCursor( "invoiceitem" );
+
+        TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor );
+
+        app.setMainWidget( invoiceItemTable );
+
+        invoiceItemTable->addColumn( "pricesid", "PriceID" );
+        invoiceItemTable->addColumn( "quantity", "Quantity" );
+        invoiceItemTable->addColumn( "paiddate", "Paid" );
+
+        invoiceItemTable->refresh();
+        invoiceItemTable->show();
+
+        return app.exec();
+    }
+
+    return 1;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-subclass2-main-cpp.html b/doc/html/sql-overview-subclass2-main-cpp.html new file mode 100644 index 00000000..8aafd5a8 --- /dev/null +++ b/doc/html/sql-overview-subclass2-main-cpp.html @@ -0,0 +1,85 @@ + + + + + +sql/overview/subclass2/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/subclass2/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "main.h"
+#include <qdatatable.h>
+
+InvoiceItemCursor::InvoiceItemCursor() :
+    TQSqlCursor( "invoiceitem" )
+{
+    // NOOP
+}
+
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    if ( createConnections() ) {
+        InvoiceItemCursor invoiceItemCursor;
+
+        TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor );
+
+        app.setMainWidget( invoiceItemTable );
+
+        invoiceItemTable->addColumn( "pricesid", "PriceID" );
+        invoiceItemTable->addColumn( "quantity", "Quantity" );
+        invoiceItemTable->addColumn( "paiddate", "Paid" );
+
+        invoiceItemTable->refresh();
+        invoiceItemTable->show();
+
+        return app.exec();
+    }
+
+    return 1;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-subclass2-main-h.html b/doc/html/sql-overview-subclass2-main-h.html new file mode 100644 index 00000000..ed540a47 --- /dev/null +++ b/doc/html/sql-overview-subclass2-main-h.html @@ -0,0 +1,66 @@ + + + + + +sql/overview/subclass2/main.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/subclass2/main.h Example File

+ + +
/****************************************************************************
+** $Id: qt/main.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include "../connection.h"
+
+class TQSqlRecord;
+
+class InvoiceItemCursor : public TQSqlCursor
+{
+    public:
+        InvoiceItemCursor();
+};
+
+
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-subclass3-main-cpp.html b/doc/html/sql-overview-subclass3-main-cpp.html new file mode 100644 index 00000000..d94410b5 --- /dev/null +++ b/doc/html/sql-overview-subclass3-main-cpp.html @@ -0,0 +1,100 @@ + + + + + +sql/overview/subclass3/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/subclass3/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "main.h"
+#include <qdatatable.h>
+
+InvoiceItemCursor::InvoiceItemCursor() :
+    TQSqlCursor( "invoiceitem" )
+{
+    TQSqlFieldInfo productName( "productname", TQVariant::String );
+    append( productName );
+    setCalculated( productName.name(), TRUE );
+}
+
+
+TQVariant InvoiceItemCursor::calculateField( const TQString & name )
+{
+    if ( name == "productname" ) {
+        TQSqlQuery query( "SELECT name FROM prices WHERE id=" +
+                     field( "pricesid" )->value().toString() );
+        if ( query.next() )
+            return query.value( 0 );
+    }
+
+    return TQVariant( TQString::null );
+}
+
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    if ( createConnections() ) {
+        InvoiceItemCursor invoiceItemCursor;
+
+        TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor );
+
+        app.setMainWidget( invoiceItemTable );
+
+        invoiceItemTable->addColumn( "productname", "Product" );
+        invoiceItemTable->addColumn( "quantity",    "Quantity" );
+        invoiceItemTable->addColumn( "paiddate",    "Paid" );
+
+        invoiceItemTable->refresh();
+        invoiceItemTable->show();
+
+        return app.exec();
+    }
+
+    return 1;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-subclass3-main-h.html b/doc/html/sql-overview-subclass3-main-h.html new file mode 100644 index 00000000..e1dfb0e7 --- /dev/null +++ b/doc/html/sql-overview-subclass3-main-h.html @@ -0,0 +1,68 @@ + + + + + +sql/overview/subclass3/main.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/subclass3/main.h Example File

+ + +
/****************************************************************************
+** $Id: qt/main.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include "../connection.h"
+
+class TQSqlRecord;
+
+class InvoiceItemCursor : public TQSqlCursor
+{
+    public:
+        InvoiceItemCursor();
+    protected:
+        TQVariant calculateField( const TQString & name );
+};
+
+
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-subclass4-main-cpp.html b/doc/html/sql-overview-subclass4-main-cpp.html new file mode 100644 index 00000000..79bd7111 --- /dev/null +++ b/doc/html/sql-overview-subclass4-main-cpp.html @@ -0,0 +1,124 @@ + + + + + +sql/overview/subclass4/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/subclass4/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "main.h"
+#include <qdatatable.h>
+
+InvoiceItemCursor::InvoiceItemCursor() :
+    TQSqlCursor( "invoiceitem" )
+{
+    TQSqlFieldInfo productName( "productname", TQVariant::String );
+    append( productName );
+    setCalculated( productName.name(), TRUE );
+
+    TQSqlFieldInfo productPrice( "price", TQVariant::Double );
+    append( productPrice );
+    setCalculated( productPrice.name(), TRUE );
+
+    TQSqlFieldInfo productCost( "cost", TQVariant::Double );
+    append( productCost );
+    setCalculated( productCost.name(), TRUE );
+}
+
+
+TQVariant InvoiceItemCursor::calculateField( const TQString & name )
+{
+
+    if ( name == "productname" ) {
+        TQSqlQuery query( "SELECT name FROM prices WHERE id=" +
+                     field( "pricesid" )->value().toString() );
+        if ( query.next() )
+            return query.value( 0 );
+    }
+    else if ( name == "price" ) {
+        TQSqlQuery query( "SELECT price FROM prices WHERE id=" +
+                     field( "pricesid" )->value().toString() );
+        if ( query.next() )
+            return query.value( 0 );
+    }
+    else if ( name == "cost" ) {
+        TQSqlQuery query( "SELECT price FROM prices WHERE id=" +
+                     field( "pricesid" )->value().toString() );
+        if ( query.next() )
+            return TQVariant( query.value( 0 ).toDouble() *
+                             value( "quantity").toDouble() );
+    }
+
+    return TQVariant( TQString::null );
+}
+
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    if ( createConnections() ) {
+        InvoiceItemCursor invoiceItemCursor;
+
+        TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor );
+
+        app.setMainWidget( invoiceItemTable );
+
+        invoiceItemTable->addColumn( "productname", "Product" );
+        invoiceItemTable->addColumn( "price",       "Price" );
+        invoiceItemTable->addColumn( "quantity",    "Quantity" );
+        invoiceItemTable->addColumn( "cost",        "Cost" );
+        invoiceItemTable->addColumn( "paiddate",    "Paid" );
+
+        invoiceItemTable->refresh();
+        invoiceItemTable->show();
+
+        return app.exec();
+    }
+
+    return 1;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-subclass4-main-h.html b/doc/html/sql-overview-subclass4-main-h.html new file mode 100644 index 00000000..c5703aaa --- /dev/null +++ b/doc/html/sql-overview-subclass4-main-h.html @@ -0,0 +1,68 @@ + + + + + +sql/overview/subclass4/main.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/subclass4/main.h Example File

+ + +
/****************************************************************************
+** $Id: qt/main.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include "../connection.h"
+
+class TQSqlRecord;
+
+class InvoiceItemCursor : public TQSqlCursor
+{
+    public:
+        InvoiceItemCursor();
+    protected:
+        TQVariant calculateField( const TQString & name );
+};
+
+
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-subclass5-main-cpp.html b/doc/html/sql-overview-subclass5-main-cpp.html new file mode 100644 index 00000000..275212bf --- /dev/null +++ b/doc/html/sql-overview-subclass5-main-cpp.html @@ -0,0 +1,137 @@ + + + + + +sql/overview/subclass5/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/subclass5/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "main.h"
+#include <qdatatable.h>
+
+InvoiceItemCursor::InvoiceItemCursor() :
+    TQSqlCursor( "invoiceitem" )
+{
+    TQSqlFieldInfo productName( "productname", TQVariant::String );
+    append( productName );
+    setCalculated( productName.name(), TRUE );
+
+    TQSqlFieldInfo productPrice( "price", TQVariant::Double );
+    append( productPrice );
+    setCalculated( productPrice.name(), TRUE );
+
+    TQSqlFieldInfo productCost( "cost", TQVariant::Double );
+    append( productCost );
+    setCalculated( productCost.name(), TRUE );
+}
+
+
+TQVariant InvoiceItemCursor::calculateField( const TQString & name )
+{
+
+    if ( name == "productname" ) {
+        TQSqlQuery query( "SELECT name FROM prices WHERE id=" +
+                     field( "pricesid" )->value().toString() );
+        if ( query.next() )
+            return query.value( 0 );
+    }
+    else if ( name == "price" ) {
+        TQSqlQuery query( "SELECT price FROM prices WHERE id=" +
+                     field( "pricesid" )->value().toString() );
+        if ( query.next() )
+            return query.value( 0 );
+    }
+    else if ( name == "cost" ) {
+        TQSqlQuery query( "SELECT price FROM prices WHERE id=" +
+                     field( "pricesid" )->value().toString() );
+        if ( query.next() )
+            return TQVariant( query.value( 0 ).toDouble() *
+                             value( "quantity").toDouble() );
+    }
+
+    return TQVariant( TQString::null );
+}
+
+
+TQSqlRecord *InvoiceItemCursor::primeInsert()
+{
+    TQSqlRecord *buffer = editBuffer();
+    TQSqlQuery query( "SELECT NEXTVAL( 'invoiceitem_seq' )" );
+    if ( query.next() )
+        buffer->setValue( "id", query.value( 0 ) );
+    buffer->setValue( "paiddate", TQDate::currentDate() );
+    buffer->setValue( "quantity", 1 );
+
+    return buffer;
+}
+
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    if ( createConnections() ) {
+        InvoiceItemCursor invoiceItemCursor;
+
+        TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor );
+
+        app.setMainWidget( invoiceItemTable );
+
+        invoiceItemTable->addColumn( "productname", "Product" );
+        invoiceItemTable->addColumn( "price",       "Price" );
+        invoiceItemTable->addColumn( "quantity",    "Quantity" );
+        invoiceItemTable->addColumn( "cost",        "Cost" );
+        invoiceItemTable->addColumn( "paiddate",    "Paid" );
+
+        invoiceItemTable->refresh();
+        invoiceItemTable->show();
+
+        return app.exec();
+    }
+
+    return 1;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-subclass5-main-h.html b/doc/html/sql-overview-subclass5-main-h.html new file mode 100644 index 00000000..f8cf7c6f --- /dev/null +++ b/doc/html/sql-overview-subclass5-main-h.html @@ -0,0 +1,68 @@ + + + + + +sql/overview/subclass5/main.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/subclass5/main.h Example File

+ + +
/****************************************************************************
+** $Id: qt/main.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qdatetime.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include "../connection.h"
+
+class TQSqlRecord;
+
+class InvoiceItemCursor : public TQSqlCursor
+{
+    public:
+        InvoiceItemCursor();
+        TQSqlRecord *primeInsert();
+    protected:
+        TQVariant calculateField( const TQString & name );
+};
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-table1-main-cpp.html b/doc/html/sql-overview-table1-main-cpp.html new file mode 100644 index 00000000..84dec646 --- /dev/null +++ b/doc/html/sql-overview-table1-main-cpp.html @@ -0,0 +1,74 @@ + + + + + +sql/overview/table1/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/table1/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include <qdatatable.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    if ( createConnections() ) {
+        TQSqlCursor staffCursor( "staff" );
+        TQDataTable *staffTable = new TQDataTable( &staffCursor, TRUE );
+        app.setMainWidget( staffTable );
+        staffTable->refresh();
+        staffTable->show();
+
+        return app.exec();
+    }
+
+    return 0;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-table2-main-cpp.html b/doc/html/sql-overview-table2-main-cpp.html new file mode 100644 index 00000000..e8b207c5 --- /dev/null +++ b/doc/html/sql-overview-table2-main-cpp.html @@ -0,0 +1,84 @@ + + + + + +sql/overview/table2/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/table2/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include <qdatatable.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    if ( createConnections() ) {
+        TQSqlCursor staffCursor( "staff" );
+
+        TQDataTable *staffTable = new TQDataTable( &staffCursor );
+
+        app.setMainWidget( staffTable );
+
+        staffTable->addColumn( "forename", "Forename" );
+        staffTable->addColumn( "surname",  "Surname" );
+        staffTable->addColumn( "salary",   "Annual Salary" );
+
+        TQStringList order = TQStringList() << "surname" << "forename";
+        staffTable->setSort( order );
+
+        staffTable->refresh();
+        staffTable->show();
+
+        return app.exec();
+    }
+
+    return 1;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-table3-main-cpp.html b/doc/html/sql-overview-table3-main-cpp.html new file mode 100644 index 00000000..c4ca142e --- /dev/null +++ b/doc/html/sql-overview-table3-main-cpp.html @@ -0,0 +1,133 @@ + + + + + +sql/overview/table3/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/table3/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "main.h"
+#include <qdatatable.h>
+
+StatusPicker::StatusPicker( TQWidget *parent, const char *name )
+    : TQComboBox( parent, name )
+{
+    TQSqlCursor cur( "status" );
+    cur.select( cur.index( "name" ) );
+
+    int i = 0;
+    while ( cur.next() ) {
+        insertItem( cur.value( "name" ).toString(), i );
+        index2id[i] = cur.value( "id" ).toInt();
+        i++;
+    }
+}
+
+
+int StatusPicker::statusId() const
+{
+    return index2id[ currentItem() ];
+}
+
+
+void StatusPicker::setStatusId( int statusid )
+{
+    TQMap<int,int>::Iterator it;
+    for ( it = index2id.begin(); it != index2id.end(); ++it ) {
+        if ( it.data() == statusid ) {
+            setCurrentItem( it.key() );
+            break;
+        }
+    }
+}
+
+
+
+TQWidget *CustomSqlEditorFactory::createEditor(
+    TQWidget *parent, const TQSqlField *field )
+{
+    if ( field->name() == "statusid" ) {
+        TQWidget *editor = new StatusPicker( parent );
+        return editor;
+    }
+
+    return TQSqlEditorFactory::createEditor( parent, field );
+}
+
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    if ( createConnections() ) {
+        TQSqlCursor staffCursor( "staff" );
+
+        TQDataTable              *staffTable     = new TQDataTable( &staffCursor );
+        TQSqlPropertyMap         *propMap        = new TQSqlPropertyMap();
+        CustomSqlEditorFactory  *editorFactory  = new CustomSqlEditorFactory();
+        propMap->insert( "StatusPicker", "statusid" );
+        staffTable->installPropertyMap( propMap );
+        staffTable->installEditorFactory( editorFactory );
+
+        app.setMainWidget( staffTable );
+
+        staffTable->addColumn( "forename", "Forename" );
+        staffTable->addColumn( "surname",  "Surname" );
+        staffTable->addColumn( "salary",   "Annual Salary" );
+        staffTable->addColumn( "statusid", "Status" );
+
+        TQStringList order = TQStringList() << "surname" << "forename";
+        staffTable->setSort( order );
+
+        staffTable->refresh();
+        staffTable->show();
+
+        return app.exec();
+    }
+
+    return 1;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-table3-main-h.html b/doc/html/sql-overview-table3-main-h.html new file mode 100644 index 00000000..42affd6f --- /dev/null +++ b/doc/html/sql-overview-table3-main-h.html @@ -0,0 +1,83 @@ + + + + + +sql/overview/table3/main.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/table3/main.h Example File

+ + +
/****************************************************************************
+** $Id: qt/main.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qcombobox.h>
+#include <qmap.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include <qsqleditorfactory.h>
+#include <qsqlpropertymap.h>
+#include "../connection.h"
+
+class StatusPicker : public TQComboBox
+{
+    Q_OBJECT
+    Q_PROPERTY( int statusid READ statusId WRITE setStatusId )
+    public:
+        StatusPicker( TQWidget *parent=0, const char *name=0 );
+        int statusId() const;
+        void setStatusId( int id );
+    private:
+        TQMap< int, int > index2id;
+};
+
+
+class CustomSqlEditorFactory : public TQSqlEditorFactory
+{
+    Q_OBJECT
+    public:
+        TQWidget *createEditor( TQWidget *parent, const TQSqlField *field );
+};
+
+
+
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-table4-main-cpp.html b/doc/html/sql-overview-table4-main-cpp.html new file mode 100644 index 00000000..0a585269 --- /dev/null +++ b/doc/html/sql-overview-table4-main-cpp.html @@ -0,0 +1,152 @@ + + + + + +sql/overview/table4/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/table4/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "main.h"
+
+
+StatusPicker::StatusPicker( TQWidget *parent, const char *name )
+    : TQComboBox( parent, name )
+{
+    TQSqlCursor cur( "status" );
+    cur.select( cur.index( "name" ) );
+
+    int i = 0;
+    while ( cur.next() ) {
+        insertItem( cur.value( "name" ).toString(), i );
+        index2id[i] = cur.value( "id" ).toInt();
+        i++;
+    }
+}
+
+
+int StatusPicker::statusId() const
+{
+    return index2id[ currentItem() ];
+}
+
+
+void StatusPicker::setStatusId( int statusid )
+{
+    TQMap<int,int>::Iterator it;
+    for ( it = index2id.begin(); it != index2id.end(); ++it ) {
+        if ( it.data() == statusid ) {
+            setCurrentItem( it.key() );
+            break;
+        }
+    }
+}
+
+
+void CustomTable::paintField( TQPainter * p, const TQSqlField* field,
+                              const TQRect & cr, bool b)
+{
+    if ( !field )
+        return;
+    if ( field->name() == "statusid" ) {
+        TQSqlQuery query( "SELECT name FROM status WHERE id=" +
+                     field->value().toString() );
+        TQString text;
+        if ( query.next() ) {
+            text = query.value( 0 ).toString();
+        }
+        p->drawText( 2,2, cr.width()-4, cr.height()-4, fieldAlignment( field ), text );
+    }
+    else {
+        TQDataTable::paintField( p, field, cr, b) ;
+    }
+}
+
+
+TQWidget *CustomSqlEditorFactory::createEditor(
+    TQWidget *parent, const TQSqlField *field )
+{
+    if ( field->name() == "statusid" ) {
+        TQWidget *editor = new StatusPicker( parent );
+        return editor;
+    }
+
+    return TQSqlEditorFactory::createEditor( parent, field );
+}
+
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv );
+
+    if ( createConnections() ) {
+        TQSqlCursor staffCursor( "staff" );
+
+        CustomTable             *staffTable     = new CustomTable( &staffCursor );
+        TQSqlPropertyMap         *propMap        = new TQSqlPropertyMap();
+        CustomSqlEditorFactory  *editorFactory  = new CustomSqlEditorFactory();
+        propMap->insert( "StatusPicker", "statusid" );
+        staffTable->installPropertyMap( propMap );
+        staffTable->installEditorFactory( editorFactory );
+
+        app.setMainWidget( staffTable );
+
+        staffTable->addColumn( "forename", "Forename" );
+        staffTable->addColumn( "surname",  "Surname" );
+        staffTable->addColumn( "salary",   "Annual Salary" );
+        staffTable->addColumn( "statusid", "Status" );
+
+        TQStringList order = TQStringList() << "surname" << "forename";
+        staffTable->setSort( order );
+
+        staffTable->refresh();
+        staffTable->show();
+
+        return app.exec();
+    }
+
+    return 1;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-table4-main-h.html b/doc/html/sql-overview-table4-main-h.html new file mode 100644 index 00000000..a5d5240d --- /dev/null +++ b/doc/html/sql-overview-table4-main-h.html @@ -0,0 +1,96 @@ + + + + + +sql/overview/table4/main.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/table4/main.h Example File

+ + +
/****************************************************************************
+** $Id: qt/main.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qcombobox.h>
+#include <qmap.h>
+#include <qpainter.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include <qsqleditorfactory.h>
+#include <qsqlpropertymap.h>
+#include <qdatatable.h>
+#include "../connection.h"
+
+class StatusPicker : public TQComboBox
+{
+    Q_OBJECT
+    Q_PROPERTY( int statusid READ statusId WRITE setStatusId )
+public:
+    StatusPicker( TQWidget *parent=0, const char *name=0 );
+    int statusId() const;
+    void setStatusId( int id );
+private:
+    TQMap< int, int > index2id;
+};
+
+
+class CustomTable : public TQDataTable
+{
+    Q_OBJECT
+public:
+    CustomTable(
+            TQSqlCursor *cursor, bool autoPopulate = FALSE,
+            TQWidget * parent = 0, const char * name = 0 ) :
+        TQDataTable( cursor, autoPopulate, parent, name ) {}
+    void paintField(
+            TQPainter * p, const TQSqlField* field, const TQRect & cr, bool );
+
+};
+
+
+class CustomSqlEditorFactory : public TQSqlEditorFactory
+{
+    Q_OBJECT
+public:
+    TQWidget *createEditor( TQWidget *parent, const TQSqlField *field );
+};
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql-overview-update-main-cpp.html b/doc/html/sql-overview-update-main-cpp.html new file mode 100644 index 00000000..8ef5f43c --- /dev/null +++ b/doc/html/sql-overview-update-main-cpp.html @@ -0,0 +1,75 @@ + + + + + +sql/overview/update/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

sql/overview/update/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qsqlcursor.h>
+#include "../connection.h"
+
+int main( int argc, char *argv[] )
+{
+    TQApplication app( argc, argv, FALSE );
+
+    if ( createConnections() ) {
+        TQSqlCursor cur( "prices" );
+        cur.select( "id=202" );
+        if ( cur.next() ) {
+            TQSqlRecord *buffer = cur.primeUpdate();
+            double price = buffer->value( "price" ).toDouble();
+            double newprice = price * 1.05;
+            buffer->setValue( "price", newprice );
+            cur.update();
+        }
+    }
+
+    return 0;
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sql.html b/doc/html/sql.html new file mode 100644 index 00000000..7be337f7 --- /dev/null +++ b/doc/html/sql.html @@ -0,0 +1,1673 @@ + + + + + +SQL Module + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

SQL Module

+ + +

+

+ + + + +
TQSql +TQSqlCursor +TQSqlDatabase +TQSqlDriver +TQSqlDriverPlugin +
TQSqlEditorFactory +TQSqlError +TQSqlField +TQSqlFieldInfo +TQSqlForm +
TQSqlIndex +TQSqlPropertyMap +TQSqlQuery +TQSqlRecord +TQSqlRecordInfo +
TQSqlResult +TQSqlSelectCursor + See also: Supported Drivers +
+

+

+ + +

+

Introduction +

+

TQt's SQL classes help you provide seamless database integration to +your TQt applications. +

+This overview assumes that you have at least a basic knowledge of SQL. +You should be able to understand simple SELECT, INSERT, UPDATE +and DELETE commands. Although the TQSqlCursor class provides an +interface to database browsing and editing that does not retquire a +knowledge of SQL, a basic understanding of SQL is highly recommended. A +standard text covering SQL databases is An Introduction to Database Systems (7th ed.) by C. J. Date, ISBN 0201385902. +
+

Whilst this module overview presents the classes from a purely +programmatic point of view the TQt +Designer manual's "Creating Database Applications" chapter +takes a higher-level approach demonstrating how to set up +master-detail relationships between widgets, perform drilldown and +handle foreign key lookups. +

This document is divided into six sections: +

SQL Module Architecture. This describes +how the classes fit together. +

Connecting to Databases. +This section explains how to set up database connections using the TQSqlDatabase class. +

Executing SQL Commands. This +section demonstrates how to issue the standard data manipulation +commands, SELECT, INSERT, UPDATE and DELETE on tables in +the database (although any valid SQL statement can be sent to the +database). The focus is purely on database interaction using TQSqlQuery. +

Using Cursors. This section explains +how to use the TQSqlCursor class which provides a simpler API than the +raw SQL used with TQSqlQuery. +

Data-Aware Widgets. This section shows +how to programmatically link your database to the user interface. In +this section we introduce the TQDataTable, TQSqlForm, TQSqlPropertyMap and TQSqlEditorFactory classes and demonstrate how to +use custom data-aware widgets. TQt +Designer provides an easy visual way of achieving the same +thing. See the TQt Designer manual, +TQDataBrowser and TQDataView for more information. +

Subclassing TQSqlCursor. This +section gives examples of subclassing TQSqlCursor. Subclassing can be +used to provide default and calculated values for fields (such as +auto-numbered primary index fields), and to display calculated data, +e.g. showing names rather than ids of foreign keys. +

All the examples in this document use the tables defined in the +Example Tables section. +

+

SQL Module Architecture +

+

The SQL classes are divided into three layers: +

User Interface Layer. These classes provide data-aware widgets +that can be connected to tables or views in the database (by using a +TQSqlCursor as a data source). End users can interact directly with +these widgets to browse or edit data. TQt +Designer is fully integrated with the SQL classes and can be +used to create data-aware forms. The data-aware widgets can also be +programmed directly with your own C++ code. The classes that support +this layer include TQSqlEditorFactory, TQSqlForm, TQSqlPropertyMap, TQDataTable, TQDataBrowser and TQDataView. +

SQL API Layer. These classes provide access to databases. +Connections are made using the TQSqlDatabase class. Database +interaction is achieved either by using the TQSqlQuery class and +executing SQL commands directly or by using the higher level TQSqlCursor class which composes SQL commands automatically. In +addition to TQSqlDatabase, TQSqlCursor and TQSqlQuery, the SQL +API layer is supported by TQSqlError, TQSqlField, TQSqlFieldInfo, +TQSqlIndex, TQSqlRecord and TQSqlRecordInfo. +

Driver Layer. This comprises three classes, TQSqlResult, TQSqlDriver and TQSqlDriverFactoryInterface. This layer provides the +low level bridge between the database and the SQL classes. This layer +is documented separately since it is +only relevant to driver writers, and is rarely used in standard +database application programming. See here for more information on implementing a TQt SQL driver plugin. +

+

SQL Driver Plugins +

+

The TQt SQL module can dynamically load new drivers at runtime using +the Plugins. +

The SQL driver documentation describes +how to build plugins for specific database management systems. +

Once a plugin is built, TQt will automatically load it, and the driver +will be available for use by TQSqlDatabase (see TQSqlDatabase::drivers() +for more information). +

+

Connecting to Databases +

+

At least one database connection must be created and opened before the +TQSqlQuery or TQSqlCursor classes can be used. +

If the application only needs a single database connection, the TQSqlDatabase class can create a connection which is used by default +for all SQL operations. If multiple database connections are retquired +these can easily be set up. +

TQSqlDatabase retquires the qsqldatabase.h header file. +

+

Connecting to a Single Database +

+

Making a database connection is a simple three step process: activate +the driver, set up the connection information, and open the +connection. +

+ +

    #include <qapplication.h>
+    #include <qsqldatabase.h>
+    #include "../connection.h"
+
+    int main( int argc, char *argv[] )
+    {
+        TQApplication app( argc, argv, FALSE );
+
+        TQSqlDatabase *defaultDB = TQSqlDatabase::addDatabase( DB_SALES_DRIVER );
+        defaultDB->setDatabaseName( DB_SALES_DBNAME );
+        defaultDB->setUserName( DB_SALES_USER );
+        defaultDB->setPassword( DB_SALES_PASSWD );
+        defaultDB->setHostName( DB_SALES_HOST );
+
+        if ( defaultDB->open() ) {
+            // Database successfully opened; we can now issue SQL commands.
+        }
+
+        return 0;
+    }
+

From sql/overview/connect1/main.cpp +

+

First we activate the driver by calling TQSqlDatabase::addDatabase(), +passing the name of the driver we wish to use for this connection. At +the time of writing the available drivers are: TQODBC3 (Open Database +Connectivity, includes Microsoft SQL Server support), TQOCI8 (Oracle 8 and 9), +TQTDS7 (Sybase Adaptive Server), TQPSQL7 (PostgreSQL 6 and 7), +TQMYSQL3 (MySQL), TQDB2 (IBM DB2), TQSQLITE (SQLite) and TQIBASE (Interbase). +Note that some of these drivers aren't included in the TQt Open Source Edition; see +the README files for details. +

The connection which is created becomes the application's default +database connection and will be used by the TQt SQL classes if no +other database is specified. +

Second we call setDatabaseName(), setUserName(), setPassword() and +setHostName() to initialize the connection information. Note that for +the TQOCI8 (Oracle 8 and 9) driver the TNS Service Name must be passed +to setDatbaseName(). When connecting to ODBC data sources the Data +Source Name (DSN) should be used in the setDatabaseName() call. +

Third we call open() to open the database and give us access to the +data. If this call fails it will return FALSE; error information can +be obtained from TQSqlDatabase::lastError(). +

+

Connecting to Multiple Databases +

+

Connecting to multiple databases is achieved using the two argument form +of TQSqlDatabase::addDatabase() where the second argument is a unique +identifier distinguishing the connection. +

In the example below we have moved the connections into their own +function, createConnections(), and added some basic error handling. +

+#define DB_SALES_DRIVER     "TQPSQL7"
+#define DB_SALES_DBNAME     "sales"
+#define DB_SALES_USER       "salesperson"
+#define DB_SALES_PASSWD     "salesperson"
+#define DB_SALES_HOST       "database.domain.no"
+
+#define DB_ORDERS_DRIVER    "TQOCI8"
+#define DB_ORDERS_DBNAME    "orders"
+#define DB_ORDERS_USER      "orderperson"
+#define DB_ORDERS_PASSWD    "orderperson"
+#define DB_ORDERS_HOST      "database.domain.no"
+
+bool createConnections();
+
+ +

We set up some constants and also declare the createConnections() +function in connection.h. +

+ +

    #include <qsqldatabase.h>
+    #include "connection.h"
+
+    bool createConnections()
+    {
+
+        TQSqlDatabase *defaultDB = TQSqlDatabase::addDatabase( DB_SALES_DRIVER );
+        defaultDB->setDatabaseName( DB_SALES_DBNAME );
+        defaultDB->setUserName( DB_SALES_USER );
+        defaultDB->setPassword( DB_SALES_PASSWD );
+        defaultDB->setHostName( DB_SALES_HOST );
+        if ( ! defaultDB->open() ) {
+            qWarning( "Failed to open sales database: " + defaultDB->lastError().text() );
+            return FALSE;
+        }
+
+        TQSqlDatabase *oracle = TQSqlDatabase::addDatabase( DB_ORDERS_DRIVER, "ORACLE" );
+        oracle->setDatabaseName( DB_ORDERS_DBNAME );
+        oracle->setUserName( DB_ORDERS_USER );
+        oracle->setPassword( DB_ORDERS_PASSWD );
+        oracle->setHostName( DB_ORDERS_HOST );
+        if ( ! oracle->open() ) {
+            qWarning( "Failed to open orders database: " + oracle->lastError().text() );
+            return FALSE;
+        }
+
+        TQSqlQuery q(TQString::null, defaultDB);
+        q.exec("create table people (id integer primary key, name char(40))");
+        q.exec("create table staff (id integer primary key, forename char(40), "
+               "surname char(40), salary float, statusid integer)");
+        q.exec("create table status (id integer primary key, name char(30))");
+        q.exec("create table creditors (id integer primary key, forename char(40), "
+               "surname char(40), city char(30))");
+        q.exec("create table prices (id integer primary key, name char(40), price float)");
+        q.exec("create table invoiceitem (id integer primary key, "
+               "pricesid integer, quantity integer, paiddate date)");
+
+        TQSqlQuery q2(TQString::null, oracle);
+        q2.exec("create table people (id integer primary key, name char(40))");
+
+        return TRUE;
+    }
+

From sql/overview/connection.cpp +

+

We've chosen to isolate database connection in our createConnections() function.cpp. +

+ + +

    #include <qapplication.h>
+    #include <qsqldatabase.h>
+    #include "../connection.h"
+
+    int main( int argc, char *argv[] )
+    {
+        TQApplication app( argc, argv, FALSE );
+
+        if ( createConnections() ) {
+            // Databases successfully opened; get pointers to them:
+            TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" );
+            // Now we can now issue SQL commands to the oracle connection
+            // or to the default connection
+        }
+
+        return 0;
+    }
+

From sql/overview/create_connections/main.cpp +

+

The static function TQSqlDatabase::database() can be called from +anywhere to provide a pointer to a database connection. If we call it +without a parameter it will return the default connection. If called +with the identifier we've used for a connection, e.g. "ORACLE", in the +above example, it will return a pointer to the specified connection. +

If you create a main.cpp using TQt +Designer, it will not include our example +createConnections() function. This means that applications that +preview correctly in TQt Designer +will not run unless you implement your own database connections +function. +

Note that in the code above the ODBC connection was not named and is +therefore used as the default connection. TQSqlDatabase maintains +ownership of the pointers returned by the addDatabase() static +function. To remove a database from the list of maintained +connections, first close the database with TQSqlDatabase::close(), and +then remove it using the static function +TQSqlDatabase::removeDatabase(). +

+

Executing SQL Commands Using TQSqlQuery +

+

The TQSqlQuery class provides an interface for executing SQL commands. +It also has functions for navigating through the result sets of SELECT +queries and for retrieving individual records and field values. +

The TQSqlCursor class described in the next section inherits from TQSqlQuery and provides a higher level interface that composes SQL +commands for us. TQSqlCursor is particularly easy to integrate with +on-screen widgets. Programmers unfamiliar with SQL can safely skip this +section and use the TQSqlCursor class covered in +"Using TQSqlCursor". +

+

Transactions +

+

If the underlying database engine supports transactions +TQSqlDriver::hasFeature( TQSqlDriver::Transactions ) will return TRUE. +You can use TQSqlDatabase::transaction() to initiate a transaction, +followed by the SQL commands you want to execute within the context of +the transaction, and then either TQSqlDatabase::commit() or +TQSqlDatabase::rollback(). +

+

Basic Browsing +

+

+ +

    #include <qapplication.h>
+    #include <qsqldatabase.h>
+    #include <qsqlquery.h>
+    #include "../connection.h"
+
+    int main( int argc, char *argv[] )
+    {
+        TQApplication app( argc, argv, FALSE );
+
+        if ( createConnections() ) {
+            TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" );
+            // Copy data from the oracle database to the ODBC (default)
+            // database
+            TQSqlQuery target;
+            TQSqlQuery query( "SELECT id, name FROM people", oracledb );
+            if ( query.isActive() ) {
+                while ( query.next() ) {
+                    target.exec( "INSERT INTO people ( id, name ) VALUES ( " +
+                                  query.value(0).toString() +
+                                  ", '" + query.value(1).toString() +  "' )" );
+                }
+            }
+        }
+
+        return 0;
+    }
+

From sql/overview/basicbrowsing/main.cpp +

+

In the example above we've added an additional header file, +qsqlquery.h. The first query we create, target, uses the default +database and is initially empty. For the second query, q, we specify +the "ORACLE" database that we want to retrieve records from. Both the +database connections were set up in the createConnections() function we +wrote earlier. +

After creating the initial SELECT statement, isActive() is checked +to see if the query executed successfully. The next() function is +used to iterate through the query results. The value() function +returns the contents of fields as TQVariants. The insertions are +achieved by creating and executing queries against the default +database using the target TQSqlQuery. +

Note that this example and all the other examples in this document use +the tables defined in the Example Tables +section. +

+ +

            int count = 0;
+            if ( query.isActive() ) {
+                while ( query.next() ) {
+                    target.exec( "INSERT INTO people ( id, name ) VALUES ( " +
+                                  query.value(0).toString() +
+                                  ", '" + query.value(1).toString() +  "' )" );
+                    if ( target.isActive() )
+                        count += target.numRowsAffected();
+                }
+            }
+

From sql/overview/basicbrowsing2/main.cpp +

+

The above code introduces a count of how many records are successfully +inserted. Note that isActive() returns FALSE if the query, e.g. the +insertion, fails. numRowsAffected() returns -1 if the number of rows +cannot be determined, e.g. if the query fails. +

+

Basic Data Manipulation +

+

+ +

    ** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+    **
+    ** Copyright (C) 1992-2007 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 <qapplication.h>
+    #include <qsqldatabase.h>
+    #include <qsqlquery.h>
+    #include "../connection.h"
+
+    bool createConnections();
+
+    int main( int argc, char *argv[] )
+    {
+        TQApplication app( argc, argv, FALSE );
+
+        int rows = 0;
+
+        if ( createConnections() ) {
+            TQSqlQuery query( "INSERT INTO staff ( id, forename, surname, salary ) "
+                         "VALUES ( 1155, 'Ginger', 'Davis', 50000 )" );
+            if ( query.isActive() ) rows += query.numRowsAffected() ;
+
+            query.exec( "UPDATE staff SET salary=60000 WHERE id=1155" );
+            if ( query.isActive() ) rows += query.numRowsAffected() ;
+
+            query.exec( "DELETE FROM staff WHERE id=1155" );
+            if ( query.isActive() ) rows += query.numRowsAffected() ;
+        }
+
+        return ( rows == 3 ) ? 0 : 1;
+    }
+

From sql/overview/basicdatamanip/main.cpp +

+

This example demonstrates straightforward SQL DML (data manipulation +language) commands. Since we did not specify a database in the TQSqlQuery constructor the default database is used. TQSqlQuery objects +can also be used to execute SQL DDL (data definition language) commands +such as CREATE TABLE and CREATE INDEX. +

+

Navigating Result Sets +

+

Once a SELECT query has been executed successfully we have access +to the result set of records that matched the query criteria. We have +already used one of the navigation functions, next(), which can be +used alone to step sequentially through the records. TQSqlQuery also +provides first(), last() and prev(). After any of these commands we +can check that we are on a valid record by calling isValid(). +

We can also navigate to any arbitrary record using seek(). The +first record in the dataset is zero. The number of the last record is +size() - 1. Note that not all databases provide the size of a +SELECT query and in such cases size() returns -1. +

+ +

        if ( createConnections() ) {
+            TQSqlQuery query( "SELECT id, name FROM people ORDER BY name" );
+            if ( ! query.isActive() ) return 1; // Query failed
+            int i;
+            i = query.size();               // In this example we have 9 records; i == 9.
+            query.first();                  // Moves to the first record.
+            i = query.at();                 // i == 0
+            query.last();                   // Moves to the last record.
+            i = query.at();                 // i == 8
+            query.seek( query.size() / 2 ); // Moves to the middle record.
+            i = query.at();                 // i == 4
+        }
+

From sql/overview/navigating/main.cpp +

+

The example above shows some of the navigation functions in use. +

Not all drivers support size(), but we can interrogate the driver to +find out: +

+    TQSqlDatabase* defaultDB = TQSqlDatabase::database();
+    if ( defaultDB->driver()->hasFeature( TQSqlDriver::QuerySize ) ) {
+        // TQSqlQuery::size() supported
+    }
+    else {
+        // TQSqlQuery::size() cannot be relied upon
+    }
+
+ +

Once we have located the record we are interested in we may wish to +retrieve data from it. +

+ +

        if ( createConnections() ) {
+            TQSqlQuery query( "SELECT id, surname FROM staff" );
+            if ( query.isActive() ) {
+                while ( query.next() ) {
+                    qDebug( query.value(0).toString() + ": " +
+                            query.value(1).toString() );
+                }
+            }
+        }
+

From sql/overview/retrieve1/main.cpp +

+

Note that if you wish to iterate through the record set in order the +only navigation function you need is next(). +

Tip: The lastQuery() function returns the text of the last query +executed. This can be useful to check that the query you think is being +executed is the one actually being executed. +

+

Using TQSqlCursor +

+

The TQSqlCursor class provides a high level interface to browsing and +editing records in SQL database tables or views without the need to +write your own SQL. +

TQSqlCursor can do almost everything that TQSqlQuery can, with two +exceptions. Since cursors represent tables or views within the +database, by default, TQSqlCursor objects retrieve all the fields of +each record in the table or view whenever navigating to a new +record. If only some fields are relevant simply confine your +processing to those and ignore the others. Or, manually disable the +generation of certain fields using TQSqlRecord::setGenerated(). Another +approach is to create a VIEW which only presents the fields you're +interested in; but note that some databases do not support editable +views. So if you really don't want to retrieve all the fields in the +cursor, then you should use a TQSqlQuery instead, and customize the +query to suit your needs. You can edit records using a TQSqlCursor +providing that the table or view has a primary index that uniquely +distinguishes each record. If this condition is not met then you'll +need to use a TQSqlQuery for edits. +

TQSqlCursor operates on a single record at a time. Whenever performing +an insert, update or delete using TQSqlCursor, only a single record in +the database is affected. When navigating through records in the +cursor, only one record at a time is available in application code. +In addition, TQSqlCursor maintains a separate 'edit buffer' which is +used to make changes to a single record in the database. The edit +buffer is maintained in a separate memory area, and is unnaffected by +the 'navigation buffer' which changes as the cursor moves from record +to record. +

Before we can use TQSqlCursor objects we must first create and open +a database connection. Connecting is described in the Connecting to Databases section +above. For the examples that follow we will assume that the +connections have been created using the createConnections() function +defined in the TQSqlDatabase example +presented earlier. +

In the data-aware widgets section that +follows this one we show how to link widgets to database cursors. Once +we have a knowledge of both cursors and data-aware widgets we can +discuss subclassing TQSqlCursor. +

The TQSqlCursor class retquires the qsqlcursor.h header file. +

+

Retrieving Records +

+

+ +

    #include <qapplication.h>
+    #include <qsqldatabase.h>
+    #include <qsqlcursor.h>
+    #include "../connection.h"
+
+    int main( int argc, char *argv[] )
+    {
+        TQApplication app( argc, argv );
+
+        if ( createConnections() ) {
+            TQSqlCursor cur( "staff" ); // Specify the table/view name
+            cur.select(); // We'll retrieve every record
+            while ( cur.next() ) {
+                qDebug( cur.value( "id" ).toString() + ": " +
+                        cur.value( "surname" ).toString() + " " +
+                        cur.value( "salary" ).toString() );
+            }
+        }
+
+        return 0;
+    }
+

From sql/overview/retrieve2/main.cpp +

+

We create the TQSqlCursor object, specifying the table or view to use. +If we need to use a database other than the default we can specify it +in the TQSqlCursor constructor. +

The SQL executed by the cur.select() call is +

+    SELECT staff.id, staff.forename, staff.surname, staff.salary, staff.statusid FROM staff
+
+ +

Next, we iterate through the records returned by this select statement +using cur.next(). Field values are retrieved in in a similar way to +TQSqlQuery, except that we pass field names rather than numeric indexes +to value() and setValue(). +

+

Sorting and Filtering Records +

+

To specify a subset of records to retrieve we can pass filtering +criteria to the select() function. Each record that is returned will +meet the criteria of the filter (the filter corresponds to the SQL +statement's WHERE clause). +

+    cur.select( "id > 100" );
+
+ +

This select() call will execute the SQL +

+    SELECT staff.id, staff.forename, staff.surname, staff.salary, staff.statusid 
+    FROM staff WHERE staff.id > 100
+
+ +

This will retrieve only those staff whose id is greater than 100. +

In addition to retrieving selected records we often want to specify a +sort order for the returned records. This is achieved by creating a TQSqlIndex object which contains the names of the field(s) we wish to +sort by and pass this object to the select() call. +

+    TQSqlCursor cur( "staff" );
+    TQSqlIndex nameIndex = cur.index( "surname" ); 
+    cur.select( nameIndex );
+
+ +

Here we create a TQSqlIndex object with one field, "surname". When +we call the select() function we pass the index object, which +specifies that the records should be returned sorted by +staff.surname. Each field in the index object is used in the ORDER BY +clause of the select statement. The SQL executed here is +

+    SELECT staff.id, staff.forename, staff.surname, staff.salary, staff.statusid 
+    FROM staff ORDER BY staff.surname ASC
+
+ +

Combining the retrieval of a subset of records and ordering the results +is straightforward. +

+    cur.select( "staff.surname LIKE 'A%'", nameIndex );
+
+ +

We pass in a filter string (the WHERE clause), and the TQSqlIndex +object to sort by (the ORDER BY clause). This produces +

+    SELECT staff.id, staff.forename, staff.surname, staff.salary, staff.statusid
+    FROM staff WHERE staff.surname LIKE 'A%' ORDER BY staff.surname ASC
+
+ +

To sort by more than one field, an index can be created which contains +multiple fields. Ascending and descending order can be set using +TQSqlIndex::setDescending(); the default is ascending. +

+ +

            TQSqlCursor cur( "staff" );
+            TQStringList fields = TQStringList() << "surname" << "forename";
+            TQSqlIndex order = cur.index( fields );
+            cur.select( order );
+            while ( cur.next() ) {
+

From sql/overview/order1/main.cpp +

+

Here we create a string list containing the fields we wish to sort by, +in the order they are to be used. Then we create a TQSqlIndex object +based on these fields, finally executing the select() call using this +index. This executes +

+    SELECT staff.id, staff.forename, staff.surname, staff.salary, staff.statusid
+    FROM staff ORDER BY staff.surname ASC, staff.forename ASC
+
+ +

If we need to retrieve records with fields that match specific criteria we +can create a filter based on an index. +

+ +

            TQSqlCursor cur( "staff" );
+            TQStringList fields = TQStringList() << "id" << "forename";
+            TQSqlIndex order = cur.index( fields );
+            TQSqlIndex filter = cur.index( "surname" );
+            cur.setValue( "surname", "Bloggs" );
+            cur.select( filter, order );
+            while ( cur.next() ) {
+

From sql/overview/order2/main.cpp +

+

This executes +

+    SELECT staff.id, staff.forename, staff.surname, staff.salary, staff.statusid 
+    FROM staff WHERE staff.surname='Bloggs' ORDER BY staff.id ASC, staff.forename ASC
+
+ +

The "order" TQSqlIndex contains two fields, "id" and "forename" +which are used to order the results. The "filter" TQSqlIndex +contains a single field, "surname". When an index is passed as a +filter to the select() function, for each field in the filter, a +fieldname=value subclause is created where the value +is taken from the current cursor's value for that field. We use +setValue() to ensure that the value used is the one we want. +

+

Extracting Data +

+

+ +

            TQSqlCursor cur( "creditors" );
+            TQStringList orderFields = TQStringList() << "surname" << "forename";
+            TQSqlIndex order = cur.index( orderFields );
+
+            TQStringList filterFields = TQStringList() << "surname" << "city";
+            TQSqlIndex filter = cur.index( filterFields );
+            cur.setValue( "surname", "Chirac" );
+            cur.setValue( "city", "Paris" );
+
+            cur.select( filter, order );
+
+            while ( cur.next() ) {
+                int id = cur.value( "id" ).toInt();
+                TQString name = cur.value( "forename" ).toString() + " " +
+                               cur.value( "surname" ).toString();
+                qDebug( TQString::number( id ) + ": " + name );
+            }
+

From sql/overview/extract/main.cpp +

+

In this example we begin by creating a cursor on the creditors table. +We create two TQSqlIndex objects. The first, "order", is created +from the "orderFields" string list. The second, "filter", is created +from the "filterFields" string list. We set the values of the two +fields used in the filter, "surname" and "city", to the values we're +interested in. Now we call select() which generates and executes the +following SQL: +

+    SELECT creditors.city, creditors.surname, creditors.forename, creditors.id 
+    FROM creditors 
+    WHERE creditors.surname = 'Chirac' AND creditors.city = 'Paris' 
+    ORDER BY creditors.surname ASC, creditors.forename ASC
+
+ +The filter fields are used in the WHERE clause. Their values are +taken from the cursor's current values for those fields; we set these +values ourselves with the setValue() calls. The order fields are used +in the ORDER BY clause. +

Now we iterate through each matching record (if any). We retrieve the +contents of the id, forename and surname fields and pass them on to +some processing function, in this example a simple qDebug() call. +

+

Manipulating Records +

+

Records can be inserted, updated or deleted in a table or view using a +TQSqlCursor providing that the table or view has a primary index +that uniquely distinguishes each record. If this is not the case a TQSqlQuery must be used instead. (Note that not all databases support +editable views.) +

Each cursor has an internal 'edit buffer' which is used by all the +edit operations (insert, update and delete). The editing process is +the same for each operation: actquire a pointer to the relevant buffer; +call setValue() to prime the buffer with the values you want; call +insert() or update() or del() to perform the desired operation. For +example, when inserting a record using a cursor, you call +primeInsert() to get a pointer to the edit buffer and then call +setValue() on this buffer to set each field's value. Then you call +TQSQlCursor::insert() to insert the contents of the edit buffer into +the database. Similarly, when updating (or deleting) a record, the +values of the fields in the edit buffer are used to update (or delete) +the record in the database. The 'edit buffer' is unaffected by any +cursor navigation functions. +Note that if you pass a string value to setValue() any single quotes +will be escaped (turned into a pair of single quotes) since a single +quote is a special character in SQL. +

The primeInsert(), primeUpdate() and primeDelete() methods all return +a pointer to the internal edit buffer. Each method can potentially +perform different operations on the edit buffer before returning it. +By default, TQSqlCursor::primeInsert() clears all the field values in +the edit buffer (see TQSqlRecord::clearValues()). Both TQSqlCursor::primeUpdate() and TQSqlCursor::primeDelete() initialize the +edit buffer with the current contents of the cursor before returning +it. All three of these functions are virtual, so you can redefine the +behavior (for example, reimplementing primeInsert() to auto-number +fields in the edit buffer). Data-aware user-interface controls emit +signals, e.g. primeInsert(), that you can connect to; these pass a +pointer to the appropriate buffer so subclassing may not be necessary. +See subclassing TQSqlCursor for +more information on subclassing; see the TQt +Designer manual for more on connecting to the primeInsert() +signal. +

When insert(), update() or del() is called on a cursor, it will be +invalidated and will no longer be positioned on a valid record. If you +need to move to another record after performing an insert(), update() +or del() you must make a fresh select() call. This ensures that +changes to the database are accurately reflected in the cursor. +

+

Inserting Records +

+

+ +

            TQSqlCursor cur( "prices" );
+            TQStringList names = TQStringList() <<
+                "Screwdriver" << "Hammer" << "Wrench" << "Saw";
+            int id = 20;
+            for ( TQStringList::Iterator name = names.begin();
+                  name != names.end(); ++name ) {
+                TQSqlRecord *buffer = cur.primeInsert();
+                buffer->setValue( "id", id );
+                buffer->setValue( "name", *name );
+                buffer->setValue( "price", 100.0 + (double)id );
+                count += cur.insert();
+                id++;
+            }
+

From sql/overview/insert/main.cpp +

+

In this example we create a cursor on the "prices" table. Next we +create a list of product names which we iterate over. For each +iteration we call the cursor's primeInsert() method. This method +returns a pointer to a TQSqlRecord buffer in which all the fields +are set to NULL. (Note that TQSqlCursor::primeInsert() is virtual, +and can be customized by derived classes. See TQSqlCursor). Next we +call setValue() for each field that retquires a value. Finally we call +insert() to insert the record. The insert() call returns the number of +rows inserted. +

We obtained a pointer to a TQSqlRecord object from the primeInsert() +call. TQSqlRecord objects can hold the data for a single record plus some +meta-data about the record. In practice most interaction with a +TQSqlRecord consists of simple value() and setValue() calls as shown in +this and the following example. +

+

Updating Records +

+

+ +

            TQSqlCursor cur( "prices" );
+            cur.select( "id=202" );
+            if ( cur.next() ) {
+                TQSqlRecord *buffer = cur.primeUpdate();
+                double price = buffer->value( "price" ).toDouble();
+                double newprice = price * 1.05;
+                buffer->setValue( "price", newprice );
+                cur.update();
+            }
+

From sql/overview/update/main.cpp +

+

This example begins with the creation of a cursor over the prices table. +We select the record we wish to update with the select() call and +move to it with the next() call. We call primeUpdate() to get a TQSqlRecord pointer to a buffer which is populated with the contents of +the current record. We retrieve the value of the price field, calculate +a new price, and set the the price field to the newly calculated value. +Finally we call update() to update the record. The update() call returns +the number of rows updated. +

If many identical updates need to be performed, for example increasing +the price of every item in the price list, using a single SQL statement +with TQSqlQuery is more efficient, e.g. +

+    TQSqlQuery query( "UPDATE prices SET price = price * 1.05"  );
+
+ +

+

Deleting Records +

+

+ +

            TQSqlCursor cur( "prices" );
+            cur.select( "id=999" );
+            if ( cur.next() ) {
+                cur.primeDelete();
+                cur.del();
+

From sql/overview/delete/main.cpp +

+

To delete records, select the record to be deleted and navigate to it. +Then call primeDelete() to populate the cursor with the primary key +of the selected record, (in this example, the prices.id field), and +then call TQSqlCursor::del() to delete it. +

As with update(), if multiple deletions need to be made with some common +criteria it is more efficient to do so using a single SQL statement, +e.g. +

+    TQSqlQuery query( "DELETE FROM prices WHERE id >= 2450 AND id <= 2500" );
+
+ +

+

Data-Aware Widgets +

+

Data-Aware Widgets provide a simple yet powerful means of connecting +databases to TQt user interfaces. The easiest way of creating and +manipulating data-aware widgets is with TQt +Designer. For those who prefer a purely programmatic approach +the following examples and explanations provide an introduction. Note +that the "Creating Database Applications" chapter of the TQt Designer manual and its accompanying +examples provides additional information. +

+

Data-Aware Tables +

+

+ +

    #include <qapplication.h>
+    #include <qsqldatabase.h>
+    #include <qsqlcursor.h>
+    #include <qdatatable.h>
+    #include "../connection.h"
+
+    int main( int argc, char *argv[] )
+    {
+        TQApplication app( argc, argv );
+
+        if ( createConnections() ) {
+            TQSqlCursor staffCursor( "staff" );
+            TQDataTable *staffTable = new TQDataTable( &staffCursor, TRUE );
+            app.setMainWidget( staffTable );
+            staffTable->refresh();
+            staffTable->show();
+
+            return app.exec();
+        }
+
+        return 0;
+    }
+

From sql/overview/table1/main.cpp +

+

Data-Aware tables retquire the qdatatable.h and qsqlcursor.h header +files. We create our application object, call createConnections() and +create the cursor. We create the TQDataTable passing it a pointer to +the cursor, and set the autoPopulate flag to TRUE. Next we make our TQDataTable the main widget and call refresh() to populate it with data +and call show() to make it visible. +

The autoPopulate flag tells the TQDataTable whether or nor it should +create columns based on the cursor. autoPopulate does not affect the +loading of data into the table; that is achieved by the refresh() +function. +

+ +

            TQSqlCursor staffCursor( "staff" );
+            TQDataTable *staffTable = new TQDataTable( &staffCursor );
+
+            app.setMainWidget( staffTable );
+
+            staffTable->addColumn( "forename", "Forename" );
+            staffTable->addColumn( "surname",  "Surname" );
+            staffTable->addColumn( "salary",   "Annual Salary" );
+
+            TQStringList order = TQStringList() << "surname" << "forename";
+            staffTable->setSort( order );
+
+            staffTable->refresh();
+            staffTable->show();
+

From sql/overview/table2/main.cpp +

+

We create an empty TQDataTable which we make into our main widget and +then we manually add the columns we want in the order we wish them to +appear. For each column we specify the field name and optionally a +display label. +

We have also opted to sort the rows in the table; this could also have +been achieved by applying the sort to the cursor itself. +

Once everything is set up we call refresh() to load the data from the +database and show() to make the widget visible. +

TQDataTables only retrieve visible rows which (depending on the driver) +allows even large tables to be displayed very tquickly with minimal +memory cost. +

+

Creating Data-Aware Forms +

+

Creating data-aware forms is more involved than using data-aware +tables because we must take care of each field individually. Most of +the code below can be automatically generated by TQt Designer. See the TQt Designer manual for more details. +

+

Displaying a Record +

+

+ +

    #include <qapplication.h>
+    #include <qdialog.h>
+    #include <qlabel.h>
+    #include <qlayout.h>
+    #include <qlineedit.h>
+    #include <qsqldatabase.h>
+    #include <qsqlcursor.h>
+    #include <qsqlform.h>
+    #include "../connection.h"
+
+    class FormDialog : public TQDialog
+    {
+        public:
+            FormDialog();
+    };
+
+    FormDialog::FormDialog()
+    {
+        TQLabel *forenameLabel   = new TQLabel( "Forename:", this );
+        TQLabel *forenameDisplay = new TQLabel( this );
+        TQLabel *surnameLabel    = new TQLabel( "Surname:", this );
+        TQLabel *surnameDisplay  = new TQLabel( this );
+        TQLabel *salaryLabel     = new TQLabel( "Salary:", this );
+        TQLineEdit *salaryEdit   = new TQLineEdit( this );
+
+        TQGridLayout *grid = new TQGridLayout( this );
+        grid->addWidget( forenameLabel,     0, 0 );
+        grid->addWidget( forenameDisplay,   0, 1 );
+        grid->addWidget( surnameLabel,      1, 0 );
+        grid->addWidget( surnameDisplay,    1, 1 );
+        grid->addWidget( salaryLabel,       2, 0 );
+        grid->addWidget( salaryEdit,        2, 1 );
+        grid->activate();
+
+        TQSqlCursor staffCursor( "staff" );
+        staffCursor.select();
+        staffCursor.next();
+
+        TQSqlForm sqlForm( this );
+        sqlForm.setRecord( staffCursor.primeUpdate() );
+        sqlForm.insert( forenameDisplay, "forename" );
+        sqlForm.insert( surnameDisplay, "surname" );
+        sqlForm.insert( salaryEdit, "salary" );
+        sqlForm.readFields();
+    }
+
+    int main( int argc, char *argv[] )
+    {
+        TQApplication app( argc, argv );
+
+        if ( ! createConnections() ) return 1;
+
+        FormDialog *formDialog = new FormDialog();
+        formDialog->show();
+        app.setMainWidget( formDialog );
+
+        return app.exec();
+    }
+

From sql/overview/form1/main.cpp +

+

We include the header files for the widgets that we need. We also +include qsqldatabase.h and qsqlcursor.h as usual, but we now add +qsqlform.h. +

The form will be presented as a dialog so we subclass TQDialog with +our own FormDialog class. We use a TQLineEdit for the salary so that +the user can change it. All the widgets are laid out using a grid. +

We create a cursor on the staff table, select all records and move to +the first record. +

Now we create a TQSqlForm object and set the TQSqlForm's record buffer +to the cursor's update buffer. For each widget that we wish to make +data-aware we insert a pointer to the widget and the associated field +name into the TQSqlForm. Finally we call readFields() to populate the +widgets with data from the database via the cursor's buffer. +

+

Displaying a Record in a Data Form +

+

TQDataView is a Widget that can hold a read-only TQSqlForm. In +addition to TQSqlForm it offers the slot refresh( TQSqlRecord * ) so it +can easily be linked together with a TQDataTable to display a detailed +view of a record: +

+    connect( myDataTable, SIGNAL( currentChanged( TQSqlRecord* ) ), 
+             myDataView, SLOT( refresh( TQSqlRecord* ) ) );
+
+ +

+

Editing a Record +

+

This example is similar to the previous one so we will focus on the +differences. +

+ +

    class FormDialog : public TQDialog
+    {
+        Q_OBJECT
+        public:
+            FormDialog();
+            ~FormDialog();
+        public slots:
+            void save();
+        private:
+            TQSqlCursor staffCursor;
+            TQSqlForm *sqlForm;
+            TQSqlIndex idIndex;
+    };
+

From sql/overview/form2/main.h +

+

The save slot will be used for a button that the user can press to +confirm their update. We also hold pointers to the TQSqlCursor and the +TQSqlForm since they will need to be accessed outside the constructor. +

+ +

        staffCursor.setTrimmed( "forename", TRUE );
+        staffCursor.setTrimmed( "surname",  TRUE );
+
+

We call setTrimmed() on the text fields so that any spaces used to +right pad the fields are removed when the fields are retrieved. +

Properties that we might wish to apply to fields, such as alignment +and validation are achieved in the conventional way, for example, by +calling TQLineEdit::setAlignment() and TQLineEdit::setValidator(). +

        TQLineEdit   *forenameEdit  = new TQLineEdit( this );
+
+

        TQPushButton *saveButton    = new TQPushButton( "&Save", this );
+        connect( saveButton, SIGNAL(clicked()), this, SLOT(save()) );
+
+

The FormDialog constructor is similar to the one in the previous +example. We have changed the forename and surname widgets to +TQLineEdits to make them editable and have added a TQPushButton +the user can click to save their updates. +

        grid->addWidget( saveButton,    3, 0 );
+
+

We add an extra row to the grid containing the save button. +

        idIndex = staffCursor.index( "id" );
+        staffCursor.select( idIndex );
+        staffCursor.first();
+
+

We create a TQSqlIndex object and then execute a select() using the +index. We then move to the first record in the result set. +

        sqlForm = new TQSqlForm( this );
+        sqlForm->setRecord( staffCursor.primeUpdate() );
+
+

We create a new TQSqlForm object and set it's record buffer to the +cursor's update buffer. +

        sqlForm->insert( forenameEdit, "forename" );
+        sqlForm->insert( surnameEdit, "surname" );
+        sqlForm->insert( salaryEdit, "salary" );
+        sqlForm->readFields();
+
+

Now we link the buffer's fields to the TQLineEdit controls. (In the +previous example we linked the cursor's fields.) The edit controls are +populated by the readFields() call as before. +

    FormDialog::~FormDialog()
+    {
+
+    }
+
+

In the destructor we don't have to worry about the widgets or TQSqlForm +since they are children of the form and will be deleted by TQt at the +right time. +

    void FormDialog::save()
+    {
+        sqlForm->writeFields();
+        staffCursor.update();
+        staffCursor.select( idIndex );
+        staffCursor.first();
+    }
+
+

Finally we add the save functionality for when the user presses the +save button. We write back the data from the widgets to the TQSqlRecord buffer with the writeFields() call. Then we update the +database with the updated version of the record with the cursor's +update() function. At this point the cursor is no longer positioned at +a valid record so we reissue the select() call using our TQSqlIndex +and move to the first record. +

TQDataBrowser and TQDataView are widgets which provide a great deal of +the above functionality. TQDataBrowser provides a data form which +allows editing of and navigation through a cursor's records. TQDataView provides a read only form for data in a cursor or database +record. See the class documentation or the TQt Designer manual for more information on using these +widgets. +

Link to sql/overview/form2/main.cpp +

+

Custom Editor Widgets +

+

TQSqlForm uses TQSqlPropertyMap to handle the transfer of data between +widgets and database fields. Custom widgets can also be used in a form +by installing a property map that contains information about the +properties of the custom widget which should be used to transfer the +data. +

This example is based on the form2 example in the previous section so +we will only cover the differences here. The full source is in sql/overview/custom1/main.h and sql/overview/custom1/main.cpp +

+ +

    class CustomEdit : public TQLineEdit
+    {
+        Q_OBJECT
+        Q_PROPERTY( TQString upperLine READ upperLine WRITE setUpperLine )
+        public:
+            CustomEdit( TQWidget *parent=0, const char *name=0 );
+            TQString upperLine() const;
+            void setUpperLine( const TQString &line );
+        public slots:
+            void changed( const TQString &line );
+        private:
+            TQString upperLineText;
+    };
+
+

We've created a simple subclass of TQLineEdit and added a property, +upperLineText, which will hold an uppercase version of the text. We +also created a slot, changed(). +

            TQSqlPropertyMap *propMap;
+
+

We will be using a property map so we add a pointer to a property map +to our FormDialog's private data. +

+ +

    CustomEdit::CustomEdit( TQWidget *parent, const char *name ) :
+        TQLineEdit( parent, name )
+    {
+        connect( this, SIGNAL(textChanged(const TQString &)),
+                 this, SLOT(changed(const TQString &)) );
+    }
+
+

In the CustomEdit constructor we use the TQLineEdit constructor and add +a connection between the textChanged signal and our own changed slot. +

    void CustomEdit::changed( const TQString &line )
+    {
+        setUpperLine( line );
+    }
+
+

The changed() slot calls our setUpperLine() function. +

    void CustomEdit::setUpperLine( const TQString &line )
+    {
+        upperLineText = line.upper();
+        setText( upperLineText );
+    }
+
+

The setUpperLine() function places an uppercase copy of the text in the +upperLineText buffer and then sets the text of the widget to this text. +

Our CustomEdit class ensures that the text entered is always uppercase +and provides a property that can be used with a property map to link +CustomEdit instances directly to database fields. +

        CustomEdit  *forenameEdit   = new CustomEdit( this );
+
+

        CustomEdit  *surnameEdit    = new CustomEdit( this );
+
+

We use the same FormDialog as we did before, but this time replace two +of the TQLineEdit widgets with our own CustomEdit widgets. +

Laying out the grid and setting up the cursor is the same as before. +

        propMap = new TQSqlPropertyMap;
+        propMap->insert( forenameEdit->className(), "upperLine" );
+
+

We create a new property map on the heap and register our CustomEdit +class and its upperLine property with the property map. +

        sqlForm = new TQSqlForm( this );
+        sqlForm->setRecord( staffCursor->primeUpdate() );
+        sqlForm->installPropertyMap( propMap );
+
+

The final change is to install the property map into the TQSqlForm once +the TQSqlForm has been created. This passes responsibility for the +property map's memory to TQSqlForm which itself is owned by the +FormDialog, so TQt will delete them at the right time. +

The behaviour of this example is identical to the previous one except +that the forename and surname fields will be uppercase since they use +our CustomEdit widget. +

+

Custom Editor Widgets for Tables +

+

We must reimpliment TQSqlEditorFactory to use custom editor widgets in +tables. In the following example we will create a custom editor based +on TQComboBox and a TQSqlEditorFactory subclass to show how a TQDataTable +can use a custom editor. +

+ +

    class StatusPicker : public TQComboBox
+    {
+        Q_OBJECT
+        Q_PROPERTY( int statusid READ statusId WRITE setStatusId )
+        public:
+            StatusPicker( TQWidget *parent=0, const char *name=0 );
+            int statusId() const;
+            void setStatusId( int id );
+        private:
+            TQMap< int, int > index2id;
+    };
+

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 +to/from the statusids that we will list in the combobox. +

    class CustomSqlEditorFactory : public TQSqlEditorFactory
+    {
+        Q_OBJECT
+        public:
+            TQWidget *createEditor( TQWidget *parent, const TQSqlField *field );
+    };
+
+

We also need to subclass TQSqlEditorFactory declaring a createEditor() +function since that is the only function we need to reimplement. +

+ +

    StatusPicker::StatusPicker( TQWidget *parent, const char *name )
+        : TQComboBox( parent, name )
+    {
+        TQSqlCursor cur( "status" );
+        cur.select( cur.index( "name" ) );
+
+        int i = 0;
+        while ( cur.next() ) {
+            insertItem( cur.value( "name" ).toString(), i );
+            index2id[i] = cur.value( "id" ).toInt();
+            i++;
+        }
+

From sql/overview/table3/main.cpp +

+

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 +the combobox index. +

    int StatusPicker::statusId() const
+    {
+        return index2id[ currentItem() ];
+    }
+
+

The statusid property READ function simply involves looking up the +combobox's index for the currently selected item in the index2id TQMap +which maps combobox indexes to statusids. +

    void StatusPicker::setStatusId( int statusid )
+    {
+        TQMap<int,int>::Iterator it;
+        for ( it = index2id.begin(); it != index2id.end(); ++it ) {
+            if ( it.data() == statusid ) {
+                setCurrentItem( it.key() );
+                break;
+            }
+        }
+    }
+
+

The statusId() function implements the statusid property's WRITE +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. +

When the user edits the status field in the TQDataTable they will be +presented with a combobox of valid status names taken from the status +table. However the status displayed is still the raw statusid. To +display the status name when the field isn't being edited retquires us +to subclass TQDataTable and reimplement the paintField() function. +

+ +

    class CustomTable : public TQDataTable
+    {
+        Q_OBJECT
+    public:
+        CustomTable(
+                TQSqlCursor *cursor, bool autoPopulate = FALSE,
+                TQWidget * parent = 0, const char * name = 0 ) :
+            TQDataTable( cursor, autoPopulate, parent, name ) {}
+        void paintField(
+                TQPainter * p, const TQSqlField* field, const TQRect & cr, bool );
+
+    };
+

From sql/overview/table4/main.h +

+

We simply call the original TQDataTable constructor without changing +anything. We also declare the paintField function. +

+ +

    void CustomTable::paintField( TQPainter * p, const TQSqlField* field,
+                                  const TQRect & cr, bool b)
+    {
+        if ( !field )
+            return;
+        if ( field->name() == "statusid" ) {
+            TQSqlQuery query( "SELECT name FROM status WHERE id=" +
+                         field->value().toString() );
+            TQString text;
+            if ( query.next() ) {
+                text = query.value( 0 ).toString();
+            }
+            p->drawText( 2,2, cr.width()-4, cr.height()-4, fieldAlignment( field ), text );
+        }
+        else {
+            TQDataTable::paintField( p, field, cr, b) ;
+        }
+

From sql/overview/table4/main.cpp +

+

The paintField code is based on TQDataTable's source code. We need to +make three changes. Firstly add an if clause field->name() == "statusid" and look up the textual value for the id with a +straighforward TQSqlQuery. Secondly call the superclass to handle other +fields. The last change is in our main function where we change +staffTable from being a TQDataTable to being a CustomTable. +

+

Subclassing TQSqlCursor +

+

+ +

    #include <qapplication.h>
+    #include <qsqldatabase.h>
+    #include <qsqlcursor.h>
+    #include <qdatatable.h>
+    #include "../connection.h"
+
+    int main( int argc, char *argv[] )
+    {
+        TQApplication app( argc, argv );
+
+        if ( createConnections() ) {
+            TQSqlCursor invoiceItemCursor( "invoiceitem" );
+
+            TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor );
+
+            app.setMainWidget( invoiceItemTable );
+
+            invoiceItemTable->addColumn( "pricesid", "PriceID" );
+            invoiceItemTable->addColumn( "quantity", "Quantity" );
+            invoiceItemTable->addColumn( "paiddate", "Paid" );
+
+            invoiceItemTable->refresh();
+            invoiceItemTable->show();
+
+            return app.exec();
+        }
+
+        return 1;
+    }
+

From sql/overview/subclass1/main.cpp +

+

This example is very similar to the table1 example presented earlier. We +create a cursor, add the fields and their display labels to a TQDataTable, +call refresh() to load the data and call show() to show the widget. +

Unfortunately this example is unsatisfactory. It is tedious to set the +table name and any custom characteristics for the fields every time we +need a cursor over this table. And it would be far better if we +displayed the name of the product rather than its pricesid. Since we +know the price of the product and the quantity we could also show the +product cost and the cost of each invoiceitem. Finally it would be +useful (or even essential for primary keys) if we could default some of +the values when the user adds a new record. +

+ +

    class InvoiceItemCursor : public TQSqlCursor
+    {
+        public:
+            InvoiceItemCursor();
+    };
+

From sql/overview/subclass2/main.h +

+

We have created a separate header file and subclassed TQSqlCursor. +

+ +

    InvoiceItemCursor::InvoiceItemCursor() :
+        TQSqlCursor( "invoiceitem" )
+    {
+        // NOOP
+    }
+

From sql/overview/subclass2/main.cpp +

+

In our class's constructor we call the TQSqlCursor constructor with the +name of the table. We don't have any other characteristics to add at +this stage. +

            InvoiceItemCursor invoiceItemCursor;
+
+

Whenever we retquire a cursor over the invoiceitem table we can create +an InvoiceItemCursor instead of a generic TQSqlCursor. +

We still need to show the product name rather than the pricesid. +

+ +

        protected:
+            TQVariant calculateField( const TQString & name );
+

From sql/overview/subclass3/main.h +

+

The change in the header file is minimal: we simply add the signature +of the calculateField() function since we will be reimplementing it. +

+ +

    InvoiceItemCursor::InvoiceItemCursor() :
+        TQSqlCursor( "invoiceitem" )
+    {
+        TQSqlFieldInfo productName( "productname", TQVariant::String );
+        append( productName );
+        setCalculated( productName.name(), TRUE );
+    }
+
+    TQVariant InvoiceItemCursor::calculateField( const TQString & name )
+    {
+        if ( name == "productname" ) {
+            TQSqlQuery query( "SELECT name FROM prices WHERE id=" +
+                         field( "pricesid" )->value().toString() );
+            if ( query.next() )
+                return query.value( 0 );
+        }
+
+        return TQVariant( TQString::null );
+    }
+

From sql/overview/subclass3/main.cpp +

+

We have changed the InvoiceItemCursor constructor. We now create a new +TQSqlField called productname and append this to the +InvoiceItemCursor's set of fields. We call setCalculated() on +productname to identify it as a calculated field. The first argument +to setCalculated() is the field name, the second a bool which if TRUE +signifies that calculateField() must be called to get the field's +value. +

            invoiceItemTable->addColumn( "productname", "Product" );
+
+

We add our new fields with addColumn() which adds them to the form and +sets their display names. +

We have to define our own calculateField() function. In our example +database the pricesid in the invoiceitem table is a foreign key into +the prices table. We find the name of the product by executing a query +on the prices table using the pricesid. This returns the product's +name. +

We are now able to extend the example to include calculated fields +which perform real calculations. +

The header file, sql/overview/subclass4/main.h, remains unchanged +from the previous example, but the constructor and calculateField() +function retquire some simple expansion. We'll look at each in turn. +

+ +

    InvoiceItemCursor::InvoiceItemCursor() :
+        TQSqlCursor( "invoiceitem" )
+    {
+        TQSqlFieldInfo productName( "productname", TQVariant::String );
+        append( productName );
+        setCalculated( productName.name(), TRUE );
+
+        TQSqlFieldInfo productPrice( "price", TQVariant::Double );
+        append( productPrice );
+        setCalculated( productPrice.name(), TRUE );
+
+        TQSqlFieldInfo productCost( "cost", TQVariant::Double );
+        append( productCost );
+        setCalculated( productCost.name(), TRUE );
+    }
+

From sql/overview/subclass4/main.cpp +

+

We create two extra fields, price and cost, and append them to the +cursor's set of fields. Both are registered as calculated fields with +calls to setCalculated(). +

    TQVariant InvoiceItemCursor::calculateField( const TQString & name )
+    {
+
+        if ( name == "productname" ) {
+            TQSqlQuery query( "SELECT name FROM prices WHERE id=" +
+                         field( "pricesid" )->value().toString() );
+            if ( query.next() )
+                return query.value( 0 );
+        }
+        else if ( name == "price" ) {
+            TQSqlQuery query( "SELECT price FROM prices WHERE id=" +
+                         field( "pricesid" )->value().toString() );
+            if ( query.next() )
+                return query.value( 0 );
+        }
+        else if ( name == "cost" ) {
+            TQSqlQuery query( "SELECT price FROM prices WHERE id=" +
+                         field( "pricesid" )->value().toString() );
+            if ( query.next() )
+                return TQVariant( query.value( 0 ).toDouble() *
+                                 value( "quantity").toDouble() );
+        }
+
+        return TQVariant( TQString::null );
+    }
+

From sql/overview/subclass4/main.cpp +

+

The calculateField() function has expanded slightly because now we +must calculate the value of three different fields. The productname +and price fields are produced by looking up the corresponding values +in the prices table keyed by pricesid. The cost field is calculated +simply by multiplying the price by the quantity. Note that we cast the +cost to a TQVariant since that is the type that calculateField() must +return. +

We've written three separate queries rather than one to make the +example more like a real application where it is more likely that each +calculated field would be a lookup against a different table or view. +

The last feature that we need to add is defaulting values when the +user attempts to insert a new record. +

+ +

            TQSqlRecord *primeInsert();
+

From sql/overview/subclass5/main.h +

+

We declare our own primeInsert() function since we will need to +reimplement this. +

The constructor and the calculateField() function remain unchanged. +

+ +

    TQSqlRecord *InvoiceItemCursor::primeInsert()
+    {
+        TQSqlRecord *buffer = editBuffer();
+        TQSqlQuery query( "SELECT NEXTVAL( 'invoiceitem_seq' )" );
+        if ( query.next() )
+            buffer->setValue( "id", query.value( 0 ) );
+        buffer->setValue( "paiddate", TQDate::currentDate() );
+        buffer->setValue( "quantity", 1 );
+
+        return buffer;
+    }
+

From sql/overview/subclass5/main.cpp +

+

We get a pointer to the internal edit buffer that the cursor uses for +inserts and updates. The id field is a unique integer that we generate +using the invoiceitem_seq. We default the value of the paiddate field +to today's date and default the quantity to 1. Finally we return a +pointer to the buffer. The rest of the code is unchanged from the +previous version. +

+

The Example Tables +

+

The example tables used can be recreated with the following standard +SQL. You may need to modify the SQL to match that used by your +particular database. +

+create table people (id integer primary key, name char(40))
+
+create table staff (id integer primary key, forename char(40),
+                    surname char(40), salary float, statusid integer)
+
+create table status (id integer primary key, name char(30))
+
+create table creditors (id integer primary key, forename char(40),
+                        surname char(40), city char(30))
+
+create table prices (id integer primary key, name char(40), price float)
+
+create table invoiceitem (id integer primary key, 
+                          pricesid integer, quantity integer,
+                          paiddate date)
+
+ +

A sequence was used in the calculateField() example above. Note that +sequences are not supported in all databases. +

+create sequence invoiceitem_seq
+
+ +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/sqltable-example.html b/doc/html/sqltable-example.html new file mode 100644 index 00000000..85831972 --- /dev/null +++ b/doc/html/sqltable-example.html @@ -0,0 +1,121 @@ + + + + + +SQL Table + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

SQL Table

+ + +

+This example shows how to use a TQDataTable to browse data in a SQL database. +


+

Implementation: +

/****************************************************************************
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qsqldatabase.h>
+#include <qdatatable.h>
+#include <qsqlcursor.h>
+#include <qmessagebox.h>
+
+/* Modify the following to match your environment */
+#define DRIVER       "TQSQLITE"  /* see the TQt SQL documentation for a list of available drivers */
+#define DATABASE     ":memory:" /* the name of your database */
+#define USER         ""   /* user name with appropriate rights */
+#define PASSWORD     ""   /* password for USER */
+#define HOST         "" /* host on which the database is running */
+
+class SimpleCursor : public TQSqlCursor
+{
+public:
+    SimpleCursor () : TQSqlCursor( "simpletable" ) {}
+protected:
+    TQSqlRecord* primeInsert()
+    {
+        /* a real-world application would use sequences, or the like */
+        TQSqlRecord* buf = TQSqlCursor::primeInsert();
+        TQSqlQuery q( "select max(id)+1 from simpletable" );
+        if ( q.next() )
+               buf->setValue( "id", q.value(0) );
+        return buf;
+    }
+};
+
+int main( int argc, char ** argv )
+{
+    TQApplication a( argc, argv );
+
+    TQSqlDatabase * db = TQSqlDatabase::addDatabase( DRIVER );
+    db->setDatabaseName( DATABASE );
+    db->setUserName( USER );
+    db->setPassword( PASSWORD );
+    db->setHostName( HOST );
+
+    if( !db->open() ){
+        db->lastError().showMessage( "An error occured. Please read the README file in the sqltable"
+                                     "dir for more information.\n\n" );
+        return 1;
+    }
+
+    if (!db->tables().contains("simpletable")) {
+        TQSqlQuery q("create table simpletable(id int, name varchar(20), address varchar(20))", db);
+    }
+
+    SimpleCursor cursor;
+
+    TQDataTable table( &cursor ); /* data table uses our cursor */
+    table.addColumn( "name", "Name" );
+    table.addColumn( "address", "Address" );
+    table.setSorting( TRUE );
+
+    a.setMainWidget( &table );
+    table.refresh(); /* load data */
+    table.show();    /* show widget */
+
+    return a.exec();
+}
+
+ +

See also TQt SQL Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/statistics-example.html b/doc/html/statistics-example.html new file mode 100644 index 00000000..dc6b7591 --- /dev/null +++ b/doc/html/statistics-example.html @@ -0,0 +1,304 @@ + + + + + +Table Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Table Example

+ + +

+Another TQTable example. +


+

Header file: +

/****************************************************************************
+** $Id: qt/statistics.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef STATISTICS_H
+#define STATISTICS_H
+
+#include <qtable.h>
+#include <qcombobox.h>
+
+class TableItem : public TQTableItem
+{
+public:
+    TableItem( TQTable *t, EditType et, const TQString &txt ) : TQTableItem( t, et, txt ) {}
+    void paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected );
+};
+
+class ComboItem : public TQTableItem
+{
+public:
+    ComboItem( TQTable *t, EditType et );
+    TQWidget *createEditor() const;
+    void setContentFromEditor( TQWidget *w );
+    void setText( const TQString &s );
+
+private:
+    TQComboBox *cb;
+
+};
+
+class Table : public TQTable
+{
+    Q_OBJECT
+
+public:
+    Table();
+    void sortColumn( int col, bool ascending, bool wholeRows );
+
+private slots:
+    void recalcSum( int row, int col );
+
+private:
+    void initTable();
+
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/statistics.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "statistics.h"
+
+#include <qdir.h>
+#include <qstringlist.h>
+#include <qheader.h>
+#include <qcombobox.h>
+#include <stdlib.h>
+
+const char* dirs[] = {
+    "kernel",
+    "tools",
+    "widgets",
+    "dialogs",
+    "xml",
+    "table",
+    "network",
+    "opengl",
+    "canvas",
+    0
+};
+
+Table::Table()
+    : TQTable( 10, 100, 0, "table" )
+{
+    setSorting( TRUE );
+    horizontalHeader()->setLabel( 0, tr( "File" ) );
+    horizontalHeader()->setLabel( 1, tr( "Size (bytes)" ) );
+    horizontalHeader()->setLabel( 2, tr( "Use in Sum" ) );
+    initTable();
+    adjustColumn( 0 );
+
+    // if the user edited something we might need to recalculate the sum
+    connect( this, SIGNAL( valueChanged( int, int ) ),
+             this, SLOT( recalcSum( int, int ) ) );
+}
+
+void Table::initTable()
+{
+    // read all the TQt source and header files into a list
+    TQStringList all;
+    int i = 0;
+    TQString srcdir( "../../../src/" );
+    while ( dirs[ i ] ) {
+        TQDir dir( srcdir + dirs[ i ] );
+        TQStringList lst = dir.entryList( "*.cpp; *.h" );
+        for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+            if ( ( *it ).contains( "moc" ) )
+                continue;
+            all << (TQString( dirs[ i ] ) + "/" + *it);
+        }
+        ++i;
+    }
+
+    // set the number of rows we'll need for the table
+    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 ) {
+        setText( i, 0, *it );
+        TQFile f( srcdir + *it );
+        setText( i, 1, TQString::number( (ulong)f.size() ) );
+        ComboItem *ci = new ComboItem( this, TQTableItem::WhenCurrent );
+        setItem( i++, 2, ci );
+        sum += f.size();
+    }
+
+    // last row should show the sum
+    TableItem *i1 = new TableItem( this, TQTableItem::Never, tr( "Sum" ) );
+    setItem( i, 0, i1 );
+    TableItem *i2 = new TableItem( this, TQTableItem::Never, TQString::number( sum ) );
+    setItem( i, 1, i2 );
+}
+
+void Table::recalcSum( int, int col )
+{
+    // only recalc if a value in the second or third column changed
+    if ( col < 1 || col > 2 )
+        return;
+
+    // recalc sum
+    int sum = 0;
+    for ( int i = 0; i < numRows() - 1; ++i ) {
+        if ( text( i, 2 ) == "No" )
+            continue;
+        sum += text( i, 1 ).toInt();
+    }
+
+    // insert calculated data
+    TableItem *i1 = new TableItem( this, TQTableItem::Never, tr( "Sum" ) );
+    setItem( numRows() - 1, 0, i1 );
+    TableItem *i2 = new TableItem( this, TQTableItem::Never, TQString::number( sum ) );
+    setItem( numRows() - 1, 1, i2 );
+}
+
+void Table::sortColumn( int col, bool ascending, bool /*wholeRows*/ )
+{
+    // sum row should not be sorted, so get rid of it for now
+    clearCell( numRows() - 1, 0 );
+    clearCell( numRows() - 1, 1 );
+    // do sort
+    TQTable::sortColumn( col, ascending, TRUE );
+    // re-insert sum row
+    recalcSum( 0, 1 );
+}
+
+
+
+void TableItem::paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected )
+{
+    TQColorGroup g( cg );
+    // last row is the sum row - we want to make it more visible by
+    // using a red background
+    if ( row() == table()->numRows() - 1 )
+        g.setColor( TQColorGroup::Base, red );
+    TQTableItem::paint( p, g, cr, selected );
+}
+
+
+
+
+ComboItem::ComboItem( TQTable *t, EditType et )
+    : TQTableItem( t, et, "Yes" ), cb( 0 )
+{
+    // we do not want this item to be replaced
+    setReplaceable( FALSE );
+}
+
+TQWidget *ComboItem::createEditor() const
+{
+    // create an editor - a combobox in our case
+    ( (ComboItem*)this )->cb = new TQComboBox( table()->viewport() );
+    TQObject::connect( cb, SIGNAL( activated( int ) ), table(), SLOT( doValueChanged() ) );
+    cb->insertItem( "Yes" );
+    cb->insertItem( "No" );
+    // and initialize it
+    cb->setCurrentItem( text() == "No" ? 1 : 0 );
+    return cb;
+}
+
+void ComboItem::setContentFromEditor( TQWidget *w )
+{
+    // the user changed the value of the combobox, so synchronize the
+    // value of the item (its text), with the value of the combobox
+    if ( w->inherits( "TQComboBox" ) )
+        setText( ( (TQComboBox*)w )->currentText() );
+    else
+        TQTableItem::setContentFromEditor( w );
+}
+
+void ComboItem::setText( const TQString &s )
+{
+    if ( cb ) {
+        // initialize the combobox from the text
+        if ( s == "No" )
+            cb->setCurrentItem( 1 );
+        else
+            cb->setCurrentItem( 0 );
+    }
+    TQTableItem::setText( s );
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "statistics.h"
+#include <qapplication.h>
+int main( int argc, char **argv )
+{
+    TQApplication a(argc,argv);
+
+    Table t;
+    a.setMainWidget( &t );
+    t.show();
+    return a.exec();
+}
+
+ +

See also Table Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/step-by-step-examples.html b/doc/html/step-by-step-examples.html new file mode 100644 index 00000000..bf15295b --- /dev/null +++ b/doc/html/step-by-step-examples.html @@ -0,0 +1,56 @@ + + + + + +Step-by-step Examples + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Step-by-step Examples

+ + +

Step-by-step examples provide a careful explanation of +example code. +

The covered example programs usually show how to use certain classes +or deal with programming techniques and TQt basics. +

These examples are especially aimed at TQt novices and less experienced +programmers and try to make learning TQt as painless as possible. +

+

+
A Complete Canvas Application +
An Extension Dialog Example +
Walkthrough: A Simple Application +
Walkthrough: Using SAX2 features with the TQt XML classes +
Walkthrough: How to use the TQt SAX2 classes +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t1.png b/doc/html/t1.png new file mode 100644 index 00000000..4de555a3 Binary files /dev/null and b/doc/html/t1.png differ diff --git a/doc/html/t10-cannon-cpp.html b/doc/html/t10-cannon-cpp.html new file mode 100644 index 00000000..74b446bf --- /dev/null +++ b/doc/html/t10-cannon-cpp.html @@ -0,0 +1,122 @@ + + + + + +t10/cannon.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t10/cannon.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation CannonField class, TQt tutorial 10
+**
+****************************************************************/
+
+#include "cannon.h"
+#include <qpainter.h>
+#include <qpixmap.h>
+
+
+CannonField::CannonField( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    ang = 45;
+    f = 0;
+    setPalette( TQPalette( TQColor( 250, 250, 200) ) );
+}
+
+
+void CannonField::setAngle( int degrees )
+{
+    if ( degrees < 5 )
+        degrees = 5;
+    if ( degrees > 70 )
+        degrees = 70;
+    if ( ang == degrees )
+        return;
+    ang = degrees;
+    repaint( cannonRect(), FALSE );
+    emit angleChanged( ang );
+}
+
+
+void CannonField::setForce( int newton )
+{
+    if ( newton < 0 )
+        newton = 0;
+    if ( f == newton )
+        return;
+    f = newton;
+    emit forceChanged( f );
+}
+
+
+void CannonField::paintEvent( TQPaintEvent *e )
+{
+    if ( !e->rect().intersects( cannonRect() ) )
+        return;
+
+    TQRect cr = cannonRect();
+    TQPixmap pix( cr.size() );
+    pix.fill( this, cr.topLeft() );
+
+    TQPainter p( &pix );
+    p.setBrush( blue );
+    p.setPen( NoPen );
+    p.translate( 0, pix.height() - 1 );
+    p.drawPie( TQRect( -35,-35, 70, 70 ), 0, 90*16 );
+    p.rotate( -ang );
+    p.drawRect( TQRect(33, -4, 15, 8) );
+    p.end();
+
+    p.begin( this );
+    p.drawPixmap( cr.topLeft(), pix );
+}
+
+
+TQRect CannonField::cannonRect() const
+{
+    TQRect r( 0, 0, 50, 50 );
+    r.moveBottomLeft( rect().bottomLeft() );
+    return r;
+}
+
+
+TQSizePolicy CannonField::sizePolicy() const
+{
+    return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t10-cannon-h.html b/doc/html/t10-cannon-h.html new file mode 100644 index 00000000..40433e2f --- /dev/null +++ b/doc/html/t10-cannon-h.html @@ -0,0 +1,85 @@ + + + + + +t10/cannon.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t10/cannon.h Example File

+ + +
/****************************************************************
+**
+** Definition of CannonField class, TQt tutorial 10
+**
+****************************************************************/
+
+#ifndef CANNON_H
+#define CANNON_H
+
+#include <qwidget.h>
+
+
+class CannonField : public TQWidget
+{
+    Q_OBJECT
+public:
+    CannonField( TQWidget *parent=0, const char *name=0 );
+
+    TQSizePolicy sizePolicy() const;
+
+    int   angle() const { return ang; }
+    int   force() const { return f; }
+
+public slots:
+    void  setAngle( int degrees );
+    void  setForce( int newton );
+
+signals:
+    void  angleChanged( int );
+    void  forceChanged( int );
+
+protected:
+    void  paintEvent( TQPaintEvent * );
+
+private:
+    TQRect cannonRect() const;
+
+    int ang;
+    int f;
+};
+
+
+#endif // CANNON_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t10-lcdrange-cpp.html b/doc/html/t10-lcdrange-cpp.html new file mode 100644 index 00000000..51bd008a --- /dev/null +++ b/doc/html/t10-lcdrange-cpp.html @@ -0,0 +1,89 @@ + + + + + +t10/lcdrange.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t10/lcdrange.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation of LCDRange class, TQt tutorial 8
+**
+****************************************************************/
+
+#include "lcdrange.h"
+
+#include <qslider.h>
+#include <qlcdnumber.h>
+
+LCDRange::LCDRange( TQWidget *parent, const char *name )
+        : TQVBox( parent, name )
+{
+    TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd"  );
+    slider = new TQSlider( Horizontal, this, "slider" );
+    slider->setRange( 0, 99 );
+    slider->setValue( 0 );
+    connect( slider, SIGNAL(valueChanged(int)),
+             lcd, SLOT(display(int)) );
+    connect( slider, SIGNAL(valueChanged(int)),
+             SIGNAL(valueChanged(int)) );
+
+    setFocusProxy( slider );
+}
+
+int LCDRange::value() const
+{
+    return slider->value();
+}
+
+void LCDRange::setValue( int value )
+{
+    slider->setValue( value );
+}
+
+void LCDRange::setRange( int minVal, int maxVal )
+{
+    if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) {
+      qWarning( "LCDRange::setRange(%d,%d)\n"
+               "\tRange must be 0..99\n"
+               "\tand minVal must not be greater than maxVal",
+               minVal, maxVal );
+      return;
+    }
+    slider->setRange( minVal, maxVal );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t10-lcdrange-h.html b/doc/html/t10-lcdrange-h.html new file mode 100644 index 00000000..5483966d --- /dev/null +++ b/doc/html/t10-lcdrange-h.html @@ -0,0 +1,77 @@ + + + + + +t10/lcdrange.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t10/lcdrange.h Example File

+ + +
/****************************************************************
+**
+** Definition of LCDRange class, TQt tutorial 8
+**
+****************************************************************/
+
+#ifndef LCDRANGE_H
+#define LCDRANGE_H
+
+#include <qvbox.h>
+
+class TQSlider;
+
+
+class LCDRange : public TQVBox
+{
+    Q_OBJECT
+public:
+    LCDRange( TQWidget *parent=0, const char *name=0 );
+
+    int value() const;
+
+public slots:
+    void setValue( int );
+    void setRange( int minVal, int maxVal );
+
+signals:
+    void valueChanged( int );
+
+private:
+    TQSlider  *slider;
+};
+
+
+#endif // LCDRANGE_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t10-main-cpp.html b/doc/html/t10-main-cpp.html new file mode 100644 index 00000000..a0b86164 --- /dev/null +++ b/doc/html/t10-main-cpp.html @@ -0,0 +1,117 @@ + + + + + +t10/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t10/main.cpp Example File

+ + +
/****************************************************************
+**
+** TQt tutorial 10
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qlcdnumber.h>
+#include <qfont.h>
+#include <qlayout.h>
+
+#include "lcdrange.h"
+#include "cannon.h"
+
+
+class MyWidget: public TQWidget
+{
+public:
+    MyWidget( TQWidget *parent=0, const char *name=0 );
+};
+
+
+MyWidget::MyWidget( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    TQPushButton *tquit = new TQPushButton( "&Quit", this, "tquit" );
+    tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+
+    LCDRange *angle = new LCDRange( this, "angle" );
+    angle->setRange( 5, 70 );
+
+    LCDRange *force  = new LCDRange( this, "force" );
+    force->setRange( 10, 50 );
+
+    CannonField *cannonField = new CannonField( this, "cannonField" );
+
+    connect( angle, SIGNAL(valueChanged(int)),
+             cannonField, SLOT(setAngle(int)) );
+    connect( cannonField, SIGNAL(angleChanged(int)),
+             angle, SLOT(setValue(int)) );
+
+    connect( force, SIGNAL(valueChanged(int)),
+             cannonField, SLOT(setForce(int)) );
+    connect( cannonField, SIGNAL(forceChanged(int)),
+             force, SLOT(setValue(int)) );
+
+    TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 );
+    grid->addWidget( tquit, 0, 0 );
+    grid->addWidget( cannonField, 1, 1 );
+    grid->setColStretch( 1, 10 );
+
+    TQVBoxLayout *leftBox = new TQVBoxLayout;
+    grid->addLayout( leftBox, 1, 0 );
+    leftBox->addWidget( angle );
+    leftBox->addWidget( force );
+
+    angle->setValue( 60 );
+    force->setValue( 25 );
+    angle->setFocus();
+}
+
+int main( int argc, char **argv )
+{
+    TQApplication::setColorSpec( TQApplication::CustomColor );
+    TQApplication a( argc, argv );
+
+    MyWidget w;
+    w.setGeometry( 100, 100, 500, 355 );
+    a.setMainWidget( &w );
+    w.show();
+    return a.exec();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t10.png b/doc/html/t10.png new file mode 100644 index 00000000..434b3fa8 Binary files /dev/null and b/doc/html/t10.png differ diff --git a/doc/html/t11-cannon-cpp.html b/doc/html/t11-cannon-cpp.html new file mode 100644 index 00000000..bd2f1f4e --- /dev/null +++ b/doc/html/t11-cannon-cpp.html @@ -0,0 +1,198 @@ + + + + + +t11/cannon.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t11/cannon.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation CannonField class, TQt tutorial 11
+**
+****************************************************************/
+
+#include "cannon.h"
+#include <qtimer.h>
+#include <qpainter.h>
+#include <qpixmap.h>
+
+#include <math.h>
+
+
+CannonField::CannonField( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    ang = 45;
+    f = 0;
+    timerCount = 0;
+    autoShootTimer = new TQTimer( this, "movement handler" );
+    connect( autoShootTimer, SIGNAL(timeout()),
+             this, SLOT(moveShot()) );
+    shoot_ang = 0;
+    shoot_f = 0;
+    setPalette( TQPalette( TQColor( 250, 250, 200) ) );
+}
+
+
+void CannonField::setAngle( int degrees )
+{
+    if ( degrees < 5 )
+        degrees = 5;
+    if ( degrees > 70 )
+        degrees = 70;
+    if ( ang == degrees )
+        return;
+    ang = degrees;
+    repaint( cannonRect(), FALSE );
+    emit angleChanged( ang );
+}
+
+
+void CannonField::setForce( int newton )
+{
+    if ( newton < 0 )
+        newton = 0;
+    if ( f == newton )
+        return;
+    f = newton;
+    emit forceChanged( f );
+}
+
+
+void CannonField::shoot()
+{
+    if ( autoShootTimer->isActive() )
+        return;
+    timerCount = 0;
+    shoot_ang = ang;
+    shoot_f = f;
+    autoShootTimer->start( 50 );
+}
+
+
+void CannonField::moveShot()
+{
+    TQRegion r( shotRect() );
+    timerCount++;
+
+    TQRect shotR = shotRect();
+
+    if ( shotR.x() > width() || shotR.y() > height() )
+        autoShootTimer->stop();
+    else
+        r = r.unite( TQRegion( shotR ) );
+    repaint( r );
+}
+
+
+void CannonField::paintEvent( TQPaintEvent *e )
+{
+    TQRect updateR = e->rect();
+    TQPainter p( this );
+
+    if ( updateR.intersects( cannonRect() ) )
+        paintCannon( &p );
+    if ( autoShootTimer->isActive() &&
+         updateR.intersects( shotRect() ) )
+        paintShot( &p );
+}
+
+
+void CannonField::paintShot( TQPainter *p )
+{
+    p->setBrush( black );
+    p->setPen( NoPen );
+    p->drawRect( shotRect() );
+}
+
+
+const TQRect barrelRect(33, -4, 15, 8);
+
+void CannonField::paintCannon( TQPainter *p )
+{
+    TQRect cr = cannonRect();
+    TQPixmap pix( cr.size() );
+    pix.fill( this, cr.topLeft() );
+
+    TQPainter tmp( &pix );
+    tmp.setBrush( blue );
+    tmp.setPen( NoPen );
+
+    tmp.translate( 0, pix.height() - 1 );
+    tmp.drawPie( TQRect( -35,-35, 70, 70 ), 0, 90*16 );
+    tmp.rotate( -ang );
+    tmp.drawRect( barrelRect );
+    tmp.end();
+
+    p->drawPixmap( cr.topLeft(), pix );
+}
+
+
+TQRect CannonField::cannonRect() const
+{
+    TQRect r( 0, 0, 50, 50 );
+    r.moveBottomLeft( rect().bottomLeft() );
+    return r;
+}
+
+
+TQRect CannonField::shotRect() const
+{
+    const double gravity = 4;
+
+    double time      = timerCount / 4.0;
+    double velocity  = shoot_f;
+    double radians   = shoot_ang*3.14159265/180;
+
+    double velx      = velocity*cos( radians );
+    double vely      = velocity*sin( radians );
+    double x0        = ( barrelRect.right()  + 5 )*cos(radians);
+    double y0        = ( barrelRect.right()  + 5 )*sin(radians);
+    double x         = x0 + velx*time;
+    double y         = y0 + vely*time - 0.5*gravity*time*time;
+
+    TQRect r = TQRect( 0, 0, 6, 6 );
+    r.moveCenter( TQPoint( qRound(x), height() - 1 - qRound(y) ) );
+    return r;
+}
+
+
+TQSizePolicy CannonField::sizePolicy() const
+{
+    return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t11-cannon-h.html b/doc/html/t11-cannon-h.html new file mode 100644 index 00000000..87b8760f --- /dev/null +++ b/doc/html/t11-cannon-h.html @@ -0,0 +1,99 @@ + + + + + +t11/cannon.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t11/cannon.h Example File

+ + +
/****************************************************************
+**
+** Definition of CannonField class, TQt tutorial 11
+**
+****************************************************************/
+
+#ifndef CANNON_H
+#define CANNON_H
+
+class TQTimer;
+
+
+#include <qwidget.h>
+
+
+class CannonField : public TQWidget
+{
+    Q_OBJECT
+public:
+    CannonField( TQWidget *parent=0, const char *name=0 );
+
+    int   angle() const { return ang; }
+    int   force() const { return f; }
+    TQSizePolicy sizePolicy() const;
+
+public slots:
+    void  setAngle( int degrees );
+    void  setForce( int newton );
+    void  shoot();
+
+private slots:
+    void  moveShot();
+
+signals:
+    void  angleChanged( int );
+    void  forceChanged( int );
+
+protected:
+    void  paintEvent( TQPaintEvent * );
+
+private:
+    void  paintShot( TQPainter * );
+    void  paintCannon( TQPainter * );
+    TQRect cannonRect() const;
+    TQRect shotRect() const;
+
+    int ang;
+    int f;
+
+    int timerCount;
+    TQTimer * autoShootTimer;
+    float shoot_ang;
+    float shoot_f;
+};
+
+
+#endif // CANNON_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t11-lcdrange-cpp.html b/doc/html/t11-lcdrange-cpp.html new file mode 100644 index 00000000..3cdb573e --- /dev/null +++ b/doc/html/t11-lcdrange-cpp.html @@ -0,0 +1,89 @@ + + + + + +t11/lcdrange.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t11/lcdrange.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation of LCDRange class, TQt tutorial 8
+**
+****************************************************************/
+
+#include "lcdrange.h"
+
+#include <qslider.h>
+#include <qlcdnumber.h>
+
+LCDRange::LCDRange( TQWidget *parent, const char *name )
+        : TQVBox( parent, name )
+{
+    TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd"  );
+    slider = new TQSlider( Horizontal, this, "slider" );
+    slider->setRange( 0, 99 );
+    slider->setValue( 0 );
+    connect( slider, SIGNAL(valueChanged(int)),
+             lcd, SLOT(display(int)) );
+    connect( slider, SIGNAL(valueChanged(int)),
+             SIGNAL(valueChanged(int)) );
+
+    setFocusProxy( slider );
+}
+
+int LCDRange::value() const
+{
+    return slider->value();
+}
+
+void LCDRange::setValue( int value )
+{
+    slider->setValue( value );
+}
+
+void LCDRange::setRange( int minVal, int maxVal )
+{
+    if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) {
+      qWarning( "LCDRange::setRange(%d,%d)\n"
+               "\tRange must be 0..99\n"
+               "\tand minVal must not be greater than maxVal",
+               minVal, maxVal );
+      return;
+    }
+    slider->setRange( minVal, maxVal );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t11-lcdrange-h.html b/doc/html/t11-lcdrange-h.html new file mode 100644 index 00000000..0ee8e24a --- /dev/null +++ b/doc/html/t11-lcdrange-h.html @@ -0,0 +1,77 @@ + + + + + +t11/lcdrange.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t11/lcdrange.h Example File

+ + +
/****************************************************************
+**
+** Definition of LCDRange class, TQt tutorial 8
+**
+****************************************************************/
+
+#ifndef LCDRANGE_H
+#define LCDRANGE_H
+
+#include <qvbox.h>
+
+class TQSlider;
+
+
+class LCDRange : public TQVBox
+{
+    Q_OBJECT
+public:
+    LCDRange( TQWidget *parent=0, const char *name=0 );
+
+    int value() const;
+
+public slots:
+    void setValue( int );
+    void setRange( int minVal, int maxVal );
+
+signals:
+    void valueChanged( int );
+
+private:
+    TQSlider  *slider;
+};
+
+
+#endif // LCDRANGE_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t11-main-cpp.html b/doc/html/t11-main-cpp.html new file mode 100644 index 00000000..3a059a06 --- /dev/null +++ b/doc/html/t11-main-cpp.html @@ -0,0 +1,127 @@ + + + + + +t11/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t11/main.cpp Example File

+ + +
/****************************************************************
+**
+** TQt tutorial 11
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qlcdnumber.h>
+#include <qfont.h>
+#include <qlayout.h>
+
+#include "lcdrange.h"
+#include "cannon.h"
+
+
+class MyWidget: public TQWidget
+{
+public:
+    MyWidget( TQWidget *parent=0, const char *name=0 );
+};
+
+
+MyWidget::MyWidget( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    TQPushButton *tquit = new TQPushButton( "&Quit", this, "tquit" );
+    tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+
+    LCDRange *angle = new LCDRange( this, "angle" );
+    angle->setRange( 5, 70 );
+
+    LCDRange *force  = new LCDRange( this, "force" );
+    force->setRange( 10, 50 );
+
+    CannonField *cannonField = new CannonField( this, "cannonField" );
+
+    connect( angle, SIGNAL(valueChanged(int)),
+             cannonField, SLOT(setAngle(int)) );
+    connect( cannonField, SIGNAL(angleChanged(int)),
+             angle, SLOT(setValue(int)) );
+
+    connect( force, SIGNAL(valueChanged(int)),
+             cannonField, SLOT(setForce(int)) );
+    connect( cannonField, SIGNAL(forceChanged(int)),
+             force, SLOT(setValue(int)) );
+
+    TQPushButton *shoot = new TQPushButton( "&Shoot", this, "shoot" );
+    shoot->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( shoot, SIGNAL(clicked()), cannonField, SLOT(shoot()) );
+
+    TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 );
+    grid->addWidget( tquit, 0, 0 );
+    grid->addWidget( cannonField, 1, 1 );
+    grid->setColStretch( 1, 10 );
+
+    TQVBoxLayout *leftBox = new TQVBoxLayout;
+    grid->addLayout( leftBox, 1, 0 );
+    leftBox->addWidget( angle );
+    leftBox->addWidget( force );
+
+    TQHBoxLayout *topBox = new TQHBoxLayout;
+    grid->addLayout( topBox, 0, 1 );
+    topBox->addWidget( shoot );
+    topBox->addStretch( 1 );
+
+    angle->setValue( 60 );
+    force->setValue( 25 );
+    angle->setFocus();
+}
+
+int main( int argc, char **argv )
+{
+    TQApplication::setColorSpec( TQApplication::CustomColor );
+    TQApplication a( argc, argv );
+
+    MyWidget w;
+    w.setGeometry( 100, 100, 500, 355 );
+    a.setMainWidget( &w );
+    w.show();
+    return a.exec();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t11.png b/doc/html/t11.png new file mode 100644 index 00000000..fced4e97 Binary files /dev/null and b/doc/html/t11.png differ diff --git a/doc/html/t12-cannon-cpp.html b/doc/html/t12-cannon-cpp.html new file mode 100644 index 00000000..a1b5d4e6 --- /dev/null +++ b/doc/html/t12-cannon-cpp.html @@ -0,0 +1,241 @@ + + + + + +t12/cannon.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t12/cannon.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation CannonField class, TQt tutorial 12
+**
+****************************************************************/
+
+#include "cannon.h"
+#include <qtimer.h>
+#include <qpainter.h>
+#include <qpixmap.h>
+#include <qdatetime.h>
+
+#include <math.h>
+#include <stdlib.h>
+
+
+CannonField::CannonField( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    ang = 45;
+    f = 0;
+    timerCount = 0;
+    autoShootTimer = new TQTimer( this, "movement handler" );
+    connect( autoShootTimer, SIGNAL(timeout()),
+             this, SLOT(moveShot()) );
+    shoot_ang = 0;
+    shoot_f = 0;
+    target = TQPoint( 0, 0 );
+    setPalette( TQPalette( TQColor( 250, 250, 200) ) );
+    newTarget();
+}
+
+
+void CannonField::setAngle( int degrees )
+{
+    if ( degrees < 5 )
+        degrees = 5;
+    if ( degrees > 70 )
+        degrees = 70;
+    if ( ang == degrees )
+        return;
+    ang = degrees;
+    repaint( cannonRect(), FALSE );
+    emit angleChanged( ang );
+}
+
+
+void CannonField::setForce( int newton )
+{
+    if ( newton < 0 )
+        newton = 0;
+    if ( f == newton )
+        return;
+    f = newton;
+    emit forceChanged( f );
+}
+
+
+void CannonField::shoot()
+{
+    if ( autoShootTimer->isActive() )
+        return;
+    timerCount = 0;
+    shoot_ang = ang;
+    shoot_f = f;
+    autoShootTimer->start( 50 );
+}
+
+
+void  CannonField::newTarget()
+{
+    static bool first_time = TRUE;
+    if ( first_time ) {
+        first_time = FALSE;
+        TQTime midnight( 0, 0, 0 );
+        srand( midnight.secsTo(TQTime::currentTime()) );
+    }
+    TQRegion r( targetRect() );
+    target = TQPoint( 200 + rand() % 190,
+                     10  + rand() % 255 );
+    repaint( r.unite( targetRect() ) );
+}
+
+
+void CannonField::moveShot()
+{
+    TQRegion r( shotRect() );
+    timerCount++;
+
+    TQRect shotR = shotRect();
+
+    if ( shotR.intersects( targetRect() ) ) {
+        autoShootTimer->stop();
+        emit hit();
+    } else if ( shotR.x() > width() || shotR.y() > height() ) {
+        autoShootTimer->stop();
+        emit missed();
+    } else {
+        r = r.unite( TQRegion( shotR ) );
+    }
+
+    repaint( r );
+}
+
+
+void CannonField::paintEvent( TQPaintEvent *e )
+{
+    TQRect updateR = e->rect();
+    TQPainter p( this );
+
+    if ( updateR.intersects( cannonRect() ) )
+        paintCannon( &p );
+    if ( autoShootTimer->isActive() &&
+         updateR.intersects( shotRect() ) )
+        paintShot( &p );
+    if ( updateR.intersects( targetRect() ) )
+        paintTarget( &p );
+}
+
+
+void CannonField::paintShot( TQPainter *p )
+{
+    p->setBrush( black );
+    p->setPen( NoPen );
+    p->drawRect( shotRect() );
+}
+
+
+void CannonField::paintTarget( TQPainter *p )
+{
+    p->setBrush( red );
+    p->setPen( black );
+    p->drawRect( targetRect() );
+}
+
+
+const TQRect barrelRect(33, -4, 15, 8);
+
+void CannonField::paintCannon( TQPainter *p )
+{
+    TQRect cr = cannonRect();
+    TQPixmap pix( cr.size() );
+    pix.fill( this, cr.topLeft() );
+
+    TQPainter tmp( &pix );
+    tmp.setBrush( blue );
+    tmp.setPen( NoPen );
+
+    tmp.translate( 0, pix.height() - 1 );
+    tmp.drawPie( TQRect( -35,-35, 70, 70 ), 0, 90*16 );
+    tmp.rotate( -ang );
+    tmp.drawRect( barrelRect );
+    tmp.end();
+
+    p->drawPixmap( cr.topLeft(), pix );
+}
+
+
+TQRect CannonField::cannonRect() const
+{
+    TQRect r( 0, 0, 50, 50 );
+    r.moveBottomLeft( rect().bottomLeft() );
+    return r;
+}
+
+
+TQRect CannonField::shotRect() const
+{
+    const double gravity = 4;
+
+    double time      = timerCount / 4.0;
+    double velocity  = shoot_f;
+    double radians   = shoot_ang*3.14159265/180;
+
+    double velx      = velocity*cos( radians );
+    double vely      = velocity*sin( radians );
+    double x0        = ( barrelRect.right()  + 5 )*cos(radians);
+    double y0        = ( barrelRect.right()  + 5 )*sin(radians);
+    double x         = x0 + velx*time;
+    double y         = y0 + vely*time - 0.5*gravity*time*time;
+
+    TQRect r = TQRect( 0, 0, 6, 6 );
+    r.moveCenter( TQPoint( qRound(x), height() - 1 - qRound(y) ) );
+    return r;
+}
+
+
+TQRect CannonField::targetRect() const
+{
+    TQRect r( 0, 0, 20, 10 );
+    r.moveCenter( TQPoint(target.x(),height() - 1 - target.y()) );
+    return r;
+}
+
+
+TQSizePolicy CannonField::sizePolicy() const
+{
+    return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t12-cannon-h.html b/doc/html/t12-cannon-h.html new file mode 100644 index 00000000..67b0a016 --- /dev/null +++ b/doc/html/t12-cannon-h.html @@ -0,0 +1,106 @@ + + + + + +t12/cannon.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t12/cannon.h Example File

+ + +
/****************************************************************
+**
+** Definition of CannonField class, TQt tutorial 12
+**
+****************************************************************/
+
+#ifndef CANNON_H
+#define CANNON_H
+
+class TQTimer;
+
+
+#include <qwidget.h>
+
+
+class CannonField : public TQWidget
+{
+    Q_OBJECT
+public:
+    CannonField( TQWidget *parent=0, const char *name=0 );
+
+    int   angle() const { return ang; }
+    int   force() const { return f; }
+    TQSizePolicy sizePolicy() const;
+
+public slots:
+    void  setAngle( int degrees );
+    void  setForce( int newton );
+    void  shoot();
+    void  newTarget();
+
+private slots:
+    void  moveShot();
+
+signals:
+    void  hit();
+    void  missed();
+    void  angleChanged( int );
+    void  forceChanged( int );
+
+protected:
+    void  paintEvent( TQPaintEvent * );
+
+private:
+    void  paintShot( TQPainter * );
+    void  paintTarget( TQPainter * );
+    void  paintCannon( TQPainter * );
+    TQRect cannonRect() const;
+    TQRect shotRect() const;
+    TQRect targetRect() const;
+
+    int ang;
+    int f;
+
+    int timerCount;
+    TQTimer * autoShootTimer;
+    float shoot_ang;
+    float shoot_f;
+
+    TQPoint target;
+};
+
+
+#endif // CANNON_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t12-lcdrange-cpp.html b/doc/html/t12-lcdrange-cpp.html new file mode 100644 index 00000000..e17d4b4f --- /dev/null +++ b/doc/html/t12-lcdrange-cpp.html @@ -0,0 +1,125 @@ + + + + + +t12/lcdrange.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t12/lcdrange.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation of LCDRange class, TQt tutorial 12
+**
+****************************************************************/
+
+#include "lcdrange.h"
+
+#include <qslider.h>
+#include <qlcdnumber.h>
+#include <qlabel.h>
+
+
+LCDRange::LCDRange( TQWidget *parent, const char *name )
+        : TQVBox( parent, name )
+{
+    init();
+}
+
+
+LCDRange::LCDRange( const char *s, TQWidget *parent,
+                    const char *name )
+        : TQVBox( parent, name )
+{
+    init();
+    setText( s );
+}
+
+
+void LCDRange::init()
+{
+    TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd"  );
+    slider = new TQSlider( Horizontal, this, "slider" );
+    slider->setRange( 0, 99 );
+    slider->setValue( 0 );
+
+    label = new TQLabel( " ", this, "label"  );
+    label->setAlignment( AlignCenter );
+
+    connect( slider, SIGNAL(valueChanged(int)),
+             lcd, SLOT(display(int)) );
+    connect( slider, SIGNAL(valueChanged(int)),
+             SIGNAL(valueChanged(int)) );
+
+    setFocusProxy( slider );
+}
+
+
+int LCDRange::value() const
+{
+    return slider->value();
+}
+
+
+const char *LCDRange::text() const
+{
+    return label->text();
+}
+
+
+void LCDRange::setValue( int value )
+{
+    slider->setValue( value );
+}
+
+
+void LCDRange::setRange( int minVal, int maxVal )
+{
+    if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) {
+        qWarning( "LCDRange::setRange(%d,%d)\n"
+                  "\tRange must be 0..99\n"
+                  "\tand minVal must not be greater than maxVal",
+                  minVal, maxVal );
+        return;
+    }
+    slider->setRange( minVal, maxVal );
+}
+
+
+void LCDRange::setText( const char *s )
+{
+    label->setText( s );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t12-lcdrange-h.html b/doc/html/t12-lcdrange-h.html new file mode 100644 index 00000000..1631a56e --- /dev/null +++ b/doc/html/t12-lcdrange-h.html @@ -0,0 +1,85 @@ + + + + + +t12/lcdrange.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t12/lcdrange.h Example File

+ + +
/****************************************************************
+**
+** Definition of LCDRange class, TQt tutorial 12
+**
+****************************************************************/
+
+#ifndef LCDRANGE_H
+#define LCDRANGE_H
+
+#include <qvbox.h>
+
+class TQSlider;
+class TQLabel;
+
+
+class LCDRange : public TQVBox
+{
+    Q_OBJECT
+public:
+    LCDRange( TQWidget *parent=0, const char *name=0 );
+    LCDRange( const char *s, TQWidget *parent=0,
+              const char *name=0 );
+
+    int         value() const;
+    const char *text()  const;
+
+public slots:
+    void setValue( int );
+    void setRange( int minVal, int maxVal );
+    void setText( const char * );
+
+signals:
+    void valueChanged( int );
+
+private:
+    void init();
+
+    TQSlider     *slider;
+    TQLabel      *label;
+};
+
+
+#endif // LCDRANGE_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t12-main-cpp.html b/doc/html/t12-main-cpp.html new file mode 100644 index 00000000..2106eb5e --- /dev/null +++ b/doc/html/t12-main-cpp.html @@ -0,0 +1,127 @@ + + + + + +t12/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t12/main.cpp Example File

+ + +
/****************************************************************
+**
+** TQt tutorial 12
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qlcdnumber.h>
+#include <qfont.h>
+#include <qlayout.h>
+
+#include "lcdrange.h"
+#include "cannon.h"
+
+
+class MyWidget: public TQWidget
+{
+public:
+    MyWidget( TQWidget *parent=0, const char *name=0 );
+};
+
+
+MyWidget::MyWidget( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    TQPushButton *tquit = new TQPushButton( "&Quit", this, "tquit" );
+    tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+
+    LCDRange *angle  = new LCDRange( "ANGLE", this, "angle" );
+    angle->setRange( 5, 70 );
+
+    LCDRange *force  = new LCDRange( "FORCE", this, "force" );
+    force->setRange( 10, 50 );
+
+    CannonField *cannonField = new CannonField( this, "cannonField" );
+
+    connect( angle, SIGNAL(valueChanged(int)),
+             cannonField, SLOT(setAngle(int)) );
+    connect( cannonField, SIGNAL(angleChanged(int)),
+             angle, SLOT(setValue(int)) );
+
+    connect( force, SIGNAL(valueChanged(int)),
+             cannonField, SLOT(setForce(int)) );
+    connect( cannonField, SIGNAL(forceChanged(int)),
+             force, SLOT(setValue(int)) );
+
+    TQPushButton *shoot = new TQPushButton( "&Shoot", this, "shoot" );
+    shoot->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( shoot, SIGNAL(clicked()), cannonField, SLOT(shoot()) );
+
+    TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 );
+    grid->addWidget( tquit, 0, 0 );
+    grid->addWidget( cannonField, 1, 1 );
+    grid->setColStretch( 1, 10 );
+
+    TQVBoxLayout *leftBox = new TQVBoxLayout;
+    grid->addLayout( leftBox, 1, 0 );
+    leftBox->addWidget( angle );
+    leftBox->addWidget( force );
+
+    TQHBoxLayout *topBox = new TQHBoxLayout;
+    grid->addLayout( topBox, 0, 1 );
+    topBox->addWidget( shoot );
+    topBox->addStretch( 1 );
+
+    angle->setValue( 60 );
+    force->setValue( 25 );
+    angle->setFocus();
+}
+
+int main( int argc, char **argv )
+{
+    TQApplication::setColorSpec( TQApplication::CustomColor );
+    TQApplication a( argc, argv );
+
+    MyWidget w;
+    w.setGeometry( 100, 100, 500, 355 );
+    a.setMainWidget( &w );
+    w.show();
+    return a.exec();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t12.png b/doc/html/t12.png new file mode 100644 index 00000000..c748837f Binary files /dev/null and b/doc/html/t12.png differ diff --git a/doc/html/t13-cannon-cpp.html b/doc/html/t13-cannon-cpp.html new file mode 100644 index 00000000..809c1883 --- /dev/null +++ b/doc/html/t13-cannon-cpp.html @@ -0,0 +1,273 @@ + + + + + +t13/cannon.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t13/cannon.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation CannonField class, TQt tutorial 13
+**
+****************************************************************/
+
+#include "cannon.h"
+#include <qtimer.h>
+#include <qpainter.h>
+#include <qpixmap.h>
+#include <qdatetime.h>
+
+#include <math.h>
+#include <stdlib.h>
+
+
+CannonField::CannonField( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    ang = 45;
+    f = 0;
+    timerCount = 0;
+    autoShootTimer = new TQTimer( this, "movement handler" );
+    connect( autoShootTimer, SIGNAL(timeout()),
+             this, SLOT(moveShot()) );
+    shoot_ang = 0;
+    shoot_f = 0;
+    target = TQPoint( 0, 0 );
+    gameEnded = FALSE;
+    setPalette( TQPalette( TQColor( 250, 250, 200) ) );
+    newTarget();
+}
+
+
+void CannonField::setAngle( int degrees )
+{
+    if ( degrees < 5 )
+        degrees = 5;
+    if ( degrees > 70 )
+        degrees = 70;
+    if ( ang == degrees )
+        return;
+    ang = degrees;
+    repaint( cannonRect(), FALSE );
+    emit angleChanged( ang );
+}
+
+
+void CannonField::setForce( int newton )
+{
+    if ( newton < 0 )
+        newton = 0;
+    if ( f == newton )
+        return;
+    f = newton;
+    emit forceChanged( f );
+}
+
+
+void CannonField::shoot()
+{
+    if ( isShooting() )
+        return;
+    timerCount = 0;
+    shoot_ang = ang;
+    shoot_f = f;
+    autoShootTimer->start( 50 );
+    emit canShoot( FALSE );
+}
+
+
+void  CannonField::newTarget()
+{
+    static bool first_time = TRUE;
+    if ( first_time ) {
+        first_time = FALSE;
+        TQTime midnight( 0, 0, 0 );
+        srand( midnight.secsTo(TQTime::currentTime()) );
+    }
+    TQRegion r( targetRect() );
+    target = TQPoint( 200 + rand() % 190,
+                     10  + rand() % 255 );
+    repaint( r.unite( targetRect() ) );
+}
+
+void CannonField::setGameOver()
+{
+    if ( gameEnded )
+        return;
+    if ( isShooting() )
+        autoShootTimer->stop();
+    gameEnded = TRUE;
+    repaint();
+}
+
+void CannonField::restartGame()
+{
+    if ( isShooting() )
+        autoShootTimer->stop();
+    gameEnded = FALSE;
+    repaint();
+    emit canShoot( TRUE );
+}
+
+void CannonField::moveShot()
+{
+    TQRegion r( shotRect() );
+    timerCount++;
+
+    TQRect shotR = shotRect();
+
+    if ( shotR.intersects( targetRect() ) ) {
+        autoShootTimer->stop();
+        emit hit();
+        emit canShoot( TRUE );
+    } else if ( shotR.x() > width() || shotR.y() > height() ) {
+        autoShootTimer->stop();
+        emit missed();
+        emit canShoot( TRUE );
+    } else {
+        r = r.unite( TQRegion( shotR ) );
+    }
+
+    repaint( r );
+}
+
+
+void CannonField::paintEvent( TQPaintEvent *e )
+{
+    TQRect updateR = e->rect();
+    TQPainter p( this );
+
+    if ( gameEnded ) {
+        p.setPen( black );
+        p.setFont( TQFont( "Courier", 48, TQFont::Bold ) );
+        p.drawText( rect(), AlignCenter, "Game Over" );
+    }
+    if ( updateR.intersects( cannonRect() ) )
+        paintCannon( &p );
+    if ( isShooting() && updateR.intersects( shotRect() ) )
+        paintShot( &p );
+    if ( !gameEnded && updateR.intersects( targetRect() ) )
+        paintTarget( &p );
+}
+
+
+void CannonField::paintShot( TQPainter *p )
+{
+    p->setBrush( black );
+    p->setPen( NoPen );
+    p->drawRect( shotRect() );
+}
+
+
+void CannonField::paintTarget( TQPainter *p )
+{
+    p->setBrush( red );
+    p->setPen( black );
+    p->drawRect( targetRect() );
+}
+
+
+const TQRect barrelRect(33, -4, 15, 8);
+
+void CannonField::paintCannon( TQPainter *p )
+{
+    TQRect cr = cannonRect();
+    TQPixmap pix( cr.size() );
+    pix.fill( this, cr.topLeft() );
+
+    TQPainter tmp( &pix );
+    tmp.setBrush( blue );
+    tmp.setPen( NoPen );
+
+    tmp.translate( 0, pix.height() - 1 );
+    tmp.drawPie( TQRect( -35,-35, 70, 70 ), 0, 90*16 );
+    tmp.rotate( -ang );
+    tmp.drawRect( barrelRect );
+    tmp.end();
+
+    p->drawPixmap( cr.topLeft(), pix );
+}
+
+
+TQRect CannonField::cannonRect() const
+{
+    TQRect r( 0, 0, 50, 50 );
+    r.moveBottomLeft( rect().bottomLeft() );
+    return r;
+}
+
+
+TQRect CannonField::shotRect() const
+{
+    const double gravity = 4;
+
+    double time      = timerCount / 4.0;
+    double velocity  = shoot_f;
+    double radians   = shoot_ang*3.14159265/180;
+
+    double velx      = velocity*cos( radians );
+    double vely      = velocity*sin( radians );
+    double x0        = ( barrelRect.right()  + 5 )*cos(radians);
+    double y0        = ( barrelRect.right()  + 5 )*sin(radians);
+    double x         = x0 + velx*time;
+    double y         = y0 + vely*time - 0.5*gravity*time*time;
+
+    TQRect r = TQRect( 0, 0, 6, 6 );
+    r.moveCenter( TQPoint( qRound(x), height() - 1 - qRound(y) ) );
+    return r;
+}
+
+
+TQRect CannonField::targetRect() const
+{
+    TQRect r( 0, 0, 20, 10 );
+    r.moveCenter( TQPoint(target.x(),height() - 1 - target.y()) );
+    return r;
+}
+
+
+bool CannonField::isShooting() const
+{
+    return autoShootTimer->isActive();
+}
+
+
+TQSizePolicy CannonField::sizePolicy() const
+{
+    return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t13-cannon-h.html b/doc/html/t13-cannon-h.html new file mode 100644 index 00000000..c976f85a --- /dev/null +++ b/doc/html/t13-cannon-h.html @@ -0,0 +1,113 @@ + + + + + +t13/cannon.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t13/cannon.h Example File

+ + +
/****************************************************************
+**
+** Definition of CannonField class, TQt tutorial 13
+**
+****************************************************************/
+
+#ifndef CANNON_H
+#define CANNON_H
+
+class TQTimer;
+
+
+#include <qwidget.h>
+
+
+class CannonField : public TQWidget
+{
+    Q_OBJECT
+public:
+    CannonField( TQWidget *parent=0, const char *name=0 );
+
+    int   angle() const { return ang; }
+    int   force() const { return f; }
+    bool  gameOver() const { return gameEnded; }
+    bool  isShooting() const;
+    TQSizePolicy sizePolicy() const;
+
+public slots:
+    void  setAngle( int degrees );
+    void  setForce( int newton );
+    void  shoot();
+    void  newTarget();
+    void  setGameOver();
+    void  restartGame();
+
+private slots:
+    void  moveShot();
+
+signals:
+    void  hit();
+    void  missed();
+    void  angleChanged( int );
+    void  forceChanged( int );
+    void  canShoot( bool );
+
+protected:
+    void  paintEvent( TQPaintEvent * );
+
+private:
+    void  paintShot( TQPainter * );
+    void  paintTarget( TQPainter * );
+    void  paintCannon( TQPainter * );
+    TQRect cannonRect() const;
+    TQRect shotRect() const;
+    TQRect targetRect() const;
+
+    int ang;
+    int f;
+
+    int timerCount;
+    TQTimer * autoShootTimer;
+    float shoot_ang;
+    float shoot_f;
+
+    TQPoint target;
+
+    bool gameEnded;
+};
+
+
+#endif // CANNON_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t13-gamebrd-cpp.html b/doc/html/t13-gamebrd-cpp.html new file mode 100644 index 00000000..62f0a481 --- /dev/null +++ b/doc/html/t13-gamebrd-cpp.html @@ -0,0 +1,171 @@ + + + + + +t13/gamebrd.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t13/gamebrd.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation of GameBoard class, TQt tutorial 13
+**
+****************************************************************/
+
+#include "gamebrd.h"
+
+#include <qfont.h>
+#include <qapplication.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qlcdnumber.h>
+#include <qlayout.h>
+
+#include "lcdrange.h"
+#include "cannon.h"
+
+GameBoard::GameBoard( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    TQPushButton *tquit = new TQPushButton( "&Quit", this, "tquit" );
+    tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+
+    LCDRange *angle  = new LCDRange( "ANGLE", this, "angle" );
+    angle->setRange( 5, 70 );
+
+    LCDRange *force  = new LCDRange( "FORCE", this, "force" );
+    force->setRange( 10, 50 );
+
+    cannonField = new CannonField( this, "cannonField" );
+
+    connect( angle, SIGNAL(valueChanged(int)),
+             cannonField, SLOT(setAngle(int)) );
+    connect( cannonField, SIGNAL(angleChanged(int)),
+             angle, SLOT(setValue(int)) );
+
+    connect( force, SIGNAL(valueChanged(int)),
+             cannonField, SLOT(setForce(int)) );
+    connect( cannonField, SIGNAL(forceChanged(int)),
+             force, SLOT(setValue(int)) );
+
+    connect( cannonField, SIGNAL(hit()),
+             this, SLOT(hit()) );
+    connect( cannonField, SIGNAL(missed()),
+             this, SLOT(missed()) );
+
+    TQPushButton *shoot = new TQPushButton( "&Shoot", this, "shoot" );
+    shoot->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( shoot, SIGNAL(clicked()), SLOT(fire()) );
+    connect( cannonField, SIGNAL(canShoot(bool)),
+             shoot, SLOT(setEnabled(bool)) );
+
+    TQPushButton *restart
+        = new TQPushButton( "&New Game", this, "newgame" );
+    restart->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( restart, SIGNAL(clicked()), this, SLOT(newGame()) );
+
+    hits = new TQLCDNumber( 2, this, "hits" );
+    shotsLeft = new TQLCDNumber( 2, this, "shotsleft" );
+    TQLabel *hitsL = new TQLabel( "HITS", this, "hitsLabel" );
+    TQLabel *shotsLeftL
+        = new TQLabel( "SHOTS LEFT", this, "shotsleftLabel" );
+
+    TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 );
+    grid->addWidget( tquit, 0, 0 );
+    grid->addWidget( cannonField, 1, 1 );
+    grid->setColStretch( 1, 10 );
+
+    TQVBoxLayout *leftBox = new TQVBoxLayout;
+    grid->addLayout( leftBox, 1, 0 );
+    leftBox->addWidget( angle );
+    leftBox->addWidget( force );
+
+    TQHBoxLayout *topBox = new TQHBoxLayout;
+    grid->addLayout( topBox, 0, 1 );
+    topBox->addWidget( shoot );
+    topBox->addWidget( hits );
+    topBox->addWidget( hitsL );
+    topBox->addWidget( shotsLeft );
+    topBox->addWidget( shotsLeftL );
+    topBox->addStretch( 1 );
+    topBox->addWidget( restart );
+
+    angle->setValue( 60 );
+    force->setValue( 25 );
+    angle->setFocus();
+
+    newGame();
+}
+
+
+void GameBoard::fire()
+{
+    if ( cannonField->gameOver() || cannonField->isShooting() )
+        return;
+    shotsLeft->display( shotsLeft->intValue() - 1 );
+    cannonField->shoot();
+}
+
+
+void GameBoard::hit()
+{
+    hits->display( hits->intValue() + 1 );
+    if ( shotsLeft->intValue() == 0 )
+        cannonField->setGameOver();
+    else
+        cannonField->newTarget();
+}
+
+
+void GameBoard::missed()
+{
+    if ( shotsLeft->intValue() == 0 )
+        cannonField->setGameOver();
+}
+
+
+void GameBoard::newGame()
+{
+    shotsLeft->display( 15 );
+    hits->display( 0 );
+    cannonField->restartGame();
+    cannonField->newTarget();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t13-gamebrd-h.html b/doc/html/t13-gamebrd-h.html new file mode 100644 index 00000000..a3f1bae4 --- /dev/null +++ b/doc/html/t13-gamebrd-h.html @@ -0,0 +1,82 @@ + + + + + +t13/gamebrd.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t13/gamebrd.h Example File

+ + +
/****************************************************************
+**
+** Definition of GameBoard class, TQt tutorial 13
+**
+****************************************************************/
+
+#ifndef GAMEBRD_H
+#define GAMEBRD_H
+
+#include <qwidget.h>
+
+class TQPushButton;
+class LCDRange;
+class TQLCDNumber;
+class CannonField;
+
+#include "lcdrange.h"
+#include "cannon.h"
+
+
+class GameBoard : public TQWidget
+{
+    Q_OBJECT
+public:
+    GameBoard( TQWidget *parent=0, const char *name=0 );
+
+protected slots:
+    void  fire();
+    void  hit();
+    void  missed();
+    void  newGame();
+
+private:
+    TQLCDNumber  *hits;
+    TQLCDNumber  *shotsLeft;
+    CannonField *cannonField;
+};
+
+
+#endif // GAMEBRD_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t13-lcdrange-cpp.html b/doc/html/t13-lcdrange-cpp.html new file mode 100644 index 00000000..b4cc7bc5 --- /dev/null +++ b/doc/html/t13-lcdrange-cpp.html @@ -0,0 +1,130 @@ + + + + + +t13/lcdrange.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t13/lcdrange.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation of LCDRange class, TQt tutorial 12
+**
+****************************************************************/
+
+#include "lcdrange.h"
+
+#include <qslider.h>
+#include <qlcdnumber.h>
+#include <qlabel.h>
+#include <qlayout.h>
+
+
+LCDRange::LCDRange( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    init();
+}
+
+
+LCDRange::LCDRange( const char *s, TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    init();
+    setText( s );
+}
+
+
+void LCDRange::init()
+{
+    TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd"  );
+    slider = new TQSlider( Horizontal, this, "slider" );
+    slider->setRange( 0, 99 );
+    slider->setValue( 0 );
+
+    label = new TQLabel( " ", this, "label"  );
+    label->setAlignment( AlignCenter );
+
+    connect( slider, SIGNAL(valueChanged(int)),
+             lcd, SLOT(display(int)) );
+    connect( slider, SIGNAL(valueChanged(int)),
+             SIGNAL(valueChanged(int)) );
+
+    setFocusProxy( slider );
+
+    TQVBoxLayout * l = new TQVBoxLayout( this );
+    l->addWidget( lcd, 1 );
+    l->addWidget( slider );
+    l->addWidget( label );
+}
+
+
+int LCDRange::value() const
+{
+    return slider->value();
+}
+
+
+const char *LCDRange::text() const
+{
+    return label->text();
+}
+
+
+void LCDRange::setValue( int value )
+{
+    slider->setValue( value );
+}
+
+
+void LCDRange::setRange( int minVal, int maxVal )
+{
+    if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) {
+        qWarning( "LCDRange::setRange(%d,%d)\n"
+                  "\tRange must be 0..99\n"
+                  "\tand minVal must not be greater than maxVal",
+                  minVal, maxVal );
+        return;
+    }
+    slider->setRange( minVal, maxVal );
+}
+
+
+void LCDRange::setText( const char *s )
+{
+    label->setText( s );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t13-lcdrange-h.html b/doc/html/t13-lcdrange-h.html new file mode 100644 index 00000000..21eaea69 --- /dev/null +++ b/doc/html/t13-lcdrange-h.html @@ -0,0 +1,84 @@ + + + + + +t13/lcdrange.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t13/lcdrange.h Example File

+ + +
/****************************************************************
+**
+** Definition of LCDRange class, TQt tutorial 12
+**
+****************************************************************/
+
+#ifndef LCDRANGE_H
+#define LCDRANGE_H
+
+#include <qwidget.h>
+
+class TQSlider;
+class TQLabel;
+
+
+class LCDRange : public TQWidget
+{
+    Q_OBJECT
+public:
+    LCDRange( TQWidget *parent=0, const char *name=0 );
+    LCDRange( const char *s, TQWidget *parent=0, const char *name=0 );
+
+    int         value() const;
+    const char *text()  const;
+
+public slots:
+    void setValue( int );
+    void setRange( int minVal, int maxVal );
+    void setText( const char * );
+
+signals:
+    void valueChanged( int );
+
+private:
+    void init();
+
+    TQSlider     *slider;
+    TQLabel      *label;
+};
+
+
+#endif // LCDRANGE_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t13-main-cpp.html b/doc/html/t13-main-cpp.html new file mode 100644 index 00000000..acd77156 --- /dev/null +++ b/doc/html/t13-main-cpp.html @@ -0,0 +1,64 @@ + + + + + +t13/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t13/main.cpp Example File

+ + +
/****************************************************************
+**
+** TQt tutorial 13
+**
+****************************************************************/
+
+#include <qapplication.h>
+
+#include "gamebrd.h"
+
+
+int main( int argc, char **argv )
+{
+    TQApplication::setColorSpec( TQApplication::CustomColor );
+    TQApplication a( argc, argv );
+
+    GameBoard gb;
+    gb.setGeometry( 100, 100, 500, 355 );
+    a.setMainWidget( &gb );
+    gb.show();
+    return a.exec();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t13.png b/doc/html/t13.png new file mode 100644 index 00000000..ff45efdd Binary files /dev/null and b/doc/html/t13.png differ diff --git a/doc/html/t14-cannon-cpp.html b/doc/html/t14-cannon-cpp.html new file mode 100644 index 00000000..5931e025 --- /dev/null +++ b/doc/html/t14-cannon-cpp.html @@ -0,0 +1,334 @@ + + + + + +t14/cannon.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t14/cannon.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation CannonField class, TQt tutorial 14
+**
+****************************************************************/
+
+#include "cannon.h"
+#include <qtimer.h>
+#include <qpainter.h>
+#include <qpixmap.h>
+#include <qdatetime.h>
+
+#include <math.h>
+#include <stdlib.h>
+
+
+CannonField::CannonField( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    ang = 45;
+    f = 0;
+    timerCount = 0;
+    autoShootTimer = new TQTimer( this, "movement handler" );
+    connect( autoShootTimer, SIGNAL(timeout()),
+             this, SLOT(moveShot()) );
+    shoot_ang = 0;
+    shoot_f = 0;
+    target = TQPoint( 0, 0 );
+    gameEnded = FALSE;
+    barrelPressed = FALSE;
+    setPalette( TQPalette( TQColor( 250, 250, 200) ) );
+    newTarget();
+}
+
+
+void CannonField::setAngle( int degrees )
+{
+    if ( degrees < 5 )
+        degrees = 5;
+    if ( degrees > 70 )
+        degrees = 70;
+    if ( ang == degrees )
+        return;
+    ang = degrees;
+    repaint( cannonRect(), FALSE );
+    emit angleChanged( ang );
+}
+
+
+void CannonField::setForce( int newton )
+{
+    if ( newton < 0 )
+        newton = 0;
+    if ( f == newton )
+        return;
+    f = newton;
+    emit forceChanged( f );
+}
+
+
+void CannonField::shoot()
+{
+    if ( isShooting() )
+        return;
+    timerCount = 0;
+    shoot_ang = ang;
+    shoot_f = f;
+    autoShootTimer->start( 50 );
+    emit canShoot( FALSE );
+}
+
+
+void  CannonField::newTarget()
+{
+    static bool first_time = TRUE;
+    if ( first_time ) {
+        first_time = FALSE;
+        TQTime midnight( 0, 0, 0 );
+        srand( midnight.secsTo(TQTime::currentTime()) );
+    }
+    TQRegion r( targetRect() );
+    target = TQPoint( 200 + rand() % 190,
+                     10  + rand() % 255 );
+    repaint( r.unite( targetRect() ) );
+}
+
+void CannonField::setGameOver()
+{
+    if ( gameEnded )
+        return;
+    if ( isShooting() )
+        autoShootTimer->stop();
+    gameEnded = TRUE;
+    repaint();
+}
+
+void CannonField::restartGame()
+{
+    if ( isShooting() )
+        autoShootTimer->stop();
+    gameEnded = FALSE;
+    repaint();
+    emit canShoot( TRUE );
+}
+
+void CannonField::moveShot()
+{
+    TQRegion r( shotRect() );
+    timerCount++;
+
+    TQRect shotR = shotRect();
+
+    if ( shotR.intersects( targetRect() ) ) {
+        autoShootTimer->stop();
+        emit hit();
+        emit canShoot( TRUE );
+    } else if ( shotR.x() > width() || shotR.y() > height() ||
+                shotR.intersects(barrierRect()) ) {
+        autoShootTimer->stop();
+        emit missed();
+        emit canShoot( TRUE );
+    } else {
+        r = r.unite( TQRegion( shotR ) );
+    }
+
+    repaint( r );
+}
+
+
+void CannonField::mousePressEvent( TQMouseEvent *e )
+{
+    if ( e->button() != LeftButton )
+        return;
+    if ( barrelHit( e->pos() ) )
+        barrelPressed = TRUE;
+}
+
+
+void CannonField::mouseMoveEvent( TQMouseEvent *e )
+{
+    if ( !barrelPressed )
+        return;
+    TQPoint pnt = e->pos();
+    if ( pnt.x() <= 0 )
+        pnt.setX( 1 );
+    if ( pnt.y() >= height() )
+        pnt.setY( height() - 1 );
+    double rad = atan(((double)rect().bottom()-pnt.y())/pnt.x());
+    setAngle( qRound ( rad*180/3.14159265 ) );
+}
+
+
+void CannonField::mouseReleaseEvent( TQMouseEvent *e )
+{
+    if ( e->button() == LeftButton )
+        barrelPressed = FALSE;
+}
+
+
+void CannonField::paintEvent( TQPaintEvent *e )
+{
+    TQRect updateR = e->rect();
+    TQPainter p( this );
+
+    if ( gameEnded ) {
+        p.setPen( black );
+        p.setFont( TQFont( "Courier", 48, TQFont::Bold ) );
+        p.drawText( rect(), AlignCenter, "Game Over" );
+    }
+    if ( updateR.intersects( cannonRect() ) )
+        paintCannon( &p );
+    if ( updateR.intersects( barrierRect() ) )
+        paintBarrier( &p );
+    if ( isShooting() && updateR.intersects( shotRect() ) )
+        paintShot( &p );
+    if ( !gameEnded && updateR.intersects( targetRect() ) )
+        paintTarget( &p );
+}
+
+void CannonField::paintShot( TQPainter *p )
+{
+    p->setBrush( black );
+    p->setPen( NoPen );
+    p->drawRect( shotRect() );
+}
+
+
+void CannonField::paintTarget( TQPainter *p )
+{
+    p->setBrush( red );
+    p->setPen( black );
+    p->drawRect( targetRect() );
+}
+
+void CannonField::paintBarrier( TQPainter *p )
+{
+    p->setBrush( yellow );
+    p->setPen( black );
+    p->drawRect( barrierRect() );
+}
+
+const TQRect barrelRect(33, -4, 15, 8);
+
+void CannonField::paintCannon( TQPainter *p )
+{
+    TQRect cr = cannonRect();
+    TQPixmap pix( cr.size() );
+    pix.fill( this, cr.topLeft() );
+
+    TQPainter tmp( &pix );
+    tmp.setBrush( blue );
+    tmp.setPen( NoPen );
+
+    tmp.translate( 0, pix.height() - 1 );
+    tmp.drawPie( TQRect( -35,-35, 70, 70 ), 0, 90*16 );
+    tmp.rotate( -ang );
+    tmp.drawRect( barrelRect );
+    tmp.end();
+
+    p->drawPixmap( cr.topLeft(), pix );
+}
+
+
+TQRect CannonField::cannonRect() const
+{
+    TQRect r( 0, 0, 50, 50 );
+    r.moveBottomLeft( rect().bottomLeft() );
+    return r;
+}
+
+
+TQRect CannonField::shotRect() const
+{
+    const double gravity = 4;
+
+    double time      = timerCount / 4.0;
+    double velocity  = shoot_f;
+    double radians   = shoot_ang*3.14159265/180;
+
+    double velx      = velocity*cos( radians );
+    double vely      = velocity*sin( radians );
+    double x0        = ( barrelRect.right()  + 5 )*cos(radians);
+    double y0        = ( barrelRect.right()  + 5 )*sin(radians);
+    double x         = x0 + velx*time;
+    double y         = y0 + vely*time - 0.5*gravity*time*time;
+
+    TQRect r = TQRect( 0, 0, 6, 6 );
+    r.moveCenter( TQPoint( qRound(x), height() - 1 - qRound(y) ) );
+    return r;
+}
+
+
+TQRect CannonField::targetRect() const
+{
+    TQRect r( 0, 0, 20, 10 );
+    r.moveCenter( TQPoint(target.x(),height() - 1 - target.y()) );
+    return r;
+}
+
+
+TQRect CannonField::barrierRect() const
+{
+    return TQRect( 145, height() - 100, 15, 100 );
+}
+
+
+bool CannonField::barrelHit( const TQPoint &p ) const
+{
+    TQWMatrix mtx;
+    mtx.translate( 0, height() - 1 );
+    mtx.rotate( -ang );
+    mtx = mtx.invert();
+    return barrelRect.contains( mtx.map(p) );
+}
+
+
+bool CannonField::isShooting() const
+{
+    return autoShootTimer->isActive();
+}
+
+
+TQSize CannonField::sizeHint() const
+{
+    return TQSize( 400, 300 );
+}
+
+
+TQSizePolicy CannonField::sizePolicy() const
+{
+    return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t14-cannon-h.html b/doc/html/t14-cannon-h.html new file mode 100644 index 00000000..b25530e2 --- /dev/null +++ b/doc/html/t14-cannon-h.html @@ -0,0 +1,121 @@ + + + + + +t14/cannon.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t14/cannon.h Example File

+ + +
/****************************************************************
+**
+** Definition of CannonField class, TQt tutorial 14
+**
+****************************************************************/
+
+#ifndef CANNON_H
+#define CANNON_H
+
+class TQTimer;
+
+
+#include <qwidget.h>
+
+
+class CannonField : public TQWidget
+{
+    Q_OBJECT
+public:
+    CannonField( TQWidget *parent=0, const char *name=0 );
+
+    int   angle() const { return ang; }
+    int   force() const { return f; }
+    bool  gameOver() const { return gameEnded; }
+    bool  isShooting() const;
+    TQSize sizeHint() const;
+    TQSizePolicy sizePolicy() const;
+
+public slots:
+    void  setAngle( int degrees );
+    void  setForce( int newton );
+    void  shoot();
+    void  newTarget();
+    void  setGameOver();
+    void  restartGame();
+
+private slots:
+    void  moveShot();
+
+signals:
+    void  hit();
+    void  missed();
+    void  angleChanged( int );
+    void  forceChanged( int );
+    void  canShoot( bool );
+
+protected:
+    void  paintEvent( TQPaintEvent * );
+    void  mousePressEvent( TQMouseEvent * );
+    void  mouseMoveEvent( TQMouseEvent * );
+    void  mouseReleaseEvent( TQMouseEvent * );
+
+private:
+    void  paintShot( TQPainter * );
+    void  paintTarget( TQPainter * );
+    void  paintBarrier( TQPainter * );
+    void  paintCannon( TQPainter * );
+    TQRect cannonRect() const;
+    TQRect shotRect() const;
+    TQRect targetRect() const;
+    TQRect barrierRect() const;
+    bool  barrelHit( const TQPoint & ) const;
+
+    int ang;
+    int f;
+
+    int timerCount;
+    TQTimer * autoShootTimer;
+    float shoot_ang;
+    float shoot_f;
+
+    TQPoint target;
+
+    bool gameEnded;
+    bool barrelPressed;
+};
+
+
+#endif // CANNON_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t14-gamebrd-cpp.html b/doc/html/t14-gamebrd-cpp.html new file mode 100644 index 00000000..38289264 --- /dev/null +++ b/doc/html/t14-gamebrd-cpp.html @@ -0,0 +1,185 @@ + + + + + +t14/gamebrd.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t14/gamebrd.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation of GameBoard class, TQt tutorial 14
+**
+****************************************************************/
+
+#include "gamebrd.h"
+
+#include <qfont.h>
+#include <qapplication.h>
+#include <qlabel.h>
+#include <qaccel.h>
+#include <qpushbutton.h>
+#include <qlcdnumber.h>
+#include <qlayout.h>
+#include <qvbox.h>
+
+#include "lcdrange.h"
+#include "cannon.h"
+
+GameBoard::GameBoard( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    TQPushButton *tquit = new TQPushButton( "&Quit", this, "tquit" );
+    tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+
+    LCDRange *angle  = new LCDRange( "ANGLE", this, "angle" );
+    angle->setRange( 5, 70 );
+
+    LCDRange *force  = new LCDRange( "FORCE", this, "force" );
+    force->setRange( 10, 50 );
+
+    TQVBox *box = new TQVBox( this, "cannonFrame" );
+    box->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
+
+    cannonField = new CannonField( box, "cannonField" );
+
+    connect( angle, SIGNAL(valueChanged(int)),
+             cannonField, SLOT(setAngle(int)) );
+    connect( cannonField, SIGNAL(angleChanged(int)),
+             angle, SLOT(setValue(int)) );
+
+    connect( force, SIGNAL(valueChanged(int)),
+             cannonField, SLOT(setForce(int)) );
+    connect( cannonField, SIGNAL(forceChanged(int)),
+             force, SLOT(setValue(int)) );
+
+    connect( cannonField, SIGNAL(hit()),
+             this, SLOT(hit()) );
+    connect( cannonField, SIGNAL(missed()),
+             this, SLOT(missed()) );
+
+    TQPushButton *shoot = new TQPushButton( "&Shoot", this, "shoot" );
+    shoot->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( shoot, SIGNAL(clicked()), SLOT(fire()) );
+
+    connect( cannonField, SIGNAL(canShoot(bool)),
+             shoot, SLOT(setEnabled(bool)) );
+
+    TQPushButton *restart
+        = new TQPushButton( "&New Game", this, "newgame" );
+    restart->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( restart, SIGNAL(clicked()), this, SLOT(newGame()) );
+
+    hits = new TQLCDNumber( 2, this, "hits" );
+    shotsLeft = new TQLCDNumber( 2, this, "shotsleft" );
+    TQLabel *hitsL = new TQLabel( "HITS", this, "hitsLabel" );
+    TQLabel *shotsLeftL
+        = new TQLabel( "SHOTS LEFT", this, "shotsleftLabel" );
+
+    TQAccel *accel = new TQAccel( this );
+    accel->connectItem( accel->insertItem( Key_Enter ),
+                        this, SLOT(fire()) );
+    accel->connectItem( accel->insertItem( Key_Return ),
+                        this, SLOT(fire()) );
+    accel->connectItem( accel->insertItem( CTRL+Key_Q ),
+                        qApp, SLOT(tquit()) );
+
+    TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 );
+    grid->addWidget( tquit, 0, 0 );
+    grid->addWidget( box, 1, 1 );
+    grid->setColStretch( 1, 10 );
+
+    TQVBoxLayout *leftBox = new TQVBoxLayout;
+    grid->addLayout( leftBox, 1, 0 );
+    leftBox->addWidget( angle );
+    leftBox->addWidget( force );
+
+    TQHBoxLayout *topBox = new TQHBoxLayout;
+    grid->addLayout( topBox, 0, 1 );
+    topBox->addWidget( shoot );
+    topBox->addWidget( hits );
+    topBox->addWidget( hitsL );
+    topBox->addWidget( shotsLeft );
+    topBox->addWidget( shotsLeftL );
+    topBox->addStretch( 1 );
+    topBox->addWidget( restart );
+
+    angle->setValue( 60 );
+    force->setValue( 25 );
+    angle->setFocus();
+
+    newGame();
+}
+
+
+void GameBoard::fire()
+{
+    if ( cannonField->gameOver() || cannonField->isShooting() )
+        return;
+    shotsLeft->display( shotsLeft->intValue() - 1 );
+    cannonField->shoot();
+}
+
+
+void GameBoard::hit()
+{
+    hits->display( hits->intValue() + 1 );
+    if ( shotsLeft->intValue() == 0 )
+        cannonField->setGameOver();
+    else
+        cannonField->newTarget();
+}
+
+
+void GameBoard::missed()
+{
+    if ( shotsLeft->intValue() == 0 )
+        cannonField->setGameOver();
+}
+
+
+void GameBoard::newGame()
+{
+    shotsLeft->display( 15 );
+    hits->display( 0 );
+    cannonField->restartGame();
+    cannonField->newTarget();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t14-gamebrd-h.html b/doc/html/t14-gamebrd-h.html new file mode 100644 index 00000000..a03715ea --- /dev/null +++ b/doc/html/t14-gamebrd-h.html @@ -0,0 +1,82 @@ + + + + + +t14/gamebrd.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t14/gamebrd.h Example File

+ + +
/****************************************************************
+**
+** Definition of GameBoard class, TQt tutorial 14
+**
+****************************************************************/
+
+#ifndef GAMEBRD_H
+#define GAMEBRD_H
+
+#include <qwidget.h>
+
+class TQPushButton;
+class LCDRange;
+class TQLCDNumber;
+class CannonField;
+
+#include "lcdrange.h"
+#include "cannon.h"
+
+
+class GameBoard : public TQWidget
+{
+    Q_OBJECT
+public:
+    GameBoard( TQWidget *parent=0, const char *name=0 );
+
+protected slots:
+    void  fire();
+    void  hit();
+    void  missed();
+    void  newGame();
+
+private:
+    TQLCDNumber  *hits;
+    TQLCDNumber  *shotsLeft;
+    CannonField *cannonField;
+};
+
+
+#endif // GAMEBRD_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t14-lcdrange-cpp.html b/doc/html/t14-lcdrange-cpp.html new file mode 100644 index 00000000..fcf42650 --- /dev/null +++ b/doc/html/t14-lcdrange-cpp.html @@ -0,0 +1,130 @@ + + + + + +t14/lcdrange.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t14/lcdrange.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation of LCDRange class, TQt tutorial 12
+**
+****************************************************************/
+
+#include "lcdrange.h"
+
+#include <qslider.h>
+#include <qlcdnumber.h>
+#include <qlabel.h>
+#include <qlayout.h>
+
+
+LCDRange::LCDRange( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    init();
+}
+
+
+LCDRange::LCDRange( const char *s, TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    init();
+    setText( s );
+}
+
+
+void LCDRange::init()
+{
+    TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd"  );
+    slider = new TQSlider( Horizontal, this, "slider" );
+    slider->setRange( 0, 99 );
+    slider->setValue( 0 );
+
+    label = new TQLabel( " ", this, "label"  );
+    label->setAlignment( AlignCenter );
+
+    connect( slider, SIGNAL(valueChanged(int)),
+             lcd, SLOT(display(int)) );
+    connect( slider, SIGNAL(valueChanged(int)),
+             SIGNAL(valueChanged(int)) );
+
+    setFocusProxy( slider );
+
+    TQVBoxLayout * l = new TQVBoxLayout( this );
+    l->addWidget( lcd, 1 );
+    l->addWidget( slider );
+    l->addWidget( label );
+}
+
+
+int LCDRange::value() const
+{
+    return slider->value();
+}
+
+
+const char *LCDRange::text() const
+{
+    return label->text();
+}
+
+
+void LCDRange::setValue( int value )
+{
+    slider->setValue( value );
+}
+
+
+void LCDRange::setRange( int minVal, int maxVal )
+{
+    if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) {
+        qWarning( "LCDRange::setRange(%d,%d)\n"
+                  "\tRange must be 0..99\n"
+                  "\tand minVal must not be greater than maxVal",
+                  minVal, maxVal );
+        return;
+    }
+    slider->setRange( minVal, maxVal );
+}
+
+
+void LCDRange::setText( const char *s )
+{
+    label->setText( s );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t14-lcdrange-h.html b/doc/html/t14-lcdrange-h.html new file mode 100644 index 00000000..f328ffd7 --- /dev/null +++ b/doc/html/t14-lcdrange-h.html @@ -0,0 +1,84 @@ + + + + + +t14/lcdrange.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t14/lcdrange.h Example File

+ + +
/****************************************************************
+**
+** Definition of LCDRange class, TQt tutorial 12
+**
+****************************************************************/
+
+#ifndef LCDRANGE_H
+#define LCDRANGE_H
+
+#include <qwidget.h>
+
+class TQSlider;
+class TQLabel;
+
+
+class LCDRange : public TQWidget
+{
+    Q_OBJECT
+public:
+    LCDRange( TQWidget *parent=0, const char *name=0 );
+    LCDRange( const char *s, TQWidget *parent=0, const char *name=0 );
+
+    int         value() const;
+    const char *text()  const;
+
+public slots:
+    void setValue( int );
+    void setRange( int minVal, int maxVal );
+    void setText( const char * );
+
+signals:
+    void valueChanged( int );
+
+private:
+    void init();
+
+    TQSlider     *slider;
+    TQLabel      *label;
+};
+
+
+#endif // LCDRANGE_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t14-main-cpp.html b/doc/html/t14-main-cpp.html new file mode 100644 index 00000000..e42495ed --- /dev/null +++ b/doc/html/t14-main-cpp.html @@ -0,0 +1,64 @@ + + + + + +t14/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t14/main.cpp Example File

+ + +
/****************************************************************
+**
+** TQt tutorial 14
+**
+****************************************************************/
+
+#include <qapplication.h>
+
+#include "gamebrd.h"
+
+
+int main( int argc, char **argv )
+{
+    TQApplication::setColorSpec( TQApplication::CustomColor );
+    TQApplication a( argc, argv );
+
+    GameBoard gb;
+    gb.setGeometry( 100, 100, 500, 355 );
+    a.setMainWidget( &gb );
+    gb.show();
+    return a.exec();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t14.png b/doc/html/t14.png new file mode 100644 index 00000000..11a1590f Binary files /dev/null and b/doc/html/t14.png differ diff --git a/doc/html/t2.png b/doc/html/t2.png new file mode 100644 index 00000000..fc3e90f6 Binary files /dev/null and b/doc/html/t2.png differ diff --git a/doc/html/t3.png b/doc/html/t3.png new file mode 100644 index 00000000..e8920d74 Binary files /dev/null and b/doc/html/t3.png differ diff --git a/doc/html/t4.png b/doc/html/t4.png new file mode 100644 index 00000000..a1f01e60 Binary files /dev/null and b/doc/html/t4.png differ diff --git a/doc/html/t5.png b/doc/html/t5.png new file mode 100644 index 00000000..8f774e68 Binary files /dev/null and b/doc/html/t5.png differ diff --git a/doc/html/t6.png b/doc/html/t6.png new file mode 100644 index 00000000..41c02ba6 Binary files /dev/null and b/doc/html/t6.png differ diff --git a/doc/html/t7-lcdrange-cpp.html b/doc/html/t7-lcdrange-cpp.html new file mode 100644 index 00000000..768d28f7 --- /dev/null +++ b/doc/html/t7-lcdrange-cpp.html @@ -0,0 +1,75 @@ + + + + + +t7/lcdrange.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t7/lcdrange.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation of LCDRange class, TQt tutorial 7
+**
+****************************************************************/
+
+#include "lcdrange.h"
+
+#include <qslider.h>
+#include <qlcdnumber.h>
+
+LCDRange::LCDRange( TQWidget *parent, const char *name )
+        : TQVBox( parent, name )
+{
+    TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd"  );
+    slider = new TQSlider( Horizontal, this, "slider" );
+    slider->setRange( 0, 99 );
+    slider->setValue( 0 );
+    connect( slider, SIGNAL(valueChanged(int)),
+             lcd, SLOT(display(int)) );
+    connect( slider, SIGNAL(valueChanged(int)),
+             SIGNAL(valueChanged(int)) );
+}
+
+int LCDRange::value() const
+{
+    return slider->value();
+}
+
+void LCDRange::setValue( int value )
+{
+    slider->setValue( value );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t7-lcdrange-h.html b/doc/html/t7-lcdrange-h.html new file mode 100644 index 00000000..b0a5365c --- /dev/null +++ b/doc/html/t7-lcdrange-h.html @@ -0,0 +1,76 @@ + + + + + +t7/lcdrange.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t7/lcdrange.h Example File

+ + +
/****************************************************************
+**
+** Definition of LCDRange class, TQt tutorial 7
+**
+****************************************************************/
+
+#ifndef LCDRANGE_H
+#define LCDRANGE_H
+
+#include <qvbox.h>
+
+class TQSlider;
+
+
+class LCDRange : public TQVBox
+{
+    Q_OBJECT
+public:
+    LCDRange( TQWidget *parent=0, const char *name=0 );
+
+    int value() const;
+
+public slots:
+    void setValue( int );
+
+signals:
+    void valueChanged( int );
+
+private:
+    TQSlider *slider;
+};
+
+
+#endif // LCDRANGE_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t7-main-cpp.html b/doc/html/t7-main-cpp.html new file mode 100644 index 00000000..2355f394 --- /dev/null +++ b/doc/html/t7-main-cpp.html @@ -0,0 +1,97 @@ + + + + + +t7/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t7/main.cpp Example File

+ + +
/****************************************************************
+**
+** TQt tutorial 7
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qlcdnumber.h>
+#include <qfont.h>
+#include <qvbox.h>
+#include <qgrid.h>
+
+#include "lcdrange.h"
+
+
+class MyWidget : public TQVBox
+{
+public:
+    MyWidget( TQWidget *parent=0, const char *name=0 );
+};
+
+
+MyWidget::MyWidget( TQWidget *parent, const char *name )
+        : TQVBox( parent, name )
+{
+    TQPushButton *tquit = new TQPushButton( "Quit", this, "tquit" );
+    tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+
+    TQGrid *grid = new TQGrid( 4, this );
+
+    LCDRange *previous = 0;
+    for( int r = 0 ; r < 4 ; r++ ) {
+        for( int c = 0 ; c < 4 ; c++ ) {
+            LCDRange* lr = new LCDRange( grid );
+            if ( previous )
+                connect( lr, SIGNAL(valueChanged(int)),
+                         previous, SLOT(setValue(int)) );
+            previous = lr;
+        }
+    }
+}
+
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    MyWidget w;
+    a.setMainWidget( &w );
+    w.show();
+    return a.exec();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t7.png b/doc/html/t7.png new file mode 100644 index 00000000..34031635 Binary files /dev/null and b/doc/html/t7.png differ diff --git a/doc/html/t8-cannon-cpp.html b/doc/html/t8-cannon-cpp.html new file mode 100644 index 00000000..5579864c --- /dev/null +++ b/doc/html/t8-cannon-cpp.html @@ -0,0 +1,87 @@ + + + + + +t8/cannon.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t8/cannon.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation CannonField class, TQt tutorial 8
+**
+****************************************************************/
+
+#include "cannon.h"
+#include <qpainter.h>
+
+
+CannonField::CannonField( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    ang = 45;
+    setPalette( TQPalette( TQColor( 250, 250, 200) ) );
+}
+
+
+void CannonField::setAngle( int degrees )
+{
+    if ( degrees < 5 )
+        degrees = 5;
+    if ( degrees > 70 )
+        degrees = 70;
+    if ( ang == degrees )
+        return;
+    ang = degrees;
+    repaint();
+    emit angleChanged( ang );
+}
+
+
+void CannonField::paintEvent( TQPaintEvent * )
+{
+    TQString s = "Angle = " + TQString::number( ang );
+    TQPainter p( this );
+    p.drawText( 200, 200, s );
+}
+
+
+TQSizePolicy CannonField::sizePolicy() const
+{
+    return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
+}
+
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t8-cannon-h.html b/doc/html/t8-cannon-h.html new file mode 100644 index 00000000..c6c790aa --- /dev/null +++ b/doc/html/t8-cannon-h.html @@ -0,0 +1,78 @@ + + + + + +t8/cannon.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t8/cannon.h Example File

+ + +
/****************************************************************
+**
+** Definition of CannonField class, TQt tutorial 8
+**
+****************************************************************/
+
+#ifndef CANNON_H
+#define CANNON_H
+
+#include <qwidget.h>
+
+
+class CannonField : public TQWidget
+{
+    Q_OBJECT
+public:
+    CannonField( TQWidget *parent=0, const char *name=0 );
+
+    int angle() const { return ang; }
+    TQSizePolicy sizePolicy() const;
+
+public slots:
+    void setAngle( int degrees );
+
+signals:
+    void angleChanged( int );
+
+protected:
+    void paintEvent( TQPaintEvent * );
+
+private:
+    int ang;
+};
+
+
+#endif // CANNON_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t8-lcdrange-cpp.html b/doc/html/t8-lcdrange-cpp.html new file mode 100644 index 00000000..a4c584cd --- /dev/null +++ b/doc/html/t8-lcdrange-cpp.html @@ -0,0 +1,89 @@ + + + + + +t8/lcdrange.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t8/lcdrange.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation of LCDRange class, TQt tutorial 8
+**
+****************************************************************/
+
+#include "lcdrange.h"
+
+#include <qslider.h>
+#include <qlcdnumber.h>
+
+LCDRange::LCDRange( TQWidget *parent, const char *name )
+        : TQVBox( parent, name )
+{
+    TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd"  );
+    slider = new TQSlider( Horizontal, this, "slider" );
+    slider->setRange( 0, 99 );
+    slider->setValue( 0 );
+    connect( slider, SIGNAL(valueChanged(int)),
+             lcd, SLOT(display(int)) );
+    connect( slider, SIGNAL(valueChanged(int)),
+             SIGNAL(valueChanged(int)) );
+
+    setFocusProxy( slider );
+}
+
+int LCDRange::value() const
+{
+    return slider->value();
+}
+
+void LCDRange::setValue( int value )
+{
+    slider->setValue( value );
+}
+
+void LCDRange::setRange( int minVal, int maxVal )
+{
+    if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) {
+      qWarning( "LCDRange::setRange(%d,%d)\n"
+               "\tRange must be 0..99\n"
+               "\tand minVal must not be greater than maxVal",
+               minVal, maxVal );
+      return;
+    }
+    slider->setRange( minVal, maxVal );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t8-lcdrange-h.html b/doc/html/t8-lcdrange-h.html new file mode 100644 index 00000000..07949e00 --- /dev/null +++ b/doc/html/t8-lcdrange-h.html @@ -0,0 +1,77 @@ + + + + + +t8/lcdrange.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t8/lcdrange.h Example File

+ + +
/****************************************************************
+**
+** Definition of LCDRange class, TQt tutorial 8
+**
+****************************************************************/
+
+#ifndef LCDRANGE_H
+#define LCDRANGE_H
+
+#include <qvbox.h>
+
+class TQSlider;
+
+
+class LCDRange : public TQVBox
+{
+    Q_OBJECT
+public:
+    LCDRange( TQWidget *parent=0, const char *name=0 );
+
+    int value() const;
+
+public slots:
+    void setValue( int );
+    void setRange( int minVal, int maxVal );
+
+signals:
+    void valueChanged( int );
+
+private:
+    TQSlider  *slider;
+};
+
+
+#endif // LCDRANGE_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t8-main-cpp.html b/doc/html/t8-main-cpp.html new file mode 100644 index 00000000..0d5f4d01 --- /dev/null +++ b/doc/html/t8-main-cpp.html @@ -0,0 +1,107 @@ + + + + + +t8/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t8/main.cpp Example File

+ + +
/****************************************************************
+**
+** TQt tutorial 8
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qlcdnumber.h>
+#include <qfont.h>
+#include <qlayout.h>
+
+#include "lcdrange.h"
+#include "cannon.h"
+
+
+class MyWidget: public TQWidget
+{
+public:
+    MyWidget( TQWidget *parent=0, const char *name=0 );
+};
+
+
+MyWidget::MyWidget( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    TQPushButton *tquit = new TQPushButton( "Quit", this, "tquit" );
+    tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+
+    LCDRange *angle = new LCDRange( this, "angle" );
+    angle->setRange( 5, 70 );
+
+    CannonField *cannonField
+        = new CannonField( this, "cannonField" );
+
+    connect( angle, SIGNAL(valueChanged(int)),
+             cannonField, SLOT(setAngle(int)) );
+    connect( cannonField, SIGNAL(angleChanged(int)),
+             angle, SLOT(setValue(int)) );
+
+    TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 );
+    //2x2, 10 pixel border
+
+    grid->addWidget( tquit, 0, 0 );
+    grid->addWidget( angle, 1, 0, TQt::AlignTop );
+    grid->addWidget( cannonField, 1, 1 );
+    grid->setColStretch( 1, 10 );
+
+    angle->setValue( 60 );
+    angle->setFocus();
+}
+
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    MyWidget w;
+    w.setGeometry( 100, 100, 500, 355 );
+    a.setMainWidget( &w );
+    w.show();
+    return a.exec();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t8.png b/doc/html/t8.png new file mode 100644 index 00000000..4e52f00c Binary files /dev/null and b/doc/html/t8.png differ diff --git a/doc/html/t9-cannon-cpp.html b/doc/html/t9-cannon-cpp.html new file mode 100644 index 00000000..b9b5a2ae --- /dev/null +++ b/doc/html/t9-cannon-cpp.html @@ -0,0 +1,92 @@ + + + + + +t9/cannon.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t9/cannon.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation CannonField class, TQt tutorial 9
+**
+****************************************************************/
+
+#include "cannon.h"
+#include <qpainter.h>
+
+
+CannonField::CannonField( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    ang = 45;
+    setPalette( TQPalette( TQColor( 250, 250, 200) ) );
+}
+
+
+void CannonField::setAngle( int degrees )
+{
+    if ( degrees < 5 )
+        degrees = 5;
+    if ( degrees > 70 )
+        degrees = 70;
+    if ( ang == degrees )
+        return;
+    ang = degrees;
+    repaint();
+    emit angleChanged( ang );
+}
+
+
+void CannonField::paintEvent( TQPaintEvent * )
+{
+    TQPainter p( this );
+
+    p.setBrush( blue );
+    p.setPen( NoPen );
+
+    p.translate( 0, rect().bottom() );
+    p.drawPie( TQRect(-35, -35, 70, 70), 0, 90*16 );
+    p.rotate( -ang );
+    p.drawRect( TQRect(33, -4, 15, 8) );
+}
+
+
+TQSizePolicy CannonField::sizePolicy() const
+{
+    return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t9-cannon-h.html b/doc/html/t9-cannon-h.html new file mode 100644 index 00000000..e7f6da0f --- /dev/null +++ b/doc/html/t9-cannon-h.html @@ -0,0 +1,78 @@ + + + + + +t9/cannon.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t9/cannon.h Example File

+ + +
/****************************************************************
+**
+** Definition of CannonField class, TQt tutorial 8
+**
+****************************************************************/
+
+#ifndef CANNON_H
+#define CANNON_H
+
+#include <qwidget.h>
+
+
+class CannonField : public TQWidget
+{
+    Q_OBJECT
+public:
+    CannonField( TQWidget *parent=0, const char *name=0 );
+
+    int angle() const { return ang; }
+    TQSizePolicy sizePolicy() const;
+
+public slots:
+    void setAngle( int degrees );
+
+signals:
+    void angleChanged( int );
+
+protected:
+    void paintEvent( TQPaintEvent * );
+
+private:
+    int ang;
+};
+
+
+#endif // CANNON_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t9-lcdrange-cpp.html b/doc/html/t9-lcdrange-cpp.html new file mode 100644 index 00000000..790fe4af --- /dev/null +++ b/doc/html/t9-lcdrange-cpp.html @@ -0,0 +1,89 @@ + + + + + +t9/lcdrange.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t9/lcdrange.cpp Example File

+ + +
/****************************************************************
+**
+** Implementation of LCDRange class, TQt tutorial 8
+**
+****************************************************************/
+
+#include "lcdrange.h"
+
+#include <qslider.h>
+#include <qlcdnumber.h>
+
+LCDRange::LCDRange( TQWidget *parent, const char *name )
+        : TQVBox( parent, name )
+{
+    TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd"  );
+    slider = new TQSlider( Horizontal, this, "slider" );
+    slider->setRange( 0, 99 );
+    slider->setValue( 0 );
+    connect( slider, SIGNAL(valueChanged(int)),
+             lcd, SLOT(display(int)) );
+    connect( slider, SIGNAL(valueChanged(int)),
+             SIGNAL(valueChanged(int)) );
+
+    setFocusProxy( slider );
+}
+
+int LCDRange::value() const
+{
+    return slider->value();
+}
+
+void LCDRange::setValue( int value )
+{
+    slider->setValue( value );
+}
+
+void LCDRange::setRange( int minVal, int maxVal )
+{
+    if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) {
+      qWarning( "LCDRange::setRange(%d,%d)\n"
+               "\tRange must be 0..99\n"
+               "\tand minVal must not be greater than maxVal",
+               minVal, maxVal );
+      return;
+    }
+    slider->setRange( minVal, maxVal );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t9-lcdrange-h.html b/doc/html/t9-lcdrange-h.html new file mode 100644 index 00000000..8ad68229 --- /dev/null +++ b/doc/html/t9-lcdrange-h.html @@ -0,0 +1,77 @@ + + + + + +t9/lcdrange.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t9/lcdrange.h Example File

+ + +
/****************************************************************
+**
+** Definition of LCDRange class, TQt tutorial 8
+**
+****************************************************************/
+
+#ifndef LCDRANGE_H
+#define LCDRANGE_H
+
+#include <qvbox.h>
+
+class TQSlider;
+
+
+class LCDRange : public TQVBox
+{
+    Q_OBJECT
+public:
+    LCDRange( TQWidget *parent=0, const char *name=0 );
+
+    int value() const;
+
+public slots:
+    void setValue( int );
+    void setRange( int minVal, int maxVal );
+
+signals:
+    void valueChanged( int );
+
+private:
+    TQSlider  *slider;
+};
+
+
+#endif // LCDRANGE_H
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t9-main-cpp.html b/doc/html/t9-main-cpp.html new file mode 100644 index 00000000..e9ca64c0 --- /dev/null +++ b/doc/html/t9-main-cpp.html @@ -0,0 +1,104 @@ + + + + + +t9/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

t9/main.cpp Example File

+ + +
/****************************************************************
+**
+** TQt tutorial 9
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qlcdnumber.h>
+#include <qfont.h>
+#include <qlayout.h>
+
+#include "lcdrange.h"
+#include "cannon.h"
+
+
+class MyWidget: public TQWidget
+{
+public:
+    MyWidget( TQWidget *parent=0, const char *name=0 );
+};
+
+
+MyWidget::MyWidget( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    TQPushButton *tquit = new TQPushButton( "&Quit", this, "tquit" );
+    tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+
+    LCDRange *angle = new LCDRange( this, "angle" );
+    angle->setRange( 5, 70 );
+
+    CannonField *cannonField = new CannonField( this, "cannonField" );
+
+    connect( angle, SIGNAL(valueChanged(int)),
+             cannonField, SLOT(setAngle(int)) );
+    connect( cannonField, SIGNAL(angleChanged(int)),
+             angle, SLOT(setValue(int)) );
+
+    TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 );
+    grid->addWidget( tquit, 0, 0 );
+    grid->addWidget( angle, 1, 0, TQt::AlignTop );
+    grid->addWidget( cannonField, 1, 1 );
+    grid->setColStretch( 1, 10 );
+
+    angle->setValue( 60 );
+    angle->setFocus();
+}
+
+int main( int argc, char **argv )
+{
+    TQApplication::setColorSpec( TQApplication::CustomColor );
+    TQApplication a( argc, argv );
+
+    MyWidget w;
+    w.setGeometry( 100, 100, 500, 355 );
+    a.setMainWidget( &w );
+    w.show();
+    return a.exec();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/t9.png b/doc/html/t9.png new file mode 100644 index 00000000..1ddf2479 Binary files /dev/null and b/doc/html/t9.png differ diff --git a/doc/html/t9_1.png b/doc/html/t9_1.png new file mode 100644 index 00000000..1f1d3372 Binary files /dev/null and b/doc/html/t9_1.png differ diff --git a/doc/html/t9_2.png b/doc/html/t9_2.png new file mode 100644 index 00000000..d7bc7a28 Binary files /dev/null and b/doc/html/t9_2.png differ diff --git a/doc/html/tabdialog-example.html b/doc/html/tabdialog-example.html new file mode 100644 index 00000000..a38da337 --- /dev/null +++ b/doc/html/tabdialog-example.html @@ -0,0 +1,234 @@ + + + + + +Tabdialog + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Tabdialog

+ + +

+This example shows how to use a dialog with multiple tabs +(pages). To start the program you have to specify a filename +as the first argument. The dialog shows information about the +file separated onto different tabs. +


+

Header file: +

/****************************************************************************
+** $Id: qt/tabdialog.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef TABDIALOG_H
+#define TABDIALOG_H
+
+#include <qtabdialog.h>
+#include <qstring.h>
+#include <qfileinfo.h>
+
+class TabDialog : public TQTabDialog
+{
+    Q_OBJECT
+
+public:
+    TabDialog( TQWidget *parent, const char *name, const TQString &_filename );
+
+protected:
+    TQString filename;
+    TQFileInfo fileinfo;
+
+    void setupTab1();
+    void setupTab2();
+    void setupTab3();
+
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/tabdialog.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "tabdialog.h"
+
+#include <qvbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qdatetime.h>
+#include <qbuttongroup.h>
+#include <qcheckbox.h>
+#include <qlistbox.h>
+#include <qapplication.h>
+
+TabDialog::TabDialog( TQWidget *parent, const char *name, const TQString &_filename )
+    : TQTabDialog( parent, name ), filename( _filename ), fileinfo( filename )
+{
+    setupTab1();
+    setupTab2();
+    setupTab3();
+
+    connect( this, SIGNAL( applyButtonPressed() ), qApp, SLOT( tquit() ) );
+}
+
+void TabDialog::setupTab1()
+{
+    TQVBox *tab1 = new TQVBox( this );
+    tab1->setMargin( 5 );
+
+    (void)new TQLabel( "Filename:", tab1 );
+    TQLineEdit *fname = new TQLineEdit( filename, tab1 );
+    fname->setFocus();
+
+    (void)new TQLabel( "Path:", tab1 );
+    TQLabel *path = new TQLabel( fileinfo.dirPath( TRUE ), tab1 );
+    path->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+
+    (void)new TQLabel( "Size:", tab1 );
+    ulong kb = (ulong)(fileinfo.size()/1024);
+    TQLabel *size = new TQLabel( TQString( "%1 KB" ).arg( kb ), tab1 );
+    size->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+
+    (void)new TQLabel( "Last Read:", tab1 );
+    TQLabel *lread = new TQLabel( fileinfo.lastRead().toString(), tab1 );
+    lread->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+
+    (void)new TQLabel( "Last Modified:", tab1 );
+    TQLabel *lmodif = new TQLabel( fileinfo.lastModified().toString(), tab1 );
+    lmodif->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+
+    addTab( tab1, "General" );
+}
+
+void TabDialog::setupTab2()
+{
+    TQVBox *tab2 = new TQVBox( this );
+    tab2->setMargin( 5 );
+
+    TQButtonGroup *bg = new TQButtonGroup( 1, TQGroupBox::Horizontal, "Permissions", tab2 );
+
+    TQCheckBox *readable = new TQCheckBox( "Readable", bg );
+    if ( fileinfo.isReadable() )
+        readable->setChecked( TRUE );
+
+    TQCheckBox *writable = new TQCheckBox( "Writeable", bg );
+    if ( fileinfo.isWritable() )
+        writable->setChecked( TRUE );
+
+    TQCheckBox *executable = new TQCheckBox( "Executable", bg );
+    if ( fileinfo.isExecutable() )
+        executable->setChecked( TRUE );
+
+    TQButtonGroup *bg2 = new TQButtonGroup( 2, TQGroupBox::Horizontal, "Owner", tab2 );
+
+    (void)new TQLabel( "Owner", bg2 );
+    TQLabel *owner = new TQLabel( fileinfo.owner(), bg2 );
+    owner->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+
+    (void)new TQLabel( "Group", bg2 );
+    TQLabel *group = new TQLabel( fileinfo.group(), bg2 );
+    group->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+
+    addTab( tab2, "Permissions" );
+}
+
+void TabDialog::setupTab3()
+{
+    TQVBox *tab3 = new TQVBox( this );
+    tab3->setMargin( 5 );
+    tab3->setSpacing( 5 );
+
+    (void)new TQLabel( TQString( "Open %1 with:" ).arg( filename ), tab3 );
+
+    TQListBox *prgs = new TQListBox( tab3 );
+    for ( unsigned int i = 0; i < 30; i++ ) {
+        TQString prg = TQString( "Application %1" ).arg( i );
+        prgs->insertItem( prg );
+    }
+    prgs->setCurrentItem( 3 );
+
+    (void)new TQCheckBox( TQString( "Open files with the extension '%1' always with this application" ).arg( fileinfo.extension() ), tab3 );
+
+    addTab( tab3, "Applications" );
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "tabdialog.h"
+#include <qapplication.h>
+#include <qstring.h>
+
+int main( int argc, char **argv )
+{
+
+    TQApplication a( argc, argv );
+
+    TabDialog tabdialog( 0, "tabdialog", TQString( argc < 2 ? "." : argv[1] ) );
+    tabdialog.resize( 450, 350 );
+    tabdialog.setCaption( "TQt Example - Tabbed Dialog" );
+    a.setMainWidget( &tabdialog );
+    tabdialog.show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/table-bigtable-main-cpp.html b/doc/html/table-bigtable-main-cpp.html new file mode 100644 index 00000000..c7e1afd2 --- /dev/null +++ b/doc/html/table-bigtable-main-cpp.html @@ -0,0 +1,106 @@ + + + + + +table/bigtable/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

table/bigtable/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qtable.h>
+
+// Table size
+
+const int numRows = 1000000;
+const int numCols = 1000000;
+
+class MyTable : public TQTable
+{
+public:
+    MyTable( int r, int c ) : TQTable( r, c ) {
+        items.setAutoDelete( TRUE );
+        widgets.setAutoDelete( TRUE );
+        setCaption( tr( "A 1 Million x 1 Million Cell Table" ) );
+        setLeftMargin( fontMetrics().width( "W999999W" ) );
+    }
+
+    void resizeData( int ) {}
+    TQTableItem *item( int r, int c ) const { return items.find( indexOf( r, c ) ); }
+    void setItem( int r, int c, TQTableItem *i ) { items.replace( indexOf( r, c ), i ); }
+    void clearCell( int r, int c ) { items.remove( indexOf( r, c ) ); }
+    void takeItem( TQTableItem *item )
+    {
+        items.setAutoDelete( FALSE );
+        items.remove( indexOf( item->row(), item->col() ) );
+        items.setAutoDelete( TRUE );
+    }
+    void insertWidget( int r, int c, TQWidget *w ) { widgets.replace( indexOf( r, c ), w );  }
+    TQWidget *cellWidget( int r, int c ) const { return widgets.find( indexOf( r, c ) ); }
+    void clearCellWidget( int r, int c )
+    {
+        TQWidget *w = widgets.take( indexOf( r, c ) );
+        if ( w )
+            w->deleteLater();
+    }
+
+private:
+    TQIntDict<TQTableItem> items;
+    TQIntDict<TQWidget> widgets;
+
+};
+
+// The program starts here.
+
+int main( int argc, char **argv )
+{
+    TQApplication app( argc, argv );
+
+    MyTable table( numRows, numCols );
+    app.setMainWidget( &table );
+    table.show();
+    return app.exec();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/table-examples.html b/doc/html/table-examples.html new file mode 100644 index 00000000..a30ef312 --- /dev/null +++ b/doc/html/table-examples.html @@ -0,0 +1,50 @@ + + + + + +Table Examples + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Table Examples

+ + +

The following example programs demonstrate the use +of the TQt table module. +

+

+
How to create a large, sparse TQTable +
Small Table Example +
Table Example +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/table-small-table-demo-main-cpp.html b/doc/html/table-small-table-demo-main-cpp.html new file mode 100644 index 00000000..9c704d61 --- /dev/null +++ b/doc/html/table-small-table-demo-main-cpp.html @@ -0,0 +1,100 @@ + + + + + +table/small-table-demo/main.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

table/small-table-demo/main.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qtable.h>
+#include <qimage.h>
+#include <qpixmap.h>
+#include <qstringlist.h>
+
+// TQt logo: static const char *qtlogo_xpm[]
+#include "qtlogo.xpm"
+
+// Table size
+
+const int numRows = 30;
+const int numCols = 10;
+
+// The program starts here.
+
+int main( int argc, char **argv )
+{
+    TQApplication app( argc, argv );
+
+    TQTable table( numRows, numCols );
+
+    TQHeader *header = table.horizontalHeader();
+    header->setLabel( 0, TQObject::tr( "Tiny" ), 40 );
+    header->setLabel( 1, TQObject::tr( "Checkboxes" ) );
+    header->setLabel( 5, TQObject::tr( "Combos" ) );
+    table.setColumnMovingEnabled(TRUE);
+
+    TQImage img( qtlogo_xpm );
+    TQPixmap pix = img.scaleHeight( table.rowHeight(3) );
+    table.setPixmap( 3, 2, pix );
+    table.setText( 3, 2, "A Pixmap" );
+
+    TQStringList comboEntries;
+    comboEntries << "one" << "two" << "three" << "four";
+
+    for ( int i = 0; i < numRows; ++i ){
+        TQComboTableItem * item = new TQComboTableItem( &table, comboEntries, FALSE );
+        item->setCurrentItem( i % 4 );
+        table.setItem( i, 5, item );
+    }
+    for ( int j = 0; j < numRows; ++j )
+        table.setItem( j, 1, new TQCheckTableItem( &table, "Check me" ) );
+
+    app.setMainWidget( &table );
+    table.show();
+    return app.exec();
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/table-statistics-statistics-cpp.html b/doc/html/table-statistics-statistics-cpp.html new file mode 100644 index 00000000..3a50861a --- /dev/null +++ b/doc/html/table-statistics-statistics-cpp.html @@ -0,0 +1,214 @@ + + + + + +table/statistics/statistics.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

table/statistics/statistics.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/statistics.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "statistics.h"
+
+#include <qdir.h>
+#include <qstringlist.h>
+#include <qheader.h>
+#include <qcombobox.h>
+#include <stdlib.h>
+
+const char* dirs[] = {
+    "kernel",
+    "tools",
+    "widgets",
+    "dialogs",
+    "xml",
+    "table",
+    "network",
+    "opengl",
+    "canvas",
+    0
+};
+
+Table::Table()
+    : TQTable( 10, 100, 0, "table" )
+{
+    setSorting( TRUE );
+    horizontalHeader()->setLabel( 0, tr( "File" ) );
+    horizontalHeader()->setLabel( 1, tr( "Size (bytes)" ) );
+    horizontalHeader()->setLabel( 2, tr( "Use in Sum" ) );
+    initTable();
+    adjustColumn( 0 );
+
+    // if the user edited something we might need to recalculate the sum
+    connect( this, SIGNAL( valueChanged( int, int ) ),
+             this, SLOT( recalcSum( int, int ) ) );
+}
+
+void Table::initTable()
+{
+    // read all the TQt source and header files into a list
+    TQStringList all;
+    int i = 0;
+    TQString srcdir( "../../../src/" );
+    while ( dirs[ i ] ) {
+        TQDir dir( srcdir + dirs[ i ] );
+        TQStringList lst = dir.entryList( "*.cpp; *.h" );
+        for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+            if ( ( *it ).contains( "moc" ) )
+                continue;
+            all << (TQString( dirs[ i ] ) + "/" + *it);
+        }
+        ++i;
+    }
+
+    // set the number of rows we'll need for the table
+    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 ) {
+        setText( i, 0, *it );
+        TQFile f( srcdir + *it );
+        setText( i, 1, TQString::number( (ulong)f.size() ) );
+        ComboItem *ci = new ComboItem( this, TQTableItem::WhenCurrent );
+        setItem( i++, 2, ci );
+        sum += f.size();
+    }
+
+    // last row should show the sum
+    TableItem *i1 = new TableItem( this, TQTableItem::Never, tr( "Sum" ) );
+    setItem( i, 0, i1 );
+    TableItem *i2 = new TableItem( this, TQTableItem::Never, TQString::number( sum ) );
+    setItem( i, 1, i2 );
+}
+
+void Table::recalcSum( int, int col )
+{
+    // only recalc if a value in the second or third column changed
+    if ( col < 1 || col > 2 )
+        return;
+
+    // recalc sum
+    int sum = 0;
+    for ( int i = 0; i < numRows() - 1; ++i ) {
+        if ( text( i, 2 ) == "No" )
+            continue;
+        sum += text( i, 1 ).toInt();
+    }
+
+    // insert calculated data
+    TableItem *i1 = new TableItem( this, TQTableItem::Never, tr( "Sum" ) );
+    setItem( numRows() - 1, 0, i1 );
+    TableItem *i2 = new TableItem( this, TQTableItem::Never, TQString::number( sum ) );
+    setItem( numRows() - 1, 1, i2 );
+}
+
+void Table::sortColumn( int col, bool ascending, bool /*wholeRows*/ )
+{
+    // sum row should not be sorted, so get rid of it for now
+    clearCell( numRows() - 1, 0 );
+    clearCell( numRows() - 1, 1 );
+    // do sort
+    TQTable::sortColumn( col, ascending, TRUE );
+    // re-insert sum row
+    recalcSum( 0, 1 );
+}
+
+
+
+void TableItem::paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected )
+{
+    TQColorGroup g( cg );
+    // last row is the sum row - we want to make it more visible by
+    // using a red background
+    if ( row() == table()->numRows() - 1 )
+        g.setColor( TQColorGroup::Base, red );
+    TQTableItem::paint( p, g, cr, selected );
+}
+
+
+
+
+ComboItem::ComboItem( TQTable *t, EditType et )
+    : TQTableItem( t, et, "Yes" ), cb( 0 )
+{
+    // we do not want this item to be replaced
+    setReplaceable( FALSE );
+}
+
+TQWidget *ComboItem::createEditor() const
+{
+    // create an editor - a combobox in our case
+    ( (ComboItem*)this )->cb = new TQComboBox( table()->viewport() );
+    TQObject::connect( cb, SIGNAL( activated( int ) ), table(), SLOT( doValueChanged() ) );
+    cb->insertItem( "Yes" );
+    cb->insertItem( "No" );
+    // and initialize it
+    cb->setCurrentItem( text() == "No" ? 1 : 0 );
+    return cb;
+}
+
+void ComboItem::setContentFromEditor( TQWidget *w )
+{
+    // the user changed the value of the combobox, so synchronize the
+    // value of the item (its text), with the value of the combobox
+    if ( w->inherits( "TQComboBox" ) )
+        setText( ( (TQComboBox*)w )->currentText() );
+    else
+        TQTableItem::setContentFromEditor( w );
+}
+
+void ComboItem::setText( const TQString &s )
+{
+    if ( cb ) {
+        // initialize the combobox from the text
+        if ( s == "No" )
+            cb->setCurrentItem( 1 );
+        else
+            cb->setCurrentItem( 0 );
+    }
+    TQTableItem::setText( s );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/table.html b/doc/html/table.html new file mode 100644 index 00000000..47393f37 --- /dev/null +++ b/doc/html/table.html @@ -0,0 +1,64 @@ + + + + + +Table Module + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Table Module

+ + +

+

The table module provides a flexible and editable table widget, TQTable. For many applications TQTables can be used directly and simply, +providing a grid of editable cells. TQTable can also be subclassed in a +straightforward way to provide very large sparse tables, e.g. one +million by one million cells. +

Screenshot of TQTable +

The table module provides the following classes: +

    +
  • TQTable itself is the widget of choice whenever you need to +provide your users with the ability to display and edit +tabular data such as spreadsheet or database data. +
  • TQTableItem objects are used to populate a TQTable with data with +each table item holding the contents of a cell. +
  • The TQComboTableItem class provides memory-efficient combobox items for TQTables. +
  • The TQCheckTableItem class provides memory-efficient checkbox items for TQTables. +
  • TQTableSelection provides access to selections of cells in a TQTable. +
  • TQHeader provides access to the table's horizontal header (column +headers) and vertical header (row headers). +
+

See the appropriate class documentation for details and refer to the +TQt table examples. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tablet-example.html b/doc/html/tablet-example.html new file mode 100644 index 00000000..b8d3a076 --- /dev/null +++ b/doc/html/tablet-example.html @@ -0,0 +1,47 @@ + + + + + +Tablet Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Tablet Example

+ + +

+This example shows how to interact with a tablet device. +

See $QTDIR/examples/tablet for the source code. +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tagreader-example.html b/doc/html/tagreader-example.html new file mode 100644 index 00000000..2088fcb5 --- /dev/null +++ b/doc/html/tagreader-example.html @@ -0,0 +1,159 @@ + + + + + +A tiny SAX2 parser + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A tiny SAX2 parser

+ + +

+

This example presents a small SAX2 +reader that outputs the names of all elements in an +XML document on the command line. The element names are +indented corresponding to their nesting +

This example is thoroughly explained in a +walkthrough. +


+

Header file: +

/****************************************************************************
+** $Id: qt/structureparser.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef STRUCTUREPARSER_H
+#define STRUCTUREPARSER_H
+
+#include <qxml.h>
+
+class TQString;
+
+class StructureParser : public TQXmlDefaultHandler
+{
+public:
+    bool startDocument();
+    bool startElement( const TQString&, const TQString&, const TQString& ,
+                       const TQXmlAttributes& );
+    bool endElement( const TQString&, const TQString&, const TQString& );
+
+private:
+    TQString indent;
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/structureparser.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "structureparser.h"
+
+#include <stdio.h>
+#include <qstring.h>
+
+bool StructureParser::startDocument()
+{
+    indent = "";
+    return TRUE;
+}
+
+bool StructureParser::startElement( const TQString&, const TQString&,
+                                    const TQString& qName,
+                                    const TQXmlAttributes& )
+{
+    printf( "%s%s\n", (const char*)indent, (const char*)qName );
+    indent += "    ";
+    return TRUE;
+}
+
+bool StructureParser::endElement( const TQString&, const TQString&, const TQString& )
+{
+    indent.remove( (uint)0, 4 );
+    return TRUE;
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/tagreader.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "structureparser.h"
+#include <qfile.h>
+#include <qxml.h>
+#include <qwindowdefs.h>
+
+int main( int argc, char **argv )
+{
+    if ( argc < 2 ) {
+        fprintf( stderr, "Usage: %s <xmlfile> [<xmlfile> ...]\n", argv[0] );
+        return 1;
+    }
+    StructureParser handler;
+    TQXmlSimpleReader reader;
+    reader.setContentHandler( &handler );
+    for ( int i=1; i < argc; i++ ) {
+        TQFile xmlFile( argv[i] );
+        TQXmlInputSource source( &xmlFile );
+        reader.parse( source );
+    }
+    return 0;
+}
+
+ +

See also TQt XML Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tagreader-with-features-example.html b/doc/html/tagreader-with-features-example.html new file mode 100644 index 00000000..d9828953 --- /dev/null +++ b/doc/html/tagreader-with-features-example.html @@ -0,0 +1,229 @@ + + + + + +Demonstration of SAX2 features + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Demonstration of SAX2 features

+ + +

+

This example presents a small SAX2 +reader that outputs the qualified names and the +respective namespace URIs of all elements and attributes in an +XML file. Additionally the tree structure of the document is displayed. +

In three listviews the program shows the different output of the reader +depending on how the SAX2 features +http://xml.org/sax/features/namespaces and +http://xml.org/sax/features/namespace-prefixes are set. +

This example is thoroughly explained in a +walkthrough. +


+

Header file: +

/*
+$Id: qt/structureparser.h   3.3.8   edited May 27 2003 $
+*/
+
+#ifndef STRUCTUREPARSER_H
+#define STRUCTUREPARSER_H
+
+#include <qxml.h>
+#include <qptrstack.h>
+
+class TQListView;
+class TQListViewItem;
+class TQString;
+
+class StructureParser: public TQXmlDefaultHandler
+{
+public:
+    StructureParser( TQListView * );
+    bool startElement( const TQString&, const TQString&, const TQString& ,
+                       const TQXmlAttributes& );
+    bool endElement( const TQString&, const TQString&, const TQString& );
+
+    void setListView( TQListView * );
+
+private:
+    TQPtrStack<TQListViewItem> stack;
+    TQListView * table;
+};
+
+#endif
+
+ +


+

Implementation: +

/*
+$Id: qt/structureparser.cpp   3.3.8   edited May 27 2003 $
+*/
+
+#include "structureparser.h"
+
+#include <qstring.h>
+#include <qlistview.h>
+
+StructureParser::StructureParser( TQListView * t )
+                : TQXmlDefaultHandler()
+{
+    setListView( t );
+}
+
+void StructureParser::setListView( TQListView * t )
+{
+    table = t;
+    table->setSorting( -1 );
+    table->addColumn( "Qualified name" );
+    table->addColumn( "Namespace" );
+}
+
+bool StructureParser::startElement( const TQString& namespaceURI,
+                                    const TQString& ,
+                                    const TQString& qName,
+                                    const TQXmlAttributes& attributes)
+{
+    TQListViewItem * element;
+
+    if ( ! stack.isEmpty() ){
+        TQListViewItem *lastChild = stack.top()->firstChild();
+        if ( lastChild ) {
+            while ( lastChild->nextSibling() )
+                lastChild = lastChild->nextSibling();
+        }
+        element = new TQListViewItem( stack.top(), lastChild, qName, namespaceURI );
+    } else {
+        element = new TQListViewItem( table, qName, namespaceURI );
+    }
+    stack.push( element );
+    element->setOpen( TRUE );
+
+    if ( attributes.length() > 0 ) {
+        for ( int i = 0 ; i < attributes.length(); i++ ) {
+            new TQListViewItem( element, attributes.qName(i), attributes.uri(i) );
+        }
+    }
+    return TRUE;
+}
+
+bool StructureParser::endElement( const TQString&, const TQString&,
+                                  const TQString& )
+{
+    stack.pop();
+    return TRUE;
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/tagreader.cpp   3.3.8   edited Jan 11 14:46 $
+**
+** Copyright (C) 2005-2007 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 "structureparser.h"
+#include <qapplication.h>
+#include <qfile.h>
+#include <qxml.h>
+#include <qlistview.h>
+#include <qgrid.h>
+#include <qmainwindow.h>
+#include <qlabel.h>
+
+int main( int argc, char **argv )
+{
+    TQApplication app( argc, argv );
+
+    TQFile xmlFile( argc == 2 ? argv[1] : "fnord.xml" );
+    TQXmlInputSource source( &xmlFile );
+
+    TQXmlSimpleReader reader;
+
+    TQGrid * container = new TQGrid( 3 );
+
+    TQListView * nameSpace = new TQListView( container, "table_namespace" );
+    StructureParser * handler = new StructureParser( nameSpace );
+    reader.setContentHandler( handler );
+    reader.parse( source );
+
+    TQListView * namespacePrefix = new TQListView( container,
+                                                 "table_namespace_prefix" );
+    handler->setListView( namespacePrefix );
+    reader.setFeature( "http://xml.org/sax/features/namespace-prefixes",
+                       TRUE );
+    source.reset();
+    reader.parse( source );
+
+    TQListView * prefix = new TQListView( container, "table_prefix");
+    handler->setListView( prefix );
+    reader.setFeature( "http://xml.org/sax/features/namespaces", FALSE );
+    source.reset();
+    reader.parse( source );
+
+    // namespace label
+    (void) new TQLabel(
+             "Default:\n"
+             "http://xml.org/sax/features/namespaces: TRUE\n"
+             "http://xml.org/sax/features/namespace-prefixes: FALSE\n",
+             container );
+
+    // namespace prefix label
+    (void) new TQLabel(
+             "\n"
+             "http://xml.org/sax/features/namespaces: TRUE\n"
+             "http://xml.org/sax/features/namespace-prefixes: TRUE\n",
+             container );
+
+    // prefix label
+    (void) new TQLabel(
+             "\n"
+             "http://xml.org/sax/features/namespaces: FALSE\n"
+             "http://xml.org/sax/features/namespace-prefixes: TRUE\n",
+             container );
+
+
+    app.setMainWidget( container );
+    container->show();
+    return app.exec();
+}
+
+ +

See also TQt XML Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/templates.html b/doc/html/templates.html new file mode 100644 index 00000000..cd08a160 --- /dev/null +++ b/doc/html/templates.html @@ -0,0 +1,169 @@ + + + + + +Why doesn't TQt use templates for signals and slots? + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Why doesn't TQt use templates for signals and slots?

+ + + +

A simple answer is that when TQt was designed, it was not possible to +fully exploit the template mechanism in multi-platform applications due +to the inadequacies of various compilers. Even today, many widely used +C++ compilers have problems with advanced templates. For example, you +cannot safely rely on partial template instantiation, which is essential +for some non-trivial problem domains. Thus TQt's usage of templates has +to be rather conservative. Keep in mind that TQt is a multi-platform +toolkit, and progress on the Linux/g++ platform does not necessarily +improve the situation elsewhere. +

Eventually those compilers with weak template implementations will +improve. But even if all our users had access to a fully standards +compliant modern C++ compiler with excellent template support, we would +not abandon the string-based approach used by our meta object compiler. +Here are five reasons why: +

1. Syntax matters

+

Syntax isn't just sugar: the syntax we use to express our algorithms can +significantly affect the readability and maintainability of our code. +The syntax used for TQt's signals and slots has proved very successful in +practice. The syntax is intuitive, simple to use and easy to read. +People learning TQt find the syntax helps them understand and utilize the +signals and slots concept -- despite its highly abstract and generic +nature. Furthermore, declaring signals in class definitions ensures that +the signals are protected in the sense of protected C++ member +functions. This helps programmers get their design right from the very +beginning, without even having to think about design patterns. +

2. Precompilers are good

+

TQt's moc (Meta Object Compiler) provides a clean way to go +beyond the compiled language's facilities. It does so by generating +additional C++ code which can be compiled by any standard C++ compiler. +The moc reads C++ source files. If it finds one or more class +declarations that contain the "Q_OBJECT" macro, it produces another C++ +source file which contains the meta object code for those classes. The +C++ source file generated by the moc must be compiled and +linked with the implementation of the class (or it can be +#included into the class's source file). Typically moc +is not called manually, but automatically by the build system, so it +retquires no additional effort by the programmer. +

There are other precompilers, for example, rpc and +idl, that enable programs or objects to communicate over +process or machine boundaries. The alternatives to precompilers are +hacked compilers, proprietary languages or graphical programming tools +with dialogs or wizards that generate obscure code. Rather than locking +our customers into a proprietary C++ compiler or into a particular +Integrated Development Environment, we enable them to use whatever tools +they prefer. Instead of forcing programmers to add generated code into +source repositories, we encourage them to add our tools to their build +system: cleaner, safer and more in the spirit of UNIX. +

3. Flexibility is king

+

C++ is a standarized, powerful and elaborate general-purpose language. +It's the only language that is exploited on such a wide range of +software projects, spanning every kind of application from entire +operating systems, database servers and high end graphics +applications to common desktop applications. One of the keys to C++'s +success is its scalable language design that focuses on maximum +performance and minimal memory consumption whilst still maintaining +ANSI-C compatibility. +

For all these advantages, there are some downsides. For C++, the static +object model is a clear disadvantage over the dynamic messaging approach +of Objective C when it comes to component-based graphical user interface +programming. What's good for a high end database server or an operating +system isn't necessarily the right design choice for a GUI frontend. +With moc, we have turned this disadvantage into an advantage, +and added the flexibility retquired to meet the challenge of safe and +efficient graphical user interface programming. +

Our approach goes far beyond anything you can do with templates. For +example, we can have object properties. And we can have overloaded +signals and slots, which feels natural when programming in a language +where overloads are a key concept. Our signals add zero bytes to the +size of a class instance, which means we can add new signals without +breaking binary compatibility. Because we do not rely on excessive +inlining as done with templates, we can keep the code size smaller. +Adding new connections just expands to a simple function call rather +than a complex template function. +

Another benefit is that we can explore an object's signals and slots at +runtime. We can establish connections using type-safe call-by-name, +without having to know the exact types of the objects we are connecting. +This is impossible with a template based solution. This kind of runtime +introspection opens up new possibilities, for example GUIs that are +generated and connected from TQt Designer's XML ui files. +

4. Calling performance is not everything

+

TQt's signals and slots implementation is not as fast as a template-based +solution. While emitting a signal is approximately the cost of four +ordinary function calls with common template implementations, TQt +retquires effort comparable to about ten function calls. This is not +surprising since the TQt mechanism includes a generic marshaller, +introspection and ultimately scriptability. It does not rely on +excessive inlining and code expansion and it provides unmatched runtime +safety. TQt's iterators are safe while those of faster template-based +systems are not. Even during the process of emitting a signal to several +receivers, those receivers can be deleted safely without your program +crashing. Without this safety, your application would eventually crash +with a difficult to debug free'd memory read or write error. +

Nonetheless, couldn't a template-based solution improve the performance +of an application using signals and slots? While it is true that TQt adds +a small overhead to the cost of calling a slot through a signal, the +cost of the call is only a small proportion of the entire cost of a +slot. Benchmarking against TQt's signals and slots system is typically +done with empty slots. As soon as you do anything useful in your slots, +for example a few simple string operations, the calling overhead becomes +negligible. TQt's system is so optimized that anything that retquires +operator new or delete (for example, string operations or +inserting/removing something from a template container) is significantly +more expensive than emitting a signal. +

Aside: If you have a signals and slots connection in a tight inner loop +of a performance critical task and you identify this connection as the +bottleneck, think about using the standard listener-interface pattern +rather than signals and slots. In cases where this occurs, you probably +only retquire a 1:1 connection anyway. For example, if you have an object +that downloads data from the network, it's a perfectly sensible design +to use a signal to indicate that the requested data arrived. But if you +need to send out every single byte one by one to a consumer, use a +listener interface rather than signals and slots. +

5. No limits

+

Because we had the moc for signals and slots, we could add +other useful things to it that could not not be done with templates. +Among these are scoped translations via a generated tr() +function, and an advanced property system with introspection and +extended runtime type information. The property system alone is a great +advantage: a powerful and generic user interface design tool like TQt +Designer would be a lot harder to write - if not impossible - without a +powerful and introspective property system. +

C++ with the moc preprocessor essentially gives us the +flexibility of Objective-C or of a Java Runtime Environment, while +maintaining C++'s unique performance and scalability advantages. It is +what makes TQt the flexible and comfortable tool we have today. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tetrix-example.html b/doc/html/tetrix-example.html new file mode 100644 index 00000000..e01794ed --- /dev/null +++ b/doc/html/tetrix-example.html @@ -0,0 +1,75 @@ + + + + + +Tetrix + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Tetrix

+ + +

+This is the TQt implementation of the well known game Tetris. +


+

Main: +

/****************************************************************************
+** $Id: qt/tetrix.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "qtetrix.h"
+#include "qdragapp.h"
+#include "qfont.h"
+
+int main( int argc, char **argv )
+{
+    TQApplication::setColorSpec( TQApplication::CustomColor );
+    TQDragApplication a(argc,argv);
+    TQTetrix *tetrix = new TQTetrix;
+    tetrix->setCaption("Tetrix");
+    a.setMainWidget(tetrix);
+    tetrix->setCaption("TQt Example - Tetrix");
+    tetrix->show();
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/text.html b/doc/html/text.html new file mode 100644 index 00000000..c35d8af8 --- /dev/null +++ b/doc/html/text.html @@ -0,0 +1,65 @@ + + + + + +Text Related Classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Text Related Classes

+ + +

These classes are relevant to text processing. See also the +XML classes. + +

+
TQCharLightweight Unicode character +
TQCharRefHelper class for TQString +
TQConstStringString objects using constant Unicode data +
TQCStringAbstraction of the classic C zero-terminated char array (char *) +
TQLabelText or image display +
TQLocaleConverts between numbers and their string representations in various languages +
TQSimpleRichTextSmall displayable piece of rich text +
TQStringAbstraction of Unicode text and the classic C '\0'-terminated char array +
TQStringListList of strings +
TQStrListDoubly-linked list of char* +
TQStyleSheetCollection of styles for rich text rendering and a generator of tags +
TQStyleSheetItemEncapsulation of a set of text styles +
TQSyntaxHighlighterBase class for implementing TQTextEdit syntax highlighters +
TQTextBrowserRich text browser with hypertext navigation +
TQTextEditPowerful single-page rich text editor +
TQTextIStreamConvenience class for input streams +
TQTextOStreamConvenience class for output streams +
TQTextStreamBasic functions for reading and writing text using a TQIODevice +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/textedit-example.html b/doc/html/textedit-example.html new file mode 100644 index 00000000..1ae287e0 --- /dev/null +++ b/doc/html/textedit-example.html @@ -0,0 +1,50 @@ + + + + + +Text Edit Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Text Edit Example

+ + +

+This example displays a text editor with the user interface written +in pure C++. +

A similar example which uses TQt + Designer to produce the user interface is in the TQt Designer manual. +

See $QTDIR/examples/textedit for the source code. +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/themes-example.html b/doc/html/themes-example.html new file mode 100644 index 00000000..dbd93459 --- /dev/null +++ b/doc/html/themes-example.html @@ -0,0 +1,2376 @@ + + + + + +Themes (Styles) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Themes (Styles)

+ + +

+This examples demonstrates how to let widgets be drawn in different +styles (themes). As an example, themes looking like wood and metal +are implemented. You can switch between the different styles +during runtime using the pulldown menu. +


+

Header file of the Wood theme: +

/****************************************************************************
+** $Id: qt/wood.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of something or other
+**
+** Created : 979899
+**
+** Copyright (C) 1997-2007 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.
+**
+*****************************************************************************/
+
+#ifndef WOOD_H
+#define WOOD_H
+
+
+#include <qpalette.h>
+
+#ifndef QT_NO_STYLE_WINDOWS
+
+#include <qwindowsstyle.h>
+
+
+class NorwegianWoodStyle : public TQWindowsStyle
+{
+public:
+    NorwegianWoodStyle();
+    void polish( TQApplication*);
+    void polish( TQWidget* );
+    void unPolish( TQWidget* );
+    void unPolish( TQApplication*);
+
+    void drawPrimitive( PrimitiveElement pe,
+                        TQPainter *p,
+                        const TQRect &r,
+                        const TQColorGroup &cg,
+                        SFlags flags = Style_Default,
+                        const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawControl( ControlElement element,
+                      TQPainter *p,
+                      const TQWidget *widget,
+                      const TQRect &r,
+                      const TQColorGroup &cg,
+                      SFlags how = Style_Default,
+                      const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawControlMask( ControlElement element,
+                          TQPainter *p,
+                          const TQWidget *widget,
+                          const TQRect &r,
+                          const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawComplexControl( ComplexControl cc,
+                             TQPainter *p,
+                             const TQWidget *widget,
+                             const TQRect &r,
+                             const TQColorGroup &cg,
+                             SFlags how = Style_Default,
+                             SCFlags sub = SC_All,
+                             SCFlags subActive = SC_None,
+                             const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawComplexControlMask( ComplexControl control,
+                                 TQPainter *p,
+                                 const TQWidget *widget,
+                                 const TQRect &r,
+                                 const TQStyleOption& = TQStyleOption::Default ) const;
+
+    TQRect querySubControlMetrics( ComplexControl control,
+                                  const TQWidget *widget,
+                                  SubControl sc,
+                                  const TQStyleOption& = TQStyleOption::Default ) const;
+
+    TQRect subRect( SubRect r, const TQWidget *widget ) const;
+
+
+private:
+    void drawSemicircleButton(TQPainter *p, const TQRect &r, int dir,
+                              bool sunken, const TQColorGroup &g ) const;
+    TQPalette oldPalette;
+    TQPixmap *sunkenDark;
+    TQPixmap *sunkenLight;
+
+};
+
+#endif
+
+#endif
+
+ +


+

Implementation of the Wood theme: +

/****************************************************************************
+** $Id: qt/wood.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "wood.h"
+
+#ifndef QT_NO_STYLE_WINDOWS
+
+#include "qapplication.h"
+#include "qcombobox.h"
+#include "qpainter.h"
+#include "qdrawutil.h" // for now
+#include "qpixmap.h" // for now
+#include "qpalette.h" // for now
+#include "qwidget.h"
+#include "qlabel.h"
+#include "qimage.h"
+#include "qpushbutton.h"
+#include "qwidget.h"
+#include "qrangecontrol.h"
+#include "qscrollbar.h"
+#include <limits.h>
+#include "qstylefactory.h"
+
+/* XPM */
+static const char *polish_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"    96    96      254            2",
+/* colors */
+".. c #9c4a34",
+".# c #a4825c",
+".a c #bc5e2c",
+".b c #d48432",
+".c c #dc9f51",
+".d c #bc6e1c",
+".e c #d4855d",
+".f c #94664c",
+".g c #bc714e",
+".h c #8c6664",
+".i c #d4923c",
+".j c #bc8444",
+".k c #d49360",
+".l c #d4794e",
+".m c #ecaf68",
+".n c #bc8365",
+".o c #d47439",
+".p c #a46954",
+".q c #dc9f70",
+".r c #e48544",
+".s c #bc7b51",
+".t c #a47761",
+".u c #bc7b42",
+".v c #a4523c",
+".w c #e4945e",
+".x c #9c784c",
+".y c #d4844a",
+".z c #eca053",
+".A c #bc614c",
+".B c #e4855c",
+".C c #bc8350",
+".D c #c48e68",
+".E c #b16634",
+".F c #e49339",
+".G c #bc703a",
+".H c #bc7c67",
+".I c #a45f34",
+".J c #cc714d",
+".K c #d48c5f",
+".L c #a47057",
+".M c #cc703a",
+".N c #dca674",
+".O c #b47859",
+".P c #bc6729",
+".Q c #d49475",
+".R c #d48b4a",
+".S c #cc8351",
+".T c #cc8466",
+".U c #ac6841",
+".V c #e4a651",
+".W c #e49576",
+".X c #d47d31",
+".Y c #ac6e4b",
+".Z c #c07650",
+".0 c #e48c43",
+".1 c #e49452",
+".2 c #9c745f",
+".3 c #e47e54",
+".4 c #cc7c4f",
+".5 c #cc7c32",
+".6 c #b46133",
+".7 c #d49a68",
+".8 c #d67e4f",
+".9 c #bc7643",
+"#. c #b47056",
+"## c #d48b3a",
+"#a c #dc9f5e",
+"#b c #e49a60",
+"#c c #cc6a31",
+"#d c #8c6244",
+"#e c #dc9a41",
+"#f c #eca753",
+"#g c #bc8a58",
+"#h c #d48c76",
+"#i c #bc693f",
+"#j c #bc715d",
+"#k c #9c6857",
+"#l c #f4b171",
+"#m c #bc8a6a",
+"#n c #eca16d",
+"#o c #a87e58",
+"#p c #a4613f",
+"#q c #a48569",
+"#r c #d4846d",
+"#s c #dc935f",
+"#t c #c47c50",
+"#u c #dc8449",
+"#v c #bc6950",
+"#w c #cc9678",
+"#x c #c4703a",
+"#y c #cc7b67",
+"#z c #dc8c5e",
+"#A c #ac7067",
+"#B c #eca86e",
+"#C c #b4786d",
+"#D c #dc8c4a",
+"#E c #b46842",
+"#F c #d47c41",
+"#G c #e48d51",
+"#H c #e59a52",
+"#I c #9c6e3f",
+"#J c #d49351",
+"#K c #cc843b",
+"#L c #ecb678",
+"#M c #9c5a38",
+"#N c #d4795c",
+"#O c #c47b39",
+"#P c #ec9560",
+"#Q c #ac764c",
+"#R c #c48351",
+"#S c #c48e74",
+"#T c #cc7650",
+"#U c #cc8a84",
+"#V c #bc6a5c",
+"#W c #e4af74",
+"#X c #b46855",
+"#Y c #e4a06e",
+"#Z c #ac775b",
+"#0 c #e48d5d",
+"#1 c #c47d65",
+"#2 c #cc763f",
+"#3 c #b47e5d",
+"#4 c #cc8a55",
+"#5 c #cc8a67",
+"#6 c #bf622f",
+"#7 c #dc853b",
+"#8 c #e49f4a",
+"#9 c #9c505c",
+"a. c #8c5644",
+"a# c #cc7329",
+"aa c #a45a51",
+"ab c #b48264",
+"ac c #9c7a7c",
+"ad c #9c5f4f",
+"ae c #b4844c",
+"af c #a46749",
+"ag c #dca664",
+"ah c #b46e1c",
+"ai c #c4762c",
+"aj c #a45a3c",
+"ak c #dc9a74",
+"al c #ac7e46",
+"am c #ac6a6c",
+"an c #eca862",
+"ao c #e49a41",
+"ap c #e49a78",
+"aq c #bc7660",
+"ar c #d57e5e",
+"as c #9c6e5c",
+"at c #ab7e65",
+"au c #cc8a44",
+"av c #9c6240",
+"aw c #bc6244",
+"ax c #bc5d3f",
+"ay c #e48550",
+"az c #eca060",
+"aA c #cc7160",
+"aB c #cc7c42",
+"aC c #b46241",
+"aD c #b4726c",
+"aE c #eca67f",
+"aF c #9c6a3c",
+"aG c #94685a",
+"aH c #c48240",
+"aI c #c48465",
+"aJ c #dc7640",
+"aK c #cc8f54",
+"aL c #e4a76f",
+"aM c #c4692e",
+"aN c #dc9474",
+"aO c #ac6050",
+"aP c #b47048",
+"aQ c #94614b",
+"aR c #ac836c",
+"aS c #a47048",
+"aT c #b4764a",
+"aU c #ec8e5c",
+"aV c #dc9a53",
+"aW c #cc765e",
+"aX c #b48a64",
+"aY c #dc9a63",
+"aZ c #c47640",
+"a0 c #ec9a60",
+"a1 c #c48a54",
+"a2 c #c48a67",
+"a3 c #ac5a3c",
+"a4 c #ac8458",
+"a5 c #dc855d",
+"a6 c #c4714d",
+"a7 c #dc9243",
+"a8 c #dc794e",
+"a9 c #ac6955",
+"b. c #cc8f67",
+"b# c #ac6032",
+"ba c #ac7056",
+"bb c #dc7a34",
+"bc c #ec9553",
+"bd c #dc8d3b",
+"be c #e4a060",
+"bf c #f4a654",
+"bg c #c46842",
+"bh c #c46f62",
+"bi c #ac613d",
+"bj c #dc866c",
+"bk c #c4694e",
+"bl c #dc7d42",
+"bm c #ec8d4f",
+"bn c #dc9351",
+"bo c #cc9177",
+"bp c #c4695f",
+"bq c #ecb075",
+"br c #e4a75f",
+"bs c #d4843c",
+"bt c #bc722c",
+"bu c #d4936c",
+"bv c #d47644",
+"bw c #bc7d5c",
+"bx c #ac563c",
+"by c #e4956c",
+"bz c #a47a4c",
+"bA c #d48454",
+"bB c #bc825c",
+"bC c #e49544",
+"bD c #bc7044",
+"bE c #bc7e74",
+"bF c #d48d6c",
+"bG c #cc7144",
+"bH c #b47864",
+"bI c #bc6a34",
+"bJ c #d49684",
+"bK c #d48b54",
+"bL c #cc845c",
+"bM c #cc8474",
+"bN c #ac684c",
+"bO c #cc7d5c",
+"bP c #eca27c",
+"bQ c #dc946c",
+"bR c #c47c5c",
+"bS c #dc8554",
+"bT c #c47244",
+"bU c #dc8c6c",
+"bV c #dc8c54",
+"bW c #b4684c",
+"bX c #cc8344",
+"bY c #c47b44",
+"bZ c #c4825c",
+"b0 c #e4a17c",
+"b1 c #ac7a64",
+"b2 c #e48c6c",
+"b3 c #c47a74",
+"b4 c #e49f54",
+"b5 c #9c674c",
+"b6 c #946764",
+"b7 c #c48674",
+/* pixels */
+"#u#G#G#P#G#G#G.1#G#G.1.1.1.w#G.r#D.1.1.1#D#DbVbV.K.K.K.KbO.Z.Z#TaP.GaT.Z.O.O.O.H.9aP.ZaPaPaPbZbo.i.k#J.k#JbKbnbn#b#sbVbV#G#G.r.ray.r.0#G.0#G.1bc.r.0.0bc.0.0.0.r.1.1.1.1#G#D.0#D.0.0.0bcbcbc.1.0",
+"#aagaLbrag#a#a#a#DbVbn#G#0.1#0#Da5#za5.4.J.Jbk#vbt.G#x.9bY.4#tbYbw.saPaP.Ub#af.Y.s.s.Z.saP#E.gbw.U.U.UaObWbWbWaPb#b#.E#t.K.K#z#s#s#sbQ#s#sbn#s#sbn#s.w#s.w#s#sbn.ybV#s#sbV#s#sbQ#aak.7.k.7.k.k.k",
+"#..g#.#.#j#.#XbW#Z#o.O.O#3.n.n.Halalalala4aXaXa4#t.u.9#R#5bu.k#5bob7aIaI.nbwbw#m#5aIa2#5#5aIb7#5.DbBbB#3bwbw.C.O#oabab.naI.C#t#R.9#tbY#tbY.ZbY.s#t#t#t#R.sbY.s#tbD.Z.Z#t.9.Z#t.4bBbw.s.saT.9aTaT",
+".ybS.ybSbVbVbVbVbl#u#u#ubSaybSay#s#za5#z#z#z.KbA.Qb.aIbZbZbB.g.U.gaP#.aP#.aPaP.O.9aP.g.s.O.ZaP.Z#CaD#Aamamamam#X#3#Z.OaPaPaPaP.saZbY#t#t#tbY#tbY#t#tbLbZ.SbR#t#tbZbRbZbRbR.sbRbR.4aBaB.4bY.4.4.4",
+"bKbV#zbKbA.ybK#zbV#z#0bS#0#0#0aya5bA.4.4.4#T#xbgbwaq.O.g.O#j#.aPaCaC#v.g.gaPaP.Z#R#R#t#t#t.Z.s.Z#O#O.5aH#KbY.S#4bD.G#xaZaZ#2.SbVbV#s.wbV#zbSbAa5.e.KbQbQbU#s#z.K#5.K#5.T#4#5.Kb..4bZbL.T.ebL.K.K",
+"#A#A#C#C#AaD#CbEatataRb1b1abb1.t#I.f#IaSbz.x.#.##v.g.g#1bR.T#5#hbObO.T.K.K#5.KbubL.4.4#t.4.Z#tbL.e#r.K.K.e.e.T#r.K#z.K#z#sbVbS#zbV#u#ubVbl#F.8.l#2.4.8bAbA.l.4bva6.g#x.g#x#i#i#i.L.Lba#Z#Z#Z#Zba",
+"aPaT.u.u.s.C.C.C.SbA.S.4.SbA.8.8#r#rbF#h.TbO.T#h.KbF.e.e.S.S.S.S#u.y.8bA.e.4bA.e.K#zbQ#s.K.KbUbQ.y.R.y.yaB#O#xbT#t.4bLbLbL.4bL.S.4.S.4#T.Za6.Z.JbD.g.Z.g.Z.g.Z.ZaP.g#iaP#i#E#EaC.Obababa.ObH#Z.O",
+"#zbSbA.e#za5.e.8bV.KbV.ybAbK#zbK.8.ybV#z.y#F.y#sbKbA.Rbn#sbn#b#b#Y.w#sbV.y.4.lbA.y.y.ybA#T.MbG.4bObO.4.SbLbOaq#..O.Yaf#p#p.I.U.UaT.Z.O.Oaq.O.H.Hb1b1#Z#Z.L#Zat#3bw.s.HbBb7aIaIaIbA.l.4aBbAbA.e.e",
+"#DbVbn.w#s.w#sbVbAbSbSbV#D#GbS#0.1#H#H#H#b.1bn.1#4.S#t#t.S.TbL.S.K.K.K.S.SbK.e.S#t.4#t#tbDaPb#b#.U#E.9.S.ebVbS#G.K.K#r.l#y#T.Z.Z#2aB.S.ybS#u.8#F#Kau.y.S.y.y.R.y#z#z#sbn.1bna7bd#F#DbVbVbV#s.w#s",
+".1#s.1#s.1bVbS.y.K#z#sbVbVbA.8#FbA.8ar.8.e#r.e#NbKbA.S.S.S.SbLbLaBaBaB#2aB.SbKbAbVbVbV#s.w#YbebQ.KbA.e.KbV.ybl.ybsbsbs#D#u#D#u.R.y#D#DbVbV#s#0.wbebe#b#bbQ.wbn#GbV#G#D#G#D#GbV#D.ybV#sbV#s#s.w#s",
+".wbn.w.w#bbQbVbV.4.4.ybKbnbV#z#z#G#D#D#D#u#D.y.R#2aB#2.M#x.M#2#2#z#s.w#sbV#s.w#s.1.w.w#b.w.1#G#G#s#zbVbVbVbSbVbVbd#ubd.r#D#D#D#D.1bC.1.1.1.1#D.1bV#G#0#0#G.w.1a0bC#G.0aybS.Ba5a5bVbVbV.w#z.w#sbV",
+"#ubVbVbVbV#GbV#D#s#sbn#b.w.w.1bVb2b2a5#z#z.K#zbA.w#s.w#sbV#s#z#s.w#b.w.w#GbV.w.w.X#Da0a0#G.1bcaz#G#GbS#GbV#ubV#0#z#0#0a5#0#0b2#0.0.r.0.0#u#u#F.o.M.M.M#F#ubV#G.1#b#P.w.w.w#0aya5.y#u.y.ybVbnbVbV",
+".wbV#GbV#G#s#G#0.1#G.1.1.1#G#G.0#0#0.w.wby.wbQbn.w.w#G.w.wa0#b#P#u#G#G#0#G#G#G.w#baz#Yaz.1.0#D.0#G#G#G#GbVbl.8blbva8.8.B#z.Ba5#0ay#G#G#z#G#z#z#z#zbU#z#z#zbQbybQ#zbK#z#s#sbn.R.y#2#2aB.8bVbV#0bV",
+".w.w.w#z.w.w.w.w#GbV.r.0.0#G#G#Gbda7a7#H#8#8#8#H#u#u#F#u#D#GbV#u#G#G.w.1.w#G.wa0bV#D#DbV.w#baz.w#G#G#G#G#0.BbSa5#u#u#D.1.1bn.0#7#z#0bSbSbSa5#z#z#r.e.e.4.4#2#2bT.4.4.4.S.R.Rbn.i#s.K#zbV#s#0bV.w",
+"#u.8#u#u#ubV#GbVby.wbQ.w#b.wbVbl#T#T.l.ear.Ba5.8.w#G#G#G.w.1.1.1.1#G#G.w.1#G#G.w#P.w#G.1.w#P.w#0#D#DbV.w.w#0#0#0.w#b#baVaVbn.1#G.y.y#F#F#2.obv#Fay#z#GbVbV#z.e.e#z#z#zbV#s#s#s#sbQbQ#sbQ.wbV#G#0",
+"#0#0#0#G#0#u#ublbDbT.4#4#zbQ.e.e#s#s#s#z.w#0#0aU#DbSbVbV#D#D#D#G.w#G#G.w#P.w.w.w#Gbmbmbmay#u#G.waz#b.w.w#Ga5bl#uaraW#i#i#ia6.4.ebVbnbQ#b.w.w#GbV#u.r.r#G#G#G#0a5.1.wbV#zbSar.J.JbT#x#2.y#F.8#u#G",
+"#5.TbL#tbD#i.g.Z.SbA#zbAbKbSbSbA#u#D#G#u#u#u#DbV#GbVay#G#0#G#G.r#D#Gbn.w#b#b#HaY.1bVbV.y#u.y#F#Fbv.o.M#2#2#2aBbG.9#OaB.y#D.1.1.1.w#s.1.w#G#G#G.rbdbda7bdbnbn#sbQ.nbw.s.Z.4.8.8.8.obl#u#zbV#z.K.K",
+"#i#x.Z#tbL.K.kbQbAbVbK#u.ybSbV#z#G.w.w#G#D#G#0#G.1#G#D.1.1.1.1.1bVbV#z.yaBaM.M.5.y.y.y#ubV.w#P.w.w.w#b.1.1.w.wby#b.w#b.w#b.w.1.1#u#u#ubVbAbK#z.S.T.TbO.Z#vbga3axbD#xaZ.8bAbAbAbA.e#4bA#ta6.P.6.6",
+".S.4bL.e.e.e.ebA.8bSbSbSbVay#0#G.1.1a0.1#ba0#H#bbc#Hbc#Ha0bc.1.0#z.8#T.J.l.ebVbV#G#G#G.w.w.w.w#P.w#b#n#b.1.1.w#n.1.1.1#G#G#D#ublbl#2.4.4.g.Z#ZbN#9#9aa#X.g.ZbOar.Mbvbla5#z#zbA.laPbNbi.U.U#..Zbw",
+"bL.e.e.e#zbSbSbl#u#DbS#G#G#0#G#G.1.1.1.1bc#Ha0.1#G.1.1a0#b.1#u#F.e.4#T.8by#b#na0a0#b.w.w.w.w#P#0bVbV.1.1#G#G#u#G.1#G#G#ubS.8.l#T.Z.g#ibW.UbNa9#p.UaP.9.S.ybVbV#Dayay#z#z.e.4bT#i.pad#pbN#.bRaI.T",
+".4.e.KbS.8blblbSbSbS#GbV#G#0#G#G#G.0.1.1bcaz#H.1#G.1.w#P.w.w#z.8bK.KbQbQbV#u#D.1#0#G#G#G#G#G.1#P.1.1beazbe.1#G#u#zbK.K.4bO.Z#j#v#A#ka9.YbW.ZbL.4.R.R.ibn#D#u#F#FbS.S.4aqaPbNbi.I#.bWaP.gbObL.8bL",
+".K.K#z.e#F.lbv#F#z#GbS#u#u#G.w#G#u#G#G#G.1a0bc.1#P#P#P.w#GbVarar.R#J#HaY.1.1.1#H#H#b.1.1bc.1#P.1.w#b#bazbe.w#zbA#t#t.Z.Z.Z.g#.#.b1ba#..Z.Z.lbS#u.y#u#ubSbS#N.laA#j.ga9#kad#ka9#..g.g#tbO.e.e.ebA",
+".l.l.8.y.8bAbAa5bSbS#ubSbS#0.w#G#G#G#G#G.1bc.1bCbm.1.1.0#Dblbv#T#D.R.ybVbe#nazanananbeaz#b#bbc#H.wa0.1#sbV.S.S#t#t.s.Z.sbwaIaIaI#t#t.4bA.lbl#ubl.3a5a5.e.4bh#V#XbN#k#kaG#k.L.OaIbL.e.K.ebA.y.4.8",
+"bSbAbAa5.ebA.8.4.8.ybS#z#G.w#0bSay#0bm#G#G.0.1.0bc#H.zbf.zbe.1#z.KbVbSbA.y#D#D.1bebebe#HbeazazazazazbebV.S.4#1bMbZbR.Z.Z.Z#t#tbYbl.o#ubS#Gay#0#uarbl.laB#t.uaT.Oad#kaGb6#ka9.g.Z#t#t.4.4#t.4bK.K",
+"aBbs.y.ybA.l.lar.4aBaB.8.y#F#u.wbn#D#D#G.0.0a7.FbdbCbc.1.1.0.1bc.F#8#H.1.ybG.4.ebn#s#s#baY#saYaV#b.w#s#J.SaZbD.sbR#t.S#z#ubs#F.R#D#D.0#G#G#G#G.0#D.R.yaBbDbDaP.g#Zb1.L.fb6.h.hac.I.YaT.u#t.Z.Z#2",
+"b3bR#1.4.4.4bX.R.K.KbV.ybl#F#F#F#za5a5.B#z#0#sby.1#G.1.1.1bm#G.1a0a0#H#H#b#b#s.ya#.X.y.ybVbn.w#bbebeaY#sbAbRbZa2au.S.R#s#z.y.e#zbs#ubn.1.1.1#G#D.0#D#D.RbA.4bO.4aPbD#Eb#af.I#Maf.2.x.L.L#Z.O.n#S",
+"aObi#Xbw.s.sbY.SbXbK#z#z.w.w.wa0#z#za5bS.l.l.8bVbSbVbS#G#G#G.w#Pbe.w#b#bazbrb4#Hbebebe.1#u#F.5.X#F.y#s#Y.NaN.Q.Q.T.Tbu.w#sbn.1be#sbVbV.y.y.ybn#b#G#G#G#G#0bn#zbSbn#bbn#D.R.RaBbX#3.O.Yaf.I.Ibi#E",
+"aVbX.G.6a3aCb3#U.y#z#s#0#z.w.w#s#H#H.1.1.0#G#Hb4bVbV#u#u#u#D.0#D.1.1.1#D#7#D#Hb4bCbc.1.w#b#b#n#nbe.1#u.yaBbX.S.kb4.cb4aYbA#T.4#r.4.K.K#s#s#s#D.y#GaybV.w.w.w.w.w#G.w.w.w#b.1bn.1#P.w.w#0#0aybS#G",
+"bnaVaYbeaNarbp.A.P#2#F.y#u#s.w#sb4b4.1.1.1.1#H#H#nbeaz#b#HbnbCa7.zbe.z.1#D#D.w#Baz.z#H.w#P.w.w.wbebeanbrbebn.RbX.4bQb0aL#BaYa7.bbA.4#xaMaZ.ybK.kbA.4.4#F.8.ybA.ybv#u#ubS#sbV#D#zbl.ray#G#G#P.w#P",
+".w#0bSbVbV#D#D.1aY#b.w#zbS#FaBaB#x.M.l.8a5byap#bbn.1bebebebebeaza7.0bd#u#ubSbS.BbC#D.0#D#G.w.w.1anazb4bebebebr#B.V.c#D#Oai.S#s.WaE#Y#Y#YaY.kaB#x#4.S.S.4aBbX.y.y.y.K#z.KbV#z.ybV.ybKbKbK.K.K#z.k",
+".8.8#u#G.w#HaV.1#s.w#s#0#zbV.wbQ#na0by#0a5bSbvbg.M#F.y#ubSbA#z.k.w.w.w.wa0a0.w.w#H.w#HbV#D#u#G.1.1.1#b.w.1.1#D#DbVakaLaLaLbq#B.VaB.XaB.ybKbQaLaL.q.qaY#a#b.w#b#b#b#b.wbn#s#D.y#D#s#s#s#JbKau.SbA",
+"b4#Hbe#baY#s.K.S.y#F.ybSbS.R#zbe#H#H.1#Gbc#b#bbn.w#bbybQ.4#xbga6#T.l#za5bV#G#Gbc.w#b#b.wbV#D.1beby.wbVbV#z#s.w#Y#bbeaY#J#s#Ybe.1#B#B#Bbr#s.RbA.KbKbnaV.w#b.w#Ha0b4anbe#Hbe.1.1#bbC#8bc#Ha0a0#Pbc",
+"b4#8#8#H#HbCbC.1b4#b.w.1#P#G#G.0akbVbXaB#2#2.4bAbA.KbAbV#s#b#YaY.1bV.8aZ.GbYaB.S.RaV#abebn.1#8az#b.w.w#b#ba0by.w.1#Hazbebe.1#s#b#ebnbnbnaVaVaYbnbnb4bebe#abe#abebnbnbnbn.ibnbnbn##a7#8#8#ea7beaL",
+"#Y.w.w#s.w#0#z#0#D#DbVbVbVbV#bana7#D.1.1#b.1#D#D#u#u#Fa#.o.y#D#D.r.r.w#b#Y#b#b.w.gbkbg#Tar#za5a5####.5.b.Ra7.1bn#HaV#H#Hbn#D#D.ybQbQ#z.K.e.K.e.ea7bnaVa7bnaY#aaL.m#Wbrbr#Ybr#W.m#L#L#L.mbeb4.w#b",
+"#sbK.ybS#z#zbSbS.k.k.K.S.SbAbKbn.w.1#D#GbV#GbV.w#G#G#G#u#u#ubl#7.r#G#G#0#zayay.0#Y.wa5bS#zbS.8.M.4.Z#xbka6#TbObO#D.Rbn#s#bbebebebV.R.R.y.R#D#DbVbebe#BbqaLbebn.Rbnbnbebr#BbrbeaV#Da7bran.mbr.1#D",
+"anazbean#Banbe#H.y#O#x#x.ybKbK.R.Jbvar.ebja5#N#TbvbS#z#0#0.1#0bV#G#u#u.o#Fbb#7bm#F#7#u#D#Dbn#bbe#s#s#sbn.w#zbVbVbkbpbpbpbhbhbhbhaAaAaWaW#N#r#rbFbs.ybKbn#b#YaLbq#Bbrbebebebr#BbqbeaLbe#Y#B#B#B#B",
+"a7#DbCb4azananan#BaL#b#Yby#b#G#ub0aN.e#x#i#xaWbObAa5.e.8.4#2.4.4.w.wbQ#zbSbSbVbV.w#z#zbS.JbGbG.l#D#GbV.1.w.1#G#G#H#8#8#8aoa7#8#8#D#Dbn.1bnbC.1bC#b.w#D#D.y.5bs.y##a7#Hbranbe.1.i#sbn#D.Rbsbs#ubs",
+"#b#0.y.8#2#2#2#2#F#u#G.w#0#G#Pazb4b4beb4bnbn##.5#xaB.4.4.4.e#z.K.e.SbA.8bA.ebK.K#zbV.y#ubVbVbVbVar.8ara8ara8a5ar.RbV#zbVbA.y#D#sbSa5a5bV#zbSbVbS#G#DbV#b#b.1bn#bananbeb4b4anananbean#B#B#Bazbebe",
+"#0a5bSbV.w#Y#BaE.1#0.wbSay#uay#Gbd.FbCbC#H.zanaz#b#b#b.w#zbA#2#c.P#6#6.M#2.e.K.k#KaB.Xbsbn.1.1#7#Hbna7#D#D#D#D.0#0#zbVbV#u#F#FblbdbCbC.1bC#G.1.1bV#u#D#G#Hbean.manbeanan#B.manan.mbebe.1bV.1.1.1",
+".zbCa7#Hazanb4#8#Y.w.y.8#z.w#G#D#G#0#P#0#0#0#uaJ#D#u#ubl#D#0.wb2.w.1#0#0.w#z.4.G#vbhbRbO#rar#N.l#4bL.S.4.4.4.4bLay#D#uay.1#Ha0.w.1.w.1.w#G#s#0.w#G.1.1an#Bazb4b4anazb4b4.zananan#f#f#8#b#H.w.1#b",
+"b4#Hbd#Ha7#H.1.0a7#H#b.wbV#s.w#0#D#D#D#D#G#u#u#G#G#G#GbV#u.8.y#ubs#7#G.1.1bn#D.y#xbXbAbAbYbt.Z#RbXbK#s.k.R.S.RbAbl#F.o.o#Fbv.yblbV#u#7#G.1.z.z.z.w.1#G#u#D.0#G#nb4#H.1.1#b.zb4.z#H.1.1.1#Hbe.m#B",
+"#Y.w#D.1ay.w.w#Ga7#H#H.w#G#G#G#G#D.wbV#G.1.w#G.1#D#D#ubSbA#u.KbV#s#G#u#u#ubVbn#s.zb4b4#sbO.g#V#X.MaB.yaBaB#2aZ#2.y.y.R.KbQ.KbQbu#zbAbK#s#bbe#Ybea0be#bbn.w#D.y#G.1bC.1.1a0#b.z.z.zbc#H.zbCao#HbC",
+".wbS#0.wa0a0#na0azaz#b#H.1#G.0.0.w#P.w#G#0#G#uay#D#DbAbK#z.KbSbK.l.4bv.8#F.l.e.S#ubAbA.RbK.K.K#s.4bAa5#z#z#z#z#z#w#m#3ba.p.p.L.L.ZaZbD#t#R.SaKaKakap#Y#bak#s#zakbn#D#u#D.y#7bs#7#F#F#u#0#0#0by.w",
+"bna7anbran#8az#8.1#ba0#bbcbeaza0a0.w#G#G.1bm#G#0.1#z#GbV#z#0#s#G.e#z#z#za5.8bGbgaAbv#T.l#F#Da7a7bQbybQ#z.e#z.ebAblblay.0ay.raJ.obR.s#tbR#t.s.s#tbDaZa6bT.Z.gbT.SbA.S.S.KbQ.q.q#YbqaLbeaV#D#u#D#u",
+"auauaL#W#Wbr#L#Wbe#nbe.w.w.w.1a7.1#H.1.0#u#7#7.r.0#ubl#uay#Gay#u#z#za5#u#ubS#za5#D#u#u.8.8.8.8#r.4bYaZ.G.GaZaZaZ#t.SbLbFb.#5bO.Z#t.Z.Z#t.Z#iaC.E.Z#1.g.ga6#ibWbR.C.s#..OaPbNbi.Ua9ajaO#X#v#y#r#h",
+"bL#1b.aI.g.I.UaP.GaZ#t.4.SbK#sbQbe#Bbe#b.1#D#D.w#G#DbSbl.8bl#u#F.8aB#F#F#F#ubV.w.ybSbS#u.8.8a5#z.k.K.KbK.KbQaYakbu.K.S.4.4.4.S.e.4.8.4.ebF.Kb.#h.gbR#taq.ZbW#E.gaP.YbNba#.babaaP#3.u.s#R#R.S.KbK",
+"a6a6.Z.ebO.T.QaNa2a2aIaT.Ub#.6.EbIaZaZ.4.S.SbA.kakbQ.k.KbF.ebA.y.e.ebSbS#u.8#FbG#r#r#r.e#F.ybsbdbV#zbV.yaBaB#2#2#MavaS#Z.O.O.OaPa6#i#i.ZbRaI.H.n.ZaIaI.T#5aIbRb.b.bLaIbRbR.gbWaP.g#v.g.Z#x.gbT#i",
+"#H.1#DaY.ybV.SaB.Y.O.O#.#X.ObBaIbR.T#1#t#1.Z.g.ZaP.U.U#EbW.g.g.g#T#T.4.l.l.8bS.e#F.8#F.l.8arararblbSa5#0bS.BbS#ubV#u#ubl#ublblbl#5bZ.gaP#.babN.pb##E#E#E.Z.g.gaIaB#2.ZbL.T.e.e.K#z.kby#b#b#Y#Baz",
+"brbrb4#Hb4.1#D.0.R.y.y#F.yaBbvaB.Z.g.g.g#jaOaxbxaFaS.Y.O.s.s#ta2#Fbla5bSay#ua8bl.y.y.RbK#J.KbKbK.S#F.y.8.8bA#F.l.y.y.8.8.4.4.4.4aPbtaPaP#E.YaPbNaP.Z.sbwbw.C.CbZbB.C.Z#..O.H.OaP#RbX.SbK#JbnaV#a",
+"aZ#taZ.Z.4bLbO.ebLbR.S.TbL.T#4buaK.S#R#R#4.Sbw#t#3aT.Z.ZbD#i.E#i#Z#ZafafbN#Z.na2.3ay.B.Bay.B.8a8bn.y.4.4.4.8.8bAbl.y.ybKbS.e.e.8#F.K#s#s.k.KbLbObL#t.Z.9.G.GbI.E.G.9aP.g.ZbZbZ#tbJaI#.#EbW#E.g.Z",
+"aKaKaH.u.C.C.sbw.O.O.O.O.Y.Uba.O.uaPbtaT.u.s.s#Rb.#4#5bLbL#T.Z.4.4#t.4.4#t.4.y.ebKbAbV.KbAbAbA.K.KbVbAa5#z#z#z.y#z#zbS.8aB#2.M#2.o#F#ubl#F#u#G.wbQbKbKbnbQ#YaL#Y#saY.KbAbYaBaBbY#.bibiaPaI.Tb7bR",
+"#h#5#1#X#jaOaaaa#M#paf.Ybaba.n#S.H#.#.aDaqaqaq.HaPbW#x.Z.4.Z.4bR#RbLb.b..k#4#R.4#RaH.u.u.u.ja1aK#F.S.4.K#zbQ#zbVbSbSbS.ybS#DbVbVayayayblbbbl#u#G#D#u#u#D.1.1#b#H#H#b#b#GbV#s#b.1#L#WaL#WbqaLbK#K",
+".zanbeb4be#aaY#aak.k#4bL#t.G.G#i#1#j#j.gaq#j#.bW.ZaT#tbRbObRbLb.#u.r.r.r.r.rbmbm#za5bv.la5a5a5a5.K.4#xbg#xbg.MaM#2.8bV#s.w#sbV#ubS#z.1#z#G#G.1#G.1.1.1.1.1.1bc.1.1.1.1#G.wazaz#Bb4#8bC#Hbebe#H#b",
+"#D#G#G#u#0#zbSbSbVbVbAbAbV#z#z#s#JbK.R#s#saYaVaYb.#4.SbL.4.Z#t#t.L.LaS.Lba.O.n#mbQ#z.K#zbQ#0.e#2bQ.K.K.K#z#s#z#D.y#F#F#F#F#F.oaB.8.y.8.y#ubV#0#D#u.r#G.0#G#G#Gbc.1#G#G#G#G#Hbc.1#naz#b.w.1#0#0#P",
+".z.zbcbCbcbC.0.0be#b#ba0#H.1.1.w#Dbdbdbn#H#8.z.z#BaL#b.w#sbV#z#s.K.K.K#z.K.K#z.K#R.C.j#RauaubYbt.6#6a6bL#zak#bak#D#D#D.y#u#u#0#0.w#sbV#u#F#Fbl#u.w#0#G#G.1#G.1#G.r#GbV#GbV.1bc#H.w.w.wa0#0bS#G#0",
+".w.w.1#G.1#P#G#P.w.1#H.1.1#D#D.1by#0#0#G#P.w.w#b#Hbc#Gay#G.r.1.wbv#F.l#F.laJbvblbA.8.l.8a5#z#zbS.K#4bO.4#TaBaB#Fb4#baz#b#P#zbl.o#F#D#0#G#G#GaU#0.B#u#u#u#G#G#0.1.w.w.w.w#0#G.1.1b4anbraz#8.1#8az",
+"b4.1bnbC.1b4.zaz#f#fbr#fb4#8.Van#f#8#8ananbe#G#u.1#G#DbC.1.1.w.1.w.1#G#G#GbS#ubSaiaB.SbXaB#2.4bKbvar.ebF.T#1#j.gah#O##bnbn#D#baY.1#D#DbS#u#D#7#7.o#u#0.wbya0a0#0.wbn#0bSbAbS#z#0#8#8an.z.1bd.1a0",
+"#b.1.1bn.1bebran#W.man.manbran.m.m#Bbebe.1#D#D#bbCbCbC#GbC#G.1#G#u.8#ubSbVbS#z#z.w#s#D#ubV.1.w.w#Da7bd#Dbs.5.5#O.Q.Q.K#N.Jbgawax#O.y#z#s#z#z#b#B.zazaz.1#GbC.0bd#7#D#ubSbV#G.wbebr.Vbe#8#D#7#7#G",
+"#b#b#b#b.w#b#bbeb4#H.cbebe#bbnbK.e#z#z#sbVbs#D#G#z#z#za5a5#za5a5#sbn#z#z#z.y.8bAbl#F.o.o#u#G#G.r.1bnbn#D#DbV#z.w#T#x.MbGbla5a5.eaB.S.SbT.6.a#2bK.1bn.1bn.1bean#lazazbe.1.R#F.5a#.S.e.ebUbU.W.Wap",
+".ybAbAbKbK#DbV.waV#HbebebeaYbnbn#z#FaB#F.y#D#Dbnbe#H.1bn.1#Dbnbn#8#eao#e#8#8#8#8#0#0#0.w#G#G.ray#2.J#2#2.la5#z.w#b.1#u#Gbnbn#D#DbAbA.4.4.8bA#z#z.e.8#T.J#x.l.K#z#D#0.w.w#b.qbraLanbr.Vbr#8bd.b.b",
+"#B#B#Bazbrbebebe#8brbrbrbe.zbrbr.mbrb4#H#b#sbVbV#NaW#T#T.J.JbkbkaAbp#Vbpbhbpbpbp.e#zbQ.w.w#s.1.w#H#b.1#G#D#7#7#FbS.8.l.l.8a5#sbybV#G#0.w#0#z#Fa#.4#NbOar#r#r#z#za8.ybS.8.4aB.SbK.cb4anan.mbeanan",
+"brbrbebrazbr#f.Vbr#f.manb4bebean.V.V.m.maL.1bA.y.Rbnbnbnbnbn#Hb4#Y.w#saYbQbnbK.RbT.GaM#2.4bVbVbK.8#F#u#z.wbybyby#G#G#zbV#u#F#F.obb#uay#0#0.w.w.w#b#b#sbn#D.X.5.b#z#0#za5bAbA.K#s#TaAbObO#T#T#raN",
+"bnbnbnbeanbq#l#Lan.maLbrbebebrbeaVb4b4aVbnbn.wbe#T.4.ybAbK.KbQbQ#D.R#D.1.1#H.1#H#Y#s#zbVbV#z#u.ya5a5ar.l#T.J#vawa7#Hb4be#b.1.0.0#G#ublbv#c#c#2#u#Dbd#D.1.w#Hbean#b.w.wbVbSbVbVbVbVbV#D.1bV.1#ban",
+"#Bbebe#abebeaVbnbn#sbn#D#s#a#b.w.q#b.q#Y#Ybe#HbnaY#baY#baVbnaVaV#bbn.w#bbebeaV#H#D.1bebe.w#G.wa0.z.z#HaV#HaYbnaV.ebLa6a6a6bOa5b2.w#b.w#zbU#s#s#zbA.lbv#T#T.l.y#0#8.1#D.1.wazaza0.w#P.wbebe#H#baz",
+"az.1bcbc.1.1bCa0#H#8b4b4#H#Hbebr#b#bbn.ybXbK#s.c.ia7bebe#zbV.8a5bnaY.caLaLbe#H#H.kbKbKbK#s#b#b#H#bbV#DbV.wbe.w.1bCbCbn#D#2bg#i#i.J.lbA#s#b#bbQbQ#JbVbVbS#G#u.R.R.SaB#2#2aB#Fbd#H.z.1.wa0#b#Ybe#Y",
+"au.S.S#J.k.R.kaY#DbVbV#sbn#s#s#b#Y#Y#Y#Yak.q#Y.N#Y#Y#a.R.y.y.ybV#ebrbq#WaL#B#bbV.i.RbVbn.1#bb4b4#s#D.y#ubV.1#b#H.1.1#bbe#Y#b#s#z#z#z#D#7bs#u.y.lai.5#F#u#0.wbebe.qakbQbQ#baY#b#b.1.1.0#G#D#ubb#F",
+".k#s.k.k.K.KbK.KbA.KbK.K#z#s#z.K.5aBbX.4bY#RaHbY.Z.4.e#s#sbnb4#H.q#Y#sai.dbs#8anbeanan#Ybe#H#H#8#b#H.wbV#G#G.0.1.wbV#u#F#7#D.1b4#bbebebeazb4.1bVbebe.w#z#u#FaBai.4#2.4.ebQbQ.w#Y.w#G#GbVay#u#z.w",
+"bm#G#Gaybl#ublblbAbA.8bSbAa5bS#F#D.1#zbnbVbK.K.K.K.e.4aB.y#Dbnbea7#8brbq#Y.K.ebU#Hbe#Yanazbeazanazaz#n#n.w.1.1.1.w.w.1#Pa0#b.1.0bV#G.1.1az#b.w#s#sbVbV#ubVbV.1#s#z.yaB#2bG.M#xbgbG.8#z#Yb0#b#s#z",
+"bS#GaybS#G.w#b#b#zbV#0bV.w.w#G#G#G#G.1#G#zbV#D#u.y#D#z#s#s.K.8aiar.4.4bV#sbn.cbr#s#u#2.M#x.y#D#b.1#b#b#b#na0a0a0a0.1.0.X#7#u.1a0#z#D#u#F#u#ubVbV#n#n#b#Pby#b#Y#n#bbn#D#DbV.KbV#z.K#1#i.6.6bDbL.Q",
+"#Ebi#p.U.Y#Z#C#3bAbAbKbV#s#G#s#0#D#G.w.w#0bc#Gay.1#D#7#F.ya5#s.WaV.cbebn#sbQ#h.T.K.kbQb0aE#YbV.X.y.y.y.ybV.w#b.1#8.1azazaza0a0.wa0.w#0#GbV#z#z#0#F#F#F#F#F#u#ubVbe#b.1aY.wbV.ybAbRbR.Zaq.Z#E.U.U",
+".n#Z.p.Las.faQ.fafaf.U.UaPbD.Z#t.4bK#za5#z#G#G#G#G#G.w#G#GbV#u.ybUbQ#z#zbV#JbKbYb.#R.Z#tbA.wbe#n.R#D.y.y.8#Dbn#D#Y.w.wbn.w.waza0.1.1#H#b#P.w#GbV.w#0bV#u#u#u#u#ubv.o#F.y#DbK#z.K#z#4.4.S.TbL#t#t",
+"bLaZbD#R#taP.U#Z.hb6as.L#k.pba#ZbD.s.ZbTbG.8bS#Gay.B#G#0#G#D.0#D#s.y.ybVbV.4.ZbL.s.s#R#4#s.w#H.1aY.qbebQ#s#s#sbnar.l.l#u.1#HbC.FbC.1bC.1.1.1.1.1aybVbV.w#s.w#s#0by#za5#u.y.4.l#r.y.8#F.8.K.e.4#T",
+"#4#4.S.4#taZ#T#2aZaTbNaQ#daQ.fasaS#QaT.s.4.8ararbl#ubVbV#ubl#F.XbT.G#t.S#tbkbT.T.uaH#OaB#D.1.zaz.z#f.z.zb4.za0.z#Jbn#JbK.ybAbK#s#z#baz.z.z.zaobc.0.1#G.0#G#u#G#G#ubS#0bVa5bS#uaBaB.y.y#u#F#FbA.K",
+"#zbK.e.S.8.S.S.T.O#Z.LaQaQaQb5af#..Z#t.4#F.yblblbl#ubVbVbK.S#t.saI#tbwbZaI#t#t.S.n#1.TbF#zbQby.wbebranbraz#b.1.wan#nbe.w#z.y#FaB.8.ybn#Haobcbcbc.1.1.1.1#G#G#G#0#G#0#GbV#ubVbVbV.8bAblbAbSbS.K.K",
+"#F.l.8.4bLbRbRbR#Z.L#kafafbN#..Zbg.Jbv.8#u#D.0#7#ubS.y#t.s.Obaas#3baaP.Z.sbD.Z.Z.y#JaY#a#Ybe#b.wb4#b#bbebebebe#bbm.0#u#G.w.w#0bVbGbAbVbV.1.1.w#P.1#Ha0bc.1#Day#D#0.1bS#u#ubV#zbVar.8.l.8a5a5.e#N",
+"#T.4.4bObw#.bNad#k.pba#.bR.4bAa5ara5#zbVbV#u.y.4.K#t.gbi#pb5.p#k.ZaP.Z#t.S.y#Dbna7bCb4.zazb4ao.1#b.1.1bVaybV#G.wa0.w#G#z#0#z.K.y.8bV.w.1.1.1bc.1bcbc#Ha0.1.0#G#G#G#G#G#G#GbVbV#ubla8a8blbSa5.8.4",
+".e.T#1bw#..paQa.#E#v.Z.8.ebSbSay#FblbA.y.S.T.TaIaDbN#paj.U#v.g#ta6#TbAbSbS#G.1bc#GaU#P.w#0#GbSbS#G#Gay.r#D#G.w#P#D.y.8.4.4.e.e.e#u.1#P.1bc.1.1.1.0#Ha0#Hbc.1.1.way#0.w#0bV#GbV.ybl#F#u#zbVbKbA.y",
+".g#.bW.UaOa9#..O.4.8bAbSbS#u.lbv.K.K.S#x#Eb#.v...Yba#..Z#T.4#Fbvbl#ubS#G.0#GbCbc#Pbc#P#P#G.w.w#P#Gbc.w.w.w.w#P.wb0.qbQ.K#r.S.S.S#G.1b4#P#H.1bc.1.1bca0.1#P.w.w.w#G#z#GbVbVbSbSbS#DbV#s.K#4.S.4.4",
+"#EaC#i.gbT.4.4bAbAbAbSbAbA.4.ZaPa3.6#6#E#x.4bLbL.4bAbKbAbSbS#ubS#0#P#P.w.w.1.w.1#H.1a7bCbn#H#H#Hbybyby#z#z.8.4.4aM#xaZ#2.8.y#GbV#Gbc.w.1#G.w.1.wbcbC#G#G.1#G#GaybSbSbS.8bla5bA.8#z#z.KbZbRaT.ZaP",
+".4#r.K#z#z#G#ubb.8.y.y.y#R.O#Z.tbMbM#5.ebA.R#D#Day.rayaybV#G.wby.1#G.w#G.w.wbV#u.TbObO.Z.Za6bD#ia6bTbDbD#iaP.s#t.K#s.wbya0#P.1bm#G#0#0.BbSayb2#0.1#G#u#GbVay.8.8blbSa5bSa5#za5bAar.Z.gbaa9baba.O",
+"b2bS.8#N#T.Ja6bk.M.M.lbS#z#G#z.w#ubV#GbV.1#G#D.ra7bnaV#H#Hbnbn#D.l.4#2.E.6.6bT.T.X.X#u#D.1.1b4be.1#G#G#G.0#Gbcbc.1.1.w.1.w.1#D#G#D.0.0#D#GbVaybS#G.1.1#Dbn#DbnbV.SbA.KbVbK.4aZbD#F#ubVbSaybV.wbn",
+"#D.0#Dbn.1#sbQ#s#za5#z.w#zbS.y#ubV.kbVbVbVbVbVbnaW.l.l.4#Narar.8bCbn#HaVbnaVbebea0.w.w.1.1a7#u#7.1#s#H.1.w#Ha0#b#G.w.w.w.1.w#G#G.0#G.1#0.w#0#0.wbS.ebS.e.l.4.JbG.y#u#D.w.w.w#sbQbV#s#0ay#ubV#D#D",
+".0bn#Gbn#D.R.R.RbV#G#z#0bV#u#u.y.SaBbYaB#t.4bA.ea5#zb2bSbSbVbV.w.0.0a7#Hb4#Hbn#7a5#z#z.w.wa0a0#bbeaz#b#b#bbn#D.y.1#G#G#G#G#u#G#u.1.1#b.1aybl#Fa8bG#T.8.eby.Wb0bP#G#Gbm#Gbm#G#G#G#sbn.w#z#G#G#zbn",
+"#z.w.w#zar.4#T.Jbv#F.ybSbV#ubSbVaY#s#s.Ka5.K#z.Kbl#u#D#G#D.rbd.ra5#0bS.BbVa5#ua8.ybla8#u#0#G#G#G.0#D#G.wbe#B#Ybe#P.w.w.w.1#0#G#G#G.1#P.w.w#0#0.w#baY#s.wbn.0#D#7ay.rbm.r#G#G#G#GbV#0#z#0#G#z.1.w",
+".8ara5.Ka5.ear.e.w.w.wa0#bby.w#b#0#0bV#u#F#FbGbv.8.8ay#z#0#0#0#0#z#0a5aya5ayb2#0bV#GbV#D#u#u#D#Ga0a0bc.1bc#G#D#u#Day#D#GbV#G.w#s.w.w.w.w.w#z.w.waBbs.y#D#DbC.1bCbV#G#0.1#0#G#0#zbKbSbSbS#u#ubVbV",
+"#Hb4bebeazbeaz#Y#ubV#u#z#u.y.8#F.w.w.w.w#0.w#0#z#G#ubl#F#u#u#u#Fbd#u#D.0#7#7#7#D#u#D#GbV#G.w#bbebc.1#G#G.1.w#P.w#b.wby#s.w.w#s.w#z#z.KbA.4#F#T#2ar.e.ebA.ebAbAbSbQ.w#s.w#z#zbK.4.y.8bSbS#0bSbVbn",
+"bn.1a7bnbn#D###u.1#0bn.w#G#z#D#0#0bV.w.w.w#bbe#bb4b4#HbCa7#Dbd.ybs.R#D#u#u#F#7bs#u#u#u.ybA.S.4bLap#b.WbQ#z#s#z#z.8.4.8#2#2bG.MbT.4.SbA.S.4.S.K.Kararar.ea5.ebS.e.8.8.ybS#z#z#s.KbAbla5#0#0.w#s.w",
+"#s#z#s#z#z#z#za5#D#D#GbV.wbV#z#0.Ka5bKbAau.R.S.R.lbAa5.e#r#NaAaAa6.ZaW#N#N.e.e.e.BbSa5.earbOa6#Ebi#EbDbDa6#t.4.4.ebA.SbA.e.K.K#zbL.T.KbL#t#TbL.Kbn.1.1.1.w#Hbeb4bV#z#z#G.w#z#z.K#za5#zby#0bVbV#z",
+"#u#D#DbV#u#ua8#ubXau.y.y.ybs#DbsbK.SbL#RaIaI.C#3bw#t#R#R.S.S.S.y#t.gaPaP.gaT.Z.ObabaaP.Z.Z.Z.4.l#F#2#2#O.S.ebA.8.S#2aB.y#zbKbS.y#u#D.1.w.1bnbVbn#zbK.y.SbK#4.S#tbSbV#u.8.8#u.8#ubV.y.y.y#ubA#ubV",
+".##q#qat.tas.2.2#A#A#AbH.H#C.H#CaMbI#x.GaZ.9bD.G.9bD.GbT#2#2aBaBbK.ybAbKbK.S.S.S#t.Z.Z.4bAbK#zbV#sbV.K.K.K#s.KbV.K.y.SbA.KbK.y.S.4.ybAbK.K.K.K.K.K.K.e.K#4.K#4bLa2#5.D#5a2aIaIa2aIbBbZbwbw.s.OaP",
+"ba.O.Obaba#.#.#..A.A#v.Abkbkbk.A.y.8.SbA.e.S.S.4.K.e.e.e.e#z#z#0bS#ubV#zbV.y.ybS#4.SbY.S.y.yaBaB.4#t#t#t#t.S.S.S.e.4.4.S.K.KbL.S#hbF.TbR.gaPbWaP#Z#ZbaaS.p#kb5b5bNa9#..O.O.Oaq.ObaaP.O.O#Zba.Y.Y",
+"#D#u#u#uaybSbS#u#s#s#z.w#s#s.1bnbQbQbQbQbQ.Q.K.T#t.4.Z#2#T.4.4.4bAbA.SbA.S.S.K.KbQ.K.K.K#5bLbL.SbO#R.T#5b.#5.K.kb.#5bLbZbZbR.Z.gaP#.aPbNbNbN.O.Hbwbwbwbw#3.O.O.O#2.4.8.8.8.8.ybAbA.e#z#s#z#s#z#s",
+"#5.TbLbL.TbLbLbL#m#gae.CaX.Caeae.Z.4#tbLbLbZbR#tbObR#tbR.4.4.4#t.saP.U#E.YaP.U#..UbWbibWbNbNa9#..gbW.Z.sbwaP.G.9aP#E.U#E#EaPaP.U.Y#3bBaIbw.Cb.#w.ybSa5bVbSbV#z.w#z#z#z.K.K.e.ea5bAa5.ea5.ea5a5.e",
+".U.Y.YaTaT.Z.O.gbRbRbwbw#tbB.s.ZbTbT.Z#t.4.4.4a6#t.Z#t#t#t#ta6bDaIbZbB.n#m.n#3#3#X#.aq.HbH#..H#m.TbRaIa2.DaI.T#4bwbRbwbwbZb.bob.#4b.buaK#R.s.9#t#3.O.O.Obw.sbw.sbwbwbwbw#tbwbRbB.Z.gaP.gaP.gaP.g",
+"aB#FbSbVbV#D#ubVaya8bl.8aybS#u#u#zbVbV#zbV#zbK#u#u#u.y.8.ybA.ybA.4bY.4.4#t#tbDaZ#tbR.4#t.4#t#tbL.K#tbwaI#5aIbLbFaIaIbwbD.U#E.Ubi#EbDbD.ZbT#xbT#xabaRaR#oabat.O#Z.s#t.SbLaI#4aKb.b.b..Kbu.7.Qbub.",
+".w#b#b#Y.w#0.1#G#z#G#z#G#b#b#b#s.1#G#G#G.1bc#G#G#G#Day#G#G#G#G#G.w#G#GbV.1#z.w#b.kbnbKbn#s#DbVbV.K#t#iaP.ZbW.g.Z.s.s.gaPaP.Zbw.Za6.Z.Z.8#r#z#ra5#D.r.r.r#Gbcbmbm#G.1.w.wbc.w#G#G#G#G#G#Ga0#P.1.r"
+};
+
+
+
+/* XPM */
+static const char *button_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"    96    96      254            2",
+/* colors */
+".. c #9c3218",
+".# c #a4733e",
+".a c #bc450a",
+".b c #d4700c",
+".c c #dc8c29",
+".d c #bc5e00",
+".e c #d46b37",
+".f c #945431",
+".g c #bc5a2c",
+".h c #8c4e4b",
+".i c #d47e16",
+".j c #bc7422",
+".k c #d47d3a",
+".l c #d45e28",
+".m c #ec9b3e",
+".n c #bc6b43",
+".o c #d45a13",
+".p c #a45236",
+".q c #dc8848",
+".r c #e46b1b",
+".s c #bc652f",
+".t c #a46243",
+".u c #bc6920",
+".v c #a4391e",
+".w c #e47b35",
+".x c #9c6b30",
+".y c #d46d24",
+".z c #ec8a29",
+".A c #bc452a",
+".B c #e46833",
+".C c #bc702e",
+".D c #c47845",
+".E c #b15314",
+".F c #e47e10",
+".G c #bc5a18",
+".H c #bc6145",
+".I c #a44d16",
+".J c #cc5728",
+".K c #d47439",
+".L c #a45b39",
+".M c #cc5815",
+".N c #dc8f4c",
+".O c #b46239",
+".P c #bc5307",
+".Q c #d4794f",
+".R c #d47624",
+".S c #cc6c2c",
+".T c #cc6941",
+".U c #ac5222",
+".V c #e49328",
+".W c #e4754d",
+".X c #d4650b",
+".Y c #ac592c",
+".Z c #c05e2d",
+".0 c #e4751a",
+".1 c #e47d29",
+".2 c #9c6143",
+".3 c #e45f2b",
+".4 c #cc632a",
+".5 c #cc660d",
+".6 c #b44b13",
+".7 c #d48442",
+".8 c #d66228",
+".9 c #bc6221",
+"#. c #b45736",
+"## c #d47714",
+"#a c #dc8936",
+"#b c #e48237",
+"#c c #cc530c",
+"#d c #8c522b",
+"#e c #dc8819",
+"#f c #ec9129",
+"#g c #bc7936",
+"#h c #d46f50",
+"#i c #bc521d",
+"#j c #bc553b",
+"#k c #9c523b",
+"#l c #f49a45",
+"#m c #bc7548",
+"#n c #ec8643",
+"#o c #a86d3a",
+"#p c #a44d21",
+"#q c #a4754b",
+"#r c #d46547",
+"#s c #dc7937",
+"#t c #c4642d",
+"#u c #dc6c21",
+"#v c #bc4d2e",
+"#w c #cc7e53",
+"#x c #c45917",
+"#y c #cc5c42",
+"#z c #dc7036",
+"#A c #ac5448",
+"#B c #ec8f44",
+"#C c #b45c4d",
+"#D c #dc7622",
+"#E c #b45222",
+"#F c #d4651b",
+"#G c #e47328",
+"#H c #e58429",
+"#I c #9c5f23",
+"#J c #d47f2b",
+"#K c #cc7116",
+"#L c #eca24e",
+"#M c #9c471c",
+"#N c #d45b36",
+"#O c #c46716",
+"#P c #ec7836",
+"#Q c #ac642d",
+"#R c #c46f2e",
+"#S c #c47551",
+"#T c #cc5b2b",
+"#U c #cc685f",
+"#V c #bc4b3a",
+"#W c #e49a4b",
+"#X c #b44c35",
+"#Y c #e48745",
+"#Z c #ac613c",
+"#0 c #e47234",
+"#1 c #c46242",
+"#2 c #cc5e1a",
+"#3 c #b4683d",
+"#4 c #cc7430",
+"#5 c #cc7042",
+"#6 c #bf4b0d",
+"#7 c #dc6e13",
+"#8 c #e48c21",
+"#9 c #9c3445",
+"a. c #8c432b",
+"a# c #cc5e04",
+"aa c #a43f33",
+"ab c #b46d44",
+"ac c #9c5e62",
+"ad c #9c4833",
+"ae c #b4742c",
+"af c #a4522b",
+"ag c #dc943c",
+"ah c #b46000",
+"ai c #c46309",
+"aj c #a4441e",
+"ak c #dc7f4c",
+"al c #ac6e27",
+"am c #ac4b4e",
+"an c #ec9238",
+"ao c #e48518",
+"ap c #e47c4f",
+"aq c #bc5c3e",
+"ar c #d56238",
+"as c #9c5840",
+"at c #ab6946",
+"au c #cc761f",
+"av c #9c5024",
+"aw c #bc4922",
+"ax c #bc421d",
+"ay c #e46927",
+"az c #ec8836",
+"aA c #cc513b",
+"aB c #cc661d",
+"aC c #b44a21",
+"aD c #b4544c",
+"aE c #ec8a55",
+"aF c #9c5a20",
+"aG c #94533f",
+"aH c #c4701d",
+"aI c #c46b42",
+"aJ c #dc5a18",
+"aK c #cc7b2f",
+"aL c #e49046",
+"aM c #c4520b",
+"aN c #dc774c",
+"aO c #ac4631",
+"aP c #b45b28",
+"aQ c #944e30",
+"aR c #ac6e4d",
+"aS c #a45f2a",
+"aT c #b4612a",
+"aU c #ec7032",
+"aV c #dc872b",
+"aW c #cc5939",
+"aX c #b47844",
+"aY c #dc843b",
+"aZ c #c4601d",
+"a0 c #ec7f36",
+"a1 c #c47531",
+"a2 c #c47344",
+"a3 c #ac431d",
+"a4 c #ac7439",
+"a5 c #dc6735",
+"a6 c #c4582a",
+"a7 c #dc7c1b",
+"a8 c #dc5d26",
+"a9 c #ac5036",
+"b. c #cc7742",
+"b# c #ac4b13",
+"ba c #ac5a37",
+"bb c #dc5f0c",
+"bc c #ec7a29",
+"bd c #dc7813",
+"be c #e48b37",
+"bf c #f48e28",
+"bg c #c44e1f",
+"bh c #c44e3f",
+"bi c #ac4b1e",
+"bj c #dc6544",
+"bk c #c44c2b",
+"bl c #dc611a",
+"bm c #ec7125",
+"bn c #dc7d29",
+"bo c #cc7752",
+"bp c #c4473c",
+"bq c #ec994b",
+"br c #e49336",
+"bs c #d46f16",
+"bt c #bc600a",
+"bu c #d47a46",
+"bv c #d45b1e",
+"bw c #bc653a",
+"bx c #ac3c1d",
+"by c #e47943",
+"bz c #a46b2e",
+"bA c #d46b2e",
+"bB c #bc6c3a",
+"bC c #e47f1b",
+"bD c #bc5b22",
+"bE c #bc6052",
+"bF c #d47346",
+"bG c #cc561f",
+"bH c #b46044",
+"bI c #bc5312",
+"bJ c #d4775e",
+"bK c #d4732e",
+"bL c #cc6b37",
+"bM c #cc644f",
+"bN c #ac512d",
+"bO c #cc6137",
+"bP c #ec8552",
+"bQ c #dc7944",
+"bR c #c46339",
+"bS c #dc6a2c",
+"bT c #c45a21",
+"bU c #dc6f44",
+"bV c #dc732c",
+"bW c #b4502c",
+"bX c #cc6d1f",
+"bY c #c46521",
+"bZ c #c46939",
+"b0 c #e48653",
+"b1 c #ac6445",
+"b2 c #e46e43",
+"b3 c #c45851",
+"b4 c #e48b2b",
+"b5 c #9c5430",
+"b6 c #944d49",
+"b7 c #c46a51",
+/* pixels */
+".waB.U#5#Dba.##u#sbn#H.8#z.0#Db2.4#E.g.e#T#F#z#4bL.n#EbSbm.kauaz#Bbnbr#B.y#b#bb4.w.z#D.z#haKaZbr#Ha6bLaubn.w#Yb4.z#0#ba7an#s#Yb4b4.8.wbnaVaOb3aBbS.l.K.4bL.S#i#5#0#u.w.w#u.w.1#D#zaP#AbK.y#.#a#u",
+"#b#F.Y.T#u.O#q#D#z.1b4ar.wbn.0bS#raC#..T.4.lbK#4aZ#Zbi#G#G#s.S.1bebnbr#BbA#b.1.1.w.z#Gan#5aK#tbr.1a6#1aua7bS.w#HbCa5#0#DazbK.w#8#H.8#0aVbXbibRbsbA.l.K.e.e.4#x.T#0.8.wbVbVbn#sbVbSaT#AbVbS.gag#G",
+"#bbS.YbL#u.O#q#D#sa7bea5.w#G#D.8.K#ibW#1.4.8.e.SbD.p#pay#G.k.Sbcbebnbe#BbA#b.1bn.1bc#Gbe#1aHaZb4#D.Zb.aLan#0#Dbda7bS.ybCbe.y.w#8be#ubSaY.G#X#1.ybA.8#z.K.ebL.ZbL#0#u.w#GbV.w.1bnbA.u#C#z.y#.aL#G",
+"#YbVaTbL#ubaatbV#zbnbe.K#zbnbn#N#z.g.UbwbO.4.S.4#R.L.UbSay.k#Jbc#abebrazbK#bbnbC#GbC#ub4#X.u.Z#HaY.eaI#Wbr.w.1#H#HbV.8b4anbS#s#H#b#GbVbe.6bw.4.ya5.y.ebS.e.e#t#t#G#u#zbVbV.w#s.w.e.u#CbKbS#.br#P",
+".wbVaT.Tayba.t#u#zbnaza5ar#D.1#T#zbTaO#.bwbL.8#t#tas.Y#Gbl.K.k.1beanazbrbK.w.1.1.1bc#0be#j.C.4b4.ybO.g#Wana0aya7az.w#2az#B#z.w#HaY.wbVaNa3.s.4bA.e.8#F.8#z.ebLbD#0#u.w#GbV#b.1#s#z.s#AbAbV#jag#G",
+"#0#D.ZbLbS#.as#u#z#Dbe.e.4.R#s.J#G.4a9.p#.bR.SaZaP.f#Z.w#u.K.R.1bebqbrbe#D#bbeb4#PbC#z#aaO.CbL.1bV.T.Ibr#8a0.w#Han#Y#2anan#z#0bC#s#H#DaraC.s.4.lbAbA.lblbS.e.K#i#ubV.w#s#GbQbV.wa5.CaD.ybV#.#a#G",
+".1#u.ObLbS#..2a8#z##azar#T.RbQa6#u.4#.aQbNbR.S#T.UaQ#C#bblbK.kbCaV#l#fbebV#bbr.z#G.0bSaYaa.sbO#D.S.Q.U#Laz#n.w.1b4#B#2anbebS#zbC.KaV#Dbpb3bYbX.l.8bAbvblbS.e.k.g#u#G.w#GbVbVbS#s.e.C#CbKbV#X#a#G",
+"#GbV.gbL#u#..2#ua5#u#Y.e.J.R#sbkbbbA.Oa.adbR.T#2#Z.f#3#bbl.KaYa0bn#L.Vbe.wbeanaz#P.0bS#aaabw.e.0aBaNaP#W#8a0#G.0#8aE#2an#HbS#0.1.S.1.1.A#U.S.Rar.4a5#FbSblbAbQ.ZblbV.w#0#DbV.ybV.8.CbE#zbVbW#a.1",
+"#zaybR#m#s.A#AbX#D.1#u.wbvbV#z.M.8bA.4#E#k#Z.OaZ.hafbA#zbAbA#D#Hbnanbr#8aVb4#W#f.wbebVak#M.ObL.R.Ya2.Gbe.1aza7a7#Y.1#F#B.y.k#Db4.y#saY.P.ybX.K.4.8bS#zbS#u.8bA.SbDby#G.1#s.4.KbAbV.SatbVbl#Z#D#G",
+"#Ga8bR#g#s.A#Aau#D#0bV.w#F#Ga5.M.ybA.8#v.p.L#ZaTb6afbAbVbA.KbV#8#s.m#fbr#H#H.m#f.1#bbV.k#p.ObR.y.Oa2aZ#n#baz#H#H.w#0#uaL#O.k#D#b#F.w#b#2#zbK.KaB.ybS#GbS#DbSbVbAbT.wbV#G#s.4#zbS.KbAat#z#u#obV#G",
+"#zblbwae#z#v#A.y#Gbn#u.w.y#z#z.l.ybSbA.Zba#k.LbNas.UbK#0.8bKbVb4bnaL.mbrbe.canbr#H#bbA#4af.O.S.y.OaI#tbea0#b#H#b.y.w#G#b#x.KbV.w.y#s.w#F#s#zbVaBbS#ubS#GbSbSbK#z.4bQ.r.1bn.y#sbSbV.SaR#0#u.Obn.1",
+"#G.8bw.C.w.AbH.ybV.w#za0bS#0.wbS.ybAbS.8#.afaQaQ.L.UbVbVbS.K#sb4#Dbranbrbebe.m#f.1a0bAbL.Y.O.T#F#.aT.4.w#b#H.w.w.8bS.w#Y#x.SbV.1bS#0#z.y#0#z.y.8#zbS#ubV#GbS#ubA#4.w.0.1#bbKbVbV.y.4b1bS#u.O#G.1",
+"#bay#taX#sbk.H.y.w#G#u#bbVbV#z#z#RbAbS.ebRafaQ#d#kaP#s.wbA#zbn#H#sbeb4bebebeanb4.1#HbV#tba.YbL.y#X.U.S.wbc.1#GbV#zay#0by.y.SbV#PbS#zbS#u#z.wbl.y#GbS#u#G#GbV.ybK#z#b.0.1.wbnbV#DbA.Sb1#0bS#3#0.1",
+"#bbSbB.C#sbk#CbsbV#z.yby#u#ubS#G.O.4#ubS.4bNaQaQ.pbD#G.wa5#s#s#H#abebe.zaY#bbr#8#D.1#z.Gba.U.TaB.Ob#bK.wbe#G#G#s.w#u#G#bbKbAbV#G.RbV#F#s.w.w#F#F.w#0#G#0#0aybSbSbQ.w#G#G.wbVbA#GbKbAab#0ay.n.1.w",
+"#b#u.sae.1bk.H#D#z#D.8.wbS#u.y#z#Z.Z.lbSbA#.b5.fba.Z#s#GbS#z#sbe#bbrbebrbnbnan.V#D.1#z.G.nba#4bvbB.6#s.1az.0#G.w#Gay#P#GbKbK#b#G#z.waB.w.w.w#F#u#0.w.w#G#G#0bVbS.ebV#G#G.1#z.8bS#z.8b1#0bS.n#0#G",
+"#s#u.Zaebn.A#Cbs#0#0#F#bbV.y#u.w.taPbvaya5.Zafas#Z#t#0#G#F.K#bbr.wbeanbrbnbK.man.1.w#s#i#S.ObuaBaI.EbQa7a0.0#G#0#D#Gaz#u.Rbnan.0bebQaB#s#sa0#F.wbS#G#G#G#G#G#zbA.ebl#G.0bV#z#F#0bK.8.tayay.H#D.r",
+".1#zbT.ZbQ.yaMbK.K#0.w#0aY.SbV#ubMa3.K#Farbg#.aSbD.4#D#G#D.5#Y#b.qaV.V.m#z.e.m#fby#D#J#1.H.uaK.ZbRbIbe.1a0.w#D#D#Gbdb4b0.J.wa7ak#H#n#xb4#H#z#zbnay#G#u#G.1.1#G#u#s#Tbd#0b2#GbA.1.8#r#Ia5#sala5#D",
+"#GbVbT.4bQ.8bI.Sa5bV.w#0#saB.kbVbM.6.Kbla5.J.Z#Q.sbK#G#G.1aB#Y#b#bb4.Vbr#F#z#B#8#0bdbK#j#.aP.S.g.TaZ#B#H.w#P.w#D#0.Fb4aNbv.1#DbV#Ha0.Mb4#H#za5#D#0#G#G.0.1.1.w#D#s#Ta7#0b2#D.8#H.y#r.fbA#zal#z.1",
+"#GbV.Z#tbQ.S#xbLbK.w.wbV#sbYbV#G#5#6.SbA#zbv#taT.Z#z.w.1#zbX#Ybn.qb4.mb4aB#zbe#8#0bd.R#j#.bt#R.g#1aZbe.1#G.wbV#D#PbCbe.ear#D.1bX.1by.l.1.1a5a5#Dbm#G#G.1.1a0.w#G#s.la7.wa5#Dar#HbVbF#I.4a5ala5.1",
+"#G#z#tbLbQbA.G#RbA.w.w#u.KaBbVbV.e#E#x.ybV.8.4.sbTa5.w#Gbn.4#Y.y#YaV.m#H#F#sbean#Gbn#s.gaDaT#R.g#t.4#b.0#G#G#G#D#0bCb4#x.e#G.1aB#G#0.8.1.1bS.B#G#G#G#G.1.1.1#G#u#z.e#H.w#z#D.8#H#z#haS.4#zal.4.1",
+".1bV.4bLbQ.eaZaIau.w#0#Fa5#tbV.1bA#x#E.SbV#u#F.4bG#z#0#zbVbYakbX#YbnaL#b.ybV.1an#P#H#saqaq.u#4#j#1.S.1#u.1#0.1#G#0#Hbn#ibjbV#b#2bca5a5.1.0.l#z.0#G.1.1bcbc#b#D#u.war#8by#z#u.e#b.y.Tbz.4#za4.J#D",
+"bc#z.4bZ.Q.S.9aI.R#b.w#F.K.4bV#G.R.4b#.T#u#D.y.8.8#GbcbVbK#R.qbKbebn.1#s#Dbs#Dbe.w#8aY#jaq.s.SaO.Z.S#D#7bm#G.w#u#0.zbn#xa5#G.1#2#bbSby.1#G.l#0.0.0bca0az#Ha0#G#u#0.B#8.w.K#D#r.1#FbO.x#T#zaX.J#D",
+"#GbK.4bR.K.SbD.C.Sbe#0bG#zbAbV#D#DbL.v.T.y.0blarbS#G#G#D.KaH#Y#s#H.wbAbV#D#D#D#G.w.zaV#.aq.sbwax.gbA#D#7#G#u#G#u#uan##aW#NbV#D.4#bbvap#H#H.8#sa7.1.1bc#Ha0#H#0#D#0a5#8bQ#z.y.ebn.y.T.##x.KaXbkbV",
+"#G#ua6#t.T.4.G#3.R#b#zbv.K.ebn.r#DbL..aI.4#7blar#G#Gay#u.KbY.N.cbnbe.ybVbn#G#b#u#b.zaYbW.H#R#tbx.Z.k.w.r#0ay.1#GaJaz.5bO#T.w#DbAbnbg#b#Hb4bVby.F.0bC.1.1.1#b#GbVaU.8#HbnbA.R#N.1#s#h.#bgbAa4#vbV",
+"#G#u#tbO#t.K.9bw.lb4#G.8bla5aWa7ay.4.YaD.K#ublblay#G.1.y.K.Z#Y.iaY#T.R#Nbe#zbC.1#H#Bb..ZaPb.#3aFaPak#G.0.1#D#D#G#D#b#xbAbv#G#ubA.w.Mbn#nbVbS.1bdbcbm#P#G#Gbc.1#G#D.w#u.w.w#2bK#4bK.K#vbw.Q#tbt.K",
+"#D#u.ZbR.4.ebD#tbAb4#u.8#u#z.lbn.rbAbabN#tbS#u#u.B#G#D#D.e.4#Ya7#b.4bnaW#H#zbC#GbcaL#4aTbW#4aTaS.UbQ#D#u#z#D#D#G#u#baBa5bS#G#u.K#b#F.1bebVbV#GbC#H.1#P.1.1#H#GbVbS#G#u.w#saBbA.SbAbF.gaqb..u.G.K",
+"ay.y#t#t.Z.e.G#Ra5#Hblay#Db2.laVaybK#.#p.g.ybVbV#G.w#7#z.4.e#abeaY.ybn#T.1#zbC#D#G#b.S#t#x#5.Z.Y.U.kbSbl#GbA#u#G#u#b.4.e#z#G#FbAby.ybeaz#ubS.1bc.z.1#P.w.1bc#DaybV#G#F#G.w#2.S#t.R.e.g.OaI.9#x.K",
+"#G.8#tbR#2.ebT#R.ebC#F#z#GbS.4#HaybA.Zajbi#tbVbV#0#G#F#saB#s.Rbe#bbAbn#Tbna5#GbCay.wbLbR.ZbL.Z.O#E.Kbl#ubVbKbSbVbl.w.4.8#0#ua#bVbQ#ube#b#u#G.1.1bf.0.w#Pa0#H.1#GbV#G#u.w#s.M.S#tbn.e#1.gbZ#R.9.K",
+"#G.y#t.4#T.e#2.S#ra7#u#0#DbS#N#HbVbS#T.U#p.sbK#u#G#G.y#s.y#s.y#zaVbKbn.J.1a5bC.1#G#s.4bO.4bLbD.sbWbF.8ay#z#zbA#u#D#z.4.4#0#u.o#s.4bSbe#H#u#G.1.1.z#D#G.w#ba0.1#0#D.w#D.wbV#x.S.S#s.SbR.ObZ#5bYbO",
+"#GbA#t.4.4#z#2.S#N#D#u#0.rbVarbn#GbS.4#vb5.O.Sbl#DbVa5.K#Dbn.ybVbn.Kbn.J#D#z#G.1.rbV.ZbR.Z#T#i.s.g.ebl#G#0.K#u.8#0bA.e#2.1#u.y#b#xbAbebn#D#Gbm.0beblbV.w.1bc.1#G#D.1#Ga0#s.M.S.Tbn.S.T#jbBbu.4.Z",
+"#G.ya6.4.4#zaB.SaAbd#u#0bdbVarbn.w#u#F.g.pba#t#F.0#u#s.8bnb4.y.8aVbQ#Hbkbna5.1.w.1#z#tbL.4.Z.E#t.gbA#uay#sbS.K.y.w#2#z.4#0bl#D#Ybg#zbebC.0.w#G.1.1bvar#z#u.1.1#G#D.1bV#b#z#2bLbL#b.S#5#..g.k#t.Z",
+"#GbAbD#t.4#0aB.yaA.y#F#0.r.w.8#DbybSbv#t#kas.s.X#D.y.Waibe#HbVa5aVbQb4bkbna5#G.1.w#s#tb.bR.4#ia2.g.y#F#u#GbKbV#ub2#c.K.4bV#7#DaYa6.kaza7#D#P.1bc#z#Tar.8#F.0.1.r#G.1#u#P#s#2bL.S#b.S#haP.U#5bY#T",
+".w.4aI.sbAbSbK#ta6bsbd#za5.0bC.l.1#0bla6.Z#3aIbT#sbUaVara7.q#ebn#b#D#YaA#8#s#u.wbv.K.L#u#R.4#Z#F#T.e.8#z.e.l#sbs.w.P.e.w#G.r.r.1#T.wa7.z.1bea0.F.K#D.RbK.e#zbV#D.w.1#G#u.w#zaB.K#Y#ubOaC.gbobwaP",
+"#GbYbZaPbA#u.y.g.Z.R#u#0#0.0bn.4#G#P#u#TaPba#t.G.ybQ.c.4#8#YbraYbn.R.wbp#ebn.8.1#F.K.L.rbL#t#Zbl#T.eaB#z#z.4#G#7.1#6.S.w#u#G.rbV.l.w.0be.1.wa0#8bV.R#J.K.4.8bV#G#G#G#G#G#b#saB.K.w.ybOaCaPb7.s.G",
+"#G.4bB.U.SbVbAaPaW#D#Da5bSa7#H#2.w#PbSbA.ZaPbw#t.y#zbe.4br#sbq.c.w#D#s#Vao#z#u#G.l.KaS.rb..4afa5.4bS#Fa5#zbv#u#G#0#6bAbQ#u#G.w.8#z.wbd.z.1#b#H#HbS.y#HbQ#T#T#zbn#G#G.w#G.w.waB.K#s.8.T#v#.aIaPaT",
+"bV.4.n#EbA#zbKaP#N#u.0ay.B#HaV.E#G.w#GbS#t.ZbZ.SbV#zbnbVbqai#WaL#b.1aYbp#e#zbS#G#F#z.L.rb..4afbS.lbS#F#u#z.8#u.1#0.M.8#z.o#0#baZa5.w#u.1#D#b#H.1bAbVaYbQ.8.J.y.w.w.w.1#0.w#s#2.SbVbA.K.gaPaIaP.Z",
+".1#t#m.Y.SbVbK.g#N#u#7a5bVb4bn.6.w.w.0bS.S.saI#tbVbV#s#s#Y.daLaLbe.1bQbh#8#zbV#G.l.Kba.r.k#tbNay.l#u#F#ua5#F#u.1.w#2bAbS#F#z#Y.GbVa0#u#D#7az#b.y.ybe.1bVby.laB#b#P.1.w#G#GbVaB.S.y.e.K.g#..n.U.O",
+"#z#t.naP.S.y.SaT.e#F#7aya5#HaV.6.w.1#G#G.ybD#tbk.4#JbQbn.Kbs#Bbebe#Hbnbp#8.ybSbSaJ.K.O.r#4.4#Z#u.8.8#ubS.8.lbVbn#z.e.ebSbbay#bbY#Ga0bS#D#Dbr#bbG#D#n.1#u#b.eaM#b.w#G#G#GbV#s.SbK.4.4#5aPaPbwb#.O",
+".wbD#3.U.K.y.S.Z.e#7#7b2#ubnbebTbV.wbC.1#D.Z#tbT.ZbK#h.c.e#8#b#HaV.1bKbp#8.8#z#ubv#z.nbm#R.y.na8bS#FbV#zbG.ebn#D.4.KbKbV#7ay#baB#G.wbS.w#Hb4#s.4#Daz.1#D#nbV.M#H.w#G.w#G.w.wbK.e.lbA.KaPaPbwaf.O",
+"#baZ#3#..KbS.S.O.ebs#D#0a8#7be.T#u.1bcbcbn.Z.S.TbLbY.TbrbUanbV#H#H#H.Rbp#8bA#zbSbl.K#mbm.4.ea2bl.ebG.wa5bg.S#s.y.G.k.KbVbm.0.w.Sbc.w.B#Bb4#H.y.e.1an#H.1a0bV.5aY.w.wa0.w.w#sbA.SbA.ebu.Z.O#m.Y.H",
+".k#t#X.UbQ#4#tba.B#u#ubV.ya5a0.X.T#H#P#Ga7.y.n.u.sb..K#s#Hbe.i.k#D#YbT.e#0bl.waibA#RbQ#z#RbK.3.y#F#r.y#DaA#u.z#x#v#K#z.w#F#Y.g.R.w#HbCazbCbea#bnbean#H#0a0#G.y.1#G#PbV#b.X.1bV#t.y.KbL#R.9#5.s.9",
+"bnbR#.bW.K.S.ZbabS#u#D#Gbl#z.w.XbO.1bcaUbC#J#1aH.s#R.k#ubean.RbK.1#s.G#z#0#F#saB.8.C#za5aHbAay.y.8#rbS#ubvbAb4bXbhaBbV#z#7.wbkaV#b.w#D.zbcbe.X#sbean#b#G#b#G.ybVbm.w#Daz#D.wbV.4.y#z.4#RaPaI.saP",
+"bK.4aqbi.KbY.ZaPa5#u#GbVa8#z.w#ubOa7#P#Pb4aY.T#O#R.ZbQ#2#YanbVbKbe#zaMbQ#0.o#D.S.l.j.Kbv.ubV.B.R#F#rbS#u#TbAb4bAbR.X.y#z#ua5bg#a#b#H.0#H.1be.y#sbebe.1#G.w#G.ybVbm#G#D#Ya0.wbV#t.ybQ.4#t.ga2.Z.Z",
+"bn#t.HbW.K.S.4.Z.e.ybV#D#u.w.1#D.ZbC#P.w.z#abFaB#4#tb0.Man#YbnbKbebV#2.w.w.o#ubX.8#R#z.l.u.K.BbK.l.e#u.8.l.R#sbAbObs#ubS#DbS#Tbe.wbV#D.w.w.1.y#b#Haz.1#G.w.w#u.ybm.1bVaza0#b#s#tbA#s#t#t.s#5.saP",
+"#s.4bHbN#5.ybA.ZarbA#G#u#0.w.1.1.Zbn#G#0az#Y#z#D#sbAaE#xazbe.1#s.wbV.4.w#G#ubVaBa5aubQa5.ubAay#J.8#F.8.8#FbKbObY#rbnbV.J#D#zarbnbV#D#G#P#b#ubVaYbe#bbc#G.w.wbV#uay.w.w.1#G.w.wbD#T.K.4#t.O#5aPaP",
+"#D#t#.bNbL.ybK.ZbO.S.w#u#Ga0a7.1a6#H.w#Gb4bebQ.1.w.w#Y.ybe#H#b#b#G#zbV#s#G#G.1#2#zau#0a5.jbA.B.Kar.y.8.8#D.K.gbtar.1bVbGbnbS#z.1#D#u.w.w#b#Fbn#saz#b.1#G.w.w.w.y#u#P#b.0.1.1#YaP.M.K.Z.Z.ZaI#EaP",
+"bV#t.Ha9bLaB#z.4a6.4#b#D#Ga0#ub4bD#H.wbSao#bby.z#HbebV#Daz#Hb4#b.w#ubV.1.r#G.w.4#zbY.ea5a1bA.8bKarbsa5.8a7.K#V.Z#N.1bVbG#b.8a5#8.1#G.w.w#n.5.waYazbc#P.1#P.w#P#F#G.waz#Dbc#Gbeb#bGbU#t.saPb7.gbZ",
+"bVbL#m#..SaBbV.l#EbLbe#G#G#b#7be#i#H#PbS.1.w.waz.1#n.X#ban#8b4#Ha0.ybK.way.r.wbKbSbt#2a5aK.Ka8bKarbd#z#ra7#s#X#R.l#7bV.lbe.Ma5azbe.1.1.w#n.X#baVaz#H.1#P#0#P.w#F.w#0.w.0az#GbQb#.4bQbL.Z.Z#5bwbo",
+".K.K.T.gbO.4#s#Fbiapbca0.0be.1.1a6by#G#G#bb4be.zaY.R.y.1az#b#s#b.za5.8#H#2.1#Dbv.K.6bQ.K#F.Kbn.SblbV.k.4bQ.4.MbX#4#Har#D#s.4###bby.1anbebe#Fbe#baz.w.w.1bV.w.wbvaz#D#G#G#G#s.K.UbO.y.e#O#C.D.U.i",
+"#t#tbRbW#R#tbV#2#E#b.1a0#Daz#s#GbTbybc#G.1#bbr#f.q#D.y#baz#H#DbV.za5#F#b.Jbna7ar#4#6.K.4.SbV.y#FbS#z.KbYbybAaBbKbLbn.8#G#s.Z##.w.w.1azbe.1.ybe.waza0#b.1bV#b.w.o#b#D#G#G#G#zbA#EbO.R#r#OaDbB.U.k",
+"#ibwaI.Z.T#t.K#2bD.W#Gbc#G#b#H#GbDby.way.1#ban.zbe.y.y#b#n.w.y#D#Har#u.1#2bnbd.ebOa6.K#x.4bA.4.ya5bV.KaZbQa5.y#s.Sa7arbV#s#x.5.wbV#bb4an#u#saY#sbe.1#bbe.1#n#b.M.wbV#G#GbSbV.e.9.4.y.K.5#AbB.U#J",
+"aPaIa2.s#5#t.K#ObDbQ#G.1.w#b.1#GbD#z.w.rbVbebr.zbQ.y.y#b#nbV#ubVaV.l#z#G#2#D#DbF.4bL.Kbg.Ka5.4.8#0.ybK.G#z#zaB.k.4#Da8.1bnbk.b#bbV.wbebr.y#Y#s#JbV#sazaz.1#b.1#2.w.w#G#G#GbV.K.S.S.y.KaHam#3aO.k",
+".Z#5.Dbwb.#t.K.Sa6#z.1bcbe#b.w.0#i#z.w#Daybeazb4#s.8bV#n.w#GbV.w#H#T.w#D.l#Dbs.T#T#z#z#x#z#z.4.8bSaB.K.G.e#zaB.R.4#Dar.w.wa6.R#b#z.1bebeaB.NbA.S.SbVbebe#G.1.1#2#G.w#0bVbVbVbV.ebLaB.e#KambwbW#J",
+"bWaIaIaP#5.S#s.e#t#s.w#G#Bbn#H#GaP.8.w#GbVbe#b.z#s#D.wa0.1#G.1beaY.Jby#7a5bV.5#1aBak#sbgbQ#z.8bA.BaBbQaZ#z#z#2.S.4#Da8.1#z#Ta7a0#s.1bebnbXaNbRaZ.4.S.w.1#G.1.w#2a5#0.Bbl#ubS.ybVbO#O.ebYambwbWbK",
+".gbL.T.G.K.S.KbA.4#z#P#D#Y#Da0bc.s.4#P.w#Gbe.1a0#sbn#ba0.1.0#b.wbn#vby#7#z#z.5#jaB#b#z.M#z#z.8#FbS#2aYaZ.e#zaZ.R.4#Da5#GbVbO.1by.w#Dbr.R.S.QbZbD#1.S#z#G#u.w.waBbl#0bS.8bVbVblbSaq#x.T.Sam.CbWbn",
+".ZbF#4.9.k.SbV.8.4#z.w#ube.y#bbc#t.4.w#P.w#b.w.zbn#D.1a0.1.1#H.1aVawby#F.w.w#O.g#Fak#DaMbV.ybA.l#u#2akaZbA#z#2bAbL.0ar#GbVbObn.w#Y#D#BbX.k.Qa2.sbM#tbA#u#G#nbybG#u#0a5bl#0bV.y#G#.bT#r#4#X.OaPbn",
+".saIbwaPb..e.K.S.e.8#b#D#P.1#G.1.KaMb0#Da0bman#Jar#Y#8a0.w.w.1bC.ea7#GbS#b#T.Qahb4#D.y#2bS#zbl.ybV#Mbu#tbl#w.yblay#0.R#Hbk#D#H.1#bbV.V.4b4.TaubRbZ#t#t#z.1.1#b.9ar.w#ubv#zbdbs.K.O#t.KbD#3#ob##b",
+".saIbR#E#5.4.y#2bA.4.way.w#G.w.1#s#x.q.y.w.0#nbn.l.w.1.1.wbV.1bCbL#H#G.8.1#x.Q#O#b#D#F.8bS#z.y.y#uav.K.Sbl#m.y#F#D#zbV#8bp.RaV#Hbeak.cbQ.c.T.S#tbR.s#tbK#G.1.w#OaW#b#ua8#0#ubs.K.Y.4#z.G#Zabb##s",
+".gbwbw.UbL.4.SaB.S.8by#D.w#G.w.w.waZbQ.8#G#ube#J.l.waz.0.1#u#bbna6b4#z.l#u.M.K##az#D#FbVbSbS.y.8#uaS.SbLay#3.R.o#ubV#z#8bpbn#HazaYaL#Db0b4bu.R.S.Z.Z.Z.K#G.1#baB#i#b#D.8#0bdbs#rafbL.K#x.Oab.EbV",
+"aPbDbw#EbZ.SbA.ybA#2#s#G.w#G.w.1by#2.K.4#z#G.wbK#ubnaz.X#P#Fbe#Da6bebV.l#GbG#Nbn#b.y#F#s.y.8bK.8bl#Z.4bF.0ba.K.oaybVbV#8bp#s#Hbe#JaL#OaLaY.w#s#z.Z.s.Z.4#u#G.w.y#iaV.1.Ba5.r#D.l#pbL#zaZaP.n#tbV",
+"aP.UbZ#EbZ.K.K#z.e#2.wbV.1#G.1.wa0.8#r.4#0.w#z.y.1.waz#7a0#7#Y#2a6#b#u.8bnbl.Jbn#P#u#F.wbSaBbS.4#u.O.4b.ay.pbQ#F.1#ubAaobh#bbnbe#saLai#BbA#s#z#u.Zbw.ZbObS#G#b#D#iaV.1#z#0#D#u#y#pbL#saZaPaI.K#G",
+".Z#Eb.aPbR.KbKbK.KbG.w#G#0#u.w.1#P.y.S.e#z.w.ybA#H.wa0#u#b#D#bbgbO.1#Fa5bna5bg#D#z#u#F#s#D#2.e.4bl.O.4#5.r.p.Kbv#H#F.ya7bhbe#D.1#Ybq.SaY#Tbn.ybs#taI.g.Z.8#D.w.1a6bnbn.B#0#D#D#T.I.4bV#2aP.C.K#G",
+"bw.UboaP.ZbL.ybS.K.M#s.w#G#G#G#D.1#G.S.e.K#0#FbKbCaza0.1.1.1#s#ia5.0#F#s#Da5aw#bbl#0.obVbV.M.e.4bl.O.SbOaJ.LbQ.ya0#F#D#8bhbe#D#sbe#B#sa7.4.1.e#F#taI#.#j.l#u.1.1.4.1.0a5b2#D#u.Z.UbLbS.SaP#t#z.r",
+".Zbib..U.g.S.S.y#zbT.w#s#G#u#G#GbmbV.S.e.ybVaB#s.Fa0.wa0.0b4#z#ib2.0.oby#D.eaxaY.o#0aB#ubV#2.8.4blaP.e.Z.o.Lbubl.wbl#s#8bhbe.y#b.1.V.W.b#rbe#z.RbYaI#.#v#Tbl.1.1.e#G#7#0#0#D.R.Z.U.S#zbV.s#R#s.r",
+"a6#E#4.YaP#h.4#ubL.4#z.w#G.1.0#D#G#G#G#u.8bG.8#zbC.1a0#zbV#b#z.J.w#GbbbVbAaB#O.1#F.w.8bSay.o#FaP#5a6.4#tbR.Z#zbV.1bdbS#DaAbVbQ#e#BaBaEbA.4#sbs#Dbl#tb1#A.Zbl#u.wbV.y#zay.0.1.y#2aT.4bVbVaZ.9#say",
+".ZbDb.#3#.bF.y#D.T.S#z.w.1.1#G.0#0bc.1.1bVbA.y#b.1.1.w#D#Gbe#z.l#b#u#u#GbA.S.y#D#D#s.y#zay#F.KbtbZ#i.8.Z.saZbA#u.wbCa5#DaA.RbQbn#B.X#Y.4.KbV#u#D.o#tba#k.g#2#u#sbn.y#0#G.rbC#DaB.Z.S#u#sbY#t#s.r",
+".ZbDbubBaP.TbA.1.KbA.K.w#P#b.1.0#0.wb4#P.wbVbnazbC#H#0#u.1be#DbA.wblay#0.4.S#z#D#0bV.8.1ay#u#saP.g#i.4.Z#tbDbK#7.1bCa5bnaW.R#zbn#BaB#Y#x.KbVbn.0#u.4#.a9#i.4#u.1bQ#FbS#G.0.1#D.S.O.4#u.w#tbYbQ.0",
+".8.ZaKaIbNbRbK.wbL.SbA.w.w.1#0#D.B.1#P.1.1bV#H.z.1#b#G#F.1be#7#s#zbv#0.w.4bT#sbS#G#u.y#zblbl#saPaP.Z.e#tbR#t#s#G.w.1bV.1aW.y.Kbnbr.y#YaM#s.y.1#GbSbA.Z.YbW.4bV.w#b#FbS#z.0.1bV.y.O#TbVbV#t#t#s#G",
+"#rbT#RbwbN.g.K.1#t.4.4.w.way.w#GbS#G#Hbc.1.1ao.z.1#PbV#uazazbs#bbU#c#0#0.8.6#z#u#G#F#u#Gbb#F.k#E#.bRbF.Z#t#R#b.1#GbC#zbn#N.R.eaV#sbKaYaZ#s.y.1#G#G.l.ZbW.U.gbA#G.w#2bS#G#u.1bVbSaq.Zbl#z#tbY#s.0",
+"#z#x.s.CbNaP.Kbn#T.S#F#z#0bl#0bVay.w.1.1.1.1bc.z.1.w#z#u#bb4#u#b#s#c.w#zbA.a#z#D#G#FbV#Gbl#u.K.YbaaI.K#i.s.Sbe.z#s#GbSbC#r#D.KaV.RbQ.k.y#s.y.1#Gaybl.l.ZbN.ZbK#G.w.oa5#z#u.1#s#u.Oa6#FbSbY.Zbn#G",
+"#rbT.9b..ObW.KbVbL.K#T.w#0#F#0ayb2.1bc.1bc.wbcao.1#G#zbV.w.1.ybQ#s#2.w#F#z#2#b#7aUbl#0.1#u#GbLaPbN.Hb.aC.saK#Y.z#0.1bV.1#r#D.eaYbAaLaBbK#Dbn#G#G#0#ubSbLa9#Z#z#G#Gbv#z#z#F#D#0.8.H.Z.8bA#tbY#s.1",
+"a5#x#t#w.HaP.Kbn.K.K#2.w.wa8.wbS#0.w.1.1.1#Pbcbc.1bV#0bV#sbV.lbQ#z#u.wa##zbK#B#7#0#u#D#G#G.wbObN.p.n#h.E#taKbe.z.w.1bSbCbFbV.ebn.KaL#x.k.y#b#D.0#ubl#u.4#pbN.S.rbV#F#z#z.o.1.w#F.H.J.la5bY.s#sbc",
+"#Dab#3.ybw#Z.K#zbnararaB#bbGbS#G.1bc.1.0bc.1.1.0ay.w#F#n#sbeai#JbA#D#b.4.e.1.z.o.B.w#u.1#DbQbLaPb#.Z.g.ZbDaka0.w#GbV#G#bbsbea7bnbK.q#4bA#G#G.0#Dar.3.y.R.U#9.Tbd#uay#r#z.MbVbe#Kb1bD#2.e#t#tbn.r",
+".raR.ObSbw#Z.KbK.1ar.ebsaY#T.e.1#GbCbc#Hbc#H.1.1bV#0#F#nbVbe.5bV.lbd#b#N.8bnaz#u#u#0.r.1#ubK#t.Z#EaIbR#1aZapbe.1.1#u#D.w.ybebnb4bn.q.S.4ay#G#D.Rbla5#u.RaP#9.Tbd.r#z.ebU.M#Gbeaub1.g.4.K#t#t#s.0",
+".raR.Oa5bwba.e.y.1ar.e.y#s.8bS.1#u#Ga0a0#Ha0.1#GbVbV#F#bbV.w#FbVbv#D#sbO#T.1az#0#u#G#G.1#ubK.Z.s#EaI#t.ga6#Y#b#G.1#DbV#DbK#BaVbeaVaY.S.4bV#G#D.y.la5#u.i.9aabOa7.r#G.e#z.M#0#b.y#Z.Z.8bQbL#t.w.0",
+".r#o.ObVbwaS.K.S.1.ebA#D.w.e.e#D#G#G.1#Ha0bc.1.0.w#u#F#P#u#z#ubS#T.1bnar.Jbn.1.w#u#G.0.1#Dbn.9bw#E.Taq.gbT#bbn#uan#G#b#Dbnbqa7be.w#a.4#F.w#G.RaBaB.ebSbn.S#X.Zbd#GbV.4#z#F#0#b.S#Z.gbAbQbZ#R#sbc",
+"#GabbwbS#3.p#4bK.wa5.e#Dbnby.lbnbV.1#Pbc.1.1#G#G#s#u#FbybV#u#0#G#T.w#D#r#x.1#Gby#G.1#G.1.1bQ.Gbw.Z#5.Za6.Zak.w#D#B#H#b.y#baLbn#a#b#baB.8.w#0bAbD#t.4bS#D.y.g#vbn#GbV.4#z#u#GbQ.y.L.ZbAbU.S.s.w.0",
+"bcat.sbV.O#k.K#4#H.ebAbC.0.W.4#Day#G.w.1.0#D#G#u.w#u#u#bbV#F.w#u.l#H.X#r.lbebCa0#G#G#G.1.1#Y.G.C.gaIbW#i.g#s#D.0azbe.1.5#YbeaYbe.w.wbX.y.wbn.4bD.ubh#N#ubV.Zbgbn#G#z#2bQbV.w.w.y#Z.g.l#sbRbY#s.0",
+"bm.Obw#z.Ob5#4.SbebSbA.1#Db0.Jbn.8#G.w.1#Gay#G#G#s#u#u#Y.1aBbe.R.ybe.5#z.Kan.0a0#0.1#Gbc#baLbI.C.gbR#EbWbT#z.y#Gb4anbnbsaLbn#a#a#H#b.ybA.w#zbOaPaT#V.l#FbVbOa3#s#0.e#2by#G.1bn.Rat.Z.4#z#t.s#s.0",
+"bm#Z.s.w.Ob5bL#tb4.ebSbC#7bPbGbV.8ay.w.w#G#D#0#G#0#ubV#n#saibe.R#0an.b#z#z#lbd#0.1#Gbc.1#H#Y.EbZaIb..gbR.Sak#G#nb4.m#b.ybq.RaLbea0#b.y.y.wbS.4.g.O#XaA#F#DaraxbQa5.ebTbQ.1a0#G.y#3.Zbv.K#t#tbn.r",
+"#G.sbw#z#2bNa2bSbV.8bQbVay#G.y.SblbS#Gay#G#0#G#ubybvbe#b#z.4.q.S#8#b#za8#Daz#7.w.w.r.1.1#H#s.GbBaBb.aP.CbAbn.1b4ananan###Bbn.mbnb4#b.ybv#GbnaP#ZadbN#jbSay.MbD.n.1#z.4#z#bbCbV#zbwaPa6#5bZbD.y.1",
+".1#tbw#z.4a9#5bV#z.8.w#G.r#G#ubAbSbS#z#0#G.1#0bS#z.o#bbn.y#2akaB.1.w#0.y#0az#Dbn.w#G#G.1#baY.9.C#2bL.Y.s.S#DbC#Hazbeana7brbn#Wbnan#b.K#u.w#bbDb1#k#k.g.Saybv#xbw.w#z.4bK#P#G#G#z.s.g.g.KbR.ZbV.1",
+".w.Sbw#z.8#..D#u#z.y#s#0bmbm#D.Ka5bS#G.w#GbS#G#0a5#F.1#DaB.4bQ#2#D.w#zbS.wbe#u#0.wbV#G.1#b.KaP.Z.ZaIbN#..S#u.1.1b4anbe#Hbebebrbnbe.w#z#u.wbn#E.LaG#ka9.4#zblaZ.sbV#z.4#z.w.0#D#s.H#i#x#5bZ.Z#s.1",
+".wbLbw.K.8.O#5.8#GbS.w.1.r#G.wbVbS.8bV#0#G#ubVbV#u.yaY#D#2.ebQ#2.1bVa5.8.w.1bSbS.w#G#G#G#GbA.g#.bLbRba.O.K#D.1.1b4anb4brbebrbrbn#Hbn.KbS.w#Db#.fb6aG#kaq#za5.8.Z#zbV.S#s.way#GbnbBaP.g.TbR#t#s.1",
+"bcaI#t.K.8.Oa2.8.w#z#z#0#Gbm.wbKa5blbVbV#G#u#ua5.y#D.wbVbGbQ#baB.wbSbA.4#b.RbVbA#0bV#G.wbVbY.Z.O.TbR#.aPbQ.ya0#b.z#Bb4anbe#B#Y.ibe#sbV#s#b.Rafb6#k#kadaP.e#zbA.4bS#s.R#s.wbS#D.1b7#i#x#4bR.9bV#G",
+".w#4bw.e.8.OaI#u#z#z#z#G#G#G.w.4#za5bS#GbVbVbVbS.4bKbV.K.MbQaY#FazbVbAaB.q#F#GbS#G.1#Haz#saBbZ.H.e.gbabN.q#7#b.zan.manbebrbrbrbn.1#D#zbV.1.R.I.ha9.L#kbN.4#zbA.8ar#s.Rbn#0.B#GbnaI#E#i#5.s.Z#s#D",
+"#GaKbR.e.yaqaI.8#z#sbK#0#G#G#saZa5bAbSbVbV#zbV#u.l#z.ybV#x.w#bbdazbV.K.Sbr.5.w#z.1bcbcaz#baBbZ.O.ebWbabi.qbs.zb4ananan.1#Bbe#Wbn.1.y.y#DbnaB#M.h.g.Oa9bibTbAbA.8.J#sbn.Raya5bVa7aI#E#i.KbR#t#s.0",
+"#Gb.bBa5bA.Oa2#u.K.K.4#z#G#GbQbDbA.8bS.y#ubVbVaB#r.KbA#zbg#Y#b#Ha0bV#sbKaLa#be#0.1#H.1#B.1bY#taP.KaPaP.U#Y#7.z.zananan.ibqaV.mbn#b#DbV#z.1bXafac.ZaI#..I#i.lbA.8.J#s.i.ya5a5#DbdaIaC#ib.bR.4bQ#D",
+"#Gb..ZbAbAbaaIbV#zbA.ybKbV#sbV#Far#z#Dblblar.8aB.y#zbR.KbG.w.1.z.wbV#T.can.Sbr#8b4.w#nb4#L#.bJ#R#z.g#3a9bq#F.z#H#f.mbe#sbe#D#L##bC#s.ybl#P#3.2.I#tbL.g#..paP.e.obTbQ#s#2.ybV.y#FbA.O.L.4.4bB#a.0",
+"#Gb..ga5.eaPbB.ya5bl.8bS#0bn#s#u.Z#zbV#Fa8.8bA.y.8#4bR#1.8#G.1.1#PbVaAb4br.e.V#8an.waz#8#WbiaIbX.k#v.uajaL#Fbc.1#fbeanbnaLa7#La7#8#sbK.r.w.O.x.Y#t.e.gbWadbN#4bl#xbQ.K#2#ubVbV#D.lba.LbZaBbwak.0",
+"#G.KaP.e#z.ObZ.y#za5bSbS#z.w#0bV.g.K#s#ua8.lbl.y#F.4.Z#i#z#G.0.w.w#DbOan.V.ebeanbr.w#bbCaLbi#..Sby.g.saObe#u#H.1#8be#B#Dbebr#L#8bc#sbKay.w.Y.LaT.4.K#taP#pbibA#u#2#s#zaB.ybV#sbV.4bababLaB.s.7.0",
+"#Gbu.ga5#s.Obw.yby#0bSbS#0#zaybSbabZ.K#zbl.8bA#u.8.Saq.6#YbV#Ga0be.1bOanbrbU#8.zaza0.w#H#WaP#EbK#b.Z#R#XaV#0.z.1#b.1#B.R#Yan.m#8#H#JbK#G#0af.L.u.4.ebO.gbN.U#t#z.ybQbV.8.y.wbVbVaBba#Z.T.4.s.kbc",
+"a0.7aP.e#z#Zbw#u#0#0#0#u#G#G#uaya9bR#4bVbSa5bS#F.K.T.Z.6b0ay#D#bbebV#T.m#8bU#D.1#8#0.1bebqaIbW#J#b#x#R#v#D#0bC#H#HbV#Bbs#B.mbe#ea0bK.K#G#0.I#Z#t#tbA.ebO#..Ua6bV#F.w#sbVbV#z#sbVbA.O#Z.ebYaT.7bc",
+"#P.Q.ga5#sba.sbAbV.wbS#u#z#GbVbVbaaT.SbKa5a5bS#F.ebL#EbD#b#u#u#Y#H.1#Tbebd.W#7bd.1bS#0beaL.T#Ebn#Y.g.S#y#u#0aobe.w.1azbs#Bbrb4a7a0au.K#Pay.I.O.Z.4.y.ebLbR#..P#z.8bV#0bVbn.w#s#sbAbH#ZbL.4.9.kbc",
+".1buaPa5#z.Y.O#ubV#sbVbV.1#z#D.wba.Z.4bA.8.e.KbA.4#t.UbL#s#zbbbe#b#b#ran.b.W#7.1#8#G#0#HbKb7.gaV#BbT.K#r#Dby#H.m.1.1be#u#B.1.wbe#P.S#z.wbSbi.n.ZbK.4.e.8aI.Z.6.K#u#GbV#0bV#s.w.w.e#Z#Z.K.4aT.k.1",
+".rb..g.e#s.YaPbV#z.wbnbV.wbn#Dbn.OaP.4.y.4#N.K.K#T#t.U.Q#z.w#F#YazanaNan.bap#Ga0az#0#P#b#KbR.Z#aaz#ibK#h#u.wbC#B#b.1bebs#B#D#baLbcbA.k#P#G#E#S#2.K.8bAbL.Tbw.6.K#G#0.wbVbVbV#s#s.e.Oba.K.4aT.k.0"
+};
+
+static void drawroundrect( TQPainter *p, TQCOORD x, TQCOORD y,
+                           TQCOORD w, TQCOORD h, TQCOORD d );
+
+static inline int buttonthickness( int d );
+
+static TQRegion roundRectRegion( const TQRect& g, int r );
+
+static void get_combo_parameters( const TQRect &r,
+                                  int &ew, int &awh, int &ax,
+                                  int &ay, int &sh, int &dh,
+                                  int &sy );
+
+static int get_combo_extra_width( int h, int *return_awh = 0 );
+
+enum { PointUp, PointDown, PointLeft, PointRight };
+
+
+NorwegianWoodStyle::NorwegianWoodStyle() : TQWindowsStyle()
+{
+}
+
+/*!
+  Reimplementation from TQStyle
+ */
+void NorwegianWoodStyle::polish( TQApplication *app)
+{
+
+    oldPalette = app->palette();
+
+    // we simply create a nice TQColorGroup with a couple of fancy wood
+    // pixmaps here and apply to it all widgets
+
+    TQImage img(button_xpm);
+    TQImage orig = img;
+    orig.detach();
+    TQPixmap button;
+    button.convertFromImage(img);
+
+
+    int i;
+    for (i=0; i<img.numColors(); i++) {
+        TQRgb rgb = img.color(i);
+        TQColor c(rgb);
+        rgb = c.dark(120).rgb();
+        img.setColor(i,rgb);
+    }
+    TQPixmap mid;
+    mid.convertFromImage(img);
+
+    img = orig;
+    img.detach();
+    for (i=0; i<img.numColors(); i++) {
+        TQRgb rgb = img.color(i);
+        TQColor c(rgb);
+        rgb = c.light().rgb();
+        img.setColor(i,rgb);
+    }
+    TQPixmap light;
+    light.convertFromImage(img);
+
+    img = orig;
+    img.detach();
+    for (i=0; i<img.numColors(); i++) {
+        TQRgb rgb = img.color(i);
+        TQColor c(rgb);
+        rgb = c.dark(180).rgb();
+        img.setColor(i,rgb);
+    }
+    TQPixmap dark;
+    dark.convertFromImage(img);
+
+
+    TQImage bgimage(polish_xpm);
+    TQPixmap background;
+    background.convertFromImage(bgimage);
+
+    img = bgimage;
+    img.detach();
+    for (i=0; i<img.numColors(); i++) {
+        TQRgb rgb = img.color(i);
+        TQColor c(rgb);
+        rgb = c.dark(180).rgb();
+        img.setColor(i,rgb);
+    }
+    sunkenDark = new TQPixmap;
+    sunkenDark->convertFromImage(img);
+
+
+    img = bgimage;
+    img.detach();
+    for (i=0; i<img.numColors(); i++) {
+        TQRgb rgb = img.color(i);
+        TQColor c(rgb);
+        rgb = c.light(130).rgb();
+        img.setColor(i,rgb);
+    }
+    sunkenLight= new TQPixmap;
+    sunkenLight->convertFromImage(img);
+
+
+
+    TQPalette op(TQColor(212,140,95));
+    // TQPalette op(white);
+    TQColorGroup active (op.active().foreground(),
+                     TQBrush(op.active().button(),button),
+                     TQBrush(op.active().light(), light),
+                     TQBrush(op.active().dark(), dark),
+                     TQBrush(op.active().mid(), mid),
+                     op.active().text(),
+                     TQt::white,
+                     TQColor(236,182,120),
+                     TQBrush(op.active().background(), background)
+                     );
+    TQColorGroup disabled (op.disabled().foreground(),
+                     TQBrush(op.disabled().button(),button),
+                     TQBrush(op.disabled().light(), light),
+                     op.disabled().dark(),
+                     TQBrush(op.disabled().mid(), mid),
+                     op.disabled().text(),
+                     TQt::white,
+                     TQColor(236,182,120),
+                     TQBrush(op.disabled().background(), background)
+                     );
+
+   app->setPalette(TQPalette(active, disabled, active), TRUE );
+
+}
+
+void NorwegianWoodStyle::unPolish( TQApplication *app)
+{
+    app->setPalette(oldPalette, TRUE);
+}
+
+/*!
+  Reimplementation from TQStyle
+ */
+void NorwegianWoodStyle::polish( TQWidget* w)
+{
+
+    // the polish function sets some widgets to transparent mode and
+    // some to translate background mode in order to get the full
+    // benefit from the nice pixmaps in the color group.
+
+    if ( !w->isTopLevel() ) {
+        if ( w->inherits("TQPushButton")
+             || w->inherits("TQToolButton")
+             || w->inherits("TQComboBox") ) {
+            w->setAutoMask( TRUE );
+            return;
+        }
+        if ( w->backgroundPixmap() )
+            w->setBackgroundOrigin( TQWidget::WindowOrigin );
+    }
+}
+
+void NorwegianWoodStyle::unPolish( TQWidget* w)
+{
+    // the polish function sets some widgets to transparent mode and
+    // some to translate background mode in order to get the full
+    // benefit from the nice pixmaps in the color group.
+    if ( !w->isTopLevel() ) {
+        if ( w->inherits("TQPushButton")
+             || w->inherits("TQToolButton")
+             || w->inherits("TQComboBox") ) {
+            w->setAutoMask( FALSE );
+            return;
+        }
+        if ( w->backgroundPixmap() )
+            w->setBackgroundOrigin( TQWidget::WidgetOrigin );
+    }
+}
+
+void NorwegianWoodStyle::drawPrimitive( PrimitiveElement pe,
+                                        TQPainter *p,
+                                        const TQRect &r,
+                                        const TQColorGroup &cg,
+                                        SFlags flags, const TQStyleOption& opt ) const
+{
+    int x, y, w, h;
+    r.rect( &x, &y, &w, &h );
+    switch ( pe ) {
+    case PE_ButtonCommand:
+        {
+            int d = TQMIN( w, h ) / 2;
+            int b = buttonthickness( d );
+
+            TQRegion internR = roundRectRegion( TQRect(x + b, y + b,
+                                                       w - 2 * b,
+                                                       h - 2 * b), d - b );
+            TQPen oldPen = p->pen();
+
+            TQBrush brush( flags & Style_Sunken ? cg.brush(TQColorGroup::Mid) :
+                          cg.brush(TQColorGroup::Button) );
+            p->setClipRegion( internR );
+            p->fillRect( r, brush );
+
+            int e = TQMIN( w, h ) / 2;
+            TQPoint p2( x + w - 1 - e, y + e );
+            TQPoint p3( x + e, y + h - 1 - e );
+
+            TQPointArray a;
+            a.setPoints( 5, x,y, x+w-1, y, p2.x(), p2.y(), p3.x(), p3.y(),
+                         x, y + h - 1 );
+            p->setClipRegion( TQRegion(a) - internR );
+
+            p->fillRect( r, (flags & Style_Sunken ? TQBrush( cg.dark(), *sunkenDark)
+                                             : cg.brush(TQColorGroup::Light)) );
+
+            // A little inversion is needed the buttons
+            // ( but not flat)
+            if ( flags & Style_Raised || flags & Style_Sunken ) {
+                a.setPoint( 0, x + w - 1, y + w - 1 );
+                p->setClipRegion( TQRegion( a ) - internR );
+
+                p->fillRect( r, (flags & Style_Sunken ? TQBrush( cg.light(), *sunkenLight) : cg.brush( TQColorGroup::Dark ) ) );
+            }
+            p->setClipRegion( internR );
+            p->setClipping( FALSE );
+            p->setPen( cg.foreground() );
+            drawroundrect( p, x, y, w, h, d );
+            p->setPen( oldPen );
+            break;
+        }
+    case PE_ScrollBarAddLine:
+        if ( flags & Style_Horizontal )
+            drawSemicircleButton( p, r, PointRight, flags & Style_Down, cg );
+        else
+            drawSemicircleButton( p, r, PointDown, flags & Style_Down, cg );
+        break;
+    case PE_ScrollBarSubLine:
+        if ( flags & Style_Horizontal )
+            drawSemicircleButton( p, r, PointLeft, flags & Style_Down, cg );
+        else
+            drawSemicircleButton( p, r, PointUp, flags & Style_Down, cg );
+        break;
+    default:
+        TQWindowsStyle::drawPrimitive( pe, p, r, cg, flags, opt );
+        break;
+    }
+}
+
+void NorwegianWoodStyle::drawControl( ControlElement element,
+                                      TQPainter *p,
+                                      const TQWidget *widget,
+                                      const TQRect &r,
+                                      const TQColorGroup &cg,
+                                      SFlags how, const TQStyleOption& opt ) const
+{
+    switch( element ) {
+    case CE_PushButton:
+        {
+            const TQPushButton *btn;
+            btn = ( const TQPushButton * )widget;
+            TQColorGroup myCg( cg );
+            SFlags flags = Style_Default;
+            if ( btn->isOn() )
+                flags |= Style_On;
+            if ( btn->isDown() )
+                flags |= Style_Down;
+            if ( btn->isOn() || btn->isDown() )
+                flags |= Style_Sunken;
+            if ( btn->isDefault() )
+                flags |= Style_Default;
+            if ( ! btn->isFlat() && !(flags & Style_Down) )
+                flags |= Style_Raised;
+
+            int x1, y1, x2, y2;
+            r.coords( &x1, &y1, &x2, &y2 );
+
+            p->setPen( cg.foreground() );
+            p->setBrush( TQBrush( cg.button(), NoBrush ) );
+
+            TQBrush fill;
+            if ( btn->isDown() )
+                fill = cg.brush( TQColorGroup::Mid );
+            else if ( btn->isOn() )
+                fill = TQBrush( cg.mid(), Dense4Pattern );
+            else
+                fill = cg.brush( TQColorGroup::Button );
+            myCg.setBrush( TQColorGroup::Mid, fill );
+
+            if ( btn->isDefault() ) {
+                x1 += 2;
+                y1 += 2;
+                x2 -= 2;
+                y2 -= 2;
+            }
+
+            drawPrimitive( PE_ButtonCommand, p,
+                           TQRect( x1, y1, x2 - x1 + 1, y2 - y1 + 1),
+                           myCg, flags, opt );
+
+            if ( btn->isDefault() ) {
+                TQPen pen( TQt::black, 4 );
+                pen.setCapStyle( TQt::RoundCap );
+                pen.setJoinStyle( TQt::RoundJoin );
+                p->setPen( pen );
+                drawroundrect( p, x1 - 1, y1 - 1, x2 - x1 + 3, y2 - y1 + 3, 8 );
+            }
+
+            if ( btn->isMenuButton() ) {
+                int dx = ( y1 - y2 - 4 ) / 3;
+
+                // reset the flags
+                flags = Style_Default;
+                if ( btn->isEnabled() )
+                    flags |= Style_Enabled;
+                drawPrimitive( PE_ArrowDown, p,
+                               TQRect( x2 - dx, dx, y1, y2 - y1),
+                               myCg, flags, opt );
+            }
+
+            if ( p->brush().style() != NoBrush )
+                p->setBrush( NoBrush );
+            break;
+        }
+    case CE_PushButtonLabel:
+        {
+            const TQPushButton *btn;
+            btn = (const TQPushButton*)widget;
+            int x, y, w, h;
+            r.rect( &x, &y, &w, &h );
+
+            int x1, y1, x2, y2;
+            r.coords( &x1, &y1, &x2, &y2 );
+            int dx = 0;
+            int dy = 0;
+            if ( btn->isMenuButton() )
+                dx = ( y2 - y1 ) / 3;
+            if ( dx || dy )
+                p->translate( dx, dy );
+
+            x += 2;
+            y += 2;
+            w -= 4;
+            h -= 4;
+            drawItem( p, TQRect( x, y, w, h ),
+                      AlignCenter | ShowPrefix,
+                      cg, btn->isEnabled(),
+                      btn->pixmap(), btn->text(), -1,
+                      (btn->isDown() || btn->isOn()) ? &cg.brightText()
+                      : &cg.buttonText() );
+            if ( dx || dy )
+                p->translate( -dx, -dy );
+            break;
+        }
+    default:
+        TQWindowsStyle::drawControl( element, p, widget, r, cg, how, opt );
+        break;
+    }
+}
+
+void NorwegianWoodStyle::drawControlMask( ControlElement element,
+                                          TQPainter *p,
+                                          const TQWidget *widget,
+                                          const TQRect &r,
+                                          const TQStyleOption& opt ) const
+{
+    switch( element ) {
+    case CE_PushButton:
+        {
+            int d = TQMIN( r.width(), r.height() ) / 2;
+            p->setPen( color1 );
+            p->setBrush( color1 );
+            drawroundrect( p, r.x(), r.y(), r.width(), r.height(), d );
+            break;
+        }
+    default:
+        TQWindowsStyle::drawControlMask( element, p, widget, r, opt );
+        break;
+    }
+}
+
+void NorwegianWoodStyle::drawComplexControl( ComplexControl cc,
+                                             TQPainter *p,
+                                             const TQWidget *widget,
+                                             const TQRect &r,
+                                             const TQColorGroup &cg,
+                                             SFlags how,
+                                             SCFlags sub,
+                                             SCFlags subActive,
+                                             const TQStyleOption& opt ) const
+{
+    switch( cc ) {
+    case CC_ComboBox:
+        {
+            const TQComboBox *cmb;
+            cmb = (const TQComboBox*)widget;
+
+            int awh, ax, ay, sh, sy, dh, ew;
+            get_combo_parameters( subRect(SR_PushButtonContents, widget),
+                                  ew, awh, ax, ay, sh, dh, sy );
+            drawPrimitive( PE_ButtonCommand, p, r, cg, Style_Raised, opt );
+            TQStyle *mstyle = TQStyleFactory::create( "Motif" );
+            if ( mstyle )
+                mstyle->drawPrimitive( PE_ArrowDown, p,
+                                       TQRect(ax, ay, awh, awh), cg, how, opt );
+            else
+                drawPrimitive( PE_ArrowDown, p,
+                               TQRect(ax, ay, awh, awh), cg, how, opt );
+
+            TQPen oldPen = p->pen();
+            p->setPen( cg.light() );
+            p->drawLine( ax, sy, ax + awh - 1, sy );
+            p->drawLine( ax, sy, ax, sy + sh - 1 );
+            p->setPen( cg.dark() );
+            p->drawLine( ax + 1, sy + sh - 1, ax + awh - 1, sy + sh - 1 );
+            p->drawLine( ax + awh - 1, sy + 1, ax + awh - 1, sy + sh - 1 );
+            p->setPen( oldPen );
+
+            if ( cmb->editable() ) {
+                TQRect r( querySubControlMetrics(CC_ComboBox, widget,
+                                                SC_ComboBoxEditField, opt) );
+                qDrawShadePanel( p, r, cg, TRUE, 1,
+                                 &cg.brush(TQColorGroup::Button) );
+            }
+
+            break;
+        }
+    default:
+        TQWindowsStyle::drawComplexControl( cc, p, widget, r, cg, how,
+                                           sub, subActive, opt );
+        break;
+    }
+}
+
+void NorwegianWoodStyle::drawComplexControlMask( ComplexControl control,
+                                                 TQPainter *p,
+                                                 const TQWidget *widget,
+                                                 const TQRect &r,
+                                                 const TQStyleOption& opt ) const
+{
+    switch ( control ) {
+    case CC_ComboBox:
+        {
+            int d = TQMIN( r.width(), r.height() ) / 2;
+            p->setPen( color1 );
+            p->setBrush( color1 );
+            drawroundrect( p, r.x(), r.y(), r.width(), r.height(), d );
+            break;
+        }
+    default:
+        TQWindowsStyle::drawComplexControlMask( control, p, widget, r, opt );
+        break;
+    }
+}
+
+TQRect NorwegianWoodStyle::querySubControlMetrics( ComplexControl control,
+                                                  const TQWidget *widget,
+                                                  SubControl sc,
+                                                  const TQStyleOption& opt ) const
+{
+    TQRect rect;
+    switch ( control ) {
+    case CC_ComboBox:
+        {
+            switch( sc ) {
+            case SC_ComboBoxEditField:
+                {
+                    rect = subRect( SR_PushButtonContents, widget );
+                    int ew = get_combo_extra_width( rect.height(), 0 );
+                    rect.setRect( rect.x() + 1, rect.y() + 1,
+                                  rect.width() - 2 - ew, rect.height() - 2 );
+                    break;
+                }
+            default:
+                rect = TQWindowsStyle::querySubControlMetrics( control, widget,
+                                                              sc, opt );
+                break;
+            }
+            break;
+        }
+    case CC_ScrollBar:
+        {
+            const TQScrollBar* sb;
+            sb = (const TQScrollBar*)widget;
+            bool horz = sb->orientation() == TQScrollBar::Horizontal;
+            int b = 2;
+            int w = horz ? sb->height() : sb->width();
+
+            switch ( sc ) {
+            case SC_ScrollBarAddLine:
+                rect.setRect( b, b, w - 2 * b, w - 2 * b );
+                if ( horz )
+                    rect.moveBy( sb->width() - w, 0 );
+                else
+                    rect.moveBy( 0, sb->height() - w );
+                break;
+            case SC_ScrollBarSubLine:
+                rect.setRect( b, b, w - 2 * b, w - 2 * b );
+                break;
+            default:
+                rect = TQWindowsStyle::querySubControlMetrics( control, widget,
+                                                              sc, opt );
+                break;
+            }
+            break;
+        }
+    default:
+        rect = TQWindowsStyle::querySubControlMetrics( control, widget,
+                                                      sc, opt );
+        break;
+    }
+    return rect;
+}
+
+TQRect NorwegianWoodStyle::subRect( SubRect sr, const TQWidget * widget ) const
+{
+    TQRect r;
+    switch ( sr ) {
+    case SR_PushButtonContents:
+        {
+            const TQPushButton *btn;
+            btn = (const TQPushButton*)widget;
+            r = btn->rect();
+            int d = TQMIN( r.width(), r.height() ) / 2;
+            int b = buttonthickness( d );
+
+            d -= b;
+            b++;
+
+            if ( r.width() < r.height() )
+                r.setRect( r.x() + b, r.y() + d,
+                           r.width() - 2 * b, r.height() - 2 * d );
+            else
+                r.setRect( r.x() + d, r.y() + b,
+                           r.width() - 2 * d, r.height() - 2 * b );
+            break;
+        }
+    case SR_ComboBoxFocusRect:
+        {
+            r = subRect( SR_PushButtonContents, widget );
+            int ew = get_combo_extra_width( r.height() );
+            r.setRect( r.x() + 1, r.y() + 1, r.width() - 2 - ew,
+                       r.height() - 2 );
+            break;
+        }
+    default:
+        r = TQWindowsStyle::subRect( sr, widget );
+        break;
+    }
+    return r;
+}
+
+static void drawroundrect( TQPainter *p, TQCOORD x, TQCOORD y,
+                           TQCOORD w, TQCOORD h, TQCOORD d )
+{
+    int rx = (200*d)/w;
+    int ry = (200*d)/h;
+    p->drawRoundRect( x, y, w, h, rx, ry );
+}
+
+static TQRegion roundRectRegion( const TQRect& g, int r )
+{
+    TQPointArray a;
+    a.setPoints( 8, g.x()+r, g.y(), g.right()-r, g.y(),
+                 g.right(), g.y()+r, g.right(), g.bottom()-r,
+                 g.right()-r, g.bottom(), g.x()+r, g.bottom(),
+                 g.x(), g.bottom()-r, g.x(), g.y()+r );
+    TQRegion reg( a );
+    int d = r*2-1;
+    reg += TQRegion( g.x(),g.y(),r*2,r*2, TQRegion::Ellipse );
+    reg += TQRegion( g.right()-d,g.y(),r*2,r*2, TQRegion::Ellipse );
+    reg += TQRegion( g.x(),g.bottom()-d,r*2,r*2, TQRegion::Ellipse );
+    reg += TQRegion( g.right()-d,g.bottom()-d,r*2,r*2, TQRegion::Ellipse );
+    return reg;
+}
+
+
+
+
+static int get_combo_extra_width( int h, int *return_awh )
+{
+    int awh;
+    if ( h < 8 ) {
+        awh = 6;
+    } else if ( h < 14 ) {
+        awh = h - 2;
+    } else {
+        awh = h/2;
+    }
+    if ( return_awh )
+        *return_awh = awh;
+    return awh*3/2;
+}
+
+
+static void get_combo_parameters( const TQRect &r,
+                                  int &ew, int &awh, int &ax,
+                                  int &ay, int &sh, int &dh,
+                                  int &sy )
+{
+    ew = get_combo_extra_width( r.height(), &awh );
+
+    sh = (awh+3)/4;
+    if ( sh < 3 )
+        sh = 3;
+    dh = sh/2 + 1;
+
+    ay = r.y() + (r.height()-awh-sh-dh)/2;
+    if ( ay < 0 ) {
+        //panic mode
+        ay = 0;
+        sy = r.height();
+    } else {
+        sy = ay+awh+dh;
+    }
+    ax = r.x() + r.width() - ew +(ew-awh)/2;
+}
+
+static inline int buttonthickness( int d )
+{ return  d > 20 ? 5 : ( d < 10 ? 2: 3 ); }
+
+void NorwegianWoodStyle::drawSemicircleButton( TQPainter *p, const TQRect &r,
+                                               int dir, bool sunken,
+                                               const TQColorGroup &g ) const
+{
+    int b =  pixelMetric( PM_ScrollBarExtent ) > 20 ? 3 : 2;
+
+     TQRegion extrn(  r.x(),   r.y(),   r.width(),     r.height(),     TQRegion::Ellipse );
+     TQRegion intern( r.x()+b, r.y()+b, r.width()-2*b, r.height()-2*b, TQRegion::Ellipse );
+    int w2 = r.width()/2;
+    int h2 = r.height()/2;
+
+    int bug = 1; //off-by-one somewhere!!!???
+
+    switch( dir ) {
+    case PointRight:
+        extrn +=  TQRegion( r.x(),  r.y(),   w2,     r.height() );
+        intern += TQRegion( r.x()+b,r.y()+b, w2-2*b, r.height()-2*b );
+        break;
+    case PointLeft:
+        extrn +=  TQRegion( r.x()+w2,  r.y(),   w2,     r.height() );
+        intern += TQRegion( r.x()+w2+b,r.y()+b, w2-2*b, r.height()-2*b );
+        break;
+    case PointUp:
+        extrn +=  TQRegion( r.x(),  r.y()+h2,   r.width(),     h2 );
+        intern += TQRegion( r.x()+b,r.y()+h2+b, r.width()-2*b-bug, h2-2*b-bug );
+        break;
+    case PointDown:
+        extrn +=  TQRegion( r.x(),  r.y(),   r.width(),     h2 );
+        intern += TQRegion( r.x()+b,r.y()+b, r.width()-2*b-bug, h2-2*b-bug );
+        break;
+    }
+
+    extrn = extrn - intern;
+    TQPointArray a;
+    a.setPoints( 3, r.x(), r.y(), r.x(), r.bottom(), r.right(), r.top() );
+
+    TQRegion oldClip = p->clipRegion();
+    bool bReallyClip = p->hasClipping();  // clip only if we really want.
+    p->setClipRegion( intern );
+    p->fillRect( r, g.brush( TQColorGroup::Button ) );
+
+    p->setClipRegion( TQRegion(a)&extrn );
+    p->fillRect( r, sunken ? g.dark() : g.light() );
+
+    a.setPoints( 3, r.right(), r.bottom(), r.x(), r.bottom(),
+                 r.right(), r.top() );
+    p->setClipRegion( TQRegion(a) &  extrn );
+    p->fillRect( r, sunken ? g.light() : g.dark() );
+
+    p->setClipRegion( oldClip );
+    p->setClipping( bReallyClip );
+}
+
+#endif
+
+ +


+

Header file of the Metal theme: +

/****************************************************************************
+** $Id: qt/metal.h   3.3.8   edited Jan 11 14:46 $
+**
+** Definition of the Metal Style for the themes example
+**
+** Created : 979899
+**
+** Copyright (C) 1997-2007 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.
+**
+*****************************************************************************/
+
+#ifndef METAL_H
+#define METAL_H
+
+
+#include <qpalette.h>
+
+#ifndef QT_NO_STYLE_WINDOWS
+
+#include <qwindowsstyle.h>
+
+
+class MetalStyle : public TQWindowsStyle
+{
+public:
+    MetalStyle();
+    void polish( TQApplication*);
+    void unPolish( TQApplication*);
+    void polish( TQWidget* );
+    void unPolish( TQWidget* );
+
+    void drawPrimitive( PrimitiveElement pe,
+                        TQPainter *p,
+                        const TQRect &r,
+                        const TQColorGroup &cg,
+                        SFlags flags = Style_Default,
+                        const TQStyleOption& = TQStyleOption::Default) const;
+
+    void drawControl( ControlElement element,
+                      TQPainter *p,
+                      const TQWidget *widget,
+                      const TQRect &r,
+                      const TQColorGroup &cg,
+                      SFlags how = Style_Default,
+                      const TQStyleOption& = TQStyleOption::Default ) const;
+
+    void drawComplexControl( ComplexControl cc,
+                             TQPainter *p,
+                             const TQWidget *widget,
+                             const TQRect &r,
+                             const TQColorGroup &cg,
+                             SFlags how = Style_Default,
+                             SCFlags sub = SC_All,
+                             SCFlags subActive = SC_None,
+                             const TQStyleOption& = TQStyleOption::Default ) const;
+    int pixelMetric( PixelMetric, const TQWidget * ) const;
+
+
+private:
+    void drawMetalFrame(  TQPainter *p, int x, int y, int w, int h ) const;
+    void drawMetalGradient( TQPainter *p, int x, int y, int w, int h,
+                          bool sunken, bool horz, bool flat=FALSE ) const;
+    void drawMetalButton( TQPainter *p, int x, int y, int w, int h,
+                          bool sunken, bool horz, bool flat=FALSE ) const;
+    TQPalette oldPalette;
+};
+
+#endif
+
+#endif
+
+ +


+

Implementation of the Metal theme: +

/****************************************************************************
+** $Id: qt/metal.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "metal.h"
+
+#ifndef QT_NO_STYLE_WINDOWS
+
+#include "qapplication.h"
+#include "qcombobox.h"
+#include "qpainter.h"
+#include "qdrawutil.h" // for now
+#include "qpixmap.h" // for now
+#include "qpalette.h" // for now
+#include "qwidget.h"
+#include "qlabel.h"
+#include "qimage.h"
+#include "qpushbutton.h"
+#include "qwidget.h"
+#include "qrangecontrol.h"
+#include "qscrollbar.h"
+#include "qslider.h"
+#include <limits.h>
+
+
+/////////////////////////////////////////////////////////
+//#include "stonedark.xpm"
+#include "stone1.xpm"
+#include "marble.xpm"
+///////////////////////////////////////////////////////
+
+
+
+MetalStyle::MetalStyle() : TQWindowsStyle() { }
+
+/*!
+  Reimplementation from TQStyle
+ */
+void MetalStyle::polish( TQApplication *app)
+{
+    oldPalette = app->palette();
+
+    // we simply create a nice TQColorGroup with a couple of fancy
+    // pixmaps here and apply to it all widgets
+
+    TQFont f("times", app->font().pointSize() );
+    f.setBold( TRUE );
+    f.setItalic( TRUE );
+    app->setFont( f, TRUE, "TQMenuBar");
+    app->setFont( f, TRUE, "TQPopupMenu");
+
+
+
+    //    TQPixmap button( stonedark_xpm );
+
+    TQColor gold("#B9B9A5A54040"); //same as topgrad below
+    TQPixmap button( 1, 1 ); button.fill( gold );
+
+    TQPixmap background(marble_xpm);
+    TQPixmap dark( 1, 1 ); dark.fill( red.dark() );
+    TQPixmap mid( stone1_xpm );
+    TQPixmap light( stone1_xpm );//1, 1 ); light.fill( green );
+
+    TQPalette op = app->palette();
+
+    TQColor backCol( 227,227,227 );
+
+    // TQPalette op(white);
+    TQColorGroup active (op.active().foreground(),
+                     TQBrush(op.active().button(),button),
+                     TQBrush(op.active().light(), light),
+                     TQBrush(op.active().dark(), dark),
+                     TQBrush(op.active().mid(), mid),
+                     op.active().text(),
+                     TQt::white,
+                     op.active().base(),//                   TQColor(236,182,120),
+                     TQBrush(backCol, background)
+                     );
+    active.setColor( TQColorGroup::ButtonText,  TQt::white  );
+    active.setColor( TQColorGroup::Shadow,  TQt::black  );
+    TQColorGroup disabled (op.disabled().foreground(),
+                     TQBrush(op.disabled().button(),button),
+                     TQBrush(op.disabled().light(), light),
+                     op.disabled().dark(),
+                     TQBrush(op.disabled().mid(), mid),
+                     op.disabled().text(),
+                     TQt::white,
+                     op.disabled().base(),//                 TQColor(236,182,120),
+                     TQBrush(backCol, background)
+                     );
+
+    TQPalette newPalette( active, disabled, active );
+    app->setPalette( newPalette, TRUE );
+}
+
+/*!
+  Reimplementation from TQStyle
+ */
+void MetalStyle::unPolish( TQApplication *app)
+{
+    app->setPalette(oldPalette, TRUE);
+    app->setFont( app->font(), TRUE );
+}
+
+/*!
+  Reimplementation from TQStyle
+ */
+void MetalStyle::polish( TQWidget* w)
+{
+
+   // the polish function sets some widgets to transparent mode and
+    // some to translate background mode in order to get the full
+    // benefit from the nice pixmaps in the color group.
+
+    if (w->inherits("TQPushButton")){
+        w->setBackgroundMode( TQWidget::NoBackground );
+        return;
+    }
+
+    if ( !w->isTopLevel() ) {
+        if ( w->backgroundPixmap() )
+            w->setBackgroundOrigin( TQWidget::WindowOrigin );
+    }
+}
+
+void MetalStyle::unPolish( TQWidget* w)
+{
+
+   // the polish function sets some widgets to transparent mode and
+    // some to translate background mode in order to get the full
+    // benefit from the nice pixmaps in the color group.
+
+    if (w->inherits("TQPushButton")){
+        w->setBackgroundMode( TQWidget::PaletteButton );
+        return;
+    }
+    if ( !w->isTopLevel() ) {
+        if ( w->backgroundPixmap() )
+            w->setBackgroundOrigin( TQWidget::WidgetOrigin );
+    }
+
+}
+
+void MetalStyle::drawPrimitive( PrimitiveElement pe,
+                                TQPainter *p,
+                                const TQRect &r,
+                                const TQColorGroup &cg,
+                                SFlags flags, const TQStyleOption& opt ) const
+{
+    switch( pe ) {
+    case PE_HeaderSection:
+        if ( flags & Style_Sunken )
+            flags ^= Style_Sunken | Style_Raised;
+        // fall through
+    case PE_ButtonBevel:
+    case PE_ButtonCommand:
+            drawMetalButton( p, r.x(), r.y(), r.width(), r.height(),
+                             (flags & (Style_Sunken|Style_On|Style_Down)),
+                             TRUE, !(flags & Style_Raised) );
+            break;
+    case PE_PanelMenuBar:
+        drawMetalFrame( p, r.x(), r.y(), r.width(), r.height() );
+        break;
+    case PE_ScrollBarAddLine:
+        drawMetalButton( p, r.x(), r.y(), r.width(), r.height(),
+                         flags & Style_Down, !( flags & Style_Horizontal ) );
+        drawPrimitive( (flags & Style_Horizontal) ? PE_ArrowRight :PE_ArrowDown,
+                       p, r, cg, flags, opt );
+        break;
+    case PE_ScrollBarSubLine:
+        drawMetalButton( p, r.x(), r.y(), r.width(), r.height(),
+                         flags & Style_Down, !( flags & Style_Horizontal ) );
+        drawPrimitive( (flags & Style_Horizontal) ? PE_ArrowLeft : PE_ArrowUp,
+                       p, r, cg, flags, opt );
+        break;
+
+
+    case PE_ScrollBarSlider:
+        drawMetalButton( p, r.x(), r.y(), r.width(), r.height(), FALSE,
+                         flags & Style_Horizontal );
+        break;
+    default:
+        TQWindowsStyle::drawPrimitive( pe, p, r, cg, flags, opt );
+        break;
+    }
+}
+
+void MetalStyle::drawControl( ControlElement element,
+                              TQPainter *p,
+                              const TQWidget *widget,
+                              const TQRect &r,
+                              const TQColorGroup &cg,
+                              SFlags how,
+                              const TQStyleOption& opt ) const
+{
+    switch( element ) {
+    case CE_PushButton:
+        {
+            const TQPushButton *btn;
+            btn = (const TQPushButton*)widget;
+            int x1, y1, x2, y2;
+
+            r.coords( &x1, &y1, &x2, &y2 );
+
+            p->setPen( cg.foreground() );
+            p->setBrush( TQBrush(cg.button(), NoBrush) );
+
+
+            TQBrush fill;
+            if ( btn->isDown() )
+                fill = cg.brush( TQColorGroup::Mid );
+            else if ( btn->isOn() )
+                fill = TQBrush( cg.mid(), Dense4Pattern );
+            else
+                fill = cg.brush( TQColorGroup::Button );
+
+            if ( btn->isDefault() ) {
+                TQPointArray a;
+                a.setPoints( 9,
+                             x1, y1, x2, y1, x2, y2, x1, y2, x1, y1+1,
+                             x2-1, y1+1, x2-1, y2-1, x1+1, y2-1, x1+1, y1+1 );
+                p->setPen( TQt::black );
+                p->drawPolyline( a );
+                x1 += 2;
+                y1 += 2;
+                x2 -= 2;
+                y2 -= 2;
+            }
+            SFlags flags = Style_Default;
+            if ( btn->isOn() )
+                flags |= Style_On;
+            if ( btn->isDown() )
+                flags |= Style_Down;
+            if ( !btn->isFlat() && !btn->isDown() )
+                flags |= Style_Raised;
+            drawPrimitive( PE_ButtonCommand, p,
+                           TQRect( x1, y1, x2 - x1 + 1, y2 - y1 + 1),
+                           cg, flags, opt );
+
+            if ( btn->isMenuButton() ) {
+                flags = Style_Default;
+                if ( btn->isEnabled() )
+                    flags |= Style_Enabled;
+
+                int dx = ( y1 - y2 - 4 ) / 3;
+                drawPrimitive( PE_ArrowDown, p,
+                               TQRect(x2 - dx, dx, y1, y2 - y1),
+                               cg, flags, opt );
+            }
+            if ( p->brush().style() != NoBrush )
+                p->setBrush( NoBrush );
+            break;
+        }
+    case CE_PushButtonLabel:
+        {
+            const TQPushButton *btn;
+            btn = (const TQPushButton*)widget;
+            int x, y, w, h;
+            r.rect( &x, &y, &w, &h );
+
+            int x1, y1, x2, y2;
+            r.coords( &x1, &y1, &x2, &y2 );
+            int dx = 0;
+            int dy = 0;
+            if ( btn->isMenuButton() )
+                dx = ( y2 - y1 ) / 3;
+            if ( btn->isOn() || btn->isDown() ) {
+                dx--;
+                dy--;
+            }
+            if ( dx || dy )
+                p->translate( dx, dy );
+            x += 2;
+            y += 2;
+            w -= 4;
+            h -= 4;
+            drawItem( p, TQRect( x, y, w, h ),
+                      AlignCenter|ShowPrefix,
+                      cg, btn->isEnabled(),
+                      btn->pixmap(), btn->text(), -1,
+                      (btn->isDown() || btn->isOn())? &cg.brightText() : &cg.buttonText() );
+            if ( dx || dy )
+                p->translate( -dx, -dy );
+            break;
+        }
+    default:
+        TQWindowsStyle::drawControl( element, p, widget, r, cg, how, opt );
+        break;
+    }
+}
+void MetalStyle::drawComplexControl( ComplexControl cc,
+                                     TQPainter *p,
+                                     const TQWidget *widget,
+                                     const TQRect &r,
+                                     const TQColorGroup &cg,
+                                     SFlags how,
+                                     SCFlags sub,
+                                     SCFlags subActive,
+                                     const TQStyleOption& opt ) const
+{
+    switch ( cc ) {
+    case CC_Slider:
+        {
+            const TQSlider *slider = ( const TQSlider* ) widget;
+            TQRect handle = querySubControlMetrics( CC_Slider, widget,
+                                                   SC_SliderHandle, opt);
+            if ( sub & SC_SliderGroove )
+                TQWindowsStyle::drawComplexControl( cc, p, widget, r, cg, how,
+                                                   SC_SliderGroove, subActive, opt );
+            if ( (sub & SC_SliderHandle) && handle.isValid() )
+                drawMetalButton( p, handle.x(), handle.y(), handle.width(),
+                                 handle.height(), FALSE,
+                                 slider->orientation() == TQSlider::Horizontal);
+            break;
+        }
+    case CC_ComboBox:
+        {
+            // not exactly correct...
+            const TQComboBox *cmb = ( const TQComboBox* ) widget;
+
+            qDrawWinPanel( p, r.x(), r.y(), r.width(), r.height(), cg, TRUE,
+                           cmb->isEnabled() ? &cg.brush( TQColorGroup::Base ) :
+                                              &cg.brush( TQColorGroup::Background ) );
+            drawMetalButton( p, r.x() + r.width() - 2 - 16, r.y() + 2, 16, r.height() - 4,
+                             how & Style_Sunken, TRUE );
+            drawPrimitive( PE_ArrowDown, p,
+                           TQRect( r.x() + r.width() - 2 - 16 + 2,
+                                  r.y() + 2 + 2, 16 - 4, r.height() - 4 -4 ),
+                           cg,
+                           cmb->isEnabled() ? Style_Enabled : Style_Default,
+                           opt );
+            break;
+        }
+    default:
+        TQWindowsStyle::drawComplexControl( cc, p, widget, r, cg, how, sub, subActive,
+                                           opt );
+        break;
+    }
+}
+
+
+/*!
+  Draw a metallic button, sunken if \a sunken is TRUE, horizontal if
+  /a horz is TRUE.
+*/
+
+void MetalStyle::drawMetalButton( TQPainter *p, int x, int y, int w, int h,
+                                  bool sunken, bool horz, bool flat  ) const
+{
+
+    drawMetalFrame( p, x, y, w, h );
+    drawMetalGradient( p, x, y, w, h, sunken, horz, flat );
+}
+
+
+
+
+void MetalStyle::drawMetalFrame( TQPainter *p, int x, int y, int w, int h ) const
+{
+    TQColor top1("#878769691515");
+    TQColor top2("#C6C6B4B44949");
+
+    TQColor bot2("#70705B5B1414");
+    TQColor bot1("#56564A4A0E0E"); //first from the bottom
+
+
+    int x2 = x + w - 1;
+    int y2 = y + h - 1;
+
+    //frame:
+
+    p->setPen( top1 );
+    p->drawLine( x, y2, x, y );
+    p->drawLine( x, y, x2-1, y );
+    p->setPen( top2 );
+    p->drawLine( x+1, y2 -1, x+1, y+1 );
+    p->drawLine( x+1, y+1 , x2-2, y+1 );
+
+    p->setPen( bot1 );
+    p->drawLine( x+1, y2, x2, y2 );
+    p->drawLine( x2, y2, x2, y );
+    p->setPen( bot2 );
+    p->drawLine( x+1, y2-1, x2-1, y2-1 );
+    p->drawLine( x2-1, y2-1, x2-1, y+1 );
+
+
+}
+
+
+void MetalStyle::drawMetalGradient( TQPainter *p, int x, int y, int w, int h,
+                                    bool sunken, bool horz, bool flat  ) const
+
+{
+    TQColor highlight("#E8E8DDDD6565");
+    TQColor subh1("#CECEBDBD5151");
+    TQColor subh2("#BFBFACAC4545");
+
+    TQColor topgrad("#B9B9A5A54040");
+    TQColor botgrad("#89896C6C1A1A");
+
+
+
+    if ( flat && !sunken ) {
+            p->fillRect( x + 2, y + 2, w - 4,h -4, topgrad );
+    } else {
+        // highlight:
+        int i = 0;
+        int x1 = x + 2;
+        int y1 = y + 2;
+        int x2 = x + w - 1;
+        int y2 = y + h - 1;
+        if ( horz )
+            x2 = x2 - 2;
+        else
+            y2 = y2 - 2;
+
+#define DRAWLINE if (horz) \
+                    p->drawLine( x1, y1+i, x2, y1+i ); \
+                 else \
+                    p->drawLine( x1+i, y1, x1+i, y2 ); \
+                 i++;
+
+        if ( !sunken ) {
+            p->setPen( highlight );
+            DRAWLINE;
+            DRAWLINE;
+            p->setPen( subh1 );
+            DRAWLINE;
+            p->setPen( subh2 );
+            DRAWLINE;
+        }
+        // gradient:
+        int ng = (horz ? h : w) - 8; // how many lines for the gradient?
+
+        int h1, h2, s1, s2, v1, v2;
+        if ( !sunken ) {
+            topgrad.hsv( &h1, &s1, &v1 );
+            botgrad.hsv( &h2, &s2, &v2 );
+        } else {
+            botgrad.hsv( &h1, &s1, &v1 );
+            topgrad.hsv( &h2, &s2, &v2 );
+        }
+
+        if ( ng > 1 ) {
+            for ( int j =0; j < ng; j++ ) {
+                p->setPen( TQColor( h1 + ((h2-h1)*j)/(ng-1),
+                                   s1 + ((s2-s1)*j)/(ng-1),
+                                   v1 + ((v2-v1)*j)/(ng-1),  TQColor::Hsv ) );
+                DRAWLINE;
+            }
+        } else if ( ng == 1 ) {
+            p->setPen( TQColor((h1+h2)/2, (s1+s2)/2, (v1+v2)/2, TQColor::Hsv) );
+            DRAWLINE;
+        }
+        if ( sunken ) {
+            p->setPen( subh2 );
+            DRAWLINE;
+
+            p->setPen( subh1 );
+            DRAWLINE;
+
+            p->setPen( highlight );
+            DRAWLINE;
+            DRAWLINE;
+        }
+    }
+}
+
+
+
+int MetalStyle::pixelMetric( PixelMetric metric, const TQWidget *w ) const
+{
+    switch ( metric ) {
+    case PM_MenuBarFrameWidth:
+        return 2;
+    default:
+        return TQWindowsStyle::pixelMetric( metric, w );
+    }
+}
+
+#endif
+
+ +


+

Header file of the example: +

/****************************************************************************
+** $Id: qt/themes.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef THEMES_H
+#define THEMES_H
+
+#include <qmainwindow.h>
+#include <qfont.h>
+
+class TQTabWidget;
+
+class Themes: public TQMainWindow
+{
+    Q_OBJECT
+
+public:
+    Themes( TQWidget *parent = 0, const char *name = 0, WFlags f = WType_TopLevel );
+
+protected:
+    TQTabWidget *tabwidget;
+
+protected slots:
+    void makeStyle(const TQString &);
+    void about();
+    void aboutTQt();
+
+private:
+    TQFont appFont;
+};
+
+
+#endif
+
+ +


+

Implementation of the example: +

/****************************************************************************
+** $Id: qt/themes.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "themes.h"
+#include "wood.h"
+#include "metal.h"
+
+#include "../buttongroups/buttongroups.h"
+#include "../lineedits/lineedits.h"
+#include "../listboxcombo/listboxcombo.h"
+#include "../checklists/checklists.h"
+#include "../progressbar/progressbar.h"
+#include "../rangecontrols/rangecontrols.h"
+#include "../richtext/richtext.h"
+
+#include <qtabwidget.h>
+#include <qapplication.h>
+#include <qpopupmenu.h>
+#include <qmenubar.h>
+#include <qmessagebox.h>
+#include <qfont.h>
+#include <qstylefactory.h>
+#include <qaction.h>
+#include <qsignalmapper.h>
+#include <qdict.h>
+
+Themes::Themes( TQWidget *parent, const char *name, WFlags f )
+    : TQMainWindow( parent, name, f )
+{
+    appFont = TQApplication::font();
+    tabwidget = new TQTabWidget( this );
+
+    tabwidget->addTab( new ButtonsGroups( tabwidget ), "Buttons/Groups" );
+    TQHBox *hbox = new TQHBox( tabwidget );
+    hbox->setMargin( 5 );
+    (void)new LineEdits( hbox );
+    (void)new ProgressBar( hbox );
+    tabwidget->addTab( hbox, "Lineedits/Progressbar" );
+    tabwidget->addTab( new ListBoxCombo( tabwidget ), "Listboxes/Comboboxes" );
+    tabwidget->addTab( new CheckLists( tabwidget ), "Listviews" );
+    tabwidget->addTab( new RangeControls( tabwidget ), "Rangecontrols" );
+    tabwidget->addTab( new MyRichText( tabwidget ), "Fortune" );
+
+    setCentralWidget( tabwidget );
+
+    TQPopupMenu *style = new TQPopupMenu( this );
+    style->setCheckable( TRUE );
+    menuBar()->insertItem( "&Style" , style );
+
+    style->setCheckable( TRUE );
+    TQActionGroup *ag = new TQActionGroup( this, 0 );
+    ag->setExclusive( TRUE );
+    TQSignalMapper *styleMapper = new TQSignalMapper( this );
+    connect( styleMapper, SIGNAL( mapped( const TQString& ) ), this, SLOT( makeStyle( const TQString& ) ) );
+    TQStringList list = TQStyleFactory::keys();
+    list.sort();
+#ifndef QT_NO_STYLE_WINDOWS
+    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 ) {
+        TQString styleStr = *it;
+        TQString styleAccel = styleStr;
+        if ( stylesDict[styleAccel.left(1)] ) {
+            for ( uint i = 0; i < styleAccel.length(); i++ ) {
+                if ( !stylesDict[styleAccel.mid( i, 1 )] ) {
+                    stylesDict.insert(styleAccel.mid( i, 1 ), (const int *)1);
+                    styleAccel = styleAccel.insert( i, '&' );
+                    break;
+                }
+            }
+        } else {
+            stylesDict.insert(styleAccel.left(1), (const int *)1);
+            styleAccel = "&"+styleAccel;
+        }
+        TQAction *a = new TQAction( styleStr, TQIconSet(), styleAccel, 0, ag, 0, ag->isExclusive() );
+        connect( a, SIGNAL( activated() ), styleMapper, SLOT(map()) );
+        styleMapper->setMapping( a, a->text() );
+    }
+    ag->addTo(style);
+    style->insertSeparator();
+    style->insertItem("&Quit", qApp, SLOT( tquit() ), CTRL | Key_Q );
+
+    TQPopupMenu * help = new TQPopupMenu( this );
+    menuBar()->insertSeparator();
+    menuBar()->insertItem( "&Help", help );
+    help->insertItem( "&About", this, SLOT(about()), Key_F1);
+    help->insertItem( "About &TQt", this, SLOT(aboutTQt()));
+
+#ifndef QT_NO_STYLE_WINDOWS
+    qApp->setStyle( new NorwegianWoodStyle );
+#endif
+}
+
+void Themes::makeStyle(const TQString &style)
+{
+    if(style == "Norwegian Wood") {
+#ifndef QT_NO_STYLE_WINDOWS
+        qApp->setStyle( new NorwegianWoodStyle );
+#endif
+    } else if( style == "Metal" ) {
+#ifndef QT_NO_STYLE_WINDOWS
+        qApp->setStyle( new MetalStyle );
+#endif
+    } else {
+        qApp->setStyle(style);
+        if(style == "Platinum") {
+            TQPalette p( TQColor( 239, 239, 239 ) );
+            qApp->setPalette( p, TRUE );
+            qApp->setFont( appFont, TRUE );
+        } else if(style == "Windows") {
+            qApp->setFont( appFont, TRUE );
+        } else if(style == "CDE") {
+            TQPalette p( TQColor( 75, 123, 130 ) );
+            p.setColor( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) );
+            p.setColor( TQPalette::Inactive, TQColorGroup::Base, TQColor( 55, 77, 78 ) );
+            p.setColor( TQPalette::Disabled, TQColorGroup::Base, TQColor( 55, 77, 78 ) );
+            p.setColor( TQPalette::Active, TQColorGroup::Highlight, TQt::white );
+            p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) );
+            p.setColor( TQPalette::Inactive, TQColorGroup::Highlight, TQt::white );
+            p.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) );
+            p.setColor( TQPalette::Disabled, TQColorGroup::Highlight, TQt::white );
+            p.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) );
+            p.setColor( TQPalette::Active, TQColorGroup::Foreground, TQt::white );
+            p.setColor( TQPalette::Active, TQColorGroup::Text, TQt::white );
+            p.setColor( TQPalette::Active, TQColorGroup::ButtonText, TQt::white );
+            p.setColor( TQPalette::Inactive, TQColorGroup::Foreground, TQt::white );
+            p.setColor( TQPalette::Inactive, TQColorGroup::Text, TQt::white );
+            p.setColor( TQPalette::Inactive, TQColorGroup::ButtonText, TQt::white );
+            p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray );
+            p.setColor( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray );
+            p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray );
+            qApp->setPalette( p, TRUE );
+            qApp->setFont( TQFont( "times", appFont.pointSize() ), TRUE );
+        } else if(style == "Motif" || style == "MotifPlus") {
+            TQPalette p( TQColor( 192, 192, 192 ) );
+            qApp->setPalette( p, TRUE );
+            qApp->setFont( appFont, TRUE );
+        }
+    }
+}
+
+void Themes::about()
+{
+    TQMessageBox::about( this, "TQt Themes Example",
+                        "<p>This example demonstrates the concept of "
+                        "<b>generalized GUI styles </b> first introduced "
+                        " with the 2.0 release of TQt.</p>" );
+}
+
+
+void Themes::aboutTQt()
+{
+    TQMessageBox::aboutTQt( this, "TQt Themes Example" );
+}
+
+
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <qwindowsstyle.h>
+#include "themes.h"
+
+#include "metal.h"
+
+int main( int argc, char ** argv )
+{
+    TQApplication::setColorSpec( TQApplication::ManyColor );
+    TQApplication a( argc, argv );
+
+    Themes themes;
+    themes.setCaption( "TQt Example - Themes (TQStyle)" );
+    themes.resize( 640, 400 );
+    a.setMainWidget( &themes );
+    themes.show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/thread.html b/doc/html/thread.html new file mode 100644 index 00000000..43abe35e --- /dev/null +++ b/doc/html/thread.html @@ -0,0 +1,52 @@ + + + + + +Threading + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Threading

+ + +

These classes are relevant to threaded applications. + +

+
TQMutexAccess serialization between threads +
TQMutexLockerSimplifies locking and unlocking TQMutexes +
TQSemaphoreRobust integer semaphore +
TQThreadPlatform-independent threads +
TQThreadStoragePer-thread data storage +
TQWaitConditionAllows waiting/waking for conditions between threads +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/threads.html b/doc/html/threads.html new file mode 100644 index 00000000..5d5d1e7e --- /dev/null +++ b/doc/html/threads.html @@ -0,0 +1,340 @@ + + + + + +Thread Support in TQt + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Thread Support in TQt

+ + +

+

+ + +

Introduction +

+

TQt provides thread support in the form of basic platform-independent +threading classes, a thread-safe way of posting events, and a global +TQt library lock that allows you to call TQt methods from different +threads. +

This document is intended for an audience that has knowledge of, and +experience with, multithreaded applications. If you are new to +threading see our Recommended Reading list. +

Enabling Thread Support +

+

When TQt is installed on Windows, thread support is an option on some +compilers. +

On Mac OS X and Unix, thread support is enabled by adding the +-thread option when running the configure script. On Unix +platforms where multithreaded programs must be linked in special ways, +such as with a special libc, installation will create a separate +library, libtqt-mt and hence threaded programs must be linked +against this library (with -ltqt-mt) rather than the standard TQt +library. +

On both platforms, you should compile with the macro QT_THREAD_SUPPORT defined (e.g. compile with +-DQT_THREAD_SUPPORT). On Windows, this is usually done by an +entry in qconfig.h. +

The Thread Classes +

+

These classes are built into the TQt library when thread support is enabled: +

    +
  • TQThread - Provides the means to start a new thread, which begins +execution in your reimplementation of TQThread::run(). This is similar +to the Java thread class. +

  • TQThreadStorage - Provides per-thread data storage. This class can +only be used with threads started with TQThread; it cannot be used with +threads started with platform-specific APIs. +

  • TQMutex - Provides a mutual exclusion lock (also know as a mutex). +
  • TQMutexLocker - A convenience class which automatically locks and +unlocks a TQMutex. TQMutexLocker is useful in complicated code, or in +code which uses exceptions. See the documentation for more details. +
  • TQWaitCondition - Provides a way for threads to go to sleep until +woken up by another thread. +
  • TQSemaphore - Provides a simple integer semaphore. +
+

Important Definitions +

+

+ +

When using TQt in a multithreaded program, it is important to +understand the definition of the terms reentrant and thread-safe: +

    +
  • reentrant - Describes a function which can be called +simultaneously by multiple threads when each invocation of the +function references unique data. Calling a reentrant function +simultaneously with the same data is not safe, and such invocations +should be serialized. +
  • thread-safe - Describes a function which can be called +simultaneously by multiple threads when each invocation references +shared data. Calling a thread-safe function simultaneously with the +same data is safe, since all access to the shared data are serialized. +
+

Note that TQt provides both implictly and explicitly shared +classes. For more information, see the Threads and Shared Data +section. +

Most C++ member functions are inherently reentrant, since they only +reference class member data. Any thread can call such a member +function on an instance, as long as no other thread is calling a +member function on the same instance. For example, given the class Number below: +

+    class Number
+    {
+    public:
+        inline Number( int n ) : num( n ) { }
+
+        inline int number() const { return num; }
+        inline void setNumber( int n ) { num = n; }
+
+    private:
+        int num;
+    };
+
+ +

The methods Number::number() and Number::setNumber() are +reentrant, since they only reference unique data. Only one thread at +a time can call member functions on each instance of Number. +However, multiple threads can call member functions on separate +instances of Number. +

Thread-safe functions usually use a mutex (e.g a TQMutex) to serialize +access to shared data. Because of this, thread-safe functions are +usually slower than reentrant functions, because of the extra overhead +of locking and unlocking the mutex. For example, given the class Counter below: +

+    class Counter
+    {
+    public:
+        inline Counter()  { ++instances; }
+        inline ~Counter() { --instances; }
+
+    private:
+        static int instances;
+    };
+
+ +

Since the modifications of the static instances integer are not +serialized, this class is not thread-safe. So make it threadsafe, a +mutex must be used: +

+    class Counter
+    {
+    public:
+        inline Counter()
+        {
+            mutex.lock();
+            ++instances;
+            mutex.unlock();
+        }
+
+        ...
+    private:
+        static TQMutex mutex;
+        static int instances;
+    };
+
+ +

Thread-safe Event Posting +

+

In TQt, one thread is always the GUI or event thread. This is the +thread that creates a TQApplication object and calls +TQApplication::exec(). This is also the initial thread that calls +main() at program start. This thread is the only thread that is +allowed to perform GUI operations, including generating and receiving +events from the window system. TQt does not support creating +TQApplication and running the event loop (with TQApplication::exec()) in +a secondary thread. You must create the TQApplication object and call +TQApplication::exec() from the main() function in your program. +

Threads that wish to display data in a widget cannot modify the widget +directly, so they must post an event to the widget using +TQApplication::postEvent(). The event will be delivered later on by +the GUI thread. +

Normally, the programmer would like to include some information in the +event sent to the widget. See the documentation for TQCustomEvent for +more information on user-defined events. +

Threads and TQObject subclasses +

+

The TQObject class itself is reentrant. However, certain rules +apply when creating and using TQObjects in a thread that is not the GUI +thread. +

    +

  1. None of the TQObject based classes included in the TQt library are +reentrant. This includes all widgets (e.g. TQWidget and +subclasses), OS kernel classes (e.g. TQProcess, TQAccel, TQTimer), and +all networking classes (e.g. TQSocket, TQDns). +

  2. TQObject and all of its subclasses are not thread-safe. This +includes the entire event delivery system. It is important to +remember that the GUI thread may be delivering events to your TQObject +subclass while you are accessing the object from another thread. If +you are using TQObject in a thread that is not the GUI thread, and you +are handling events sent to this object, you must protect all +access to your data with a mutex; otherwise you may experience crashes +or other undesired behavior. +

  3. As a corollary to the above, deleting a TQObject while pending +events are waiting to be delivered can cause a crash. You must not +delete the TQObject directly from a thread that is not the GUI thread. +Use the TQObject::deleteLater() method instead, which will cause the +event loop to delete the object after all pending events have been +delivered to the object. +

+

The TQt Library Mutex +

+

TQApplication includes a mutex that is used to protect access to window +system functions. This mutex is locked while the event loop is +running (e.g. during event delivery) and unlocked when the eventloop +goes to sleep. Note: The TQt event loop is recursive, and the library +mutex is not unlocked when re-entering the event loop (e.g. when +executing a modal dialog with TQDialog::exec()). +

If another thread locks the TQt library mutex, then the event loop will +stop processing events, and the locking thread may do simple GUI +operations. Operations such as creating a TQPainter and drawing a line +are examples of simple GUI operations: +

+    ...
+    qApp->lock();
+
+    TQPainter p;
+    p.begin( mywidget );
+    p.setPen( TQColor( "red" ) );
+    p.drawLine( 0,0,100,100 );
+    p.end();
+
+    qApp->unlock();
+    ...
+
+ +

Any operations that generate events must not be called by any thread +other than the GUI thread. Examples of such operations are: +

    +
  • creating a TQWidget, TQTimer, TQSocketNotifier, TQSocket or other network class. +
  • moving, resizing, showing or hiding a TQWidget. +
  • starting or stoping a TQTimer. +
  • enabling or disabling a TQSocketNotifier. +
  • using a TQSocket or other network class. +
+

Events generated by these operations will be lost on some platforms. +

Threads and Signals and Slots +

+

The Signals and Slots mechanism can be used in separate threads, as +long as the rules for TQObject based classes are followed. The Signals +and Slots mechanism is synchronous: when a signal is emitted, all +slots are called immediately. The slots are executed in the thread +context that emitted the signal. +

Warning: Slots that generate window system events or use window system +functions must not be connected to a signal that is emitted from +a thread that is not the GUI thread. See the TQt Library Mutex section +above for more details. +

+

Threads and Shared Data +

+

TQt provides many implicitly shared and explicitly shared classes. In +a multithreaded program, multiple instances of a shared class can +reference shared data, which is dangerous if one or more threads +attempt to modify the data. TQt provides the TQDeepCopy class, which +ensures that shared classes reference unique data. +

See the description of implicit sharing for more +information. +

+

Threads and the SQL Module +

+

A connection can only be used from within the thread that created it. +Moving connections between threads or creating queries from a different +thread is not supported. +

In addition, the third party libraries used by the TQSqlDrivers can impose +further restrictions on using the SQL Module in a multithreaded program. +Consult the manual of your database client for more information. +

Caveats +

+

Some things to watch out for when programming with threads: +

    +

  • As mentioned above, TQObject based classes are neither thread-safe +nor reentrant. This includes all widgets (e.g. TQWidget and +subclasses), OS kernel classes (e.g. TQProcess, TQAccel), and all +networking classes (e.g. TQSocket, TQDns). +

  • Deleting a TQObject while pending events are waiting to be delivered +will cause a crash. If you are creating TQObjects in a thread that is +not the GUI thread and posting events to these objects, you should not +delete the TQObject directly. Use the TQObject::deleteLater() method +instead, which will cause the event loop to delete the object after +all pending events have been delivered to the object. +

  • Don't do any blocking operations while holding the TQt library +mutex. This will freeze up the event loop. +

  • Make sure you unlock a recursive TQMutex as many times as you lock +it, no more and no less. +

  • Don't mix the normal TQt library and the threaded TQt library in your +application. This means that if your application uses the threaded TQt +library, you should not link with the normal TQt library, dynamically +load the normal TQt library or dynamically load another library or +plugin that depends on the normal TQt library. On some systems, doing +this can corrupt the static data used in the TQt library. +

  • TQt does not support creating TQApplication and running the event +loop (with TQApplication::exec()) in a secondary thread. You must +create the TQApplication object and call TQApplication::exec() from the +main() function in your program. +

+

+

Recommended Reading +

+

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tictac-example.html b/doc/html/tictac-example.html new file mode 100644 index 00000000..32dde137 --- /dev/null +++ b/doc/html/tictac-example.html @@ -0,0 +1,577 @@ + + + + + +Tic Tac Toe + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Tic Tac Toe

+ + +

+This is an implementation of the Tic-tac-toe game. +

We didn't put much effort in making a clever algorithm so it's not a +challenge to play against the computer. Instead, study the source code +to see how you can make reusable components such as the TicTacGameBoard +widget. +


+

Header file: +

/****************************************************************************
+** $Id: qt/tictac.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef TICTAC_H
+#define TICTAC_H
+
+
+#include <qpushbutton.h>
+#include <qptrvector.h>
+
+class TQComboBox;
+class TQLabel;
+
+
+// --------------------------------------------------------------------------
+// TicTacButton implements a single tic-tac-toe button
+//
+
+class TicTacButton : public TQPushButton
+{
+    Q_OBJECT
+public:
+    TicTacButton( TQWidget *parent );
+    enum Type { Blank, Circle, Cross };
+    Type        type() const            { return t; }
+    void        setType( Type type )    { t = type; repaint(); }
+    TQSizePolicy sizePolicy() const
+    { return TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ); }
+    TQSize sizeHint() const { return TQSize( 32, 32 ); }
+    TQSize minimumSizeHint() const { return TQSize( 10, 10 ); }
+protected:
+    void        drawButtonLabel( TQPainter * );
+private:
+    Type t;
+};
+
+// Using template vector to make vector-class of TicTacButton.
+// This vector is used by the TicTacGameBoard class defined below.
+
+typedef TQPtrVector<TicTacButton>        TicTacButtons;
+typedef TQMemArray<int>          TicTacArray;
+
+
+// --------------------------------------------------------------------------
+// TicTacGameBoard implements the tic-tac-toe game board.
+// TicTacGameBoard is a composite widget that contains N x N TicTacButtons.
+// N is specified in the constructor.
+//
+
+class TicTacGameBoard : public TQWidget
+{
+    Q_OBJECT
+public:
+    TicTacGameBoard( int n, TQWidget *parent=0, const char *name=0 );
+   ~TicTacGameBoard();
+    enum        State { Init, HumansTurn, HumanWon, ComputerWon, NobodyWon };
+    State       state() const           { return st; }
+    void        computerStarts( bool v );
+    void        newGame();
+signals:
+    void        finished();                     // game finished
+private slots:
+    void        buttonClicked();
+private:
+    void        setState( State state ) { st = state; }
+    void        updateButtons();
+    int checkBoard( TicTacArray * );
+    void        computerMove();
+    State       st;
+    int         nBoard;
+    bool        comp_starts;
+    TicTacArray *btArray;
+    TicTacButtons *buttons;
+};
+
+
+// --------------------------------------------------------------------------
+// TicTacToe implements the complete game.
+// TicTacToe is a composite widget that contains a TicTacGameBoard and
+// two push buttons for starting the game and tquitting.
+//
+
+class TicTacToe : public TQWidget
+{
+    Q_OBJECT
+public:
+    TicTacToe( int boardSize=3, TQWidget *parent=0, const char *name=0 );
+private slots:
+    void        newGameClicked();
+    void        gameOver();
+private:
+    void        newState();
+    TQComboBox   *whoStarts;
+    TQPushButton *newGame;
+    TQPushButton *tquit;
+    TQLabel      *message;
+    TicTacGameBoard *board;
+};
+
+
+#endif // TICTAC_H
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/tictac.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "tictac.h"
+#include <qapplication.h>
+#include <qpainter.h>
+#include <qdrawutil.h>
+#include <qcombobox.h>
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <stdlib.h>                             // rand() function
+#include <qdatetime.h>                          // seed for rand()
+
+
+//***************************************************************************
+//* TicTacButton member functions
+//***************************************************************************
+
+// --------------------------------------------------------------------------
+// Creates a TicTacButton
+//
+
+TicTacButton::TicTacButton( TQWidget *parent ) : TQPushButton( parent )
+{
+    t = Blank;                                  // initial type
+}
+
+// --------------------------------------------------------------------------
+// Paints TicTacButton
+//
+
+void TicTacButton::drawButtonLabel( TQPainter *p )
+{
+    TQRect r = rect();
+    p->setPen( TQPen( white,2 ) );               // set fat pen
+    if ( t == Circle ) {
+        p->drawEllipse( r.left()+4, r.top()+4, r.width()-8, r.height()-8 );
+    } else if ( t == Cross ) {                  // draw cross
+        p->drawLine( r.topLeft()   +TQPoint(4,4), r.bottomRight()-TQPoint(4,4));
+        p->drawLine( r.bottomLeft()+TQPoint(4,-4),r.topRight()   -TQPoint(4,-4));
+    }
+}
+
+
+//***************************************************************************
+//* TicTacGameBoard member functions
+//***************************************************************************
+
+// --------------------------------------------------------------------------
+// Creates a game board with N x N buttons and connects the "clicked()"
+// signal of all buttons to the "buttonClicked()" slot.
+//
+
+TicTacGameBoard::TicTacGameBoard( int n, TQWidget *parent, const char *name )
+    : TQWidget( parent, name )
+{
+    st = Init;                                  // initial state
+    nBoard = n;
+    n *= n;                                     // make square
+    comp_starts = FALSE;                        // human starts
+    buttons = new TicTacButtons(n);             // create real buttons
+    btArray = new TicTacArray(n);               // create button model
+    TQGridLayout * grid = new TQGridLayout( this, nBoard, nBoard, 4 );
+    TQPalette p( blue );
+    for ( int i=0; i<n; i++ ) {                 // create and connect buttons
+        TicTacButton *ttb = new TicTacButton( this );
+        ttb->setPalette( p );
+        ttb->setEnabled( FALSE );
+        connect( ttb, SIGNAL(clicked()), SLOT(buttonClicked()) );
+        grid->addWidget( ttb, i%nBoard, i/nBoard );
+        buttons->insert( i, ttb );
+        btArray->at(i) = TicTacButton::Blank;   // initial button type
+    }
+    TQTime t = TQTime::currentTime();             // set random seed
+    srand( t.hour()*12+t.minute()*60+t.second()*60 );
+}
+
+TicTacGameBoard::~TicTacGameBoard()
+{
+    delete buttons;
+    delete btArray;
+}
+
+
+// --------------------------------------------------------------------------
+// TicTacGameBoard::computerStarts( bool v )
+//
+// Computer starts if v=TRUE. The human starts by default.
+//
+
+void TicTacGameBoard::computerStarts( bool v )
+{
+    comp_starts = v;
+}
+
+
+// --------------------------------------------------------------------------
+// TicTacGameBoard::newGame()
+//
+// Clears the game board and prepares for a new game
+//
+
+void TicTacGameBoard::newGame()
+{
+    st = HumansTurn;
+    for ( int i=0; i<nBoard*nBoard; i++ )
+        btArray->at(i) = TicTacButton::Blank;
+    if ( comp_starts )
+        computerMove();
+    else
+        updateButtons();
+}
+
+
+// --------------------------------------------------------------------------
+// TicTacGameBoard::buttonClicked()             - SLOT
+//
+// This slot is activated when a TicTacButton emits the signal "clicked()",
+// i.e. the user has clicked on a TicTacButton.
+//
+
+void TicTacGameBoard::buttonClicked()
+{
+    if ( st != HumansTurn )                     // not ready
+        return;
+    int i = buttons->findRef( (TicTacButton*)sender() );
+    TicTacButton *b = buttons->at(i);           // get piece that was pressed
+    if ( b->type() == TicTacButton::Blank ) {   // empty piece?
+        btArray->at(i) = TicTacButton::Circle;
+        updateButtons();
+        if ( checkBoard( btArray ) == 0 )       // not a winning move?
+            computerMove();
+        int s = checkBoard( btArray );
+        if ( s ) {                              // any winners yet?
+            st = s == TicTacButton::Circle ? HumanWon : ComputerWon;
+            emit finished();
+        }
+    }
+}
+
+
+// --------------------------------------------------------------------------
+// TicTacGameBoard::updateButtons()
+//
+// Updates all buttons that have changed state
+//
+
+void TicTacGameBoard::updateButtons()
+{
+    for ( int i=0; i<nBoard*nBoard; i++ ) {
+        if ( buttons->at(i)->type() != btArray->at(i) )
+            buttons->at(i)->setType( (TicTacButton::Type)btArray->at(i) );
+        buttons->at(i)->setEnabled( buttons->at(i)->type() ==
+                                    TicTacButton::Blank );
+    }
+}
+
+
+// --------------------------------------------------------------------------
+// TicTacGameBoard::checkBoard()
+//
+// Checks if one of the players won the game, works for any board size.
+//
+// Returns:
+//  - TicTacButton::Cross  if the player with X buttons won
+//  - TicTacButton::Circle if the player with O buttons won
+//  - Zero (0) if there is no winner yet
+//
+
+int TicTacGameBoard::checkBoard( TicTacArray *a )
+{
+    int  t = 0;
+    int  row, col;
+    bool won = FALSE;
+    for ( row=0; row<nBoard && !won; row++ ) {  // check horizontal
+        t = a->at(row*nBoard);
+        if ( t == TicTacButton::Blank )
+            continue;
+        col = 1;
+        while ( col<nBoard && a->at(row*nBoard+col) == t )
+            col++;
+        if ( col == nBoard )
+            won = TRUE;
+    }
+    for ( col=0; col<nBoard && !won; col++ ) {  // check vertical
+        t = a->at(col);
+        if ( t == TicTacButton::Blank )
+            continue;
+        row = 1;
+        while ( row<nBoard && a->at(row*nBoard+col) == t )
+            row++;
+        if ( row == nBoard )
+            won = TRUE;
+    }
+    if ( !won ) {                               // check diagonal top left
+        t = a->at(0);                           //   to bottom right
+        if ( t != TicTacButton::Blank ) {
+            int i = 1;
+            while ( i<nBoard && a->at(i*nBoard+i) == t )
+                i++;
+            if ( i == nBoard )
+                won = TRUE;
+        }
+    }
+    if ( !won ) {                               // check diagonal bottom left
+        int j = nBoard-1;                       //   to top right
+        int i = 0;
+        t = a->at(i+j*nBoard);
+        if ( t != TicTacButton::Blank ) {
+            i++; j--;
+            while ( i<nBoard && a->at(i+j*nBoard) == t ) {
+                i++; j--;
+            }
+            if ( i == nBoard )
+                won = TRUE;
+        }
+    }
+    if ( !won )                                 // no winner
+        t = 0;
+    return t;
+}
+
+
+// --------------------------------------------------------------------------
+// TicTacGameBoard::computerMove()
+//
+// Puts a piece on the game board. Very, very simple.
+//
+
+void TicTacGameBoard::computerMove()
+{
+    int numButtons = nBoard*nBoard;
+    int *altv = new int[numButtons];            // buttons alternatives
+    int altc = 0;
+    int stopHuman = -1;
+    TicTacArray a = btArray->copy();
+    int i;
+    for ( i=0; i<numButtons; i++ ) {            // try all positions
+        if ( a[i] != TicTacButton::Blank )      // already a piece there
+            continue;
+        a[i] = TicTacButton::Cross;             // test if computer wins
+        if ( checkBoard(&a) == a[i] ) {         // computer will win
+            st = ComputerWon;
+            stopHuman = -1;
+            break;
+        }
+        a[i] = TicTacButton::Circle;            // test if human wins
+        if ( checkBoard(&a) == a[i] ) {         // oops...
+            stopHuman = i;                      // remember position
+            a[i] = TicTacButton::Blank;         // restore button
+            continue;                           // computer still might win
+        }
+        a[i] = TicTacButton::Blank;             // restore button
+        altv[altc++] = i;                       // remember alternative
+    }
+    if ( stopHuman >= 0 )                       // must stop human from winning
+        a[stopHuman] = TicTacButton::Cross;
+    else if ( i == numButtons ) {               // tried all alternatives
+        if ( altc > 0 )                         // set random piece
+            a[altv[rand()%(altc--)]] = TicTacButton::Cross;
+        if ( altc == 0 ) {                      // no more blanks
+            st = NobodyWon;
+            emit finished();
+        }
+    }
+    *btArray = a;                               // update model
+    updateButtons();                            // update buttons
+    delete[] altv;
+}
+
+
+//***************************************************************************
+//* TicTacToe member functions
+//***************************************************************************
+
+// --------------------------------------------------------------------------
+// Creates a game widget with a game board and two push buttons, and connects
+// signals of child widgets to slots.
+//
+
+TicTacToe::TicTacToe( int boardSize, TQWidget *parent, const char *name )
+    : TQWidget( parent, name )
+{
+    TQVBoxLayout * l = new TQVBoxLayout( this, 6 );
+
+    // Create a message label
+
+    message = new TQLabel( this );
+    message->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
+    message->setAlignment( AlignCenter );
+    l->addWidget( message );
+
+    // Create the game board and connect the signal finished() to this
+    // gameOver() slot
+
+    board = new TicTacGameBoard( boardSize, this );
+    connect( board, SIGNAL(finished()), SLOT(gameOver()) );
+    l->addWidget( board );
+
+    // Create a horizontal frame line
+
+    TQFrame *line = new TQFrame( this );
+    line->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
+    l->addWidget( line );
+
+    // Create the combo box for deciding who should start, and
+    // connect its clicked() signals to the buttonClicked() slot
+
+    whoStarts = new TQComboBox( this );
+    whoStarts->insertItem( "Computer starts" );
+    whoStarts->insertItem( "Human starts" );
+    l->addWidget( whoStarts );
+
+    // Create the push buttons and connect their clicked() signals
+    // to this right slots.
+
+    newGame = new TQPushButton( "Play!", this );
+    connect( newGame, SIGNAL(clicked()), SLOT(newGameClicked()) );
+    tquit = new TQPushButton( "Quit", this );
+    connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+    TQHBoxLayout * b = new TQHBoxLayout;
+    l->addLayout( b );
+    b->addWidget( newGame );
+    b->addWidget( tquit );
+
+    newState();
+}
+
+
+// --------------------------------------------------------------------------
+// TicTacToe::newGameClicked()                  - SLOT
+//
+// This slot is activated when the new game button is clicked.
+//
+
+void TicTacToe::newGameClicked()
+{
+    board->computerStarts( whoStarts->currentItem() == 0 );
+    board->newGame();
+    newState();
+}
+
+
+// --------------------------------------------------------------------------
+// TicTacToe::gameOver()                        - SLOT
+//
+// This slot is activated when the TicTacGameBoard emits the signal
+// "finished()", i.e. when a player has won or when it is a draw.
+//
+
+void TicTacToe::gameOver()
+{
+    newState();                                 // update text box
+}
+
+
+// --------------------------------------------------------------------------
+// Updates the message to reflect a new state.
+//
+
+void TicTacToe::newState()
+{
+    static const char *msg[] = {                // TicTacGameBoard::State texts
+        "Click Play to start", "Make your move",
+        "You won!", "Computer won!", "It's a draw" };
+    message->setText( msg[board->state()] );
+    return;
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include <stdlib.h>
+#include "tictac.h"
+
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+    int n = 3;
+    if ( argc == 2 )                            // get board size n
+        n = atoi(argv[1]);
+    if ( n < 3 || n > 10 ) {                    // out of range
+        qWarning( "%s: Board size must be from 3x3 to 10x10", argv[0] );
+        return 1;
+    }
+    TicTacToe ttt( n );                         // create game
+    a.setMainWidget( &ttt );
+    ttt.setCaption("TQt Example - TicTac");
+    ttt.show();                                 // show widget
+    return a.exec();                            // go
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/time.html b/doc/html/time.html new file mode 100644 index 00000000..b65bc0fb --- /dev/null +++ b/doc/html/time.html @@ -0,0 +1,54 @@ + + + + + +Time and Date + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Time and Date

+ + +

These classes provide system-independent date and time abstractions. +

Also available: TQt Year 2000 Compliance Statement. + +

+
TQDateDate functions +
TQDateEditDate editor +
TQDateTimeDate and time functions +
TQDateTimeEditCombines a TQDateEdit and TQTimeEdit widget into a single widget for editing datetimes +
TQTimeClock time functions +
TQTimeEditTime editor +
TQTimerTimer signals and single-shot timers +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/timers.html b/doc/html/timers.html new file mode 100644 index 00000000..a8a0d0ff --- /dev/null +++ b/doc/html/timers.html @@ -0,0 +1,152 @@ + + + + + +Timers + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Timers

+ + + +

TQObject, the base class of all TQt objects, provides the basic timer +support in TQt. With TQObject::startTimer(), you start a timer with +an interval in milliseconds as argument. The function returns a +unique integer timer id. The timer will now "fire" every interval +milliseconds, until you explicitly call TQObject::killTimer() with +the timer id. +

For this mechanism to work, the application must run in an event +loop. You start an event loop with TQApplication::exec(). When a +timer fires, the application sends a TQTimerEvent, and the flow of +control leaves the event loop until the timer event is processed. This +implies that a timer cannot fire while your application is busy doing +something else. In other words: the accuracy of timers depends on the +granularity of your application. +

There is practically no upper limit for the interval value (more than +one year is possible). The accuracy depends on the underlying operating +system. Windows 95/98 has 55 millisecond (18.2 times per second) +accuracy; other systems that we have tested (UNIX X11 and Windows NT) +can handle 1 millisecond intervals. +

The main API for the timer functionality is TQTimer. That class +provides regular timers that emit a signal when the timer fires, and +inherits TQObject so that it fits well into the ownership structure +of most GUI programs. The normal way of using it is like this: +

+    TQTimer * counter = new TQTimer( this );
+    connect( counter, SIGNAL(timeout()),
+             this, SLOT(updateCaption()) );
+    counter->start( 1000 );
+
+ +

The counter timer is made into a child of this widget, so that when +this widget is deleted, the timer is deleted too. Next, its timeout +signal is connected to the slot that will do the work, and finally +it's started. +

TQTimer also provides a simple one-shot timer API. TQButton uses this +to show the button being pressed down and then (0.1 seconds later) be +released when the keyboard is used to "press" a button, for example: +

+    TQTimer::singleShot( 100, this, SLOT(animateTimeout()) );
+
+ +

0.1 seconds after this line of code is executed, the same button's +animateTimeout() slot is called. +

Here is an outline of a slightly longer example that combines object +communication via signals and slots with a TQTimer object. It +demonstrates how to use timers to perform intensive calculations in a +single-threaded application without blocking the user interface. +

+    // The Mandelbrot class uses a TQTimer to calculate the mandelbrot
+    // set one scanline at a time without blocking the CPU. It
+    // inherits TQObject to use signals and slots. Calling start()
+    // starts the calculation. The done() signal is emitted when it
+    // has finished. Note that this example is not complete, just an
+    // outline.
+
+    class Mandelbrot : public TQObject
+    {
+        Q_OBJECT // retquired for signals/slots
+    public:
+        Mandelbrot( TQObject *parent=0, const char *name );
+        ...
+    public slots:
+        void start();
+    signals:
+        void done();
+    private slots:
+        void calculate();
+        private:
+        TQTimer timer;
+        ...
+    };
+
+    //
+    // Constructs and initializes a Mandelbrot object.
+    //
+
+    Mandelbrot::Mandelbrot( TQObject *parent=0, const char *name )
+    : TQObject( parent, name )
+    {
+        connect( &timer, SIGNAL(timeout()), SLOT(calculate()) );
+        ...
+    }
+
+    //
+    // Starts the calculation task. The internal calculate() slot
+    // will be activated every 10 milliseconds.
+    //
+
+    void Mandelbrot::start()
+    {
+        if ( !timer.isActive() ) // not already running
+            timer.start( 10 );   // timeout every 10 ms
+    }
+
+    //
+    // Calculates one scanline at a time.
+    // Emits the done() signal when finished.
+    //
+
+    void Mandelbrot::calculate()
+    {
+        ...                // perform the calculation for a scanline
+        if ( finished ) {  // no more scanlines
+            timer.stop();
+            emit done();
+        }
+    }
+  
+ +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/titleindex b/doc/html/titleindex new file mode 100644 index 00000000..28a1f3aa --- /dev/null +++ b/doc/html/titleindex @@ -0,0 +1,1521 @@ +3rd Party Licenses used in Qt | 3rdparty.html +A Complete Application Window | simple-application-example.html +A Complete Application Window with Actions | qaction-application-example.html +A Complete Canvas Application | canvas-chart-example.html +A Directory Browser | dirview-example.html +A Motif Dialog | motif-dialog-example.html +A Qt example as a scriptable ActiveX control (executable) | qaxserver-example-tetrax.html +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 Web Browser | qaxcontainer-example-webbrowser.html +A qt-interest mail archive search | archivesearch-example.html +A simple ActiveQt control (executable) | qaxserver-example-simple.html +A simple HTTP daemon | httpd-example.html +A simple NNTP implementation | networkprotocol-example.html +A simple demonstration of QFont member functions | simple-font-demo-example.html +A simple mail client | mail-example.html +A small client-server example | clientserver-example.html +A standard ActiveX and the "simple" ActiveQt widget. | qaxserver-demo-simple.html +A tiny SAX2 parser | tagreader-example.html +About Modules | modules.html +About Qt | aboutqt.html +About Unicode | unicode.html +About the Visual Studio Integration Plugin | integration.html +Abstract Widget Classes | abstractwidgets.html +ActiveQt Examples | activeqt-examples.html +ActiveQt Tools | activeqt-tools.html +Adding an accelerated graphics driver to Qt/Embedded | emb-accel.html +Advanced Widgets | advanced.html +Advanced use of tool tips | tooltip-example.html +All Overviews and HOWTOs | overviews-list.html +An ActiveX Test Container | activeqt-tools-testcon.html +An Extension Dialog Example | extension-dialog-example.html +An FTP client | ftpclient-example.html +An MDI Application | mdi-example.html +Analog Clock | aclock-example.html +Annotated Class Index | annotated.html +Basic Widgets | basic.html +Biff (UNIX only) | biff-example.html +Books about GUI | guibooks.html +Brief Technical FAQ | commonproblems.html +Buttons and Groupboxes | buttongroups-example.html +Canvas Control | tutorial2-06.html +Canvas Example | canvas-example.html +Canvas Module | canvas.html +Character input in Qt/Embedded | emb-charinput.html +Class Inheritance Hierarchy | hierarchy.html +Collection Classes | collection.html +Company Information | troll.html +Connect the Points | drawlines-example.html +Continuing Development | motif-walkthrough-10.html +Conway's Game of Life | life-example.html +Cursors | cursor-example.html +Customized Layoutmanager | customlayout-example.html +Data Elements | tutorial2-03.html +Database Classes | database.html +Debugging Techniques | debug.html +Demonstration of SAX2 features | tagreader-with-features-example.html +Deploying Qt Applications | distributingqt.html +Dialog Classes | dialogs.html +Digital Clock | dclock-example.html +Drag And Drop Classes | draganddrop.html +Drag and Drop | dnd.html +Drag and Drop | dragdrop-example.html +Drag and Drop (Simple) | simple_dd-example.html +Draw Demo | drawdemo-example.html +Enabling the Linux Framebuffer | emb-framebuffer-howto.html +Environment Classes | environment.html +Event Classes | events.html +Events and Event Filters | eventsandfilters.html +Examples | examples.html +File Handling | tutorial2-07.html +Font Displayer | qfd-example.html +Fonts in Qt/Embedded | emb-fonts.html +Format of the QDataStream Operators | datastreamformat.html +Functions removed in Qt 2.0 | removed20.html +GNU General Public License | gpl.html +Getting Started | motif-walkthrough-1.html +Grapher Plugin | grapher-nsplugin-example.html +Graphics Classes | graphics.html +Grouped Classes | groups.html +Header File Index | headers.html +Hello, World | hello-example.html +Help System | helpsystem.html +Helpsystem | helpsystem-example.html +How to Learn Qt | how-to-learn-qt.html +How to Report A Bug | bughowto.html +How to create a large, sparse QTable | bigtable-example.html +How to use X11 overlays with the Qt OpenGL extension | opengl-x11-overlays.html +IconView Module | iconview.html +Iconview | iconview-example.html +Image Processing Classes | images.html +Implicitly and Explicitly Shared Classes | shared.html +In Sync with Outlook | qaxcontainer-example-qutlook.html +Input/Output and Networking | io.html +Installation | installation.html +Installing Qt/Embedded | emb-install.html +Installing Qt/Mac | install-mac.html +Installing Qt/Windows | install-win.html +Installing Qt/X11 | install-x11.html +Internationalization | i18n-example.html +Internationalization with Qt | i18n.html +Introduction | tutorial2-01.html +Issues to be aware of when porting Qt/Embedded | embedporting.html +Key Features in Qt 3.0 | keyfeatures30.html +Keyboard Focus Overview | focus.html +Layout Classes | layout.html +Layout Management | geomanagement.html +Layout Managers | layout-example.html +Licenses for Code Used in Qt | licenses.html +Line Edits | lineedits-example.html +Listbox Example | listbox-example.html +Listboxes and Comboboxes | listboxcombo-example.html +Listviews | listviews-example.html +Listviews with Checkable Items | checklists-example.html +Main Window and Related Classes | application.html +Mainly Easy | tutorial2-04.html +Member Function Index | functions.html +Menubar merging | qaxserver-demo-menus.html +Menubar merging | qaxserver-example-menus.html +Meta Object System | metaobjects.html +Miscellaneous Classes | misc.html +Movies or the Story of the Animated GIF file | movies-example.html +Multimedia Classes | multimedia.html +Netscape Plugin Examples | nsplugin-examples.html +Network Examples | network-examples.html +Network Module | network.html +Non-GUI Classes | tools.html +Object Model | objectmodel.html +Object Trees and Object Ownership | objecttrees.html +OpenGL Box Example | opengl-box-example.html +OpenGL Examples | opengl-examples.html +OpenGL Gear Example | opengl-gear-example.html +OpenGL Overlay Example | opengl-overlay-example.html +OpenGL Overlay X11 Example | opengl-overlay-x11-example.html +OpenGL Pixmap Example | opengl-pixmap-example.html +OpenGL Shared Box Example | opengl-sharedbox-example.html +OpenGL Texture Example | opengl-texture-example.html +OpenGL in an HTML page | qaxserver-demo-opengl.html +Organizers | organizers.html +Outliner to show use of DOM | outliner-example.html +Painting on the Desktop | desktop-example.html +Picture | picture-example.html +Pictures of Most Qt Widgets | pictures.html +Play Tetrix! | qaxserver-demo-tetrax.html +Plugins | plugins.html +Popup Widgets | popup-example.html +Porting to Qt 2.x | porting2.html +Porting to Qt 3.x | porting.html +Porting your applications to Qt/Embedded | emb-porting.html +Preparing to Migrate the User Interface | motif-walkthrough-2.html +Presenting the GUI | tutorial2-05.html +Progress Bar | progressbar-example.html +Progress Bar and Dialog Example | progress-example.html +Properties | properties.html +QAccel Class | qaccel.html +QAccel Member List | qaccel-members.html +QAccessible Class | qaccessible.html +QAccessible Member List | qaccessible-members.html +QAccessibleInterface Class | qaccessibleinterface.html +QAccessibleInterface Member List | qaccessibleinterface-members.html +QAccessibleObject Class | qaccessibleobject.html +QAccessibleObject Member List | qaccessibleobject-members.html +QAction Class | qaction.html +QAction Examples | qaction-examples.html +QAction Member List | qaction-members.html +QActionGroup Class | qactiongroup.html +QActionGroup Member List | qactiongroup-members.html +QApplication Class | qapplication.html +QApplication Member List | qapplication-members.html +QArray Class Reference (obsolete) | qarray.html +QAsciiCache Class | qasciicache.html +QAsciiCache Member List | qasciicache-members.html +QAsciiCacheIterator Class | qasciicacheiterator.html +QAsciiCacheIterator Member List | qasciicacheiterator-members.html +QAsciiDict Class | qasciidict.html +QAsciiDict Member List | qasciidict-members.html +QAsciiDictIterator Class | qasciidictiterator.html +QAsciiDictIterator Member List | qasciidictiterator-members.html +QAssistantClient Class | qassistantclient.html +QAssistantClient Member List | qassistantclient-members.html +QAsyncIO Class | qasyncio.html +QAsyncIO Member List | qasyncio-members.html +QAxAggregated Class | qaxaggregated.html +QAxAggregated Member List | qaxaggregated-members.html +QAxBase Class | qaxbase.html +QAxBase Member List | qaxbase-members.html +QAxBindable Class | qaxbindable.html +QAxBindable Member List | qaxbindable-members.html +QAxFactory Class | qaxfactory.html +QAxFactory Member List | qaxfactory-members.html +QAxObject Class | qaxobject.html +QAxObject Member List | qaxobject-members.html +QAxScript Class | qaxscript.html +QAxScript Member List | qaxscript-members.html +QAxScriptEngine Class | qaxscriptengine.html +QAxScriptEngine Member List | qaxscriptengine-members.html +QAxScriptManager Class | qaxscriptmanager.html +QAxScriptManager Member List | qaxscriptmanager-members.html +QAxWidget Class | qaxwidget.html +QAxWidget Member List | qaxwidget-members.html +QBig5Codec Class | qbig5codec.html +QBig5Codec Member List | qbig5codec-members.html +QBig5hkscsCodec Class | qbig5hkscscodec.html +QBig5hkscsCodec Member List | qbig5hkscscodec-members.html +QBitArray Class | qbitarray.html +QBitArray Member List | qbitarray-members.html +QBitVal Class | qbitval.html +QBitVal Member List | qbitval-members.html +QBitmap Class | qbitmap.html +QBitmap Member List | qbitmap-members.html +QBoxLayout Class | qboxlayout.html +QBoxLayout Member List | qboxlayout-members.html +QBrush Class | qbrush.html +QBrush Member List | qbrush-members.html +QBuffer Class | qbuffer.html +QBuffer Member List | qbuffer-members.html +QButton Class | qbutton.html +QButton Member List | qbutton-members.html +QButtonGroup Class | qbuttongroup.html +QButtonGroup Member List | qbuttongroup-members.html +QByteArray Class | qbytearray.html +QByteArray Member List | qbytearray-members.html +QCDEStyle Class | qcdestyle.html +QCDEStyle Member List | qcdestyle-members.html +QCString Class | qcstring.html +QCString Member List | qcstring-members.html +QCache Class | qcache.html +QCache Member List | qcache-members.html +QCacheIterator Class | qcacheiterator.html +QCacheIterator Member List | qcacheiterator-members.html +QCanvas Class | qcanvas.html +QCanvas Member List | qcanvas-members.html +QCanvasEllipse Class | qcanvasellipse.html +QCanvasEllipse Member List | qcanvasellipse-members.html +QCanvasItem Class | qcanvasitem.html +QCanvasItem Member List | qcanvasitem-members.html +QCanvasItemList Class | qcanvasitemlist.html +QCanvasItemList Member List | qcanvasitemlist-members.html +QCanvasLine Class | qcanvasline.html +QCanvasLine Member List | qcanvasline-members.html +QCanvasPixmap Class | qcanvaspixmap.html +QCanvasPixmap Member List | qcanvaspixmap-members.html +QCanvasPixmapArray Class | qcanvaspixmaparray.html +QCanvasPixmapArray Member List | qcanvaspixmaparray-members.html +QCanvasPolygon Class | qcanvaspolygon.html +QCanvasPolygon Member List | qcanvaspolygon-members.html +QCanvasPolygonalItem Class | qcanvaspolygonalitem.html +QCanvasPolygonalItem Member List | qcanvaspolygonalitem-members.html +QCanvasRectangle Class | qcanvasrectangle.html +QCanvasRectangle Member List | qcanvasrectangle-members.html +QCanvasSpline Class | qcanvasspline.html +QCanvasSpline Member List | qcanvasspline-members.html +QCanvasSprite Class | qcanvassprite.html +QCanvasSprite Member List | qcanvassprite-members.html +QCanvasText Class | qcanvastext.html +QCanvasText Member List | qcanvastext-members.html +QCanvasView Class | qcanvasview.html +QCanvasView Member List | qcanvasview-members.html +QChar Class | qchar.html +QChar Member List | qchar-members.html +QCharRef Class | qcharref.html +QCharRef Member List | qcharref-members.html +QCheckBox Class | qcheckbox.html +QCheckBox Member List | qcheckbox-members.html +QCheckListItem Class | qchecklistitem.html +QCheckListItem Member List | qchecklistitem-members.html +QCheckTableItem Class | qchecktableitem.html +QCheckTableItem Member List | qchecktableitem-members.html +QChildEvent Class | qchildevent.html +QChildEvent Member List | qchildevent-members.html +QClipboard Class | qclipboard.html +QClipboard Member List | qclipboard-members.html +QCloseEvent Class | qcloseevent.html +QCloseEvent Member List | qcloseevent-members.html +QCollection Class Reference (obsolete) | qcollection.html +QColor Class | qcolor.html +QColor Member List | qcolor-members.html +QColorDialog Class | qcolordialog.html +QColorDialog Member List | qcolordialog-members.html +QColorDrag Class | qcolordrag.html +QColorDrag Member List | qcolordrag-members.html +QColorGroup Class | qcolorgroup.html +QColorGroup Member List | qcolorgroup-members.html +QComboBox Class | qcombobox.html +QComboBox Member List | qcombobox-members.html +QComboTableItem Class | qcombotableitem.html +QComboTableItem Member List | qcombotableitem-members.html +QCommonStyle Class | qcommonstyle.html +QCommonStyle Member List | qcommonstyle-members.html +QConstString Class | qconststring.html +QConstString Member List | qconststring-members.html +QContextMenuEvent Class | qcontextmenuevent.html +QContextMenuEvent Member List | qcontextmenuevent-members.html +QCopChannel Class | qcopchannel.html +QCopChannel Member List | qcopchannel-members.html +QCursor Class | qcursor.html +QCursor Member List | qcursor-members.html +QCustomEvent Class | qcustomevent.html +QCustomEvent Member List | qcustomevent-members.html +QCustomMenuItem Class | qcustommenuitem.html +QCustomMenuItem Member List | qcustommenuitem-members.html +QDataBrowser Class | qdatabrowser.html +QDataBrowser Member List | qdatabrowser-members.html +QDataPump Class | qdatapump.html +QDataPump Member List | qdatapump-members.html +QDataSink Class | qdatasink.html +QDataSink Member List | qdatasink-members.html +QDataSource Class | qdatasource.html +QDataSource Member List | qdatasource-members.html +QDataStream Class | qdatastream.html +QDataStream Member List | qdatastream-members.html +QDataTable Class | qdatatable.html +QDataTable Member List | qdatatable-members.html +QDataView Class | qdataview.html +QDataView Member List | qdataview-members.html +QDate Class | qdate.html +QDate Member List | qdate-members.html +QDateEdit Class | qdateedit.html +QDateEdit Member List | qdateedit-members.html +QDateTime Class | qdatetime.html +QDateTime Member List | qdatetime-members.html +QDateTimeEdit Class | qdatetimeedit.html +QDateTimeEdit Member List | qdatetimeedit-members.html +QDateTimeEditBase Class | qdatetimeeditbase.html +QDateTimeEditBase Member List | qdatetimeeditbase-members.html +QDeepCopy Class | qdeepcopy.html +QDeepCopy Member List | qdeepcopy-members.html +QDesktopWidget Class | qdesktopwidget.html +QDesktopWidget Member List | qdesktopwidget-members.html +QDial Class | qdial.html +QDial Member List | qdial-members.html +QDialog Class | qdialog.html +QDialog Member List | qdialog-members.html +QDict Class | qdict.html +QDict Member List | qdict-members.html +QDictIterator Class | qdictiterator.html +QDictIterator Member List | qdictiterator-members.html +QDir | qdir-example.html +QDir Class | qdir.html +QDir Member List | qdir-members.html +QDirectPainter Class | qdirectpainter.html +QDirectPainter Member List | qdirectpainter-members.html +QDns Class | qdns.html +QDns Member List | qdns-members.html +QDockArea Class | qdockarea.html +QDockArea Member List | qdockarea-members.html +QDockWindow Class | qdockwindow.html +QDockWindow Member List | qdockwindow-members.html +QDomAttr Class | qdomattr.html +QDomAttr Member List | qdomattr-members.html +QDomCDATASection Class | qdomcdatasection.html +QDomCDATASection Member List | qdomcdatasection-members.html +QDomCharacterData Class | qdomcharacterdata.html +QDomCharacterData Member List | qdomcharacterdata-members.html +QDomComment Class | qdomcomment.html +QDomComment Member List | qdomcomment-members.html +QDomDocument Class | qdomdocument.html +QDomDocument Member List | qdomdocument-members.html +QDomDocumentFragment Class | qdomdocumentfragment.html +QDomDocumentFragment Member List | qdomdocumentfragment-members.html +QDomDocumentType Class | qdomdocumenttype.html +QDomDocumentType Member List | qdomdocumenttype-members.html +QDomElement Class | qdomelement.html +QDomElement Member List | qdomelement-members.html +QDomEntity Class | qdomentity.html +QDomEntity Member List | qdomentity-members.html +QDomEntityReference Class | qdomentityreference.html +QDomEntityReference Member List | qdomentityreference-members.html +QDomImplementation Class | qdomimplementation.html +QDomImplementation Member List | qdomimplementation-members.html +QDomNamedNodeMap Class | qdomnamednodemap.html +QDomNamedNodeMap Member List | qdomnamednodemap-members.html +QDomNode Class | qdomnode.html +QDomNode Member List | qdomnode-members.html +QDomNodeList Class | qdomnodelist.html +QDomNodeList Member List | qdomnodelist-members.html +QDomNotation Class | qdomnotation.html +QDomNotation Member List | qdomnotation-members.html +QDomProcessingInstruction Class | qdomprocessinginstruction.html +QDomProcessingInstruction Member List | qdomprocessinginstruction-members.html +QDomText Class | qdomtext.html +QDomText Member List | qdomtext-members.html +QDoubleValidator Class | qdoublevalidator.html +QDoubleValidator Member List | qdoublevalidator-members.html +QDragEnterEvent Class | qdragenterevent.html +QDragEnterEvent Member List | qdragenterevent-members.html +QDragLeaveEvent Class | qdragleaveevent.html +QDragLeaveEvent Member List | qdragleaveevent-members.html +QDragMoveEvent Class | qdragmoveevent.html +QDragMoveEvent Member List | qdragmoveevent-members.html +QDragObject Class | qdragobject.html +QDragObject Member List | qdragobject-members.html +QDropEvent Class | qdropevent.html +QDropEvent Member List | qdropevent-members.html +QDropSite Class | qdropsite.html +QDropSite Member List | qdropsite-members.html +QEditorFactory Class | qeditorfactory.html +QEditorFactory Member List | qeditorfactory-members.html +QEmbed - File and Image Embedder | qembed.html +QErrorMessage Class | qerrormessage.html +QErrorMessage Member List | qerrormessage-members.html +QEucJpCodec Class | qeucjpcodec.html +QEucJpCodec Member List | qeucjpcodec-members.html +QEucKrCodec Class | qeuckrcodec.html +QEucKrCodec Member List | qeuckrcodec-members.html +QEvent Class | qevent.html +QEvent Member List | qevent-members.html +QEventLoop Class | qeventloop.html +QEventLoop Member List | qeventloop-members.html +QFile Class | qfile.html +QFile Member List | qfile-members.html +QFileDialog Class | qfiledialog.html +QFileDialog Member List | qfiledialog-members.html +QFileIconProvider Class | qfileiconprovider.html +QFileIconProvider Member List | qfileiconprovider-members.html +QFileInfo Class | qfileinfo.html +QFileInfo Member List | qfileinfo-members.html +QFilePreview Class | qfilepreview.html +QFilePreview Member List | qfilepreview-members.html +QFocusData Class | qfocusdata.html +QFocusData Member List | qfocusdata-members.html +QFocusEvent Class | qfocusevent.html +QFocusEvent Member List | qfocusevent-members.html +QFont Class | qfont.html +QFont Examples | qfont-examples.html +QFont Member List | qfont-members.html +QFontDatabase Class | qfontdatabase.html +QFontDatabase Member List | qfontdatabase-members.html +QFontDialog Class | qfontdialog.html +QFontDialog Member List | qfontdialog-members.html +QFontInfo Class | qfontinfo.html +QFontInfo Member List | qfontinfo-members.html +QFontManager Class | qfontmanager.html +QFontManager Member List | qfontmanager-members.html +QFontMetrics Class | qfontmetrics.html +QFontMetrics Member List | qfontmetrics-members.html +QFrame Class | qframe.html +QFrame Member List | qframe-members.html +QFtp Class | qftp.html +QFtp Member List | qftp-members.html +QGL Class | qgl.html +QGL Member List | qgl-members.html +QGLColormap Class | qglcolormap.html +QGLColormap Member List | qglcolormap-members.html +QGLContext Class | qglcontext.html +QGLContext Member List | qglcontext-members.html +QGLFormat Class | qglformat.html +QGLFormat Member List | qglformat-members.html +QGLWidget Class | qglwidget.html +QGLWidget Member List | qglwidget-members.html +QGLayoutIterator Class | qglayoutiterator.html +QGLayoutIterator Member List | qglayoutiterator-members.html +QGb18030Codec Class | qgb18030codec.html +QGb18030Codec Member List | qgb18030codec-members.html +QGb2312Codec Class | qgb2312codec.html +QGb2312Codec Member List | qgb2312codec-members.html +QGbkCodec Class | qgbkcodec.html +QGbkCodec Member List | qgbkcodec-members.html +QGfxDriverFactory Class | qgfxdriverfactory.html +QGfxDriverFactory Member List | qgfxdriverfactory-members.html +QGfxDriverPlugin Class | qgfxdriverplugin.html +QGfxDriverPlugin Member List | qgfxdriverplugin-members.html +QGrid Class | qgrid.html +QGrid Member List | qgrid-members.html +QGridLayout Class | qgridlayout.html +QGridLayout Member List | qgridlayout-members.html +QGridView Class | qgridview.html +QGridView Member List | qgridview-members.html +QGroupBox Class | qgroupbox.html +QGroupBox Member List | qgroupbox-members.html +QGuardedPtr Class | qguardedptr.html +QGuardedPtr Member List | qguardedptr-members.html +QHBox Class | qhbox.html +QHBox Member List | qhbox-members.html +QHBoxLayout Class | qhboxlayout.html +QHBoxLayout Member List | qhboxlayout-members.html +QHButtonGroup Class | qhbuttongroup.html +QHButtonGroup Member List | qhbuttongroup-members.html +QHGroupBox Class | qhgroupbox.html +QHGroupBox Member List | qhgroupbox-members.html +QHeader Class | qheader.html +QHeader Member List | qheader-members.html +QHebrewCodec Class | qhebrewcodec.html +QHebrewCodec Member List | qhebrewcodec-members.html +QHideEvent Class | qhideevent.html +QHideEvent Member List | qhideevent-members.html +QHostAddress Class | qhostaddress.html +QHostAddress Member List | qhostaddress-members.html +QHttp Class | qhttp.html +QHttp Member List | qhttp-members.html +QHttpHeader Class | qhttpheader.html +QHttpHeader Member List | qhttpheader-members.html +QHttpRequestHeader Class | qhttprequestheader.html +QHttpRequestHeader Member List | qhttprequestheader-members.html +QHttpResponseHeader Class | qhttpresponseheader.html +QHttpResponseHeader Member List | qhttpresponseheader-members.html +QIMEvent Class | qimevent.html +QIMEvent Member List | qimevent-members.html +QIODevice Class | qiodevice.html +QIODevice Member List | qiodevice-members.html +QIODeviceSource Class | qiodevicesource.html +QIODeviceSource Member List | qiodevicesource-members.html +QIconDrag Class | qicondrag.html +QIconDrag Member List | qicondrag-members.html +QIconDragEvent Class | qicondragevent.html +QIconDragEvent Member List | qicondragevent-members.html +QIconDragItem Class | qicondragitem.html +QIconDragItem Member List | qicondragitem-members.html +QIconFactory Class | qiconfactory.html +QIconFactory Member List | qiconfactory-members.html +QIconSet Class | qiconset.html +QIconSet Member List | qiconset-members.html +QIconView Class | qiconview.html +QIconView Member List | qiconview-members.html +QIconViewItem Class | qiconviewitem.html +QIconViewItem Member List | qiconviewitem-members.html +QImage Class | qimage.html +QImage Member List | qimage-members.html +QImageConsumer Class | qimageconsumer.html +QImageConsumer Member List | qimageconsumer-members.html +QImageDecoder Class | qimagedecoder.html +QImageDecoder Member List | qimagedecoder-members.html +QImageDrag Class | qimagedrag.html +QImageDrag Member List | qimagedrag-members.html +QImageFormat Class | qimageformat.html +QImageFormat Member List | qimageformat-members.html +QImageFormatPlugin Class | qimageformatplugin.html +QImageFormatPlugin Member List | qimageformatplugin-members.html +QImageFormatType Class | qimageformattype.html +QImageFormatType Member List | qimageformattype-members.html +QImageIO Class | qimageio.html +QImageIO Member List | qimageio-members.html +QInputDialog Class | qinputdialog.html +QInputDialog Member List | qinputdialog-members.html +QIntCache Class | qintcache.html +QIntCache Member List | qintcache-members.html +QIntCacheIterator Class | qintcacheiterator.html +QIntCacheIterator Member List | qintcacheiterator-members.html +QIntDict Class | qintdict.html +QIntDict Member List | qintdict-members.html +QIntDictIterator Class | qintdictiterator.html +QIntDictIterator Member List | qintdictiterator-members.html +QIntValidator Class | qintvalidator.html +QIntValidator Member List | qintvalidator-members.html +QJisCodec Class | qjiscodec.html +QJisCodec Member List | qjiscodec-members.html +QKbdDriverFactory Class | qkbddriverfactory.html +QKbdDriverFactory Member List | qkbddriverfactory-members.html +QKbdDriverPlugin Class | qkbddriverplugin.html +QKbdDriverPlugin Member List | qkbddriverplugin-members.html +QKeyEvent Class | qkeyevent.html +QKeyEvent Member List | qkeyevent-members.html +QKeySequence Class | qkeysequence.html +QKeySequence Member List | qkeysequence-members.html +QLCDNumber Class | qlcdnumber.html +QLCDNumber Member List | qlcdnumber-members.html +QLabel Class | qlabel.html +QLabel Member List | qlabel-members.html +QLayout Class | qlayout.html +QLayout Member List | qlayout-members.html +QLayoutItem Class | qlayoutitem.html +QLayoutItem Member List | qlayoutitem-members.html +QLayoutIterator Class | qlayoutiterator.html +QLayoutIterator Member List | qlayoutiterator-members.html +QLibrary Class | qlibrary.html +QLibrary Member List | qlibrary-members.html +QLineEdit Class | qlineedit.html +QLineEdit Member List | qlineedit-members.html +QList Class Reference (obsolete) | qlist.html +QListBox Class | qlistbox.html +QListBox Member List | qlistbox-members.html +QListBoxItem Class | qlistboxitem.html +QListBoxItem Member List | qlistboxitem-members.html +QListBoxPixmap Class | qlistboxpixmap.html +QListBoxPixmap Member List | qlistboxpixmap-members.html +QListBoxText Class | qlistboxtext.html +QListBoxText Member List | qlistboxtext-members.html +QListIterator Class Reference (obsolete) | qlistiterator.html +QListView Class | qlistview.html +QListView Member List | qlistview-members.html +QListViewItem Class | qlistviewitem.html +QListViewItem Member List | qlistviewitem-members.html +QListViewItemIterator Class | qlistviewitemiterator.html +QListViewItemIterator Member List | qlistviewitemiterator-members.html +QLocalFs Class | qlocalfs.html +QLocalFs Member List | qlocalfs-members.html +QLocale Class | qlocale.html +QLocale Member List | qlocale-members.html +QMacMime Class | qmacmime.html +QMacMime Member List | qmacmime-members.html +QMacStyle Class | qmacstyle.html +QMacStyle Member List | qmacstyle-members.html +QMag | qmag-example.html +QMainWindow Class | qmainwindow.html +QMainWindow Member List | qmainwindow-members.html +QMap Class | qmap.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 +QMemArray Class | qmemarray.html +QMemArray Member List | qmemarray-members.html +QMenuBar Class | qmenubar.html +QMenuBar Member List | qmenubar-members.html +QMenuData Class | qmenudata.html +QMenuData Member List | qmenudata-members.html +QMessageBox Class | qmessagebox.html +QMessageBox Member List | qmessagebox-members.html +QMetaObject Class | qmetaobject.html +QMetaObject Member List | qmetaobject-members.html +QMetaProperty Class | qmetaproperty.html +QMetaProperty Member List | qmetaproperty-members.html +QMimeSource Class | qmimesource.html +QMimeSource Member List | qmimesource-members.html +QMimeSourceFactory Class | qmimesourcefactory.html +QMimeSourceFactory Member List | qmimesourcefactory-members.html +QMotif Class | qmotif.html +QMotif Member List | qmotif-members.html +QMotif Support Extension | motif-examples.html +QMotifDialog Class | qmotifdialog.html +QMotifDialog Member List | qmotifdialog-members.html +QMotifPlusStyle Class | qmotifplusstyle.html +QMotifPlusStyle Member List | qmotifplusstyle-members.html +QMotifStyle Class | qmotifstyle.html +QMotifStyle Member List | qmotifstyle-members.html +QMotifWidget Class | qmotifwidget.html +QMotifWidget Member List | qmotifwidget-members.html +QMouseDriverFactory Class | qmousedriverfactory.html +QMouseDriverFactory Member List | qmousedriverfactory-members.html +QMouseDriverPlugin Class | qmousedriverplugin.html +QMouseDriverPlugin Member List | qmousedriverplugin-members.html +QMouseEvent Class | qmouseevent.html +QMouseEvent Member List | qmouseevent-members.html +QMoveEvent Class | qmoveevent.html +QMoveEvent Member List | qmoveevent-members.html +QMovie Class | qmovie.html +QMovie Member List | qmovie-members.html +QMultiLineEdit Class | qmultilineedit.html +QMultiLineEdit Member List | qmultilineedit-members.html +QMutex Class | qmutex.html +QMutex Member List | qmutex-members.html +QMutexLocker Class | qmutexlocker.html +QMutexLocker Member List | qmutexlocker-members.html +QNPInstance Class | qnpinstance.html +QNPInstance Member List | qnpinstance-members.html +QNPStream Class | qnpstream.html +QNPStream Member List | qnpstream-members.html +QNPWidget Class | qnpwidget.html +QNPWidget Member List | qnpwidget-members.html +QNPlugin Class | qnplugin.html +QNPlugin Member List | qnplugin-members.html +QNetworkOperation Class | qnetworkoperation.html +QNetworkOperation Member List | qnetworkoperation-members.html +QNetworkProtocol Class | qnetworkprotocol.html +QNetworkProtocol Member List | qnetworkprotocol-members.html +QObject Class | qobject.html +QObject Member List | qobject-members.html +QObjectCleanupHandler Class | qobjectcleanuphandler.html +QObjectCleanupHandler Member List | qobjectcleanuphandler-members.html +QObjectList Class | qobjectlist.html +QObjectList Member List | qobjectlist-members.html +QObjectListIterator Class | qobjectlistiterator.html +QObjectListIterator Member List | qobjectlistiterator-members.html +QPNGImagePacker Class | qpngimagepacker.html +QPNGImagePacker Member List | qpngimagepacker-members.html +QPaintDevice Class | qpaintdevice.html +QPaintDevice Member List | qpaintdevice-members.html +QPaintDeviceMetrics Class | qpaintdevicemetrics.html +QPaintDeviceMetrics Member List | qpaintdevicemetrics-members.html +QPaintEvent Class | qpaintevent.html +QPaintEvent Member List | qpaintevent-members.html +QPainter Class | qpainter.html +QPainter Member List | qpainter-members.html +QPair Class | qpair.html +QPair Member List | qpair-members.html +QPalette Class | qpalette.html +QPalette Member List | qpalette-members.html +QPen Class | qpen.html +QPen Member List | qpen-members.html +QPicture Class | qpicture.html +QPicture Member List | qpicture-members.html +QPixmap Class | qpixmap.html +QPixmap Member List | qpixmap-members.html +QPixmapCache Class | qpixmapcache.html +QPixmapCache Member List | qpixmapcache-members.html +QPlatinumStyle Class | qplatinumstyle.html +QPlatinumStyle Member List | qplatinumstyle-members.html +QPoint Class | qpoint.html +QPoint Member List | qpoint-members.html +QPointArray Class | qpointarray.html +QPointArray Member List | qpointarray-members.html +QPopupMenu Class | qpopupmenu.html +QPopupMenu Member List | qpopupmenu-members.html +QPrinter Class | qprinter.html +QPrinter Member List | qprinter-members.html +QProcess Class | qprocess.html +QProcess Examples | qprocess-examples.html +QProcess Member List | qprocess-members.html +QProgressBar Class | qprogressbar.html +QProgressBar Member List | qprogressbar-members.html +QProgressDialog Class | qprogressdialog.html +QProgressDialog Member List | qprogressdialog-members.html +QPtrCollection Class | qptrcollection.html +QPtrCollection Member List | qptrcollection-members.html +QPtrDict Class | qptrdict.html +QPtrDict Member List | qptrdict-members.html +QPtrDictIterator Class | qptrdictiterator.html +QPtrDictIterator Member List | qptrdictiterator-members.html +QPtrList Class | qptrlist.html +QPtrList Member List | qptrlist-members.html +QPtrListIterator Class | qptrlistiterator.html +QPtrListIterator Member List | qptrlistiterator-members.html +QPtrQueue Class | qptrqueue.html +QPtrQueue Member List | qptrqueue-members.html +QPtrStack Class | qptrstack.html +QPtrStack Member List | qptrstack-members.html +QPtrVector Class | qptrvector.html +QPtrVector Member List | qptrvector-members.html +QPushButton Class | qpushbutton.html +QPushButton Member List | qpushbutton-members.html +QQueue Class Reference (obsolete) | qqueue.html +QRadioButton Class | qradiobutton.html +QRadioButton Member List | qradiobutton-members.html +QRangeControl Class | qrangecontrol.html +QRangeControl Member List | qrangecontrol-members.html +QRect Class | qrect.html +QRect Member List | qrect-members.html +QRegExp Class | qregexp.html +QRegExp Member List | qregexp-members.html +QRegExpValidator Class | qregexpvalidator.html +QRegExpValidator Member List | qregexpvalidator-members.html +QRegion Class | qregion.html +QRegion Member List | qregion-members.html +QResizeEvent Class | qresizeevent.html +QResizeEvent Member List | qresizeevent-members.html +QSGIStyle Class | qsgistyle.html +QSGIStyle Member List | qsgistyle-members.html +QScreen Class | qscreen.html +QScreen Member List | qscreen-members.html +QScrollBar Class | qscrollbar.html +QScrollBar Member List | qscrollbar-members.html +QScrollView Class | qscrollview.html +QScrollView Member List | qscrollview-members.html +QSemaphore Class | qsemaphore.html +QSemaphore Member List | qsemaphore-members.html +QServerSocket Class | qserversocket.html +QServerSocket Member List | qserversocket-members.html +QSessionManager Class | qsessionmanager.html +QSessionManager Member List | qsessionmanager-members.html +QSettings Class | qsettings.html +QSettings Member List | qsettings-members.html +QShowEvent Class | qshowevent.html +QShowEvent Member List | qshowevent-members.html +QSignal Class | qsignal.html +QSignal Member List | qsignal-members.html +QSignalMapper Class | qsignalmapper.html +QSignalMapper Member List | qsignalmapper-members.html +QSimpleRichText Class | qsimplerichtext.html +QSimpleRichText Member List | qsimplerichtext-members.html +QSize Class | qsize.html +QSize Member List | qsize-members.html +QSizeGrip Class | qsizegrip.html +QSizeGrip Member List | qsizegrip-members.html +QSizePolicy Class | qsizepolicy.html +QSizePolicy Member List | qsizepolicy-members.html +QSjisCodec Class | qsjiscodec.html +QSjisCodec Member List | qsjiscodec-members.html +QSlider Class | qslider.html +QSlider Member List | qslider-members.html +QSocket Class | qsocket.html +QSocket Member List | qsocket-members.html +QSocketDevice Class | qsocketdevice.html +QSocketDevice Member List | qsocketdevice-members.html +QSocketNotifier Class | qsocketnotifier.html +QSocketNotifier Member List | qsocketnotifier-members.html +QSortedList Class | qsortedlist.html +QSortedList Member List | qsortedlist-members.html +QSound Class | qsound.html +QSound Member List | qsound-members.html +QSpacerItem Class | qspaceritem.html +QSpacerItem Member List | qspaceritem-members.html +QSpinBox Class | qspinbox.html +QSpinBox Member List | qspinbox-members.html +QSplashScreen Class | qsplashscreen.html +QSplashScreen Member List | qsplashscreen-members.html +QSplitter Class | qsplitter.html +QSplitter Member List | qsplitter-members.html +QSql Class | qsql.html +QSql Member List | qsql-members.html +QSqlCursor Class | qsqlcursor.html +QSqlCursor Member List | qsqlcursor-members.html +QSqlDatabase Class | qsqldatabase.html +QSqlDatabase Member List | qsqldatabase-members.html +QSqlDriver Class | qsqldriver.html +QSqlDriver Member List | qsqldriver-members.html +QSqlDriverPlugin Class | qsqldriverplugin.html +QSqlDriverPlugin Member List | qsqldriverplugin-members.html +QSqlEditorFactory Class | qsqleditorfactory.html +QSqlEditorFactory Member List | qsqleditorfactory-members.html +QSqlError Class | qsqlerror.html +QSqlError Member List | qsqlerror-members.html +QSqlField Class | qsqlfield.html +QSqlField Member List | qsqlfield-members.html +QSqlFieldInfo Class | qsqlfieldinfo.html +QSqlFieldInfo Member List | qsqlfieldinfo-members.html +QSqlForm Class | qsqlform.html +QSqlForm Member List | qsqlform-members.html +QSqlIndex Class | qsqlindex.html +QSqlIndex Member List | qsqlindex-members.html +QSqlPropertyMap Class | qsqlpropertymap.html +QSqlPropertyMap Member List | qsqlpropertymap-members.html +QSqlQuery Class | qsqlquery.html +QSqlQuery Member List | qsqlquery-members.html +QSqlRecord Class | qsqlrecord.html +QSqlRecord Member List | qsqlrecord-members.html +QSqlRecordInfo Class | qsqlrecordinfo.html +QSqlRecordInfo Member List | qsqlrecordinfo-members.html +QSqlResult Class | qsqlresult.html +QSqlResult Member List | qsqlresult-members.html +QSqlSelectCursor Class | qsqlselectcursor.html +QSqlSelectCursor Member List | qsqlselectcursor-members.html +QStack Class Reference (obsolete) | qstack.html +QStatusBar Class | qstatusbar.html +QStatusBar Member List | qstatusbar-members.html +QStoredDrag Class | qstoreddrag.html +QStoredDrag Member List | qstoreddrag-members.html +QStrIList Class | qstrilist.html +QStrIList Member List | qstrilist-members.html +QStrList Class | qstrlist.html +QStrList Member List | qstrlist-members.html +QStrListIterator Class | qstrlistiterator.html +QStrListIterator Member List | qstrlistiterator-members.html +QString Class | qstring.html +QString Member List | qstring-members.html +QStringList Class | qstringlist.html +QStringList Member List | qstringlist-members.html +QStyle Class | qstyle.html +QStyle Member List | qstyle-members.html +QStyleFactory Class | qstylefactory.html +QStyleFactory Member List | qstylefactory-members.html +QStyleOption Class | qstyleoption.html +QStyleOption Member List | qstyleoption-members.html +QStylePlugin Class | qstyleplugin.html +QStylePlugin Member List | qstyleplugin-members.html +QStyleSheet Class | qstylesheet.html +QStyleSheet Member List | qstylesheet-members.html +QStyleSheetItem Class | qstylesheetitem.html +QStyleSheetItem Member List | qstylesheetitem-members.html +QSyntaxHighlighter Class | qsyntaxhighlighter.html +QSyntaxHighlighter Member List | qsyntaxhighlighter-members.html +QTab Class | qtab.html +QTab Member List | qtab-members.html +QTabBar Class | qtabbar.html +QTabBar Member List | qtabbar-members.html +QTabDialog Class | qtabdialog.html +QTabDialog Member List | qtabdialog-members.html +QTabWidget Class | qtabwidget.html +QTabWidget Member List | qtabwidget-members.html +QTable Class | qtable.html +QTable Member List | qtable-members.html +QTableItem Class | qtableitem.html +QTableItem Member List | qtableitem-members.html +QTableSelection Class | qtableselection.html +QTableSelection Member List | qtableselection-members.html +QTabletEvent Class | qtabletevent.html +QTabletEvent Member List | qtabletevent-members.html +QTextBrowser Class | qtextbrowser.html +QTextBrowser Member List | qtextbrowser-members.html +QTextCodec Class | qtextcodec.html +QTextCodec Member List | qtextcodec-members.html +QTextCodecPlugin Class | qtextcodecplugin.html +QTextCodecPlugin Member List | qtextcodecplugin-members.html +QTextDecoder Class | qtextdecoder.html +QTextDecoder Member List | qtextdecoder-members.html +QTextDrag Class | qtextdrag.html +QTextDrag Member List | qtextdrag-members.html +QTextEdit Class | qtextedit.html +QTextEdit Member List | qtextedit-members.html +QTextEncoder Class | qtextencoder.html +QTextEncoder Member List | qtextencoder-members.html +QTextIStream Class | qtextistream.html +QTextIStream Member List | qtextistream-members.html +QTextOStream Class | qtextostream.html +QTextOStream Member List | qtextostream-members.html +QTextStream Class | qtextstream.html +QTextStream Member List | qtextstream-members.html +QTextView Class | qtextview.html +QTextView Member List | qtextview-members.html +QThread Class | qthread.html +QThread Member List | qthread-members.html +QThreadStorage Class | qthreadstorage.html +QThreadStorage Member List | qthreadstorage-members.html +QTime Class | qtime.html +QTime Member List | qtime-members.html +QTimeEdit Class | qtimeedit.html +QTimeEdit Member List | qtimeedit-members.html +QTimer Class | qtimer.html +QTimer Member List | qtimer-members.html +QTimerEvent Class | qtimerevent.html +QTimerEvent Member List | qtimerevent-members.html +QToolBar Class | qtoolbar.html +QToolBar Member List | qtoolbar-members.html +QToolBox Class | qtoolbox.html +QToolBox Member List | qtoolbox-members.html +QToolButton Class | qtoolbutton.html +QToolButton Member List | qtoolbutton-members.html +QToolTip Class | qtooltip.html +QToolTip Member List | qtooltip-members.html +QToolTipGroup Class | qtooltipgroup.html +QToolTipGroup Member List | qtooltipgroup-members.html +QTranslator Class | qtranslator.html +QTranslator Member List | qtranslator-members.html +QTranslatorMessage Class | qtranslatormessage.html +QTranslatorMessage Member List | qtranslatormessage-members.html +QTsciiCodec Class | qtsciicodec.html +QTsciiCodec Member List | qtsciicodec-members.html +QUriDrag Class | quridrag.html +QUriDrag Member List | quridrag-members.html +QUrl Class | qurl.html +QUrl Member List | qurl-members.html +QUrlInfo Class | qurlinfo.html +QUrlInfo Member List | qurlinfo-members.html +QUrlOperator Class | qurloperator.html +QUrlOperator Member List | qurloperator-members.html +QUuid Class | quuid.html +QUuid Member List | quuid-members.html +QVBox Class | qvbox.html +QVBox Member List | qvbox-members.html +QVBoxLayout Class | qvboxlayout.html +QVBoxLayout Member List | qvboxlayout-members.html +QVButtonGroup Class | qvbuttongroup.html +QVButtonGroup Member List | qvbuttongroup-members.html +QVGroupBox Class | qvgroupbox.html +QVGroupBox Member List | qvgroupbox-members.html +QValidator Class | qvalidator.html +QValidator Member List | qvalidator-members.html +QValueList Class | qvaluelist.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 | qvaluestack.html +QValueStack Member List | qvaluestack-members.html +QValueVector Class | qvaluevector.html +QValueVector Member List | qvaluevector-members.html +QVariant Class | qvariant.html +QVariant Member List | qvariant-members.html +QVector Class Reference (obsolete) | qvector.html +QWMatrix Class | qwmatrix.html +QWMatrix Member List | qwmatrix-members.html +QWSDecoration Class | qwsdecoration.html +QWSDecoration Member List | qwsdecoration-members.html +QWSInputMethod Class | qwsinputmethod.html +QWSInputMethod Member List | qwsinputmethod-members.html +QWSKeyboardHandler Class | qwskeyboardhandler.html +QWSKeyboardHandler Member List | qwskeyboardhandler-members.html +QWSMouseHandler Class | qwsmousehandler.html +QWSMouseHandler Member List | qwsmousehandler-members.html +QWSServer Class | qwsserver.html +QWSServer Member List | qwsserver-members.html +QWSWindow Class | qwswindow.html +QWSWindow Member List | qwswindow-members.html +QWaitCondition Class | qwaitcondition.html +QWaitCondition Member List | qwaitcondition-members.html +QWhatsThis Class | qwhatsthis.html +QWhatsThis Member List | qwhatsthis-members.html +QWheelEvent Class | qwheelevent.html +QWheelEvent Member List | qwheelevent-members.html +QWidget Class | qwidget.html +QWidget Member List | qwidget-members.html +QWidgetFactory Class | qwidgetfactory.html +QWidgetFactory Member List | qwidgetfactory-members.html +QWidgetItem Class | qwidgetitem.html +QWidgetItem Member List | qwidgetitem-members.html +QWidgetPlugin Class | qwidgetplugin.html +QWidgetPlugin Member List | qwidgetplugin-members.html +QWidgetStack Class | qwidgetstack.html +QWidgetStack Member List | qwidgetstack-members.html +QWindowsMime Class | qwindowsmime.html +QWindowsMime Member List | qwindowsmime-members.html +QWindowsStyle Class | qwindowsstyle.html +QWindowsStyle Member List | qwindowsstyle-members.html +QWizard Class | qwizard.html +QWizard Member List | qwizard-members.html +QWorkspace Class | qworkspace.html +QWorkspace Member List | qworkspace-members.html +QXmlAttributes Class | qxmlattributes.html +QXmlAttributes Member List | qxmlattributes-members.html +QXmlContentHandler Class | qxmlcontenthandler.html +QXmlContentHandler Member List | qxmlcontenthandler-members.html +QXmlDTDHandler Class | qxmldtdhandler.html +QXmlDTDHandler Member List | qxmldtdhandler-members.html +QXmlDeclHandler Class | qxmldeclhandler.html +QXmlDeclHandler Member List | qxmldeclhandler-members.html +QXmlDefaultHandler Class | qxmldefaulthandler.html +QXmlDefaultHandler Member List | qxmldefaulthandler-members.html +QXmlEntityResolver Class | qxmlentityresolver.html +QXmlEntityResolver Member List | qxmlentityresolver-members.html +QXmlErrorHandler Class | qxmlerrorhandler.html +QXmlErrorHandler Member List | qxmlerrorhandler-members.html +QXmlInputSource Class | qxmlinputsource.html +QXmlInputSource Member List | qxmlinputsource-members.html +QXmlLexicalHandler Class | qxmllexicalhandler.html +QXmlLexicalHandler Member List | qxmllexicalhandler-members.html +QXmlLocator Class | qxmllocator.html +QXmlLocator Member List | qxmllocator-members.html +QXmlNamespaceSupport Class | qxmlnamespacesupport.html +QXmlNamespaceSupport Member List | qxmlnamespacesupport-members.html +QXmlParseException Class | qxmlparseexception.html +QXmlParseException Member List | qxmlparseexception-members.html +QXmlReader Class | qxmlreader.html +QXmlReader Member List | qxmlreader-members.html +QXmlSimpleReader Class | qxmlsimplereader.html +QXmlSimpleReader Member List | qxmlsimplereader-members.html +QXtWidget Class | qxtwidget.html +QXtWidget Member List | qxtwidget-members.html +Qt Class | qt.html +Qt Commercial Editions | commercialeditions.html +Qt Demo | demo-example.html +Qt Distribution Example | distributor-example.html +Qt Editions | editions.html +Qt Member List | qt-members.html +Qt Motif Extension | motif-extension.html +Qt Motif Extension - A Migration Walkthrough | motif-walkthrough.html +Qt Netscape Plugin Extension | netscape-plugin.html +Qt Object Model | object.html +Qt Open Source Edition | opensourceedition.html +Qt Open Source Edition License Agreement | license.html +Qt OpenGL 3D Graphics | opengl.html +Qt Plugins HOWTO | plugins-howto.html +Qt Reference Documentation (Open Source Edition) | index.html +Qt SQL Examples | sql-examples.html +Qt Template Library | qt-template-lib.html +Qt Template Library Classes | qtl.html +Qt Tutorial #1 - The 14 Steps | tutorial.html +Qt Tutorial - Chapter 10: Smooth as Silk | tutorial1-10.html +Qt Tutorial - Chapter 11: Giving It a Shot | tutorial1-11.html +Qt Tutorial - Chapter 12: Hanging in the Air the Way Bricks Don't | tutorial1-12.html +Qt Tutorial - Chapter 13: Game Over | tutorial1-13.html +Qt Tutorial - Chapter 14: Facing the Wall | tutorial1-14.html +Qt Tutorial - Chapter 1: Hello, World! | tutorial1-01.html +Qt Tutorial - Chapter 2: Calling it Quits | tutorial1-02.html +Qt Tutorial - Chapter 3: Family Values | tutorial1-03.html +Qt Tutorial - Chapter 4: Let There Be Widgets | tutorial1-04.html +Qt Tutorial - Chapter 5: Building Blocks | tutorial1-05.html +Qt Tutorial - Chapter 6: Building Blocks Galore! | tutorial1-06.html +Qt Tutorial - Chapter 7: One Thing Leads to Another | tutorial1-07.html +Qt Tutorial - Chapter 8: Preparing for Battle | tutorial1-08.html +Qt Tutorial - Chapter 9: With Cannon You Can | tutorial1-09.html +Qt Widget Hierarchy | qaxserver-demo-hierarchy.html +Qt Widget Hierarchy (in-process) | qaxserver-example-hierarchy.html +Qt XML Examples | xml-examples.html +Qt' OpenGL widgets as an ActiveX (executable) | qaxserver-example-opengl.html +Qt's Classes | classes.html +Qt's Main Classes | mainclasses.html +Qt's Tools | tools-list.html +Qt/Embedded | qws.html +Qt/Embedded Performance Tuning | emb-performance.html +Qt/Embedded Pointer Handling | emb-pointer.html +Qt/Embedded Virtual Framebuffer | emb-qvfb.html +Qt/Embedded as a VNC Server | emb-vnc.html +Qt/Embedded environment variables | emb-envvars.html +Qt/Mac Issues | mac-differences.html +Qt/Mac is Mac OS X Native | qtmac-as-native.html +Range controls | rangecontrols-example.html +Refactoring Existing Code | motif-walkthrough-7.html +Replacing the Print Dialog | motif-walkthrough-9.html +Replacing the View Widget | motif-walkthrough-8.html +Richtext | richtext-example.html +Rot13 | rot-example.html +Running Qt/Embedded applications | emb-running.html +SQL Module | sql.html +SQL Module - Drivers | sql-driver.html +SQL Table | sqltable-example.html +Scrollview | scrollview-example.html +Session Management | session.html +Setting Options | tutorial2-09.html +Setting the Application Icon | appicon.html +Shared Classes | shclass.html +Show Image | showimg-example.html +Signals and Slots | signalsandslots.html +Simple Addressbook | addressbook-example.html +Simple Filemanager | fileiconview-example.html +Simple HTML Help Browser | helpviewer-example.html +Simple Painting Application | scribble-example.html +Simple editor that can load encodings | qwerty-example.html +Small Table Example | small-table-example-example.html +Sound Example | sound-example.html +Splitter | splitter-example.html +Standard Accelerator Keys | accelerators.html +Standard Qt widgets as ActiveX controls (in-process) | qaxserver-example-wrapper.html +Standard Qt widgets in an HTML page | qaxserver-demo-wrapper.html +Starting processes with IO redirection | process-example.html +Step-by-step Examples | step-by-step-examples.html +Style overview | customstyles.html +Tabdialog | tabdialog-example.html +Table Example | statistics-example.html +Table Examples | table-examples.html +Table Module | table.html +Table of Prime Numbers 2-9999 | primes.html +Tablet Example | tablet-example.html +Taking Data | tutorial2-08.html +Tetrix | tetrix-example.html +Text Edit Example | textedit-example.html +Text Related Classes | text.html +Thanks! | credits.html +The 'Big Picture' | tutorial2-02.html +The ActiveQt framework | activeqt.html +The Coordinate System | coordsys.html +The DumpDoc Tool | activeqt-tools-dumpdoc.html +The Feature Definition File | emb-features.html +The IDC Tool | activeqt-tools-idc.html +The Project File | tutorial2-10.html +The QAxContainer Examples | qaxcontainer-examples.html +The QAxContainer Module | qaxcontainer.html +The QAxServer Examples | qaxserver-examples.html +The QAxServer Module | qaxserver.html +The Qt FAQ | faq.html +The Qt/Embedded-specific classes | emb-classes.html +Themes (Styles) | themes-example.html +Thread Support in Qt | threads.html +Threading | thread.html +Tic Tac Toe | tictac-example.html +Time and Date | time.html +Timers | timers.html +Toplevel Widgets | toplevel-example.html +Trademarks | trademarks.html +Transformed Graphics Demo | xform-example.html +Trivial Example | trivial-nsplugin-example.html +Tutorial #2 | tutorial2.html +Two simple Qt widgets | qaxserver-demo-multiple.html +Two simple Qt widgets (in-process) | qaxserver-example-multiple.html +User Interface Compiler (uic) | uic.html +Using Custom QDialogs | motif-walkthrough-4.html +Using Existing Dialogs with QMotifDialog | motif-walkthrough-5.html +Using Qt Main Window Classes | motif-walkthrough-6.html +Using Qt Standard Dialogs | motif-walkthrough-3.html +Using menus | menu-example.html +Using the Meta Object Compiler | moc.html +Using the Motif Event Loop | motif-customwidget-example.html +Walkthrough: A Simple Application | simple-application.html +Walkthrough: How to use the Qt SAX2 classes | xml-sax-walkthrough.html +Walkthrough: Using Qt objects in Microsoft .NET | activeqt-dotnet.html +Walkthrough: Using SAX2 features with the Qt XML classes | xml-sax-features-walkthrough.html +Why doesn't Qt use templates for signals and slots? | templates.html +Widget Appearance and Style | appearance.html +Widgets Example | widgets-example.html +Window Geometry | geometry.html +Window System-specific Notes | winsystem.html +Wizard | wizard-example.html +Workspace Module | workspace.html +Wrapping Up | tutorial2-11.html +Writing your own layout manager | customlayout.html +XML | xml-tools.html +XML Module | xml.html +Year 2000 Compliance Statement | y2k.html +chart/canvastext.h Example File | chart-canvastext-h.html +chart/canvasview.cpp Example File | chart-canvasview-cpp.html +chart/canvasview.h Example File | chart-canvasview-h.html +chart/chart.pro Example File | chart-chart-pro.html +chart/chartform.cpp Example File | chart-chartform-cpp.html +chart/chartform.h Example File | chart-chartform-h.html +chart/chartform_canvas.cpp Example File | chart-chartform_canvas-cpp.html +chart/chartform_files.cpp Example File | chart-chartform_files-cpp.html +chart/element.cpp Example File | chart-element-cpp.html +chart/element.h Example File | chart-element-h.html +chart/main.cpp Example File | chart-main-cpp.html +chart/optionsform.cpp Example File | chart-optionsform-cpp.html +chart/optionsform.h Example File | chart-optionsform-h.html +chart/setdataform.cpp Example File | chart-setdataform-cpp.html +chart/setdataform.h Example File | chart-setdataform-h.html +iconview/simple_dd/main.cpp Example File | iconview-simple_dd-main-cpp.html +iconview/simple_dd/main.h Example File | iconview-simple_dd-main-h.html +makeqpf | makeqpf.html +qaccel.h Include File | qaccel-h.html +qaccessible.h Include File | qaccessible-h.html +qaction.h Include File | qaction-h.html +qapplication.h Include File | qapplication-h.html +qasciicache.h Include File | qasciicache-h.html +qasciidict.h Include File | qasciidict-h.html +qassistantclient.h Include File | qassistantclient-h.html +qasyncimageio.h Include File | qasyncimageio-h.html +qasyncio.h Include File | qasyncio-h.html +qaxbase.h Include File | qaxbase-h.html +qaxbindable.h Include File | qaxbindable-h.html +qaxfactory.h Include File | qaxfactory-h.html +qaxobject.h Include File | qaxobject-h.html +qaxscript.h Include File | qaxscript-h.html +qaxwidget.h Include File | qaxwidget-h.html +qbig5codec.h Include File | qbig5codec-h.html +qbitarray.h Include File | qbitarray-h.html +qbitmap.h Include File | qbitmap-h.html +qbrush.h Include File | qbrush-h.html +qbuffer.h Include File | qbuffer-h.html +qbutton.h Include File | qbutton-h.html +qbuttongroup.h Include File | qbuttongroup-h.html +qcache.h Include File | qcache-h.html +qcanvas.h Include File | qcanvas-h.html +qcdestyle.h Include File | qcdestyle-h.html +qcheckbox.h Include File | qcheckbox-h.html +qclipboard.h Include File | qclipboard-h.html +qcolor.h Include File | qcolor-h.html +qcolordialog.h Include File | qcolordialog-h.html +qcombobox.h Include File | qcombobox-h.html +qcommonstyle.h Include File | qcommonstyle-h.html +qcopchannel_qws.h Include File | qcopchannel_qws-h.html +qcstring.h Include File | qcstring-h.html +qcursor.h Include File | qcursor-h.html +qdatabrowser.h Include File | qdatabrowser-h.html +qdatastream.h Include File | qdatastream-h.html +qdatatable.h Include File | qdatatable-h.html +qdataview.h Include File | qdataview-h.html +qdatetime.h Include File | qdatetime-h.html +qdatetimeedit.h Include File | qdatetimeedit-h.html +qdeepcopy.h Include File | qdeepcopy-h.html +qdesktopwidget.h Include File | qdesktopwidget-h.html +qdial.h Include File | qdial-h.html +qdialog.h Include File | qdialog-h.html +qdict.h Include File | qdict-h.html +qdir.h Include File | qdir-h.html +qdirectpainter_qws.h Include File | qdirectpainter_qws-h.html +qdns.h Include File | qdns-h.html +qdockarea.h Include File | qdockarea-h.html +qdockwindow.h Include File | qdockwindow-h.html +qdom.h Include File | qdom-h.html +qdragobject.h Include File | qdragobject-h.html +qdrawutil.h Include File | qdrawutil-h.html +qdropsite.h Include File | qdropsite-h.html +qeditorfactory.h Include File | qeditorfactory-h.html +qerrormessage.h Include File | qerrormessage-h.html +qeucjpcodec.h Include File | qeucjpcodec-h.html +qeuckrcodec.h Include File | qeuckrcodec-h.html +qevent.h Include File | qevent-h.html +qeventloop.h Include File | qeventloop-h.html +qfile.h Include File | qfile-h.html +qfiledialog.h Include File | qfiledialog-h.html +qfileinfo.h Include File | qfileinfo-h.html +qfocusdata.h Include File | qfocusdata-h.html +qfont.h Include File | qfont-h.html +qfontdatabase.h Include File | qfontdatabase-h.html +qfontdialog.h Include File | qfontdialog-h.html +qfontinfo.h Include File | qfontinfo-h.html +qfontmanager_qws.h Include File | qfontmanager_qws-h.html +qfontmetrics.h Include File | qfontmetrics-h.html +qframe.h Include File | qframe-h.html +qftp.h Include File | qftp-h.html +qgb18030codec.h Include File | qgb18030codec-h.html +qgfx_qws.h Include File | qgfx_qws-h.html +qgfxdriverfactory_qws.h Include File | qgfxdriverfactory_qws-h.html +qgfxdriverplugin_qws.h Include File | qgfxdriverplugin_qws-h.html +qgl.h Include File | qgl-h.html +qglcolormap.h Include File | qglcolormap-h.html +qglobal.h Include File | qglobal-h.html +qgrid.h Include File | qgrid-h.html +qgridview.h Include File | qgridview-h.html +qgroupbox.h Include File | qgroupbox-h.html +qguardedptr.h Include File | qguardedptr-h.html +qhbox.h Include File | qhbox-h.html +qhbuttongroup.h Include File | qhbuttongroup-h.html +qheader.h Include File | qheader-h.html +qhgroupbox.h Include File | qhgroupbox-h.html +qhostaddress.h Include File | qhostaddress-h.html +qhttp.h Include File | qhttp-h.html +qiconset.h Include File | qiconset-h.html +qiconview.h Include File | qiconview-h.html +qimage.h Include File | qimage-h.html +qimageformatplugin.h Include File | qimageformatplugin-h.html +qinputdialog.h Include File | qinputdialog-h.html +qintcache.h Include File | qintcache-h.html +qintdict.h Include File | qintdict-h.html +qiodevice.h Include File | qiodevice-h.html +qjiscodec.h Include File | qjiscodec-h.html +qkbddriverfactory_qws.h Include File | qkbddriverfactory_qws-h.html +qkbddriverplugin_qws.h Include File | qkbddriverplugin_qws-h.html +qkeyboard_qws.h Include File | qkeyboard_qws-h.html +qkeysequence.h Include File | qkeysequence-h.html +qlabel.h Include File | qlabel-h.html +qlayout.h Include File | qlayout-h.html +qlcdnumber.h Include File | qlcdnumber-h.html +qlibrary.h Include File | qlibrary-h.html +qlineedit.h Include File | qlineedit-h.html +qlistbox.h Include File | qlistbox-h.html +qlistview.h Include File | qlistview-h.html +qlocale.h Include File | qlocale-h.html +qlocalfs.h Include File | qlocalfs-h.html +qmacstyle_mac.h Include File | qmacstyle_mac-h.html +qmainwindow.h Include File | qmainwindow-h.html +qmap.h Include File | qmap-h.html +qmemarray.h Include File | qmemarray-h.html +qmenubar.h Include File | qmenubar-h.html +qmenudata.h Include File | qmenudata-h.html +qmessagebox.h Include File | qmessagebox-h.html +qmetaobject.h Include File | qmetaobject-h.html +qmime.h Include File | qmime-h.html +qmotif.h Include File | qmotif-h.html +qmotifdialog.h Include File | qmotifdialog-h.html +qmotifplusstyle.h Include File | qmotifplusstyle-h.html +qmotifstyle.h Include File | qmotifstyle-h.html +qmotifwidget.h Include File | qmotifwidget-h.html +qmouse_qws.h Include File | qmouse_qws-h.html +qmousedriverfactory_qws.h Include File | qmousedriverfactory_qws-h.html +qmousedriverplugin_qws.h Include File | qmousedriverplugin_qws-h.html +qmovie.h Include File | qmovie-h.html +qmultilineedit.h Include File | qmultilineedit-h.html +qmutex.h Include File | qmutex-h.html +qnamespace.h Include File | qnamespace-h.html +qnetwork.h Example File | qnetwork-h.html +qnetworkprotocol.h Include File | qnetworkprotocol-h.html +qnp.h Include File | qnp-h.html +qobject.h Include File | qobject-h.html +qobjectcleanuphandler.h Include File | qobjectcleanuphandler-h.html +qobjectlist.h Include File | qobjectlist-h.html +qpaintdevice.h Include File | qpaintdevice-h.html +qpaintdevicemetrics.h Include File | qpaintdevicemetrics-h.html +qpainter.h Include File | qpainter-h.html +qpair.h Include File | qpair-h.html +qpalette.h Include File | qpalette-h.html +qpen.h Include File | qpen-h.html +qpicture.h Include File | qpicture-h.html +qpixmap.h Include File | qpixmap-h.html +qpixmapcache.h Include File | qpixmapcache-h.html +qplatinumstyle.h Include File | qplatinumstyle-h.html +qpngio.h Include File | qpngio-h.html +qpoint.h Include File | qpoint-h.html +qpointarray.h Include File | qpointarray-h.html +qpopupmenu.h Include File | qpopupmenu-h.html +qprinter.h Include File | qprinter-h.html +qprocess.h Include File | qprocess-h.html +qprogressbar.h Include File | qprogressbar-h.html +qprogressdialog.h Include File | qprogressdialog-h.html +qptrcollection.h Include File | qptrcollection-h.html +qptrdict.h Include File | qptrdict-h.html +qptrlist.h Include File | qptrlist-h.html +qptrqueue.h Include File | qptrqueue-h.html +qptrstack.h Include File | qptrstack-h.html +qptrvector.h Include File | qptrvector-h.html +qpushbutton.h Include File | qpushbutton-h.html +qradiobutton.h Include File | qradiobutton-h.html +qrangecontrol.h Include File | qrangecontrol-h.html +qrect.h Include File | qrect-h.html +qregexp.h Include File | qregexp-h.html +qregion.h Include File | qregion-h.html +qrtlcodec.h Include File | qrtlcodec-h.html +qscrollbar.h Include File | qscrollbar-h.html +qscrollview.h Include File | qscrollview-h.html +qsemaphore.h Include File | qsemaphore-h.html +qserversocket.h Include File | qserversocket-h.html +qsessionmanager.h Include File | qsessionmanager-h.html +qsettings.h Include File | qsettings-h.html +qsgistyle.h Include File | qsgistyle-h.html +qsignal.h Include File | qsignal-h.html +qsignalmapper.h Include File | qsignalmapper-h.html +qsimplerichtext.h Include File | qsimplerichtext-h.html +qsize.h Include File | qsize-h.html +qsizegrip.h Include File | qsizegrip-h.html +qsizepolicy.h Include File | qsizepolicy-h.html +qsjiscodec.h Include File | qsjiscodec-h.html +qslider.h Include File | qslider-h.html +qsocket.h Include File | qsocket-h.html +qsocketdevice.h Include File | qsocketdevice-h.html +qsocketnotifier.h Include File | qsocketnotifier-h.html +qsortedlist.h Include File | qsortedlist-h.html +qsound.h Include File | qsound-h.html +qspinbox.h Include File | qspinbox-h.html +qsplashscreen.h Include File | qsplashscreen-h.html +qsplitter.h Include File | qsplitter-h.html +qsql.h Include File | qsql-h.html +qsqlcursor.h Include File | qsqlcursor-h.html +qsqldatabase.h Include File | qsqldatabase-h.html +qsqldriver.h Include File | qsqldriver-h.html +qsqldriverplugin.h Include File | qsqldriverplugin-h.html +qsqleditorfactory.h Include File | qsqleditorfactory-h.html +qsqlerror.h Include File | qsqlerror-h.html +qsqlfield.h Include File | qsqlfield-h.html +qsqlform.h Include File | qsqlform-h.html +qsqlindex.h Include File | qsqlindex-h.html +qsqlpropertymap.h Include File | qsqlpropertymap-h.html +qsqlquery.h Include File | qsqlquery-h.html +qsqlrecord.h Include File | qsqlrecord-h.html +qsqlresult.h Include File | qsqlresult-h.html +qsqlselectcursor.h Include File | qsqlselectcursor-h.html +qstatusbar.h Include File | qstatusbar-h.html +qstring.h Include File | qstring-h.html +qstringlist.h Include File | qstringlist-h.html +qstrlist.h Include File | qstrlist-h.html +qstyle.h Include File | qstyle-h.html +qstylefactory.h Include File | qstylefactory-h.html +qstyleplugin.h Include File | qstyleplugin-h.html +qstylesheet.h Include File | qstylesheet-h.html +qsyntaxhighlighter.h Include File | qsyntaxhighlighter-h.html +qtabbar.h Include File | qtabbar-h.html +qtabdialog.h Include File | qtabdialog-h.html +qtable.h Include File | qtable-h.html +qtabwidget.h Include File | qtabwidget-h.html +qtextbrowser.h Include File | qtextbrowser-h.html +qtextcodec.h Include File | qtextcodec-h.html +qtextcodecplugin.h Include File | qtextcodecplugin-h.html +qtextedit.h Include File | qtextedit-h.html +qtextstream.h Include File | qtextstream-h.html +qtextview.h Include File | qtextview-h.html +qthread.h Include File | qthread-h.html +qthreadstorage.h Include File | qthreadstorage-h.html +qtimer.h Include File | qtimer-h.html +qtoolbar.h Include File | qtoolbar-h.html +qtoolbox.h Include File | qtoolbox-h.html +qtoolbutton.h Include File | qtoolbutton-h.html +qtooltip.h Include File | qtooltip-h.html +qtranslator.h Include File | qtranslator-h.html +qtsciicodec.h Include File | qtsciicodec-h.html +qurl.h Include File | qurl-h.html +qurlinfo.h Include File | qurlinfo-h.html +qurloperator.h Include File | qurloperator-h.html +quuid.h Include File | quuid-h.html +qvalidator.h Include File | qvalidator-h.html +qvaluelist.h Include File | qvaluelist-h.html +qvaluestack.h Include File | qvaluestack-h.html +qvaluevector.h Include File | qvaluevector-h.html +qvariant.h Include File | qvariant-h.html +qvbox.h Include File | qvbox-h.html +qvbuttongroup.h Include File | qvbuttongroup-h.html +qvgroupbox.h Include File | qvgroupbox-h.html +qwaitcondition.h Include File | qwaitcondition-h.html +qwhatsthis.h Include File | qwhatsthis-h.html +qwidget.h Include File | qwidget-h.html +qwidgetfactory.h Include File | qwidgetfactory-h.html +qwidgetplugin.h Include File | qwidgetplugin-h.html +qwidgetstack.h Include File | qwidgetstack-h.html +qwindowdefs.h Include File | qwindowdefs-h.html +qwindowsstyle.h Include File | qwindowsstyle-h.html +qwindowsystem_qws.h Include File | qwindowsystem_qws-h.html +qwizard.h Include File | qwizard-h.html +qwmatrix.h Include File | qwmatrix-h.html +qworkspace.h Include File | qworkspace-h.html +qwsdecoration_qws.h Include File | qwsdecoration_qws-h.html +qxml.h Include File | qxml-h.html +qxtwidget.h Include File | qxtwidget-h.html +sql/overview/basicbrowsing/main.cpp Example File | sql-overview-basicbrowsing-main-cpp.html +sql/overview/basicbrowsing2/main.cpp Example File | sql-overview-basicbrowsing2-main-cpp.html +sql/overview/basicdatamanip/main.cpp Example File | sql-overview-basicdatamanip-main-cpp.html +sql/overview/connect1/main.cpp Example File | sql-overview-connect1-main-cpp.html +sql/overview/create_connections/main.cpp Example File | sql-overview-create_connections-main-cpp.html +sql/overview/custom1/main.cpp Example File | sql-overview-custom1-main-cpp.html +sql/overview/custom1/main.h Example File | sql-overview-custom1-main-h.html +sql/overview/delete/main.cpp Example File | sql-overview-delete-main-cpp.html +sql/overview/extract/main.cpp Example File | sql-overview-extract-main-cpp.html +sql/overview/form1/main.cpp Example File | sql-overview-form1-main-cpp.html +sql/overview/form2/main.h Example File | sql-overview-form2-main-h.html +sql/overview/insert/main.cpp Example File | sql-overview-insert-main-cpp.html +sql/overview/navigating/main.cpp Example File | sql-overview-navigating-main-cpp.html +sql/overview/order1/main.cpp Example File | sql-overview-order1-main-cpp.html +sql/overview/order2/main.cpp Example File | sql-overview-order2-main-cpp.html +sql/overview/retrieve1/main.cpp Example File | sql-overview-retrieve1-main-cpp.html +sql/overview/retrieve2/main.cpp Example File | sql-overview-retrieve2-main-cpp.html +sql/overview/subclass1/main.cpp Example File | sql-overview-subclass1-main-cpp.html +sql/overview/subclass2/main.cpp Example File | sql-overview-subclass2-main-cpp.html +sql/overview/subclass2/main.h Example File | sql-overview-subclass2-main-h.html +sql/overview/subclass3/main.cpp Example File | sql-overview-subclass3-main-cpp.html +sql/overview/subclass3/main.h Example File | sql-overview-subclass3-main-h.html +sql/overview/subclass4/main.cpp Example File | sql-overview-subclass4-main-cpp.html +sql/overview/subclass4/main.h Example File | sql-overview-subclass4-main-h.html +sql/overview/subclass5/main.cpp Example File | sql-overview-subclass5-main-cpp.html +sql/overview/subclass5/main.h Example File | sql-overview-subclass5-main-h.html +sql/overview/table1/main.cpp Example File | sql-overview-table1-main-cpp.html +sql/overview/table2/main.cpp Example File | sql-overview-table2-main-cpp.html +sql/overview/table3/main.cpp Example File | sql-overview-table3-main-cpp.html +sql/overview/table3/main.h Example File | sql-overview-table3-main-h.html +sql/overview/table4/main.cpp Example File | sql-overview-table4-main-cpp.html +sql/overview/table4/main.h Example File | sql-overview-table4-main-h.html +sql/overview/update/main.cpp Example File | sql-overview-update-main-cpp.html +t10/cannon.cpp Example File | t10-cannon-cpp.html +t10/cannon.h Example File | t10-cannon-h.html +t10/lcdrange.cpp Example File | t10-lcdrange-cpp.html +t10/lcdrange.h Example File | t10-lcdrange-h.html +t10/main.cpp Example File | t10-main-cpp.html +t11/cannon.cpp Example File | t11-cannon-cpp.html +t11/cannon.h Example File | t11-cannon-h.html +t11/lcdrange.cpp Example File | t11-lcdrange-cpp.html +t11/lcdrange.h Example File | t11-lcdrange-h.html +t11/main.cpp Example File | t11-main-cpp.html +t12/cannon.cpp Example File | t12-cannon-cpp.html +t12/cannon.h Example File | t12-cannon-h.html +t12/lcdrange.cpp Example File | t12-lcdrange-cpp.html +t12/lcdrange.h Example File | t12-lcdrange-h.html +t12/main.cpp Example File | t12-main-cpp.html +t13/cannon.cpp Example File | t13-cannon-cpp.html +t13/cannon.h Example File | t13-cannon-h.html +t13/gamebrd.cpp Example File | t13-gamebrd-cpp.html +t13/gamebrd.h Example File | t13-gamebrd-h.html +t13/lcdrange.cpp Example File | t13-lcdrange-cpp.html +t13/lcdrange.h Example File | t13-lcdrange-h.html +t13/main.cpp Example File | t13-main-cpp.html +t14/cannon.cpp Example File | t14-cannon-cpp.html +t14/cannon.h Example File | t14-cannon-h.html +t14/gamebrd.cpp Example File | t14-gamebrd-cpp.html +t14/gamebrd.h Example File | t14-gamebrd-h.html +t14/lcdrange.cpp Example File | t14-lcdrange-cpp.html +t14/lcdrange.h Example File | t14-lcdrange-h.html +t14/main.cpp Example File | t14-main-cpp.html +t7/lcdrange.cpp Example File | t7-lcdrange-cpp.html +t7/lcdrange.h Example File | t7-lcdrange-h.html +t7/main.cpp Example File | t7-main-cpp.html +t8/cannon.cpp Example File | t8-cannon-cpp.html +t8/cannon.h Example File | t8-cannon-h.html +t8/lcdrange.cpp Example File | t8-lcdrange-cpp.html +t8/lcdrange.h Example File | t8-lcdrange-h.html +t8/main.cpp Example File | t8-main-cpp.html +t9/cannon.cpp Example File | t9-cannon-cpp.html +t9/cannon.h Example File | t9-cannon-h.html +t9/lcdrange.cpp Example File | t9-lcdrange-cpp.html +t9/lcdrange.h Example File | t9-lcdrange-h.html +t9/main.cpp Example File | t9-main-cpp.html +table/bigtable/main.cpp Example File | table-bigtable-main-cpp.html +table/small-table-demo/main.cpp Example File | table-small-table-demo-main-cpp.html +table/statistics/statistics.cpp Example File | table-statistics-statistics-cpp.html +wizard/wizard.cpp Example File | wizard-wizard-cpp.html +wizard/wizard.h Example File | wizard-wizard-h.html + | classchart.html diff --git a/doc/html/toggleaction-example.html b/doc/html/toggleaction-example.html new file mode 100644 index 00000000..8e524740 --- /dev/null +++ b/doc/html/toggleaction-example.html @@ -0,0 +1,82 @@ + + + + + +A Tiny Example Featuring a Toggle Action + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

A Tiny Example Featuring a Toggle Action

+ + +

+

This example program demonstrates the use of TQAction +in its incarnation as a toggle action. +


+

Main: +

#include <qapplication.h>
+#include <qmainwindow.h>
+#include <qtoolbar.h>
+#include <qaction.h>
+
+#include "labelonoff.xpm"
+
+int main( int argc, char **argv )
+{
+    TQApplication app( argc, argv );
+    TQMainWindow * window = new TQMainWindow;
+    window->setCaption("TQt Example - Toggleaction");
+    TQToolBar * toolbar = new TQToolBar( window );
+
+    TQAction * labelonoffaction = new TQAction( window, "labelonoff" );
+    labelonoffaction->setToggleAction( TRUE );
+
+    labelonoffaction->setText( "labels on/off" );
+    labelonoffaction->setAccel( TQt::ALT+TQt::Key_L );
+    labelonoffaction->setIconSet( (TQPixmap) labelonoff_xpm );
+
+    TQObject::connect( labelonoffaction, SIGNAL( toggled( bool ) ),
+                      window, SLOT( setUsesTextLabel( bool ) ) );
+
+    labelonoffaction->addTo( toolbar );
+
+    app.setMainWidget( window );
+    window->show();
+    return app.exec();
+}
+
+
+ +

See also TQAction Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/toolbar.png b/doc/html/toolbar.png new file mode 100644 index 00000000..5e6021f0 Binary files /dev/null and b/doc/html/toolbar.png differ diff --git a/doc/html/toolbar1.png b/doc/html/toolbar1.png new file mode 100644 index 00000000..0f3358a1 Binary files /dev/null and b/doc/html/toolbar1.png differ diff --git a/doc/html/tools-list.html b/doc/html/tools-list.html new file mode 100644 index 00000000..cc1efaa5 --- /dev/null +++ b/doc/html/tools-list.html @@ -0,0 +1,65 @@ + + + + + +TQt's Tools + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt's Tools

+ + + +TQt is supplied with several command line and graphical tools to +ease and speed the development process. Each tool is listed here +with a link to its documentation. +

    +
  • TQt Designer - visually +design forms +
  • TQt Linguist, lupdate and lrelease - translate +applications to reach international markets +
  • TQt Assistant - tquickly find the +help you need +
  • qmake - create Makefiles from +simple platform-independent project files +
  • qembed - convert data, e.g. images, into C++ code +
  • qvfb - run and test embedded +applications on the desktop +
  • makeqpf - create pre-rendered fonts +for embedded devices +
  • moc - the Meta Object Compiler +
  • uic - the User Interface Compiler +
  • qtconfig - a Unix-based TQt configuration tool with online help +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tools.html b/doc/html/tools.html new file mode 100644 index 00000000..117ccefa --- /dev/null +++ b/doc/html/tools.html @@ -0,0 +1,93 @@ + + + + + +Non-GUI Classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Non-GUI Classes

+ + +

The non-GUI classes are general-purpose collection and string classes +that may be used independently of the GUI classes. +

In particular, these classes do not depend on TQApplication at all, +and so can be used in non-GUI programs. +

See also the introduction to the TQt collection +classes. +

+

+
TQAsciiCacheTemplate class that provides a cache based on char* keys +
TQAsciiCacheIteratorIterator for TQAsciiCache collections +
TQAsciiDictTemplate class that provides a dictionary based on char* keys +
TQAsciiDictIteratorIterator for TQAsciiDict collections +
TQBitArrayArray of bits +
TQByteArrayArray of bytes +
TQCacheTemplate class that provides a cache based on TQString keys +
TQCacheIteratorIterator for TQCache collections +
TQCStringAbstraction of the classic C zero-terminated char array (char *) +
TQDeepCopyTemplate class which ensures that implicitly shared and explicitly shared classes reference unique data +
TQDictTemplate class that provides a dictionary based on TQString keys +
TQDictIteratorIterator for TQDict collections +
TQIntCacheTemplate class that provides a cache based on long keys +
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 +
TQMemArrayTemplate class that provides arrays of simple types +
TQObjectListTQPtrList of TQObjects +
TQObjectListIteratorIterator for TQObjectLists +
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 +
TQPtrListTemplate class that provides a list +
TQPtrListIteratorIterator for TQPtrList collections +
TQPtrQueueTemplate class that provides a queue +
TQPtrStackTemplate class that provides a stack +
TQPtrVectorTemplate collection class that provides a vector (array) +
TQRegExpPattern matching using regular expressions +
TQStrIListDoubly-linked list of char* with case-insensitive comparison +
TQStringAbstraction of Unicode text and the classic C '\0'-terminated char array +
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 +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tooltip-example.html b/doc/html/tooltip-example.html new file mode 100644 index 00000000..e6980886 --- /dev/null +++ b/doc/html/tooltip-example.html @@ -0,0 +1,247 @@ + + + + + +Advanced use of tool tips + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Advanced use of tool tips

+ + +

+This example widget demonstrates how to use tool tips for static and +dynamic regions within a widget. +

It displays two blue and one red rectangle. The blue ones move every +time you click on them, the red one is static. There are dynamic +tool tips on the blue rectangles and a static tool tip on the red one. +


+

Header file: +

/****************************************************************************
+** $Id: qt/tooltip.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qwidget.h>
+#include <qtooltip.h>
+
+
+class DynamicTip : public TQToolTip
+{
+public:
+    DynamicTip( TQWidget * parent );
+
+protected:
+    void maybeTip( const TQPoint & );
+};
+
+
+class TellMe : public TQWidget
+{
+    Q_OBJECT
+public:
+    TellMe( TQWidget * parent = 0, const char * name = 0 );
+    ~TellMe();
+
+    TQRect tip( const TQPoint & );
+
+protected:
+    void paintEvent( TQPaintEvent * );
+    void mousePressEvent( TQMouseEvent * );
+    void resizeEvent( TQResizeEvent * );
+
+private:
+    TQRect randomRect();
+
+    TQRect r1, r2, r3;
+    DynamicTip * t;
+};
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/tooltip.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "tooltip.h"
+#include <qapplication.h>
+#include <qpainter.h>
+#include <stdlib.h>
+
+
+DynamicTip::DynamicTip( TQWidget * parent )
+    : TQToolTip( parent )
+{
+    // no explicit initialization needed
+}
+
+
+void DynamicTip::maybeTip( const TQPoint &pos )
+{
+    if ( !parentWidget()->inherits( "TellMe" ) )
+        return;
+
+    TQRect r( ((TellMe*)parentWidget())->tip(pos) );
+    if ( !r.isValid() )
+        return;
+
+    TQString s;
+    s.sprintf( "position: %d,%d", r.center().x(), r.center().y() );
+    tip( r, s );
+}
+
+
+TellMe::TellMe( TQWidget * parent , const char * name  )
+    : TQWidget( parent, name )
+{
+    setMinimumSize( 30, 30 );
+    r1 = randomRect();
+    r2 = randomRect();
+    r3 = randomRect();
+
+    t = new DynamicTip( this );
+
+    TQToolTip::add( this, r3, "this color is called red" ); // <- helpful
+}
+
+
+TellMe::~TellMe()
+{
+    delete t;
+    t = 0;
+}
+
+
+void TellMe::paintEvent( TQPaintEvent * e )
+{
+    TQPainter p( this );
+
+    // I try to be efficient here, and repaint only what's needed
+
+    if ( e->rect().intersects( r1 ) ) {
+        p.setBrush( blue );
+        p.drawRect( r1 );
+    }
+
+    if ( e->rect().intersects( r2 ) ) {
+        p.setBrush( blue );
+        p.drawRect( r2 );
+    }
+
+    if ( e->rect().intersects( r3 ) ) {
+        p.setBrush( red );
+        p.drawRect( r3 );
+    }
+}
+
+
+void TellMe::mousePressEvent( TQMouseEvent * e )
+{
+    if ( r1.contains( e->pos() ) )
+        r1 = randomRect();
+    if ( r2.contains( e->pos() ) )
+        r2 = randomRect();
+    repaint();
+}
+
+
+void TellMe::resizeEvent( TQResizeEvent * )
+{
+    if ( !rect().contains( r1 ) )
+         r1 = randomRect();
+    if ( !rect().contains( r2 ) )
+         r2 = randomRect();
+}
+
+
+TQRect TellMe::randomRect()
+{
+    return TQRect( ::rand() % (width() - 20), ::rand() % (height() - 20),
+                  20, 20 );
+}
+
+
+TQRect TellMe::tip( const TQPoint & p )
+{
+    if ( r1.contains( p ) )
+        return r1;
+    else if ( r2.contains( p ) )
+        return r2;
+    else
+        return TQRect( 0,0, -1,-1 );
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+#include "tooltip.h"
+
+int main( int argc, char ** argv )
+{
+    TQApplication a( argc, argv );
+
+    TellMe mw;
+    mw.setCaption( "TQt Example - Dynamic Tool Tips" );
+    a.setMainWidget( &mw );
+    mw.show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/toplevel-example.html b/doc/html/toplevel-example.html new file mode 100644 index 00000000..4d6b998e --- /dev/null +++ b/doc/html/toplevel-example.html @@ -0,0 +1,239 @@ + + + + + +Toplevel Widgets + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Toplevel Widgets

+ + + +

+This example demonstrates the use of TQt's widget flags to provide +toplevel widgets with customized window decorations. +

It provides a graphical user interface for selecting different +options for widget decoration and behavior, and passes the +appropriate widget flags to the TQWidget constructor. +TQWidget::reparent() is used to change the widget flags at runtime. +

Warning: Note that the interpretation and functionality of the +widget flags depends on the window manager used when running the +application. Many window managers do not support every possible flag +combination. +

The user interface providing the different options was created using +TQt Designer. The different +options are explained in the user interface through the use of +tooltips and What's This help. Load the options.ui file into +TQt Designer for more details. +

+ +

    #include <qapplication.h>
+    #include "options.h"
+
+    int main( int argc, char ** argv )
+    {
+        TQApplication a( argc, argv );
+        OptionsDialog dlg;
+        return dlg.exec();
+    }
+
+

The main function creates and displays the dialog for the user +interface. Note that this dialog is modal. +

The code relevant for this example is in the options.ui.h +file. +

+ +

    void OptionsDialog::apply()
+    {
+        TQStringList flagList;
+        bool wstyle = false;
+        WFlags f = WDestructiveClose | WType_TopLevel | WStyle_Customize;
+
+

The apply() slot declares the widget flag variable f +and initializes it with the values +

    +
  • WDestructiveClose - the widget will be automatically +destroyed when it is closed, +
  • WType_TopLevel - the widget will be top level even if it +has a parent widget, and +
  • WStyle_Customize - the flags override the default values +
+Other flags are used depending on the options selected in the user +interface. +

        if ( bgBorder->isChecked() ) {
+            if ( rbBorderNormal->isChecked() ) {
+                f |= WStyle_NormalBorder;
+                flagList += "WStyle_NormalBorder";
+                wstyle = true;
+            }
+            else if ( rbBorderDialog->isChecked() ) {
+                f |= WStyle_DialogBorder;
+                flagList += "WStyle_DialogBorder";
+                wstyle = true;
+            }
+
The window gets a normal or dialog border depending on the selected +option. +

            if ( bgTitle->isChecked() ) {
+                f |= WStyle_Title;
+                flagList += "WStyle_Title";
+                wstyle = true;
+                if ( cbTitleSystem->isChecked() ) {
+                    f |= WStyle_SysMenu;
+                    flagList += "WStyle_SysMenu";
+                }
+                if ( cbTitleMinimize->isChecked() ) {
+                    f |= WStyle_Minimize;
+                    flagList += "WStyle_Minimize";
+                }
+                if ( cbTitleMaximize->isChecked() ) {
+                    f |= WStyle_Maximize;
+                    flagList += "WStyle_Maximize";
+                }
+                if ( cbTitleContext->isChecked() ) {
+                    f |= WStyle_ContextHelp;
+                    flagList += "WStyle_ContextHelp";
+                }
+            }
+
A titlebar with controls is provided if the appropriate options +have been checked. +

        } else {
+            f |= WStyle_NoBorder;
+            flagList += "WStyle_NoBorder";
+            wstyle = true;
+        }
+
If the window should not have a border it cannot have a titlebar. +Widgets that provide their own (e.g. themed) window decoration +should use this flag. +

        TQWidget *parent = this;
+        if ( cbBehaviorTaskbar->isChecked() ) {
+            parent = 0;
+            f |= WGroupLeader;
+            flagList += "WGroupLeader";
+        }
+
If a toplevel widget has a parent it will not have a taskbar +entry, and on most window managers it will always stay on +top of the parent widget. This is the standard behavior for +dialog boxes, especially if they are modeless, and for other +secondary toplevel widgets. +

To provide a taskbar entry the widget must have no parent, +in which case we need to use the WGroupLeader flag to +prevent blocking through the modal main dialog. Applications +that can have multiple toplevel windows open simultaneously +should use this combination. +

        if ( cbBehaviorStays->isChecked() ) {
+            f |= WStyle_StaysOnTop /*| WX11BypassWM*/;
+            flagList += "WStyle_StaysOnTop";
+            wstyle = true;
+        }
+
A toplevel widget can stay on top of the whole desktop if the +window manager supports this functionality. +(1) +

Widgets that display important or realtime information (i.e. IRC +clients) might benefit from using that flag. +

        if ( cbBehaviorPopup->isChecked() ) {
+            f |= WType_Popup;
+            flagList += "WType_Popup";
+        }
+
A popup widget is a short lived modal widget that closes +automatically. Popup menus are a typical example for such widgets. +

        if ( cbBehaviorModal->isChecked() ) {
+            f |= WShowModal;
+            flagList += "WShowModal";
+        }
+
A modal widget blocks input to other toplevel widgets, unless +those are in a different modal group (see WGroupLeader). +Dialogs are often modal, and the TQDialog class provides an easy API +to create and display them without the need to explicitly use this +flag. +

        if ( cbBehaviorTool->isChecked() ) {
+            f |= WStyle_Tool;
+            flagList += "WStyle_Tool";
+            wstyle = true;
+        }
+
+        if (wstyle)
+            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 +modeless dialogs. +

        if ( !widget ) {
+            widget = new TQVBox( parent, 0, f );
+            widget->setMargin( 20 );
+            TQLabel *label = new TQLabel(flagList.join("&nbsp;| "), widget);
+            label->setTextFormat(RichText);
+            label->setAlignment(WordBreak);
+            TQPushButton *okButton = new TQPushButton( "Close", widget );
+            connect( okButton, SIGNAL(clicked()), widget, SLOT(close()) );
+            widget->move( pos() );
+
The widget is created if it has not been created yet, or if it was +closed (since we use the WDestructiveClose flag). Note that the +window is not visible yet. +(2) +

        } else {
+            widget->reparent( parent, f, widget->geometry().topLeft(), FALSE);
+        }
+
If the widget has already been created the reparent() function is +used to modify the widget's flags. The widget's geometry is not +changed, and the window is not shown again. +

        widget->setCaption( leCaption->text() );
+        widget->setIcon( leIcon->text() );
+        widget->setWindowOpacity(double(slTransparency->maxValue() - slTransparency->value()) / 100);
+
+        widget->show();
+
Finally the higher level properties such as the window's caption and +icon are set. The window transparency is set according to the slider +value. Note that this will only have effect on systems that support +this attribute for toplevel window. +

    }
+
Finally the window is shown with the new attributes. +

To build the example go to the toplevel directory +(QTDIR/examples/toplevel) +(3) +and run qmake to generate the makefile, then use the make tool to +build the library. + +


+
  1. +Unfortunately some X11 window managers also retquire the WX11BypassWM flag to be set in addition; but some other X11 window +managers will have problems if this flag is set. Back...
  2. +The example uses TQGuardedPtr to make sure that the +pointer is reset to zero when the widget object is destroyed +due to the WDestructiveClose flag. Back...
  3. + +We use QTDIR to stand for the directory where TQt is installed. + Back...
+

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/trademarks.html b/doc/html/trademarks.html new file mode 100644 index 00000000..f300a964 --- /dev/null +++ b/doc/html/trademarks.html @@ -0,0 +1,48 @@ + + + + + +Trademarks + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Trademarks

+ + + +

Trolltech®, TQt® and the Trolltech logo are registered +trademarks of Trolltech. Linux® is a trademark of Linus +Torvalds. All other products named in the documentation are +trademarks of their respective owners. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/trivial-nsplugin-example.html b/doc/html/trivial-nsplugin-example.html new file mode 100644 index 00000000..fb799872 --- /dev/null +++ b/doc/html/trivial-nsplugin-example.html @@ -0,0 +1,125 @@ + + + + + +Trivial Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Trivial Example

+ + + +

This example is trivial, and thus useful for +investigating problems you might have installing the +extension. +

To build the example, you must first build the +TQt Netscape Plugin Extension library. +Then type make in extensions/nsplugin/examples/trivial/ +and copy the resulting trivial.so or nptrivial.dll +to the Plugins directory of your WWW browser. +

+


+Implementation: +

// TQt stuff
+#include "qnp.h"
+#include <qpainter.h>
+#include <qmessagebox.h>
+
+class Trivial : public TQNPWidget {
+    Q_OBJECT
+public:
+    void mouseReleaseEvent(TQMouseEvent* event)
+    {
+        TQMessageBox::aboutTQt(this);
+    }
+
+    void paintEvent(TQPaintEvent* event)
+    {
+        TQPainter p(this);
+        p.setClipRect(event->rect());
+        int w = width();
+        p.drawRect(rect());
+        p.drawText(w/8, 0, w-w/4, height(), AlignCenter|WordBreak, "Trivial!");
+    }
+};
+
+class TrivialInstance : public TQNPInstance {
+    Q_OBJECT
+public:
+    TQNPWidget* newWindow()
+    {
+        return new Trivial;
+    }
+
+    void print(TQPainter* p)
+    {
+        p->drawText(0,0,"Hello");
+    }
+};
+
+class TrivialPlugin : public TQNPlugin {
+public:
+    TQNPInstance* newInstance()
+    {
+        return new TrivialInstance;
+    }
+
+    const char* getMIMEDescription() const
+    {
+        return "trivial/very:xxx:Trivial and useless";
+    }
+
+    const char * getPluginNameString() const
+    {
+        return "Trivial TQt-based Plugin";
+    }
+
+    const char * getPluginDescriptionString() const
+    {
+        return "A TQt-based LiveConnected plug-in that does nothing";
+    }
+
+};
+
+TQNPlugin* TQNPlugin::create()
+{
+    return new TrivialPlugin;
+}
+
+#include "trivial.moc"
+
+ +

See also Netscape Plugin Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/troll.html b/doc/html/troll.html new file mode 100644 index 00000000..12f4a7e0 --- /dev/null +++ b/doc/html/troll.html @@ -0,0 +1,149 @@ + + + + + +Company Information + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Company Information

+ + +

Trolltech is an international software company with +headquarters in Oslo, the capital of Norway, and with offices +in Brisbane, Australia, and Redwood City, California. +

Our flagship product is TQt, the +multi-platform C++ GUI toolkit. TQt enables you to build professional, +efficient, portable and maintainable GUI applications tquickly and +easily. +

TQt/Embedded, the embedded version of TQt, is designed to power +todays new generation of embedded computers and electronic consumer +devices. On top of that, TQtopia +provides a window system and application suite for handheld devices. +

Software that makes Sense +

+

Our motto expresses the vision behind our products. We design our +products to give our customers the feeling of "this is the way +that things were always meant to be". +

We know that it is crucial for our customers to have good tools for +making good software. Therefore, we do not compromise our demands for +superior design and technical quality when we develop our +products. +

Trolltech is also known for providing top quality technical support +to our customers. At Trolltech, support intquiries are handled by the +most qualified developers and designers themselves. +

History +

+

Trolltech was founded in 1994. The core team of designers at Trolltech +started developing TQt in 1992, and the first commercial version of TQt was +released in 1995. Since then, Trolltech has experienced rapid growth, and +TQt is currently used in thousands of successful commercial software +development projects world wide. At Trolltech, we continously work to +improve and expand TQt to ensure that it always represents the state of the +art in usability, look and feel, performance, and stability. +

For more information, please visit the Trolltech website. +

Contact Information +

+


+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Email

info@trolltech.com +

sales@trolltech.com +

General intquiries and questions. Please check the +FAQ to see if your question is already answered there.
Intquires related to purchasing, pricing and availability of +Trolltech products
www@trolltech.com +qt-bugs@trolltech.com +

Comments about our web pages
+Use this address for bug reports; please read (the very short) +How to Report a Bug page first. +

Note that Trolltech uses the +RBL and +RSS databases to cut down on +spam. If your mail server is listed, you will regrettably not be able to +send us mail. The MAPS TSI +pages provide information about how to secure your server. +
 
 
Norway Office

Telephone +Street/Mail Address +

General intquiries: +47 21 60 48 00
Sandakerveien 116
PO Box 4332 Nydalen
NO-0402 Oslo
Norway
Telefax

All intquiries: +47 21 60 48 01
 
 
USA Office

Telephone +Street/Mail Address +

General intquiries: (+1) 650-551-1676
555 Twin Dolphin Drive
Suite 280
Redwood City, CA 94065
USA
Telefax

All intquiries: (+1) 650-551-1851
+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tt1_en.png b/doc/html/tt1_en.png new file mode 100644 index 00000000..66e54e02 Binary files /dev/null and b/doc/html/tt1_en.png differ diff --git a/doc/html/tt1_la.png b/doc/html/tt1_la.png new file mode 100644 index 00000000..a7013490 Binary files /dev/null and b/doc/html/tt1_la.png differ diff --git a/doc/html/tt2_en.png b/doc/html/tt2_en.png new file mode 100644 index 00000000..c71e2010 Binary files /dev/null and b/doc/html/tt2_en.png differ diff --git a/doc/html/tt2_fr.png b/doc/html/tt2_fr.png new file mode 100644 index 00000000..acc25157 Binary files /dev/null and b/doc/html/tt2_fr.png differ diff --git a/doc/html/tt2_nl.png b/doc/html/tt2_nl.png new file mode 100644 index 00000000..4631de21 Binary files /dev/null and b/doc/html/tt2_nl.png differ diff --git a/doc/html/tt3_10_en.png b/doc/html/tt3_10_en.png new file mode 100644 index 00000000..e95bff9e Binary files /dev/null and b/doc/html/tt3_10_en.png differ diff --git a/doc/html/tt3_10_pt_bad.png b/doc/html/tt3_10_pt_bad.png new file mode 100644 index 00000000..05cb5f3c Binary files /dev/null and b/doc/html/tt3_10_pt_bad.png differ diff --git a/doc/html/tt3_10_pt_good.png b/doc/html/tt3_10_pt_good.png new file mode 100644 index 00000000..b0f855f5 Binary files /dev/null and b/doc/html/tt3_10_pt_good.png differ diff --git a/doc/html/tt3_11_about_pt.png b/doc/html/tt3_11_about_pt.png new file mode 100644 index 00000000..44673144 Binary files /dev/null and b/doc/html/tt3_11_about_pt.png differ diff --git a/doc/html/tt3_11_en.png b/doc/html/tt3_11_en.png new file mode 100644 index 00000000..7d98b98c Binary files /dev/null and b/doc/html/tt3_11_en.png differ diff --git a/doc/html/tt3_11_pt.png b/doc/html/tt3_11_pt.png new file mode 100644 index 00000000..02910cf0 Binary files /dev/null and b/doc/html/tt3_11_pt.png differ diff --git a/doc/html/tutorial.html b/doc/html/tutorial.html new file mode 100644 index 00000000..4c367919 --- /dev/null +++ b/doc/html/tutorial.html @@ -0,0 +1,75 @@ + + + + + +TQt Tutorial #1 - The 14 Steps + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial #1 - The 14 Steps

+ + +

This tutorial gives an introduction to GUI programming using the TQt +toolkit. It doesn't cover everything: the emphasis is on teaching the +programming philosophy of GUI programming, and TQt's features are +introduced as needed. Some commonly used features are never used in +this tutorial. +

Chapter one starts with a ten-line hello-world and each subsequent +chapter introduces one or a few more concepts. By Chapter 14, the ten +lines from Chapter 1 have turned into a 650-line game. +

If you're completely new to TQt, please read How to Learn TQt if you haven't already done so. +

Tutorial chapters: +

    +
  1. Hello, World! +
  2. Calling it Quits +
  3. Family Values +
  4. Let There Be Widgets +
  5. Building Blocks +
  6. Building Blocks Galore! +
  7. One Thing Leads to Another +
  8. Preparing for Battle +
  9. With Cannon You Can +
  10. Smooth as Silk +
  11. Giving It a Shot +
  12. Hanging in the Air the Way Bricks Don't +
  13. Game Over +
  14. Facing the Wall +
+

This little game doesn't look much like a modern GUI application. It +uses a good few of the GUI techniques, but after you've worked through +it, we recommend reading Tutorial #2. The +second tutorial is a little more formal and covers the features of +typical application including menubars, toolbars, loading and saving, +dialogs, etc. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-01.html b/doc/html/tutorial1-01.html new file mode 100644 index 00000000..97005180 --- /dev/null +++ b/doc/html/tutorial1-01.html @@ -0,0 +1,168 @@ + + + + + +TQt Tutorial - Chapter 1: Hello, World! + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 1: Hello, World!

+ + +

Screenshot of tutorial one
+

This first program is a simple hello-world example. It contains only +the bare minimum you need to get a TQt application up and running. +The picture above is a snapshot of this program. +

/****************************************************************
+**
+** TQt tutorial 1
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    TQPushButton hello( "Hello world!", 0 );
+    hello.resize( 100, 30 );
+
+    a.setMainWidget( &hello );
+    hello.show();
+    return a.exec();
+}
+
+ + + +

Line-by-line Walkthrough +

+

    #include <qapplication.h>
+
+

This line includes the TQApplication class definition. There has to be +exactly one TQApplication object in every application that uses TQt. +TQApplication manages various application-wide resources, such as the +default font and cursor. +

    #include <qpushbutton.h>
+
+

This line includes the TQPushButton class definition. The +reference documentation for each class +mentions at the top which file needs to be included to use that class. +

TQPushButton is a classical GUI push button that the user can press +and release. It manages its own look and feel, like every other TQWidget. A widget is a user interface object that can process user +input and draw graphics. The programmer can change both the overall +look and feel and many minor +properties of it (such as color), as well as the widget's content. A +TQPushButton can show either a text or a TQPixmap. +

    int main( int argc, char **argv )
+    {
+
+

The main() function is the entry point to the program. Almost always +when using TQt, main() only needs to perform some kind of initialization +before passing the control to the TQt library, which then tells the +program about the user's actions via events. +

argc is the number of command-line arguments and argv is the +array of command-line arguments. This is a C/C++ feature. It is not +specific to TQt; however, TQt needs to process these arguments (see +following). +

        TQApplication a( argc, argv );
+
+

a is this program's TQApplication. Here it is created and processes +some of the command-line arguments (such as -display under X Window). +Note that all command-line arguments recognized by TQt are removed from +argv (and argc is decremented accordingly). See the TQApplication::argv() documentation for details. +

Note: It is essential that the TQApplication object be +created before any window-system parts of TQt are used. +

        TQPushButton hello( "Hello world!", 0 );
+
+

Here, after the TQApplication, comes the first window-system code: A +push button is created. +

The button is set up to display the text "Hello world!" and be a +window of its own (because the constructor specifies 0 for the parent +window, inside which the button should be located). +

        hello.resize( 100, 30 );
+
+

The button is set up to be 100 pixels wide and 30 pixels high (plus the +window system frame). In this case we don't care about the button's +position, and we accept the default value. +

        a.setMainWidget( &hello );
+
+

The push button is chosen as the main widget for the application. If +the user closes a main widget, the application exits. +

You don't have to have a main widget, but most programs do have one. +

        hello.show();
+
+

A widget is never visible when you create it. You must call show() to +make it visible. +

        return a.exec();
+
+

This is where main() passes control to TQt, and exec() will return when +the application exits. +

In exec(), TQt receives and processes user and system events and passes +these on to the appropriate widgets. +

    }
+
+

You should now try to compile and run this program. +

+

Compiling +

+

To compile a C++ application you need to create a makefile. The +easiest way to create a makefile for TQt is to use the qmake build tool supplied with TQt. If you've +saved main.cpp in its own directory, all you have to do is: +

+qmake -project
+qmake
+
+ +

The first command tells qmake to +create a .pro (project) file. The second command tells it to create +a (platform-specific) makefile based on the project file. You should +now be able to type make (or nmake if you're using Visual +Studio) and then run your first TQt application! +

Behavior +

+

When you run it, you will see a small window filled with a single +button, and on it you can read the famous words, Hello World! +

Exercises +

+

Try to resize the window. Press the button. If you're running X +Window, try running the program with the -geometry option +(for example, -geometry 100x200+10+20). +

You're now ready for Chapter 2. +

[Next tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-02.html b/doc/html/tutorial1-02.html new file mode 100644 index 00000000..125537d4 --- /dev/null +++ b/doc/html/tutorial1-02.html @@ -0,0 +1,128 @@ + + + + + +TQt Tutorial - Chapter 2: Calling it Quits + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 2: Calling it Quits

+ + +

Screenshot of tutorial two
+

Having created a window in Chapter 1, we will +now go on to make the application tquit properly when the user tells it to. +

We will also use a font that is more exciting than the default one. +

/****************************************************************
+**
+** TQt tutorial 2
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qfont.h>
+
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    TQPushButton tquit( "Quit", 0 );
+    tquit.resize( 75, 30 );
+    tquit.setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    TQObject::connect( &tquit, SIGNAL(clicked()), &a, SLOT(tquit()) );
+
+    a.setMainWidget( &tquit );
+    tquit.show();
+    return a.exec();
+}
+
+ + + +

Line-by-line Walkthrough +

+

    #include <qfont.h>
+
+

Since this program uses TQFont, it needs to include qfont.h. TQt's font +abstraction is rather different from the horror provided by X, and +loading and using fonts has been highly optimized. +

        TQPushButton tquit( "Quit", 0 );
+
+

This time, the button says "Quit" and that's exactly what the program +will do when the user clicks the button. This is not a coincidence. +We still pass 0 as the parent, since the button is a top-level window. +

        tquit.resize( 75, 30 );
+
+

We've chosen another size for the button since the text is a bit +shorter than "Hello world!". We could also have used TQFontMetrics +to set right size. +

        tquit.setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+

Here we choose a new font for the button, an 18-point bold font from +the Times family. Note that we create the font on the spot. +

It is also possible to change the default font (using TQApplication::setFont()) for the whole application. +

        TQObject::connect( &tquit, SIGNAL(clicked()), &a, SLOT(tquit()) );
+
+

connect() is perhaps the most central feature of TQt. +Note that connect() is a static function in TQObject. Do not confuse it +with the connect() function in the socket library. +

This line establishes a one-way connection between two TQt objects (objects +that inherit TQObject, directly or indirectly). Every TQt object can have +both signals (to send messages) and slots (to receive messages). All +widgets are TQt objects. They inherit TQWidget which in turn inherits +TQObject. +

Here, the clicked() signal of tquit is connected to the tquit() slot of a, so that when the button is clicked, the +application tquits. +

The Signals and Slots documentation +describes this topic in detail. +

Behavior +

+

When you run this program, you will see an even smaller window than in +Chapter 1, filled with an even smaller button. +

(See Compiling for how to create a +makefile and build the application.) +

Exercises +

+

Try to resize the window. Press the button. Oops! That connect() +would seem to make some difference. +

Are there any other signals in TQPushButton you can connect to tquit? +Hint: The TQPushButton inherits most of its behavior from TQButton. +

You're now ready for Chapter 3. +

[Previous tutorial] +[Next tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-03.html b/doc/html/tutorial1-03.html new file mode 100644 index 00000000..b7bb972d --- /dev/null +++ b/doc/html/tutorial1-03.html @@ -0,0 +1,122 @@ + + + + + +TQt Tutorial - Chapter 3: Family Values + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 3: Family Values

+ + +

Screenshot of tutorial three
+

This example shows how to create parent and child widgets. +

We'll keep it simple and use just a single parent and a lone child. +

/****************************************************************
+**
+** TQt tutorial 3
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qfont.h>
+#include <qvbox.h>
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    TQVBox box;
+    box.resize( 200, 120 );
+
+    TQPushButton tquit( "Quit", &box );
+    tquit.setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    TQObject::connect( &tquit, SIGNAL(clicked()), &a, SLOT(tquit()) );
+
+    a.setMainWidget( &box );
+    box.show();
+
+    return a.exec();
+}
+
+ + + +

Line-by-line Walkthrough +

+

    #include <qvbox.h>
+
+

We add an include of qvbox.h to get the layout class we'll use. +

        TQVBox box;
+
+

Here we simply create a vertical box container. The TQVBox arranges +its child widgets in a vertical row, one above the other, handing out +space according to each child's TQWidget::sizePolicy(). +

        box.resize( 200, 120 );
+
+

We set its width to 200 pixels and the height to 120 pixels. +

        TQPushButton tquit( "Quit", &box );
+
+

A child is born. +

This TQPushButton is created with both a text ("Quit") and a parent +(box). A child widget is always on top of its parent. When +displayed, it is clipped by its parent's bounds. +

The parent widget, the TQVBox, automatically adds the child centered in +its box. Because nothing else is added, the button gets all the space +the parent has. +

        box.show();
+
+

When a parent widget is shown, it will call show for all its children +(except those on which you have done an explicit TQWidget::hide()). +

Behavior +

+

The button no longer fills the entire widget. Instead, it gets a +"natural" size. This is because there is now a new top-level widget, +which uses the button's size hint and size change policy to set the +button's size and position. (See TQWidget::sizeHint() and TQWidget::setSizePolicy() for more information about these functions.) +

(See Compiling for how to create a +makefile and build the application.) +

Exercises +

+

Try resizing the window. How does the button change? What is the +button's size-change policy? What happens to the button's height if +you run the program with a bigger font? What happens if you try to +make the window really small? +

You're now ready for Chapter 4. +

[Previous tutorial] +[Next tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-04.html b/doc/html/tutorial1-04.html new file mode 100644 index 00000000..005aa983 --- /dev/null +++ b/doc/html/tutorial1-04.html @@ -0,0 +1,182 @@ + + + + + +TQt Tutorial - Chapter 4: Let There Be Widgets + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 4: Let There Be Widgets

+ + +

Screenshot of tutorial four
+

This example shows how to create your own widget, describes how to control the +minimum and maximum sizes of a widget, and introduces widget names. +

/****************************************************************
+**
+** TQt tutorial 4
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qfont.h>
+
+
+class MyWidget : public TQWidget
+{
+public:
+    MyWidget( TQWidget *parent=0, const char *name=0 );
+};
+
+
+MyWidget::MyWidget( TQWidget *parent, const char *name )
+        : TQWidget( parent, name )
+{
+    setMinimumSize( 200, 120 );
+    setMaximumSize( 200, 120 );
+
+    TQPushButton *tquit = new TQPushButton( "Quit", this, "tquit" );
+    tquit->setGeometry( 62, 40, 75, 30 );
+    tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+}
+
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    MyWidget w;
+    w.setGeometry( 100, 100, 200, 120 );
+    a.setMainWidget( &w );
+    w.show();
+    return a.exec();
+}
+
+ + + +

Line-by-line Walkthrough +

+

    class MyWidget : public TQWidget
+    {
+    public:
+        MyWidget( TQWidget *parent=0, const char *name=0 );
+    };
+
+

Here we create a new class. Because this class inherits from TQWidget, +the new class is a widget and may be a top level window or a child +widget (like the push button in Chapter 3). +

This class has only one member, a constructor (in addition to the +members it inherits from TQWidget). The constructor is a standard TQt +widget constructor; you should always include a similar constructor +when you create widgets. +

The first argument is its parent widget. To create a top-level window +you specify a null pointer as the parent. As you can see, this widget +defaults to be a top-level window. +

The second argument is the widget's name. This is not the text +that appears in the window's title bar or in the button. It is a name +associated with a widget to make it possible to look up this widget later, and there is +also a handy debugging function that will list a complete widget hierarchy. +

    MyWidget::MyWidget( TQWidget *parent, const char *name )
+            : TQWidget( parent, name )
+
+

The implementation of the constructor starts here. Like most widgets, +it just passes on the parent and name to the TQWidget +constructor. +

    {
+        setMinimumSize( 200, 120 );
+        setMaximumSize( 200, 120 );
+
+

Because this widget doesn't know how to handle resizing, we fix its size +by setting the minimum and maximum to be equal. In the next chapter +we will show how a widget can respond to resize event from the user. +

        TQPushButton *tquit = new TQPushButton( "Quit", this, "tquit" );
+        tquit->setGeometry( 62, 40, 75, 30 );
+        tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+

Here we create and set up a child widget of this widget (the new widget's +parent is this) which has the widget name "tquit". The widget +name has nothing to do with the button text; it just happens to be +similar in this case. +

Note that tquit is a local variable in the constructor. MyWidget +does not keep track of it, but TQt does, and will by default delete it +when MyWidget is deleted. This is why MyWidget doesn't need a +destructor. (On the other hand, there is no harm in deleting a child +when you choose to, the child will automatically tell TQt about its +imminent death.) +

The setGeometry() call does the same as move() and resize() did in the +previous chapters. +

        connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+    }
+
+

Because the MyWidget class doesn't know about the application object, it +has to connect to TQt's pointer to it, qApp. +

A widget is a software component and should know as little as possible +about its environment in order to be as general and reusable as +possible. +

Knowing the name of the application object would break this principle, +so TQt offers an alias, qApp, for the cases in which a component such as +MyWidget needs to talk to the application object. +

    int main( int argc, char **argv )
+    {
+        TQApplication a( argc, argv );
+
+        MyWidget w;
+        w.setGeometry( 100, 100, 200, 120 );
+        a.setMainWidget( &w );
+        w.show();
+        return a.exec();
+    }
+
+

Here we instantiate our new child, set it to be the main widget, and +execute the application. +

Behavior +

+

This program is very similar in behavior to the previous one. The +difference lies in the way we have implemented it. It does behave +slightly differently, however. Just try to resize it to see. +

(See Compiling for how to create a +makefile and build the application.) +

Exercises +

+

Try to create another MyWidget object in main(). What happens? +

Try to add more buttons or put in widgets other than TQPushButton. +

You're now ready for Chapter 5. +

[Previous tutorial] +[Next tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-05.html b/doc/html/tutorial1-05.html new file mode 100644 index 00000000..8aabed70 --- /dev/null +++ b/doc/html/tutorial1-05.html @@ -0,0 +1,168 @@ + + + + + +TQt Tutorial - Chapter 5: Building Blocks + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 5: Building Blocks

+ + +

Screenshot of tutorial five
+

This example shows how to create and connect together several widgets +by using signals and slots, and how to handle resize events. +

/****************************************************************
+**
+** TQt tutorial 5
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qslider.h>
+#include <qlcdnumber.h>
+#include <qfont.h>
+
+#include <qvbox.h>
+
+class MyWidget : public TQVBox
+{
+public:
+    MyWidget( TQWidget *parent=0, const char *name=0 );
+};
+
+
+MyWidget::MyWidget( TQWidget *parent, const char *name )
+        : TQVBox( parent, name )
+{
+    TQPushButton *tquit = new TQPushButton( "Quit", this, "tquit" );
+    tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+
+    TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd" );
+
+    TQSlider * slider = new TQSlider( Horizontal, this, "slider" );
+    slider->setRange( 0, 99 );
+    slider->setValue( 0 );
+
+    connect( slider, SIGNAL(valueChanged(int)), lcd, SLOT(display(int)) );
+}
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    MyWidget w;
+    a.setMainWidget( &w );
+    w.show();
+    return a.exec();
+}
+
+ + + +

Line-by-line Walkthrough +

+

    #include <qapplication.h>
+    #include <qpushbutton.h>
+    #include <qslider.h>
+    #include <qlcdnumber.h>
+    #include <qfont.h>
+
+    #include <qvbox.h>
+
+

Three new include files are shown here. qslider.h and qlcdnumber.h are there +because we use two new widgets, TQSlider and TQLCDNumber. qvbox.h is +here because we use TQt's automatic layout support. +

    class MyWidget : public TQVBox
+    {
+    public:
+        MyWidget( TQWidget *parent=0, const char *name=0 );
+    };
+
+

+

    MyWidget::MyWidget( TQWidget *parent, const char *name )
+            : TQVBox( parent, name )
+    {
+
+

MyWidget is now derived from TQVBox instead of TQWidget. That way we use +the layout of the TQVBox (which places all of its children vertically +inside itself). Resizes are now handled automatically by the TQVBox and +therefore by MyWidget, too. +

        TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd" );
+
+

lcd is a TQLCDNumber, a widget that displays numbers in an LCD-like +fashion. This instance is set up to display two digits and to be a child of +this. It is named "lcd". +

        TQSlider * slider = new TQSlider( Horizontal, this, "slider" );
+        slider->setRange( 0, 99 );
+        slider->setValue( 0 );
+
+

TQSlider is a classical slider; the user can use the widget to drag +something to adjust an integer value in a range. Here we create a +horizontal one, set its range to 0-99 (inclusive, see the TQSlider::setRange() documentation) and its initial value to 0. +

        connect( slider, SIGNAL(valueChanged(int)), lcd, SLOT(display(int)) );
+
+

Here we use the signal/slot mechanism +to connect the slider's valueChanged() signal to the LCD number's +display() slot. +

Whenever the slider's value changes it broadcasts the new value by +emitting the valueChanged() signal. Because that signal is connected to +the LCD number's display() slot, the slot is called when the signal is +broadcast. Neither of the objects knows about the other. This is +essential in component programming. +

Slots are otherwise normal C++ member functions and follow the normal +C++ access rules. +

Behavior +

+

The LCD number reflects everything you do to the slider, and the +widget handles resizing well. Notice that the LCD number widget +changes in size when the window is resized (because it can), but the +others stay about the same (because otherwise they would look stupid). +

(See Compiling for how to create a +makefile and build the application.) +

Exercises +

+

Try changing the LCD number to add more digits or to change mode. You can even add four push +buttons to set the number base. +

You can also change the slider's range. +

Perhaps it would have been better to use TQSpinBox than a slider? +

Try to make the application tquit when the LCD number overflows. +

You're now ready for Chapter 6. +

[Previous tutorial] +[Next tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-06.html b/doc/html/tutorial1-06.html new file mode 100644 index 00000000..96d8cb28 --- /dev/null +++ b/doc/html/tutorial1-06.html @@ -0,0 +1,188 @@ + + + + + +TQt Tutorial - Chapter 6: Building Blocks Galore! + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 6: Building Blocks Galore!

+ + +

Screenshot of tutorial six
+

This example shows how to encapsulate two widgets into a new component and +how easy it is to use many widgets. For the first time, we use a custom +widget as a child widget. +

+

/****************************************************************
+**
+** TQt tutorial 6
+**
+****************************************************************/
+
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qslider.h>
+#include <qlcdnumber.h>
+#include <qfont.h>
+#include <qvbox.h>
+#include <qgrid.h>
+
+class LCDRange : public TQVBox
+{
+public:
+    LCDRange( TQWidget *parent=0, const char *name=0 );
+};
+
+LCDRange::LCDRange( TQWidget *parent, const char *name )
+        : TQVBox( parent, name )
+{
+    TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd"  );
+    TQSlider * slider = new TQSlider( Horizontal, this, "slider" );
+    slider->setRange( 0, 99 );
+    slider->setValue( 0 );
+    connect( slider, SIGNAL(valueChanged(int)), lcd, SLOT(display(int)) );
+}
+
+class MyWidget : public TQVBox
+{
+public:
+    MyWidget( TQWidget *parent=0, const char *name=0 );
+};
+
+
+MyWidget::MyWidget( TQWidget *parent, const char *name )
+        : TQVBox( parent, name )
+{
+    TQPushButton *tquit = new TQPushButton( "Quit", this, "tquit" );
+    tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+    connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+
+    TQGrid *grid = new TQGrid( 4, this );
+
+    for( int r = 0 ; r < 4 ; r++ )
+        for( int c = 0 ; c < 4 ; c++ )
+            (void)new LCDRange( grid );
+}
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    MyWidget w;
+    a.setMainWidget( &w );
+    w.show();
+    return a.exec();
+}
+
+ + + +

Line-by-line Walkthrough +

+

    class LCDRange : public TQVBox
+    {
+    public:
+        LCDRange( TQWidget *parent=0, const char *name=0 );
+    };
+
+

The LCDRange widget is a widget without any API. It just has a +constructor. This sort of widget is not very useful, so we'll add some API later. +

    LCDRange::LCDRange( TQWidget *parent, const char *name )
+            : TQVBox( parent, name )
+    {
+        TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd"  );
+        TQSlider * slider = new TQSlider( Horizontal, this, "slider" );
+        slider->setRange( 0, 99 );
+        slider->setValue( 0 );
+        connect( slider, SIGNAL(valueChanged(int)), lcd, SLOT(display(int)) );
+    }
+
+

This is lifted straight from the +MyWidget constructor in Chapter 5. +The only differences are that the button is left out and the class +is renamed. +

    class MyWidget : public TQVBox
+    {
+    public:
+        MyWidget( TQWidget *parent=0, const char *name=0 );
+    };
+
+

MyWidget, too, contains no API except a constructor. +

    MyWidget::MyWidget( TQWidget *parent, const char *name )
+            : TQVBox( parent, name )
+    {
+        TQPushButton *tquit = new TQPushButton( "Quit", this, "tquit" );
+        tquit->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+        connect( tquit, SIGNAL(clicked()), qApp, SLOT(tquit()) );
+
+

The push button that used to be in what is now LCDRange has been +separated so that we can have one "Quit" button and many LCDRange +objects. +

        TQGrid *grid = new TQGrid( 4, this );
+
+

We create a TQGrid object with four columns. The TQGRid widget +automatically arranges its children in rows and columns; you can +specify the number of rows or of columns, and TQGrid will discover its +new children and fit them into the grid. +

        for( int r = 0 ; r < 4 ; r++ )
+            for( int c = 0 ; c < 4 ; c++ )
+                (void)new LCDRange( grid );
+
+

Four columns, four rows. +

We create 4*4 LCDRanges, all of which are children of the grid object. +The TQGrid widget will arrange them. +

    }
+
+

That's all. +

Behavior +

+

This program shows how easy it is to use many widgets at a time. Each +one behaves like the slider and LCD number in the previous +chapter. Again, the difference lies in the implementation. +

(See Compiling for how to create a +makefile and build the application.) +

Exercises +

+

Initialize each slider with a different/random value on startup. +

The source contains three occurrences of "4". What happens if you +change the one in the TQGrid constructor call? What about the other +two? Why is this? +

You're now ready for Chapter 7. +

[Previous tutorial] +[Next tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-07.html b/doc/html/tutorial1-07.html new file mode 100644 index 00000000..a54ef780 --- /dev/null +++ b/doc/html/tutorial1-07.html @@ -0,0 +1,213 @@ + + + + + +TQt Tutorial - Chapter 7: One Thing Leads to Another + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 7: One Thing Leads to Another

+ + +

Screenshot of tutorial seven
+

This example shows how to create custom widgets with signals and +slots, and how to connect them together in more complex ways. For the +first time, the source is split among several files which we've placed +in the t7 subdirectory. +

+

Line-by-line Walkthrough +

+

t7/lcdrange.h +

+

This file is mainly lifted from main.cpp in +Chapter 6; only the changes are noted here. +

+ +

    #ifndef LCDRANGE_H
+    #define LCDRANGE_H
+
+

This is the classic C construction to avoid errors if a header file +happens to be included more than once. If you don't use it already, +it is a very good habit to develop. The #ifndef should enclose all of the +header file. +

    #include <qvbox.h>
+
+

qvbox.h is included. LCDRange inherits TQVBox, and the header file +of a parent class must always be included. We cheated a bit in the +previous chapters, and we let qwidget.h be included indirectly via +other header files such as qpushbutton.h. +

    class TQSlider;
+
+

This is another classic trick, but one that's much less used often. Because +we don't need TQSlider in the interface of the class, only in the +implementation, we use a forward declaration of the class in the +header file and include the header file for TQSlider in the .cpp +file. +

This makes the compilation of big projects much faster, because when a +header file has changed, fewer files need to be recompiled. It can +often speed up big compilations by a factor of two or more. +

    class LCDRange : public TQVBox
+    {
+        Q_OBJECT
+    public:
+        LCDRange( TQWidget *parent=0, const char *name=0 );
+
+

Note the Q_OBJECT. This macro must be included in all classes that +contain signals and/or slots. If you are curious, it defines the +functions that are implemented in the +meta object file. +

        int value() const;
+    public slots:
+        void setValue( int );
+
+    signals:
+        void valueChanged( int );
+
+

These three members make up an interface between this widget and other +components in a program. Until now, LCDRange didn't really have an +interface at all. +

value() is a public function for accessing the value of the LCDRange. +setValue() is our first custom slot and valueChanged() is our first +custom signal. +

Slots must be implemented in the normal way (remember that a slot is also +a C++ member function). Signals are automatically implemented in the +meta object file. Signals follow the +access rules of protected C++ functions (i.e., they can be emitted only +by the class they are defined in or by classes inheriting from it). +

The signal valueChanged() is used when the LCDRange's value has +changed - just as you guessed from the name. This is not the last +signal you'll see called somethingChanged(). +

t7/lcdrange.cpp +

+

+ +

This file is mainly lifted from t6/main.cpp, and +only the changes are noted here. +

        connect( slider, SIGNAL(valueChanged(int)),
+                 lcd, SLOT(display(int)) );
+        connect( slider, SIGNAL(valueChanged(int)),
+                 SIGNAL(valueChanged(int)) );
+
+

This code is from the LCDRange constructor. +

The first connect is the same that you have seen in the previous chapter. +The second is new; it connects slider's valueChanged() signal to this +object's valueChanged signal. Connect() with 3 arguments always +connects to signals or slots in this object. +

Yes, that's right. Signals can be connected to other signals. When +the first is emitted, the second signal is also emitted. +

Let's look at what happens when the user operates the slider. The +slider sees that its value has changed and emits the valueChanged() +signal. That signal is connected both to the display() slot of the +TQLCDNumber and to the valueChanged() signal of the LCDRange. +

Thus, when the signal is emitted, LCDRange emits its own +valueChanged() signal. In addition, TQLCDNumber::display() is called +and shows the new number. +

Note that you're not guaranteed any particular order of execution - +LCDRange::valueChanged() may be emitted before or after +TQLCDNumber::display()and is entirely arbitrary. +

    int LCDRange::value() const
+    {
+        return slider->value();
+    }
+
+

The implementation of value() is straightforward; it simply returns +the slider's value. +

    void LCDRange::setValue( int value )
+    {
+        slider->setValue( value );
+    }
+
+

The implementation of setValue() is equally straightforward. Note +that because the slider and LCD number are connected, setting the +slider's value automatically updates the LCD number as well. In +addition, the slider will automatically adjust the value if it is +outside its legal range. +

t7/main.cpp +

+

+ +

        LCDRange *previous = 0;
+        for( int r = 0 ; r < 4 ; r++ ) {
+            for( int c = 0 ; c < 4 ; c++ ) {
+                LCDRange* lr = new LCDRange( grid );
+                if ( previous )
+                    connect( lr, SIGNAL(valueChanged(int)),
+                             previous, SLOT(setValue(int)) );
+                previous = lr;
+            }
+        }
+
+

All of main.cpp is copied from the previous chapter except in +the constructor for MyWidget. When we create the 16 LCDRange object, we +now connect them using the signal/slot mechanism. Each has its valueChanged() signal +connected to the setValue() slot in the previous one. Because LCDRange +emits the signal valueChanged() when its value changes (surprise!), we +are here creating a "chain" of signals and slots. +

+

Compiling +

+

Creating a makefile for a multi-file application is no different from +creating one for a single-file application. If you've saved all the +files in this example in their own directory, all you have to do is: +

+qmake -project
+qmake
+
+ +

The first command tells qmake to +create a .pro (project) file. The second command tells it to create +a (platform-specific) makefile based on the project file. You should +now be able to type make (or nmake if you're using Visual +Studio) to build your application. +

Behavior +

+

On startup, the program's appearance is identical to the previous one. +Try operating the slider to the bottom right... +

Exercises +

+

Use the bottom right slider to set all LCDs to 50. Then set the top +half to 40 by clicking once to the left of the slider handle. Now, +use the one to the left of the last one operated to set the first +seven LCDs back to 50. +

Click to the left of the handle on the bottom right slider. What +happens? Why is this the correct behavior? +

You're now ready for Chapter 8. +

[Previous tutorial] +[Next tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-08.html b/doc/html/tutorial1-08.html new file mode 100644 index 00000000..afb3e339 --- /dev/null +++ b/doc/html/tutorial1-08.html @@ -0,0 +1,297 @@ + + + + + +TQt Tutorial - Chapter 8: Preparing for Battle + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 8: Preparing for Battle

+ + +

Screenshot of tutorial eight
+

In this example, we introduce the first custom widget that can paint +itself. We also add a useful keyboard interface (with two lines of +code). +

+

Line-by-line Walkthrough +

+

t8/lcdrange.h +

+

This file is very similar to the lcdrange.h in Chapter 7. We have added +one slot: setRange(). +

+ +

        void setRange( int minVal, int maxVal );
+
+

We now add the possibility of setting the range of the LCDRange. +Until now, it has been fixed at 0..99. +

t8/lcdrange.cpp +

+

+ +

There is a change to the constructor (we'll discuss that later). +

    void LCDRange::setRange( int minVal, int maxVal )
+    {
+        if ( minVal < 0 || maxVal > 99 || minVal > maxVal ) {
+          qWarning( "LCDRange::setRange(%d,%d)\n"
+                   "\tRange must be 0..99\n"
+                   "\tand minVal must not be greater than maxVal",
+                   minVal, maxVal );
+          return;
+        }
+        slider->setRange( minVal, maxVal );
+    }
+
+

SetRange() sets the range of the slider in the LCDRange. Because we +have set up the TQLCDNumber to always display two digits, we want to +limit the possible range of minVal and maxVal to 0..99 to avoid +overflow of the TQLCDNumber. (We could have allowed values down to -9 +but chose not to.) If the arguments are illegal, we use TQt's +qWarning() function to issue a warning to the user and return +immediately. qWarning() is a printf-like function that by default +sends its output to stderr. If you want, you can install your own handler +function using ::qInstallMsgHandler(). +

t8/cannon.h +

+

CannonField is a new custom widget that knows how to display itself. +

+ +

    class CannonField : public TQWidget
+    {
+        Q_OBJECT
+    public:
+        CannonField( TQWidget *parent=0, const char *name=0 );
+
+

CannonField inherits TQWidget, and we use the same idiom as for LCDRange. +

        int angle() const { return ang; }
+        TQSizePolicy sizePolicy() const;
+
+    public slots:
+        void setAngle( int degrees );
+
+    signals:
+        void angleChanged( int );
+
+

For the time being, CannonField only contains an angle value for which we +provide an interface using the same idiom as for value in LCDRange. +

    protected:
+        void paintEvent( TQPaintEvent * );
+
+

This is the second of the many event handlers in TQWidget that we +encounter. This virtual function is called by TQt whenever a widget needs +to update itself (i.e., paint the widget's surface). +

t8/cannon.cpp +

+

+ +

    CannonField::CannonField( TQWidget *parent, const char *name )
+            : TQWidget( parent, name )
+    {
+
+

Again, we use the same idiom as for LCDRange in the previous chapter. +

        ang = 45;
+        setPalette( TQPalette( TQColor( 250, 250, 200) ) );
+    }
+
+

The constructor initializes the angle value to 45 degrees and sets a +custom palette for this widget. +

This palette uses the indicated color as background and picks other +colors suitably. (For this widget only the background and text +colors will actually be used.) +

    void CannonField::setAngle( int degrees )
+    {
+        if ( degrees < 5 )
+            degrees = 5;
+        if ( degrees > 70 )
+            degrees = 70;
+        if ( ang == degrees )
+            return;
+        ang = degrees;
+        repaint();
+        emit angleChanged( ang );
+    }
+
+

This function sets the angle value. We have chosen a legal range of +5..70 and adjust the given number of degrees accordingly. We have +chosen not to issue a warning if the new angle is out of range. +

If the new angle equals the old one, we return immediately. It is +important to only emit the signal angleChanged() when the angle really has changed. +

Then we set the new angle value and repaint our widget. The TQWidget::repaint() function clears the widget (usually filling it with +its background color) and sends a paint event to the widget. This +results in a call to the paint event function of the widget. +

Finally, we emit the angleChanged() signal to tell the outside world +that the angle has changed. The emit keyword is unique to TQt and +not regular C++ syntax. In fact, it is a macro. +

    void CannonField::paintEvent( TQPaintEvent * )
+    {
+        TQString s = "Angle = " + TQString::number( ang );
+        TQPainter p( this );
+        p.drawText( 200, 200, s );
+    }
+
+

This is our first attempt to write a paint event handler. The event +argument contains a description of the paint event. TQPaintEvent +contains the region in the widget that must be updated. For the time +being, we will be lazy and just paint everything. +

Our code displays the angle value in the widget at a fixed position. +First we create a TQString with some text and the angle; then we create +a TQPainter operating on this widget and use it to paint the string. +We'll come back to TQPainter later; it can do a great many things. +

t8/main.cpp +

+

+ +

    #include "cannon.h"
+
+

We include our new class. +

    class MyWidget: public TQWidget
+    {
+    public:
+        MyWidget( TQWidget *parent=0, const char *name=0 );
+    };
+
+

This time we include a single LCDRange and a CannonField in our top-level +widget. +

        LCDRange *angle = new LCDRange( this, "angle" );
+
+

In the constructor, we create and set up our LCDRange. +

        angle->setRange( 5, 70 );
+
+

We set the LCDRange to accept ranges from 5 to 70 degrees. +

        CannonField *cannonField
+            = new CannonField( this, "cannonField" );
+
+

We create our CannonField. +

        connect( angle, SIGNAL(valueChanged(int)),
+                 cannonField, SLOT(setAngle(int)) );
+        connect( cannonField, SIGNAL(angleChanged(int)),
+                 angle, SLOT(setValue(int)) );
+
+

Here we connect the valueChanged() signal of the LCDRange to the +setAngle() slot of the CannonField. This will update CannonField's angle +value whenever the user operates the LCDRange. We also make the reverse +connection so that changing the angle in the CannonField will update the +LCDRange value. In our example we never change the angle of the +CannonField directly; but by doing the last connect() we ensure that no +future changes will disrupt the synchronization between those two values. +

This illustrates the power of component programming and proper +encapsulation. +

Notice how important it is to emit the angleChanged() signal only when +the angle actually changes. If both the LCDRange and the CannonField +had omitted this check, the program would have entered an infinite +loop upon the first change of one of the values. +

        TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 );
+        //2x2, 10 pixel border
+
+

So far we have used the no-assembly-retquired TQVBox and TQGrid widgets +for geometry management. Now, however, we want to have a little more +control over the layout, and we switch to the more powerful TQGridLayout +class. TQGridLayout isn't a widget; it is a different class that can +manage the children of any widget. +

As the comment indicates, we create a two-by-two array with ten pixel +borders. (The constructor for TQGridLayout can be a little cryptic, +so it's good to put in such comments.) +

        grid->addWidget( tquit, 0, 0 );
+
+

We add the Quit button in the top-left cell of the grid: 0, 0. +

        grid->addWidget( angle, 1, 0, TQt::AlignTop );
+
+

We put the angle LCDRange in the bottom-left cell, aligned to the top +of its cell. (This alignment is one of the things TQGridLayout allows +but TQGrid does not allow.) +

        grid->addWidget( cannonField, 1, 1 );
+
+

We put the CannonField object in the bottom-right cell. (The top- +right cell is empty.) +

        grid->setColStretch( 1, 10 );
+
+

We tell TQGridLayout that the right column (column 1) is stretchable. +Because the left column isn't (it has stretch factor 0, the default +value), TQGridLayout will try to let the left-hand widgets' sizes be +unchanged and will resize just the CannonField when the MyWidget is +resized. +

        angle->setValue( 60 );
+
+

We set an initial angle value. Note that this will trigger the +connection from LCDRange to CannonField. +

        angle->setFocus();
+
+

Our last action is to set angle to have keyboard focus so that +keyboard input will go to the LCDRange widget by default. +

LCDRange does not contain any keyPressEvent(), so that would seem not +to be terribly useful. However, its constructor just got a new line: +

+ +

        setFocusProxy( slider );
+
+

The LCDRange sets the slider to be its focus proxy. That means that +when someone (the program or the user) wants to give the LCDRange +keyboard focus, the slider should take care of it. TQSlider has a decent +keyboard interface, so with just one line of code we've given LCDRange +one. +

Behavior +

+

The keyboard now does something - the arrow keys, Home, End, PageUp +and PageDown all do something vaguely sensible. +

When the slider is operated, the CannonField displays the new angle +value. Upon resizing, CannonField is given as much space as possible. +

On Windows machines with an 8-bit display the new background color is +dithered to death. The next chapter works around this. +

(See Compiling for how to create a +makefile and build the application.) +

Exercises +

+

Try to resize the window. What happens if you make it really narrow +or really squat? +

If you remove the AlignTop, what happens to the LCDRange's position +and size? Why? +

If you give the left-hand column a non-zero stretch factor, what +happens when you resize the window? +

Leave out the setFocus() call. Which behavior do you prefer? +

Try to change "Quit" to "&Quit" in the TQButton::setText() call. How +does the button's look change? What happens if you press Alt+Q while +the program's running? (It is Meta+Q on a few keyboards.) +

Center the text in the CannonField. +

You're now ready for Chapter 9. +

[Previous tutorial] +[Next tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-09.html b/doc/html/tutorial1-09.html new file mode 100644 index 00000000..3edac035 --- /dev/null +++ b/doc/html/tutorial1-09.html @@ -0,0 +1,155 @@ + + + + + +TQt Tutorial - Chapter 9: With Cannon You Can + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 9: With Cannon You Can

+ + +

Screenshot of tutorial nine
+

In this example we become graphic by drawing a cute little blue +cannon. Only cannon.cpp differs from the previous chapter. +

+

Line-by-line Walkthrough +

+

t9/cannon.cpp +

+

+ +

    void CannonField::paintEvent( TQPaintEvent * )
+    {
+        TQPainter p( this );
+
+

We'll now start to use TQPainter in earnest. We create a painter that +operates on this widget. +

        p.setBrush( blue );
+
+

When TQPainter fills a rectangle, a circle, or whatever, it fills the +shape using its brush. Here we set it to use a blue brush. (We +could also use a pattern.) +

        p.setPen( NoPen );
+
+

And the edges of what TQPainter draws are drawn using the pen. Here we +set it to NoPen, meaning that there will be no special edge when we +draw something; the blue brush will go all the way to the edges of +the things we draw. +

        p.translate( 0, rect().bottom() );
+
+

The TQPainter::translate() function translates the coordinate +system of the TQPainter; i.e., it moves it by an offset. Here we set +the (0, 0) point to the bottom-left corner of the widget. The x and +y directions remain unchanged, i.e., all the y coordinates inside the +widget are now negative (see The Coordinate +System for more information about TQt's coordinate system). +

        p.drawPie( TQRect(-35, -35, 70, 70), 0, 90*16 );
+
+

The drawPie() function draws a pie shape inside the specified +rectangle using a start angle and an arc length. The angles are +specified in 1/16th of a degree. Zero degrees is at the 3 o'clock +position. The drawing direction is counter-clockwise. Here we draw a +quarter of a circle in the bottom-left corner of the widget. The pie +is filled with blue and has no outline. +

        p.rotate( -ang );
+
+

The TQPainter::rotate() function rotates the coordinate system of the +TQPainter around the origin. The rotation argument is a float given +in degrees (not given in 1/16th of a degree as above) and clockwise. +Here we rotate the coordinate system ang degrees counter-clockwise. +

        p.drawRect( TQRect(33, -4, 15, 8) );
+
+

The TQPainter::drawRect() function draws the specified rectangle. Here +we draw the barrel of the cannon. +

It can often be difficult to envision the resulting drawing when the +coordinate system has been transformed (translated, rotated, scaled, or +sheared) as above. +

In this case the coordinate system is first translated and then rotated. +If the rectangle TQRect(33, -4, 15, 8) had been drawn in the translated +coordinate system, it would have looked like this: +

The cannon translated but not rotated
+

Note that the rectangle is clipped by the border of the CannonField +widget. When we rotate the coordinate system, for instance 60 +degrees, the rectangle will be rotated around (0, 0), which is the +bottom-left corner because we have translated the coordinate system. +The result looks like this: +

The cannon translated and rotated
+

We're done, except that we haven't explained why Windows didn't dither +this time. +

+ +

    int main( int argc, char **argv )
+    {
+        TQApplication::setColorSpec( TQApplication::CustomColor );
+        TQApplication a( argc, argv );
+
+

We tell TQt that we want a different color-allocation strategy for this +program. There is no single correct color-allocation strategy. Because +this program uses an unusual yellow but not many colors, CustomColor is best. There are several other allocation strategies; you can read about them in the TQApplication::setColorSpec() +documentation. +

Mostly you can ignore this, since the default is good. Occasionally +some applications with unusual color use look bad; changing the +allocation strategy often helps then. +

Behavior +

+

When the slider is operated the angle of the drawn cannon changes +accordingly. +

The Q on the Quit button is now underlined, and Alt+Q does what you +think it does. If you do not know why, you didn't do the exercises in +Chapter 8. +

You may notice that the cannon flickers annoyingly, especially on a +slow machine. We'll fix this in the next chapter. +

(See Compiling for how to create a +makefile and build the application.) +

Exercises +

+

Set a different pen instead of NoPen. Set a patterned brush. +

Try "Q&uit" or "Qu&it" as button text instead of "&Quit". What +happens? +

You're now ready for Chapter 10. +

[Previous tutorial] +[Next tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-10.html b/doc/html/tutorial1-10.html new file mode 100644 index 00000000..a5793690 --- /dev/null +++ b/doc/html/tutorial1-10.html @@ -0,0 +1,236 @@ + + + + + +TQt Tutorial - Chapter 10: Smooth as Silk + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 10: Smooth as Silk

+ + +

Screenshot of tutorial ten
+

In this example, we introduce painting in a pixmap to remove flickering. +We also add a force control. +

+

Line-by-line Walkthrough +

+

t10/cannon.h +

+

The CannonField now has a force value in addition to the angle. +

+ +

        int   angle() const { return ang; }
+        int   force() const { return f; }
+
+    public slots:
+        void  setAngle( int degrees );
+        void  setForce( int newton );
+
+    signals:
+        void  angleChanged( int );
+        void  forceChanged( int );
+
+

The interface to the force follows the same practice as for the angle. +

    private:
+        TQRect cannonRect() const;
+
+

We have put the definition of the cannon's enclosing rectangle in a +separate function. +

        int ang;
+        int f;
+    };
+
+

The force is stored in the integer f. +

t10/cannon.cpp +

+

+ +

    #include <qpixmap.h>
+
+

We include the TQPixmap class definition. +

    CannonField::CannonField( TQWidget *parent, const char *name )
+            : TQWidget( parent, name )
+    {
+        ang = 45;
+        f = 0;
+        setPalette( TQPalette( TQColor( 250, 250, 200) ) );
+    }
+
+

The force (f) is initialized to zero. +

    void CannonField::setAngle( int degrees )
+    {
+        if ( degrees < 5 )
+            degrees = 5;
+        if ( degrees > 70 )
+            degrees = 70;
+        if ( ang == degrees )
+            return;
+        ang = degrees;
+        repaint( cannonRect(), FALSE );
+        emit angleChanged( ang );
+    }
+
+

We have made a slight change in the setAngle() function. It repaints +only the portion of the widget that contains the cannon. The FALSE +argument indicates that the specified rectangle should not be erased +before a paint event is sent to the widget. This speeds up and smooths +the drawing a little bit. +

    void CannonField::setForce( int newton )
+    {
+        if ( newton < 0 )
+            newton = 0;
+        if ( f == newton )
+            return;
+        f = newton;
+        emit forceChanged( f );
+    }
+
+

The implementation of setForce() is tquite similar to that of +setAngle(). The only difference is that because we don't show the force +value, we don't need to repaint the widget. +

    void CannonField::paintEvent( TQPaintEvent *e )
+    {
+        if ( !e->rect().intersects( cannonRect() ) )
+            return;
+
+

We have now optimized the paint event to repaint only the parts of the +widget that need updating. First we check whether we have to paint +anything at all, and we return if we don't. +

        TQRect cr = cannonRect();
+        TQPixmap pix( cr.size() );
+
+

Then we create a temporary pixmap, which we use for flicker-free +painting. All the painting operations are done into this pixmap, and +then the pixmap is drawn on the screen in a single operation. +

This is the essence of flicker-free drawing: Draw on each pixel +precisely once. Less, and you get drawing errors. More, and you get +flicker. It doesn't matter much in this example - when the code was +written there were still machines slow enough for it to flicker, but +not any more. We've kept the code for educational purposes. +

        pix.fill( this, cr.topLeft() );
+
+

We fill the pixmap with the background from this widget. +

        TQPainter p( &pix );
+        p.setBrush( blue );
+        p.setPen( NoPen );
+        p.translate( 0, pix.height() - 1 );
+        p.drawPie( TQRect( -35,-35, 70, 70 ), 0, 90*16 );
+        p.rotate( -ang );
+        p.drawRect( TQRect(33, -4, 15, 8) );
+        p.end();
+
+

We paint, as in Chapter 9, but now we paint in the pixmap. +

At this point, we have a painter variable and a pixmap that looks +precisely right, but we still haven't painted on the screen. +

        p.begin( this );
+        p.drawPixmap( cr.topLeft(), pix );
+
+

So we open the painter on the CannonField itself and then draw the pixmap. +

That's all. A couple of extra lines at the top and a couple at the +bottom, and the code is 100% flicker-free. +

    TQRect CannonField::cannonRect() const
+    {
+        TQRect r( 0, 0, 50, 50 );
+        r.moveBottomLeft( rect().bottomLeft() );
+        return r;
+    }
+
+

This function returns the rectangle enclosing the cannon in widget +coordinates. First we create a rectangle with the size 50x50 and then +move it so its bottom left corner is equal to the widget's own bottom- +left corner. +

The TQWidget::rect() function returns the widget's enclosing +rectangle in the widget's own coordinates (where the top left corner +is 0, 0). +

t10/main.cpp +

+

+ +

    MyWidget::MyWidget( TQWidget *parent, const char *name )
+            : TQWidget( parent, name )
+    {
+
+

The constructor is mostly the same, but some new bits have been added. +

        LCDRange *force  = new LCDRange( this, "force" );
+        force->setRange( 10, 50 );
+
+

We add a second LCDRange, which will be used to set the force. +

        connect( force, SIGNAL(valueChanged(int)),
+                 cannonField, SLOT(setForce(int)) );
+        connect( cannonField, SIGNAL(forceChanged(int)),
+                 force, SLOT(setValue(int)) );
+
+

We connect the force widget and the cannonField widget, just like +we did for the angle widget. +

        TQVBoxLayout *leftBox = new TQVBoxLayout;
+        grid->addLayout( leftBox, 1, 0 );
+        leftBox->addWidget( angle );
+        leftBox->addWidget( force );
+
+

In Chapter 9 we put angle in the lower-left cell of the layout. +Now we want to have two widgets in that cell, so we make a vertical +box, put the vertical box in the grid cell, and put each of angle +and range in the vertical box. +

        force->setValue( 25 );
+
+

We initialize the force value to 25. +

Behavior +

+

The flicker has gone and we have a force control. +

(See Compiling for how to create a +makefile and build the application.) +

Exercises +

+

Make the size of the cannon barrel be dependent on the force. +

Put the cannon in the bottom-right corner. +

Try adding a better keyboard interface. For example, make + and - +increase and decrease the force and enter shoot. Hint: TQAccel and +new addStep() and subtractStep() slots in LCDRange, like TQSlider::addStep(). If you're bothered by the way the left and right +keys work (I am!), change that too. +

You're now ready for Chapter 11. +

[Previous tutorial] +[Next tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-11.html b/doc/html/tutorial1-11.html new file mode 100644 index 00000000..a5948c8a --- /dev/null +++ b/doc/html/tutorial1-11.html @@ -0,0 +1,250 @@ + + + + + +TQt Tutorial - Chapter 11: Giving It a Shot + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 11: Giving It a Shot

+ + +

Screenshot of tutorial eleven
+

In this example we introduce a timer to implement animated shooting. +

+

Line-by-line Walkthrough +

+

t11/cannon.h +

+

The CannonField now has shooting capabilities. +

+ +

        void  shoot();
+
+

Calling this slot will make the cannon shoot if a shot is not in the air. +

    private slots:
+        void  moveShot();
+
+

This private slot is used to move the shot while it is in the air, +using a TQTimer. +

    private:
+        void  paintShot( TQPainter * );
+
+

This private function paints the shot. +

        TQRect shotRect() const;
+
+

This private function returns the shot's enclosing rectangle if +one is in the air; otherwise the returned rectangle is undefined. +

        int timerCount;
+        TQTimer * autoShootTimer;
+        float shoot_ang;
+        float shoot_f;
+    };
+
+

These private variables contain information that describes the shot. The +timerCount keeps track of the time passed since the shot was fired. +The shoot_ang is the cannon angle and shoot_f is the cannon force +when the shot was fired. +

t11/cannon.cpp +

+

+ +

    #include <math.h>
+
+

We include the math library because we need the sin() and cos() functions. +

    CannonField::CannonField( TQWidget *parent, const char *name )
+            : TQWidget( parent, name )
+    {
+        ang = 45;
+        f = 0;
+        timerCount = 0;
+        autoShootTimer = new TQTimer( this, "movement handler" );
+        connect( autoShootTimer, SIGNAL(timeout()),
+                 this, SLOT(moveShot()) );
+        shoot_ang = 0;
+        shoot_f = 0;
+        setPalette( TQPalette( TQColor( 250, 250, 200) ) );
+    }
+
+

We initialize our new private variables and connect the TQTimer::timeout() signal to our moveShot() slot. We'll move the +shot every time the timer times out. +

    void CannonField::shoot()
+    {
+        if ( autoShootTimer->isActive() )
+            return;
+        timerCount = 0;
+        shoot_ang = ang;
+        shoot_f = f;
+        autoShootTimer->start( 50 );
+    }
+
+

This function shoots a shot unless a shot is in the air. The timerCount +is reset to zero. The shoot_ang and shoot_f are set to the current +cannon angle and force. Finally, we start the timer. +

    void CannonField::moveShot()
+    {
+        TQRegion r( shotRect() );
+        timerCount++;
+
+        TQRect shotR = shotRect();
+
+        if ( shotR.x() > width() || shotR.y() > height() )
+            autoShootTimer->stop();
+        else
+            r = r.unite( TQRegion( shotR ) );
+        repaint( r );
+    }
+
+

moveShot() is the slot that moves the shot, called every 50 +milliseconds when the TQTimer fires. +

Its tasks are to compute the new position, repaint the screen with the +shot in the new position, and if necessary, stop the timer. +

First we make a TQRegion that holds the old shotRect(). A TQRegion +is capable of holding any sort of region, and we'll use it here to +simplify the painting. ShotRect() returns the rectangle where the +shot is now - it is explained in detail later. +

Then we increment the timerCount, which has the effect of moving the +shot one step along its trajectory. +

Next we fetch the new shot rectangle. +

If the shot has moved beyond the right or bottom edge of the widget, we +stop the timer or we add the new shotRect() to the TQRegion. +

Finally, we repaint the TQRegion. This will send a single paint event +for just the one or two rectangles that need updating. +

    void CannonField::paintEvent( TQPaintEvent *e )
+    {
+        TQRect updateR = e->rect();
+        TQPainter p( this );
+
+        if ( updateR.intersects( cannonRect() ) )
+            paintCannon( &p );
+        if ( autoShootTimer->isActive() &&
+             updateR.intersects( shotRect() ) )
+            paintShot( &p );
+    }
+
+

The paint event function has been split in two since the previous +chapter. Now we fetch the bounding rectangle of the region that +needs painting, check whether it intersects either the cannon and/or +the shot, and if necessary, call paintCannon() and/or paintShot(). +

    void CannonField::paintShot( TQPainter *p )
+    {
+        p->setBrush( black );
+        p->setPen( NoPen );
+        p->drawRect( shotRect() );
+    }
+
+

This private function paints the shot by drawing a black filled rectangle. +

We leave out the implementation of paintCannon(); it is the same as +the paintEvent() from the previous chapter. +

    TQRect CannonField::shotRect() const
+    {
+        const double gravity = 4;
+
+        double time      = timerCount / 4.0;
+        double velocity  = shoot_f;
+        double radians   = shoot_ang*3.14159265/180;
+
+        double velx      = velocity*cos( radians );
+        double vely      = velocity*sin( radians );
+        double x0        = ( barrelRect.right()  + 5 )*cos(radians);
+        double y0        = ( barrelRect.right()  + 5 )*sin(radians);
+        double x         = x0 + velx*time;
+        double y         = y0 + vely*time - 0.5*gravity*time*time;
+
+        TQRect r = TQRect( 0, 0, 6, 6 );
+        r.moveCenter( TQPoint( qRound(x), height() - 1 - qRound(y) ) );
+        return r;
+    }
+
+

This private function calculates the center point of the shot and returns +the enclosing rectangle of the shot. It uses the initial cannon force and +angle in addition to timerCount, which increases as time passes. +

The formula used is the classical Newtonian formula for frictionless +movement in a gravity field. For simplicity, we've chosen to +disregard any Einsteinian effects. +

We calculate the center point in a coordinate system where y +coordinates increase upward. After we have calculated the center +point, we construct a TQRect with size 6x6 and move its center point to +the point calculated above. In the same operation we convert the +point into the widget's coordinate system (see The +Coordinate System). +

The qRound() function is an inline function defined in qglobal.h (included +by all other TQt header files). qRound() rounds a double to the closest +integer. +

t11/main.cpp +

+

+ +

    class MyWidget: public TQWidget
+    {
+    public:
+        MyWidget( TQWidget *parent=0, const char *name=0 );
+    };
+
+

The only addition is the Shoot button. +

        TQPushButton *shoot = new TQPushButton( "&Shoot", this, "shoot" );
+        shoot->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+

In the constructor we create and set up the Shoot button exactly like we +did with the Quit button. Note that the first argument to the constructor +is the button text, and the third is the widget's name. +

        connect( shoot, SIGNAL(clicked()), cannonField, SLOT(shoot()) );
+
+

Connects the clicked() signal of the Shoot button to the shoot() slot +of the CannonField. +

Behavior +

+

The cannon can shoot, but there's nothing to shoot at. +

(See Compiling for how to create a +makefile and build the application.) +

Exercises +

+

Make the shot a filled circle. Hint: TQPainter::drawEllipse() may +help. +

Change the color of the cannon when a shot is in the air. +

You're now ready for Chapter 12. +

[Previous tutorial] +[Next tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-12.html b/doc/html/tutorial1-12.html new file mode 100644 index 00000000..5951815b --- /dev/null +++ b/doc/html/tutorial1-12.html @@ -0,0 +1,328 @@ + + + + + +TQt Tutorial - Chapter 12: Hanging in the Air the Way Bricks Don't + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 12: Hanging in the Air the Way Bricks Don't

+ + +

Screenshot of tutorial twelve
+

In this example, we extend our LCDRange class to include a text label. +We also provide something to shoot at. +

+

Line-by-line Walkthrough +

+

t12/lcdrange.h +

+

The LCDRange now has a text label. +

+ +

    class TQLabel;
+
+

We name declare TQLabel because we want to use a pointer to it in the class +definition. +

    class LCDRange : public TQVBox
+    {
+        Q_OBJECT
+    public:
+        LCDRange( TQWidget *parent=0, const char *name=0 );
+        LCDRange( const char *s, TQWidget *parent=0,
+                  const char *name=0 );
+
+

We have added a new constructor that sets the label text in addition to +the parent and name. +

        const char *text()  const;
+
+

This function returns the label text. +

        void setText( const char * );
+
+

This slot sets the label text. +

    private:
+        void init();
+
+

Because we now have two constructors, we have chosen to put the common +initialization in the private init() function. +

        TQLabel      *label;
+
+

We also have a new private variable: a TQLabel. TQLabel is one of TQt's +standard widgets and can show a text or a pixmap with or without a +frame. +

t12/lcdrange.cpp +

+

+ +

    #include <qlabel.h>
+
+

Here we include the TQLabel class definition. +

    LCDRange::LCDRange( TQWidget *parent, const char *name )
+            : TQVBox( parent, name )
+    {
+        init();
+    }
+
+

This constructor calls the init() function, which contains the common +initialization code. +

    LCDRange::LCDRange( const char *s, TQWidget *parent,
+                        const char *name )
+            : TQVBox( parent, name )
+    {
+        init();
+        setText( s );
+    }
+
+

This constructor first calls init() and then sets the label text. +

    void LCDRange::init()
+    {
+        TQLCDNumber *lcd  = new TQLCDNumber( 2, this, "lcd"  );
+        slider = new TQSlider( Horizontal, this, "slider" );
+        slider->setRange( 0, 99 );
+        slider->setValue( 0 );
+
+        label = new TQLabel( " ", this, "label"  );
+        label->setAlignment( AlignCenter );
+
+        connect( slider, SIGNAL(valueChanged(int)),
+                 lcd, SLOT(display(int)) );
+        connect( slider, SIGNAL(valueChanged(int)),
+                 SIGNAL(valueChanged(int)) );
+
+        setFocusProxy( slider );
+    }
+
+

The setup of lcd and slider is the same as in the previous +chapter. Next we create a TQLabel and tell it to align the contents +centered (both vertically and horizontally). The connect() statements +have also been taken from the previous chapter. +

    const char *LCDRange::text() const
+    {
+        return label->text();
+    }
+
+

This function returns the label text. +

    void LCDRange::setText( const char *s )
+    {
+        label->setText( s );
+    }
+
+

This function sets the label text. +

t12/cannon.h +

+

The CannonField now has two new signals: hit() and missed(). In addition +it contains a target. +

+ +

        void  newTarget();
+
+

This slot creates a target at a new position. +

    signals:
+        void  hit();
+        void  missed();
+
+

The hit() signal is emitted when a shot hits the target. The missed() +signal is emitted when the shot moves beyond the right or bottom edge +of the widget (i.e., it is certain that it has not and will not +hit the target). +

        void  paintTarget( TQPainter * );
+
+

This private function paints the target. +

        TQRect targetRect() const;
+
+

This private function returns the enclosing rectangle of the target. +

        TQPoint target;
+
+

This private variable contains the center point of the target. +

t12/cannon.cpp +

+

+ +

    #include <qdatetime.h>
+
+

We include the TQDate, TQTime, and TQDateTime class definitions. +

    #include <stdlib.h>
+
+

We include the stdlib library because we need the rand() function. +

        newTarget();
+
+

This line has been added to the constructor. It creates a "random" +position for the target. In fact, the newTarget() function will try +to paint the target. Because we are in a constructor, the CannonField +widget is invisible. TQt guarantees that no harm is done when calling +repaint() on a hidden widget. +

    void  CannonField::newTarget()
+    {
+        static bool first_time = TRUE;
+        if ( first_time ) {
+            first_time = FALSE;
+            TQTime midnight( 0, 0, 0 );
+            srand( midnight.secsTo(TQTime::currentTime()) );
+        }
+        TQRegion r( targetRect() );
+        target = TQPoint( 200 + rand() % 190,
+                         10  + rand() % 255 );
+        repaint( r.unite( targetRect() ) );
+    }
+
+

This private function creates a target center point at a new "random" +position. +

We use the rand() function to fetch random integers. The rand() function +normally returns the same series of numbers each time you run a program. +This would make the target appear at the same position every time. To +avoid this, we must set a random seed the first time this function is +called. The random seed must also be random in order to avoid equal random +number series. The solution is to use the number of seconds that have +passed since midnight as a pseudo-random value. +

First we create a static bool local variable. A static variable like +this one is guaranteed to keep its value between calls to the function. +

The if test will succeed only the first time this function is called +because we set first_time to FALSE inside the if block. +

Then we create the TQTime object midnight, which represents the time +00:00:00. Next we fetch the number of seconds from midnight until +now and use it as a random seed. See the documentation for TQDate, +TQTime, and TQDateTime for more information. +

Finally we calculate the target's center point. We keep it within +the rectangle (x=200, y=35, width=190, height=255), (i.e., the +possible x and y values are x = 200..389 and y = 35..289) in a +coordinate system where we put y position 0 at the bottom edge of the +widget and let y values increase upwards X is as normal, with 0 at +the left edge and with x values increasing to the right. +

By experimentation we have found this to always be in reach of the shot. +

Note that rand() returns a random integer >= 0. +

    void CannonField::moveShot()
+    {
+        TQRegion r( shotRect() );
+        timerCount++;
+
+        TQRect shotR = shotRect();
+
+

This part of the timer event has not changed from the previous chapter. +

        if ( shotR.intersects( targetRect() ) ) {
+            autoShootTimer->stop();
+            emit hit();
+
+

This if statement checks whether the shot rectangle intersects the +target rectangle. If it does, the shot has hit the target (ouch!). +We stop the shoot timer and emit the hit() signal to tell the outside +world that a target was destroyed, and return. +

Note that we could have created a new target on the spot, but because the +CannonField is a component we leave such decisions to the user of the +component. +

        } else if ( shotR.x() > width() || shotR.y() > height() ) {
+            autoShootTimer->stop();
+            emit missed();
+
+

This if statement is the same as in the previous chapter, except that +it now emits the missed() signal to tell the outside world about the +failure. +

        } else {
+
+

And the rest of the function is as before. +

CannonField::paintEvent() is as before, except that this has been +added: +

        if ( updateR.intersects( targetRect() ) )
+            paintTarget( &p );
+
+

These two lines make sure that the target is also painted when necessary. +

    void CannonField::paintTarget( TQPainter *p )
+    {
+        p->setBrush( red );
+        p->setPen( black );
+        p->drawRect( targetRect() );
+    }
+
+

This private function paints the target; a rectangle filled with red and +with a black outline. +

    TQRect CannonField::targetRect() const
+    {
+        TQRect r( 0, 0, 20, 10 );
+        r.moveCenter( TQPoint(target.x(),height() - 1 - target.y()) );
+        return r;
+    }
+
+

This private function returns the enclosing rectangle of the target. +Remember from newTarget() that the target point uses y coordinate 0 at +the bottom of the widget. We calculate the point in widget coordinates +before we call TQRect::moveCenter(). +

The reason we have chosen this coordinate mapping is to fix the distance +between the target and the bottom of the widget. Remember that the widget +can be resized by the user or the program at any time. +

t12/main.cpp +

+

+ +

There are no new members in the MyWidget class, but we have slightly +changed the constructor to set the new LCDRange text labels. +

        LCDRange *angle  = new LCDRange( "ANGLE", this, "angle" );
+
+

We set the angle text label to "ANGLE". +

        LCDRange *force  = new LCDRange( "FORCE", this, "force" );
+
+

We set the force text label to "FORCE". +

Behavior +

+

The LCDRange widgets look a bit strange - the built-in layout +management in TQVBox gives the labels too much space and the rest not +enough. We'll fix that in the next chapter. +

(See Compiling for how to create a +makefile and build the application.) +

Exercises +

+

Make a cheat button that, when pressed, makes the CannonField display +the shot trajectory for five seconds. +

If you did the "round shot" exercise from the previous chapter, try +changing the shotRect() to a shotRegion() that returns a TQRegion so +you can have really accurate collision detection. +

Make a moving target. +

Make sure that the target is always created entirely on-screen. +

Make sure that the widget cannot be resized so that the target isn't +visible. Hint: TQWidget::setMinimumSize() is your friend. +

Not easy; make it possible to have several shots in the air at the +same time. Hint: make a Shot object. +

You're now ready for Chapter 13. +

[Previous tutorial] +[Next tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-13.html b/doc/html/tutorial1-13.html new file mode 100644 index 00000000..3153d87f --- /dev/null +++ b/doc/html/tutorial1-13.html @@ -0,0 +1,396 @@ + + + + + +TQt Tutorial - Chapter 13: Game Over + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 13: Game Over

+ + +

Screenshot of tutorial thirteen
+

In this example we start to approach a real playable game with a +score. We give MyWidget a new name (GameBoard) and add some slots. +

We put the definition in gamebrd.h and the implementation in gamebrd.cpp. +

The CannonField now has a game over state. +

The layout problems in LCDRange are fixed. +

+

Line-by-line Walkthrough +

+

t13/lcdrange.h +

+

+ +

    #include <qwidget.h>
+
+    class TQSlider;
+    class TQLabel;
+
+    class LCDRange : public TQWidget
+
+

We inherit TQWidget rather than TQVBox. TQVBox is very easy to use, but +again it showed its limitations so we switch to the more powerful and +slightly harder to use TQVBoxLayout. (As you remember, TQVBoxLayout is +not a widget, it manages one.) +

t13/lcdrange.cpp +

+

+ +

    #include <qlayout.h>
+
+

We need to include qlayout.h now to get the other layout management +API. +

    LCDRange::LCDRange( TQWidget *parent, const char *name )
+            : TQWidget( parent, name )
+
+

We inherit TQWidget in the usual way. +

The other constructor has the same change. init() is unchanged, +except that we've added some lines at the end: +

        TQVBoxLayout * l = new TQVBoxLayout( this );
+
+

We create a TQVBoxLayout with all the default values, managing this +widget's children. +

        l->addWidget( lcd, 1 );
+
+

At the top we add the TQLCDNumber with a non-zero stretch. +

        l->addWidget( slider );
+        l->addWidget( label );
+
+

Then we add the other two, both with the default zero stretch. +

This stretch control is something TQVBoxLayout (and TQHBoxLayout, and +TQGridLayout) offers but classes like TQVBox do not. In this case +we're saying that the TQLCDNumber should stretch and the others should +not. +

t13/cannon.h +

+

The CannonField now has a game over state and a few new functions. +

+ +

        bool  gameOver() const { return gameEnded; }
+
+

This function returns TRUE if the game is over or FALSE if a game +is going on. +

        void  setGameOver();
+        void  restartGame();
+
+

Here are two new slots: setGameOver() and restartGame(). +

        void  canShoot( bool );
+
+

This new signal indicates that the CannonField is in a state where the +shoot() slot makes sense. We'll use it below to enable/disable the +Shoot button. +

        bool gameEnded;
+
+

This private variable contains the game state. TRUE means that the +game is over, and FALSE means that a game is going on. +

t13/cannon.cpp +

+

+ +

        gameEnded = FALSE;
+
+

This line has been added to the constructor. Initially, the game is not +over (luckily for the player :-). +

    void CannonField::shoot()
+    {
+        if ( isShooting() )
+            return;
+        timerCount = 0;
+        shoot_ang = ang;
+        shoot_f = f;
+        autoShootTimer->start( 50 );
+        emit canShoot( FALSE );
+    }
+
+

We added a new isShooting() function, so shoot() uses it instead of +testing directly. Also, shoot tells the world that the CannonField +cannot shoot now. +

    void CannonField::setGameOver()
+    {
+        if ( gameEnded )
+            return;
+        if ( isShooting() )
+            autoShootTimer->stop();
+        gameEnded = TRUE;
+        repaint();
+    }
+
+

This slot ends the game. It must be called from outside CannonField, +because this widget does not know when to end the game. This is an +important design principle in component programming. We choose to +make the component as flexible as possible to make it usable with +different rules (for example, a multi-player version of this in which the +first player to hit ten times wins could use the CannonField unchanged). +

If the game has already been ended we return immediately. If a game is +going on we stop the shot, set the game over flag, and repaint the entire +widget. +

    void CannonField::restartGame()
+    {
+        if ( isShooting() )
+            autoShootTimer->stop();
+        gameEnded = FALSE;
+        repaint();
+        emit canShoot( TRUE );
+    }
+
+

This slot starts a new game. If a shot is in the air, we stop shooting. +We then reset the gameEnded variable and repaint the widget. +

moveShot() too emits the new canShoot(TRUE) signal at the same time as +either hit() or miss(). +

Modifications in CannonField::paintEvent(): +

    void CannonField::paintEvent( TQPaintEvent *e )
+    {
+        TQRect updateR = e->rect();
+        TQPainter p( this );
+
+        if ( gameEnded ) {
+            p.setPen( black );
+            p.setFont( TQFont( "Courier", 48, TQFont::Bold ) );
+            p.drawText( rect(), AlignCenter, "Game Over" );
+        }
+
+

The paint event has been enhanced to display the text "Game Over" if +the game is over, i.e., gameEnded is TRUE. We don't bother to +check the update rectangle here because speed is not critical when +the game is over. +

To draw the text we first set a black pen; the pen color is used +when drawing text. Next we choose a 48 point bold font from the +Courier family. Finally we draw the text centered in the widget's +rectangle. Unfortunately, on some systems (especially X servers with +Unicode fonts) it can take a while to load such a large font. Because +TQt caches fonts, you will notice this only the first time the font is +used. +

        if ( updateR.intersects( cannonRect() ) )
+            paintCannon( &p );
+        if ( isShooting() && updateR.intersects( shotRect() ) )
+            paintShot( &p );
+        if ( !gameEnded && updateR.intersects( targetRect() ) )
+            paintTarget( &p );
+    }
+
+

We draw the shot only when shooting and the target only when playing +(that is, when the game is not ended). +

t13/gamebrd.h +

+

This file is new. It contains the definition of the GameBoard class, +which was last seen as MyWidget. +

+ +

    class TQPushButton;
+    class LCDRange;
+    class TQLCDNumber;
+    class CannonField;
+
+    #include "lcdrange.h"
+    #include "cannon.h"
+
+    class GameBoard : public TQWidget
+    {
+        Q_OBJECT
+    public:
+        GameBoard( TQWidget *parent=0, const char *name=0 );
+
+    protected slots:
+        void  fire();
+        void  hit();
+        void  missed();
+        void  newGame();
+
+    private:
+        TQLCDNumber  *hits;
+        TQLCDNumber  *shotsLeft;
+        CannonField *cannonField;
+    };
+
+

We have now added four slots. These are protected and are used internally. +We have also added two TQLCDNumbers (hits and shotsLeft) which display +the game status. +

t13/gamebrd.cpp +

+

This file is new. It contains the implementation of the GameBoard +class, which was last seen as MyWidget. +

+ +

We have made some changes in the GameBoard constructor. +

        cannonField = new CannonField( this, "cannonField" );
+
+

cannonField is now a member variable, so we carefully change the +constructor to use it. (The good programmers at Trolltech never +forget this, but I do. Caveat programmor - if "programmor" is Latin, +at least. Anyway, back to the code.) +

        connect( cannonField, SIGNAL(hit()),
+                 this, SLOT(hit()) );
+        connect( cannonField, SIGNAL(missed()),
+                 this, SLOT(missed()) );
+
+

This time we want to do something when the shot has hit or missed the +target. Thus we connect the hit() and missed() signals of the +CannonField to two protected slots with the same names in this class. +

        connect( shoot, SIGNAL(clicked()), SLOT(fire()) );
+
+

Previously we connected the Shoot button's clicked() signal directly +to the CannonField's shoot() slot. This time we want to keep track of +the number of shots fired, so we connect it to a protected slot in +this class instead. +

Notice how easy it is to change the behavior of a program when you are +working with self-contained components. +

        connect( cannonField, SIGNAL(canShoot(bool)),
+                 shoot, SLOT(setEnabled(bool)) );
+
+

We also use the cannonField's canShoot() signal to enable or disable +the Shoot button appropriately. +

        TQPushButton *restart
+            = new TQPushButton( "&New Game", this, "newgame" );
+        restart->setFont( TQFont( "Times", 18, TQFont::Bold ) );
+
+        connect( restart, SIGNAL(clicked()), this, SLOT(newGame()) );
+
+

We create, set up, and connect the New Game button as we have done +with the other buttons. Clicking this button will activate the +newGame() slot in this widget. +

        hits = new TQLCDNumber( 2, this, "hits" );
+        shotsLeft = new TQLCDNumber( 2, this, "shotsleft" );
+        TQLabel *hitsL = new TQLabel( "HITS", this, "hitsLabel" );
+        TQLabel *shotsLeftL
+            = new TQLabel( "SHOTS LEFT", this, "shotsleftLabel" );
+
+

We create four new widgets. Note that we don't bother to keep the +pointers to the TQLabel widgets in the GameBoard class because there's +nothing much we want to do with them. TQt will delete them when the +GameBoard widget is destroyed, and the layout classes will resize them +appropriately. +

        TQHBoxLayout *topBox = new TQHBoxLayout;
+        grid->addLayout( topBox, 0, 1 );
+        topBox->addWidget( shoot );
+        topBox->addWidget( hits );
+        topBox->addWidget( hitsL );
+        topBox->addWidget( shotsLeft );
+        topBox->addWidget( shotsLeftL );
+        topBox->addStretch( 1 );
+        topBox->addWidget( restart );
+
+

The number of widgets in the top-right cell is getting large. Once it +was empty; now it's full enough that we group together the layout +setting for better overview. +

Notice that we let all the widgets have their preferred sizes, instead +putting the stretch just to the left of the New Game button. +

        newGame();
+    }
+
+

We're all done constructing the GameBoard, so we start it all using +newGame(). (NewGame() is a slot, but as we said, slots can be used as +ordinary functions, too.) +

    void GameBoard::fire()
+    {
+        if ( cannonField->gameOver() || cannonField->isShooting() )
+            return;
+        shotsLeft->display( shotsLeft->intValue() - 1 );
+        cannonField->shoot();
+    }
+
+

This function fires a shot. If the game is over or if there is a shot in the +air, we return immediately. We decrement the number of shots left and tell +the cannon to shoot. +

    void GameBoard::hit()
+    {
+        hits->display( hits->intValue() + 1 );
+        if ( shotsLeft->intValue() == 0 )
+            cannonField->setGameOver();
+        else
+            cannonField->newTarget();
+    }
+
+

This slot is activated when a shot has hit the target. We increment the +number of hits. If there are no shots left, the game is over. Otherwise, +we make the CannonField generate a new target. +

    void GameBoard::missed()
+    {
+        if ( shotsLeft->intValue() == 0 )
+            cannonField->setGameOver();
+    }
+
+

This slot is activated when a shot has missed the target. If there are no +shots left, the game is over. +

    void GameBoard::newGame()
+    {
+        shotsLeft->display( 15 );
+        hits->display( 0 );
+        cannonField->restartGame();
+        cannonField->newTarget();
+    }
+
+

This slot is activated when the user clicks the Restart button. It is +also called from the constructor. First it sets the number of shots +to 15. Note that this is the only place in the program where we set +the number of shots. Change it to whatever you like to change the +game rules. Next we reset the number of hits, restart the game, and +generate a new target. +

t13/main.cpp +

+

This file has just been on a diet. MyWidget is gone, and the only +thing left is the main() function, unchanged except for the name +change. +

Behavior +

+

The cannon can shoot at a target; a new target is automatically created +when one has been hit. +

Hits and shots left are displayed and the program keeps track of them. +The game can end, and there's a button to start a new game. +

(See Compiling for how to create a +makefile and build the application.) +

Exercises +

+

Add a random wind factor and show it to the user. +

Make some splatter effects when the shot hits the target. +

Implement multiple targets. +

You're now ready for Chapter 14. +

[Previous tutorial] +[Next tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial1-14.html b/doc/html/tutorial1-14.html new file mode 100644 index 00000000..b155373e --- /dev/null +++ b/doc/html/tutorial1-14.html @@ -0,0 +1,271 @@ + + + + + +TQt Tutorial - Chapter 14: Facing the Wall + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt Tutorial - Chapter 14: Facing the Wall

+ + +

Screenshot of tutorial fourteen
+

This is the final example: a complete game. +

We add keyboard accelerators and introduce mouse events to CannonField. We +put a frame around the CannonField and add a barrier (wall) to make the +game more challenging. +

+

Line-by-line Walkthrough +

+

t14/cannon.h +

+

The CannonField can now receive mouse events to make the user aim the +barrel by clicking on it and dragging. CannonField also has a barrier +wall. +

+ +

    protected:
+        void  paintEvent( TQPaintEvent * );
+        void  mousePressEvent( TQMouseEvent * );
+        void  mouseMoveEvent( TQMouseEvent * );
+        void  mouseReleaseEvent( TQMouseEvent * );
+
+

In addition to the familiar event handlers, CannonField implements +three mouse event handlers. The names say it all. +

        void  paintBarrier( TQPainter * );
+
+

This private function paints the barrier wall. +

        TQRect barrierRect() const;
+
+

This private function returns the enclosing rectangle of the barrier. +

        bool  barrelHit( const TQPoint & ) const;
+
+

This private function checks if a point is inside the barrel of the cannon. +

        bool barrelPressed;
+
+

This private variable is TRUE if the user has pressed the mouse on the +barrel and not released it. +

t14/cannon.cpp +

+

+ +

        barrelPressed = FALSE;
+
+

This line has been added to the constructor. Initially, the mouse is +not pressed on the barrel. +

        } else if ( shotR.x() > width() || shotR.y() > height() ||
+                    shotR.intersects(barrierRect()) ) {
+
+

Now that we have a barrier, there are three ways to miss. We test for +the third, too. +

    void CannonField::mousePressEvent( TQMouseEvent *e )
+    {
+        if ( e->button() != LeftButton )
+            return;
+        if ( barrelHit( e->pos() ) )
+            barrelPressed = TRUE;
+    }
+
+

This is a TQt event handler. It is called when the user presses a +mouse button when the mouse cursor is over the widget. +

If the event was not generated by the left mouse button, we return +immediately. Otherwise, we check if the position of the mouse cursor +is within the cannon's barrel. If it is, we set barrelPressed to +TRUE. +

Notice that the pos() function returns a point in the widget's +coordinate system. +

    void CannonField::mouseMoveEvent( TQMouseEvent *e )
+    {
+        if ( !barrelPressed )
+            return;
+        TQPoint pnt = e->pos();
+        if ( pnt.x() <= 0 )
+            pnt.setX( 1 );
+        if ( pnt.y() >= height() )
+            pnt.setY( height() - 1 );
+        double rad = atan(((double)rect().bottom()-pnt.y())/pnt.x());
+        setAngle( qRound ( rad*180/3.14159265 ) );
+    }
+
+

This is another TQt event handler. It is called when the user already +has pressed the mouse button inside this widget and then moves/drags +the mouse. (You can make TQt send mouse move events even when no +buttons are pressed. See TQWidget::setMouseTracking().) +

This handler repositions the cannon's barrel according to the position of +the mouse cursor. +

First, if the barrel is not pressed, we return. Next, we fetch the +mouse cursor's position. If the mouse cursor is to the left or below +the widget, we adjust the point to be inside the widget. +

Then we calculate the angle between the bottom edge of the widget and +the imaginary line between the bottom-left corner of the widget and +the cursor position. Finally we set the cannon's angle to the new +value converted to degrees. +

Remember that setAngle() redraws the cannon. +

    void CannonField::mouseReleaseEvent( TQMouseEvent *e )
+    {
+        if ( e->button() == LeftButton )
+            barrelPressed = FALSE;
+    }
+
+

This TQt event handler is called whenever the user releases a mouse +button and it was pressed inside this widget. +

If the left button is released, we can be sure that the barrel is no +longer pressed. +

The paint event has two extra lines: +

        if ( updateR.intersects( barrierRect() ) )
+            paintBarrier( &p );
+
+

paintBarrier() does the same sort of thing as paintShot(), +paintTarget(), and paintCannon(). +

    void CannonField::paintBarrier( TQPainter *p )
+    {
+        p->setBrush( yellow );
+        p->setPen( black );
+        p->drawRect( barrierRect() );
+    }
+
+

This private function paints the barrier as a rectangle filled with +yellow and with a black outline. +

    TQRect CannonField::barrierRect() const
+    {
+        return TQRect( 145, height() - 100, 15, 100 );
+    }
+
+

This private function returns the rectangle of the barrier. We fix +the bottom edge of the barrier to the bottom edge of the widget. +

    bool CannonField::barrelHit( const TQPoint &p ) const
+    {
+        TQWMatrix mtx;
+        mtx.translate( 0, height() - 1 );
+        mtx.rotate( -ang );
+        mtx = mtx.invert();
+        return barrelRect.contains( mtx.map(p) );
+    }
+
+

This function returns TRUE if the point is in the barrel; otherwise it returns +FALSE. +

Here we use the class TQWMatrix. It is defined in the header file +qwmatrix.h, which is included by qpainter.h. +

TQWMatrix defines a coordinate system mapping. It can perform the same +transformations as the TQPainter. +

Here we perform the same transformation steps as we do when drawing +the barrel in the paintCannon() function. First we translate the +coordinate system and then we rotate it. +

Now we need to check whether the point p (in widget coordinates) lies +inside the barrel. To do this, we invert the transformation matrix. +The inverted matrix performs the inverse transformation that we used +when drawing the barrel. We map the point p using the inverted +matrix and return TRUE if it is inside the original barrel rectangle. +

t14/gamebrd.cpp +

+

+ +

    #include <qaccel.h>
+
+

We include the class definition of TQAccel. +

        TQVBox *box = new TQVBox( this, "cannonFrame" );
+        box->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
+        cannonField = new CannonField( box, "cannonField" );
+
+

We create and set up a TQVBox, set its frame style, and then create +CannonField as a child of that box. Because nothing else is in the +box, the effect is that the TQVBox will put a frame around the +CannonField. +

        TQAccel *accel = new TQAccel( this );
+        accel->connectItem( accel->insertItem( Key_Enter ),
+                            this, SLOT(fire()) );
+        accel->connectItem( accel->insertItem( Key_Return ),
+                            this, SLOT(fire()) );
+
+

Here we create and set up an accelerator. An accelerator is an object +that intercepts keyboard events to an application and calls slots if +certain keys are pressed. This mechanism is also called shortcut +keys. Note that an accelerator is a child of a widget and will be +destroyed when that widget is destroyed. TQAccel is not a widget +and has no visible effect on its parent. +

We define two shortcut keys. We want the slot fire() to be called +when the user presses Enter, and we want the application to tquit when +key Ctrl+Q is pressed. Because Enter is sometimes Return and there +are even keyboards with both keys, we make both Enter and Return +invoke fire(). +

        accel->connectItem( accel->insertItem( CTRL+Key_Q ),
+                            qApp, SLOT(tquit()) );
+
+

And then we set up Ctrl+Q to do the same thing as Alt+Q. Some +people are more used to Ctrl+Q (and anyway it shows how do do it). +

CTRL, Key_Enter, Key_Return and Key_Q are all constants provided by +TQt. They're actually TQt::Key_Enter, etc., but practically all classes +inherit the TQt namespace class. +

        TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 );
+        grid->addWidget( tquit, 0, 0 );
+        grid->addWidget( box, 1, 1 );
+        grid->setColStretch( 1, 10 );
+
+

We put box (the TQVBox), not the CannonField, in the lower-right +cell. +

Behavior +

+

The cannon now shoots when you press Enter. You can also position the +cannon's angle using the mouse. The barrier makes it a little more +challenging to play the game. We also have a nice looking frame +around the CannonField. +

(See Compiling for how to create a +makefile and build the application.) +

Exercises +

+

Write a space invaders game. +

(This exercise was first done by +Igor Rafienko. You can +download his game.) +

The new exercise is: Write a Breakout game. +

Final exhortation: Go forth now and create masterpieces of the programming art! +

+

[Previous tutorial] +[First tutorial] +[Main tutorial page] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial2-01.html b/doc/html/tutorial2-01.html new file mode 100644 index 00000000..e5474252 --- /dev/null +++ b/doc/html/tutorial2-01.html @@ -0,0 +1,55 @@ + + + + + +Introduction + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Introduction

+ + +

+

In this tutorial we will develop a single application called chart, +which is used to display simple pie and bar charts based on data that +the user enters. +

The tutorial gives an overview of the development of the application +and includes code snippets and accompanying explanations. The complete +source for the application is in examples/chart. +

The chart application
+

+« Contents | +The 'Big Picture' » +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial2-02.html b/doc/html/tutorial2-02.html new file mode 100644 index 00000000..409e7e08 --- /dev/null +++ b/doc/html/tutorial2-02.html @@ -0,0 +1,67 @@ + + + + + +The 'Big Picture' + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

The 'Big Picture'

+ + +

+

The chart application's dialogs
+

The chart program allows users to create, save, load and visualise +simple data sets. Each data element that the user enters can be given +a color and pattern for the pie segment or bar, some label text and +the text's position and color. The Element class is used to +represent data elements. +

The program consists of a simple main.cpp that loads the chart +form. The chart form has a menubar and toolbar which provide access to +the program's functionality. The program provides two dialogs, one to +set options, and the other to create and edit a data set. Both dialogs +are launched from chart form menu options or toolbar buttons. +

The chart form's main widget is a TQCanvasView which displays the +TQCanvas on which we draw the pie chart or bar graph. We subclass +TQCanvasView to obtain some specialised behaviour. Similarly we +subclass the TQCanvasText class (used to place text items on a canvas) +since we retquire slightly more than the standard class provides. +

The project file, chart.pro, is used to create the Makefile that is +used to build the application. +

+« Introduction | +Contents | +Data Elements » +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial2-03.html b/doc/html/tutorial2-03.html new file mode 100644 index 00000000..44b039ab --- /dev/null +++ b/doc/html/tutorial2-03.html @@ -0,0 +1,298 @@ + + + + + +Data Elements + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Data Elements

+ + +

+

We will use a C++ class called Element to provide storage and +access for data elements. +

(Extracts from element.h.) +

+ +

    private:
+
        double m_value;
+        TQColor m_valueColor;
+        int m_valuePattern;
+        TQString m_label;
+        TQColor m_labelColor;
+        double m_propoints[2 * MAX_PROPOINTS];
+
+

Each element has a value. Each value is displayed graphically with a +particular color and fill pattern. Values may have a label associated +with them; the label is drawn using the label color and for each type +of chart has a (relative) position stored in the m_propoints array. +

+ +

    #include <qcolor.h>
+    #include <qnamespace.h>
+    #include <qstring.h>
+    #include <qvaluevector.h>
+
+

Although the Element class is a purely internal data class, it +#includes four TQt classes. TQt is often perceived as a purely GUI +toolkit, but it provides many non-GUI classes to support most aspects +of application programming. We use qcolor.h so that we can hold the +paint color and text color in the Element class. The use of qnamespace.h is slightly obscure. Most TQt classes are derived from the +TQt superclass which contains various +enumerations. The Element class does not derive from TQt, so we need to include qnamespace.h to have access to +the TQt enum names. An alternative approach would have been to have +made Element a TQt subclass. We include qstring.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 qvaluevector.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 +type; we will keep each data set of elements in one ElementVector. +

    const double EPSILON = 0.0000001; // Must be > INVALID.
+
+

Elements may only have positive values. Because we hold values as +doubles we cannot readily compare them with zero. Instead we specify a +value, EPSILON, which is close to zero, and consider any value +greater than EPSILON to be positive and valid. +

    class Element
+    {
+    public:
+        enum { INVALID = -1 };
+        enum { NO_PROPORTION = -1 };
+        enum { MAX_PROPOINTS = 3 }; // One proportional point per chart type
+
+

We define three public enums for Elements. INVALID is used by +the isValid() function. It is useful because we are going to use a +fixed size vector of Elements, and can mark unused Elements by +giving them INVALID values. The NO_PROPORTION enum is used to +signify that the user has not positioned the Element's label; any +positive proportion value is taken to be the text element's position +proportional to the canvas's size. +

If we stored each label's actual x and y position, then every time the +user resized the main window (and therefore the canvas), the text +would retain its original (now incorrect) position. So instead of +storing absolute (x, y) positions we store proportional positions, +i.e. x/width and y/height. We can then multiply these positions by +the current width and height respectively when we come to draw the +text and the text will be positioned correctly regardless of any +resizing. For example, if a label has an x position of 300 and the +canvas is 400 pixels wide, the proportional x value is 300/400 = 0.75. +

The MAX_PROPOINTS enum is problematic. We need to store the x and y +proportions for the text label for every chart type. And we have +chosen to store these proportions in a fixed-size array. Because of +this we must specify the maximum number of proportion pairs needed. +This value must be changed if we change the number of chart types, +which means that the Element class is strongly coupled to the +number of chart types provided by the ChartForm class. In a +larger application we might have used a vector to store these points +and dynamically resized it depending on how many chart types are +available. +

        Element( double value = INVALID, TQColor valueColor = TQt::gray,
+                 int valuePattern = TQt::SolidPattern,
+                 const TQString& label = TQString::null,
+                 TQColor labelColor = TQt::black ) {
+            init( value, valueColor, valuePattern, label, labelColor );
+            for ( int i = 0; i < MAX_PROPOINTS * 2; ++i )
+                m_propoints[i] = NO_PROPORTION;
+        }
+
+

The constructor provides default values for all members of the Element class. New elements always have label text with no position. +We use an init() function because we also provide a set() function +which works like the constructor apart from leaving the proportional +positions alone. +

        bool isValid() const { return m_value > EPSILON; }
+
+

Since we are storing Elements in a fixed size vector we need to be +able to check whether a particular element is valid (i.e. should be +used in calculations and displayed) or not. This is easily achieved +with the isValid() function. +

(Extracts from element.cpp.) +

+ +

    double Element::proX( int index ) const
+    {
+        Q_ASSERT(index >= 0 && index < MAX_PROPOINTS);
+        return m_propoints[2 * index];
+    }
+
+

Getters and setters are provided for all the members of Element. +The proX() and proY() getters and the setProX() and setProY() setters +take an index which identifies the type of chart the proportional +position applies to. This means that the user can have labels +positioned separately for the same data set for a vertical bar chart, +a horizontal bar chart and for a pie chart. Note also that we use the +Q_ASSERT macro to provide pre-condition tests on the chart type +index; (see Debugging). +

Reading and Writing Data Elements +

+

(Extracts from element.h.) +

+ +

    TQTextStream &operator<<( TQTextStream&, const Element& );
+    TQTextStream &operator>>( TQTextStream&, Element& );
+
+

To make our Element class more self-contained we provide overloads +for the << and >> operators so that Elements may be written to +and read from text streams. We could just as easily have used binary +streams, but using text makes it possible for users to manipulate +their data using a text editor and makes it easier to generate and +filter the data using a scripting language. +

(Extracts from element.cpp.) +

+ +

    #include "element.h"
+
+    #include <qstringlist.h>
+    #include <qtextstream.h>
+
+

Our implementation of the operators retquires the inclusion of qtextstream.h and qstringlist.h. +

    const char FIELD_SEP = ':';
+    const char PROPOINT_SEP = ';';
+    const char XY_SEP = ',';
+
+

The format we are using to store the data is colon separated fields +and newline separated records. The proportional points are semi-colon +separated, with their x, y pairs being comma separated. The field +order is value, value color, value pattern, label color, label points, +label text. For example: +

+20:#ff0000:14:#000000:0.767033,0.412946;0,0.75;0,0:Red :with colons:!
+70:#00ffff:2:#ffff00:0.450549,0.198661;0.198516,0.125954;0,0.198473:Cyan
+35:#0000ff:8:#555500:0.10989,0.299107;0.397032,0.562977;0,0.396947:Blue
+55:#ffff00:1:#000080:0.0989011,0.625;0.595547,0.312977;0,0.59542:Yellow
+80:#ff00ff:1:#000000:0.518681,0.694196;0.794063,0;0,0.793893:Magenta or Violet
+
+ +

There's no problem having whitespace and field separators in label +text due to the way we read Element data. +

    TQTextStream &operator<<( TQTextStream &s, const Element &element )
+    {
+        s << element.value() << FIELD_SEP
+          << element.valueColor().name() << FIELD_SEP
+          << element.valuePattern() << FIELD_SEP
+          << element.labelColor().name() << FIELD_SEP;
+
+        for ( int i = 0; i < Element::MAX_PROPOINTS; ++i ) {
+            s << element.proX( i ) << XY_SEP << element.proY( i );
+            s << ( i == Element::MAX_PROPOINTS - 1 ? FIELD_SEP : PROPOINT_SEP );
+        }
+
+        s << element.label() << '\n';
+
+        return s;
+    }
+
+

Writing elements is straight-forward. Each member is written followed +by a field separator. The points are written as comma separated (XY_SEP) x, y pairs, each pair separated by the PROPOINT_SEP +separator. The final field is the label followed by a newline. +

    TQTextStream &operator>>( TQTextStream &s, Element &element )
+    {
+        TQString data = s.readLine();
+        element.setValue( Element::INVALID );
+
+        int errors = 0;
+        bool ok;
+
+        TQStringList fields = TQStringList::split( FIELD_SEP, data );
+        if ( fields.count() >= 4 ) {
+            double value = fields[0].toDouble( &ok );
+            if ( !ok )
+                errors++;
+            TQColor valueColor = TQColor( fields[1] );
+            if ( !valueColor.isValid() )
+                errors++;
+            int valuePattern = fields[2].toInt( &ok );
+            if ( !ok )
+                errors++;
+            TQColor labelColor = TQColor( fields[3] );
+            if ( !labelColor.isValid() )
+                errors++;
+            TQStringList propoints = TQStringList::split( PROPOINT_SEP, fields[4] );
+            TQString label = data.section( FIELD_SEP, 5 );
+
+            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();
+                    ++i, ++point ) {
+                    errors = 0;
+                    TQStringList xy = TQStringList::split( XY_SEP, *point );
+                    double x = xy[0].toDouble( &ok );
+                    if ( !ok || x <= 0.0 || x >= 1.0 )
+                        errors++;
+                    double y = xy[1].toDouble( &ok );
+                    if ( !ok || y <= 0.0 || y >= 1.0 )
+                        errors++;
+                    if ( errors )
+                        x = y = Element::NO_PROPORTION;
+                    element.setProX( i, x );
+                    element.setProY( i, y );
+                }
+            }
+        }
+
+        return s;
+    }
+
+

To read an element we read one record (i.e. one line). We break the +data into fields using TQStringList::split(). Because it is possible +that a label will contain FIELD_SEP characters we use +TQString::section() to extract all the text from the last field to the +end of the line. If there are enough fields and the value, colors and +pattern data is valid we use Element::set() to write this data into +the element; otherwise we leave the element INVALID. We then +iterate through the points. If the x and y proportions are valid and +in range we set them for the element. If one or both proportions is +invalid they will hold the value zero; this is not suitable so we +change invalid (and out-of-range) proportional point values to NO_PROPORTION. +

Our Element class is now sufficient to store, manipulate, read and +write element data. We have also created an element vector typedef for +storing a collection of elements. +

We are now ready to create main.cpp and the user interface through +which our users will create, edit and visualise their data sets. +

+ +
For more information on TQt's data streaming facilities see TQDataStream Operators' Formats, and see +the source code for any of the TQt classes mentioned that are similar +to what you want to store. +
+

+« The 'Big Picture' | +Contents | +Mainly Easy » +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial2-04.html b/doc/html/tutorial2-04.html new file mode 100644 index 00000000..cdbe2b6b --- /dev/null +++ b/doc/html/tutorial2-04.html @@ -0,0 +1,79 @@ + + + + + +Mainly Easy + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Mainly Easy

+ + +

+

(main.cpp.) +

+ +

    #include <qapplication.h>
+    #include "chartform.h"
+
+    int main( int argc, char *argv[] )
+    {
+        TQApplication app( argc, argv );
+
+        TQString filename;
+        if ( app.argc() > 1 ) {
+            filename = app.argv()[1];
+            if ( !filename.endsWith( ".cht" ) )
+                filename = TQString::null;
+        }
+
+        ChartForm *cf = new ChartForm( filename );
+        app.setMainWidget( cf );
+        cf->show();
+
+        return app.exec();
+    }
+
+

We have kept the main() function simple and small. We create a +TQApplication object and pass it the command line arguments. We are +allowing users to invoke the program with chart mychart.cht, so if +they've added a filename we pass that through to the chart form +constructor. Most of the action takes place within the chart form +which we'll review next. +

+« Data Elements | +Contents | +Presenting the GUI » +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial2-05.html b/doc/html/tutorial2-05.html new file mode 100644 index 00000000..9f9bbec0 --- /dev/null +++ b/doc/html/tutorial2-05.html @@ -0,0 +1,587 @@ + + + + + +Presenting the GUI + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Presenting the GUI

+ + +

+

The chart application
+

The chart application provides access to options via menus and +toolbar buttons arranged around a central widget, a CanvasView, in a +conventional document-centric style. +

(Extracts from chartform.h.) +

+ +

    class ChartForm: public TQMainWindow
+    {
+        Q_OBJECT
+    public:
+        enum { MAX_ELEMENTS = 100 };
+        enum { MAX_RECENTFILES = 9 }; // Must not exceed 9
+        enum ChartType { PIE, VERTICAL_BAR, HORIZONTAL_BAR };
+        enum AddValuesType { NO, YES, AS_PERCENTAGE };
+
+        ChartForm( const TQString& filename );
+        ~ChartForm();
+
+        int chartType() { return m_chartType; }
+        void setChanged( bool changed = TRUE ) { m_changed = changed; }
+        void drawElements();
+
+        TQPopupMenu *optionsMenu; // Why public? See canvasview.cpp
+
+    protected:
+        virtual void closeEvent( TQCloseEvent * );
+
+    private slots:
+        void fileNew();
+        void fileOpen();
+        void fileOpenRecent( int index );
+        void fileSave();
+        void fileSaveAs();
+        void fileSaveAsPixmap();
+        void filePrint();
+        void fileQuit();
+        void optionsSetData();
+        void updateChartType( TQAction *action );
+        void optionsSetFont();
+        void optionsSetOptions();
+        void helpHelp();
+        void helpAbout();
+        void helpAboutTQt();
+        void saveOptions();
+
+    private:
+        void init();
+        void load( const TQString& filename );
+        bool okToClear();
+        void drawPieChart( const double scales[], double total, int count );
+        void drawVerticalBarChart( const double scales[], double total, int count );
+        void drawHorizontalBarChart( const double scales[], double total, int count );
+
+        TQString valueLabel( const TQString& label, double value, double total );
+        void updateRecentFiles( const TQString& filename );
+        void updateRecentFilesMenu();
+        void setChartType( ChartType chartType );
+
+        TQPopupMenu *fileMenu;
+        TQAction *optionsPieChartAction;
+        TQAction *optionsHorizontalBarChartAction;
+        TQAction *optionsVerticalBarChartAction;
+        TQString m_filename;
+        TQStringList m_recentFiles;
+        TQCanvas *m_canvas;
+        CanvasView *m_canvasView;
+        bool m_changed;
+        ElementVector m_elements;
+        TQPrinter *m_printer;
+        ChartType m_chartType;
+        AddValuesType m_addValues;
+        int m_decimalPlaces;
+        TQFont m_font;
+    };
+
+

We create a ChartForm subclass of TQMainWindow. Our subclass uses +the Q_OBJECT macro to support TQt's signals and slots mechanism. +

The public interface is very small; the type of chart being displayed +can be retrieved, the chart can be marked 'changed' (so that the user +will be prompted to save on exit), and the chart can be asked to draw +itself (drawElements()). We've also made the options menu public +because we are also going to use this menu as the canvas view's +context menu. +

+ +
The TQCanvas class is used for drawing 2D vector graphics. The +TQCanvasView class is used to present a view of a canvas in an +application's GUI. All our drawing operations take place on the +canvas; but events (e.g. mouse clicks) take place on the canvas view. +
+

Each action is represented by a private slot, e.g. fileNew(), optionsSetData(), etc. We also have tquite a number of private +functions and data members; we'll look at all these as we go through +the implementation. +

For the sake of convenience and compilation speed the chart form's +implementation is split over three files, chartform.cpp for the +GUI, chartform_canvas.cpp for the canvas handling and chartform_files.cpp for the file handling. We'll review each in turn. +

The Chart Form GUI +

+

(Extracts from chartform.cpp.) +

+ +

    #include "images/file_new.xpm"
+    #include "images/file_open.xpm"
+
    #include "images/options_piechart.xpm"
+
+

All the images used by chart have been created as .xpm files +which we've placed in the images subdirectory. +

The Constructor +

+

    ChartForm::ChartForm( const TQString& filename )
+        : TQMainWindow( 0, 0, WDestructiveClose )
+
... +
        TQAction *fileNewAction;
+        TQAction *fileOpenAction;
+        TQAction *fileSaveAction;
+
+

For each user action we declare a TQAction pointer. Some actions are +declared in the header file because they need to be referred to +outside of the constructor. +

+ +
Most user actions are suitable as both menu items and as toolbar +buttons. TQt allows us to create a single TQAction which can be added to +both a menu and a toolbar. This approach ensures that menu items and +toolbar buttons stay in sync and saves duplicating code. +
+

        fileNewAction = new TQAction(
+                "New Chart", TQPixmap( file_new ),
+                "&New", CTRL+Key_N, this, "new" );
+        connect( fileNewAction, SIGNAL( activated() ), this, SLOT( fileNew() ) );
+
+

When we construct an action we give it a name, an optional icon, a +menu text, and an accelerator short-cut key (or 0 if no accelerator is +retquired). We also make it a child of the form (by passing this). +When the user clicks a toolbar button or clicks a menu option the activated() signal is emitted. We connect() this signal to the +action's slot, in the snippet shown above, to fileNew(). +

The chart types are all mutually exclusive: you can have a pie chart +or a vertical bar chart or a horizontal bar chart. This means +that if the user selects the pie chart menu option, the pie chart +toolbar button must be automatically selected too, and the other chart +menu options and toolbar buttons must be automatically unselected. +This behaviour is achieved by creating a TQActionGroup and placing the +chart type actions in the group. +

        TQActionGroup *chartGroup = new TQActionGroup( this ); // Connected later
+        chartGroup->setExclusive( TRUE );
+
+

The action group becomes a child of the form (this) and the +exlusive behaviour is achieved by the setExclusive() call. +

        optionsPieChartAction = new TQAction(
+                "Pie Chart", TQPixmap( options_piechart ),
+                "&Pie Chart", CTRL+Key_I, chartGroup, "pie chart" );
+        optionsPieChartAction->setToggleAction( TRUE );
+
+

Each action in the group is created in the same way as other actions, +except that the action's parent is the group rather than the form. +Because our chart type actions have an on/off state we call +setToggleAction(TRUE) for each of them. Note that we do not connect +the actions; instead, later on, we will connect the group to a slot +that will cause the canvas to redraw. +

+ +
Why haven't we connected the group straight away? Later in the +constructor we will read the user's options, one of which is the chart +type. We will then set the chart type accordingly. But at that point +we still won't have created a canvas or have any data, so all we want +to do is toggle the canvas type toolbar buttons, but not actually draw +the (at this point non-existent) canvas. After we have set the +canvas type we will connect the group. +
+

Once we've created all our user actions we can create the toolbars and +menu options that will allow the user to invoke them. +

        TQToolBar* fileTools = new TQToolBar( this, "file operations" );
+        fileTools->setLabel( "File Operations" );
+        fileNewAction->addTo( fileTools );
+        fileOpenAction->addTo( fileTools );
+        fileSaveAction->addTo( fileTools );
+
... +
        fileMenu = new TQPopupMenu( this );
+        menuBar()->insertItem( "&File", fileMenu );
+        fileNewAction->addTo( fileMenu );
+        fileOpenAction->addTo( fileMenu );
+        fileSaveAction->addTo( fileMenu );
+
+

Toolbar actions and menu options are easily created from TQActions. +

As a convenience to our users we will restore the last window position +and size and list their recently used files. This is achieved by +writing out their settings when the application is closed and reading +them back when we construct the form. +

        TQSettings settings;
+        settings.insertSearchPath( TQSettings::Windows, WINDOWS_REGISTRY );
+        int windowWidth = settings.readNumEntry( APP_KEY + "WindowWidth", 460 );
+        int windowHeight = settings.readNumEntry( APP_KEY + "WindowHeight", 530 );
+        int windowX = settings.readNumEntry( APP_KEY + "WindowX", -1 );
+        int windowY = settings.readNumEntry( APP_KEY + "WindowY", -1 );
+        setChartType( ChartType(
+                settings.readNumEntry( APP_KEY + "ChartType", int(PIE) ) ) );
+
        m_font = TQFont( "Helvetica", 18, TQFont::Bold );
+        m_font.fromString(
+                settings.readEntry( APP_KEY + "Font", m_font.toString() ) );
+        for ( int i = 0; i < MAX_RECENTFILES; ++i ) {
+            TQString filename = settings.readEntry( APP_KEY + "File" +
+                                                   TQString::number( i + 1 ) );
+            if ( !filename.isEmpty() )
+                m_recentFiles.push_back( filename );
+        }
+        if ( m_recentFiles.count() )
+            updateRecentFilesMenu();
+
+

The TQSettings class handles user settings in a platform-independent +way. We simply read and write settings, leaving TQSettings to handle +the platform dependencies. The insertSearchPath() call does nothing +except under Windows so does not have to be #ifdefed. +

We use readNumEntry() calls to obtain the chart form's last size and +position, providing default values if this is the first time it has +been run. The chart type is retrieved as an integer and cast to a +ChartType enum value. We create a default label font and then read the +"Font" setting, using the default we have just created if necessary. +

Although TQSettings can handle string lists we've chosen to store each +recently used file as a separate entry to make it easier to hand edit +the settings. We attempt to read each possible file entry ("File1" to +"File9"), and add each non-empty entry to the list of recently used +files. If there are one or more recently used files we update the File +menu by calling updateRecentFilesMenu(); (we'll review this later on). +

        connect( chartGroup, SIGNAL( selected(TQAction*) ),
+                 this, SLOT( updateChartType(TQAction*) ) );
+
+

Now that we have set the chart type (when we read it in as a user +setting) it is safe to connect the chart group to our +updateChartType() slot. +

        resize( windowWidth, windowHeight );
+        if ( windowX != -1 || windowY != -1 )
+            move( windowX, windowY );
+
+

And now that we know the window size and position we can resize and +move the chart form's window accordingly. +

        m_canvas = new TQCanvas( this );
+        m_canvas->resize( width(), height() );
+        m_canvasView = new CanvasView( m_canvas, &m_elements, this );
+        setCentralWidget( m_canvasView );
+        m_canvasView->show();
+
+

We create a new TQCanvas and set its size to that of the chart form +window's client area. We also create a CanvasView (our own subclass +of TQCanvasView) to display the TQCanvas. We make the canvas view the +chart form's main widget and show it. +

        if ( !filename.isEmpty() )
+            load( filename );
+        else {
+            init();
+            m_elements[0].set( 20, red,    14, "Red" );
+            m_elements[1].set( 70, cyan,    2, "Cyan",   darkGreen );
+            m_elements[2].set( 35, blue,   11, "Blue" );
+            m_elements[3].set( 55, yellow,  1, "Yellow", darkBlue );
+            m_elements[4].set( 80, magenta, 1, "Magenta" );
+            drawElements();
+        }
+
+

If we have a file to load we load it; otherwise we initialise our +elements vector and draw a sample chart. +

        statusBar()->message( "Ready", 2000 );
+
+

It is vital that we call statusBar() in the constructor, since the +call ensures that a status bar is created for this main window. +

init() +

+

    void ChartForm::init()
+    {
+        setCaption( "Chart" );
+        m_filename = TQString::null;
+        m_changed = FALSE;
+
+        m_elements[0]  = Element( Element::INVALID, red );
+        m_elements[1]  = Element( Element::INVALID, cyan );
+        m_elements[2]  = Element( Element::INVALID, blue );
+
... +

We use an init() function because we want to initialise the canvas and +the elements (in the m_elements ElementVector) when the form is +constructed, and also whenever the user loads an existing data set or +creates a new data set. +

We reset the caption and set the current filename to TQString::null. We +also populate the elements vector with invalid elements. This isn't +necessary, but giving each element a different color is more +convenient for the user since when they enter values each one will +already have a unique color (which they can change of course). +

The File Handling Actions +

+

okToClear() +

+

    bool ChartForm::okToClear()
+    {
+        if ( m_changed ) {
+            TQString msg;
+            if ( m_filename.isEmpty() )
+                msg = "Unnamed chart ";
+            else
+                msg = TQString( "Chart '%1'\n" ).arg( m_filename );
+            msg += "has been changed.";
+
+            int x = TQMessageBox::information( this, "Chart -- Unsaved Changes",
+                                              msg, "&Save", "Cancel", "&Abandon",
+                                              0, 1 );
+            switch( x ) {
+                case 0: // Save
+                    fileSave();
+                    break;
+                case 1: // Cancel
+                default:
+                    return FALSE;
+                case 2: // Abandon
+                    break;
+            }
+        }
+
+        return TRUE;
+    }
+
+

The okToClear() function is used to prompt the user to save their +values if they have any unsaved data. It is used by several other +functions. +

fileNew() +

+

+ +

    void ChartForm::fileNew()
+    {
+        if ( okToClear() ) {
+            init();
+            drawElements();
+        }
+    }
+
+

When the user invokes the fileNew() action we call okToClear() to give +them the opportunity to save any unsaved data. If they either save or +abandon or have no unsaved data we re-initialise the elements vector +and draw the default chart. +

+ +
Should we also have invoked optionsSetData() to pop up the dialog +through which the user can create and edit values, colors etc? You +could try running the application as it is, and then try it having +added a call to optionsSetData() and see which you prefer. +
+

fileOpen() +

+

    void ChartForm::fileOpen()
+    {
+        if ( !okToClear() )
+            return;
+
+        TQString filename = TQFileDialog::getOpenFileName(
+                                TQString::null, "Charts (*.cht)", this,
+                                "file open", "Chart -- File Open" );
+        if ( !filename.isEmpty() )
+            load( filename );
+        else
+            statusBar()->message( "File Open abandoned", 2000 );
+    }
+
+

We check that it is okToClear(). If it is we use the static +TQFileDialog::getOpenFileName() function to get the name of the file +the user wishes to load. If we get a filename we call load(). +

fileSaveAs() +

+

    void ChartForm::fileSaveAs()
+    {
+        TQString filename = TQFileDialog::getSaveFileName(
+                                TQString::null, "Charts (*.cht)", this,
+                                "file save as", "Chart -- File Save As" );
+        if ( !filename.isEmpty() ) {
+            int answer = 0;
+            if ( TQFile::exists( filename ) )
+                answer = TQMessageBox::warning(
+                                this, "Chart -- Overwrite File",
+                                TQString( "Overwrite\n\'%1\'?" ).
+                                    arg( filename ),
+                                "&Yes", "&No", TQString::null, 1, 1 );
+            if ( answer == 0 ) {
+                m_filename = filename;
+                updateRecentFiles( filename );
+                fileSave();
+                return;
+            }
+        }
+        statusBar()->message( "Saving abandoned", 2000 );
+    }
+
+

This function calls the static TQFileDialog::getSaveFileName() to get +the name of the file to save the data in. If the file exists we use a +TQMessageBox::warning() to notify the user and give them the option of +abandoning the save. If the file is to be saved we update the recently +opened files list and call fileSave() (covered in File Handling) to perform the save. +

Managing a list of Recently Opened Files +

+

+ +

        TQStringList m_recentFiles;
+
+

We hold the list of recently opened files in a string list. +

+ +

    void ChartForm::updateRecentFilesMenu()
+    {
+        for ( int i = 0; i < MAX_RECENTFILES; ++i ) {
+            if ( fileMenu->findItem( i ) )
+                fileMenu->removeItem( i );
+            if ( i < int(m_recentFiles.count()) )
+                fileMenu->insertItem( TQString( "&%1 %2" ).
+                                        arg( i + 1 ).arg( m_recentFiles[i] ),
+                                      this, SLOT( fileOpenRecent(int) ),
+                                      0, i );
+        }
+    }
+
+

This function is called (usually via updateRecentFiles()) whenever the +user opens an existing file or saves a new file. For each file in the +string list we insert a new menu item. We prefix each filename with an +underlined number from 1 to 9 to support keyboard access +(e.g. Alt+F, 2 to open the second file in the list). We give the +menu item an id which is the same as the index position of the item in +the string list, and connect each menu item to the fileOpenRecent() +slot. The old file menu items are deleted at the same time by going +through each possible recent file menu item id. This works because the +other file menu items had ids created by TQt (all of which are < 0); +whereas the menu items we're creating all have ids >= 0. +

+ +

    void ChartForm::updateRecentFiles( const TQString& filename )
+    {
+        if ( m_recentFiles.find( filename ) != m_recentFiles.end() )
+            return;
+
+        m_recentFiles.push_back( filename );
+        if ( m_recentFiles.count() > MAX_RECENTFILES )
+            m_recentFiles.pop_front();
+
+        updateRecentFilesMenu();
+    }
+
+

This is called when the user opens an existing file or saves a new +file. If the file is already in the list it simply returns. Otherwise +the file is added to the end of the list and if the list is too large +(> 9 files) the first (oldest) is removed. updateRecentFilesMenu() is +then called to recreate the list of recently used files in the File +menu. +

+ +

    void ChartForm::fileOpenRecent( int index )
+    {
+        if ( !okToClear() )
+            return;
+
+        load( m_recentFiles[index] );
+    }
+
+

When the user selects a recently opened file the fileOpenRecent() slot +is called with the menu id of the file they have selected. Because we +made the file menu ids equal to the files' index positions in the +m_recentFiles list we can simply load the file indexed by the menu +item id. +

Quiting +

+

    void ChartForm::fileQuit()
+    {
+        if ( okToClear() ) {
+            saveOptions();
+            qApp->exit( 0 );
+        }
+    }
+
+

When the user tquits we give them the opportunity to save any unsaved +data (okToClear()) then save their options, e.g. window size and +position, chart type, etc., before terminating. +

    void ChartForm::saveOptions()
+    {
+        TQSettings settings;
+        settings.insertSearchPath( TQSettings::Windows, WINDOWS_REGISTRY );
+        settings.writeEntry( APP_KEY + "WindowWidth", width() );
+        settings.writeEntry( APP_KEY + "WindowHeight", height() );
+        settings.writeEntry( APP_KEY + "WindowX", x() );
+        settings.writeEntry( APP_KEY + "WindowY", y() );
+        settings.writeEntry( APP_KEY + "ChartType", int(m_chartType) );
+        settings.writeEntry( APP_KEY + "AddValues", int(m_addValues) );
+        settings.writeEntry( APP_KEY + "Decimals", m_decimalPlaces );
+        settings.writeEntry( APP_KEY + "Font", m_font.toString() );
+        for ( int i = 0; i < int(m_recentFiles.count()); ++i )
+            settings.writeEntry( APP_KEY + "File" + TQString::number( i + 1 ),
+                                 m_recentFiles[i] );
+    }
+
+

Saving the user's options using TQSettings is straight-forward. +

Custom Dialogs +

+

We want the user to be able to set some options manually and to create +and edit values, value colors, etc. +

+ +

    void ChartForm::optionsSetOptions()
+    {
+        OptionsForm *optionsForm = new OptionsForm( this );
+        optionsForm->chartTypeComboBox->setCurrentItem( m_chartType );
+        optionsForm->setFont( m_font );
+
        if ( optionsForm->exec() ) {
+            setChartType( ChartType(
+                    optionsForm->chartTypeComboBox->currentItem()) );
+            m_font = optionsForm->font();
+
            drawElements();
+        }
+        delete optionsForm;
+    }
+
+

The form for setting options is provided by our custom OptionsForm +covered in Setting Options. The +options form is a standard "dumb" dialog: we create an instance, set +all its GUI elements to the relevant settings, and if the user clicked +"OK" (exec() returns a true value) we read back settings from the GUI +elements. +

+ +

    void ChartForm::optionsSetData()
+    {
+        SetDataForm *setDataForm = new SetDataForm( &m_elements, m_decimalPlaces, this );
+        if ( setDataForm->exec() ) {
+            m_changed = TRUE;
+            drawElements();
+        }
+        delete setDataForm;
+    }
+
+

The form for creating and editing chart data is provided by our custom +SetDataForm covered in Taking Data. +This form is a "smart" dialog. We pass in the data structure we want +to work on, and the dialog handles the presentation of the data +structure itself. If the user clicks "OK" the dialog will update the +data structure and exec() will return a true value. All we need to do +in optionsSetData() if the user changed the data is mark the chart as +changed and call drawElements() to redraw the chart with the new and +updated data. +

+« Mainly Easy | +Contents | +Canvas Control » +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial2-06.html b/doc/html/tutorial2-06.html new file mode 100644 index 00000000..c126b189 --- /dev/null +++ b/doc/html/tutorial2-06.html @@ -0,0 +1,370 @@ + + + + + +Canvas Control + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Canvas Control

+ + +

+

We draw pie segments (or bar chart bars), and any labels, on a canvas. +The canvas is presented to the user through a canvas view. The +drawElements() function is called to redraw the canvas when necessary. +

(Extracts from chartform_canvas.cpp.) +

drawElements() +

+

+ +

    void ChartForm::drawElements()
+    {
+        TQCanvasItemList list = m_canvas->allItems();
+        for ( TQCanvasItemList::iterator it = list.begin(); it != list.end(); ++it )
+            delete *it;
+
+

The first thing we do in drawElements() is delete all the existing +canvas items. +

            // 360 * 16 for pies; TQt works with 16ths of degrees
+        int scaleFactor = m_chartType == PIE ? 5760 :
+                            m_chartType == VERTICAL_BAR ? m_canvas->height() :
+                                m_canvas->width();
+
+

Next we calculate the scale factor which depends on the type of chart +we're going to draw. +

        double biggest = 0.0;
+        int count = 0;
+        double total = 0.0;
+        static double scales[MAX_ELEMENTS];
+
+        for ( int i = 0; i < MAX_ELEMENTS; ++i ) {
+            if ( m_elements[i].isValid() ) {
+                double value = m_elements[i].value();
+                count++;
+                total += value;
+                if ( value > biggest )
+                    biggest = value;
+                scales[i] = m_elements[i].value() * scaleFactor;
+            }
+        }
+
+        if ( count ) {
+                // 2nd loop because of total and biggest
+            for ( int i = 0; i < MAX_ELEMENTS; ++i )
+                if ( m_elements[i].isValid() )
+                    if ( m_chartType == PIE )
+                        scales[i] = (m_elements[i].value() * scaleFactor) / total;
+                    else
+                        scales[i] = (m_elements[i].value() * scaleFactor) / biggest;
+
+

We will need to know how many values there are, the biggest value and +the total value so that we can create pie segments or bars that are +correctly scaled. We store the scaled values in the scales array. +

            switch ( m_chartType ) {
+                case PIE:
+                    drawPieChart( scales, total, count );
+                    break;
+                case VERTICAL_BAR:
+                    drawVerticalBarChart( scales, total, count );
+                    break;
+                case HORIZONTAL_BAR:
+                    drawHorizontalBarChart( scales, total, count );
+                    break;
+            }
+        }
+
+

Now that we have the necessary information we call the relevant +drawing function, passing in the scaled values, the total and the +count. +

        m_canvas->update();
+
+

Finally we update() the canvas to make the changes visible. +

drawHorizontalBarChart() +

+

We'll review just one of the drawing functions, to see how canvas +items are created and placed on a canvas since this tutorial is about +TQt rather than good (or bad) algorithms for drawing charts. +

    void ChartForm::drawHorizontalBarChart(
+            const double scales[], double total, int count )
+    {
+
+

To draw a horizontal bar chart we need the array of scaled values, the +total value (so that we can calculate and draw percentages if +retquired) and a count of the number of values. +

        double width = m_canvas->width();
+        double height = m_canvas->height();
+        int proheight = int(height / count);
+        int y = 0;
+
+

We retrieve the width and height of the canvas and calculate the +proportional height (proheight). We set the initial y position +to 0. +

        TQPen pen;
+        pen.setStyle( NoPen );
+
+

We create a pen that we will use to draw each bar (rectangle); we set +it to NoPen so that no outlines are drawn. +

        for ( int i = 0; i < MAX_ELEMENTS; ++i ) {
+            if ( m_elements[i].isValid() ) {
+                int extent = int(scales[i]);
+
+

We iterate over every element in the element vector, skipping invalid +elements. The extent of each bar (its length) is simply its scaled +value. +

                TQCanvasRectangle *rect = new TQCanvasRectangle(
+                                                0, y, extent, proheight, m_canvas );
+                rect->setBrush( TQBrush( m_elements[i].valueColor(),
+                                        BrushStyle(m_elements[i].valuePattern()) ) );
+                rect->setPen( pen );
+                rect->setZ( 0 );
+                rect->show();
+
+

We create a new TQCanvasRectangle for each bar with an x position of 0 +(since this is a horizontal bar chart every bar begins at the left), a +y value that starts at 0 and grows by the height of each bar as each +one is drawn, the height of the bar and the canvas that the bar should +be drawn on. We then set the bar's brush to the color and pattern that +the user has specified for the element, set the pen to the pen we +created earlier (i.e. to NoPen) and we place the bar at position 0 +in the Z-order. Finally we call show() to draw the bar on the canvas. +

                TQString label = m_elements[i].label();
+                if ( !label.isEmpty() || m_addValues != NO ) {
+                    double proX = m_elements[i].proX( HORIZONTAL_BAR );
+                    double proY = m_elements[i].proY( HORIZONTAL_BAR );
+                    if ( proX < 0 || proY < 0 ) {
+                        proX = 0;
+                        proY = y / height;
+                    }
+
+

If the user has specified a label for the element or asked for the +values (or percentages) to be shown, we also draw a canvas text item. +We created our own CanvasText class (see later) because we want to +store the corresponding element index (in the element vector) in each +canvas text item. We extract the proportional x and y values from the +element. If either is < 0 then they have not been positioned by the +user so we must calculate positions for them. We set the label's x +value to 0 (left) and the y value to the top of the bar (so that the +label's top-left will be at this x, y position). +

                    label = valueLabel( label, m_elements[i].value(), total );
+
+

We then call a helper function valueLabel() which returns a string +containing the label text. (The valueLabel() function adds on the +value or percentage to the textual label if the user has set the +appropriate options.) +

                    CanvasText *text = new CanvasText( i, label, m_font, m_canvas );
+                    text->setColor( m_elements[i].labelColor() );
+                    text->setX( proX * width );
+                    text->setY( proY * height );
+                    text->setZ( 1 );
+                    text->show();
+                    m_elements[i].setProX( HORIZONTAL_BAR, proX );
+                    m_elements[i].setProY( HORIZONTAL_BAR, proY );
+
+

We then create a CanvasText item, passing it the index of this element +in the element vector, and the label, font and canvas to use. We set +the text item's text color to the color specified by the user and set +the item's x and y positions proportional to the canvas's width and +height. We set the Z-order to 1 so that the text item will always be +above (in front of) the bar (whose Z-order is 0). We call show() to +draw the text item on the canvas, and set the element's relative x and +y positions. +

                }
+                y += proheight;
+
+

After drawing a bar and possibly its label, we increment y by the +proportional height ready to draw the next element. +

            }
+        }
+    }
+
+

Subclassing TQCanvasText +

+

(Extracts from canvastext.h.) +

+ +

    class CanvasText : public TQCanvasText
+    {
+    public:
+        enum { CANVAS_TEXT = 1100 };
+
+        CanvasText( int index, TQCanvas *canvas )
+            : TQCanvasText( canvas ), m_index( index ) {}
+        CanvasText( int index, const TQString& text, TQCanvas *canvas )
+            : TQCanvasText( text, canvas ), m_index( index ) {}
+        CanvasText( int index, const TQString& text, TQFont font, TQCanvas *canvas )
+            : TQCanvasText( text, font, canvas ), m_index( index ) {}
+
+        int index() const { return m_index; }
+        void setIndex( int index ) { m_index = index; }
+
+        int rtti() const { return CANVAS_TEXT; }
+
+    private:
+        int m_index;
+    };
+
+

Our CanvasText subclass is a very simple specialisation of +TQCanvasText. All we've done is added a single private member m_index which holds the element vector index of the element associated +with this text item, and provided a getter and setter for this value. +

Subclassing TQCanvasView +

+

(Extracts from canvasview.h.) +

+ +

    class CanvasView : public TQCanvasView
+    {
+        Q_OBJECT
+    public:
+        CanvasView( TQCanvas *canvas, ElementVector *elements,
+                    TQWidget* parent = 0, const char* name = "canvas view",
+                    WFlags f = 0 )
+            : TQCanvasView( canvas, parent, name, f ), m_movingItem(0),
+              m_elements( elements ) {}
+
+    protected:
+        void viewportResizeEvent( TQResizeEvent *e );
+        void contentsMousePressEvent( TQMouseEvent *e );
+        void contentsMouseMoveEvent( TQMouseEvent *e );
+        void contentsContextMenuEvent( TQContextMenuEvent *e );
+
+    private:
+        TQCanvasItem *m_movingItem;
+        TQPoint m_pos;
+        ElementVector *m_elements;
+    };
+
+

We need to subclass TQCanvasView so that we can handle: +

    +
  1. Context menu requests. +
  2. Form resizing. +
  3. Users dragging labels to arbitrary positions. +
+

To support these we store a pointer to the canvas item that is being +moved and its last position. We also store a pointer to the element +vector. +

Supporting Context Menus +

+

(Extracts from canvasview.cpp.) +

+ +

    void CanvasView::contentsContextMenuEvent( TQContextMenuEvent * )
+    {
+        ((ChartForm*)parent())->optionsMenu->exec( TQCursor::pos() );
+    }
+
+

When the user invokes a context menu (e.g. by right-clicking on most +platforms) we cast the canvas view's parent (which is the chart form) +to the right type and then exec()ute the options menu at the cursor +position. +

Handling Resizing +

+

    void CanvasView::viewportResizeEvent( TQResizeEvent *e )
+    {
+        canvas()->resize( e->size().width(), e->size().height() );
+        ((ChartForm*)parent())->drawElements();
+    }
+
+

To resize we simply resize the canvas that the canvas view is +presenting to the width and height of the form's client area, then +call drawElements() to redraw the chart. Because drawElements() draws +everything relative to the canvas's width and height the chart is +drawn correctly. +

Dragging Labels into Position +

+

When the user wants to drag a label into position they click it, then +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 )
+            if ( (*it)->rtti() == CanvasText::CANVAS_TEXT ) {
+                m_movingItem = *it;
+                m_pos = e->pos();
+                return;
+            }
+        m_movingItem = 0;
+    }
+
+

When the user clicks the mouse we create a list of canvas items that +the mouse click "collided" with (if any). We then iterate over this +list and if we find a CanvasText item we set it as the moving item +and record its position. Otherwise we set there to be no moving item. +

    void CanvasView::contentsMouseMoveEvent( TQMouseEvent *e )
+    {
+        if ( m_movingItem ) {
+            TQPoint offset = e->pos() - m_pos;
+            m_movingItem->moveBy( offset.x(), offset.y() );
+            m_pos = e->pos();
+            ChartForm *form = (ChartForm*)parent();
+            form->setChanged( TRUE );
+            int chartType = form->chartType();
+            CanvasText *item = (CanvasText*)m_movingItem;
+            int i = item->index();
+
+            (*m_elements)[i].setProX( chartType, item->x() / canvas()->width() );
+            (*m_elements)[i].setProY( chartType, item->y() / canvas()->height() );
+
+            canvas()->update();
+        }
+    }
+
+

As the user drags the mouse, move events are generated. If there is a +moving item we calculate the offset from the last mouse position and +move the item by this offset amount. We record the new position as the +last position. Because the chart has now changed we call setChanged() +so that the user will be prompted to save if they attempt to exit or +to load an existing chart or to create a new chart. We also update the +element's proportional x and y positions for the current chart type to +the current x and y positions proportional to the width and height +respectively. We know which element to update because when we create +each canvas text item we pass it the index position of the element it +corresponds to. We subclassed TQCanvasText so that we could set and get +this index value. Finally we call update() to make the canvas redraw. +

+ +
A TQCanvas has no visual representation. To see the contents of a +canvas you must create a TQCanvasView to present the canvas. Items only +appear in the canvas view if they have been show()n, and then, only if +TQCanvas::update() has been called. By default a TQCanvas's background +color is white, and by default shapes drawn on the canvas, e.g. +TQCanvasRectangle, TQCanvasEllipse, etc., have their fill color set to +white, so setting a non-white brush color is highly recommended! +
+

+« Presenting the GUI | +Contents | +File Handling » +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial2-07.html b/doc/html/tutorial2-07.html new file mode 100644 index 00000000..b06f0a7b --- /dev/null +++ b/doc/html/tutorial2-07.html @@ -0,0 +1,112 @@ + + + + + +File Handling + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

File Handling

+ + +

+

(Extracts from chartform_files.cpp.) +

Reading Chart Data +

+

+ +

    void ChartForm::load( const TQString& filename )
+    {
+        TQFile file( filename );
+        if ( !file.open( IO_ReadOnly ) ) {
+            statusBar()->message( TQString( "Failed to load \'%1\'" ).
+                                    arg( filename ), 2000 );
+            return;
+        }
+
+        init(); // Make sure we have colours
+        m_filename = filename;
+        TQTextStream ts( &file );
+        Element element;
+        int errors = 0;
+        int i = 0;
+        while ( !ts.eof() ) {
+            ts >> element;
+            if ( element.isValid() )
+                m_elements[i++] = element;
+
        file.close();
+
+

        setCaption( TQString( "Chart -- %1" ).arg( filename ) );
+        updateRecentFiles( filename );
+
+        drawElements();
+        m_changed = FALSE;
+    }
+
+

Loading a data set is very easy. We open the file and create a text +stream. While there's data to read we stream an element into element and if it is valid we insert it into the m_elements vector. +All the detail is handled by the Element class. Then we close +the file and update the caption and the recent files list. Finally we +draw the chart and mark it as unchanged. +

Writing Chart Data +

+

    void ChartForm::fileSave()
+    {
+
        TQFile file( m_filename );
+        if ( !file.open( IO_WriteOnly ) ) {
+            statusBar()->message( TQString( "Failed to save \'%1\'" ).
+                                    arg( m_filename ), 2000 );
+            return;
+        }
+        TQTextStream ts( &file );
+        for ( int i = 0; i < MAX_ELEMENTS; ++i )
+            if ( m_elements[i].isValid() )
+                ts << m_elements[i];
+
+        file.close();
+
+        setCaption( TQString( "Chart -- %1" ).arg( m_filename ) );
+        statusBar()->message( TQString( "Saved \'%1\'" ).arg( m_filename ), 2000 );
+        m_changed = FALSE;
+    }
+
+

Saving data is equally easy. We open the file and create a text +stream. We then stream every valid element to the text stream. All the +detail is handled by the Element class. +

+« Canvas Control | +Contents | +Taking Data » +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial2-08.html b/doc/html/tutorial2-08.html new file mode 100644 index 00000000..77719f58 --- /dev/null +++ b/doc/html/tutorial2-08.html @@ -0,0 +1,349 @@ + + + + + +Taking Data + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Taking Data

+ + +

+

The set data dialog
+

The set data dialog allows the user to add and edit values, and to +choose the color and pattern used to display values. Users can also +enter label text and choose a label color for each label. +

(Extracts from setdataform.h.) +

+ +

    class SetDataForm: public TQDialog
+    {
+        Q_OBJECT
+    public:
+        SetDataForm( ElementVector *elements, int decimalPlaces,
+                     TQWidget *parent = 0, const char *name = "set data form",
+                     bool modal = TRUE, WFlags f = 0 );
+        ~SetDataForm() {}
+
+    public slots:
+        void setColor();
+        void setColor( int row, int col );
+        void currentChanged( int row, int col );
+        void valueChanged( int row, int col );
+
+    protected slots:
+        void accept();
+
+    private:
+        TQTable *table;
+        TQPushButton *colorPushButton;
+        TQPushButton *okPushButton;
+        TQPushButton *cancelPushButton;
+
+    protected:
+        TQVBoxLayout *tableButtonBox;
+        TQHBoxLayout *buttonBox;
+
+    private:
+        ElementVector *m_elements;
+        int m_decimalPlaces;
+    };
+
+

The header file is simple. The constructor takes a pointer to the +element vector so that this "smart" dialog can display and edit the +data directly. We'll explain the slots as we look through the +implementation. +

(Extracts from setdataform.cpp.) +

+ +

    #include "images/pattern01.xpm"
+    #include "images/pattern02.xpm"
+
+

We have created a small .XPM image to show each brush pattern that +TQt supports. We'll use these in the pattern combobox. +

The Constructor +

+

    SetDataForm::SetDataForm( ElementVector *elements, int decimalPlaces,
+                              TQWidget* parent,  const char* name,
+                              bool modal, WFlags f )
+        : TQDialog( parent, name, modal, f )
+
+    {
+        m_elements = elements;
+        m_decimalPlaces = decimalPlaces;
+
+

We pass most of the arguments to the TQDialog superclass. We assign the +elements vector pointer and the number of decimal places to display to +member variables so that they are accessible by all SetDataForm's +member functions. +

        setCaption( "Chart -- Set Data" );
+        resize( 540, 440 );
+
+

We set a caption for the dialog and resize it. +

        tableButtonBox = new TQVBoxLayout( this, 11, 6, "table button box layout" );
+
+

The layout of the form is tquite simple. The buttons will be grouped +together in a horizontal layout and the table and the button layout +will be grouped together vertically using the tableButtonBox layout. +

        table = new TQTable( this, "data table" );
+        table->setNumCols( 5 );
+        table->setNumRows( ChartForm::MAX_ELEMENTS );
+        table->setColumnReadOnly( 1, TRUE );
+        table->setColumnReadOnly( 2, TRUE );
+        table->setColumnReadOnly( 4, TRUE );
+        table->setColumnWidth( 0, 80 );
+        table->setColumnWidth( 1, 60 ); // Columns 1 and 4 must be equal
+        table->setColumnWidth( 2, 60 );
+        table->setColumnWidth( 3, 200 );
+        table->setColumnWidth( 4, 60 );
+        TQHeader *th = table->horizontalHeader();
+        th->setLabel( 0, "Value" );
+        th->setLabel( 1, "Color" );
+        th->setLabel( 2, "Pattern" );
+        th->setLabel( 3, "Label" );
+        th->setLabel( 4, "Color" );
+        tableButtonBox->addWidget( table );
+
+

We create a new TQTable with five columns, and the same number of rows +as we have elements in the elements vector. We make the color and +pattern columns read only: this is to prevent the user typing in them. +We will make the color changeable by the user clicking on a color or +navigating to a color and clicking the Color button. The pattern will +be in a combobox, changeable simply by the user selecting a different +pattern. Next we set suitable initial widths, insert labels for each +column and finally add the table to the tableButtonBox layout. +

        buttonBox = new TQHBoxLayout( 0, 0, 6, "button box layout" );
+
+

We create a horizontal box layout to hold the buttons. +

        colorPushButton = new TQPushButton( this, "color button" );
+        colorPushButton->setText( "&Color..." );
+        colorPushButton->setEnabled( FALSE );
+        buttonBox->addWidget( colorPushButton );
+
+

We create a color button and add it to the buttonBox layout. We +disable the button; we will only enable it when the focus is actually +on a color cell. +

        TQSpacerItem *spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding,
+                                                     TQSizePolicy::Minimum );
+        buttonBox->addItem( spacer );
+
+

Since we want to separate the color button from the OK and Cancel +buttons we next create a spacer and add that to the buttonBox layout. +

        okPushButton = new TQPushButton( this, "ok button" );
+        okPushButton->setText( "OK" );
+        okPushButton->setDefault( TRUE );
+        buttonBox->addWidget( okPushButton );
+
+        cancelPushButton = new TQPushButton( this, "cancel button" );
+        cancelPushButton->setText( "Cancel" );
+        cancelPushButton->setAccel( Key_Escape );
+        buttonBox->addWidget( cancelPushButton );
+
+

The OK and Cancel buttons are created and added to the buttonBox. We +make the OK button the dialog's default button, and we make the Esc +key an accelerator for the Cancel button. +

        tableButtonBox->addLayout( buttonBox );
+
+

We add the buttonBox layout to the tableButtonBox and the layout is +complete. +

        connect( table, SIGNAL( clicked(int,int,int,const TQPoint&) ),
+                 this, SLOT( setColor(int,int) ) );
+        connect( table, SIGNAL( currentChanged(int,int) ),
+                 this, SLOT( currentChanged(int,int) ) );
+        connect( table, SIGNAL( valueChanged(int,int) ),
+                 this, SLOT( valueChanged(int,int) ) );
+        connect( colorPushButton, SIGNAL( clicked() ), this, SLOT( setColor() ) );
+        connect( okPushButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
+        connect( cancelPushButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
+
+

We now "wire up" the form. +

    +
  • If the user clicks a cell we call the setColor() slot; this will +check that the cell is one that holds a color, and if it is, will +invoke the color dialog. +
  • We connect the TQTable's currentChanged() signal to our own +currentChanged() slot; this will be used to enable/disable the color +button for example, depending on which column the user is in. +
  • We connect the table's valueChanged() signal to our own +valueChanged() slot; we'll use this to display the value with the +correct number of decimal places. +
  • If the user clicks the Color button we call a setColor() slot. +
  • The OK button is connected to the accept() slot; we will update the +elements vector in this slot. +
  • The Cancel button is connected to the TQDialog reject() slot, and +retquires no further code or action on our part. +
+

        TQPixmap patterns[MAX_PATTERNS];
+        patterns[0]  = TQPixmap( pattern01 );
+        patterns[1]  = TQPixmap( pattern02 );
+
+

We create a pixmap for every brush pattern and store them in the patterns array. +

        TQRect rect = table->cellRect( 0, 1 );
+        TQPixmap pix( rect.width(), rect.height() );
+
+

We obtain the rectangle that will be occupied by each color cell and +create a blank pixmap of that size. +

        for ( int i = 0; i < ChartForm::MAX_ELEMENTS; ++i ) {
+            Element element = (*m_elements)[i];
+
+            if ( element.isValid() )
+                table->setText(
+                    i, 0,
+                    TQString( "%1" ).arg( element.value(), 0, 'f',
+                                         m_decimalPlaces ) );
+
+            TQColor color = element.valueColor();
+            pix.fill( color );
+            table->setPixmap( i, 1, pix );
+            table->setText( i, 1, color.name() );
+
+            TQComboBox *combobox = new TQComboBox;
+            for ( int j = 0; j < MAX_PATTERNS; ++j )
+                combobox->insertItem( patterns[j] );
+            combobox->setCurrentItem( element.valuePattern() - 1 );
+            table->setCellWidget( i, 2, combobox );
+
+            table->setText( i, 3, element.label() );
+
+            color = element.labelColor();
+            pix.fill( color );
+            table->setPixmap( i, 4, pix );
+            table->setText( i, 4, color.name() );
+
+

For each element in the element vector we must populate the table. +

If the element is valid we write its value in the first column (column +0, Value), formatting it with the specified number of decimal places. +

We read the element's value color and fill the blank pixmap with that +color; we then set the color cell to display this pixmap. We need to +be able to read back the color later (e.g. if the user changes it). +One way of doing this would be to examine a pixel in the pixmap; +another way would be to subclass TQTableItem (in a similar way to our +CanvasText subclass) and store the color there. But we've taken a +simpler route: we set the cell's text to the name of the color. +

Next we populate the pattern combobox with the patterns. We will use +the position of the chosen pattern in the combobox to determine which +pattern the user has selected. TQTable can make use of TQComboTableItem +items; but these only support text, so we use setCellWidget() to +insert TQComboBox's into the table instead. +

Next we insert the element's label. Finally we set the label color in +the same way as we set the value color. +

The Slots +

+

    void SetDataForm::currentChanged( int, int col )
+    {
+        colorPushButton->setEnabled( col == 1 || col == 4 );
+    }
+
+

As the user navigates through the table currentChanged() signals are +emitted. If the user enters column 1 or 4 (value color or label color) +we enable the colorPushButton; otherwise we disable it. +

    void SetDataForm::valueChanged( int row, int col )
+    {
+        if ( col == 0 ) {
+            bool ok;
+            double d = table->text( row, col ).toDouble( &ok );
+            if ( ok && d > EPSILON )
+                table->setText(
+                    row, col, TQString( "%1" ).arg(
+                                d, 0, 'f', m_decimalPlaces ) );
+            else if ( !table->text( row, col ).isEmpty() )
+                table->setText( row, col, table->text( row, col ) + "?" );
+        }
+    }
+
+

If the user changes the value we must format it using the correct +number of decimal places, or indicate that it is invalid. +

    void SetDataForm::setColor()
+    {
+        setColor( table->currentRow(), table->currentColumn() );
+        table->setFocus();
+    }
+
+

If the user presses the Color button we call the other setColor() +function and put the focus back into the table. +

    void SetDataForm::setColor( int row, int col )
+    {
+        if ( !( col == 1 || col == 4 ) )
+            return;
+
+        TQColor color = TQColorDialog::getColor(
+                            TQColor( table->text( row, col ) ),
+                            this, "color dialog" );
+        if ( color.isValid() ) {
+            TQPixmap pix = table->pixmap( row, col );
+            pix.fill( color );
+            table->setPixmap( row, col, pix );
+            table->setText( row, col, color.name() );
+        }
+    }
+
+

If this function is called with the focus on a color cell we call +the static TQColorDialog::getColor() dialog to get the user's choice of +color. If they chose a color we fill the color cell's pixmap with that +color and set the cell's text to the new color's name. +

    void SetDataForm::accept()
+    {
+        bool ok;
+        for ( int i = 0; i < ChartForm::MAX_ELEMENTS; ++i ) {
+            Element &element = (*m_elements)[i];
+            double d = table->text( i, 0 ).toDouble( &ok );
+            if ( ok )
+                element.setValue( d );
+            else
+                element.setValue( Element::INVALID );
+            element.setValueColor( TQColor( table->text( i, 1 ) ) );
+            element.setValuePattern(
+                    ((TQComboBox*)table->cellWidget( i, 2 ))->currentItem() + 1 );
+            element.setLabel( table->text( i, 3 ) );
+            element.setLabelColor( TQColor( table->text( i, 4 ) ) );
+        }
+
+        TQDialog::accept();
+    }
+
+

If the user clicks OK we must update the elements vector. We iterate +over the vector and set each element's value to the value the user has +entered or INVALID if the value is invalid. We set the value color +and the label color by constructing TQColor temporaries that take a +color name as argument. The pattern is set to the pattern combobox's +current item with an offset of 1 (since our pattern numbers begin at +1, but the combobox's items are indexed from 0). +

Finally we call TQDialog::accept(). +

+« File Handling | +Contents | +Setting Options » +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial2-09.html b/doc/html/tutorial2-09.html new file mode 100644 index 00000000..a8c5586d --- /dev/null +++ b/doc/html/tutorial2-09.html @@ -0,0 +1,249 @@ + + + + + +Setting Options + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Setting Options

+ + +

+

The options dialog
+

We provide an options dialog so that the user can set options that +apply to all data sets in one place. +

(Extracts from optionsform.h.) +

+ +

    class OptionsForm : public TQDialog
+    {
+        Q_OBJECT
+    public:
+        OptionsForm( TQWidget* parent = 0, const char* name = "options form",
+                     bool modal = FALSE, WFlags f = 0 );
+        ~OptionsForm() {}
+
+        TQFont font() const { return m_font; }
+        void setFont( TQFont font );
+
+        TQLabel *chartTypeTextLabel;
+        TQComboBox *chartTypeComboBox;
+        TQPushButton *fontPushButton;
+        TQLabel *fontTextLabel;
+        TQFrame *addValuesFrame;
+        TQButtonGroup *addValuesButtonGroup;
+        TQRadioButton *noRadioButton;
+        TQRadioButton *yesRadioButton;
+        TQRadioButton *asPercentageRadioButton;
+        TQLabel *decimalPlacesTextLabel;
+        TQSpinBox *decimalPlacesSpinBox;
+        TQPushButton *okPushButton;
+        TQPushButton *cancelPushButton;
+
+    protected slots:
+        void chooseFont();
+
+    protected:
+        TQVBoxLayout *optionsFormLayout;
+        TQHBoxLayout *chartTypeLayout;
+        TQHBoxLayout *fontLayout;
+        TQVBoxLayout *addValuesFrameLayout;
+        TQVBoxLayout *addValuesButtonGroupLayout;
+        TQHBoxLayout *decimalPlacesLayout;
+        TQHBoxLayout *buttonsLayout;
+
+    private:
+        TQFont m_font;
+    };
+
+

The layout of this dialog is slightly more complicated than for the +set data form, but we only need a single slot. Unlike the "smart" set +data form this is a "dumb" dialog that simply provides the widgets for +the caller to set and read. The caller is responsible for updating +things based on the changes the user makes. +

(Extracts from optionsform.cpp.) +

+ +

    #include "images/options_horizontalbarchart.xpm"
+    #include "images/options_piechart.xpm"
+    #include "images/options_verticalbarchart.xpm"
+
+

We include some some pixmaps to use in the chart type combobox. +

The Constructor +

+

    OptionsForm::OptionsForm( TQWidget* parent, const char* name,
+                              bool modal, WFlags f )
+        : TQDialog( parent, name, modal, f )
+    {
+        setCaption( "Chart -- Options" );
+        resize( 320, 290 );
+
+

We pass all the arguments on to the TQDialog constructor, set a caption +and set an initial size. +

The layout of the form will be to have the chart type label and combo +box in a horizontal box layout, and similarly for the font button and +font label, and for the decimal places label and spinbox. The +buttons will also be placed in a horizontal layout, but with a spacer +to move them to the right. The show values radio buttons will be +vertically aligned within a frame. All of these will be laid out in a +vertical box layout. +

        optionsFormLayout = new TQVBoxLayout( this, 11, 6 );
+
+

All the widgets will be laid out within the form's vertical box layout. +

        chartTypeLayout = new TQHBoxLayout( 0, 0, 6 );
+
+

The chart type label and combobox will be laid out side by side. +

        chartTypeTextLabel = new TQLabel( "&Chart Type", this );
+        chartTypeLayout->addWidget( chartTypeTextLabel );
+
+        chartTypeComboBox = new TQComboBox( FALSE, this );
+        chartTypeComboBox->insertItem( TQPixmap( options_piechart ), "Pie Chart" );
+        chartTypeComboBox->insertItem( TQPixmap( options_verticalbarchart ),
+                                       "Vertical Bar Chart" );
+        chartTypeComboBox->insertItem( TQPixmap( options_horizontalbarchart ),
+                                       "Horizontal Bar Chart" );
+        chartTypeLayout->addWidget( chartTypeComboBox );
+        optionsFormLayout->addLayout( chartTypeLayout );
+
+

We create the chart type label (with an accelerator which we'll relate +to the chart type combobox later). We also create a chart type +combobox, populating it with both pixmaps and text. We add them both +to the horizontal layout and add the horizontal layout to the form's +vertical layout. +

        fontLayout = new TQHBoxLayout( 0, 0, 6 );
+
+        fontPushButton = new TQPushButton( "&Font...", this );
+        fontLayout->addWidget( fontPushButton );
+        TQSpacerItem* spacer = new TQSpacerItem( 0, 0,
+                                               TQSizePolicy::Expanding,
+                                               TQSizePolicy::Minimum );
+        fontLayout->addItem( spacer );
+
+        fontTextLabel = new TQLabel( this ); // Must be set by caller via setFont()
+        fontLayout->addWidget( fontTextLabel );
+        optionsFormLayout->addLayout( fontLayout );
+
+

We create a horizontal box layout to hold the font button and font +label. The font button is straight-forward. We add a spacer to improve +the appearance. The font text label is initially empty (since we don't +know what font the user is using). +

        addValuesFrame = new TQFrame( this );
+        addValuesFrame->setFrameShape( TQFrame::StyledPanel );
+        addValuesFrame->setFrameShadow( TQFrame::Sunken );
+        addValuesFrameLayout = new TQVBoxLayout( addValuesFrame, 11, 6 );
+
+        addValuesButtonGroup = new TQButtonGroup( "Show Values", addValuesFrame );
+        addValuesButtonGroup->setColumnLayout(0, TQt::Vertical );
+        addValuesButtonGroup->layout()->setSpacing( 6 );
+        addValuesButtonGroup->layout()->setMargin( 11 );
+        addValuesButtonGroupLayout = new TQVBoxLayout(
+                                            addValuesButtonGroup->layout() );
+        addValuesButtonGroupLayout->setAlignment( TQt::AlignTop );
+
+        noRadioButton = new TQRadioButton( "&No", addValuesButtonGroup );
+        noRadioButton->setChecked( TRUE );
+        addValuesButtonGroupLayout->addWidget( noRadioButton );
+
+        yesRadioButton = new TQRadioButton( "&Yes", addValuesButtonGroup );
+        addValuesButtonGroupLayout->addWidget( yesRadioButton );
+
+        asPercentageRadioButton = new TQRadioButton( "As &Percentage",
+                                                    addValuesButtonGroup );
+        addValuesButtonGroupLayout->addWidget( asPercentageRadioButton );
+        addValuesFrameLayout->addWidget( addValuesButtonGroup );
+
+

The user may opt to display their own labels as they are or to add the +values at the end of each label, either as-is or as percentages. +

We create a frame to present the radio buttons in and create a layout +for them. We create a button group (so that TQt will take care of +handling the exclusive radio button behaviour automatically). Next we +create the radio buttons, making "No" the default. +

The decimal places label and spin box are laid out just like the other +horizontal layouts, and the buttons are laid out in a very similar way +to the buttons in the set data form. +

        connect( fontPushButton, SIGNAL( clicked() ), this, SLOT( chooseFont() ) );
+        connect( okPushButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
+        connect( cancelPushButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
+
+

We only need three connections: +

    +
  1. When the user clicks the font button we execute our own +chooseFont() slot. +
  2. If the user clicks OK we call TQDialog::accept(); it is up to the +caller to read the data from the dialog's widgets and perform any +necessary actions. +
  3. If the user clicks Cancel we call TQDialog::reject(). +
+

        chartTypeTextLabel->setBuddy( chartTypeComboBox );
+        decimalPlacesTextLabel->setBuddy( decimalPlacesSpinBox );
+
+

We use the setBuddy() function to associate widgets with label +accelerators. +

The Slots +

+

    void OptionsForm::chooseFont()
+    {
+        bool ok;
+        TQFont font = TQFontDialog::getFont( &ok, m_font, this );
+        if ( ok )
+            setFont( font );
+    }
+
+

When the user clicks the Font button this slot is invoked. It simply +calls the static TQFontDialog::getFont() function to obtain the user's +choice of font. If they chose a font we call our setFont() slot which +will present a textual description of the font in the font label. +

    void OptionsForm::setFont( TQFont font )
+    {
+        TQString label = font.family() + " " +
+                        TQString::number( font.pointSize() ) + "pt";
+        if ( font.bold() )
+            label += " Bold";
+        if ( font.italic() )
+            label += " Italic";
+        fontTextLabel->setText( label );
+        m_font = font;
+    }
+
+

This function displays a textual description of the chosen font in the +font label and holds a copy of the font in the m_font member. We +need the font in a member so that we can provide a default font for +chooseFont(). +

+« Taking Data | +Contents | +The Project File » +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial2-10.html b/doc/html/tutorial2-10.html new file mode 100644 index 00000000..d234b19d --- /dev/null +++ b/doc/html/tutorial2-10.html @@ -0,0 +1,81 @@ + + + + + +The Project File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

The Project File

+ + +

+

(chart.pro.) +

+ +

    TEMPLATE = app
+
+    CONFIG  += warn_on
+
+    RETQUIRES = full-config
+
+    HEADERS += element.h \
+               canvastext.h \
+               canvasview.h \
+               chartform.h \
+               optionsform.h \
+               setdataform.h
+    SOURCES += element.cpp \
+               canvasview.cpp \
+               chartform.cpp \
+               chartform_canvas.cpp \
+               chartform_files.cpp \
+               optionsform.cpp \
+               setdataform.cpp \
+               main.cpp
+
+

By using a project file we can insulate ourselves from having to +create Makefiles for the platforms we wish to target. To generate a +Makefile all we need do is run qmake, +e.g. +

+qmake -o Makefile chart.pro
+
+ +

+« Setting Options | +Contents | +Wrapping Up » +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial2-11.html b/doc/html/tutorial2-11.html new file mode 100644 index 00000000..7b3f64ff --- /dev/null +++ b/doc/html/tutorial2-11.html @@ -0,0 +1,72 @@ + + + + + +Wrapping Up + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Wrapping Up

+ + +

+

The chart application shows how straight-forward it is to create +applications and their dialogs with TQt. Creating menus and toolbars is +easy and TQt's signals and slots +mechanism considerably simplifies GUI event handling. +

Manually creating layouts can take some time to master, but there is +an easy alternative: TQt Designer. +TQt Designer includes simple but +powerful layout tools and a code editor. It can automatically generate +main.cpp and the .pro project file. +

The chart application is ripe for further development and +experimentation. You might consider implementing some of the following +ideas: +

    +
  • Use a TQValidator subclass to ensure that only valid doubles are +entered as values. +
  • Adding more chart types, e.g. line graph, area graph and hi-lo +graph. +
  • Allowing the user to set top, bottom left and right margins. +
  • Allowing the user to specify a title which they can drag into +position like the labels. +
  • Providing an axis drawing and labelling option. +
  • Providing an option to provide a key (or legend) instead of labels. +
  • Adding a 3D look option to all chart types. +
+

+« The Project File | +Contents » +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/tutorial2.html b/doc/html/tutorial2.html new file mode 100644 index 00000000..43c73df4 --- /dev/null +++ b/doc/html/tutorial2.html @@ -0,0 +1,65 @@ + + + + + +Tutorial #2 + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Tutorial #2

+ + +

+

This tutorial presents a more "real world" example of TQt programming +than the first tutorial. It introduces many aspects of TQt programming, +including the creation of menus (including a recent files list), +toolbars and dialogs, loading and saving user settings, etc. +

If you're completely new to TQt, please read How to Learn TQt if you haven't already done so. +

+

+Introduction » +

+ + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/uic.html b/doc/html/uic.html new file mode 100644 index 00000000..58f20744 --- /dev/null +++ b/doc/html/uic.html @@ -0,0 +1,133 @@ + + + + + +User Interface Compiler (uic) + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

User Interface Compiler (uic)

+ + + + +

This page documents the User Interface Compiler for the TQt GUI +toolkit. The uic reads a user interface definition +(.ui) file in XML as generated by TQt +Designer and creates corresponding C++ header or source files. +It can also generate an image file to embed raw image data in C++ +source code. +

Options +

+

File Generation Options +

+

Generate declaration: +

+uic  [options]  <file>
+
+ +

Generate implementation: +

+uic  [options] -impl <headerfile> <file>
+
+ +
    +
  • <headerfile> - name of the declaration file +
+

Generate image collection: +

+uic  [options] -embed <project> <image1> <image2> <image3> ...
+
+ +
    +
  • <project> - project name +
  • <image[0..n]> - image files +
+

For convenience, uic can also generate declaration or +implementation stubs for subclasses. +

Generate subclass declaration: +

+uic  [options] -subdecl <classname> <headerfile> <file>
+
+ +
    +
  • <classname> - name of the subclass to generate +
  • <headerfile> - declaration file of the baseclass +
+

Generate subclass implementation: +

+uic  [options] -subimpl <classname> <headerfile> <file>
+
+ +
    +
  • <classname> - name of the subclass to generate +
  • <headerfile> - declaration file of the subclass +
+

General Options +

+

    +
  • -o file - write output to 'file' rather than to stdout. +
  • -nofwd - omit forward declarations of custom classes in the +generated header file. This is necessary if typedef classes are used. +
  • -tr func - use func(sourceText, comment) rather than +trUtf8(sourceText, comment) for internationalization. +
  • -pch file - add #include "file" as the first statement in the implementation file. +
+

Usage +

+

uic is almost always invoked by make (1), rather than by hand. +

Here are useful makefile rules if you only use GNU make: +

+    %.h: %.ui
+        uic $< -o $@
+
+    %.cpp: %.ui
+        uic -impl $*.h $< -o $@
+
+ +If you want to write portably, you can use individual rules of the +following form: +
+    NAME.h: NAME.ui
+        uic $< -o $@
+
+    NAME.cpp: NAME.ui
+        uic -impl $*.h $< -o $@
+
+ +You must also remember to add NAME.cpp to your SOURCES (substitute +your favorite name) variable and NAME.o to your OBJECTS variable. +

(While we prefer to name our C++ source files .cpp, the uic doesn't +care, so you can use .C, .cc, .CC, .cxx or even .c++ if you prefer.) +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/unicode.html b/doc/html/unicode.html new file mode 100644 index 00000000..6b7873c6 --- /dev/null +++ b/doc/html/unicode.html @@ -0,0 +1,130 @@ + + + + + +About Unicode + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

About Unicode

+ + +

Unicode is a multi-byte character set, portable across all major +computing platforms and with decent coverage over most of the world. +It is also single-locale; it includes no code pages or other +complexities that make software harder to write and test. There is no +competing character set that's reasonably multiplatform. For these +reasons, Trolltech uses Unicode as the native character set for TQt +(since version 2.0). +

Information about Unicode on the web. +

+

The Unicode Consortium +has a number of documents available, including +

+

The Standard +

+

The current version of the standard is 3.2 +

+

Unicode in TQt +

+

In TQt, and in most applications that use TQt, most or all user-visible +strings are stored using Unicode. TQt provides: +

    +

  • Translation to/from legacy encodings for file I/O: see TQTextCodec and TQTextStream. +
  • Translation from Input Methods and 8-bit keyboard input. +
  • Translation to legacy character sets for on-screen display. +
  • A string class, TQString, that stores Unicode characters, with +support for migrating from C strings including fast (cached) +translation to and from US-ASCII, and all the usual string +operations. +
  • Unicode-aware widgets where appropriate. +
  • Unicode support detection on Windows, so that TQt provides Unicode +even on Windows platforms that do not support it natively. +

+

To fully benefit from Unicode, we recommend using TQString for storing +all user-visible strings, and performing all text file I/O using +TQTextStream. Use TQKeyEvent::text() for keyboard input in any custom +widgets you write; it does not make much difference for slow typists +in Western Europe or North America, but for fast typists or people +using special input methods using text() is beneficial. +

All the function arguments in TQt that may be user-visible strings, TQLabel::setText() and a many others, take const TQString &s. +TQString provides implicit casting from const char * +so that things like +

+    myLabel->setText( "Hello, Dolly!" );
+
+ +will work. There is also a function, TQObject::tr(), that provides +translation support, like this: +
+    myLabel->setText( tr("Hello, Dolly!") );
+
+ +

tr() (simplifying somewhat) maps from const char * to a +Unicode string, and uses installable TQTranslator objects to do the +mapping. +

TQt provides a number of built-in TQTextCodec classes, that is, +classes that know how to translate between Unicode and legacy +encodings to support programs that must talk to other programs or +read/write files in legacy file formats. +

By default, conversion to/from const char * uses a +locale-dependent codec. However, applications can easily find codecs +for other locales, and set any open file or network connection to use +a special codec. It is also possible to install new codecs, for +encodings that the built-in ones do not support. (At the time of +writing, Vietnamese/VISCII is one such example.) +

Since US-ASCII and ISO-8859-1 are so common, there are also especially +fast functions for mapping to and from them. For example, to open an +application's icon one might do this: +

+        TQFile f( TQString::fromLatin1("appicon.png") );
+
+ +

Regarding output, TQt will do a best-effort conversion from +Unicode to whatever encoding the system and fonts provide. +Depending on operating system, locale, font availability and TQt's +support for the characters used, this conversion may be good or bad. +We will extend this in upcoming versions, with emphasis on the most +common locales first. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/unsmooth.png b/doc/html/unsmooth.png new file mode 100644 index 00000000..bc008c99 Binary files /dev/null and b/doc/html/unsmooth.png differ diff --git a/doc/html/validateaccelerators.png b/doc/html/validateaccelerators.png new file mode 100644 index 00000000..68201fec Binary files /dev/null and b/doc/html/validateaccelerators.png differ diff --git a/doc/html/validatephrases.png b/doc/html/validatephrases.png new file mode 100644 index 00000000..62fe5f28 Binary files /dev/null and b/doc/html/validatephrases.png differ diff --git a/doc/html/validatepunctuation.png b/doc/html/validatepunctuation.png new file mode 100644 index 00000000..8ce2648d Binary files /dev/null and b/doc/html/validatepunctuation.png differ diff --git a/doc/html/web.png b/doc/html/web.png new file mode 100644 index 00000000..5888f79c Binary files /dev/null and b/doc/html/web.png differ diff --git a/doc/html/whatsthis b/doc/html/whatsthis new file mode 100644 index 00000000..b95273f5 --- /dev/null +++ b/doc/html/whatsthis @@ -0,0 +1,416 @@ +2D area that can contain QCanvasItem objects. | QCanvas +2D transformations of a coordinate system. | QWMatrix +Abstract base class for accessing SQL databases. | QSqlDriver +Abstract base class for custom menu items in popup menus. | QCustomMenuItem +Abstract base class for implementations of additional COM interfaces. | QAxAggregated +Abstract base class of internal layout iterators. | QGLayoutIterator +Abstract base for Qt/Embedded graphics driver plugins. | QGfxDriverPlugin +Abstract base for Qt/Embedded keyboard driver plugins. | QKbdDriverPlugin +Abstract base for Qt/Embedded mouse driver plugins. | QMouseDriverPlugin +Abstract base for custom QSqlDriver plugins. | QSqlDriverPlugin +Abstract base for custom QStyle plugins. | QStylePlugin +Abstract base for custom QTextCodec plugins. | QTextCodecPlugin +Abstract base for custom QWidget plugins. | QWidgetPlugin +Abstract base for custom image format plugins. | QImageFormatPlugin +Abstract base for fixed-size grids. | QGridView +Abstract class that provides an API to initalize and access a COM object. | QAxBase +Abstract graphic object on a QCanvas. | QCanvasItem +Abstract interface for accessing data from SQL databases. | QSqlResult +Abstract item that a QLayout manipulates. | QLayoutItem +Abstract user interface action that can appear both in menus and tool bars. | QAction +Abstraction for date and edit editors. | QDateTimeEditBase +Abstraction of Unicode text and the classic C '\0'-terminated char array. | QString +Abstraction of objects which provide formatted data of a certain MIME type. | QMimeSource +Abstraction of the classic C zero-terminated char array (char *). | QCString +Abstraction used by QImageDecoder. | QImageConsumer +Access serialization between threads. | QMutex +Access to a selected area in a QTable. | QTableSelection +Access to directory structures and their contents in a platform-independent way. | QDir +Access to screen information on multi-head systems. | QDesktopWidget +Access to the platform audio facilities. | QSound +Access to the session manager. | QSessionManager +Access to the window system clipboard. | QClipboard +Acts like a union for the most common Qt data types. | QVariant +Allows the appearance of the Qt/Embedded Window Manager to be customized. | QWSDecoration +Allows waiting/waking for conditions between threads. | QWaitCondition +And its descendants manage the framebuffer and palette. | QScreen +Animated canvas item on a QCanvas. | QCanvasSprite +Application-global cache for pixmaps. | QPixmapCache +Area with movable labelled icons. | QIconView +Array of QCanvasPixmaps. | QCanvasPixmapArray +Array of bits. | QBitArray +Array of bytes. | QByteArray +Array of points. | QPointArray +Asynchronous DNS lookups. | QDns +Base class for QMenuBar and QPopupMenu. | QMenuData +Base class for implementing QTextEdit syntax highlighters. | QSyntaxHighlighter +Basic functions for reading and writing text using a QIODevice. | QTextStream +Blank space in a layout. | QSpacerItem +Bridge between application objects and script code. | QAxScriptManager +Browsing and editing of SQL tables and views. | QSqlCursor +Browsing of general SQL SELECT statements. | QSqlSelectCursor +Buffered TCP connection. | QSocket +Bundles signals from identifiable senders. | QSignalMapper +CDE look and feel. | QCDEStyle +Can be used to send signals for classes that don't inherit QObject. | QSignal +Checkable list view items. | QCheckListItem +Checkbox with a text label. | QCheckBox +Checkboxes in QTables. | QCheckTableItem +Clip region for a painter. | QRegion +Clock time functions. | QTime +Collection of nodes that can be accessed by name. | QDomNamedNodeMap +Collection of styles for rich text rendering and a generator of tags. | QStyleSheet +Collects tool tips into related groups. | QToolTipGroup +Color groups for each widget state. | QPalette +Colors based on RGB or HSV values. | QColor +Column of tabbed widget items. | QToolBox +Combined button and popup list. | QComboBox +Combines a QDateEdit and QTimeEdit widget into a single widget for editing datetimes. | QDateTimeEdit +Command button. | QPushButton +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 +Convenience class for input streams. | QTextIStream +Convenience class for output streams. | QTextOStream +Conversion between text encodings. | QTextCodec +Conversion to and from EUC-JP character sets. | QEucJpCodec +Conversion to and from EUC-KR character sets. | QEucKrCodec +Conversion to and from JIS character sets. | QJisCodec +Conversion to and from Shift-JIS. | QSjisCodec +Conversion to and from the Big5 encoding. | QBig5Codec +Conversion to and from the Big5-HKSCS encoding. | QBig5hkscsCodec +Conversion to and from the Chinese GB18030/GBK/GB2312 encoding. | QGb18030Codec +Conversion to and from the Chinese GB2312 encoding. | QGb2312Codec +Conversion to and from the Chinese GBK encoding. | QGbkCodec +Conversion to and from the Tamil TSCII encoding. | QTsciiCodec +Conversion to and from visually ordered Hebrew. | QHebrewCodec +Converts between numbers and their string representations in various languages. | QLocale +Corner-grip for resizing a top-level window. | QSizeGrip +Creates QScreen objects for Qt/Embedded. | QGfxDriverFactory +Creates QStyle objects. | QStyleFactory +Creates QWSKeyboardHandler objects for Qt/Embedded. | QKbdDriverFactory +Creates QWSMouseHandler objects for Qt/Embedded. | QMouseDriverFactory +Creates and manages data entry forms tied to SQL databases. | QSqlForm +Creates well-compressed PNG animations. | QPNGImagePacker +Data manipulation and navigation for data entry forms. | QDataBrowser +Date and time functions. | QDateTime +Date editor. | QDateEdit +Date functions. | QDate +Default implementation of all the XML handler classes. | QXmlDefaultHandler +Defines a Universally Unique Identifier (UUID). | QUuid +Defines a factory for the creation of COM components. | QAxFactory +Defines a point in the plane. | QPoint +Defines a rectangle in the plane. | QRect +Defines an interface that exposes information about accessible objects. | QAccessibleInterface +Defines how a QPainter should draw lines and outlines of shapes. | QPen +Defines the fill pattern of shapes drawn by a QPainter. | QBrush +Defines the size of a two-dimensional object. | QSize +Describes a key event. | QKeyEvent +Dialog widget for selecting a font. | QFontDialog +Dialog widget for specifying colors. | QColorDialog +Dialogs that allow users to select files or directories. | QFileDialog +Direct access to the video hardware. | QDirectPainter +Displays a number with LCD-like digits. | QLCDNumber +Does low-level painting e.g. on widgets. | QPainter +Doubly-linked list of char*. | QStrList +Doubly-linked list of char* with case-insensitive comparison. | QStrIList +Drag and drop object for transferring colors. | QColorDrag +Drag and drop object for transferring images. | QImageDrag +Drag and drop object for transferring plain and Unicode text. | QTextDrag +Drag object for a list of URI references. | QUriDrag +Ellipse or ellipse segment on a QCanvas. | QCanvasEllipse +Encapsulates MIME-based data transfer. | QDragObject +Encapsulates a database record, i.e. a set of database fields. | QSqlRecord +Encapsulates a drag item. | QIconDragItem +Encapsulates a key sequence as used by accelerators. | QKeySequence +Encapsulates a set of database field meta data. | QSqlRecordInfo +Encapsulates an OpenGL rendering context. | QGLContext +Encapsulates the common Look and Feel of a GUI. | QCommonStyle +Encapsulation of a set of text styles. | QStyleSheetItem +Enums and static functions relating to accessibility. | QAccessible +Error message display dialog. | QErrorMessage +Event parameters for child object events. | QChildEvent +Event parameters for move events. | QMoveEvent +Event parameters for paint events. | QPaintEvent +Event parameters for resize events. | QResizeEvent +Event parameters for widget focus events. | QFocusEvent +Event which is sent after a widget is hidden. | QHideEvent +Event which is sent to the widget when a drag and drop first drags onto the widget. | QDragEnterEvent +Event which is sent to the widget when a drag and drop leaves the widget. | QDragLeaveEvent +Event which is sent when a drag and drop is completed. | QDropEvent +Event which is sent when a widget is shown. | QShowEvent +Event which is sent while a drag and drop is in progress. | QDragMoveEvent +Extensible provider of mime-typed data. | QMimeSourceFactory +Factory that makes QImageFormat objects. | QImageFormatType +Feedback on the progress of a slow operation. | QProgressDialog +File previewing in QFileDialog. | QFilePreview +Flexible SQL table widget that supports browsing and editing. | QDataTable +Flexible editable table widget. | QTable +Font metrics information. | QFontMetrics +Font used for drawing text. | QFont +For the dynamic creation of widgets from Qt Designer .ui files. | QWidgetFactory +Framework for wizard dialogs. | QWizard +Functions to manipulate and describe QSqlCursor and QSqlDatabase indexes. | QSqlIndex +General information about fonts. | QFontInfo +Group box frame with a title. | QGroupBox +Group of widget colors. | QColorGroup +Groups actions together. | QActionGroup +Handles keyboard accelerator and shortcut keys. | QAccel +Hardware-independent pixmap representation with direct access to the pixel data. | QImage +Header information for HTTP. | QHttpHeader +Header row or column, e.g. for tables and listviews. | QHeader +Helper class for QString. | QCharRef +Helper class for XML readers which want to include namespace support. | QXmlNamespaceSupport +Horizontal bar suitable for presenting status information. | QStatusBar +Horizontal geometry management for its child widgets. | QHBox +Horizontal menu bar. | QMenuBar +Horizontal progress bar. | QProgressBar +I/O device that operates on a QByteArray. | QBuffer +I/O device that operates on files. | QFile +IP address. | QHostAddress +Icons for QFileDialog to use. | QFileIconProvider +Implementation of a QNetworkProtocol that works on the local file system. | QLocalFs +Implementation of a simple XML reader (parser). | QXmlSimpleReader +Implementation of the FTP protocol. | QFtp +Implementation of the HTTP protocol. | QHttp +Implements a list view item. | QListViewItem +Implements a list/tree view. | QListView +Implements a splitter widget. | QSplitter +Implements an Appearance Manager style. | QMacStyle +Implements font management in Qt/Embedded. | QFontManager +Implements parts of the QAccessibleInterface for QObjects. | QAccessibleObject +Implements the keyboard driver for Qt/Embedded. | QWSKeyboardHandler +Incremental image decoder for a specific image format. | QImageFormat +Incremental image decoder for all supported image formats. | QImageDecoder +Incremental loading of animations or images, signalling as it progresses. | QMovie +Information about a paint device. | QPaintDeviceMetrics +Information about the features of the DOM implementation. | QDomImplementation +Information about the fonts available in the underlying window system. | QFontDatabase +Integer value within a range. | QRangeControl +Interface between a QWidget and an ActiveX client. | QAxBindable +Interface for XML readers (i.e. parsers). | QXmlReader +Interface to report DTD content of XML data. | QXmlDTDHandler +Interface to report declaration content of XML data. | QXmlDeclHandler +Interface to report errors in XML data. | QXmlErrorHandler +Interface to report the lexical content of XML data. | QXmlLexicalHandler +Interface to report the logical content of XML data. | QXmlContentHandler +Interface to resolve external entities contained in XML data. | QXmlEntityResolver +Internal class, used with QBitArray. | QBitVal +International input methods for Qt/Embedded. | QWSInputMethod +Internationalization support for text output. | QTranslator +Iterator for QAsciiCache collections. | QAsciiCacheIterator +Iterator for QAsciiDict collections. | QAsciiDictIterator +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 QObjectLists. | QObjectListIterator +Iterator for QPtrDict collections. | QPtrDictIterator +Iterator for QPtrList collections. | QPtrListIterator +Iterator for QValueList. | QValueListIterator +Iterator for collections of QListViewItems. | QListViewItemIterator +Iterator for the QStrList and QStrIList classes. | QStrListIterator +Iterators over QLayoutItem. | QLayoutIterator +Layout attribute describing horizontal and vertical resizing policy. | QSizePolicy +Layout item that represents a widget. | QWidgetItem +Lays out widgets in a grid. | QGridLayout +Lightweight Unicode character. | QChar +Line on a QCanvas. | QCanvasLine +Lines up child widgets horizontally or vertically. | QBoxLayout +Lines up widgets horizontally. | QHBoxLayout +Lines up widgets vertically. | QVBoxLayout +List box items that display text. | QListBoxText +List box items with a pixmap and optional text. | QListBoxPixmap +List of QCanvasItems. | QCanvasItemList +List of QDomNode objects. | QDomNodeList +List of selectable, read-only items. | QListBox +List of strings. | QStringList +Mac/Platinum look and feel. | QPlatinumStyle +Main application window, with a menu bar, dock windows (e.g. for toolbars), and a status bar. | QMainWindow +Maintains the list of widgets in the focus chain. | QFocusData +Manages and lays out QDockWindows. | QDockArea +Manages the GUI application's control flow and main settings. | QApplication +Manages the event queue. | QEventLoop +Manipulates the fields in SQL database tables and views. | QSqlField +Maps open-standard MIME to Mac flavors. | QMacMime +Maps open-standard MIME to Window Clipboard formats. | QWindowsMime +Means of executing and manipulating SQL statements. | QSqlQuery +Means of using Qt Assistant as an application's help tool. | QAssistantClient +Means of using comboboxes in QTables. | QComboTableItem +Meta information about Qt objects. | QMetaObject +Microsoft Windows-like look and feel. | QWindowsStyle +Modal dialog with a short message, an icon, and some buttons. | QMessageBox +Monochrome (1-bit depth) pixmaps. | QBitmap +More sophisticated Motif-ish look and feel. | QMotifPlusStyle +Motif look and feel. | QMotifStyle +Mouse cursor with an arbitrary shape. | QCursor +Mouse driver for Qt/Embedded. | QWSMouseHandler +Movable panel containing widgets such as tool buttons. | QToolBar +Multi-bezier splines on a QCanvas. | QCanvasSpline +Namespace for Qt SQL identifiers that need to be global-like. | QSql +Namespace for miscellaneous identifiers in the Qt OpenGL module. | QGL +Namespace for miscellaneous identifiers that need to be global-like. | Qt +Off-screen, pixel-based paint device. | QPixmap +On-screen view of a QCanvas. | QCanvasView +One-line text editor. | QLineEdit +Optional parameters for QStyle functions. | QStyleOption +Organizes QButton widgets in a group. | QButtonGroup +Organizes QButton widgets in a group with one horizontal row. | QHButtonGroup +Organizes QButton widgets in a vertical column. | QVButtonGroup +Organizes a group of widgets in a vertical column. | QVGroupBox +Organizes widgets in a group with one horizontal row. | QHGroupBox +Paint device that paints on a printer. | QPrinter +Paint device that records and replays QPainter commands. | QPicture +Parameters for input method events. | QIMEvent +Parameters for loading and saving images. | QImageIO +Parameters that describe a Tablet event. | QTabletEvent +Parameters that describe a close event. | QCloseEvent +Parameters that describe a context menu event. | QContextMenuEvent +Parameters that describe a mouse event. | QMouseEvent +Parameters that describe a timer event. | QTimerEvent +Parameters that describe a wheel event. | QWheelEvent +Pattern matching using regular expressions. | QRegExp +Per-thread data storage. | QThreadStorage +Persistent platform-independent application settings. | QSettings +Pixmaps for QCanvasSprites. | QCanvasPixmap +Platform-independent low-level socket API. | QSocketDevice +Platform-independent threads. | QThread +Polygon on a QCanvas. | QCanvasPolygon +Polygonal canvas item on a QCanvas. | QCanvasPolygonalItem +Popup menu widget. | QPopupMenu +Powerful single-page rich text editor. | QTextEdit +QObject that is a web browser plugin. | QNPInstance +QObject that wraps a COM object. | QAxObject +QPtrList of QObjects. | QObjectList +QWidget that is a web browser plugin window. | QNPWidget +QWidget that wraps an ActiveX control. | QAxWidget +Quick-access button to commands or options, usually used inside a QToolBar. | QToolButton +Radio button with a text or pixmap label. | QRadioButton +Range checking of floating-point numbers. | QDoubleValidator +Read-only SQL forms. | QDataView +Rectangle on a QCanvas. | QCanvasRectangle +Represents a generic string in the DOM. | QDomCharacterData +Represents an XML CDATA section. | QDomCDATASection +Represents an XML comment. | QDomComment +Represents an XML document. | QDomDocument +Represents an XML entity. | QDomEntity +Represents an XML entity reference. | QDomEntityReference +Represents an XML notation. | QDomNotation +Represents an XML processing instruction. | QDomProcessingInstruction +Represents one attribute of a QDomElement. | QDomAttr +Represents one element in the DOM tree. | QDomElement +Represents text data in the parsed XML document. | QDomText +Request header information for HTTP. | QHttpRequestHeader +Response header information for HTTP. | QHttpResponseHeader +Rich text browser with hypertext navigation. | QTextBrowser +Robust integer semaphore. | QSemaphore +Rounded range control (like a speedometer or potentiometer). | QDial +SGI/Irix look and feel. | QSGIStyle +SQL database error information. | QSqlError +Scrolling area with on-demand scroll bars. | QScrollView +Serialization of binary data to a QIODevice. | QDataStream +Server-specific functionality in Qt/Embedded. | QWSServer +Server-specific functionality in Qt/Embedded. | QWSWindow +Set of icons with different styles and sizes. | QIconSet +Signals that a main icon drag has begun. | QIconDragEvent +Simple convenience dialog to get a single value from the user. | QInputDialog +Simple description of any widget, i.e. answering the question "What's this?". | QWhatsThis +Simple geometry management of its children. | QGrid +Simple stored-value drag object for arbitrary MIME data. | QStoredDrag +Simplifies locking and unlocking QMutexes. | QMutexLocker +Single item in a QIconView. | QIconViewItem +Small displayable piece of rich text. | QSimpleRichText +Spin box widget (spin button). | QSpinBox +Splash screen that can be shown during application startup. | QSplashScreen +Stack of tabbed widgets. | QTabDialog +Stack of tabbed widgets. | QTabWidget +Stack of widgets of which only the top widget is user-visible. | QWidgetStack +State-based decoder. | QTextDecoder +State-based encoder. | QTextEncoder +Stores information about URLs. | QUrlInfo +Stores meta data about a property. | QMetaProperty +Stores meta data associated with a SQL field. | QSqlFieldInfo +Stream of data provided to a QNPInstance by the browser. | QNPStream +String objects using constant Unicode data. | QConstString +Support for custom events. | QCustomEvent +Support for socket callbacks. | QSocketNotifier +Supports drag and drop operations within a QIconView. | QIconDrag +System-independent file information. | QFileInfo +TCP-based server. | QServerSocket +Tab bar, e.g. for use in tabbed dialogs. | QTabBar +Template class that provides a cache based on QString keys. | QCache +Template class that provides a cache based on char* keys. | QAsciiCache +Template class that provides a cache based on long keys. | QIntCache +Template class that provides a dictionary based on QString keys. | QDict +Template class that provides a dictionary based on char* keys. | QAsciiDict +Template class that provides a dictionary based on long keys. | QIntDict +Template class that provides a dictionary based on void* keys. | QPtrDict +Template class that provides a list. | QPtrList +Template class that provides a queue. | QPtrQueue +Template class that provides a stack. | QPtrStack +Template class that provides arrays of simple types. | QMemArray +Template class that provides guarded pointers to QObjects. | QGuardedPtr +Template class which ensures that implicitly shared and explicitly shared classes reference unique data. | QDeepCopy +Template collection class that provides a vector (array). | QPtrVector +Text object on a QCanvas. | QCanvasText +Text or image display. | QLabel +The QDialog API for Motif-based dialogs. | QMotifDialog +The QWidget API for Xt/Motif widgets. | QMotifWidget +The XML handler classes with information about the parsing position within a file. | QXmlLocator +The abstract base class of button widgets, providing functionality common to buttons. | QButton +The base class for all the nodes in a DOM tree. | QDomNode +The base class of I/O devices. | QIODevice +The base class of all Qt objects. | QObject +The base class of all event classes. Event objects contain event parameters. | QEvent +The base class of all list box items. | QListBoxItem +The base class of all user interface objects. | QWidget +The base class of dialog windows. | QDialog +The base class of geometry managers. | QLayout +The base class of most pointer-based Qt collections. | QPtrCollection +The base class of objects that can be painted. | QPaintDevice +The base class of widgets that can have a frame. | QFrame +The basis of the Motif Extension. | QMotif +The cell content for QTable cells. | QTableItem +The display format of an OpenGL rendering context. | QGLFormat +The input data for the QXmlReader subclasses. | QXmlInputSource +The look and feel of a GUI. | QStyle +The main factory for plugin objects. | QNPlugin +The representation of the DTD in the document tree. | QDomDocumentType +The structures in a QTabBar. | QTab +Time editor. | QTimeEdit +Timer signals and single-shot timers. | QTimer +Tool tips (balloon help) for any widget or rectangular part of a widget. | QToolTip +Translator message and its properties. | QTranslatorMessage +Tree of QDomNodes which is not usually a complete QDomDocument. | QDomDocumentFragment +URL parser and simplifies working with URLs. | QUrl +Used for installing custom colormaps into QGLWidgets. | QGLColormap +Used to check a string against a regular expression. | QRegExpValidator +Used to create SQL database connections and to provide transaction handling. | QSqlDatabase +Used to create editor widgets for QVariant data types. | QEditorFactory +Used to create pixmaps for a QIconSet. | QIconFactory +Used to create the editors used by QDataTable and QSqlForm. | QSqlEditorFactory +Used to map widgets to SQL fields. | QSqlPropertyMap +Used to report errors with the QXmlErrorHandler interface. | QXmlParseException +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 pair of elements. | QPair +Value-based template class that provides a stack. | QValueStack +Value-based template class that provides lists. | QValueList +Vertical geometry management of its child widgets. | QVBox +Vertical or horizontal scroll bar. | QScrollBar +Vertical or horizontal slider. | QSlider +Watches the lifetime of multiple QObjects. | QObjectCleanupHandler +Widget for rendering OpenGL graphics. | QGLWidget +Widget which can be docked inside a QDockArea or floated as a top level window on the desktop. | QDockWindow +Workspace window that can contain decorated windows, e.g. for MDI. | QWorkspace +Wrapper around a script engine. | QAxScriptEngine +Wrapper around script code. | QAxScript +Wrapper for handling shared libraries. | QLibrary +XML attributes. | QXmlAttributes diff --git a/doc/html/whatsthis.png b/doc/html/whatsthis.png new file mode 100644 index 00000000..5136372c Binary files /dev/null and b/doc/html/whatsthis.png differ diff --git a/doc/html/widgets-example.html b/doc/html/widgets-example.html new file mode 100644 index 00000000..ea368d6c --- /dev/null +++ b/doc/html/widgets-example.html @@ -0,0 +1,50 @@ + + + + + +Widgets Example + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Widgets Example

+ + +

+This example shows most of TQt's widgets in action. It is similar +to the demo example in $QTDIR/examples/demo. +

Run the program, then click the right mouse button + Ctrl to +identify a widget. +

See $QTDIR/examples/widgets for the source code. +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/win-objexplor1.png b/doc/html/win-objexplor1.png new file mode 100644 index 00000000..9a632864 Binary files /dev/null and b/doc/html/win-objexplor1.png differ diff --git a/doc/html/win-objexplor2.png b/doc/html/win-objexplor2.png new file mode 100644 index 00000000..481dcac0 Binary files /dev/null and b/doc/html/win-objexplor2.png differ diff --git a/doc/html/win-projoverview.png b/doc/html/win-projoverview.png new file mode 100644 index 00000000..489d61eb Binary files /dev/null and b/doc/html/win-projoverview.png differ diff --git a/doc/html/win-propedit1.png b/doc/html/win-propedit1.png new file mode 100644 index 00000000..4225b897 Binary files /dev/null and b/doc/html/win-propedit1.png differ diff --git a/doc/html/win-propedit2.png b/doc/html/win-propedit2.png new file mode 100644 index 00000000..5d775f25 Binary files /dev/null and b/doc/html/win-propedit2.png differ diff --git a/doc/html/winsystem.html b/doc/html/winsystem.html new file mode 100644 index 00000000..7188a2da --- /dev/null +++ b/doc/html/winsystem.html @@ -0,0 +1,120 @@ + + + + + +Window System-specific Notes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Window System-specific Notes

+ + +

TQt is a multiplatform GUI toolkit, so almost the entire API is the +same on all platforms and window systems. If you wish to use +platform-specific features, and still maintain a platform-independent +source tree, you should protect the platform-specific code using the +appropriate #ifdef statements (see below). +

+

+ + +

For information about which platforms are supported by TQt, see the +Platform +Notes. For information on distributing TQt applications, see +Deploying TQt Applications. +

+

TQt/X11 +

+

When compiling for this platform, the macro Q_WS_X11 is defined. +

Not documented here. Please contact Trolltech Technical Support if you have queries. +

TQt/X11 Dependencies
+

Note: You must compile with both Xft and XRender support to get +alpha transparency support for pixmaps and images. Configuring with +XRender support only is not enough. +

+

TQt/Windows +

+

When compiling for this platform, the macro Q_WS_WIN is defined. +

Not documented here. Please contact Trolltech Technical Support if you have queries. +

Microsoft Visual Studio 2005 Deployment Issues +

+

Executables compiled with Microsoft Visual Studio 2005 retquire +a manifest file that points to the C and C++ runtime libraries that +TQt and the application itself depend on. The manifest file is +automatically generated for you, but it always needs to be located +in the same directory as the application executable. +

It is important to remember to deploy the manifest file when +deploying an application. +

Note: +If you don't want to deploy your application with the .manifest file, +you can embed the manifest in the executable as a resource with the +mt command (distributed with Visual Studio 2005). +

If you have further problems, please see the MSDN document, +"Side-by-side Assemblies Reference". +

+

TQt/Mac OS X +

+

When compiling for this platform, the macro Q_WS_MACX is defined. +

+

+

TQt/Embedded +

+

When compiling for this platform, the macro Q_WS_QWS is defined +(the window system is literally the TQt Window System). +

+

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/wizard-example.html b/doc/html/wizard-example.html new file mode 100644 index 00000000..ec553fd4 --- /dev/null +++ b/doc/html/wizard-example.html @@ -0,0 +1,352 @@ + + + + + +Wizard + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Wizard

+ + +

+This example shows the usage of TQt's wizard class. A wizard +should be used to help a user with complicated actions. +


+

Header file: +

/****************************************************************************
+** $Id: qt/wizard.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef WIZARD_H
+#define WIZARD_H
+
+#include <qwizard.h>
+
+class TQWidget;
+class TQHBox;
+class TQLineEdit;
+class TQLabel;
+
+class Wizard : public TQWizard
+{
+    Q_OBJECT
+
+public:
+    Wizard( TQWidget *parent = 0, const char *name = 0 );
+
+    void showPage(TQWidget* page);
+
+protected:
+    void setupPage1();
+    void setupPage2();
+    void setupPage3();
+
+    TQHBox *page1, *page2, *page3;
+    TQLineEdit *key, *firstName, *lastName, *address, *phone, *email;
+    TQLabel *lKey, *lFirstName, *lLastName, *lAddress, *lPhone, *lEmail;
+
+protected slots:
+    void keyChanged( const TQString & );
+    void dataChanged( const TQString & );
+
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/wizard.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "wizard.h"
+
+#include <qwidget.h>
+#include <qhbox.h>
+#include <qvbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qvalidator.h>
+#include <qapplication.h>
+
+Wizard::Wizard( TQWidget *parent, const char *name )
+    : TQWizard( parent, name, TRUE )
+{
+    setupPage1();
+    setupPage2();
+    setupPage3();
+
+    key->setFocus();
+}
+
+void Wizard::setupPage1()
+{
+    page1 = new TQHBox( this );
+    page1->setSpacing(8);
+
+    TQLabel *info = new TQLabel( page1 );
+    info->setMargin( 11 );
+    info->setPalette( yellow );
+    info->setText( "Enter your personal\n"
+                   "key here.\n\n"
+                   "Your personal key\n"
+                   "consists of 4 digits" );
+    info->setMaximumWidth( info->sizeHint().width() );
+
+    TQVBox *page = new TQVBox( page1 );
+
+    TQHBox *row1 = new TQHBox( page );
+
+    (void)new TQLabel( "Key:", row1 );
+
+    key = new TQLineEdit( row1 );
+    key->setMaxLength( 4 );
+    key->setValidator( new TQIntValidator( 1000, 9999, key ) );
+
+    connect( key, SIGNAL( textChanged( const TQString & ) ),
+             this, SLOT( keyChanged( const TQString & ) ) );
+
+    addPage( page1, "Personal Key" );
+
+    setNextEnabled( page1, FALSE );
+    setHelpEnabled( page1, FALSE );
+}
+
+void Wizard::setupPage2()
+{
+    page2 = new TQHBox( this );
+    page2->setSpacing(8);
+
+    TQLabel *info = new TQLabel( page2 );
+    info->setMargin( 11 );
+    info->setPalette( yellow );
+    info->setText( "\n"
+                   "Enter your personal\n"
+                   "data here.\n\n"
+                   "The retquired fields are\n"
+                   "First Name, Last Name \n"
+                   "and E-Mail.\n" );
+    info->setMaximumWidth( info->sizeHint().width() );
+
+    TQVBox *page = new TQVBox( page2 );
+
+    TQHBox *row1 = new TQHBox( page );
+    TQHBox *row2 = new TQHBox( page );
+    TQHBox *row3 = new TQHBox( page );
+    TQHBox *row4 = new TQHBox( page );
+    TQHBox *row5 = new TQHBox( page );
+
+    TQLabel *label1 = new TQLabel( " First Name: ", row1 );
+    label1->setAlignment( TQt::AlignVCenter );
+    TQLabel *label2 = new TQLabel( " Last Name: ", row2 );
+    label2->setAlignment( TQt::AlignVCenter );
+    TQLabel *label3 = new TQLabel( " Address: ", row3 );
+    label3->setAlignment( TQt::AlignVCenter );
+    TQLabel *label4 = new TQLabel( " Phone Number: ", row4 );
+    label4->setAlignment( TQt::AlignVCenter );
+    TQLabel *label5 = new TQLabel( " E-Mail: ", row5 );
+    label5->setAlignment( TQt::AlignVCenter );
+
+    label1->setMinimumWidth( label4->sizeHint().width() );
+    label2->setMinimumWidth( label4->sizeHint().width() );
+    label3->setMinimumWidth( label4->sizeHint().width() );
+    label4->setMinimumWidth( label4->sizeHint().width() );
+    label5->setMinimumWidth( label4->sizeHint().width() );
+
+    firstName = new TQLineEdit( row1 );
+    lastName = new TQLineEdit( row2 );
+    address = new TQLineEdit( row3 );
+    phone = new TQLineEdit( row4 );
+    email = new TQLineEdit( row5 );
+
+    connect( firstName, SIGNAL( textChanged( const TQString & ) ),
+             this, SLOT( dataChanged( const TQString & ) ) );
+    connect( lastName, SIGNAL( textChanged( const TQString & ) ),
+             this, SLOT( dataChanged( const TQString & ) ) );
+    connect( email, SIGNAL( textChanged( const TQString & ) ),
+             this, SLOT( dataChanged( const TQString & ) ) );
+
+    addPage( page2, "Personal Data" );
+
+    setHelpEnabled( page2, FALSE );
+}
+
+void Wizard::setupPage3()
+{
+    page3 = new TQHBox( this );
+    page3->setSpacing(8);
+
+    TQLabel *info = new TQLabel( page3 );
+    info->setPalette( yellow );
+    info->setText( "\n"
+                   "Look here to see of\n"
+                   "the data you entered\n"
+                   "is correct. To confirm,\n"
+                   "press the [Finish] button\n"
+                   "else go back to correct\n"
+                   "mistakes." );
+    info->setMargin( 11 );
+    info->setAlignment( AlignTop|AlignLeft );
+    info->setMaximumWidth( info->sizeHint().width() );
+
+    TQVBox *page = new TQVBox( page3 );
+
+    TQHBox *row1 = new TQHBox( page );
+    TQHBox *row2 = new TQHBox( page );
+    TQHBox *row3 = new TQHBox( page );
+    TQHBox *row4 = new TQHBox( page );
+    TQHBox *row5 = new TQHBox( page );
+    TQHBox *row6 = new TQHBox( page );
+
+    TQLabel *label1 = new TQLabel( " Personal Key: ", row1 );
+    label1->setAlignment( TQt::AlignVCenter );
+    TQLabel *label2 = new TQLabel( " First Name: ", row2 );
+    label2->setAlignment( TQt::AlignVCenter );
+    TQLabel *label3 = new TQLabel( " Last Name: ", row3 );
+    label3->setAlignment( TQt::AlignVCenter );
+    TQLabel *label4 = new TQLabel( " Address: ", row4 );
+    label4->setAlignment( TQt::AlignVCenter );
+    TQLabel *label5 = new TQLabel( " Phone Number: ", row5 );
+    label5->setAlignment( TQt::AlignVCenter );
+    TQLabel *label6 = new TQLabel( " E-Mail: ", row6 );
+    label6->setAlignment( TQt::AlignVCenter );
+
+    label1->setMinimumWidth( label1->sizeHint().width() );
+    label2->setMinimumWidth( label1->sizeHint().width() );
+    label3->setMinimumWidth( label1->sizeHint().width() );
+    label4->setMinimumWidth( label1->sizeHint().width() );
+    label5->setMinimumWidth( label1->sizeHint().width() );
+    label6->setMinimumWidth( label1->sizeHint().width() );
+
+    lKey = new TQLabel( row1 );
+    lFirstName = new TQLabel( row2 );
+    lLastName = new TQLabel( row3 );
+    lAddress = new TQLabel( row4 );
+    lPhone = new TQLabel( row5 );
+    lEmail = new TQLabel( row6 );
+
+    addPage( page3, "Finish" );
+
+    setFinishEnabled( page3, TRUE );
+    setHelpEnabled( page3, FALSE );
+}
+
+void Wizard::showPage( TQWidget* page )
+{
+    if ( page == page1 ) {
+    } else if ( page == page2 ) {
+    } else if ( page == page3 ) {
+        lKey->setText( key->text() );
+        lFirstName->setText( firstName->text() );
+        lLastName->setText( lastName->text() );
+        lAddress->setText( address->text() );
+        lPhone->setText( phone->text() );
+        lEmail->setText( email->text() );
+    }
+
+    TQWizard::showPage(page);
+
+    if ( page == page1 ) {
+        keyChanged( key->text() );
+        key->setFocus();
+    } else if ( page == page2 ) {
+        dataChanged( firstName->text() );
+        firstName->setFocus();
+    } else if ( page == page3 ) {
+        finishButton()->setEnabled( TRUE );
+        finishButton()->setFocus();
+    }
+}
+
+void Wizard::keyChanged( const TQString &text )
+{
+    TQString t = text;
+    int p = 0;
+    bool on = ( key->validator()->validate(t, p) == TQValidator::Acceptable );
+    nextButton()->setEnabled( on );
+}
+
+void Wizard::dataChanged( const TQString & )
+{
+    if ( !firstName->text().isEmpty() &&
+         !lastName->text().isEmpty() &&
+         !email->text().isEmpty() )
+        nextButton()->setEnabled( TRUE );
+    else
+        nextButton()->setEnabled( FALSE );
+}
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "wizard.h"
+#include <qapplication.h>
+
+int main(int argc,char **argv)
+{
+    TQApplication a(argc,argv);
+
+    Wizard wizard;
+    wizard.setCaption("TQt Example - Wizard");
+    return wizard.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/wizard-wizard-cpp.html b/doc/html/wizard-wizard-cpp.html new file mode 100644 index 00000000..27f649eb --- /dev/null +++ b/doc/html/wizard-wizard-cpp.html @@ -0,0 +1,269 @@ + + + + + +wizard/wizard.cpp Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

wizard/wizard.cpp Example File

+ + +
/****************************************************************************
+** $Id: qt/wizard.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 "wizard.h"
+
+#include <qwidget.h>
+#include <qhbox.h>
+#include <qvbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qvalidator.h>
+#include <qapplication.h>
+
+Wizard::Wizard( TQWidget *parent, const char *name )
+    : TQWizard( parent, name, TRUE )
+{
+    setupPage1();
+    setupPage2();
+    setupPage3();
+
+    key->setFocus();
+}
+
+void Wizard::setupPage1()
+{
+    page1 = new TQHBox( this );
+    page1->setSpacing(8);
+
+    TQLabel *info = new TQLabel( page1 );
+    info->setMargin( 11 );
+    info->setPalette( yellow );
+    info->setText( "Enter your personal\n"
+                   "key here.\n\n"
+                   "Your personal key\n"
+                   "consists of 4 digits" );
+    info->setMaximumWidth( info->sizeHint().width() );
+
+    TQVBox *page = new TQVBox( page1 );
+
+    TQHBox *row1 = new TQHBox( page );
+
+    (void)new TQLabel( "Key:", row1 );
+
+    key = new TQLineEdit( row1 );
+    key->setMaxLength( 4 );
+    key->setValidator( new TQIntValidator( 1000, 9999, key ) );
+
+    connect( key, SIGNAL( textChanged( const TQString & ) ),
+             this, SLOT( keyChanged( const TQString & ) ) );
+
+    addPage( page1, "Personal Key" );
+
+    setNextEnabled( page1, FALSE );
+    setHelpEnabled( page1, FALSE );
+}
+
+void Wizard::setupPage2()
+{
+    page2 = new TQHBox( this );
+    page2->setSpacing(8);
+
+    TQLabel *info = new TQLabel( page2 );
+    info->setMargin( 11 );
+    info->setPalette( yellow );
+    info->setText( "\n"
+                   "Enter your personal\n"
+                   "data here.\n\n"
+                   "The retquired fields are\n"
+                   "First Name, Last Name \n"
+                   "and E-Mail.\n" );
+    info->setMaximumWidth( info->sizeHint().width() );
+
+    TQVBox *page = new TQVBox( page2 );
+
+    TQHBox *row1 = new TQHBox( page );
+    TQHBox *row2 = new TQHBox( page );
+    TQHBox *row3 = new TQHBox( page );
+    TQHBox *row4 = new TQHBox( page );
+    TQHBox *row5 = new TQHBox( page );
+
+    TQLabel *label1 = new TQLabel( " First Name: ", row1 );
+    label1->setAlignment( TQt::AlignVCenter );
+    TQLabel *label2 = new TQLabel( " Last Name: ", row2 );
+    label2->setAlignment( TQt::AlignVCenter );
+    TQLabel *label3 = new TQLabel( " Address: ", row3 );
+    label3->setAlignment( TQt::AlignVCenter );
+    TQLabel *label4 = new TQLabel( " Phone Number: ", row4 );
+    label4->setAlignment( TQt::AlignVCenter );
+    TQLabel *label5 = new TQLabel( " E-Mail: ", row5 );
+    label5->setAlignment( TQt::AlignVCenter );
+
+    label1->setMinimumWidth( label4->sizeHint().width() );
+    label2->setMinimumWidth( label4->sizeHint().width() );
+    label3->setMinimumWidth( label4->sizeHint().width() );
+    label4->setMinimumWidth( label4->sizeHint().width() );
+    label5->setMinimumWidth( label4->sizeHint().width() );
+
+    firstName = new TQLineEdit( row1 );
+    lastName = new TQLineEdit( row2 );
+    address = new TQLineEdit( row3 );
+    phone = new TQLineEdit( row4 );
+    email = new TQLineEdit( row5 );
+
+    connect( firstName, SIGNAL( textChanged( const TQString & ) ),
+             this, SLOT( dataChanged( const TQString & ) ) );
+    connect( lastName, SIGNAL( textChanged( const TQString & ) ),
+             this, SLOT( dataChanged( const TQString & ) ) );
+    connect( email, SIGNAL( textChanged( const TQString & ) ),
+             this, SLOT( dataChanged( const TQString & ) ) );
+
+    addPage( page2, "Personal Data" );
+
+    setHelpEnabled( page2, FALSE );
+}
+
+void Wizard::setupPage3()
+{
+    page3 = new TQHBox( this );
+    page3->setSpacing(8);
+
+    TQLabel *info = new TQLabel( page3 );
+    info->setPalette( yellow );
+    info->setText( "\n"
+                   "Look here to see of\n"
+                   "the data you entered\n"
+                   "is correct. To confirm,\n"
+                   "press the [Finish] button\n"
+                   "else go back to correct\n"
+                   "mistakes." );
+    info->setMargin( 11 );
+    info->setAlignment( AlignTop|AlignLeft );
+    info->setMaximumWidth( info->sizeHint().width() );
+
+    TQVBox *page = new TQVBox( page3 );
+
+    TQHBox *row1 = new TQHBox( page );
+    TQHBox *row2 = new TQHBox( page );
+    TQHBox *row3 = new TQHBox( page );
+    TQHBox *row4 = new TQHBox( page );
+    TQHBox *row5 = new TQHBox( page );
+    TQHBox *row6 = new TQHBox( page );
+
+    TQLabel *label1 = new TQLabel( " Personal Key: ", row1 );
+    label1->setAlignment( TQt::AlignVCenter );
+    TQLabel *label2 = new TQLabel( " First Name: ", row2 );
+    label2->setAlignment( TQt::AlignVCenter );
+    TQLabel *label3 = new TQLabel( " Last Name: ", row3 );
+    label3->setAlignment( TQt::AlignVCenter );
+    TQLabel *label4 = new TQLabel( " Address: ", row4 );
+    label4->setAlignment( TQt::AlignVCenter );
+    TQLabel *label5 = new TQLabel( " Phone Number: ", row5 );
+    label5->setAlignment( TQt::AlignVCenter );
+    TQLabel *label6 = new TQLabel( " E-Mail: ", row6 );
+    label6->setAlignment( TQt::AlignVCenter );
+
+    label1->setMinimumWidth( label1->sizeHint().width() );
+    label2->setMinimumWidth( label1->sizeHint().width() );
+    label3->setMinimumWidth( label1->sizeHint().width() );
+    label4->setMinimumWidth( label1->sizeHint().width() );
+    label5->setMinimumWidth( label1->sizeHint().width() );
+    label6->setMinimumWidth( label1->sizeHint().width() );
+
+    lKey = new TQLabel( row1 );
+    lFirstName = new TQLabel( row2 );
+    lLastName = new TQLabel( row3 );
+    lAddress = new TQLabel( row4 );
+    lPhone = new TQLabel( row5 );
+    lEmail = new TQLabel( row6 );
+
+    addPage( page3, "Finish" );
+
+    setFinishEnabled( page3, TRUE );
+    setHelpEnabled( page3, FALSE );
+}
+
+void Wizard::showPage( TQWidget* page )
+{
+    if ( page == page1 ) {
+    } else if ( page == page2 ) {
+    } else if ( page == page3 ) {
+        lKey->setText( key->text() );
+        lFirstName->setText( firstName->text() );
+        lLastName->setText( lastName->text() );
+        lAddress->setText( address->text() );
+        lPhone->setText( phone->text() );
+        lEmail->setText( email->text() );
+    }
+
+    TQWizard::showPage(page);
+
+    if ( page == page1 ) {
+        keyChanged( key->text() );
+        key->setFocus();
+    } else if ( page == page2 ) {
+        dataChanged( firstName->text() );
+        firstName->setFocus();
+    } else if ( page == page3 ) {
+        finishButton()->setEnabled( TRUE );
+        finishButton()->setFocus();
+    }
+}
+
+void Wizard::keyChanged( const TQString &text )
+{
+    TQString t = text;
+    int p = 0;
+    bool on = ( key->validator()->validate(t, p) == TQValidator::Acceptable );
+    nextButton()->setEnabled( on );
+}
+
+void Wizard::dataChanged( const TQString & )
+{
+    if ( !firstName->text().isEmpty() &&
+         !lastName->text().isEmpty() &&
+         !email->text().isEmpty() )
+        nextButton()->setEnabled( TRUE );
+    else
+        nextButton()->setEnabled( FALSE );
+}
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/wizard-wizard-h.html b/doc/html/wizard-wizard-h.html new file mode 100644 index 00000000..891d88b1 --- /dev/null +++ b/doc/html/wizard-wizard-h.html @@ -0,0 +1,87 @@ + + + + + +wizard/wizard.h Example File + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

wizard/wizard.h Example File

+ + +
/****************************************************************************
+** $Id: qt/wizard.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef WIZARD_H
+#define WIZARD_H
+
+#include <qwizard.h>
+
+class TQWidget;
+class TQHBox;
+class TQLineEdit;
+class TQLabel;
+
+class Wizard : public TQWizard
+{
+    Q_OBJECT
+
+public:
+    Wizard( TQWidget *parent = 0, const char *name = 0 );
+
+    void showPage(TQWidget* page);
+
+protected:
+    void setupPage1();
+    void setupPage2();
+    void setupPage3();
+
+    TQHBox *page1, *page2, *page3;
+    TQLineEdit *key, *firstName, *lastName, *address, *phone, *email;
+    TQLabel *lKey, *lFirstName, *lLastName, *lAddress, *lPhone, *lEmail;
+
+protected slots:
+    void keyChanged( const TQString & );
+    void dataChanged( const TQString & );
+
+};
+
+#endif
+
+


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/workspace.html b/doc/html/workspace.html new file mode 100644 index 00000000..94979d6e --- /dev/null +++ b/doc/html/workspace.html @@ -0,0 +1,49 @@ + + + + + +Workspace Module + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Workspace Module

+ + + +

The workspace module provides a workspace window that can contain +decorated document windows for Multiple Document Interfaces (MDI). +

It is implemented in a single class TQWorkspace. +

Please see the class documentation for +details. +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/xform-example.html b/doc/html/xform-example.html new file mode 100644 index 00000000..d2d11ebd --- /dev/null +++ b/doc/html/xform-example.html @@ -0,0 +1,559 @@ + + + + + +Transformed Graphics Demo + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Transformed Graphics Demo

+ + +

+This example lets the user rotate, shear and scale text and graphics +arbitrarily. +


+

Implementation: +

/****************************************************************************
+** $Id: qt/xform.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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 <qapplication.h>
+
+#include <qdialog.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qcheckbox.h>
+#include <qradiobutton.h>
+#include <qbuttongroup.h>
+#include <qlcdnumber.h>
+#include <qslider.h>
+#include <qmenubar.h>
+#include <qfontdialog.h>
+#include <qlayout.h>
+#include <qvbox.h>
+#include <qwidgetstack.h>
+
+#include <qpainter.h>
+#include <qpixmap.h>
+#include <qpicture.h>
+
+#include <stdlib.h>
+
+
+class ModeNames {
+public:
+    enum Mode { Text, Image, Picture };
+};
+
+
+class XFormControl : public TQVBox, public ModeNames
+{
+    Q_OBJECT
+public:
+    XFormControl( const TQFont &initialFont, TQWidget *parent=0, const char *name=0 );
+   ~XFormControl() {}
+
+    TQWMatrix matrix();
+
+signals:
+    void newMatrix( TQWMatrix );
+    void newText( const TQString& );
+    void newFont( const TQFont & );
+    void newMode( int );
+private slots:
+    void newMtx();
+    void newTxt(const TQString&);
+    void selectFont();
+    void fontSelected( const TQFont & );
+    void changeMode(int);
+    void timerEvent(TQTimerEvent*);
+private:
+    Mode mode;
+    TQSlider      *rotS;                // Rotation angle scroll bar
+    TQSlider      *shearS;              // Shear value scroll bar
+    TQSlider      *magS;                // Magnification value scroll bar
+    TQLCDNumber   *rotLCD;              // Rotation angle LCD display
+    TQLCDNumber   *shearLCD;            // Shear value LCD display
+    TQLCDNumber   *magLCD;              // Magnification value LCD display
+    TQCheckBox    *mirror;              // Checkbox for mirror image on/of
+    TQWidgetStack* optionals;
+    TQLineEdit    *textEd;              // Inp[ut field for xForm text
+    TQPushButton  *fpb;                 // Select font push button
+    TQRadioButton *rb_txt;              // Radio button for text
+    TQRadioButton *rb_img;              // Radio button for image
+    TQRadioButton *rb_pic;              // Radio button for picture
+    TQFont currentFont;
+};
+
+/*
+  ShowXForm displays a text or a pixmap (TQPixmap) using a coordinate
+  transformation matrix (TQWMatrix)
+*/
+
+class ShowXForm : public TQWidget, public ModeNames
+{
+    Q_OBJECT
+public:
+    ShowXForm( const TQFont &f, TQWidget *parent=0, const char *name=0 );
+   ~ShowXForm() {}
+    void showIt();                      // (Re)displays text or pixmap
+
+    Mode mode() const { return m; }
+public slots:
+    void setText( const TQString& );
+    void setMatrix( TQWMatrix );
+    void setFont( const TQFont &f );
+    void setPixmap( TQPixmap );
+    void setPicture( const TQPicture& );
+    void setMode( int );
+private:
+    TQSizePolicy sizePolicy() const;
+    TQSize sizeHint() const;
+    void paintEvent( TQPaintEvent * );
+    void resizeEvent( TQResizeEvent * );
+    TQWMatrix  mtx;                      // coordinate transform matrix
+    TQString   text;                     // text to be displayed
+    TQPixmap   pix;                      // pixmap to be displayed
+    TQPicture  picture;                  // text to be displayed
+    TQRect     eraseRect;                // covers last displayed text/pixmap
+    Mode      m;
+};
+
+XFormControl::XFormControl( const TQFont &initialFont,
+                            TQWidget *parent, const char *name )
+        : TQVBox( parent, name )
+{
+    setSpacing(6);
+    setMargin(6);
+    currentFont = initialFont;
+    mode = Image;
+
+    rotLCD      = new TQLCDNumber( 4, this, "rotateLCD" );
+    rotS        = new TQSlider( TQSlider::Horizontal, this,
+                                  "rotateSlider" );
+    shearLCD    = new TQLCDNumber( 5,this, "shearLCD" );
+    shearS      = new TQSlider( TQSlider::Horizontal, this,
+                                  "shearSlider" );
+    mirror      = new TQCheckBox( this, "mirrorCheckBox" );
+    rb_txt = new TQRadioButton( this, "text" );
+    rb_img = new TQRadioButton( this, "image" );
+    rb_pic = new TQRadioButton( this, "picture" );
+    optionals = new TQWidgetStack(this);
+    TQVBox* optionals_text = new TQVBox(optionals);
+    optionals_text->setSpacing(6);
+    TQVBox* optionals_other = new TQVBox(optionals);
+    optionals_other->setSpacing(6);
+    optionals->addWidget(optionals_text,0);
+    optionals->addWidget(optionals_other,1);
+    fpb         = new TQPushButton( optionals_text, "text" );
+    textEd      = new TQLineEdit( optionals_text, "text" );
+    textEd->setFocus();
+
+    rotLCD->display( "  0'" );
+
+    rotS->setRange( -180, 180 );
+    rotS->setValue( 0 );
+    connect( rotS, SIGNAL(valueChanged(int)), SLOT(newMtx()) );
+
+    shearLCD->display( "0.00" );
+
+    shearS->setRange( -25, 25 );
+    shearS->setValue( 0 );
+    connect( shearS, SIGNAL(valueChanged(int)), SLOT(newMtx()) );
+
+    mirror->setText( tr("Mirror") );
+    connect( mirror, SIGNAL(clicked()), SLOT(newMtx()) );
+
+    TQButtonGroup *bg = new TQButtonGroup(this);
+    bg->hide();
+    bg->insert(rb_txt,0);
+    bg->insert(rb_img,1);
+    bg->insert(rb_pic,2);
+    rb_txt->setText( tr("Text") );
+    rb_img->setText( tr("Image") );
+    rb_img->setChecked(TRUE);
+    rb_pic->setText( tr("Picture") );
+    connect( bg, SIGNAL(clicked(int)), SLOT(changeMode(int)) );
+
+    fpb->setText( tr("Select font...") );
+    connect( fpb, SIGNAL(clicked()), SLOT(selectFont()) );
+
+    textEd->setText( "Troll" );
+    connect( textEd, SIGNAL(textChanged(const TQString&)),
+                     SLOT(newTxt(const TQString&)) );
+
+    magLCD = new TQLCDNumber( 4,optionals_other, "magLCD" );
+    magLCD->display( "100" );
+    magS = new TQSlider( TQSlider::Horizontal, optionals_other,
+                           "magnifySlider" );
+    magS->setRange( 0, 800 );
+    connect( magS, SIGNAL(valueChanged(int)), SLOT(newMtx()) );
+    magS->setValue( 0 );
+    connect( magS, SIGNAL(valueChanged(int)), magLCD, SLOT(display(int)));
+
+    optionals_text->adjustSize();
+    optionals_other->adjustSize();
+    changeMode(Image);
+
+    startTimer(20); // start an initial animation
+}
+
+void XFormControl::timerEvent(TQTimerEvent*)
+{
+    int v = magS->value();
+    v = (v+2)+v/10;
+    if ( v >= 200 ) {
+        v = 200;
+        killTimers();
+    }
+    magS->setValue(v);
+}
+
+
+
+/*
+    Called whenever the user has changed one of the matrix parameters
+    (i.e. rotate, shear or magnification)
+*/
+void XFormControl::newMtx()
+{
+    emit newMatrix( matrix() );
+}
+
+void XFormControl::newTxt(const TQString& s)
+{
+    emit newText(s);
+    changeMode(Text);
+}
+
+/*
+    Calculates the matrix appropriate for the current controls,
+    and updates the displays.
+*/
+TQWMatrix XFormControl::matrix()
+{
+    TQWMatrix m;
+    if (mode != Text) {
+        double magVal = 1.0*magS->value()/100;
+        m.scale( magVal, magVal );
+    }
+    double shearVal = 1.0*shearS->value()/25;
+    m.shear( shearVal, shearVal );
+    m.rotate( rotS->value() );
+    if ( mirror->isChecked() ) {
+        m.scale( 1, -1 );
+        m.rotate( 180 );
+    }
+
+    TQString tmp;
+    tmp.sprintf( "%1.2f", shearVal  );
+    if ( shearVal >= 0 )
+        tmp.insert( 0, " " );
+    shearLCD->display( tmp );
+
+    int rot = rotS->value();
+    if ( rot < 0 )
+        rot = rot + 360;
+    tmp.sprintf( "%3i'", rot );
+    rotLCD->display( tmp );
+    return m;
+}
+
+
+void XFormControl::selectFont()
+{
+    bool ok;
+    TQFont f = TQFontDialog::getFont( &ok, currentFont );
+    if ( ok ) {
+        currentFont = f;
+        fontSelected( f );
+    }
+}
+
+void XFormControl::fontSelected( const TQFont &font )
+{
+    emit newFont( font );
+    changeMode(Text);
+}
+
+/*
+    Sets the mode - Text, Image, or Picture.
+*/
+
+void XFormControl::changeMode(int m)
+{
+    mode = (Mode)m;
+
+    emit newMode( m );
+    newMtx();
+    if ( mode == Text ) {
+        optionals->raiseWidget(0);
+        rb_txt->setChecked(TRUE);
+    } else {
+        optionals->raiseWidget(1);
+        if ( mode == Image )
+            rb_img->setChecked(TRUE);
+        else
+            rb_pic->setChecked(TRUE);
+    }
+    qApp->flushX();
+}
+
+ShowXForm::ShowXForm( const TQFont &initialFont,
+                      TQWidget *parent, const char *name )
+        : TQWidget( parent, name, WResizeNoErase )
+{
+    setFont( initialFont );
+    setBackgroundColor( white );
+    m = Text;
+    eraseRect = TQRect( 0, 0, 0, 0 );
+}
+
+TQSizePolicy ShowXForm::sizePolicy() const
+{
+    return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
+}
+
+TQSize ShowXForm::sizeHint() const
+{
+    return TQSize(400,400);
+}
+
+void ShowXForm::paintEvent( TQPaintEvent * )
+{
+    showIt();
+}
+
+void ShowXForm::resizeEvent( TQResizeEvent * )
+{
+    eraseRect = TQRect( width()/2, height()/2, 0, 0 );
+    repaint(rect());
+}
+
+void ShowXForm::setText( const TQString& s )
+{
+    text = s;
+    showIt();
+}
+
+void ShowXForm::setMatrix( TQWMatrix w )
+{
+    mtx = w;
+    showIt();
+}
+
+void ShowXForm::setFont( const TQFont &f )
+{
+    m = Text;
+    TQWidget::setFont( f );
+}
+
+void ShowXForm::setPixmap( TQPixmap pm )
+{
+    pix  = pm;
+    m    = Image;
+    showIt();
+}
+
+void ShowXForm::setPicture( const TQPicture& p )
+{
+    picture = p;
+    m = Picture;
+    showIt();
+}
+
+void ShowXForm::setMode( int mode )
+{
+    m = (Mode)mode;
+}
+
+void ShowXForm::showIt()
+{
+    TQPainter p;
+    TQRect r;      // rectangle covering new text/pixmap in virtual coordinates
+    TQWMatrix um;  // copy user specified transform
+    int textYPos = 0; // distance from boundingRect y pos to baseline
+    int textXPos = 0; // distance from boundingRect x pos to text start
+    TQRect br;
+    TQFontMetrics fm( fontMetrics() );   // get widget font metrics
+    switch ( mode() ) {
+      case Text:
+        br = fm.boundingRect( text );   // rectangle covering text
+        r  = br;
+        textYPos = -r.y();
+        textXPos = -r.x();
+        br.moveTopLeft( TQPoint( -br.width()/2, -br.height()/2 ) );
+        break;
+      case Image:
+        r = TQRect(0, 0, pix.width()+1, pix.height()+1);
+        break;
+      case Picture:
+        // ### need TQPicture::boundingRect()
+        r = TQRect(0,0,1000,1000);
+        break;
+    }
+    r.moveTopLeft( TQPoint(-r.width()/2, -r.height()/2) );
+    r.moveBy( -1, -1 ); // add border for matrix round off
+    r.setSize( TQSize( r.width() + 2,r.height() + 2 ) );
+          // compute union of new and old rect
+          // the resulting rectangle will cover what is already displayed
+          // and have room for the new text/pixmap
+    eraseRect = eraseRect.unite( mtx.mapRect(r) );
+    int pw = TQMIN(eraseRect.width(),width());
+    int ph = TQMIN(eraseRect.height(),height());
+    TQPixmap pm( pw, ph );               // off-screen drawing pixmap
+    pm.fill( backgroundColor() );
+
+    p.begin( &pm );
+    um.translate( pw/2, ph/2 ); // 0,0 is center
+    um = mtx * um;
+    p.setWorldMatrix( um );
+    switch ( mode() ) {
+      case Text:
+        p.setFont( font() );            // use widget font
+        p.drawText( r.left() + textXPos, r.top() + textYPos, text );
+#if 0
+        p.setPen( red );
+        p.drawRect( br );
+#endif
+        break;
+    case Image:
+        p.drawPixmap( -pix.width()/2, -pix.height()/2, pix );
+        break;
+      case Picture:
+        // ### need TQPicture::boundingRect()
+        p.scale(0.25,0.25);
+        p.translate(-230,-180);
+        p.drawPicture( picture );
+    }
+    p.end();
+
+    int xpos = width()/2  - pw/2;
+    int ypos = height()/2 - ph/2;
+    bitBlt( this, xpos, ypos,                   // copy pixmap to widget
+            &pm, 0, 0, -1, -1 );
+    eraseRect =  mtx.map( r );
+}
+
+
+/*
+    Grand unifying widget, putting ShowXForm and XFormControl
+    together.
+*/
+
+class XFormCenter : public TQHBox, public ModeNames
+{
+    Q_OBJECT
+public:
+    XFormCenter( TQWidget *parent=0, const char *name=0 );
+public slots:
+    void setFont( const TQFont &f ) { sx->setFont( f ); }
+    void newMode( int );
+private:
+    ShowXForm   *sx;
+    XFormControl *xc;
+};
+
+void XFormCenter::newMode( int m )
+{
+    static bool first_i = TRUE;
+    static bool first_p = TRUE;
+
+    if ( sx->mode() == m )
+        return;
+    if ( m == Image && first_i ) {
+        first_i = FALSE;
+        TQPixmap pm;
+        if ( pm.load( "image.any" ) )
+            sx->setPixmap( pm );
+        return;
+    }
+    if ( m == Picture && first_p ) {
+        first_p = FALSE;
+        TQPicture p;
+        if (p.load( "picture.any" ))
+            sx->setPicture( p );
+        return;
+    }
+    sx->setMode(m);
+}
+
+XFormCenter::XFormCenter( TQWidget *parent, const char *name )
+    : TQHBox( parent, name )
+{
+    TQFont f( "Charter", 36, TQFont::Bold );
+
+    xc = new XFormControl( f, this );
+    sx = new ShowXForm( f, this );
+    setStretchFactor(sx,1);
+    xc->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
+    xc->setLineWidth( 2 );
+    connect( xc, SIGNAL(newText(const TQString&)), sx,
+                 SLOT(setText(const TQString&)) );
+    connect( xc, SIGNAL(newMatrix(TQWMatrix)),
+             sx, SLOT(setMatrix(TQWMatrix)) );
+    connect( xc, SIGNAL(newFont(const TQFont&)), sx,
+                 SLOT(setFont(const TQFont&)) );
+    connect( xc, SIGNAL(newMode(int)), SLOT(newMode(int)) );
+    sx->setText( "Troll" );
+    newMode( Image );
+    sx->setMatrix(xc->matrix());
+}
+
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    XFormCenter *xfc = new XFormCenter;
+
+    a.setMainWidget( xfc );
+    xfc->setCaption("TQt Example - XForm");
+    xfc->show();
+    return a.exec();
+}
+
+#include "xform.moc"                  // include metadata generated by the moc
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/xform.png b/doc/html/xform.png new file mode 100644 index 00000000..8221a00b Binary files /dev/null and b/doc/html/xform.png differ diff --git a/doc/html/xml-examples.html b/doc/html/xml-examples.html new file mode 100644 index 00000000..06574c53 --- /dev/null +++ b/doc/html/xml-examples.html @@ -0,0 +1,50 @@ + + + + + +TQt XML Examples + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQt XML Examples

+ + +

The following example programs show how to use the +TQt XML classes. +

+

+
Outliner to show use of DOM +
A tiny SAX2 parser +
Demonstration of SAX2 features +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/xml-sax-features-walkthrough.html b/doc/html/xml-sax-features-walkthrough.html new file mode 100644 index 00000000..a8dd0995 --- /dev/null +++ b/doc/html/xml-sax-features-walkthrough.html @@ -0,0 +1,379 @@ + + + + + +Walkthrough: Using SAX2 features with the TQt XML classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Walkthrough: Using SAX2 features with the TQt XML classes

+ + +

+

This document assumes that you are familiar with namespaces in XML and the concept of a SAX2 +parser. +If features of SAX2 readers are new to you please read +the feature section of the SAX2 document. +

As a novice to the TQt XML classes it is advisable to have a look at the +tiny SAX2 parser walkthrough before +reading on. +

This walkthrough covers two topics: First of all it shows how to +set SAX2 features and secondly how to integrate the TQt XML functionality +into a TQt GUI application. +

The resulting application allows you to compare the output of the reader +depending on how the two features +http://xml.org/sax/features/namespace-prefixes +and http://xml.org/sax/features/namespaces are set. +To do this it shows tree views of the read XML file +listing the qualified names of elements and attributes and the respective +namespace URIs. +

Setting features

+

+ +

Let's begin with the main program of the application. First the boring +part: we include all the classes we need: +

    #include "structureparser.h"
+    #include <qapplication.h>
+    #include <qfile.h>
+    #include <qxml.h>
+    #include <qlistview.h>
+    #include <qgrid.h>
+    #include <qmainwindow.h>
+    #include <qlabel.h>
+
+

structureparser.h contains the API of +the XML parser that we implement in structureparser.cpp. +

    int main( int argc, char **argv )
+    {
+        TQApplication app( argc, argv );
+
+

As usual we then create a TQt application object and hand command line arguments +over to it. +

        TQFile xmlFile( argc == 2 ? argv[1] : "fnord.xml" );
+
+

If the user runs the program with one filename as +an argument we process this file, otherwise we use the fnord.xml file from +the example directory for demonstration purposes. +

        TQXmlInputSource source( &xmlFile );
+
+

We use xmlFile as the XML Input Source... +

        TQXmlSimpleReader reader;
+
+

... and instantiate a reader object. Later we will manipulate its features +and thus influence how the XML data are read. +

        TQGrid * container = new TQGrid( 3 );
+
+

Now let's think about presenting the output: As described in the +TQt SAX2 documentation +there are three valid combinations of http://xml.org/sax/features/namespace-prefixes +and http://xml.org/sax/features/namespaces: TRUE/TRUE, TRUE/FALSE and +FALSE/TRUE. To show the relevant output side by side of each other +and mark them with three labels makes up for a grid layout consisting +of three columns (and thus two lines). +

        TQListView * nameSpace = new TQListView( container, "table_namespace" );
+
+

The most natural way of presenting XML elements is in a tree. +Thus we use a listview. Its name nameSpace indicates that this +one will be used to present the combination of http://xml.org/sax/features/namespaces being TRUE and +http://xml.org/sax/features/namespace-prefixes +being FALSE -- the default configuration of a TQXmlSimpleReader. +

Being the first grid entry the nameSpace listview will +appear in the upper left corner of the virtual grid. +

        StructureParser * handler = new StructureParser( nameSpace );
+
+

Then we create a handler that deals with the XML data read by the reader. +As the provided handler class TQXmlDefaultHandler simply does nothing +with the data from the reader, +we can't use it right away. Instead we have to subclass our +own StructureParser from it. +

        reader.setContentHandler( handler );
+
+

The handler serves as content handler for the reader. Note that +for simplicity reasons we don't register e.g. an error handler. Thus +our program will not complain about for example missing closing tags +in the parsed XML document. +

        reader.parse( source );
+
+

Finally we parse the document with the reader's default feature settings. +

        TQListView * namespacePrefix = new TQListView( container,
+                                                     "table_namespace_prefix" );
+
+

Now we prepare for the parsing of the same XML input source with +different reader settings. The output will be presented in +a second TQListView, namespacePrefix. As it is the second +member of the container grid it will appear in the middle of +the upper grid row. +

        handler->setListView( namespacePrefix );
+
+

Then we ask the handler to present the data in the namespacePrefix +listview. +

        reader.setFeature( "http://xml.org/sax/features/namespace-prefixes",
+                           TRUE );
+
+

Now we modify the behaviour of the reader and change +http://xml.org/sax/features/namespace-prefixes from the default FALSE +to TRUE. The http://xml.org/sax/features/namespaces feature has +still its default setting TRUE. +

        source.reset();
+
+

We have to reset the input source to make the new parsing start from the +beginning of the document again. +

        reader.parse( source );
+
+

Finally we parse the XML file a second time with the changed reader +settings (TRUE/TRUE). +

        TQListView * prefix = new TQListView( container, "table_prefix");
+        handler->setListView( prefix );
+        reader.setFeature( "http://xml.org/sax/features/namespaces", FALSE );
+        source.reset();
+        reader.parse( source );
+
+

Next we prepare and use the upper right listview to show the reader results +with the feature setting http://xml.org/sax/features/namespaces +FALSE and http://xml.org/sax/features/namespace-prefixes TRUE. +

        // namespace label
+        (void) new TQLabel(
+                 "Default:\n"
+                 "http://xml.org/sax/features/namespaces: TRUE\n"
+                 "http://xml.org/sax/features/namespace-prefixes: FALSE\n",
+                 container );
+
+        // namespace prefix label
+        (void) new TQLabel(
+                 "\n"
+                 "http://xml.org/sax/features/namespaces: TRUE\n"
+                 "http://xml.org/sax/features/namespace-prefixes: TRUE\n",
+                 container );
+
+        // prefix label
+        (void) new TQLabel(
+                 "\n"
+                 "http://xml.org/sax/features/namespaces: FALSE\n"
+                 "http://xml.org/sax/features/namespace-prefixes: TRUE\n",
+                 container );
+
+

The second row of the container grid is filled with three labels +denoting the reader settings that belong to the above listview. +

        app.setMainWidget( container );
+        container->show();
+        return app.exec();
+    }
+
+

Same procedure as with every TQt GUI program: the grid serves as the +main widget of our application and is shown. After that we enter +the GUI's event loop. +

The handler API

+

Let's have a brief look at the API of our handler class +StructureParser: +

+ +

    #include <qxml.h>
+    #include <qptrstack.h>
+
+    class TQListView;
+    class TQListViewItem;
+    class TQString;
+
+

    class StructureParser: public TQXmlDefaultHandler
+    {
+
+

We derive it from the TQXmlDefaultHandler class that +implements a handler that simply does nothing. +

    public:
+        StructureParser( TQListView * );
+
+

This makes it easy for us to implement only the functionality +we in fact need. In our case this is the constructor that +takes a TQListView as an argument, +

        bool startElement( const TQString&, const TQString&, const TQString& ,
+                           const TQXmlAttributes& );
+
+

the function to execute at the occurrence of element start tags +(inherited from TQXmlContentHandler), and +

        bool endElement( const TQString&, const TQString&, const TQString& );
+
+

the code to run when an end tag occurs. +

All we have to implement so far is content handling. +

        void setListView( TQListView * );
+
+

In addition we have a function that selects a listview +for the output. +

    private:
+        TQPtrStack<TQListViewItem> stack;
+
+

Keep in mind that we write a SAX2 parser that doesn't +have an object model to keep all elements and attributes +in memory. To display the elements and attributes in a tree like +structure we must however keep track of all elements +that haven't been closed yet. +

To do this we use a LIFO stack +of TQListItems. An element will be added to the stack when +its start tag appears and removed +as soon as its end tag is parsed. +

        TQListView * table;
+    };
+
+

Apart from this we define a member variable that contains +the currently used listview. +

The handler itself

+

Now that we defined the API we have to implement the +relevant functions. +

+ +

    #include "structureparser.h"
+
+    #include <qstring.h>
+    #include <qlistview.h>
+
+

    StructureParser::StructureParser( TQListView * t )
+                    : TQXmlDefaultHandler()
+    {
+
+

First we have the constructor that takes a listview pointer as +its argument. +

        setListView( t );
+    }
+
+

All we have to do here is to prepare the argument TQListView +before usage. This we do with the setListView() function. +

+

    void StructureParser::setListView( TQListView * t )
+    {
+        table = t;
+
+

First we store the argument away. +

        table->setSorting( -1 );
+
+

We want the elements to be listed as they appear in the +document -- and not for example sorted alphabetically. That's +why we switch off sorting at all. +

        table->addColumn( "Qualified name" );
+        table->addColumn( "Namespace" );
+    }
+
+

The listview now consists of two columns: one for the +element's or attribute's qualified names and one for +their namespace URIs. Columns are added from left to right +and with the title as an argument. +

Now let's deal with XML content handling. +

    bool StructureParser::startElement( const TQString& namespaceURI,
+                                        const TQString& ,
+                                        const TQString& qName,
+                                        const TQXmlAttributes& attributes)
+    {
+
+

When we come across the start tag of an element the handler does +the real work. Although startElement is called with four +arguments we keep track of only three: the namespace URI +of the element, its qualified name and its attributes. +If an element has no namespace assigned or if the feature +settings of the reader don't provide the handler with +namespace URIs at all namespaceURI contains an empty +string. +

Note that we don't assign a variable to the second argument -- +we're simply not interested in the local name of the element. +

        TQListViewItem * element;
+
+

Whenever an element occurs we want to show it in the listview. +Therefore we define a TQListViewItem variable. +

        if ( ! stack.isEmpty() ){
+            TQListViewItem *lastChild = stack.top()->firstChild();
+
+

As long as the element stack isn't empty the current element +is a child of the topmost (last unclosed) element on the stack. Thus we +create a new TQListViewItem as a child of TQPtrStack::stack.top() with +the new element's qualified name in the first column and the according +namespace URI (or nothing) in the second one. +

The TQListViewItem is usally inserted as the first child. This means that we +would get the elements in reverse order. So we first search for the last +child of the TQPtrStack::stack.top() element and insert it after this +element. +

In a valid XML document this applies to all elements except +the document root. +

            if ( lastChild ) {
+                while ( lastChild->nextSibling() )
+                    lastChild = lastChild->nextSibling();
+            }
+            element = new TQListViewItem( stack.top(), lastChild, qName, namespaceURI );
+        } else {
+            element = new TQListViewItem( table, qName, namespaceURI );
+        }
+
+

The root element we have to handle separately because it is +the first element to go onto the TQListViewItem stack. +Its listview item is therefore a direct child of the +table listview itself. +

        stack.push( element );
+
+

Now we put the element's listview item on top of the stack. +

        element->setOpen( TRUE );
+
+

By default a TQListView presents all of its nodes closed. +The user may then click on the + icon to see the child +entries. +

We however want to see the entire element tree +at once when we run the program. +Therefore we open each listview item manually. +

        if ( attributes.length() > 0 ) {
+
+

What do we do if an element has attributes? +

            for ( int i = 0 ; i < attributes.length(); i++ ) {
+                new TQListViewItem( element, attributes.qName(i), attributes.uri(i) );
+            }
+        }
+
+

For each of them we create a new listview item to present the attribute's +qualified name and the relevant namespace URI (or nothing). +Obviously attribute is a child of +the current element. +

        return TRUE;
+    }
+
+

To prevent the reader from throwing an error we have to +return TRUE when we successfully dealt with an +element's start tag. +

    bool StructureParser::endElement( const TQString&, const TQString&,
+                                      const TQString& )
+    {
+        stack.pop();
+
+

Whenever we come across an element's closing tag we +have to remove its listview item from the stack as +it can't have children any longer. +

        return TRUE;
+    }
+
+

And so we're done. +

See also Step-by-step Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/xml-sax-walkthrough.html b/doc/html/xml-sax-walkthrough.html new file mode 100644 index 00000000..d9a2e0c2 --- /dev/null +++ b/doc/html/xml-sax-walkthrough.html @@ -0,0 +1,220 @@ + + + + + +Walkthrough: How to use the TQt SAX2 classes + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Walkthrough: How to use the TQt SAX2 classes

+ + +

+

For a general discussion of the XML topics in TQt please refer to +the document XML Module. +To learn more about SAX2 see the document describing +the TQt SAX2 implementation. +

Before reading on you should at least be familiar with +the Introduction to SAX2. +

+

A tiny parser

+

In this section we will present a small example reader that outputs +the names of all elements in an XML document on the command line. +The element names are indented corresponding to their nesting level. +

As mentioned in Introduction to SAX2 +we have to implement the functions of the handler classes that we are +interested in. In our case these are only three: +TQXmlContentHandler::startDocument(), +TQXmlContentHandler::startElement() and +TQXmlContentHandler::endElement(). +

For this purpose we use a subclass of the TQXmlDefaultHandler (remember +that the special handler classes are all abstract and the default handler class +provides an implementation that does not change the parsing behavior): +

/****************************************************************************
+** $Id: qt/structureparser.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 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.
+**
+*****************************************************************************/
+
+#ifndef STRUCTUREPARSER_H
+#define STRUCTUREPARSER_H
+
+#include <qxml.h>
+
+class TQString;
+
+class StructureParser : public TQXmlDefaultHandler
+{
+public:
+    bool startDocument();
+    bool startElement( const TQString&, const TQString&, const TQString& ,
+                       const TQXmlAttributes& );
+    bool endElement( const TQString&, const TQString&, const TQString& );
+
+private:
+    TQString indent;
+};
+
+#endif
+
+ +

Apart from the private helper variable indent that we will use to +get indentation right, there is nothing special about our new +StructureParser class. +

+ +

Even the implementation is straight-forward: +

    #include "structureparser.h"
+
+    #include <stdio.h>
+    #include <qstring.h>
+
+

First we overload TQXmlContentHandler::startDocument() with a non-empty version. +

    bool StructureParser::startDocument()
+    {
+        indent = "";
+        return TRUE;
+    }
+
+

At the beginning of the document we simply +set indent to an empty string because we +want to print out the root element without any indentation. +Also we return TRUE so that the parser continues without +reporting an error. +

Because we want to be informed when the parser comes +accross a start tag of an element and subsequently print it out, we +have to overload TQXmlContentHandler::startElement(). +

    bool StructureParser::startElement( const TQString&, const TQString&,
+                                        const TQString& qName,
+                                        const TQXmlAttributes& )
+    {
+        printf( "%s%s\n", (const char*)indent, (const char*)qName );
+        indent += "    ";
+        return TRUE;
+    }
+
+

This is what the implementation does: The name of the element with +preceding indentation is printed out followed by a linebreak. +Strictly speaking qName contains the local element name +without an eventual prefix denoting the namespace. +

If another element follows before the current element's end tag +it should be indented. Therefore we add four spaces to the +indent string. +

Finally we return TRUE in order to let the parser continue without +errors. +

The last functionality we need to add is the parser's behaviour when an +end tag occurs. This means overloading TQXmlContentHandler::endElement(). +

    bool StructureParser::endElement( const TQString&, const TQString&, const TQString& )
+    {
+        indent.remove( (uint)0, 4 );
+        return TRUE;
+    }
+
+

Obviously we then should shorten the indent string by the four +whitespaces added in startElement(). +

With this we're done with our parser and can start writing the main() +program. +

+ +

    #include "structureparser.h"
+    #include <qfile.h>
+    #include <qxml.h>
+    #include <qwindowdefs.h>
+
+    int main( int argc, char **argv )
+    {
+        if ( argc < 2 ) {
+            fprintf( stderr, "Usage: %s <xmlfile> [<xmlfile> ...]\n", argv[0] );
+            return 1;
+        }
+
+

This check ensures that we have a sequence of files from the command +line to examine. +

        StructureParser handler;
+
+

The next step is to create an instance of the StructureParser. +

        TQXmlSimpleReader reader;
+        reader.setContentHandler( &handler );
+
+

After that we set up the reader. As our StructureParser +class deals with TQXmlContentHandler functionality only +we simply register it as the content handler of our choice. +

        for ( int i=1; i < argc; i++ ) {
+
+

Successively we deal with all files given as command line arguments. +

            TQFile xmlFile( argv[i] );
+            TQXmlInputSource source( &xmlFile );
+
+

Then we create a +TQXmlInputSource for the XML file to be parsed. +

            reader.parse( source );
+
+

Now we take our input source and start parsing. +

        }
+        return 0;
+    }
+
+

Running the program on the following XML file... +

<animals>
+<mammals>
+  <monkeys> <gorilla/> <orangutan/> </monkeys>
+</mammals>
+<birds> <pigeon/> <penguin/> </birds>
+</animals>
+
+
+ +

... produces the following output: +

+animals
+    mammals
+        monkeys
+            gorilla
+            orang-utan
+    birds
+        pigeon
+        penguin 
+
+ +

It will however refuse to produce the correct result if you e.g. insert +a whitespace between a < and the element name in your test-XML file. +To prevent such annoyances +you should always install an error handler with TQXmlReader::setErrorHandler(). This allows you to report +parsing errors to the user. +

See also Step-by-step Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/xml-tools.html b/doc/html/xml-tools.html new file mode 100644 index 00000000..d7c94ee9 --- /dev/null +++ b/doc/html/xml-tools.html @@ -0,0 +1,77 @@ + + + + + +XML + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

XML

+ + +

These classes are relevant to XML users. + +

+
TQDomAttrRepresents one attribute of a TQDomElement +
TQDomCDATASectionRepresents an XML CDATA section +
TQDomCharacterDataRepresents a generic string in the DOM +
TQDomCommentRepresents an XML comment +
TQDomDocumentRepresents an XML document +
TQDomDocumentFragmentTree of TQDomNodes which is not usually a complete TQDomDocument +
TQDomDocumentTypeThe representation of the DTD in the document tree +
TQDomElementRepresents one element in the DOM tree +
TQDomEntityRepresents an XML entity +
TQDomEntityReferenceRepresents an XML entity reference +
TQDomImplementationInformation about the features of the DOM implementation +
TQDomNamedNodeMapCollection of nodes that can be accessed by name +
TQDomNodeThe base class for all the nodes in a DOM tree +
TQDomNodeListList of TQDomNode objects +
TQDomNotationRepresents an XML notation +
TQDomProcessingInstructionRepresents an XML processing instruction +
TQDomTextRepresents text data in the parsed XML document +
TQXmlAttributesXML attributes +
TQXmlContentHandlerInterface to report the logical content of XML data +
TQXmlDeclHandlerInterface to report declaration content of XML data +
TQXmlDefaultHandlerDefault implementation of all the XML handler classes +
TQXmlDTDHandlerInterface to report DTD content of XML data +
TQXmlEntityResolverInterface to resolve external entities contained in XML data +
TQXmlErrorHandlerInterface to report errors in XML data +
TQXmlInputSourceThe input data for the TQXmlReader subclasses +
TQXmlLexicalHandlerInterface to report the lexical content of XML data +
TQXmlLocatorThe XML handler classes with information about the parsing position within a file +
TQXmlNamespaceSupportHelper class for XML readers which want to include namespace support +
TQXmlParseExceptionUsed to report errors with the TQXmlErrorHandler interface +
TQXmlReaderInterface for XML readers (i.e. parsers) +
TQXmlSimpleReaderImplementation of a simple XML reader (parser) +
+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/xml.html b/doc/html/xml.html new file mode 100644 index 00000000..2167b785 --- /dev/null +++ b/doc/html/xml.html @@ -0,0 +1,573 @@ + + + + + +XML Module + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

XML Module

+ + +

+

+

+ + +

+

Overview of the XML architecture in TQt +

+

The XML module provides a well-formed XML parser using the SAX2 +(Simple API for XML) interface plus an implementation of the DOM Level +2 (Document Object Model). +

SAX is an event-based standard interface for XML parsers. +The TQt interface follows the design of the SAX2 Java implementation. +Its naming scheme was adapted to fit the TQt naming conventions. +Details on SAX2 can be found at +http://www.saxproject.org. +

Support for SAX2 filters and the reader factory are under +development. The TQt implementation does not include the SAX1 +compatibility classes present in the Java interface. +

For an introduction to TQt's SAX2 classes see +"The TQt SAX2 classes". +

DOM Level 2 is a W3C Recommendation for XML interfaces that maps the +constituents of an XML document to a tree structure. Details and the +specification of DOM Level 2 can be found at +http://www.w3.org/DOM/. +More information about the DOM classes in TQt is provided in the +TQt DOM classes. +

TQt provides the following XML related classes: +

+
Class Short description +
TQDomAttr +Represents one attribute of a TQDomElement +
TQDomCDATASection +Represents an XML CDATA section +
TQDomCharacterData +Represents a generic string in the DOM +
TQDomComment +Represents an XML comment +
TQDomDocument +The representation of an XML document +
TQDomDocumentFragment +Tree of TQDomNodes which is usually not a complete TQDomDocument +
TQDomDocumentType +The representation of the DTD in the document tree +
TQDomElement +Represents one element in the DOM tree +
TQDomEntity +Represents an XML entity +
TQDomEntityReference +Represents an XML entity reference +
TQDomImplementation +Information about the features of the DOM implementation +
TQDomNamedNodeMap +Collection of nodes that can be accessed by name +
TQDomNode +The base class for all nodes of the DOM tree +
TQDomNodeList +List of TQDomNode objects +
TQDomNotation +Represents an XML notation +
TQDomProcessingInstruction +Represents an XML processing instruction +
TQDomText +Represents textual data in the parsed XML document +
TQXmlAttributes +XML attributes +
TQXmlContentHandler +Interface to report logical content of XML data +
TQXmlDeclHandler +Interface to report declaration content of XML data +
TQXmlDefaultHandler +Default implementation of all XML handler classes +
TQXmlDTDHandler +Interface to report DTD content of XML data +
TQXmlEntityResolver +Interface to resolve extern entities contained in XML data +
TQXmlErrorHandler +Interface to report errors in XML data +
TQXmlInputSource +The input data for the TQXmlReader subclasses +
TQXmlLexicalHandler +Interface to report lexical content of XML data +
TQXmlLocator +The XML handler classes with information about the actual parsing position +
TQXmlNamespaceSupport +Helper class for XML readers which want to include namespace support +
TQXmlParseException +Used to report errors with the TQXmlErrorHandler interface +
TQXmlReader +Interface for XML readers (i.e. for SAX2 parsers) +
TQXmlSimpleReader +Implementation of a simple XML reader (a SAX2 parser) +
+

+

The TQt SAX2 classes +

+

+

Introduction to SAX2 +

+

The SAX2 interface is an event-driven mechanism to provide the user with +document information. An "event" in this context means something +reported by the parser, for example, it has encountered a start tag, +or an end tag, etc. +

To make it less abstract consider the following example: +

 
+<quote>A quotation.</quote>
+
+ +

Whilst reading (a SAX2 parser is usually referred to as "reader") +the above document three events would be triggered: +

    +
  1. A start tag occurs (<quote>). +
  2. Character data (i.e. text) is found, "A quotation.". +
  3. An end tag is parsed (</quote>). +
+

Each time such an event occurs the parser reports it; you can set up +event handlers to respond to these events. +

Whilst this is a fast and simple approach to read XML documents, +manipulation is difficult because data is not stored, simply handled +and discarded serially. The DOM interface reads in and stores the whole document in a tree structure; +this takes more memory, but makes it easier to manipulate the +document's structure.. +

The TQt XML module provides an abstract class, TQXmlReader, that +defines the interface for potential SAX2 readers. TQt includes a reader +implementation, TQXmlSimpleReader, that is easy to adapt through +subclassing. +

The reader reports parsing events through special handler classes: +

+
Handler class Description +
TQXmlContentHandler +Reports events related to the content of a document (e.g. the start tag +or characters). +
TQXmlDTDHandler +Reports events related to the DTD (e.g. notation declarations). +
TQXmlErrorHandler +Reports errors or warnings that occurred during parsing. +
TQXmlEntityResolver +Reports external entities during parsing and allows users to resolve +external entities themselves instead of leaving it to the reader. +
TQXmlDeclHandler +Reports further DTD related events (e.g. attribute declarations). +
TQXmlLexicalHandler +Reports events related to the lexical structure of the +document (the beginning of the DTD, comments etc.). +
+

These classes are abstract classes describing the interface. The TQXmlDefaultHandler class provides a "do nothing" default +implementation for all of them. Therefore users only need to overload +the TQXmlDefaultHandler functions they are interested in. +

To read input XML data a special class TQXmlInputSource is used. +

Apart from those already mentioned, the following SAX2 support classes +provide additional useful functionality: +

+
Class Description +
TQXmlAttributes +Used to pass attributes in a start element event. +
TQXmlLocator +Used to obtain the actual parsing position of an event. +
TQXmlNamespaceSupport +Used to implement namespace +support for a reader. Note that namespaces do not change the +parsing behavior. They are only reported through the handler. +
+

+

Features +

+

The behaviour of an XML reader depends on its support for certain +optional features. For example, a reader may have the feature "report +attributes used for namespace +declarations and prefixes along with the local name of a tag". Like +every other feature this has a unique name represented by a URI: it is +called http://xml.org/sax/features/namespace-prefixes. +

The TQt SAX2 implementation can report whether the reader has +particular functionality using the TQXmlReader::hasFeature() +function. Available features can be tested with TQXmlReader::feature(), +and switched on or off using TQXmlReader::setFeature(). +

Consider the example +

 
+<document xmlns:book = 'http://trolltech.com/fnord/book/'
+          xmlns      = 'http://trolltech.com/fnord/' >
+
+ +A reader that does not support the http://xml.org/sax/features/namespace-prefixes feature would report +the element name document but not its attributes xmlns:book and +xmlns with their values. A reader with the feature http://xml.org/sax/features/namespace-prefixes reports the namespace +attributes if the feature is +switched on. +

Other features include http://xml.org/sax/features/namespace +(namespace processing, implies http://xml.org/sax/features/namespace-prefixes) and http://xml.org/sax/features/validation (the ability to report +validation errors). +

Whilst SAX2 leaves it to the user to define and implement whatever +features are retquired, support for http://xml.org/sax/features/namespace (and thus http://xml.org/sax/features/namespace-prefixes) is mandantory. +The TQXmlSimpleReader implementation of TQXmlReader, +supports them, and can do namespace processing. +

TQXmlSimpleReader is not validating, so it +does not support http://xml.org/sax/features/validation. +

+

Namespace support via features +

+

As we have seen in the previous section +we can configure the behavior of the reader when it comes to namespace +processing. This is done by setting and unsetting the +http://xml.org/sax/features/namespaces and +http://xml.org/sax/features/namespace-prefixes features. +

They influence the reporting behavior in the following way: +

    +
  1. Namespace prefixes and local parts of elements and attributes can +be reported. +
  2. The qualified names of elements and attributes are reported. +
  3. TQXmlContentHandler::startPrefixMapping() and TQXmlContentHandler::endPrefixMapping() are called by the reader. +
  4. Attributes that declare namespaces (i.e. the attribute xmlns and +attributes starting with xmlns:) are reported. +
+

Consider the following element: +

+<author xmlns:fnord = 'http://trolltech.com/fnord/'
+             title="Ms" 
+             fnord:title="Goddess" 
+             name="Eris Kallisti"/>
+
+ +With http://xml.org/sax/features/namespace-prefixes set to TRUE +the reader will report four attributes; but with the namespace-prefixes feature set to FALSE only three, with the xmlns:fnord attribute defining a namespace being "invisible" to the +reader. +

The http://xml.org/sax/features/namespaces feature is responsible +for reporting local names, namespace prefixes and URIs. With http://xml.org/sax/features/namespaces set to TRUE the parser will +report title as the local name of the fnord:title attribute, fnord being the namespace prefix and http://trolltech.com/fnord/ as +the namespace URI. When http://xml.org/sax/features/namespaces is +FALSE none of them are reported. +

In the current implementation the TQt XML classes follow the definition +that the prefix xmlns itself isn't associated with any namespace at all +(see http://www.w3.org/TR/1999/REC-xml-names-19990114/#ns-using). +Therefore even with http://xml.org/sax/features/namespaces and +http://xml.org/sax/features/namespace-prefixes both set to TRUE +the reader won't return either a local name, a namespace prefix or +a namespace URI for xmlns:fnord. +

This might be changed in the future following the W3C suggestion +http://www.w3.org/2000/xmlns/ +to associate xmlns with the namespace http://www.w3.org/2000/xmlns. +

As the SAX2 standard suggests, TQXmlSimpleReader defaults to having +http://xml.org/sax/features/namespaces set to TRUE and +http://xml.org/sax/features/namespace-prefixes set to FALSE. +When changing this behavior using TQXmlSimpleReader::setFeature() +note that the combination of both features set to +FALSE is illegal. +

For a practical demonstration of how the two features affect the +output of the reader run the tagreader with features example. +

+

Summary +

+

TQXmlSimpleReader implements the following behavior: +

+
(namespaces, namespace-prefixes) +Namespace prefix and local part +Qualified names +Prefix mapping +xmlns attributes +
(TRUE, FALSE) Yes Yes* Yes No +
(TRUE, TRUE) Yes Yes Yes Yes +
(FALSE, TRUE) No* Yes No* Yes +
(FALSE, FALSE) Illegal +
+

* The behavior of these entries is not specified by SAX. +

+

Properties +

+

Properties are a more general concept. They have a unique name, +represented as an URI, but their value is void*. Thus nearly +anything can be used as a property value. This concept involves some +danger, though: there is no means of ensuring type-safety; the user +must take care that they pass the right type. Properties are +useful if a reader supports special handler classes. +

The URIs used for features and properties often look like URLs, e.g. +http://xml.org/sax/features/namespace. This does not mean that the +data retquired is at this address. It is simply a way of defining +unique names. +

Anyone can define and use new SAX2 properties for their readers. +Property support is not mandatory. +

To set or query properties the following functions are provided: TQXmlReader::setProperty(), TQXmlReader::property() and TQXmlReader::hasProperty(). +

+

Further reading +

+

More information about XML (e.g. namespaces) +can be found in the introduction to the TQt XML module. +

+

The TQt DOM classes +

+

+

Introduction to DOM +

+

DOM provides an interface to access and change the content and +structure of an XML file. It makes a hierarchical view of the document +(a tree view). Thus -- in contrast to the SAX2 interface -- an object +model of the document is resident in memory after parsing which makes +manipulation easy. +

All DOM nodes in the document tree are subclasses of TQDomNode. The +document itself is represented as a TQDomDocument object. +

Here are the available node classes and their potential child classes: +

+

With TQDomNodeList and TQDomNamedNodeMap two collection classes +are provided: TQDomNodeList is a list of nodes, +and TQDomNamedNodeMap is used to handle unordered sets of nodes +(often used for attributes). +

The TQDomImplementation class allows the user to query features of the +DOM implementation. +

Further reading +

+

To get started please refer to the TQDomDocument documentation. +

+

An introduction to namespaces +

+

Parts of the TQt XML module documentation assume that you are familiar +with XML namespaces. Here we present a brief introduction; skip to +TQt XML documentation conventions +if you already know this material. +

Namespaces are a concept introduced into XML to allow a more modular +design. With their help data processing software can easily resolve +naming conflicts in XML documents. +

Consider the following example: +

+<document>
+<book>
+  <title>Practical XML</title>
+  <author title="Ms" name="Eris Kallisti"/>
+  <chapter>
+    <title>A Namespace Called fnord</title>
+  </chapter>
+</book>
+</document>
+
+ +

Here we find three different uses of the name title. If you wish to +process this document you will encounter problems because each of the +titles should be displayed in a different manner -- even though +they have the same name. +

The solution would be to have some means of identifying the first +occurrence of title as the title of a book, i.e. to use the title element of a book namespace to distinguish it from, for example, +the chapter title, e.g.: +

+<book:title>Practical XML</book:title>
+
+ +

book in this case is a prefix denoting the namespace. +

Before we can apply a namespace to element or attribute names we must +declare it. +

Namespaces are URIs like http://trolltech.com/fnord/book/. This +does not mean that data must be available at this address; the URI is +simply used to provide a unique name. +

We declare namespaces in the same way as attributes; strictly speaking +they are attributes. To make for example http://trolltech.com/fnord/ the document's default XML namespace xmlns we write +

+xmlns="http://trolltech.com/fnord/"
+
+ +

To distinguish the http://trolltech.com/fnord/book/ namespace from +the default, we must supply it with a prefix: +

+xmlns:book="http://trolltech.com/fnord/book/"
+
+ +

A namespace that is declared like this can be applied to element and +attribute names by prepending the appropriate prefix and a ":" +delimiter. We have already seen this with the book:title element. +

Element names without a prefix belong to the default namespace. This +rule does not apply to attributes: an attribute without a prefix does +not belong to any of the declared XML namespaces at all. Attributes +always belong to the "traditional" namespace of the element in which +they appear. A "traditional" namespace is not an XML namespace, it +simply means that all attribute names belonging to one element must be +different. Later we will see how to assign an XML namespace to an +attribute. +

Due to the fact that attributes without prefixes are not in any XML +namespace there is no collision between the attribute title (that +belongs to the author element) and for example the title element +within a chapter. +

Let's clarify this with an example: +

+<document xmlns:book = 'http://trolltech.com/fnord/book/'
+          xmlns      = 'http://trolltech.com/fnord/' >
+<book>
+  <book:title>Practical XML</book:title>
+  <book:author xmlns:fnord = 'http://trolltech.com/fnord/'
+               title="Ms"
+               fnord:title="Goddess"
+               name="Eris Kallisti"/>
+  <chapter>
+    <title>A Namespace Called fnord</title>
+  </chapter>
+</book>
+</document>
+
+ +

Within the document element we have two namespaces declared. The +default namespace http://trolltech.com/fnord/ applies to the book element, the chapter element, the appropriate title element +and of course to document itself. +

The book:author and book:title elements belong to the namespace +with the URI http://trolltech.com/fnord/book/. +

The two book:author attributes title and name have no XML +namespace assigned. They are only members of the "traditional" +namespace of the element book:author, meaning that for example two +title attributes in book:author are forbidden. +

In the above example we circumvent the last rule by adding a title +attribute from the http://trolltech.com/fnord/ namespace to book:author: the fnord:title comes from the namespace with the +prefix fnord that is declared in the book:author element. +

Clearly the fnord namespace has the same namespace URI as the +default namespace. So why didn't we simply use the default namespace +we'd already declared? The answer is tquite complex: +

    +
  • attributes without a prefix don't belong to any XML namespace at +all, not even to the default namespace; +
  • additionally omitting the prefix would lead to a title-title clash; +
  • writing it as xmlns:title would declare a new namespace with the +prefix title instead of applying the default xmlns namespace. +
+

With the TQt XML classes elements and attributes can be accessed in two +ways: either by refering to their qualified names consisting of the +namespace prefix and the "real" name (or local name) or by the +combination of local name and namespace URI. +

More information on XML namespaces can be found at +http://www.w3.org/TR/REC-xml-names/. +

+

Conventions used in TQt XML documentation +

+

The following terms are used to distinguish the parts of names within +the context of namespaces: +

    +
  • The qualified name +is the name as it appears in the document. (In the above example book:title is a qualified name.) +
  • A namespace prefix in a qualified name +is the part to the left of the ":". (book is the namespace prefix in +book:title.) +
  • The local part of a name (also refered to as the local name) appears to the right of the ":". (Thus title is the +local part of book:title.) +
  • The namespace URI ("Uniform Resource Identifier") is a unique +identifier for a namespace. It looks like a URL +(e.g. http://trolltech.com/fnord/ ) but does not retquire +data to be accessible by the given protocol at the named address. +
+

Elements without a ":" (like chapter in the example) do not have a +namespace prefix. In this case the local part and the qualified name +are identical (i.e. chapter). + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/y2k.html b/doc/html/y2k.html new file mode 100644 index 00000000..c2ea7f29 --- /dev/null +++ b/doc/html/y2k.html @@ -0,0 +1,82 @@ + + + + + +Year 2000 Compliance Statement + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Year 2000 Compliance Statement

+ + +

Trolltech defines Year 2000 Compliance as a retquirement that a +product or part of product does not contain errors related to +transition from December 31, 1999 to January 1, 2000, or to the +existence of February 29, 2000. +

This document certifies that the API provided by TQt and the +implementation of TQt are both Year 2000 Compliant, and that the use of +underlying APIs by TQt does not have any known problems. +

The API Provided by TQt +

+

Several parts of TQt deal with dates and times: +

    +
  • TQDate - provides date management +
  • TQDateTime - provides date/time management +
  • TQTime - provides time management (within a date) +
  • TQTimer - provides delayed or regular execution of code. +
+

All of these classes' external APIs are Year 2000 Compliant: TQDate and +TQDateTime offer only four-digit years as output, TQTime and TQTimer do +not deal with years or leap days at all. +

Implementation Issues in TQt +

+

All date/time calculation and storage in TQt uses number of days, +seconds or milliseconds, and is thus Year 2000 Compliant. +

This applies to the above four classes and also to TQFileDialog +(which can sort files by time/date), TQFileInfo (which operates on +file times/dates) and TQApplication (which does various internal +housekeeping tasks). +

The conversion to year/month/date format in TQDate (and +TQDateTime) has been verified to be correct for all of December 31, +1999, January 1, 2000, February 28 and 29, 2000, March 1, 2000, +January 1, 2001 and March 1, 2001. +

TQt has been verified to be robust in case of time/date errors (such as +time warps) in the underlying operating system. +

Use of System APIs +

+

It is of course impossible for Trolltech to ensure that both of the +window systems and all of the operating systems on which TQt runs are +Year 2000 Compliant. However, TQt does not use any APIs that are known +to have any Year 2000-related bugs, or seem at risk to have any. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ -- cgit v1.2.3